diff --git a/c-api/abstract.po b/c-api/abstract.po index 6d17b293..8be8648c 100644 --- a/c-api/abstract.po +++ b/c-api/abstract.po @@ -11,19 +11,21 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/abstract.rst:7 msgid "Abstract Objects Layer" msgstr "Abstrakte Objekte Schicht" +#: ../../c-api/abstract.rst:9 msgid "" "The functions in this chapter interact with Python objects regardless of " "their type, or with wide classes of object types (e.g. all numerical types, " @@ -36,6 +38,7 @@ msgstr "" "verwendet werden, für die sie nicht gelten, lösen sie eine Python-Ausnahme " "aus." +#: ../../c-api/abstract.rst:14 msgid "" "It is not possible to use these functions on objects that are not properly " "initialized, such as a list object that has been created by :c:func:" diff --git a/c-api/abstract.po~ b/c-api/abstract.po~ new file mode 100644 index 00000000..6d17b293 --- /dev/null +++ b/c-api/abstract.po~ @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Abstract Objects Layer" +msgstr "Abstrakte Objekte Schicht" + +msgid "" +"The functions in this chapter interact with Python objects regardless of " +"their type, or with wide classes of object types (e.g. all numerical types, " +"or all sequence types). When used on object types for which they do not " +"apply, they will raise a Python exception." +msgstr "" +"Die Funktionen in diesem Kapitel interagieren mit Python-Objekten unabhängig " +"von ihrem Typ oder mit breiten Klassen von Objekttypen (z. B. allen " +"numerischen Typen oder allen Sequenztypen). Wenn sie für Objekttypen " +"verwendet werden, für die sie nicht gelten, lösen sie eine Python-Ausnahme " +"aus." + +msgid "" +"It is not possible to use these functions on objects that are not properly " +"initialized, such as a list object that has been created by :c:func:" +"`PyList_New`, but whose items have not been set to some non-\\ ``NULL`` " +"value yet." +msgstr "" +"Es ist nicht möglich, diese Funktionen auf Objekte anzuwenden, die nicht " +"ordnungsgemäß initialisiert sind, wie z. B. ein Listenobjekt, das mit :c:" +"func:`PyList_New` erstellt wurde, dessen Elemente aber noch nicht auf ein " +"nicht-\\ ``NULL`` Wert gesetzt wurden." diff --git a/c-api/allocation.po b/c-api/allocation.po index 6afff286..907a04fe 100644 --- a/c-api/allocation.po +++ b/c-api/allocation.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Allocating Objects on the Heap" +#: ../../c-api/allocation.rst:6 +msgid "Allocating objects on the heap" msgstr "" +#: ../../c-api/allocation.rst:17 msgid "" "Initialize a newly allocated object *op* with its type and initial " "reference. Returns the initialized object. Other fields of the object are " @@ -29,6 +31,7 @@ msgid "" "__init__` method." msgstr "" +#: ../../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:`!" @@ -36,21 +39,25 @@ msgid "" "`PyObject_New`." msgstr "" +#: ../../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 "" +#: ../../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." msgstr "" +#: ../../c-api/allocation.rst:42 msgid "" "This function only initializes some of the object's memory. It does not " "zero the rest." msgstr "" +#: ../../c-api/allocation.rst:48 msgid "" "Allocates a new Python object using the C structure type *TYPE* and the " "Python type object *typeobj* (``PyTypeObject*``) by calling :c:func:" @@ -59,38 +66,45 @@ msgid "" "its reference count will be one)." msgstr "" +#: ../../c-api/allocation.rst:54 ../../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 "" +#: ../../c-api/allocation.rst:57 ../../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 "" +#: ../../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 "" +#: ../../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 "" +#: ../../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 "" +#: ../../c-api/allocation.rst:73 ../../c-api/allocation.rst:123 msgid "" "The returned memory is not guaranteed to have been completely zeroed before " "it was initialized." msgstr "" +#: ../../c-api/allocation.rst:78 ../../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:" @@ -98,33 +112,44 @@ msgid "" "call *typeobj* instead. For example::" msgstr "" +#: ../../c-api/allocation.rst:83 msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);" msgstr "" +#: ../../c-api/allocation.rst:87 ../../c-api/allocation.rst:137 +#: ../../c-api/allocation.rst:184 ../../c-api/allocation.rst:186 +#: ../../c-api/allocation.rst:188 msgid ":c:func:`PyObject_Free`" msgstr "" +#: ../../c-api/allocation.rst:88 msgid ":c:macro:`PyObject_GC_New`" msgstr "" +#: ../../c-api/allocation.rst:89 ../../c-api/allocation.rst:139 msgid ":c:func:`PyType_GenericAlloc`" msgstr "" +#: ../../c-api/allocation.rst:90 ../../c-api/allocation.rst:140 msgid ":c:member:`~PyTypeObject.tp_alloc`" msgstr "" +#: ../../c-api/allocation.rst:95 msgid "Like :c:macro:`PyObject_New` except:" msgstr "" +#: ../../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 "" +#: ../../c-api/allocation.rst:100 msgid "The memory is initialized like :c:func:`PyObject_InitVar`." msgstr "" +#: ../../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 " @@ -132,34 +157,80 @@ msgid "" "memory management efficiency." msgstr "" +#: ../../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 "" +#: ../../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 "" +#: ../../c-api/allocation.rst:133 msgid "" "PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);" msgstr "" +#: ../../c-api/allocation.rst:138 msgid ":c:macro:`PyObject_GC_NewVar`" msgstr "" -msgid "Same as :c:func:`PyObject_Free`." -msgstr "" - +#: ../../c-api/allocation.rst:145 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 " "object." msgstr "" +#: ../../c-api/allocation.rst:152 msgid ":ref:`moduleobjects`" msgstr "" +#: ../../c-api/allocation.rst:153 msgid "To allocate and create extension modules." msgstr "" + +#: ../../c-api/allocation.rst:157 +msgid "Soft-deprecated aliases" +msgstr "" + +#: ../../c-api/allocation.rst:161 +msgid "" +"These are aliases to existing functions and macros. They exist solely for " +"backwards compatibility." +msgstr "" + +#: ../../c-api/allocation.rst:169 +msgid "Soft-deprecated alias" +msgstr "" + +#: ../../c-api/allocation.rst:170 +msgid "Function" +msgstr "" + +#: ../../c-api/allocation.rst:172 +msgid ":c:macro:`PyObject_New`" +msgstr "" + +#: ../../c-api/allocation.rst:174 +msgid ":c:macro:`PyObject_NewVar`" +msgstr "" + +#: ../../c-api/allocation.rst:176 +msgid ":c:func:`PyObject_Init`" +msgstr "" + +#: ../../c-api/allocation.rst:178 +msgid ":c:func:`PyObject_InitVar`" +msgstr "" + +#: ../../c-api/allocation.rst:180 +msgid ":c:func:`PyObject_Malloc`" +msgstr "" + +#: ../../c-api/allocation.rst:182 +msgid ":c:func:`PyObject_Realloc`" +msgstr "" diff --git a/c-api/allocation.po~ b/c-api/allocation.po~ new file mode 100644 index 00000000..6afff286 --- /dev/null +++ b/c-api/allocation.po~ @@ -0,0 +1,165 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Allocating Objects on the Heap" +msgstr "" + +msgid "" +"Initialize a newly allocated object *op* with its type and initial " +"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 "" + +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 "" + +msgid "" +"This function only initializes the object's memory corresponding to the " +"initial :c:type:`PyObject` structure. It does not zero the rest." +msgstr "" + +msgid "" +"This does everything :c:func:`PyObject_Init` does, and also initializes the " +"length information for a variable-size object." +msgstr "" + +msgid "" +"This function only initializes some of the object's memory. It does not " +"zero the rest." +msgstr "" + +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 "" + +msgid "" +"Avoid calling this directly to allocate memory for an object; call the " +"type's :c:member:`~PyTypeObject.tp_alloc` slot instead." +msgstr "" + +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 "" + +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 "" + +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 "" + +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 "" + +msgid "" +"The returned memory is not guaranteed to have been completely zeroed before " +"it was initialized." +msgstr "" + +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 "" + +msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);" +msgstr "" + +msgid ":c:func:`PyObject_Free`" +msgstr "" + +msgid ":c:macro:`PyObject_GC_New`" +msgstr "" + +msgid ":c:func:`PyType_GenericAlloc`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr "" + +msgid "Like :c:macro:`PyObject_New` except:" +msgstr "" + +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 "" + +msgid "The memory is initialized like :c:func:`PyObject_InitVar`." +msgstr "" + +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 "" + +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 "" + +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 "" + +msgid "" +"PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);" +msgstr "" + +msgid ":c:macro:`PyObject_GC_NewVar`" +msgstr "" + +msgid "Same as :c:func:`PyObject_Free`." +msgstr "" + +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 " +"object." +msgstr "" + +msgid ":ref:`moduleobjects`" +msgstr "" + +msgid "To allocate and create extension modules." +msgstr "" diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index 2daec01b..1d0a54b1 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -11,201 +11,275 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/apiabiversion.rst:7 msgid "API and ABI Versioning" msgstr "" +#: ../../c-api/apiabiversion.rst:11 msgid "Build-time version constants" msgstr "" +#: ../../c-api/apiabiversion.rst:13 msgid "" "CPython exposes its version number in the following macros. Note that these " "correspond to the version code is **built** with. See :c:var:`Py_Version` " "for the version used at **run time**." msgstr "" +#: ../../c-api/apiabiversion.rst:17 msgid "" "See :ref:`stable` for a discussion of API and ABI stability across versions." msgstr "" +#: ../../c-api/apiabiversion.rst:21 msgid "The ``3`` in ``3.4.1a2``." msgstr "" +#: ../../c-api/apiabiversion.rst:25 msgid "The ``4`` in ``3.4.1a2``." msgstr "" +#: ../../c-api/apiabiversion.rst:29 msgid "The ``1`` in ``3.4.1a2``." msgstr "" +#: ../../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." msgstr "" +#: ../../c-api/apiabiversion.rst:48 +msgid "" +"For completeness, the values are available as macros: :c:macro:`!" +"PY_RELEASE_LEVEL_ALPHA` (``0xA``), :c:macro:`!PY_RELEASE_LEVEL_BETA` " +"(``0xB``), :c:macro:`!PY_RELEASE_LEVEL_GAMMA` (``0xC``), and :c:macro:`!" +"PY_RELEASE_LEVEL_FINAL` (``0xF``)." +msgstr "" + +#: ../../c-api/apiabiversion.rst:56 msgid "The ``2`` in ``3.4.1a2``. Zero for final releases." msgstr "" +#: ../../c-api/apiabiversion.rst:60 msgid "" "The Python version number encoded in a single integer. See :c:func:" "`Py_PACK_FULL_VERSION` for the encoding details." msgstr "" +#: ../../c-api/apiabiversion.rst:63 msgid "" "Use this for numeric comparisons, for example, ``#if PY_VERSION_HEX >= ...``." msgstr "" +#: ../../c-api/apiabiversion.rst:68 +msgid "The Python version as a string, for example, ``\"3.4.1a2\"``." +msgstr "" + +#: ../../c-api/apiabiversion.rst:70 +msgid "These macros are defined in :source:`Include/patchlevel.h`." +msgstr "" + +#: ../../c-api/apiabiversion.rst:74 msgid "Run-time version" msgstr "" +#: ../../c-api/apiabiversion.rst:78 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 "" +#: ../../c-api/apiabiversion.rst:82 msgid "" "Use this for numeric comparisons, for example, ``if (Py_Version >= ...)``." msgstr "" +#: ../../c-api/apiabiversion.rst:88 msgid "Bit-packing macros" msgstr "" +#: ../../c-api/apiabiversion.rst:92 msgid "" "Return the given version, encoded as a single 32-bit integer with the " "following structure:" msgstr "" +#: ../../c-api/apiabiversion.rst:98 msgid "Argument" msgstr "" +#: ../../c-api/apiabiversion.rst:96 msgid "No. of bits" msgstr "" +#: ../../c-api/apiabiversion.rst:98 msgid "Bit mask" msgstr "" +#: ../../c-api/apiabiversion.rst:98 msgid "Bit shift" msgstr "" +#: ../../c-api/apiabiversion.rst:96 msgid "Example values" msgstr "" +#: ../../c-api/apiabiversion.rst:98 ../../c-api/apiabiversion.rst:116 msgid "``3.4.1a2``" msgstr "" +#: ../../c-api/apiabiversion.rst:98 ../../c-api/apiabiversion.rst:118 msgid "``3.10.0``" msgstr "" +#: ../../c-api/apiabiversion.rst:100 msgid "*major*" msgstr "" +#: ../../c-api/apiabiversion.rst:100 ../../c-api/apiabiversion.rst:102 +#: ../../c-api/apiabiversion.rst:104 msgid "8" msgstr "" +#: ../../c-api/apiabiversion.rst:100 msgid "``0xFF000000``" msgstr "" +#: ../../c-api/apiabiversion.rst:100 msgid "24" msgstr "" +#: ../../c-api/apiabiversion.rst:100 msgid "``0x03``" msgstr "``0x03``" +#: ../../c-api/apiabiversion.rst:102 msgid "*minor*" msgstr "" +#: ../../c-api/apiabiversion.rst:102 msgid "``0x00FF0000``" msgstr "" +#: ../../c-api/apiabiversion.rst:102 msgid "16" msgstr "" +#: ../../c-api/apiabiversion.rst:102 msgid "``0x04``" msgstr "``0x04``" +#: ../../c-api/apiabiversion.rst:102 msgid "``0x0A``" msgstr "" +#: ../../c-api/apiabiversion.rst:104 msgid "*micro*" msgstr "" +#: ../../c-api/apiabiversion.rst:104 msgid "``0x0000FF00``" msgstr "" +#: ../../c-api/apiabiversion.rst:104 msgid "``0x01``" msgstr "``0x01``" +#: ../../c-api/apiabiversion.rst:104 msgid "``0x00``" msgstr "" +#: ../../c-api/apiabiversion.rst:106 msgid "*release_level*" msgstr "" +#: ../../c-api/apiabiversion.rst:106 ../../c-api/apiabiversion.rst:108 msgid "4" msgstr "" +#: ../../c-api/apiabiversion.rst:106 msgid "``0x000000F0``" msgstr "" +#: ../../c-api/apiabiversion.rst:106 msgid "``0xA``" msgstr "``0xA``" +#: ../../c-api/apiabiversion.rst:106 msgid "``0xF``" msgstr "" +#: ../../c-api/apiabiversion.rst:108 msgid "*release_serial*" msgstr "" +#: ../../c-api/apiabiversion.rst:108 msgid "``0x0000000F``" msgstr "" +#: ../../c-api/apiabiversion.rst:108 msgid "0" msgstr "" +#: ../../c-api/apiabiversion.rst:108 msgid "``0x2``" msgstr "``0x2``" +#: ../../c-api/apiabiversion.rst:108 msgid "``0x0``" msgstr "" +#: ../../c-api/apiabiversion.rst:111 msgid "For example:" msgstr "Zum Beispiel:" +#: ../../c-api/apiabiversion.rst:114 msgid "Version" msgstr "" +#: ../../c-api/apiabiversion.rst:114 msgid "``Py_PACK_FULL_VERSION`` arguments" msgstr "" +#: ../../c-api/apiabiversion.rst:114 msgid "Encoded version" msgstr "" +#: ../../c-api/apiabiversion.rst:116 msgid "``(3, 4, 1, 0xA, 2)``" msgstr "" +#: ../../c-api/apiabiversion.rst:116 msgid "``0x030401a2``" msgstr "" +#: ../../c-api/apiabiversion.rst:118 msgid "``(3, 10, 0, 0xF, 0)``" msgstr "" +#: ../../c-api/apiabiversion.rst:118 msgid "``0x030a00f0``" msgstr "" +#: ../../c-api/apiabiversion.rst:121 msgid "" "Out-of range bits in the arguments are ignored. That is, the macro can be " "defined as:" msgstr "" +#: ../../c-api/apiabiversion.rst:124 msgid "" "#ifndef Py_PACK_FULL_VERSION\n" "#define Py_PACK_FULL_VERSION(X, Y, Z, LEVEL, SERIAL) ( \\\n" @@ -217,11 +291,13 @@ msgid "" "#endif" msgstr "" +#: ../../c-api/apiabiversion.rst:135 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 "" +#: ../../c-api/apiabiversion.rst:142 msgid "" "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 " diff --git a/c-api/apiabiversion.po~ b/c-api/apiabiversion.po~ new file mode 100644 index 00000000..2daec01b --- /dev/null +++ b/c-api/apiabiversion.po~ @@ -0,0 +1,229 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "API and ABI Versioning" +msgstr "" + +msgid "Build-time version constants" +msgstr "" + +msgid "" +"CPython exposes its version number in the following macros. Note that these " +"correspond to the version code is **built** with. See :c:var:`Py_Version` " +"for the version used at **run time**." +msgstr "" + +msgid "" +"See :ref:`stable` for a discussion of API and ABI stability across versions." +msgstr "" + +msgid "The ``3`` in ``3.4.1a2``." +msgstr "" + +msgid "The ``4`` in ``3.4.1a2``." +msgstr "" + +msgid "The ``1`` in ``3.4.1a2``." +msgstr "" + +msgid "" +"The ``a`` in ``3.4.1a2``. This can be ``0xA`` for alpha, ``0xB`` for beta, " +"``0xC`` for release candidate or ``0xF`` for final." +msgstr "" + +msgid "The ``2`` in ``3.4.1a2``. Zero for final releases." +msgstr "" + +msgid "" +"The Python version number encoded in a single integer. See :c:func:" +"`Py_PACK_FULL_VERSION` for the encoding details." +msgstr "" + +msgid "" +"Use this for numeric comparisons, for example, ``#if PY_VERSION_HEX >= ...``." +msgstr "" + +msgid "Run-time version" +msgstr "" + +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 "" + +msgid "" +"Use this for numeric comparisons, for example, ``if (Py_Version >= ...)``." +msgstr "" + +msgid "Bit-packing macros" +msgstr "" + +msgid "" +"Return the given version, encoded as a single 32-bit integer with the " +"following structure:" +msgstr "" + +msgid "Argument" +msgstr "" + +msgid "No. of bits" +msgstr "" + +msgid "Bit mask" +msgstr "" + +msgid "Bit shift" +msgstr "" + +msgid "Example values" +msgstr "" + +msgid "``3.4.1a2``" +msgstr "" + +msgid "``3.10.0``" +msgstr "" + +msgid "*major*" +msgstr "" + +msgid "8" +msgstr "" + +msgid "``0xFF000000``" +msgstr "" + +msgid "24" +msgstr "" + +msgid "``0x03``" +msgstr "``0x03``" + +msgid "*minor*" +msgstr "" + +msgid "``0x00FF0000``" +msgstr "" + +msgid "16" +msgstr "" + +msgid "``0x04``" +msgstr "``0x04``" + +msgid "``0x0A``" +msgstr "" + +msgid "*micro*" +msgstr "" + +msgid "``0x0000FF00``" +msgstr "" + +msgid "``0x01``" +msgstr "``0x01``" + +msgid "``0x00``" +msgstr "" + +msgid "*release_level*" +msgstr "" + +msgid "4" +msgstr "" + +msgid "``0x000000F0``" +msgstr "" + +msgid "``0xA``" +msgstr "``0xA``" + +msgid "``0xF``" +msgstr "" + +msgid "*release_serial*" +msgstr "" + +msgid "``0x0000000F``" +msgstr "" + +msgid "0" +msgstr "" + +msgid "``0x2``" +msgstr "``0x2``" + +msgid "``0x0``" +msgstr "" + +msgid "For example:" +msgstr "Zum Beispiel:" + +msgid "Version" +msgstr "" + +msgid "``Py_PACK_FULL_VERSION`` arguments" +msgstr "" + +msgid "Encoded version" +msgstr "" + +msgid "``(3, 4, 1, 0xA, 2)``" +msgstr "" + +msgid "``0x030401a2``" +msgstr "" + +msgid "``(3, 10, 0, 0xF, 0)``" +msgstr "" + +msgid "``0x030a00f0``" +msgstr "" + +msgid "" +"Out-of range bits in the arguments are ignored. That is, the macro can be " +"defined as:" +msgstr "" + +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 "" + +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 "" + +msgid "" +"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 "" diff --git a/c-api/arg.po b/c-api/arg.po index c9e7e232..da7c4b5a 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -12,25 +12,28 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Dennis Betz, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/arg.rst:6 msgid "Parsing arguments and building values" msgstr "" +#: ../../c-api/arg.rst:8 msgid "" "These functions are useful when creating your own extension functions and " "methods. Additional information and examples are available in :ref:" "`extending-index`." msgstr "" +#: ../../c-api/arg.rst:12 msgid "" "The first three of these functions described, :c:func:`PyArg_ParseTuple`, :c:" "func:`PyArg_ParseTupleAndKeywords`, and :c:func:`PyArg_Parse`, all use " @@ -39,9 +42,11 @@ msgid "" "functions." msgstr "" +#: ../../c-api/arg.rst:19 msgid "Parsing arguments" msgstr "" +#: ../../c-api/arg.rst:21 msgid "" "A format string consists of zero or more \"format units.\" A format unit " "describes one Python object; it is usually a single character or a " @@ -53,9 +58,11 @@ msgid "" "brackets is the type of the C variable(s) whose address should be passed." msgstr "" +#: ../../c-api/arg.rst:33 msgid "Strings and buffers" msgstr "" +#: ../../c-api/arg.rst:37 msgid "" "On Python 3.12 and older, the macro :c:macro:`!PY_SSIZE_T_CLEAN` must be " "defined before including :file:`Python.h` to use all ``#`` variants of " @@ -63,17 +70,21 @@ msgid "" "Python 3.13 and later." msgstr "" +#: ../../c-api/arg.rst:42 msgid "" "These formats allow accessing an object as a contiguous chunk of memory. You " "don't have to provide raw storage for the returned unicode or bytes area." msgstr "" +#: ../../c-api/arg.rst:46 msgid "Unless otherwise stated, buffers are not NUL-terminated." msgstr "So lange nicht anders festgelegt, sind Buffer nicht NUL-terminiert." +#: ../../c-api/arg.rst:48 msgid "There are three ways strings and buffers can be converted to C:" msgstr "" +#: ../../c-api/arg.rst:50 msgid "" "Formats such as ``y*`` and ``s*`` fill a :c:type:`Py_buffer` structure. This " "locks the underlying buffer so that the caller can subsequently use the " @@ -83,12 +94,14 @@ msgid "" "data (or in any early abort case)." msgstr "" +#: ../../c-api/arg.rst:57 msgid "" "The ``es``, ``es#``, ``et`` and ``et#`` formats allocate the result buffer. " "**You have to call** :c:func:`PyMem_Free` after you have finished processing " "the data (or in any early abort case)." msgstr "" +#: ../../c-api/arg.rst:63 msgid "" "Other formats take a :class:`str` or a read-only :term:`bytes-like object`, " "such as :class:`bytes`, and provide a ``const char *`` pointer to its " @@ -97,6 +110,7 @@ msgid "" "won't have to release any memory yourself." msgstr "" +#: ../../c-api/arg.rst:70 msgid "" "To ensure that the underlying buffer may be safely borrowed, the object's :c:" "member:`PyBufferProcs.bf_releasebuffer` field must be ``NULL``. This " @@ -104,15 +118,18 @@ msgid "" "read-only objects such as :class:`memoryview` of :class:`bytes`." msgstr "" +#: ../../c-api/arg.rst:76 msgid "" "Besides this ``bf_releasebuffer`` requirement, there is no check to verify " "whether the input object is immutable (e.g. whether it would honor a request " "for a writable buffer, or whether another thread can mutate the data)." msgstr "" +#: ../../c-api/arg.rst:80 msgid "``s`` (:class:`str`) [const char \\*]" msgstr "" +#: ../../c-api/arg.rst:81 msgid "" "Convert a Unicode object to a C pointer to a character string. A pointer to " "an existing string is stored in the character pointer variable whose address " @@ -122,6 +139,7 @@ msgid "" "encoding. If this conversion fails, a :exc:`UnicodeError` is raised." msgstr "" +#: ../../c-api/arg.rst:90 msgid "" "This format does not accept :term:`bytes-like objects `. " "If you want to accept filesystem paths and convert them to C character " @@ -129,14 +147,17 @@ msgid "" "`PyUnicode_FSConverter` as *converter*." msgstr "" +#: ../../c-api/arg.rst:96 msgid "" "Previously, :exc:`TypeError` was raised when embedded null code points were " "encountered in the Python string." msgstr "" +#: ../../c-api/arg.rst:100 msgid "``s*`` (:class:`str` or :term:`bytes-like object`) [Py_buffer]" msgstr "" +#: ../../c-api/arg.rst:101 msgid "" "This format accepts Unicode objects as well as bytes-like objects. It fills " "a :c:type:`Py_buffer` structure provided by the caller. In this case the " @@ -144,11 +165,13 @@ msgid "" "converted to C strings using ``'utf-8'`` encoding." msgstr "" +#: ../../c-api/arg.rst:106 msgid "" "``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, :" "c:type:`Py_ssize_t`]" msgstr "" +#: ../../c-api/arg.rst:107 msgid "" "Like ``s*``, except that it provides a :ref:`borrowed buffer `. The result is stored into two C variables, the first one a pointer " @@ -157,36 +180,44 @@ msgid "" "encoding." msgstr "" +#: ../../c-api/arg.rst:113 ../../c-api/arg.rst:648 msgid "``z`` (:class:`str` or ``None``) [const char \\*]" msgstr "" +#: ../../c-api/arg.rst:114 msgid "" "Like ``s``, but the Python object may also be ``None``, in which case the C " "pointer is set to ``NULL``." msgstr "" +#: ../../c-api/arg.rst:117 msgid "" "``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer]" msgstr "" +#: ../../c-api/arg.rst:118 msgid "" "Like ``s*``, but the Python object may also be ``None``, in which case the " "``buf`` member of the :c:type:`Py_buffer` structure is set to ``NULL``." msgstr "" +#: ../../c-api/arg.rst:121 msgid "" "``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) " "[const char \\*, :c:type:`Py_ssize_t`]" msgstr "" +#: ../../c-api/arg.rst:122 msgid "" "Like ``s#``, but the Python object may also be ``None``, in which case the C " "pointer is set to ``NULL``." msgstr "" +#: ../../c-api/arg.rst:125 msgid "``y`` (read-only :term:`bytes-like object`) [const char \\*]" msgstr "" +#: ../../c-api/arg.rst:126 msgid "" "This format converts a bytes-like object to a C pointer to a :ref:`borrowed " "` character string; it does not accept Unicode " @@ -194,41 +225,50 @@ msgid "" "a :exc:`ValueError` exception is raised." msgstr "" +#: ../../c-api/arg.rst:132 msgid "" "Previously, :exc:`TypeError` was raised when embedded null bytes were " "encountered in the bytes buffer." msgstr "" +#: ../../c-api/arg.rst:136 msgid "``y*`` (:term:`bytes-like object`) [Py_buffer]" msgstr "" +#: ../../c-api/arg.rst:137 msgid "" "This variant on ``s*`` doesn't accept Unicode objects, only bytes-like " "objects. **This is the recommended way to accept binary data.**" msgstr "" +#: ../../c-api/arg.rst:141 msgid "" "``y#`` (read-only :term:`bytes-like object`) [const char \\*, :c:type:" "`Py_ssize_t`]" msgstr "" +#: ../../c-api/arg.rst:142 msgid "" "This variant on ``s#`` doesn't accept Unicode objects, only bytes-like " "objects." msgstr "" +#: ../../c-api/arg.rst:145 msgid "``S`` (:class:`bytes`) [PyBytesObject \\*]" msgstr "" +#: ../../c-api/arg.rst:146 msgid "" "Requires that the Python object is a :class:`bytes` object, without " "attempting any conversion. Raises :exc:`TypeError` if the object is not a " "bytes object. The C variable may also be declared as :c:expr:`PyObject*`." msgstr "" +#: ../../c-api/arg.rst:150 msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" msgstr "" +#: ../../c-api/arg.rst:151 msgid "" "Requires that the Python object is a :class:`bytearray` object, without " "attempting any conversion. Raises :exc:`TypeError` if the object is not a :" @@ -236,18 +276,22 @@ msgid "" "`PyObject*`." msgstr "" +#: ../../c-api/arg.rst:155 msgid "``U`` (:class:`str`) [PyObject \\*]" msgstr "" +#: ../../c-api/arg.rst:156 msgid "" "Requires that the Python object is a Unicode object, without attempting any " "conversion. Raises :exc:`TypeError` if the object is not a Unicode object. " "The C variable may also be declared as :c:expr:`PyObject*`." msgstr "" +#: ../../c-api/arg.rst:160 msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]" msgstr "" +#: ../../c-api/arg.rst:161 msgid "" "This format accepts any object which implements the read-write buffer " "interface. It fills a :c:type:`Py_buffer` structure provided by the caller. " @@ -255,14 +299,17 @@ msgid "" "`PyBuffer_Release` when it is done with the buffer." msgstr "" +#: ../../c-api/arg.rst:166 msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" msgstr "" +#: ../../c-api/arg.rst:167 msgid "" "This variant on ``s`` is used for encoding Unicode into a character buffer. " "It only works for encoded data without embedded NUL bytes." msgstr "" +#: ../../c-api/arg.rst:170 msgid "" "This format requires two arguments. The first is only used as input, and " "must be a :c:expr:`const char*` which points to the name of an encoding as a " @@ -273,6 +320,7 @@ msgid "" "The text will be encoded in the encoding specified by the first argument." msgstr "" +#: ../../c-api/arg.rst:178 msgid "" ":c:func:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy " "the encoded data into this buffer and adjust *\\*buffer* to reference the " @@ -280,28 +328,33 @@ msgid "" "`PyMem_Free` to free the allocated buffer after use." msgstr "" +#: ../../c-api/arg.rst:183 msgid "" "``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " "\\*encoding, char \\*\\*buffer]" msgstr "" +#: ../../c-api/arg.rst:184 msgid "" "Same as ``es`` except that byte string objects are passed through without " "recoding them. Instead, the implementation assumes that the byte string " "object uses the encoding passed in as parameter." msgstr "" +#: ../../c-api/arg.rst:188 msgid "" "``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:" "`Py_ssize_t` \\*buffer_length]" msgstr "" +#: ../../c-api/arg.rst:189 msgid "" "This variant on ``s#`` is used for encoding Unicode into a character buffer. " "Unlike the ``es`` format, this variant allows input data which contains NUL " "characters." msgstr "" +#: ../../c-api/arg.rst:193 msgid "" "It requires three arguments. The first is only used as input, and must be " "a :c:expr:`const char*` which points to the name of an encoding as a NUL-" @@ -314,9 +367,11 @@ msgid "" "will be set to the number of bytes in the output buffer." msgstr "" +#: ../../c-api/arg.rst:203 msgid "There are two modes of operation:" msgstr "" +#: ../../c-api/arg.rst:205 msgid "" "If *\\*buffer* points a ``NULL`` pointer, the function will allocate a " "buffer of the needed size, copy the encoded data into this buffer and set " @@ -325,6 +380,7 @@ msgid "" "after usage." msgstr "" +#: ../../c-api/arg.rst:210 msgid "" "If *\\*buffer* points to a non-``NULL`` pointer (an already allocated " "buffer), :c:func:`PyArg_ParseTuple` will use this location as the buffer and " @@ -333,30 +389,36 @@ msgid "" "the buffer is not large enough, a :exc:`ValueError` will be set." msgstr "" +#: ../../c-api/arg.rst:216 msgid "" "In both cases, *\\*buffer_length* is set to the length of the encoded data " "without the trailing NUL byte." msgstr "" +#: ../../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]" msgstr "" +#: ../../c-api/arg.rst:220 msgid "" "Same as ``es#`` except that byte string objects are passed through without " "recoding them. Instead, the implementation assumes that the byte string " "object uses the encoding passed in as parameter." msgstr "" +#: ../../c-api/arg.rst:224 msgid "" "``u``, ``u#``, ``Z``, and ``Z#`` are removed because they used a legacy " "``Py_UNICODE*`` representation." msgstr "" +#: ../../c-api/arg.rst:230 msgid "Numbers" msgstr "" +#: ../../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:" @@ -365,137 +427,178 @@ msgid "" "convert the Python object to the required type." msgstr "" +#: ../../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." +"out of range for the C type. For unsigned integer formats, the most " +"significant bits are silently truncated when the receiving field is too " +"small to receive the value, and :exc:`DeprecationWarning` is emitted when " +"the value is larger than the maximal value for the C type or less than the " +"minimal value for the corresponding signed integer type of the same size." msgstr "" +#: ../../c-api/arg.rst:246 msgid "``b`` (:class:`int`) [unsigned char]" msgstr "" +#: ../../c-api/arg.rst:247 msgid "" "Convert a nonnegative Python integer to an unsigned tiny integer, stored in " "a C :c:expr:`unsigned char`." msgstr "" +#: ../../c-api/arg.rst:250 ../../c-api/arg.rst:682 msgid "``B`` (:class:`int`) [unsigned char]" msgstr "" +#: ../../c-api/arg.rst:251 msgid "" "Convert a Python integer to a tiny integer without overflow checking, stored " -"in a C :c:expr:`unsigned char`." +"in a C :c:expr:`unsigned char`. Convert a Python integer to a C :c:expr:" +"`unsigned char`." msgstr "" +#: ../../c-api/arg.rst:255 ../../c-api/arg.rst:676 msgid "``h`` (:class:`int`) [short int]" msgstr "" +#: ../../c-api/arg.rst:256 msgid "Convert a Python integer to a C :c:expr:`short int`." msgstr "" +#: ../../c-api/arg.rst:258 ../../c-api/arg.rst:685 msgid "``H`` (:class:`int`) [unsigned short int]" msgstr "" -msgid "" -"Convert a Python integer to a C :c:expr:`unsigned short int`, without " -"overflow checking." +#: ../../c-api/arg.rst:259 +msgid "Convert a Python integer to a C :c:expr:`unsigned short int`." msgstr "" +#: ../../c-api/arg.rst:261 ../../c-api/arg.rst:670 msgid "``i`` (:class:`int`) [int]" msgstr "" +#: ../../c-api/arg.rst:262 msgid "Convert a Python integer to a plain C :c:expr:`int`." msgstr "" +#: ../../c-api/arg.rst:264 ../../c-api/arg.rst:688 msgid "``I`` (:class:`int`) [unsigned int]" msgstr "" -msgid "" -"Convert a Python integer to a C :c:expr:`unsigned int`, without overflow " -"checking." +#: ../../c-api/arg.rst:265 +msgid "Convert a Python integer to a C :c:expr:`unsigned int`." msgstr "" +#: ../../c-api/arg.rst:267 ../../c-api/arg.rst:679 msgid "``l`` (:class:`int`) [long int]" msgstr "" +#: ../../c-api/arg.rst:268 msgid "Convert a Python integer to a C :c:expr:`long int`." msgstr "" +#: ../../c-api/arg.rst:270 ../../c-api/arg.rst:691 msgid "``k`` (:class:`int`) [unsigned long]" msgstr "" -msgid "" -"Convert a Python integer to a C :c:expr:`unsigned long` without overflow " -"checking." +#: ../../c-api/arg.rst:271 +msgid "Convert a Python integer to a C :c:expr:`unsigned long`." msgstr "" +#: ../../c-api/arg.rst:273 ../../c-api/arg.rst:282 msgid "Use :meth:`~object.__index__` if available." msgstr "" +#: ../../c-api/arg.rst:276 ../../c-api/arg.rst:694 msgid "``L`` (:class:`int`) [long long]" msgstr "" +#: ../../c-api/arg.rst:277 msgid "Convert a Python integer to a C :c:expr:`long long`." msgstr "" +#: ../../c-api/arg.rst:279 ../../c-api/arg.rst:699 msgid "``K`` (:class:`int`) [unsigned long long]" msgstr "" -msgid "" -"Convert a Python integer to a C :c:expr:`unsigned long long` without " -"overflow checking." +#: ../../c-api/arg.rst:280 +msgid "Convert a Python integer to a C :c:expr:`unsigned long long`." msgstr "" +#: ../../c-api/arg.rst:285 ../../c-api/arg.rst:702 msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" msgstr "" +#: ../../c-api/arg.rst:286 msgid "Convert a Python integer to a C :c:type:`Py_ssize_t`." msgstr "" +#: ../../c-api/arg.rst:288 msgid "``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]" msgstr "" +#: ../../c-api/arg.rst:289 msgid "" "Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` " "object of length 1, to a C :c:expr:`char`." msgstr "" +#: ../../c-api/arg.rst:292 msgid "Allow :class:`bytearray` objects." msgstr "" +#: ../../c-api/arg.rst:295 ../../c-api/arg.rst:720 msgid "``C`` (:class:`str` of length 1) [int]" msgstr "" +#: ../../c-api/arg.rst:296 msgid "" "Convert a Python character, represented as a :class:`str` object of length " "1, to a C :c:expr:`int`." msgstr "" +#: ../../c-api/arg.rst:299 ../../c-api/arg.rst:727 msgid "``f`` (:class:`float`) [float]" msgstr "" +#: ../../c-api/arg.rst:300 msgid "Convert a Python floating-point number to a C :c:expr:`float`." msgstr "" +#: ../../c-api/arg.rst:302 ../../c-api/arg.rst:724 msgid "``d`` (:class:`float`) [double]" msgstr "" +#: ../../c-api/arg.rst:303 msgid "Convert a Python floating-point number to a C :c:expr:`double`." msgstr "" +#: ../../c-api/arg.rst:305 msgid "``D`` (:class:`complex`) [Py_complex]" msgstr "" +#: ../../c-api/arg.rst:306 msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure." msgstr "" +#: ../../c-api/arg.rst:310 +msgid "" +"For unsigned integer formats ``B``, ``H``, ``I``, ``k`` and ``K``, :exc:" +"`DeprecationWarning` is emitted when the value is larger than the maximal " +"value for the C type or less than the minimal value for the corresponding " +"signed integer type of the same size." +msgstr "" + +#: ../../c-api/arg.rst:317 msgid "Other objects" msgstr "" +#: ../../c-api/arg.rst:319 ../../c-api/arg.rst:733 msgid "``O`` (object) [PyObject \\*]" msgstr "" +#: ../../c-api/arg.rst:320 msgid "" "Store a Python object (without any conversion) in a C object pointer. The C " "program thus receives the actual object that was passed. A new :term:" @@ -503,9 +606,11 @@ msgid "" "not increased). The pointer stored is not ``NULL``." msgstr "" +#: ../../c-api/arg.rst:326 msgid "``O!`` (object) [*typeobject*, PyObject \\*]" msgstr "" +#: ../../c-api/arg.rst:327 msgid "" "Store a Python object in a C object pointer. This is similar to ``O``, but " "takes two C arguments: the first is the address of a Python type object, the " @@ -514,9 +619,11 @@ msgid "" "required type, :exc:`TypeError` is raised." msgstr "" +#: ../../c-api/arg.rst:335 msgid "``O&`` (object) [*converter*, *address*]" msgstr "" +#: ../../c-api/arg.rst:336 msgid "" "Convert a Python object to a C variable through a *converter* function. " "This takes two arguments: the first is a function, the second is the address " @@ -524,9 +631,11 @@ msgid "" "*converter* function in turn is called as follows::" msgstr "" +#: ../../c-api/arg.rst:341 msgid "status = converter(object, address);" msgstr "" +#: ../../c-api/arg.rst:343 msgid "" "where *object* is the Python object to be converted and *address* is the :c:" "expr:`void*` argument that was passed to the ``PyArg_Parse*`` function. The " @@ -536,6 +645,7 @@ msgid "" "unmodified." msgstr "" +#: ../../c-api/arg.rst:352 msgid "" "If the *converter* returns :c:macro:`!Py_CLEANUP_SUPPORTED`, it may get " "called a second time if the argument parsing eventually fails, giving the " @@ -544,17 +654,21 @@ msgid "" "have the same value as in the original call." msgstr "" +#: ../../c-api/arg.rst:358 msgid "" "Examples of converters: :c:func:`PyUnicode_FSConverter` and :c:func:" "`PyUnicode_FSDecoder`." msgstr "" +#: ../../c-api/arg.rst:361 msgid ":c:macro:`!Py_CLEANUP_SUPPORTED` was added." msgstr "" +#: ../../c-api/arg.rst:364 ../../c-api/arg.rst:705 msgid "``p`` (:class:`bool`) [int]" msgstr "" +#: ../../c-api/arg.rst:365 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 " @@ -563,9 +677,11 @@ msgid "" "how Python tests values for truth." msgstr "" +#: ../../c-api/arg.rst:373 msgid "``(items)`` (sequence) [*matching-items*]" msgstr "" +#: ../../c-api/arg.rst:374 msgid "" "The object must be a Python sequence (except :class:`str`, :class:`bytes` " "or :class:`bytearray`) whose length is the number of format units in " @@ -573,6 +689,7 @@ msgid "" "*items*. Format units for sequences may be nested." msgstr "" +#: ../../c-api/arg.rst:379 msgid "" "If *items* contains format units which store a :ref:`borrowed buffer ` (``s``, ``s#``, ``z``, ``z#``, ``y``, or ``y#``) or a :" @@ -581,65 +698,81 @@ msgid "" "*items* must not store a borrowed buffer or a borrowed reference." msgstr "" +#: ../../c-api/arg.rst:386 msgid "" ":class:`str` and :class:`bytearray` objects no longer accepted as a sequence." msgstr "" +#: ../../c-api/arg.rst:389 msgid "" "Non-tuple sequences are deprecated if *items* contains format units which " "store a borrowed buffer or a borrowed reference." msgstr "" +#: ../../c-api/arg.rst:393 msgid "" "A few other characters have a meaning in a format string. These may not " "occur inside nested parentheses. They are:" msgstr "" +#: ../../c-api/arg.rst:396 msgid "``|``" msgstr "``|``" +#: ../../c-api/arg.rst:397 msgid "" "Indicates that the remaining arguments in the Python argument list are " "optional. The C variables corresponding to optional arguments should be " "initialized to their default value --- when an optional argument is not " "specified, :c:func:`PyArg_ParseTuple` does not touch the contents of the " -"corresponding C variable(s)." +"corresponding C variable(s). For example, the format string ``\"OO|OO\"`` " +"corresponds to the Python signature ``f(a, b, c=None, d=None)``." msgstr "" +#: ../../c-api/arg.rst:405 msgid "``$``" msgstr "``$``" +#: ../../c-api/arg.rst:406 msgid "" ":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining " -"arguments in the Python argument list are keyword-only. Currently, all " -"keyword-only arguments must also be optional arguments, so ``|`` must always " -"be specified before ``$`` in the format string." +"arguments in the Python argument list are keyword-only. They are optional if " +"``|`` was specified before ``$``, and required otherwise. ``|`` cannot be " +"specified after ``$``. For example, the format string ``\"O|O$O\"`` " +"corresponds to the Python signature ``f(a, b=None, *, c=None)``, and the " +"format string ``\"OO$OO\"`` corresponds to ``f(a, b, *, c, d)``." msgstr "" +#: ../../c-api/arg.rst:417 msgid "``:``" msgstr "``:``" +#: ../../c-api/arg.rst:418 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 " "exception that :c:func:`PyArg_ParseTuple` raises)." msgstr "" +#: ../../c-api/arg.rst:422 msgid "``;``" msgstr "``;``" +#: ../../c-api/arg.rst:423 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 ``;" "`` mutually exclude each other." msgstr "" +#: ../../c-api/arg.rst:427 msgid "" "Note that any Python object references which are provided to the caller are " "*borrowed* references; do not release them (i.e. do not decrement their " "reference count)!" msgstr "" +#: ../../c-api/arg.rst:431 msgid "" "Additional arguments passed to these functions must be addresses of " "variables whose type is determined by the format string; these are used to " @@ -649,6 +782,7 @@ msgid "" "unit in that case." msgstr "" +#: ../../c-api/arg.rst:437 msgid "" "For the conversion to succeed, the *arg* object must match the format and " "the format must be exhausted. On success, the ``PyArg_Parse*`` functions " @@ -658,20 +792,24 @@ msgid "" "the following format units are left untouched." msgstr "" +#: ../../c-api/arg.rst:446 msgid "API Functions" msgstr "" +#: ../../c-api/arg.rst:450 msgid "" "Parse the parameters of a function that takes only positional parameters " "into local variables. Returns true on success; on failure, it returns false " "and raises the appropriate exception." msgstr "" +#: ../../c-api/arg.rst:457 msgid "" "Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list " "rather than a variable number of arguments." msgstr "" +#: ../../c-api/arg.rst:463 msgid "" "Parse the parameters of a function that takes both positional and keyword " "parameters into local variables. The *keywords* argument is a ``NULL``-" @@ -681,43 +819,51 @@ msgid "" "failure, it returns false and raises the appropriate exception." msgstr "" +#: ../../c-api/arg.rst:474 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 "" +#: ../../c-api/arg.rst:478 msgid "" "Added support for :ref:`positional-only parameters `." msgstr "" +#: ../../c-api/arg.rst:482 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 "" +#: ../../c-api/arg.rst:491 msgid "" "Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a " "va_list rather than a variable number of arguments." msgstr "" +#: ../../c-api/arg.rst:497 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 " "the latter already does this check." msgstr "" +#: ../../c-api/arg.rst:506 msgid "" "Parse the parameter of a function that takes a single positional parameter " "into a local variable. Returns true on success; on failure, it returns " "false and raises the appropriate exception." msgstr "" +#: ../../c-api/arg.rst:510 msgid "Example::" msgstr "" +#: ../../c-api/arg.rst:512 msgid "" "// Function using METH_O calling convention\n" "static PyObject*\n" @@ -731,6 +877,24 @@ msgid "" "}" msgstr "" +#: ../../c-api/arg.rst:526 +msgid "" +"Parse the parameters of a function that takes only array parameters into " +"local variables (that is, a function using the :c:macro:`METH_FASTCALL` " +"calling convention). Returns true on success; on failure, it returns false " +"and raises the appropriate exception." +msgstr "" + +#: ../../c-api/arg.rst:537 +msgid "" +"Parse the parameters of a function that takes both array and keyword " +"parameters into local variables (that is, a function using the :c:macro:" +"`METH_FASTCALL` ``|`` :c:macro:`METH_KEYWORDS` calling convention). Returns " +"true on success; on failure, it returns false and raises the appropriate " +"exception." +msgstr "" + +#: ../../c-api/arg.rst:548 msgid "" "A simpler form of parameter retrieval which does not use a format string to " "specify the types of the arguments. Functions which use this method to " @@ -748,11 +912,13 @@ msgid "" "if there was a failure." msgstr "" +#: ../../c-api/arg.rst:563 msgid "" "This is an example of the use of this function, taken from the sources for " "the :mod:`!_weakref` helper module for weak references::" msgstr "" +#: ../../c-api/arg.rst:566 msgid "" "static PyObject *\n" "weakref_ref(PyObject *self, PyObject *args)\n" @@ -768,14 +934,17 @@ msgid "" "}" msgstr "" +#: ../../c-api/arg.rst:579 msgid "" "The call to :c:func:`PyArg_UnpackTuple` in this example is entirely " "equivalent to this call to :c:func:`PyArg_ParseTuple`::" msgstr "" +#: ../../c-api/arg.rst:582 msgid "PyArg_ParseTuple(args, \"O|O:ref\", &object, &callback)" msgstr "" +#: ../../c-api/arg.rst:586 msgid "" "The value to be inserted, if any, before :c:expr:`char * const *` in the " "*keywords* parameter declaration of :c:func:`PyArg_ParseTupleAndKeywords` " @@ -784,9 +953,11 @@ msgid "" "to the desired value before including :file:`Python.h`." msgstr "" +#: ../../c-api/arg.rst:600 msgid "Building values" msgstr "" +#: ../../c-api/arg.rst:604 msgid "" "Create a new value based on a format string similar to those accepted by the " "``PyArg_Parse*`` family of functions and a sequence of values. Returns the " @@ -794,6 +965,7 @@ msgid "" "``NULL`` is returned." msgstr "" +#: ../../c-api/arg.rst:609 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 " @@ -802,6 +974,7 @@ msgid "" "it to return a tuple of size 0 or one, parenthesize the format string." msgstr "" +#: ../../c-api/arg.rst:615 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. " @@ -812,6 +985,7 @@ msgid "" "`Py_BuildValue` returns." msgstr "" +#: ../../c-api/arg.rst:623 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 " @@ -819,120 +993,152 @@ msgid "" "be passed." msgstr "" +#: ../../c-api/arg.rst:627 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 " "format strings a tad more readable." msgstr "" +#: ../../c-api/arg.rst:631 msgid "``s`` (:class:`str` or ``None``) [const char \\*]" msgstr "" +#: ../../c-api/arg.rst:632 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." msgstr "" +#: ../../c-api/arg.rst:635 msgid "" "``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" +#: ../../c-api/arg.rst:636 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 " "ignored and ``None`` is returned." msgstr "" +#: ../../c-api/arg.rst:640 msgid "``y`` (:class:`bytes`) [const char \\*]" msgstr "" +#: ../../c-api/arg.rst:641 msgid "" "This converts a C string to a Python :class:`bytes` object. If the C string " "pointer is ``NULL``, ``None`` is returned." msgstr "" +#: ../../c-api/arg.rst:644 msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" +#: ../../c-api/arg.rst:645 msgid "" "This converts a C string and its lengths to a Python object. If the C " "string pointer is ``NULL``, ``None`` is returned." msgstr "" +#: ../../c-api/arg.rst:649 ../../c-api/arg.rst:665 msgid "Same as ``s``." msgstr "" +#: ../../c-api/arg.rst:651 msgid "" "``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" +#: ../../c-api/arg.rst:652 ../../c-api/arg.rst:668 msgid "Same as ``s#``." msgstr "" +#: ../../c-api/arg.rst:654 msgid "``u`` (:class:`str`) [const wchar_t \\*]" msgstr "" +#: ../../c-api/arg.rst:655 msgid "" "Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or " "UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is " "``NULL``, ``None`` is returned." msgstr "" +#: ../../c-api/arg.rst:659 msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" msgstr "" +#: ../../c-api/arg.rst:660 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 " "ignored and ``None`` is returned." msgstr "" +#: ../../c-api/arg.rst:664 msgid "``U`` (:class:`str` or ``None``) [const char \\*]" msgstr "" +#: ../../c-api/arg.rst:667 msgid "" "``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" +#: ../../c-api/arg.rst:671 msgid "Convert a plain C :c:expr:`int` to a Python integer object." msgstr "" +#: ../../c-api/arg.rst:673 msgid "``b`` (:class:`int`) [char]" msgstr "" +#: ../../c-api/arg.rst:674 msgid "Convert a plain C :c:expr:`char` to a Python integer object." msgstr "" +#: ../../c-api/arg.rst:677 msgid "Convert a plain C :c:expr:`short int` to a Python integer object." msgstr "" +#: ../../c-api/arg.rst:680 msgid "Convert a C :c:expr:`long int` to a Python integer object." msgstr "" +#: ../../c-api/arg.rst:683 msgid "Convert a C :c:expr:`unsigned char` to a Python integer object." msgstr "" +#: ../../c-api/arg.rst:686 msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object." msgstr "" +#: ../../c-api/arg.rst:689 msgid "Convert a C :c:expr:`unsigned int` to a Python integer object." msgstr "" +#: ../../c-api/arg.rst:692 msgid "Convert a C :c:expr:`unsigned long` to a Python integer object." msgstr "" +#: ../../c-api/arg.rst:695 msgid "Convert a C :c:expr:`long long` to a Python integer object." msgstr "" +#: ../../c-api/arg.rst:700 msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object." msgstr "" +#: ../../c-api/arg.rst:703 msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." msgstr "" +#: ../../c-api/arg.rst:706 msgid "Convert a C :c:expr:`int` to a Python :class:`bool` object." msgstr "" +#: ../../c-api/arg.rst:708 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 " @@ -940,31 +1146,39 @@ msgid "" "float) to a suitable ``int`` value using ``(x) ? 1 : 0`` or ``!!x``." msgstr "" +#: ../../c-api/arg.rst:716 msgid "``c`` (:class:`bytes` of length 1) [char]" msgstr "" +#: ../../c-api/arg.rst:717 msgid "" "Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " "object of length 1." msgstr "" +#: ../../c-api/arg.rst:721 msgid "" "Convert a C :c:expr:`int` representing a character to Python :class:`str` " "object of length 1." msgstr "" +#: ../../c-api/arg.rst:725 msgid "Convert a C :c:expr:`double` to a Python floating-point number." msgstr "" +#: ../../c-api/arg.rst:728 msgid "Convert a C :c:expr:`float` to a Python floating-point number." msgstr "" +#: ../../c-api/arg.rst:730 msgid "``D`` (:class:`complex`) [Py_complex \\*]" msgstr "" +#: ../../c-api/arg.rst:731 msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." msgstr "" +#: ../../c-api/arg.rst:734 msgid "" "Pass a Python object untouched but create a new :term:`strong reference` to " "it (i.e. its reference count is incremented by one). If the object passed in " @@ -974,24 +1188,30 @@ msgid "" "no exception has been raised yet, :exc:`SystemError` is set." msgstr "" +#: ../../c-api/arg.rst:743 msgid "``S`` (object) [PyObject \\*]" msgstr "" +#: ../../c-api/arg.rst:744 msgid "Same as ``O``." msgstr "" +#: ../../c-api/arg.rst:746 msgid "``N`` (object) [PyObject \\*]" msgstr "" +#: ../../c-api/arg.rst:747 msgid "" "Same as ``O``, except it doesn't create a new :term:`strong reference`. " "Useful when the object is created by a call to an object constructor in the " "argument list." msgstr "" +#: ../../c-api/arg.rst:751 msgid "``O&`` (object) [*converter*, *anything*]" msgstr "" +#: ../../c-api/arg.rst:752 msgid "" "Convert *anything* to a Python object through a *converter* function. The " "function is called with *anything* (which should be compatible with :c:expr:" @@ -999,36 +1219,44 @@ msgid "" "``NULL`` if an error occurred." msgstr "" +#: ../../c-api/arg.rst:757 msgid "``(items)`` (:class:`tuple`) [*matching-items*]" msgstr "" +#: ../../c-api/arg.rst:758 msgid "" "Convert a sequence of C values to a Python tuple with the same number of " "items." msgstr "" +#: ../../c-api/arg.rst:760 msgid "``[items]`` (:class:`list`) [*matching-items*]" msgstr "" +#: ../../c-api/arg.rst:761 msgid "" "Convert a sequence of C values to a Python list with the same number of " "items." msgstr "" +#: ../../c-api/arg.rst:763 msgid "``{items}`` (:class:`dict`) [*matching-items*]" msgstr "" +#: ../../c-api/arg.rst:764 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 " "value, respectively." msgstr "" +#: ../../c-api/arg.rst:768 msgid "" "If there is an error in the format string, the :exc:`SystemError` exception " "is set and ``NULL`` returned." msgstr "" +#: ../../c-api/arg.rst:773 msgid "" "Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " "rather than a variable number of arguments." diff --git a/c-api/arg.po~ b/c-api/arg.po~ new file mode 100644 index 00000000..c9e7e232 --- /dev/null +++ b/c-api/arg.po~ @@ -0,0 +1,1035 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# Dennis Betz, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: Dennis Betz, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Parsing arguments and building values" +msgstr "" + +msgid "" +"These functions are useful when creating your own extension functions and " +"methods. Additional information and examples are available in :ref:" +"`extending-index`." +msgstr "" + +msgid "" +"The first three of these functions described, :c:func:`PyArg_ParseTuple`, :c:" +"func:`PyArg_ParseTupleAndKeywords`, and :c:func:`PyArg_Parse`, all use " +"*format strings* which are used to tell the function about the expected " +"arguments. The format strings use the same syntax for each of these " +"functions." +msgstr "" + +msgid "Parsing arguments" +msgstr "" + +msgid "" +"A format string consists of zero or more \"format units.\" A format unit " +"describes one Python object; it is usually a single character or a " +"parenthesized sequence of format units. With a few exceptions, a format " +"unit that is not a parenthesized sequence normally corresponds to a single " +"address argument to these functions. In the following description, the " +"quoted form is the format unit; the entry in (round) parentheses is the " +"Python object type that matches the format unit; and the entry in [square] " +"brackets is the type of the C variable(s) whose address should be passed." +msgstr "" + +msgid "Strings and buffers" +msgstr "" + +msgid "" +"On Python 3.12 and older, the macro :c:macro:`!PY_SSIZE_T_CLEAN` must be " +"defined before including :file:`Python.h` to use all ``#`` variants of " +"formats (``s#``, ``y#``, etc.) explained below. This is not necessary on " +"Python 3.13 and later." +msgstr "" + +msgid "" +"These formats allow accessing an object as a contiguous chunk of memory. You " +"don't have to provide raw storage for the returned unicode or bytes area." +msgstr "" + +msgid "Unless otherwise stated, buffers are not NUL-terminated." +msgstr "So lange nicht anders festgelegt, sind Buffer nicht NUL-terminiert." + +msgid "There are three ways strings and buffers can be converted to C:" +msgstr "" + +msgid "" +"Formats such as ``y*`` and ``s*`` fill a :c:type:`Py_buffer` structure. This " +"locks the underlying buffer so that the caller can subsequently use the " +"buffer even inside a :c:type:`Py_BEGIN_ALLOW_THREADS` block without the risk " +"of mutable data being resized or destroyed. As a result, **you have to " +"call** :c:func:`PyBuffer_Release` after you have finished processing the " +"data (or in any early abort case)." +msgstr "" + +msgid "" +"The ``es``, ``es#``, ``et`` and ``et#`` formats allocate the result buffer. " +"**You have to call** :c:func:`PyMem_Free` after you have finished processing " +"the data (or in any early abort case)." +msgstr "" + +msgid "" +"Other formats take a :class:`str` or a read-only :term:`bytes-like object`, " +"such as :class:`bytes`, and provide a ``const char *`` pointer to its " +"buffer. In this case the buffer is \"borrowed\": it is managed by the " +"corresponding Python object, and shares the lifetime of this object. You " +"won't have to release any memory yourself." +msgstr "" + +msgid "" +"To ensure that the underlying buffer may be safely borrowed, the object's :c:" +"member:`PyBufferProcs.bf_releasebuffer` field must be ``NULL``. This " +"disallows common mutable objects such as :class:`bytearray`, but also some " +"read-only objects such as :class:`memoryview` of :class:`bytes`." +msgstr "" + +msgid "" +"Besides this ``bf_releasebuffer`` requirement, there is no check to verify " +"whether the input object is immutable (e.g. whether it would honor a request " +"for a writable buffer, or whether another thread can mutate the data)." +msgstr "" + +msgid "``s`` (:class:`str`) [const char \\*]" +msgstr "" + +msgid "" +"Convert a Unicode object to a C pointer to a character string. A pointer to " +"an existing string is stored in the character pointer variable whose address " +"you pass. The C string is NUL-terminated. The Python string must not " +"contain embedded null code points; if it does, a :exc:`ValueError` exception " +"is raised. Unicode objects are converted to C strings using ``'utf-8'`` " +"encoding. If this conversion fails, a :exc:`UnicodeError` is raised." +msgstr "" + +msgid "" +"This format does not accept :term:`bytes-like objects `. " +"If you want to accept filesystem paths and convert them to C character " +"strings, it is preferable to use the ``O&`` format with :c:func:" +"`PyUnicode_FSConverter` as *converter*." +msgstr "" + +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null code points were " +"encountered in the Python string." +msgstr "" + +msgid "``s*`` (:class:`str` or :term:`bytes-like object`) [Py_buffer]" +msgstr "" + +msgid "" +"This format accepts Unicode objects as well as bytes-like objects. It fills " +"a :c:type:`Py_buffer` structure provided by the caller. In this case the " +"resulting C string may contain embedded NUL bytes. Unicode objects are " +"converted to C strings using ``'utf-8'`` encoding." +msgstr "" + +msgid "" +"``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, :" +"c:type:`Py_ssize_t`]" +msgstr "" + +msgid "" +"Like ``s*``, except that it provides a :ref:`borrowed buffer `. The result is stored into two C variables, the first one a pointer " +"to a C string, the second one its length. The string may contain embedded " +"null bytes. Unicode objects are converted to C strings using ``'utf-8'`` " +"encoding." +msgstr "" + +msgid "``z`` (:class:`str` or ``None``) [const char \\*]" +msgstr "" + +msgid "" +"Like ``s``, but the Python object may also be ``None``, in which case the C " +"pointer is set to ``NULL``." +msgstr "" + +msgid "" +"``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer]" +msgstr "" + +msgid "" +"Like ``s*``, but the Python object may also be ``None``, in which case the " +"``buf`` member of the :c:type:`Py_buffer` structure is set to ``NULL``." +msgstr "" + +msgid "" +"``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) " +"[const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +msgid "" +"Like ``s#``, but the Python object may also be ``None``, in which case the C " +"pointer is set to ``NULL``." +msgstr "" + +msgid "``y`` (read-only :term:`bytes-like object`) [const char \\*]" +msgstr "" + +msgid "" +"This format converts a bytes-like object to a C pointer to a :ref:`borrowed " +"` character string; it does not accept Unicode " +"objects. The bytes buffer must not contain embedded null bytes; if it does, " +"a :exc:`ValueError` exception is raised." +msgstr "" + +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null bytes were " +"encountered in the bytes buffer." +msgstr "" + +msgid "``y*`` (:term:`bytes-like object`) [Py_buffer]" +msgstr "" + +msgid "" +"This variant on ``s*`` doesn't accept Unicode objects, only bytes-like " +"objects. **This is the recommended way to accept binary data.**" +msgstr "" + +msgid "" +"``y#`` (read-only :term:`bytes-like object`) [const char \\*, :c:type:" +"`Py_ssize_t`]" +msgstr "" + +msgid "" +"This variant on ``s#`` doesn't accept Unicode objects, only bytes-like " +"objects." +msgstr "" + +msgid "``S`` (:class:`bytes`) [PyBytesObject \\*]" +msgstr "" + +msgid "" +"Requires that the Python object is a :class:`bytes` object, without " +"attempting any conversion. Raises :exc:`TypeError` if the object is not a " +"bytes object. The C variable may also be declared as :c:expr:`PyObject*`." +msgstr "" + +msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" +msgstr "" + +msgid "" +"Requires that the Python object is a :class:`bytearray` object, without " +"attempting any conversion. Raises :exc:`TypeError` if the object is not a :" +"class:`bytearray` object. The C variable may also be declared as :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "``U`` (:class:`str`) [PyObject \\*]" +msgstr "" + +msgid "" +"Requires that the Python object is a Unicode object, without attempting any " +"conversion. Raises :exc:`TypeError` if the object is not a Unicode object. " +"The C variable may also be declared as :c:expr:`PyObject*`." +msgstr "" + +msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]" +msgstr "" + +msgid "" +"This format accepts any object which implements the read-write buffer " +"interface. It fills a :c:type:`Py_buffer` structure provided by the caller. " +"The buffer may contain embedded null bytes. The caller has to call :c:func:" +"`PyBuffer_Release` when it is done with the buffer." +msgstr "" + +msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" +msgstr "" + +msgid "" +"This variant on ``s`` is used for encoding Unicode into a character buffer. " +"It only works for encoded data without embedded NUL bytes." +msgstr "" + +msgid "" +"This format requires two arguments. The first is only used as input, and " +"must be a :c:expr:`const char*` which points to the name of an encoding as a " +"NUL-terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is " +"used. An exception is raised if the named encoding is not known to Python. " +"The second argument must be a :c:expr:`char**`; the value of the pointer it " +"references will be set to a buffer with the contents of the argument text. " +"The text will be encoded in the encoding specified by the first argument." +msgstr "" + +msgid "" +":c:func:`PyArg_ParseTuple` will allocate a buffer of the needed size, copy " +"the encoded data into this buffer and adjust *\\*buffer* to reference the " +"newly allocated storage. The caller is responsible for calling :c:func:" +"`PyMem_Free` to free the allocated buffer after use." +msgstr "" + +msgid "" +"``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " +"\\*encoding, char \\*\\*buffer]" +msgstr "" + +msgid "" +"Same as ``es`` except that byte string objects are passed through without " +"recoding them. Instead, the implementation assumes that the byte string " +"object uses the encoding passed in as parameter." +msgstr "" + +msgid "" +"``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:" +"`Py_ssize_t` \\*buffer_length]" +msgstr "" + +msgid "" +"This variant on ``s#`` is used for encoding Unicode into a character buffer. " +"Unlike the ``es`` format, this variant allows input data which contains NUL " +"characters." +msgstr "" + +msgid "" +"It requires three arguments. The first is only used as input, and must be " +"a :c:expr:`const char*` which points to the name of an encoding as a NUL-" +"terminated string, or ``NULL``, in which case ``'utf-8'`` encoding is used. " +"An exception is raised if the named encoding is not known to Python. The " +"second argument must be a :c:expr:`char**`; the value of the pointer it " +"references will be set to a buffer with the contents of the argument text. " +"The text will be encoded in the encoding specified by the first argument. " +"The third argument must be a pointer to an integer; the referenced integer " +"will be set to the number of bytes in the output buffer." +msgstr "" + +msgid "There are two modes of operation:" +msgstr "" + +msgid "" +"If *\\*buffer* points a ``NULL`` pointer, the function will allocate a " +"buffer of the needed size, copy the encoded data into this buffer and set " +"*\\*buffer* to reference the newly allocated storage. The caller is " +"responsible for calling :c:func:`PyMem_Free` to free the allocated buffer " +"after usage." +msgstr "" + +msgid "" +"If *\\*buffer* points to a non-``NULL`` pointer (an already allocated " +"buffer), :c:func:`PyArg_ParseTuple` will use this location as the buffer and " +"interpret the initial value of *\\*buffer_length* as the buffer size. It " +"will then copy the encoded data into the buffer and NUL-terminate it. If " +"the buffer is not large enough, a :exc:`ValueError` will be set." +msgstr "" + +msgid "" +"In both cases, *\\*buffer_length* is set to the length of the encoded data " +"without the trailing NUL byte." +msgstr "" + +msgid "" +"``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " +"\\*encoding, char \\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]" +msgstr "" + +msgid "" +"Same as ``es#`` except that byte string objects are passed through without " +"recoding them. Instead, the implementation assumes that the byte string " +"object uses the encoding passed in as parameter." +msgstr "" + +msgid "" +"``u``, ``u#``, ``Z``, and ``Z#`` are removed because they used a legacy " +"``Py_UNICODE*`` representation." +msgstr "" + +msgid "Numbers" +msgstr "" + +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 "" + +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 "" + +msgid "``b`` (:class:`int`) [unsigned char]" +msgstr "" + +msgid "" +"Convert a nonnegative Python integer to an unsigned tiny integer, stored in " +"a C :c:expr:`unsigned char`." +msgstr "" + +msgid "``B`` (:class:`int`) [unsigned char]" +msgstr "" + +msgid "" +"Convert a Python integer to a tiny integer without overflow checking, stored " +"in a C :c:expr:`unsigned char`." +msgstr "" + +msgid "``h`` (:class:`int`) [short int]" +msgstr "" + +msgid "Convert a Python integer to a C :c:expr:`short int`." +msgstr "" + +msgid "``H`` (:class:`int`) [unsigned short int]" +msgstr "" + +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned short int`, without " +"overflow checking." +msgstr "" + +msgid "``i`` (:class:`int`) [int]" +msgstr "" + +msgid "Convert a Python integer to a plain C :c:expr:`int`." +msgstr "" + +msgid "``I`` (:class:`int`) [unsigned int]" +msgstr "" + +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned int`, without overflow " +"checking." +msgstr "" + +msgid "``l`` (:class:`int`) [long int]" +msgstr "" + +msgid "Convert a Python integer to a C :c:expr:`long int`." +msgstr "" + +msgid "``k`` (:class:`int`) [unsigned long]" +msgstr "" + +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned long` without overflow " +"checking." +msgstr "" + +msgid "Use :meth:`~object.__index__` if available." +msgstr "" + +msgid "``L`` (:class:`int`) [long long]" +msgstr "" + +msgid "Convert a Python integer to a C :c:expr:`long long`." +msgstr "" + +msgid "``K`` (:class:`int`) [unsigned long long]" +msgstr "" + +msgid "" +"Convert a Python integer to a C :c:expr:`unsigned long long` without " +"overflow checking." +msgstr "" + +msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" +msgstr "" + +msgid "Convert a Python integer to a C :c:type:`Py_ssize_t`." +msgstr "" + +msgid "``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]" +msgstr "" + +msgid "" +"Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` " +"object of length 1, to a C :c:expr:`char`." +msgstr "" + +msgid "Allow :class:`bytearray` objects." +msgstr "" + +msgid "``C`` (:class:`str` of length 1) [int]" +msgstr "" + +msgid "" +"Convert a Python character, represented as a :class:`str` object of length " +"1, to a C :c:expr:`int`." +msgstr "" + +msgid "``f`` (:class:`float`) [float]" +msgstr "" + +msgid "Convert a Python floating-point number to a C :c:expr:`float`." +msgstr "" + +msgid "``d`` (:class:`float`) [double]" +msgstr "" + +msgid "Convert a Python floating-point number to a C :c:expr:`double`." +msgstr "" + +msgid "``D`` (:class:`complex`) [Py_complex]" +msgstr "" + +msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure." +msgstr "" + +msgid "Other objects" +msgstr "" + +msgid "``O`` (object) [PyObject \\*]" +msgstr "" + +msgid "" +"Store a Python object (without any conversion) in a C object pointer. The C " +"program thus receives the actual object that was passed. A new :term:" +"`strong reference` to the object is not created (i.e. its reference count is " +"not increased). The pointer stored is not ``NULL``." +msgstr "" + +msgid "``O!`` (object) [*typeobject*, PyObject \\*]" +msgstr "" + +msgid "" +"Store a Python object in a C object pointer. This is similar to ``O``, but " +"takes two C arguments: the first is the address of a Python type object, the " +"second is the address of the C variable (of type :c:expr:`PyObject*`) into " +"which the object pointer is stored. If the Python object does not have the " +"required type, :exc:`TypeError` is raised." +msgstr "" + +msgid "``O&`` (object) [*converter*, *address*]" +msgstr "" + +msgid "" +"Convert a Python object to a C variable through a *converter* function. " +"This takes two arguments: the first is a function, the second is the address " +"of a C variable (of arbitrary type), converted to :c:expr:`void *`. The " +"*converter* function in turn is called as follows::" +msgstr "" + +msgid "status = converter(object, address);" +msgstr "" + +msgid "" +"where *object* is the Python object to be converted and *address* is the :c:" +"expr:`void*` argument that was passed to the ``PyArg_Parse*`` function. The " +"returned *status* should be ``1`` for a successful conversion and ``0`` if " +"the conversion has failed. When the conversion fails, the *converter* " +"function should raise an exception and leave the content of *address* " +"unmodified." +msgstr "" + +msgid "" +"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 "" + +msgid "" +"Examples of converters: :c:func:`PyUnicode_FSConverter` and :c:func:" +"`PyUnicode_FSDecoder`." +msgstr "" + +msgid ":c:macro:`!Py_CLEANUP_SUPPORTED` was added." +msgstr "" + +msgid "``p`` (:class:`bool`) [int]" +msgstr "" + +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 " +"int to ``1`` if the expression was true and ``0`` if it was false. This " +"accepts any valid Python value. See :ref:`truth` for more information about " +"how Python tests values for truth." +msgstr "" + +msgid "``(items)`` (sequence) [*matching-items*]" +msgstr "" + +msgid "" +"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 "" + +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 "" + +msgid "" +":class:`str` and :class:`bytearray` objects no longer accepted as a sequence." +msgstr "" + +msgid "" +"Non-tuple sequences are deprecated if *items* contains format units which " +"store a borrowed buffer or a borrowed reference." +msgstr "" + +msgid "" +"A few other characters have a meaning in a format string. These may not " +"occur inside nested parentheses. They are:" +msgstr "" + +msgid "``|``" +msgstr "``|``" + +msgid "" +"Indicates that the remaining arguments in the Python argument list are " +"optional. The C variables corresponding to optional arguments should be " +"initialized to their default value --- when an optional argument is not " +"specified, :c:func:`PyArg_ParseTuple` does not touch the contents of the " +"corresponding C variable(s)." +msgstr "" + +msgid "``$``" +msgstr "``$``" + +msgid "" +":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining " +"arguments in the Python argument list are keyword-only. Currently, all " +"keyword-only arguments must also be optional arguments, so ``|`` must always " +"be specified before ``$`` in the format string." +msgstr "" + +msgid "``:``" +msgstr "``:``" + +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 " +"exception that :c:func:`PyArg_ParseTuple` raises)." +msgstr "" + +msgid "``;``" +msgstr "``;``" + +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 ``;" +"`` mutually exclude each other." +msgstr "" + +msgid "" +"Note that any Python object references which are provided to the caller are " +"*borrowed* references; do not release them (i.e. do not decrement their " +"reference count)!" +msgstr "" + +msgid "" +"Additional arguments passed to these functions must be addresses of " +"variables whose type is determined by the format string; these are used to " +"store values from the input tuple. There are a few cases, as described in " +"the list of format units above, where these parameters are used as input " +"values; they should match what is specified for the corresponding format " +"unit in that case." +msgstr "" + +msgid "" +"For the conversion to succeed, the *arg* object must match the format and " +"the format must be exhausted. On success, the ``PyArg_Parse*`` functions " +"return true, otherwise they return false and raise an appropriate exception. " +"When the ``PyArg_Parse*`` functions fail due to conversion failure in one of " +"the format units, the variables at the addresses corresponding to that and " +"the following format units are left untouched." +msgstr "" + +msgid "API Functions" +msgstr "" + +msgid "" +"Parse the parameters of a function that takes only positional parameters " +"into local variables. Returns true on success; on failure, it returns false " +"and raises the appropriate exception." +msgstr "" + +msgid "" +"Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list " +"rather than a variable number of arguments." +msgstr "" + +msgid "" +"Parse the parameters of a function that takes both positional and keyword " +"parameters into local variables. The *keywords* argument is a ``NULL``-" +"terminated array of keyword parameter names specified as null-terminated " +"ASCII or UTF-8 encoded C strings. Empty names denote :ref:`positional-only " +"parameters `. Returns true on success; on " +"failure, it returns false and raises the appropriate exception." +msgstr "" + +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 "" + +msgid "" +"Added support for :ref:`positional-only parameters `." +msgstr "" + +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 "" + +msgid "" +"Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a " +"va_list rather than a variable number of arguments." +msgstr "" + +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 " +"the latter already does this check." +msgstr "" + +msgid "" +"Parse the parameter of a function that takes a single positional parameter " +"into a local variable. Returns true on success; on failure, it returns " +"false and raises the appropriate exception." +msgstr "" + +msgid "Example::" +msgstr "" + +msgid "" +"// Function using METH_O calling convention\n" +"static PyObject*\n" +"my_function(PyObject *module, PyObject *arg)\n" +"{\n" +" int value;\n" +" if (!PyArg_Parse(arg, \"i:my_function\", &value)) {\n" +" return NULL;\n" +" }\n" +" // ... use value ...\n" +"}" +msgstr "" + +msgid "" +"A simpler form of parameter retrieval which does not use a format string to " +"specify the types of the arguments. Functions which use this method to " +"retrieve their parameters should be declared as :c:macro:`METH_VARARGS` in " +"function or method tables. The tuple containing the actual parameters " +"should be passed as *args*; it must actually be a tuple. The length of the " +"tuple must be at least *min* and no more than *max*; *min* and *max* may be " +"equal. Additional arguments must be passed to the function, each of which " +"should be a pointer to a :c:expr:`PyObject*` variable; these will be filled " +"in with the values from *args*; they will contain :term:`borrowed references " +"`. The variables which correspond to optional parameters " +"not given by *args* will not be filled in; these should be initialized by " +"the caller. This function returns true on success and false if *args* is not " +"a tuple or contains the wrong number of elements; an exception will be set " +"if there was a failure." +msgstr "" + +msgid "" +"This is an example of the use of this function, taken from the sources for " +"the :mod:`!_weakref` helper module for weak references::" +msgstr "" + +msgid "" +"static PyObject *\n" +"weakref_ref(PyObject *self, PyObject *args)\n" +"{\n" +" PyObject *object;\n" +" PyObject *callback = NULL;\n" +" PyObject *result = NULL;\n" +"\n" +" if (PyArg_UnpackTuple(args, \"ref\", 1, 2, &object, &callback)) {\n" +" result = PyWeakref_NewRef(object, callback);\n" +" }\n" +" return result;\n" +"}" +msgstr "" + +msgid "" +"The call to :c:func:`PyArg_UnpackTuple` in this example is entirely " +"equivalent to this call to :c:func:`PyArg_ParseTuple`::" +msgstr "" + +msgid "PyArg_ParseTuple(args, \"O|O:ref\", &object, &callback)" +msgstr "" + +msgid "" +"The value to be inserted, if any, before :c:expr:`char * const *` in the " +"*keywords* parameter declaration of :c:func:`PyArg_ParseTupleAndKeywords` " +"and :c:func:`PyArg_VaParseTupleAndKeywords`. Default empty for C and " +"``const`` for C++ (:c:expr:`const char * const *`). To override, define it " +"to the desired value before including :file:`Python.h`." +msgstr "" + +msgid "Building values" +msgstr "" + +msgid "" +"Create a new value based on a format string similar to those accepted by the " +"``PyArg_Parse*`` family of functions and a sequence of values. Returns the " +"value or ``NULL`` in the case of an error; an exception will be raised if " +"``NULL`` is returned." +msgstr "" + +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 " +"string is empty, it returns ``None``; if it contains exactly one format " +"unit, it returns whatever object is described by that format unit. To force " +"it to return a tuple of size 0 or one, parenthesize the format string." +msgstr "" + +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. " +"Buffers provided by the caller are never referenced by the objects created " +"by :c:func:`Py_BuildValue`. In other words, if your code invokes :c:func:" +"`malloc` and passes the allocated memory to :c:func:`Py_BuildValue`, your " +"code is responsible for calling :c:func:`free` for that memory once :c:func:" +"`Py_BuildValue` returns." +msgstr "" + +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 " +"return; and the entry in [square] brackets is the type of the C value(s) to " +"be passed." +msgstr "" + +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 " +"format strings a tad more readable." +msgstr "" + +msgid "``s`` (:class:`str` or ``None``) [const char \\*]" +msgstr "" + +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." +msgstr "" + +msgid "" +"``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +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 " +"ignored and ``None`` is returned." +msgstr "" + +msgid "``y`` (:class:`bytes`) [const char \\*]" +msgstr "" + +msgid "" +"This converts a C string to a Python :class:`bytes` object. If the C string " +"pointer is ``NULL``, ``None`` is returned." +msgstr "" + +msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +msgid "" +"This converts a C string and its lengths to a Python object. If the C " +"string pointer is ``NULL``, ``None`` is returned." +msgstr "" + +msgid "Same as ``s``." +msgstr "" + +msgid "" +"``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +msgid "Same as ``s#``." +msgstr "" + +msgid "``u`` (:class:`str`) [const wchar_t \\*]" +msgstr "" + +msgid "" +"Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or " +"UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is " +"``NULL``, ``None`` is returned." +msgstr "" + +msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +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 " +"ignored and ``None`` is returned." +msgstr "" + +msgid "``U`` (:class:`str` or ``None``) [const char \\*]" +msgstr "" + +msgid "" +"``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" +msgstr "" + +msgid "Convert a plain C :c:expr:`int` to a Python integer object." +msgstr "" + +msgid "``b`` (:class:`int`) [char]" +msgstr "" + +msgid "Convert a plain C :c:expr:`char` to a Python integer object." +msgstr "" + +msgid "Convert a plain C :c:expr:`short int` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`long int` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`unsigned char` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`unsigned int` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`unsigned long` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`long long` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object." +msgstr "" + +msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." +msgstr "" + +msgid "Convert a C :c:expr:`int` to a Python :class:`bool` object." +msgstr "" + +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 "" + +msgid "``c`` (:class:`bytes` of length 1) [char]" +msgstr "" + +msgid "" +"Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " +"object of length 1." +msgstr "" + +msgid "" +"Convert a C :c:expr:`int` representing a character to Python :class:`str` " +"object of length 1." +msgstr "" + +msgid "Convert a C :c:expr:`double` to a Python floating-point number." +msgstr "" + +msgid "Convert a C :c:expr:`float` to a Python floating-point number." +msgstr "" + +msgid "``D`` (:class:`complex`) [Py_complex \\*]" +msgstr "" + +msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." +msgstr "" + +msgid "" +"Pass a Python object untouched but create a new :term:`strong reference` to " +"it (i.e. its reference count is incremented by one). If the object passed in " +"is a ``NULL`` pointer, it is assumed that this was caused because the call " +"producing the argument found an error and set an exception. Therefore, :c:" +"func:`Py_BuildValue` will return ``NULL`` but won't raise an exception. If " +"no exception has been raised yet, :exc:`SystemError` is set." +msgstr "" + +msgid "``S`` (object) [PyObject \\*]" +msgstr "" + +msgid "Same as ``O``." +msgstr "" + +msgid "``N`` (object) [PyObject \\*]" +msgstr "" + +msgid "" +"Same as ``O``, except it doesn't create a new :term:`strong reference`. " +"Useful when the object is created by a call to an object constructor in the " +"argument list." +msgstr "" + +msgid "``O&`` (object) [*converter*, *anything*]" +msgstr "" + +msgid "" +"Convert *anything* to a Python object through a *converter* function. The " +"function is called with *anything* (which should be compatible with :c:expr:" +"`void*`) as its argument and should return a \"new\" Python object, or " +"``NULL`` if an error occurred." +msgstr "" + +msgid "``(items)`` (:class:`tuple`) [*matching-items*]" +msgstr "" + +msgid "" +"Convert a sequence of C values to a Python tuple with the same number of " +"items." +msgstr "" + +msgid "``[items]`` (:class:`list`) [*matching-items*]" +msgstr "" + +msgid "" +"Convert a sequence of C values to a Python list with the same number of " +"items." +msgstr "" + +msgid "``{items}`` (:class:`dict`) [*matching-items*]" +msgstr "" + +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 " +"value, respectively." +msgstr "" + +msgid "" +"If there is an error in the format string, the :exc:`SystemError` exception " +"is set and ``NULL`` returned." +msgstr "" + +msgid "" +"Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " +"rather than a variable number of arguments." +msgstr "" diff --git a/c-api/bool.po b/c-api/bool.po index f587e5b4..bb5d3c3c 100644 --- a/c-api/bool.po +++ b/c-api/bool.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/bool.rst:6 msgid "Boolean Objects" msgstr "" +#: ../../c-api/bool.rst:8 msgid "" "Booleans in Python are implemented as a subclass of integers. There are " "only two booleans, :c:data:`Py_False` and :c:data:`Py_True`. As such, the " @@ -27,38 +29,47 @@ msgid "" "following macros are available, however." msgstr "" +#: ../../c-api/bool.rst:16 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python boolean type; " "it is the same object as :class:`bool` in the Python layer." msgstr "" +#: ../../c-api/bool.rst:22 msgid "" "Return true if *o* is of type :c:data:`PyBool_Type`. This function always " "succeeds." msgstr "" +#: ../../c-api/bool.rst:28 msgid "" "The Python ``False`` object. This object has no methods and is :term:" "`immortal`." msgstr "" +#: ../../c-api/bool.rst:31 msgid ":c:data:`Py_False` is :term:`immortal`." msgstr "" +#: ../../c-api/bool.rst:37 msgid "" "The Python ``True`` object. This object has no methods and is :term:" "`immortal`." msgstr "" +#: ../../c-api/bool.rst:40 msgid ":c:data:`Py_True` is :term:`immortal`." msgstr "" +#: ../../c-api/bool.rst:46 msgid "Return :c:data:`Py_False` from a function." msgstr "" +#: ../../c-api/bool.rst:51 msgid "Return :c:data:`Py_True` from a function." msgstr "" +#: ../../c-api/bool.rst:56 msgid "" "Return :c:data:`Py_True` or :c:data:`Py_False`, depending on the truth value " "of *v*." diff --git a/c-api/bool.po~ b/c-api/bool.po~ new file mode 100644 index 00000000..f587e5b4 --- /dev/null +++ b/c-api/bool.po~ @@ -0,0 +1,65 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Boolean Objects" +msgstr "" + +msgid "" +"Booleans in Python are implemented as a subclass of integers. There are " +"only two booleans, :c:data:`Py_False` and :c:data:`Py_True`. As such, the " +"normal creation and deletion functions don't apply to booleans. The " +"following macros are available, however." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python boolean type; " +"it is the same object as :class:`bool` in the Python layer." +msgstr "" + +msgid "" +"Return true if *o* is of type :c:data:`PyBool_Type`. This function always " +"succeeds." +msgstr "" + +msgid "" +"The Python ``False`` object. This object has no methods and is :term:" +"`immortal`." +msgstr "" + +msgid ":c:data:`Py_False` is :term:`immortal`." +msgstr "" + +msgid "" +"The Python ``True`` object. This object has no methods and is :term:" +"`immortal`." +msgstr "" + +msgid ":c:data:`Py_True` is :term:`immortal`." +msgstr "" + +msgid "Return :c:data:`Py_False` from a function." +msgstr "" + +msgid "Return :c:data:`Py_True` from a function." +msgstr "" + +msgid "" +"Return :c:data:`Py_True` or :c:data:`Py_False`, depending on the truth value " +"of *v*." +msgstr "" diff --git a/c-api/buffer.po b/c-api/buffer.po index 418057c3..611f0fc1 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -11,19 +11,21 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/buffer.rst:11 msgid "Buffer Protocol" msgstr "" +#: ../../c-api/buffer.rst:13 msgid "" "Certain objects available in Python wrap access to an underlying memory " "array or *buffer*. Such objects include the built-in :class:`bytes` and :" @@ -32,6 +34,7 @@ msgid "" "image processing or numeric analysis." msgstr "" +#: ../../c-api/buffer.rst:19 msgid "" "While each of these types have their own semantics, they share the common " "characteristic of being backed by a possibly large memory buffer. It is " @@ -39,11 +42,13 @@ msgid "" "without intermediate copying." msgstr "" +#: ../../c-api/buffer.rst:24 msgid "" "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 "" +#: ../../c-api/buffer.rst:29 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. " @@ -51,12 +56,14 @@ msgid "" "see :ref:`python-buffer-protocol`." msgstr "" +#: ../../c-api/buffer.rst:34 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). For " "Python see :class:`memoryview`." msgstr "" +#: ../../c-api/buffer.rst:38 msgid "" "Simple objects such as :class:`bytes` and :class:`bytearray` expose their " "underlying buffer in byte-oriented form. Other forms are possible; for " @@ -64,6 +71,7 @@ msgid "" "values." msgstr "" +#: ../../c-api/buffer.rst:42 msgid "" "An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase." "write` method of file objects: any object that can export a series of bytes " @@ -75,33 +83,40 @@ msgid "" "buffers." msgstr "" +#: ../../c-api/buffer.rst:50 msgid "" "There are two ways for a consumer of the buffer interface to acquire a " "buffer over a target object:" msgstr "" +#: ../../c-api/buffer.rst:53 msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;" msgstr "" +#: ../../c-api/buffer.rst:55 msgid "" "call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the " "``y*``, ``w*`` or ``s*`` :ref:`format codes `." msgstr "" +#: ../../c-api/buffer.rst:58 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 " "resource leaks." msgstr "" +#: ../../c-api/buffer.rst:64 msgid "" "The buffer protocol is now accessible in Python, see :ref:`python-buffer-" "protocol` and :class:`memoryview`." msgstr "" +#: ../../c-api/buffer.rst:70 msgid "Buffer structure" msgstr "" +#: ../../c-api/buffer.rst:72 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 " @@ -113,6 +128,7 @@ msgid "" "in its native, in-memory format." msgstr "" +#: ../../c-api/buffer.rst:81 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 " @@ -121,12 +137,14 @@ msgid "" "created." msgstr "" +#: ../../c-api/buffer.rst:87 msgid "" "For short instructions how to write an exporting object, see :ref:`Buffer " "Object Structures `. For obtaining a buffer, see :c:func:" "`PyObject_GetBuffer`." msgstr "" +#: ../../c-api/buffer.rst:95 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 " @@ -134,11 +152,13 @@ msgid "" "the value may point to the end of the memory block." msgstr "" +#: ../../c-api/buffer.rst:100 msgid "" "For :term:`contiguous` arrays, the value points to the beginning of the " "memory block." msgstr "" +#: ../../c-api/buffer.rst:105 msgid "" "A new reference to the exporting object. The reference is owned by the " "consumer and automatically released (i.e. reference count decremented) and " @@ -146,12 +166,14 @@ msgid "" "of the return value of any standard C-API function." msgstr "" +#: ../../c-api/buffer.rst:112 msgid "" "As a special case, for *temporary* buffers that are wrapped by :c:func:" "`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this field is " "``NULL``. In general, exporting objects MUST NOT use this scheme." msgstr "" +#: ../../c-api/buffer.rst:119 msgid "" "``product(shape) * itemsize``. For contiguous arrays, this is the length of " "the underlying memory block. For non-contiguous arrays, it is the length " @@ -159,6 +181,7 @@ msgid "" "representation." msgstr "" +#: ../../c-api/buffer.rst:124 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 " @@ -166,16 +189,19 @@ msgid "" "`PyBUF_WRITABLE`." msgstr "" +#: ../../c-api/buffer.rst:130 msgid "" "An indicator of whether the buffer is read-only. This field is controlled by " "the :c:macro:`PyBUF_WRITABLE` flag." msgstr "" +#: ../../c-api/buffer.rst:135 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." msgstr "" +#: ../../c-api/buffer.rst:138 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 " @@ -183,27 +209,32 @@ msgid "" "original format." msgstr "" +#: ../../c-api/buffer.rst:143 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." "itemsize` to navigate the buffer." msgstr "" +#: ../../c-api/buffer.rst:147 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 " "disregard :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``." msgstr "" +#: ../../c-api/buffer.rst:153 msgid "" "A *NULL* terminated string in :mod:`struct` module style syntax describing " "the contents of a single item. If this is ``NULL``, ``\"B\"`` (unsigned " "bytes) is assumed." msgstr "" +#: ../../c-api/buffer.rst:157 msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag." msgstr "" +#: ../../c-api/buffer.rst:161 msgid "" "The number of dimensions the memory represents as an n-dimensional array. If " "it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing " @@ -212,6 +243,7 @@ msgid "" "number of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`." msgstr "" +#: ../../c-api/buffer.rst:169 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 " @@ -219,28 +251,34 @@ msgid "" "`~Py_buffer.len`." msgstr "" +#: ../../c-api/buffer.rst:174 msgid "" "Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == 0`` " "requires special attention. See `complex arrays`_ for further information." msgstr "" +#: ../../c-api/buffer.rst:178 msgid "The shape array is read-only for the consumer." msgstr "" +#: ../../c-api/buffer.rst:182 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." msgstr "" +#: ../../c-api/buffer.rst:186 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] <= " "0``. See `complex arrays`_ for further information." msgstr "" +#: ../../c-api/buffer.rst:190 msgid "The strides array is read-only for the consumer." msgstr "" +#: ../../c-api/buffer.rst:194 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 " @@ -249,20 +287,24 @@ msgid "" "that no de-referencing should occur (striding in a contiguous memory block)." msgstr "" +#: ../../c-api/buffer.rst:201 msgid "" "If all suboffsets are negative (i.e. no de-referencing is needed), then this " "field must be ``NULL`` (the default value)." msgstr "" +#: ../../c-api/buffer.rst:204 msgid "" "This type of array representation is used by the Python Imaging Library " "(PIL). See `complex arrays`_ for further information how to access elements " "of such an array." msgstr "" +#: ../../c-api/buffer.rst:208 msgid "The suboffsets array is read-only for the consumer." msgstr "" +#: ../../c-api/buffer.rst:212 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 " @@ -270,18 +312,22 @@ msgid "" "the buffer is released. The consumer MUST NOT alter this value." msgstr "" +#: ../../c-api/buffer.rst:219 msgid "Constants:" msgstr "" +#: ../../c-api/buffer.rst:223 msgid "" "The maximum number of dimensions the memory represents. Exporters MUST " "respect this limit, consumers of multi-dimensional buffers SHOULD be able to " "handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions. Currently set to 64." msgstr "" +#: ../../c-api/buffer.rst:232 msgid "Buffer request types" msgstr "" +#: ../../c-api/buffer.rst:234 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 " @@ -289,13 +335,16 @@ msgid "" "argument to specify the exact buffer type it can handle." msgstr "" +#: ../../c-api/buffer.rst:239 msgid "" "All :c:type:`Py_buffer` fields are unambiguously defined by the request type." msgstr "" +#: ../../c-api/buffer.rst:243 msgid "request-independent fields" msgstr "" +#: ../../c-api/buffer.rst:244 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:" @@ -303,9 +352,11 @@ msgid "" "itemsize`, :c:member:`~Py_buffer.ndim`." msgstr "" +#: ../../c-api/buffer.rst:249 msgid "readonly, format" msgstr "" +#: ../../c-api/buffer.rst:253 msgid "" "Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter " "MUST provide a writable buffer or else report failure. Otherwise, the " @@ -314,11 +365,17 @@ msgid "" "PyBUF_WRITABLE` can be used to request a simple writable buffer." msgstr "" +#: ../../c-api/buffer.rst:261 +msgid "This is an alias to :c:macro:`PyBUF_WRITABLE`." +msgstr "" + +#: ../../c-api/buffer.rst:267 msgid "" "Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST be " "filled in correctly. Otherwise, this field MUST be ``NULL``." msgstr "" +#: ../../c-api/buffer.rst:271 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:" @@ -326,107 +383,159 @@ msgid "" "writable buffer." msgstr "" +#: ../../c-api/buffer.rst:275 msgid "" ":c:macro:`PyBUF_FORMAT` must be \\|'d to any of the flags except :c:macro:" "`PyBUF_SIMPLE`, because the latter already implies format ``B`` (unsigned " "bytes). :c:macro:`!PyBUF_FORMAT` cannot be used on its own." msgstr "" +#: ../../c-api/buffer.rst:281 msgid "shape, strides, suboffsets" msgstr "" +#: ../../c-api/buffer.rst:283 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 " "flags below it." msgstr "" +#: ../../c-api/buffer.rst:290 ../../c-api/buffer.rst:314 +#: ../../c-api/buffer.rst:339 msgid "Request" msgstr "" +#: ../../c-api/buffer.rst:290 ../../c-api/buffer.rst:314 +#: ../../c-api/buffer.rst:339 msgid "shape" msgstr "" +#: ../../c-api/buffer.rst:290 ../../c-api/buffer.rst:314 +#: ../../c-api/buffer.rst:339 msgid "strides" msgstr "" +#: ../../c-api/buffer.rst:290 ../../c-api/buffer.rst:314 +#: ../../c-api/buffer.rst:339 msgid "suboffsets" msgstr "" +#: ../../c-api/buffer.rst:292 ../../c-api/buffer.rst:294 +#: ../../c-api/buffer.rst:296 ../../c-api/buffer.rst:316 +#: ../../c-api/buffer.rst:318 ../../c-api/buffer.rst:320 +#: ../../c-api/buffer.rst:322 ../../c-api/buffer.rst:341 +#: ../../c-api/buffer.rst:343 ../../c-api/buffer.rst:345 +#: ../../c-api/buffer.rst:347 ../../c-api/buffer.rst:349 +#: ../../c-api/buffer.rst:351 ../../c-api/buffer.rst:353 +#: ../../c-api/buffer.rst:355 msgid "yes" msgstr "ja" +#: ../../c-api/buffer.rst:292 ../../c-api/buffer.rst:341 +#: ../../c-api/buffer.rst:343 msgid "if needed" msgstr "" +#: ../../c-api/buffer.rst:294 ../../c-api/buffer.rst:296 +#: ../../c-api/buffer.rst:298 ../../c-api/buffer.rst:316 +#: ../../c-api/buffer.rst:318 ../../c-api/buffer.rst:320 +#: ../../c-api/buffer.rst:322 ../../c-api/buffer.rst:345 +#: ../../c-api/buffer.rst:347 ../../c-api/buffer.rst:349 +#: ../../c-api/buffer.rst:351 ../../c-api/buffer.rst:353 +#: ../../c-api/buffer.rst:355 msgid "NULL" msgstr "" +#: ../../c-api/buffer.rst:305 msgid "contiguity requests" msgstr "" +#: ../../c-api/buffer.rst:307 msgid "" "C or Fortran :term:`contiguity ` can be explicitly requested, " "with and without stride information. Without stride information, the buffer " "must be C-contiguous." msgstr "" +#: ../../c-api/buffer.rst:314 ../../c-api/buffer.rst:339 msgid "contig" msgstr "" +#: ../../c-api/buffer.rst:316 ../../c-api/buffer.rst:322 +#: ../../c-api/buffer.rst:353 ../../c-api/buffer.rst:355 msgid "C" msgstr "" +#: ../../c-api/buffer.rst:318 msgid "F" msgstr "" +#: ../../c-api/buffer.rst:320 msgid "C or F" msgstr "" +#: ../../c-api/buffer.rst:322 msgid ":c:macro:`PyBUF_ND`" msgstr "" +#: ../../c-api/buffer.rst:327 msgid "compound requests" msgstr "" +#: ../../c-api/buffer.rst:329 msgid "" "All possible requests are fully defined by some combination of the flags in " "the previous section. For convenience, the buffer protocol provides " "frequently used combinations as single flags." msgstr "" +#: ../../c-api/buffer.rst:333 msgid "" "In the following table *U* stands for undefined contiguity. The consumer " "would have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity." msgstr "" +#: ../../c-api/buffer.rst:339 msgid "readonly" msgstr "" +#: ../../c-api/buffer.rst:339 msgid "format" msgstr "" +#: ../../c-api/buffer.rst:341 ../../c-api/buffer.rst:343 +#: ../../c-api/buffer.rst:345 ../../c-api/buffer.rst:347 +#: ../../c-api/buffer.rst:349 ../../c-api/buffer.rst:351 msgid "U" msgstr "" +#: ../../c-api/buffer.rst:341 ../../c-api/buffer.rst:345 +#: ../../c-api/buffer.rst:349 ../../c-api/buffer.rst:353 msgid "0" msgstr "" +#: ../../c-api/buffer.rst:343 ../../c-api/buffer.rst:347 +#: ../../c-api/buffer.rst:351 ../../c-api/buffer.rst:355 msgid "1 or 0" msgstr "" +#: ../../c-api/buffer.rst:360 msgid "Complex arrays" msgstr "" +#: ../../c-api/buffer.rst:363 msgid "NumPy-style: shape and strides" msgstr "" +#: ../../c-api/buffer.rst:365 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." "shape` and :c:member:`~Py_buffer.strides`." msgstr "" +#: ../../c-api/buffer.rst:368 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 " @@ -434,24 +543,28 @@ msgid "" "strides` are ``NULL``." msgstr "" +#: ../../c-api/buffer.rst:372 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-" "dimensional array as follows:" msgstr "" +#: ../../c-api/buffer.rst:376 msgid "" "ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * " "strides[n-1];\n" "item = *((typeof(item) *)ptr);" msgstr "" +#: ../../c-api/buffer.rst:382 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 " "this function:" msgstr "" +#: ../../c-api/buffer.rst:386 msgid "" "def verify_structure(memlen, itemsize, ndim, shape, strides, offset):\n" " \"\"\"Verify that the parameters represent a valid array within\n" @@ -480,9 +593,11 @@ msgid "" " return 0 <= offset+imin and offset+imax+itemsize <= memlen" msgstr "" +#: ../../c-api/buffer.rst:416 msgid "PIL-style: shape, strides and suboffsets" msgstr "" +#: ../../c-api/buffer.rst:418 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 " @@ -493,12 +608,14 @@ msgid "" "x[2][3]`` arrays that can be located anywhere in memory." msgstr "" +#: ../../c-api/buffer.rst:427 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`` " "strides and suboffsets::" msgstr "" +#: ../../c-api/buffer.rst:431 msgid "" "void *get_item_pointer(int ndim, void *buf, Py_ssize_t *strides,\n" " Py_ssize_t *suboffsets, Py_ssize_t *indices) {\n" @@ -514,21 +631,25 @@ msgid "" "}" msgstr "" +#: ../../c-api/buffer.rst:446 msgid "Buffer-related functions" msgstr "" +#: ../../c-api/buffer.rst:450 msgid "" "Return ``1`` if *obj* supports the buffer interface otherwise ``0``. When " "``1`` is returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` " "will succeed. This function always succeeds." msgstr "" +#: ../../c-api/buffer.rst:457 msgid "" "Send a request to *exporter* to fill in *view* as specified by *flags*. If " "the exporter cannot provide a buffer of the exact type, it MUST raise :exc:" "`BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``." msgstr "" +#: ../../c-api/buffer.rst:462 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 " @@ -536,6 +657,7 @@ msgid "" "instead of *exporter* (See :ref:`Buffer Object Structures `)." msgstr "" +#: ../../c-api/buffer.rst:467 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:" @@ -543,6 +665,7 @@ msgid "" "`PyBuffer_Release` must be called exactly once." msgstr "" +#: ../../c-api/buffer.rst:475 msgid "" "Release the buffer *view* and release the :term:`strong reference` (i.e. " "decrement the reference count) to the view's supporting object, ``view-" @@ -550,16 +673,19 @@ msgid "" "used, otherwise reference leaks may occur." msgstr "" +#: ../../c-api/buffer.rst:480 msgid "" "It is an error to call this function on a buffer that was not obtained via :" "c:func:`PyObject_GetBuffer`." msgstr "" +#: ../../c-api/buffer.rst:486 msgid "" "Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:" "`~Py_buffer.format`. On error, raise an exception and return -1." msgstr "" +#: ../../c-api/buffer.rst:494 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 " @@ -567,84 +693,103 @@ msgid "" "succeeds." msgstr "" +#: ../../c-api/buffer.rst:501 msgid "" "Get the memory area pointed to by the *indices* inside the given *view*. " "*indices* must point to an array of ``view->ndim`` indices." msgstr "" +#: ../../c-api/buffer.rst:507 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 " -"success, ``-1`` on error." +"Copy contiguous *len* bytes from *buf* to *view*. *order* can be ``'C'`` or " +"``'F'`` or ``'A'`` (for C-style or Fortran-style ordering or either one). " +"``0`` is returned on success, ``-1`` on error." msgstr "" +#: ../../c-api/buffer.rst:515 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 " "ordering or either one). ``0`` is returned on success, ``-1`` on error." msgstr "" +#: ../../c-api/buffer.rst:519 msgid "This function fails if *len* != *src->len*." msgstr "" +#: ../../c-api/buffer.rst:524 msgid "" "Copy data from *src* to *dest* buffer. Can convert between C-style and or " "Fortran-style buffers." msgstr "" +#: ../../c-api/buffer.rst:527 msgid "``0`` is returned on success, ``-1`` on error." msgstr "" +#: ../../c-api/buffer.rst:531 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 " "given shape with the given number of bytes per element." msgstr "" +#: ../../c-api/buffer.rst:538 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 " "a sequence of unsigned bytes." msgstr "" +#: ../../c-api/buffer.rst:542 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-" "only and :c:macro:`PyBUF_WRITABLE` is set in *flags*." msgstr "" +#: ../../c-api/buffer.rst:546 msgid "" "On success, set ``view->obj`` to a new reference to *exporter* and return 0. " "Otherwise, raise :exc:`BufferError`, set ``view->obj`` to ``NULL`` and " "return ``-1``;" msgstr "" +#: ../../c-api/buffer.rst:550 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 " "unmodified. Otherwise, *exporter* MUST be ``NULL``." msgstr "" +#: ../../c-api/buffer.rst:3 msgid "buffer protocol" msgstr "" +#: ../../c-api/buffer.rst:3 msgid "buffer interface" msgstr "" +#: ../../c-api/buffer.rst:3 msgid "(see buffer protocol)" msgstr "" +#: ../../c-api/buffer.rst:3 msgid "buffer object" msgstr "" +#: ../../c-api/buffer.rst:27 msgid "PyBufferProcs (C type)" msgstr "" +#: ../../c-api/buffer.rst:302 msgid "contiguous" msgstr "" +#: ../../c-api/buffer.rst:302 msgid "C-contiguous" msgstr "" +#: ../../c-api/buffer.rst:302 msgid "Fortran contiguous" msgstr "" diff --git a/c-api/buffer.po~ b/c-api/buffer.po~ new file mode 100644 index 00000000..418057c3 --- /dev/null +++ b/c-api/buffer.po~ @@ -0,0 +1,650 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Buffer Protocol" +msgstr "" + +msgid "" +"Certain objects available in Python wrap access to an underlying memory " +"array or *buffer*. Such objects include the built-in :class:`bytes` and :" +"class:`bytearray`, and some extension types like :class:`array.array`. Third-" +"party libraries may define their own types for special purposes, such as " +"image processing or numeric analysis." +msgstr "" + +msgid "" +"While each of these types have their own semantics, they share the common " +"characteristic of being backed by a possibly large memory buffer. It is " +"then desirable, in some situations, to access that buffer directly and " +"without intermediate copying." +msgstr "" + +msgid "" +"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 "" + +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`; for Python " +"see :ref:`python-buffer-protocol`." +msgstr "" + +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). For " +"Python see :class:`memoryview`." +msgstr "" + +msgid "" +"Simple objects such as :class:`bytes` and :class:`bytearray` expose their " +"underlying buffer in byte-oriented form. Other forms are possible; for " +"example, the elements exposed by an :class:`array.array` can be multi-byte " +"values." +msgstr "" + +msgid "" +"An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase." +"write` method of file objects: any object that can export a series of bytes " +"through the buffer interface can be written to a file. While :meth:`!write` " +"only needs read-only access to the internal contents of the object passed to " +"it, other methods such as :meth:`~io.BufferedIOBase.readinto` need write " +"access to the contents of their argument. The buffer interface allows " +"objects to selectively allow or reject exporting of read-write and read-only " +"buffers." +msgstr "" + +msgid "" +"There are two ways for a consumer of the buffer interface to acquire a " +"buffer over a target object:" +msgstr "" + +msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;" +msgstr "" + +msgid "" +"call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the " +"``y*``, ``w*`` or ``s*`` :ref:`format codes `." +msgstr "" + +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 " +"resource leaks." +msgstr "" + +msgid "" +"The buffer protocol is now accessible in Python, see :ref:`python-buffer-" +"protocol` and :class:`memoryview`." +msgstr "" + +msgid "Buffer structure" +msgstr "" + +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 " +"used as a zero-copy slicing mechanism. Using their ability to reference a " +"block of memory, it is possible to expose any data to the Python programmer " +"quite easily. The memory could be a large, constant array in a C extension, " +"it could be a raw block of memory for manipulation before passing to an " +"operating system library, or it could be used to pass around structured data " +"in its native, in-memory format." +msgstr "" + +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 " +"them to be created and copied very simply. When a generic wrapper around a " +"buffer is needed, a :ref:`memoryview ` object can be " +"created." +msgstr "" + +msgid "" +"For short instructions how to write an exporting object, see :ref:`Buffer " +"Object Structures `. For obtaining a buffer, see :c:func:" +"`PyObject_GetBuffer`." +msgstr "" + +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 " +"of the exporter. For example, with negative :c:member:`~Py_buffer.strides` " +"the value may point to the end of the memory block." +msgstr "" + +msgid "" +"For :term:`contiguous` arrays, the value points to the beginning of the " +"memory block." +msgstr "" + +msgid "" +"A new reference to the exporting object. The reference is owned by the " +"consumer and automatically released (i.e. reference count decremented) and " +"set to ``NULL`` by :c:func:`PyBuffer_Release`. The field is the equivalent " +"of the return value of any standard C-API function." +msgstr "" + +msgid "" +"As a special case, for *temporary* buffers that are wrapped by :c:func:" +"`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this field is " +"``NULL``. In general, exporting objects MUST NOT use this scheme." +msgstr "" + +msgid "" +"``product(shape) * itemsize``. For contiguous arrays, this is the length of " +"the underlying memory block. For non-contiguous arrays, it is the length " +"that the logical structure would have if it were copied to a contiguous " +"representation." +msgstr "" + +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 " +"most cases such a request will be :c:macro:`PyBUF_SIMPLE` or :c:macro:" +"`PyBUF_WRITABLE`." +msgstr "" + +msgid "" +"An indicator of whether the buffer is read-only. This field is controlled by " +"the :c:macro:`PyBUF_WRITABLE` flag." +msgstr "" + +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." +msgstr "" + +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 " +"``NULL``, but :c:member:`~Py_buffer.itemsize` still has the value for the " +"original format." +msgstr "" + +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." +"itemsize` to navigate the buffer." +msgstr "" + +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 " +"disregard :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``." +msgstr "" + +msgid "" +"A *NULL* terminated string in :mod:`struct` module style syntax describing " +"the contents of a single item. If this is ``NULL``, ``\"B\"`` (unsigned " +"bytes) is assumed." +msgstr "" + +msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag." +msgstr "" + +msgid "" +"The number of dimensions the memory represents as an n-dimensional array. If " +"it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing " +"a scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer." +"strides` and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``. The maximum " +"number of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`." +msgstr "" + +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 " +"``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to :c:member:" +"`~Py_buffer.len`." +msgstr "" + +msgid "" +"Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == 0`` " +"requires special attention. See `complex arrays`_ for further information." +msgstr "" + +msgid "The shape array is read-only for the consumer." +msgstr "" + +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." +msgstr "" + +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] <= " +"0``. See `complex arrays`_ for further information." +msgstr "" + +msgid "The strides array is read-only for the consumer." +msgstr "" + +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 " +"pointers and the suboffset value dictates how many bytes to add to each " +"pointer after de-referencing. A suboffset value that is negative indicates " +"that no de-referencing should occur (striding in a contiguous memory block)." +msgstr "" + +msgid "" +"If all suboffsets are negative (i.e. no de-referencing is needed), then this " +"field must be ``NULL`` (the default value)." +msgstr "" + +msgid "" +"This type of array representation is used by the Python Imaging Library " +"(PIL). See `complex arrays`_ for further information how to access elements " +"of such an array." +msgstr "" + +msgid "The suboffsets array is read-only for the consumer." +msgstr "" + +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 " +"whether or not the shape, strides, and suboffsets arrays must be freed when " +"the buffer is released. The consumer MUST NOT alter this value." +msgstr "" + +msgid "Constants:" +msgstr "" + +msgid "" +"The maximum number of dimensions the memory represents. Exporters MUST " +"respect this limit, consumers of multi-dimensional buffers SHOULD be able to " +"handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions. Currently set to 64." +msgstr "" + +msgid "Buffer request types" +msgstr "" + +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 " +"structure of the memory can vary drastically, the consumer uses the *flags* " +"argument to specify the exact buffer type it can handle." +msgstr "" + +msgid "" +"All :c:type:`Py_buffer` fields are unambiguously defined by the request type." +msgstr "" + +msgid "request-independent fields" +msgstr "" + +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:" +"`~Py_buffer.buf`, :c:member:`~Py_buffer.len`, :c:member:`~Py_buffer." +"itemsize`, :c:member:`~Py_buffer.ndim`." +msgstr "" + +msgid "readonly, format" +msgstr "" + +msgid "" +"Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter " +"MUST provide a writable buffer or else report failure. Otherwise, the " +"exporter MAY provide either a read-only or writable buffer, but the choice " +"MUST be consistent for all consumers. For example, :c:expr:`PyBUF_SIMPLE | " +"PyBUF_WRITABLE` can be used to request a simple writable buffer." +msgstr "" + +msgid "" +"Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST be " +"filled in correctly. Otherwise, this field MUST be ``NULL``." +msgstr "" + +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:" +"`PyBUF_WRITABLE` can be used as a stand-alone flag to request a simple " +"writable buffer." +msgstr "" + +msgid "" +":c:macro:`PyBUF_FORMAT` must be \\|'d to any of the flags except :c:macro:" +"`PyBUF_SIMPLE`, because the latter already implies format ``B`` (unsigned " +"bytes). :c:macro:`!PyBUF_FORMAT` cannot be used on its own." +msgstr "" + +msgid "shape, strides, suboffsets" +msgstr "" + +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 " +"flags below it." +msgstr "" + +msgid "Request" +msgstr "" + +msgid "shape" +msgstr "" + +msgid "strides" +msgstr "" + +msgid "suboffsets" +msgstr "" + +msgid "yes" +msgstr "ja" + +msgid "if needed" +msgstr "" + +msgid "NULL" +msgstr "" + +msgid "contiguity requests" +msgstr "" + +msgid "" +"C or Fortran :term:`contiguity ` can be explicitly requested, " +"with and without stride information. Without stride information, the buffer " +"must be C-contiguous." +msgstr "" + +msgid "contig" +msgstr "" + +msgid "C" +msgstr "" + +msgid "F" +msgstr "" + +msgid "C or F" +msgstr "" + +msgid ":c:macro:`PyBUF_ND`" +msgstr "" + +msgid "compound requests" +msgstr "" + +msgid "" +"All possible requests are fully defined by some combination of the flags in " +"the previous section. For convenience, the buffer protocol provides " +"frequently used combinations as single flags." +msgstr "" + +msgid "" +"In the following table *U* stands for undefined contiguity. The consumer " +"would have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity." +msgstr "" + +msgid "readonly" +msgstr "" + +msgid "format" +msgstr "" + +msgid "U" +msgstr "" + +msgid "0" +msgstr "" + +msgid "1 or 0" +msgstr "" + +msgid "Complex arrays" +msgstr "" + +msgid "NumPy-style: shape and strides" +msgstr "" + +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." +"shape` and :c:member:`~Py_buffer.strides`." +msgstr "" + +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 " +"that case, both :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer." +"strides` are ``NULL``." +msgstr "" + +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-" +"dimensional array as follows:" +msgstr "" + +msgid "" +"ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * " +"strides[n-1];\n" +"item = *((typeof(item) *)ptr);" +msgstr "" + +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 " +"this function:" +msgstr "" + +msgid "" +"def verify_structure(memlen, itemsize, ndim, shape, strides, offset):\n" +" \"\"\"Verify that the parameters represent a valid array within\n" +" the bounds of the allocated memory:\n" +" char *mem: start of the physical memory block\n" +" memlen: length of the physical memory block\n" +" offset: (char *)buf - mem\n" +" \"\"\"\n" +" if offset % itemsize:\n" +" return False\n" +" if offset < 0 or offset+itemsize > memlen:\n" +" return False\n" +" if any(v % itemsize for v in strides):\n" +" return False\n" +"\n" +" if ndim <= 0:\n" +" return ndim == 0 and not shape and not strides\n" +" if 0 in shape:\n" +" return True\n" +"\n" +" imin = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n" +" if strides[j] <= 0)\n" +" imax = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n" +" if strides[j] > 0)\n" +"\n" +" return 0 <= offset+imin and offset+imax+itemsize <= memlen" +msgstr "" + +msgid "PIL-style: shape, strides and suboffsets" +msgstr "" + +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 " +"example, the regular three-dimensional C-array ``char v[2][2][3]`` can also " +"be viewed as an array of 2 pointers to 2 two-dimensional arrays: ``char " +"(*v[2])[2][3]``. In suboffsets representation, those two pointers can be " +"embedded at the start of :c:member:`~Py_buffer.buf`, pointing to two ``char " +"x[2][3]`` arrays that can be located anywhere in memory." +msgstr "" + +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`` " +"strides and suboffsets::" +msgstr "" + +msgid "" +"void *get_item_pointer(int ndim, void *buf, Py_ssize_t *strides,\n" +" Py_ssize_t *suboffsets, Py_ssize_t *indices) {\n" +" char *pointer = (char*)buf;\n" +" int i;\n" +" for (i = 0; i < ndim; i++) {\n" +" pointer += strides[i] * indices[i];\n" +" if (suboffsets[i] >=0 ) {\n" +" pointer = *((char**)pointer) + suboffsets[i];\n" +" }\n" +" }\n" +" return (void*)pointer;\n" +"}" +msgstr "" + +msgid "Buffer-related functions" +msgstr "" + +msgid "" +"Return ``1`` if *obj* supports the buffer interface otherwise ``0``. When " +"``1`` is returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` " +"will succeed. This function always succeeds." +msgstr "" + +msgid "" +"Send a request to *exporter* to fill in *view* as specified by *flags*. If " +"the exporter cannot provide a buffer of the exact type, it MUST raise :exc:" +"`BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``." +msgstr "" + +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 " +"redirect requests to a single object, ``view->obj`` MAY refer to this object " +"instead of *exporter* (See :ref:`Buffer Object Structures `)." +msgstr "" + +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:" +"`free`. Thus, after the consumer is done with the buffer, :c:func:" +"`PyBuffer_Release` must be called exactly once." +msgstr "" + +msgid "" +"Release the buffer *view* and release the :term:`strong reference` (i.e. " +"decrement the reference count) to the view's supporting object, ``view-" +">obj``. This function MUST be called when the buffer is no longer being " +"used, otherwise reference leaks may occur." +msgstr "" + +msgid "" +"It is an error to call this function on a buffer that was not obtained via :" +"c:func:`PyObject_GetBuffer`." +msgstr "" + +msgid "" +"Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:" +"`~Py_buffer.format`. On error, raise an exception and return -1." +msgstr "" + +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 " +"one (*order* is ``'A'``). Return ``0`` otherwise. This function always " +"succeeds." +msgstr "" + +msgid "" +"Get the memory area pointed to by the *indices* inside the given *view*. " +"*indices* must point to an array of ``view->ndim`` indices." +msgstr "" + +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 " +"success, ``-1`` on error." +msgstr "" + +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 " +"ordering or either one). ``0`` is returned on success, ``-1`` on error." +msgstr "" + +msgid "This function fails if *len* != *src->len*." +msgstr "" + +msgid "" +"Copy data from *src* to *dest* buffer. Can convert between C-style and or " +"Fortran-style buffers." +msgstr "" + +msgid "``0`` is returned on success, ``-1`` on error." +msgstr "" + +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 " +"given shape with the given number of bytes per element." +msgstr "" + +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 " +"a sequence of unsigned bytes." +msgstr "" + +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-" +"only and :c:macro:`PyBUF_WRITABLE` is set in *flags*." +msgstr "" + +msgid "" +"On success, set ``view->obj`` to a new reference to *exporter* and return 0. " +"Otherwise, raise :exc:`BufferError`, set ``view->obj`` to ``NULL`` and " +"return ``-1``;" +msgstr "" + +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 " +"unmodified. Otherwise, *exporter* MUST be ``NULL``." +msgstr "" + +msgid "buffer protocol" +msgstr "" + +msgid "buffer interface" +msgstr "" + +msgid "(see buffer protocol)" +msgstr "" + +msgid "buffer object" +msgstr "" + +msgid "PyBufferProcs (C type)" +msgstr "" + +msgid "contiguous" +msgstr "" + +msgid "C-contiguous" +msgstr "" + +msgid "Fortran contiguous" +msgstr "" diff --git a/c-api/bytearray.po b/c-api/bytearray.po index 0426955e..9671461c 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -8,89 +8,123 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/bytearray.rst:6 msgid "Byte Array Objects" msgstr "" +#: ../../c-api/bytearray.rst:13 msgid "" "This subtype of :c:type:`PyObject` represents a Python bytearray object." msgstr "" +#: ../../c-api/bytearray.rst:18 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python bytearray " "type; it is the same object as :class:`bytearray` in the Python layer." msgstr "" +#: ../../c-api/bytearray.rst:23 msgid "Type check macros" msgstr "" +#: ../../c-api/bytearray.rst:27 msgid "" "Return true if the object *o* is a bytearray object or an instance of a " "subtype of the bytearray type. This function always succeeds." msgstr "" +#: ../../c-api/bytearray.rst:33 msgid "" "Return true if the object *o* is a bytearray object, but not an instance of " "a subtype of the bytearray type. This function always succeeds." msgstr "" +#: ../../c-api/bytearray.rst:38 msgid "Direct API functions" msgstr "" +#: ../../c-api/bytearray.rst:42 msgid "" "Return a new bytearray object from any object, *o*, that implements the :ref:" "`buffer protocol `." msgstr "" +#: ../../c-api/bytearray.rst:45 ../../c-api/bytearray.rst:56 +#: ../../c-api/bytearray.rst:63 msgid "On failure, return ``NULL`` with an exception set." msgstr "" +#: ../../c-api/bytearray.rst:48 ../../c-api/bytearray.rst:66 +msgid "" +"If the object implements the buffer protocol, then the buffer must not be " +"mutated while the bytearray object is being created." +msgstr "" + +#: ../../c-api/bytearray.rst:54 msgid "Create a new bytearray object from *string* and its length, *len*." msgstr "" +#: ../../c-api/bytearray.rst:61 msgid "" "Concat bytearrays *a* and *b* and return a new bytearray with the result." msgstr "" +#: ../../c-api/bytearray.rst:72 msgid "Return the size of *bytearray* after checking for a ``NULL`` pointer." msgstr "" +#: ../../c-api/bytearray.rst:77 msgid "" "Return the contents of *bytearray* as a char array after checking for a " "``NULL`` pointer. The returned array always has an extra null byte appended." msgstr "" +#: ../../c-api/bytearray.rst:82 ../../c-api/bytearray.rst:104 +msgid "" +"It is not thread-safe to mutate the bytearray object while using the " +"returned char array." +msgstr "" + +#: ../../c-api/bytearray.rst:87 msgid "" "Resize the internal buffer of *bytearray* to *len*. Failure is a ``-1`` " "return with an exception set." msgstr "" +#: ../../c-api/bytearray.rst:90 msgid "" "A negative *len* will now result in an exception being set and -1 returned." msgstr "" +#: ../../c-api/bytearray.rst:95 msgid "Macros" msgstr "" +#: ../../c-api/bytearray.rst:97 msgid "These macros trade safety for speed and they don't check pointers." msgstr "" +#: ../../c-api/bytearray.rst:101 msgid "Similar to :c:func:`PyByteArray_AsString`, but without error checking." msgstr "" +#: ../../c-api/bytearray.rst:109 msgid "Similar to :c:func:`PyByteArray_Size`, but without error checking." msgstr "" +#: ../../c-api/bytearray.rst:8 msgid "object" msgstr "" +#: ../../c-api/bytearray.rst:8 msgid "bytearray" msgstr "" diff --git a/c-api/bytearray.po~ b/c-api/bytearray.po~ new file mode 100644 index 00000000..0426955e --- /dev/null +++ b/c-api/bytearray.po~ @@ -0,0 +1,96 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Byte Array Objects" +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents a Python bytearray object." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python bytearray " +"type; it is the same object as :class:`bytearray` in the Python layer." +msgstr "" + +msgid "Type check macros" +msgstr "" + +msgid "" +"Return true if the object *o* is a bytearray object or an instance of a " +"subtype of the bytearray type. This function always succeeds." +msgstr "" + +msgid "" +"Return true if the object *o* is a bytearray object, but not an instance of " +"a subtype of the bytearray type. This function always succeeds." +msgstr "" + +msgid "Direct API functions" +msgstr "" + +msgid "" +"Return a new bytearray object from any object, *o*, that implements the :ref:" +"`buffer protocol `." +msgstr "" + +msgid "On failure, return ``NULL`` with an exception set." +msgstr "" + +msgid "Create a new bytearray object from *string* and its length, *len*." +msgstr "" + +msgid "" +"Concat bytearrays *a* and *b* and return a new bytearray with the result." +msgstr "" + +msgid "Return the size of *bytearray* after checking for a ``NULL`` pointer." +msgstr "" + +msgid "" +"Return the contents of *bytearray* as a char array after checking for a " +"``NULL`` pointer. The returned array always has an extra null byte appended." +msgstr "" + +msgid "" +"Resize the internal buffer of *bytearray* to *len*. Failure is a ``-1`` " +"return with an exception set." +msgstr "" + +msgid "" +"A negative *len* will now result in an exception being set and -1 returned." +msgstr "" + +msgid "Macros" +msgstr "" + +msgid "These macros trade safety for speed and they don't check pointers." +msgstr "" + +msgid "Similar to :c:func:`PyByteArray_AsString`, but without error checking." +msgstr "" + +msgid "Similar to :c:func:`PyByteArray_Size`, but without error checking." +msgstr "" + +msgid "object" +msgstr "" + +msgid "bytearray" +msgstr "" diff --git a/c-api/bytes.po b/c-api/bytes.po index d139c88f..00ab95a5 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.po @@ -8,53 +8,68 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/bytes.rst:6 msgid "Bytes Objects" msgstr "" +#: ../../c-api/bytes.rst:8 msgid "" "These functions raise :exc:`TypeError` when expecting a bytes parameter and " "called with a non-bytes parameter." msgstr "" +#: ../../c-api/bytes.rst:16 msgid "This subtype of :c:type:`PyObject` represents a Python bytes object." msgstr "" +#: ../../c-api/bytes.rst:21 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python bytes type; it " "is the same object as :class:`bytes` in the Python layer." msgstr "" +#: ../../c-api/bytes.rst:27 msgid "" "Return true if the object *o* is a bytes object or an instance of a subtype " "of the bytes type. This function always succeeds." msgstr "" +#: ../../c-api/bytes.rst:33 msgid "" "Return true if the object *o* is a bytes object, but not an instance of a " "subtype of the bytes type. This function always succeeds." msgstr "" +#: ../../c-api/bytes.rst:39 msgid "" "Return a new bytes object with a copy of the string *v* as value on success, " "and ``NULL`` on failure. The parameter *v* must not be ``NULL``; it will " "not be checked." msgstr "" +#: ../../c-api/bytes.rst:46 msgid "" "Return a new bytes object with a copy of the string *v* as value and length " "*len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents " "of the bytes object are uninitialized." msgstr "" +#: ../../c-api/bytes.rst:50 +msgid "" +"Use the :c:type:`PyBytesWriter` API instead of " +"``PyBytes_FromStringAndSize(NULL, len)``." +msgstr "" + +#: ../../c-api/bytes.rst:57 msgid "" "Take a C :c:func:`printf`\\ -style *format* string and a variable number of " "arguments, calculate the size of the resulting Python bytes object and " @@ -64,143 +79,193 @@ msgid "" "allowed:" msgstr "" +#: ../../c-api/bytes.rst:69 msgid "Format Characters" msgstr "" +#: ../../c-api/bytes.rst:69 msgid "Type" msgstr "" +#: ../../c-api/bytes.rst:69 msgid "Comment" msgstr "" +#: ../../c-api/bytes.rst:71 msgid "``%%``" msgstr "" +#: ../../c-api/bytes.rst:71 msgid "*n/a*" msgstr "" +#: ../../c-api/bytes.rst:71 msgid "The literal % character." msgstr "" +#: ../../c-api/bytes.rst:73 msgid "``%c``" msgstr "" +#: ../../c-api/bytes.rst:73 ../../c-api/bytes.rst:76 ../../c-api/bytes.rst:94 +#: ../../c-api/bytes.rst:97 msgid "int" msgstr "" +#: ../../c-api/bytes.rst:73 msgid "A single byte, represented as a C int." msgstr "" +#: ../../c-api/bytes.rst:76 msgid "``%d``" msgstr "" +#: ../../c-api/bytes.rst:76 msgid "Equivalent to ``printf(\"%d\")``. [1]_" msgstr "" +#: ../../c-api/bytes.rst:79 msgid "``%u``" msgstr "" +#: ../../c-api/bytes.rst:79 msgid "unsigned int" msgstr "" +#: ../../c-api/bytes.rst:79 msgid "Equivalent to ``printf(\"%u\")``. [1]_" msgstr "" +#: ../../c-api/bytes.rst:82 msgid "``%ld``" msgstr "" +#: ../../c-api/bytes.rst:82 msgid "long" msgstr "" +#: ../../c-api/bytes.rst:82 msgid "Equivalent to ``printf(\"%ld\")``. [1]_" msgstr "" +#: ../../c-api/bytes.rst:85 msgid "``%lu``" msgstr "" +#: ../../c-api/bytes.rst:85 msgid "unsigned long" msgstr "" +#: ../../c-api/bytes.rst:85 msgid "Equivalent to ``printf(\"%lu\")``. [1]_" msgstr "" +#: ../../c-api/bytes.rst:88 msgid "``%zd``" msgstr "" -msgid ":c:type:`\\ Py_ssize_t`" +#: ../../c-api/bytes.rst:88 +msgid ":c:type:` Py_ssize_t`" msgstr "" +#: ../../c-api/bytes.rst:88 msgid "Equivalent to ``printf(\"%zd\")``. [1]_" msgstr "" +#: ../../c-api/bytes.rst:91 msgid "``%zu``" msgstr "" +#: ../../c-api/bytes.rst:91 msgid "size_t" msgstr "" +#: ../../c-api/bytes.rst:91 msgid "Equivalent to ``printf(\"%zu\")``. [1]_" msgstr "" +#: ../../c-api/bytes.rst:94 msgid "``%i``" msgstr "" +#: ../../c-api/bytes.rst:94 msgid "Equivalent to ``printf(\"%i\")``. [1]_" msgstr "" +#: ../../c-api/bytes.rst:97 msgid "``%x``" msgstr "" +#: ../../c-api/bytes.rst:97 msgid "Equivalent to ``printf(\"%x\")``. [1]_" msgstr "" +#: ../../c-api/bytes.rst:100 msgid "``%s``" msgstr "" +#: ../../c-api/bytes.rst:100 msgid "const char\\*" msgstr "" +#: ../../c-api/bytes.rst:100 msgid "A null-terminated C character array." msgstr "" +#: ../../c-api/bytes.rst:103 msgid "``%p``" msgstr "" +#: ../../c-api/bytes.rst:103 msgid "const void\\*" msgstr "" +#: ../../c-api/bytes.rst:103 msgid "" "The hex representation of a C pointer. Mostly equivalent to " "``printf(\"%p\")`` except that it is guaranteed to start with the literal " "``0x`` regardless of what the platform's ``printf`` yields." msgstr "" +#: ../../c-api/bytes.rst:112 msgid "" "An unrecognized format character causes all the rest of the format string to " "be copied as-is to the result object, and any extra arguments discarded." msgstr "" +#: ../../c-api/bytes.rst:115 msgid "" "For integer specifiers (d, u, ld, lu, zd, zu, i, x): the 0-conversion flag " "has effect even when a precision is given." msgstr "" +#: ../../c-api/bytes.rst:121 msgid "" "Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two " "arguments." msgstr "" +#: ../../c-api/bytes.rst:127 msgid "" "Return the bytes representation of object *o* that implements the buffer " "protocol." msgstr "" +#: ../../c-api/bytes.rst:131 +msgid "" +"If the object implements the buffer protocol, then the buffer must not be " +"mutated while the bytes object is being created." +msgstr "" + +#: ../../c-api/bytes.rst:137 msgid "Return the length of the bytes in bytes object *o*." msgstr "" +#: ../../c-api/bytes.rst:142 msgid "Similar to :c:func:`PyBytes_Size`, but without error checking." msgstr "" +#: ../../c-api/bytes.rst:147 msgid "" "Return a pointer to the contents of *o*. The pointer refers to the internal " "buffer of *o*, which consists of ``len(o) + 1`` bytes. The last byte in the " @@ -211,20 +276,24 @@ msgid "" "`PyBytes_AsString` returns ``NULL`` and raises :exc:`TypeError`." msgstr "" +#: ../../c-api/bytes.rst:159 msgid "Similar to :c:func:`PyBytes_AsString`, but without error checking." msgstr "" +#: ../../c-api/bytes.rst:164 msgid "" "Return the null-terminated contents of the object *obj* through the output " "variables *buffer* and *length*. Returns ``0`` on success." msgstr "" +#: ../../c-api/bytes.rst:168 msgid "" "If *length* is ``NULL``, the bytes object may not contain embedded null " "bytes; if it does, the function returns ``-1`` and a :exc:`ValueError` is " "raised." msgstr "" +#: ../../c-api/bytes.rst:172 msgid "" "The buffer refers to an internal buffer of *obj*, which includes an " "additional null byte at the end (not counted in *length*). The data must " @@ -234,44 +303,65 @@ msgid "" "returns ``-1`` and raises :exc:`TypeError`." msgstr "" +#: ../../c-api/bytes.rst:179 msgid "" "Previously, :exc:`TypeError` was raised when embedded null bytes were " "encountered in the bytes object." msgstr "" +#: ../../c-api/bytes.rst:186 msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " -"appended to *bytes*; the caller will own the new reference. The reference " -"to the old value of *bytes* will be stolen. If the new object cannot be " -"created, the old reference to *bytes* will still be discarded and the value " -"of *\\*bytes* will be set to ``NULL``; the appropriate exception will be set." +"appended to *bytes*; the caller will own the new reference. The reference to " +"the old value of *bytes* will be \":term:`stolen `\". If the new " +"object cannot be created, the old reference to *bytes* will still be " +"\"stolen\", the value of *\\*bytes* will be set to ``NULL``, and the " +"appropriate exception will be set." +msgstr "" + +#: ../../c-api/bytes.rst:194 ../../c-api/bytes.rst:204 +msgid "" +"If *newpart* implements the buffer protocol, then the buffer must not be " +"mutated while the new bytes object is being created." msgstr "" +#: ../../c-api/bytes.rst:199 msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " "appended to *bytes*. This version releases the :term:`strong reference` to " "*newpart* (i.e. decrements its reference count)." msgstr "" +#: ../../c-api/bytes.rst:210 msgid "Similar to ``sep.join(iterable)`` in Python." msgstr "" +#: ../../c-api/bytes.rst:212 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 "" +#: ../../c-api/bytes.rst:217 msgid "" "*iterable* must be an iterable object yielding objects that implement the :" "ref:`buffer protocol `." msgstr "" +#: ../../c-api/bytes.rst:220 msgid "" "On success, return a new :class:`bytes` object. On error, set an exception " "and return ``NULL``." msgstr "" +#: ../../c-api/bytes.rst:226 +msgid "" +"If *iterable* objects implement the buffer protocol, then the buffers must " +"not be mutated while the new bytes object is being created." +msgstr "" + +#: ../../c-api/bytes.rst:231 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 " @@ -283,8 +373,281 @@ msgid "" "``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned." msgstr "" +#: ../../c-api/bytes.rst:242 +msgid "Use the :c:type:`PyBytesWriter` API instead." +msgstr "" + +#: ../../c-api/bytes.rst:248 +msgid "" +"Get the string representation of *bytes*. This function is currently used to " +"implement :meth:`!bytes.__repr__` in Python." +msgstr "" + +#: ../../c-api/bytes.rst:251 +msgid "" +"This function does not do type checking; it is undefined behavior to pass " +"*bytes* as a non-bytes object or ``NULL``." +msgstr "" + +#: ../../c-api/bytes.rst:254 +msgid "" +"If *smartquotes* is true, the representation will use a double-quoted string " +"instead of single-quoted string when single-quotes are present in *bytes*. " +"For example, the byte string ``'Python'`` would be represented as " +"``b\"'Python'\"`` when *smartquotes* is true, or ``b'\\'Python\\''`` when it " +"is false." +msgstr "" + +#: ../../c-api/bytes.rst:260 +msgid "" +"On success, this function returns a :term:`strong reference` to a :class:" +"`str` object containing the representation. On failure, this returns " +"``NULL`` with an exception set." +msgstr "" + +#: ../../c-api/bytes.rst:267 +msgid "" +"Unescape a backslash-escaped string *s*. *s* must not be ``NULL``. *len* " +"must be the size of *s*." +msgstr "" + +#: ../../c-api/bytes.rst:270 +msgid "" +"*errors* must be one of ``\"strict\"``, ``\"replace\"``, or ``\"ignore\"``. " +"If *errors* is ``NULL``, then ``\"strict\"`` is used by default." +msgstr "" + +#: ../../c-api/bytes.rst:273 +msgid "" +"On success, this function returns a :term:`strong reference` to a Python :" +"class:`bytes` object containing the unescaped string. On failure, this " +"function returns ``NULL`` with an exception set." +msgstr "" + +#: ../../c-api/bytes.rst:277 +msgid "*unicode* and *recode_encoding* are now unused." +msgstr "" + +#: ../../c-api/bytes.rst:284 +msgid "PyBytesWriter" +msgstr "" + +#: ../../c-api/bytes.rst:286 +msgid "" +"The :c:type:`PyBytesWriter` API can be used to create a Python :class:" +"`bytes` object." +msgstr "" + +#: ../../c-api/bytes.rst:293 +msgid "A bytes writer instance." +msgstr "" + +#: ../../c-api/bytes.rst:295 +msgid "" +"The API is **not thread safe**: a writer should only be used by a single " +"thread at the same time." +msgstr "" + +#: ../../c-api/bytes.rst:298 +msgid "" +"The instance must be destroyed by :c:func:`PyBytesWriter_Finish` on success, " +"or :c:func:`PyBytesWriter_Discard` on error." +msgstr "" + +#: ../../c-api/bytes.rst:303 +msgid "Create, Finish, Discard" +msgstr "" + +#: ../../c-api/bytes.rst:307 +msgid "Create a :c:type:`PyBytesWriter` to write *size* bytes." +msgstr "" + +#: ../../c-api/bytes.rst:309 +msgid "" +"If *size* is greater than zero, allocate *size* bytes, and set the writer " +"size to *size*. The caller is responsible to write *size* bytes using :c:" +"func:`PyBytesWriter_GetData`. This function does not overallocate." +msgstr "" + +#: ../../c-api/bytes.rst:314 ../../c-api/bytes.rst:443 +msgid "On error, set an exception and return ``NULL``." +msgstr "" + +#: ../../c-api/bytes.rst:316 ../../c-api/bytes.rst:419 +msgid "*size* must be positive or zero." +msgstr "" + +#: ../../c-api/bytes.rst:320 +msgid "" +"Finish a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." +msgstr "" + +#: ../../c-api/bytes.rst:323 +msgid "" +"On success, return a Python :class:`bytes` object. On error, set an " +"exception and return ``NULL``." +msgstr "" + +#: ../../c-api/bytes.rst:326 +msgid "" +"The writer instance is invalid after the call in any case. No API can be " +"called on the writer after :c:func:`PyBytesWriter_Finish`." +msgstr "" + +#: ../../c-api/bytes.rst:331 +msgid "" +"Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer to *size* " +"bytes before creating the :class:`bytes` object." +msgstr "" + +#: ../../c-api/bytes.rst:336 +msgid "" +"Similar to :c:func:`PyBytesWriter_Finish`, but resize the writer using *buf* " +"pointer before creating the :class:`bytes` object." +msgstr "" + +#: ../../c-api/bytes.rst:339 +msgid "" +"Set an exception and return ``NULL`` if *buf* pointer is outside the " +"internal buffer bounds." +msgstr "" + +#: ../../c-api/bytes.rst:342 ../../c-api/bytes.rst:447 +msgid "Function pseudo-code::" +msgstr "" + +#: ../../c-api/bytes.rst:344 +msgid "" +"Py_ssize_t size = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" +"return PyBytesWriter_FinishWithSize(writer, size);" +msgstr "" + +#: ../../c-api/bytes.rst:349 +msgid "" +"Discard a :c:type:`PyBytesWriter` created by :c:func:`PyBytesWriter_Create`." +msgstr "" + +#: ../../c-api/bytes.rst:351 +msgid "Do nothing if *writer* is ``NULL``." +msgstr "" + +#: ../../c-api/bytes.rst:353 +msgid "" +"The writer instance is invalid after the call. No API can be called on the " +"writer after :c:func:`PyBytesWriter_Discard`." +msgstr "" + +#: ../../c-api/bytes.rst:357 +msgid "High-level API" +msgstr "" + +#: ../../c-api/bytes.rst:361 +msgid "" +"Grow the *writer* internal buffer by *size* bytes, write *size* bytes of " +"*bytes* at the *writer* end, and add *size* to the *writer* size." +msgstr "" + +#: ../../c-api/bytes.rst:365 +msgid "" +"If *size* is equal to ``-1``, call ``strlen(bytes)`` to get the string " +"length." +msgstr "" + +#: ../../c-api/bytes.rst:368 ../../c-api/bytes.rst:377 +#: ../../c-api/bytes.rst:416 ../../c-api/bytes.rst:429 +msgid "On success, return ``0``. On error, set an exception and return ``-1``." +msgstr "" + +#: ../../c-api/bytes.rst:373 +msgid "" +"Similar to :c:func:`PyBytes_FromFormat`, but write the output directly at " +"the writer end. Grow the writer internal buffer on demand. Then add the " +"written size to the writer size." +msgstr "" + +#: ../../c-api/bytes.rst:382 +msgid "Getters" +msgstr "" + +#: ../../c-api/bytes.rst:386 +msgid "Get the writer size." +msgstr "" + +#: ../../c-api/bytes.rst:388 +msgid "" +"The function does not invalidate pointers returned by :c:func:" +"`PyBytesWriter_GetData`." +msgstr "" + +#: ../../c-api/bytes.rst:391 ../../c-api/bytes.rst:401 +msgid "The function cannot fail." +msgstr "" + +#: ../../c-api/bytes.rst:395 +msgid "Get the writer data: start of the internal buffer." +msgstr "" + +#: ../../c-api/bytes.rst:397 +msgid "" +"The pointer remains valid until a :c:type:`PyBytesWriter` function other " +"than :c:func:`PyBytesWriter_GetData` or :c:func:`PyBytesWriter_GetSize` is " +"called on *writer*." +msgstr "" + +#: ../../c-api/bytes.rst:405 +msgid "Low-level API" +msgstr "" + +#: ../../c-api/bytes.rst:409 +msgid "" +"Resize the writer to *size* bytes. It can be used to enlarge or to shrink " +"the writer. This function typically overallocates to achieve amortized " +"performance when resizing multiple times." +msgstr "" + +#: ../../c-api/bytes.rst:414 ../../c-api/bytes.rst:427 +msgid "Newly allocated bytes are left uninitialized." +msgstr "" + +#: ../../c-api/bytes.rst:423 +msgid "" +"Resize the writer by adding *grow* bytes to the current writer size. This " +"function typically overallocates to achieve amortized performance when " +"resizing multiple times." +msgstr "" + +#: ../../c-api/bytes.rst:432 +msgid "*size* can be negative to shrink the writer." +msgstr "" + +#: ../../c-api/bytes.rst:436 +msgid "" +"Similar to :c:func:`PyBytesWriter_Grow`, but update also the *buf* pointer." +msgstr "" + +#: ../../c-api/bytes.rst:439 +msgid "" +"The *buf* pointer is moved if the internal buffer is moved in memory. The " +"*buf* relative position within the internal buffer is left unchanged." +msgstr "" + +#: ../../c-api/bytes.rst:445 +msgid "*buf* must not be ``NULL``." +msgstr "" + +#: ../../c-api/bytes.rst:449 +msgid "" +"Py_ssize_t pos = (char*)buf - (char*)PyBytesWriter_GetData(writer);\n" +"if (PyBytesWriter_Grow(writer, size) < 0) {\n" +" return NULL;\n" +"}\n" +"return (char*)PyBytesWriter_GetData(writer) + pos;" +msgstr "" + +#: ../../c-api/bytes.rst:11 msgid "object" msgstr "" +#: ../../c-api/bytes.rst:11 msgid "bytes" msgstr "" diff --git a/c-api/bytes.po~ b/c-api/bytes.po~ new file mode 100644 index 00000000..d139c88f --- /dev/null +++ b/c-api/bytes.po~ @@ -0,0 +1,290 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Bytes Objects" +msgstr "" + +msgid "" +"These functions raise :exc:`TypeError` when expecting a bytes parameter and " +"called with a non-bytes parameter." +msgstr "" + +msgid "This subtype of :c:type:`PyObject` represents a Python bytes object." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python bytes type; it " +"is the same object as :class:`bytes` in the Python layer." +msgstr "" + +msgid "" +"Return true if the object *o* is a bytes object or an instance of a subtype " +"of the bytes type. This function always succeeds." +msgstr "" + +msgid "" +"Return true if the object *o* is a bytes object, but not an instance of a " +"subtype of the bytes type. This function always succeeds." +msgstr "" + +msgid "" +"Return a new bytes object with a copy of the string *v* as value on success, " +"and ``NULL`` on failure. The parameter *v* must not be ``NULL``; it will " +"not be checked." +msgstr "" + +msgid "" +"Return a new bytes object with a copy of the string *v* as value and length " +"*len* on success, and ``NULL`` on failure. If *v* is ``NULL``, the contents " +"of the bytes object are uninitialized." +msgstr "" + +msgid "" +"Take a C :c:func:`printf`\\ -style *format* string and a variable number of " +"arguments, calculate the size of the resulting Python bytes object and " +"return a bytes object with the values formatted into it. The variable " +"arguments must be C types and must correspond exactly to the format " +"characters in the *format* string. The following format characters are " +"allowed:" +msgstr "" + +msgid "Format Characters" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Comment" +msgstr "" + +msgid "``%%``" +msgstr "" + +msgid "*n/a*" +msgstr "" + +msgid "The literal % character." +msgstr "" + +msgid "``%c``" +msgstr "" + +msgid "int" +msgstr "" + +msgid "A single byte, represented as a C int." +msgstr "" + +msgid "``%d``" +msgstr "" + +msgid "Equivalent to ``printf(\"%d\")``. [1]_" +msgstr "" + +msgid "``%u``" +msgstr "" + +msgid "unsigned int" +msgstr "" + +msgid "Equivalent to ``printf(\"%u\")``. [1]_" +msgstr "" + +msgid "``%ld``" +msgstr "" + +msgid "long" +msgstr "" + +msgid "Equivalent to ``printf(\"%ld\")``. [1]_" +msgstr "" + +msgid "``%lu``" +msgstr "" + +msgid "unsigned long" +msgstr "" + +msgid "Equivalent to ``printf(\"%lu\")``. [1]_" +msgstr "" + +msgid "``%zd``" +msgstr "" + +msgid ":c:type:`\\ Py_ssize_t`" +msgstr "" + +msgid "Equivalent to ``printf(\"%zd\")``. [1]_" +msgstr "" + +msgid "``%zu``" +msgstr "" + +msgid "size_t" +msgstr "" + +msgid "Equivalent to ``printf(\"%zu\")``. [1]_" +msgstr "" + +msgid "``%i``" +msgstr "" + +msgid "Equivalent to ``printf(\"%i\")``. [1]_" +msgstr "" + +msgid "``%x``" +msgstr "" + +msgid "Equivalent to ``printf(\"%x\")``. [1]_" +msgstr "" + +msgid "``%s``" +msgstr "" + +msgid "const char\\*" +msgstr "" + +msgid "A null-terminated C character array." +msgstr "" + +msgid "``%p``" +msgstr "" + +msgid "const void\\*" +msgstr "" + +msgid "" +"The hex representation of a C pointer. Mostly equivalent to " +"``printf(\"%p\")`` except that it is guaranteed to start with the literal " +"``0x`` regardless of what the platform's ``printf`` yields." +msgstr "" + +msgid "" +"An unrecognized format character causes all the rest of the format string to " +"be copied as-is to the result object, and any extra arguments discarded." +msgstr "" + +msgid "" +"For integer specifiers (d, u, ld, lu, zd, zu, i, x): the 0-conversion flag " +"has effect even when a precision is given." +msgstr "" + +msgid "" +"Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two " +"arguments." +msgstr "" + +msgid "" +"Return the bytes representation of object *o* that implements the buffer " +"protocol." +msgstr "" + +msgid "Return the length of the bytes in bytes object *o*." +msgstr "" + +msgid "Similar to :c:func:`PyBytes_Size`, but without error checking." +msgstr "" + +msgid "" +"Return a pointer to the contents of *o*. The pointer refers to the internal " +"buffer of *o*, which consists of ``len(o) + 1`` bytes. The last byte in the " +"buffer is always null, regardless of whether there are any other null " +"bytes. The data must not be modified in any way, unless the object was just " +"created using ``PyBytes_FromStringAndSize(NULL, size)``. It must not be " +"deallocated. If *o* is not a bytes object at all, :c:func:" +"`PyBytes_AsString` returns ``NULL`` and raises :exc:`TypeError`." +msgstr "" + +msgid "Similar to :c:func:`PyBytes_AsString`, but without error checking." +msgstr "" + +msgid "" +"Return the null-terminated contents of the object *obj* through the output " +"variables *buffer* and *length*. Returns ``0`` on success." +msgstr "" + +msgid "" +"If *length* is ``NULL``, the bytes object may not contain embedded null " +"bytes; if it does, the function returns ``-1`` and a :exc:`ValueError` is " +"raised." +msgstr "" + +msgid "" +"The buffer refers to an internal buffer of *obj*, which includes an " +"additional null byte at the end (not counted in *length*). The data must " +"not be modified in any way, unless the object was just created using " +"``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If " +"*obj* is not a bytes object at all, :c:func:`PyBytes_AsStringAndSize` " +"returns ``-1`` and raises :exc:`TypeError`." +msgstr "" + +msgid "" +"Previously, :exc:`TypeError` was raised when embedded null bytes were " +"encountered in the bytes object." +msgstr "" + +msgid "" +"Create a new bytes object in *\\*bytes* containing the contents of *newpart* " +"appended to *bytes*; the caller will own the new reference. The reference " +"to the old value of *bytes* will be stolen. If the new object cannot be " +"created, the old reference to *bytes* will still be discarded and the value " +"of *\\*bytes* will be set to ``NULL``; the appropriate exception will be set." +msgstr "" + +msgid "" +"Create a new bytes object in *\\*bytes* containing the contents of *newpart* " +"appended to *bytes*. This version releases the :term:`strong reference` to " +"*newpart* (i.e. decrements its reference count)." +msgstr "" + +msgid "Similar to ``sep.join(iterable)`` in Python." +msgstr "" + +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 "" + +msgid "" +"*iterable* must be an iterable object yielding objects that implement the :" +"ref:`buffer protocol `." +msgstr "" + +msgid "" +"On success, return a new :class:`bytes` object. On error, set an exception " +"and return ``NULL``." +msgstr "" + +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 " +"one, only more efficiently. Pass the address of an existing bytes object as " +"an lvalue (it may be written into), and the new size desired. On success, " +"*\\*bytes* holds the resized bytes object and ``0`` is returned; the address " +"in *\\*bytes* may differ from its input value. If the reallocation fails, " +"the original bytes object at *\\*bytes* is deallocated, *\\*bytes* is set to " +"``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned." +msgstr "" + +msgid "object" +msgstr "" + +msgid "bytes" +msgstr "" diff --git a/c-api/call.po b/c-api/call.po index 3babca12..59ec5938 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -11,35 +11,41 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/call.rst:6 msgid "Call Protocol" msgstr "" +#: ../../c-api/call.rst:8 msgid "" "CPython supports two different calling protocols: *tp_call* and vectorcall." msgstr "" +#: ../../c-api/call.rst:12 msgid "The *tp_call* Protocol" msgstr "" +#: ../../c-api/call.rst:14 msgid "" "Instances of classes that set :c:member:`~PyTypeObject.tp_call` are " "callable. The signature of the slot is::" msgstr "" +#: ../../c-api/call.rst:17 msgid "" "PyObject *tp_call(PyObject *callable, PyObject *args, PyObject *kwargs);" msgstr "" +#: ../../c-api/call.rst:19 msgid "" "A call is made using a tuple for the positional arguments and a dict for the " "keyword arguments, similarly to ``callable(*args, **kwargs)`` in Python " @@ -47,24 +53,29 @@ msgid "" "but *kwargs* may be *NULL* if there are no keyword arguments." msgstr "" +#: ../../c-api/call.rst:25 msgid "" "This convention is not only used by *tp_call*: :c:member:`~PyTypeObject." "tp_new` and :c:member:`~PyTypeObject.tp_init` also pass arguments this way." msgstr "" +#: ../../c-api/call.rst:29 msgid "" "To call an object, use :c:func:`PyObject_Call` or another :ref:`call API " "`." msgstr "" +#: ../../c-api/call.rst:36 msgid "The Vectorcall Protocol" msgstr "" +#: ../../c-api/call.rst:40 msgid "" "The vectorcall protocol was introduced in :pep:`590` as an additional " "protocol for making calls more efficient." msgstr "" +#: ../../c-api/call.rst:43 msgid "" "As rule of thumb, CPython will prefer the vectorcall for internal calls if " "the callable supports it. However, this is not a hard rule. Additionally, " @@ -76,11 +87,13 @@ msgid "" "`PyVectorcall_Call`. This bears repeating:" msgstr "" +#: ../../c-api/call.rst:57 msgid "" "A class supporting vectorcall **must** also implement :c:member:" "`~PyTypeObject.tp_call` with the same semantics." msgstr "" +#: ../../c-api/call.rst:62 msgid "" "The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " "when the class's :py:meth:`~object.__call__` method is reassigned. (This " @@ -90,6 +103,7 @@ msgid "" "` or static types." msgstr "" +#: ../../c-api/call.rst:69 msgid "" "A class should not implement vectorcall if that would be slower than " "*tp_call*. For example, if the callee needs to convert the arguments to an " @@ -97,6 +111,7 @@ msgid "" "vectorcall." msgstr "" +#: ../../c-api/call.rst:74 msgid "" "Classes can implement the vectorcall protocol by enabling the :c:macro:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting :c:member:`~PyTypeObject." @@ -105,35 +120,43 @@ msgid "" "signature:" msgstr "" +#: ../../c-api/call.rst:82 msgid "*callable* is the object being called." msgstr "" +#: ../../c-api/call.rst:83 msgid "" "*args* is a C array consisting of the positional arguments followed by the" msgstr "" +#: ../../c-api/call.rst:84 msgid "" "values of the keyword arguments. This can be *NULL* if there are no " "arguments." msgstr "" +#: ../../c-api/call.rst:86 msgid "*nargsf* is the number of positional arguments plus possibly the" msgstr "" +#: ../../c-api/call.rst:87 msgid "" ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of " "positional arguments from *nargsf*, use :c:func:`PyVectorcall_NARGS`." msgstr "" +#: ../../c-api/call.rst:90 msgid "*kwnames* is a tuple containing the names of the keyword arguments;" msgstr "" +#: ../../c-api/call.rst:91 msgid "" "in other words, the keys of the kwargs dict. These names must be strings " "(instances of ``str`` or a subclass) and they must be unique. If there are " "no keyword arguments, then *kwnames* can instead be *NULL*." msgstr "" +#: ../../c-api/call.rst:98 msgid "" "If this flag is set in a vectorcall *nargsf* argument, the callee is allowed " "to temporarily change ``args[-1]``. In other words, *args* points to " @@ -141,11 +164,13 @@ msgid "" "value of ``args[-1]`` before returning." msgstr "" +#: ../../c-api/call.rst:103 msgid "" "For :c:func:`PyObject_VectorcallMethod`, this flag means instead that " "``args[0]`` may be changed." msgstr "" +#: ../../c-api/call.rst:106 msgid "" "Whenever they can do so cheaply (without additional allocation), callers are " "encouraged to use :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will " @@ -153,43 +178,52 @@ msgid "" "include a prepended *self* argument) very efficiently." msgstr "" +#: ../../c-api/call.rst:113 msgid "" "To call an object that implements vectorcall, use a :ref:`call API ` function as with any other callable. :c:func:`PyObject_Vectorcall` " "will usually be most efficient." msgstr "" +#: ../../c-api/call.rst:119 msgid "Recursion Control" msgstr "" +#: ../../c-api/call.rst:121 msgid "" "When using *tp_call*, callees do not need to worry about :ref:`recursion " "`: CPython uses :c:func:`Py_EnterRecursiveCall` and :c:func:" "`Py_LeaveRecursiveCall` for calls made using *tp_call*." msgstr "" +#: ../../c-api/call.rst:126 msgid "" "For efficiency, this is not the case for calls done using vectorcall: the " "callee should use *Py_EnterRecursiveCall* and *Py_LeaveRecursiveCall* if " "needed." msgstr "" +#: ../../c-api/call.rst:132 msgid "Vectorcall Support API" msgstr "" +#: ../../c-api/call.rst:136 msgid "" "Given a vectorcall *nargsf* argument, return the actual number of arguments. " "Currently equivalent to::" msgstr "" +#: ../../c-api/call.rst:140 msgid "(Py_ssize_t)(nargsf & ~PY_VECTORCALL_ARGUMENTS_OFFSET)" msgstr "" +#: ../../c-api/call.rst:142 msgid "" "However, the function ``PyVectorcall_NARGS`` should be used to allow for " "future extensions." msgstr "" +#: ../../c-api/call.rst:149 msgid "" "If *op* does not support the vectorcall protocol (either because the type " "does not or because the specific instance does not), return *NULL*. " @@ -197,16 +231,19 @@ msgid "" "function never raises an exception." msgstr "" +#: ../../c-api/call.rst:154 msgid "" "This is mostly useful to check whether or not *op* supports vectorcall, " "which can be done by checking ``PyVectorcall_Function(op) != NULL``." msgstr "" +#: ../../c-api/call.rst:161 msgid "" "Call *callable*'s :c:type:`vectorcallfunc` with positional and keyword " "arguments given in a tuple and dict, respectively." msgstr "" +#: ../../c-api/call.rst:164 msgid "" "This is a specialized function, intended to be put in the :c:member:" "`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. " @@ -214,9 +251,11 @@ msgid "" "not fall back to ``tp_call``." msgstr "" +#: ../../c-api/call.rst:175 msgid "Object Calling API" msgstr "" +#: ../../c-api/call.rst:177 msgid "" "Various functions are available for calling a Python object. Each converts " "its arguments to a convention supported by the called object – either " @@ -224,136 +263,182 @@ msgid "" "pick one that best fits the format of data you have available." msgstr "" +#: ../../c-api/call.rst:183 msgid "" "The following table summarizes the available functions; please see " "individual documentation for details." msgstr "" +#: ../../c-api/call.rst:187 msgid "Function" msgstr "" +#: ../../c-api/call.rst:187 msgid "callable" msgstr "" +#: ../../c-api/call.rst:187 msgid "args" msgstr "" +#: ../../c-api/call.rst:187 msgid "kwargs" msgstr "" +#: ../../c-api/call.rst:189 msgid ":c:func:`PyObject_Call`" msgstr "" +#: ../../c-api/call.rst:189 ../../c-api/call.rst:191 ../../c-api/call.rst:193 +#: ../../c-api/call.rst:195 ../../c-api/call.rst:197 ../../c-api/call.rst:201 +#: ../../c-api/call.rst:209 ../../c-api/call.rst:211 msgid "``PyObject *``" msgstr "" +#: ../../c-api/call.rst:189 msgid "tuple" msgstr "" +#: ../../c-api/call.rst:189 ../../c-api/call.rst:211 msgid "dict/``NULL``" msgstr "" +#: ../../c-api/call.rst:191 msgid ":c:func:`PyObject_CallNoArgs`" msgstr "" +#: ../../c-api/call.rst:191 ../../c-api/call.rst:193 ../../c-api/call.rst:195 +#: ../../c-api/call.rst:197 ../../c-api/call.rst:199 ../../c-api/call.rst:201 +#: ../../c-api/call.rst:203 ../../c-api/call.rst:205 ../../c-api/call.rst:207 msgid "---" msgstr "" +#: ../../c-api/call.rst:193 msgid ":c:func:`PyObject_CallOneArg`" msgstr "" +#: ../../c-api/call.rst:193 ../../c-api/call.rst:207 msgid "1 object" msgstr "" +#: ../../c-api/call.rst:195 msgid ":c:func:`PyObject_CallObject`" msgstr "" +#: ../../c-api/call.rst:195 msgid "tuple/``NULL``" msgstr "" +#: ../../c-api/call.rst:197 msgid ":c:func:`PyObject_CallFunction`" msgstr "" +#: ../../c-api/call.rst:197 ../../c-api/call.rst:199 msgid "format" msgstr "" +#: ../../c-api/call.rst:199 msgid ":c:func:`PyObject_CallMethod`" msgstr "" +#: ../../c-api/call.rst:199 msgid "obj + ``char*``" msgstr "" +#: ../../c-api/call.rst:201 msgid ":c:func:`PyObject_CallFunctionObjArgs`" msgstr "" +#: ../../c-api/call.rst:201 ../../c-api/call.rst:203 msgid "variadic" msgstr "" +#: ../../c-api/call.rst:203 msgid ":c:func:`PyObject_CallMethodObjArgs`" msgstr "" +#: ../../c-api/call.rst:203 ../../c-api/call.rst:205 ../../c-api/call.rst:207 msgid "obj + name" msgstr "" +#: ../../c-api/call.rst:205 msgid ":c:func:`PyObject_CallMethodNoArgs`" msgstr "" +#: ../../c-api/call.rst:207 msgid ":c:func:`PyObject_CallMethodOneArg`" msgstr "" +#: ../../c-api/call.rst:209 msgid ":c:func:`PyObject_Vectorcall`" msgstr ":c:func:`PyObject_Vectorcall`" +#: ../../c-api/call.rst:209 ../../c-api/call.rst:211 ../../c-api/call.rst:213 msgid "vectorcall" msgstr "" +#: ../../c-api/call.rst:211 msgid ":c:func:`PyObject_VectorcallDict`" msgstr "" +#: ../../c-api/call.rst:213 msgid ":c:func:`PyObject_VectorcallMethod`" msgstr ":c:func:`PyObject_VectorcallMethod`" +#: ../../c-api/call.rst:213 msgid "arg + name" msgstr "" +#: ../../c-api/call.rst:219 msgid "" "Call a callable Python object *callable*, with arguments given by the tuple " "*args*, and named arguments given by the dictionary *kwargs*." msgstr "" +#: ../../c-api/call.rst:222 msgid "" "*args* must not be *NULL*; use an empty tuple if no arguments are needed. If " "no named arguments are needed, *kwargs* can be *NULL*." msgstr "" +#: ../../c-api/call.rst:225 ../../c-api/call.rst:237 ../../c-api/call.rst:248 +#: ../../c-api/call.rst:259 ../../c-api/call.rst:271 ../../c-api/call.rst:291 +#: ../../c-api/call.rst:310 ../../c-api/call.rst:324 ../../c-api/call.rst:333 +#: ../../c-api/call.rst:345 ../../c-api/call.rst:360 ../../c-api/call.rst:399 msgid "" "Return the result of the call on success, or raise an exception and return " "*NULL* on failure." msgstr "" +#: ../../c-api/call.rst:228 msgid "" "This is the equivalent of the Python expression: ``callable(*args, " "**kwargs)``." msgstr "" +#: ../../c-api/call.rst:234 msgid "" "Call a callable Python object *callable* without any arguments. It is the " "most efficient way to call a callable Python object without any argument." msgstr "" +#: ../../c-api/call.rst:245 msgid "" "Call a callable Python object *callable* with exactly 1 positional argument " "*arg* and no keyword arguments." msgstr "" +#: ../../c-api/call.rst:256 msgid "" "Call a callable Python object *callable*, with arguments given by the tuple " "*args*. If no arguments are needed, then *args* can be *NULL*." msgstr "" +#: ../../c-api/call.rst:262 ../../c-api/call.rst:274 msgid "This is the equivalent of the Python expression: ``callable(*args)``." msgstr "" +#: ../../c-api/call.rst:267 msgid "" "Call a callable Python object *callable*, with a variable number of C " "arguments. The C arguments are described using a :c:func:`Py_BuildValue` " @@ -361,47 +446,57 @@ msgid "" "are provided." msgstr "" +#: ../../c-api/call.rst:276 msgid "" "Note that if you only pass :c:expr:`PyObject *` args, :c:func:" "`PyObject_CallFunctionObjArgs` is a faster alternative." msgstr "" +#: ../../c-api/call.rst:279 msgid "The type of *format* was changed from ``char *``." msgstr "" +#: ../../c-api/call.rst:285 msgid "" "Call the method named *name* of object *obj* with a variable number of C " "arguments. The C arguments are described by a :c:func:`Py_BuildValue` " "format string that should produce a tuple." msgstr "" +#: ../../c-api/call.rst:289 msgid "The format can be *NULL*, indicating that no arguments are provided." msgstr "" +#: ../../c-api/call.rst:294 msgid "" "This is the equivalent of the Python expression: ``obj.name(arg1, " "arg2, ...)``." msgstr "" +#: ../../c-api/call.rst:297 msgid "" "Note that if you only pass :c:expr:`PyObject *` args, :c:func:" "`PyObject_CallMethodObjArgs` is a faster alternative." msgstr "" +#: ../../c-api/call.rst:300 msgid "The types of *name* and *format* were changed from ``char *``." msgstr "" +#: ../../c-api/call.rst:306 msgid "" "Call a callable Python object *callable*, with a variable number of :c:expr:" "`PyObject *` arguments. The arguments are provided as a variable number of " "parameters followed by *NULL*." msgstr "" +#: ../../c-api/call.rst:313 msgid "" "This is the equivalent of the Python expression: ``callable(arg1, " "arg2, ...)``." msgstr "" +#: ../../c-api/call.rst:319 msgid "" "Call a method of the Python object *obj*, where the name of the method is " "given as a Python string object in *name*. It is called with a variable " @@ -409,29 +504,45 @@ msgid "" "variable number of parameters followed by *NULL*." msgstr "" +#: ../../c-api/call.rst:330 msgid "" "Call a method of the Python object *obj* without arguments, where the name " "of the method is given as a Python string object in *name*." msgstr "" +#: ../../c-api/call.rst:341 msgid "" "Call a method of the Python object *obj* with a single positional argument " "*arg*, where the name of the method is given as a Python string object in " "*name*." msgstr "" +#: ../../c-api/call.rst:355 msgid "" "Call a callable Python object *callable*. The arguments are the same as for :" "c:type:`vectorcallfunc`. If *callable* supports vectorcall_, this directly " "calls the vectorcall function stored in *callable*." msgstr "" +#: ../../c-api/call.rst:363 +#, fuzzy +msgid "as ``_PyObject_Vectorcall``" +msgstr ":c:func:`PyObject_Vectorcall`" + +#: ../../c-api/call.rst:367 +msgid "" +"Renamed to the current name, without the leading underscore. The old " +"provisional name is :term:`soft deprecated`." +msgstr "" + +#: ../../c-api/call.rst:372 msgid "" "Call *callable* with positional arguments passed exactly as in the " "vectorcall_ protocol, but with keyword arguments passed as a dictionary " "*kwdict*. The *args* array contains only the positional arguments." msgstr "" +#: ../../c-api/call.rst:376 msgid "" "Regardless of which protocol is used internally, a conversion of arguments " "needs to be done. Therefore, this function should only be used if the caller " @@ -439,6 +550,7 @@ msgid "" "tuple for the positional arguments." msgstr "" +#: ../../c-api/call.rst:386 msgid "" "Call a method using the vectorcall calling convention. The name of the " "method is given as a Python string *name*. The object whose method is called " @@ -450,14 +562,17 @@ msgid "" "`PyObject_Vectorcall`." msgstr "" +#: ../../c-api/call.rst:395 msgid "" "If the object has the :c:macro:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this " "will call the unbound method object with the full *args* vector as arguments." msgstr "" +#: ../../c-api/call.rst:406 msgid "Call Support API" msgstr "" +#: ../../c-api/call.rst:410 msgid "" "Determine if the object *o* is callable. Return ``1`` if the object is " "callable and ``0`` otherwise. This function always succeeds." diff --git a/c-api/call.po~ b/c-api/call.po~ new file mode 100644 index 00000000..3babca12 --- /dev/null +++ b/c-api/call.po~ @@ -0,0 +1,464 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Call Protocol" +msgstr "" + +msgid "" +"CPython supports two different calling protocols: *tp_call* and vectorcall." +msgstr "" + +msgid "The *tp_call* Protocol" +msgstr "" + +msgid "" +"Instances of classes that set :c:member:`~PyTypeObject.tp_call` are " +"callable. The signature of the slot is::" +msgstr "" + +msgid "" +"PyObject *tp_call(PyObject *callable, PyObject *args, PyObject *kwargs);" +msgstr "" + +msgid "" +"A call is made using a tuple for the positional arguments and a dict for the " +"keyword arguments, similarly to ``callable(*args, **kwargs)`` in Python " +"code. *args* must be non-NULL (use an empty tuple if there are no arguments) " +"but *kwargs* may be *NULL* if there are no keyword arguments." +msgstr "" + +msgid "" +"This convention is not only used by *tp_call*: :c:member:`~PyTypeObject." +"tp_new` and :c:member:`~PyTypeObject.tp_init` also pass arguments this way." +msgstr "" + +msgid "" +"To call an object, use :c:func:`PyObject_Call` or another :ref:`call API " +"`." +msgstr "" + +msgid "The Vectorcall Protocol" +msgstr "" + +msgid "" +"The vectorcall protocol was introduced in :pep:`590` as an additional " +"protocol for making calls more efficient." +msgstr "" + +msgid "" +"As rule of thumb, CPython will prefer the vectorcall for internal calls if " +"the callable supports it. However, this is not a hard rule. Additionally, " +"some third-party extensions use *tp_call* directly (rather than using :c:" +"func:`PyObject_Call`). Therefore, a class supporting vectorcall must also " +"implement :c:member:`~PyTypeObject.tp_call`. Moreover, the callable must " +"behave the same regardless of which protocol is used. The recommended way to " +"achieve this is by setting :c:member:`~PyTypeObject.tp_call` to :c:func:" +"`PyVectorcall_Call`. This bears repeating:" +msgstr "" + +msgid "" +"A class supporting vectorcall **must** also implement :c:member:" +"`~PyTypeObject.tp_call` with the same semantics." +msgstr "" + +msgid "" +"The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class " +"when the class's :py:meth:`~object.__call__` method is reassigned. (This " +"internally sets :c:member:`~PyTypeObject.tp_call` only, and thus may make it " +"behave differently than the vectorcall function.) In earlier Python " +"versions, vectorcall should only be used with :c:macro:`immutable " +"` or static types." +msgstr "" + +msgid "" +"A class should not implement vectorcall if that would be slower than " +"*tp_call*. For example, if the callee needs to convert the arguments to an " +"args tuple and kwargs dict anyway, then there is no point in implementing " +"vectorcall." +msgstr "" + +msgid "" +"Classes can implement the vectorcall protocol by enabling the :c:macro:" +"`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting :c:member:`~PyTypeObject." +"tp_vectorcall_offset` to the offset inside the object structure where a " +"*vectorcallfunc* appears. This is a pointer to a function with the following " +"signature:" +msgstr "" + +msgid "*callable* is the object being called." +msgstr "" + +msgid "" +"*args* is a C array consisting of the positional arguments followed by the" +msgstr "" + +msgid "" +"values of the keyword arguments. This can be *NULL* if there are no " +"arguments." +msgstr "" + +msgid "*nargsf* is the number of positional arguments plus possibly the" +msgstr "" + +msgid "" +":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of " +"positional arguments from *nargsf*, use :c:func:`PyVectorcall_NARGS`." +msgstr "" + +msgid "*kwnames* is a tuple containing the names of the keyword arguments;" +msgstr "" + +msgid "" +"in other words, the keys of the kwargs dict. These names must be strings " +"(instances of ``str`` or a subclass) and they must be unique. If there are " +"no keyword arguments, then *kwnames* can instead be *NULL*." +msgstr "" + +msgid "" +"If this flag is set in a vectorcall *nargsf* argument, the callee is allowed " +"to temporarily change ``args[-1]``. In other words, *args* points to " +"argument 1 (not 0) in the allocated vector. The callee must restore the " +"value of ``args[-1]`` before returning." +msgstr "" + +msgid "" +"For :c:func:`PyObject_VectorcallMethod`, this flag means instead that " +"``args[0]`` may be changed." +msgstr "" + +msgid "" +"Whenever they can do so cheaply (without additional allocation), callers are " +"encouraged to use :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will " +"allow callables such as bound methods to make their onward calls (which " +"include a prepended *self* argument) very efficiently." +msgstr "" + +msgid "" +"To call an object that implements vectorcall, use a :ref:`call API ` function as with any other callable. :c:func:`PyObject_Vectorcall` " +"will usually be most efficient." +msgstr "" + +msgid "Recursion Control" +msgstr "" + +msgid "" +"When using *tp_call*, callees do not need to worry about :ref:`recursion " +"`: CPython uses :c:func:`Py_EnterRecursiveCall` and :c:func:" +"`Py_LeaveRecursiveCall` for calls made using *tp_call*." +msgstr "" + +msgid "" +"For efficiency, this is not the case for calls done using vectorcall: the " +"callee should use *Py_EnterRecursiveCall* and *Py_LeaveRecursiveCall* if " +"needed." +msgstr "" + +msgid "Vectorcall Support API" +msgstr "" + +msgid "" +"Given a vectorcall *nargsf* argument, return the actual number of arguments. " +"Currently equivalent to::" +msgstr "" + +msgid "(Py_ssize_t)(nargsf & ~PY_VECTORCALL_ARGUMENTS_OFFSET)" +msgstr "" + +msgid "" +"However, the function ``PyVectorcall_NARGS`` should be used to allow for " +"future extensions." +msgstr "" + +msgid "" +"If *op* does not support the vectorcall protocol (either because the type " +"does not or because the specific instance does not), return *NULL*. " +"Otherwise, return the vectorcall function pointer stored in *op*. This " +"function never raises an exception." +msgstr "" + +msgid "" +"This is mostly useful to check whether or not *op* supports vectorcall, " +"which can be done by checking ``PyVectorcall_Function(op) != NULL``." +msgstr "" + +msgid "" +"Call *callable*'s :c:type:`vectorcallfunc` with positional and keyword " +"arguments given in a tuple and dict, respectively." +msgstr "" + +msgid "" +"This is a specialized function, intended to be put in the :c:member:" +"`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. " +"It does not check the :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does " +"not fall back to ``tp_call``." +msgstr "" + +msgid "Object Calling API" +msgstr "" + +msgid "" +"Various functions are available for calling a Python object. Each converts " +"its arguments to a convention supported by the called object – either " +"*tp_call* or vectorcall. In order to do as little conversion as possible, " +"pick one that best fits the format of data you have available." +msgstr "" + +msgid "" +"The following table summarizes the available functions; please see " +"individual documentation for details." +msgstr "" + +msgid "Function" +msgstr "" + +msgid "callable" +msgstr "" + +msgid "args" +msgstr "" + +msgid "kwargs" +msgstr "" + +msgid ":c:func:`PyObject_Call`" +msgstr "" + +msgid "``PyObject *``" +msgstr "" + +msgid "tuple" +msgstr "" + +msgid "dict/``NULL``" +msgstr "" + +msgid ":c:func:`PyObject_CallNoArgs`" +msgstr "" + +msgid "---" +msgstr "" + +msgid ":c:func:`PyObject_CallOneArg`" +msgstr "" + +msgid "1 object" +msgstr "" + +msgid ":c:func:`PyObject_CallObject`" +msgstr "" + +msgid "tuple/``NULL``" +msgstr "" + +msgid ":c:func:`PyObject_CallFunction`" +msgstr "" + +msgid "format" +msgstr "" + +msgid ":c:func:`PyObject_CallMethod`" +msgstr "" + +msgid "obj + ``char*``" +msgstr "" + +msgid ":c:func:`PyObject_CallFunctionObjArgs`" +msgstr "" + +msgid "variadic" +msgstr "" + +msgid ":c:func:`PyObject_CallMethodObjArgs`" +msgstr "" + +msgid "obj + name" +msgstr "" + +msgid ":c:func:`PyObject_CallMethodNoArgs`" +msgstr "" + +msgid ":c:func:`PyObject_CallMethodOneArg`" +msgstr "" + +msgid ":c:func:`PyObject_Vectorcall`" +msgstr ":c:func:`PyObject_Vectorcall`" + +msgid "vectorcall" +msgstr "" + +msgid ":c:func:`PyObject_VectorcallDict`" +msgstr "" + +msgid ":c:func:`PyObject_VectorcallMethod`" +msgstr ":c:func:`PyObject_VectorcallMethod`" + +msgid "arg + name" +msgstr "" + +msgid "" +"Call a callable Python object *callable*, with arguments given by the tuple " +"*args*, and named arguments given by the dictionary *kwargs*." +msgstr "" + +msgid "" +"*args* must not be *NULL*; use an empty tuple if no arguments are needed. If " +"no named arguments are needed, *kwargs* can be *NULL*." +msgstr "" + +msgid "" +"Return the result of the call on success, or raise an exception and return " +"*NULL* on failure." +msgstr "" + +msgid "" +"This is the equivalent of the Python expression: ``callable(*args, " +"**kwargs)``." +msgstr "" + +msgid "" +"Call a callable Python object *callable* without any arguments. It is the " +"most efficient way to call a callable Python object without any argument." +msgstr "" + +msgid "" +"Call a callable Python object *callable* with exactly 1 positional argument " +"*arg* and no keyword arguments." +msgstr "" + +msgid "" +"Call a callable Python object *callable*, with arguments given by the tuple " +"*args*. If no arguments are needed, then *args* can be *NULL*." +msgstr "" + +msgid "This is the equivalent of the Python expression: ``callable(*args)``." +msgstr "" + +msgid "" +"Call a callable Python object *callable*, with a variable number of C " +"arguments. The C arguments are described using a :c:func:`Py_BuildValue` " +"style format string. The format can be *NULL*, indicating that no arguments " +"are provided." +msgstr "" + +msgid "" +"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" +"`PyObject_CallFunctionObjArgs` is a faster alternative." +msgstr "" + +msgid "The type of *format* was changed from ``char *``." +msgstr "" + +msgid "" +"Call the method named *name* of object *obj* with a variable number of C " +"arguments. The C arguments are described by a :c:func:`Py_BuildValue` " +"format string that should produce a tuple." +msgstr "" + +msgid "The format can be *NULL*, indicating that no arguments are provided." +msgstr "" + +msgid "" +"This is the equivalent of the Python expression: ``obj.name(arg1, " +"arg2, ...)``." +msgstr "" + +msgid "" +"Note that if you only pass :c:expr:`PyObject *` args, :c:func:" +"`PyObject_CallMethodObjArgs` is a faster alternative." +msgstr "" + +msgid "The types of *name* and *format* were changed from ``char *``." +msgstr "" + +msgid "" +"Call a callable Python object *callable*, with a variable number of :c:expr:" +"`PyObject *` arguments. The arguments are provided as a variable number of " +"parameters followed by *NULL*." +msgstr "" + +msgid "" +"This is the equivalent of the Python expression: ``callable(arg1, " +"arg2, ...)``." +msgstr "" + +msgid "" +"Call a method of the Python object *obj*, where the name of the method is " +"given as a Python string object in *name*. It is called with a variable " +"number of :c:expr:`PyObject *` arguments. The arguments are provided as a " +"variable number of parameters followed by *NULL*." +msgstr "" + +msgid "" +"Call a method of the Python object *obj* without arguments, where the name " +"of the method is given as a Python string object in *name*." +msgstr "" + +msgid "" +"Call a method of the Python object *obj* with a single positional argument " +"*arg*, where the name of the method is given as a Python string object in " +"*name*." +msgstr "" + +msgid "" +"Call a callable Python object *callable*. The arguments are the same as for :" +"c:type:`vectorcallfunc`. If *callable* supports vectorcall_, this directly " +"calls the vectorcall function stored in *callable*." +msgstr "" + +msgid "" +"Call *callable* with positional arguments passed exactly as in the " +"vectorcall_ protocol, but with keyword arguments passed as a dictionary " +"*kwdict*. The *args* array contains only the positional arguments." +msgstr "" + +msgid "" +"Regardless of which protocol is used internally, a conversion of arguments " +"needs to be done. Therefore, this function should only be used if the caller " +"already has a dictionary ready to use for the keyword arguments, but not a " +"tuple for the positional arguments." +msgstr "" + +msgid "" +"Call a method using the vectorcall calling convention. The name of the " +"method is given as a Python string *name*. The object whose method is called " +"is *args[0]*, and the *args* array starting at *args[1]* represents the " +"arguments of the call. There must be at least one positional argument. " +"*nargsf* is the number of positional arguments including *args[0]*, plus :c:" +"macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` if the value of ``args[0]`` may " +"temporarily be changed. Keyword arguments can be passed just like in :c:func:" +"`PyObject_Vectorcall`." +msgstr "" + +msgid "" +"If the object has the :c:macro:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this " +"will call the unbound method object with the full *args* vector as arguments." +msgstr "" + +msgid "Call Support API" +msgstr "" + +msgid "" +"Determine if the object *o* is callable. Return ``1`` if the object is " +"callable and ``0`` otherwise. This function always succeeds." +msgstr "" diff --git a/c-api/capsule.po b/c-api/capsule.po index 5edce93a..c176f4ec 100644 --- a/c-api/capsule.po +++ b/c-api/capsule.po @@ -8,22 +8,25 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/capsule.rst:6 msgid "Capsules" msgstr "" +#: ../../c-api/capsule.rst:10 msgid "" "Refer to :ref:`using-capsules` for more information on using these objects." msgstr "" +#: ../../c-api/capsule.rst:17 msgid "" "This subtype of :c:type:`PyObject` represents an opaque value, useful for C " "extension modules which need to pass an opaque value (as a :c:expr:`void*` " @@ -33,52 +36,69 @@ msgid "" "loaded modules." msgstr "" +#: ../../c-api/capsule.rst:27 +msgid "" +"The type object corresponding to capsule objects. This is the same object " +"as :class:`types.CapsuleType` in the Python layer." +msgstr "" + +#: ../../c-api/capsule.rst:33 msgid "The type of a destructor callback for a capsule. Defined as::" msgstr "" +#: ../../c-api/capsule.rst:35 msgid "typedef void (*PyCapsule_Destructor)(PyObject *);" msgstr "" +#: ../../c-api/capsule.rst:37 msgid "" "See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor " "callbacks." msgstr "" +#: ../../c-api/capsule.rst:43 msgid "" "Return true if its argument is a :c:type:`PyCapsule`. This function always " "succeeds." msgstr "" +#: ../../c-api/capsule.rst:49 msgid "" "Create a :c:type:`PyCapsule` encapsulating the *pointer*. The *pointer* " "argument may not be ``NULL``." msgstr "" +#: ../../c-api/capsule.rst:52 msgid "On failure, set an exception and return ``NULL``." msgstr "" +#: ../../c-api/capsule.rst:54 msgid "" "The *name* string may either be ``NULL`` or a pointer to a valid C string. " "If non-``NULL``, this string must outlive the capsule. (Though it is " "permitted to free it inside the *destructor*.)" msgstr "" +#: ../../c-api/capsule.rst:58 msgid "" "If the *destructor* argument is not ``NULL``, it will be called with the " "capsule as its argument when it is destroyed." msgstr "" +#: ../../c-api/capsule.rst:61 msgid "" "If this capsule will be stored as an attribute of a module, the *name* " "should be specified as ``modulename.attributename``. This will enable other " "modules to import the capsule using :c:func:`PyCapsule_Import`." msgstr "" +#: ../../c-api/capsule.rst:68 msgid "" "Retrieve the *pointer* stored in the capsule. On failure, set an exception " "and return ``NULL``." msgstr "" +#: ../../c-api/capsule.rst:71 msgid "" "The *name* parameter must compare exactly to the name stored in the capsule. " "If the name stored in the capsule is ``NULL``, the *name* passed in must " @@ -86,39 +106,46 @@ msgid "" "capsule names." msgstr "" +#: ../../c-api/capsule.rst:79 msgid "" "Return the current destructor stored in the capsule. On failure, set an " "exception and return ``NULL``." msgstr "" +#: ../../c-api/capsule.rst:82 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." msgstr "" +#: ../../c-api/capsule.rst:89 msgid "" "Return the current context stored in the capsule. On failure, set an " "exception and return ``NULL``." msgstr "" +#: ../../c-api/capsule.rst:92 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." msgstr "" +#: ../../c-api/capsule.rst:99 msgid "" "Return the current name stored in the capsule. On failure, set an exception " "and return ``NULL``." msgstr "" +#: ../../c-api/capsule.rst:102 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." msgstr "" +#: ../../c-api/capsule.rst:109 msgid "" "Import a pointer to a C object from a capsule attribute in a module. The " "*name* parameter should specify the full name to the attribute, as in " @@ -126,16 +153,19 @@ msgid "" "string exactly." msgstr "" +#: ../../c-api/capsule.rst:114 msgid "" "This function splits *name* on the ``.`` character, and imports the first " "element. It then processes further elements using attribute lookups." msgstr "" +#: ../../c-api/capsule.rst:117 msgid "" "Return the capsule's internal *pointer* on success. On failure, set an " "exception and return ``NULL``." msgstr "" +#: ../../c-api/capsule.rst:122 msgid "" "If *name* points to an attribute of some submodule or subpackage, this " "submodule or subpackage must be previously imported using other means (for " @@ -143,9 +173,11 @@ msgid "" "to succeed." msgstr "" +#: ../../c-api/capsule.rst:127 msgid "*no_block* has no effect anymore." msgstr "" +#: ../../c-api/capsule.rst:133 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`` " @@ -154,40 +186,50 @@ msgid "" "compared.)" msgstr "" +#: ../../c-api/capsule.rst:139 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 " "guaranteed to succeed." msgstr "" +#: ../../c-api/capsule.rst:143 msgid "" "Return a nonzero value if the object is valid and matches the name passed " "in. Return ``0`` otherwise. This function will not fail." msgstr "" +#: ../../c-api/capsule.rst:149 msgid "Set the context pointer inside *capsule* to *context*." msgstr "" +#: ../../c-api/capsule.rst:151 ../../c-api/capsule.rst:158 +#: ../../c-api/capsule.rst:167 ../../c-api/capsule.rst:175 msgid "" "Return ``0`` on success. Return nonzero and set an exception on failure." msgstr "" +#: ../../c-api/capsule.rst:156 msgid "Set the destructor inside *capsule* to *destructor*." msgstr "" +#: ../../c-api/capsule.rst:163 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 " "``NULL``, no attempt is made to free it." msgstr "" +#: ../../c-api/capsule.rst:172 msgid "" "Set the void pointer inside *capsule* to *pointer*. The pointer may not be " "``NULL``." msgstr "" +#: ../../c-api/capsule.rst:8 msgid "object" msgstr "" +#: ../../c-api/capsule.rst:8 msgid "Capsule" msgstr "" diff --git a/c-api/capsule.po~ b/c-api/capsule.po~ new file mode 100644 index 00000000..5edce93a --- /dev/null +++ b/c-api/capsule.po~ @@ -0,0 +1,193 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Capsules" +msgstr "" + +msgid "" +"Refer to :ref:`using-capsules` for more information on using these objects." +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents an opaque value, useful for C " +"extension modules which need to pass an opaque value (as a :c:expr:`void*` " +"pointer) through Python code to other C code. It is often used to make a C " +"function pointer defined in one module available to other modules, so the " +"regular import mechanism can be used to access C APIs defined in dynamically " +"loaded modules." +msgstr "" + +msgid "The type of a destructor callback for a capsule. Defined as::" +msgstr "" + +msgid "typedef void (*PyCapsule_Destructor)(PyObject *);" +msgstr "" + +msgid "" +"See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor " +"callbacks." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyCapsule`. This function always " +"succeeds." +msgstr "" + +msgid "" +"Create a :c:type:`PyCapsule` encapsulating the *pointer*. The *pointer* " +"argument may not be ``NULL``." +msgstr "" + +msgid "On failure, set an exception and return ``NULL``." +msgstr "" + +msgid "" +"The *name* string may either be ``NULL`` or a pointer to a valid C string. " +"If non-``NULL``, this string must outlive the capsule. (Though it is " +"permitted to free it inside the *destructor*.)" +msgstr "" + +msgid "" +"If the *destructor* argument is not ``NULL``, it will be called with the " +"capsule as its argument when it is destroyed." +msgstr "" + +msgid "" +"If this capsule will be stored as an attribute of a module, the *name* " +"should be specified as ``modulename.attributename``. This will enable other " +"modules to import the capsule using :c:func:`PyCapsule_Import`." +msgstr "" + +msgid "" +"Retrieve the *pointer* stored in the capsule. On failure, set an exception " +"and return ``NULL``." +msgstr "" + +msgid "" +"The *name* parameter must compare exactly to the name stored in the capsule. " +"If the name stored in the capsule is ``NULL``, the *name* passed in must " +"also be ``NULL``. Python uses the C function :c:func:`!strcmp` to compare " +"capsule names." +msgstr "" + +msgid "" +"Return the current destructor stored in the capsule. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +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." +msgstr "" + +msgid "" +"Return the current context stored in the capsule. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +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." +msgstr "" + +msgid "" +"Return the current name stored in the capsule. On failure, set an exception " +"and return ``NULL``." +msgstr "" + +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." +msgstr "" + +msgid "" +"Import a pointer to a C object from a capsule attribute in a module. The " +"*name* parameter should specify the full name to the attribute, as in " +"``module.attribute``. The *name* stored in the capsule must match this " +"string exactly." +msgstr "" + +msgid "" +"This function splits *name* on the ``.`` character, and imports the first " +"element. It then processes further elements using attribute lookups." +msgstr "" + +msgid "" +"Return the capsule's internal *pointer* on success. On failure, set an " +"exception and return ``NULL``." +msgstr "" + +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 "" + +msgid "*no_block* has no effect anymore." +msgstr "" + +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`` " +"pointer stored in it, and its internal name matches the *name* parameter. " +"(See :c:func:`PyCapsule_GetPointer` for information on how capsule names are " +"compared.)" +msgstr "" + +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 " +"guaranteed to succeed." +msgstr "" + +msgid "" +"Return a nonzero value if the object is valid and matches the name passed " +"in. Return ``0`` otherwise. This function will not fail." +msgstr "" + +msgid "Set the context pointer inside *capsule* to *context*." +msgstr "" + +msgid "" +"Return ``0`` on success. Return nonzero and set an exception on failure." +msgstr "" + +msgid "Set the destructor inside *capsule* to *destructor*." +msgstr "" + +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 " +"``NULL``, no attempt is made to free it." +msgstr "" + +msgid "" +"Set the void pointer inside *capsule* to *pointer*. The pointer may not be " +"``NULL``." +msgstr "" + +msgid "object" +msgstr "" + +msgid "Capsule" +msgstr "" diff --git a/c-api/cell.po b/c-api/cell.po index 737e5b90..f560feec 100644 --- a/c-api/cell.po +++ b/c-api/cell.po @@ -8,22 +8,24 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/cell.rst:6 msgid "Cell Objects" msgstr "" +#: ../../c-api/cell.rst:8 msgid "" "\"Cell\" objects are used to implement variables referenced by multiple " "scopes. For each such variable, a cell object is created to store the value; " -"the local variables of each stack frame that references the value contains a " +"the local variables of each stack frame that references the value contain a " "reference to the cells from outer scopes which also use that variable. When " "the value is accessed, the value contained in the cell is used instead of " "the cell object itself. This de-referencing of the cell object requires " @@ -31,43 +33,52 @@ msgid "" "referenced when accessed. Cell objects are not likely to be useful elsewhere." msgstr "" +#: ../../c-api/cell.rst:20 msgid "The C structure used for cell objects." msgstr "" +#: ../../c-api/cell.rst:25 msgid "The type object corresponding to cell objects." msgstr "" +#: ../../c-api/cell.rst:30 msgid "" "Return true if *ob* is a cell object; *ob* must not be ``NULL``. This " "function always succeeds." msgstr "" +#: ../../c-api/cell.rst:36 msgid "" "Create and return a new cell object containing the value *ob*. The parameter " "may be ``NULL``." msgstr "" +#: ../../c-api/cell.rst:42 msgid "" "Return the contents of the cell *cell*, which can be ``NULL``. If *cell* is " "not a cell object, returns ``NULL`` with an exception set." msgstr "" +#: ../../c-api/cell.rst:48 msgid "" "Return the contents of the cell *cell*, but without checking that *cell* is " "non-``NULL`` and a cell object." msgstr "" +#: ../../c-api/cell.rst:54 msgid "" "Set the contents of the cell object *cell* to *value*. This releases the " "reference to any current content of the cell. *value* may be ``NULL``. " "*cell* must be non-``NULL``." msgstr "" +#: ../../c-api/cell.rst:58 msgid "" "On success, return ``0``. If *cell* is not a cell object, set an exception " "and return ``-1``." msgstr "" +#: ../../c-api/cell.rst:64 msgid "" "Sets the value of the cell object *cell* to *value*. No reference counts " "are adjusted, and no checks are made for safety; *cell* must be non-``NULL`` " diff --git a/c-api/cell.po~ b/c-api/cell.po~ new file mode 100644 index 00000000..737e5b90 --- /dev/null +++ b/c-api/cell.po~ @@ -0,0 +1,75 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Cell Objects" +msgstr "" + +msgid "" +"\"Cell\" objects are used to implement variables referenced by multiple " +"scopes. For each such variable, a cell object is created to store the value; " +"the local variables of each stack frame that references the value contains a " +"reference to the cells from outer scopes which also use that variable. When " +"the value is accessed, the value contained in the cell is used instead of " +"the cell object itself. This de-referencing of the cell object requires " +"support from the generated byte-code; these are not automatically de-" +"referenced when accessed. Cell objects are not likely to be useful elsewhere." +msgstr "" + +msgid "The C structure used for cell objects." +msgstr "" + +msgid "The type object corresponding to cell objects." +msgstr "" + +msgid "" +"Return true if *ob* is a cell object; *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Create and return a new cell object containing the value *ob*. The parameter " +"may be ``NULL``." +msgstr "" + +msgid "" +"Return the contents of the cell *cell*, which can be ``NULL``. If *cell* is " +"not a cell object, returns ``NULL`` with an exception set." +msgstr "" + +msgid "" +"Return the contents of the cell *cell*, but without checking that *cell* is " +"non-``NULL`` and a cell object." +msgstr "" + +msgid "" +"Set the contents of the cell object *cell* to *value*. This releases the " +"reference to any current content of the cell. *value* may be ``NULL``. " +"*cell* must be non-``NULL``." +msgstr "" + +msgid "" +"On success, return ``0``. If *cell* is not a cell object, set an exception " +"and return ``-1``." +msgstr "" + +msgid "" +"Sets the value of the cell object *cell* to *value*. No reference counts " +"are adjusted, and no checks are made for safety; *cell* must be non-``NULL`` " +"and must be a cell object." +msgstr "" diff --git a/c-api/code.po b/c-api/code.po index 5f5267db..6760284f 100644 --- a/c-api/code.po +++ b/c-api/code.po @@ -8,140 +8,166 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-27 14:15+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/code.rst:8 msgid "Code Objects" msgstr "" +#: ../../c-api/code.rst:10 msgid "" "Code objects are a low-level detail of the CPython implementation. Each one " "represents a chunk of executable code that hasn't yet been bound into a " "function." msgstr "" +#: ../../c-api/code.rst:16 msgid "" "The C structure of the objects used to describe code objects. The fields of " "this type are subject to change at any time." msgstr "" +#: ../../c-api/code.rst:22 msgid "" "This is an instance of :c:type:`PyTypeObject` representing the Python :ref:" "`code object `." msgstr "" +#: ../../c-api/code.rst:28 msgid "" "Return true if *co* is a :ref:`code object `. This function " "always succeeds." msgstr "" +#: ../../c-api/code.rst:33 msgid "" "Return the number of :term:`free (closure) variables ` in " "a code object." msgstr "" +#: ../../c-api/code.rst:38 msgid "" "Return the position of the first :term:`free (closure) variable ` in a code object." msgstr "" +#: ../../c-api/code.rst:43 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 "" +#: ../../c-api/code.rst:49 msgid "" "Return a new code object. If you need a dummy code object to create a " "frame, use :c:func:`PyCode_NewEmpty` instead." msgstr "" +#: ../../c-api/code.rst:52 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 "" +#: ../../c-api/code.rst:55 msgid "" "The many arguments of this function are inter-dependent in complex ways, " "meaning that subtle changes to values are likely to result in incorrect " "execution or VM crashes. Use this function only with extreme care." msgstr "" +#: ../../c-api/code.rst:59 msgid "Added ``qualname`` and ``exceptiontable`` parameters." msgstr "" +#: ../../c-api/code.rst:66 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 "" +#: ../../c-api/code.rst:75 msgid "" "Similar to :c:func:`PyUnstable_Code_New`, but with an extra " "\"posonlyargcount\" for positional-only arguments. The same caveats that " "apply to ``PyUnstable_Code_New`` also apply to this function." msgstr "" +#: ../../c-api/code.rst:78 msgid "as ``PyCode_NewWithPosOnlyArgs``" msgstr "" +#: ../../c-api/code.rst:80 msgid "Added ``qualname`` and ``exceptiontable`` parameters." msgstr "" +#: ../../c-api/code.rst:85 msgid "" "Renamed to ``PyUnstable_Code_NewWithPosOnlyArgs``. The old name is " "deprecated, but will remain available until the signature changes again." msgstr "" +#: ../../c-api/code.rst:91 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`` " "if executed." msgstr "" +#: ../../c-api/code.rst:97 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 " "frame, use :c:func:`PyFrame_GetLineNumber` instead." msgstr "" +#: ../../c-api/code.rst:100 msgid "" "For efficiently iterating over the line numbers in a code object, use :pep:" "`the API described in PEP 626 <0626#out-of-process-debuggers-and-profilers>`." msgstr "" +#: ../../c-api/code.rst:105 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 " "information is not available for any particular element." msgstr "" +#: ../../c-api/code.rst:109 msgid "Returns ``1`` if the function succeeds and 0 otherwise." msgstr "" +#: ../../c-api/code.rst:115 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 " "object. On error, ``NULL`` is returned and an exception is raised." msgstr "" +#: ../../c-api/code.rst:120 msgid "" "This ``PyBytesObject`` may be created on-demand by the interpreter and does " "not necessarily represent the bytecode actually executed by CPython. The " "primary use case for this function is debuggers and profilers." msgstr "" +#: ../../c-api/code.rst:128 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 " "variables. On error, ``NULL`` is returned and an exception is raised." msgstr "" +#: ../../c-api/code.rst:137 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 " @@ -149,6 +175,7 @@ msgid "" "returned and an exception is raised." msgstr "" +#: ../../c-api/code.rst:146 msgid "" "Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new " "reference to a :c:type:`PyTupleObject` containing the names of the :term:" @@ -156,6 +183,7 @@ msgid "" "returned and an exception is raised." msgstr "" +#: ../../c-api/code.rst:155 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 " @@ -163,6 +191,7 @@ msgid "" "exception." msgstr "" +#: ../../c-api/code.rst:164 msgid "" "Clear watcher identified by *watcher_id* previously returned from :c:func:" "`PyCode_AddWatcher` for the current interpreter. Return ``0`` on success, or " @@ -170,14 +199,17 @@ msgid "" "never registered.)" msgstr "" +#: ../../c-api/code.rst:173 msgid "" "Enumeration of possible code object watcher events: - " "``PY_CODE_EVENT_CREATE`` - ``PY_CODE_EVENT_DESTROY``" msgstr "" +#: ../../c-api/code.rst:181 msgid "Type of a code object watcher callback function." msgstr "" +#: ../../c-api/code.rst:183 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 " @@ -185,6 +217,7 @@ msgid "" "inspected." msgstr "" +#: ../../c-api/code.rst:188 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 " @@ -192,6 +225,7 @@ msgid "" "later, any watcher callbacks active at that time will be called again." msgstr "" +#: ../../c-api/code.rst:193 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 " @@ -201,12 +235,14 @@ msgid "" "the Python code being executed." msgstr "" +#: ../../c-api/code.rst:200 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 "" +#: ../../c-api/code.rst:204 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 " @@ -215,9 +251,25 @@ msgid "" "it before returning." msgstr "" +#: ../../c-api/code.rst:215 +msgid "This is a function that does nothing." +msgstr "" + +#: ../../c-api/code.rst:217 +msgid "" +"Prior to Python 3.10, this function would perform basic optimizations to a " +"code object." +msgstr "" + +#: ../../c-api/code.rst:220 +msgid "This function now does nothing." +msgstr "" + +#: ../../c-api/code.rst:229 msgid "Code Object Flags" msgstr "" +#: ../../c-api/code.rst:231 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:" @@ -225,6 +277,7 @@ msgid "" "`PyUnstable_Code_New` and similar functions." msgstr "" +#: ../../c-api/code.rst:236 msgid "" "Flags whose names start with ``CO_FUTURE_`` correspond to features normally " "selectable by :ref:`future statements `. These flags can be used in :" @@ -232,160 +285,188 @@ msgid "" "mandatory in current versions of Python, and setting them has no effect." msgstr "" +#: ../../c-api/code.rst:242 msgid "" "The following flags are available. For their meaning, see the linked " "documentation of their Python equivalents." msgstr "" +#: ../../c-api/code.rst:250 msgid "Flag" msgstr "" +#: ../../c-api/code.rst:251 msgid "Meaning" msgstr "" +#: ../../c-api/code.rst:253 msgid ":py:data:`inspect.CO_OPTIMIZED`" msgstr "" +#: ../../c-api/code.rst:255 msgid ":py:data:`inspect.CO_NEWLOCALS`" msgstr "" +#: ../../c-api/code.rst:257 msgid ":py:data:`inspect.CO_VARARGS`" msgstr "" +#: ../../c-api/code.rst:259 msgid ":py:data:`inspect.CO_VARKEYWORDS`" msgstr "" +#: ../../c-api/code.rst:261 msgid ":py:data:`inspect.CO_NESTED`" msgstr "" +#: ../../c-api/code.rst:263 msgid ":py:data:`inspect.CO_GENERATOR`" msgstr "" +#: ../../c-api/code.rst:265 msgid ":py:data:`inspect.CO_COROUTINE`" msgstr "" +#: ../../c-api/code.rst:267 msgid ":py:data:`inspect.CO_ITERABLE_COROUTINE`" msgstr "" +#: ../../c-api/code.rst:269 msgid ":py:data:`inspect.CO_ASYNC_GENERATOR`" msgstr "" +#: ../../c-api/code.rst:271 msgid ":py:data:`inspect.CO_HAS_DOCSTRING`" msgstr "" +#: ../../c-api/code.rst:273 msgid ":py:data:`inspect.CO_METHOD`" msgstr "" +#: ../../c-api/code.rst:276 msgid "no effect (:py:data:`__future__.division`)" msgstr "" +#: ../../c-api/code.rst:278 msgid "no effect (:py:data:`__future__.absolute_import`)" msgstr "" +#: ../../c-api/code.rst:280 msgid "no effect (:py:data:`__future__.with_statement`)" msgstr "" +#: ../../c-api/code.rst:282 msgid "no effect (:py:data:`__future__.print_function`)" msgstr "" +#: ../../c-api/code.rst:284 msgid "no effect (:py:data:`__future__.unicode_literals`)" msgstr "" +#: ../../c-api/code.rst:286 msgid "no effect (:py:data:`__future__.generator_stop`)" msgstr "" +#: ../../c-api/code.rst:288 msgid ":py:data:`__future__.annotations`" msgstr "" +#: ../../c-api/code.rst:292 msgid "Extra information" msgstr "" +#: ../../c-api/code.rst:294 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 "" +#: ../../c-api/code.rst:298 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 "" +#: ../../c-api/code.rst:307 msgid "Return a new opaque index value used to adding data to code objects." msgstr "" +#: ../../c-api/code.rst:309 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 "" +#: ../../c-api/code.rst:313 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 "" +#: ../../c-api/code.rst:317 msgid "as ``_PyEval_RequestCodeExtraIndex``" msgstr "" +#: ../../c-api/code.rst:321 msgid "" "Renamed to ``PyUnstable_Eval_RequestCodeExtraIndex``. The old private name " "is deprecated, but will be available until the API changes." msgstr "" +#: ../../c-api/code.rst:330 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 "" +#: ../../c-api/code.rst:333 msgid "" "If no data was set under the index, set *extra* to ``NULL`` and return 0 " "without setting an exception." msgstr "" +#: ../../c-api/code.rst:336 msgid "as ``_PyCode_GetExtra``" msgstr "" +#: ../../c-api/code.rst:340 msgid "" "Renamed to ``PyUnstable_Code_GetExtra``. The old private name is deprecated, " "but will be available until the API changes." msgstr "" +#: ../../c-api/code.rst:349 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 "" +#: ../../c-api/code.rst:352 msgid "as ``_PyCode_SetExtra``" msgstr "" +#: ../../c-api/code.rst:356 msgid "" "Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, " "but will be available until the API changes." msgstr "" +#: ../../c-api/code.rst:3 msgid "object" msgstr "" +#: ../../c-api/code.rst:3 msgid "code" msgstr "" +#: ../../c-api/code.rst:3 msgid "code object" msgstr "" +#: ../../c-api/code.rst:62 msgid "PyCode_New (C function)" msgstr "" - -msgid "PyCode_NewWithPosOnlyArgs (C function)" -msgstr "" - -msgid "_PyEval_RequestCodeExtraIndex (C function)" -msgstr "" - -msgid "_PyCode_GetExtra (C function)" -msgstr "" - -msgid "_PyCode_SetExtra (C function)" -msgstr "" diff --git a/c-api/code.po~ b/c-api/code.po~ new file mode 100644 index 00000000..5f5267db --- /dev/null +++ b/c-api/code.po~ @@ -0,0 +1,391 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-27 14:15+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Code Objects" +msgstr "" + +msgid "" +"Code objects are a low-level detail of the CPython implementation. Each one " +"represents a chunk of executable code that hasn't yet been bound into a " +"function." +msgstr "" + +msgid "" +"The C structure of the objects used to describe code objects. The fields of " +"this type are subject to change at any time." +msgstr "" + +msgid "" +"This is an instance of :c:type:`PyTypeObject` representing the Python :ref:" +"`code object `." +msgstr "" + +msgid "" +"Return true if *co* is a :ref:`code object `. This function " +"always succeeds." +msgstr "" + +msgid "" +"Return the number of :term:`free (closure) variables ` in " +"a code object." +msgstr "" + +msgid "" +"Return the position of the first :term:`free (closure) variable ` in a code object." +msgstr "" + +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 "" + +msgid "" +"Return a new code object. If you need a dummy code object to create a " +"frame, use :c:func:`PyCode_NewEmpty` instead." +msgstr "" + +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 "" + +msgid "" +"The many arguments of this function are inter-dependent in complex ways, " +"meaning that subtle changes to values are likely to result in incorrect " +"execution or VM crashes. Use this function only with extreme care." +msgstr "" + +msgid "Added ``qualname`` and ``exceptiontable`` parameters." +msgstr "" + +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 "" + +msgid "" +"Similar to :c:func:`PyUnstable_Code_New`, but with an extra " +"\"posonlyargcount\" for positional-only arguments. The same caveats that " +"apply to ``PyUnstable_Code_New`` also apply to this function." +msgstr "" + +msgid "as ``PyCode_NewWithPosOnlyArgs``" +msgstr "" + +msgid "Added ``qualname`` and ``exceptiontable`` parameters." +msgstr "" + +msgid "" +"Renamed to ``PyUnstable_Code_NewWithPosOnlyArgs``. The old name is " +"deprecated, but will remain available until the signature changes again." +msgstr "" + +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`` " +"if executed." +msgstr "" + +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 " +"frame, use :c:func:`PyFrame_GetLineNumber` instead." +msgstr "" + +msgid "" +"For efficiently iterating over the line numbers in a code object, use :pep:" +"`the API described in PEP 626 <0626#out-of-process-debuggers-and-profilers>`." +msgstr "" + +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 " +"information is not available for any particular element." +msgstr "" + +msgid "Returns ``1`` if the function succeeds and 0 otherwise." +msgstr "" + +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 " +"object. On error, ``NULL`` is returned and an exception is raised." +msgstr "" + +msgid "" +"This ``PyBytesObject`` may be created on-demand by the interpreter and does " +"not necessarily represent the bytecode actually executed by CPython. The " +"primary use case for this function is debuggers and profilers." +msgstr "" + +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 " +"variables. On error, ``NULL`` is returned and an exception is raised." +msgstr "" + +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 " +"variables that are referenced by nested functions. On error, ``NULL`` is " +"returned and an exception is raised." +msgstr "" + +msgid "" +"Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new " +"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 "" + +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 " +"of error (e.g. no more watcher IDs available), return ``-1`` and set an " +"exception." +msgstr "" + +msgid "" +"Clear watcher identified by *watcher_id* previously returned from :c:func:" +"`PyCode_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 "" + +msgid "" +"Enumeration of possible code object watcher events: - " +"``PY_CODE_EVENT_CREATE`` - ``PY_CODE_EVENT_DESTROY``" +msgstr "" + +msgid "Type of a code object watcher callback function." +msgstr "" + +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 " +"the destruction of *co* takes place, so the prior state of *co* can be " +"inspected." +msgstr "" + +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 " +"from being freed at this time. When the resurrected object is destroyed " +"later, any watcher callbacks active at that time will be called again." +msgstr "" + +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 " +"and timing of creation and destruction of code objects. While changes in " +"these details may result in differences observable by watchers (including " +"whether a callback is invoked or not), it does not change the semantics of " +"the Python code being executed." +msgstr "" + +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 "" + +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 "" + +msgid "Code Object Flags" +msgstr "" + +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 "" + +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 "" + +msgid "" +"The following flags are available. For their meaning, see the linked " +"documentation of their Python equivalents." +msgstr "" + +msgid "Flag" +msgstr "" + +msgid "Meaning" +msgstr "" + +msgid ":py:data:`inspect.CO_OPTIMIZED`" +msgstr "" + +msgid ":py:data:`inspect.CO_NEWLOCALS`" +msgstr "" + +msgid ":py:data:`inspect.CO_VARARGS`" +msgstr "" + +msgid ":py:data:`inspect.CO_VARKEYWORDS`" +msgstr "" + +msgid ":py:data:`inspect.CO_NESTED`" +msgstr "" + +msgid ":py:data:`inspect.CO_GENERATOR`" +msgstr "" + +msgid ":py:data:`inspect.CO_COROUTINE`" +msgstr "" + +msgid ":py:data:`inspect.CO_ITERABLE_COROUTINE`" +msgstr "" + +msgid ":py:data:`inspect.CO_ASYNC_GENERATOR`" +msgstr "" + +msgid ":py:data:`inspect.CO_HAS_DOCSTRING`" +msgstr "" + +msgid ":py:data:`inspect.CO_METHOD`" +msgstr "" + +msgid "no effect (:py:data:`__future__.division`)" +msgstr "" + +msgid "no effect (:py:data:`__future__.absolute_import`)" +msgstr "" + +msgid "no effect (:py:data:`__future__.with_statement`)" +msgstr "" + +msgid "no effect (:py:data:`__future__.print_function`)" +msgstr "" + +msgid "no effect (:py:data:`__future__.unicode_literals`)" +msgstr "" + +msgid "no effect (:py:data:`__future__.generator_stop`)" +msgstr "" + +msgid ":py:data:`__future__.annotations`" +msgstr "" + +msgid "Extra information" +msgstr "" + +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 "" + +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 "" + +msgid "Return a new opaque index value used to adding data to code objects." +msgstr "" + +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 "" + +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 "" + +msgid "as ``_PyEval_RequestCodeExtraIndex``" +msgstr "" + +msgid "" +"Renamed to ``PyUnstable_Eval_RequestCodeExtraIndex``. The old private name " +"is deprecated, but will be available until the API changes." +msgstr "" + +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 "" + +msgid "" +"If no data was set under the index, set *extra* to ``NULL`` and return 0 " +"without setting an exception." +msgstr "" + +msgid "as ``_PyCode_GetExtra``" +msgstr "" + +msgid "" +"Renamed to ``PyUnstable_Code_GetExtra``. The old private name is deprecated, " +"but will be available until the API changes." +msgstr "" + +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 "" + +msgid "as ``_PyCode_SetExtra``" +msgstr "" + +msgid "" +"Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, " +"but will be available until the API changes." +msgstr "" + +msgid "object" +msgstr "" + +msgid "code" +msgstr "" + +msgid "code object" +msgstr "" + +msgid "PyCode_New (C function)" +msgstr "" + +msgid "PyCode_NewWithPosOnlyArgs (C function)" +msgstr "" + +msgid "_PyEval_RequestCodeExtraIndex (C function)" +msgstr "" + +msgid "_PyCode_GetExtra (C function)" +msgstr "" + +msgid "_PyCode_SetExtra (C function)" +msgstr "" diff --git a/c-api/codec.po b/c-api/codec.po index f90d7bdc..46c74c79 100644 --- a/c-api/codec.po +++ b/c-api/codec.po @@ -8,41 +8,48 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-27 14:15+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/codec.rst:4 msgid "Codec registry and support functions" msgstr "" +#: ../../c-api/codec.rst:8 msgid "Register a new codec search function." msgstr "" +#: ../../c-api/codec.rst:10 msgid "" "As a side effect, this tries to load the :mod:`!encodings` package, if not " "yet done, to make sure that it is always first in the list of search " "functions." msgstr "" +#: ../../c-api/codec.rst:15 msgid "" "Unregister a codec search function and clear the registry's cache. If the " "search function is not registered, do nothing. Return 0 on success. Raise an " "exception and return -1 on error." msgstr "" +#: ../../c-api/codec.rst:23 msgid "" "Return ``1`` or ``0`` depending on whether there is a registered codec for " "the given *encoding*. This function always succeeds." msgstr "" +#: ../../c-api/codec.rst:28 msgid "Generic codec based encoding API." msgstr "" +#: ../../c-api/codec.rst:30 msgid "" "*object* is passed through the encoder function found for the given " "*encoding* using the error handling method defined by *errors*. *errors* " @@ -50,9 +57,11 @@ msgid "" "exc:`LookupError` if no encoder can be found." msgstr "" +#: ../../c-api/codec.rst:37 msgid "Generic codec based decoding API." msgstr "" +#: ../../c-api/codec.rst:39 msgid "" "*object* is passed through the decoder function found for the given " "*encoding* using the error handling method defined by *errors*. *errors* " @@ -60,9 +69,11 @@ msgid "" "exc:`LookupError` if no decoder can be found." msgstr "" +#: ../../c-api/codec.rst:46 msgid "Codec lookup API" msgstr "" +#: ../../c-api/codec.rst:48 msgid "" "In the following functions, the *encoding* string is looked up converted to " "all lower-case characters, which makes encodings looked up through this " @@ -70,33 +81,41 @@ msgid "" "`KeyError` is set and ``NULL`` returned." msgstr "" +#: ../../c-api/codec.rst:55 msgid "Get an encoder function for the given *encoding*." msgstr "" +#: ../../c-api/codec.rst:59 msgid "Get a decoder function for the given *encoding*." msgstr "" +#: ../../c-api/codec.rst:63 msgid "" "Get an :class:`~codecs.IncrementalEncoder` object for the given *encoding*." msgstr "" +#: ../../c-api/codec.rst:67 msgid "" "Get an :class:`~codecs.IncrementalDecoder` object for the given *encoding*." msgstr "" +#: ../../c-api/codec.rst:71 msgid "" "Get a :class:`~codecs.StreamReader` factory function for the given " "*encoding*." msgstr "" +#: ../../c-api/codec.rst:75 msgid "" "Get a :class:`~codecs.StreamWriter` factory function for the given " "*encoding*." msgstr "" +#: ../../c-api/codec.rst:79 msgid "Registry API for Unicode encoding error handlers" msgstr "" +#: ../../c-api/codec.rst:83 msgid "" "Register the error handling callback function *error* under the given " "*name*. This callback function will be called by a codec when it encounters " @@ -104,6 +123,7 @@ msgid "" "error parameter in the call to the encode/decode function." msgstr "" +#: ../../c-api/codec.rst:88 msgid "" "The callback gets a single argument, an instance of :exc:" "`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or :exc:" @@ -116,31 +136,49 @@ msgid "" "should be resumed." msgstr "" +#: ../../c-api/codec.rst:98 msgid "Return ``0`` on success, ``-1`` on error." msgstr "" +#: ../../c-api/codec.rst:102 msgid "" "Lookup the error handling callback function registered under *name*. As a " "special case ``NULL`` can be passed, in which case the error handling " "callback for \"strict\" will be returned." msgstr "" +#: ../../c-api/codec.rst:108 msgid "Raise *exc* as an exception." msgstr "" +#: ../../c-api/codec.rst:112 msgid "Ignore the unicode error, skipping the faulty input." msgstr "" +#: ../../c-api/codec.rst:116 msgid "Replace the unicode encode error with ``?`` or ``U+FFFD``." msgstr "" +#: ../../c-api/codec.rst:120 msgid "Replace the unicode encode error with XML character references." msgstr "" +#: ../../c-api/codec.rst:124 msgid "" "Replace the unicode encode error with backslash escapes (``\\x``, ``\\u`` " "and ``\\U``)." msgstr "" +#: ../../c-api/codec.rst:129 msgid "Replace the unicode encode error with ``\\N{...}`` escapes." msgstr "" + +#: ../../c-api/codec.rst:135 +msgid "Codec utility variables" +msgstr "" + +#: ../../c-api/codec.rst:139 +msgid "" +"A string constant containing the lowercase hexadecimal digits: " +"``\"0123456789abcdef\"``." +msgstr "" diff --git a/c-api/codec.po~ b/c-api/codec.po~ new file mode 100644 index 00000000..f90d7bdc --- /dev/null +++ b/c-api/codec.po~ @@ -0,0 +1,146 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-27 14:15+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Codec registry and support functions" +msgstr "" + +msgid "Register a new codec search function." +msgstr "" + +msgid "" +"As a side effect, this tries to load the :mod:`!encodings` package, if not " +"yet done, to make sure that it is always first in the list of search " +"functions." +msgstr "" + +msgid "" +"Unregister a codec search function and clear the registry's cache. If the " +"search function is not registered, do nothing. Return 0 on success. Raise an " +"exception and return -1 on error." +msgstr "" + +msgid "" +"Return ``1`` or ``0`` depending on whether there is a registered codec for " +"the given *encoding*. This function always succeeds." +msgstr "" + +msgid "Generic codec based encoding API." +msgstr "" + +msgid "" +"*object* is passed through the encoder function found for the given " +"*encoding* using the error handling method defined by *errors*. *errors* " +"may be ``NULL`` to use the default method defined for the codec. Raises a :" +"exc:`LookupError` if no encoder can be found." +msgstr "" + +msgid "Generic codec based decoding API." +msgstr "" + +msgid "" +"*object* is passed through the decoder function found for the given " +"*encoding* using the error handling method defined by *errors*. *errors* " +"may be ``NULL`` to use the default method defined for the codec. Raises a :" +"exc:`LookupError` if no decoder can be found." +msgstr "" + +msgid "Codec lookup API" +msgstr "" + +msgid "" +"In the following functions, the *encoding* string is looked up converted to " +"all lower-case characters, which makes encodings looked up through this " +"mechanism effectively case-insensitive. If no codec is found, a :exc:" +"`KeyError` is set and ``NULL`` returned." +msgstr "" + +msgid "Get an encoder function for the given *encoding*." +msgstr "" + +msgid "Get a decoder function for the given *encoding*." +msgstr "" + +msgid "" +"Get an :class:`~codecs.IncrementalEncoder` object for the given *encoding*." +msgstr "" + +msgid "" +"Get an :class:`~codecs.IncrementalDecoder` object for the given *encoding*." +msgstr "" + +msgid "" +"Get a :class:`~codecs.StreamReader` factory function for the given " +"*encoding*." +msgstr "" + +msgid "" +"Get a :class:`~codecs.StreamWriter` factory function for the given " +"*encoding*." +msgstr "" + +msgid "Registry API for Unicode encoding error handlers" +msgstr "" + +msgid "" +"Register the error handling callback function *error* under the given " +"*name*. This callback function will be called by a codec when it encounters " +"unencodable characters/undecodable bytes and *name* is specified as the " +"error parameter in the call to the encode/decode function." +msgstr "" + +msgid "" +"The callback gets a single argument, an instance of :exc:" +"`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or :exc:" +"`UnicodeTranslateError` that holds information about the problematic " +"sequence of characters or bytes and their offset in the original string " +"(see :ref:`unicodeexceptions` for functions to extract this information). " +"The callback must either raise the given exception, or return a two-item " +"tuple containing the replacement for the problematic sequence, and an " +"integer giving the offset in the original string at which encoding/decoding " +"should be resumed." +msgstr "" + +msgid "Return ``0`` on success, ``-1`` on error." +msgstr "" + +msgid "" +"Lookup the error handling callback function registered under *name*. As a " +"special case ``NULL`` can be passed, in which case the error handling " +"callback for \"strict\" will be returned." +msgstr "" + +msgid "Raise *exc* as an exception." +msgstr "" + +msgid "Ignore the unicode error, skipping the faulty input." +msgstr "" + +msgid "Replace the unicode encode error with ``?`` or ``U+FFFD``." +msgstr "" + +msgid "Replace the unicode encode error with XML character references." +msgstr "" + +msgid "" +"Replace the unicode encode error with backslash escapes (``\\x``, ``\\u`` " +"and ``\\U``)." +msgstr "" + +msgid "Replace the unicode encode error with ``\\N{...}`` escapes." +msgstr "" diff --git a/c-api/complex.po b/c-api/complex.po index 50929e8b..de4ddd66 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -8,177 +8,222 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/complex.rst:6 msgid "Complex Number Objects" msgstr "" +#: ../../c-api/complex.rst:13 msgid "" -"Python's complex number objects are implemented as two distinct types when " -"viewed from the C API: one is the Python object exposed to Python programs, " -"and the other is a C structure which represents the actual complex number " -"value. The API provides functions for working with both." +"This subtype of :c:type:`PyObject` represents a Python complex number object." msgstr "" -msgid "Complex Numbers as C Structures" +#: ../../c-api/complex.rst:17 +msgid "" +"The complex number value, using the C :c:type:`Py_complex` representation." msgstr "" +#: ../../c-api/complex.rst:19 msgid "" -"Note that the functions which accept these structures as parameters and " -"return them as results do so *by value* rather than dereferencing them " -"through pointers. This is consistent throughout the API." +"Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex` to " +"convert a Python complex number to/from the C :c:type:`Py_complex` " +"representation." msgstr "" +#: ../../c-api/complex.rst:28 msgid "" -"The C structure which corresponds to the value portion of a Python complex " -"number object. Most of the functions for dealing with complex number " -"objects use structures of this type as input or output values, as " -"appropriate." +"This instance of :c:type:`PyTypeObject` represents the Python complex number " +"type. It is the same object as :class:`complex` in the Python layer." msgstr "" -msgid "The structure is defined as::" +#: ../../c-api/complex.rst:34 +msgid "" +"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :" +"c:type:`PyComplexObject`. This function always succeeds." msgstr "" +#: ../../c-api/complex.rst:40 msgid "" -"typedef struct {\n" -" double real;\n" -" double imag;\n" -"} Py_complex;" +"Return true if its argument is a :c:type:`PyComplexObject`, but not a " +"subtype of :c:type:`PyComplexObject`. This function always succeeds." msgstr "" +#: ../../c-api/complex.rst:46 msgid "" -"Return the sum of two complex numbers, using the C :c:type:`Py_complex` " -"representation." +"Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return " +"``NULL`` with an exception set on error." msgstr "" -msgid "" -"Return the difference between two complex numbers, using the C :c:type:" -"`Py_complex` representation." +#: ../../c-api/complex.rst:52 +msgid "Return the real part of *op* as a C :c:expr:`double`." msgstr "" +#: ../../c-api/complex.rst:54 msgid "" -"Return the negation of the complex number *num*, using the C :c:type:" -"`Py_complex` representation." +"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 " +"Python complex number object. If :meth:`!__complex__` is not defined then " +"it falls back to call :c:func:`PyFloat_AsDouble` and returns its result." msgstr "" +#: ../../c-api/complex.rst:60 ../../c-api/complex.rst:76 msgid "" -"Return the product of two complex numbers, using the C :c:type:`Py_complex` " -"representation." +"Upon failure, this method returns ``-1.0`` with an exception set, so one " +"should call :c:func:`PyErr_Occurred` to check for errors." msgstr "" -msgid "" -"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` " -"representation." +#: ../../c-api/complex.rst:63 ../../c-api/complex.rst:79 +msgid "Use :meth:`~object.__complex__` if available." msgstr "" -msgid "" -"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :" -"c:macro:`!EDOM`." +#: ../../c-api/complex.rst:68 +msgid "Return the imaginary part of *op* as a C :c:expr:`double`." msgstr "" +#: ../../c-api/complex.rst:70 msgid "" -"Return the exponentiation of *num* by *exp*, using the C :c:type:" -"`Py_complex` representation." +"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 " +"Python complex number object. If :meth:`!__complex__` is not defined then " +"it falls back to call :c:func:`PyFloat_AsDouble` and returns ``0.0`` on " +"success." msgstr "" +#: ../../c-api/complex.rst:85 msgid "" -"If *num* is null and *exp* is not a positive real number, this method " -"returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`." +"This C structure defines an export format for a Python complex number object." msgstr "" -msgid "Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows." +#: ../../c-api/complex.rst:91 +msgid "The structure is defined as::" msgstr "" -msgid "Complex Numbers as Python Objects" +#: ../../c-api/complex.rst:93 +msgid "" +"typedef struct {\n" +" double real;\n" +" double imag;\n" +"} Py_complex;" msgstr "" +#: ../../c-api/complex.rst:101 msgid "" -"This subtype of :c:type:`PyObject` represents a Python complex number object." +"Create a new Python complex number object from a C :c:type:`Py_complex` " +"value. Return ``NULL`` with an exception set on error." msgstr "" -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." +#: ../../c-api/complex.rst:107 +msgid "Return the :c:type:`Py_complex` value of the complex number *op*." msgstr "" +#: ../../c-api/complex.rst:109 msgid "" -"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :" -"c:type:`PyComplexObject`. This function always succeeds." +"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 " +"Python complex number object. If :meth:`!__complex__` is not defined then " +"it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not " +"defined then it falls back to :meth:`~object.__index__`." msgstr "" +#: ../../c-api/complex.rst:115 msgid "" -"Return true if its argument is a :c:type:`PyComplexObject`, but not a " -"subtype of :c:type:`PyComplexObject`. This function always succeeds." +"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 " +"call :c:func:`PyErr_Occurred` to check for errors." msgstr "" -msgid "" -"Create a new Python complex number object from a C :c:type:`Py_complex` " -"value. Return ``NULL`` with an exception set on error." +#: ../../c-api/complex.rst:119 +msgid "Use :meth:`~object.__index__` if available." +msgstr "" + +#: ../../c-api/complex.rst:124 +msgid "Complex Numbers as C Structures" msgstr "" +#: ../../c-api/complex.rst:126 msgid "" -"Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return " -"``NULL`` with an exception set on error." +"The API also provides functions for working with complex numbers, using the :" +"c:type:`Py_complex` representation. Note that the functions which accept " +"these structures as parameters and return them as results do so *by value* " +"rather than dereferencing them through pointers." msgstr "" -msgid "Return the real part of *op* as a C :c:expr:`double`." +#: ../../c-api/complex.rst:131 +msgid "" +"Please note, that these functions are :term:`soft deprecated` since Python " +"3.15. Avoid using this API in a new code to do complex arithmetic: either " +"use the :ref:`Number Protocol ` API or use native complex types, " +"like :c:expr:`double complex`." msgstr "" +#: ../../c-api/complex.rst:139 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 " -"Python complex number object. If :meth:`!__complex__` is not defined then " -"it falls back to call :c:func:`PyFloat_AsDouble` and returns its result." +"Return the sum of two complex numbers, using the C :c:type:`Py_complex` " +"representation." msgstr "" +#: ../../c-api/complex.rst:147 msgid "" -"Upon failure, this method returns ``-1.0`` with an exception set, so one " -"should call :c:func:`PyErr_Occurred` to check for errors." +"Return the difference between two complex numbers, using the C :c:type:" +"`Py_complex` representation." msgstr "" -msgid "Use :meth:`~object.__complex__` if available." +#: ../../c-api/complex.rst:155 +msgid "" +"Return the negation of the complex number *num*, using the C :c:type:" +"`Py_complex` representation." msgstr "" -msgid "Return the imaginary part of *op* as a C :c:expr:`double`." +#: ../../c-api/complex.rst:163 +msgid "" +"Return the product of two complex numbers, using the C :c:type:`Py_complex` " +"representation." msgstr "" +#: ../../c-api/complex.rst:171 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 " -"Python complex number object. If :meth:`!__complex__` is not defined then " -"it falls back to call :c:func:`PyFloat_AsDouble` and returns ``0.0`` on " -"success." +"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` " +"representation." msgstr "" -msgid "Return the :c:type:`Py_complex` value of the complex number *op*." +#: ../../c-api/complex.rst:174 +msgid "" +"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :" +"c:macro:`!EDOM`." msgstr "" +#: ../../c-api/complex.rst:182 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 " -"Python complex number object. If :meth:`!__complex__` is not defined then " -"it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not " -"defined then it falls back to :meth:`~object.__index__`." +"Return the exponentiation of *num* by *exp*, using the C :c:type:" +"`Py_complex` representation." msgstr "" +#: ../../c-api/complex.rst:185 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 " -"call :c:func:`PyErr_Occurred` to check for errors." +"If *num* is null and *exp* is not a positive real number, this method " +"returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`." msgstr "" -msgid "Use :meth:`~object.__index__` if available." +#: ../../c-api/complex.rst:188 ../../c-api/complex.rst:197 +msgid "Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows." +msgstr "" + +#: ../../c-api/complex.rst:195 +msgid "Return the absolute value of the complex number *num*." msgstr "" +#: ../../c-api/complex.rst:8 msgid "object" msgstr "" +#: ../../c-api/complex.rst:8 msgid "complex number" msgstr "" diff --git a/c-api/complex.po~ b/c-api/complex.po~ new file mode 100644 index 00000000..50929e8b --- /dev/null +++ b/c-api/complex.po~ @@ -0,0 +1,184 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Complex Number Objects" +msgstr "" + +msgid "" +"Python's complex number objects are implemented as two distinct types when " +"viewed from the C API: one is the Python object exposed to Python programs, " +"and the other is a C structure which represents the actual complex number " +"value. The API provides functions for working with both." +msgstr "" + +msgid "Complex Numbers as C Structures" +msgstr "" + +msgid "" +"Note that the functions which accept these structures as parameters and " +"return them as results do so *by value* rather than dereferencing them " +"through pointers. This is consistent throughout the API." +msgstr "" + +msgid "" +"The C structure which corresponds to the value portion of a Python complex " +"number object. Most of the functions for dealing with complex number " +"objects use structures of this type as input or output values, as " +"appropriate." +msgstr "" + +msgid "The structure is defined as::" +msgstr "" + +msgid "" +"typedef struct {\n" +" double real;\n" +" double imag;\n" +"} Py_complex;" +msgstr "" + +msgid "" +"Return the sum of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" + +msgid "" +"Return the difference between two complex numbers, using the C :c:type:" +"`Py_complex` representation." +msgstr "" + +msgid "" +"Return the negation of the complex number *num*, using the C :c:type:" +"`Py_complex` representation." +msgstr "" + +msgid "" +"Return the product of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" + +msgid "" +"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` " +"representation." +msgstr "" + +msgid "" +"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :" +"c:macro:`!EDOM`." +msgstr "" + +msgid "" +"Return the exponentiation of *num* by *exp*, using the C :c:type:" +"`Py_complex` representation." +msgstr "" + +msgid "" +"If *num* is null and *exp* is not a positive real number, this method " +"returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`." +msgstr "" + +msgid "Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows." +msgstr "" + +msgid "Complex Numbers as Python Objects" +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents a Python complex number object." +msgstr "" + +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." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :" +"c:type:`PyComplexObject`. This function always succeeds." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyComplexObject`, but not a " +"subtype of :c:type:`PyComplexObject`. This function always succeeds." +msgstr "" + +msgid "" +"Create a new Python complex number object from a C :c:type:`Py_complex` " +"value. Return ``NULL`` with an exception set on error." +msgstr "" + +msgid "" +"Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return " +"``NULL`` with an exception set on error." +msgstr "" + +msgid "Return the real part of *op* as a C :c:expr:`double`." +msgstr "" + +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 " +"Python complex number object. If :meth:`!__complex__` is not defined then " +"it falls back to call :c:func:`PyFloat_AsDouble` and returns its result." +msgstr "" + +msgid "" +"Upon failure, this method returns ``-1.0`` with an exception set, so one " +"should call :c:func:`PyErr_Occurred` to check for errors." +msgstr "" + +msgid "Use :meth:`~object.__complex__` if available." +msgstr "" + +msgid "Return the imaginary part of *op* as a C :c:expr:`double`." +msgstr "" + +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 " +"Python complex number object. If :meth:`!__complex__` is not defined then " +"it falls back to call :c:func:`PyFloat_AsDouble` and returns ``0.0`` on " +"success." +msgstr "" + +msgid "Return the :c:type:`Py_complex` value of the complex number *op*." +msgstr "" + +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 " +"Python complex number object. If :meth:`!__complex__` is not defined then " +"it falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not " +"defined then it falls back to :meth:`~object.__index__`." +msgstr "" + +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 " +"call :c:func:`PyErr_Occurred` to check for errors." +msgstr "" + +msgid "Use :meth:`~object.__index__` if available." +msgstr "" + +msgid "object" +msgstr "" + +msgid "complex number" +msgstr "" diff --git a/c-api/concrete.po b/c-api/concrete.po index e97bbf29..e0d92a78 100644 --- a/c-api/concrete.po +++ b/c-api/concrete.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/concrete.rst:8 msgid "Concrete Objects Layer" msgstr "" +#: ../../c-api/concrete.rst:10 msgid "" "The functions in this chapter are specific to certain Python object types. " "Passing them an object of the wrong type is not a good idea; if you receive " @@ -29,6 +31,7 @@ msgid "" "structured like the \"family tree\" of Python object types." msgstr "" +#: ../../c-api/concrete.rst:19 msgid "" "While the functions described in this chapter carefully check the type of " "the objects which are passed in, many of them do not check for ``NULL`` " @@ -37,42 +40,59 @@ msgid "" "interpreter." msgstr "" +#: ../../c-api/concrete.rst:28 msgid "Fundamental Objects" msgstr "" +#: ../../c-api/concrete.rst:30 msgid "" "This section describes Python type objects and the singleton object ``None``." msgstr "" +#: ../../c-api/concrete.rst:41 msgid "Numeric Objects" msgstr "" +#: ../../c-api/concrete.rst:56 msgid "Sequence Objects" msgstr "" +#: ../../c-api/concrete.rst:60 msgid "" "Generic operations on sequence objects were discussed in the previous " "chapter; this section deals with the specific kinds of sequence objects that " "are intrinsic to the Python language." msgstr "" +#: ../../c-api/concrete.rst:78 msgid "Container Objects" msgstr "" +#: ../../c-api/concrete.rst:91 msgid "Function Objects" msgstr "" +#: ../../c-api/concrete.rst:102 msgid "Other Objects" msgstr "" +#: ../../c-api/concrete.rst:124 +msgid "C API for extension modules" +msgstr "" + +#: ../../c-api/concrete.rst:43 ../../c-api/concrete.rst:58 +#: ../../c-api/concrete.rst:80 msgid "object" msgstr "" +#: ../../c-api/concrete.rst:43 msgid "numeric" msgstr "" +#: ../../c-api/concrete.rst:58 msgid "sequence" msgstr "" +#: ../../c-api/concrete.rst:80 msgid "mapping" msgstr "" diff --git a/c-api/concrete.po~ b/c-api/concrete.po~ new file mode 100644 index 00000000..e97bbf29 --- /dev/null +++ b/c-api/concrete.po~ @@ -0,0 +1,78 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Concrete Objects Layer" +msgstr "" + +msgid "" +"The functions in this chapter are specific to certain Python object types. " +"Passing them an object of the wrong type is not a good idea; if you receive " +"an object from a Python program and you are not sure that it has the right " +"type, you must perform a type check first; for example, to check that an " +"object is a dictionary, use :c:func:`PyDict_Check`. The chapter is " +"structured like the \"family tree\" of Python object types." +msgstr "" + +msgid "" +"While the functions described in this chapter carefully check the type of " +"the objects which are passed in, many of them do not check for ``NULL`` " +"being passed instead of a valid object. Allowing ``NULL`` to be passed in " +"can cause memory access violations and immediate termination of the " +"interpreter." +msgstr "" + +msgid "Fundamental Objects" +msgstr "" + +msgid "" +"This section describes Python type objects and the singleton object ``None``." +msgstr "" + +msgid "Numeric Objects" +msgstr "" + +msgid "Sequence Objects" +msgstr "" + +msgid "" +"Generic operations on sequence objects were discussed in the previous " +"chapter; this section deals with the specific kinds of sequence objects that " +"are intrinsic to the Python language." +msgstr "" + +msgid "Container Objects" +msgstr "" + +msgid "Function Objects" +msgstr "" + +msgid "Other Objects" +msgstr "" + +msgid "object" +msgstr "" + +msgid "numeric" +msgstr "" + +msgid "sequence" +msgstr "" + +msgid "mapping" +msgstr "" diff --git a/c-api/contextvars.po b/c-api/contextvars.po index 3ae0620a..d1ce4f3e 100644 --- a/c-api/contextvars.po +++ b/c-api/contextvars.po @@ -8,24 +8,27 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/contextvars.rst:6 msgid "Context Variables Objects" msgstr "" +#: ../../c-api/contextvars.rst:15 msgid "" "In Python 3.7.1 the signatures of all context variables C APIs were " "**changed** to use :c:type:`PyObject` pointers instead of :c:type:" "`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::" msgstr "" +#: ../../c-api/contextvars.rst:20 msgid "" "// in 3.7.0:\n" "PyContext *PyContext_New(void);\n" @@ -34,80 +37,99 @@ msgid "" "PyObject *PyContext_New(void);" msgstr "" +#: ../../c-api/contextvars.rst:26 msgid "See :issue:`34762` for more details." msgstr "" +#: ../../c-api/contextvars.rst:29 msgid "" "This section details the public C API for the :mod:`contextvars` module." msgstr "" +#: ../../c-api/contextvars.rst:33 msgid "" "The C structure used to represent a :class:`contextvars.Context` object." msgstr "" +#: ../../c-api/contextvars.rst:38 msgid "" "The C structure used to represent a :class:`contextvars.ContextVar` object." msgstr "" +#: ../../c-api/contextvars.rst:43 msgid "The C structure used to represent a :class:`contextvars.Token` object." msgstr "" +#: ../../c-api/contextvars.rst:47 msgid "The type object representing the *context* type." msgstr "" +#: ../../c-api/contextvars.rst:51 msgid "The type object representing the *context variable* type." msgstr "" +#: ../../c-api/contextvars.rst:55 msgid "The type object representing the *context variable token* type." msgstr "" +#: ../../c-api/contextvars.rst:58 msgid "Type-check macros:" msgstr "" +#: ../../c-api/contextvars.rst:62 msgid "" "Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be " "``NULL``. This function always succeeds." msgstr "" +#: ../../c-api/contextvars.rst:67 msgid "" "Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be " "``NULL``. This function always succeeds." msgstr "" +#: ../../c-api/contextvars.rst:72 msgid "" "Return true if *o* is of type :c:data:`PyContextToken_Type`. *o* must not be " "``NULL``. This function always succeeds." msgstr "" +#: ../../c-api/contextvars.rst:76 msgid "Context object management functions:" msgstr "" +#: ../../c-api/contextvars.rst:80 msgid "" "Create a new empty context object. Returns ``NULL`` if an error has " "occurred." msgstr "" +#: ../../c-api/contextvars.rst:85 msgid "" "Create a shallow copy of the passed *ctx* context object. Returns ``NULL`` " "if an error has occurred." msgstr "" +#: ../../c-api/contextvars.rst:90 msgid "" "Create a shallow copy of the current thread context. Returns ``NULL`` if an " "error has occurred." msgstr "" +#: ../../c-api/contextvars.rst:95 msgid "" "Set *ctx* as the current context for the current thread. Returns ``0`` on " "success, and ``-1`` on error." msgstr "" +#: ../../c-api/contextvars.rst:100 msgid "" "Deactivate the *ctx* context and restore the previous context as the current " "context for the current thread. Returns ``0`` on success, and ``-1`` on " "error." msgstr "" +#: ../../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 " @@ -115,6 +137,7 @@ msgid "" "exception." msgstr "" +#: ../../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, " @@ -122,9 +145,11 @@ msgid "" "never registered.)" msgstr "" +#: ../../c-api/contextvars.rst:124 msgid "Enumeration of possible context object watcher events:" msgstr "" +#: ../../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-" @@ -132,17 +157,20 @@ msgid "" "current." msgstr "" +#: ../../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 "" +#: ../../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 "" +#: ../../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 " @@ -151,9 +179,11 @@ msgid "" "it before returning." msgstr "" +#: ../../c-api/contextvars.rst:151 msgid "Context variable functions:" msgstr "" +#: ../../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 " @@ -161,34 +191,42 @@ msgid "" "occurred, this function returns ``NULL``." msgstr "" +#: ../../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 " "value was found." msgstr "" +#: ../../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:" msgstr "" +#: ../../c-api/contextvars.rst:169 msgid "*default_value*, if not ``NULL``;" msgstr "" +#: ../../c-api/contextvars.rst:170 msgid "the default value of *var*, if not ``NULL``;" msgstr "" +#: ../../c-api/contextvars.rst:171 msgid "``NULL``" msgstr "" +#: ../../c-api/contextvars.rst:173 msgid "Except for ``NULL``, the function returns a new reference." msgstr "" +#: ../../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." msgstr "" +#: ../../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/contextvars.po~ b/c-api/contextvars.po~ new file mode 100644 index 00000000..3ae0620a --- /dev/null +++ b/c-api/contextvars.po~ @@ -0,0 +1,196 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Context Variables Objects" +msgstr "" + +msgid "" +"In Python 3.7.1 the signatures of all context variables C APIs were " +"**changed** to use :c:type:`PyObject` pointers instead of :c:type:" +"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::" +msgstr "" + +msgid "" +"// in 3.7.0:\n" +"PyContext *PyContext_New(void);\n" +"\n" +"// in 3.7.1+:\n" +"PyObject *PyContext_New(void);" +msgstr "" + +msgid "See :issue:`34762` for more details." +msgstr "" + +msgid "" +"This section details the public C API for the :mod:`contextvars` module." +msgstr "" + +msgid "" +"The C structure used to represent a :class:`contextvars.Context` object." +msgstr "" + +msgid "" +"The C structure used to represent a :class:`contextvars.ContextVar` object." +msgstr "" + +msgid "The C structure used to represent a :class:`contextvars.Token` object." +msgstr "" + +msgid "The type object representing the *context* type." +msgstr "" + +msgid "The type object representing the *context variable* type." +msgstr "" + +msgid "The type object representing the *context variable token* type." +msgstr "" + +msgid "Type-check macros:" +msgstr "" + +msgid "" +"Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *o* is of type :c:data:`PyContextToken_Type`. *o* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +msgid "Context object management functions:" +msgstr "" + +msgid "" +"Create a new empty context object. Returns ``NULL`` if an error has " +"occurred." +msgstr "" + +msgid "" +"Create a shallow copy of the passed *ctx* context object. Returns ``NULL`` " +"if an error has occurred." +msgstr "" + +msgid "" +"Create a shallow copy of the current thread context. Returns ``NULL`` if an " +"error has occurred." +msgstr "" + +msgid "" +"Set *ctx* as the current context for the current thread. Returns ``0`` on " +"success, and ``-1`` on error." +msgstr "" + +msgid "" +"Deactivate the *ctx* context and restore the previous context as the current " +"context for the current thread. Returns ``0`` on success, and ``-1`` on " +"error." +msgstr "" + +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 "" + +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 "" + +msgid "Enumeration of possible context object watcher events:" +msgstr "" + +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 "" + +msgid "" +"Context object watcher callback function. The object passed to the callback " +"is event-specific; see :c:type:`PyContextEvent` for details." +msgstr "" + +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 "" + +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 "" + +msgid "Context variable functions:" +msgstr "" + +msgid "" +"Create a new ``ContextVar`` object. The *name* parameter is used for " +"introspection and debug purposes. The *def* parameter specifies a default " +"value for the context variable, or ``NULL`` for no default. If an error has " +"occurred, this function returns ``NULL``." +msgstr "" + +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 " +"value was found." +msgstr "" + +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:" +msgstr "" + +msgid "*default_value*, if not ``NULL``;" +msgstr "" + +msgid "the default value of *var*, if not ``NULL``;" +msgstr "" + +msgid "``NULL``" +msgstr "" + +msgid "Except for ``NULL``, the function returns a new reference." +msgstr "" + +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." +msgstr "" + +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 " +"returns ``0`` on success and ``-1`` on error." +msgstr "" diff --git a/c-api/conversion.po b/c-api/conversion.po index 1b8fe9fc..4974372e 100644 --- a/c-api/conversion.po +++ b/c-api/conversion.po @@ -8,33 +8,38 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/conversion.rst:6 msgid "String conversion and formatting" msgstr "" +#: ../../c-api/conversion.rst:8 msgid "Functions for number conversion and formatted string output." msgstr "" +#: ../../c-api/conversion.rst:13 msgid "" "Output not more than *size* bytes to *str* according to the format string " "*format* and the extra arguments. See the Unix man page :manpage:" "`snprintf(3)`." msgstr "" +#: ../../c-api/conversion.rst:19 msgid "" "Output not more than *size* bytes to *str* according to the format string " "*format* and the variable argument list *va*. Unix man page :manpage:" "`vsnprintf(3)`." msgstr "" +#: ../../c-api/conversion.rst:23 msgid "" ":c:func:`PyOS_snprintf` and :c:func:`PyOS_vsnprintf` wrap the Standard C " "library functions :c:func:`snprintf` and :c:func:`vsnprintf`. Their purpose " @@ -42,6 +47,7 @@ msgid "" "functions do not." msgstr "" +#: ../../c-api/conversion.rst:28 msgid "" "The wrappers ensure that ``str[size-1]`` is always ``'\\0'`` upon return. " "They never write more than *size* bytes (including the trailing ``'\\0'``) " @@ -51,39 +57,46 @@ msgid "" "the necessary buffer size." msgstr "" +#: ../../c-api/conversion.rst:34 msgid "" "The return value (*rv*) for these functions should be interpreted as follows:" msgstr "" +#: ../../c-api/conversion.rst:36 msgid "" "When ``0 <= rv < size``, the output conversion was successful and *rv* " "characters were written to *str* (excluding the trailing ``'\\0'`` byte at " "``str[rv]``)." msgstr "" +#: ../../c-api/conversion.rst:40 msgid "" "When ``rv >= size``, the output conversion was truncated and a buffer with " "``rv + 1`` bytes would have been needed to succeed. ``str[size-1]`` is " "``'\\0'`` in this case." msgstr "" +#: ../../c-api/conversion.rst:44 msgid "" -"When ``rv < 0``, \"something bad happened.\" ``str[size-1]`` is ``'\\0'`` in " -"this case too, but the rest of *str* is undefined. The exact cause of the " -"error depends on the underlying platform." +"When ``rv < 0``, the output conversion failed and ``str[size-1]`` is " +"``'\\0'`` in this case too, but the rest of *str* is undefined. The exact " +"cause of the error depends on the underlying platform." msgstr "" +#: ../../c-api/conversion.rst:49 msgid "" "The following functions provide locale-independent string to number " "conversions." msgstr "" +#: ../../c-api/conversion.rst:53 msgid "" "Convert the initial part of the string in ``str`` to an :c:expr:`unsigned " "long` value according to the given ``base``, which must be between ``2`` and " "``36`` inclusive, or be the special value ``0``." msgstr "" +#: ../../c-api/conversion.rst:57 msgid "" "Leading white space and case of characters are ignored. If ``base`` is zero " "it looks for a leading ``0b``, ``0o`` or ``0x`` to tell which base. If " @@ -92,6 +105,7 @@ msgid "" "end of the scan." msgstr "" +#: ../../c-api/conversion.rst:63 msgid "" "If the converted value falls out of range of corresponding return type, " "range error occurs (:c:data:`errno` is set to :c:macro:`!ERANGE`) and :c:" @@ -99,23 +113,28 @@ msgid "" "returned." msgstr "" +#: ../../c-api/conversion.rst:68 msgid "See also the Unix man page :manpage:`strtoul(3)`." msgstr "" +#: ../../c-api/conversion.rst:75 msgid "" "Convert the initial part of the string in ``str`` to an :c:expr:`long` value " "according to the given ``base``, which must be between ``2`` and ``36`` " "inclusive, or be the special value ``0``." msgstr "" +#: ../../c-api/conversion.rst:79 msgid "" "Same as :c:func:`PyOS_strtoul`, but return a :c:expr:`long` value instead " "and :c:macro:`LONG_MAX` on overflows." msgstr "" +#: ../../c-api/conversion.rst:82 msgid "See also the Unix man page :manpage:`strtol(3)`." msgstr "" +#: ../../c-api/conversion.rst:89 msgid "" "Convert a string ``s`` to a :c:expr:`double`, raising a Python exception on " "failure. The set of accepted strings corresponds to the set of strings " @@ -124,12 +143,14 @@ msgid "" "current locale." msgstr "" +#: ../../c-api/conversion.rst:95 msgid "" "If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:" "`ValueError` and return ``-1.0`` if the string is not a valid representation " "of a floating-point number." msgstr "" +#: ../../c-api/conversion.rst:99 msgid "" "If endptr is not ``NULL``, convert as much of the string as possible and set " "``*endptr`` to point to the first unconverted character. If no initial " @@ -138,71 +159,183 @@ msgid "" "ValueError, and return ``-1.0``." msgstr "" +#: ../../c-api/conversion.rst:106 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_INFINITY`` (with an " +"``overflow_exception`` is ``NULL`` return :c:macro:`!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 " "the first character after the converted value." msgstr "" +#: ../../c-api/conversion.rst:114 msgid "" "If any other error occurs during the conversion (for example an out-of-" "memory error), set the appropriate Python exception and return ``-1.0``." msgstr "" +#: ../../c-api/conversion.rst:123 msgid "" "Convert a :c:expr:`double` *val* to a string using supplied *format_code*, " "*precision*, and *flags*." msgstr "" +#: ../../c-api/conversion.rst:126 msgid "" "*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, " "``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is " "ignored. The ``'r'`` format code specifies the standard :func:`repr` format." msgstr "" -msgid "" -"*flags* can be zero or more of the values ``Py_DTSF_SIGN``, " -"``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:" +#: ../../c-api/conversion.rst:131 +msgid "*flags* can be zero or more of the following values or-ed together:" msgstr "" +#: ../../c-api/conversion.rst:137 msgid "" -"``Py_DTSF_SIGN`` means to always precede the returned string with a sign " -"character, even if *val* is non-negative." +"Always precede the returned string with a sign character, even if *val* is " +"non-negative." msgstr "" -msgid "" -"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look " -"like an integer." +#: ../../c-api/conversion.rst:142 +msgid "Ensure that the returned string will not look like an integer." msgstr "" +#: ../../c-api/conversion.rst:146 msgid "" -"``Py_DTSF_ALT`` means to apply \"alternate\" formatting rules. See the " -"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details." +"Apply \"alternate\" formatting rules. See the documentation for the :c:func:" +"`PyOS_snprintf` ``'#'`` specifier for details." msgstr "" +#: ../../c-api/conversion.rst:152 +msgid "Negative zero is converted to positive zero." +msgstr "" + +#: ../../c-api/conversion.rst:156 msgid "" "If *ptype* is non-``NULL``, then the value it points to will be set to one " -"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying " -"that *val* is a finite number, an infinite number, or not a number, " -"respectively." +"of the following constants depending on the type of *val*:" +msgstr "" + +#: ../../c-api/conversion.rst:163 +msgid "*\\*ptype*" +msgstr "" + +#: ../../c-api/conversion.rst:164 +msgid "type of *val*" +msgstr "" + +#: ../../c-api/conversion.rst:166 +msgid "finite number" +msgstr "" + +#: ../../c-api/conversion.rst:168 +msgid "infinite number" msgstr "" +#: ../../c-api/conversion.rst:170 +msgid "not a number" +msgstr "" + +#: ../../c-api/conversion.rst:172 msgid "" "The return value is a pointer to *buffer* with the converted string or " "``NULL`` if the conversion failed. The caller is responsible for freeing the " "returned string by calling :c:func:`PyMem_Free`." msgstr "" +#: ../../c-api/conversion.rst:182 +msgid "" +"Case insensitive comparison of strings. These functions work almost " +"identically to :c:func:`!strcmp` and :c:func:`!strncmp` (respectively), " +"except that they ignore the case of ASCII characters." +msgstr "" + +#: ../../c-api/conversion.rst:186 +msgid "" +"Return ``0`` if the strings are equal, a negative value if *str1* sorts " +"lexicographically before *str2*, or a positive value if it sorts after." +msgstr "" + +#: ../../c-api/conversion.rst:189 +msgid "" +"In the *str1* or *str2* arguments, a NUL byte marks the end of the string. " +"For :c:func:`!PyOS_mystrnicmp`, the *size* argument gives the maximum size " +"of the string, as if NUL was present at the index given by *size*." +msgstr "" + +#: ../../c-api/conversion.rst:193 +msgid "These functions do not use the locale." +msgstr "" + +#: ../../c-api/conversion.rst:199 +msgid "Case insensitive comparison of strings." +msgstr "" + +#: ../../c-api/conversion.rst:201 +msgid "" +"On Windows, these are aliases of :c:func:`!stricmp` and :c:func:`!strnicmp`, " +"respectively." +msgstr "" + +#: ../../c-api/conversion.rst:204 msgid "" -"Case insensitive comparison of strings. The function works almost " -"identically to :c:func:`!strcmp` except that it ignores the case." +"On other platforms, they are aliases of :c:func:`PyOS_mystricmp` and :c:func:" +"`PyOS_mystrnicmp`, respectively." +msgstr "" + +#: ../../c-api/conversion.rst:209 +msgid "Character classification and conversion" msgstr "" +#: ../../c-api/conversion.rst:211 msgid "" -"Case insensitive comparison of strings. The function works almost " -"identically to :c:func:`!strncmp` except that it ignores the case." +"The following macros provide locale-independent (unlike the C standard " +"library ``ctype.h``) character classification and conversion. The argument " +"must be a signed or unsigned :c:expr:`char`." +msgstr "" + +#: ../../c-api/conversion.rst:218 +msgid "Return true if the character *c* is an alphanumeric character." +msgstr "" + +#: ../../c-api/conversion.rst:223 +msgid "" +"Return true if the character *c* is an alphabetic character (``a-z`` and ``A-" +"Z``)." +msgstr "" + +#: ../../c-api/conversion.rst:228 +msgid "Return true if the character *c* is a decimal digit (``0-9``)." +msgstr "" + +#: ../../c-api/conversion.rst:233 +msgid "Return true if the character *c* is a lowercase ASCII letter (``a-z``)." +msgstr "" + +#: ../../c-api/conversion.rst:238 +msgid "" +"Return true if the character *c* is an uppercase ASCII letter (``A-Z``)." +msgstr "" + +#: ../../c-api/conversion.rst:243 +msgid "" +"Return true if the character *c* is a whitespace character (space, tab, " +"carriage return, newline, vertical tab, or form feed)." +msgstr "" + +#: ../../c-api/conversion.rst:249 +msgid "" +"Return true if the character *c* is a hexadecimal digit (``0-9``, ``a-f``, " +"and ``A-F``)." +msgstr "" + +#: ../../c-api/conversion.rst:255 +msgid "Return the lowercase equivalent of the character *c*." +msgstr "" + +#: ../../c-api/conversion.rst:260 +msgid "Return the uppercase equivalent of the character *c*." msgstr "" diff --git a/c-api/conversion.po~ b/c-api/conversion.po~ new file mode 100644 index 00000000..1b8fe9fc --- /dev/null +++ b/c-api/conversion.po~ @@ -0,0 +1,208 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "String conversion and formatting" +msgstr "" + +msgid "Functions for number conversion and formatted string output." +msgstr "" + +msgid "" +"Output not more than *size* bytes to *str* according to the format string " +"*format* and the extra arguments. See the Unix man page :manpage:" +"`snprintf(3)`." +msgstr "" + +msgid "" +"Output not more than *size* bytes to *str* according to the format string " +"*format* and the variable argument list *va*. Unix man page :manpage:" +"`vsnprintf(3)`." +msgstr "" + +msgid "" +":c:func:`PyOS_snprintf` and :c:func:`PyOS_vsnprintf` wrap the Standard C " +"library functions :c:func:`snprintf` and :c:func:`vsnprintf`. Their purpose " +"is to guarantee consistent behavior in corner cases, which the Standard C " +"functions do not." +msgstr "" + +msgid "" +"The wrappers ensure that ``str[size-1]`` is always ``'\\0'`` upon return. " +"They never write more than *size* bytes (including the trailing ``'\\0'``) " +"into str. Both functions require that ``str != NULL``, ``size > 0``, " +"``format != NULL`` and ``size < INT_MAX``. Note that this means there is no " +"equivalent to the C99 ``n = snprintf(NULL, 0, ...)`` which would determine " +"the necessary buffer size." +msgstr "" + +msgid "" +"The return value (*rv*) for these functions should be interpreted as follows:" +msgstr "" + +msgid "" +"When ``0 <= rv < size``, the output conversion was successful and *rv* " +"characters were written to *str* (excluding the trailing ``'\\0'`` byte at " +"``str[rv]``)." +msgstr "" + +msgid "" +"When ``rv >= size``, the output conversion was truncated and a buffer with " +"``rv + 1`` bytes would have been needed to succeed. ``str[size-1]`` is " +"``'\\0'`` in this case." +msgstr "" + +msgid "" +"When ``rv < 0``, \"something bad happened.\" ``str[size-1]`` is ``'\\0'`` in " +"this case too, but the rest of *str* is undefined. The exact cause of the " +"error depends on the underlying platform." +msgstr "" + +msgid "" +"The following functions provide locale-independent string to number " +"conversions." +msgstr "" + +msgid "" +"Convert the initial part of the string in ``str`` to an :c:expr:`unsigned " +"long` value according to the given ``base``, which must be between ``2`` and " +"``36`` inclusive, or be the special value ``0``." +msgstr "" + +msgid "" +"Leading white space and case of characters are ignored. If ``base`` is zero " +"it looks for a leading ``0b``, ``0o`` or ``0x`` to tell which base. If " +"these are absent it defaults to ``10``. Base must be 0 or between 2 and 36 " +"(inclusive). If ``ptr`` is non-``NULL`` it will contain a pointer to the " +"end of the scan." +msgstr "" + +msgid "" +"If the converted value falls out of range of corresponding return type, " +"range error occurs (:c:data:`errno` is set to :c:macro:`!ERANGE`) and :c:" +"macro:`!ULONG_MAX` is returned. If no conversion can be performed, ``0`` is " +"returned." +msgstr "" + +msgid "See also the Unix man page :manpage:`strtoul(3)`." +msgstr "" + +msgid "" +"Convert the initial part of the string in ``str`` to an :c:expr:`long` value " +"according to the given ``base``, which must be between ``2`` and ``36`` " +"inclusive, or be the special value ``0``." +msgstr "" + +msgid "" +"Same as :c:func:`PyOS_strtoul`, but return a :c:expr:`long` value instead " +"and :c:macro:`LONG_MAX` on overflows." +msgstr "" + +msgid "See also the Unix man page :manpage:`strtol(3)`." +msgstr "" + +msgid "" +"Convert a string ``s`` to a :c:expr:`double`, raising a Python exception on " +"failure. The set of accepted strings corresponds to the set of strings " +"accepted by Python's :func:`float` constructor, except that ``s`` must not " +"have leading or trailing whitespace. The conversion is independent of the " +"current locale." +msgstr "" + +msgid "" +"If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:" +"`ValueError` and return ``-1.0`` if the string is not a valid representation " +"of a floating-point number." +msgstr "" + +msgid "" +"If endptr is not ``NULL``, convert as much of the string as possible and set " +"``*endptr`` to point to the first unconverted character. If no initial " +"segment of the string is the valid representation of a floating-point " +"number, set ``*endptr`` to point to the beginning of the string, raise " +"ValueError, and return ``-1.0``." +msgstr "" + +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_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 " +"the first character after the converted value." +msgstr "" + +msgid "" +"If any other error occurs during the conversion (for example an out-of-" +"memory error), set the appropriate Python exception and return ``-1.0``." +msgstr "" + +msgid "" +"Convert a :c:expr:`double` *val* to a string using supplied *format_code*, " +"*precision*, and *flags*." +msgstr "" + +msgid "" +"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, " +"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is " +"ignored. The ``'r'`` format code specifies the standard :func:`repr` format." +msgstr "" + +msgid "" +"*flags* can be zero or more of the values ``Py_DTSF_SIGN``, " +"``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:" +msgstr "" + +msgid "" +"``Py_DTSF_SIGN`` means to always precede the returned string with a sign " +"character, even if *val* is non-negative." +msgstr "" + +msgid "" +"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look " +"like an integer." +msgstr "" + +msgid "" +"``Py_DTSF_ALT`` means to apply \"alternate\" formatting rules. See the " +"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details." +msgstr "" + +msgid "" +"If *ptype* is non-``NULL``, then the value it points to will be set to one " +"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying " +"that *val* is a finite number, an infinite number, or not a number, " +"respectively." +msgstr "" + +msgid "" +"The return value is a pointer to *buffer* with the converted string or " +"``NULL`` if the conversion failed. The caller is responsible for freeing the " +"returned string by calling :c:func:`PyMem_Free`." +msgstr "" + +msgid "" +"Case insensitive comparison of strings. The function works almost " +"identically to :c:func:`!strcmp` except that it ignores the case." +msgstr "" + +msgid "" +"Case insensitive comparison of strings. The function works almost " +"identically to :c:func:`!strncmp` except that it ignores the case." +msgstr "" diff --git a/c-api/coro.po b/c-api/coro.po index e36302a2..4e8b6790 100644 --- a/c-api/coro.po +++ b/c-api/coro.po @@ -8,34 +8,40 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/coro.rst:6 msgid "Coroutine Objects" msgstr "" +#: ../../c-api/coro.rst:10 msgid "" "Coroutine objects are what functions declared with an ``async`` keyword " "return." msgstr "" +#: ../../c-api/coro.rst:16 msgid "The C structure used for coroutine objects." msgstr "" +#: ../../c-api/coro.rst:21 msgid "The type object corresponding to coroutine objects." msgstr "" +#: ../../c-api/coro.rst:26 msgid "" "Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be " "``NULL``. This function always succeeds." msgstr "" +#: ../../c-api/coro.rst:32 msgid "" "Create and return a new coroutine object based on the *frame* object, with " "``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " diff --git a/c-api/coro.po~ b/c-api/coro.po~ new file mode 100644 index 00000000..e36302a2 --- /dev/null +++ b/c-api/coro.po~ @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Coroutine Objects" +msgstr "" + +msgid "" +"Coroutine objects are what functions declared with an ``async`` keyword " +"return." +msgstr "" + +msgid "The C structure used for coroutine objects." +msgstr "" + +msgid "The type object corresponding to coroutine objects." +msgstr "" + +msgid "" +"Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Create and return a new coroutine object based on the *frame* object, with " +"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " +"to *frame* is stolen by this function. The *frame* argument must not be " +"``NULL``." +msgstr "" diff --git a/c-api/datetime.po b/c-api/datetime.po index da62cc26..e5b873e0 100644 --- a/c-api/datetime.po +++ b/c-api/datetime.po @@ -8,162 +8,245 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/datetime.rst:6 msgid "DateTime Objects" msgstr "" +#: ../../c-api/datetime.rst:8 msgid "" "Various date and time objects are supplied by the :mod:`datetime` module. " "Before using any of these functions, the header file :file:`datetime.h` must " "be included in your source (note that this is not included by :file:`Python." -"h`), and the macro :c:macro:`!PyDateTime_IMPORT` must be invoked, usually as " +"h`), and the macro :c:macro:`PyDateTime_IMPORT` must be invoked, usually as " "part of the module initialisation function. The macro puts a pointer to a C " -"structure into a static variable, :c:data:`!PyDateTimeAPI`, that is used by " +"structure into a static variable, :c:data:`PyDateTimeAPI`, that is used by " "the following macros." msgstr "" +#: ../../c-api/datetime.rst:18 +msgid "Import the datetime C API." +msgstr "" + +#: ../../c-api/datetime.rst:20 +msgid "" +"On success, populate the :c:var:`PyDateTimeAPI` pointer. On failure, set :c:" +"var:`PyDateTimeAPI` to ``NULL`` and set an exception. The caller must check " +"if an error occurred via :c:func:`PyErr_Occurred`:" +msgstr "" + +#: ../../c-api/datetime.rst:24 +msgid "" +"PyDateTime_IMPORT;\n" +"if (PyErr_Occurred()) { /* cleanup */ }" +msgstr "" + +#: ../../c-api/datetime.rst:31 +msgid "This is not compatible with subinterpreters." +msgstr "" + +#: ../../c-api/datetime.rst:35 +msgid "This macro is now thread safe." +msgstr "" + +#: ../../c-api/datetime.rst:39 +msgid "Structure containing the fields for the datetime C API." +msgstr "" + +#: ../../c-api/datetime.rst:41 +msgid "The fields of this structure are private and subject to change." +msgstr "" + +#: ../../c-api/datetime.rst:43 +msgid "Do not use this directly; prefer ``PyDateTime_*`` APIs instead." +msgstr "" + +#: ../../c-api/datetime.rst:47 +msgid "Dynamically allocated object containing the datetime C API." +msgstr "" + +#: ../../c-api/datetime.rst:49 +msgid "" +"This variable is only available once :c:macro:`PyDateTime_IMPORT` succeeds." +msgstr "" + +#: ../../c-api/datetime.rst:53 +msgid "" +"This variable should not be accessed directly as direct access is not thread-" +"safe. Use :c:func:`PyDateTime_IMPORT` instead." +msgstr "" + +#: ../../c-api/datetime.rst:58 msgid "This subtype of :c:type:`PyObject` represents a Python date object." msgstr "" +#: ../../c-api/datetime.rst:62 msgid "This subtype of :c:type:`PyObject` represents a Python datetime object." msgstr "" +#: ../../c-api/datetime.rst:66 msgid "This subtype of :c:type:`PyObject` represents a Python time object." msgstr "" +#: ../../c-api/datetime.rst:70 msgid "" "This subtype of :c:type:`PyObject` represents the difference between two " "datetime values." msgstr "" +#: ../../c-api/datetime.rst:74 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python date type; it " "is the same object as :class:`datetime.date` in the Python layer." msgstr "" +#: ../../c-api/datetime.rst:79 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python datetime type; " "it is the same object as :class:`datetime.datetime` in the Python layer." msgstr "" +#: ../../c-api/datetime.rst:84 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python time type; it " "is the same object as :class:`datetime.time` in the Python layer." msgstr "" +#: ../../c-api/datetime.rst:89 msgid "" -"This instance of :c:type:`PyTypeObject` represents Python type for the " +"This instance of :c:type:`PyTypeObject` represents the Python type for the " "difference between two datetime values; it is the same object as :class:" "`datetime.timedelta` in the Python layer." msgstr "" +#: ../../c-api/datetime.rst:95 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python time zone info " "type; it is the same object as :class:`datetime.tzinfo` in the Python layer." msgstr "" +#: ../../c-api/datetime.rst:99 msgid "Macro for access to the UTC singleton:" msgstr "" +#: ../../c-api/datetime.rst:103 msgid "" "Returns the time zone singleton representing UTC, the same object as :attr:" "`datetime.timezone.utc`." msgstr "" +#: ../../c-api/datetime.rst:109 msgid "Type-check macros:" msgstr "" +#: ../../c-api/datetime.rst:113 msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype " "of :c:data:`!PyDateTime_DateType`. *ob* must not be ``NULL``. This " "function always succeeds." msgstr "" +#: ../../c-api/datetime.rst:120 msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not " "be ``NULL``. This function always succeeds." msgstr "" +#: ../../c-api/datetime.rst:126 msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a " "subtype of :c:data:`!PyDateTime_DateTimeType`. *ob* must not be ``NULL``. " "This function always succeeds." msgstr "" +#: ../../c-api/datetime.rst:133 msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must " "not be ``NULL``. This function always succeeds." msgstr "" +#: ../../c-api/datetime.rst:139 msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype " "of :c:data:`!PyDateTime_TimeType`. *ob* must not be ``NULL``. This " "function always succeeds." msgstr "" +#: ../../c-api/datetime.rst:146 msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not " "be ``NULL``. This function always succeeds." msgstr "" +#: ../../c-api/datetime.rst:152 msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype " "of :c:data:`!PyDateTime_DeltaType`. *ob* must not be ``NULL``. This " "function always succeeds." msgstr "" +#: ../../c-api/datetime.rst:159 msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not " "be ``NULL``. This function always succeeds." msgstr "" +#: ../../c-api/datetime.rst:165 msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype " "of :c:data:`!PyDateTime_TZInfoType`. *ob* must not be ``NULL``. This " "function always succeeds." msgstr "" +#: ../../c-api/datetime.rst:172 msgid "" "Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must " "not be ``NULL``. This function always succeeds." msgstr "" +#: ../../c-api/datetime.rst:176 msgid "Macros to create objects:" msgstr "" +#: ../../c-api/datetime.rst:180 msgid "" "Return a :class:`datetime.date` object with the specified year, month and " "day." msgstr "" +#: ../../c-api/datetime.rst:185 msgid "" "Return a :class:`datetime.datetime` object with the specified year, month, " "day, hour, minute, second and microsecond." msgstr "" +#: ../../c-api/datetime.rst:191 msgid "" "Return a :class:`datetime.datetime` object with the specified year, month, " "day, hour, minute, second, microsecond and fold." msgstr "" +#: ../../c-api/datetime.rst:199 msgid "" "Return a :class:`datetime.time` object with the specified hour, minute, " "second and microsecond." msgstr "" +#: ../../c-api/datetime.rst:205 msgid "" "Return a :class:`datetime.time` object with the specified hour, minute, " "second, microsecond and fold." msgstr "" +#: ../../c-api/datetime.rst:213 msgid "" "Return a :class:`datetime.timedelta` object representing the given number of " "days, seconds and microseconds. Normalization is performed so that the " @@ -171,16 +254,19 @@ msgid "" "for :class:`datetime.timedelta` objects." msgstr "" +#: ../../c-api/datetime.rst:221 msgid "" "Return a :class:`datetime.timezone` object with an unnamed fixed offset " "represented by the *offset* argument." msgstr "" +#: ../../c-api/datetime.rst:229 msgid "" "Return a :class:`datetime.timezone` object with a fixed offset represented " "by the *offset* argument and with tzname *name*." msgstr "" +#: ../../c-api/datetime.rst:235 msgid "" "Macros to extract fields from date objects. The argument must be an " "instance of :c:type:`PyDateTime_Date`, including subclasses (such as :c:type:" @@ -188,69 +274,105 @@ msgid "" "not checked:" msgstr "" +#: ../../c-api/datetime.rst:242 msgid "Return the year, as a positive int." msgstr "" +#: ../../c-api/datetime.rst:247 msgid "Return the month, as an int from 1 through 12." msgstr "" +#: ../../c-api/datetime.rst:252 msgid "Return the day, as an int from 1 through 31." msgstr "" +#: ../../c-api/datetime.rst:255 msgid "" "Macros to extract fields from datetime objects. The argument must be an " "instance of :c:type:`PyDateTime_DateTime`, including subclasses. The " "argument must not be ``NULL``, and the type is not checked:" msgstr "" +#: ../../c-api/datetime.rst:261 ../../c-api/datetime.rst:299 msgid "Return the hour, as an int from 0 through 23." msgstr "" +#: ../../c-api/datetime.rst:266 ../../c-api/datetime.rst:304 msgid "Return the minute, as an int from 0 through 59." msgstr "" +#: ../../c-api/datetime.rst:271 ../../c-api/datetime.rst:309 msgid "Return the second, as an int from 0 through 59." msgstr "" +#: ../../c-api/datetime.rst:276 ../../c-api/datetime.rst:314 msgid "Return the microsecond, as an int from 0 through 999999." msgstr "" +#: ../../c-api/datetime.rst:281 ../../c-api/datetime.rst:319 msgid "Return the fold, as an int from 0 through 1." msgstr "" +#: ../../c-api/datetime.rst:288 ../../c-api/datetime.rst:326 msgid "Return the tzinfo (which may be ``None``)." msgstr "" +#: ../../c-api/datetime.rst:293 msgid "" "Macros to extract fields from time objects. The argument must be an " "instance of :c:type:`PyDateTime_Time`, including subclasses. The argument " "must not be ``NULL``, and the type is not checked:" msgstr "" +#: ../../c-api/datetime.rst:331 msgid "" "Macros to extract fields from time delta objects. The argument must be an " "instance of :c:type:`PyDateTime_Delta`, including subclasses. The argument " "must not be ``NULL``, and the type is not checked:" msgstr "" +#: ../../c-api/datetime.rst:337 msgid "Return the number of days, as an int from -999999999 to 999999999." msgstr "" +#: ../../c-api/datetime.rst:344 msgid "Return the number of seconds, as an int from 0 through 86399." msgstr "" +#: ../../c-api/datetime.rst:351 msgid "Return the number of microseconds, as an int from 0 through 999999." msgstr "" +#: ../../c-api/datetime.rst:356 msgid "Macros for the convenience of modules implementing the DB API:" msgstr "" +#: ../../c-api/datetime.rst:360 msgid "" "Create and return a new :class:`datetime.datetime` object given an argument " "tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp`." msgstr "" +#: ../../c-api/datetime.rst:366 msgid "" "Create and return a new :class:`datetime.date` object given an argument " "tuple suitable for passing to :meth:`datetime.date.fromtimestamp`." msgstr "" + +#: ../../c-api/datetime.rst:371 +msgid "Internal data" +msgstr "" + +#: ../../c-api/datetime.rst:373 +msgid "" +"The following symbols are exposed by the C API but should be considered " +"internal-only." +msgstr "" + +#: ../../c-api/datetime.rst:378 +msgid "Name of the datetime capsule to pass to :c:func:`PyCapsule_Import`." +msgstr "" + +#: ../../c-api/datetime.rst:380 +msgid "Internal usage only. Use :c:macro:`PyDateTime_IMPORT` instead." +msgstr "" diff --git a/c-api/datetime.po~ b/c-api/datetime.po~ new file mode 100644 index 00000000..da62cc26 --- /dev/null +++ b/c-api/datetime.po~ @@ -0,0 +1,256 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "DateTime Objects" +msgstr "" + +msgid "" +"Various date and time objects are supplied by the :mod:`datetime` module. " +"Before using any of these functions, the header file :file:`datetime.h` must " +"be included in your source (note that this is not included by :file:`Python." +"h`), and the macro :c:macro:`!PyDateTime_IMPORT` must be invoked, usually as " +"part of the module initialisation function. The macro puts a pointer to a C " +"structure into a static variable, :c:data:`!PyDateTimeAPI`, that is used by " +"the following macros." +msgstr "" + +msgid "This subtype of :c:type:`PyObject` represents a Python date object." +msgstr "" + +msgid "This subtype of :c:type:`PyObject` represents a Python datetime object." +msgstr "" + +msgid "This subtype of :c:type:`PyObject` represents a Python time object." +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents the difference between two " +"datetime values." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python date type; it " +"is the same object as :class:`datetime.date` in the Python layer." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python datetime type; " +"it is the same object as :class:`datetime.datetime` in the Python layer." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python time type; it " +"is the same object as :class:`datetime.time` in the Python layer." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents Python type for the " +"difference between two datetime values; it is the same object as :class:" +"`datetime.timedelta` in the Python layer." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python time zone info " +"type; it is the same object as :class:`datetime.tzinfo` in the Python layer." +msgstr "" + +msgid "Macro for access to the UTC singleton:" +msgstr "" + +msgid "" +"Returns the time zone singleton representing UTC, the same object as :attr:" +"`datetime.timezone.utc`." +msgstr "" + +msgid "Type-check macros:" +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype " +"of :c:data:`!PyDateTime_DateType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a " +"subtype of :c:data:`!PyDateTime_DateTimeType`. *ob* must not be ``NULL``. " +"This function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must " +"not be ``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype " +"of :c:data:`!PyDateTime_TimeType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype " +"of :c:data:`!PyDateTime_DeltaType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not " +"be ``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype " +"of :c:data:`!PyDateTime_TZInfoType`. *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must " +"not be ``NULL``. This function always succeeds." +msgstr "" + +msgid "Macros to create objects:" +msgstr "" + +msgid "" +"Return a :class:`datetime.date` object with the specified year, month and " +"day." +msgstr "" + +msgid "" +"Return a :class:`datetime.datetime` object with the specified year, month, " +"day, hour, minute, second and microsecond." +msgstr "" + +msgid "" +"Return a :class:`datetime.datetime` object with the specified year, month, " +"day, hour, minute, second, microsecond and fold." +msgstr "" + +msgid "" +"Return a :class:`datetime.time` object with the specified hour, minute, " +"second and microsecond." +msgstr "" + +msgid "" +"Return a :class:`datetime.time` object with the specified hour, minute, " +"second, microsecond and fold." +msgstr "" + +msgid "" +"Return a :class:`datetime.timedelta` object representing the given number of " +"days, seconds and microseconds. Normalization is performed so that the " +"resulting number of microseconds and seconds lie in the ranges documented " +"for :class:`datetime.timedelta` objects." +msgstr "" + +msgid "" +"Return a :class:`datetime.timezone` object with an unnamed fixed offset " +"represented by the *offset* argument." +msgstr "" + +msgid "" +"Return a :class:`datetime.timezone` object with a fixed offset represented " +"by the *offset* argument and with tzname *name*." +msgstr "" + +msgid "" +"Macros to extract fields from date objects. The argument must be an " +"instance of :c:type:`PyDateTime_Date`, including subclasses (such as :c:type:" +"`PyDateTime_DateTime`). The argument must not be ``NULL``, and the type is " +"not checked:" +msgstr "" + +msgid "Return the year, as a positive int." +msgstr "" + +msgid "Return the month, as an int from 1 through 12." +msgstr "" + +msgid "Return the day, as an int from 1 through 31." +msgstr "" + +msgid "" +"Macros to extract fields from datetime objects. The argument must be an " +"instance of :c:type:`PyDateTime_DateTime`, including subclasses. The " +"argument must not be ``NULL``, and the type is not checked:" +msgstr "" + +msgid "Return the hour, as an int from 0 through 23." +msgstr "" + +msgid "Return the minute, as an int from 0 through 59." +msgstr "" + +msgid "Return the second, as an int from 0 through 59." +msgstr "" + +msgid "Return the microsecond, as an int from 0 through 999999." +msgstr "" + +msgid "Return the fold, as an int from 0 through 1." +msgstr "" + +msgid "Return the tzinfo (which may be ``None``)." +msgstr "" + +msgid "" +"Macros to extract fields from time objects. The argument must be an " +"instance of :c:type:`PyDateTime_Time`, including subclasses. The argument " +"must not be ``NULL``, and the type is not checked:" +msgstr "" + +msgid "" +"Macros to extract fields from time delta objects. The argument must be an " +"instance of :c:type:`PyDateTime_Delta`, including subclasses. The argument " +"must not be ``NULL``, and the type is not checked:" +msgstr "" + +msgid "Return the number of days, as an int from -999999999 to 999999999." +msgstr "" + +msgid "Return the number of seconds, as an int from 0 through 86399." +msgstr "" + +msgid "Return the number of microseconds, as an int from 0 through 999999." +msgstr "" + +msgid "Macros for the convenience of modules implementing the DB API:" +msgstr "" + +msgid "" +"Create and return a new :class:`datetime.datetime` object given an argument " +"tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp`." +msgstr "" + +msgid "" +"Create and return a new :class:`datetime.date` object given an argument " +"tuple suitable for passing to :meth:`datetime.date.fromtimestamp`." +msgstr "" diff --git a/c-api/descriptor.po b/c-api/descriptor.po index 49ffdf47..e2566013 100644 --- a/c-api/descriptor.po +++ b/c-api/descriptor.po @@ -8,28 +8,246 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/descriptor.rst:6 msgid "Descriptor Objects" msgstr "" +#: ../../c-api/descriptor.rst:8 msgid "" "\"Descriptors\" are objects that describe some attribute of an object. They " "are found in the dictionary of type objects." msgstr "" -msgid "The type object for the built-in descriptor types." +#: ../../c-api/descriptor.rst:13 +msgid "" +"Create a new get-set descriptor for extension type *type* from the :c:type:" +"`PyGetSetDef` structure *getset*." +msgstr "" + +#: ../../c-api/descriptor.rst:16 +msgid "" +"Get-set descriptors expose attributes implemented by C getter and setter " +"functions rather than stored directly in the instance. This is the same kind " +"of descriptor created for entries in :c:member:`~PyTypeObject.tp_getset`, " +"and it appears in Python as a :class:`types.GetSetDescriptorType` object." +msgstr "" + +#: ../../c-api/descriptor.rst:21 ../../c-api/descriptor.rst:34 +#: ../../c-api/descriptor.rst:65 ../../c-api/descriptor.rst:96 +#: ../../c-api/descriptor.rst:118 +msgid "" +"On success, return a :term:`strong reference` to the descriptor. Return " +"``NULL`` with an exception set on failure." +msgstr "" + +#: ../../c-api/descriptor.rst:26 +msgid "" +"Create a new member descriptor for extension type *type* from the :c:type:" +"`PyMemberDef` structure *member*." +msgstr "" + +#: ../../c-api/descriptor.rst:29 +msgid "" +"Member descriptors expose fields in the type's C struct as Python " +"attributes. This is the same kind of descriptor created for entries in :c:" +"member:`~PyTypeObject.tp_members`, and it appears in Python as a :class:" +"`types.MemberDescriptorType` object." +msgstr "" + +#: ../../c-api/descriptor.rst:39 +msgid "" +"The type object for member descriptor objects created from :c:type:" +"`PyMemberDef` structures. These descriptors expose fields of a C struct as " +"attributes on a type, and correspond to :class:`types.MemberDescriptorType` " +"objects in Python." +msgstr "" + +#: ../../c-api/descriptor.rst:48 +msgid "" +"The type object for get/set descriptor objects created from :c:type:" +"`PyGetSetDef` structures. These descriptors implement attributes whose value " +"is computed by C getter and setter functions, and are used for many built-in " +"type attributes. They correspond to :class:`types.GetSetDescriptorType` " +"objects in Python." +msgstr "" + +#: ../../c-api/descriptor.rst:57 +msgid "" +"Create a new method descriptor for extension type *type* from the :c:type:" +"`PyMethodDef` structure *meth*." +msgstr "" + +#: ../../c-api/descriptor.rst:60 +msgid "" +"Method descriptors expose C functions as methods on a type. This is the same " +"kind of descriptor created for entries in :c:member:`~PyTypeObject." +"tp_methods`, and it appears in Python as a :class:`types." +"MethodDescriptorType` object." +msgstr "" + +#: ../../c-api/descriptor.rst:70 +msgid "" +"The type object for method descriptor objects created from :c:type:" +"`PyMethodDef` structures. These descriptors expose C functions as methods on " +"a type, and correspond to :class:`types.MethodDescriptorType` objects in " +"Python." +msgstr "" + +#: ../../c-api/descriptor.rst:78 +msgid "Describes a slot wrapper used by :c:func:`PyDescr_NewWrapper`." +msgstr "" + +#: ../../c-api/descriptor.rst:80 +msgid "" +"Each ``wrapperbase`` record stores the Python-visible name and metadata for " +"a special method implemented by a type slot, together with the wrapper " +"function used to adapt that slot to Python's calling convention." +msgstr "" + +#: ../../c-api/descriptor.rst:86 +msgid "" +"Create a new wrapper descriptor for extension type *type* from the :c:struct:" +"`wrapperbase` structure *base* and the wrapped slot function pointer " +"*wrapped*." +msgstr "" + +#: ../../c-api/descriptor.rst:91 +msgid "" +"Wrapper descriptors expose special methods implemented by type slots. This " +"is the same kind of descriptor that CPython creates for slot-based special " +"methods such as ``__repr__`` or ``__add__``, and it appears in Python as a :" +"class:`types.WrapperDescriptorType` object." +msgstr "" + +#: ../../c-api/descriptor.rst:101 +msgid "" +"The type object for wrapper descriptor objects created by :c:func:" +"`PyDescr_NewWrapper` and :c:func:`PyWrapper_New`. Wrapper descriptors are " +"used internally to expose special methods implemented via wrapper " +"structures, and appear in Python as :class:`types.WrapperDescriptorType` " +"objects." +msgstr "" + +#: ../../c-api/descriptor.rst:110 +msgid "" +"Create a new class method descriptor for extension type *type* from the :c:" +"type:`PyMethodDef` structure *method*." +msgstr "" + +#: ../../c-api/descriptor.rst:113 +msgid "" +"Class method descriptors expose C methods that receive the class rather than " +"an instance when accessed. This is the same kind of descriptor created for " +"``METH_CLASS`` entries in :c:member:`~PyTypeObject.tp_methods`, and it " +"appears in Python as a :class:`types.ClassMethodDescriptorType` object." +msgstr "" + +#: ../../c-api/descriptor.rst:123 +msgid "" +"Return non-zero if the descriptor object *descr* describes a data attribute, " +"or ``0`` if it describes a method. *descr* must be a descriptor object; " +"there is no error checking." +msgstr "" + +#: ../../c-api/descriptor.rst:130 +msgid "" +"Create a new bound wrapper object from the wrapper descriptor *d* and the " +"instance *self*." +msgstr "" + +#: ../../c-api/descriptor.rst:133 +msgid "" +"This is the bound form of a wrapper descriptor created by :c:func:" +"`PyDescr_NewWrapper`. CPython creates these objects when a slot wrapper is " +"accessed through an instance, and they appear in Python as :class:`types." +"MethodWrapperType` objects." +msgstr "" + +#: ../../c-api/descriptor.rst:138 +msgid "" +"On success, return a :term:`strong reference` to the wrapper object. Return " +"``NULL`` with an exception set on failure." +msgstr "" + +#: ../../c-api/descriptor.rst:143 +msgid "This is a macro including the common fields for a descriptor object." +msgstr "" + +#: ../../c-api/descriptor.rst:146 +msgid "" +"This was included in Python's C API by mistake; do not use it in extensions. " +"For creating custom descriptor objects, create a class implementing the " +"descriptor protocol (:c:member:`~PyTypeObject.tp_descr_get` and :c:member:" +"`~PyTypeObject.tp_descr_set`)." +msgstr "" + +#: ../../c-api/descriptor.rst:155 +msgid "Built-in descriptors" +msgstr "" + +#: ../../c-api/descriptor.rst:159 +msgid "" +"The type object for property objects. This is the same object as :class:" +"`property` in the Python layer." +msgstr "" + +#: ../../c-api/descriptor.rst:165 +msgid "" +"The type object for super objects. This is the same object as :class:`super` " +"in the Python layer." +msgstr "" + +#: ../../c-api/descriptor.rst:171 +msgid "" +"The type of class method objects. This is the same object as :class:" +"`classmethod` in the Python layer." +msgstr "" + +#: ../../c-api/descriptor.rst:177 +msgid "" +"The type object for C-level class method descriptor objects. This is the " +"type of the descriptors created for :func:`classmethod` defined in C " +"extension types, and corresponds to :class:`types.ClassMethodDescriptorType` " +"objects in Python." +msgstr "" + +#: ../../c-api/descriptor.rst:185 +msgid "" +"Create a new :class:`classmethod` object wrapping *callable*. *callable* " +"must be a callable object and must not be ``NULL``." +msgstr "" + +#: ../../c-api/descriptor.rst:188 +msgid "" +"On success, this function returns a :term:`strong reference` to a new class " +"method descriptor. On failure, this function returns ``NULL`` with an " +"exception set." +msgstr "" + +#: ../../c-api/descriptor.rst:195 +msgid "" +"The type of static method objects. This is the same object as :class:" +"`staticmethod` in the Python layer." +msgstr "" + +#: ../../c-api/descriptor.rst:201 +msgid "" +"Create a new :class:`staticmethod` object wrapping *callable*. *callable* " +"must be a callable object and must not be ``NULL``." msgstr "" +#: ../../c-api/descriptor.rst:204 msgid "" -"Return non-zero if the descriptor objects *descr* describes a data " -"attribute, or ``0`` if it describes a method. *descr* must be a descriptor " -"object; there is no error checking." +"On success, this function returns a :term:`strong reference` to a new static " +"method descriptor. On failure, this function returns ``NULL`` with an " +"exception set." msgstr "" diff --git a/c-api/descriptor.po~ b/c-api/descriptor.po~ new file mode 100644 index 00000000..49ffdf47 --- /dev/null +++ b/c-api/descriptor.po~ @@ -0,0 +1,35 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Descriptor Objects" +msgstr "" + +msgid "" +"\"Descriptors\" are objects that describe some attribute of an object. They " +"are found in the dictionary of type objects." +msgstr "" + +msgid "The type object for the built-in descriptor types." +msgstr "" + +msgid "" +"Return non-zero if the descriptor objects *descr* describes a data " +"attribute, or ``0`` if it describes a method. *descr* must be a descriptor " +"object; there is no error checking." +msgstr "" diff --git a/c-api/dict.po b/c-api/dict.po index 8595354f..404f85d6 100644 --- a/c-api/dict.po +++ b/c-api/dict.po @@ -11,78 +11,136 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Dictionary Objects" +#: ../../c-api/dict.rst:6 +msgid "Dictionary objects" msgstr "" +#: ../../c-api/dict.rst:13 msgid "" "This subtype of :c:type:`PyObject` represents a Python dictionary object." msgstr "" +#: ../../c-api/dict.rst:18 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python dictionary " "type. This is the same object as :class:`dict` in the Python layer." msgstr "" +#: ../../c-api/dict.rst:24 msgid "" "Return true if *p* is a dict object or an instance of a subtype of the dict " "type. This function always succeeds." msgstr "" +#: ../../c-api/dict.rst:30 msgid "" "Return true if *p* is a dict object, but not an instance of a subtype of the " "dict type. This function always succeeds." msgstr "" +#: ../../c-api/dict.rst:36 msgid "Return a new empty dictionary, or ``NULL`` on failure." msgstr "" +#: ../../c-api/dict.rst:41 msgid "" "Return a :class:`types.MappingProxyType` object for a mapping which enforces " "read-only behavior. This is normally used to create a view to prevent " "modification of the dictionary for non-dynamic class types." msgstr "" +#: ../../c-api/dict.rst:45 +msgid "" +"The first argument can be a :class:`dict`, a :class:`frozendict`, or a " +"mapping." +msgstr "" + +#: ../../c-api/dict.rst:48 ../../c-api/dict.rst:84 ../../c-api/dict.rst:98 +#: ../../c-api/dict.rst:165 ../../c-api/dict.rst:196 ../../c-api/dict.rst:214 +#: ../../c-api/dict.rst:239 ../../c-api/dict.rst:251 ../../c-api/dict.rst:337 +#: ../../c-api/dict.rst:347 ../../c-api/dict.rst:358 ../../c-api/dict.rst:371 +#: ../../c-api/dict.rst:379 ../../c-api/dict.rst:453 +msgid "Also accept :class:`frozendict`." +msgstr "" + +#: ../../c-api/dict.rst:54 +msgid "" +"The type object for mapping proxy objects created by :c:func:" +"`PyDictProxy_New` and for the read-only ``__dict__`` attribute of many built-" +"in types. A :c:type:`PyDictProxy_Type` instance provides a dynamic, read-" +"only view of an underlying dictionary: changes to the underlying dictionary " +"are reflected in the proxy, but the proxy itself does not support mutation " +"operations. This corresponds to :class:`types.MappingProxyType` in Python." +msgstr "" + +#: ../../c-api/dict.rst:65 msgid "Empty an existing dictionary of all key-value pairs." msgstr "" +#: ../../c-api/dict.rst:67 msgid "" -"Determine if dictionary *p* contains *key*. If an item in *p* is matches " +"Do nothing if the argument is not a :class:`dict` or a :class:`!dict` " +"subclass." +msgstr "" + +#: ../../c-api/dict.rst:73 +msgid "" +"Determine if dictionary *p* contains *key*. If an item in *p* matches " "*key*, return ``1``, otherwise return ``0``. On error, return ``-1``. This " "is equivalent to the Python expression ``key in p``." msgstr "" +#: ../../c-api/dict.rst:77 ../../c-api/dict.rst:94 ../../c-api/dict.rst:156 +#: ../../c-api/dict.rst:177 ../../c-api/dict.rst:335 ../../c-api/dict.rst:345 +#: ../../c-api/dict.rst:356 ../../c-api/dict.rst:396 +msgid "The first argument can be a :class:`dict` or a :class:`frozendict`." +msgstr "" + +#: ../../c-api/dict.rst:81 ../../c-api/dict.rst:115 ../../c-api/dict.rst:135 +#: ../../c-api/dict.rst:160 ../../c-api/dict.rst:294 ../../c-api/dict.rst:316 +msgid "" +"The operation is atomic on :term:`free threading ` when " +"*key* is :class:`str`, :class:`int`, :class:`float`, :class:`bool` or :class:" +"`bytes`." +msgstr "" + +#: ../../c-api/dict.rst:90 msgid "" "This is the same as :c:func:`PyDict_Contains`, but *key* is specified as a :" "c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/dict.rst:104 msgid "Return a new dictionary that contains the same key-value pairs as *p*." msgstr "" +#: ../../c-api/dict.rst:108 msgid "" "Insert *val* into the dictionary *p* with a key of *key*. *key* must be :" "term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` " -"on success or ``-1`` on failure. This function *does not* steal a reference " -"to *val*." +"on success or ``-1`` on failure. This function *does not* \":term:`steal`\" " +"a reference to *val*." msgstr "" +#: ../../c-api/dict.rst:121 msgid "" "This is the same as :c:func:`PyDict_SetItem`, but *key* is specified as a :c:" "expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/dict.rst:128 msgid "" "Remove the entry in dictionary *p* with key *key*. *key* must be :term:" "`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not in the " @@ -90,60 +148,80 @@ msgid "" "failure." msgstr "" +#: ../../c-api/dict.rst:141 msgid "" "This is the same as :c:func:`PyDict_DelItem`, but *key* is specified as a :c:" "expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/dict.rst:148 msgid "" "Return a new :term:`strong reference` to the object from dictionary *p* " "which has a key *key*:" msgstr "" +#: ../../c-api/dict.rst:151 msgid "" "If the key is present, set *\\*result* to a new :term:`strong reference` to " "the value and return ``1``." msgstr "" +#: ../../c-api/dict.rst:153 msgid "If the key is missing, set *\\*result* to ``NULL`` and return ``0``." msgstr "" -msgid "On error, raise an exception and return ``-1``." +#: ../../c-api/dict.rst:154 +msgid "" +"On error, raise an exception, set *\\*result* to ``NULL`` and return ``-1``." msgstr "" +#: ../../c-api/dict.rst:168 msgid "See also the :c:func:`PyObject_GetItem` function." msgstr "" +#: ../../c-api/dict.rst:173 msgid "" "Return a :term:`borrowed reference` to the object from dictionary *p* which " "has a key *key*. Return ``NULL`` if the key *key* is missing *without* " "setting an exception." msgstr "" +#: ../../c-api/dict.rst:181 msgid "" "Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:" "`~object.__eq__` methods are silently ignored. Prefer the :c:func:" "`PyDict_GetItemWithError` function instead." msgstr "" +#: ../../c-api/dict.rst:187 ../../c-api/dict.rst:209 +msgid "" +"In the :term:`free-threaded build`, the returned :term:`borrowed reference` " +"may become invalid if another thread modifies the dictionary concurrently. " +"Prefer :c:func:`PyDict_GetItemRef`, which returns a :term:`strong reference`." +msgstr "" + +#: ../../c-api/dict.rst:192 msgid "" "Calling this API without an :term:`attached thread state` had been allowed " "for historical reason. It is no longer allowed." msgstr "" +#: ../../c-api/dict.rst:202 msgid "" "Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. " "Return ``NULL`` **with** an exception set if an exception occurred. Return " "``NULL`` **without** an exception set if the key wasn't present." msgstr "" +#: ../../c-api/dict.rst:220 msgid "" "This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:" "expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/dict.rst:226 msgid "" "Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:" "`~object.__eq__` methods or while creating the temporary :class:`str` object " @@ -151,11 +229,21 @@ msgid "" "function with your own :c:func:`PyUnicode_FromString` *key* instead." msgstr "" +#: ../../c-api/dict.rst:234 +msgid "" +"In the :term:`free-threaded build`, the returned :term:`borrowed reference` " +"may become invalid if another thread modifies the dictionary concurrently. " +"Prefer :c:func:`PyDict_GetItemStringRef`, which returns a :term:`strong " +"reference`." +msgstr "" + +#: ../../c-api/dict.rst:245 msgid "" "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 "" +#: ../../c-api/dict.rst:257 msgid "" "This is the same as the Python-level :meth:`dict.setdefault`. If present, " "it returns the value corresponding to *key* from the dictionary *p*. If the " @@ -165,6 +253,15 @@ msgid "" "the insertion." msgstr "" +#: ../../c-api/dict.rst:267 +msgid "" +"In the :term:`free-threaded build`, the returned :term:`borrowed reference` " +"may become invalid if another thread modifies the dictionary concurrently. " +"Prefer :c:func:`PyDict_SetDefaultRef`, which returns a :term:`strong " +"reference`." +msgstr "" + +#: ../../c-api/dict.rst:276 msgid "" "Inserts *default_value* into the dictionary *p* with a key of *key* if the " "key is not already present in the dictionary. If *result* is not ``NULL``, " @@ -176,6 +273,7 @@ msgid "" "exception, and sets ``*result`` to ``NULL``." msgstr "" +#: ../../c-api/dict.rst:286 msgid "" "For clarity: if you have a strong reference to *default_value* before " "calling this function, then after it returns, you hold a strong reference to " @@ -183,49 +281,71 @@ msgid "" "to the same object: in that case you hold two separate references to it." msgstr "" +#: ../../c-api/dict.rst:302 msgid "" "Remove *key* from dictionary *p* and optionally return the removed value. Do " -"not raise :exc:`KeyError` if the key missing." +"not raise :exc:`KeyError` if the key is missing." msgstr "" +#: ../../c-api/dict.rst:305 msgid "" "If the key is present, set *\\*result* to a new reference to the removed " "value if *result* is not ``NULL``, and return ``1``." msgstr "" +#: ../../c-api/dict.rst:307 msgid "" "If the key is missing, set *\\*result* to ``NULL`` if *result* is not " "``NULL``, and return ``0``." msgstr "" +#: ../../c-api/dict.rst:309 +msgid "On error, raise an exception and return ``-1``." +msgstr "" + +#: ../../c-api/dict.rst:311 msgid "" "Similar to :meth:`dict.pop`, but without the default value and not raising :" -"exc:`KeyError` if the key missing." +"exc:`KeyError` if the key is missing." msgstr "" +#: ../../c-api/dict.rst:324 msgid "" "Similar to :c:func:`PyDict_Pop`, but *key* is specified as a :c:expr:`const " "char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`." msgstr "" +#: ../../c-api/dict.rst:333 msgid "" "Return a :c:type:`PyListObject` containing all the items from the dictionary." msgstr "" +#: ../../c-api/dict.rst:343 msgid "" "Return a :c:type:`PyListObject` containing all the keys from the dictionary." msgstr "" +#: ../../c-api/dict.rst:353 msgid "" "Return a :c:type:`PyListObject` containing all the values from the " "dictionary *p*." msgstr "" +#: ../../c-api/dict.rst:366 msgid "" "Return the number of items in the dictionary. This is equivalent to " "``len(p)`` on a dictionary." msgstr "" +#: ../../c-api/dict.rst:369 +msgid "The argument can be a :class:`dict` or a :class:`frozendict`." +msgstr "" + +#: ../../c-api/dict.rst:377 +msgid "Similar to :c:func:`PyDict_Size`, but without error checking." +msgstr "" + +#: ../../c-api/dict.rst:385 msgid "" "Iterate over all key-value pairs in the dictionary *p*. The :c:type:" "`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the " @@ -239,9 +359,11 @@ msgid "" "structure is sparse, the offsets are not consecutive." msgstr "" +#: ../../c-api/dict.rst:398 msgid "For example::" msgstr "Zum Beispiel::" +#: ../../c-api/dict.rst:400 msgid "" "PyObject *key, *value;\n" "Py_ssize_t pos = 0;\n" @@ -252,12 +374,14 @@ msgid "" "}" msgstr "" +#: ../../c-api/dict.rst:408 msgid "" "The dictionary *p* should not be mutated during iteration. It is safe to " "modify the values of the keys as you iterate over the dictionary, but only " "so long as the set of keys does not change. For example::" msgstr "" +#: ../../c-api/dict.rst:412 msgid "" "PyObject *key, *value;\n" "Py_ssize_t pos = 0;\n" @@ -278,12 +402,15 @@ msgid "" "}" msgstr "" +#: ../../c-api/dict.rst:430 msgid "" "The function is not thread-safe in the :term:`free-threaded ` build without external synchronization. You can use :c:macro:" -"`Py_BEGIN_CRITICAL_SECTION` to lock the dictionary while iterating over it::" +"threading>` build without external synchronization for a mutable :class:" +"`dict`. You can use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to lock the " +"dictionary while iterating over it::" msgstr "" +#: ../../c-api/dict.rst:435 msgid "" "Py_BEGIN_CRITICAL_SECTION(self->dict);\n" "while (PyDict_Next(self->dict, &pos, &key, &value)) {\n" @@ -292,6 +419,11 @@ msgid "" "Py_END_CRITICAL_SECTION();" msgstr "" +#: ../../c-api/dict.rst:441 +msgid "The function is thread-safe on a :class:`frozendict`." +msgstr "" + +#: ../../c-api/dict.rst:445 msgid "" "On the free-threaded build, this function can be used safely inside a " "critical section. However, the references returned for *pkey* and *pvalue* " @@ -302,6 +434,7 @@ msgid "" "`Py_NewRef`)." msgstr "" +#: ../../c-api/dict.rst:458 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` " @@ -311,6 +444,15 @@ msgid "" "or ``-1`` if an exception was raised." msgstr "" +#: ../../c-api/dict.rst:467 ../../c-api/dict.rst:483 +msgid "" +"In the :term:`free-threaded build`, when *b* is a :class:`dict` (with the " +"standard iterator), both *a* and *b* are locked for the duration of the " +"operation. When *b* is a non-dict mapping, only *a* is locked; *b* may be " +"concurrently modified by another thread." +msgstr "" + +#: ../../c-api/dict.rst:475 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 " @@ -319,6 +461,7 @@ msgid "" "exception was raised." msgstr "" +#: ../../c-api/dict.rst:491 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, " @@ -327,6 +470,7 @@ msgid "" "if an exception was raised. Equivalent Python (except for the return value)::" msgstr "" +#: ../../c-api/dict.rst:498 msgid "" "def PyDict_MergeFromSeq2(a, seq2, override):\n" " for key, value in seq2:\n" @@ -334,6 +478,14 @@ msgid "" " a[key] = value" msgstr "" +#: ../../c-api/dict.rst:505 +msgid "" +"In the :term:`free-threaded ` build, only *a* is locked. The " +"iteration over *seq2* is not synchronized; *seq2* may be concurrently " +"modified by another thread." +msgstr "" + +#: ../../c-api/dict.rst:512 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 " @@ -341,18 +493,28 @@ msgid "" "exception." msgstr "" +#: ../../c-api/dict.rst:519 ../../c-api/dict.rst:534 +msgid "" +"This function is not internally synchronized. In the :term:`free-threaded " +"` build, callers should ensure no concurrent calls to :c:" +"func:`PyDict_AddWatcher` or :c:func:`PyDict_ClearWatcher` are in progress." +msgstr "" + +#: ../../c-api/dict.rst:528 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 "" +#: ../../c-api/dict.rst:543 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 "" +#: ../../c-api/dict.rst:551 msgid "" "Mark dictionary *dict* as no longer watched. The callback granted " "*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when " @@ -360,6 +522,7 @@ msgid "" "watched by this watcher. Return ``0`` on success or ``-1`` on error." msgstr "" +#: ../../c-api/dict.rst:560 msgid "" "Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, " "``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, " @@ -367,9 +530,11 @@ msgid "" "``PyDict_EVENT_DEALLOCATED``." msgstr "" +#: ../../c-api/dict.rst:568 msgid "Type of a dict watcher callback function." msgstr "" +#: ../../c-api/dict.rst:570 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`` " @@ -378,6 +543,7 @@ msgid "" "dictionary and *new_value* will be ``NULL``." msgstr "" +#: ../../c-api/dict.rst:576 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 " @@ -385,12 +551,14 @@ msgid "" "``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary." msgstr "" +#: ../../c-api/dict.rst:582 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 "" +#: ../../c-api/dict.rst:586 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 " @@ -399,17 +567,20 @@ msgid "" "again." msgstr "" +#: ../../c-api/dict.rst:592 msgid "" "Callbacks occur before the notified modification to *dict* takes place, so " "the prior state of *dict* can be inspected." msgstr "" +#: ../../c-api/dict.rst:595 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 "" +#: ../../c-api/dict.rst:599 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 " @@ -418,14 +589,219 @@ msgid "" "it before returning." msgstr "" +#: ../../c-api/dict.rst:609 +msgid "Dictionary view objects" +msgstr "" + +#: ../../c-api/dict.rst:613 +msgid "" +"Return true if *op* is a view of a set inside a dictionary. This is " +"currently equivalent to :c:expr:`PyDictKeys_Check(op) || " +"PyDictItems_Check(op)`. This function always succeeds." +msgstr "" + +#: ../../c-api/dict.rst:620 +msgid "" +"Type object for a view of dictionary keys. In Python, this is the type of " +"the object returned by :meth:`dict.keys`." +msgstr "" + +#: ../../c-api/dict.rst:626 +msgid "" +"Return true if *op* is an instance of a dictionary keys view. This function " +"always succeeds." +msgstr "" + +#: ../../c-api/dict.rst:632 +msgid "" +"Type object for a view of dictionary values. In Python, this is the type of " +"the object returned by :meth:`dict.values`." +msgstr "" + +#: ../../c-api/dict.rst:638 +msgid "" +"Return true if *op* is an instance of a dictionary values view. This " +"function always succeeds." +msgstr "" + +#: ../../c-api/dict.rst:644 +msgid "" +"Type object for a view of dictionary items. In Python, this is the type of " +"the object returned by :meth:`dict.items`." +msgstr "" + +#: ../../c-api/dict.rst:650 +msgid "" +"Return true if *op* is an instance of a dictionary items view. This function " +"always succeeds." +msgstr "" + +#: ../../c-api/dict.rst:655 +msgid "Frozen dictionary objects" +msgstr "" + +#: ../../c-api/dict.rst:662 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python frozen " +"dictionary type. This is the same object as :class:`frozendict` in the " +"Python layer." +msgstr "" + +#: ../../c-api/dict.rst:669 +msgid "" +"Return true if *p* is a :class:`dict` object, a :class:`frozendict` object, " +"or an instance of a subtype of the :class:`!dict` or :class:`!frozendict` " +"type. This function always succeeds." +msgstr "" + +#: ../../c-api/dict.rst:677 +msgid "" +"Return true if *p* is a :class:`dict` object or a :class:`frozendict` " +"object, but not an instance of a subtype of the :class:`!dict` or :class:`!" +"frozendict` type. This function always succeeds." +msgstr "" + +#: ../../c-api/dict.rst:685 +msgid "" +"Return true if *p* is a :class:`frozendict` object or an instance of a " +"subtype of the :class:`!frozendict` type. This function always succeeds." +msgstr "" + +#: ../../c-api/dict.rst:692 +msgid "" +"Return true if *p* is a :class:`frozendict` object, but not an instance of a " +"subtype of the :class:`!frozendict` type. This function always succeeds." +msgstr "" + +#: ../../c-api/dict.rst:699 +msgid "" +"Return a new :class:`frozendict` from an iterable, or ``NULL`` on failure " +"with an exception set." +msgstr "" + +#: ../../c-api/dict.rst:702 +msgid "Create an empty dictionary if *iterable* is ``NULL``." +msgstr "" + +#: ../../c-api/dict.rst:706 +msgid "Ordered dictionaries" +msgstr "" + +#: ../../c-api/dict.rst:708 +msgid "" +"Python's C API provides interface for :class:`collections.OrderedDict` from " +"C. Since Python 3.7, dictionaries are ordered by default, so there is " +"usually little need for these functions; prefer ``PyDict*`` where possible." +msgstr "" + +#: ../../c-api/dict.rst:715 +msgid "" +"Type object for ordered dictionaries. This is the same object as :class:" +"`collections.OrderedDict` in the Python layer." +msgstr "" + +#: ../../c-api/dict.rst:721 +msgid "" +"Return true if *od* is an ordered dictionary object or an instance of a " +"subtype of the :class:`~collections.OrderedDict` type. This function always " +"succeeds." +msgstr "" + +#: ../../c-api/dict.rst:728 +msgid "" +"Return true if *od* is an ordered dictionary object, but not an instance of " +"a subtype of the :class:`~collections.OrderedDict` type. This function " +"always succeeds." +msgstr "" + +#: ../../c-api/dict.rst:735 +msgid "Analogous to :c:type:`PyDictKeys_Type` for ordered dictionaries." +msgstr "" + +#: ../../c-api/dict.rst:740 +msgid "Analogous to :c:type:`PyDictValues_Type` for ordered dictionaries." +msgstr "" + +#: ../../c-api/dict.rst:745 +msgid "Analogous to :c:type:`PyDictItems_Type` for ordered dictionaries." +msgstr "" + +#: ../../c-api/dict.rst:750 +msgid "Return a new empty ordered dictionary, or ``NULL`` on failure." +msgstr "" + +#: ../../c-api/dict.rst:752 +msgid "This is analogous to :c:func:`PyDict_New`." +msgstr "" + +#: ../../c-api/dict.rst:757 +msgid "" +"Insert *value* into the ordered dictionary *od* with a key of *key*. Return " +"``0`` on success or ``-1`` with an exception set on failure." +msgstr "" + +#: ../../c-api/dict.rst:760 +msgid "This is analogous to :c:func:`PyDict_SetItem`." +msgstr "" + +#: ../../c-api/dict.rst:765 +msgid "" +"Remove the entry in the ordered dictionary *od* with key *key*. Return ``0`` " +"on success or ``-1`` with an exception set on failure." +msgstr "" + +#: ../../c-api/dict.rst:768 +msgid "This is analogous to :c:func:`PyDict_DelItem`." +msgstr "" + +#: ../../c-api/dict.rst:771 +msgid "These are :term:`soft deprecated` aliases to ``PyDict`` APIs:" +msgstr "" + +#: ../../c-api/dict.rst:778 +msgid "``PyODict``" +msgstr "" + +#: ../../c-api/dict.rst:779 +msgid "``PyDict``" +msgstr "" + +#: ../../c-api/dict.rst:781 +msgid ":c:func:`PyDict_GetItem`" +msgstr "" + +#: ../../c-api/dict.rst:783 +msgid ":c:func:`PyDict_GetItemWithError`" +msgstr "" + +#: ../../c-api/dict.rst:785 +msgid ":c:func:`PyDict_GetItemString`" +msgstr "" + +#: ../../c-api/dict.rst:787 +msgid ":c:func:`PyDict_Contains`" +msgstr "" + +#: ../../c-api/dict.rst:789 +msgid ":c:func:`PyDict_Size`" +msgstr "" + +#: ../../c-api/dict.rst:791 +msgid ":c:func:`PyDict_GET_SIZE`" +msgstr "" + +#: ../../c-api/dict.rst:8 msgid "object" msgstr "" +#: ../../c-api/dict.rst:8 msgid "dictionary" msgstr "" +#: ../../c-api/dict.rst:364 msgid "built-in function" msgstr "" +#: ../../c-api/dict.rst:364 msgid "len" msgstr "" diff --git a/c-api/dict.po~ b/c-api/dict.po~ new file mode 100644 index 00000000..8595354f --- /dev/null +++ b/c-api/dict.po~ @@ -0,0 +1,431 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Dictionary Objects" +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents a Python dictionary object." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python dictionary " +"type. This is the same object as :class:`dict` in the Python layer." +msgstr "" + +msgid "" +"Return true if *p* is a dict object or an instance of a subtype of the dict " +"type. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a dict object, but not an instance of a subtype of the " +"dict type. This function always succeeds." +msgstr "" + +msgid "Return a new empty dictionary, or ``NULL`` on failure." +msgstr "" + +msgid "" +"Return a :class:`types.MappingProxyType` object for a mapping which enforces " +"read-only behavior. This is normally used to create a view to prevent " +"modification of the dictionary for non-dynamic class types." +msgstr "" + +msgid "Empty an existing dictionary of all key-value pairs." +msgstr "" + +msgid "" +"Determine if dictionary *p* contains *key*. If an item in *p* is matches " +"*key*, return ``1``, otherwise return ``0``. On error, return ``-1``. This " +"is equivalent to the Python expression ``key in p``." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyDict_Contains`, but *key* is specified as a :" +"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "Return a new dictionary that contains the same key-value pairs as *p*." +msgstr "" + +msgid "" +"Insert *val* into the dictionary *p* with a key of *key*. *key* must be :" +"term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` " +"on success or ``-1`` on failure. This function *does not* steal a reference " +"to *val*." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyDict_SetItem`, but *key* is specified as a :c:" +"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "" +"Remove the entry in dictionary *p* with key *key*. *key* must be :term:" +"`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not in the " +"dictionary, :exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on " +"failure." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyDict_DelItem`, but *key* is specified as a :c:" +"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "" +"Return a new :term:`strong reference` to the object from dictionary *p* " +"which has a key *key*:" +msgstr "" + +msgid "" +"If the key is present, set *\\*result* to a new :term:`strong reference` to " +"the value and return ``1``." +msgstr "" + +msgid "If the key is missing, set *\\*result* to ``NULL`` and return ``0``." +msgstr "" + +msgid "On error, raise an exception and return ``-1``." +msgstr "" + +msgid "See also the :c:func:`PyObject_GetItem` function." +msgstr "" + +msgid "" +"Return a :term:`borrowed reference` to the object from dictionary *p* which " +"has a key *key*. Return ``NULL`` if the key *key* is missing *without* " +"setting an exception." +msgstr "" + +msgid "" +"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:" +"`~object.__eq__` methods are silently ignored. Prefer the :c:func:" +"`PyDict_GetItemWithError` function instead." +msgstr "" + +msgid "" +"Calling this API without an :term:`attached thread state` had been allowed " +"for historical reason. It is no longer allowed." +msgstr "" + +msgid "" +"Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. " +"Return ``NULL`` **with** an exception set if an exception occurred. Return " +"``NULL`` **without** an exception set if the key wasn't present." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:" +"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "" +"Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:" +"`~object.__eq__` methods or while creating the temporary :class:`str` object " +"are silently ignored. Prefer using the :c:func:`PyDict_GetItemWithError` " +"function with your own :c:func:`PyUnicode_FromString` *key* instead." +msgstr "" + +msgid "" +"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 "" + +msgid "" +"This is the same as the Python-level :meth:`dict.setdefault`. If present, " +"it returns the value corresponding to *key* from the dictionary *p*. If the " +"key is not in the dict, it is inserted with value *defaultobj* and " +"*defaultobj* is returned. This function evaluates the hash function of " +"*key* only once, instead of evaluating it independently for the lookup and " +"the insertion." +msgstr "" + +msgid "" +"Inserts *default_value* into the dictionary *p* with a key of *key* if the " +"key is not already present in the dictionary. If *result* is not ``NULL``, " +"then *\\*result* is set to a :term:`strong reference` to either " +"*default_value*, if the key was not present, or the existing value, if *key* " +"was already present in the dictionary. Returns ``1`` if the key was present " +"and *default_value* was not inserted, or ``0`` if the key was not present " +"and *default_value* was inserted. On failure, returns ``-1``, sets an " +"exception, and sets ``*result`` to ``NULL``." +msgstr "" + +msgid "" +"For clarity: if you have a strong reference to *default_value* before " +"calling this function, then after it returns, you hold a strong reference to " +"both *default_value* and *\\*result* (if it's not ``NULL``). These may refer " +"to the same object: in that case you hold two separate references to it." +msgstr "" + +msgid "" +"Remove *key* from dictionary *p* and optionally return the removed value. Do " +"not raise :exc:`KeyError` if the key missing." +msgstr "" + +msgid "" +"If the key is present, set *\\*result* to a new reference to the removed " +"value if *result* is not ``NULL``, and return ``1``." +msgstr "" + +msgid "" +"If the key is missing, set *\\*result* to ``NULL`` if *result* is not " +"``NULL``, and return ``0``." +msgstr "" + +msgid "" +"Similar to :meth:`dict.pop`, but without the default value and not raising :" +"exc:`KeyError` if the key missing." +msgstr "" + +msgid "" +"Similar to :c:func:`PyDict_Pop`, but *key* is specified as a :c:expr:`const " +"char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`." +msgstr "" + +msgid "" +"Return a :c:type:`PyListObject` containing all the items from the dictionary." +msgstr "" + +msgid "" +"Return a :c:type:`PyListObject` containing all the keys from the dictionary." +msgstr "" + +msgid "" +"Return a :c:type:`PyListObject` containing all the values from the " +"dictionary *p*." +msgstr "" + +msgid "" +"Return the number of items in the dictionary. This is equivalent to " +"``len(p)`` on a dictionary." +msgstr "" + +msgid "" +"Iterate over all key-value pairs in the dictionary *p*. The :c:type:" +"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the " +"first call to this function to start the iteration; the function returns " +"true for each pair in the dictionary, and false once all pairs have been " +"reported. The parameters *pkey* and *pvalue* should either point to :c:expr:" +"`PyObject*` variables that will be filled in with each key and value, " +"respectively, or may be ``NULL``. Any references returned through them are " +"borrowed. *ppos* should not be altered during iteration. Its value " +"represents offsets within the internal dictionary structure, and since the " +"structure is sparse, the offsets are not consecutive." +msgstr "" + +msgid "For example::" +msgstr "Zum Beispiel::" + +msgid "" +"PyObject *key, *value;\n" +"Py_ssize_t pos = 0;\n" +"\n" +"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n" +" /* do something interesting with the values... */\n" +" ...\n" +"}" +msgstr "" + +msgid "" +"The dictionary *p* should not be mutated during iteration. It is safe to " +"modify the values of the keys as you iterate over the dictionary, but only " +"so long as the set of keys does not change. For example::" +msgstr "" + +msgid "" +"PyObject *key, *value;\n" +"Py_ssize_t pos = 0;\n" +"\n" +"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n" +" long i = PyLong_AsLong(value);\n" +" if (i == -1 && PyErr_Occurred()) {\n" +" return -1;\n" +" }\n" +" PyObject *o = PyLong_FromLong(i + 1);\n" +" if (o == NULL)\n" +" return -1;\n" +" if (PyDict_SetItem(self->dict, key, o) < 0) {\n" +" Py_DECREF(o);\n" +" return -1;\n" +" }\n" +" Py_DECREF(o);\n" +"}" +msgstr "" + +msgid "" +"The function is not thread-safe in the :term:`free-threaded ` build without external synchronization. You can use :c:macro:" +"`Py_BEGIN_CRITICAL_SECTION` to lock the dictionary while iterating over it::" +msgstr "" + +msgid "" +"Py_BEGIN_CRITICAL_SECTION(self->dict);\n" +"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n" +" ...\n" +"}\n" +"Py_END_CRITICAL_SECTION();" +msgstr "" + +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 "" + +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` " +"and :c:func:`PyObject_GetItem`. If *override* is true, existing pairs in *a* " +"will be replaced if a matching key is found in *b*, otherwise pairs will " +"only be added if there is not a matching key in *a*. Return ``0`` on success " +"or ``-1`` if an exception was raised." +msgstr "" + +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 " +"to the iterating over a sequence of key value pairs if the second argument " +"has no \"keys\" attribute. Return ``0`` on success or ``-1`` if an " +"exception was raised." +msgstr "" + +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, " +"viewed as key-value pairs. In case of duplicate keys, the last wins if " +"*override* is true, else the first wins. Return ``0`` on success or ``-1`` " +"if an exception was raised. Equivalent Python (except for the return value)::" +msgstr "" + +msgid "" +"def PyDict_MergeFromSeq2(a, seq2, override):\n" +" for key, value in seq2:\n" +" if override or key not in a:\n" +" a[key] = value" +msgstr "" + +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 " +"of error (e.g. no more watcher IDs available), return ``-1`` and set an " +"exception." +msgstr "" + +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 "" + +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 "" + +msgid "" +"Mark dictionary *dict* as no longer watched. The callback granted " +"*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when " +"*dict* is modified or deallocated. The dict must previously have been " +"watched by this watcher. Return ``0`` on success or ``-1`` on error." +msgstr "" + +msgid "" +"Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, " +"``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, " +"``PyDict_EVENT_CLONED``, ``PyDict_EVENT_CLEARED``, or " +"``PyDict_EVENT_DEALLOCATED``." +msgstr "" + +msgid "Type of a dict watcher callback function." +msgstr "" + +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`` " +"or ``PyDict_EVENT_MODIFIED``, *new_value* will be the new value for *key*. " +"If *event* is ``PyDict_EVENT_DELETED``, *key* is being deleted from the " +"dictionary and *new_value* will be ``NULL``." +msgstr "" + +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 " +"``PyDict_EVENT_ADDED`` events are not issued in this case; instead a single " +"``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary." +msgstr "" + +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 "" + +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 " +"prevent it from being freed at this time. When the resurrected object is " +"destroyed later, any watcher callbacks active at that time will be called " +"again." +msgstr "" + +msgid "" +"Callbacks occur before the notified modification to *dict* takes place, so " +"the prior state of *dict* can be inspected." +msgstr "" + +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 "" + +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 "" + +msgid "object" +msgstr "" + +msgid "dictionary" +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "len" +msgstr "" diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 7cb48195..ac9eedd3 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -11,19 +11,21 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/exceptions.rst:8 msgid "Exception Handling" msgstr "" +#: ../../c-api/exceptions.rst:10 msgid "" "The functions described in this chapter will let you handle and raise Python " "exceptions. It is important to understand some of the basics of Python " @@ -36,6 +38,7 @@ msgid "" "functions return ``1`` for success and ``0`` for failure)." msgstr "" +#: ../../c-api/exceptions.rst:20 msgid "" "Concretely, the error indicator consists of three object pointers: the " "exception's type, the exception's value, and the traceback object. Any of " @@ -44,6 +47,7 @@ msgid "" "exception type is ``NULL``)." msgstr "" +#: ../../c-api/exceptions.rst:26 msgid "" "When a function must fail because some function it called failed, it " "generally doesn't set the error indicator; the function it called already " @@ -56,6 +60,7 @@ msgid "" "Python/C API may not behave as intended and may fail in mysterious ways." msgstr "" +#: ../../c-api/exceptions.rst:37 msgid "" "The error indicator is **not** the result of :func:`sys.exc_info`. The " "former corresponds to an exception that is not yet caught (and is therefore " @@ -63,14 +68,17 @@ msgid "" "(and has therefore stopped propagating)." msgstr "" +#: ../../c-api/exceptions.rst:44 msgid "Printing and clearing" msgstr "" +#: ../../c-api/exceptions.rst:49 msgid "" "Clear the error indicator. If the error indicator is not set, there is no " "effect." msgstr "" +#: ../../c-api/exceptions.rst:55 msgid "" "Print a standard traceback to ``sys.stderr`` and clear the error indicator. " "**Unless** the error is a ``SystemExit``, in that case no traceback is " @@ -78,11 +86,13 @@ msgid "" "the ``SystemExit`` instance." msgstr "" +#: ../../c-api/exceptions.rst:60 msgid "" "Call this function **only** when the error indicator is set. Otherwise it " "will cause a fatal error!" msgstr "" +#: ../../c-api/exceptions.rst:63 msgid "" "If *set_sys_last_vars* is nonzero, the variable :data:`sys.last_exc` is set " "to the printed exception. For backwards compatibility, the deprecated " @@ -91,17 +101,21 @@ msgid "" "exception, respectively." msgstr "" +#: ../../c-api/exceptions.rst:69 msgid "The setting of :data:`sys.last_exc` was added." msgstr "" +#: ../../c-api/exceptions.rst:75 msgid "Alias for ``PyErr_PrintEx(1)``." msgstr "" +#: ../../c-api/exceptions.rst:80 msgid "" "Call :func:`sys.unraisablehook` using the current exception and *obj* " "argument." msgstr "" +#: ../../c-api/exceptions.rst:83 msgid "" "This utility function prints a warning message to ``sys.stderr`` when an " "exception has been set but it is impossible for the interpreter to actually " @@ -109,6 +123,7 @@ msgid "" "an :meth:`~object.__del__` method." msgstr "" +#: ../../c-api/exceptions.rst:88 msgid "" "The function is called with a single argument *obj* that identifies the " "context in which the unraisable exception occurred. If possible, the repr of " @@ -116,15 +131,19 @@ msgid "" "traceback is printed." msgstr "" +#: ../../c-api/exceptions.rst:93 msgid "An exception must be set when calling this function." msgstr "" +#: ../../c-api/exceptions.rst:95 msgid "Print a traceback. Print only traceback if *obj* is ``NULL``." msgstr "" +#: ../../c-api/exceptions.rst:98 msgid "Use :func:`sys.unraisablehook`." msgstr "" +#: ../../c-api/exceptions.rst:104 msgid "" "Similar to :c:func:`PyErr_WriteUnraisable`, but the *format* and subsequent " "parameters help format the warning message; they have the same meaning and " @@ -133,20 +152,45 @@ msgid "" "%R\", obj)``. If *format* is ``NULL``, only the traceback is printed." msgstr "" +#: ../../c-api/exceptions.rst:116 msgid "" "Print the standard traceback display of ``exc`` to ``sys.stderr``, including " "chained exceptions and notes." msgstr "" +#: ../../c-api/exceptions.rst:124 +msgid "Legacy variant of :c:func:`PyErr_DisplayException`." +msgstr "" + +#: ../../c-api/exceptions.rst:126 +msgid "" +"Print the exception *value* with its traceback to :data:`sys.stderr`. If " +"*value* has no traceback set, *tb* is used as its traceback. The first " +"argument is ignored." +msgstr "" + +#: ../../c-api/exceptions.rst:130 +msgid "" +"If :data:`sys.stderr` is ``None``, nothing is printed. If :data:`sys.stderr` " +"is not set, the exception is dumped to the C ``stderr`` stream instead." +msgstr "" + +#: ../../c-api/exceptions.rst:134 +msgid "Use :c:func:`PyErr_DisplayException` instead." +msgstr "" + +#: ../../c-api/exceptions.rst:138 msgid "Raising exceptions" msgstr "" +#: ../../c-api/exceptions.rst:140 msgid "" "These functions help you set the current thread's error indicator. For " "convenience, some of these functions will always return a ``NULL`` pointer " "for use in a ``return`` statement." msgstr "" +#: ../../c-api/exceptions.rst:147 msgid "" "This is the most common way to set the error indicator. The first argument " "specifies the exception type; it is normally one of the standard exceptions, " @@ -155,11 +199,13 @@ msgid "" "error message; it is decoded from ``'utf-8'``." msgstr "" +#: ../../c-api/exceptions.rst:156 msgid "" "This function is similar to :c:func:`PyErr_SetString` but lets you specify " "an arbitrary Python object for the \"value\" of the exception." msgstr "" +#: ../../c-api/exceptions.rst:162 msgid "" "This function sets the error indicator and returns ``NULL``. *exception* " "should be a Python exception class. The *format* and subsequent parameters " @@ -167,26 +213,31 @@ msgid "" "c:func:`PyUnicode_FromFormat`. *format* is an ASCII-encoded string." msgstr "" +#: ../../c-api/exceptions.rst:171 msgid "" "Same as :c:func:`PyErr_Format`, but taking a :c:type:`va_list` argument " "rather than a variable number of arguments." msgstr "" +#: ../../c-api/exceptions.rst:179 msgid "This is a shorthand for ``PyErr_SetObject(type, Py_None)``." msgstr "" +#: ../../c-api/exceptions.rst:184 msgid "" "This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where " "*message* indicates that a built-in operation was invoked with an illegal " "argument. It is mostly for internal use." msgstr "" +#: ../../c-api/exceptions.rst:191 msgid "" "This is a shorthand for ``PyErr_SetNone(PyExc_MemoryError)``; it returns " "``NULL`` so an object allocation function can write ``return " "PyErr_NoMemory();`` when it runs out of memory." msgstr "" +#: ../../c-api/exceptions.rst:200 msgid "" "This is a convenience function to raise an exception when a C library " "function has returned an error and set the C variable :c:data:`errno`. It " @@ -200,6 +251,7 @@ msgid "" "``return PyErr_SetFromErrno(type);`` when the system call returns an error." msgstr "" +#: ../../c-api/exceptions.rst:214 msgid "" "Similar to :c:func:`PyErr_SetFromErrno`, with the additional behavior that " "if *filenameObject* is not ``NULL``, it is passed to the constructor of " @@ -207,18 +259,21 @@ msgid "" "is used to define the :attr:`!filename` attribute of the exception instance." msgstr "" +#: ../../c-api/exceptions.rst:223 msgid "" "Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but takes a " "second filename object, for raising errors when a function that takes two " "filenames fails." msgstr "" +#: ../../c-api/exceptions.rst:232 msgid "" "Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but the filename " "is given as a C string. *filename* is decoded from the :term:`filesystem " "encoding and error handler`." msgstr "" +#: ../../c-api/exceptions.rst:239 msgid "" "This is a convenience function to raise :exc:`OSError`. If called with " "*ierr* of ``0``, the error code returned by a call to :c:func:`!" @@ -232,14 +287,19 @@ msgid "" "``NULL``." msgstr "" +#: ../../c-api/exceptions.rst:249 ../../c-api/exceptions.rst:257 +#: ../../c-api/exceptions.rst:268 ../../c-api/exceptions.rst:278 +#: ../../c-api/exceptions.rst:286 ../../c-api/exceptions.rst:296 msgid "Availability" msgstr "" +#: ../../c-api/exceptions.rst:254 msgid "" "Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter " "specifying the exception type to be raised." msgstr "" +#: ../../c-api/exceptions.rst:262 msgid "" "Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior " "that if *filename* is not ``NULL``, it is decoded from the filesystem " @@ -248,6 +308,7 @@ msgid "" "attribute of the exception instance." msgstr "" +#: ../../c-api/exceptions.rst:273 msgid "" "Similar to :c:func:`PyErr_SetExcFromWindowsErr`, with the additional " "behavior that if *filename* is not ``NULL``, it is passed to the constructor " @@ -255,16 +316,19 @@ msgid "" "filename` attribute of the exception instance." msgstr "" +#: ../../c-api/exceptions.rst:283 msgid "" "Similar to :c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject`, but " "accepts a second filename object." msgstr "" +#: ../../c-api/exceptions.rst:293 msgid "" "Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional " "parameter specifying the exception type to be raised." msgstr "" +#: ../../c-api/exceptions.rst:301 msgid "" "This is a convenience function to raise :exc:`ImportError`. *msg* will be " "set as the exception's message string. *name* and *path*, both of which can " @@ -272,11 +336,13 @@ msgid "" "``path`` attributes." msgstr "" +#: ../../c-api/exceptions.rst:311 msgid "" "Much like :c:func:`PyErr_SetImportError` but this function allows for " "specifying a subclass of :exc:`ImportError` to raise." msgstr "" +#: ../../c-api/exceptions.rst:319 msgid "" "Set file, line, and offset information for the current exception. If the " "current exception is not a :exc:`SyntaxError`, then it sets additional " @@ -284,16 +350,25 @@ msgid "" "is a :exc:`SyntaxError`." msgstr "" +#: ../../c-api/exceptions.rst:329 +msgid "" +"Similar to :c:func:`PyErr_SyntaxLocationObject`, but also sets the " +"*end_lineno* and *end_col_offset* information for the current exception." +msgstr "" + +#: ../../c-api/exceptions.rst:337 msgid "" "Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string " "decoded from the :term:`filesystem encoding and error handler`." msgstr "" +#: ../../c-api/exceptions.rst:345 msgid "" "Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " "omitted." msgstr "" +#: ../../c-api/exceptions.rst:351 msgid "" "This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, " "where *message* indicates that an internal operation (e.g. a Python/C API " @@ -301,9 +376,30 @@ msgid "" "use." msgstr "" +#: ../../c-api/exceptions.rst:359 +msgid "" +"Get the source line in *filename* at line *lineno*. *filename* should be a " +"Python :class:`str` object." +msgstr "" + +#: ../../c-api/exceptions.rst:362 +msgid "" +"On success, this function returns a Python string object with the found " +"line. On failure, this function returns ``NULL`` without an exception set." +msgstr "" + +#: ../../c-api/exceptions.rst:368 +msgid "" +"Similar to :c:func:`PyErr_ProgramTextObject`, but *filename* is a :c:expr:" +"`const char *`, which is decoded with the :term:`filesystem encoding and " +"error handler`, instead of a Python object reference." +msgstr "" + +#: ../../c-api/exceptions.rst:375 msgid "Issuing warnings" msgstr "" +#: ../../c-api/exceptions.rst:377 msgid "" "Use these functions to issue warnings from C code. They mirror similar " "functions exported by the Python :mod:`warnings` module. They normally " @@ -319,6 +415,7 @@ msgid "" "return an error value)." msgstr "" +#: ../../c-api/exceptions.rst:392 msgid "" "Issue a warning message. The *category* argument is a warning category (see " "below) or ``NULL``; the *message* argument is a UTF-8 encoded string. " @@ -328,6 +425,7 @@ msgid "" "`PyErr_WarnEx`, 2 is the function above that, and so forth." msgstr "" +#: ../../c-api/exceptions.rst:399 msgid "" "Warning categories must be subclasses of :c:data:`PyExc_Warning`; :c:data:" "`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the default " @@ -336,12 +434,14 @@ msgid "" "enumerated at :ref:`standardwarningcategories`." msgstr "" +#: ../../c-api/exceptions.rst:405 msgid "" "For information about warning control, see the documentation for the :mod:" "`warnings` module and the :option:`-W` option in the command line " "documentation. There is no C API for warning control." msgstr "" +#: ../../c-api/exceptions.rst:412 msgid "" "Issue a warning message with explicit control over all warning attributes. " "This is a straightforward wrapper around the Python function :func:`warnings." @@ -349,27 +449,39 @@ msgid "" "arguments may be set to ``NULL`` to get the default effect described there." msgstr "" +#: ../../c-api/exceptions.rst:423 msgid "" "Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and " "*module* are UTF-8 encoded strings, and *filename* is decoded from the :term:" "`filesystem encoding and error handler`." msgstr "" +#: ../../c-api/exceptions.rst:430 msgid "" -"Function similar to :c:func:`PyErr_WarnEx`, but use :c:func:" +"Function similar to :c:func:`PyErr_WarnEx`, but uses :c:func:" "`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" "encoded string." msgstr "" +#: ../../c-api/exceptions.rst:439 +msgid "" +"Similar to :c:func:`PyErr_WarnExplicit`, but uses :c:func:" +"`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" +"encoded string." +msgstr "" + +#: ../../c-api/exceptions.rst:448 msgid "" "Function similar to :c:func:`PyErr_WarnFormat`, but *category* is :exc:" "`ResourceWarning` and it passes *source* to :class:`!warnings." "WarningMessage`." msgstr "" +#: ../../c-api/exceptions.rst:455 msgid "Querying the error indicator" msgstr "" +#: ../../c-api/exceptions.rst:459 msgid "" "Test whether the error indicator is set. If set, return the exception " "*type* (the first argument to the last call to one of the ``PyErr_Set*`` " @@ -378,9 +490,11 @@ msgid "" "`Py_DECREF` it." msgstr "" +#: ../../c-api/exceptions.rst:465 msgid "The caller must have an :term:`attached thread state`." msgstr "" +#: ../../c-api/exceptions.rst:469 msgid "" "Do not compare the return value to a specific exception; use :c:func:" "`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily " @@ -388,12 +502,14 @@ msgid "" "of a class exception, or it may be a subclass of the expected exception.)" msgstr "" +#: ../../c-api/exceptions.rst:477 msgid "" "Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This " "should only be called when an exception is actually set; a memory access " "violation will occur if no exception has been raised." msgstr "" +#: ../../c-api/exceptions.rst:484 msgid "" "Return true if the *given* exception matches the exception type in *exc*. " "If *exc* is a class object, this also returns true when *given* is an " @@ -401,19 +517,23 @@ msgid "" "tuple (and recursively in subtuples) are searched for a match." msgstr "" +#: ../../c-api/exceptions.rst:492 msgid "" "Return the exception currently being raised, clearing the error indicator at " "the same time. Return ``NULL`` if the error indicator is not set." msgstr "" +#: ../../c-api/exceptions.rst:495 msgid "" "This function is used by code that needs to catch exceptions, or code that " "needs to save and restore the error indicator temporarily." msgstr "" +#: ../../c-api/exceptions.rst:498 ../../c-api/exceptions.rst:543 msgid "For example::" msgstr "Zum Beispiel::" +#: ../../c-api/exceptions.rst:500 msgid "" "{\n" " PyObject *exc = PyErr_GetRaisedException();\n" @@ -424,22 +544,32 @@ msgid "" "}" msgstr "" +#: ../../c-api/exceptions.rst:508 msgid "" ":c:func:`PyErr_GetHandledException`, to save the exception currently being " "handled." msgstr "" +#: ../../c-api/exceptions.rst:516 msgid "" "Set *exc* as the exception currently being raised, clearing the existing " -"exception if one is set." +"exception if one is set. If *exc* is ``NULL``, just clear the existing " +"exception." +msgstr "" + +#: ../../c-api/exceptions.rst:520 +msgid "*exc* must be a valid exception or ``NULL``." msgstr "" -msgid "This call steals a reference to *exc*, which must be a valid exception." +#: ../../c-api/exceptions.rst:522 +msgid "This call \":term:`steals `\" a reference to *exc*." msgstr "" +#: ../../c-api/exceptions.rst:531 msgid "Use :c:func:`PyErr_GetRaisedException` instead." msgstr "" +#: ../../c-api/exceptions.rst:533 msgid "" "Retrieve the error indicator into three variables whose addresses are " "passed. If the error indicator is not set, set all three variables to " @@ -448,11 +578,13 @@ msgid "" "the type object is not." msgstr "" +#: ../../c-api/exceptions.rst:540 msgid "" "This function is normally only used by legacy code that needs to catch " "exceptions or save and restore the error indicator temporarily." msgstr "" +#: ../../c-api/exceptions.rst:545 msgid "" "{\n" " PyObject *type, *value, *traceback;\n" @@ -464,9 +596,11 @@ msgid "" "}" msgstr "" +#: ../../c-api/exceptions.rst:559 msgid "Use :c:func:`PyErr_SetRaisedException` instead." msgstr "" +#: ../../c-api/exceptions.rst:561 msgid "" "Set the error indicator from the three objects, *type*, *value*, and " "*traceback*, clearing the existing exception if one is set. If the objects " @@ -479,17 +613,20 @@ msgid "" "don't use this function. I warned you.)" msgstr "" +#: ../../c-api/exceptions.rst:575 msgid "" "This function is normally only used by legacy code that needs to save and " "restore the error indicator temporarily. Use :c:func:`PyErr_Fetch` to save " "the current error indicator." msgstr "" +#: ../../c-api/exceptions.rst:584 msgid "" "Use :c:func:`PyErr_GetRaisedException` instead, to avoid any possible de-" "normalization." msgstr "" +#: ../../c-api/exceptions.rst:587 msgid "" "Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " "below can be \"unnormalized\", meaning that ``*exc`` is a class object but " @@ -499,18 +636,21 @@ msgid "" "improve performance." msgstr "" +#: ../../c-api/exceptions.rst:595 msgid "" "This function *does not* implicitly set the :attr:`~BaseException." "__traceback__` attribute on the exception value. If setting the traceback " "appropriately is desired, the following additional snippet is needed::" msgstr "" +#: ../../c-api/exceptions.rst:600 msgid "" "if (tb != NULL) {\n" " PyException_SetTraceback(val, tb);\n" "}" msgstr "" +#: ../../c-api/exceptions.rst:607 msgid "" "Retrieve the active exception instance, as would be returned by :func:`sys." "exception`. This refers to an exception that was *already caught*, not to an " @@ -518,6 +658,7 @@ msgid "" "or ``NULL``. Does not modify the interpreter's exception state." msgstr "" +#: ../../c-api/exceptions.rst:614 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -525,12 +666,14 @@ msgid "" "clear the exception state." msgstr "" +#: ../../c-api/exceptions.rst:623 msgid "" "Set the active exception, as known from ``sys.exception()``. This refers to " "an exception that was *already caught*, not to an exception that was freshly " "raised. To clear the exception state, pass ``NULL``." msgstr "" +#: ../../c-api/exceptions.rst:630 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -538,6 +681,7 @@ msgid "" "exception state." msgstr "" +#: ../../c-api/exceptions.rst:639 msgid "" "Retrieve the old-style representation of the exception info, as known from :" "func:`sys.exc_info`. This refers to an exception that was *already caught*, " @@ -547,6 +691,7 @@ msgid "" "using :c:func:`PyErr_GetHandledException`." msgstr "" +#: ../../c-api/exceptions.rst:648 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -554,15 +699,17 @@ msgid "" "exception state." msgstr "" +#: ../../c-api/exceptions.rst:658 msgid "" "Set the exception info, as known from ``sys.exc_info()``. This refers to an " "exception that was *already caught*, not to an exception that was freshly " -"raised. This function steals the references of the arguments. To clear the " -"exception state, pass ``NULL`` for all three arguments. This function is " -"kept for backwards compatibility. Prefer using :c:func:" -"`PyErr_SetHandledException`." +"raised. This function \":term:`steals `\" the references of the " +"arguments. To clear the exception state, pass ``NULL`` for all three " +"arguments. This function is kept for backwards compatibility. Prefer using :" +"c:func:`PyErr_SetHandledException`." msgstr "" +#: ../../c-api/exceptions.rst:668 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -570,64 +717,119 @@ msgid "" "state." msgstr "" +#: ../../c-api/exceptions.rst:675 msgid "" "The ``type`` and ``traceback`` arguments are no longer used and can be NULL. " "The interpreter now derives them from the exception instance (the ``value`` " -"argument). The function still steals references of all three arguments." +"argument). The function still \":term:`steals `\" references of all " +"three arguments." msgstr "" +#: ../../c-api/exceptions.rst:683 msgid "Signal Handling" msgstr "" -msgid "This function interacts with Python's signal handling." +#: ../../c-api/exceptions.rst:693 +msgid "" +"Handle external interruptions, such as signals or activating a debugger, " +"whose processing has been delayed until it is safe to run Python code and/or " +"raise exceptions." +msgstr "" + +#: ../../c-api/exceptions.rst:697 +msgid "" +"For example, pressing :kbd:`Ctrl-C` causes a terminal to send the :py:data:" +"`signal.SIGINT` signal. This function executes the corresponding Python " +"signal handler, which, by default, raises the :exc:`KeyboardInterrupt` " +"exception." msgstr "" +#: ../../c-api/exceptions.rst:702 msgid "" -"If the function is called from the main thread and under the main Python " -"interpreter, it checks whether a signal has been sent to the processes and " -"if so, invokes the corresponding signal handler. If the :mod:`signal` " -"module is supported, this can invoke a signal handler written in Python." +":c:func:`!PyErr_CheckSignals` should be called by long-running C code " +"frequently enough so that the response appears immediate to humans." +msgstr "" + +#: ../../c-api/exceptions.rst:705 +msgid "Handlers invoked by this function currently include:" msgstr "" +#: ../../c-api/exceptions.rst:707 msgid "" -"The function attempts to handle all pending signals, and then returns ``0``. " -"However, if a Python signal handler raises an exception, the error indicator " -"is set and the function returns ``-1`` immediately (such that other pending " -"signals may not have been handled yet: they will be on the next :c:func:" -"`PyErr_CheckSignals()` invocation)." +"Signal handlers, including Python functions registered using the :mod:" +"`signal` module." msgstr "" +#: ../../c-api/exceptions.rst:710 msgid "" -"If the function is called from a non-main thread, or under a non-main Python " -"interpreter, it does nothing and returns ``0``." +"Signal handlers are only run in the main thread of the main interpreter." msgstr "" +#: ../../c-api/exceptions.rst:712 msgid "" -"This function can be called by long-running C code that wants to be " -"interruptible by user requests (such as by pressing Ctrl-C)." +"(This is where the function got the name: originally, signals were the only " +"way to interrupt the interpreter.)" +msgstr "" + +#: ../../c-api/exceptions.rst:715 +msgid "Running the garbage collector, if necessary." +msgstr "" + +#: ../../c-api/exceptions.rst:717 +msgid "Executing a pending :ref:`remote debugger ` script." +msgstr "" + +#: ../../c-api/exceptions.rst:719 +msgid "Raise the exception set by :c:func:`PyThreadState_SetAsyncExc`." msgstr "" +#: ../../c-api/exceptions.rst:721 msgid "" -"The default Python signal handler for :c:macro:`!SIGINT` raises the :exc:" -"`KeyboardInterrupt` exception." +"If any handler raises an exception, immediately return ``-1`` with that " +"exception set. Any remaining interruptions are left to be processed on the " +"next :c:func:`PyErr_CheckSignals()` invocation, if appropriate." msgstr "" +#: ../../c-api/exceptions.rst:726 +msgid "" +"If all handlers finish successfully, or there are no handlers to run, return " +"``0``." +msgstr "" + +#: ../../c-api/exceptions.rst:729 +msgid "This function may now invoke the garbage collector." +msgstr "" + +#: ../../c-api/exceptions.rst:732 +msgid "" +"This function may now execute a remote debugger script, if remote debugging " +"is enabled." +msgstr "" + +#: ../../c-api/exceptions.rst:736 +msgid "The exception set by :c:func:`PyThreadState_SetAsyncExc` is now raised." +msgstr "" + +#: ../../c-api/exceptions.rst:747 msgid "" "Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is " "equivalent to ``PyErr_SetInterruptEx(SIGINT)``." msgstr "" +#: ../../c-api/exceptions.rst:751 ../../c-api/exceptions.rst:778 msgid "" "This function is async-signal-safe. It can be called without an :term:" "`attached thread state` and from a C signal handler." msgstr "" +#: ../../c-api/exceptions.rst:761 msgid "" "Simulate the effect of a signal arriving. The next time :c:func:" "`PyErr_CheckSignals` is called, the Python signal handler for the given " "signal number will be called." msgstr "" +#: ../../c-api/exceptions.rst:765 msgid "" "This function can be called by C code that sets up its own signal handling " "and wants Python signal handlers to be invoked as expected when an " @@ -635,23 +837,27 @@ msgid "" "interrupt an operation)." msgstr "" +#: ../../c-api/exceptions.rst:770 msgid "" "If the given signal isn't handled by Python (it was set to :py:const:`signal." "SIG_DFL` or :py:const:`signal.SIG_IGN`), it will be ignored." msgstr "" +#: ../../c-api/exceptions.rst:773 msgid "" "If *signum* is outside of the allowed range of signal numbers, ``-1`` is " "returned. Otherwise, ``0`` is returned. The error indicator is never " "changed by this function." msgstr "" +#: ../../c-api/exceptions.rst:786 msgid "" "This utility function specifies a file descriptor to which the signal number " "is written as a single byte whenever a signal is received. *fd* must be non-" "blocking. It returns the previous such file descriptor." msgstr "" +#: ../../c-api/exceptions.rst:790 msgid "" "The value ``-1`` disables the feature; this is the initial state. This is " "equivalent to :func:`signal.set_wakeup_fd` in Python, but without any error " @@ -659,12 +865,15 @@ msgid "" "be called from the main thread." msgstr "" +#: ../../c-api/exceptions.rst:795 msgid "On Windows, the function now also supports socket handles." msgstr "" +#: ../../c-api/exceptions.rst:800 msgid "Exception Classes" msgstr "" +#: ../../c-api/exceptions.rst:804 msgid "" "This utility function creates and returns a new exception class. The *name* " "argument must be the name of the new exception, a C string of the form " @@ -673,6 +882,7 @@ msgid "" "(accessible in C as :c:data:`PyExc_Exception`)." msgstr "" +#: ../../c-api/exceptions.rst:810 msgid "" "The :attr:`~type.__module__` attribute of the new class is set to the first " "part (up to the last dot) of the *name* argument, and the class name is set " @@ -682,34 +892,63 @@ msgid "" "variables and methods." msgstr "" +#: ../../c-api/exceptions.rst:819 msgid "" "Same as :c:func:`PyErr_NewException`, except that the new exception class " "can easily be given a docstring: If *doc* is non-``NULL``, it will be used " "as the docstring for the exception class." msgstr "" +#: ../../c-api/exceptions.rst:828 msgid "" "Return non-zero if *ob* is an exception class, zero otherwise. This function " "always succeeds." msgstr "" +#: ../../c-api/exceptions.rst:833 msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." msgstr "" +#: ../../c-api/exceptions.rst:838 +msgid "This is a macro including the base fields for an exception object." +msgstr "" + +#: ../../c-api/exceptions.rst:841 +msgid "" +"This was included in Python's C API by mistake and is not designed for use " +"in extensions. For creating custom exception objects, use :c:func:" +"`PyErr_NewException` or otherwise create a class inheriting from :c:data:" +"`PyExc_BaseException`." +msgstr "" + +#: ../../c-api/exceptions.rst:850 msgid "Exception Objects" msgstr "" +#: ../../c-api/exceptions.rst:854 +msgid "" +"Return true if *op* is an instance of :class:`BaseException`, false " +"otherwise. This function always succeeds." +msgstr "" + +#: ../../c-api/exceptions.rst:860 +msgid "Equivalent to :c:func:`Py_TYPE(op) `." +msgstr "" + +#: ../../c-api/exceptions.rst:865 msgid "" "Return the traceback associated with the exception as a new reference, as " "accessible from Python through the :attr:`~BaseException.__traceback__` " "attribute. If there is no traceback associated, this returns ``NULL``." msgstr "" +#: ../../c-api/exceptions.rst:873 msgid "" "Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " "clear it." msgstr "" +#: ../../c-api/exceptions.rst:879 msgid "" "Return the context (another exception instance during whose handling *ex* " "was raised) associated with the exception as a new reference, as accessible " @@ -717,12 +956,14 @@ msgid "" "there is no context associated, this returns ``NULL``." msgstr "" +#: ../../c-api/exceptions.rst:887 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 " -"instance. This steals a reference to *ctx*." +"instance. This \":term:`steals `\" a reference to *ctx*." msgstr "" +#: ../../c-api/exceptions.rst:894 msgid "" "Return the cause (either an exception instance, or ``None``, set by " "``raise ... from ...``) associated with the exception as a new reference, as " @@ -730,23 +971,29 @@ msgid "" "attribute." msgstr "" +#: ../../c-api/exceptions.rst:902 msgid "" "Set the cause associated with the exception to *cause*. Use ``NULL`` to " "clear it. There is no type check to make sure that *cause* is either an " -"exception instance or ``None``. This steals a reference to *cause*." +"exception instance or ``None``. This \":term:`steals `\" a reference " +"to *cause*." msgstr "" +#: ../../c-api/exceptions.rst:907 msgid "" "The :attr:`~BaseException.__suppress_context__` attribute is implicitly set " "to ``True`` by this function." msgstr "" +#: ../../c-api/exceptions.rst:913 msgid "Return :attr:`~BaseException.args` of exception *ex*." msgstr "" +#: ../../c-api/exceptions.rst:918 msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." msgstr "" +#: ../../c-api/exceptions.rst:922 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 " @@ -758,80 +1005,98 @@ msgid "" "if there is nothing to reraise." msgstr "" +#: ../../c-api/exceptions.rst:936 msgid "Unicode Exception Objects" msgstr "" +#: ../../c-api/exceptions.rst:938 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" +#: ../../c-api/exceptions.rst:942 msgid "" "Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, " "*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " "UTF-8 encoded strings." msgstr "" +#: ../../c-api/exceptions.rst:949 msgid "Return the *encoding* attribute of the given exception object." msgstr "" +#: ../../c-api/exceptions.rst:955 msgid "Return the *object* attribute of the given exception object." msgstr "" +#: ../../c-api/exceptions.rst:961 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`` " "on failure." msgstr "" +#: ../../c-api/exceptions.rst:965 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 "" +#: ../../c-api/exceptions.rst:968 msgid ":attr:`UnicodeError.start`" msgstr "" +#: ../../c-api/exceptions.rst:974 msgid "" "Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" +#: ../../c-api/exceptions.rst:979 msgid "" "While passing a negative *start* does not raise an exception, the " "corresponding getters will not consider it as a relative offset." msgstr "" +#: ../../c-api/exceptions.rst:987 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 " "failure." msgstr "" +#: ../../c-api/exceptions.rst:991 msgid "" "If the :attr:`UnicodeError.object` is an empty sequence, the resulting *end* " "is ``0``. Otherwise, it is clipped to ``[1, len(object)]``." msgstr "" +#: ../../c-api/exceptions.rst:998 msgid "" "Set the *end* attribute of the given exception object to *end*. Return " "``0`` on success, ``-1`` on failure." msgstr "" +#: ../../c-api/exceptions.rst:1001 msgid ":attr:`UnicodeError.end`" msgstr "" +#: ../../c-api/exceptions.rst:1007 msgid "Return the *reason* attribute of the given exception object." msgstr "" +#: ../../c-api/exceptions.rst:1013 msgid "" "Set the *reason* attribute of the given exception object to *reason*. " "Return ``0`` on success, ``-1`` on failure." msgstr "" +#: ../../c-api/exceptions.rst:1020 msgid "Recursion Control" msgstr "" +#: ../../c-api/exceptions.rst:1022 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 " @@ -841,44 +1106,56 @@ msgid "" "recursion handling." msgstr "" +#: ../../c-api/exceptions.rst:1031 msgid "Marks a point where a recursive C-level call is about to be performed." msgstr "" +#: ../../c-api/exceptions.rst:1033 msgid "" "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 "" +#: ../../c-api/exceptions.rst:1037 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 " "recursion depth limit." msgstr "" +#: ../../c-api/exceptions.rst:1042 +msgid "The :c:func:`PyUnstable_ThreadState_SetStackProtection` function." +msgstr "" + +#: ../../c-api/exceptions.rst:1044 ../../c-api/exceptions.rst:1052 msgid "" "This function is now also available in the :ref:`limited API `." msgstr "" +#: ../../c-api/exceptions.rst:1049 msgid "" "Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " "*successful* invocation of :c:func:`Py_EnterRecursiveCall`." msgstr "" +#: ../../c-api/exceptions.rst:1055 msgid "" "Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " "requires special recursion handling. In addition to protecting the stack, :" "c:member:`~PyTypeObject.tp_repr` also needs to track objects to prevent " "cycles. The following two functions facilitate this functionality. " -"Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." +"Effectively, these are the C equivalent to :deco:`reprlib.recursive_repr`." msgstr "" +#: ../../c-api/exceptions.rst:1063 msgid "" "Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " "implementation to detect cycles." msgstr "" +#: ../../c-api/exceptions.rst:1066 msgid "" "If the object has already been processed, the function returns a positive " "integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -886,208 +1163,305 @@ msgid "" "`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." msgstr "" +#: ../../c-api/exceptions.rst:1072 msgid "" "The function will return a negative integer if the recursion limit is " "reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " "should typically return ``NULL``." msgstr "" +#: ../../c-api/exceptions.rst:1076 msgid "" "Otherwise, the function returns zero and the :c:member:`~PyTypeObject." "tp_repr` implementation can continue normally." msgstr "" +#: ../../c-api/exceptions.rst:1081 msgid "" "Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" "c:func:`Py_ReprEnter` that returns zero." msgstr "" +#: ../../c-api/exceptions.rst:1086 +msgid "" +"Get the recursion limit for the current interpreter. It can be set with :c:" +"func:`Py_SetRecursionLimit`. The recursion limit prevents the Python " +"interpreter stack from growing infinitely." +msgstr "" + +#: ../../c-api/exceptions.rst:1090 ../../c-api/exceptions.rst:1100 +msgid "" +"This function cannot fail, and the caller must hold an :term:`attached " +"thread state`." +msgstr "" + +#: ../../c-api/exceptions.rst:1094 +msgid ":py:func:`sys.getrecursionlimit`" +msgstr "" + +#: ../../c-api/exceptions.rst:1098 +msgid "Set the recursion limit for the current interpreter." +msgstr "" + +#: ../../c-api/exceptions.rst:1104 +msgid ":py:func:`sys.setrecursionlimit`" +msgstr "" + +#: ../../c-api/exceptions.rst:1109 msgid "Exception and warning types" msgstr "" +#: ../../c-api/exceptions.rst:1111 msgid "" "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 "" +#: ../../c-api/exceptions.rst:1115 msgid "For completeness, here are all the variables:" msgstr "" +#: ../../c-api/exceptions.rst:1118 msgid "Exception types" msgstr "" +#: ../../c-api/exceptions.rst:1125 ../../c-api/exceptions.rst:1273 +#: ../../c-api/exceptions.rst:1303 msgid "C name" msgstr "" +#: ../../c-api/exceptions.rst:1126 ../../c-api/exceptions.rst:1274 +#: ../../c-api/exceptions.rst:1304 msgid "Python name" msgstr "" +#: ../../c-api/exceptions.rst:1128 msgid ":exc:`BaseException`" msgstr "" +#: ../../c-api/exceptions.rst:1130 msgid ":exc:`BaseExceptionGroup`" msgstr "" +#: ../../c-api/exceptions.rst:1132 msgid ":exc:`Exception`" msgstr "" +#: ../../c-api/exceptions.rst:1134 msgid ":exc:`ArithmeticError`" msgstr "" +#: ../../c-api/exceptions.rst:1136 msgid ":exc:`AssertionError`" msgstr "" +#: ../../c-api/exceptions.rst:1138 msgid ":exc:`AttributeError`" msgstr "" +#: ../../c-api/exceptions.rst:1140 msgid ":exc:`BlockingIOError`" msgstr "" +#: ../../c-api/exceptions.rst:1142 msgid ":exc:`BrokenPipeError`" msgstr "" +#: ../../c-api/exceptions.rst:1144 msgid ":exc:`BufferError`" msgstr "" +#: ../../c-api/exceptions.rst:1146 msgid ":exc:`ChildProcessError`" msgstr "" +#: ../../c-api/exceptions.rst:1148 msgid ":exc:`ConnectionAbortedError`" msgstr "" +#: ../../c-api/exceptions.rst:1150 msgid ":exc:`ConnectionError`" msgstr "" +#: ../../c-api/exceptions.rst:1152 msgid ":exc:`ConnectionRefusedError`" msgstr "" +#: ../../c-api/exceptions.rst:1154 msgid ":exc:`ConnectionResetError`" msgstr "" +#: ../../c-api/exceptions.rst:1156 msgid ":exc:`EOFError`" msgstr "" +#: ../../c-api/exceptions.rst:1158 msgid ":exc:`FileExistsError`" msgstr "" +#: ../../c-api/exceptions.rst:1160 msgid ":exc:`FileNotFoundError`" msgstr "" +#: ../../c-api/exceptions.rst:1162 msgid ":exc:`FloatingPointError`" msgstr "" +#: ../../c-api/exceptions.rst:1164 msgid ":exc:`GeneratorExit`" msgstr "" +#: ../../c-api/exceptions.rst:1166 +msgid ":exc:`ImportCycleError`" +msgstr "" + +#: ../../c-api/exceptions.rst:1168 msgid ":exc:`ImportError`" msgstr "" +#: ../../c-api/exceptions.rst:1170 msgid ":exc:`IndentationError`" msgstr "" +#: ../../c-api/exceptions.rst:1172 msgid ":exc:`IndexError`" msgstr "" +#: ../../c-api/exceptions.rst:1174 msgid ":exc:`InterruptedError`" msgstr "" +#: ../../c-api/exceptions.rst:1176 msgid ":exc:`IsADirectoryError`" msgstr "" +#: ../../c-api/exceptions.rst:1178 msgid ":exc:`KeyError`" msgstr "" +#: ../../c-api/exceptions.rst:1180 msgid ":exc:`KeyboardInterrupt`" msgstr "" +#: ../../c-api/exceptions.rst:1182 msgid ":exc:`LookupError`" msgstr "" +#: ../../c-api/exceptions.rst:1184 msgid ":exc:`MemoryError`" msgstr "" +#: ../../c-api/exceptions.rst:1186 msgid ":exc:`ModuleNotFoundError`" msgstr "" +#: ../../c-api/exceptions.rst:1188 msgid ":exc:`NameError`" msgstr "" +#: ../../c-api/exceptions.rst:1190 msgid ":exc:`NotADirectoryError`" msgstr "" +#: ../../c-api/exceptions.rst:1192 msgid ":exc:`NotImplementedError`" msgstr "" +#: ../../c-api/exceptions.rst:1194 ../../c-api/exceptions.rst:1277 +#: ../../c-api/exceptions.rst:1280 ../../c-api/exceptions.rst:1283 msgid ":exc:`OSError`" msgstr "" +#: ../../c-api/exceptions.rst:1196 msgid ":exc:`OverflowError`" msgstr "" +#: ../../c-api/exceptions.rst:1198 msgid ":exc:`PermissionError`" msgstr "" +#: ../../c-api/exceptions.rst:1200 msgid ":exc:`ProcessLookupError`" msgstr "" +#: ../../c-api/exceptions.rst:1202 msgid ":exc:`PythonFinalizationError`" msgstr "" +#: ../../c-api/exceptions.rst:1204 msgid ":exc:`RecursionError`" msgstr "" +#: ../../c-api/exceptions.rst:1206 msgid ":exc:`ReferenceError`" msgstr "" +#: ../../c-api/exceptions.rst:1208 msgid ":exc:`RuntimeError`" msgstr "" +#: ../../c-api/exceptions.rst:1210 msgid ":exc:`StopAsyncIteration`" msgstr "" +#: ../../c-api/exceptions.rst:1212 msgid ":exc:`StopIteration`" msgstr "" +#: ../../c-api/exceptions.rst:1214 msgid ":exc:`SyntaxError`" msgstr "" +#: ../../c-api/exceptions.rst:1216 msgid ":exc:`SystemError`" msgstr "" +#: ../../c-api/exceptions.rst:1218 msgid ":exc:`SystemExit`" msgstr "" +#: ../../c-api/exceptions.rst:1220 msgid ":exc:`TabError`" msgstr "" +#: ../../c-api/exceptions.rst:1222 msgid ":exc:`TimeoutError`" msgstr "" +#: ../../c-api/exceptions.rst:1224 msgid ":exc:`TypeError`" msgstr "" +#: ../../c-api/exceptions.rst:1226 msgid ":exc:`UnboundLocalError`" msgstr "" +#: ../../c-api/exceptions.rst:1228 msgid ":exc:`UnicodeDecodeError`" msgstr "" +#: ../../c-api/exceptions.rst:1230 msgid ":exc:`UnicodeEncodeError`" msgstr "" +#: ../../c-api/exceptions.rst:1232 msgid ":exc:`UnicodeError`" msgstr "" +#: ../../c-api/exceptions.rst:1234 msgid ":exc:`UnicodeTranslateError`" msgstr "" +#: ../../c-api/exceptions.rst:1236 msgid ":exc:`ValueError`" msgstr "" +#: ../../c-api/exceptions.rst:1238 msgid ":exc:`ZeroDivisionError`" msgstr "" +#: ../../c-api/exceptions.rst:1240 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1099,94 +1473,247 @@ msgid "" "`PyExc_TimeoutError` were introduced following :pep:`3151`." msgstr "" +#: ../../c-api/exceptions.rst:1250 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr "" +#: ../../c-api/exceptions.rst:1253 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr "" +#: ../../c-api/exceptions.rst:1256 msgid ":c:data:`PyExc_BaseExceptionGroup`." msgstr "" +#: ../../c-api/exceptions.rst:1261 msgid "OSError aliases" msgstr "" +#: ../../c-api/exceptions.rst:1263 msgid "The following are a compatibility aliases to :c:data:`PyExc_OSError`." msgstr "" +#: ../../c-api/exceptions.rst:1265 msgid "These aliases used to be separate exception types." msgstr "" +#: ../../c-api/exceptions.rst:1275 msgid "Notes" msgstr "" +#: ../../c-api/exceptions.rst:1284 msgid "[win]_" msgstr "" +#: ../../c-api/exceptions.rst:1286 msgid "Notes:" msgstr "" +#: ../../c-api/exceptions.rst:1289 msgid "" ":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 "" +#: ../../c-api/exceptions.rst:1296 msgid "Warning types" msgstr "" +#: ../../c-api/exceptions.rst:1306 msgid ":exc:`Warning`" msgstr "" +#: ../../c-api/exceptions.rst:1308 msgid ":exc:`BytesWarning`" msgstr "" +#: ../../c-api/exceptions.rst:1310 msgid ":exc:`DeprecationWarning`" msgstr "" +#: ../../c-api/exceptions.rst:1312 msgid ":exc:`EncodingWarning`" msgstr "" +#: ../../c-api/exceptions.rst:1314 msgid ":exc:`FutureWarning`" msgstr "" +#: ../../c-api/exceptions.rst:1316 msgid ":exc:`ImportWarning`" msgstr "" +#: ../../c-api/exceptions.rst:1318 msgid ":exc:`PendingDeprecationWarning`" msgstr "" +#: ../../c-api/exceptions.rst:1320 msgid ":exc:`ResourceWarning`" msgstr "" +#: ../../c-api/exceptions.rst:1322 msgid ":exc:`RuntimeWarning`" msgstr "" +#: ../../c-api/exceptions.rst:1324 msgid ":exc:`SyntaxWarning`" msgstr "" +#: ../../c-api/exceptions.rst:1326 msgid ":exc:`UnicodeWarning`" msgstr "" +#: ../../c-api/exceptions.rst:1328 msgid ":exc:`UserWarning`" msgstr "" +#: ../../c-api/exceptions.rst:1330 msgid ":c:data:`PyExc_ResourceWarning`." msgstr "" +#: ../../c-api/exceptions.rst:1333 msgid ":c:data:`PyExc_EncodingWarning`." msgstr "" +#: ../../c-api/exceptions.rst:1338 +msgid "Tracebacks" +msgstr "" + +#: ../../c-api/exceptions.rst:1342 +msgid "" +"Type object for traceback objects. This is available as :class:`types." +"TracebackType` in the Python layer." +msgstr "" + +#: ../../c-api/exceptions.rst:1348 +msgid "" +"Return true if *op* is a traceback object, false otherwise. This function " +"does not account for subtypes." +msgstr "" + +#: ../../c-api/exceptions.rst:1354 +msgid "" +"Replace the :attr:`~BaseException.__traceback__` attribute on the current " +"exception with a new traceback prepending *f* to the existing chain." +msgstr "" + +#: ../../c-api/exceptions.rst:1357 +msgid "Calling this function without an exception set is undefined behavior." +msgstr "" + +#: ../../c-api/exceptions.rst:1359 ../../c-api/exceptions.rst:1367 +msgid "" +"This function returns ``0`` on success, and returns ``-1`` with an exception " +"set on failure." +msgstr "" + +#: ../../c-api/exceptions.rst:1365 +msgid "Write the traceback *tb* into the file *f*." +msgstr "" + +#: ../../c-api/exceptions.rst:1372 +msgid "" +"Write a trace of the Python stack in *tstate* into the file *fd*. The " +"format looks like::" +msgstr "" + +#: ../../c-api/exceptions.rst:1375 +msgid "" +"Traceback (most recent call first):\n" +" File \"xxx\", line xxx in \n" +" File \"xxx\", line xxx in \n" +" ...\n" +" File \"xxx\", line xxx in " +msgstr "" + +#: ../../c-api/exceptions.rst:1381 +msgid "" +"This function is meant to debug situations such as segfaults, fatal errors, " +"and similar. The file and function names it outputs are encoded to ASCII " +"with backslashreplace and truncated to 500 characters. It writes only the " +"first 100 frames; further frames are truncated with the line ``...``." +msgstr "" + +#: ../../c-api/exceptions.rst:1386 ../../c-api/exceptions.rst:1411 +msgid "" +"This function will return ``NULL`` on success, or an error message on error." +msgstr "" + +#: ../../c-api/exceptions.rst:1388 ../../c-api/exceptions.rst:1419 +msgid "" +"This function is intended for use in crash scenarios such as signal handlers " +"for SIGSEGV, where the interpreter may be in an inconsistent state. Given " +"that it reads interpreter data structures that may be partially modified, " +"the function might produce incomplete output or it may even crash itself." +msgstr "" + +#: ../../c-api/exceptions.rst:1393 +msgid "" +"The caller does not need to hold an :term:`attached thread state`, nor does " +"*tstate* need to be attached." +msgstr "" + +#: ../../c-api/exceptions.rst:1400 +msgid "Write the traces of all Python threads in *interp* into the file *fd*." +msgstr "" + +#: ../../c-api/exceptions.rst:1402 +msgid "" +"If *interp* is ``NULL`` then this function will try to identify the current " +"interpreter using thread-specific storage. If it cannot, it will return an " +"error." +msgstr "" + +#: ../../c-api/exceptions.rst:1406 +msgid "" +"If *current_tstate* is not ``NULL`` then it will be used to identify what " +"the current thread is in the written output. If it is ``NULL`` then this " +"function will identify the current thread using thread-specific storage. It " +"is not an error if the function is unable to get the current Python thread " +"state." +msgstr "" + +#: ../../c-api/exceptions.rst:1413 +msgid "" +"This function is meant to debug situations such as segfaults, fatal errors, " +"and similar. It calls :c:func:`PyUnstable_DumpTraceback` for each thread. It " +"only writes the tracebacks of the first *max_threads* threads, further " +"output is truncated with the line ``...``. If *max_threads* is 0, the " +"function will use a default value of 100 for the argument." +msgstr "" + +#: ../../c-api/exceptions.rst:1424 +msgid "" +"The caller does not need to hold an :term:`attached thread state`, nor does " +"*current_tstate* need to be attached." +msgstr "" + +#: ../../c-api/exceptions.rst:1428 +msgid "" +"On the :term:`free-threaded build`, this function is not thread-safe. If " +"another thread deletes its :term:`thread state` while this function is being " +"called, the process will likely crash." +msgstr "" + +#: ../../c-api/exceptions.rst:198 msgid "strerror (C function)" msgstr "" +#: ../../c-api/exceptions.rst:688 ../../c-api/exceptions.rst:742 +#: ../../c-api/exceptions.rst:757 msgid "module" msgstr "" +#: ../../c-api/exceptions.rst:688 ../../c-api/exceptions.rst:742 +#: ../../c-api/exceptions.rst:757 msgid "signal" msgstr "" +#: ../../c-api/exceptions.rst:688 ../../c-api/exceptions.rst:742 msgid "SIGINT (C macro)" msgstr "" +#: ../../c-api/exceptions.rst:688 ../../c-api/exceptions.rst:742 +#: ../../c-api/exceptions.rst:757 msgid "KeyboardInterrupt (built-in exception)" msgstr "" diff --git a/c-api/exceptions.po~ b/c-api/exceptions.po~ new file mode 100644 index 00000000..7cb48195 --- /dev/null +++ b/c-api/exceptions.po~ @@ -0,0 +1,1192 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Exception Handling" +msgstr "" + +msgid "" +"The functions described in this chapter will let you handle and raise Python " +"exceptions. It is important to understand some of the basics of Python " +"exception handling. It works somewhat like the POSIX :c:data:`errno` " +"variable: there is a global indicator (per thread) of the last error that " +"occurred. Most C API functions don't clear this on success, but will set it " +"to indicate the cause of the error on failure. Most C API functions also " +"return an error indicator, usually ``NULL`` if they are supposed to return a " +"pointer, or ``-1`` if they return an integer (exception: the ``PyArg_*`` " +"functions return ``1`` for success and ``0`` for failure)." +msgstr "" + +msgid "" +"Concretely, the error indicator consists of three object pointers: the " +"exception's type, the exception's value, and the traceback object. Any of " +"those pointers can be ``NULL`` if non-set (although some combinations are " +"forbidden, for example you can't have a non-``NULL`` traceback if the " +"exception type is ``NULL``)." +msgstr "" + +msgid "" +"When a function must fail because some function it called failed, it " +"generally doesn't set the error indicator; the function it called already " +"set it. It is responsible for either handling the error and clearing the " +"exception or returning after cleaning up any resources it holds (such as " +"object references or memory allocations); it should *not* continue normally " +"if it is not prepared to handle the error. If returning due to an error, it " +"is important to indicate to the caller that an error has been set. If the " +"error is not handled or carefully propagated, additional calls into the " +"Python/C API may not behave as intended and may fail in mysterious ways." +msgstr "" + +msgid "" +"The error indicator is **not** the result of :func:`sys.exc_info`. The " +"former corresponds to an exception that is not yet caught (and is therefore " +"still propagating), while the latter returns an exception after it is caught " +"(and has therefore stopped propagating)." +msgstr "" + +msgid "Printing and clearing" +msgstr "" + +msgid "" +"Clear the error indicator. If the error indicator is not set, there is no " +"effect." +msgstr "" + +msgid "" +"Print a standard traceback to ``sys.stderr`` and clear the error indicator. " +"**Unless** the error is a ``SystemExit``, in that case no traceback is " +"printed and the Python process will exit with the error code specified by " +"the ``SystemExit`` instance." +msgstr "" + +msgid "" +"Call this function **only** when the error indicator is set. Otherwise it " +"will cause a fatal error!" +msgstr "" + +msgid "" +"If *set_sys_last_vars* is nonzero, the variable :data:`sys.last_exc` is set " +"to the printed exception. For backwards compatibility, the deprecated " +"variables :data:`sys.last_type`, :data:`sys.last_value` and :data:`sys." +"last_traceback` are also set to the type, value and traceback of this " +"exception, respectively." +msgstr "" + +msgid "The setting of :data:`sys.last_exc` was added." +msgstr "" + +msgid "Alias for ``PyErr_PrintEx(1)``." +msgstr "" + +msgid "" +"Call :func:`sys.unraisablehook` using the current exception and *obj* " +"argument." +msgstr "" + +msgid "" +"This utility function prints a warning message to ``sys.stderr`` when an " +"exception has been set but it is impossible for the interpreter to actually " +"raise the exception. It is used, for example, when an exception occurs in " +"an :meth:`~object.__del__` method." +msgstr "" + +msgid "" +"The function is called with a single argument *obj* that identifies the " +"context in which the unraisable exception occurred. If possible, the repr of " +"*obj* will be printed in the warning message. If *obj* is ``NULL``, only the " +"traceback is printed." +msgstr "" + +msgid "An exception must be set when calling this function." +msgstr "" + +msgid "Print a traceback. Print only traceback if *obj* is ``NULL``." +msgstr "" + +msgid "Use :func:`sys.unraisablehook`." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_WriteUnraisable`, but the *format* and subsequent " +"parameters help format the warning message; they have the same meaning and " +"values as in :c:func:`PyUnicode_FromFormat`. ``PyErr_WriteUnraisable(obj)`` " +"is roughly equivalent to ``PyErr_FormatUnraisable(\"Exception ignored in: " +"%R\", obj)``. If *format* is ``NULL``, only the traceback is printed." +msgstr "" + +msgid "" +"Print the standard traceback display of ``exc`` to ``sys.stderr``, including " +"chained exceptions and notes." +msgstr "" + +msgid "Raising exceptions" +msgstr "" + +msgid "" +"These functions help you set the current thread's error indicator. For " +"convenience, some of these functions will always return a ``NULL`` pointer " +"for use in a ``return`` statement." +msgstr "" + +msgid "" +"This is the most common way to set the error indicator. The first argument " +"specifies the exception type; it is normally one of the standard exceptions, " +"e.g. :c:data:`PyExc_RuntimeError`. You need not create a new :term:`strong " +"reference` to it (e.g. with :c:func:`Py_INCREF`). The second argument is an " +"error message; it is decoded from ``'utf-8'``." +msgstr "" + +msgid "" +"This function is similar to :c:func:`PyErr_SetString` but lets you specify " +"an arbitrary Python object for the \"value\" of the exception." +msgstr "" + +msgid "" +"This function sets the error indicator and returns ``NULL``. *exception* " +"should be a Python exception class. The *format* and subsequent parameters " +"help format the error message; they have the same meaning and values as in :" +"c:func:`PyUnicode_FromFormat`. *format* is an ASCII-encoded string." +msgstr "" + +msgid "" +"Same as :c:func:`PyErr_Format`, but taking a :c:type:`va_list` argument " +"rather than a variable number of arguments." +msgstr "" + +msgid "This is a shorthand for ``PyErr_SetObject(type, Py_None)``." +msgstr "" + +msgid "" +"This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where " +"*message* indicates that a built-in operation was invoked with an illegal " +"argument. It is mostly for internal use." +msgstr "" + +msgid "" +"This is a shorthand for ``PyErr_SetNone(PyExc_MemoryError)``; it returns " +"``NULL`` so an object allocation function can write ``return " +"PyErr_NoMemory();`` when it runs out of memory." +msgstr "" + +msgid "" +"This is a convenience function to raise an exception when a C library " +"function has returned an error and set the C variable :c:data:`errno`. It " +"constructs a tuple object whose first item is the integer :c:data:`errno` " +"value and whose second item is the corresponding error message (gotten from :" +"c:func:`!strerror`), and then calls ``PyErr_SetObject(type, object)``. On " +"Unix, when the :c:data:`errno` value is :c:macro:`!EINTR`, indicating an " +"interrupted system call, this calls :c:func:`PyErr_CheckSignals`, and if " +"that set the error indicator, leaves it set to that. The function always " +"returns ``NULL``, so a wrapper function around a system call can write " +"``return PyErr_SetFromErrno(type);`` when the system call returns an error." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromErrno`, with the additional behavior that " +"if *filenameObject* is not ``NULL``, it is passed to the constructor of " +"*type* as a third parameter. In the case of :exc:`OSError` exception, this " +"is used to define the :attr:`!filename` attribute of the exception instance." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but takes a " +"second filename object, for raising errors when a function that takes two " +"filenames fails." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromErrnoWithFilenameObject`, but the filename " +"is given as a C string. *filename* is decoded from the :term:`filesystem " +"encoding and error handler`." +msgstr "" + +msgid "" +"This is a convenience function to raise :exc:`OSError`. If called with " +"*ierr* of ``0``, the error code returned by a call to :c:func:`!" +"GetLastError` is used instead. It calls the Win32 function :c:func:`!" +"FormatMessage` to retrieve the Windows description of error code given by " +"*ierr* or :c:func:`!GetLastError`, then it constructs a :exc:`OSError` " +"object with the :attr:`~OSError.winerror` attribute set to the error code, " +"the :attr:`~OSError.strerror` attribute set to the corresponding error " +"message (gotten from :c:func:`!FormatMessage`), and then calls " +"``PyErr_SetObject(PyExc_OSError, object)``. This function always returns " +"``NULL``." +msgstr "" + +msgid "Availability" +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter " +"specifying the exception type to be raised." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior " +"that if *filename* is not ``NULL``, it is decoded from the filesystem " +"encoding (:func:`os.fsdecode`) and passed to the constructor of :exc:" +"`OSError` as a third parameter to be used to define the :attr:`!filename` " +"attribute of the exception instance." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetExcFromWindowsErr`, with the additional " +"behavior that if *filename* is not ``NULL``, it is passed to the constructor " +"of :exc:`OSError` as a third parameter to be used to define the :attr:`!" +"filename` attribute of the exception instance." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject`, but " +"accepts a second filename object." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional " +"parameter specifying the exception type to be raised." +msgstr "" + +msgid "" +"This is a convenience function to raise :exc:`ImportError`. *msg* will be " +"set as the exception's message string. *name* and *path*, both of which can " +"be ``NULL``, will be set as the :exc:`ImportError`'s respective ``name`` and " +"``path`` attributes." +msgstr "" + +msgid "" +"Much like :c:func:`PyErr_SetImportError` but this function allows for " +"specifying a subclass of :exc:`ImportError` to raise." +msgstr "" + +msgid "" +"Set file, line, and offset information for the current exception. If the " +"current exception is not a :exc:`SyntaxError`, then it sets additional " +"attributes, which make the exception printing subsystem think the exception " +"is a :exc:`SyntaxError`." +msgstr "" + +msgid "" +"Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string " +"decoded from the :term:`filesystem encoding and error handler`." +msgstr "" + +msgid "" +"Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " +"omitted." +msgstr "" + +msgid "" +"This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, " +"where *message* indicates that an internal operation (e.g. a Python/C API " +"function) was invoked with an illegal argument. It is mostly for internal " +"use." +msgstr "" + +msgid "Issuing warnings" +msgstr "" + +msgid "" +"Use these functions to issue warnings from C code. They mirror similar " +"functions exported by the Python :mod:`warnings` module. They normally " +"print a warning message to *sys.stderr*; however, it is also possible that " +"the user has specified that warnings are to be turned into errors, and in " +"that case they will raise an exception. It is also possible that the " +"functions raise an exception because of a problem with the warning " +"machinery. The return value is ``0`` if no exception is raised, or ``-1`` if " +"an exception is raised. (It is not possible to determine whether a warning " +"message is actually printed, nor what the reason is for the exception; this " +"is intentional.) If an exception is raised, the caller should do its normal " +"exception handling (for example, :c:func:`Py_DECREF` owned references and " +"return an error value)." +msgstr "" + +msgid "" +"Issue a warning message. The *category* argument is a warning category (see " +"below) or ``NULL``; the *message* argument is a UTF-8 encoded string. " +"*stack_level* is a positive number giving a number of stack frames; the " +"warning will be issued from the currently executing line of code in that " +"stack frame. A *stack_level* of 1 is the function calling :c:func:" +"`PyErr_WarnEx`, 2 is the function above that, and so forth." +msgstr "" + +msgid "" +"Warning categories must be subclasses of :c:data:`PyExc_Warning`; :c:data:" +"`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the default " +"warning category is :c:data:`PyExc_RuntimeWarning`. The standard Python " +"warning categories are available as global variables whose names are " +"enumerated at :ref:`standardwarningcategories`." +msgstr "" + +msgid "" +"For information about warning control, see the documentation for the :mod:" +"`warnings` module and the :option:`-W` option in the command line " +"documentation. There is no C API for warning control." +msgstr "" + +msgid "" +"Issue a warning message with explicit control over all warning attributes. " +"This is a straightforward wrapper around the Python function :func:`warnings." +"warn_explicit`; see there for more information. The *module* and *registry* " +"arguments may be set to ``NULL`` to get the default effect described there." +msgstr "" + +msgid "" +"Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and " +"*module* are UTF-8 encoded strings, and *filename* is decoded from the :term:" +"`filesystem encoding and error handler`." +msgstr "" + +msgid "" +"Function similar to :c:func:`PyErr_WarnEx`, but use :c:func:" +"`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" +"encoded string." +msgstr "" + +msgid "" +"Function similar to :c:func:`PyErr_WarnFormat`, but *category* is :exc:" +"`ResourceWarning` and it passes *source* to :class:`!warnings." +"WarningMessage`." +msgstr "" + +msgid "Querying the error indicator" +msgstr "" + +msgid "" +"Test whether the error indicator is set. If set, return the exception " +"*type* (the first argument to the last call to one of the ``PyErr_Set*`` " +"functions or to :c:func:`PyErr_Restore`). If not set, return ``NULL``. You " +"do not own a reference to the return value, so you do not need to :c:func:" +"`Py_DECREF` it." +msgstr "" + +msgid "The caller must have an :term:`attached thread state`." +msgstr "" + +msgid "" +"Do not compare the return value to a specific exception; use :c:func:" +"`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily " +"fail since the exception may be an instance instead of a class, in the case " +"of a class exception, or it may be a subclass of the expected exception.)" +msgstr "" + +msgid "" +"Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This " +"should only be called when an exception is actually set; a memory access " +"violation will occur if no exception has been raised." +msgstr "" + +msgid "" +"Return true if the *given* exception matches the exception type in *exc*. " +"If *exc* is a class object, this also returns true when *given* is an " +"instance of a subclass. If *exc* is a tuple, all exception types in the " +"tuple (and recursively in subtuples) are searched for a match." +msgstr "" + +msgid "" +"Return the exception currently being raised, clearing the error indicator at " +"the same time. Return ``NULL`` if the error indicator is not set." +msgstr "" + +msgid "" +"This function is used by code that needs to catch exceptions, or code that " +"needs to save and restore the error indicator temporarily." +msgstr "" + +msgid "For example::" +msgstr "Zum Beispiel::" + +msgid "" +"{\n" +" PyObject *exc = PyErr_GetRaisedException();\n" +"\n" +" /* ... code that might produce other errors ... */\n" +"\n" +" PyErr_SetRaisedException(exc);\n" +"}" +msgstr "" + +msgid "" +":c:func:`PyErr_GetHandledException`, to save the exception currently being " +"handled." +msgstr "" + +msgid "" +"Set *exc* as the exception currently being raised, clearing the existing " +"exception if one is set." +msgstr "" + +msgid "This call steals a reference to *exc*, which must be a valid exception." +msgstr "" + +msgid "Use :c:func:`PyErr_GetRaisedException` instead." +msgstr "" + +msgid "" +"Retrieve the error indicator into three variables whose addresses are " +"passed. If the error indicator is not set, set all three variables to " +"``NULL``. If it is set, it will be cleared and you own a reference to each " +"object retrieved. The value and traceback object may be ``NULL`` even when " +"the type object is not." +msgstr "" + +msgid "" +"This function is normally only used by legacy code that needs to catch " +"exceptions or save and restore the error indicator temporarily." +msgstr "" + +msgid "" +"{\n" +" PyObject *type, *value, *traceback;\n" +" PyErr_Fetch(&type, &value, &traceback);\n" +"\n" +" /* ... code that might produce other errors ... */\n" +"\n" +" PyErr_Restore(type, value, traceback);\n" +"}" +msgstr "" + +msgid "Use :c:func:`PyErr_SetRaisedException` instead." +msgstr "" + +msgid "" +"Set the error indicator from the three objects, *type*, *value*, and " +"*traceback*, clearing the existing exception if one is set. If the objects " +"are ``NULL``, the error indicator is cleared. Do not pass a ``NULL`` type " +"and non-``NULL`` value or traceback. The exception type should be a class. " +"Do not pass an invalid exception type or value. (Violating these rules will " +"cause subtle problems later.) This call takes away a reference to each " +"object: you must own a reference to each object before the call and after " +"the call you no longer own these references. (If you don't understand this, " +"don't use this function. I warned you.)" +msgstr "" + +msgid "" +"This function is normally only used by legacy code that needs to save and " +"restore the error indicator temporarily. Use :c:func:`PyErr_Fetch` to save " +"the current error indicator." +msgstr "" + +msgid "" +"Use :c:func:`PyErr_GetRaisedException` instead, to avoid any possible de-" +"normalization." +msgstr "" + +msgid "" +"Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " +"below can be \"unnormalized\", meaning that ``*exc`` is a class object but " +"``*val`` is not an instance of the same class. This function can be used " +"to instantiate the class in that case. If the values are already " +"normalized, nothing happens. The delayed normalization is implemented to " +"improve performance." +msgstr "" + +msgid "" +"This function *does not* implicitly set the :attr:`~BaseException." +"__traceback__` attribute on the exception value. If setting the traceback " +"appropriately is desired, the following additional snippet is needed::" +msgstr "" + +msgid "" +"if (tb != NULL) {\n" +" PyException_SetTraceback(val, tb);\n" +"}" +msgstr "" + +msgid "" +"Retrieve the active exception instance, as would be returned by :func:`sys." +"exception`. This refers to an exception that was *already caught*, not to an " +"exception that was freshly raised. Returns a new reference to the exception " +"or ``NULL``. Does not modify the interpreter's exception state." +msgstr "" + +msgid "" +"This function is not normally used by code that wants to handle exceptions. " +"Rather, it can be used when code needs to save and restore the exception " +"state temporarily. Use :c:func:`PyErr_SetHandledException` to restore or " +"clear the exception state." +msgstr "" + +msgid "" +"Set the active exception, as known from ``sys.exception()``. This refers to " +"an exception that was *already caught*, not to an exception that was freshly " +"raised. To clear the exception state, pass ``NULL``." +msgstr "" + +msgid "" +"This function is not normally used by code that wants to handle exceptions. " +"Rather, it can be used when code needs to save and restore the exception " +"state temporarily. Use :c:func:`PyErr_GetHandledException` to get the " +"exception state." +msgstr "" + +msgid "" +"Retrieve the old-style representation of the exception info, as known from :" +"func:`sys.exc_info`. This refers to an exception that was *already caught*, " +"not to an exception that was freshly raised. Returns new references for the " +"three objects, any of which may be ``NULL``. Does not modify the exception " +"info state. This function is kept for backwards compatibility. Prefer " +"using :c:func:`PyErr_GetHandledException`." +msgstr "" + +msgid "" +"This function is not normally used by code that wants to handle exceptions. " +"Rather, it can be used when code needs to save and restore the exception " +"state temporarily. Use :c:func:`PyErr_SetExcInfo` to restore or clear the " +"exception state." +msgstr "" + +msgid "" +"Set the exception info, as known from ``sys.exc_info()``. This refers to an " +"exception that was *already caught*, not to an exception that was freshly " +"raised. This function steals the references of the arguments. To clear the " +"exception state, pass ``NULL`` for all three arguments. This function is " +"kept for backwards compatibility. Prefer using :c:func:" +"`PyErr_SetHandledException`." +msgstr "" + +msgid "" +"This function is not normally used by code that wants to handle exceptions. " +"Rather, it can be used when code needs to save and restore the exception " +"state temporarily. Use :c:func:`PyErr_GetExcInfo` to read the exception " +"state." +msgstr "" + +msgid "" +"The ``type`` and ``traceback`` arguments are no longer used and can be NULL. " +"The interpreter now derives them from the exception instance (the ``value`` " +"argument). The function still steals references of all three arguments." +msgstr "" + +msgid "Signal Handling" +msgstr "" + +msgid "This function interacts with Python's signal handling." +msgstr "" + +msgid "" +"If the function is called from the main thread and under the main Python " +"interpreter, it checks whether a signal has been sent to the processes and " +"if so, invokes the corresponding signal handler. If the :mod:`signal` " +"module is supported, this can invoke a signal handler written in Python." +msgstr "" + +msgid "" +"The function attempts to handle all pending signals, and then returns ``0``. " +"However, if a Python signal handler raises an exception, the error indicator " +"is set and the function returns ``-1`` immediately (such that other pending " +"signals may not have been handled yet: they will be on the next :c:func:" +"`PyErr_CheckSignals()` invocation)." +msgstr "" + +msgid "" +"If the function is called from a non-main thread, or under a non-main Python " +"interpreter, it does nothing and returns ``0``." +msgstr "" + +msgid "" +"This function can be called by long-running C code that wants to be " +"interruptible by user requests (such as by pressing Ctrl-C)." +msgstr "" + +msgid "" +"The default Python signal handler for :c:macro:`!SIGINT` raises the :exc:" +"`KeyboardInterrupt` exception." +msgstr "" + +msgid "" +"Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is " +"equivalent to ``PyErr_SetInterruptEx(SIGINT)``." +msgstr "" + +msgid "" +"This function is async-signal-safe. It can be called without an :term:" +"`attached thread state` and from a C signal handler." +msgstr "" + +msgid "" +"Simulate the effect of a signal arriving. The next time :c:func:" +"`PyErr_CheckSignals` is called, the Python signal handler for the given " +"signal number will be called." +msgstr "" + +msgid "" +"This function can be called by C code that sets up its own signal handling " +"and wants Python signal handlers to be invoked as expected when an " +"interruption is requested (for example when the user presses Ctrl-C to " +"interrupt an operation)." +msgstr "" + +msgid "" +"If the given signal isn't handled by Python (it was set to :py:const:`signal." +"SIG_DFL` or :py:const:`signal.SIG_IGN`), it will be ignored." +msgstr "" + +msgid "" +"If *signum* is outside of the allowed range of signal numbers, ``-1`` is " +"returned. Otherwise, ``0`` is returned. The error indicator is never " +"changed by this function." +msgstr "" + +msgid "" +"This utility function specifies a file descriptor to which the signal number " +"is written as a single byte whenever a signal is received. *fd* must be non-" +"blocking. It returns the previous such file descriptor." +msgstr "" + +msgid "" +"The value ``-1`` disables the feature; this is the initial state. This is " +"equivalent to :func:`signal.set_wakeup_fd` in Python, but without any error " +"checking. *fd* should be a valid file descriptor. The function should only " +"be called from the main thread." +msgstr "" + +msgid "On Windows, the function now also supports socket handles." +msgstr "" + +msgid "Exception Classes" +msgstr "" + +msgid "" +"This utility function creates and returns a new exception class. The *name* " +"argument must be the name of the new exception, a C string of the form " +"``module.classname``. The *base* and *dict* arguments are normally " +"``NULL``. This creates a class object derived from :exc:`Exception` " +"(accessible in C as :c:data:`PyExc_Exception`)." +msgstr "" + +msgid "" +"The :attr:`~type.__module__` attribute of the new class is set to the first " +"part (up to the last dot) of the *name* argument, and the class name is set " +"to the last part (after the last dot). The *base* argument can be used to " +"specify alternate base classes; it can either be only one class or a tuple " +"of classes. The *dict* argument can be used to specify a dictionary of class " +"variables and methods." +msgstr "" + +msgid "" +"Same as :c:func:`PyErr_NewException`, except that the new exception class " +"can easily be given a docstring: If *doc* is non-``NULL``, it will be used " +"as the docstring for the exception class." +msgstr "" + +msgid "" +"Return non-zero if *ob* is an exception class, zero otherwise. This function " +"always succeeds." +msgstr "" + +msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." +msgstr "" + +msgid "Exception Objects" +msgstr "" + +msgid "" +"Return the traceback associated with the exception as a new reference, as " +"accessible from Python through the :attr:`~BaseException.__traceback__` " +"attribute. If there is no traceback associated, this returns ``NULL``." +msgstr "" + +msgid "" +"Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " +"clear it." +msgstr "" + +msgid "" +"Return the context (another exception instance during whose handling *ex* " +"was raised) associated with the exception as a new reference, as accessible " +"from Python through the :attr:`~BaseException.__context__` attribute. If " +"there is no context associated, this returns ``NULL``." +msgstr "" + +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 " +"instance. This steals a reference to *ctx*." +msgstr "" + +msgid "" +"Return the cause (either an exception instance, or ``None``, set by " +"``raise ... from ...``) associated with the exception as a new reference, as " +"accessible from Python through the :attr:`~BaseException.__cause__` " +"attribute." +msgstr "" + +msgid "" +"Set the cause associated with the exception to *cause*. Use ``NULL`` to " +"clear it. There is no type check to make sure that *cause* is either an " +"exception instance or ``None``. This steals a reference to *cause*." +msgstr "" + +msgid "" +"The :attr:`~BaseException.__suppress_context__` attribute is implicitly set " +"to ``True`` by this function." +msgstr "" + +msgid "Return :attr:`~BaseException.args` of exception *ex*." +msgstr "" + +msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." +msgstr "" + +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 " +"the exceptions that need to be raised. This list contains the unhandled part " +"of *orig*, if any, as well as the exceptions that were raised from the :" +"keyword:`!except*` clauses (so they have a different traceback from *orig*) " +"and those that were reraised (and have the same traceback as *orig*). Return " +"the :exc:`ExceptionGroup` that needs to be reraised in the end, or ``None`` " +"if there is nothing to reraise." +msgstr "" + +msgid "Unicode Exception Objects" +msgstr "" + +msgid "" +"The following functions are used to create and modify Unicode exceptions " +"from C." +msgstr "" + +msgid "" +"Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, " +"*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " +"UTF-8 encoded strings." +msgstr "" + +msgid "Return the *encoding* attribute of the given exception object." +msgstr "" + +msgid "Return the *object* attribute of the given exception object." +msgstr "" + +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`` " +"on failure." +msgstr "" + +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 "" + +msgid ":attr:`UnicodeError.start`" +msgstr "" + +msgid "" +"Set the *start* attribute of the given exception object to *start*. Return " +"``0`` on success, ``-1`` on failure." +msgstr "" + +msgid "" +"While passing a negative *start* does not raise an exception, the " +"corresponding getters will not consider it as a relative offset." +msgstr "" + +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 " +"failure." +msgstr "" + +msgid "" +"If the :attr:`UnicodeError.object` is an empty sequence, the resulting *end* " +"is ``0``. Otherwise, it is clipped to ``[1, len(object)]``." +msgstr "" + +msgid "" +"Set the *end* attribute of the given exception object to *end*. Return " +"``0`` on success, ``-1`` on failure." +msgstr "" + +msgid ":attr:`UnicodeError.end`" +msgstr "" + +msgid "Return the *reason* attribute of the given exception object." +msgstr "" + +msgid "" +"Set the *reason* attribute of the given exception object to *reason*. " +"Return ``0`` on success, ``-1`` on failure." +msgstr "" + +msgid "Recursion Control" +msgstr "" + +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 " +"recursive code does not necessarily invoke Python code (which tracks its " +"recursion depth automatically). They are also not needed for *tp_call* " +"implementations because the :ref:`call protocol ` takes care of " +"recursion handling." +msgstr "" + +msgid "Marks a point where a recursive C-level call is about to be performed." +msgstr "" + +msgid "" +"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 "" + +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 " +"recursion depth limit." +msgstr "" + +msgid "" +"This function is now also available in the :ref:`limited API `." +msgstr "" + +msgid "" +"Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " +"*successful* invocation of :c:func:`Py_EnterRecursiveCall`." +msgstr "" + +msgid "" +"Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " +"requires special recursion handling. In addition to protecting the stack, :" +"c:member:`~PyTypeObject.tp_repr` also needs to track objects to prevent " +"cycles. The following two functions facilitate this functionality. " +"Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." +msgstr "" + +msgid "" +"Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " +"implementation to detect cycles." +msgstr "" + +msgid "" +"If the object has already been processed, the function returns a positive " +"integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " +"should return a string object indicating a cycle. As examples, :class:" +"`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." +msgstr "" + +msgid "" +"The function will return a negative integer if the recursion limit is " +"reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " +"should typically return ``NULL``." +msgstr "" + +msgid "" +"Otherwise, the function returns zero and the :c:member:`~PyTypeObject." +"tp_repr` implementation can continue normally." +msgstr "" + +msgid "" +"Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" +"c:func:`Py_ReprEnter` that returns zero." +msgstr "" + +msgid "Exception and warning types" +msgstr "" + +msgid "" +"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 "" + +msgid "For completeness, here are all the variables:" +msgstr "" + +msgid "Exception types" +msgstr "" + +msgid "C name" +msgstr "" + +msgid "Python name" +msgstr "" + +msgid ":exc:`BaseException`" +msgstr "" + +msgid ":exc:`BaseExceptionGroup`" +msgstr "" + +msgid ":exc:`Exception`" +msgstr "" + +msgid ":exc:`ArithmeticError`" +msgstr "" + +msgid ":exc:`AssertionError`" +msgstr "" + +msgid ":exc:`AttributeError`" +msgstr "" + +msgid ":exc:`BlockingIOError`" +msgstr "" + +msgid ":exc:`BrokenPipeError`" +msgstr "" + +msgid ":exc:`BufferError`" +msgstr "" + +msgid ":exc:`ChildProcessError`" +msgstr "" + +msgid ":exc:`ConnectionAbortedError`" +msgstr "" + +msgid ":exc:`ConnectionError`" +msgstr "" + +msgid ":exc:`ConnectionRefusedError`" +msgstr "" + +msgid ":exc:`ConnectionResetError`" +msgstr "" + +msgid ":exc:`EOFError`" +msgstr "" + +msgid ":exc:`FileExistsError`" +msgstr "" + +msgid ":exc:`FileNotFoundError`" +msgstr "" + +msgid ":exc:`FloatingPointError`" +msgstr "" + +msgid ":exc:`GeneratorExit`" +msgstr "" + +msgid ":exc:`ImportError`" +msgstr "" + +msgid ":exc:`IndentationError`" +msgstr "" + +msgid ":exc:`IndexError`" +msgstr "" + +msgid ":exc:`InterruptedError`" +msgstr "" + +msgid ":exc:`IsADirectoryError`" +msgstr "" + +msgid ":exc:`KeyError`" +msgstr "" + +msgid ":exc:`KeyboardInterrupt`" +msgstr "" + +msgid ":exc:`LookupError`" +msgstr "" + +msgid ":exc:`MemoryError`" +msgstr "" + +msgid ":exc:`ModuleNotFoundError`" +msgstr "" + +msgid ":exc:`NameError`" +msgstr "" + +msgid ":exc:`NotADirectoryError`" +msgstr "" + +msgid ":exc:`NotImplementedError`" +msgstr "" + +msgid ":exc:`OSError`" +msgstr "" + +msgid ":exc:`OverflowError`" +msgstr "" + +msgid ":exc:`PermissionError`" +msgstr "" + +msgid ":exc:`ProcessLookupError`" +msgstr "" + +msgid ":exc:`PythonFinalizationError`" +msgstr "" + +msgid ":exc:`RecursionError`" +msgstr "" + +msgid ":exc:`ReferenceError`" +msgstr "" + +msgid ":exc:`RuntimeError`" +msgstr "" + +msgid ":exc:`StopAsyncIteration`" +msgstr "" + +msgid ":exc:`StopIteration`" +msgstr "" + +msgid ":exc:`SyntaxError`" +msgstr "" + +msgid ":exc:`SystemError`" +msgstr "" + +msgid ":exc:`SystemExit`" +msgstr "" + +msgid ":exc:`TabError`" +msgstr "" + +msgid ":exc:`TimeoutError`" +msgstr "" + +msgid ":exc:`TypeError`" +msgstr "" + +msgid ":exc:`UnboundLocalError`" +msgstr "" + +msgid ":exc:`UnicodeDecodeError`" +msgstr "" + +msgid ":exc:`UnicodeEncodeError`" +msgstr "" + +msgid ":exc:`UnicodeError`" +msgstr "" + +msgid ":exc:`UnicodeTranslateError`" +msgstr "" + +msgid ":exc:`ValueError`" +msgstr "" + +msgid ":exc:`ZeroDivisionError`" +msgstr "" + +msgid "" +":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" +"`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" +"`PyExc_ConnectionAbortedError`, :c:data:`PyExc_ConnectionRefusedError`, :c:" +"data:`PyExc_ConnectionResetError`, :c:data:`PyExc_FileExistsError`, :c:data:" +"`PyExc_FileNotFoundError`, :c:data:`PyExc_InterruptedError`, :c:data:" +"`PyExc_IsADirectoryError`, :c:data:`PyExc_NotADirectoryError`, :c:data:" +"`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError` and :c:data:" +"`PyExc_TimeoutError` were introduced following :pep:`3151`." +msgstr "" + +msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." +msgstr "" + +msgid ":c:data:`PyExc_ModuleNotFoundError`." +msgstr "" + +msgid ":c:data:`PyExc_BaseExceptionGroup`." +msgstr "" + +msgid "OSError aliases" +msgstr "" + +msgid "The following are a compatibility aliases to :c:data:`PyExc_OSError`." +msgstr "" + +msgid "These aliases used to be separate exception types." +msgstr "" + +msgid "Notes" +msgstr "" + +msgid "[win]_" +msgstr "" + +msgid "Notes:" +msgstr "" + +msgid "" +":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 "" + +msgid "Warning types" +msgstr "" + +msgid ":exc:`Warning`" +msgstr "" + +msgid ":exc:`BytesWarning`" +msgstr "" + +msgid ":exc:`DeprecationWarning`" +msgstr "" + +msgid ":exc:`EncodingWarning`" +msgstr "" + +msgid ":exc:`FutureWarning`" +msgstr "" + +msgid ":exc:`ImportWarning`" +msgstr "" + +msgid ":exc:`PendingDeprecationWarning`" +msgstr "" + +msgid ":exc:`ResourceWarning`" +msgstr "" + +msgid ":exc:`RuntimeWarning`" +msgstr "" + +msgid ":exc:`SyntaxWarning`" +msgstr "" + +msgid ":exc:`UnicodeWarning`" +msgstr "" + +msgid ":exc:`UserWarning`" +msgstr "" + +msgid ":c:data:`PyExc_ResourceWarning`." +msgstr "" + +msgid ":c:data:`PyExc_EncodingWarning`." +msgstr "" + +msgid "strerror (C function)" +msgstr "" + +msgid "module" +msgstr "" + +msgid "signal" +msgstr "" + +msgid "SIGINT (C macro)" +msgstr "" + +msgid "KeyboardInterrupt (built-in exception)" +msgstr "" diff --git a/c-api/extension-modules.po b/c-api/extension-modules.po index 1e424b41..9d5b725d 100644 --- a/c-api/extension-modules.po +++ b/c-api/extension-modules.po @@ -8,25 +8,29 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/extension-modules.rst:6 msgid "Defining extension modules" msgstr "" +#: ../../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 `." +"which exports an :dfn:`export hook` function (or an old-style :ref:" +"`initialization function `)." msgstr "" +#: ../../c-api/extension-modules.rst:14 msgid "" "To be importable by default (that is, by :py:class:`importlib.machinery." "ExtensionFileLoader`), the shared library must be available on :py:attr:`sys." @@ -34,6 +38,7 @@ msgid "" "py:attr:`importlib.machinery.EXTENSION_SUFFIXES`." msgstr "" +#: ../../c-api/extension-modules.rst:22 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 " @@ -41,51 +46,245 @@ msgid "" "io/en/latest/setuptools.html." msgstr "" +#: ../../c-api/extension-modules.rst:30 +msgid "Extension export hook" +msgstr "" + +#: ../../c-api/extension-modules.rst:34 +msgid "" +"Support for the :samp:`PyModExport_{}` export hook was added in Python " +"3.15. The older way of defining modules is still available: consult either " +"the :ref:`extension-pyinit` section or earlier versions of this " +"documentation if you plan to support earlier Python versions." +msgstr "" + +#: ../../c-api/extension-modules.rst:39 +msgid "" +"The export hook must be an exported function with the following signature:" +msgstr "" + +#: ../../c-api/extension-modules.rst:43 +msgid "" +"For modules with ASCII-only names, the :ref:`export hook ` must be named :samp:`PyModExport_{}`, with ```` replaced " +"by the module's name." +msgstr "" + +#: ../../c-api/extension-modules.rst:47 +msgid "" +"For non-ASCII module names, the export hook must instead be named :samp:" +"`PyModExportU_{}` (note the ``U``), with ```` encoded using " +"Python's *punycode* encoding with hyphens replaced by underscores. In Python:" +msgstr "" + +#: ../../c-api/extension-modules.rst:51 +msgid "" +"def hook_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'PyModExport' + suffix" +msgstr "" + +#: ../../c-api/extension-modules.rst:60 +msgid "" +"The export hook returns an array of :c:type:`PySlot` entries, terminated by " +"an entry with a slot ID of ``0``. These slots describe how the module should " +"be created and initialized." +msgstr "" + +#: ../../c-api/extension-modules.rst:64 +msgid "" +"This array must remain valid and constant until interpreter shutdown. " +"Typically, it should use ``static`` storage. Prefer using the :c:macro:" +"`Py_mod_create` and :c:macro:`Py_mod_exec` slots for any dynamic behavior." +msgstr "" + +#: ../../c-api/extension-modules.rst:69 +msgid "" +"The export hook may return ``NULL`` with an exception set to signal failure." +msgstr "" + +#: ../../c-api/extension-modules.rst:71 +msgid "" +"It is recommended to define the export hook function using a helper macro:" +msgstr "" + +#: ../../c-api/extension-modules.rst:75 +msgid "Declare an extension module export hook. This macro:" +msgstr "" + +#: ../../c-api/extension-modules.rst:78 +msgid "specifies the :c:expr:`PySlot*` return type," +msgstr "" + +#: ../../c-api/extension-modules.rst:79 ../../c-api/extension-modules.rst:248 +msgid "adds any special linkage declarations required by the platform, and" +msgstr "" + +#: ../../c-api/extension-modules.rst:80 ../../c-api/extension-modules.rst:249 +msgid "for C++, declares the function as ``extern \"C\"``." +msgstr "" + +#: ../../c-api/extension-modules.rst:82 ../../c-api/extension-modules.rst:279 +msgid "For example, a module called ``spam`` would be defined like this::" +msgstr "" + +#: ../../c-api/extension-modules.rst:84 msgid "" -"Normally, the initialization function returns a module definition " -"initialized using :c:func:`PyModuleDef_Init`. This allows splitting the " -"creation process into several phases:" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot spam_slots[] = {\n" +" PySlot_STATIC_DATA(Py_mod_abi, &abi_info),\n" +" PySlot_STATIC_DATA(Py_mod_name, \"spam\"),\n" +" PySlot_FUNC(Py_mod_init, spam_init_function),\n" +" ...\n" +" PySlot_END\n" +"};\n" +"\n" +"PyMODEXPORT_FUNC\n" +"PyModExport_spam(void)\n" +"{\n" +" return spam_slots;\n" +"}" msgstr "" +#: ../../c-api/extension-modules.rst:100 +msgid "" +"The export hook is typically the only non-\\ ``static`` item defined in the " +"module's C source." +msgstr "" + +#: ../../c-api/extension-modules.rst:105 +msgid "" +"The hook should be kept short. If it does more than ``return`` a static " +"array, several caveats apply:" +msgstr "" + +#: ../../c-api/extension-modules.rst:108 +msgid "" +"If you need to use any Python C API, it is recommended to call :c:func:" +"`PyABIInfo_Check` first to raise an exception, rather than crash, in common " +"cases of ABI mismatch." +msgstr "" + +#: ../../c-api/extension-modules.rst:111 +msgid "" +"Code in the export hook must never rely on the :term:`GIL`: :term:`free-" +"threaded builds ` of Python can only check the :c:macro:" +"`Py_mod_gil` slot (or the lack of it) after the hook returns," +msgstr "" + +#: ../../c-api/extension-modules.rst:114 +msgid "" +"Similarly, the hook may be called in any subinterpreter, since the :c:macro:" +"`Py_mod_multiple_interpreters` slot (or lack of it) is only checked after " +"the hook returns." +msgstr "" + +#: ../../c-api/extension-modules.rst:118 +msgid "For example::" +msgstr "" + +#: ../../c-api/extension-modules.rst:120 +msgid "" +"PyMODEXPORT_FUNC\n" +"PyModExport_modulename(void)\n" +"{\n" +" if (PyABIInfo_Check(&abi_info, \"modulename\") < 0) {\n" +" /* ABI mismatch. It's not safe to examine the raised exception. */\n" +" return NULL;\n" +" }\n" +"\n" +" /* use Python API (as little as possible); don't rely on GIL */\n" +"\n" +" return modulename_slots;\n" +"}" +msgstr "" + +#: ../../c-api/extension-modules.rst:135 +msgid "" +"It is possible to export multiple modules from a single shared library by " +"defining multiple export hooks. However, importing them requires a custom " +"importer or suitably named copies/links of the extension file, because " +"Python's import machinery only finds the function corresponding to the " +"filename. See the `Multiple modules in one library `__ section in :pep:`489` for " +"details." +msgstr "" + +#: ../../c-api/extension-modules.rst:147 +msgid "Multi-phase initialization" +msgstr "" + +#: ../../c-api/extension-modules.rst:149 +msgid "The process of creating an extension module follows several phases:" +msgstr "" + +#: ../../c-api/extension-modules.rst:151 +msgid "" +"Python finds and calls the export hook to get information on how to create " +"the module." +msgstr "" + +#: ../../c-api/extension-modules.rst:153 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." +"refuse loading an incompatible extension. Slots like :c:data:`Py_mod_abi`, :" +"c:data:`Py_mod_gil` and :c:data:`Py_mod_multiple_interpreters` influence " +"this step." +msgstr "" + +#: ../../c-api/extension-modules.rst:158 +msgid "" +"By default, Python itself then creates the module object -- that is, it does " +"the equivalent of calling :py:meth:`~object.__new__` when creating an " +"object. This step can be overridden using the :c:data:`Py_mod_create` slot." msgstr "" +#: ../../c-api/extension-modules.rst:161 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__`." +"Python sets initial module attributes like :attr:`~module.__package__` and :" +"attr:`~module.__loader__`, and inserts the module object into :py:attr:`sys." +"modules`." msgstr "" +#: ../../c-api/extension-modules.rst:164 msgid "" -"Afterwards, the module object is initialized using extension-specific code " -"-- the equivalent of :py:meth:`~object.__init__` on classes." +"Afterwards, the module object is initialized in an extension-specific way -- " +"the equivalent of :py:meth:`~object.__init__` when creating an object, or of " +"executing top-level code in a Python-language module. The behavior is " +"specified using the :c:data:`Py_mod_exec` slot." msgstr "" +#: ../../c-api/extension-modules.rst:169 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." +"legacy (but still supported) :ref:`single-phase initialization `, where an initialization function returns a fully " +"constructed module." msgstr "" +#: ../../c-api/extension-modules.rst:175 msgid "Added support for multi-phase initialization (:pep:`489`)." msgstr "" +#: ../../c-api/extension-modules.rst:179 msgid "Multiple module instances" msgstr "" +#: ../../c-api/extension-modules.rst:181 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 " +"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 "" +#: ../../c-api/extension-modules.rst:188 msgid "" "Additional module instances may be created in :ref:`sub-interpreters ` or after Python runtime reinitialization (:c:func:" @@ -94,6 +293,7 @@ msgid "" "behavior." msgstr "" +#: ../../c-api/extension-modules.rst:195 msgid "" "To avoid such issues, each instance of an extension module should be " "*isolated*: changes to one instance should not implicitly affect the others, " @@ -102,11 +302,13 @@ msgid "" "extensions-howto` for more details and a practical guide." msgstr "" +#: ../../c-api/extension-modules.rst:201 msgid "" "A simpler way to avoid these issues is :ref:`raising an error on repeated " "initialization `." msgstr "" +#: ../../c-api/extension-modules.rst:204 msgid "" "All modules are expected to support :ref:`sub-interpreters `, or otherwise explicitly signal a lack of support. This is usually " @@ -115,142 +317,143 @@ msgid "" "`Py_mod_multiple_interpreters` slot." msgstr "" -msgid "Initialization function" +#: ../../c-api/extension-modules.rst:216 +msgid "``PyInit`` function" msgstr "" +#: ../../c-api/extension-modules.rst:220 msgid "" -"The initialization function defined by an extension module has the following " -"signature:" +"This functionality will not get new features, but there are no plans to " +"remove it." msgstr "" +#: ../../c-api/extension-modules.rst:223 msgid "" -"Its name should be :samp:`PyInit_{}`, with ```` replaced by the " -"name of the module." +"Instead of :c:func:`PyModExport_modulename`, an extension module can define " +"an older-style :dfn:`initialization function` with the signature:" msgstr "" +#: ../../c-api/extension-modules.rst:228 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:" +"Its name should be :samp:`PyInit_{}`, with ```` replaced by the " +"name of the module. For non-ASCII module names, use :samp:`PyInitU_{}` " +"instead, with ```` encoded in the same way as for the :ref:`export " +"hook ` (that is, using Punycode with underscores)." msgstr "" +#: ../../c-api/extension-modules.rst:235 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" +"If a module exports both :samp:`PyInit_{}` and :samp:" +"`PyModExport_{}`, the :samp:`PyInit_{}` function is ignored." msgstr "" +#: ../../c-api/extension-modules.rst:239 msgid "" -"It is recommended to define the initialization function using a helper macro:" +"Like with :c:macro:`PyMODEXPORT_FUNC`, it is recommended to define the " +"initialization function using a helper macro:" msgstr "" +#: ../../c-api/extension-modules.rst:244 msgid "Declare an extension module initialization function. This macro:" msgstr "" +#: ../../c-api/extension-modules.rst:247 msgid "specifies the :c:expr:`PyObject*` return type," msgstr "" -msgid "adds any special linkage declarations required by the platform, and" -msgstr "" - -msgid "for C++, declares the function as ``extern \"C\"``." -msgstr "" - -msgid "For example, a module called ``spam`` would be defined like this::" -msgstr "" - +#: ../../c-api/extension-modules.rst:252 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 "" - -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 "" - -msgid "" -"The initialization function is typically the only non-\\ ``static`` item " -"defined in the module's C source." -msgstr "" - -msgid "Multi-phase initialization" +"Normally, the initialization function (``PyInit_modulename``) returns a :c:" +"type:`PyModuleDef` instance with non-``NULL`` :c:member:`~PyModuleDef." +"m_slots`. This allows Python to use :ref:`multi-phase initialization `." msgstr "" +#: ../../c-api/extension-modules.rst:257 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:" +"Before it is returned, the ``PyModuleDef`` instance must be initialized " +"using the following function:" msgstr "" +#: ../../c-api/extension-modules.rst:262 msgid "" "Ensure a module definition is a properly initialized Python object that " "correctly reports its type and a reference count." msgstr "" +#: ../../c-api/extension-modules.rst:265 msgid "Return *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." msgstr "" +#: ../../c-api/extension-modules.rst:267 msgid "" -"Calling this function is required for :ref:`multi-phase-initialization`. It " -"should not be used in other contexts." +"Calling this function is required before returning a :c:type:`PyModuleDef` " +"from a module initialization function. It should not be used in other " +"contexts." msgstr "" +#: ../../c-api/extension-modules.rst:271 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 "" +#: ../../c-api/extension-modules.rst:281 +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 "" + +#: ../../c-api/extension-modules.rst:297 msgid "Legacy single-phase initialization" msgstr "" +#: ../../c-api/extension-modules.rst:301 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 "" +#: ../../c-api/extension-modules.rst:305 +msgid "However, there are no plans to remove support for it." +msgstr "" + +#: ../../c-api/extension-modules.rst:307 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`." +"In single-phase initialization, the old-style :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 "" +#: ../../c-api/extension-modules.rst:313 msgid "" "Single-phase initialization differs from the :ref:`default ` in the following ways:" msgstr "" +#: ../../c-api/extension-modules.rst:316 msgid "Single-phase modules are, or rather *contain*, “singletons”." msgstr "" +#: ../../c-api/extension-modules.rst:318 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 "" +#: ../../c-api/extension-modules.rst:322 msgid "" "For subsequent imports, Python does not call the initialization function " "again. Instead, it creates a new module object with a new ``__dict__``, and " @@ -259,6 +462,7 @@ msgid "" "an exception class ``error``:" msgstr "" +#: ../../c-api/extension-modules.rst:330 msgid "" ">>> import sys\n" ">>> import _testsinglephase as one\n" @@ -274,10 +478,12 @@ msgid "" "True" msgstr "" +#: ../../c-api/extension-modules.rst:345 msgid "" "The exact behavior should be considered a CPython implementation detail." msgstr "" +#: ../../c-api/extension-modules.rst:347 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 " @@ -286,19 +492,27 @@ msgid "" "parent package name to the name of the module." msgstr "" +#: ../../c-api/extension-modules.rst:353 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 "" +#: ../../c-api/extension-modules.rst:356 msgid "Non-ASCII module names (``PyInitU_modulename``) are not supported." msgstr "" +#: ../../c-api/extension-modules.rst:358 msgid "" "Single-phase modules support module lookup functions like :c:func:" "`PyState_FindModule`." msgstr "" +#: ../../c-api/extension-modules.rst:361 +msgid "The module's :c:member:`PyModuleDef.m_slots` must be NULL." +msgstr "" + +#: ../../c-api/extension-modules.rst:363 msgid "" "``_testsinglephase`` is an internal module used in CPython's self-test " "suite; your installation may or may not include it." diff --git a/c-api/extension-modules.po~ b/c-api/extension-modules.po~ new file mode 100644 index 00000000..1e424b41 --- /dev/null +++ b/c-api/extension-modules.po~ @@ -0,0 +1,305 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Defining extension modules" +msgstr "" + +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 "" + +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 "" + +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 "" + +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 "" + +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 "" + +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 "" + +msgid "" +"Afterwards, the module object is initialized using extension-specific code " +"-- the equivalent of :py:meth:`~object.__init__` on classes." +msgstr "" + +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 "" + +msgid "Added support for multi-phase initialization (:pep:`489`)." +msgstr "" + +msgid "Multiple module instances" +msgstr "" + +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 "" + +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 "" + +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 "" + +msgid "" +"A simpler way to avoid these issues is :ref:`raising an error on repeated " +"initialization `." +msgstr "" + +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 "" + +msgid "Initialization function" +msgstr "" + +msgid "" +"The initialization function defined by an extension module has the following " +"signature:" +msgstr "" + +msgid "" +"Its name should be :samp:`PyInit_{}`, with ```` replaced by the " +"name of the module." +msgstr "" + +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 "" + +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 "" + +msgid "" +"It is recommended to define the initialization function using a helper macro:" +msgstr "" + +msgid "Declare an extension module initialization function. This macro:" +msgstr "" + +msgid "specifies the :c:expr:`PyObject*` return type," +msgstr "" + +msgid "adds any special linkage declarations required by the platform, and" +msgstr "" + +msgid "for C++, declares the function as ``extern \"C\"``." +msgstr "" + +msgid "For example, a module called ``spam`` would be defined like this::" +msgstr "" + +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 "" + +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 "" + +msgid "" +"The initialization function is typically the only non-\\ ``static`` item " +"defined in the module's C source." +msgstr "" + +msgid "Multi-phase initialization" +msgstr "" + +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 "" + +msgid "" +"Ensure a module definition is a properly initialized Python object that " +"correctly reports its type and a reference count." +msgstr "" + +msgid "Return *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." +msgstr "" + +msgid "" +"Calling this function is required for :ref:`multi-phase-initialization`. It " +"should not be used in other contexts." +msgstr "" + +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 "" + +msgid "Legacy single-phase initialization" +msgstr "" + +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 "" + +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 "" + +msgid "" +"Single-phase initialization differs from the :ref:`default ` in the following ways:" +msgstr "" + +msgid "Single-phase modules are, or rather *contain*, “singletons”." +msgstr "" + +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 "" + +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 "" + +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 "" + +msgid "" +"The exact behavior should be considered a CPython implementation detail." +msgstr "" + +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 "" + +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 "" + +msgid "Non-ASCII module names (``PyInitU_modulename``) are not supported." +msgstr "" + +msgid "" +"Single-phase modules support module lookup functions like :c:func:" +"`PyState_FindModule`." +msgstr "" + +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/file.po b/c-api/file.po index f0ae0886..530629c2 100644 --- a/c-api/file.po +++ b/c-api/file.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "File Objects" +#: ../../c-api/file.rst:6 +msgid "File objects" msgstr "" +#: ../../c-api/file.rst:10 msgid "" "These APIs are a minimal emulation of the Python 2 C API for built-in file " "objects, which used to rely on the buffered I/O (:c:expr:`FILE*`) support " @@ -31,6 +33,7 @@ msgid "" "`io` APIs instead." msgstr "" +#: ../../c-api/file.rst:22 msgid "" "Create a Python file object from the file descriptor of an already opened " "file *fd*. The arguments *name*, *encoding*, *errors* and *newline* can be " @@ -40,15 +43,18 @@ msgid "" "to the :func:`io.open` function documentation." msgstr "" +#: ../../c-api/file.rst:31 msgid "" "Since Python streams have their own buffering layer, mixing them with OS-" "level file descriptors can produce various issues (such as unexpected " "ordering of data)." msgstr "" +#: ../../c-api/file.rst:35 msgid "Ignore *name* attribute." msgstr "" +#: ../../c-api/file.rst:41 msgid "" "Return the file descriptor associated with *p* as an :c:expr:`int`. If the " "object is an integer, its value is returned. If not, the object's :meth:" @@ -57,6 +63,7 @@ msgid "" "and returns ``-1`` on failure." msgstr "" +#: ../../c-api/file.rst:52 msgid "" "Equivalent to ``p.readline([n])``, this function reads one line from the " "object *p*. *p* may be a file object or any object with a :meth:`~io.IOBase." @@ -69,65 +76,135 @@ msgid "" "is reached immediately." msgstr "" +#: ../../c-api/file.rst:65 msgid "" "Overrides the normal behavior of :func:`io.open_code` to pass its parameter " "through the provided handler." msgstr "" +#: ../../c-api/file.rst:68 msgid "The *handler* is a function of type:" msgstr "" +#: ../../c-api/file.rst:73 msgid "" "Equivalent of :c:expr:`PyObject *(\\*)(PyObject *path, void *userData)`, " "where *path* is guaranteed to be :c:type:`PyUnicodeObject`." msgstr "" +#: ../../c-api/file.rst:77 msgid "" "The *userData* pointer is passed into the hook function. Since hook " "functions may be called from different runtimes, this pointer should not " "refer directly to Python state." msgstr "" +#: ../../c-api/file.rst:81 msgid "" "As this hook is intentionally used during import, avoid importing new " "modules during its execution unless they are known to be frozen or available " "in ``sys.modules``." msgstr "" +#: ../../c-api/file.rst:85 msgid "" "Once a hook has been set, it cannot be removed or replaced, and later calls " "to :c:func:`PyFile_SetOpenCodeHook` will fail. On failure, the function " "returns -1 and sets an exception if the interpreter has been initialized." msgstr "" +#: ../../c-api/file.rst:89 msgid "This function is safe to call before :c:func:`Py_Initialize`." msgstr "" +#: ../../c-api/file.rst:91 msgid "" "Raises an :ref:`auditing event ` ``setopencodehook`` with no " "arguments." msgstr "" +#: ../../c-api/file.rst:98 +msgid "" +"Open *path* with the mode ``'rb'``. *path* must be a Python :class:`str` " +"object. The behavior of this function may be overridden by :c:func:" +"`PyFile_SetOpenCodeHook` to allow for some preprocessing of the text." +msgstr "" + +#: ../../c-api/file.rst:103 +msgid "This is analogous to :func:`io.open_code` in Python." +msgstr "" + +#: ../../c-api/file.rst:105 +msgid "" +"On success, this function returns a :term:`strong reference` to a Python " +"file object. On failure, this function returns ``NULL`` with an exception " +"set." +msgstr "" + +#: ../../c-api/file.rst:114 +msgid "" +"Similar to :c:func:`PyFile_OpenCodeObject`, but *path* is a UTF-8 encoded :c:" +"expr:`const char*`." +msgstr "" + +#: ../../c-api/file.rst:124 msgid "" "Write object *obj* to file object *p*. The only supported flag for *flags* " "is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is " -"written instead of the :func:`repr`. Return ``0`` on success or ``-1`` on " -"failure; the appropriate exception will be set." +"written instead of the :func:`repr`." +msgstr "" + +#: ../../c-api/file.rst:128 +msgid "If *obj* is ``NULL``, write the string ``\"\"``." +msgstr "" + +#: ../../c-api/file.rst:130 +msgid "" +"Return ``0`` on success or ``-1`` on failure; the appropriate exception will " +"be set." msgstr "" +#: ../../c-api/file.rst:135 msgid "" "Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on " "failure; the appropriate exception will be set." msgstr "" +#: ../../c-api/file.rst:140 +msgid "Soft-deprecated API" +msgstr "" + +#: ../../c-api/file.rst:144 +msgid "" +"These are APIs that were included in Python's C API by mistake. They are " +"documented solely for completeness; use other ``PyFile*`` APIs instead." +msgstr "" + +#: ../../c-api/file.rst:150 +msgid "" +"Use :c:func:`PyFile_FromFd` with defaults (``fd, NULL, \"w\", -1, NULL, " +"NULL, NULL, 0``) instead." +msgstr "" + +#: ../../c-api/file.rst:154 +msgid "" +"Type of file-like objects used internally at Python startup when :py:mod:" +"`io` is not yet available. Use Python :py:func:`open` or :c:func:" +"`PyFile_FromFd` to create file objects instead." +msgstr "" + +#: ../../c-api/file.rst:8 msgid "object" msgstr "" +#: ../../c-api/file.rst:8 msgid "file" msgstr "" +#: ../../c-api/file.rst:50 msgid "EOFError (built-in exception)" msgstr "" +#: ../../c-api/file.rst:122 msgid "Py_PRINT_RAW (C macro)" msgstr "" diff --git a/c-api/file.po~ b/c-api/file.po~ new file mode 100644 index 00000000..f0ae0886 --- /dev/null +++ b/c-api/file.po~ @@ -0,0 +1,133 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "File Objects" +msgstr "" + +msgid "" +"These APIs are a minimal emulation of the Python 2 C API for built-in file " +"objects, which used to rely on the buffered I/O (:c:expr:`FILE*`) support " +"from the C standard library. In Python 3, files and streams use the new :" +"mod:`io` module, which defines several layers over the low-level unbuffered " +"I/O of the operating system. The functions described below are convenience " +"C wrappers over these new APIs, and meant mostly for internal error " +"reporting in the interpreter; third-party code is advised to access the :mod:" +"`io` APIs instead." +msgstr "" + +msgid "" +"Create a Python file object from the file descriptor of an already opened " +"file *fd*. The arguments *name*, *encoding*, *errors* and *newline* can be " +"``NULL`` to use the defaults; *buffering* can be *-1* to use the default. " +"*name* is ignored and kept for backward compatibility. Return ``NULL`` on " +"failure. For a more comprehensive description of the arguments, please refer " +"to the :func:`io.open` function documentation." +msgstr "" + +msgid "" +"Since Python streams have their own buffering layer, mixing them with OS-" +"level file descriptors can produce various issues (such as unexpected " +"ordering of data)." +msgstr "" + +msgid "Ignore *name* attribute." +msgstr "" + +msgid "" +"Return the file descriptor associated with *p* as an :c:expr:`int`. If the " +"object is an integer, its value is returned. If not, the object's :meth:" +"`~io.IOBase.fileno` method is called if it exists; the method must return an " +"integer, which is returned as the file descriptor value. Sets an exception " +"and returns ``-1`` on failure." +msgstr "" + +msgid "" +"Equivalent to ``p.readline([n])``, this function reads one line from the " +"object *p*. *p* may be a file object or any object with a :meth:`~io.IOBase." +"readline` method. If *n* is ``0``, exactly one line is read, regardless of " +"the length of the line. If *n* is greater than ``0``, no more than *n* " +"bytes will be read from the file; a partial line can be returned. In both " +"cases, an empty string is returned if the end of the file is reached " +"immediately. If *n* is less than ``0``, however, one line is read " +"regardless of length, but :exc:`EOFError` is raised if the end of the file " +"is reached immediately." +msgstr "" + +msgid "" +"Overrides the normal behavior of :func:`io.open_code` to pass its parameter " +"through the provided handler." +msgstr "" + +msgid "The *handler* is a function of type:" +msgstr "" + +msgid "" +"Equivalent of :c:expr:`PyObject *(\\*)(PyObject *path, void *userData)`, " +"where *path* is guaranteed to be :c:type:`PyUnicodeObject`." +msgstr "" + +msgid "" +"The *userData* pointer is passed into the hook function. Since hook " +"functions may be called from different runtimes, this pointer should not " +"refer directly to Python state." +msgstr "" + +msgid "" +"As this hook is intentionally used during import, avoid importing new " +"modules during its execution unless they are known to be frozen or available " +"in ``sys.modules``." +msgstr "" + +msgid "" +"Once a hook has been set, it cannot be removed or replaced, and later calls " +"to :c:func:`PyFile_SetOpenCodeHook` will fail. On failure, the function " +"returns -1 and sets an exception if the interpreter has been initialized." +msgstr "" + +msgid "This function is safe to call before :c:func:`Py_Initialize`." +msgstr "" + +msgid "" +"Raises an :ref:`auditing event ` ``setopencodehook`` with no " +"arguments." +msgstr "" + +msgid "" +"Write object *obj* to file object *p*. The only supported flag for *flags* " +"is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of the object is " +"written instead of the :func:`repr`. Return ``0`` on success or ``-1`` on " +"failure; the appropriate exception will be set." +msgstr "" + +msgid "" +"Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on " +"failure; the appropriate exception will be set." +msgstr "" + +msgid "object" +msgstr "" + +msgid "file" +msgstr "" + +msgid "EOFError (built-in exception)" +msgstr "" + +msgid "Py_PRINT_RAW (C macro)" +msgstr "" diff --git a/c-api/float.po b/c-api/float.po index c34a3302..060001b2 100644 --- a/c-api/float.po +++ b/c-api/float.po @@ -8,46 +8,54 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/float.rst:6 msgid "Floating-Point Objects" msgstr "" +#: ../../c-api/float.rst:13 msgid "" "This subtype of :c:type:`PyObject` represents a Python floating-point object." msgstr "" +#: ../../c-api/float.rst:18 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python floating-point " "type. This is the same object as :class:`float` in the Python layer." msgstr "" +#: ../../c-api/float.rst:24 msgid "" "Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:" "type:`PyFloatObject`. This function always succeeds." msgstr "" +#: ../../c-api/float.rst:30 msgid "" "Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype " "of :c:type:`PyFloatObject`. This function always succeeds." msgstr "" +#: ../../c-api/float.rst:36 msgid "" "Create a :c:type:`PyFloatObject` object based on the string value in *str*, " "or ``NULL`` on failure." msgstr "" +#: ../../c-api/float.rst:42 msgid "" "Create a :c:type:`PyFloatObject` object from *v*, or ``NULL`` on failure." msgstr "" +#: ../../c-api/float.rst:47 msgid "" "Return a C :c:expr:`double` representation of the contents of *pyfloat*. If " "*pyfloat* is not a Python floating-point object but has a :meth:`~object." @@ -57,132 +65,255 @@ msgid "" "should call :c:func:`PyErr_Occurred` to check for errors." msgstr "" +#: ../../c-api/float.rst:54 msgid "Use :meth:`~object.__index__` if available." msgstr "" +#: ../../c-api/float.rst:60 msgid "" "Return a C :c:expr:`double` representation of the contents of *pyfloat*, but " "without error checking." msgstr "" +#: ../../c-api/float.rst:66 msgid "" "Return a structseq instance which contains information about the precision, " "minimum and maximum values of a float. It's a thin wrapper around the header " "file :file:`float.h`." msgstr "" +#: ../../c-api/float.rst:73 msgid "" "Return the maximum representable finite float *DBL_MAX* as C :c:expr:" "`double`." msgstr "" +#: ../../c-api/float.rst:78 msgid "" "Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`." msgstr "" +#: ../../c-api/float.rst:83 +msgid "" +"This macro expands to a constant expression of type :c:expr:`double`, that " +"represents the positive infinity." +msgstr "" + +#: ../../c-api/float.rst:86 +msgid "" +"It is equivalent to the :c:macro:`!INFINITY` macro from the C11 standard " +"```` header." +msgstr "" + +#: ../../c-api/float.rst:94 +msgid "" +"This macro expands to a constant expression of type :c:expr:`double`, that " +"represents a quiet not-a-number (qNaN) value." +msgstr "" + +#: ../../c-api/float.rst:97 +msgid "" +"On most platforms, this is equivalent to the :c:macro:`!NAN` macro from the " +"C11 standard ```` header." +msgstr "" + +#: ../../c-api/float.rst:103 +msgid "Equivalent to :c:macro:`!INFINITY`." +msgstr "" + +#: ../../c-api/float.rst:110 +msgid "" +"The definition (accurate for a :c:expr:`double` type) of the :data:`math.e` " +"constant." +msgstr "" + +#: ../../c-api/float.rst:115 +msgid "High precision (long double) definition of :data:`~math.e` constant." +msgstr "" + +#: ../../c-api/float.rst:122 +msgid "" +"The definition (accurate for a :c:expr:`double` type) of the :data:`math.pi` " +"constant." +msgstr "" + +#: ../../c-api/float.rst:127 +msgid "High precision (long double) definition of :data:`~math.pi` constant." +msgstr "" + +#: ../../c-api/float.rst:134 +msgid "" +"The definition (accurate for a :c:expr:`double` type) of the :data:`math." +"tau` constant." +msgstr "" + +#: ../../c-api/float.rst:141 +msgid "Return :data:`math.nan` from a function." +msgstr "" + +#: ../../c-api/float.rst:143 +msgid "" +"On most platforms, this is equivalent to ``return PyFloat_FromDouble(NAN)``." +msgstr "" + +#: ../../c-api/float.rst:148 +msgid "" +"Return :data:`math.inf` or :data:`-math.inf ` from a function, " +"depending on the sign of *sign*." +msgstr "" + +#: ../../c-api/float.rst:151 +msgid "On most platforms, this is equivalent to the following::" +msgstr "" + +#: ../../c-api/float.rst:153 +msgid "return PyFloat_FromDouble(copysign(INFINITY, sign));" +msgstr "" + +#: ../../c-api/float.rst:158 +msgid "" +"Return ``1`` if the given floating-point number *X* is finite, that is, it " +"is normal, subnormal or zero, but not infinite or NaN. Return ``0`` " +"otherwise." +msgstr "" + +#: ../../c-api/float.rst:162 +msgid "Use :c:macro:`!isfinite` instead." +msgstr "" + +#: ../../c-api/float.rst:168 +msgid "" +"Return ``1`` if the given floating-point number *X* is positive or negative " +"infinity. Return ``0`` otherwise." +msgstr "" + +#: ../../c-api/float.rst:171 +msgid "Use :c:macro:`!isinf` instead." +msgstr "" + +#: ../../c-api/float.rst:177 +msgid "" +"Return ``1`` if the given floating-point number *X* is a not-a-number (NaN) " +"value. Return ``0`` otherwise." +msgstr "" + +#: ../../c-api/float.rst:180 +msgid "Use :c:macro:`!isnan` instead." +msgstr "" + +#: ../../c-api/float.rst:185 msgid "Pack and Unpack functions" msgstr "" +#: ../../c-api/float.rst:187 msgid "" "The pack and unpack functions provide an efficient platform-independent way " "to store floating-point values as byte strings. The Pack routines produce a " "bytes string from a C :c:expr:`double`, and the Unpack routines produce a C :" "c:expr:`double` from such a bytes string. The suffix (2, 4 or 8) specifies " -"the number of bytes in the bytes string." +"the number of bytes in the bytes string:" msgstr "" -msgid "" -"On platforms that appear to use IEEE 754 formats these functions work by " -"copying bits. On other platforms, the 2-byte format is identical to the IEEE " -"754 binary16 half-precision format, the 4-byte format (32-bit) is identical " -"to the IEEE 754 binary32 single precision format, and the 8-byte format to " -"the IEEE 754 binary64 double precision format, although the packing of INFs " -"and NaNs (if such things exist on the platform) isn't handled correctly, and " -"attempting to unpack a bytes string containing an IEEE INF or NaN will raise " -"an exception." +#: ../../c-api/float.rst:193 +msgid "The 2-byte format is the IEEE 754 binary16 half-precision format." msgstr "" +#: ../../c-api/float.rst:194 +msgid "The 4-byte format is the IEEE 754 binary32 single-precision format." +msgstr "" + +#: ../../c-api/float.rst:195 +msgid "The 8-byte format is the IEEE 754 binary64 double-precision format." +msgstr "" + +#: ../../c-api/float.rst:197 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." +"The NaN type may not be preserved on some platforms while unpacking " +"(signaling NaNs become quiet NaNs), for example on x86 systems in 32-bit " +"mode." msgstr "" +#: ../../c-api/float.rst:200 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. " -"What happens in such cases is partly accidental (alas)." +"It's assumed that the :c:expr:`double` type has the IEEE 754 binary64 double " +"precision format. What happens if it's not true is partly accidental " +"(alas). 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. The packing of special numbers like INFs and NaNs (if such things " +"exist on the platform) may not be handled correctly, and attempting to " +"unpack a bytes string containing an IEEE INF or NaN may raise an exception." msgstr "" +#: ../../c-api/float.rst:212 msgid "Pack functions" msgstr "" +#: ../../c-api/float.rst:214 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 " -"format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` ``p+7``), zero if you " -"want big-endian format (exponent first, at *p*). The :c:macro:" -"`PY_BIG_ENDIAN` constant can be used to use the native endian: it is equal " -"to ``1`` on big endian processor, or ``0`` on little endian processor." +"format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` and ``p+7``), zero if " +"you want big-endian format (exponent first, at *p*). Use the :c:macro:`!" +"PY_LITTLE_ENDIAN` constant to select the native endian: it is equal to ``0`` " +"on big endian processor, or ``1`` on little endian processor." msgstr "" +#: ../../c-api/float.rst:221 msgid "" "Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, " "most likely :exc:`OverflowError`)." msgstr "" -msgid "There are two problems on non-IEEE platforms:" -msgstr "" - -msgid "What this does is undefined if *x* is a NaN or infinity." -msgstr "" - -msgid "``-0.0`` and ``+0.0`` produce the same bytes string." -msgstr "" - +#: ../../c-api/float.rst:226 msgid "Pack a C double as the IEEE 754 binary16 half-precision format." msgstr "" +#: ../../c-api/float.rst:230 msgid "Pack a C double as the IEEE 754 binary32 single precision format." msgstr "" +#: ../../c-api/float.rst:234 msgid "Pack a C double as the IEEE 754 binary64 double precision format." msgstr "" +#: ../../c-api/float.rst:238 msgid "Unpack functions" msgstr "" +#: ../../c-api/float.rst:240 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 " "(exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-" -"endian (exponent first, at *p*). The :c:macro:`PY_BIG_ENDIAN` constant can " -"be used to use the native endian: it is equal to ``1`` on big endian " -"processor, or ``0`` on little endian processor." +"endian (exponent first, at *p*). Use the :c:macro:`!PY_LITTLE_ENDIAN` " +"constant to select the native endian: it is equal to ``0`` on big endian " +"processor, or ``1`` on little endian processor." msgstr "" +#: ../../c-api/float.rst:247 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:" "`OverflowError`)." msgstr "" -msgid "" -"Note that on a non-IEEE platform this will refuse to unpack a bytes string " -"that represents a NaN or infinity." -msgstr "" - +#: ../../c-api/float.rst:253 msgid "Unpack the IEEE 754 binary16 half-precision format as a C double." msgstr "" +#: ../../c-api/float.rst:257 msgid "Unpack the IEEE 754 binary32 single precision format as a C double." msgstr "" +#: ../../c-api/float.rst:261 msgid "Unpack the IEEE 754 binary64 double precision format as a C double." msgstr "" +#: ../../c-api/float.rst:8 msgid "object" msgstr "" +#: ../../c-api/float.rst:8 msgid "floating-point" msgstr "" diff --git a/c-api/float.po~ b/c-api/float.po~ new file mode 100644 index 00000000..c34a3302 --- /dev/null +++ b/c-api/float.po~ @@ -0,0 +1,188 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Floating-Point Objects" +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` represents a Python floating-point object." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python floating-point " +"type. This is the same object as :class:`float` in the Python layer." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:" +"type:`PyFloatObject`. This function always succeeds." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype " +"of :c:type:`PyFloatObject`. This function always succeeds." +msgstr "" + +msgid "" +"Create a :c:type:`PyFloatObject` object based on the string value in *str*, " +"or ``NULL`` on failure." +msgstr "" + +msgid "" +"Create a :c:type:`PyFloatObject` object from *v*, or ``NULL`` on failure." +msgstr "" + +msgid "" +"Return a C :c:expr:`double` representation of the contents of *pyfloat*. If " +"*pyfloat* is not a Python floating-point object but has a :meth:`~object." +"__float__` method, this method will first be called to convert *pyfloat* " +"into a float. If :meth:`!__float__` is not defined then it falls back to :" +"meth:`~object.__index__`. This method returns ``-1.0`` upon failure, so one " +"should call :c:func:`PyErr_Occurred` to check for errors." +msgstr "" + +msgid "Use :meth:`~object.__index__` if available." +msgstr "" + +msgid "" +"Return a C :c:expr:`double` representation of the contents of *pyfloat*, but " +"without error checking." +msgstr "" + +msgid "" +"Return a structseq instance which contains information about the precision, " +"minimum and maximum values of a float. It's a thin wrapper around the header " +"file :file:`float.h`." +msgstr "" + +msgid "" +"Return the maximum representable finite float *DBL_MAX* as C :c:expr:" +"`double`." +msgstr "" + +msgid "" +"Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`." +msgstr "" + +msgid "Pack and Unpack functions" +msgstr "" + +msgid "" +"The pack and unpack functions provide an efficient platform-independent way " +"to store floating-point values as byte strings. The Pack routines produce a " +"bytes string from a C :c:expr:`double`, and the Unpack routines produce a C :" +"c:expr:`double` from such a bytes string. The suffix (2, 4 or 8) specifies " +"the number of bytes in the bytes string." +msgstr "" + +msgid "" +"On platforms that appear to use IEEE 754 formats these functions work by " +"copying bits. On other platforms, the 2-byte format is identical to the IEEE " +"754 binary16 half-precision format, the 4-byte format (32-bit) is identical " +"to the IEEE 754 binary32 single precision format, and the 8-byte format to " +"the IEEE 754 binary64 double precision format, although the packing of INFs " +"and NaNs (if such things exist on the platform) isn't handled correctly, and " +"attempting to unpack a bytes string containing an IEEE INF or NaN will raise " +"an exception." +msgstr "" + +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 "" + +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. " +"What happens in such cases is partly accidental (alas)." +msgstr "" + +msgid "Pack functions" +msgstr "" + +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 " +"format (exponent last, at ``p+1``, ``p+3``, or ``p+6`` ``p+7``), zero if you " +"want big-endian format (exponent first, at *p*). The :c:macro:" +"`PY_BIG_ENDIAN` constant can be used to use the native endian: it is equal " +"to ``1`` on big endian processor, or ``0`` on little endian processor." +msgstr "" + +msgid "" +"Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, " +"most likely :exc:`OverflowError`)." +msgstr "" + +msgid "There are two problems on non-IEEE platforms:" +msgstr "" + +msgid "What this does is undefined if *x* is a NaN or infinity." +msgstr "" + +msgid "``-0.0`` and ``+0.0`` produce the same bytes string." +msgstr "" + +msgid "Pack a C double as the IEEE 754 binary16 half-precision format." +msgstr "" + +msgid "Pack a C double as the IEEE 754 binary32 single precision format." +msgstr "" + +msgid "Pack a C double as the IEEE 754 binary64 double precision format." +msgstr "" + +msgid "Unpack functions" +msgstr "" + +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 " +"(exponent last, at ``p+1``, ``p+3`` or ``p+6`` and ``p+7``), zero if big-" +"endian (exponent first, at *p*). The :c:macro:`PY_BIG_ENDIAN` constant can " +"be used to use the native endian: it is equal to ``1`` on big endian " +"processor, or ``0`` on little endian processor." +msgstr "" + +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:" +"`OverflowError`)." +msgstr "" + +msgid "" +"Note that on a non-IEEE platform this will refuse to unpack a bytes string " +"that represents a NaN or infinity." +msgstr "" + +msgid "Unpack the IEEE 754 binary16 half-precision format as a C double." +msgstr "" + +msgid "Unpack the IEEE 754 binary32 single precision format as a C double." +msgstr "" + +msgid "Unpack the IEEE 754 binary64 double precision format as a C double." +msgstr "" + +msgid "object" +msgstr "" + +msgid "floating-point" +msgstr "" diff --git a/c-api/frame.po b/c-api/frame.po index 0d29dafd..9c627c4b 100644 --- a/c-api/frame.po +++ b/c-api/frame.po @@ -8,115 +8,152 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Frame Objects" +#: ../../c-api/frame.rst:4 +msgid "Frame objects" msgstr "" +#: ../../c-api/frame.rst:8 msgid "The C structure of the objects used to describe frame objects." msgstr "" +#: ../../c-api/frame.rst:10 msgid "There are no public members in this structure." msgstr "" +#: ../../c-api/frame.rst:12 msgid "" "The members of this structure were removed from the public C API. Refer to " "the :ref:`What's New entry ` for details." msgstr "" +#: ../../c-api/frame.rst:17 msgid "" "The :c:func:`PyEval_GetFrame` and :c:func:`PyThreadState_GetFrame` functions " "can be used to get a frame object." msgstr "" +#: ../../c-api/frame.rst:20 msgid "See also :ref:`Reflection `." msgstr "" +#: ../../c-api/frame.rst:24 msgid "" "The type of frame objects. It is the same object as :py:class:`types." "FrameType` in the Python layer." msgstr "" +#: ../../c-api/frame.rst:29 msgid "" "Previously, this type was only available after including ````." msgstr "" +#: ../../c-api/frame.rst:34 +msgid "" +"Create a new frame object. This function returns a :term:`strong reference` " +"to the new frame object on success, and returns ``NULL`` with an exception " +"set on failure." +msgstr "" + +#: ../../c-api/frame.rst:40 msgid "Return non-zero if *obj* is a frame object." msgstr "" +#: ../../c-api/frame.rst:44 msgid "" "Previously, this function was only available after including ````." msgstr "" +#: ../../c-api/frame.rst:49 msgid "Get the *frame* next outer frame." msgstr "" +#: ../../c-api/frame.rst:51 msgid "" -"Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer frame." +"Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer " +"frame. This raises no exceptions." msgstr "" +#: ../../c-api/frame.rst:60 msgid "Get the *frame*'s :attr:`~frame.f_builtins` attribute." msgstr "" +#: ../../c-api/frame.rst:62 ../../c-api/frame.rst:93 msgid "Return a :term:`strong reference`. The result cannot be ``NULL``." msgstr "" +#: ../../c-api/frame.rst:69 msgid "Get the *frame* code." msgstr "" +#: ../../c-api/frame.rst:71 ../../c-api/frame.rst:137 msgid "Return a :term:`strong reference`." msgstr "" +#: ../../c-api/frame.rst:73 msgid "The result (frame code) cannot be ``NULL``." msgstr "" +#: ../../c-api/frame.rst:80 msgid "" "Get the generator, coroutine, or async generator that owns this frame, or " "``NULL`` if this frame is not owned by a generator. Does not raise an " "exception, even if the return value is ``NULL``." msgstr "" +#: ../../c-api/frame.rst:84 msgid "Return a :term:`strong reference`, or ``NULL``." msgstr "" +#: ../../c-api/frame.rst:91 msgid "Get the *frame*'s :attr:`~frame.f_globals` attribute." msgstr "" +#: ../../c-api/frame.rst:100 msgid "Get the *frame*'s :attr:`~frame.f_lasti` attribute." msgstr "" +#: ../../c-api/frame.rst:102 msgid "Returns -1 if ``frame.f_lasti`` is ``None``." msgstr "" +#: ../../c-api/frame.rst:109 msgid "Get the variable *name* of *frame*." msgstr "" +#: ../../c-api/frame.rst:111 msgid "Return a :term:`strong reference` to the variable value on success." msgstr "" +#: ../../c-api/frame.rst:112 msgid "" "Raise :exc:`NameError` and return ``NULL`` if the variable does not exist." msgstr "" +#: ../../c-api/frame.rst:113 msgid "Raise an exception and return ``NULL`` on error." msgstr "" +#: ../../c-api/frame.rst:115 msgid "*name* type must be a :class:`str`." msgstr "" +#: ../../c-api/frame.rst:122 msgid "" "Similar to :c:func:`PyFrame_GetVar`, but the variable name is a C string " "encoded in UTF-8." msgstr "" +#: ../../c-api/frame.rst:130 msgid "" "Get the *frame*'s :attr:`~frame.f_locals` attribute. If the frame refers to " "an :term:`optimized scope`, this returns a write-through proxy object that " @@ -125,17 +162,21 @@ msgid "" "directly (as described for :func:`locals`)." msgstr "" +#: ../../c-api/frame.rst:141 msgid "" "As part of :pep:`667`, return an instance of :c:var:" "`PyFrameLocalsProxy_Type`." msgstr "" +#: ../../c-api/frame.rst:147 msgid "Return the line number that *frame* is currently executing." msgstr "" -msgid "Frame Locals Proxies" +#: ../../c-api/frame.rst:151 +msgid "Frame locals proxies" msgstr "" +#: ../../c-api/frame.rst:155 msgid "" "The :attr:`~frame.f_locals` attribute on a :ref:`frame object ` is an instance of a \"frame-locals proxy\". The proxy object " @@ -144,30 +185,130 @@ msgid "" "to date with the live local variables in the frame itself." msgstr "" +#: ../../c-api/frame.rst:161 msgid "See :pep:`667` for more information." msgstr "" +#: ../../c-api/frame.rst:165 msgid "The type of frame :func:`locals` proxy objects." msgstr "" +#: ../../c-api/frame.rst:169 msgid "Return non-zero if *obj* is a frame :func:`locals` proxy." msgstr "" -msgid "Internal Frames" +#: ../../c-api/frame.rst:173 +msgid "Legacy local variable APIs" +msgstr "" + +#: ../../c-api/frame.rst:175 +msgid "" +"These APIs are :term:`soft deprecated`. As of Python 3.13, they do nothing. " +"They exist solely for backwards compatibility." +msgstr "" + +#: ../../c-api/frame.rst:181 +msgid "" +"Prior to Python 3.13, this function would copy the :attr:`~frame.f_locals` " +"attribute of *f* to the internal \"fast\" array of local variables, allowing " +"changes in frame objects to be visible to the interpreter. If *clear* was " +"true, this function would process variables that were unset in the locals " +"dictionary." +msgstr "" + +#: ../../c-api/frame.rst:187 ../../c-api/frame.rst:198 +#: ../../c-api/frame.rst:208 +msgid "This function now does nothing." +msgstr "" + +#: ../../c-api/frame.rst:193 +msgid "" +"Prior to Python 3.13, this function would copy the internal \"fast\" array " +"of local variables (which is used by the interpreter) to the :attr:`~frame." +"f_locals` attribute of *f*, allowing changes in local variables to be " +"visible to frame objects." +msgstr "" + +#: ../../c-api/frame.rst:204 +msgid "" +"Prior to Python 3.13, this function was similar to :c:func:" +"`PyFrame_FastToLocals`, but would return ``0`` on success, and ``-1`` with " +"an exception set on failure." +msgstr "" + +#: ../../c-api/frame.rst:213 +msgid ":pep:`667`" msgstr "" +#: ../../c-api/frame.rst:217 +msgid "Internal frames" +msgstr "" + +#: ../../c-api/frame.rst:219 msgid "Unless using :pep:`523`, you will not need this." msgstr "" +#: ../../c-api/frame.rst:223 msgid "The interpreter's internal frame representation." msgstr "" +#: ../../c-api/frame.rst:229 msgid "Return a :term:`strong reference` to the code object for the frame." msgstr "" +#: ../../c-api/frame.rst:236 msgid "Return the byte offset into the last executed instruction." msgstr "" +#: ../../c-api/frame.rst:243 msgid "" "Return the currently executing line number, or -1 if there is no line number." msgstr "" + +#: ../../c-api/frame.rst:250 +msgid "" +"An array of executable kinds (executor types) for frames, used for internal " +"debugging and tracing." +msgstr "" + +#: ../../c-api/frame.rst:253 +msgid "" +"Tools like debuggers and profilers can use this to identify the type of " +"execution context associated with a frame (such as to filter out internal " +"frames). The entries are indexed by the following constants:" +msgstr "" + +#: ../../c-api/frame.rst:261 +msgid "Constant" +msgstr "" + +#: ../../c-api/frame.rst:262 +msgid "Description" +msgstr "" + +#: ../../c-api/frame.rst:264 +msgid "" +"The frame is internal (For example: inlined) and should be skipped by tools." +msgstr "" + +#: ../../c-api/frame.rst:266 +msgid "The frame corresponds to a standard Python function." +msgstr "" + +#: ../../c-api/frame.rst:268 +msgid "The frame corresponds to a function defined in native code." +msgstr "" + +#: ../../c-api/frame.rst:270 +msgid "The frame corresponds to a method on a class instance." +msgstr "" + +#: ../../c-api/frame.rst:272 +msgid "" +"Note that reading the executable kind from a frame is currently only " +"possible with undocumented internal APIs." +msgstr "" + +#: ../../c-api/frame.rst:280 +msgid "The number of entries in :c:data:`PyUnstable_ExecutableKinds`." +msgstr "" diff --git a/c-api/frame.po~ b/c-api/frame.po~ new file mode 100644 index 00000000..0d29dafd --- /dev/null +++ b/c-api/frame.po~ @@ -0,0 +1,173 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Frame Objects" +msgstr "" + +msgid "The C structure of the objects used to describe frame objects." +msgstr "" + +msgid "There are no public members in this structure." +msgstr "" + +msgid "" +"The members of this structure were removed from the public C API. Refer to " +"the :ref:`What's New entry ` for details." +msgstr "" + +msgid "" +"The :c:func:`PyEval_GetFrame` and :c:func:`PyThreadState_GetFrame` functions " +"can be used to get a frame object." +msgstr "" + +msgid "See also :ref:`Reflection `." +msgstr "" + +msgid "" +"The type of frame objects. It is the same object as :py:class:`types." +"FrameType` in the Python layer." +msgstr "" + +msgid "" +"Previously, this type was only available after including ````." +msgstr "" + +msgid "Return non-zero if *obj* is a frame object." +msgstr "" + +msgid "" +"Previously, this function was only available after including ````." +msgstr "" + +msgid "Get the *frame* next outer frame." +msgstr "" + +msgid "" +"Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer frame." +msgstr "" + +msgid "Get the *frame*'s :attr:`~frame.f_builtins` attribute." +msgstr "" + +msgid "Return a :term:`strong reference`. The result cannot be ``NULL``." +msgstr "" + +msgid "Get the *frame* code." +msgstr "" + +msgid "Return a :term:`strong reference`." +msgstr "" + +msgid "The result (frame code) cannot be ``NULL``." +msgstr "" + +msgid "" +"Get the generator, coroutine, or async generator that owns this frame, or " +"``NULL`` if this frame is not owned by a generator. Does not raise an " +"exception, even if the return value is ``NULL``." +msgstr "" + +msgid "Return a :term:`strong reference`, or ``NULL``." +msgstr "" + +msgid "Get the *frame*'s :attr:`~frame.f_globals` attribute." +msgstr "" + +msgid "Get the *frame*'s :attr:`~frame.f_lasti` attribute." +msgstr "" + +msgid "Returns -1 if ``frame.f_lasti`` is ``None``." +msgstr "" + +msgid "Get the variable *name* of *frame*." +msgstr "" + +msgid "Return a :term:`strong reference` to the variable value on success." +msgstr "" + +msgid "" +"Raise :exc:`NameError` and return ``NULL`` if the variable does not exist." +msgstr "" + +msgid "Raise an exception and return ``NULL`` on error." +msgstr "" + +msgid "*name* type must be a :class:`str`." +msgstr "" + +msgid "" +"Similar to :c:func:`PyFrame_GetVar`, but the variable name is a C string " +"encoded in UTF-8." +msgstr "" + +msgid "" +"Get the *frame*'s :attr:`~frame.f_locals` attribute. If the frame refers to " +"an :term:`optimized scope`, this returns a write-through proxy object that " +"allows modifying the locals. In all other cases (classes, modules, :func:" +"`exec`, :func:`eval`) it returns the mapping representing the frame locals " +"directly (as described for :func:`locals`)." +msgstr "" + +msgid "" +"As part of :pep:`667`, return an instance of :c:var:" +"`PyFrameLocalsProxy_Type`." +msgstr "" + +msgid "Return the line number that *frame* is currently executing." +msgstr "" + +msgid "Frame Locals Proxies" +msgstr "" + +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 "" + +msgid "See :pep:`667` for more information." +msgstr "" + +msgid "The type of frame :func:`locals` proxy objects." +msgstr "" + +msgid "Return non-zero if *obj* is a frame :func:`locals` proxy." +msgstr "" + +msgid "Internal Frames" +msgstr "" + +msgid "Unless using :pep:`523`, you will not need this." +msgstr "" + +msgid "The interpreter's internal frame representation." +msgstr "" + +msgid "Return a :term:`strong reference` to the code object for the frame." +msgstr "" + +msgid "Return the byte offset into the last executed instruction." +msgstr "" + +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 5aeaf593..643de6a5 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -8,42 +8,49 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/function.rst:6 msgid "Function Objects" msgstr "" +#: ../../c-api/function.rst:10 msgid "There are a few functions specific to Python functions." msgstr "" +#: ../../c-api/function.rst:15 msgid "The C structure used for functions." msgstr "" +#: ../../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``." msgstr "" +#: ../../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." msgstr "" +#: ../../c-api/function.rst:34 msgid "" "Return a new function object associated with the code object *code*. " "*globals* must be a dictionary with the global variables accessible to the " "function." msgstr "" +#: ../../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, " @@ -52,6 +59,7 @@ msgid "" "co_qualname` field." msgstr "" +#: ../../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 " @@ -59,75 +67,104 @@ msgid "" "to the same value as the code object's :attr:`~codeobject.co_qualname` field." msgstr "" +#: ../../c-api/function.rst:57 msgid "Return the code object associated with the function object *op*." msgstr "" +#: ../../c-api/function.rst:62 msgid "Return the globals dictionary associated with the function object *op*." msgstr "" +#: ../../c-api/function.rst:67 msgid "" "Return a :term:`borrowed reference` to the :attr:`~function.__module__` " "attribute of the :ref:`function object ` *op*. It can be " "*NULL*." msgstr "" +#: ../../c-api/function.rst:71 msgid "" "This is normally a :class:`string ` containing the module name, but can " "be set to any other object by Python code." msgstr "" +#: ../../c-api/function.rst:77 msgid "" "Return the argument default values of the function object *op*. This can be " "a tuple of arguments or ``NULL``." msgstr "" +#: ../../c-api/function.rst:83 msgid "" "Set the argument default values for the function object *op*. *defaults* " "must be ``Py_None`` or a tuple." msgstr "" +#: ../../c-api/function.rst:86 ../../c-api/function.rst:125 +#: ../../c-api/function.rst:139 msgid "Raises :exc:`SystemError` and returns ``-1`` on failure." msgstr "" +#: ../../c-api/function.rst:91 msgid "Set the vectorcall field of a given function object *func*." msgstr "" +#: ../../c-api/function.rst:93 msgid "" "Warning: extensions using this API must preserve the behavior of the " "unaltered (default) vectorcall function!" msgstr "" +#: ../../c-api/function.rst:101 msgid "" "Return the keyword-only argument default values of the function object *op*. " "This can be a dictionary of arguments or ``NULL``." msgstr "" +#: ../../c-api/function.rst:107 +msgid "" +"Set the keyword-only argument default values of the function object *op*. " +"*defaults* must be a dictionary of keyword-only arguments or ``Py_None``." +msgstr "" + +#: ../../c-api/function.rst:110 +msgid "" +"This function returns ``0`` on success, and returns ``-1`` with an exception " +"set on failure." +msgstr "" + +#: ../../c-api/function.rst:116 msgid "" "Return the closure associated with the function object *op*. This can be " "``NULL`` or a tuple of cell objects." msgstr "" +#: ../../c-api/function.rst:122 msgid "" "Set the closure associated with the function object *op*. *closure* must be " "``Py_None`` or a tuple of cell objects." msgstr "" +#: ../../c-api/function.rst:130 msgid "" "Return the annotations of the function object *op*. This can be a mutable " "dictionary or ``NULL``." msgstr "" +#: ../../c-api/function.rst:136 msgid "" "Set the annotations for the function object *op*. *annotations* must be a " "dictionary or ``Py_None``." msgstr "" +#: ../../c-api/function.rst:150 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 "" +#: ../../c-api/function.rst:157 msgid "" "Register *callback* as a function watcher for the current interpreter. " "Return an ID which may be passed to :c:func:`PyFunction_ClearWatcher`. In " @@ -135,6 +172,7 @@ msgid "" "exception." msgstr "" +#: ../../c-api/function.rst:167 msgid "" "Clear watcher identified by *watcher_id* previously returned from :c:func:" "`PyFunction_AddWatcher` for the current interpreter. Return ``0`` on " @@ -142,27 +180,39 @@ msgid "" "*watcher_id* was never registered.)" msgstr "" +#: ../../c-api/function.rst:177 msgid "Enumeration of possible function watcher events:" msgstr "" +#: ../../c-api/function.rst:179 msgid "``PyFunction_EVENT_CREATE``" msgstr "" +#: ../../c-api/function.rst:180 msgid "``PyFunction_EVENT_DESTROY``" msgstr "" +#: ../../c-api/function.rst:181 msgid "``PyFunction_EVENT_MODIFY_CODE``" msgstr "" +#: ../../c-api/function.rst:182 msgid "``PyFunction_EVENT_MODIFY_DEFAULTS``" msgstr "" +#: ../../c-api/function.rst:183 msgid "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" msgstr "" +#: ../../c-api/function.rst:187 +msgid "``PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME``" +msgstr "" + +#: ../../c-api/function.rst:193 msgid "Type of a function watcher callback function." msgstr "" +#: ../../c-api/function.rst:195 msgid "" "If *event* is ``PyFunction_EVENT_CREATE`` or ``PyFunction_EVENT_DESTROY`` " "then *new_value* will be ``NULL``. Otherwise, *new_value* will hold a :term:" @@ -170,11 +220,13 @@ msgid "" "for the attribute that is being modified." msgstr "" +#: ../../c-api/function.rst:200 msgid "" "The callback may inspect but must not modify *func*; doing so could have " "unpredictable effects, including infinite recursion." msgstr "" +#: ../../c-api/function.rst:203 msgid "" "If *event* is ``PyFunction_EVENT_CREATE``, then the callback is invoked " "after *func* has been fully initialized. Otherwise, the callback is invoked " @@ -186,19 +238,22 @@ msgid "" "semantics of the Python code being executed." msgstr "" +#: ../../c-api/function.rst:212 msgid "" -"If *event* is ``PyFunction_EVENT_DESTROY``, Taking a reference in the " +"If *event* is ``PyFunction_EVENT_DESTROY``, taking a reference in the " "callback to the about-to-be-destroyed function will resurrect it, preventing " "it from being freed at this time. When the resurrected object is destroyed " "later, any watcher callbacks active at that time will be called again." msgstr "" +#: ../../c-api/function.rst:217 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 "" +#: ../../c-api/function.rst:221 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 " @@ -207,11 +262,14 @@ msgid "" "it before returning." msgstr "" +#: ../../c-api/function.rst:8 msgid "object" msgstr "" +#: ../../c-api/function.rst:8 msgid "function" msgstr "" +#: ../../c-api/function.rst:20 msgid "MethodType (in module types)" msgstr "" diff --git a/c-api/function.po~ b/c-api/function.po~ new file mode 100644 index 00000000..5aeaf593 --- /dev/null +++ b/c-api/function.po~ @@ -0,0 +1,217 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Function Objects" +msgstr "" + +msgid "There are a few functions specific to Python functions." +msgstr "" + +msgid "The C structure used for functions." +msgstr "" + +msgid "" +"This is an instance of :c:type:`PyTypeObject` and represents the Python " +"function type. It is exposed to Python programmers as ``types." +"FunctionType``." +msgstr "" + +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." +msgstr "" + +msgid "" +"Return a new function object associated with the code object *code*. " +"*globals* must be a dictionary with the global variables accessible to the " +"function." +msgstr "" + +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." +msgstr "" + +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." +msgstr "" + +msgid "Return the code object associated with the function object *op*." +msgstr "" + +msgid "Return the globals dictionary associated with the function object *op*." +msgstr "" + +msgid "" +"Return a :term:`borrowed reference` to the :attr:`~function.__module__` " +"attribute of the :ref:`function object ` *op*. It can be " +"*NULL*." +msgstr "" + +msgid "" +"This is normally a :class:`string ` containing the module name, but can " +"be set to any other object by Python code." +msgstr "" + +msgid "" +"Return the argument default values of the function object *op*. This can be " +"a tuple of arguments or ``NULL``." +msgstr "" + +msgid "" +"Set the argument default values for the function object *op*. *defaults* " +"must be ``Py_None`` or a tuple." +msgstr "" + +msgid "Raises :exc:`SystemError` and returns ``-1`` on failure." +msgstr "" + +msgid "Set the vectorcall field of a given function object *func*." +msgstr "" + +msgid "" +"Warning: extensions using this API must preserve the behavior of the " +"unaltered (default) vectorcall function!" +msgstr "" + +msgid "" +"Return the keyword-only argument default values of the function object *op*. " +"This can be a dictionary of arguments or ``NULL``." +msgstr "" + +msgid "" +"Return the closure associated with the function object *op*. This can be " +"``NULL`` or a tuple of cell objects." +msgstr "" + +msgid "" +"Set the closure associated with the function object *op*. *closure* must be " +"``Py_None`` or a tuple of cell objects." +msgstr "" + +msgid "" +"Return the annotations of the function object *op*. This can be a mutable " +"dictionary or ``NULL``." +msgstr "" + +msgid "" +"Set the annotations for the function object *op*. *annotations* must be a " +"dictionary or ``Py_None``." +msgstr "" + +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 "" + +msgid "" +"Register *callback* as a function watcher for the current interpreter. " +"Return an ID which may be passed to :c:func:`PyFunction_ClearWatcher`. In " +"case of error (e.g. no more watcher IDs available), return ``-1`` and set an " +"exception." +msgstr "" + +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.)" +msgstr "" + +msgid "Enumeration of possible function watcher events:" +msgstr "" + +msgid "``PyFunction_EVENT_CREATE``" +msgstr "" + +msgid "``PyFunction_EVENT_DESTROY``" +msgstr "" + +msgid "``PyFunction_EVENT_MODIFY_CODE``" +msgstr "" + +msgid "``PyFunction_EVENT_MODIFY_DEFAULTS``" +msgstr "" + +msgid "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" +msgstr "" + +msgid "Type of a function watcher callback function." +msgstr "" + +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." +msgstr "" + +msgid "" +"The callback may inspect but must not modify *func*; doing so could have " +"unpredictable effects, including infinite recursion." +msgstr "" + +msgid "" +"If *event* is ``PyFunction_EVENT_CREATE``, then 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. " +"Although this creates the possibility of an observable difference of runtime " +"behavior depending on optimization decisions, it does not change the " +"semantics of the Python code being executed." +msgstr "" + +msgid "" +"If *event* is ``PyFunction_EVENT_DESTROY``, Taking a reference in the " +"callback to the about-to-be-destroyed function will resurrect it, preventing " +"it from being freed at this time. When the resurrected object is destroyed " +"later, any watcher callbacks active at that time will be called again." +msgstr "" + +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 "" + +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 "" + +msgid "object" +msgstr "" + +msgid "function" +msgstr "" + +msgid "MethodType (in module types)" +msgstr "" diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index 4c8bc9fd..4a76f2a8 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/gcsupport.rst:6 msgid "Supporting Cyclic Garbage Collection" msgstr "" +#: ../../c-api/gcsupport.rst:8 msgid "" "Python's support for detecting and collecting garbage which involves " "circular references requires support from object types which are " @@ -29,6 +31,7 @@ msgid "" "explicit support for garbage collection." msgstr "" +#: ../../c-api/gcsupport.rst:15 msgid "" "To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of " "the type object must include the :c:macro:`Py_TPFLAGS_HAVE_GC` and provide " @@ -37,48 +40,58 @@ msgid "" "implementation must also be provided." msgstr "" +#: ../../c-api/gcsupport.rst:21 msgid ":c:macro:`Py_TPFLAGS_HAVE_GC`" msgstr "" +#: ../../c-api/gcsupport.rst:22 msgid "" "Objects with a type with this flag set must conform with the rules " "documented here. For convenience these objects will be referred to as " "container objects." msgstr "" +#: ../../c-api/gcsupport.rst:26 msgid "Constructors for container types must conform to two rules:" msgstr "" +#: ../../c-api/gcsupport.rst:28 msgid "" "The memory for the object must be allocated using :c:macro:`PyObject_GC_New` " "or :c:macro:`PyObject_GC_NewVar`." msgstr "" +#: ../../c-api/gcsupport.rst:31 msgid "" "Once all the fields which may contain references to other containers are " "initialized, it must call :c:func:`PyObject_GC_Track`." msgstr "" +#: ../../c-api/gcsupport.rst:34 msgid "" "Similarly, the deallocator for the object must conform to a similar pair of " "rules:" msgstr "" +#: ../../c-api/gcsupport.rst:37 msgid "" "Before fields which refer to other containers are invalidated, :c:func:" "`PyObject_GC_UnTrack` must be called." msgstr "" +#: ../../c-api/gcsupport.rst:40 msgid "" "The object's memory must be deallocated using :c:func:`PyObject_GC_Del`." msgstr "" +#: ../../c-api/gcsupport.rst:43 msgid "" "If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least a :" "c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its " "subclass or subclasses." msgstr "" +#: ../../c-api/gcsupport.rst:47 msgid "" "When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call " "it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the " @@ -89,47 +102,59 @@ msgid "" "include the :c:macro:`Py_TPFLAGS_HAVE_GC` flag." msgstr "" +#: ../../c-api/gcsupport.rst:57 msgid "" "Analogous to :c:macro:`PyObject_New` but for container objects with the :c:" "macro:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" +#: ../../c-api/gcsupport.rst:60 ../../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 "" +#: ../../c-api/gcsupport.rst:63 ../../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 "" +#: ../../c-api/gcsupport.rst:67 ../../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 "" +#: ../../c-api/gcsupport.rst:73 ../../c-api/gcsupport.rst:97 msgid ":c:func:`PyObject_GC_Del`" msgstr "" +#: ../../c-api/gcsupport.rst:74 msgid ":c:macro:`PyObject_New`" msgstr "" +#: ../../c-api/gcsupport.rst:75 ../../c-api/gcsupport.rst:99 +#: ../../c-api/gcsupport.rst:193 msgid ":c:func:`PyType_GenericAlloc`" msgstr "" +#: ../../c-api/gcsupport.rst:76 ../../c-api/gcsupport.rst:100 msgid ":c:member:`~PyTypeObject.tp_alloc`" msgstr "" +#: ../../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." msgstr "" +#: ../../c-api/gcsupport.rst:98 msgid ":c:macro:`PyObject_NewVar`" msgstr "" +#: ../../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`). " @@ -137,17 +162,20 @@ msgid "" "object header `." msgstr "" +#: ../../c-api/gcsupport.rst:111 msgid "" "The extra data will be deallocated with the object, but otherwise it is not " "managed by Python." msgstr "" +#: ../../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 "" +#: ../../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 " @@ -155,17 +183,20 @@ msgid "" "`~PyTypeObject.tp_itemsize` instead." msgstr "" +#: ../../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 " "failure." msgstr "" +#: ../../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`." msgstr "" +#: ../../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 " @@ -174,60 +205,74 @@ msgid "" "usually near the end of the constructor." msgstr "" +#: ../../c-api/gcsupport.rst:150 msgid "" "Returns non-zero if the object implements the garbage collector protocol, " "otherwise returns 0." msgstr "" +#: ../../c-api/gcsupport.rst:153 msgid "" "The object cannot be tracked by the garbage collector if this function " "returns 0." msgstr "" +#: ../../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." msgstr "" +#: ../../c-api/gcsupport.rst:161 msgid "This is analogous to the Python function :func:`gc.is_tracked`." msgstr "" +#: ../../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." msgstr "" +#: ../../c-api/gcsupport.rst:171 msgid "This is analogous to the Python function :func:`gc.is_finalized`." msgstr "" +#: ../../c-api/gcsupport.rst:178 msgid "" "Releases memory allocated to an object using :c:macro:`PyObject_GC_New` or :" "c:macro:`PyObject_GC_NewVar`." msgstr "" +#: ../../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 "" +#: ../../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 "" +#: ../../c-api/gcsupport.rst:190 msgid ":c:func:`PyObject_Free` is the non-GC equivalent of this function." msgstr "" +#: ../../c-api/gcsupport.rst:191 msgid ":c:macro:`PyObject_GC_New`" msgstr "" +#: ../../c-api/gcsupport.rst:192 msgid ":c:macro:`PyObject_GC_NewVar`" msgstr "" +#: ../../c-api/gcsupport.rst:194 msgid ":c:member:`~PyTypeObject.tp_free`" msgstr "" +#: ../../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 " @@ -237,16 +282,19 @@ msgid "" "handler become invalid." msgstr "" +#: ../../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." msgstr "" +#: ../../c-api/gcsupport.rst:211 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function " "parameter of this type:" msgstr "" +#: ../../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 " @@ -256,71 +304,329 @@ msgid "" "users will need to write their own visitor functions." msgstr "" +#: ../../c-api/gcsupport.rst:223 +msgid "" +"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" +"`inquiry` type, or ``NULL`` if the object is immutable." +msgstr "" + +#: ../../c-api/gcsupport.rst:229 +msgid "" +"Drop references that may have created reference cycles. Immutable objects " +"do not have to define this method since they can never directly create " +"reference cycles. Note that the object must still be valid after calling " +"this method (don't just call :c:func:`Py_DECREF` on a reference). The " +"collector will call this method if it detects that this object is involved " +"in a reference cycle." +msgstr "" + +#: ../../c-api/gcsupport.rst:240 +msgid "Traversal" +msgstr "" + +#: ../../c-api/gcsupport.rst:242 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler must have the following " "type:" msgstr "" +#: ../../c-api/gcsupport.rst:246 msgid "" -"Traversal function for a container object. Implementations must call the " -"*visit* function for each object directly contained by *self*, with the " -"parameters to *visit* being the contained object and the *arg* value passed " -"to the handler. The *visit* function must not be called with a ``NULL`` " -"object argument. If *visit* returns a non-zero value that value should be " +"Traversal function for a garbage-collected object, used by the garbage " +"collector to detect reference cycles. Implementations must call the *visit* " +"function for each object directly contained by *self*, with the parameters " +"to *visit* being the contained object and the *arg* value passed to the " +"handler. The *visit* function must not be called with a ``NULL`` object " +"argument. If *visit* returns a non-zero value, that value should be " "returned immediately." msgstr "" +#: ../../c-api/gcsupport.rst:255 +msgid "" +"A typical :c:member:`!tp_traverse` function calls the :c:func:`Py_VISIT` " +"convenience macro on each of the instance's members that are Python objects " +"that the instance owns. For example, this is a (slightly outdated) traversal " +"function for the :py:class:`threading.local` class::" +msgstr "" + +#: ../../c-api/gcsupport.rst:261 +msgid "" +"static int\n" +"local_traverse(PyObject *op, visitproc visit, void *arg)\n" +"{\n" +" localobject *self = (localobject *) op;\n" +" Py_VISIT(Py_TYPE(self));\n" +" Py_VISIT(self->args);\n" +" Py_VISIT(self->kw);\n" +" Py_VISIT(self->dict);\n" +" return 0;\n" +"}" +msgstr "" + +#: ../../c-api/gcsupport.rst:273 +msgid "" +":c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:func:`!" +"local_traverse` to have these specific names; don't name them just anything." +msgstr "" + +#: ../../c-api/gcsupport.rst:277 +msgid "" +"Instances of :ref:`heap-allocated types ` hold a reference to " +"their type. Their traversal function must therefore visit the type::" +msgstr "" + +#: ../../c-api/gcsupport.rst:280 +msgid "Py_VISIT(Py_TYPE(self));" +msgstr "" + +#: ../../c-api/gcsupport.rst:282 +msgid "" +"Alternately, the type may delegate this responsibility by calling " +"``tp_traverse`` of a heap-allocated superclass (or another heap-allocated " +"type, if applicable). If they do not, the type object may not be garbage-" +"collected." +msgstr "" + +#: ../../c-api/gcsupport.rst:287 +msgid "" +"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" +"`~PyTypeObject.tp_flags` field, the traverse function must call :c:func:" +"`PyObject_VisitManagedDict` like this::" +msgstr "" + +#: ../../c-api/gcsupport.rst:291 +msgid "" +"int err = PyObject_VisitManagedDict((PyObject*)self, visit, arg);\n" +"if (err) {\n" +" return err;\n" +"}" +msgstr "" + +#: ../../c-api/gcsupport.rst:296 +msgid "" +"Only the members that the instance *owns* (by having :term:`strong " +"references ` to them) must be visited. For instance, if an " +"object supports weak references via the :c:member:`~PyTypeObject." +"tp_weaklist` slot, the pointer supporting the linked list (what " +"*tp_weaklist* points to) must **not** be visited as the instance does not " +"directly own the weak references to itself." +msgstr "" + +#: ../../c-api/gcsupport.rst:303 +msgid "The traversal function has a limitation:" +msgstr "" + +#: ../../c-api/gcsupport.rst:307 +msgid "" +"The traversal function must not have any side effects. Implementations may " +"not modify the reference counts of any Python objects nor create or destroy " +"any Python objects, directly or indirectly." +msgstr "" + +#: ../../c-api/gcsupport.rst:311 +msgid "" +"This means that *most* Python C API functions may not be used, since they " +"can raise a new exception, return a new reference to a result object, have " +"internal logic that uses side effects. Also, unless documented otherwise, " +"functions that happen to not have side effects may start having them in " +"future versions, without warning." +msgstr "" + +#: ../../c-api/gcsupport.rst:317 +msgid "" +"For a list of safe functions, see a :ref:`separate section ` below." +msgstr "" + +#: ../../c-api/gcsupport.rst:322 +msgid "" +"The :c:func:`Py_VISIT` call may be skipped for those members that provably " +"cannot participate in reference cycles. In the ``local_traverse`` example " +"above, there is also a ``self->key`` member, but it can only be ``NULL`` or " +"a Python string and therefore cannot be part of a reference cycle." +msgstr "" + +#: ../../c-api/gcsupport.rst:328 +msgid "" +"On the other hand, even if you know a member can never be part of a cycle, " +"as a debugging aid you may want to visit it anyway just so the :mod:`gc` " +"module's :func:`~gc.get_referents` function will include it." +msgstr "" + +#: ../../c-api/gcsupport.rst:334 +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` function can be called from any " +"thread." +msgstr "" + +#: ../../c-api/gcsupport.rst:339 +msgid "" +"Garbage collection is a \"stop-the-world\" operation: even in :term:`free " +"threading` builds, only one thread state is :term:`attached ` when :c:member:`!tp_traverse` handlers run." +msgstr "" + +#: ../../c-api/gcsupport.rst:346 +msgid "" +"Heap-allocated types are expected to visit ``Py_TYPE(self)`` in " +"``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses." +msgstr "" + +#: ../../c-api/gcsupport.rst:351 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:" -"member:`~PyTypeObject.tp_traverse` implementation must name its arguments " -"exactly *visit* and *arg*:" +"func:`Py_VISIT` macro is provided. In order to use this macro, the :c:member:" +"`~PyTypeObject.tp_traverse` implementation must name its arguments exactly " +"*visit* and *arg*:" msgstr "" +#: ../../c-api/gcsupport.rst:358 msgid "" "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::" +"with arguments *o* and *arg*. If *visit* returns a non-zero value, then " +"return it." msgstr "" +#: ../../c-api/gcsupport.rst:362 +msgid "This corresponds roughly to::" +msgstr "" + +#: ../../c-api/gcsupport.rst:364 msgid "" -"static int\n" -"my_traverse(Noddy *self, visitproc visit, void *arg)\n" -"{\n" -" Py_VISIT(self->foo);\n" -" Py_VISIT(self->bar);\n" -" return 0;\n" -"}" +"#define Py_VISIT(o) \\\n" +" if (op) { \\\n" +" int visit_result = visit(o, arg); \\\n" +" if (visit_result != 0) { \\\n" +" return visit_result; \\\n" +" } \\\n" +" }" +msgstr "" + +#: ../../c-api/gcsupport.rst:374 +msgid "Traversal-safe functions" msgstr "" +#: ../../c-api/gcsupport.rst:376 msgid "" -"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" -"`inquiry` type, or ``NULL`` if the object is immutable." +"The following functions and macros are safe to use in a :c:member:" +"`~PyTypeObject.tp_traverse` handler:" +msgstr "" + +#: ../../c-api/gcsupport.rst:379 +msgid "the *visit* function passed to ``tp_traverse``" +msgstr "" + +#: ../../c-api/gcsupport.rst:380 +msgid ":c:func:`Py_VISIT`" +msgstr "" + +#: ../../c-api/gcsupport.rst:381 +msgid ":c:func:`Py_SIZE`" msgstr "" +#: ../../c-api/gcsupport.rst:382 msgid "" -"Drop references that may have created reference cycles. Immutable objects " -"do not have to define this method since they can never directly create " -"reference cycles. Note that the object must still be valid after calling " -"this method (don't just call :c:func:`Py_DECREF` on a reference). The " -"collector will call this method if it detects that this object is involved " -"in a reference cycle." +":c:func:`Py_TYPE`: if called from a :c:member:`!tp_traverse` handler, :c:" +"func:`!Py_TYPE`'s result will be valid for the duration of the handler call" +msgstr "" + +#: ../../c-api/gcsupport.rst:384 +msgid ":c:func:`PyObject_VisitManagedDict`" +msgstr "" + +#: ../../c-api/gcsupport.rst:385 +msgid "" +":c:func:`PyObject_TypeCheck`, :c:func:`PyType_IsSubtype`, :c:func:" +"`PyType_HasFeature`" +msgstr "" + +#: ../../c-api/gcsupport.rst:387 +msgid "" +":samp:`Py{}_Check` and :samp:`Py{}_CheckExact` -- for example, :" +"c:func:`PyTuple_Check`" +msgstr "" + +#: ../../c-api/gcsupport.rst:389 +msgid ":ref:`duringgc-functions`" +msgstr "" + +#: ../../c-api/gcsupport.rst:394 +msgid "\"DuringGC\" functions" +msgstr "" + +#: ../../c-api/gcsupport.rst:396 +msgid "" +"The following functions should *only* be used in a :c:member:`~PyTypeObject." +"tp_traverse` handler; calling them in other contexts may have unintended " +"consequences." +msgstr "" + +#: ../../c-api/gcsupport.rst:400 +msgid "" +"These functions act like their counterparts without the ``_DuringGC`` " +"suffix, but they are guaranteed to not have side effects, they do not set an " +"exception on failure, and they return/set :term:`borrowed references " +"` as detailed in the individual documentation." +msgstr "" + +#: ../../c-api/gcsupport.rst:405 +msgid "" +"Note that these functions may fail (return ``NULL`` or ``-1``), but as they " +"do not set an exception, no error information is available. In some cases, " +"failure is not distinguishable from a successful ``NULL`` result." +msgstr "" + +#: ../../c-api/gcsupport.rst:415 ../../c-api/gcsupport.rst:430 +#: ../../c-api/gcsupport.rst:443 +msgid "See :ref:`duringgc-functions` for common information." +msgstr "" + +#: ../../c-api/gcsupport.rst:421 +msgid "" +":c:func:`PyObject_GetTypeData`, :c:func:`PyObject_GetItemData`, :c:func:" +"`PyType_GetModuleState`, :c:func:`PyModule_GetState`, :c:func:" +"`PyModule_GetToken`, :c:func:`PyType_GetBaseByToken`" +msgstr "" + +#: ../../c-api/gcsupport.rst:432 +msgid "" +"Sets *\\*result* to a :term:`borrowed reference` rather than a strong one. " +"The reference is valid for the duration of the :c:member:`!tp_traverse` " +"handler call." +msgstr "" + +#: ../../c-api/gcsupport.rst:438 +msgid ":c:func:`PyType_GetBaseByToken`" +msgstr "" + +#: ../../c-api/gcsupport.rst:445 +msgid "" +"These functions return a :term:`borrowed reference`, which is valid for the " +"duration of the :c:member:`!tp_traverse` handler call." +msgstr "" + +#: ../../c-api/gcsupport.rst:452 +msgid ":c:func:`PyType_GetModule`, :c:func:`PyType_GetModuleByToken`" msgstr "" +#: ../../c-api/gcsupport.rst:457 msgid "Controlling the Garbage Collector State" msgstr "" +#: ../../c-api/gcsupport.rst:459 msgid "" "The C-API provides the following functions for controlling garbage " "collection runs." msgstr "" +#: ../../c-api/gcsupport.rst:464 msgid "" "Perform a full garbage collection, if the garbage collector is enabled. " "(Note that :func:`gc.collect` runs it unconditionally.)" msgstr "" +#: ../../c-api/gcsupport.rst:467 msgid "" "Returns the number of collected + unreachable objects which cannot be " "collected. If the garbage collector is disabled or already collecting, " @@ -328,45 +634,54 @@ msgid "" "data:`sys.unraisablehook`. This function does not raise exceptions." msgstr "" +#: ../../c-api/gcsupport.rst:477 msgid "" "Enable the garbage collector: similar to :func:`gc.enable`. Returns the " "previous state, 0 for disabled and 1 for enabled." msgstr "" +#: ../../c-api/gcsupport.rst:485 msgid "" "Disable the garbage collector: similar to :func:`gc.disable`. Returns the " "previous state, 0 for disabled and 1 for enabled." msgstr "" +#: ../../c-api/gcsupport.rst:493 msgid "" "Query the state of the garbage collector: similar to :func:`gc.isenabled`. " "Returns the current state, 0 for disabled and 1 for enabled." msgstr "" +#: ../../c-api/gcsupport.rst:500 msgid "Querying Garbage Collector State" msgstr "" +#: ../../c-api/gcsupport.rst:502 msgid "" "The C-API provides the following interface for querying information about " "the garbage collector." msgstr "" +#: ../../c-api/gcsupport.rst:507 msgid "" "Run supplied *callback* on all live GC-capable objects. *arg* is passed " "through to all invocations of *callback*." msgstr "" +#: ../../c-api/gcsupport.rst:511 msgid "" "If new objects are (de)allocated by the callback it is undefined if they " "will be visited." msgstr "" +#: ../../c-api/gcsupport.rst:514 msgid "" "Garbage collection is disabled during operation. Explicitly running a " "collection in the callback may lead to undefined behaviour e.g. visiting the " "same objects multiple times or not at all." msgstr "" +#: ../../c-api/gcsupport.rst:522 msgid "" "Type of the visitor function to be passed to :c:func:" "`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* passed to " diff --git a/c-api/gcsupport.po~ b/c-api/gcsupport.po~ new file mode 100644 index 00000000..4c8bc9fd --- /dev/null +++ b/c-api/gcsupport.po~ @@ -0,0 +1,376 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Supporting Cyclic Garbage Collection" +msgstr "" + +msgid "" +"Python's support for detecting and collecting garbage which involves " +"circular references requires support from object types which are " +"\"containers\" for other objects which may also be containers. Types which " +"do not store references to other objects, or which only store references to " +"atomic types (such as numbers or strings), do not need to provide any " +"explicit support for garbage collection." +msgstr "" + +msgid "" +"To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of " +"the type object must include the :c:macro:`Py_TPFLAGS_HAVE_GC` and provide " +"an implementation of the :c:member:`~PyTypeObject.tp_traverse` handler. If " +"instances of the type are mutable, a :c:member:`~PyTypeObject.tp_clear` " +"implementation must also be provided." +msgstr "" + +msgid ":c:macro:`Py_TPFLAGS_HAVE_GC`" +msgstr "" + +msgid "" +"Objects with a type with this flag set must conform with the rules " +"documented here. For convenience these objects will be referred to as " +"container objects." +msgstr "" + +msgid "Constructors for container types must conform to two rules:" +msgstr "" + +msgid "" +"The memory for the object must be allocated using :c:macro:`PyObject_GC_New` " +"or :c:macro:`PyObject_GC_NewVar`." +msgstr "" + +msgid "" +"Once all the fields which may contain references to other containers are " +"initialized, it must call :c:func:`PyObject_GC_Track`." +msgstr "" + +msgid "" +"Similarly, the deallocator for the object must conform to a similar pair of " +"rules:" +msgstr "" + +msgid "" +"Before fields which refer to other containers are invalidated, :c:func:" +"`PyObject_GC_UnTrack` must be called." +msgstr "" + +msgid "" +"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`." +msgstr "" + +msgid "" +"If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least a :" +"c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its " +"subclass or subclasses." +msgstr "" + +msgid "" +"When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call " +"it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the " +"interpreter will automatically populate the :c:member:`~PyTypeObject." +"tp_flags`, :c:member:`~PyTypeObject.tp_traverse` and :c:member:" +"`~PyTypeObject.tp_clear` fields if the type inherits from a class that " +"implements the garbage collector protocol and the child class does *not* " +"include the :c:macro:`Py_TPFLAGS_HAVE_GC` flag." +msgstr "" + +msgid "" +"Analogous to :c:macro:`PyObject_New` but for container objects with the :c:" +"macro:`Py_TPFLAGS_HAVE_GC` flag set." +msgstr "" + +msgid "" +"Do not call this directly to allocate memory for an object; call the type's :" +"c:member:`~PyTypeObject.tp_alloc` slot instead." +msgstr "" + +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 "" + +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 "" + +msgid ":c:func:`PyObject_GC_Del`" +msgstr "" + +msgid ":c:macro:`PyObject_New`" +msgstr "" + +msgid ":c:func:`PyType_GenericAlloc`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr "" + +msgid "" +"Analogous to :c:macro:`PyObject_NewVar` but for container objects with the :" +"c:macro:`Py_TPFLAGS_HAVE_GC` flag set." +msgstr "" + +msgid ":c:macro:`PyObject_NewVar`" +msgstr "" + +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 "" + +msgid "" +"The extra data will be deallocated with the object, but otherwise it is not " +"managed by Python." +msgstr "" + +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 "" + +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 " +"number of fields, prefer using :c:type:`PyVarObject` and :c:member:" +"`~PyTypeObject.tp_itemsize` instead." +msgstr "" + +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 " +"failure." +msgstr "" + +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`." +msgstr "" + +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 " +"valid while being tracked. This should be called once all the fields " +"followed by the :c:member:`~PyTypeObject.tp_traverse` handler become valid, " +"usually near the end of the constructor." +msgstr "" + +msgid "" +"Returns non-zero if the object implements the garbage collector protocol, " +"otherwise returns 0." +msgstr "" + +msgid "" +"The object cannot be tracked by the garbage collector if this function " +"returns 0." +msgstr "" + +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." +msgstr "" + +msgid "This is analogous to the Python function :func:`gc.is_tracked`." +msgstr "" + +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." +msgstr "" + +msgid "This is analogous to the Python function :func:`gc.is_finalized`." +msgstr "" + +msgid "" +"Releases memory allocated to an object using :c:macro:`PyObject_GC_New` or :" +"c:macro:`PyObject_GC_NewVar`." +msgstr "" + +msgid "" +"Do not call this directly to free an object's memory; call the type's :c:" +"member:`~PyTypeObject.tp_free` slot instead." +msgstr "" + +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 "" + +msgid ":c:func:`PyObject_Free` is the non-GC equivalent of this function." +msgstr "" + +msgid ":c:macro:`PyObject_GC_New`" +msgstr "" + +msgid ":c:macro:`PyObject_GC_NewVar`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_free`" +msgstr "" + +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 " +"this object to add it back to the set of tracked objects. The deallocator (:" +"c:member:`~PyTypeObject.tp_dealloc` handler) should call this for the object " +"before any of the fields used by the :c:member:`~PyTypeObject.tp_traverse` " +"handler become invalid." +msgstr "" + +msgid "" +"The :c:func:`!_PyObject_GC_TRACK` and :c:func:`!_PyObject_GC_UNTRACK` macros " +"have been removed from the public C API." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function " +"parameter of this type:" +msgstr "" + +msgid "" +"Type of the visitor function passed to the :c:member:`~PyTypeObject." +"tp_traverse` handler. The function should be called with an object to " +"traverse as *object* and the third parameter to the :c:member:`~PyTypeObject." +"tp_traverse` handler as *arg*. The Python core uses several visitor " +"functions to implement cyclic garbage detection; it's not expected that " +"users will need to write their own visitor functions." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` handler must have the following " +"type:" +msgstr "" + +msgid "" +"Traversal function for a container object. Implementations must call the " +"*visit* function for each object directly contained by *self*, with the " +"parameters to *visit* being the contained object and the *arg* value passed " +"to the handler. The *visit* function must not be called with a ``NULL`` " +"object argument. If *visit* returns a non-zero value that value should be " +"returned immediately." +msgstr "" + +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:" +"member:`~PyTypeObject.tp_traverse` implementation must name its arguments " +"exactly *visit* and *arg*:" +msgstr "" + +msgid "" +"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 "" + +msgid "" +"static int\n" +"my_traverse(Noddy *self, visitproc visit, void *arg)\n" +"{\n" +" Py_VISIT(self->foo);\n" +" Py_VISIT(self->bar);\n" +" return 0;\n" +"}" +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" +"`inquiry` type, or ``NULL`` if the object is immutable." +msgstr "" + +msgid "" +"Drop references that may have created reference cycles. Immutable objects " +"do not have to define this method since they can never directly create " +"reference cycles. Note that the object must still be valid after calling " +"this method (don't just call :c:func:`Py_DECREF` on a reference). The " +"collector will call this method if it detects that this object is involved " +"in a reference cycle." +msgstr "" + +msgid "Controlling the Garbage Collector State" +msgstr "" + +msgid "" +"The C-API provides the following functions for controlling garbage " +"collection runs." +msgstr "" + +msgid "" +"Perform a full garbage collection, if the garbage collector is enabled. " +"(Note that :func:`gc.collect` runs it unconditionally.)" +msgstr "" + +msgid "" +"Returns the number of collected + unreachable objects which cannot be " +"collected. If the garbage collector is disabled or already collecting, " +"returns ``0`` immediately. Errors during garbage collection are passed to :" +"data:`sys.unraisablehook`. This function does not raise exceptions." +msgstr "" + +msgid "" +"Enable the garbage collector: similar to :func:`gc.enable`. Returns the " +"previous state, 0 for disabled and 1 for enabled." +msgstr "" + +msgid "" +"Disable the garbage collector: similar to :func:`gc.disable`. Returns the " +"previous state, 0 for disabled and 1 for enabled." +msgstr "" + +msgid "" +"Query the state of the garbage collector: similar to :func:`gc.isenabled`. " +"Returns the current state, 0 for disabled and 1 for enabled." +msgstr "" + +msgid "Querying Garbage Collector State" +msgstr "" + +msgid "" +"The C-API provides the following interface for querying information about " +"the garbage collector." +msgstr "" + +msgid "" +"Run supplied *callback* on all live GC-capable objects. *arg* is passed " +"through to all invocations of *callback*." +msgstr "" + +msgid "" +"If new objects are (de)allocated by the callback it is undefined if they " +"will be visited." +msgstr "" + +msgid "" +"Garbage collection is disabled during operation. Explicitly running a " +"collection in the callback may lead to undefined behaviour e.g. visiting the " +"same objects multiple times or not at all." +msgstr "" + +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 ``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 "" diff --git a/c-api/gen.po b/c-api/gen.po index f7b22f9e..1162d1d9 100644 --- a/c-api/gen.po +++ b/c-api/gen.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/gen.rst:6 msgid "Generator Objects" msgstr "" +#: ../../c-api/gen.rst:8 msgid "" "Generator objects are what Python uses to implement generator iterators. " "They are normally created by iterating over a function that yields values, " @@ -27,31 +29,89 @@ msgid "" "`PyGen_NewWithQualName`." msgstr "" +#: ../../c-api/gen.rst:15 msgid "The C structure used for generator objects." msgstr "" +#: ../../c-api/gen.rst:20 msgid "The type object corresponding to generator objects." msgstr "" +#: ../../c-api/gen.rst:25 msgid "" "Return true if *ob* is a generator object; *ob* must not be ``NULL``. This " "function always succeeds." msgstr "" +#: ../../c-api/gen.rst:31 msgid "" "Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be " "``NULL``. This function always succeeds." msgstr "" +#: ../../c-api/gen.rst:37 msgid "" "Create and return a new generator object based on the *frame* object. A " -"reference to *frame* is stolen by this function. The argument must not be " -"``NULL``." +"reference to *frame* is \":term:`stolen `\" by this function (even on " +"error). The argument must not be ``NULL``." msgstr "" +#: ../../c-api/gen.rst:43 msgid "" "Create and return a new generator object based on the *frame* object, with " "``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " -"to *frame* is stolen by this function. The *frame* argument must not be " -"``NULL``." +"to *frame* is \":term:`stolen `\" by this function (even on error). " +"The *frame* argument must not be ``NULL``." +msgstr "" + +#: ../../c-api/gen.rst:51 +msgid "" +"Return a new :term:`strong reference` to the code object wrapped by *gen*. " +"This function always succeeds." +msgstr "" + +#: ../../c-api/gen.rst:56 +msgid "Asynchronous Generator Objects" +msgstr "" + +#: ../../c-api/gen.rst:59 +msgid ":pep:`525`" +msgstr "" + +#: ../../c-api/gen.rst:63 +msgid "" +"The type object corresponding to asynchronous generator objects. This is " +"available as :class:`types.AsyncGeneratorType` in the Python layer." +msgstr "" + +#: ../../c-api/gen.rst:70 +msgid "" +"Create a new asynchronous generator wrapping *frame*, with ``__name__`` and " +"``__qualname__`` set to *name* and *qualname*. *frame* is \":term:`stolen " +"`\" by this function (even on error) and must not be ``NULL``." +msgstr "" + +#: ../../c-api/gen.rst:75 +msgid "" +"On success, this function returns a :term:`strong reference` to the new " +"asynchronous generator. On failure, this function returns ``NULL`` with an " +"exception set." +msgstr "" + +#: ../../c-api/gen.rst:83 +msgid "" +"Return true if *op* is an asynchronous generator object, false otherwise. " +"This function always succeeds." +msgstr "" + +#: ../../c-api/gen.rst:90 +msgid "Deprecated API" +msgstr "" + +#: ../../c-api/gen.rst:94 +msgid "This is an API that was included in Python's C API by mistake." +msgstr "" + +#: ../../c-api/gen.rst:97 +msgid "It is solely here for completeness; do not use this API." msgstr "" diff --git a/c-api/gen.po~ b/c-api/gen.po~ new file mode 100644 index 00000000..f7b22f9e --- /dev/null +++ b/c-api/gen.po~ @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Generator Objects" +msgstr "" + +msgid "" +"Generator objects are what Python uses to implement generator iterators. " +"They are normally created by iterating over a function that yields values, " +"rather than explicitly calling :c:func:`PyGen_New` or :c:func:" +"`PyGen_NewWithQualName`." +msgstr "" + +msgid "The C structure used for generator objects." +msgstr "" + +msgid "The type object corresponding to generator objects." +msgstr "" + +msgid "" +"Return true if *ob* is a generator object; *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be " +"``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Create and return a new generator object based on the *frame* object. A " +"reference to *frame* is stolen by this function. The argument must not be " +"``NULL``." +msgstr "" + +msgid "" +"Create and return a new generator object based on the *frame* object, with " +"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference " +"to *frame* is stolen by this function. The *frame* argument must not be " +"``NULL``." +msgstr "" diff --git a/c-api/hash.po b/c-api/hash.po index 9f1a2f71..acdc29e3 100644 --- a/c-api/hash.po +++ b/c-api/hash.po @@ -8,74 +8,168 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/hash.rst:4 msgid "PyHash API" msgstr "" +#: ../../c-api/hash.rst:6 msgid "" "See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`." msgstr "" +#: ../../c-api/hash.rst:10 msgid "Hash value type: signed integer." msgstr "" +#: ../../c-api/hash.rst:17 msgid "Hash value type: unsigned integer." msgstr "" +#: ../../c-api/hash.rst:24 +msgid "" +"A numerical value indicating the algorithm for hashing of :class:`str`, :" +"class:`bytes`, and :class:`memoryview`." +msgstr "" + +#: ../../c-api/hash.rst:27 +msgid "The algorithm name is exposed by :data:`sys.hash_info.algorithm`." +msgstr "" + +#: ../../c-api/hash.rst:36 +msgid "" +"Numerical values to compare to :c:macro:`Py_HASH_ALGORITHM` to determine " +"which algorithm is used for hashing. The hash algorithm can be configured " +"via the configure :option:`--with-hash-algorithm` option." +msgstr "" + +#: ../../c-api/hash.rst:40 +msgid "Add :c:macro:`!Py_HASH_FNV` and :c:macro:`!Py_HASH_SIPHASH24`." +msgstr "" + +#: ../../c-api/hash.rst:43 +msgid "Add :c:macro:`!Py_HASH_SIPHASH13`." +msgstr "" + +#: ../../c-api/hash.rst:49 +msgid "" +"Buffers of length in range ``[1, Py_HASH_CUTOFF)`` are hashed using DJBX33A " +"instead of the algorithm described by :c:macro:`Py_HASH_ALGORITHM`." +msgstr "" + +#: ../../c-api/hash.rst:52 +msgid "A :c:macro:`!Py_HASH_CUTOFF` of 0 disables the optimization." +msgstr "" + +#: ../../c-api/hash.rst:53 +msgid "" +":c:macro:`!Py_HASH_CUTOFF` must be non-negative and less or equal than 7." +msgstr "" + +#: ../../c-api/hash.rst:55 +msgid "" +"32-bit platforms should use a cutoff smaller than 64-bit platforms because " +"it is easier to create colliding strings. A cutoff of 7 on 64-bit platforms " +"and 5 on 32-bit platforms should provide a decent safety margin." +msgstr "" + +#: ../../c-api/hash.rst:59 +msgid "This corresponds to the :data:`sys.hash_info.cutoff` constant." +msgstr "" + +#: ../../c-api/hash.rst:66 msgid "" "The `Mersenne prime `_ ``P = " "2**n -1``, used for numeric hash scheme." msgstr "" +#: ../../c-api/hash.rst:69 +msgid "This corresponds to the :data:`sys.hash_info.modulus` constant." +msgstr "" + +#: ../../c-api/hash.rst:76 msgid "The exponent ``n`` of ``P`` in :c:macro:`PyHASH_MODULUS`." msgstr "" +#: ../../c-api/hash.rst:83 msgid "Prime multiplier used in string and various other hashes." msgstr "" +#: ../../c-api/hash.rst:90 msgid "The hash value returned for a positive infinity." msgstr "" +#: ../../c-api/hash.rst:92 +msgid "This corresponds to the :data:`sys.hash_info.inf` constant." +msgstr "" + +#: ../../c-api/hash.rst:99 msgid "The multiplier used for the imaginary part of a complex number." msgstr "" +#: ../../c-api/hash.rst:101 +msgid "This corresponds to the :data:`sys.hash_info.imag` constant." +msgstr "" + +#: ../../c-api/hash.rst:108 msgid "Hash function definition used by :c:func:`PyHash_GetFuncDef`." msgstr "" +#: ../../c-api/hash.rst:112 msgid "Hash function." msgstr "" +#: ../../c-api/hash.rst:116 msgid "Hash function name (UTF-8 encoded string)." msgstr "" +#: ../../c-api/hash.rst:118 +msgid "This corresponds to the :data:`sys.hash_info.algorithm` constant." +msgstr "" + +#: ../../c-api/hash.rst:122 msgid "Internal size of the hash value in bits." msgstr "" +#: ../../c-api/hash.rst:124 +msgid "This corresponds to the :data:`sys.hash_info.hash_bits` constant." +msgstr "" + +#: ../../c-api/hash.rst:128 msgid "Size of seed input in bits." msgstr "" +#: ../../c-api/hash.rst:130 +msgid "This corresponds to the :data:`sys.hash_info.seed_bits` constant." +msgstr "" + +#: ../../c-api/hash.rst:137 msgid "Get the hash function definition." msgstr "" +#: ../../c-api/hash.rst:140 msgid ":pep:`456` \"Secure and interchangeable hash algorithm\"." msgstr "" +#: ../../c-api/hash.rst:147 msgid "" "Hash a pointer value: process the pointer value as an integer (cast it to " "``uintptr_t`` internally). The pointer is not dereferenced." msgstr "" +#: ../../c-api/hash.rst:150 msgid "The function cannot fail: it cannot return ``-1``." msgstr "" +#: ../../c-api/hash.rst:157 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`, :" @@ -83,21 +177,26 @@ msgid "" "`buffer protocol `." msgstr "" +#: ../../c-api/hash.rst:162 msgid "" "Use this function to implement hashing for immutable objects whose :c:member:" "`~PyTypeObject.tp_richcompare` function compares to another object's buffer." msgstr "" +#: ../../c-api/hash.rst:166 msgid "*len* must be greater than or equal to ``0``." msgstr "" +#: ../../c-api/hash.rst:168 msgid "This function always succeeds." msgstr "" +#: ../../c-api/hash.rst:175 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 "" +#: ../../c-api/hash.rst:180 msgid "In CPython, it is equivalent to :c:func:`Py_HashPointer`." msgstr "" diff --git a/c-api/hash.po~ b/c-api/hash.po~ new file mode 100644 index 00000000..9f1a2f71 --- /dev/null +++ b/c-api/hash.po~ @@ -0,0 +1,103 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "PyHash API" +msgstr "" + +msgid "" +"See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`." +msgstr "" + +msgid "Hash value type: signed integer." +msgstr "" + +msgid "Hash value type: unsigned integer." +msgstr "" + +msgid "" +"The `Mersenne prime `_ ``P = " +"2**n -1``, used for numeric hash scheme." +msgstr "" + +msgid "The exponent ``n`` of ``P`` in :c:macro:`PyHASH_MODULUS`." +msgstr "" + +msgid "Prime multiplier used in string and various other hashes." +msgstr "" + +msgid "The hash value returned for a positive infinity." +msgstr "" + +msgid "The multiplier used for the imaginary part of a complex number." +msgstr "" + +msgid "Hash function definition used by :c:func:`PyHash_GetFuncDef`." +msgstr "" + +msgid "Hash function." +msgstr "" + +msgid "Hash function name (UTF-8 encoded string)." +msgstr "" + +msgid "Internal size of the hash value in bits." +msgstr "" + +msgid "Size of seed input in bits." +msgstr "" + +msgid "Get the hash function definition." +msgstr "" + +msgid ":pep:`456` \"Secure and interchangeable hash algorithm\"." +msgstr "" + +msgid "" +"Hash a pointer value: process the pointer value as an integer (cast it to " +"``uintptr_t`` internally). The pointer is not dereferenced." +msgstr "" + +msgid "The function cannot fail: it cannot return ``-1``." +msgstr "" + +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 "" + +msgid "" +"Use this function to implement hashing for immutable objects whose :c:member:" +"`~PyTypeObject.tp_richcompare` function compares to another object's buffer." +msgstr "" + +msgid "*len* must be greater than or equal to ``0``." +msgstr "" + +msgid "This function always succeeds." +msgstr "" + +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 "" + +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 0adcef71..421af23f 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -8,41 +8,32 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/import.rst:6 msgid "Importing Modules" msgstr "" +#: ../../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 *`." msgstr "" -msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`." -msgstr "" - -msgid "" -"This function used to fail immediately when the import lock was held by " -"another thread. In Python 3.3 though, the locking scheme switched to per-" -"module locks for most purposes, so this function's special behaviour isn't " -"needed anymore." -msgstr "" - -msgid "Use :c:func:`PyImport_ImportModule` instead." -msgstr "" - +#: ../../c-api/import.rst:24 msgid "" "Import a module. This is best described by referring to the built-in Python " "function :func:`__import__`." msgstr "" +#: ../../c-api/import.rst:27 ../../c-api/import.rst:43 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:" @@ -50,25 +41,30 @@ msgid "" "is normally the top-level package, unless a non-empty *fromlist* was given." msgstr "" +#: ../../c-api/import.rst:33 msgid "" "Failing imports remove incomplete module objects, like with :c:func:" "`PyImport_ImportModule`." msgstr "" +#: ../../c-api/import.rst:39 msgid "" "Import a module. This is best described by referring to the built-in Python " "function :func:`__import__`, as the standard :func:`__import__` function " "calls this function directly." msgstr "" +#: ../../c-api/import.rst:53 msgid "" "Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a " "UTF-8 encoded string instead of a Unicode object." msgstr "" +#: ../../c-api/import.rst:56 msgid "Negative values for *level* are no longer accepted." msgstr "" +#: ../../c-api/import.rst:61 msgid "" "This is a higher-level interface that calls the current \"import hook " "function\" (with an explicit *level* of 0, meaning absolute import). It " @@ -77,31 +73,38 @@ msgid "" "hooks are installed in the current environment." msgstr "" +#: ../../c-api/import.rst:67 msgid "This function always uses absolute imports." msgstr "" +#: ../../c-api/import.rst:72 msgid "" "Reload a module. Return a new reference to the reloaded module, or ``NULL`` " "with an exception set on failure (the module still exists in this case)." msgstr "" +#: ../../c-api/import.rst:78 msgid "Return the module object corresponding to a module name." msgstr "" +#: ../../c-api/import.rst:80 msgid "" "The *name* argument may be of the form ``package.module``. First check the " "modules dictionary if there's one there, and if not, create a new one and " "insert it in the modules dictionary." msgstr "" +#: ../../c-api/import.rst:84 msgid "" "Return a :term:`strong reference` to the module on success. Return ``NULL`` " "with an exception set on failure." msgstr "" +#: ../../c-api/import.rst:87 msgid "The module name *name* is decoded from UTF-8." msgstr "" +#: ../../c-api/import.rst:89 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:" @@ -110,16 +113,19 @@ msgid "" "already present." msgstr "" +#: ../../c-api/import.rst:100 msgid "" "Similar to :c:func:`PyImport_AddModuleRef`, but return a :term:`borrowed " "reference` and *name* is a Python :class:`str` object." msgstr "" +#: ../../c-api/import.rst:108 msgid "" "Similar to :c:func:`PyImport_AddModuleRef`, but return a :term:`borrowed " "reference`." msgstr "" +#: ../../c-api/import.rst:116 msgid "" "Given a module name (possibly of the form ``package.module``) and a code " "object read from a Python bytecode file or obtained from the built-in " @@ -133,6 +139,7 @@ msgid "" "to the module author's intents) state." msgstr "" +#: ../../c-api/import.rst:126 msgid "" "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 " @@ -140,51 +147,68 @@ msgid "" "of :class:`~importlib.machinery.SourceFileLoader` otherwise." msgstr "" +#: ../../c-api/import.rst:131 msgid "" "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." +"object's :attr:`~codeobject.co_filename`." msgstr "" +#: ../../c-api/import.rst:134 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." msgstr "" +#: ../../c-api/import.rst:137 msgid "" "If *name* points to a dotted name of the form ``package.module``, any " "package structures not already created will still not be created." msgstr "" +#: ../../c-api/import.rst:140 msgid "" "See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:" "`PyImport_ExecCodeModuleWithPathnames`." msgstr "" +#: ../../c-api/import.rst:143 msgid "" -"The setting of :attr:`~module.__cached__` and :attr:`~module.__loader__` is " -"deprecated. See :class:`~importlib.machinery.ModuleSpec` for alternatives." +"The setting of ``__cached__`` and :attr:`~module.__loader__` is deprecated. " +"See :class:`~importlib.machinery.ModuleSpec` for alternatives." +msgstr "" + +#: ../../c-api/import.rst:148 +msgid "The ``__cached__`` attribute is no longer set." msgstr "" +#: ../../c-api/import.rst:154 msgid "" "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 "" +#: ../../c-api/import.rst:157 msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`." msgstr "" +#: ../../c-api/import.rst:162 msgid "" -"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." +"Like :c:func:`PyImport_ExecCodeModuleEx`, but the path to any compiled file " +"via *cpathname* is used appropriately when non-``NULL``. Of the three " +"functions, this is the preferred one to use." msgstr "" +#: ../../c-api/import.rst:168 msgid "" -"Setting :attr:`~module.__cached__` is deprecated. See :class:`~importlib." -"machinery.ModuleSpec` for alternatives." +"Setting ``__cached__`` is deprecated. See :class:`~importlib.machinery." +"ModuleSpec` for alternatives." +msgstr "" + +#: ../../c-api/import.rst:172 +msgid "The ``__cached__`` attribute no longer set." msgstr "" +#: ../../c-api/import.rst:178 msgid "" "Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and " "*cpathname* are UTF-8 encoded strings. Attempts are also made to figure out " @@ -192,40 +216,48 @@ msgid "" "set to ``NULL``." msgstr "" +#: ../../c-api/import.rst:184 msgid "" "Uses :func:`!imp.source_from_cache` in calculating the source path if only " "the bytecode path is provided." msgstr "" +#: ../../c-api/import.rst:187 msgid "No longer uses the removed :mod:`!imp` module." msgstr "" +#: ../../c-api/import.rst:193 msgid "" "Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` " "file). The magic number should be present in the first four bytes of the " "bytecode file, in little-endian byte order. Returns ``-1`` on error." msgstr "" +#: ../../c-api/import.rst:197 msgid "Return value of ``-1`` upon failure." msgstr "" +#: ../../c-api/import.rst:203 msgid "" "Return the magic tag string for :pep:`3147` format Python bytecode file " "names. Keep in mind that the value at ``sys.implementation.cache_tag`` is " "authoritative and should be used instead of this function." msgstr "" +#: ../../c-api/import.rst:211 msgid "" "Return the dictionary used for the module administration (a.k.a. ``sys." "modules``). Note that this is a per-interpreter variable." msgstr "" +#: ../../c-api/import.rst:216 msgid "" "Return the already imported module with the given name. If the module has " "not been imported yet then returns ``NULL`` but does not set an error. " "Returns ``NULL`` and sets an error if the lookup failed." msgstr "" +#: ../../c-api/import.rst:224 msgid "" "Return a finder object for a :data:`sys.path`/:attr:`!pkg.__path__` item " "*path*, possibly by fetching it from the :data:`sys.path_importer_cache` " @@ -236,6 +268,7 @@ msgid "" "path_importer_cache`. Return a new reference to the finder object." msgstr "" +#: ../../c-api/import.rst:235 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 " @@ -244,14 +277,17 @@ msgid "" "the module if it was already imported.)" msgstr "" +#: ../../c-api/import.rst:243 msgid "The ``__file__`` attribute is no longer set on the module." msgstr "" +#: ../../c-api/import.rst:249 msgid "" "Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a " "UTF-8 encoded string instead of a Unicode object." msgstr "" +#: ../../c-api/import.rst:257 msgid "" "This is the structure type definition for frozen module descriptors, as " "generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the " @@ -259,6 +295,7 @@ msgid "" "h`, is::" msgstr "" +#: ../../c-api/import.rst:262 msgid "" "struct _frozen {\n" " const char *name;\n" @@ -268,11 +305,13 @@ msgid "" "};" msgstr "" +#: ../../c-api/import.rst:269 msgid "" "The new ``is_package`` field indicates whether the module is a package or " "not. This replaces setting the ``size`` field to a negative value." msgstr "" +#: ../../c-api/import.rst:275 msgid "" "This pointer is initialized to point to an array of :c:struct:`_frozen` " "records, terminated by one whose members are all ``NULL`` or zero. When a " @@ -281,6 +320,7 @@ msgid "" "frozen modules." msgstr "" +#: ../../c-api/import.rst:283 msgid "" "Add a single module to the existing table of built-in modules. This is a " "convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning " @@ -290,6 +330,7 @@ msgid "" "before :c:func:`Py_Initialize`." msgstr "" +#: ../../c-api/import.rst:293 msgid "" "Structure describing a single entry in the list of built-in modules. " "Programs which embed Python may use an array of these structures in " @@ -297,12 +338,22 @@ msgid "" "built-in modules. The structure consists of two members:" msgstr "" +#: ../../c-api/import.rst:301 msgid "The module name, as an ASCII encoded string." msgstr "" +#: ../../c-api/import.rst:305 msgid "Initialization function for a module built into the interpreter." msgstr "" +#: ../../c-api/import.rst:307 +msgid "" +"Note that the inittab uses \"``PyInit``\" :ref:`initialization functions " +"`; there is currently no way to include " +"\"``PyModExport_``\" :ref:`export hooks `." +msgstr "" + +#: ../../c-api/import.rst:315 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:" @@ -313,18 +364,29 @@ msgid "" "before :c:func:`Py_Initialize`." msgstr "" +#: ../../c-api/import.rst:322 msgid "" "If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` " "or :c:func:`PyImport_ExtendInittab` must be called before each Python " "initialization." msgstr "" +#: ../../c-api/import.rst:329 +msgid "" +"The table of built-in modules used by Python initialization. Do not use this " +"directly; use :c:func:`PyImport_AppendInittab` and :c:func:" +"`PyImport_ExtendInittab` instead." +msgstr "" + +#: ../../c-api/import.rst:336 msgid "Import the module *mod_name* and get its attribute *attr_name*." msgstr "" +#: ../../c-api/import.rst:338 msgid "Names must be Python :class:`str` objects." msgstr "" +#: ../../c-api/import.rst:340 msgid "" "Helper function combining :c:func:`PyImport_Import` and :c:func:" "`PyObject_GetAttr`. For example, it can raise :exc:`ImportError` if the " @@ -332,31 +394,109 @@ msgid "" "exist." msgstr "" +#: ../../c-api/import.rst:349 ../../c-api/import.rst:369 msgid "" "Similar to :c:func:`PyImport_ImportModuleAttr`, but names are UTF-8 encoded " "strings instead of Python :class:`str` objects." msgstr "" +#: ../../c-api/import.rst:356 +msgid "Gets the current lazy imports mode." +msgstr "" + +#: ../../c-api/import.rst:362 +msgid "" +"Return a :term:`strong reference` to the current lazy imports filter, or " +"``NULL`` if none exists. This function always succeeds." +msgstr "" + +#: ../../c-api/import.rst:372 +msgid "This function always returns ``0``." +msgstr "" + +#: ../../c-api/import.rst:378 +msgid "" +"Sets the current lazy imports filter. The *filter* should be a callable that " +"will receive ``(importing_module_name, imported_module_name, [fromlist])`` " +"when an import can potentially be lazy. The ``imported_module_name`` value " +"is the resolved module name, so ``lazy from .spam import eggs`` passes " +"``package.spam``. The callable must return ``True`` if the import should be " +"lazy and ``False`` otherwise." +msgstr "" + +#: ../../c-api/import.rst:385 +msgid "Return ``0`` on success and ``-1`` with an exception set otherwise." +msgstr "" + +#: ../../c-api/import.rst:391 +msgid "Enumeration of possible lazy import modes." +msgstr "" + +#: ../../c-api/import.rst:395 +msgid "Respect the ``lazy`` keyword in source code. This is the default mode." +msgstr "" + +#: ../../c-api/import.rst:399 +msgid "Make all imports lazy by default." +msgstr "" + +#: ../../c-api/import.rst:405 +msgid "" +"This function is a building block that enables embedders to implement the :" +"py:meth:`~importlib.abc.Loader.create_module` step of custom static " +"extension importers (e.g. of statically-linked extensions)." +msgstr "" + +#: ../../c-api/import.rst:409 +msgid "*spec* must be a :class:`~importlib.machinery.ModuleSpec` object." +msgstr "" + +#: ../../c-api/import.rst:411 +msgid "" +"*initfunc* must be an :ref:`initialization function `, the same as for :c:func:`PyImport_AppendInittab`." +msgstr "" + +#: ../../c-api/import.rst:414 +msgid "" +"On success, create and return a module object. This module will not be " +"initialized; call :c:func:`PyModule_Exec` to initialize it. (Custom " +"importers should do this in their :py:meth:`~importlib.abc.Loader." +"exec_module` method.)" +msgstr "" + +#: ../../c-api/import.rst:420 +msgid "On error, return NULL with an exception set." +msgstr "" + +#: ../../c-api/import.rst:11 msgid "package variable" msgstr "" +#: ../../c-api/import.rst:11 msgid "__all__" msgstr "" +#: ../../c-api/import.rst:11 msgid "__all__ (package variable)" msgstr "" +#: ../../c-api/import.rst:11 msgid "modules (in module sys)" msgstr "" +#: ../../c-api/import.rst:22 ../../c-api/import.rst:114 msgid "built-in function" msgstr "" +#: ../../c-api/import.rst:22 msgid "__import__" msgstr "" +#: ../../c-api/import.rst:114 msgid "compile" msgstr "" +#: ../../c-api/import.rst:255 msgid "freeze utility" msgstr "" diff --git a/c-api/import.po~ b/c-api/import.po~ new file mode 100644 index 00000000..0adcef71 --- /dev/null +++ b/c-api/import.po~ @@ -0,0 +1,362 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Importing Modules" +msgstr "" + +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 *`." +msgstr "" + +msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`." +msgstr "" + +msgid "" +"This function used to fail immediately when the import lock was held by " +"another thread. In Python 3.3 though, the locking scheme switched to per-" +"module locks for most purposes, so this function's special behaviour isn't " +"needed anymore." +msgstr "" + +msgid "Use :c:func:`PyImport_ImportModule` instead." +msgstr "" + +msgid "" +"Import a module. This is best described by referring to the built-in Python " +"function :func:`__import__`." +msgstr "" + +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." +msgstr "" + +msgid "" +"Failing imports remove incomplete module objects, like with :c:func:" +"`PyImport_ImportModule`." +msgstr "" + +msgid "" +"Import a module. This is best described by referring to the built-in Python " +"function :func:`__import__`, as the standard :func:`__import__` function " +"calls this function directly." +msgstr "" + +msgid "" +"Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a " +"UTF-8 encoded string instead of a Unicode object." +msgstr "" + +msgid "Negative values for *level* are no longer accepted." +msgstr "" + +msgid "" +"This is a higher-level interface that calls the current \"import hook " +"function\" (with an explicit *level* of 0, meaning absolute import). It " +"invokes the :func:`__import__` function from the ``__builtins__`` of the " +"current globals. This means that the import is done using whatever import " +"hooks are installed in the current environment." +msgstr "" + +msgid "This function always uses absolute imports." +msgstr "" + +msgid "" +"Reload a module. Return a new reference to the reloaded module, or ``NULL`` " +"with an exception set on failure (the module still exists in this case)." +msgstr "" + +msgid "Return the module object corresponding to a module name." +msgstr "" + +msgid "" +"The *name* argument may be of the form ``package.module``. First check the " +"modules dictionary if there's one there, and if not, create a new one and " +"insert it in the modules dictionary." +msgstr "" + +msgid "" +"Return a :term:`strong reference` to the module on success. Return ``NULL`` " +"with an exception set on failure." +msgstr "" + +msgid "The module name *name* is decoded from UTF-8." +msgstr "" + +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." +msgstr "" + +msgid "" +"Similar to :c:func:`PyImport_AddModuleRef`, but return a :term:`borrowed " +"reference` and *name* is a Python :class:`str` object." +msgstr "" + +msgid "" +"Similar to :c:func:`PyImport_AddModuleRef`, but return a :term:`borrowed " +"reference`." +msgstr "" + +msgid "" +"Given a module name (possibly of the form ``package.module``) and a code " +"object read from a Python bytecode file or obtained from the built-in " +"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." +msgstr "" + +msgid "" +"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 "" + +msgid "" +"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 "" + +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." +msgstr "" + +msgid "" +"If *name* points to a dotted name of the form ``package.module``, any " +"package structures not already created will still not be created." +msgstr "" + +msgid "" +"See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:" +"`PyImport_ExecCodeModuleWithPathnames`." +msgstr "" + +msgid "" +"The setting of :attr:`~module.__cached__` and :attr:`~module.__loader__` is " +"deprecated. See :class:`~importlib.machinery.ModuleSpec` for alternatives." +msgstr "" + +msgid "" +"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 "" + +msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`." +msgstr "" + +msgid "" +"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 "" + +msgid "" +"Setting :attr:`~module.__cached__` is deprecated. See :class:`~importlib." +"machinery.ModuleSpec` for alternatives." +msgstr "" + +msgid "" +"Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and " +"*cpathname* are UTF-8 encoded strings. Attempts are also made to figure out " +"what the value for *pathname* should be from *cpathname* if the former is " +"set to ``NULL``." +msgstr "" + +msgid "" +"Uses :func:`!imp.source_from_cache` in calculating the source path if only " +"the bytecode path is provided." +msgstr "" + +msgid "No longer uses the removed :mod:`!imp` module." +msgstr "" + +msgid "" +"Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` " +"file). The magic number should be present in the first four bytes of the " +"bytecode file, in little-endian byte order. Returns ``-1`` on error." +msgstr "" + +msgid "Return value of ``-1`` upon failure." +msgstr "" + +msgid "" +"Return the magic tag string for :pep:`3147` format Python bytecode file " +"names. Keep in mind that the value at ``sys.implementation.cache_tag`` is " +"authoritative and should be used instead of this function." +msgstr "" + +msgid "" +"Return the dictionary used for the module administration (a.k.a. ``sys." +"modules``). Note that this is a per-interpreter variable." +msgstr "" + +msgid "" +"Return the already imported module with the given name. If the module has " +"not been imported yet then returns ``NULL`` but does not set an error. " +"Returns ``NULL`` and sets an error if the lookup failed." +msgstr "" + +msgid "" +"Return a finder object for a :data:`sys.path`/:attr:`!pkg.__path__` item " +"*path*, possibly by fetching it from the :data:`sys.path_importer_cache` " +"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." +msgstr "" + +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.)" +msgstr "" + +msgid "The ``__file__`` attribute is no longer set on the module." +msgstr "" + +msgid "" +"Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a " +"UTF-8 encoded string instead of a Unicode object." +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::" +msgstr "" + +msgid "" +"struct _frozen {\n" +" const char *name;\n" +" const unsigned char *code;\n" +" int size;\n" +" bool is_package;\n" +"};" +msgstr "" + +msgid "" +"The new ``is_package`` field indicates whether the module is a package or " +"not. This replaces setting the ``size`` field to a negative value." +msgstr "" + +msgid "" +"This pointer is initialized to point to an array of :c:struct:`_frozen` " +"records, terminated by one whose members are all ``NULL`` or zero. When a " +"frozen module is imported, it is searched in this table. Third-party code " +"could play tricks with this to provide a dynamically created collection of " +"frozen modules." +msgstr "" + +msgid "" +"Add a single module to the existing table of built-in modules. This is a " +"convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning " +"``-1`` if the table could not be extended. The new module can be imported " +"by the name *name*, and uses the function *initfunc* as the initialization " +"function called on the first attempted import. This should be called " +"before :c:func:`Py_Initialize`." +msgstr "" + +msgid "" +"Structure describing a single entry in the list of built-in modules. " +"Programs which embed Python may use an array of these structures in " +"conjunction with :c:func:`PyImport_ExtendInittab` to provide additional " +"built-in modules. The structure consists of two members:" +msgstr "" + +msgid "The module name, as an ASCII encoded string." +msgstr "" + +msgid "Initialization function for a module built into the interpreter." +msgstr "" + +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`." +msgstr "" + +msgid "" +"If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` " +"or :c:func:`PyImport_ExtendInittab` must be called before each Python " +"initialization." +msgstr "" + +msgid "Import the module *mod_name* and get its attribute *attr_name*." +msgstr "" + +msgid "Names must be Python :class:`str` objects." +msgstr "" + +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 "" + +msgid "" +"Similar to :c:func:`PyImport_ImportModuleAttr`, but names are UTF-8 encoded " +"strings instead of Python :class:`str` objects." +msgstr "" + +msgid "package variable" +msgstr "" + +msgid "__all__" +msgstr "" + +msgid "__all__ (package variable)" +msgstr "" + +msgid "modules (in module sys)" +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "__import__" +msgstr "" + +msgid "compile" +msgstr "" + +msgid "freeze utility" +msgstr "" diff --git a/c-api/index.po b/c-api/index.po index 75963044..e8173c82 100644 --- a/c-api/index.po +++ b/c-api/index.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Python/C API Reference Manual" +#: ../../c-api/index.rst:5 +msgid "Python/C API reference manual" msgstr "" +#: ../../c-api/index.rst:7 msgid "" "This manual documents the API used by C and C++ programmers who want to " "write extension modules or embed Python. It is a companion to :ref:" diff --git a/c-api/index.po~ b/c-api/index.po~ new file mode 100644 index 00000000..75963044 --- /dev/null +++ b/c-api/index.po~ @@ -0,0 +1,28 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Python/C API Reference Manual" +msgstr "" + +msgid "" +"This manual documents the API used by C and C++ programmers who want to " +"write extension modules or embed Python. It is a companion to :ref:" +"`extending-index`, which describes the general principles of extension " +"writing but does not document the API functions in detail." +msgstr "" diff --git a/c-api/init.po b/c-api/init.po index 002d5289..54f31a92 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -11,2799 +11,47 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-29 14:15+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "Initialization, Finalization, and Threads" -msgstr "" - -msgid "" -"See :ref:`Python Initialization Configuration ` for details on " -"how to configure the interpreter prior to initialization." -msgstr "" - -msgid "Before Python Initialization" -msgstr "" - -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 "" - -msgid "" -"The following functions can be safely called before Python is initialized:" -msgstr "" - -msgid "Functions that initialize the interpreter:" -msgstr "" - -msgid ":c:func:`Py_Initialize`" -msgstr "" - -msgid ":c:func:`Py_InitializeEx`" -msgstr "" - -msgid ":c:func:`Py_InitializeFromConfig`" -msgstr "" - -msgid ":c:func:`Py_BytesMain`" -msgstr "" - -msgid ":c:func:`Py_Main`" -msgstr "" - -msgid "the runtime pre-initialization functions covered in :ref:`init-config`" -msgstr "" - -msgid "Configuration functions:" -msgstr "" - -msgid ":c:func:`PyImport_AppendInittab`" -msgstr "" - -msgid ":c:func:`PyImport_ExtendInittab`" -msgstr "" - -msgid ":c:func:`!PyInitFrozenExtensions`" -msgstr "" - -msgid ":c:func:`PyMem_SetAllocator`" -msgstr "" - -msgid ":c:func:`PyMem_SetupDebugHooks`" -msgstr "" - -msgid ":c:func:`PyObject_SetArenaAllocator`" -msgstr "" - -msgid ":c:func:`Py_SetProgramName`" -msgstr "" - -msgid ":c:func:`Py_SetPythonHome`" -msgstr "" - -msgid ":c:func:`PySys_ResetWarnOptions`" -msgstr "" - -msgid "the configuration functions covered in :ref:`init-config`" -msgstr "" - -msgid "Informative functions:" -msgstr "" - -msgid ":c:func:`Py_IsInitialized`" -msgstr "" - -msgid ":c:func:`PyMem_GetAllocator`" -msgstr "" - -msgid ":c:func:`PyObject_GetArenaAllocator`" -msgstr "" - -msgid ":c:func:`Py_GetBuildInfo`" -msgstr "" - -msgid ":c:func:`Py_GetCompiler`" -msgstr "" - -msgid ":c:func:`Py_GetCopyright`" -msgstr "" - -msgid ":c:func:`Py_GetPlatform`" -msgstr "" - -msgid ":c:func:`Py_GetVersion`" -msgstr "" - -msgid "Utilities:" -msgstr "" - -msgid ":c:func:`Py_DecodeLocale`" -msgstr "" - -msgid "" -"the status reporting and utility functions covered in :ref:`init-config`" -msgstr "" - -msgid "Memory allocators:" -msgstr "" - -msgid ":c:func:`PyMem_RawMalloc`" -msgstr "" - -msgid ":c:func:`PyMem_RawRealloc`" -msgstr "" - -msgid ":c:func:`PyMem_RawCalloc`" -msgstr "" - -msgid ":c:func:`PyMem_RawFree`" -msgstr "" - -msgid "Synchronization:" -msgstr "" - -msgid ":c:func:`PyMutex_Lock`" -msgstr "" - -msgid ":c:func:`PyMutex_Unlock`" -msgstr "" - -msgid "" -"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 "" - -msgid "Global configuration variables" -msgstr "" - -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 `." -msgstr "" - -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." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"bytes_warning` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -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``." -msgstr "" - -msgid "Set by the :option:`-b` option." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"parser_debug` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -msgid "" -"Turn on parser debugging output (for expert only, depending on compilation " -"options)." -msgstr "" - -msgid "" -"Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment " -"variable." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"write_bytecode` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -msgid "" -"If set to non-zero, Python won't try to write ``.pyc`` files on the import " -"of source modules." -msgstr "" - -msgid "" -"Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE` " -"environment variable." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"pathconfig_warnings` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -msgid "" -"Suppress error messages when calculating the module search path in :c:func:" -"`Py_GetPath`." -msgstr "" - -msgid "Private flag used by ``_freeze_module`` and ``frozenmain`` programs." -msgstr "" - -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, " -"see :ref:`Python Initialization Configuration `." -msgstr "" - -msgid "" -"Set to ``1`` if the :envvar:`PYTHONHASHSEED` environment variable is set to " -"a non-empty string." -msgstr "" - -msgid "" -"If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment " -"variable to initialize the secret hash seed." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"use_environment` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -msgid "" -"Ignore all :envvar:`!PYTHON*` environment variables, e.g. :envvar:" -"`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." -msgstr "" - -msgid "Set by the :option:`-E` and :option:`-I` options." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"inspect` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -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 " -"when :data:`sys.stdin` does not appear to be a terminal." -msgstr "" - -msgid "" -"Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment " -"variable." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"interactive` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -msgid "Set by the :option:`-i` option." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"isolated` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -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." -msgstr "" - -msgid "Set by the :option:`-I` option." -msgstr "" - -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 `." -msgstr "" - -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, " -"for the :term:`filesystem encoding and error handler`." -msgstr "" - -msgid "" -"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " -"variable is set to a non-empty string." -msgstr "" - -msgid "See :pep:`529` for more details." -msgstr "" - -msgid "Availability" -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"legacy_windows_stdio` should be used instead, see :ref:`Python " -"Initialization Configuration `." -msgstr "" - -msgid "" -"If the flag is non-zero, use :class:`io.FileIO` instead of :class:`!io." -"_WindowsConsoleIO` for :mod:`sys` standard streams." -msgstr "" - -msgid "" -"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " -"is set to a non-empty string." -msgstr "" - -msgid "See :pep:`528` for more details." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"site_import` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -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)." -msgstr "" - -msgid "Set by the :option:`-S` option." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"user_site_directory` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -msgid "" -"Don't add the :data:`user site-packages directory ` to :data:" -"`sys.path`." -msgstr "" - -msgid "" -"Set by the :option:`-s` and :option:`-I` options, and the :envvar:" -"`PYTHONNOUSERSITE` environment variable." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"optimization_level` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -msgid "" -"Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment " -"variable." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"quiet` should be used instead, see :ref:`Python Initialization Configuration " -"`." +#: ../../c-api/init.rst:4 +msgid "Initialization, finalization, and threads" msgstr "" -msgid "" -"Don't display the copyright and version messages even in interactive mode." -msgstr "" - -msgid "Set by the :option:`-q` option." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"buffered_stdio` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -msgid "Force the stdout and stderr streams to be unbuffered." -msgstr "" - -msgid "" -"Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` " -"environment variable." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"verbose` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -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 " -"to ``2``, print a message for each file that is checked for when searching " -"for a module. Also provides information on module cleanup at exit." -msgstr "" - -msgid "" -"Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment " -"variable." -msgstr "" - -msgid "Initializing and finalizing the interpreter" -msgstr "" - -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." +#: ../../c-api/init.rst:6 +msgid "This page has been split up into the following:" msgstr "" -msgid "" -"This initializes the table of loaded modules (``sys.modules``), and creates " -"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 :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." +#: ../../c-api/init.rst:8 +msgid ":ref:`initialization`" msgstr "" -msgid "" -"Use :c:func:`Py_InitializeFromConfig` to customize the :ref:`Python " -"Initialization Configuration `." +#: ../../c-api/init.rst:9 +msgid ":ref:`threads`" msgstr "" -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." +#: ../../c-api/init.rst:10 +msgid ":ref:`synchronization`" msgstr "" -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 may be useful when CPython is embedded as part of a larger " -"application." +#: ../../c-api/init.rst:11 +msgid ":ref:`thread-local-storage`" msgstr "" -msgid "" -"Initialize Python from *config* configuration, as described in :ref:`init-" -"from-config`." +#: ../../c-api/init.rst:12 +msgid ":ref:`sub-interpreter-support`" msgstr "" -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." +#: ../../c-api/init.rst:13 +msgid ":ref:`profiling`" msgstr "" -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 "" - -msgid "" -"Return true (non-zero) if the main Python interpreter is :term:`shutting " -"down `. Return false (zero) otherwise." -msgstr "" - -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`. This is a no-op when called for a " -"second time (without calling :c:func:`Py_Initialize` again first)." -msgstr "" - -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." -msgstr "" - -msgid "" -"Normally the return value is ``0``. If there were errors during finalization " -"(flushing buffered data), ``-1`` is returned." -msgstr "" - -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 "" - -msgid "" -"This function is provided for a number of reasons. An embedding application " -"might want to restart Python without having to restart the application " -"itself. An application that has loaded the Python interpreter from a " -"dynamically loadable library (or DLL) might want to free all memory " -"allocated by Python before unloading the DLL. During a hunt for memory leaks " -"in an application a developer might want to free all memory allocated by " -"Python before exiting from the application." -msgstr "" - -msgid "" -"**Bugs and caveats:** The destruction of modules and objects in modules is " -"done in random order; this may cause destructors (:meth:`~object.__del__` " -"methods) to fail when they depend on other objects (even functions) or " -"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. 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. :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 "" - -msgid "" -"Raises an :ref:`auditing event ` ``cpython." -"_PySys_ClearAuditHooks`` with no arguments." -msgstr "" - -msgid "" -"This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that " -"disregards the return value." -msgstr "" - -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 "" - -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 "" - -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 "" - -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 "" - -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 "" - -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 "" - -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 "" - -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 "" - -msgid "Executes the main module in a fully configured CPython runtime." -msgstr "" - -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 "" - -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 "" - -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 "" - -msgid "" -"This function always finalizes the Python interpreter before it returns." -msgstr "" - -msgid "" -"See :ref:`Python Configuration ` for an example of a " -"customized Python that always runs in isolated mode using :c:func:" -"`Py_RunMain`." -msgstr "" - -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 "" - -msgid "There must be an :term:`attached thread state` for *interp*." -msgstr "" - -msgid "Process-wide parameters" -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"program_name` should be used instead, see :ref:`Python Initialization " -"Configuration `." -msgstr "" - -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 " -"of the ``argv[0]`` argument to the :c:func:`main` function of the program " -"(converted to wide characters). This is used by :c:func:`Py_GetPath` and " -"some other functions below to find the Python run-time libraries relative to " -"the interpreter executable. The default value is ``'python'``. The " -"argument should point to a zero-terminated wide character string in static " -"storage whose contents will not change for the duration of the program's " -"execution. No code in the Python interpreter will change the contents of " -"this storage." -msgstr "" - -msgid "" -"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:" -"`wchar_t*` string." -msgstr "" - -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 "" - -msgid "" -"This function should not be called before :c:func:`Py_Initialize`, otherwise " -"it returns ``NULL``." -msgstr "" - -msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." -msgstr "" - -msgid "" -"Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys." -"executable`) instead." -msgstr "" - -msgid "" -"Return the *prefix* for installed platform-independent 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 prefix is " -"``'/usr/local'``. The returned string points into static storage; the caller " -"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.base_prefix``. It is only useful on Unix. " -"See also the next function." -msgstr "" - -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 "" - -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.base_exec_prefix``. It is only " -"useful on Unix." -msgstr "" - -msgid "" -"Background: The exec-prefix differs from the prefix when platform dependent " -"files (such as executables and shared libraries) are installed in a " -"different directory tree. In a typical installation, platform dependent " -"files may be installed in the :file:`/usr/local/plat` subtree while platform " -"independent may be installed in :file:`/usr/local`." -msgstr "" - -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 " -"considered the same platform, but Intel machines running Solaris 2.x are " -"another platform, and Intel machines running Linux are yet another " -"platform. Different major revisions of the same operating system generally " -"also form different platforms. Non-Unix operating systems are a different " -"story; the installation strategies on those systems are so different that " -"the prefix and exec-prefix are meaningless, and set to the empty string. " -"Note that compiled Python bytecode files are platform independent (but not " -"independent from the Python version by which they were compiled!)." -msgstr "" - -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." -msgstr "" - -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 "" - -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 " -"name (set by :c:member:`PyConfig.program_name`). The returned string points " -"into static storage; the caller should not modify its value. The value is " -"available to Python code as ``sys.executable``." -msgstr "" - -msgid "" -"Return the default module search path; this is computed from the program " -"name (set by :c:member:`PyConfig.program_name`) and some environment " -"variables. The returned string consists of a series of directory names " -"separated by a platform dependent delimiter character. The delimiter " -"character is ``':'`` on Unix and macOS, ``';'`` on Windows. The returned " -"string points into static storage; the caller should not modify its value. " -"The list :data:`sys.path` is initialized with this value on interpreter " -"startup; it can be (and usually is) modified later to change the search path " -"for loading modules." -msgstr "" - -msgid "" -"Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:" -"`sys.path`) instead." -msgstr "" - -msgid "" -"Return the version of this Python interpreter. This is a string that looks " -"something like ::" -msgstr "" - -msgid "\"3.0a5+ (py3k:63103M, May 12 2008, 00:53:55) \\n[GCC 4.2.3]\"" -msgstr "" - -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`." -msgstr "" - -msgid "See also the :c:var:`Py_Version` constant." -msgstr "" - -msgid "" -"Return the platform identifier for the current platform. On Unix, this is " -"formed from the \"official\" name of the operating system, converted to " -"lower case, followed by the major revision number; e.g., for Solaris 2.x, " -"which is also known as SunOS 5.x, the value is ``'sunos5'``. On macOS, it " -"is ``'darwin'``. On Windows, it is ``'win'``. The returned string points " -"into static storage; the caller should not modify its value. The value is " -"available to Python code as ``sys.platform``." -msgstr "" - -msgid "" -"Return the official copyright string for the current Python version, for " -"example" -msgstr "" - -msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``" -msgstr "" - -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``." -msgstr "" - -msgid "" -"Return an indication of the compiler used to build the current Python " -"version, in square brackets, for example::" -msgstr "" - -msgid "\"[GCC 2.7.2.2]\"" -msgstr "" - -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 " -"``sys.version``." -msgstr "" - -msgid "" -"Return information about the sequence number and build date and time of the " -"current Python interpreter instance, for example ::" -msgstr "" - -msgid "\"#67, Aug 1 1997, 22:34:28\"" -msgstr "" - -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 `." -msgstr "" - -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 " -"difference that the first entry should refer to the script file to be " -"executed rather than the executable hosting the Python interpreter. If " -"there isn't a script that will be run, the first entry in *argv* can be an " -"empty string. If this function fails to initialize :data:`sys.argv`, a " -"fatal condition is signalled using :c:func:`Py_FatalError`." -msgstr "" - -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 " -"following algorithm:" -msgstr "" - -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`." -msgstr "" - -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 "" - -msgid "" -"See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` " -"members of the :ref:`Python Initialization Configuration `." -msgstr "" - -msgid "" -"It is recommended that applications embedding the Python interpreter for " -"purposes other than executing a single script pass ``0`` as *updatepath*, " -"and update :data:`sys.path` themselves if desired. See :cve:`2008-5983`." -msgstr "" - -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::" -msgstr "" - -msgid "PyRun_SimpleString(\"import sys; sys.path.pop(0)\\n\");" -msgstr "" - -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 `." -msgstr "" - -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`." -msgstr "" - -msgid "The *updatepath* value depends on :option:`-I`." -msgstr "" - -msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"home` should be used instead, see :ref:`Python Initialization Configuration " -"`." -msgstr "" - -msgid "" -"Set the default \"home\" directory, that is, the location of the standard " -"Python libraries. See :envvar:`PYTHONHOME` for the meaning of the argument " -"string." -msgstr "" - -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 " -"execution. No code in the Python interpreter will change the contents of " -"this storage." -msgstr "" - -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." -msgstr "" - -msgid "" -"Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:" -"`PYTHONHOME` environment variable instead." -msgstr "" - -msgid "Thread State and the Global Interpreter Lock" -msgstr "" - -msgid "" -"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 " -"simplest operations could cause problems in a multi-threaded program: for " -"example, when two threads simultaneously increment the reference count of " -"the same object, the reference count could end up being incremented only " -"once instead of twice." -msgstr "" - -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." -msgstr "" - -msgid "" -"The Python interpreter keeps some thread-specific bookkeeping information " -"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 "" - -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 "" - -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 "" - -msgid "Detaching the thread state from extension code" -msgstr "" - -msgid "" -"Most extension code manipulating the :term:`thread state` has the following " -"simple structure::" -msgstr "" - -msgid "" -"Save the thread state in a local variable.\n" -"... Do some blocking I/O operation ...\n" -"Restore the thread state from the local variable." -msgstr "" - -msgid "This is so common that a pair of macros exists to simplify it::" -msgstr "" - -msgid "" -"Py_BEGIN_ALLOW_THREADS\n" -"... Do some blocking I/O operation ...\n" -"Py_END_ALLOW_THREADS" -msgstr "" - -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 " -"block." -msgstr "" - -msgid "The block above expands to the following code::" -msgstr "" - -msgid "" -"PyThreadState *_save;\n" -"\n" -"_save = PyEval_SaveThread();\n" -"... Do some blocking I/O operation ...\n" -"PyEval_RestoreThread(_save);" -msgstr "" - -msgid "Here is how these functions work:" -msgstr "" - -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 "" - -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 "" - -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 "" - -msgid "Non-Python created threads" -msgstr "" - -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 :term:`GIL`, because they don't have an :" -"term:`attached thread state`." -msgstr "" - -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 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 "" - -msgid "" -"The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions " -"do all of the above automatically. The typical idiom for calling into " -"Python from a C thread is::" -msgstr "" - -msgid "" -"PyGILState_STATE gstate;\n" -"gstate = PyGILState_Ensure();\n" -"\n" -"/* Perform Python actions here. */\n" -"result = CallSomeFunction();\n" -"/* evaluate result or handle exception */\n" -"\n" -"/* Release the thread. No Python API allowed beyond this point. */\n" -"PyGILState_Release(gstate);" -msgstr "" - -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. 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 "" - -msgid "Supporting subinterpreters in non-Python threads" -msgstr "" - -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 "" - -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 "" - -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 "" - -msgid "Cautions about fork()" -msgstr "" - -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 " -"process forks only the thread that issued the fork will exist. This has a " -"concrete impact both on how locks must be handled and on all stored state in " -"CPython's runtime." -msgstr "" - -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` " -"by acquiring the locks it uses internally before the fork, and releasing " -"them afterwards. In addition, it resets any :ref:`lock-objects` in the " -"child. When extending or embedding Python, there is no way to inform Python " -"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." -msgstr "" - -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 " -"means finalizing all other :c:type:`PyThreadState` objects belonging to the " -"current interpreter and all other :c:type:`PyInterpreterState` objects. Due " -"to this and the special nature of the :ref:`\"main\" interpreter `, :c:func:`fork` should only be called in that " -"interpreter's \"main\" thread, where the CPython global runtime was " -"originally initialized. The only exception is if :c:func:`exec` will be " -"called immediately after." -msgstr "" - -msgid "Cautions regarding runtime finalization" -msgstr "" - -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 "" - -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 "" - -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 "" - -msgid "High-level API" -msgstr "" - -msgid "" -"These are the most commonly used types and functions when writing C " -"extension code, or when embedding the Python interpreter:" -msgstr "" - -msgid "" -"This data structure represents the state shared by a number of cooperating " -"threads. Threads belonging to the same interpreter share their module " -"administration and a few other internal items. There are no public members " -"in this structure." -msgstr "" - -msgid "" -"Threads belonging to different interpreters initially share nothing, except " -"process state like available memory, open file descriptors and such. The " -"global interpreter lock is also shared by all threads, regardless of to " -"which interpreter they belong." -msgstr "" - -msgid "" -":pep:`684` introduced the possibility of a :ref:`per-interpreter GIL `. See :c:func:`Py_NewInterpreterFromConfig`." -msgstr "" - -msgid "" -"This data structure represents the state of a single thread. The only " -"public data member is:" -msgstr "" - -msgid "This thread's interpreter state." -msgstr "" - -msgid "Deprecated function which does nothing." -msgstr "" - -msgid "" -"In Python 3.6 and older, this function created the GIL if it didn't exist." -msgstr "" - -msgid "The function now does nothing." -msgstr "" - -msgid "" -"This function is now called by :c:func:`Py_Initialize()`, so you don't have " -"to call it yourself anymore." -msgstr "" - -msgid "" -"This function cannot be called before :c:func:`Py_Initialize()` anymore." -msgstr "" - -msgid "" -"Detach the :term:`attached thread state` and return it. The thread will have " -"no :term:`thread state` upon returning." -msgstr "" - -msgid "" -"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 "" - -msgid "" -"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 "" - -msgid "" -"Hangs the current thread, rather than terminating it, if called while the " -"interpreter is finalizing." -msgstr "" - -msgid "" -"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 "" - -msgid "See also :c:func:`PyThreadState_GetUnchecked`." -msgstr "" - -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 " -"is NULL." -msgstr "" - -msgid "" -"In Python 3.5 to 3.12, the function was private and known as " -"``_PyThreadState_UncheckedGet()``." -msgstr "" - -msgid "" -"Set the :term:`attached thread state` to *tstate*, and return the :term:" -"`thread state` that was attached prior to calling." -msgstr "" - -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 "" - -msgid ":c:func:`PyEval_ReleaseThread`" -msgstr "" - -msgid "" -"Similar to :c:func:`PyGILState_Ensure`, this function will hang the thread " -"if the runtime is finalizing." -msgstr "" - -msgid "" -"The following functions use thread-local storage, and are not compatible " -"with sub-interpreters:" -msgstr "" - -msgid "" -"The type of the value returned by :c:func:`PyGILState_Ensure` and passed to :" -"c:func:`PyGILState_Release`." -msgstr "" - -msgid "The GIL was already held when :c:func:`PyGILState_Ensure` was called." -msgstr "" - -msgid "The GIL was not held when :c:func:`PyGILState_Ensure` was called." -msgstr "" - -msgid "" -"Ensure that the current thread is ready to call the Python C API regardless " -"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 "" - -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 "" - -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 "" - -msgid "" -"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 "" - -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)." -msgstr "" - -msgid "" -"Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:" -"func:`PyGILState_Release` on the same thread." -msgstr "" - -msgid "" -"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 "" - -msgid "" -"This function may return non-``NULL`` even when the :term:`thread state` is " -"detached. Prefer :c:func:`PyThreadState_Get` or :c:func:" -"`PyThreadState_GetUnchecked` for most cases." -msgstr "" - -msgid ":c:func:`PyThreadState_Get`" -msgstr "" - -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 "" - -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 "" - -msgid "" -"The following macros are normally used without a trailing semicolon; look " -"for example usage in the Python source distribution." -msgstr "" - -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." -msgstr "" - -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." -msgstr "" - -msgid "" -"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :" -"c:macro:`Py_END_ALLOW_THREADS` without the closing brace." -msgstr "" - -msgid "" -"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 "" - -msgid "Low-level API" -msgstr "" - -msgid "" -"All of the following functions must be called after :c:func:`Py_Initialize`." -msgstr "" - -msgid "" -":c:func:`Py_Initialize()` now initializes the :term:`GIL` and sets an :term:" -"`attached thread state`." -msgstr "" - -msgid "" -"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 "" - -msgid "" -"Raises an :ref:`auditing event ` ``cpython." -"PyInterpreterState_New`` with no arguments." -msgstr "" - -msgid "" -"Reset all information in an interpreter state object. There must be an :" -"term:`attached thread state` for the interpreter." -msgstr "" - -msgid "" -"Raises an :ref:`auditing event ` ``cpython." -"PyInterpreterState_Clear`` with no arguments." -msgstr "" - -msgid "" -"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 "" - -msgid "" -"Create a new thread state object belonging to the given interpreter object. " -"An :term:`attached thread state` is not needed." -msgstr "" - -msgid "" -"Reset all information in a :term:`thread state` object. *tstate* must be :" -"term:`attached `" -msgstr "" - -msgid "" -"This function now calls the :c:member:`!PyThreadState.on_delete` callback. " -"Previously, that happened in :c:func:`PyThreadState_Delete`." -msgstr "" - -msgid "The :c:member:`!PyThreadState.on_delete` callback was removed." -msgstr "" - -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 "" - -msgid "" -"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 "" - -msgid "" -"No :term:`thread state` will be :term:`attached ` " -"upon returning." -msgstr "" - -msgid "Get the current frame of the Python thread state *tstate*." -msgstr "" - -msgid "" -"Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " -"executing." -msgstr "" - -msgid "See also :c:func:`PyEval_GetFrame`." -msgstr "" - -msgid "" -"*tstate* must not be ``NULL``, and must be :term:`attached `." -msgstr "" - -msgid "" -"Get the unique :term:`thread state` identifier of the Python thread state " -"*tstate*." -msgstr "" - -msgid "Get the interpreter of the Python thread state *tstate*." -msgstr "" - -msgid "Suspend tracing and profiling in the Python thread state *tstate*." -msgstr "" - -msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." -msgstr "" - -msgid "" -"Resume tracing and profiling in the Python thread state *tstate* suspended " -"by the :c:func:`PyThreadState_EnterTracing` function." -msgstr "" - -msgid "" -"See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." -msgstr "" - -msgid "Get the current interpreter." -msgstr "" - -msgid "" -"Issue a fatal error if there no :term:`attached thread state`. It cannot " -"return NULL." -msgstr "" - -msgid "" -"Return the interpreter's unique ID. If there was any error in doing so then " -"``-1`` is returned and an error is set." -msgstr "" - -msgid "The caller must have an :term:`attached thread state`." -msgstr "" - -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 " -"caller should assume no interpreter-specific dict is available." -msgstr "" - -msgid "" -"This is not a replacement for :c:func:`PyModule_GetState()`, which " -"extensions should use to store interpreter-specific state information." -msgstr "" - -msgid "" -"The returned dictionary is borrowed from the interpreter and is valid until " -"interpreter shutdown." -msgstr "" - -msgid "Type of a frame evaluation function." -msgstr "" - -msgid "" -"The *throwflag* parameter is used by the ``throw()`` method of generators: " -"if non-zero, handle the current exception." -msgstr "" - -msgid "The function now takes a *tstate* parameter." -msgstr "" - -msgid "" -"The *frame* parameter changed from ``PyFrameObject*`` to " -"``_PyInterpreterFrame*``." -msgstr "" - -msgid "Get the frame evaluation function." -msgstr "" - -msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"." -msgstr "" - -msgid "Set the frame evaluation function." -msgstr "" - -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 :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 "" - -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 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 "" - -msgid "" -"The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" -"`unsigned long`." -msgstr "" - -msgid "" -":term:`Attach ` *tstate* to the current thread, which " -"must not be ``NULL`` or already :term:`attached `." -msgstr "" - -msgid "" -"The calling thread must not already have an :term:`attached thread state`." -msgstr "" - -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 "" - -msgid "" -":c:func:`PyEval_RestoreThread` is a higher-level function which is always " -"available (even when threads have not been initialized)." -msgstr "" - -msgid "" -"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 "" - -msgid "" -":c:func:`PyEval_SaveThread` is a higher-level function which is always " -"available (even when threads have not been initialized)." -msgstr "" - -msgid "Sub-interpreter support" -msgstr "" - -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 " -"same process and perhaps even in the same thread. Sub-interpreters allow you " -"to do that." -msgstr "" - -msgid "" -"The \"main\" interpreter is the first one created when the runtime " -"initializes. It is usually the only Python interpreter in a process. Unlike " -"sub-interpreters, the main interpreter has unique process-global " -"responsibilities like signal handling. It is also responsible for execution " -"during runtime initialization and is usually the active interpreter during " -"runtime finalization. The :c:func:`PyInterpreterState_Main` function " -"returns a pointer to its state." -msgstr "" - -msgid "" -"You can switch between sub-interpreters using the :c:func:" -"`PyThreadState_Swap` function. You can create and destroy them using the " -"following functions:" -msgstr "" - -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 "" - -msgid "Structure fields:" -msgstr "" - -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." -msgstr "" - -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`." -msgstr "" - -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 " -"unrestricted." -msgstr "" - -msgid "" -"Note that the :mod:`subprocess` module still works when fork is disallowed." -msgstr "" - -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-" -"interpreter is currently active. Otherwise exec is unrestricted." -msgstr "" - -msgid "" -"Note that the :mod:`subprocess` module still works when exec is disallowed." -msgstr "" - -msgid "" -"If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " -"create threads. Otherwise threads are allowed." -msgstr "" - -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)." -msgstr "" - -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`.)" -msgstr "" - -msgid "" -"This must be ``1`` (non-zero) if :c:member:`~PyInterpreterConfig." -"use_main_obmalloc` is ``0``." -msgstr "" - -msgid "" -"This determines the operation of the GIL for the sub-interpreter. It may be " -"one of the following:" -msgstr "" - -msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)." -msgstr "" - -msgid "Use (share) the main interpreter's GIL." -msgstr "" - -msgid "Use the sub-interpreter's own GIL." -msgstr "" - -msgid "" -"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` then :c:member:" -"`PyInterpreterConfig.use_main_obmalloc` must be ``0``." -msgstr "" - -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)." -msgstr "" - -msgid "" -"The given *config* controls the options with which the interpreter is " -"initialized." -msgstr "" - -msgid "" -"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 "" - -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 "" - -msgid "" -"Sub-interpreters are most effective when isolated from each other, with " -"certain functionality restricted::" -msgstr "" - -msgid "" -"PyInterpreterConfig config = {\n" -" .use_main_obmalloc = 0,\n" -" .allow_fork = 0,\n" -" .allow_exec = 0,\n" -" .allow_threads = 1,\n" -" .allow_daemon_threads = 0,\n" -" .check_multi_interp_extensions = 1,\n" -" .gil = PyInterpreterConfig_OWN_GIL,\n" -"};\n" -"PyThreadState *tstate = NULL;\n" -"PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);\n" -"if (PyStatus_Exception(status)) {\n" -" Py_ExitStatusException(status);\n" -"}" -msgstr "" - -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`." -msgstr "" - -msgid "Extension modules are shared between (sub-)interpreters as follows:" -msgstr "" - -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 "" - -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 "" - -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." -msgstr "" - -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." -msgstr "" - -msgid "" -"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 "" - -msgid "" -":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been " -"explicitly destroyed at that point." -msgstr "" - -msgid "A Per-Interpreter GIL" -msgstr "" - -msgid "" -"Using :c:func:`Py_NewInterpreterFromConfig` you can create a sub-interpreter " -"that is completely isolated from other interpreters, including having its " -"own GIL. The most important benefit of this isolation is that such an " -"interpreter can execute Python code without being blocked by other " -"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` and :pep:`684`.)" -msgstr "" - -msgid "" -"Using an isolated interpreter requires vigilance in preserving that " -"isolation. That especially means not sharing any objects or mutable state " -"without guarantees about thread-safety. Even objects that are otherwise " -"immutable (e.g. ``None``, ``(1, 5)``) can't normally be shared because of " -"the refcount. One simple but less-efficient approach around this is to use " -"a global lock around all use of some state (or object). Alternately, " -"effectively immutable objects (like integers or strings) can be made safe in " -"spite of their refcounts by making them :term:`immortal`. In fact, this has " -"been done for the builtin singletons, small integers, and a number of other " -"builtin objects." -msgstr "" - -msgid "" -"If you preserve isolation then you will have access to proper multi-core " -"computing without the complications that come with free-threading. Failure " -"to preserve isolation will expose you to the full consequences of free-" -"threading, including races and hard-to-debug crashes." -msgstr "" - -msgid "" -"Aside from that, one of the main challenges of using multiple isolated " -"interpreters is how to communicate between them safely (not break isolation) " -"and efficiently. The runtime and stdlib do not provide any standard " -"approach to this yet. A future stdlib module would help mitigate the effort " -"of preserving isolation and expose effective tools for communicating (and " -"sharing) data between interpreters." -msgstr "" - -msgid "Bugs and caveats" -msgstr "" - -msgid "" -"Because sub-interpreters (and the main interpreter) are part of the same " -"process, the insulation between them isn't perfect --- for example, using " -"low-level file operations like :func:`os.close` they can (accidentally or " -"maliciously) affect each other's open files. Because of the way extensions " -"are shared between (sub-)interpreters, some extensions may not work " -"properly; this is especially likely when using single-phase initialization " -"or (static) global variables. It is possible to insert objects created in " -"one sub-interpreter into a namespace of another (sub-)interpreter; this " -"should be avoided if possible." -msgstr "" - -msgid "" -"Special care should be taken to avoid sharing user-defined functions, " -"methods, instances or classes between sub-interpreters, since import " -"operations executed by such objects may affect the wrong (sub-)interpreter's " -"dictionary of loaded modules. It is equally important to avoid sharing " -"objects from which the above are reachable." -msgstr "" - -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." -msgstr "" - -msgid "Asynchronous Notifications" -msgstr "" - -msgid "" -"A mechanism is provided to make asynchronous notifications to the main " -"interpreter thread. These notifications take the form of a function pointer " -"and a void pointer argument." -msgstr "" - -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 " -"thread. On failure, ``-1`` is returned without setting any exception." -msgstr "" - -msgid "" -"When successfully queued, *func* will be *eventually* called from the main " -"interpreter thread with the argument *arg*. It will be called " -"asynchronously with respect to normally running Python code, but with both " -"these conditions met:" -msgstr "" - -msgid "on a :term:`bytecode` boundary;" -msgstr "" - -msgid "" -"with the main thread holding an :term:`attached thread state` (*func* can " -"therefore use the full C API)." -msgstr "" - -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 :term:`thread state ` is detached." -msgstr "" - -msgid "" -"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 "" - -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`." -msgstr "" - -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 " -"from the main interpreter. Each subinterpreter now has its own list of " -"scheduled calls." -msgstr "" - -msgid "" -"This function now always schedules *func* to be run in the main interpreter." -msgstr "" - -msgid "Profiling and Tracing" -msgstr "" - -msgid "" -"The Python interpreter provides some low-level support for attaching " -"profiling and execution tracing facilities. These are used for profiling, " -"debugging, and coverage analysis tools." -msgstr "" - -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 " -"call instead. The essential attributes of the facility have not changed; " -"the interface allows trace functions to be installed per-thread, and the " -"basic events reported to the trace function are the same as had been " -"reported to the Python-level trace functions in previous versions." -msgstr "" - -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 "" - -msgid "Value of *what*" -msgstr "" - -msgid "Meaning of *arg*" -msgstr "" - -msgid ":c:data:`PyTrace_CALL`" -msgstr "" - -msgid "Always :c:data:`Py_None`." -msgstr "" - -msgid ":c:data:`PyTrace_EXCEPTION`" -msgstr "" - -msgid "Exception information as returned by :func:`sys.exc_info`." -msgstr "" - -msgid ":c:data:`PyTrace_LINE`" -msgstr "" - -msgid ":c:data:`PyTrace_RETURN`" -msgstr "" - -msgid "" -"Value being returned to the caller, or ``NULL`` if caused by an exception." -msgstr "" - -msgid ":c:data:`PyTrace_C_CALL`" -msgstr "" - -msgid "Function object being called." -msgstr "" - -msgid ":c:data:`PyTrace_C_EXCEPTION`" -msgstr "" - -msgid ":c:data:`PyTrace_C_RETURN`" -msgstr "" - -msgid ":c:data:`PyTrace_OPCODE`" -msgstr "" - -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 " -"generator. Note that the creation of the iterator for a generator function " -"is not reported as there is no control transfer to the Python bytecode in " -"the corresponding frame." -msgstr "" - -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 " -"value for *what* when after any bytecode is processed after which the " -"exception becomes set within the frame being executed. The effect of this " -"is that as exception propagation causes the Python stack to unwind, the " -"callback is called upon return to each frame as the exception propagates. " -"Only trace functions receives these events; they are not needed by the " -"profiler." -msgstr "" - -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." -msgstr "" - -msgid "" -"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " -"a call is about to return." -msgstr "" - -msgid "" -"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " -"a C function is about to be called." -msgstr "" - -msgid "" -"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " -"a C function has raised an exception." -msgstr "" - -msgid "" -"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " -"a C function has returned." -msgstr "" - -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." -msgstr "" - -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`." -msgstr "" - -msgid "See also the :func:`sys.setprofile` function." -msgstr "" - -msgid "" -"Like :c:func:`PyEval_SetProfile` but sets the profile function in all " -"running threads belonging to the current interpreter instead of the setting " -"it only on the current thread." -msgstr "" - -msgid "" -"As :c:func:`PyEval_SetProfile`, this function ignores any exceptions raised " -"while setting the profile functions in all threads." -msgstr "" - -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 "" - -msgid "See also the :func:`sys.settrace` function." -msgstr "" - -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 " -"on the current thread." -msgstr "" - -msgid "" -"As :c:func:`PyEval_SetTrace`, this function ignores any exceptions raised " -"while setting the trace functions in all threads." -msgstr "" - -msgid "Reference tracing" -msgstr "" - -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." -msgstr "" - -msgid "" -"The value for the *event* parameter to :c:type:`PyRefTracer` functions when " -"a Python object has been created." -msgstr "" - -msgid "" -"The value for the *event* parameter to :c:type:`PyRefTracer` functions when " -"a Python object has been destroyed." -msgstr "" - -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 " -"**data** is provided it must be an opaque pointer that will be provided when " -"the tracer function is called. Return ``0`` on success. Set an exception and " -"return ``-1`` on error." -msgstr "" - -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. A :term:`thread state` will be " -"active every time the tracer function is called." -msgstr "" - -msgid "" -"There must be an :term:`attached thread state` when calling this function." -msgstr "" - -msgid "" -"Get the registered reference tracer function and the value of the opaque " -"data pointer that was registered when :c:func:`PyRefTracer_SetTracer` was " -"called. If no tracer was registered this function will return NULL and will " -"set the **data** pointer to NULL." -msgstr "" - -msgid "Advanced Debugger Support" -msgstr "" - -msgid "" -"These functions are only intended to be used by advanced debugging tools." -msgstr "" - -msgid "" -"Return the interpreter state object at the head of the list of all such " -"objects." -msgstr "" - -msgid "Return the main interpreter state object." -msgstr "" - -msgid "" -"Return the next interpreter state object after *interp* from the list of all " -"such objects." -msgstr "" - -msgid "" -"Return the pointer to the first :c:type:`PyThreadState` object in the list " -"of threads associated with the interpreter *interp*." -msgstr "" - -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 "" - -msgid "Thread Local Storage Support" -msgstr "" - -msgid "" -"The Python interpreter provides low-level support for thread-local storage " -"(TLS) which wraps the underlying native TLS implementation to support the " -"Python-level thread local storage API (:class:`threading.local`). The " -"CPython C level APIs are similar to those offered by pthreads and Windows: " -"use a thread key and functions to associate a :c:expr:`void*` value per " -"thread." -msgstr "" - -msgid "" -"A :term:`thread state` does *not* need to be :term:`attached ` when calling these functions; they suppl their own locking." -msgstr "" - -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." -msgstr "" - -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." -msgstr "" - -msgid "Thread Specific Storage (TSS) API" -msgstr "" - -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 "" - -msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" -msgstr "" - -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 " -"internal field representing the key's initialization state. There are no " -"public members in this structure." -msgstr "" - -msgid "" -"When :ref:`Py_LIMITED_API ` is not defined, static allocation of " -"this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed." -msgstr "" - -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 `." -msgstr "" - -msgid "Dynamic Allocation" -msgstr "" - -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 " -"type is not possible due to its implementation being opaque at build time." -msgstr "" - -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." -msgstr "" - -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 " -"have been unassigned. This is a no-op if the *key* argument is ``NULL``." -msgstr "" - -msgid "" -"A freed key becomes a dangling pointer. You should reset the key to ``NULL``." -msgstr "" - -msgid "Methods" -msgstr "" - -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`." -msgstr "" - -msgid "" -"Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized " -"by :c:func:`PyThread_tss_create`." -msgstr "" - -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 " -"initialized by :c:macro:`Py_tss_NEEDS_INIT`. This function can be called " -"repeatedly on the same key -- calling it on an already initialized key is a " -"no-op and immediately returns success." -msgstr "" - -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." -msgstr "" - -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 "" - -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 " -"current thread." -msgstr "" - -msgid "Thread Local Storage (TLS) API" -msgstr "" - -msgid "" -"This API is superseded by :ref:`Thread Specific Storage (TSS) API `." -msgstr "" - -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 " -"platforms, :c:func:`PyThread_create_key` will return immediately with a " -"failure status, and the other TLS functions will all be no-ops on such " -"platforms." -msgstr "" - -msgid "" -"Due to the compatibility problem noted above, this version of the API should " -"not be used in new code." -msgstr "" - -msgid "Synchronization Primitives" -msgstr "" - -msgid "The C-API provides a basic mutual exclusion lock." -msgstr "" - -msgid "" -"A mutual exclusion lock. The :c:type:`!PyMutex` should be initialized to " -"zero to represent the unlocked state. For example::" -msgstr "" - -msgid "PyMutex mutex = {0};" -msgstr "" - -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 " -"remain at a fixed, writable location in memory." -msgstr "" - -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 " -"a deprecation period." -msgstr "" - -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 detach the :term:`thread state ` if one " -"exists." -msgstr "" - -msgid "" -"Unlock mutex *m*. The mutex must be locked --- otherwise, the function will " -"issue a fatal error." -msgstr "" - -msgid "Returns non-zero if the mutex *m* is currently locked, zero otherwise." -msgstr "" - -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 "" - -msgid "Python Critical Section API" -msgstr "" - -msgid "" -"The critical section API provides a deadlock avoidance layer on top of per-" -"object locks for :term:`free-threaded ` CPython. They are " -"intended to replace reliance on the :term:`global interpreter lock`, and are " -"no-ops in versions of Python with the global interpreter lock." -msgstr "" - -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 "" - -msgid "" -"Critical sections avoid deadlocks by implicitly suspending active critical " -"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 "" - -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 "" - -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 " -"expansions. Note that the sizes and contents of the structures may change in " -"future Python versions." -msgstr "" - -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." -msgstr "" - -msgid "Example usage::" -msgstr "" - -msgid "" -"static PyObject *\n" -"set_field(MyObject *self, PyObject *value)\n" -"{\n" -" Py_BEGIN_CRITICAL_SECTION(self);\n" -" Py_SETREF(self->field, Py_XNewRef(value));\n" -" Py_END_CRITICAL_SECTION();\n" -" Py_RETURN_NONE;\n" -"}" -msgstr "" - -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 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`." -msgstr "" - -msgid "" -"Acquires the per-object lock for the object *op* and begins a critical " -"section." -msgstr "" - -msgid "In the free-threaded build, this macro expands to::" -msgstr "" - -msgid "" -"{\n" -" PyCriticalSection _py_cs;\n" -" PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))" -msgstr "" - -msgid "In the default build, this macro expands to ``{``." -msgstr "" - -msgid "Locks the mutex *m* and begins a critical section." -msgstr "" - -msgid "" -"{\n" -" PyCriticalSection _py_cs;\n" -" PyCriticalSection_BeginMutex(&_py_cs, m)" -msgstr "" - -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 "" - -msgid "On the default build, this macro expands to ``{``." -msgstr "" - -msgid "Ends the critical section and releases the per-object lock." -msgstr "" - -msgid "" -" PyCriticalSection_End(&_py_cs);\n" -"}" -msgstr "" - -msgid "In the default build, this macro expands to ``}``." -msgstr "" - -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 " -"address first) to avoid lock ordering deadlocks." -msgstr "" - -msgid "" -"{\n" -" PyCriticalSection2 _py_cs2;\n" -" PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))" -msgstr "" - -msgid "Locks the mutexes *m1* and *m2* and begins a critical section." -msgstr "" - -msgid "" -"{\n" -" PyCriticalSection2 _py_cs2;\n" -" PyCriticalSection2_BeginMutex(&_py_cs2, m1, m2)" -msgstr "" - -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 "" - -msgid "Ends the critical section and releases the per-object locks." -msgstr "" - -msgid "" -" PyCriticalSection2_End(&_py_cs2);\n" -"}" -msgstr "" - -msgid "PyEval_InitThreads()" -msgstr "" - -msgid "modules (in module sys)" -msgstr "" - -msgid "path (in module sys)" -msgstr "" - -msgid "module" -msgstr "" - -msgid "builtins" -msgstr "" - -msgid "__main__" -msgstr "" - -msgid "sys" -msgstr "sys" - -msgid "search" -msgstr "" - -msgid "path" -msgstr "" - -msgid "Py_FinalizeEx (C function)" -msgstr "" - -msgid "Py_Initialize()" -msgstr "" - -msgid "main()" -msgstr "" - -msgid "Py_GetPath()" -msgstr "" - -msgid "executable (in module sys)" -msgstr "" - -msgid "version (in module sys)" -msgstr "" - -msgid "platform (in module sys)" -msgstr "" - -msgid "copyright (in module sys)" -msgstr "" - -msgid "Py_FatalError()" -msgstr "" - -msgid "argv (in module sys)" -msgstr "" - -msgid "global interpreter lock" -msgstr "" - -msgid "interpreter lock" -msgstr "" - -msgid "lock, interpreter" -msgstr "" - -msgid "setswitchinterval (in module sys)" -msgstr "" - -msgid "PyThreadState (C type)" -msgstr "" - -msgid "Py_BEGIN_ALLOW_THREADS (C macro)" -msgstr "" - -msgid "Py_END_ALLOW_THREADS (C macro)" -msgstr "" - -msgid "PyEval_RestoreThread (C function)" -msgstr "" - -msgid "PyEval_SaveThread (C function)" -msgstr "" - -msgid "PyEval_AcquireThread()" -msgstr "" - -msgid "PyEval_ReleaseThread()" -msgstr "" - -msgid "PyEval_SaveThread()" -msgstr "" - -msgid "PyEval_RestoreThread()" -msgstr "" - -msgid "_thread" -msgstr "" - -msgid "stdout (in module sys)" -msgstr "" - -msgid "stderr (in module sys)" -msgstr "" - -msgid "stdin (in module sys)" -msgstr "" - -msgid "Py_Initialize (C function)" -msgstr "" - -msgid "close (in module os)" -msgstr "" +#~ msgid "sys" +#~ msgstr "sys" diff --git a/c-api/init.po~ b/c-api/init.po~ new file mode 100644 index 00000000..002d5289 --- /dev/null +++ b/c-api/init.po~ @@ -0,0 +1,2809 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-29 14:15+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Initialization, Finalization, and Threads" +msgstr "" + +msgid "" +"See :ref:`Python Initialization Configuration ` for details on " +"how to configure the interpreter prior to initialization." +msgstr "" + +msgid "Before Python Initialization" +msgstr "" + +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 "" + +msgid "" +"The following functions can be safely called before Python is initialized:" +msgstr "" + +msgid "Functions that initialize the interpreter:" +msgstr "" + +msgid ":c:func:`Py_Initialize`" +msgstr "" + +msgid ":c:func:`Py_InitializeEx`" +msgstr "" + +msgid ":c:func:`Py_InitializeFromConfig`" +msgstr "" + +msgid ":c:func:`Py_BytesMain`" +msgstr "" + +msgid ":c:func:`Py_Main`" +msgstr "" + +msgid "the runtime pre-initialization functions covered in :ref:`init-config`" +msgstr "" + +msgid "Configuration functions:" +msgstr "" + +msgid ":c:func:`PyImport_AppendInittab`" +msgstr "" + +msgid ":c:func:`PyImport_ExtendInittab`" +msgstr "" + +msgid ":c:func:`!PyInitFrozenExtensions`" +msgstr "" + +msgid ":c:func:`PyMem_SetAllocator`" +msgstr "" + +msgid ":c:func:`PyMem_SetupDebugHooks`" +msgstr "" + +msgid ":c:func:`PyObject_SetArenaAllocator`" +msgstr "" + +msgid ":c:func:`Py_SetProgramName`" +msgstr "" + +msgid ":c:func:`Py_SetPythonHome`" +msgstr "" + +msgid ":c:func:`PySys_ResetWarnOptions`" +msgstr "" + +msgid "the configuration functions covered in :ref:`init-config`" +msgstr "" + +msgid "Informative functions:" +msgstr "" + +msgid ":c:func:`Py_IsInitialized`" +msgstr "" + +msgid ":c:func:`PyMem_GetAllocator`" +msgstr "" + +msgid ":c:func:`PyObject_GetArenaAllocator`" +msgstr "" + +msgid ":c:func:`Py_GetBuildInfo`" +msgstr "" + +msgid ":c:func:`Py_GetCompiler`" +msgstr "" + +msgid ":c:func:`Py_GetCopyright`" +msgstr "" + +msgid ":c:func:`Py_GetPlatform`" +msgstr "" + +msgid ":c:func:`Py_GetVersion`" +msgstr "" + +msgid "Utilities:" +msgstr "" + +msgid ":c:func:`Py_DecodeLocale`" +msgstr "" + +msgid "" +"the status reporting and utility functions covered in :ref:`init-config`" +msgstr "" + +msgid "Memory allocators:" +msgstr "" + +msgid ":c:func:`PyMem_RawMalloc`" +msgstr "" + +msgid ":c:func:`PyMem_RawRealloc`" +msgstr "" + +msgid ":c:func:`PyMem_RawCalloc`" +msgstr "" + +msgid ":c:func:`PyMem_RawFree`" +msgstr "" + +msgid "Synchronization:" +msgstr "" + +msgid ":c:func:`PyMutex_Lock`" +msgstr "" + +msgid ":c:func:`PyMutex_Unlock`" +msgstr "" + +msgid "" +"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 "" + +msgid "Global configuration variables" +msgstr "" + +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 `." +msgstr "" + +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." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"bytes_warning` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +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``." +msgstr "" + +msgid "Set by the :option:`-b` option." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"parser_debug` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +msgid "" +"Turn on parser debugging output (for expert only, depending on compilation " +"options)." +msgstr "" + +msgid "" +"Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment " +"variable." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"write_bytecode` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +msgid "" +"If set to non-zero, Python won't try to write ``.pyc`` files on the import " +"of source modules." +msgstr "" + +msgid "" +"Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE` " +"environment variable." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"pathconfig_warnings` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +msgid "" +"Suppress error messages when calculating the module search path in :c:func:" +"`Py_GetPath`." +msgstr "" + +msgid "Private flag used by ``_freeze_module`` and ``frozenmain`` programs." +msgstr "" + +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, " +"see :ref:`Python Initialization Configuration `." +msgstr "" + +msgid "" +"Set to ``1`` if the :envvar:`PYTHONHASHSEED` environment variable is set to " +"a non-empty string." +msgstr "" + +msgid "" +"If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment " +"variable to initialize the secret hash seed." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"use_environment` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +msgid "" +"Ignore all :envvar:`!PYTHON*` environment variables, e.g. :envvar:" +"`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." +msgstr "" + +msgid "Set by the :option:`-E` and :option:`-I` options." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"inspect` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +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 " +"when :data:`sys.stdin` does not appear to be a terminal." +msgstr "" + +msgid "" +"Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment " +"variable." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"interactive` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +msgid "Set by the :option:`-i` option." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"isolated` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +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." +msgstr "" + +msgid "Set by the :option:`-I` option." +msgstr "" + +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 `." +msgstr "" + +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, " +"for the :term:`filesystem encoding and error handler`." +msgstr "" + +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " +"variable is set to a non-empty string." +msgstr "" + +msgid "See :pep:`529` for more details." +msgstr "" + +msgid "Availability" +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"legacy_windows_stdio` should be used instead, see :ref:`Python " +"Initialization Configuration `." +msgstr "" + +msgid "" +"If the flag is non-zero, use :class:`io.FileIO` instead of :class:`!io." +"_WindowsConsoleIO` for :mod:`sys` standard streams." +msgstr "" + +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " +"is set to a non-empty string." +msgstr "" + +msgid "See :pep:`528` for more details." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"site_import` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +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)." +msgstr "" + +msgid "Set by the :option:`-S` option." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"user_site_directory` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +msgid "" +"Don't add the :data:`user site-packages directory ` to :data:" +"`sys.path`." +msgstr "" + +msgid "" +"Set by the :option:`-s` and :option:`-I` options, and the :envvar:" +"`PYTHONNOUSERSITE` environment variable." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"optimization_level` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +msgid "" +"Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment " +"variable." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"quiet` should be used instead, see :ref:`Python Initialization Configuration " +"`." +msgstr "" + +msgid "" +"Don't display the copyright and version messages even in interactive mode." +msgstr "" + +msgid "Set by the :option:`-q` option." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"buffered_stdio` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +msgid "Force the stdout and stderr streams to be unbuffered." +msgstr "" + +msgid "" +"Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` " +"environment variable." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"verbose` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +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 " +"to ``2``, print a message for each file that is checked for when searching " +"for a module. Also provides information on module cleanup at exit." +msgstr "" + +msgid "" +"Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment " +"variable." +msgstr "" + +msgid "Initializing and finalizing the interpreter" +msgstr "" + +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." +msgstr "" + +msgid "" +"This initializes the table of loaded modules (``sys.modules``), and creates " +"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 :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 "" + +msgid "" +"Use :c:func:`Py_InitializeFromConfig` to customize the :ref:`Python " +"Initialization Configuration `." +msgstr "" + +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." +msgstr "" + +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 may be useful when CPython is embedded as part of a larger " +"application." +msgstr "" + +msgid "" +"Initialize Python from *config* configuration, as described in :ref:`init-" +"from-config`." +msgstr "" + +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 "" + +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 "" + +msgid "" +"Return true (non-zero) if the main Python interpreter is :term:`shutting " +"down `. Return false (zero) otherwise." +msgstr "" + +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`. This is a no-op when called for a " +"second time (without calling :c:func:`Py_Initialize` again first)." +msgstr "" + +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." +msgstr "" + +msgid "" +"Normally the return value is ``0``. If there were errors during finalization " +"(flushing buffered data), ``-1`` is returned." +msgstr "" + +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 "" + +msgid "" +"This function is provided for a number of reasons. An embedding application " +"might want to restart Python without having to restart the application " +"itself. An application that has loaded the Python interpreter from a " +"dynamically loadable library (or DLL) might want to free all memory " +"allocated by Python before unloading the DLL. During a hunt for memory leaks " +"in an application a developer might want to free all memory allocated by " +"Python before exiting from the application." +msgstr "" + +msgid "" +"**Bugs and caveats:** The destruction of modules and objects in modules is " +"done in random order; this may cause destructors (:meth:`~object.__del__` " +"methods) to fail when they depend on other objects (even functions) or " +"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. 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. :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 "" + +msgid "" +"Raises an :ref:`auditing event ` ``cpython." +"_PySys_ClearAuditHooks`` with no arguments." +msgstr "" + +msgid "" +"This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that " +"disregards the return value." +msgstr "" + +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 "" + +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 "" + +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 "" + +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 "" + +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 "" + +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 "" + +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 "" + +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 "" + +msgid "Executes the main module in a fully configured CPython runtime." +msgstr "" + +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 "" + +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 "" + +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 "" + +msgid "" +"This function always finalizes the Python interpreter before it returns." +msgstr "" + +msgid "" +"See :ref:`Python Configuration ` for an example of a " +"customized Python that always runs in isolated mode using :c:func:" +"`Py_RunMain`." +msgstr "" + +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 "" + +msgid "There must be an :term:`attached thread state` for *interp*." +msgstr "" + +msgid "Process-wide parameters" +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"program_name` should be used instead, see :ref:`Python Initialization " +"Configuration `." +msgstr "" + +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 " +"of the ``argv[0]`` argument to the :c:func:`main` function of the program " +"(converted to wide characters). This is used by :c:func:`Py_GetPath` and " +"some other functions below to find the Python run-time libraries relative to " +"the interpreter executable. The default value is ``'python'``. The " +"argument should point to a zero-terminated wide character string in static " +"storage whose contents will not change for the duration of the program's " +"execution. No code in the Python interpreter will change the contents of " +"this storage." +msgstr "" + +msgid "" +"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:" +"`wchar_t*` string." +msgstr "" + +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 "" + +msgid "" +"This function should not be called before :c:func:`Py_Initialize`, otherwise " +"it returns ``NULL``." +msgstr "" + +msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." +msgstr "" + +msgid "" +"Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys." +"executable`) instead." +msgstr "" + +msgid "" +"Return the *prefix* for installed platform-independent 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 prefix is " +"``'/usr/local'``. The returned string points into static storage; the caller " +"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.base_prefix``. It is only useful on Unix. " +"See also the next function." +msgstr "" + +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 "" + +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.base_exec_prefix``. It is only " +"useful on Unix." +msgstr "" + +msgid "" +"Background: The exec-prefix differs from the prefix when platform dependent " +"files (such as executables and shared libraries) are installed in a " +"different directory tree. In a typical installation, platform dependent " +"files may be installed in the :file:`/usr/local/plat` subtree while platform " +"independent may be installed in :file:`/usr/local`." +msgstr "" + +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 " +"considered the same platform, but Intel machines running Solaris 2.x are " +"another platform, and Intel machines running Linux are yet another " +"platform. Different major revisions of the same operating system generally " +"also form different platforms. Non-Unix operating systems are a different " +"story; the installation strategies on those systems are so different that " +"the prefix and exec-prefix are meaningless, and set to the empty string. " +"Note that compiled Python bytecode files are platform independent (but not " +"independent from the Python version by which they were compiled!)." +msgstr "" + +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." +msgstr "" + +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 "" + +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 " +"name (set by :c:member:`PyConfig.program_name`). The returned string points " +"into static storage; the caller should not modify its value. The value is " +"available to Python code as ``sys.executable``." +msgstr "" + +msgid "" +"Return the default module search path; this is computed from the program " +"name (set by :c:member:`PyConfig.program_name`) and some environment " +"variables. The returned string consists of a series of directory names " +"separated by a platform dependent delimiter character. The delimiter " +"character is ``':'`` on Unix and macOS, ``';'`` on Windows. The returned " +"string points into static storage; the caller should not modify its value. " +"The list :data:`sys.path` is initialized with this value on interpreter " +"startup; it can be (and usually is) modified later to change the search path " +"for loading modules." +msgstr "" + +msgid "" +"Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:" +"`sys.path`) instead." +msgstr "" + +msgid "" +"Return the version of this Python interpreter. This is a string that looks " +"something like ::" +msgstr "" + +msgid "\"3.0a5+ (py3k:63103M, May 12 2008, 00:53:55) \\n[GCC 4.2.3]\"" +msgstr "" + +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`." +msgstr "" + +msgid "See also the :c:var:`Py_Version` constant." +msgstr "" + +msgid "" +"Return the platform identifier for the current platform. On Unix, this is " +"formed from the \"official\" name of the operating system, converted to " +"lower case, followed by the major revision number; e.g., for Solaris 2.x, " +"which is also known as SunOS 5.x, the value is ``'sunos5'``. On macOS, it " +"is ``'darwin'``. On Windows, it is ``'win'``. The returned string points " +"into static storage; the caller should not modify its value. The value is " +"available to Python code as ``sys.platform``." +msgstr "" + +msgid "" +"Return the official copyright string for the current Python version, for " +"example" +msgstr "" + +msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``" +msgstr "" + +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``." +msgstr "" + +msgid "" +"Return an indication of the compiler used to build the current Python " +"version, in square brackets, for example::" +msgstr "" + +msgid "\"[GCC 2.7.2.2]\"" +msgstr "" + +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 " +"``sys.version``." +msgstr "" + +msgid "" +"Return information about the sequence number and build date and time of the " +"current Python interpreter instance, for example ::" +msgstr "" + +msgid "\"#67, Aug 1 1997, 22:34:28\"" +msgstr "" + +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 `." +msgstr "" + +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 " +"difference that the first entry should refer to the script file to be " +"executed rather than the executable hosting the Python interpreter. If " +"there isn't a script that will be run, the first entry in *argv* can be an " +"empty string. If this function fails to initialize :data:`sys.argv`, a " +"fatal condition is signalled using :c:func:`Py_FatalError`." +msgstr "" + +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 " +"following algorithm:" +msgstr "" + +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`." +msgstr "" + +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 "" + +msgid "" +"See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` " +"members of the :ref:`Python Initialization Configuration `." +msgstr "" + +msgid "" +"It is recommended that applications embedding the Python interpreter for " +"purposes other than executing a single script pass ``0`` as *updatepath*, " +"and update :data:`sys.path` themselves if desired. See :cve:`2008-5983`." +msgstr "" + +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::" +msgstr "" + +msgid "PyRun_SimpleString(\"import sys; sys.path.pop(0)\\n\");" +msgstr "" + +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 `." +msgstr "" + +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`." +msgstr "" + +msgid "The *updatepath* value depends on :option:`-I`." +msgstr "" + +msgid "" +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"home` should be used instead, see :ref:`Python Initialization Configuration " +"`." +msgstr "" + +msgid "" +"Set the default \"home\" directory, that is, the location of the standard " +"Python libraries. See :envvar:`PYTHONHOME` for the meaning of the argument " +"string." +msgstr "" + +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 " +"execution. No code in the Python interpreter will change the contents of " +"this storage." +msgstr "" + +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." +msgstr "" + +msgid "" +"Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:" +"`PYTHONHOME` environment variable instead." +msgstr "" + +msgid "Thread State and the Global Interpreter Lock" +msgstr "" + +msgid "" +"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 " +"simplest operations could cause problems in a multi-threaded program: for " +"example, when two threads simultaneously increment the reference count of " +"the same object, the reference count could end up being incremented only " +"once instead of twice." +msgstr "" + +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." +msgstr "" + +msgid "" +"The Python interpreter keeps some thread-specific bookkeeping information " +"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 "" + +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 "" + +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 "" + +msgid "Detaching the thread state from extension code" +msgstr "" + +msgid "" +"Most extension code manipulating the :term:`thread state` has the following " +"simple structure::" +msgstr "" + +msgid "" +"Save the thread state in a local variable.\n" +"... Do some blocking I/O operation ...\n" +"Restore the thread state from the local variable." +msgstr "" + +msgid "This is so common that a pair of macros exists to simplify it::" +msgstr "" + +msgid "" +"Py_BEGIN_ALLOW_THREADS\n" +"... Do some blocking I/O operation ...\n" +"Py_END_ALLOW_THREADS" +msgstr "" + +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 " +"block." +msgstr "" + +msgid "The block above expands to the following code::" +msgstr "" + +msgid "" +"PyThreadState *_save;\n" +"\n" +"_save = PyEval_SaveThread();\n" +"... Do some blocking I/O operation ...\n" +"PyEval_RestoreThread(_save);" +msgstr "" + +msgid "Here is how these functions work:" +msgstr "" + +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 "" + +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 "" + +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 "" + +msgid "Non-Python created threads" +msgstr "" + +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 :term:`GIL`, because they don't have an :" +"term:`attached thread state`." +msgstr "" + +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 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 "" + +msgid "" +"The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions " +"do all of the above automatically. The typical idiom for calling into " +"Python from a C thread is::" +msgstr "" + +msgid "" +"PyGILState_STATE gstate;\n" +"gstate = PyGILState_Ensure();\n" +"\n" +"/* Perform Python actions here. */\n" +"result = CallSomeFunction();\n" +"/* evaluate result or handle exception */\n" +"\n" +"/* Release the thread. No Python API allowed beyond this point. */\n" +"PyGILState_Release(gstate);" +msgstr "" + +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. 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 "" + +msgid "Supporting subinterpreters in non-Python threads" +msgstr "" + +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 "" + +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 "" + +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 "" + +msgid "Cautions about fork()" +msgstr "" + +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 " +"process forks only the thread that issued the fork will exist. This has a " +"concrete impact both on how locks must be handled and on all stored state in " +"CPython's runtime." +msgstr "" + +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` " +"by acquiring the locks it uses internally before the fork, and releasing " +"them afterwards. In addition, it resets any :ref:`lock-objects` in the " +"child. When extending or embedding Python, there is no way to inform Python " +"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." +msgstr "" + +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 " +"means finalizing all other :c:type:`PyThreadState` objects belonging to the " +"current interpreter and all other :c:type:`PyInterpreterState` objects. Due " +"to this and the special nature of the :ref:`\"main\" interpreter `, :c:func:`fork` should only be called in that " +"interpreter's \"main\" thread, where the CPython global runtime was " +"originally initialized. The only exception is if :c:func:`exec` will be " +"called immediately after." +msgstr "" + +msgid "Cautions regarding runtime finalization" +msgstr "" + +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 "" + +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 "" + +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 "" + +msgid "High-level API" +msgstr "" + +msgid "" +"These are the most commonly used types and functions when writing C " +"extension code, or when embedding the Python interpreter:" +msgstr "" + +msgid "" +"This data structure represents the state shared by a number of cooperating " +"threads. Threads belonging to the same interpreter share their module " +"administration and a few other internal items. There are no public members " +"in this structure." +msgstr "" + +msgid "" +"Threads belonging to different interpreters initially share nothing, except " +"process state like available memory, open file descriptors and such. The " +"global interpreter lock is also shared by all threads, regardless of to " +"which interpreter they belong." +msgstr "" + +msgid "" +":pep:`684` introduced the possibility of a :ref:`per-interpreter GIL `. See :c:func:`Py_NewInterpreterFromConfig`." +msgstr "" + +msgid "" +"This data structure represents the state of a single thread. The only " +"public data member is:" +msgstr "" + +msgid "This thread's interpreter state." +msgstr "" + +msgid "Deprecated function which does nothing." +msgstr "" + +msgid "" +"In Python 3.6 and older, this function created the GIL if it didn't exist." +msgstr "" + +msgid "The function now does nothing." +msgstr "" + +msgid "" +"This function is now called by :c:func:`Py_Initialize()`, so you don't have " +"to call it yourself anymore." +msgstr "" + +msgid "" +"This function cannot be called before :c:func:`Py_Initialize()` anymore." +msgstr "" + +msgid "" +"Detach the :term:`attached thread state` and return it. The thread will have " +"no :term:`thread state` upon returning." +msgstr "" + +msgid "" +"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 "" + +msgid "" +"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 "" + +msgid "" +"Hangs the current thread, rather than terminating it, if called while the " +"interpreter is finalizing." +msgstr "" + +msgid "" +"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 "" + +msgid "See also :c:func:`PyThreadState_GetUnchecked`." +msgstr "" + +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 " +"is NULL." +msgstr "" + +msgid "" +"In Python 3.5 to 3.12, the function was private and known as " +"``_PyThreadState_UncheckedGet()``." +msgstr "" + +msgid "" +"Set the :term:`attached thread state` to *tstate*, and return the :term:" +"`thread state` that was attached prior to calling." +msgstr "" + +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 "" + +msgid ":c:func:`PyEval_ReleaseThread`" +msgstr "" + +msgid "" +"Similar to :c:func:`PyGILState_Ensure`, this function will hang the thread " +"if the runtime is finalizing." +msgstr "" + +msgid "" +"The following functions use thread-local storage, and are not compatible " +"with sub-interpreters:" +msgstr "" + +msgid "" +"The type of the value returned by :c:func:`PyGILState_Ensure` and passed to :" +"c:func:`PyGILState_Release`." +msgstr "" + +msgid "The GIL was already held when :c:func:`PyGILState_Ensure` was called." +msgstr "" + +msgid "The GIL was not held when :c:func:`PyGILState_Ensure` was called." +msgstr "" + +msgid "" +"Ensure that the current thread is ready to call the Python C API regardless " +"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 "" + +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 "" + +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 "" + +msgid "" +"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 "" + +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)." +msgstr "" + +msgid "" +"Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:" +"func:`PyGILState_Release` on the same thread." +msgstr "" + +msgid "" +"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 "" + +msgid "" +"This function may return non-``NULL`` even when the :term:`thread state` is " +"detached. Prefer :c:func:`PyThreadState_Get` or :c:func:" +"`PyThreadState_GetUnchecked` for most cases." +msgstr "" + +msgid ":c:func:`PyThreadState_Get`" +msgstr "" + +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 "" + +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 "" + +msgid "" +"The following macros are normally used without a trailing semicolon; look " +"for example usage in the Python source distribution." +msgstr "" + +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." +msgstr "" + +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." +msgstr "" + +msgid "" +"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :" +"c:macro:`Py_END_ALLOW_THREADS` without the closing brace." +msgstr "" + +msgid "" +"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 "" + +msgid "Low-level API" +msgstr "" + +msgid "" +"All of the following functions must be called after :c:func:`Py_Initialize`." +msgstr "" + +msgid "" +":c:func:`Py_Initialize()` now initializes the :term:`GIL` and sets an :term:" +"`attached thread state`." +msgstr "" + +msgid "" +"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 "" + +msgid "" +"Raises an :ref:`auditing event ` ``cpython." +"PyInterpreterState_New`` with no arguments." +msgstr "" + +msgid "" +"Reset all information in an interpreter state object. There must be an :" +"term:`attached thread state` for the interpreter." +msgstr "" + +msgid "" +"Raises an :ref:`auditing event ` ``cpython." +"PyInterpreterState_Clear`` with no arguments." +msgstr "" + +msgid "" +"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 "" + +msgid "" +"Create a new thread state object belonging to the given interpreter object. " +"An :term:`attached thread state` is not needed." +msgstr "" + +msgid "" +"Reset all information in a :term:`thread state` object. *tstate* must be :" +"term:`attached `" +msgstr "" + +msgid "" +"This function now calls the :c:member:`!PyThreadState.on_delete` callback. " +"Previously, that happened in :c:func:`PyThreadState_Delete`." +msgstr "" + +msgid "The :c:member:`!PyThreadState.on_delete` callback was removed." +msgstr "" + +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 "" + +msgid "" +"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 "" + +msgid "" +"No :term:`thread state` will be :term:`attached ` " +"upon returning." +msgstr "" + +msgid "Get the current frame of the Python thread state *tstate*." +msgstr "" + +msgid "" +"Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " +"executing." +msgstr "" + +msgid "See also :c:func:`PyEval_GetFrame`." +msgstr "" + +msgid "" +"*tstate* must not be ``NULL``, and must be :term:`attached `." +msgstr "" + +msgid "" +"Get the unique :term:`thread state` identifier of the Python thread state " +"*tstate*." +msgstr "" + +msgid "Get the interpreter of the Python thread state *tstate*." +msgstr "" + +msgid "Suspend tracing and profiling in the Python thread state *tstate*." +msgstr "" + +msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." +msgstr "" + +msgid "" +"Resume tracing and profiling in the Python thread state *tstate* suspended " +"by the :c:func:`PyThreadState_EnterTracing` function." +msgstr "" + +msgid "" +"See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." +msgstr "" + +msgid "Get the current interpreter." +msgstr "" + +msgid "" +"Issue a fatal error if there no :term:`attached thread state`. It cannot " +"return NULL." +msgstr "" + +msgid "" +"Return the interpreter's unique ID. If there was any error in doing so then " +"``-1`` is returned and an error is set." +msgstr "" + +msgid "The caller must have an :term:`attached thread state`." +msgstr "" + +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 " +"caller should assume no interpreter-specific dict is available." +msgstr "" + +msgid "" +"This is not a replacement for :c:func:`PyModule_GetState()`, which " +"extensions should use to store interpreter-specific state information." +msgstr "" + +msgid "" +"The returned dictionary is borrowed from the interpreter and is valid until " +"interpreter shutdown." +msgstr "" + +msgid "Type of a frame evaluation function." +msgstr "" + +msgid "" +"The *throwflag* parameter is used by the ``throw()`` method of generators: " +"if non-zero, handle the current exception." +msgstr "" + +msgid "The function now takes a *tstate* parameter." +msgstr "" + +msgid "" +"The *frame* parameter changed from ``PyFrameObject*`` to " +"``_PyInterpreterFrame*``." +msgstr "" + +msgid "Get the frame evaluation function." +msgstr "" + +msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"." +msgstr "" + +msgid "Set the frame evaluation function." +msgstr "" + +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 :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 "" + +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 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 "" + +msgid "" +"The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" +"`unsigned long`." +msgstr "" + +msgid "" +":term:`Attach ` *tstate* to the current thread, which " +"must not be ``NULL`` or already :term:`attached `." +msgstr "" + +msgid "" +"The calling thread must not already have an :term:`attached thread state`." +msgstr "" + +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 "" + +msgid "" +":c:func:`PyEval_RestoreThread` is a higher-level function which is always " +"available (even when threads have not been initialized)." +msgstr "" + +msgid "" +"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 "" + +msgid "" +":c:func:`PyEval_SaveThread` is a higher-level function which is always " +"available (even when threads have not been initialized)." +msgstr "" + +msgid "Sub-interpreter support" +msgstr "" + +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 " +"same process and perhaps even in the same thread. Sub-interpreters allow you " +"to do that." +msgstr "" + +msgid "" +"The \"main\" interpreter is the first one created when the runtime " +"initializes. It is usually the only Python interpreter in a process. Unlike " +"sub-interpreters, the main interpreter has unique process-global " +"responsibilities like signal handling. It is also responsible for execution " +"during runtime initialization and is usually the active interpreter during " +"runtime finalization. The :c:func:`PyInterpreterState_Main` function " +"returns a pointer to its state." +msgstr "" + +msgid "" +"You can switch between sub-interpreters using the :c:func:" +"`PyThreadState_Swap` function. You can create and destroy them using the " +"following functions:" +msgstr "" + +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 "" + +msgid "Structure fields:" +msgstr "" + +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." +msgstr "" + +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`." +msgstr "" + +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 " +"unrestricted." +msgstr "" + +msgid "" +"Note that the :mod:`subprocess` module still works when fork is disallowed." +msgstr "" + +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-" +"interpreter is currently active. Otherwise exec is unrestricted." +msgstr "" + +msgid "" +"Note that the :mod:`subprocess` module still works when exec is disallowed." +msgstr "" + +msgid "" +"If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " +"create threads. Otherwise threads are allowed." +msgstr "" + +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)." +msgstr "" + +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`.)" +msgstr "" + +msgid "" +"This must be ``1`` (non-zero) if :c:member:`~PyInterpreterConfig." +"use_main_obmalloc` is ``0``." +msgstr "" + +msgid "" +"This determines the operation of the GIL for the sub-interpreter. It may be " +"one of the following:" +msgstr "" + +msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)." +msgstr "" + +msgid "Use (share) the main interpreter's GIL." +msgstr "" + +msgid "Use the sub-interpreter's own GIL." +msgstr "" + +msgid "" +"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` then :c:member:" +"`PyInterpreterConfig.use_main_obmalloc` must be ``0``." +msgstr "" + +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)." +msgstr "" + +msgid "" +"The given *config* controls the options with which the interpreter is " +"initialized." +msgstr "" + +msgid "" +"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 "" + +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 "" + +msgid "" +"Sub-interpreters are most effective when isolated from each other, with " +"certain functionality restricted::" +msgstr "" + +msgid "" +"PyInterpreterConfig config = {\n" +" .use_main_obmalloc = 0,\n" +" .allow_fork = 0,\n" +" .allow_exec = 0,\n" +" .allow_threads = 1,\n" +" .allow_daemon_threads = 0,\n" +" .check_multi_interp_extensions = 1,\n" +" .gil = PyInterpreterConfig_OWN_GIL,\n" +"};\n" +"PyThreadState *tstate = NULL;\n" +"PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);\n" +"if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +"}" +msgstr "" + +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`." +msgstr "" + +msgid "Extension modules are shared between (sub-)interpreters as follows:" +msgstr "" + +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 "" + +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 "" + +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." +msgstr "" + +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." +msgstr "" + +msgid "" +"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 "" + +msgid "" +":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been " +"explicitly destroyed at that point." +msgstr "" + +msgid "A Per-Interpreter GIL" +msgstr "" + +msgid "" +"Using :c:func:`Py_NewInterpreterFromConfig` you can create a sub-interpreter " +"that is completely isolated from other interpreters, including having its " +"own GIL. The most important benefit of this isolation is that such an " +"interpreter can execute Python code without being blocked by other " +"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` and :pep:`684`.)" +msgstr "" + +msgid "" +"Using an isolated interpreter requires vigilance in preserving that " +"isolation. That especially means not sharing any objects or mutable state " +"without guarantees about thread-safety. Even objects that are otherwise " +"immutable (e.g. ``None``, ``(1, 5)``) can't normally be shared because of " +"the refcount. One simple but less-efficient approach around this is to use " +"a global lock around all use of some state (or object). Alternately, " +"effectively immutable objects (like integers or strings) can be made safe in " +"spite of their refcounts by making them :term:`immortal`. In fact, this has " +"been done for the builtin singletons, small integers, and a number of other " +"builtin objects." +msgstr "" + +msgid "" +"If you preserve isolation then you will have access to proper multi-core " +"computing without the complications that come with free-threading. Failure " +"to preserve isolation will expose you to the full consequences of free-" +"threading, including races and hard-to-debug crashes." +msgstr "" + +msgid "" +"Aside from that, one of the main challenges of using multiple isolated " +"interpreters is how to communicate between them safely (not break isolation) " +"and efficiently. The runtime and stdlib do not provide any standard " +"approach to this yet. A future stdlib module would help mitigate the effort " +"of preserving isolation and expose effective tools for communicating (and " +"sharing) data between interpreters." +msgstr "" + +msgid "Bugs and caveats" +msgstr "" + +msgid "" +"Because sub-interpreters (and the main interpreter) are part of the same " +"process, the insulation between them isn't perfect --- for example, using " +"low-level file operations like :func:`os.close` they can (accidentally or " +"maliciously) affect each other's open files. Because of the way extensions " +"are shared between (sub-)interpreters, some extensions may not work " +"properly; this is especially likely when using single-phase initialization " +"or (static) global variables. It is possible to insert objects created in " +"one sub-interpreter into a namespace of another (sub-)interpreter; this " +"should be avoided if possible." +msgstr "" + +msgid "" +"Special care should be taken to avoid sharing user-defined functions, " +"methods, instances or classes between sub-interpreters, since import " +"operations executed by such objects may affect the wrong (sub-)interpreter's " +"dictionary of loaded modules. It is equally important to avoid sharing " +"objects from which the above are reachable." +msgstr "" + +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." +msgstr "" + +msgid "Asynchronous Notifications" +msgstr "" + +msgid "" +"A mechanism is provided to make asynchronous notifications to the main " +"interpreter thread. These notifications take the form of a function pointer " +"and a void pointer argument." +msgstr "" + +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 " +"thread. On failure, ``-1`` is returned without setting any exception." +msgstr "" + +msgid "" +"When successfully queued, *func* will be *eventually* called from the main " +"interpreter thread with the argument *arg*. It will be called " +"asynchronously with respect to normally running Python code, but with both " +"these conditions met:" +msgstr "" + +msgid "on a :term:`bytecode` boundary;" +msgstr "" + +msgid "" +"with the main thread holding an :term:`attached thread state` (*func* can " +"therefore use the full C API)." +msgstr "" + +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 :term:`thread state ` is detached." +msgstr "" + +msgid "" +"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 "" + +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`." +msgstr "" + +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 " +"from the main interpreter. Each subinterpreter now has its own list of " +"scheduled calls." +msgstr "" + +msgid "" +"This function now always schedules *func* to be run in the main interpreter." +msgstr "" + +msgid "Profiling and Tracing" +msgstr "" + +msgid "" +"The Python interpreter provides some low-level support for attaching " +"profiling and execution tracing facilities. These are used for profiling, " +"debugging, and coverage analysis tools." +msgstr "" + +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 " +"call instead. The essential attributes of the facility have not changed; " +"the interface allows trace functions to be installed per-thread, and the " +"basic events reported to the trace function are the same as had been " +"reported to the Python-level trace functions in previous versions." +msgstr "" + +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 "" + +msgid "Value of *what*" +msgstr "" + +msgid "Meaning of *arg*" +msgstr "" + +msgid ":c:data:`PyTrace_CALL`" +msgstr "" + +msgid "Always :c:data:`Py_None`." +msgstr "" + +msgid ":c:data:`PyTrace_EXCEPTION`" +msgstr "" + +msgid "Exception information as returned by :func:`sys.exc_info`." +msgstr "" + +msgid ":c:data:`PyTrace_LINE`" +msgstr "" + +msgid ":c:data:`PyTrace_RETURN`" +msgstr "" + +msgid "" +"Value being returned to the caller, or ``NULL`` if caused by an exception." +msgstr "" + +msgid ":c:data:`PyTrace_C_CALL`" +msgstr "" + +msgid "Function object being called." +msgstr "" + +msgid ":c:data:`PyTrace_C_EXCEPTION`" +msgstr "" + +msgid ":c:data:`PyTrace_C_RETURN`" +msgstr "" + +msgid ":c:data:`PyTrace_OPCODE`" +msgstr "" + +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 " +"generator. Note that the creation of the iterator for a generator function " +"is not reported as there is no control transfer to the Python bytecode in " +"the corresponding frame." +msgstr "" + +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 " +"value for *what* when after any bytecode is processed after which the " +"exception becomes set within the frame being executed. The effect of this " +"is that as exception propagation causes the Python stack to unwind, the " +"callback is called upon return to each frame as the exception propagates. " +"Only trace functions receives these events; they are not needed by the " +"profiler." +msgstr "" + +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." +msgstr "" + +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a call is about to return." +msgstr "" + +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function is about to be called." +msgstr "" + +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function has raised an exception." +msgstr "" + +msgid "" +"The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " +"a C function has returned." +msgstr "" + +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." +msgstr "" + +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`." +msgstr "" + +msgid "See also the :func:`sys.setprofile` function." +msgstr "" + +msgid "" +"Like :c:func:`PyEval_SetProfile` but sets the profile function in all " +"running threads belonging to the current interpreter instead of the setting " +"it only on the current thread." +msgstr "" + +msgid "" +"As :c:func:`PyEval_SetProfile`, this function ignores any exceptions raised " +"while setting the profile functions in all threads." +msgstr "" + +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 "" + +msgid "See also the :func:`sys.settrace` function." +msgstr "" + +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 " +"on the current thread." +msgstr "" + +msgid "" +"As :c:func:`PyEval_SetTrace`, this function ignores any exceptions raised " +"while setting the trace functions in all threads." +msgstr "" + +msgid "Reference tracing" +msgstr "" + +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." +msgstr "" + +msgid "" +"The value for the *event* parameter to :c:type:`PyRefTracer` functions when " +"a Python object has been created." +msgstr "" + +msgid "" +"The value for the *event* parameter to :c:type:`PyRefTracer` functions when " +"a Python object has been destroyed." +msgstr "" + +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 " +"**data** is provided it must be an opaque pointer that will be provided when " +"the tracer function is called. Return ``0`` on success. Set an exception and " +"return ``-1`` on error." +msgstr "" + +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. A :term:`thread state` will be " +"active every time the tracer function is called." +msgstr "" + +msgid "" +"There must be an :term:`attached thread state` when calling this function." +msgstr "" + +msgid "" +"Get the registered reference tracer function and the value of the opaque " +"data pointer that was registered when :c:func:`PyRefTracer_SetTracer` was " +"called. If no tracer was registered this function will return NULL and will " +"set the **data** pointer to NULL." +msgstr "" + +msgid "Advanced Debugger Support" +msgstr "" + +msgid "" +"These functions are only intended to be used by advanced debugging tools." +msgstr "" + +msgid "" +"Return the interpreter state object at the head of the list of all such " +"objects." +msgstr "" + +msgid "Return the main interpreter state object." +msgstr "" + +msgid "" +"Return the next interpreter state object after *interp* from the list of all " +"such objects." +msgstr "" + +msgid "" +"Return the pointer to the first :c:type:`PyThreadState` object in the list " +"of threads associated with the interpreter *interp*." +msgstr "" + +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 "" + +msgid "Thread Local Storage Support" +msgstr "" + +msgid "" +"The Python interpreter provides low-level support for thread-local storage " +"(TLS) which wraps the underlying native TLS implementation to support the " +"Python-level thread local storage API (:class:`threading.local`). The " +"CPython C level APIs are similar to those offered by pthreads and Windows: " +"use a thread key and functions to associate a :c:expr:`void*` value per " +"thread." +msgstr "" + +msgid "" +"A :term:`thread state` does *not* need to be :term:`attached ` when calling these functions; they suppl their own locking." +msgstr "" + +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." +msgstr "" + +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." +msgstr "" + +msgid "Thread Specific Storage (TSS) API" +msgstr "" + +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 "" + +msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" +msgstr "" + +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 " +"internal field representing the key's initialization state. There are no " +"public members in this structure." +msgstr "" + +msgid "" +"When :ref:`Py_LIMITED_API ` is not defined, static allocation of " +"this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed." +msgstr "" + +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 `." +msgstr "" + +msgid "Dynamic Allocation" +msgstr "" + +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 " +"type is not possible due to its implementation being opaque at build time." +msgstr "" + +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." +msgstr "" + +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 " +"have been unassigned. This is a no-op if the *key* argument is ``NULL``." +msgstr "" + +msgid "" +"A freed key becomes a dangling pointer. You should reset the key to ``NULL``." +msgstr "" + +msgid "Methods" +msgstr "" + +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`." +msgstr "" + +msgid "" +"Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized " +"by :c:func:`PyThread_tss_create`." +msgstr "" + +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 " +"initialized by :c:macro:`Py_tss_NEEDS_INIT`. This function can be called " +"repeatedly on the same key -- calling it on an already initialized key is a " +"no-op and immediately returns success." +msgstr "" + +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." +msgstr "" + +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 "" + +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 " +"current thread." +msgstr "" + +msgid "Thread Local Storage (TLS) API" +msgstr "" + +msgid "" +"This API is superseded by :ref:`Thread Specific Storage (TSS) API `." +msgstr "" + +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 " +"platforms, :c:func:`PyThread_create_key` will return immediately with a " +"failure status, and the other TLS functions will all be no-ops on such " +"platforms." +msgstr "" + +msgid "" +"Due to the compatibility problem noted above, this version of the API should " +"not be used in new code." +msgstr "" + +msgid "Synchronization Primitives" +msgstr "" + +msgid "The C-API provides a basic mutual exclusion lock." +msgstr "" + +msgid "" +"A mutual exclusion lock. The :c:type:`!PyMutex` should be initialized to " +"zero to represent the unlocked state. For example::" +msgstr "" + +msgid "PyMutex mutex = {0};" +msgstr "" + +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 " +"remain at a fixed, writable location in memory." +msgstr "" + +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 " +"a deprecation period." +msgstr "" + +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 detach the :term:`thread state ` if one " +"exists." +msgstr "" + +msgid "" +"Unlock mutex *m*. The mutex must be locked --- otherwise, the function will " +"issue a fatal error." +msgstr "" + +msgid "Returns non-zero if the mutex *m* is currently locked, zero otherwise." +msgstr "" + +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 "" + +msgid "Python Critical Section API" +msgstr "" + +msgid "" +"The critical section API provides a deadlock avoidance layer on top of per-" +"object locks for :term:`free-threaded ` CPython. They are " +"intended to replace reliance on the :term:`global interpreter lock`, and are " +"no-ops in versions of Python with the global interpreter lock." +msgstr "" + +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 "" + +msgid "" +"Critical sections avoid deadlocks by implicitly suspending active critical " +"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 "" + +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 "" + +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 " +"expansions. Note that the sizes and contents of the structures may change in " +"future Python versions." +msgstr "" + +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." +msgstr "" + +msgid "Example usage::" +msgstr "" + +msgid "" +"static PyObject *\n" +"set_field(MyObject *self, PyObject *value)\n" +"{\n" +" Py_BEGIN_CRITICAL_SECTION(self);\n" +" Py_SETREF(self->field, Py_XNewRef(value));\n" +" Py_END_CRITICAL_SECTION();\n" +" Py_RETURN_NONE;\n" +"}" +msgstr "" + +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 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`." +msgstr "" + +msgid "" +"Acquires the per-object lock for the object *op* and begins a critical " +"section." +msgstr "" + +msgid "In the free-threaded build, this macro expands to::" +msgstr "" + +msgid "" +"{\n" +" PyCriticalSection _py_cs;\n" +" PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))" +msgstr "" + +msgid "In the default build, this macro expands to ``{``." +msgstr "" + +msgid "Locks the mutex *m* and begins a critical section." +msgstr "" + +msgid "" +"{\n" +" PyCriticalSection _py_cs;\n" +" PyCriticalSection_BeginMutex(&_py_cs, m)" +msgstr "" + +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 "" + +msgid "On the default build, this macro expands to ``{``." +msgstr "" + +msgid "Ends the critical section and releases the per-object lock." +msgstr "" + +msgid "" +" PyCriticalSection_End(&_py_cs);\n" +"}" +msgstr "" + +msgid "In the default build, this macro expands to ``}``." +msgstr "" + +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 " +"address first) to avoid lock ordering deadlocks." +msgstr "" + +msgid "" +"{\n" +" PyCriticalSection2 _py_cs2;\n" +" PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))" +msgstr "" + +msgid "Locks the mutexes *m1* and *m2* and begins a critical section." +msgstr "" + +msgid "" +"{\n" +" PyCriticalSection2 _py_cs2;\n" +" PyCriticalSection2_BeginMutex(&_py_cs2, m1, m2)" +msgstr "" + +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 "" + +msgid "Ends the critical section and releases the per-object locks." +msgstr "" + +msgid "" +" PyCriticalSection2_End(&_py_cs2);\n" +"}" +msgstr "" + +msgid "PyEval_InitThreads()" +msgstr "" + +msgid "modules (in module sys)" +msgstr "" + +msgid "path (in module sys)" +msgstr "" + +msgid "module" +msgstr "" + +msgid "builtins" +msgstr "" + +msgid "__main__" +msgstr "" + +msgid "sys" +msgstr "sys" + +msgid "search" +msgstr "" + +msgid "path" +msgstr "" + +msgid "Py_FinalizeEx (C function)" +msgstr "" + +msgid "Py_Initialize()" +msgstr "" + +msgid "main()" +msgstr "" + +msgid "Py_GetPath()" +msgstr "" + +msgid "executable (in module sys)" +msgstr "" + +msgid "version (in module sys)" +msgstr "" + +msgid "platform (in module sys)" +msgstr "" + +msgid "copyright (in module sys)" +msgstr "" + +msgid "Py_FatalError()" +msgstr "" + +msgid "argv (in module sys)" +msgstr "" + +msgid "global interpreter lock" +msgstr "" + +msgid "interpreter lock" +msgstr "" + +msgid "lock, interpreter" +msgstr "" + +msgid "setswitchinterval (in module sys)" +msgstr "" + +msgid "PyThreadState (C type)" +msgstr "" + +msgid "Py_BEGIN_ALLOW_THREADS (C macro)" +msgstr "" + +msgid "Py_END_ALLOW_THREADS (C macro)" +msgstr "" + +msgid "PyEval_RestoreThread (C function)" +msgstr "" + +msgid "PyEval_SaveThread (C function)" +msgstr "" + +msgid "PyEval_AcquireThread()" +msgstr "" + +msgid "PyEval_ReleaseThread()" +msgstr "" + +msgid "PyEval_SaveThread()" +msgstr "" + +msgid "PyEval_RestoreThread()" +msgstr "" + +msgid "_thread" +msgstr "" + +msgid "stdout (in module sys)" +msgstr "" + +msgid "stderr (in module sys)" +msgstr "" + +msgid "stdin (in module sys)" +msgstr "" + +msgid "Py_Initialize (C function)" +msgstr "" + +msgid "close (in module os)" +msgstr "" diff --git a/c-api/init_config.po b/c-api/init_config.po index 5b37d1f1..9bbeea58 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -8,44 +8,53 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/init_config.rst:7 msgid "Python Initialization Configuration" msgstr "" +#: ../../c-api/init_config.rst:13 msgid "PyInitConfig C API" msgstr "" +#: ../../c-api/init_config.rst:17 msgid "Python can be initialized with :c:func:`Py_InitializeFromInitConfig`." msgstr "" +#: ../../c-api/init_config.rst:19 ../../c-api/init_config.rst:654 msgid "" "The :c:func:`Py_RunMain` function can be used to write a customized Python " "program." msgstr "" +#: ../../c-api/init_config.rst:22 ../../c-api/init_config.rst:657 msgid "" "See also :ref:`Initialization, Finalization, and Threads `." msgstr "" +#: ../../c-api/init_config.rst:25 msgid ":pep:`741` \"Python Configuration C API\"." msgstr "" +#: ../../c-api/init_config.rst:29 ../../c-api/init_config.rst:664 msgid "Example" msgstr "" +#: ../../c-api/init_config.rst:31 msgid "" "Example of customized Python always running with the :ref:`Python " "Development Mode ` enabled; return ``-1`` on error:" msgstr "" +#: ../../c-api/init_config.rst:34 msgid "" "int init_python(void)\n" "{\n" @@ -82,128 +91,167 @@ msgid "" "}" msgstr "" +#: ../../c-api/init_config.rst:71 msgid "Create Config" msgstr "" +#: ../../c-api/init_config.rst:75 msgid "Opaque structure to configure the Python initialization." msgstr "" +#: ../../c-api/init_config.rst:80 msgid "" "Create a new initialization configuration using :ref:`Isolated Configuration " "` default values." msgstr "" +#: ../../c-api/init_config.rst:83 msgid "It must be freed by :c:func:`PyInitConfig_Free`." msgstr "" +#: ../../c-api/init_config.rst:85 msgid "Return ``NULL`` on memory allocation failure." msgstr "" +#: ../../c-api/init_config.rst:90 msgid "Free memory of the initialization configuration *config*." msgstr "" +#: ../../c-api/init_config.rst:92 msgid "If *config* is ``NULL``, no operation is performed." msgstr "" +#: ../../c-api/init_config.rst:96 msgid "Error Handling" msgstr "" +#: ../../c-api/init_config.rst:100 msgid "Get the *config* error message." msgstr "" +#: ../../c-api/init_config.rst:102 msgid "Set *\\*err_msg* and return ``1`` if an error is set." msgstr "" +#: ../../c-api/init_config.rst:103 msgid "Set *\\*err_msg* to ``NULL`` and return ``0`` otherwise." msgstr "" -msgid "An error message is an UTF-8 encoded string." +#: ../../c-api/init_config.rst:105 +msgid "An error message is a UTF-8 encoded string." msgstr "" +#: ../../c-api/init_config.rst:107 msgid "If *config* has an exit code, format the exit code as an error message." msgstr "" +#: ../../c-api/init_config.rst:110 msgid "" "The error message remains valid until another ``PyInitConfig`` function is " "called with *config*. The caller doesn't have to free the error message." msgstr "" +#: ../../c-api/init_config.rst:117 msgid "Get the *config* exit code." msgstr "" +#: ../../c-api/init_config.rst:119 msgid "Set *\\*exitcode* and return ``1`` if *config* has an exit code set." msgstr "" +#: ../../c-api/init_config.rst:120 msgid "Return ``0`` if *config* has no exit code set." msgstr "" +#: ../../c-api/init_config.rst:122 msgid "" "Only the ``Py_InitializeFromInitConfig()`` function can set an exit code if " "the ``parse_argv`` option is non-zero." msgstr "" +#: ../../c-api/init_config.rst:125 msgid "" "An exit code can be set when parsing the command line failed (exit code " "``2``) or when a command line option asks to display the command line help " "(exit code ``0``)." msgstr "" +#: ../../c-api/init_config.rst:131 msgid "Get Options" msgstr "" +#: ../../c-api/init_config.rst:133 ../../c-api/init_config.rst:187 +#: ../../c-api/init_config.rst:559 msgid "" "The configuration option *name* parameter must be a non-NULL null-terminated " "UTF-8 encoded string. See :ref:`Configuration Options `." msgstr "" +#: ../../c-api/init_config.rst:138 msgid "Test if the configuration has an option called *name*." msgstr "" +#: ../../c-api/init_config.rst:140 msgid "Return ``1`` if the option exists, or return ``0`` otherwise." msgstr "" +#: ../../c-api/init_config.rst:145 msgid "Get an integer configuration option." msgstr "" +#: ../../c-api/init_config.rst:147 ../../c-api/init_config.rst:156 msgid "Set *\\*value*, and return ``0`` on success." msgstr "" +#: ../../c-api/init_config.rst:148 ../../c-api/init_config.rst:157 +#: ../../c-api/init_config.rst:172 ../../c-api/init_config.rst:200 +#: ../../c-api/init_config.rst:209 ../../c-api/init_config.rst:218 +#: ../../c-api/init_config.rst:233 ../../c-api/init_config.rst:249 msgid "Set an error in *config* and return ``-1`` on error." msgstr "" +#: ../../c-api/init_config.rst:153 msgid "" "Get a string configuration option as a null-terminated UTF-8 encoded string." msgstr "" +#: ../../c-api/init_config.rst:159 msgid "" "*\\*value* can be set to ``NULL`` if the option is an optional string and " "the option is unset." msgstr "" +#: ../../c-api/init_config.rst:162 msgid "" "On success, the string must be released with ``free(value)`` if it's not " "``NULL``." msgstr "" +#: ../../c-api/init_config.rst:168 msgid "" "Get a string list configuration option as an array of null-terminated UTF-8 " "encoded strings." msgstr "" +#: ../../c-api/init_config.rst:171 msgid "Set *\\*length* and *\\*value*, and return ``0`` on success." msgstr "" +#: ../../c-api/init_config.rst:174 msgid "" "On success, the string list must be released with " "``PyInitConfig_FreeStrList(length, items)``." msgstr "" +#: ../../c-api/init_config.rst:180 msgid "Free memory of a string list created by ``PyInitConfig_GetStrList()``." msgstr "" +#: ../../c-api/init_config.rst:185 msgid "Set Options" msgstr "" +#: ../../c-api/init_config.rst:190 msgid "" "Some configuration options have side effects on other options. This logic is " "only implemented when ``Py_InitializeFromInitConfig()`` is called, not by " @@ -211,591 +259,853 @@ msgid "" "not set ``faulthandler`` to ``1``." msgstr "" +#: ../../c-api/init_config.rst:197 msgid "Set an integer configuration option." msgstr "" +#: ../../c-api/init_config.rst:199 ../../c-api/init_config.rst:208 +#: ../../c-api/init_config.rst:217 ../../c-api/init_config.rst:232 +#: ../../c-api/init_config.rst:248 ../../c-api/init_config.rst:591 msgid "Return ``0`` on success." msgstr "" +#: ../../c-api/init_config.rst:205 msgid "" "Set a string configuration option from a null-terminated UTF-8 encoded " "string. The string is copied." msgstr "" +#: ../../c-api/init_config.rst:214 msgid "" "Set a string list configuration option from an array of null-terminated " "UTF-8 encoded strings. The string list is copied." msgstr "" +#: ../../c-api/init_config.rst:222 msgid "Module" msgstr "" +#: ../../c-api/init_config.rst:226 msgid "Add a built-in extension module to the table of built-in modules." msgstr "" +#: ../../c-api/init_config.rst:228 msgid "" "The new module can be imported by the name *name*, and uses the function " "*initfunc* as the initialization function called on the first attempted " "import." msgstr "" +#: ../../c-api/init_config.rst:235 msgid "" "If Python is initialized multiple times, ``PyInitConfig_AddModule()`` must " "be called at each Python initialization." msgstr "" +#: ../../c-api/init_config.rst:238 msgid "Similar to the :c:func:`PyImport_AppendInittab` function." msgstr "" +#: ../../c-api/init_config.rst:242 msgid "Initialize Python" msgstr "" +#: ../../c-api/init_config.rst:246 msgid "Initialize Python from the initialization configuration." msgstr "" +#: ../../c-api/init_config.rst:250 msgid "Set an exit code in *config* and return ``-1`` if Python wants to exit." msgstr "" +#: ../../c-api/init_config.rst:253 msgid "See ``PyInitConfig_GetExitcode()`` for the exit code case." msgstr "" +#: ../../c-api/init_config.rst:259 msgid "Configuration Options" msgstr "" +#: ../../c-api/init_config.rst:264 msgid "Option" msgstr "" +#: ../../c-api/init_config.rst:265 msgid "PyConfig/PyPreConfig member" msgstr "" +#: ../../c-api/init_config.rst:266 msgid "Type" msgstr "" +#: ../../c-api/init_config.rst:267 msgid "Visibility" msgstr "" +#: ../../c-api/init_config.rst:268 msgid "``\"allocator\"``" msgstr "" +#: ../../c-api/init_config.rst:269 msgid ":c:member:`allocator `" msgstr "" +#: ../../c-api/init_config.rst:270 ../../c-api/init_config.rst:294 +#: ../../c-api/init_config.rst:322 ../../c-api/init_config.rst:358 +#: ../../c-api/init_config.rst:366 ../../c-api/init_config.rst:378 +#: ../../c-api/init_config.rst:406 ../../c-api/init_config.rst:494 +#: ../../c-api/init_config.rst:522 ../../c-api/init_config.rst:576 msgid "``int``" msgstr "" +#: ../../c-api/init_config.rst:271 ../../c-api/init_config.rst:291 +#: ../../c-api/init_config.rst:299 ../../c-api/init_config.rst:303 +#: ../../c-api/init_config.rst:307 ../../c-api/init_config.rst:311 +#: ../../c-api/init_config.rst:315 ../../c-api/init_config.rst:319 +#: ../../c-api/init_config.rst:327 ../../c-api/init_config.rst:331 +#: ../../c-api/init_config.rst:335 ../../c-api/init_config.rst:347 +#: ../../c-api/init_config.rst:351 ../../c-api/init_config.rst:355 +#: ../../c-api/init_config.rst:359 ../../c-api/init_config.rst:363 +#: ../../c-api/init_config.rst:367 ../../c-api/init_config.rst:375 +#: ../../c-api/init_config.rst:387 ../../c-api/init_config.rst:391 +#: ../../c-api/init_config.rst:395 ../../c-api/init_config.rst:399 +#: ../../c-api/init_config.rst:411 ../../c-api/init_config.rst:415 +#: ../../c-api/init_config.rst:423 ../../c-api/init_config.rst:427 +#: ../../c-api/init_config.rst:439 ../../c-api/init_config.rst:451 +#: ../../c-api/init_config.rst:455 ../../c-api/init_config.rst:459 +#: ../../c-api/init_config.rst:463 ../../c-api/init_config.rst:467 +#: ../../c-api/init_config.rst:471 ../../c-api/init_config.rst:475 +#: ../../c-api/init_config.rst:479 ../../c-api/init_config.rst:483 +#: ../../c-api/init_config.rst:487 ../../c-api/init_config.rst:495 +#: ../../c-api/init_config.rst:503 ../../c-api/init_config.rst:507 +#: ../../c-api/init_config.rst:511 ../../c-api/init_config.rst:515 +#: ../../c-api/init_config.rst:519 ../../c-api/init_config.rst:527 +#: ../../c-api/init_config.rst:543 msgid "Read-only" msgstr "" +#: ../../c-api/init_config.rst:272 msgid "``\"argv\"``" msgstr "" +#: ../../c-api/init_config.rst:273 msgid ":c:member:`argv `" msgstr "" +#: ../../c-api/init_config.rst:274 ../../c-api/init_config.rst:402 +#: ../../c-api/init_config.rst:410 ../../c-api/init_config.rst:530 +#: ../../c-api/init_config.rst:578 msgid "``list[str]``" msgstr "" +#: ../../c-api/init_config.rst:275 ../../c-api/init_config.rst:279 +#: ../../c-api/init_config.rst:283 ../../c-api/init_config.rst:287 +#: ../../c-api/init_config.rst:295 ../../c-api/init_config.rst:323 +#: ../../c-api/init_config.rst:339 ../../c-api/init_config.rst:343 +#: ../../c-api/init_config.rst:371 ../../c-api/init_config.rst:379 +#: ../../c-api/init_config.rst:383 ../../c-api/init_config.rst:403 +#: ../../c-api/init_config.rst:407 ../../c-api/init_config.rst:419 +#: ../../c-api/init_config.rst:431 ../../c-api/init_config.rst:435 +#: ../../c-api/init_config.rst:443 ../../c-api/init_config.rst:447 +#: ../../c-api/init_config.rst:491 ../../c-api/init_config.rst:499 +#: ../../c-api/init_config.rst:523 ../../c-api/init_config.rst:531 +#: ../../c-api/init_config.rst:535 ../../c-api/init_config.rst:539 msgid "Public" msgstr "" +#: ../../c-api/init_config.rst:276 msgid "``\"base_exec_prefix\"``" msgstr "" +#: ../../c-api/init_config.rst:277 msgid ":c:member:`base_exec_prefix `" msgstr "" +#: ../../c-api/init_config.rst:278 ../../c-api/init_config.rst:282 +#: ../../c-api/init_config.rst:286 ../../c-api/init_config.rst:298 +#: ../../c-api/init_config.rst:334 ../../c-api/init_config.rst:338 +#: ../../c-api/init_config.rst:342 ../../c-api/init_config.rst:350 +#: ../../c-api/init_config.rst:354 ../../c-api/init_config.rst:362 +#: ../../c-api/init_config.rst:430 ../../c-api/init_config.rst:434 +#: ../../c-api/init_config.rst:438 ../../c-api/init_config.rst:442 +#: ../../c-api/init_config.rst:450 ../../c-api/init_config.rst:454 +#: ../../c-api/init_config.rst:458 ../../c-api/init_config.rst:462 +#: ../../c-api/init_config.rst:482 ../../c-api/init_config.rst:486 +#: ../../c-api/init_config.rst:490 ../../c-api/init_config.rst:577 msgid "``str``" msgstr "" +#: ../../c-api/init_config.rst:280 msgid "``\"base_executable\"``" msgstr "" +#: ../../c-api/init_config.rst:281 msgid ":c:member:`base_executable `" msgstr "" +#: ../../c-api/init_config.rst:284 msgid "``\"base_prefix\"``" msgstr "" +#: ../../c-api/init_config.rst:285 msgid ":c:member:`base_prefix `" msgstr "" +#: ../../c-api/init_config.rst:288 msgid "``\"buffered_stdio\"``" msgstr "" +#: ../../c-api/init_config.rst:289 msgid ":c:member:`buffered_stdio `" msgstr "" +#: ../../c-api/init_config.rst:290 ../../c-api/init_config.rst:302 +#: ../../c-api/init_config.rst:306 ../../c-api/init_config.rst:310 +#: ../../c-api/init_config.rst:314 ../../c-api/init_config.rst:318 +#: ../../c-api/init_config.rst:326 ../../c-api/init_config.rst:330 +#: ../../c-api/init_config.rst:346 ../../c-api/init_config.rst:370 +#: ../../c-api/init_config.rst:374 ../../c-api/init_config.rst:382 +#: ../../c-api/init_config.rst:386 ../../c-api/init_config.rst:390 +#: ../../c-api/init_config.rst:394 ../../c-api/init_config.rst:398 +#: ../../c-api/init_config.rst:414 ../../c-api/init_config.rst:418 +#: ../../c-api/init_config.rst:422 ../../c-api/init_config.rst:426 +#: ../../c-api/init_config.rst:446 ../../c-api/init_config.rst:466 +#: ../../c-api/init_config.rst:470 ../../c-api/init_config.rst:474 +#: ../../c-api/init_config.rst:478 ../../c-api/init_config.rst:498 +#: ../../c-api/init_config.rst:502 ../../c-api/init_config.rst:506 +#: ../../c-api/init_config.rst:510 ../../c-api/init_config.rst:514 +#: ../../c-api/init_config.rst:518 ../../c-api/init_config.rst:526 +#: ../../c-api/init_config.rst:534 ../../c-api/init_config.rst:542 +#: ../../c-api/init_config.rst:575 msgid "``bool``" msgstr "" +#: ../../c-api/init_config.rst:292 msgid "``\"bytes_warning\"``" msgstr "" +#: ../../c-api/init_config.rst:293 msgid ":c:member:`bytes_warning `" msgstr "" +#: ../../c-api/init_config.rst:296 msgid "``\"check_hash_pycs_mode\"``" msgstr "" +#: ../../c-api/init_config.rst:297 msgid ":c:member:`check_hash_pycs_mode `" msgstr "" +#: ../../c-api/init_config.rst:300 msgid "``\"code_debug_ranges\"``" msgstr "" +#: ../../c-api/init_config.rst:301 msgid ":c:member:`code_debug_ranges `" msgstr "" +#: ../../c-api/init_config.rst:304 msgid "``\"coerce_c_locale\"``" msgstr "" +#: ../../c-api/init_config.rst:305 msgid ":c:member:`coerce_c_locale `" msgstr "" +#: ../../c-api/init_config.rst:308 msgid "``\"coerce_c_locale_warn\"``" msgstr "" +#: ../../c-api/init_config.rst:309 msgid ":c:member:`coerce_c_locale_warn `" msgstr "" +#: ../../c-api/init_config.rst:312 msgid "``\"configure_c_stdio\"``" msgstr "" +#: ../../c-api/init_config.rst:313 msgid ":c:member:`configure_c_stdio `" msgstr "" +#: ../../c-api/init_config.rst:316 msgid "``\"configure_locale\"``" msgstr "" +#: ../../c-api/init_config.rst:317 msgid ":c:member:`configure_locale `" msgstr "" +#: ../../c-api/init_config.rst:320 msgid "``\"cpu_count\"``" msgstr "" +#: ../../c-api/init_config.rst:321 msgid ":c:member:`cpu_count `" msgstr "" +#: ../../c-api/init_config.rst:324 msgid "``\"dev_mode\"``" msgstr "" +#: ../../c-api/init_config.rst:325 msgid ":c:member:`dev_mode `" msgstr "" +#: ../../c-api/init_config.rst:328 msgid "``\"dump_refs\"``" msgstr "" +#: ../../c-api/init_config.rst:329 msgid ":c:member:`dump_refs `" msgstr "" +#: ../../c-api/init_config.rst:332 msgid "``\"dump_refs_file\"``" msgstr "" +#: ../../c-api/init_config.rst:333 msgid ":c:member:`dump_refs_file `" msgstr "" +#: ../../c-api/init_config.rst:336 msgid "``\"exec_prefix\"``" msgstr "" +#: ../../c-api/init_config.rst:337 msgid ":c:member:`exec_prefix `" msgstr "" +#: ../../c-api/init_config.rst:340 msgid "``\"executable\"``" msgstr "" +#: ../../c-api/init_config.rst:341 msgid ":c:member:`executable `" msgstr "" +#: ../../c-api/init_config.rst:344 msgid "``\"faulthandler\"``" msgstr "" +#: ../../c-api/init_config.rst:345 msgid ":c:member:`faulthandler `" msgstr "" +#: ../../c-api/init_config.rst:348 msgid "``\"filesystem_encoding\"``" msgstr "" +#: ../../c-api/init_config.rst:349 msgid ":c:member:`filesystem_encoding `" msgstr "" +#: ../../c-api/init_config.rst:352 msgid "``\"filesystem_errors\"``" msgstr "" +#: ../../c-api/init_config.rst:353 msgid ":c:member:`filesystem_errors `" msgstr "" +#: ../../c-api/init_config.rst:356 msgid "``\"hash_seed\"``" msgstr "" +#: ../../c-api/init_config.rst:357 msgid ":c:member:`hash_seed `" msgstr "" +#: ../../c-api/init_config.rst:360 msgid "``\"home\"``" msgstr "" +#: ../../c-api/init_config.rst:361 msgid ":c:member:`home `" msgstr "" +#: ../../c-api/init_config.rst:364 msgid "``\"import_time\"``" msgstr "" +#: ../../c-api/init_config.rst:365 msgid ":c:member:`import_time `" msgstr "" +#: ../../c-api/init_config.rst:368 msgid "``\"inspect\"``" msgstr "" +#: ../../c-api/init_config.rst:369 msgid ":c:member:`inspect `" msgstr "" +#: ../../c-api/init_config.rst:372 msgid "``\"install_signal_handlers\"``" msgstr "" +#: ../../c-api/init_config.rst:373 msgid ":c:member:`install_signal_handlers `" msgstr "" +#: ../../c-api/init_config.rst:376 msgid "``\"int_max_str_digits\"``" msgstr "" +#: ../../c-api/init_config.rst:377 msgid ":c:member:`int_max_str_digits `" msgstr "" +#: ../../c-api/init_config.rst:380 msgid "``\"interactive\"``" msgstr "" +#: ../../c-api/init_config.rst:381 msgid ":c:member:`interactive `" msgstr "" +#: ../../c-api/init_config.rst:384 msgid "``\"isolated\"``" msgstr "" +#: ../../c-api/init_config.rst:385 msgid ":c:member:`isolated `" msgstr "" +#: ../../c-api/init_config.rst:388 msgid "``\"legacy_windows_fs_encoding\"``" msgstr "" +#: ../../c-api/init_config.rst:389 msgid "" ":c:member:`legacy_windows_fs_encoding `" msgstr "" +#: ../../c-api/init_config.rst:392 msgid "``\"legacy_windows_stdio\"``" msgstr "" +#: ../../c-api/init_config.rst:393 msgid ":c:member:`legacy_windows_stdio `" msgstr "" +#: ../../c-api/init_config.rst:396 msgid "``\"malloc_stats\"``" msgstr "" +#: ../../c-api/init_config.rst:397 msgid ":c:member:`malloc_stats `" msgstr "" +#: ../../c-api/init_config.rst:400 msgid "``\"module_search_paths\"``" msgstr "" +#: ../../c-api/init_config.rst:401 msgid ":c:member:`module_search_paths `" msgstr "" +#: ../../c-api/init_config.rst:404 msgid "``\"optimization_level\"``" msgstr "" +#: ../../c-api/init_config.rst:405 msgid ":c:member:`optimization_level `" msgstr "" +#: ../../c-api/init_config.rst:408 msgid "``\"orig_argv\"``" msgstr "" +#: ../../c-api/init_config.rst:409 msgid ":c:member:`orig_argv `" msgstr "" +#: ../../c-api/init_config.rst:412 msgid "``\"parse_argv\"``" msgstr "" +#: ../../c-api/init_config.rst:413 msgid ":c:member:`parse_argv `" msgstr "" +#: ../../c-api/init_config.rst:416 msgid "``\"parser_debug\"``" msgstr "" +#: ../../c-api/init_config.rst:417 msgid ":c:member:`parser_debug `" msgstr "" +#: ../../c-api/init_config.rst:420 msgid "``\"pathconfig_warnings\"``" msgstr "" +#: ../../c-api/init_config.rst:421 msgid ":c:member:`pathconfig_warnings `" msgstr "" +#: ../../c-api/init_config.rst:424 msgid "``\"perf_profiling\"``" msgstr "" +#: ../../c-api/init_config.rst:425 msgid ":c:member:`perf_profiling `" msgstr "" +#: ../../c-api/init_config.rst:428 msgid "``\"platlibdir\"``" msgstr "" +#: ../../c-api/init_config.rst:429 msgid ":c:member:`platlibdir `" msgstr "" +#: ../../c-api/init_config.rst:432 msgid "``\"prefix\"``" msgstr "" +#: ../../c-api/init_config.rst:433 msgid ":c:member:`prefix `" msgstr "" +#: ../../c-api/init_config.rst:436 msgid "``\"program_name\"``" msgstr "" +#: ../../c-api/init_config.rst:437 msgid ":c:member:`program_name `" msgstr "" +#: ../../c-api/init_config.rst:440 msgid "``\"pycache_prefix\"``" msgstr "" +#: ../../c-api/init_config.rst:441 msgid ":c:member:`pycache_prefix `" msgstr "" +#: ../../c-api/init_config.rst:444 msgid "``\"quiet\"``" msgstr "" +#: ../../c-api/init_config.rst:445 msgid ":c:member:`quiet `" msgstr "" +#: ../../c-api/init_config.rst:448 msgid "``\"run_command\"``" msgstr "" +#: ../../c-api/init_config.rst:449 msgid ":c:member:`run_command `" msgstr "" +#: ../../c-api/init_config.rst:452 msgid "``\"run_filename\"``" msgstr "" +#: ../../c-api/init_config.rst:453 msgid ":c:member:`run_filename `" msgstr "" +#: ../../c-api/init_config.rst:456 msgid "``\"run_module\"``" msgstr "" +#: ../../c-api/init_config.rst:457 msgid ":c:member:`run_module `" msgstr "" +#: ../../c-api/init_config.rst:460 msgid "``\"run_presite\"``" msgstr "" +#: ../../c-api/init_config.rst:461 msgid ":c:member:`run_presite `" msgstr "" +#: ../../c-api/init_config.rst:464 msgid "``\"safe_path\"``" msgstr "" +#: ../../c-api/init_config.rst:465 msgid ":c:member:`safe_path `" msgstr "" +#: ../../c-api/init_config.rst:468 msgid "``\"show_ref_count\"``" msgstr "" +#: ../../c-api/init_config.rst:469 msgid ":c:member:`show_ref_count `" msgstr "" +#: ../../c-api/init_config.rst:472 msgid "``\"site_import\"``" msgstr "" +#: ../../c-api/init_config.rst:473 msgid ":c:member:`site_import `" msgstr "" +#: ../../c-api/init_config.rst:476 msgid "``\"skip_source_first_line\"``" msgstr "" +#: ../../c-api/init_config.rst:477 msgid ":c:member:`skip_source_first_line `" msgstr "" +#: ../../c-api/init_config.rst:480 msgid "``\"stdio_encoding\"``" msgstr "" +#: ../../c-api/init_config.rst:481 msgid ":c:member:`stdio_encoding `" msgstr "" +#: ../../c-api/init_config.rst:484 msgid "``\"stdio_errors\"``" msgstr "" +#: ../../c-api/init_config.rst:485 msgid ":c:member:`stdio_errors `" msgstr "" +#: ../../c-api/init_config.rst:488 msgid "``\"stdlib_dir\"``" msgstr "" +#: ../../c-api/init_config.rst:489 msgid ":c:member:`stdlib_dir `" msgstr "" +#: ../../c-api/init_config.rst:492 msgid "``\"tracemalloc\"``" msgstr "" +#: ../../c-api/init_config.rst:493 msgid ":c:member:`tracemalloc `" msgstr "" +#: ../../c-api/init_config.rst:496 msgid "``\"use_environment\"``" msgstr "" +#: ../../c-api/init_config.rst:497 msgid ":c:member:`use_environment `" msgstr "" +#: ../../c-api/init_config.rst:500 msgid "``\"use_frozen_modules\"``" msgstr "" +#: ../../c-api/init_config.rst:501 msgid ":c:member:`use_frozen_modules `" msgstr "" +#: ../../c-api/init_config.rst:504 msgid "``\"use_hash_seed\"``" msgstr "" +#: ../../c-api/init_config.rst:505 msgid ":c:member:`use_hash_seed `" msgstr "" +#: ../../c-api/init_config.rst:508 msgid "``\"use_system_logger\"``" msgstr "" +#: ../../c-api/init_config.rst:509 msgid ":c:member:`use_system_logger `" msgstr "" +#: ../../c-api/init_config.rst:512 msgid "``\"user_site_directory\"``" msgstr "" +#: ../../c-api/init_config.rst:513 msgid ":c:member:`user_site_directory `" msgstr "" +#: ../../c-api/init_config.rst:516 msgid "``\"utf8_mode\"``" msgstr "" +#: ../../c-api/init_config.rst:517 msgid ":c:member:`utf8_mode `" msgstr "" +#: ../../c-api/init_config.rst:520 msgid "``\"verbose\"``" msgstr "" +#: ../../c-api/init_config.rst:521 msgid ":c:member:`verbose `" msgstr "" +#: ../../c-api/init_config.rst:524 msgid "``\"warn_default_encoding\"``" msgstr "" +#: ../../c-api/init_config.rst:525 msgid ":c:member:`warn_default_encoding `" msgstr "" +#: ../../c-api/init_config.rst:528 msgid "``\"warnoptions\"``" msgstr "" +#: ../../c-api/init_config.rst:529 msgid ":c:member:`warnoptions `" msgstr "" +#: ../../c-api/init_config.rst:532 msgid "``\"write_bytecode\"``" msgstr "" +#: ../../c-api/init_config.rst:533 msgid ":c:member:`write_bytecode `" msgstr "" +#: ../../c-api/init_config.rst:536 msgid "``\"xoptions\"``" msgstr "" +#: ../../c-api/init_config.rst:537 msgid ":c:member:`xoptions `" msgstr "" +#: ../../c-api/init_config.rst:538 ../../c-api/init_config.rst:579 msgid "``dict[str, str]``" msgstr "" +#: ../../c-api/init_config.rst:540 msgid "``\"_pystats\"``" msgstr "" +#: ../../c-api/init_config.rst:541 msgid ":c:member:`_pystats `" msgstr "" +#: ../../c-api/init_config.rst:545 msgid "Visibility:" msgstr "" +#: ../../c-api/init_config.rst:547 msgid "" -"Public: Can by get by :c:func:`PyConfig_Get` and set by :c:func:" +"Public: Can be retrieved by :c:func:`PyConfig_Get` and set by :c:func:" "`PyConfig_Set`." msgstr "" +#: ../../c-api/init_config.rst:549 msgid "" -"Read-only: Can by get by :c:func:`PyConfig_Get`, but cannot be set by :c:" -"func:`PyConfig_Set`." +"Read-only: Can be retrieved by :c:func:`PyConfig_Get`, but cannot be set by :" +"c:func:`PyConfig_Set`." msgstr "" +#: ../../c-api/init_config.rst:554 msgid "Runtime Python configuration API" msgstr "" +#: ../../c-api/init_config.rst:556 msgid "" "At runtime, it's possible to get and set configuration options using :c:func:" "`PyConfig_Get` and :c:func:`PyConfig_Set` functions." msgstr "" +#: ../../c-api/init_config.rst:562 msgid "" "Some options are read from the :mod:`sys` attributes. For example, the " "option ``\"argv\"`` is read from :data:`sys.argv`." msgstr "" +#: ../../c-api/init_config.rst:568 msgid "" "Get the current runtime value of a configuration option as a Python object." msgstr "" +#: ../../c-api/init_config.rst:570 ../../c-api/init_config.rst:601 msgid "Return a new reference on success." msgstr "" +#: ../../c-api/init_config.rst:571 ../../c-api/init_config.rst:602 msgid "Set an exception and return ``NULL`` on error." msgstr "" +#: ../../c-api/init_config.rst:573 msgid "The object type depends on the configuration option. It can be:" msgstr "" +#: ../../c-api/init_config.rst:581 ../../c-api/init_config.rst:604 +#: ../../c-api/init_config.rst:619 msgid "" "The caller must have an :term:`attached thread state`. The function cannot " "be called before Python initialization nor after Python finalization." msgstr "" +#: ../../c-api/init_config.rst:589 msgid "Similar to :c:func:`PyConfig_Get`, but get the value as a C int." msgstr "" +#: ../../c-api/init_config.rst:592 msgid "Set an exception and return ``-1`` on error." msgstr "" +#: ../../c-api/init_config.rst:599 msgid "Get all configuration option names as a ``frozenset``." msgstr "" +#: ../../c-api/init_config.rst:612 msgid "Set the current runtime value of a configuration option." msgstr "" +#: ../../c-api/init_config.rst:614 msgid "Raise a :exc:`ValueError` if there is no option *name*." msgstr "" +#: ../../c-api/init_config.rst:615 msgid "Raise a :exc:`ValueError` if *value* is an invalid value." msgstr "" +#: ../../c-api/init_config.rst:616 msgid "Raise a :exc:`ValueError` if the option is read-only (cannot be set)." msgstr "" +#: ../../c-api/init_config.rst:617 msgid "Raise a :exc:`TypeError` if *value* has not the proper type." msgstr "" +#: ../../c-api/init_config.rst:622 msgid "" "Raises an :ref:`auditing event ` ``cpython.PyConfig_Set`` with " "arguments ``name``, ``value``." msgstr "" +#: ../../c-api/init_config.rst:626 +msgid "" +"The function now replaces :data:`sys.flags` (create a new object), instead " +"of modifying :data:`sys.flags` in-place." +msgstr "" + +#: ../../c-api/init_config.rst:634 msgid "PyConfig C API" msgstr "" +#: ../../c-api/init_config.rst:638 msgid "" "Python can be initialized with :c:func:`Py_InitializeFromConfig` and the :c:" "type:`PyConfig` structure. It can be preinitialized with :c:func:" "`Py_PreInitialize` and the :c:type:`PyPreConfig` structure." msgstr "" +#: ../../c-api/init_config.rst:642 msgid "There are two kinds of configuration:" msgstr "" +#: ../../c-api/init_config.rst:644 msgid "" "The :ref:`Python Configuration ` can be used to build a " "customized Python which behaves as the regular Python. For example, " @@ -803,6 +1113,7 @@ msgid "" "Python." msgstr "" +#: ../../c-api/init_config.rst:649 msgid "" "The :ref:`Isolated Configuration ` can be used to embed " "Python into an application. It isolates Python from the system. For example, " @@ -810,12 +1121,15 @@ msgid "" "no signal handler is registered." msgstr "" +#: ../../c-api/init_config.rst:660 msgid ":pep:`587` \"Python Initialization Configuration\"." msgstr "" +#: ../../c-api/init_config.rst:666 msgid "Example of customized Python always running in isolated mode::" msgstr "" +#: ../../c-api/init_config.rst:668 msgid "" "int main(int argc, char **argv)\n" "{\n" @@ -851,111 +1165,144 @@ msgid "" "}" msgstr "" +#: ../../c-api/init_config.rst:703 msgid "PyWideStringList" msgstr "" +#: ../../c-api/init_config.rst:707 msgid "List of ``wchar_t*`` strings." msgstr "" +#: ../../c-api/init_config.rst:709 msgid "" "If *length* is non-zero, *items* must be non-``NULL`` and all strings must " "be non-``NULL``." msgstr "" +#: ../../c-api/init_config.rst:714 msgid "Methods:" msgstr "" +#: ../../c-api/init_config.rst:718 msgid "Append *item* to *list*." msgstr "" +#: ../../c-api/init_config.rst:720 ../../c-api/init_config.rst:731 msgid "Python must be preinitialized to call this function." msgstr "" +#: ../../c-api/init_config.rst:724 msgid "Insert *item* into *list* at *index*." msgstr "" +#: ../../c-api/init_config.rst:726 msgid "" "If *index* is greater than or equal to *list* length, append *item* to " "*list*." msgstr "" +#: ../../c-api/init_config.rst:729 msgid "*index* must be greater than or equal to ``0``." msgstr "" +#: ../../c-api/init_config.rst:735 ../../c-api/init_config.rst:755 +#: ../../c-api/init_config.rst:862 ../../c-api/init_config.rst:1179 msgid "Structure fields:" msgstr "" +#: ../../c-api/init_config.rst:739 msgid "List length." msgstr "" +#: ../../c-api/init_config.rst:743 msgid "List items." msgstr "" +#: ../../c-api/init_config.rst:746 msgid "PyStatus" msgstr "" +#: ../../c-api/init_config.rst:750 msgid "" "Structure to store an initialization function status: success, error or exit." msgstr "" +#: ../../c-api/init_config.rst:753 msgid "For an error, it can store the C function name which created the error." msgstr "" +#: ../../c-api/init_config.rst:759 msgid "Exit code. Argument passed to ``exit()``." msgstr "" +#: ../../c-api/init_config.rst:763 msgid "Error message." msgstr "" +#: ../../c-api/init_config.rst:767 msgid "Name of the function which created an error, can be ``NULL``." msgstr "" +#: ../../c-api/init_config.rst:771 msgid "Functions to create a status:" msgstr "" +#: ../../c-api/init_config.rst:775 msgid "Success." msgstr "" +#: ../../c-api/init_config.rst:779 msgid "Initialization error with a message." msgstr "" +#: ../../c-api/init_config.rst:781 msgid "*err_msg* must not be ``NULL``." msgstr "" +#: ../../c-api/init_config.rst:785 msgid "Memory allocation failure (out of memory)." msgstr "" +#: ../../c-api/init_config.rst:789 msgid "Exit Python with the specified exit code." msgstr "" +#: ../../c-api/init_config.rst:791 msgid "Functions to handle a status:" msgstr "" +#: ../../c-api/init_config.rst:795 msgid "" "Is the status an error or an exit? If true, the exception must be handled; " "by calling :c:func:`Py_ExitStatusException` for example." msgstr "" +#: ../../c-api/init_config.rst:800 msgid "Is the result an error?" msgstr "" +#: ../../c-api/init_config.rst:804 msgid "Is the result an exit?" msgstr "" +#: ../../c-api/init_config.rst:808 msgid "" "Call ``exit(exitcode)`` if *status* is an exit. Print the error message and " "exit with a non-zero exit code if *status* is an error. Must only be called " "if ``PyStatus_Exception(status)`` is non-zero." msgstr "" +#: ../../c-api/init_config.rst:813 msgid "" "Internally, Python uses macros which set ``PyStatus.func``, whereas " "functions to create a status set ``func`` to ``NULL``." msgstr "" +#: ../../c-api/init_config.rst:816 msgid "Example::" msgstr "" +#: ../../c-api/init_config.rst:818 msgid "" "PyStatus alloc(void **ptr, size_t size)\n" "{\n" @@ -978,155 +1325,203 @@ msgid "" "}" msgstr "" +#: ../../c-api/init_config.rst:840 msgid "PyPreConfig" msgstr "" +#: ../../c-api/init_config.rst:844 msgid "Structure used to preinitialize Python." msgstr "" +#: ../../c-api/init_config.rst:848 msgid "Function to initialize a preconfiguration:" msgstr "" +#: ../../c-api/init_config.rst:852 msgid "" "Initialize the preconfiguration with :ref:`Python Configuration `." msgstr "" +#: ../../c-api/init_config.rst:857 msgid "" "Initialize the preconfiguration with :ref:`Isolated Configuration `." msgstr "" +#: ../../c-api/init_config.rst:866 msgid "Name of the Python memory allocators:" msgstr "" +#: ../../c-api/init_config.rst:868 msgid "" "``PYMEM_ALLOCATOR_NOT_SET`` (``0``): don't change memory allocators (use " "defaults)." msgstr "" +#: ../../c-api/init_config.rst:870 msgid "" "``PYMEM_ALLOCATOR_DEFAULT`` (``1``): :ref:`default memory allocators " "`." msgstr "" +#: ../../c-api/init_config.rst:872 msgid "" "``PYMEM_ALLOCATOR_DEBUG`` (``2``): :ref:`default memory allocators ` with :ref:`debug hooks `." msgstr "" +#: ../../c-api/init_config.rst:875 msgid "``PYMEM_ALLOCATOR_MALLOC`` (``3``): use ``malloc()`` of the C library." msgstr "" +#: ../../c-api/init_config.rst:876 msgid "" "``PYMEM_ALLOCATOR_MALLOC_DEBUG`` (``4``): force usage of ``malloc()`` with :" "ref:`debug hooks `." msgstr "" +#: ../../c-api/init_config.rst:878 msgid "" "``PYMEM_ALLOCATOR_PYMALLOC`` (``5``): :ref:`Python pymalloc memory allocator " "`." msgstr "" +#: ../../c-api/init_config.rst:880 msgid "" "``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` (``6``): :ref:`Python pymalloc memory " "allocator ` with :ref:`debug hooks `." msgstr "" +#: ../../c-api/init_config.rst:883 msgid "" "``PYMEM_ALLOCATOR_MIMALLOC`` (``6``): use ``mimalloc``, a fast malloc " "replacement." msgstr "" +#: ../../c-api/init_config.rst:885 msgid "" "``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` (``7``): use ``mimalloc``, a fast malloc " "replacement with :ref:`debug hooks `." msgstr "" +#: ../../c-api/init_config.rst:889 msgid "" "``PYMEM_ALLOCATOR_PYMALLOC`` and ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` are not " "supported if Python is :option:`configured using --without-pymalloc <--" "without-pymalloc>`." msgstr "" +#: ../../c-api/init_config.rst:893 msgid "" "``PYMEM_ALLOCATOR_MIMALLOC`` and ``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` are not " "supported if Python is :option:`configured using --without-mimalloc <--" "without-mimalloc>` or if the underlying atomic support isn't available." msgstr "" +#: ../../c-api/init_config.rst:898 msgid "See :ref:`Memory Management `." msgstr "" +#: ../../c-api/init_config.rst:900 msgid "Default: ``PYMEM_ALLOCATOR_NOT_SET``." msgstr "" +#: ../../c-api/init_config.rst:904 msgid "Set the LC_CTYPE locale to the user preferred locale." msgstr "" +#: ../../c-api/init_config.rst:906 msgid "" "If equals to ``0``, set :c:member:`~PyPreConfig.coerce_c_locale` and :c:" "member:`~PyPreConfig.coerce_c_locale_warn` members to ``0``." msgstr "" +#: ../../c-api/init_config.rst:909 ../../c-api/init_config.rst:920 msgid "See the :term:`locale encoding`." msgstr "" +#: ../../c-api/init_config.rst:911 ../../c-api/init_config.rst:966 +#: ../../c-api/init_config.rst:1340 msgid "Default: ``1`` in Python config, ``0`` in isolated config." msgstr "" +#: ../../c-api/init_config.rst:915 msgid "If equals to ``2``, coerce the C locale." msgstr "" +#: ../../c-api/init_config.rst:917 msgid "" "If equals to ``1``, read the LC_CTYPE locale to decide if it should be " "coerced." msgstr "" +#: ../../c-api/init_config.rst:922 ../../c-api/init_config.rst:928 msgid "Default: ``-1`` in Python config, ``0`` in isolated config." msgstr "" +#: ../../c-api/init_config.rst:926 msgid "If non-zero, emit a warning if the C locale is coerced." msgstr "" +#: ../../c-api/init_config.rst:932 msgid "" ":ref:`Python Development Mode `: see :c:member:`PyConfig.dev_mode`." msgstr "" +#: ../../c-api/init_config.rst:935 ../../c-api/init_config.rst:1349 +#: ../../c-api/init_config.rst:1405 ../../c-api/init_config.rst:1899 msgid "Default: ``-1`` in Python mode, ``0`` in isolated mode." msgstr "" +#: ../../c-api/init_config.rst:939 msgid "Isolated mode: see :c:member:`PyConfig.isolated`." msgstr "" +#: ../../c-api/init_config.rst:941 ../../c-api/init_config.rst:1576 msgid "Default: ``0`` in Python mode, ``1`` in isolated mode." msgstr "" +#: ../../c-api/init_config.rst:945 msgid "If non-zero:" msgstr "" +#: ../../c-api/init_config.rst:947 msgid "Set :c:member:`PyPreConfig.utf8_mode` to ``0``," msgstr "" +#: ../../c-api/init_config.rst:948 msgid "Set :c:member:`PyConfig.filesystem_encoding` to ``\"mbcs\"``," msgstr "" +#: ../../c-api/init_config.rst:949 msgid "Set :c:member:`PyConfig.filesystem_errors` to ``\"replace\"``." msgstr "" +#: ../../c-api/init_config.rst:951 msgid "" "Initialized from the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " "variable value." msgstr "" +#: ../../c-api/init_config.rst:954 ../../c-api/init_config.rst:1590 msgid "" "Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for " "Windows specific code." msgstr "" +#: ../../c-api/init_config.rst:957 ../../c-api/init_config.rst:1283 +#: ../../c-api/init_config.rst:1295 ../../c-api/init_config.rst:1362 +#: ../../c-api/init_config.rst:1494 ../../c-api/init_config.rst:1512 +#: ../../c-api/init_config.rst:1526 ../../c-api/init_config.rst:1593 +#: ../../c-api/init_config.rst:1607 ../../c-api/init_config.rst:1667 +#: ../../c-api/init_config.rst:1719 ../../c-api/init_config.rst:1781 +#: ../../c-api/init_config.rst:1835 ../../c-api/init_config.rst:1864 +#: ../../c-api/init_config.rst:1978 ../../c-api/init_config.rst:2024 msgid "Default: ``0``." msgstr "" +#: ../../c-api/init_config.rst:961 msgid "" "If non-zero, :c:func:`Py_PreInitializeFromArgs` and :c:func:" "`Py_PreInitializeFromBytesArgs` parse their ``argv`` argument the same way " @@ -1134,74 +1529,93 @@ msgid "" "Arguments `." msgstr "" +#: ../../c-api/init_config.rst:970 msgid "" "Use :ref:`environment variables `? See :c:member:`PyConfig." "use_environment`." msgstr "" +#: ../../c-api/init_config.rst:973 ../../c-api/init_config.rst:1940 msgid "Default: ``1`` in Python config and ``0`` in isolated config." msgstr "" +#: ../../c-api/init_config.rst:977 msgid "If non-zero, enable the :ref:`Python UTF-8 Mode `." msgstr "" +#: ../../c-api/init_config.rst:979 msgid "" "Set to ``0`` or ``1`` by the :option:`-X utf8 <-X>` command line option and " "the :envvar:`PYTHONUTF8` environment variable." msgstr "" -msgid "Also set to ``1`` if the ``LC_CTYPE`` locale is ``C`` or ``POSIX``." -msgstr "" - -msgid "Default: ``-1`` in Python config and ``0`` in isolated config." +#: ../../c-api/init_config.rst:982 ../../c-api/init_config.rst:1270 +#: ../../c-api/init_config.rst:1308 ../../c-api/init_config.rst:1852 +#: ../../c-api/init_config.rst:2009 +msgid "Default: ``1``." msgstr "" +#: ../../c-api/init_config.rst:988 msgid "Preinitialize Python with PyPreConfig" msgstr "" +#: ../../c-api/init_config.rst:990 msgid "The preinitialization of Python:" msgstr "" +#: ../../c-api/init_config.rst:992 msgid "Set the Python memory allocators (:c:member:`PyPreConfig.allocator`)" msgstr "" +#: ../../c-api/init_config.rst:993 msgid "Configure the LC_CTYPE locale (:term:`locale encoding`)" msgstr "" +#: ../../c-api/init_config.rst:994 msgid "" "Set the :ref:`Python UTF-8 Mode ` (:c:member:`PyPreConfig." "utf8_mode`)" msgstr "" +#: ../../c-api/init_config.rst:997 msgid "" "The current preconfiguration (``PyPreConfig`` type) is stored in " "``_PyRuntime.preconfig``." msgstr "" +#: ../../c-api/init_config.rst:1000 msgid "Functions to preinitialize Python:" msgstr "" +#: ../../c-api/init_config.rst:1004 ../../c-api/init_config.rst:1010 +#: ../../c-api/init_config.rst:1019 msgid "Preinitialize Python from *preconfig* preconfiguration." msgstr "" +#: ../../c-api/init_config.rst:1006 ../../c-api/init_config.rst:1015 +#: ../../c-api/init_config.rst:1024 msgid "*preconfig* must not be ``NULL``." msgstr "" +#: ../../c-api/init_config.rst:1012 msgid "" "Parse *argv* command line arguments (bytes strings) if :c:member:" "`~PyPreConfig.parse_argv` of *preconfig* is non-zero." msgstr "" +#: ../../c-api/init_config.rst:1021 msgid "" "Parse *argv* command line arguments (wide strings) if :c:member:" "`~PyPreConfig.parse_argv` of *preconfig* is non-zero." msgstr "" +#: ../../c-api/init_config.rst:1026 ../../c-api/init_config.rst:2047 msgid "" "The caller is responsible to handle exceptions (error or exit) using :c:func:" "`PyStatus_Exception` and :c:func:`Py_ExitStatusException`." msgstr "" +#: ../../c-api/init_config.rst:1029 msgid "" "For :ref:`Python Configuration ` (:c:func:" "`PyPreConfig_InitPythonConfig`), if Python is initialized with command line " @@ -1211,6 +1625,7 @@ msgid "" "`Python UTF-8 Mode `." msgstr "" +#: ../../c-api/init_config.rst:1036 msgid "" "``PyMem_SetAllocator()`` can be called after :c:func:`Py_PreInitialize` and " "before :c:func:`Py_InitializeFromConfig` to install a custom memory " @@ -1218,6 +1633,7 @@ msgid "" "`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``." msgstr "" +#: ../../c-api/init_config.rst:1041 msgid "" "Python memory allocation functions like :c:func:`PyMem_RawMalloc` must not " "be used before the Python preinitialization, whereas calling directly " @@ -1225,11 +1641,13 @@ msgid "" "not be called before the Python preinitialization." msgstr "" +#: ../../c-api/init_config.rst:1046 msgid "" "Example using the preinitialization to enable the :ref:`Python UTF-8 Mode " "`::" msgstr "" +#: ../../c-api/init_config.rst:1049 msgid "" "PyStatus status;\n" "PyPreConfig preconfig;\n" @@ -1249,66 +1667,84 @@ msgid "" "Py_Finalize();" msgstr "" +#: ../../c-api/init_config.rst:1068 msgid "PyConfig" msgstr "" +#: ../../c-api/init_config.rst:1072 msgid "Structure containing most parameters to configure Python." msgstr "" +#: ../../c-api/init_config.rst:1074 msgid "" "When done, the :c:func:`PyConfig_Clear` function must be used to release the " "configuration memory." msgstr "" +#: ../../c-api/init_config.rst:1079 msgid "Structure methods:" msgstr "" +#: ../../c-api/init_config.rst:1083 msgid "" "Initialize configuration with the :ref:`Python Configuration `." msgstr "" +#: ../../c-api/init_config.rst:1088 msgid "" "Initialize configuration with the :ref:`Isolated Configuration `." msgstr "" +#: ../../c-api/init_config.rst:1093 msgid "Copy the wide character string *str* into ``*config_str``." msgstr "" +#: ../../c-api/init_config.rst:1095 ../../c-api/init_config.rst:1102 +#: ../../c-api/init_config.rst:1109 ../../c-api/init_config.rst:1117 +#: ../../c-api/init_config.rst:1123 ../../c-api/init_config.rst:1140 msgid ":ref:`Preinitialize Python ` if needed." msgstr "" +#: ../../c-api/init_config.rst:1099 msgid "" "Decode *str* using :c:func:`Py_DecodeLocale` and set the result into " "``*config_str``." msgstr "" +#: ../../c-api/init_config.rst:1106 msgid "" "Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " "from the *argv* list of wide character strings." msgstr "" +#: ../../c-api/init_config.rst:1113 msgid "" "Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " "from the *argv* list of bytes strings. Decode bytes using :c:func:" "`Py_DecodeLocale`." msgstr "" +#: ../../c-api/init_config.rst:1121 msgid "Set the list of wide strings *list* to *length* and *items*." msgstr "" +#: ../../c-api/init_config.rst:1127 msgid "Read all Python configuration." msgstr "" +#: ../../c-api/init_config.rst:1129 msgid "Fields which are already initialized are left unchanged." msgstr "" +#: ../../c-api/init_config.rst:1131 msgid "" "Fields for :ref:`path configuration ` are no longer " "calculated or modified when calling this function, as of Python 3.11." msgstr "" +#: ../../c-api/init_config.rst:1134 ../../c-api/init_config.rst:1696 msgid "" "The :c:func:`PyConfig_Read` function only parses :c:member:`PyConfig.argv` " "arguments once: :c:member:`PyConfig.parse_argv` is set to ``2`` after " @@ -1317,41 +1753,50 @@ msgid "" "as Python options." msgstr "" +#: ../../c-api/init_config.rst:1142 msgid "" "The :c:member:`PyConfig.argv` arguments are now only parsed once, :c:member:" "`PyConfig.parse_argv` is set to ``2`` after arguments are parsed, and " "arguments are only parsed if :c:member:`PyConfig.parse_argv` equals ``1``." msgstr "" +#: ../../c-api/init_config.rst:1148 msgid "" ":c:func:`PyConfig_Read` no longer calculates all paths, and so fields listed " "under :ref:`Python Path Configuration ` may no longer be " "updated until :c:func:`Py_InitializeFromConfig` is called." msgstr "" +#: ../../c-api/init_config.rst:1156 msgid "Release configuration memory." msgstr "" +#: ../../c-api/init_config.rst:1158 msgid "" "Most ``PyConfig`` methods :ref:`preinitialize Python ` if needed. " "In that case, the Python preinitialization configuration (:c:type:" -"`PyPreConfig`) in based on the :c:type:`PyConfig`. If configuration fields " +"`PyPreConfig`) is based on the :c:type:`PyConfig`. If configuration fields " "which are in common with :c:type:`PyPreConfig` are tuned, they must be set " "before calling a :c:type:`PyConfig` method:" msgstr "" +#: ../../c-api/init_config.rst:1164 msgid ":c:member:`PyConfig.dev_mode`" msgstr "" +#: ../../c-api/init_config.rst:1165 msgid ":c:member:`PyConfig.isolated`" msgstr "" +#: ../../c-api/init_config.rst:1166 msgid ":c:member:`PyConfig.parse_argv`" msgstr "" +#: ../../c-api/init_config.rst:1167 msgid ":c:member:`PyConfig.use_environment`" msgstr "" +#: ../../c-api/init_config.rst:1169 msgid "" "Moreover, if :c:func:`PyConfig_SetArgv` or :c:func:`PyConfig_SetBytesArgv` " "is used, this method must be called before other methods, since the " @@ -1359,11 +1804,13 @@ msgid "" "member:`~PyConfig.parse_argv` is non-zero)." msgstr "" +#: ../../c-api/init_config.rst:1174 msgid "" "The caller of these methods is responsible to handle exceptions (error or " "exit) using ``PyStatus_Exception()`` and ``Py_ExitStatusException()``." msgstr "" +#: ../../c-api/init_config.rst:1187 msgid "" "Set :data:`sys.argv` command line arguments based on :c:member:`~PyConfig." "argv`. These parameters are similar to those passed to the program's :c:" @@ -1373,346 +1820,449 @@ msgid "" "entry in :c:member:`~PyConfig.argv` can be an empty string." msgstr "" +#: ../../c-api/init_config.rst:1195 msgid "" "Set :c:member:`~PyConfig.parse_argv` to ``1`` to parse :c:member:`~PyConfig." "argv` the same way the regular Python parses Python command line arguments " "and then to strip Python arguments from :c:member:`~PyConfig.argv`." msgstr "" +#: ../../c-api/init_config.rst:1200 msgid "" "If :c:member:`~PyConfig.argv` is empty, an empty string is added to ensure " "that :data:`sys.argv` always exists and is never empty." msgstr "" +#: ../../c-api/init_config.rst:1203 ../../c-api/init_config.rst:1230 +#: ../../c-api/init_config.rst:1244 ../../c-api/init_config.rst:1254 +#: ../../c-api/init_config.rst:1370 ../../c-api/init_config.rst:1379 +#: ../../c-api/init_config.rst:1390 ../../c-api/init_config.rst:1481 +#: ../../c-api/init_config.rst:1637 ../../c-api/init_config.rst:1738 +#: ../../c-api/init_config.rst:1757 ../../c-api/init_config.rst:1772 +#: ../../c-api/init_config.rst:1789 ../../c-api/init_config.rst:1802 +#: ../../c-api/init_config.rst:1810 ../../c-api/init_config.rst:1824 +#: ../../c-api/init_config.rst:1927 msgid "Default: ``NULL``." msgstr "" +#: ../../c-api/init_config.rst:1205 msgid "See also the :c:member:`~PyConfig.orig_argv` member." msgstr "" +#: ../../c-api/init_config.rst:1209 msgid "" "If equals to zero, ``Py_RunMain()`` prepends a potentially unsafe path to :" "data:`sys.path` at startup:" msgstr "" +#: ../../c-api/init_config.rst:1212 msgid "" "If :c:member:`argv[0] ` is equal to ``L\"-m\"`` (``python -m " "module``), prepend the current working directory." msgstr "" +#: ../../c-api/init_config.rst:1214 msgid "" "If running a script (``python script.py``), prepend the script's directory. " "If it's a symbolic link, resolve symbolic links." msgstr "" +#: ../../c-api/init_config.rst:1216 msgid "" "Otherwise (``python -c code`` and ``python``), prepend an empty string, " "which means the current working directory." msgstr "" +#: ../../c-api/init_config.rst:1219 msgid "" "Set to ``1`` by the :option:`-P` command line option and the :envvar:" "`PYTHONSAFEPATH` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1222 msgid "Default: ``0`` in Python config, ``1`` in isolated config." msgstr "" +#: ../../c-api/init_config.rst:1228 msgid ":data:`sys.base_exec_prefix`." msgstr "" +#: ../../c-api/init_config.rst:1232 ../../c-api/init_config.rst:1246 +#: ../../c-api/init_config.rst:1256 ../../c-api/init_config.rst:1381 +#: ../../c-api/init_config.rst:1392 ../../c-api/init_config.rst:1654 +#: ../../c-api/init_config.rst:1740 msgid "Part of the :ref:`Python Path Configuration ` output." msgstr "" +#: ../../c-api/init_config.rst:1234 msgid "See also :c:member:`PyConfig.exec_prefix`." msgstr "" -msgid "Python base executable: :data:`sys._base_executable`." +#: ../../c-api/init_config.rst:1238 +msgid "Python base executable: ``sys._base_executable``." msgstr "" -msgid "Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable." +#: ../../c-api/init_config.rst:1240 +msgid "Set by the ``__PYVENV_LAUNCHER__`` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1242 msgid "Set from :c:member:`PyConfig.executable` if ``NULL``." msgstr "" +#: ../../c-api/init_config.rst:1248 msgid "See also :c:member:`PyConfig.executable`." msgstr "" +#: ../../c-api/init_config.rst:1252 msgid ":data:`sys.base_prefix`." msgstr "" +#: ../../c-api/init_config.rst:1258 msgid "See also :c:member:`PyConfig.prefix`." msgstr "" +#: ../../c-api/init_config.rst:1262 msgid "" "If equals to ``0`` and :c:member:`~PyConfig.configure_c_stdio` is non-zero, " "disable buffering on the C streams stdout and stderr." msgstr "" +#: ../../c-api/init_config.rst:1265 msgid "" "Set to ``0`` by the :option:`-u` command line option and the :envvar:" "`PYTHONUNBUFFERED` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1268 msgid "stdin is always opened in buffered mode." msgstr "" -msgid "Default: ``1``." -msgstr "" - +#: ../../c-api/init_config.rst:1274 msgid "" "If equals to ``1``, issue a warning when comparing :class:`bytes` or :class:" "`bytearray` with :class:`str`, or comparing :class:`bytes` with :class:`int`." msgstr "" +#: ../../c-api/init_config.rst:1278 msgid "" "If equal or greater to ``2``, raise a :exc:`BytesWarning` exception in these " "cases." msgstr "" +#: ../../c-api/init_config.rst:1281 msgid "Incremented by the :option:`-b` command line option." msgstr "" +#: ../../c-api/init_config.rst:1287 +msgid "" +"The :option:`-b` and :option:`!-bb` options will become no-op in 3.17. :c:" +"member:`~PyConfig.bytes_warning` member will be removed in 3.17." +msgstr "" + +#: ../../c-api/init_config.rst:1292 msgid "" "If non-zero, emit a :exc:`EncodingWarning` warning when :class:`io." "TextIOWrapper` uses its default encoding. See :ref:`io-encoding-warning` for " "details." msgstr "" +#: ../../c-api/init_config.rst:1301 msgid "" "If equals to ``0``, disables the inclusion of the end line and column " "mappings in code objects. Also disables traceback printing carets to " "specific error locations." msgstr "" +#: ../../c-api/init_config.rst:1305 msgid "" "Set to ``0`` by the :envvar:`PYTHONNODEBUGRANGES` environment variable and " "by the :option:`-X no_debug_ranges <-X>` command line option." msgstr "" +#: ../../c-api/init_config.rst:1314 msgid "" "Control the validation behavior of hash-based ``.pyc`` files: value of the :" "option:`--check-hash-based-pycs` command line option." msgstr "" +#: ../../c-api/init_config.rst:1317 msgid "Valid values:" msgstr "" +#: ../../c-api/init_config.rst:1319 msgid "" "``L\"always\"``: Hash the source file for invalidation regardless of value " "of the 'check_source' flag." msgstr "" +#: ../../c-api/init_config.rst:1321 msgid "``L\"never\"``: Assume that hash-based pycs always are valid." msgstr "" +#: ../../c-api/init_config.rst:1322 msgid "" "``L\"default\"``: The 'check_source' flag in hash-based pycs determines " "invalidation." msgstr "" +#: ../../c-api/init_config.rst:1325 msgid "Default: ``L\"default\"``." msgstr "" +#: ../../c-api/init_config.rst:1327 msgid "See also :pep:`552` \"Deterministic pycs\"." msgstr "" +#: ../../c-api/init_config.rst:1331 msgid "If non-zero, configure C standard streams:" msgstr "" +#: ../../c-api/init_config.rst:1333 msgid "" "On Windows, set the binary mode (``O_BINARY``) on stdin, stdout and stderr." msgstr "" +#: ../../c-api/init_config.rst:1335 msgid "" "If :c:member:`~PyConfig.buffered_stdio` equals zero, disable buffering of " "stdin, stdout and stderr streams." msgstr "" +#: ../../c-api/init_config.rst:1337 msgid "" "If :c:member:`~PyConfig.interactive` is non-zero, enable stream buffering on " "stdin and stdout (only stdout on Windows)." msgstr "" +#: ../../c-api/init_config.rst:1344 msgid "If non-zero, enable the :ref:`Python Development Mode `." msgstr "" +#: ../../c-api/init_config.rst:1346 msgid "" "Set to ``1`` by the :option:`-X dev <-X>` option and the :envvar:" "`PYTHONDEVMODE` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1353 msgid "Dump Python references?" msgstr "" +#: ../../c-api/init_config.rst:1355 msgid "If non-zero, dump all objects which are still alive at exit." msgstr "" +#: ../../c-api/init_config.rst:1357 msgid "Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1359 msgid "" "Needs a special build of Python with the ``Py_TRACE_REFS`` macro defined: " "see the :option:`configure --with-trace-refs option <--with-trace-refs>`." msgstr "" +#: ../../c-api/init_config.rst:1366 msgid "Filename where to dump Python references." msgstr "" +#: ../../c-api/init_config.rst:1368 msgid "Set by the :envvar:`PYTHONDUMPREFSFILE` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1376 msgid "" "The site-specific directory prefix where the platform-dependent Python files " "are installed: :data:`sys.exec_prefix`." msgstr "" +#: ../../c-api/init_config.rst:1383 msgid "See also :c:member:`PyConfig.base_exec_prefix`." msgstr "" +#: ../../c-api/init_config.rst:1387 msgid "" "The absolute path of the executable binary for the Python interpreter: :data:" "`sys.executable`." msgstr "" +#: ../../c-api/init_config.rst:1394 msgid "See also :c:member:`PyConfig.base_executable`." msgstr "" +#: ../../c-api/init_config.rst:1398 msgid "Enable faulthandler?" msgstr "" +#: ../../c-api/init_config.rst:1400 msgid "If non-zero, call :func:`faulthandler.enable` at startup." msgstr "" +#: ../../c-api/init_config.rst:1402 msgid "" "Set to ``1`` by :option:`-X faulthandler <-X>` and the :envvar:" "`PYTHONFAULTHANDLER` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1409 msgid "" ":term:`Filesystem encoding `: :func:" "`sys.getfilesystemencoding`." msgstr "" +#: ../../c-api/init_config.rst:1412 msgid "On macOS, Android and VxWorks: use ``\"utf-8\"`` by default." msgstr "" +#: ../../c-api/init_config.rst:1414 msgid "" "On Windows: use ``\"utf-8\"`` by default, or ``\"mbcs\"`` if :c:member:" "`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is non-" "zero." msgstr "" +#: ../../c-api/init_config.rst:1418 msgid "Default encoding on other platforms:" msgstr "" +#: ../../c-api/init_config.rst:1420 msgid "``\"utf-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." msgstr "" +#: ../../c-api/init_config.rst:1421 msgid "" "``\"ascii\"`` if Python detects that ``nl_langinfo(CODESET)`` announces the " "ASCII encoding, whereas the ``mbstowcs()`` function decodes from a different " "encoding (usually Latin1)." msgstr "" +#: ../../c-api/init_config.rst:1424 msgid "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string." msgstr "" +#: ../../c-api/init_config.rst:1425 msgid "" "Otherwise, use the :term:`locale encoding`: ``nl_langinfo(CODESET)`` result." msgstr "" +#: ../../c-api/init_config.rst:1428 msgid "" "At Python startup, the encoding name is normalized to the Python codec name. " "For example, ``\"ANSI_X3.4-1968\"`` is replaced with ``\"ascii\"``." msgstr "" +#: ../../c-api/init_config.rst:1431 msgid "See also the :c:member:`~PyConfig.filesystem_errors` member." msgstr "" +#: ../../c-api/init_config.rst:1435 msgid "" ":term:`Filesystem error handler `: :" "func:`sys.getfilesystemencodeerrors`." msgstr "" +#: ../../c-api/init_config.rst:1438 msgid "" "On Windows: use ``\"surrogatepass\"`` by default, or ``\"replace\"`` if :c:" "member:`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is " "non-zero." msgstr "" +#: ../../c-api/init_config.rst:1442 msgid "On other platforms: use ``\"surrogateescape\"`` by default." msgstr "" +#: ../../c-api/init_config.rst:1444 msgid "Supported error handlers:" msgstr "" +#: ../../c-api/init_config.rst:1446 msgid "``\"strict\"``" msgstr "" +#: ../../c-api/init_config.rst:1447 msgid "``\"surrogateescape\"``" msgstr "" +#: ../../c-api/init_config.rst:1448 msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)" msgstr "" +#: ../../c-api/init_config.rst:1450 msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member." msgstr "" +#: ../../c-api/init_config.rst:1454 msgid "If non-zero, use frozen modules." msgstr "" +#: ../../c-api/init_config.rst:1456 msgid "Set by the :envvar:`PYTHON_FROZEN_MODULES` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1458 msgid "" "Default: ``1`` in a release build, or ``0`` in a :ref:`debug build `." msgstr "" +#: ../../c-api/init_config.rst:1464 msgid "Randomized hash function seed." msgstr "" +#: ../../c-api/init_config.rst:1466 msgid "" "If :c:member:`~PyConfig.use_hash_seed` is zero, a seed is chosen randomly at " "Python startup, and :c:member:`~PyConfig.hash_seed` is ignored." msgstr "" +#: ../../c-api/init_config.rst:1469 msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1471 msgid "" "Default *use_hash_seed* value: ``-1`` in Python mode, ``0`` in isolated mode." msgstr "" +#: ../../c-api/init_config.rst:1476 msgid "" "Set the default Python \"home\" directory, that is, the location of the " "standard Python libraries (see :envvar:`PYTHONHOME`)." msgstr "" +#: ../../c-api/init_config.rst:1479 msgid "Set by the :envvar:`PYTHONHOME` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1483 ../../c-api/init_config.rst:1619 +#: ../../c-api/init_config.rst:1639 ../../c-api/init_config.rst:1728 +#: ../../c-api/init_config.rst:1759 msgid "Part of the :ref:`Python Path Configuration ` input." msgstr "" +#: ../../c-api/init_config.rst:1487 msgid "" "If ``1``, profile import time. If ``2``, include additional output that " "indicates when an imported module has already been loaded." msgstr "" +#: ../../c-api/init_config.rst:1491 msgid "" "Set by the :option:`-X importtime <-X>` option and the :envvar:" "`PYTHONPROFILEIMPORTTIME` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1498 msgid "Added support for ``import_time = 2``" msgstr "" +#: ../../c-api/init_config.rst:1502 msgid "Enter interactive mode after executing a script or a command." msgstr "" +#: ../../c-api/init_config.rst:1504 msgid "" "If greater than ``0``, enable inspect: when a script is passed as first " "argument or the -c option is used, enter interactive mode after executing " @@ -1720,23 +2270,30 @@ msgid "" "a terminal." msgstr "" +#: ../../c-api/init_config.rst:1509 msgid "" "Incremented by the :option:`-i` command line option. Set to ``1`` if the :" "envvar:`PYTHONINSPECT` environment variable is non-empty." msgstr "" +#: ../../c-api/init_config.rst:1516 msgid "Install Python signal handlers?" msgstr "" +#: ../../c-api/init_config.rst:1518 ../../c-api/init_config.rst:1702 +#: ../../c-api/init_config.rst:1726 ../../c-api/init_config.rst:1962 msgid "Default: ``1`` in Python mode, ``0`` in isolated mode." msgstr "" +#: ../../c-api/init_config.rst:1522 msgid "If greater than ``0``, enable the interactive mode (REPL)." msgstr "" +#: ../../c-api/init_config.rst:1524 msgid "Incremented by the :option:`-i` command line option." msgstr "" +#: ../../c-api/init_config.rst:1530 msgid "" "Configures the :ref:`integer string conversion length limitation " "`. An initial value of ``-1`` means the value will be " @@ -1746,101 +2303,123 @@ msgid "" "str_digits_check_threshold`) are unsupported and will produce an error." msgstr "" +#: ../../c-api/init_config.rst:1538 msgid "" "Configured by the :option:`-X int_max_str_digits <-X>` command line flag or " "the :envvar:`PYTHONINTMAXSTRDIGITS` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1541 msgid "" "Default: ``-1`` in Python mode. 4300 (:data:`sys.int_info." "default_max_str_digits`) in isolated mode." msgstr "" +#: ../../c-api/init_config.rst:1548 msgid "" "If the value of :c:member:`~PyConfig.cpu_count` is not ``-1`` then it will " "override the return values of :func:`os.cpu_count`, :func:`os." "process_cpu_count`, and :func:`multiprocessing.cpu_count`." msgstr "" +#: ../../c-api/init_config.rst:1552 msgid "" "Configured by the :samp:`-X cpu_count={n|default}` command line flag or the :" "envvar:`PYTHON_CPU_COUNT` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1555 ../../c-api/init_config.rst:1916 msgid "Default: ``-1``." msgstr "" +#: ../../c-api/init_config.rst:1561 msgid "If greater than ``0``, enable isolated mode:" msgstr "" +#: ../../c-api/init_config.rst:1563 msgid "" "Set :c:member:`~PyConfig.safe_path` to ``1``: don't prepend a potentially " "unsafe path to :data:`sys.path` at Python startup, such as the current " "directory, the script's directory or an empty string." msgstr "" +#: ../../c-api/init_config.rst:1567 msgid "" "Set :c:member:`~PyConfig.use_environment` to ``0``: ignore ``PYTHON`` " "environment variables." msgstr "" +#: ../../c-api/init_config.rst:1569 msgid "" "Set :c:member:`~PyConfig.user_site_directory` to ``0``: don't add the user " "site directory to :data:`sys.path`." msgstr "" +#: ../../c-api/init_config.rst:1571 msgid "" "Python REPL doesn't import :mod:`readline` nor enable default readline " "configuration on interactive prompts." msgstr "" +#: ../../c-api/init_config.rst:1574 msgid "Set to ``1`` by the :option:`-I` command line option." msgstr "" +#: ../../c-api/init_config.rst:1578 msgid "" "See also the :ref:`Isolated Configuration ` and :c:" "member:`PyPreConfig.isolated`." msgstr "" +#: ../../c-api/init_config.rst:1583 msgid "" "If non-zero, use :class:`io.FileIO` instead of :class:`!io." "_WindowsConsoleIO` for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys." "stderr`." msgstr "" +#: ../../c-api/init_config.rst:1587 msgid "" "Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " "is set to a non-empty string." msgstr "" +#: ../../c-api/init_config.rst:1595 msgid "See also the :pep:`528` (Change Windows console encoding to UTF-8)." msgstr "" +#: ../../c-api/init_config.rst:1599 msgid "" "If non-zero, dump statistics on :ref:`Python pymalloc memory allocator " "` at exit." msgstr "" +#: ../../c-api/init_config.rst:1602 msgid "Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1604 msgid "" "The option is ignored if Python is :option:`configured using the --without-" "pymalloc option <--without-pymalloc>`." msgstr "" +#: ../../c-api/init_config.rst:1611 msgid "Platform library directory name: :data:`sys.platlibdir`." msgstr "" +#: ../../c-api/init_config.rst:1613 msgid "Set by the :envvar:`PYTHONPLATLIBDIR` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1615 msgid "" "Default: value of the ``PLATLIBDIR`` macro which is set by the :option:" "`configure --with-platlibdir option <--with-platlibdir>` (default: " "``\"lib\"``, or ``\"DLLs\"`` on Windows)." msgstr "" +#: ../../c-api/init_config.rst:1623 msgid "" "This macro is now used on Windows to locate the standard library extension " "modules, typically under ``DLLs``. However, for compatibility, note that " @@ -1848,17 +2427,21 @@ msgid "" "and virtual environments." msgstr "" +#: ../../c-api/init_config.rst:1632 msgid "" "Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` (:" "data:`os.pathsep`)." msgstr "" +#: ../../c-api/init_config.rst:1635 msgid "Set by the :envvar:`PYTHONPATH` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1644 msgid "Module search paths: :data:`sys.path`." msgstr "" +#: ../../c-api/init_config.rst:1646 msgid "" "If :c:member:`~PyConfig.module_search_paths_set` is equal to ``0``, :c:func:" "`Py_InitializeFromConfig` will replace :c:member:`~PyConfig." @@ -1866,33 +2449,41 @@ msgid "" "to ``1``." msgstr "" +#: ../../c-api/init_config.rst:1651 msgid "" "Default: empty list (``module_search_paths``) and ``0`` " "(``module_search_paths_set``)." msgstr "" +#: ../../c-api/init_config.rst:1658 msgid "Compilation optimization level:" msgstr "" +#: ../../c-api/init_config.rst:1660 msgid "``0``: Peephole optimizer, set ``__debug__`` to ``True``." msgstr "" +#: ../../c-api/init_config.rst:1661 msgid "``1``: Level 0, remove assertions, set ``__debug__`` to ``False``." msgstr "" +#: ../../c-api/init_config.rst:1662 msgid "``2``: Level 1, strip docstrings." msgstr "" +#: ../../c-api/init_config.rst:1664 msgid "" "Incremented by the :option:`-O` command line option. Set to the :envvar:" "`PYTHONOPTIMIZE` environment variable value." msgstr "" +#: ../../c-api/init_config.rst:1671 msgid "" "The list of the original command line arguments passed to the Python " "executable: :data:`sys.orig_argv`." msgstr "" +#: ../../c-api/init_config.rst:1674 msgid "" "If :c:member:`~PyConfig.orig_argv` list is empty and :c:member:`~PyConfig." "argv` is not a list only containing an empty string, :c:func:`PyConfig_Read` " @@ -1901,354 +2492,440 @@ msgid "" "parse_argv` is non-zero)." msgstr "" +#: ../../c-api/init_config.rst:1681 msgid "" "See also the :c:member:`~PyConfig.argv` member and the :c:func:" "`Py_GetArgcArgv` function." msgstr "" +#: ../../c-api/init_config.rst:1684 ../../c-api/init_config.rst:1996 +#: ../../c-api/init_config.rst:2015 msgid "Default: empty list." msgstr "" +#: ../../c-api/init_config.rst:1690 msgid "Parse command line arguments?" msgstr "" +#: ../../c-api/init_config.rst:1692 msgid "" "If equals to ``1``, parse :c:member:`~PyConfig.argv` the same way the " "regular Python parses :ref:`command line arguments `, and " "strip Python arguments from :c:member:`~PyConfig.argv`." msgstr "" +#: ../../c-api/init_config.rst:1704 msgid "" "The :c:member:`PyConfig.argv` arguments are now only parsed if :c:member:" "`PyConfig.parse_argv` equals to ``1``." msgstr "" +#: ../../c-api/init_config.rst:1710 msgid "" "Parser debug mode. If greater than ``0``, turn on parser debugging output " "(for expert only, depending on compilation options)." msgstr "" +#: ../../c-api/init_config.rst:1713 msgid "" "Incremented by the :option:`-d` command line option. Set to the :envvar:" "`PYTHONDEBUG` environment variable value." msgstr "" +#: ../../c-api/init_config.rst:1716 ../../c-api/init_config.rst:1821 msgid "" "Needs a :ref:`debug build of Python ` (the ``Py_DEBUG`` macro " "must be defined)." msgstr "" +#: ../../c-api/init_config.rst:1723 msgid "" "If non-zero, calculation of path configuration is allowed to log warnings " "into ``stderr``. If equals to ``0``, suppress these warnings." msgstr "" +#: ../../c-api/init_config.rst:1730 msgid "Now also applies on Windows." msgstr "" +#: ../../c-api/init_config.rst:1735 msgid "" "The site-specific directory prefix where the platform independent Python " "files are installed: :data:`sys.prefix`." msgstr "" +#: ../../c-api/init_config.rst:1742 msgid "See also :c:member:`PyConfig.base_prefix`." msgstr "" +#: ../../c-api/init_config.rst:1746 msgid "" "Program name used to initialize :c:member:`~PyConfig.executable` and in " "early error messages during Python initialization." msgstr "" +#: ../../c-api/init_config.rst:1749 msgid "On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set." msgstr "" +#: ../../c-api/init_config.rst:1750 msgid "" -"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use :envvar:" -"`__PYVENV_LAUNCHER__` environment variable if set." +"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use ``__PYVENV_LAUNCHER__`` " +"environment variable if set." msgstr "" +#: ../../c-api/init_config.rst:1752 msgid "" "Use ``argv[0]`` of :c:member:`~PyConfig.argv` if available and non-empty." msgstr "" +#: ../../c-api/init_config.rst:1754 msgid "" "Otherwise, use ``L\"python\"`` on Windows, or ``L\"python3\"`` on other " "platforms." msgstr "" +#: ../../c-api/init_config.rst:1763 msgid "" "Directory where cached ``.pyc`` files are written: :data:`sys." "pycache_prefix`." msgstr "" +#: ../../c-api/init_config.rst:1766 msgid "" "Set by the :option:`-X pycache_prefix=PATH <-X>` command line option and " "the :envvar:`PYTHONPYCACHEPREFIX` environment variable. The command-line " "option takes precedence." msgstr "" +#: ../../c-api/init_config.rst:1770 msgid "If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``." msgstr "" +#: ../../c-api/init_config.rst:1776 msgid "" "Quiet mode. If greater than ``0``, don't display the copyright and version " "at Python startup in interactive mode." msgstr "" +#: ../../c-api/init_config.rst:1779 msgid "Incremented by the :option:`-q` command line option." msgstr "" +#: ../../c-api/init_config.rst:1785 msgid "Value of the :option:`-c` command line option." msgstr "" +#: ../../c-api/init_config.rst:1787 ../../c-api/init_config.rst:1808 msgid "Used by :c:func:`Py_RunMain`." msgstr "" +#: ../../c-api/init_config.rst:1793 msgid "" "Filename passed on the command line: trailing command line argument without :" "option:`-c` or :option:`-m`. It is used by the :c:func:`Py_RunMain` function." msgstr "" +#: ../../c-api/init_config.rst:1797 msgid "" "For example, it is set to ``script.py`` by the ``python3 script.py arg`` " "command line." msgstr "" +#: ../../c-api/init_config.rst:1800 msgid "See also the :c:member:`PyConfig.skip_source_first_line` option." msgstr "" +#: ../../c-api/init_config.rst:1806 msgid "Value of the :option:`-m` command line option." msgstr "" +#: ../../c-api/init_config.rst:1814 msgid "" -"``package.module`` path to module that should be imported before ``site.py`` " -"is run." +"``module`` or ``module:func`` entry point that should be executed before " +"the :mod:`site` module is imported." msgstr "" +#: ../../c-api/init_config.rst:1817 msgid "" -"Set by the :option:`-X presite=package.module <-X>` command-line option and " +"Set by the :option:`-X presite=module:func <-X>` command-line option and " "the :envvar:`PYTHON_PRESITE` environment variable. The command-line option " "takes precedence." msgstr "" +#: ../../c-api/init_config.rst:1828 msgid "" "Show total reference count at exit (excluding :term:`immortal` objects)?" msgstr "" +#: ../../c-api/init_config.rst:1830 msgid "Set to ``1`` by :option:`-X showrefcount <-X>` command line option." msgstr "" +#: ../../c-api/init_config.rst:1832 msgid "" "Needs a :ref:`debug build of Python ` (the ``Py_REF_DEBUG`` " "macro must be defined)." msgstr "" +#: ../../c-api/init_config.rst:1839 msgid "Import the :mod:`site` module at startup?" msgstr "" +#: ../../c-api/init_config.rst:1841 msgid "" "If equal to zero, disable the import of the module site and the site-" "dependent manipulations of :data:`sys.path` that it entails." msgstr "" +#: ../../c-api/init_config.rst:1844 msgid "" "Also disable these manipulations if the :mod:`site` module is explicitly " "imported later (call :func:`site.main` if you want them to be triggered)." msgstr "" +#: ../../c-api/init_config.rst:1847 msgid "Set to ``0`` by the :option:`-S` command line option." msgstr "" +#: ../../c-api/init_config.rst:1849 msgid "" ":data:`sys.flags.no_site ` is set to the inverted value of :c:" "member:`~PyConfig.site_import`." msgstr "" +#: ../../c-api/init_config.rst:1856 msgid "" "If non-zero, skip the first line of the :c:member:`PyConfig.run_filename` " "source." msgstr "" +#: ../../c-api/init_config.rst:1859 msgid "" "It allows the usage of non-Unix forms of ``#!cmd``. This is intended for a " "DOS specific hack only." msgstr "" +#: ../../c-api/init_config.rst:1862 msgid "Set to ``1`` by the :option:`-x` command line option." msgstr "" +#: ../../c-api/init_config.rst:1869 msgid "" "Encoding and encoding errors of :data:`sys.stdin`, :data:`sys.stdout` and :" "data:`sys.stderr` (but :data:`sys.stderr` always uses " "``\"backslashreplace\"`` error handler)." msgstr "" +#: ../../c-api/init_config.rst:1873 msgid "" "Use the :envvar:`PYTHONIOENCODING` environment variable if it is non-empty." msgstr "" +#: ../../c-api/init_config.rst:1876 msgid "Default encoding:" msgstr "" +#: ../../c-api/init_config.rst:1878 msgid "``\"UTF-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." msgstr "" +#: ../../c-api/init_config.rst:1879 msgid "Otherwise, use the :term:`locale encoding`." msgstr "" +#: ../../c-api/init_config.rst:1881 msgid "Default error handler:" msgstr "" +#: ../../c-api/init_config.rst:1883 msgid "On Windows: use ``\"surrogateescape\"``." msgstr "" +#: ../../c-api/init_config.rst:1884 msgid "" "``\"surrogateescape\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero, or " "if the LC_CTYPE locale is \"C\" or \"POSIX\"." msgstr "" +#: ../../c-api/init_config.rst:1886 msgid "``\"strict\"`` otherwise." msgstr "" +#: ../../c-api/init_config.rst:1888 msgid "See also :c:member:`PyConfig.legacy_windows_stdio`." msgstr "" +#: ../../c-api/init_config.rst:1892 msgid "Enable tracemalloc?" msgstr "" +#: ../../c-api/init_config.rst:1894 msgid "If non-zero, call :func:`tracemalloc.start` at startup." msgstr "" +#: ../../c-api/init_config.rst:1896 msgid "" "Set by :option:`-X tracemalloc=N <-X>` command line option and by the :" "envvar:`PYTHONTRACEMALLOC` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1903 msgid "Enable the Linux ``perf`` profiler support?" msgstr "" +#: ../../c-api/init_config.rst:1905 msgid "If equals to ``1``, enable support for the Linux ``perf`` profiler." msgstr "" +#: ../../c-api/init_config.rst:1907 msgid "" "If equals to ``2``, enable support for the Linux ``perf`` profiler with " "DWARF JIT support." msgstr "" +#: ../../c-api/init_config.rst:1910 msgid "" "Set to ``1`` by :option:`-X perf <-X>` command-line option and the :envvar:" "`PYTHONPERFSUPPORT` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1913 msgid "" "Set to ``2`` by the :option:`-X perf_jit <-X>` command-line option and the :" "envvar:`PYTHON_PERF_JIT_SUPPORT` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1919 msgid "See :ref:`perf_profiling` for more information." msgstr "" +#: ../../c-api/init_config.rst:1925 msgid "Directory of the Python standard library." msgstr "" +#: ../../c-api/init_config.rst:1933 msgid "Use :ref:`environment variables `?" msgstr "" +#: ../../c-api/init_config.rst:1935 msgid "" "If equals to zero, ignore the :ref:`environment variables `." msgstr "" +#: ../../c-api/init_config.rst:1938 msgid "Set to ``0`` by the :option:`-E` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1944 msgid "" "If non-zero, ``stdout`` and ``stderr`` will be redirected to the system log." msgstr "" +#: ../../c-api/init_config.rst:1947 msgid "Only available on macOS 10.12 and later, and on iOS." msgstr "" +#: ../../c-api/init_config.rst:1949 msgid "" "Default: ``0`` (don't use the system log) on macOS; ``1`` on iOS (use the " "system log)." msgstr "" +#: ../../c-api/init_config.rst:1956 msgid "If non-zero, add the user site directory to :data:`sys.path`." msgstr "" +#: ../../c-api/init_config.rst:1958 msgid "Set to ``0`` by the :option:`-s` and :option:`-I` command line options." msgstr "" +#: ../../c-api/init_config.rst:1960 msgid "Set to ``0`` by the :envvar:`PYTHONNOUSERSITE` environment variable." msgstr "" +#: ../../c-api/init_config.rst:1966 msgid "" "Verbose mode. If greater than ``0``, print a message each time a module is " "imported, showing the place (filename or built-in module) from which it is " "loaded." msgstr "" +#: ../../c-api/init_config.rst:1970 msgid "" "If greater than or equal to ``2``, print a message for each file that is " "checked for when searching for a module. Also provides information on module " "cleanup at exit." msgstr "" +#: ../../c-api/init_config.rst:1974 msgid "Incremented by the :option:`-v` command line option." msgstr "" +#: ../../c-api/init_config.rst:1976 msgid "Set by the :envvar:`PYTHONVERBOSE` environment variable value." msgstr "" +#: ../../c-api/init_config.rst:1982 msgid "" "Options of the :mod:`warnings` module to build warnings filters, lowest to " "highest priority: :data:`sys.warnoptions`." msgstr "" +#: ../../c-api/init_config.rst:1985 msgid "" "The :mod:`warnings` module adds :data:`sys.warnoptions` in the reverse " "order: the last :c:member:`PyConfig.warnoptions` item becomes the first item " -"of :data:`warnings.filters` which is checked first (highest priority)." +"of ``warnings.filters`` which is checked first (highest priority)." msgstr "" +#: ../../c-api/init_config.rst:1989 msgid "" "The :option:`-W` command line options adds its value to :c:member:`~PyConfig." "warnoptions`, it can be used multiple times." msgstr "" +#: ../../c-api/init_config.rst:1992 msgid "" "The :envvar:`PYTHONWARNINGS` environment variable can also be used to add " "warning options. Multiple options can be specified, separated by commas (``," "``)." msgstr "" +#: ../../c-api/init_config.rst:2000 msgid "" "If equal to ``0``, Python won't try to write ``.pyc`` files on the import of " "source modules." msgstr "" +#: ../../c-api/init_config.rst:2003 msgid "" "Set to ``0`` by the :option:`-B` command line option and the :envvar:" "`PYTHONDONTWRITEBYTECODE` environment variable." msgstr "" +#: ../../c-api/init_config.rst:2006 msgid "" ":data:`sys.dont_write_bytecode` is initialized to the inverted value of :c:" "member:`~PyConfig.write_bytecode`." msgstr "" +#: ../../c-api/init_config.rst:2013 msgid "Values of the :option:`-X` command line options: :data:`sys._xoptions`." msgstr "" +#: ../../c-api/init_config.rst:2019 msgid "If non-zero, write performance statistics at Python exit." msgstr "" +#: ../../c-api/init_config.rst:2021 msgid "" "Need a special build with the ``Py_STATS`` macro: see :option:`--enable-" "pystats`." msgstr "" +#: ../../c-api/init_config.rst:2026 msgid "" "If :c:member:`~PyConfig.parse_argv` is non-zero, :c:member:`~PyConfig.argv` " "arguments are parsed the same way the regular Python parses :ref:`command " @@ -2256,22 +2933,27 @@ msgid "" "c:member:`~PyConfig.argv`." msgstr "" +#: ../../c-api/init_config.rst:2031 msgid "" "The :c:member:`~PyConfig.xoptions` options are parsed to set other options: " "see the :option:`-X` command line option." msgstr "" +#: ../../c-api/init_config.rst:2036 msgid "The ``show_alloc_count`` field has been removed." msgstr "" +#: ../../c-api/init_config.rst:2042 msgid "Initialization with PyConfig" msgstr "" +#: ../../c-api/init_config.rst:2044 msgid "" "Initializing the interpreter from a populated configuration struct is " "handled by calling :c:func:`Py_InitializeFromConfig`." msgstr "" +#: ../../c-api/init_config.rst:2050 msgid "" "If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` or :c:" "func:`PyImport_ExtendInittab` are used, they must be set or called after " @@ -2280,14 +2962,17 @@ msgid "" "`PyImport_ExtendInittab` must be called before each Python initialization." msgstr "" +#: ../../c-api/init_config.rst:2057 msgid "" "The current configuration (``PyConfig`` type) is stored in " "``PyInterpreterState.config``." msgstr "" +#: ../../c-api/init_config.rst:2060 msgid "Example setting the program name::" msgstr "" +#: ../../c-api/init_config.rst:2062 msgid "" "void init_python(void)\n" "{\n" @@ -2316,6 +3001,7 @@ msgid "" "}" msgstr "" +#: ../../c-api/init_config.rst:2088 msgid "" "More complete example modifying the default configuration, read the " "configuration, and then override some parameters. Note that since 3.11, many " @@ -2324,6 +3010,7 @@ msgid "" "called will be left unchanged by initialization::" msgstr "" +#: ../../c-api/init_config.rst:2095 msgid "" "PyStatus init_python(const char *program_name)\n" "{\n" @@ -2350,7 +3037,7 @@ msgid "" "\n" " /* Specify sys.path explicitly */\n" " /* If you want to modify the default set of paths, finish\n" -" initialization first and then use PySys_GetObject(\"path\") */\n" +" initialization first and then use PySys_GetAttrString(\"path\") */\n" " config.module_search_paths_set = 1;\n" " status = PyWideStringList_Append(&config.module_search_paths,\n" " L\"/path/to/stdlib\");\n" @@ -2378,15 +3065,18 @@ msgid "" "}" msgstr "" +#: ../../c-api/init_config.rst:2151 msgid "Isolated Configuration" msgstr "" +#: ../../c-api/init_config.rst:2153 msgid "" ":c:func:`PyPreConfig_InitIsolatedConfig` and :c:func:" "`PyConfig_InitIsolatedConfig` functions create a configuration to isolate " "Python from the system. For example, to embed Python into an application." msgstr "" +#: ../../c-api/init_config.rst:2158 msgid "" "This configuration ignores global configuration variables, environment " "variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) " @@ -2394,99 +3084,125 @@ msgid "" "LC_CTYPE locale are left unchanged. Signal handlers are not installed." msgstr "" +#: ../../c-api/init_config.rst:2163 msgid "" "Configuration files are still used with this configuration to determine " "paths that are unspecified. Ensure :c:member:`PyConfig.home` is specified to " "avoid computing the default path configuration." msgstr "" +#: ../../c-api/init_config.rst:2171 msgid "Python Configuration" msgstr "" +#: ../../c-api/init_config.rst:2173 msgid "" ":c:func:`PyPreConfig_InitPythonConfig` and :c:func:" "`PyConfig_InitPythonConfig` functions create a configuration to build a " "customized Python which behaves as the regular Python." msgstr "" +#: ../../c-api/init_config.rst:2177 msgid "" "Environments variables and command line arguments are used to configure " "Python, whereas global configuration variables are ignored." msgstr "" +#: ../../c-api/init_config.rst:2180 msgid "" "This function enables C locale coercion (:pep:`538`) and :ref:`Python UTF-8 " "Mode ` (:pep:`540`) depending on the LC_CTYPE locale, :envvar:" "`PYTHONUTF8` and :envvar:`PYTHONCOERCECLOCALE` environment variables." msgstr "" +#: ../../c-api/init_config.rst:2189 msgid "Python Path Configuration" msgstr "" +#: ../../c-api/init_config.rst:2191 msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:" msgstr "" +#: ../../c-api/init_config.rst:2193 msgid "Path configuration inputs:" msgstr "" +#: ../../c-api/init_config.rst:2195 msgid ":c:member:`PyConfig.home`" msgstr "" +#: ../../c-api/init_config.rst:2196 msgid ":c:member:`PyConfig.platlibdir`" msgstr "" +#: ../../c-api/init_config.rst:2197 msgid ":c:member:`PyConfig.pathconfig_warnings`" msgstr "" +#: ../../c-api/init_config.rst:2198 msgid ":c:member:`PyConfig.program_name`" msgstr "" +#: ../../c-api/init_config.rst:2199 msgid ":c:member:`PyConfig.pythonpath_env`" msgstr "" +#: ../../c-api/init_config.rst:2200 msgid "current working directory: to get absolute paths" msgstr "" +#: ../../c-api/init_config.rst:2201 msgid "" "``PATH`` environment variable to get the program full path (from :c:member:" "`PyConfig.program_name`)" msgstr "" +#: ../../c-api/init_config.rst:2203 msgid "``__PYVENV_LAUNCHER__`` environment variable" msgstr "" +#: ../../c-api/init_config.rst:2204 msgid "" "(Windows only) Application paths in the registry under " "\"Software\\Python\\PythonCore\\X.Y\\PythonPath\" of HKEY_CURRENT_USER and " "HKEY_LOCAL_MACHINE (where X.Y is the Python version)." msgstr "" +#: ../../c-api/init_config.rst:2208 msgid "Path configuration output fields:" msgstr "" +#: ../../c-api/init_config.rst:2210 msgid ":c:member:`PyConfig.base_exec_prefix`" msgstr "" +#: ../../c-api/init_config.rst:2211 msgid ":c:member:`PyConfig.base_executable`" msgstr "" +#: ../../c-api/init_config.rst:2212 msgid ":c:member:`PyConfig.base_prefix`" msgstr "" +#: ../../c-api/init_config.rst:2213 msgid ":c:member:`PyConfig.exec_prefix`" msgstr "" +#: ../../c-api/init_config.rst:2214 msgid ":c:member:`PyConfig.executable`" msgstr "" +#: ../../c-api/init_config.rst:2215 msgid "" ":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig." "module_search_paths`" msgstr "" +#: ../../c-api/init_config.rst:2217 msgid ":c:member:`PyConfig.prefix`" msgstr "" +#: ../../c-api/init_config.rst:2219 msgid "" "If at least one \"output field\" is not set, Python calculates the path " "configuration to fill unset fields. If :c:member:`~PyConfig." @@ -2495,6 +3211,7 @@ msgid "" "module_search_paths_set` is set to ``1``." msgstr "" +#: ../../c-api/init_config.rst:2225 msgid "" "It is possible to completely ignore the function calculating the default " "path configuration by setting explicitly all path configuration output " @@ -2504,43 +3221,52 @@ msgid "" "modification." msgstr "" +#: ../../c-api/init_config.rst:2232 msgid "" "Set :c:member:`~PyConfig.pathconfig_warnings` to ``0`` to suppress warnings " "when calculating the path configuration (Unix only, Windows does not log any " "warning)." msgstr "" +#: ../../c-api/init_config.rst:2235 msgid "" "If :c:member:`~PyConfig.base_prefix` or :c:member:`~PyConfig." "base_exec_prefix` fields are not set, they inherit their value from :c:" "member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` respectively." msgstr "" +#: ../../c-api/init_config.rst:2239 msgid ":c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`:" msgstr "" +#: ../../c-api/init_config.rst:2241 msgid "" "If :c:member:`~PyConfig.run_filename` is set and is a directory which " "contains a ``__main__.py`` script, prepend :c:member:`~PyConfig." "run_filename` to :data:`sys.path`." msgstr "" +#: ../../c-api/init_config.rst:2244 msgid "If :c:member:`~PyConfig.isolated` is zero:" msgstr "" +#: ../../c-api/init_config.rst:2246 msgid "" "If :c:member:`~PyConfig.run_module` is set, prepend the current directory " "to :data:`sys.path`. Do nothing if the current directory cannot be read." msgstr "" +#: ../../c-api/init_config.rst:2248 msgid "" "If :c:member:`~PyConfig.run_filename` is set, prepend the directory of the " "filename to :data:`sys.path`." msgstr "" +#: ../../c-api/init_config.rst:2250 msgid "Otherwise, prepend an empty string to :data:`sys.path`." msgstr "" +#: ../../c-api/init_config.rst:2252 msgid "" "If :c:member:`~PyConfig.site_import` is non-zero, :data:`sys.path` can be " "modified by the :mod:`site` module. If :c:member:`~PyConfig." @@ -2549,33 +3275,47 @@ msgid "" "data:`sys.path`." msgstr "" +#: ../../c-api/init_config.rst:2258 msgid "The following configuration files are used by the path configuration:" msgstr "" +#: ../../c-api/init_config.rst:2260 msgid "``pyvenv.cfg``" msgstr "" +#: ../../c-api/init_config.rst:2261 msgid "``._pth`` file (ex: ``python._pth``)" msgstr "" +#: ../../c-api/init_config.rst:2262 msgid "``pybuilddir.txt`` (Unix only)" msgstr "" +#: ../../c-api/init_config.rst:2264 msgid "If a ``._pth`` file is present:" msgstr "" +#: ../../c-api/init_config.rst:2266 msgid "Set :c:member:`~PyConfig.isolated` to ``1``." msgstr "" +#: ../../c-api/init_config.rst:2267 msgid "Set :c:member:`~PyConfig.use_environment` to ``0``." msgstr "" +#: ../../c-api/init_config.rst:2268 msgid "Set :c:member:`~PyConfig.site_import` to ``0``." msgstr "" +#: ../../c-api/init_config.rst:2269 +msgid "Set :c:member:`~PyConfig.user_site_directory` to ``0`` (since 3.15)." +msgstr "" + +#: ../../c-api/init_config.rst:2270 msgid "Set :c:member:`~PyConfig.safe_path` to ``1``." msgstr "" +#: ../../c-api/init_config.rst:2272 msgid "" "If :c:member:`~PyConfig.home` is not set and a ``pyvenv.cfg`` file is " "present in the same directory as :c:member:`~PyConfig.executable`, or its " @@ -2586,43 +3326,190 @@ msgid "" "more information." msgstr "" +#: ../../c-api/init_config.rst:2280 msgid "" "The ``__PYVENV_LAUNCHER__`` environment variable is used to set :c:member:" "`PyConfig.base_executable`." msgstr "" +#: ../../c-api/init_config.rst:2285 msgid "" ":c:member:`~PyConfig.prefix`, and :c:member:`~PyConfig.exec_prefix`, are now " "set to the ``pyvenv.cfg`` directory. This was previously done by :mod:" "`site`, therefore affected by :option:`-S`." msgstr "" +#: ../../c-api/init_config.rst:2292 +msgid "" +":c:member:`~PyConfig.user_site_directory` is now set to ``0`` when a ``." +"_pth`` file is present." +msgstr "" + +#: ../../c-api/init_config.rst:2297 msgid "Py_GetArgcArgv()" msgstr "" +#: ../../c-api/init_config.rst:2301 msgid "Get the original command line arguments, before Python modified them." msgstr "" +#: ../../c-api/init_config.rst:2303 msgid "See also :c:member:`PyConfig.orig_argv` member." msgstr "" -msgid "Delaying main module execution" +#: ../../c-api/init_config.rst:2307 +msgid "Multi-Phase Initialization Private Provisional API" msgstr "" +#: ../../c-api/init_config.rst:2309 msgid "" -"In some embedding use cases, it may be desirable to separate interpreter " -"initialization from the execution of the main module." +"This section is a private provisional API introducing multi-phase " +"initialization, the core feature of :pep:`432`:" +msgstr "" + +#: ../../c-api/init_config.rst:2312 +msgid "\"Core\" initialization phase, \"bare minimum Python\":" +msgstr "" + +#: ../../c-api/init_config.rst:2314 +msgid "Builtin types;" msgstr "" +#: ../../c-api/init_config.rst:2315 +msgid "Builtin exceptions;" +msgstr "" + +#: ../../c-api/init_config.rst:2316 +msgid "Builtin and frozen modules;" +msgstr "" + +#: ../../c-api/init_config.rst:2317 +msgid "" +"The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` " +"doesn't exist yet)." +msgstr "" + +#: ../../c-api/init_config.rst:2320 +msgid "\"Main\" initialization phase, Python is fully initialized:" +msgstr "" + +#: ../../c-api/init_config.rst:2322 +msgid "Install and configure :mod:`importlib`;" +msgstr "" + +#: ../../c-api/init_config.rst:2323 +msgid "Apply the :ref:`Path Configuration `;" +msgstr "" + +#: ../../c-api/init_config.rst:2324 +msgid "Install signal handlers;" +msgstr "" + +#: ../../c-api/init_config.rst:2325 msgid "" -"This separation can be achieved by setting ``PyConfig.run_command`` to the " -"empty string during initialization (to prevent the interpreter from dropping " -"into the interactive prompt), and then subsequently executing the desired " -"main module code using ``__main__.__dict__`` as the global namespace." +"Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and :" +"data:`sys.path`);" +msgstr "" + +#: ../../c-api/init_config.rst:2327 +msgid "" +"Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" +msgstr "" + +#: ../../c-api/init_config.rst:2328 +msgid "Import the :mod:`site` module;" +msgstr "" + +#: ../../c-api/init_config.rst:2329 +msgid "etc." +msgstr "" + +#: ../../c-api/init_config.rst:2331 +msgid "Private provisional API:" +msgstr "" + +#: ../../c-api/init_config.rst:2335 +msgid "" +"If set to ``0``, :c:func:`Py_InitializeFromConfig` stops at the \"Core\" " +"initialization phase." +msgstr "" + +#: ../../c-api/init_config.rst:2340 +msgid "" +"Move to the \"Main\" initialization phase, finish the Python initialization." +msgstr "" + +#: ../../c-api/init_config.rst:2342 +msgid "" +"No module is imported during the \"Core\" phase and the ``importlib`` module " +"is not configured: the :ref:`Path Configuration ` is only " +"applied during the \"Main\" phase. It may allow to customize Python in " +"Python to override or tune the :ref:`Path Configuration `, " +"maybe install a custom :data:`sys.meta_path` importer or an import hook, etc." +msgstr "" + +#: ../../c-api/init_config.rst:2348 +msgid "" +"It may become possible to calculate the :ref:`Path Configuration ` in Python, after the Core phase and before the Main phase, which is " +"one of the :pep:`432` motivation." +msgstr "" + +#: ../../c-api/init_config.rst:2352 +msgid "" +"The \"Core\" phase is not properly defined: what should be and what should " +"not be available at this phase is not specified yet. The API is marked as " +"private and provisional: the API can be modified or even be removed anytime " +"until a proper public API is designed." +msgstr "" + +#: ../../c-api/init_config.rst:2357 +msgid "" +"Example running Python code between \"Core\" and \"Main\" initialization " +"phases::" +msgstr "" + +#: ../../c-api/init_config.rst:2360 +msgid "" +"void init_python(void)\n" +"{\n" +" PyStatus status;\n" +"\n" +" PyConfig config;\n" +" PyConfig_InitPythonConfig(&config);\n" +" config._init_main = 0;\n" +"\n" +" /* ... customize 'config' configuration ... */\n" +"\n" +" status = Py_InitializeFromConfig(&config);\n" +" PyConfig_Clear(&config);\n" +" if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +" }\n" +"\n" +" /* Use sys.stderr because sys.stdout is only created\n" +" by _Py_InitializeMain() */\n" +" int res = PyRun_SimpleString(\n" +" \"import sys; \"\n" +" \"print('Run Python code before _Py_InitializeMain', \"\n" +" \"file=sys.stderr)\");\n" +" if (res < 0) {\n" +" exit(1);\n" +" }\n" +"\n" +" /* ... put more configuration code here ... */\n" +"\n" +" status = _Py_InitializeMain();\n" +" if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +" }\n" +"}" msgstr "" +#: ../../c-api/init_config.rst:1183 msgid "main()" msgstr "" +#: ../../c-api/init_config.rst:1183 msgid "argv (in module sys)" msgstr "" diff --git a/c-api/init_config.po~ b/c-api/init_config.po~ new file mode 100644 index 00000000..5b37d1f1 --- /dev/null +++ b/c-api/init_config.po~ @@ -0,0 +1,2628 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Python Initialization Configuration" +msgstr "" + +msgid "PyInitConfig C API" +msgstr "" + +msgid "Python can be initialized with :c:func:`Py_InitializeFromInitConfig`." +msgstr "" + +msgid "" +"The :c:func:`Py_RunMain` function can be used to write a customized Python " +"program." +msgstr "" + +msgid "" +"See also :ref:`Initialization, Finalization, and Threads `." +msgstr "" + +msgid ":pep:`741` \"Python Configuration C API\"." +msgstr "" + +msgid "Example" +msgstr "" + +msgid "" +"Example of customized Python always running with the :ref:`Python " +"Development Mode ` enabled; return ``-1`` on error:" +msgstr "" + +msgid "" +"int init_python(void)\n" +"{\n" +" PyInitConfig *config = PyInitConfig_Create();\n" +" if (config == NULL) {\n" +" printf(\"PYTHON INIT ERROR: memory allocation failed\\n\");\n" +" return -1;\n" +" }\n" +"\n" +" // Enable the Python Development Mode\n" +" if (PyInitConfig_SetInt(config, \"dev_mode\", 1) < 0) {\n" +" goto error;\n" +" }\n" +"\n" +" // Initialize Python with the configuration\n" +" if (Py_InitializeFromInitConfig(config) < 0) {\n" +" goto error;\n" +" }\n" +" PyInitConfig_Free(config);\n" +" return 0;\n" +"\n" +"error:\n" +" {\n" +" // Display the error message.\n" +" //\n" +" // This uncommon braces style is used, because you cannot make\n" +" // goto targets point to variable declarations.\n" +" const char *err_msg;\n" +" (void)PyInitConfig_GetError(config, &err_msg);\n" +" printf(\"PYTHON INIT ERROR: %s\\n\", err_msg);\n" +" PyInitConfig_Free(config);\n" +" return -1;\n" +" }\n" +"}" +msgstr "" + +msgid "Create Config" +msgstr "" + +msgid "Opaque structure to configure the Python initialization." +msgstr "" + +msgid "" +"Create a new initialization configuration using :ref:`Isolated Configuration " +"` default values." +msgstr "" + +msgid "It must be freed by :c:func:`PyInitConfig_Free`." +msgstr "" + +msgid "Return ``NULL`` on memory allocation failure." +msgstr "" + +msgid "Free memory of the initialization configuration *config*." +msgstr "" + +msgid "If *config* is ``NULL``, no operation is performed." +msgstr "" + +msgid "Error Handling" +msgstr "" + +msgid "Get the *config* error message." +msgstr "" + +msgid "Set *\\*err_msg* and return ``1`` if an error is set." +msgstr "" + +msgid "Set *\\*err_msg* to ``NULL`` and return ``0`` otherwise." +msgstr "" + +msgid "An error message is an UTF-8 encoded string." +msgstr "" + +msgid "If *config* has an exit code, format the exit code as an error message." +msgstr "" + +msgid "" +"The error message remains valid until another ``PyInitConfig`` function is " +"called with *config*. The caller doesn't have to free the error message." +msgstr "" + +msgid "Get the *config* exit code." +msgstr "" + +msgid "Set *\\*exitcode* and return ``1`` if *config* has an exit code set." +msgstr "" + +msgid "Return ``0`` if *config* has no exit code set." +msgstr "" + +msgid "" +"Only the ``Py_InitializeFromInitConfig()`` function can set an exit code if " +"the ``parse_argv`` option is non-zero." +msgstr "" + +msgid "" +"An exit code can be set when parsing the command line failed (exit code " +"``2``) or when a command line option asks to display the command line help " +"(exit code ``0``)." +msgstr "" + +msgid "Get Options" +msgstr "" + +msgid "" +"The configuration option *name* parameter must be a non-NULL null-terminated " +"UTF-8 encoded string. See :ref:`Configuration Options `." +msgstr "" + +msgid "Test if the configuration has an option called *name*." +msgstr "" + +msgid "Return ``1`` if the option exists, or return ``0`` otherwise." +msgstr "" + +msgid "Get an integer configuration option." +msgstr "" + +msgid "Set *\\*value*, and return ``0`` on success." +msgstr "" + +msgid "Set an error in *config* and return ``-1`` on error." +msgstr "" + +msgid "" +"Get a string configuration option as a null-terminated UTF-8 encoded string." +msgstr "" + +msgid "" +"*\\*value* can be set to ``NULL`` if the option is an optional string and " +"the option is unset." +msgstr "" + +msgid "" +"On success, the string must be released with ``free(value)`` if it's not " +"``NULL``." +msgstr "" + +msgid "" +"Get a string list configuration option as an array of null-terminated UTF-8 " +"encoded strings." +msgstr "" + +msgid "Set *\\*length* and *\\*value*, and return ``0`` on success." +msgstr "" + +msgid "" +"On success, the string list must be released with " +"``PyInitConfig_FreeStrList(length, items)``." +msgstr "" + +msgid "Free memory of a string list created by ``PyInitConfig_GetStrList()``." +msgstr "" + +msgid "Set Options" +msgstr "" + +msgid "" +"Some configuration options have side effects on other options. This logic is " +"only implemented when ``Py_InitializeFromInitConfig()`` is called, not by " +"the \"Set\" functions below. For example, setting ``dev_mode`` to ``1`` does " +"not set ``faulthandler`` to ``1``." +msgstr "" + +msgid "Set an integer configuration option." +msgstr "" + +msgid "Return ``0`` on success." +msgstr "" + +msgid "" +"Set a string configuration option from a null-terminated UTF-8 encoded " +"string. The string is copied." +msgstr "" + +msgid "" +"Set a string list configuration option from an array of null-terminated " +"UTF-8 encoded strings. The string list is copied." +msgstr "" + +msgid "Module" +msgstr "" + +msgid "Add a built-in extension module to the table of built-in modules." +msgstr "" + +msgid "" +"The new module can be imported by the name *name*, and uses the function " +"*initfunc* as the initialization function called on the first attempted " +"import." +msgstr "" + +msgid "" +"If Python is initialized multiple times, ``PyInitConfig_AddModule()`` must " +"be called at each Python initialization." +msgstr "" + +msgid "Similar to the :c:func:`PyImport_AppendInittab` function." +msgstr "" + +msgid "Initialize Python" +msgstr "" + +msgid "Initialize Python from the initialization configuration." +msgstr "" + +msgid "Set an exit code in *config* and return ``-1`` if Python wants to exit." +msgstr "" + +msgid "See ``PyInitConfig_GetExitcode()`` for the exit code case." +msgstr "" + +msgid "Configuration Options" +msgstr "" + +msgid "Option" +msgstr "" + +msgid "PyConfig/PyPreConfig member" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Visibility" +msgstr "" + +msgid "``\"allocator\"``" +msgstr "" + +msgid ":c:member:`allocator `" +msgstr "" + +msgid "``int``" +msgstr "" + +msgid "Read-only" +msgstr "" + +msgid "``\"argv\"``" +msgstr "" + +msgid ":c:member:`argv `" +msgstr "" + +msgid "``list[str]``" +msgstr "" + +msgid "Public" +msgstr "" + +msgid "``\"base_exec_prefix\"``" +msgstr "" + +msgid ":c:member:`base_exec_prefix `" +msgstr "" + +msgid "``str``" +msgstr "" + +msgid "``\"base_executable\"``" +msgstr "" + +msgid ":c:member:`base_executable `" +msgstr "" + +msgid "``\"base_prefix\"``" +msgstr "" + +msgid ":c:member:`base_prefix `" +msgstr "" + +msgid "``\"buffered_stdio\"``" +msgstr "" + +msgid ":c:member:`buffered_stdio `" +msgstr "" + +msgid "``bool``" +msgstr "" + +msgid "``\"bytes_warning\"``" +msgstr "" + +msgid ":c:member:`bytes_warning `" +msgstr "" + +msgid "``\"check_hash_pycs_mode\"``" +msgstr "" + +msgid ":c:member:`check_hash_pycs_mode `" +msgstr "" + +msgid "``\"code_debug_ranges\"``" +msgstr "" + +msgid ":c:member:`code_debug_ranges `" +msgstr "" + +msgid "``\"coerce_c_locale\"``" +msgstr "" + +msgid ":c:member:`coerce_c_locale `" +msgstr "" + +msgid "``\"coerce_c_locale_warn\"``" +msgstr "" + +msgid ":c:member:`coerce_c_locale_warn `" +msgstr "" + +msgid "``\"configure_c_stdio\"``" +msgstr "" + +msgid ":c:member:`configure_c_stdio `" +msgstr "" + +msgid "``\"configure_locale\"``" +msgstr "" + +msgid ":c:member:`configure_locale `" +msgstr "" + +msgid "``\"cpu_count\"``" +msgstr "" + +msgid ":c:member:`cpu_count `" +msgstr "" + +msgid "``\"dev_mode\"``" +msgstr "" + +msgid ":c:member:`dev_mode `" +msgstr "" + +msgid "``\"dump_refs\"``" +msgstr "" + +msgid ":c:member:`dump_refs `" +msgstr "" + +msgid "``\"dump_refs_file\"``" +msgstr "" + +msgid ":c:member:`dump_refs_file `" +msgstr "" + +msgid "``\"exec_prefix\"``" +msgstr "" + +msgid ":c:member:`exec_prefix `" +msgstr "" + +msgid "``\"executable\"``" +msgstr "" + +msgid ":c:member:`executable `" +msgstr "" + +msgid "``\"faulthandler\"``" +msgstr "" + +msgid ":c:member:`faulthandler `" +msgstr "" + +msgid "``\"filesystem_encoding\"``" +msgstr "" + +msgid ":c:member:`filesystem_encoding `" +msgstr "" + +msgid "``\"filesystem_errors\"``" +msgstr "" + +msgid ":c:member:`filesystem_errors `" +msgstr "" + +msgid "``\"hash_seed\"``" +msgstr "" + +msgid ":c:member:`hash_seed `" +msgstr "" + +msgid "``\"home\"``" +msgstr "" + +msgid ":c:member:`home `" +msgstr "" + +msgid "``\"import_time\"``" +msgstr "" + +msgid ":c:member:`import_time `" +msgstr "" + +msgid "``\"inspect\"``" +msgstr "" + +msgid ":c:member:`inspect `" +msgstr "" + +msgid "``\"install_signal_handlers\"``" +msgstr "" + +msgid ":c:member:`install_signal_handlers `" +msgstr "" + +msgid "``\"int_max_str_digits\"``" +msgstr "" + +msgid ":c:member:`int_max_str_digits `" +msgstr "" + +msgid "``\"interactive\"``" +msgstr "" + +msgid ":c:member:`interactive `" +msgstr "" + +msgid "``\"isolated\"``" +msgstr "" + +msgid ":c:member:`isolated `" +msgstr "" + +msgid "``\"legacy_windows_fs_encoding\"``" +msgstr "" + +msgid "" +":c:member:`legacy_windows_fs_encoding `" +msgstr "" + +msgid "``\"legacy_windows_stdio\"``" +msgstr "" + +msgid ":c:member:`legacy_windows_stdio `" +msgstr "" + +msgid "``\"malloc_stats\"``" +msgstr "" + +msgid ":c:member:`malloc_stats `" +msgstr "" + +msgid "``\"module_search_paths\"``" +msgstr "" + +msgid ":c:member:`module_search_paths `" +msgstr "" + +msgid "``\"optimization_level\"``" +msgstr "" + +msgid ":c:member:`optimization_level `" +msgstr "" + +msgid "``\"orig_argv\"``" +msgstr "" + +msgid ":c:member:`orig_argv `" +msgstr "" + +msgid "``\"parse_argv\"``" +msgstr "" + +msgid ":c:member:`parse_argv `" +msgstr "" + +msgid "``\"parser_debug\"``" +msgstr "" + +msgid ":c:member:`parser_debug `" +msgstr "" + +msgid "``\"pathconfig_warnings\"``" +msgstr "" + +msgid ":c:member:`pathconfig_warnings `" +msgstr "" + +msgid "``\"perf_profiling\"``" +msgstr "" + +msgid ":c:member:`perf_profiling `" +msgstr "" + +msgid "``\"platlibdir\"``" +msgstr "" + +msgid ":c:member:`platlibdir `" +msgstr "" + +msgid "``\"prefix\"``" +msgstr "" + +msgid ":c:member:`prefix `" +msgstr "" + +msgid "``\"program_name\"``" +msgstr "" + +msgid ":c:member:`program_name `" +msgstr "" + +msgid "``\"pycache_prefix\"``" +msgstr "" + +msgid ":c:member:`pycache_prefix `" +msgstr "" + +msgid "``\"quiet\"``" +msgstr "" + +msgid ":c:member:`quiet `" +msgstr "" + +msgid "``\"run_command\"``" +msgstr "" + +msgid ":c:member:`run_command `" +msgstr "" + +msgid "``\"run_filename\"``" +msgstr "" + +msgid ":c:member:`run_filename `" +msgstr "" + +msgid "``\"run_module\"``" +msgstr "" + +msgid ":c:member:`run_module `" +msgstr "" + +msgid "``\"run_presite\"``" +msgstr "" + +msgid ":c:member:`run_presite `" +msgstr "" + +msgid "``\"safe_path\"``" +msgstr "" + +msgid ":c:member:`safe_path `" +msgstr "" + +msgid "``\"show_ref_count\"``" +msgstr "" + +msgid ":c:member:`show_ref_count `" +msgstr "" + +msgid "``\"site_import\"``" +msgstr "" + +msgid ":c:member:`site_import `" +msgstr "" + +msgid "``\"skip_source_first_line\"``" +msgstr "" + +msgid ":c:member:`skip_source_first_line `" +msgstr "" + +msgid "``\"stdio_encoding\"``" +msgstr "" + +msgid ":c:member:`stdio_encoding `" +msgstr "" + +msgid "``\"stdio_errors\"``" +msgstr "" + +msgid ":c:member:`stdio_errors `" +msgstr "" + +msgid "``\"stdlib_dir\"``" +msgstr "" + +msgid ":c:member:`stdlib_dir `" +msgstr "" + +msgid "``\"tracemalloc\"``" +msgstr "" + +msgid ":c:member:`tracemalloc `" +msgstr "" + +msgid "``\"use_environment\"``" +msgstr "" + +msgid ":c:member:`use_environment `" +msgstr "" + +msgid "``\"use_frozen_modules\"``" +msgstr "" + +msgid ":c:member:`use_frozen_modules `" +msgstr "" + +msgid "``\"use_hash_seed\"``" +msgstr "" + +msgid ":c:member:`use_hash_seed `" +msgstr "" + +msgid "``\"use_system_logger\"``" +msgstr "" + +msgid ":c:member:`use_system_logger `" +msgstr "" + +msgid "``\"user_site_directory\"``" +msgstr "" + +msgid ":c:member:`user_site_directory `" +msgstr "" + +msgid "``\"utf8_mode\"``" +msgstr "" + +msgid ":c:member:`utf8_mode `" +msgstr "" + +msgid "``\"verbose\"``" +msgstr "" + +msgid ":c:member:`verbose `" +msgstr "" + +msgid "``\"warn_default_encoding\"``" +msgstr "" + +msgid ":c:member:`warn_default_encoding `" +msgstr "" + +msgid "``\"warnoptions\"``" +msgstr "" + +msgid ":c:member:`warnoptions `" +msgstr "" + +msgid "``\"write_bytecode\"``" +msgstr "" + +msgid ":c:member:`write_bytecode `" +msgstr "" + +msgid "``\"xoptions\"``" +msgstr "" + +msgid ":c:member:`xoptions `" +msgstr "" + +msgid "``dict[str, str]``" +msgstr "" + +msgid "``\"_pystats\"``" +msgstr "" + +msgid ":c:member:`_pystats `" +msgstr "" + +msgid "Visibility:" +msgstr "" + +msgid "" +"Public: Can by get by :c:func:`PyConfig_Get` and set by :c:func:" +"`PyConfig_Set`." +msgstr "" + +msgid "" +"Read-only: Can by get by :c:func:`PyConfig_Get`, but cannot be set by :c:" +"func:`PyConfig_Set`." +msgstr "" + +msgid "Runtime Python configuration API" +msgstr "" + +msgid "" +"At runtime, it's possible to get and set configuration options using :c:func:" +"`PyConfig_Get` and :c:func:`PyConfig_Set` functions." +msgstr "" + +msgid "" +"Some options are read from the :mod:`sys` attributes. For example, the " +"option ``\"argv\"`` is read from :data:`sys.argv`." +msgstr "" + +msgid "" +"Get the current runtime value of a configuration option as a Python object." +msgstr "" + +msgid "Return a new reference on success." +msgstr "" + +msgid "Set an exception and return ``NULL`` on error." +msgstr "" + +msgid "The object type depends on the configuration option. It can be:" +msgstr "" + +msgid "" +"The caller must have an :term:`attached thread state`. The function cannot " +"be called before Python initialization nor after Python finalization." +msgstr "" + +msgid "Similar to :c:func:`PyConfig_Get`, but get the value as a C int." +msgstr "" + +msgid "Set an exception and return ``-1`` on error." +msgstr "" + +msgid "Get all configuration option names as a ``frozenset``." +msgstr "" + +msgid "Set the current runtime value of a configuration option." +msgstr "" + +msgid "Raise a :exc:`ValueError` if there is no option *name*." +msgstr "" + +msgid "Raise a :exc:`ValueError` if *value* is an invalid value." +msgstr "" + +msgid "Raise a :exc:`ValueError` if the option is read-only (cannot be set)." +msgstr "" + +msgid "Raise a :exc:`TypeError` if *value* has not the proper type." +msgstr "" + +msgid "" +"Raises an :ref:`auditing event ` ``cpython.PyConfig_Set`` with " +"arguments ``name``, ``value``." +msgstr "" + +msgid "PyConfig C API" +msgstr "" + +msgid "" +"Python can be initialized with :c:func:`Py_InitializeFromConfig` and the :c:" +"type:`PyConfig` structure. It can be preinitialized with :c:func:" +"`Py_PreInitialize` and the :c:type:`PyPreConfig` structure." +msgstr "" + +msgid "There are two kinds of configuration:" +msgstr "" + +msgid "" +"The :ref:`Python Configuration ` can be used to build a " +"customized Python which behaves as the regular Python. For example, " +"environment variables and command line arguments are used to configure " +"Python." +msgstr "" + +msgid "" +"The :ref:`Isolated Configuration ` can be used to embed " +"Python into an application. It isolates Python from the system. For example, " +"environment variables are ignored, the LC_CTYPE locale is left unchanged and " +"no signal handler is registered." +msgstr "" + +msgid ":pep:`587` \"Python Initialization Configuration\"." +msgstr "" + +msgid "Example of customized Python always running in isolated mode::" +msgstr "" + +msgid "" +"int main(int argc, char **argv)\n" +"{\n" +" PyStatus status;\n" +"\n" +" PyConfig config;\n" +" PyConfig_InitPythonConfig(&config);\n" +" config.isolated = 1;\n" +"\n" +" /* Decode command line arguments.\n" +" Implicitly preinitialize Python (in isolated mode). */\n" +" status = PyConfig_SetBytesArgv(&config, argc, argv);\n" +" if (PyStatus_Exception(status)) {\n" +" goto exception;\n" +" }\n" +"\n" +" status = Py_InitializeFromConfig(&config);\n" +" if (PyStatus_Exception(status)) {\n" +" goto exception;\n" +" }\n" +" PyConfig_Clear(&config);\n" +"\n" +" return Py_RunMain();\n" +"\n" +"exception:\n" +" PyConfig_Clear(&config);\n" +" if (PyStatus_IsExit(status)) {\n" +" return status.exitcode;\n" +" }\n" +" /* Display the error message and exit the process with\n" +" non-zero exit code */\n" +" Py_ExitStatusException(status);\n" +"}" +msgstr "" + +msgid "PyWideStringList" +msgstr "" + +msgid "List of ``wchar_t*`` strings." +msgstr "" + +msgid "" +"If *length* is non-zero, *items* must be non-``NULL`` and all strings must " +"be non-``NULL``." +msgstr "" + +msgid "Methods:" +msgstr "" + +msgid "Append *item* to *list*." +msgstr "" + +msgid "Python must be preinitialized to call this function." +msgstr "" + +msgid "Insert *item* into *list* at *index*." +msgstr "" + +msgid "" +"If *index* is greater than or equal to *list* length, append *item* to " +"*list*." +msgstr "" + +msgid "*index* must be greater than or equal to ``0``." +msgstr "" + +msgid "Structure fields:" +msgstr "" + +msgid "List length." +msgstr "" + +msgid "List items." +msgstr "" + +msgid "PyStatus" +msgstr "" + +msgid "" +"Structure to store an initialization function status: success, error or exit." +msgstr "" + +msgid "For an error, it can store the C function name which created the error." +msgstr "" + +msgid "Exit code. Argument passed to ``exit()``." +msgstr "" + +msgid "Error message." +msgstr "" + +msgid "Name of the function which created an error, can be ``NULL``." +msgstr "" + +msgid "Functions to create a status:" +msgstr "" + +msgid "Success." +msgstr "" + +msgid "Initialization error with a message." +msgstr "" + +msgid "*err_msg* must not be ``NULL``." +msgstr "" + +msgid "Memory allocation failure (out of memory)." +msgstr "" + +msgid "Exit Python with the specified exit code." +msgstr "" + +msgid "Functions to handle a status:" +msgstr "" + +msgid "" +"Is the status an error or an exit? If true, the exception must be handled; " +"by calling :c:func:`Py_ExitStatusException` for example." +msgstr "" + +msgid "Is the result an error?" +msgstr "" + +msgid "Is the result an exit?" +msgstr "" + +msgid "" +"Call ``exit(exitcode)`` if *status* is an exit. Print the error message and " +"exit with a non-zero exit code if *status* is an error. Must only be called " +"if ``PyStatus_Exception(status)`` is non-zero." +msgstr "" + +msgid "" +"Internally, Python uses macros which set ``PyStatus.func``, whereas " +"functions to create a status set ``func`` to ``NULL``." +msgstr "" + +msgid "Example::" +msgstr "" + +msgid "" +"PyStatus alloc(void **ptr, size_t size)\n" +"{\n" +" *ptr = PyMem_RawMalloc(size);\n" +" if (*ptr == NULL) {\n" +" return PyStatus_NoMemory();\n" +" }\n" +" return PyStatus_Ok();\n" +"}\n" +"\n" +"int main(int argc, char **argv)\n" +"{\n" +" void *ptr;\n" +" PyStatus status = alloc(&ptr, 16);\n" +" if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +" }\n" +" PyMem_Free(ptr);\n" +" return 0;\n" +"}" +msgstr "" + +msgid "PyPreConfig" +msgstr "" + +msgid "Structure used to preinitialize Python." +msgstr "" + +msgid "Function to initialize a preconfiguration:" +msgstr "" + +msgid "" +"Initialize the preconfiguration with :ref:`Python Configuration `." +msgstr "" + +msgid "" +"Initialize the preconfiguration with :ref:`Isolated Configuration `." +msgstr "" + +msgid "Name of the Python memory allocators:" +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_NOT_SET`` (``0``): don't change memory allocators (use " +"defaults)." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_DEFAULT`` (``1``): :ref:`default memory allocators " +"`." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_DEBUG`` (``2``): :ref:`default memory allocators ` with :ref:`debug hooks `." +msgstr "" + +msgid "``PYMEM_ALLOCATOR_MALLOC`` (``3``): use ``malloc()`` of the C library." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_MALLOC_DEBUG`` (``4``): force usage of ``malloc()`` with :" +"ref:`debug hooks `." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC`` (``5``): :ref:`Python pymalloc memory allocator " +"`." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` (``6``): :ref:`Python pymalloc memory " +"allocator ` with :ref:`debug hooks `." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_MIMALLOC`` (``6``): use ``mimalloc``, a fast malloc " +"replacement." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` (``7``): use ``mimalloc``, a fast malloc " +"replacement with :ref:`debug hooks `." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_PYMALLOC`` and ``PYMEM_ALLOCATOR_PYMALLOC_DEBUG`` are not " +"supported if Python is :option:`configured using --without-pymalloc <--" +"without-pymalloc>`." +msgstr "" + +msgid "" +"``PYMEM_ALLOCATOR_MIMALLOC`` and ``PYMEM_ALLOCATOR_MIMALLOC_DEBUG`` are not " +"supported if Python is :option:`configured using --without-mimalloc <--" +"without-mimalloc>` or if the underlying atomic support isn't available." +msgstr "" + +msgid "See :ref:`Memory Management `." +msgstr "" + +msgid "Default: ``PYMEM_ALLOCATOR_NOT_SET``." +msgstr "" + +msgid "Set the LC_CTYPE locale to the user preferred locale." +msgstr "" + +msgid "" +"If equals to ``0``, set :c:member:`~PyPreConfig.coerce_c_locale` and :c:" +"member:`~PyPreConfig.coerce_c_locale_warn` members to ``0``." +msgstr "" + +msgid "See the :term:`locale encoding`." +msgstr "" + +msgid "Default: ``1`` in Python config, ``0`` in isolated config." +msgstr "" + +msgid "If equals to ``2``, coerce the C locale." +msgstr "" + +msgid "" +"If equals to ``1``, read the LC_CTYPE locale to decide if it should be " +"coerced." +msgstr "" + +msgid "Default: ``-1`` in Python config, ``0`` in isolated config." +msgstr "" + +msgid "If non-zero, emit a warning if the C locale is coerced." +msgstr "" + +msgid "" +":ref:`Python Development Mode `: see :c:member:`PyConfig.dev_mode`." +msgstr "" + +msgid "Default: ``-1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +msgid "Isolated mode: see :c:member:`PyConfig.isolated`." +msgstr "" + +msgid "Default: ``0`` in Python mode, ``1`` in isolated mode." +msgstr "" + +msgid "If non-zero:" +msgstr "" + +msgid "Set :c:member:`PyPreConfig.utf8_mode` to ``0``," +msgstr "" + +msgid "Set :c:member:`PyConfig.filesystem_encoding` to ``\"mbcs\"``," +msgstr "" + +msgid "Set :c:member:`PyConfig.filesystem_errors` to ``\"replace\"``." +msgstr "" + +msgid "" +"Initialized from the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " +"variable value." +msgstr "" + +msgid "" +"Only available on Windows. ``#ifdef MS_WINDOWS`` macro can be used for " +"Windows specific code." +msgstr "" + +msgid "Default: ``0``." +msgstr "" + +msgid "" +"If non-zero, :c:func:`Py_PreInitializeFromArgs` and :c:func:" +"`Py_PreInitializeFromBytesArgs` parse their ``argv`` argument the same way " +"the regular Python parses command line arguments: see :ref:`Command Line " +"Arguments `." +msgstr "" + +msgid "" +"Use :ref:`environment variables `? See :c:member:`PyConfig." +"use_environment`." +msgstr "" + +msgid "Default: ``1`` in Python config and ``0`` in isolated config." +msgstr "" + +msgid "If non-zero, enable the :ref:`Python UTF-8 Mode `." +msgstr "" + +msgid "" +"Set to ``0`` or ``1`` by the :option:`-X utf8 <-X>` command line option and " +"the :envvar:`PYTHONUTF8` environment variable." +msgstr "" + +msgid "Also set to ``1`` if the ``LC_CTYPE`` locale is ``C`` or ``POSIX``." +msgstr "" + +msgid "Default: ``-1`` in Python config and ``0`` in isolated config." +msgstr "" + +msgid "Preinitialize Python with PyPreConfig" +msgstr "" + +msgid "The preinitialization of Python:" +msgstr "" + +msgid "Set the Python memory allocators (:c:member:`PyPreConfig.allocator`)" +msgstr "" + +msgid "Configure the LC_CTYPE locale (:term:`locale encoding`)" +msgstr "" + +msgid "" +"Set the :ref:`Python UTF-8 Mode ` (:c:member:`PyPreConfig." +"utf8_mode`)" +msgstr "" + +msgid "" +"The current preconfiguration (``PyPreConfig`` type) is stored in " +"``_PyRuntime.preconfig``." +msgstr "" + +msgid "Functions to preinitialize Python:" +msgstr "" + +msgid "Preinitialize Python from *preconfig* preconfiguration." +msgstr "" + +msgid "*preconfig* must not be ``NULL``." +msgstr "" + +msgid "" +"Parse *argv* command line arguments (bytes strings) if :c:member:" +"`~PyPreConfig.parse_argv` of *preconfig* is non-zero." +msgstr "" + +msgid "" +"Parse *argv* command line arguments (wide strings) if :c:member:" +"`~PyPreConfig.parse_argv` of *preconfig* is non-zero." +msgstr "" + +msgid "" +"The caller is responsible to handle exceptions (error or exit) using :c:func:" +"`PyStatus_Exception` and :c:func:`Py_ExitStatusException`." +msgstr "" + +msgid "" +"For :ref:`Python Configuration ` (:c:func:" +"`PyPreConfig_InitPythonConfig`), if Python is initialized with command line " +"arguments, the command line arguments must also be passed to preinitialize " +"Python, since they have an effect on the pre-configuration like encodings. " +"For example, the :option:`-X utf8 <-X>` command line option enables the :ref:" +"`Python UTF-8 Mode `." +msgstr "" + +msgid "" +"``PyMem_SetAllocator()`` can be called after :c:func:`Py_PreInitialize` and " +"before :c:func:`Py_InitializeFromConfig` to install a custom memory " +"allocator. It can be called before :c:func:`Py_PreInitialize` if :c:member:" +"`PyPreConfig.allocator` is set to ``PYMEM_ALLOCATOR_NOT_SET``." +msgstr "" + +msgid "" +"Python memory allocation functions like :c:func:`PyMem_RawMalloc` must not " +"be used before the Python preinitialization, whereas calling directly " +"``malloc()`` and ``free()`` is always safe. :c:func:`Py_DecodeLocale` must " +"not be called before the Python preinitialization." +msgstr "" + +msgid "" +"Example using the preinitialization to enable the :ref:`Python UTF-8 Mode " +"`::" +msgstr "" + +msgid "" +"PyStatus status;\n" +"PyPreConfig preconfig;\n" +"PyPreConfig_InitPythonConfig(&preconfig);\n" +"\n" +"preconfig.utf8_mode = 1;\n" +"\n" +"status = Py_PreInitialize(&preconfig);\n" +"if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +"}\n" +"\n" +"/* at this point, Python speaks UTF-8 */\n" +"\n" +"Py_Initialize();\n" +"/* ... use Python API here ... */\n" +"Py_Finalize();" +msgstr "" + +msgid "PyConfig" +msgstr "" + +msgid "Structure containing most parameters to configure Python." +msgstr "" + +msgid "" +"When done, the :c:func:`PyConfig_Clear` function must be used to release the " +"configuration memory." +msgstr "" + +msgid "Structure methods:" +msgstr "" + +msgid "" +"Initialize configuration with the :ref:`Python Configuration `." +msgstr "" + +msgid "" +"Initialize configuration with the :ref:`Isolated Configuration `." +msgstr "" + +msgid "Copy the wide character string *str* into ``*config_str``." +msgstr "" + +msgid ":ref:`Preinitialize Python ` if needed." +msgstr "" + +msgid "" +"Decode *str* using :c:func:`Py_DecodeLocale` and set the result into " +"``*config_str``." +msgstr "" + +msgid "" +"Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " +"from the *argv* list of wide character strings." +msgstr "" + +msgid "" +"Set command line arguments (:c:member:`~PyConfig.argv` member of *config*) " +"from the *argv* list of bytes strings. Decode bytes using :c:func:" +"`Py_DecodeLocale`." +msgstr "" + +msgid "Set the list of wide strings *list* to *length* and *items*." +msgstr "" + +msgid "Read all Python configuration." +msgstr "" + +msgid "Fields which are already initialized are left unchanged." +msgstr "" + +msgid "" +"Fields for :ref:`path configuration ` are no longer " +"calculated or modified when calling this function, as of Python 3.11." +msgstr "" + +msgid "" +"The :c:func:`PyConfig_Read` function only parses :c:member:`PyConfig.argv` " +"arguments once: :c:member:`PyConfig.parse_argv` is set to ``2`` after " +"arguments are parsed. Since Python arguments are stripped from :c:member:" +"`PyConfig.argv`, parsing arguments twice would parse the application options " +"as Python options." +msgstr "" + +msgid "" +"The :c:member:`PyConfig.argv` arguments are now only parsed once, :c:member:" +"`PyConfig.parse_argv` is set to ``2`` after arguments are parsed, and " +"arguments are only parsed if :c:member:`PyConfig.parse_argv` equals ``1``." +msgstr "" + +msgid "" +":c:func:`PyConfig_Read` no longer calculates all paths, and so fields listed " +"under :ref:`Python Path Configuration ` may no longer be " +"updated until :c:func:`Py_InitializeFromConfig` is called." +msgstr "" + +msgid "Release configuration memory." +msgstr "" + +msgid "" +"Most ``PyConfig`` methods :ref:`preinitialize Python ` if needed. " +"In that case, the Python preinitialization configuration (:c:type:" +"`PyPreConfig`) in based on the :c:type:`PyConfig`. If configuration fields " +"which are in common with :c:type:`PyPreConfig` are tuned, they must be set " +"before calling a :c:type:`PyConfig` method:" +msgstr "" + +msgid ":c:member:`PyConfig.dev_mode`" +msgstr "" + +msgid ":c:member:`PyConfig.isolated`" +msgstr "" + +msgid ":c:member:`PyConfig.parse_argv`" +msgstr "" + +msgid ":c:member:`PyConfig.use_environment`" +msgstr "" + +msgid "" +"Moreover, if :c:func:`PyConfig_SetArgv` or :c:func:`PyConfig_SetBytesArgv` " +"is used, this method must be called before other methods, since the " +"preinitialization configuration depends on command line arguments (if :c:" +"member:`~PyConfig.parse_argv` is non-zero)." +msgstr "" + +msgid "" +"The caller of these methods is responsible to handle exceptions (error or " +"exit) using ``PyStatus_Exception()`` and ``Py_ExitStatusException()``." +msgstr "" + +msgid "" +"Set :data:`sys.argv` command line arguments based on :c:member:`~PyConfig." +"argv`. These parameters are similar to those passed to the program's :c:" +"func:`main` function with the difference that the first entry should refer " +"to the script file to be executed rather than the executable hosting the " +"Python interpreter. If there isn't a script that will be run, the first " +"entry in :c:member:`~PyConfig.argv` can be an empty string." +msgstr "" + +msgid "" +"Set :c:member:`~PyConfig.parse_argv` to ``1`` to parse :c:member:`~PyConfig." +"argv` the same way the regular Python parses Python command line arguments " +"and then to strip Python arguments from :c:member:`~PyConfig.argv`." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.argv` is empty, an empty string is added to ensure " +"that :data:`sys.argv` always exists and is never empty." +msgstr "" + +msgid "Default: ``NULL``." +msgstr "" + +msgid "See also the :c:member:`~PyConfig.orig_argv` member." +msgstr "" + +msgid "" +"If equals to zero, ``Py_RunMain()`` prepends a potentially unsafe path to :" +"data:`sys.path` at startup:" +msgstr "" + +msgid "" +"If :c:member:`argv[0] ` is equal to ``L\"-m\"`` (``python -m " +"module``), prepend the current working directory." +msgstr "" + +msgid "" +"If running a script (``python script.py``), prepend the script's directory. " +"If it's a symbolic link, resolve symbolic links." +msgstr "" + +msgid "" +"Otherwise (``python -c code`` and ``python``), prepend an empty string, " +"which means the current working directory." +msgstr "" + +msgid "" +"Set to ``1`` by the :option:`-P` command line option and the :envvar:" +"`PYTHONSAFEPATH` environment variable." +msgstr "" + +msgid "Default: ``0`` in Python config, ``1`` in isolated config." +msgstr "" + +msgid ":data:`sys.base_exec_prefix`." +msgstr "" + +msgid "Part of the :ref:`Python Path Configuration ` output." +msgstr "" + +msgid "See also :c:member:`PyConfig.exec_prefix`." +msgstr "" + +msgid "Python base executable: :data:`sys._base_executable`." +msgstr "" + +msgid "Set by the :envvar:`__PYVENV_LAUNCHER__` environment variable." +msgstr "" + +msgid "Set from :c:member:`PyConfig.executable` if ``NULL``." +msgstr "" + +msgid "See also :c:member:`PyConfig.executable`." +msgstr "" + +msgid ":data:`sys.base_prefix`." +msgstr "" + +msgid "See also :c:member:`PyConfig.prefix`." +msgstr "" + +msgid "" +"If equals to ``0`` and :c:member:`~PyConfig.configure_c_stdio` is non-zero, " +"disable buffering on the C streams stdout and stderr." +msgstr "" + +msgid "" +"Set to ``0`` by the :option:`-u` command line option and the :envvar:" +"`PYTHONUNBUFFERED` environment variable." +msgstr "" + +msgid "stdin is always opened in buffered mode." +msgstr "" + +msgid "Default: ``1``." +msgstr "" + +msgid "" +"If equals to ``1``, issue a warning when comparing :class:`bytes` or :class:" +"`bytearray` with :class:`str`, or comparing :class:`bytes` with :class:`int`." +msgstr "" + +msgid "" +"If equal or greater to ``2``, raise a :exc:`BytesWarning` exception in these " +"cases." +msgstr "" + +msgid "Incremented by the :option:`-b` command line option." +msgstr "" + +msgid "" +"If non-zero, emit a :exc:`EncodingWarning` warning when :class:`io." +"TextIOWrapper` uses its default encoding. See :ref:`io-encoding-warning` for " +"details." +msgstr "" + +msgid "" +"If equals to ``0``, disables the inclusion of the end line and column " +"mappings in code objects. Also disables traceback printing carets to " +"specific error locations." +msgstr "" + +msgid "" +"Set to ``0`` by the :envvar:`PYTHONNODEBUGRANGES` environment variable and " +"by the :option:`-X no_debug_ranges <-X>` command line option." +msgstr "" + +msgid "" +"Control the validation behavior of hash-based ``.pyc`` files: value of the :" +"option:`--check-hash-based-pycs` command line option." +msgstr "" + +msgid "Valid values:" +msgstr "" + +msgid "" +"``L\"always\"``: Hash the source file for invalidation regardless of value " +"of the 'check_source' flag." +msgstr "" + +msgid "``L\"never\"``: Assume that hash-based pycs always are valid." +msgstr "" + +msgid "" +"``L\"default\"``: The 'check_source' flag in hash-based pycs determines " +"invalidation." +msgstr "" + +msgid "Default: ``L\"default\"``." +msgstr "" + +msgid "See also :pep:`552` \"Deterministic pycs\"." +msgstr "" + +msgid "If non-zero, configure C standard streams:" +msgstr "" + +msgid "" +"On Windows, set the binary mode (``O_BINARY``) on stdin, stdout and stderr." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.buffered_stdio` equals zero, disable buffering of " +"stdin, stdout and stderr streams." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.interactive` is non-zero, enable stream buffering on " +"stdin and stdout (only stdout on Windows)." +msgstr "" + +msgid "If non-zero, enable the :ref:`Python Development Mode `." +msgstr "" + +msgid "" +"Set to ``1`` by the :option:`-X dev <-X>` option and the :envvar:" +"`PYTHONDEVMODE` environment variable." +msgstr "" + +msgid "Dump Python references?" +msgstr "" + +msgid "If non-zero, dump all objects which are still alive at exit." +msgstr "" + +msgid "Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable." +msgstr "" + +msgid "" +"Needs a special build of Python with the ``Py_TRACE_REFS`` macro defined: " +"see the :option:`configure --with-trace-refs option <--with-trace-refs>`." +msgstr "" + +msgid "Filename where to dump Python references." +msgstr "" + +msgid "Set by the :envvar:`PYTHONDUMPREFSFILE` environment variable." +msgstr "" + +msgid "" +"The site-specific directory prefix where the platform-dependent Python files " +"are installed: :data:`sys.exec_prefix`." +msgstr "" + +msgid "See also :c:member:`PyConfig.base_exec_prefix`." +msgstr "" + +msgid "" +"The absolute path of the executable binary for the Python interpreter: :data:" +"`sys.executable`." +msgstr "" + +msgid "See also :c:member:`PyConfig.base_executable`." +msgstr "" + +msgid "Enable faulthandler?" +msgstr "" + +msgid "If non-zero, call :func:`faulthandler.enable` at startup." +msgstr "" + +msgid "" +"Set to ``1`` by :option:`-X faulthandler <-X>` and the :envvar:" +"`PYTHONFAULTHANDLER` environment variable." +msgstr "" + +msgid "" +":term:`Filesystem encoding `: :func:" +"`sys.getfilesystemencoding`." +msgstr "" + +msgid "On macOS, Android and VxWorks: use ``\"utf-8\"`` by default." +msgstr "" + +msgid "" +"On Windows: use ``\"utf-8\"`` by default, or ``\"mbcs\"`` if :c:member:" +"`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is non-" +"zero." +msgstr "" + +msgid "Default encoding on other platforms:" +msgstr "" + +msgid "``\"utf-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." +msgstr "" + +msgid "" +"``\"ascii\"`` if Python detects that ``nl_langinfo(CODESET)`` announces the " +"ASCII encoding, whereas the ``mbstowcs()`` function decodes from a different " +"encoding (usually Latin1)." +msgstr "" + +msgid "``\"utf-8\"`` if ``nl_langinfo(CODESET)`` returns an empty string." +msgstr "" + +msgid "" +"Otherwise, use the :term:`locale encoding`: ``nl_langinfo(CODESET)`` result." +msgstr "" + +msgid "" +"At Python startup, the encoding name is normalized to the Python codec name. " +"For example, ``\"ANSI_X3.4-1968\"`` is replaced with ``\"ascii\"``." +msgstr "" + +msgid "See also the :c:member:`~PyConfig.filesystem_errors` member." +msgstr "" + +msgid "" +":term:`Filesystem error handler `: :" +"func:`sys.getfilesystemencodeerrors`." +msgstr "" + +msgid "" +"On Windows: use ``\"surrogatepass\"`` by default, or ``\"replace\"`` if :c:" +"member:`~PyPreConfig.legacy_windows_fs_encoding` of :c:type:`PyPreConfig` is " +"non-zero." +msgstr "" + +msgid "On other platforms: use ``\"surrogateescape\"`` by default." +msgstr "" + +msgid "Supported error handlers:" +msgstr "" + +msgid "``\"strict\"``" +msgstr "" + +msgid "``\"surrogateescape\"``" +msgstr "" + +msgid "``\"surrogatepass\"`` (only supported with the UTF-8 encoding)" +msgstr "" + +msgid "See also the :c:member:`~PyConfig.filesystem_encoding` member." +msgstr "" + +msgid "If non-zero, use frozen modules." +msgstr "" + +msgid "Set by the :envvar:`PYTHON_FROZEN_MODULES` environment variable." +msgstr "" + +msgid "" +"Default: ``1`` in a release build, or ``0`` in a :ref:`debug build `." +msgstr "" + +msgid "Randomized hash function seed." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.use_hash_seed` is zero, a seed is chosen randomly at " +"Python startup, and :c:member:`~PyConfig.hash_seed` is ignored." +msgstr "" + +msgid "Set by the :envvar:`PYTHONHASHSEED` environment variable." +msgstr "" + +msgid "" +"Default *use_hash_seed* value: ``-1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +msgid "" +"Set the default Python \"home\" directory, that is, the location of the " +"standard Python libraries (see :envvar:`PYTHONHOME`)." +msgstr "" + +msgid "Set by the :envvar:`PYTHONHOME` environment variable." +msgstr "" + +msgid "Part of the :ref:`Python Path Configuration ` input." +msgstr "" + +msgid "" +"If ``1``, profile import time. If ``2``, include additional output that " +"indicates when an imported module has already been loaded." +msgstr "" + +msgid "" +"Set by the :option:`-X importtime <-X>` option and the :envvar:" +"`PYTHONPROFILEIMPORTTIME` environment variable." +msgstr "" + +msgid "Added support for ``import_time = 2``" +msgstr "" + +msgid "Enter interactive mode after executing a script or a command." +msgstr "" + +msgid "" +"If greater than ``0``, enable inspect: when a script is passed as first " +"argument or the -c option is used, enter interactive mode after executing " +"the script or the command, even when :data:`sys.stdin` does not appear to be " +"a terminal." +msgstr "" + +msgid "" +"Incremented by the :option:`-i` command line option. Set to ``1`` if the :" +"envvar:`PYTHONINSPECT` environment variable is non-empty." +msgstr "" + +msgid "Install Python signal handlers?" +msgstr "" + +msgid "Default: ``1`` in Python mode, ``0`` in isolated mode." +msgstr "" + +msgid "If greater than ``0``, enable the interactive mode (REPL)." +msgstr "" + +msgid "Incremented by the :option:`-i` command line option." +msgstr "" + +msgid "" +"Configures the :ref:`integer string conversion length limitation " +"`. An initial value of ``-1`` means the value will be " +"taken from the command line or environment or otherwise default to 4300 (:" +"data:`sys.int_info.default_max_str_digits`). A value of ``0`` disables the " +"limitation. Values greater than zero but less than 640 (:data:`sys.int_info." +"str_digits_check_threshold`) are unsupported and will produce an error." +msgstr "" + +msgid "" +"Configured by the :option:`-X int_max_str_digits <-X>` command line flag or " +"the :envvar:`PYTHONINTMAXSTRDIGITS` environment variable." +msgstr "" + +msgid "" +"Default: ``-1`` in Python mode. 4300 (:data:`sys.int_info." +"default_max_str_digits`) in isolated mode." +msgstr "" + +msgid "" +"If the value of :c:member:`~PyConfig.cpu_count` is not ``-1`` then it will " +"override the return values of :func:`os.cpu_count`, :func:`os." +"process_cpu_count`, and :func:`multiprocessing.cpu_count`." +msgstr "" + +msgid "" +"Configured by the :samp:`-X cpu_count={n|default}` command line flag or the :" +"envvar:`PYTHON_CPU_COUNT` environment variable." +msgstr "" + +msgid "Default: ``-1``." +msgstr "" + +msgid "If greater than ``0``, enable isolated mode:" +msgstr "" + +msgid "" +"Set :c:member:`~PyConfig.safe_path` to ``1``: don't prepend a potentially " +"unsafe path to :data:`sys.path` at Python startup, such as the current " +"directory, the script's directory or an empty string." +msgstr "" + +msgid "" +"Set :c:member:`~PyConfig.use_environment` to ``0``: ignore ``PYTHON`` " +"environment variables." +msgstr "" + +msgid "" +"Set :c:member:`~PyConfig.user_site_directory` to ``0``: don't add the user " +"site directory to :data:`sys.path`." +msgstr "" + +msgid "" +"Python REPL doesn't import :mod:`readline` nor enable default readline " +"configuration on interactive prompts." +msgstr "" + +msgid "Set to ``1`` by the :option:`-I` command line option." +msgstr "" + +msgid "" +"See also the :ref:`Isolated Configuration ` and :c:" +"member:`PyPreConfig.isolated`." +msgstr "" + +msgid "" +"If non-zero, use :class:`io.FileIO` instead of :class:`!io." +"_WindowsConsoleIO` for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys." +"stderr`." +msgstr "" + +msgid "" +"Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " +"is set to a non-empty string." +msgstr "" + +msgid "See also the :pep:`528` (Change Windows console encoding to UTF-8)." +msgstr "" + +msgid "" +"If non-zero, dump statistics on :ref:`Python pymalloc memory allocator " +"` at exit." +msgstr "" + +msgid "Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable." +msgstr "" + +msgid "" +"The option is ignored if Python is :option:`configured using the --without-" +"pymalloc option <--without-pymalloc>`." +msgstr "" + +msgid "Platform library directory name: :data:`sys.platlibdir`." +msgstr "" + +msgid "Set by the :envvar:`PYTHONPLATLIBDIR` environment variable." +msgstr "" + +msgid "" +"Default: value of the ``PLATLIBDIR`` macro which is set by the :option:" +"`configure --with-platlibdir option <--with-platlibdir>` (default: " +"``\"lib\"``, or ``\"DLLs\"`` on Windows)." +msgstr "" + +msgid "" +"This macro is now used on Windows to locate the standard library extension " +"modules, typically under ``DLLs``. However, for compatibility, note that " +"this value is ignored for any non-standard layouts, including in-tree builds " +"and virtual environments." +msgstr "" + +msgid "" +"Module search paths (:data:`sys.path`) as a string separated by ``DELIM`` (:" +"data:`os.pathsep`)." +msgstr "" + +msgid "Set by the :envvar:`PYTHONPATH` environment variable." +msgstr "" + +msgid "Module search paths: :data:`sys.path`." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.module_search_paths_set` is equal to ``0``, :c:func:" +"`Py_InitializeFromConfig` will replace :c:member:`~PyConfig." +"module_search_paths` and sets :c:member:`~PyConfig.module_search_paths_set` " +"to ``1``." +msgstr "" + +msgid "" +"Default: empty list (``module_search_paths``) and ``0`` " +"(``module_search_paths_set``)." +msgstr "" + +msgid "Compilation optimization level:" +msgstr "" + +msgid "``0``: Peephole optimizer, set ``__debug__`` to ``True``." +msgstr "" + +msgid "``1``: Level 0, remove assertions, set ``__debug__`` to ``False``." +msgstr "" + +msgid "``2``: Level 1, strip docstrings." +msgstr "" + +msgid "" +"Incremented by the :option:`-O` command line option. Set to the :envvar:" +"`PYTHONOPTIMIZE` environment variable value." +msgstr "" + +msgid "" +"The list of the original command line arguments passed to the Python " +"executable: :data:`sys.orig_argv`." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.orig_argv` list is empty and :c:member:`~PyConfig." +"argv` is not a list only containing an empty string, :c:func:`PyConfig_Read` " +"copies :c:member:`~PyConfig.argv` into :c:member:`~PyConfig.orig_argv` " +"before modifying :c:member:`~PyConfig.argv` (if :c:member:`~PyConfig." +"parse_argv` is non-zero)." +msgstr "" + +msgid "" +"See also the :c:member:`~PyConfig.argv` member and the :c:func:" +"`Py_GetArgcArgv` function." +msgstr "" + +msgid "Default: empty list." +msgstr "" + +msgid "Parse command line arguments?" +msgstr "" + +msgid "" +"If equals to ``1``, parse :c:member:`~PyConfig.argv` the same way the " +"regular Python parses :ref:`command line arguments `, and " +"strip Python arguments from :c:member:`~PyConfig.argv`." +msgstr "" + +msgid "" +"The :c:member:`PyConfig.argv` arguments are now only parsed if :c:member:" +"`PyConfig.parse_argv` equals to ``1``." +msgstr "" + +msgid "" +"Parser debug mode. If greater than ``0``, turn on parser debugging output " +"(for expert only, depending on compilation options)." +msgstr "" + +msgid "" +"Incremented by the :option:`-d` command line option. Set to the :envvar:" +"`PYTHONDEBUG` environment variable value." +msgstr "" + +msgid "" +"Needs a :ref:`debug build of Python ` (the ``Py_DEBUG`` macro " +"must be defined)." +msgstr "" + +msgid "" +"If non-zero, calculation of path configuration is allowed to log warnings " +"into ``stderr``. If equals to ``0``, suppress these warnings." +msgstr "" + +msgid "Now also applies on Windows." +msgstr "" + +msgid "" +"The site-specific directory prefix where the platform independent Python " +"files are installed: :data:`sys.prefix`." +msgstr "" + +msgid "See also :c:member:`PyConfig.base_prefix`." +msgstr "" + +msgid "" +"Program name used to initialize :c:member:`~PyConfig.executable` and in " +"early error messages during Python initialization." +msgstr "" + +msgid "On macOS, use :envvar:`PYTHONEXECUTABLE` environment variable if set." +msgstr "" + +msgid "" +"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use :envvar:" +"`__PYVENV_LAUNCHER__` environment variable if set." +msgstr "" + +msgid "" +"Use ``argv[0]`` of :c:member:`~PyConfig.argv` if available and non-empty." +msgstr "" + +msgid "" +"Otherwise, use ``L\"python\"`` on Windows, or ``L\"python3\"`` on other " +"platforms." +msgstr "" + +msgid "" +"Directory where cached ``.pyc`` files are written: :data:`sys." +"pycache_prefix`." +msgstr "" + +msgid "" +"Set by the :option:`-X pycache_prefix=PATH <-X>` command line option and " +"the :envvar:`PYTHONPYCACHEPREFIX` environment variable. The command-line " +"option takes precedence." +msgstr "" + +msgid "If ``NULL``, :data:`sys.pycache_prefix` is set to ``None``." +msgstr "" + +msgid "" +"Quiet mode. If greater than ``0``, don't display the copyright and version " +"at Python startup in interactive mode." +msgstr "" + +msgid "Incremented by the :option:`-q` command line option." +msgstr "" + +msgid "Value of the :option:`-c` command line option." +msgstr "" + +msgid "Used by :c:func:`Py_RunMain`." +msgstr "" + +msgid "" +"Filename passed on the command line: trailing command line argument without :" +"option:`-c` or :option:`-m`. It is used by the :c:func:`Py_RunMain` function." +msgstr "" + +msgid "" +"For example, it is set to ``script.py`` by the ``python3 script.py arg`` " +"command line." +msgstr "" + +msgid "See also the :c:member:`PyConfig.skip_source_first_line` option." +msgstr "" + +msgid "Value of the :option:`-m` command line option." +msgstr "" + +msgid "" +"``package.module`` path to module that should be imported before ``site.py`` " +"is run." +msgstr "" + +msgid "" +"Set by the :option:`-X presite=package.module <-X>` command-line option and " +"the :envvar:`PYTHON_PRESITE` environment variable. The command-line option " +"takes precedence." +msgstr "" + +msgid "" +"Show total reference count at exit (excluding :term:`immortal` objects)?" +msgstr "" + +msgid "Set to ``1`` by :option:`-X showrefcount <-X>` command line option." +msgstr "" + +msgid "" +"Needs a :ref:`debug build of Python ` (the ``Py_REF_DEBUG`` " +"macro must be defined)." +msgstr "" + +msgid "Import the :mod:`site` module at startup?" +msgstr "" + +msgid "" +"If equal to zero, disable the import of the module site and the site-" +"dependent manipulations of :data:`sys.path` that it entails." +msgstr "" + +msgid "" +"Also disable these manipulations if the :mod:`site` module is explicitly " +"imported later (call :func:`site.main` if you want them to be triggered)." +msgstr "" + +msgid "Set to ``0`` by the :option:`-S` command line option." +msgstr "" + +msgid "" +":data:`sys.flags.no_site ` is set to the inverted value of :c:" +"member:`~PyConfig.site_import`." +msgstr "" + +msgid "" +"If non-zero, skip the first line of the :c:member:`PyConfig.run_filename` " +"source." +msgstr "" + +msgid "" +"It allows the usage of non-Unix forms of ``#!cmd``. This is intended for a " +"DOS specific hack only." +msgstr "" + +msgid "Set to ``1`` by the :option:`-x` command line option." +msgstr "" + +msgid "" +"Encoding and encoding errors of :data:`sys.stdin`, :data:`sys.stdout` and :" +"data:`sys.stderr` (but :data:`sys.stderr` always uses " +"``\"backslashreplace\"`` error handler)." +msgstr "" + +msgid "" +"Use the :envvar:`PYTHONIOENCODING` environment variable if it is non-empty." +msgstr "" + +msgid "Default encoding:" +msgstr "" + +msgid "``\"UTF-8\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero." +msgstr "" + +msgid "Otherwise, use the :term:`locale encoding`." +msgstr "" + +msgid "Default error handler:" +msgstr "" + +msgid "On Windows: use ``\"surrogateescape\"``." +msgstr "" + +msgid "" +"``\"surrogateescape\"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero, or " +"if the LC_CTYPE locale is \"C\" or \"POSIX\"." +msgstr "" + +msgid "``\"strict\"`` otherwise." +msgstr "" + +msgid "See also :c:member:`PyConfig.legacy_windows_stdio`." +msgstr "" + +msgid "Enable tracemalloc?" +msgstr "" + +msgid "If non-zero, call :func:`tracemalloc.start` at startup." +msgstr "" + +msgid "" +"Set by :option:`-X tracemalloc=N <-X>` command line option and by the :" +"envvar:`PYTHONTRACEMALLOC` environment variable." +msgstr "" + +msgid "Enable the Linux ``perf`` profiler support?" +msgstr "" + +msgid "If equals to ``1``, enable support for the Linux ``perf`` profiler." +msgstr "" + +msgid "" +"If equals to ``2``, enable support for the Linux ``perf`` profiler with " +"DWARF JIT support." +msgstr "" + +msgid "" +"Set to ``1`` by :option:`-X perf <-X>` command-line option and the :envvar:" +"`PYTHONPERFSUPPORT` environment variable." +msgstr "" + +msgid "" +"Set to ``2`` by the :option:`-X perf_jit <-X>` command-line option and the :" +"envvar:`PYTHON_PERF_JIT_SUPPORT` environment variable." +msgstr "" + +msgid "See :ref:`perf_profiling` for more information." +msgstr "" + +msgid "Directory of the Python standard library." +msgstr "" + +msgid "Use :ref:`environment variables `?" +msgstr "" + +msgid "" +"If equals to zero, ignore the :ref:`environment variables `." +msgstr "" + +msgid "Set to ``0`` by the :option:`-E` environment variable." +msgstr "" + +msgid "" +"If non-zero, ``stdout`` and ``stderr`` will be redirected to the system log." +msgstr "" + +msgid "Only available on macOS 10.12 and later, and on iOS." +msgstr "" + +msgid "" +"Default: ``0`` (don't use the system log) on macOS; ``1`` on iOS (use the " +"system log)." +msgstr "" + +msgid "If non-zero, add the user site directory to :data:`sys.path`." +msgstr "" + +msgid "Set to ``0`` by the :option:`-s` and :option:`-I` command line options." +msgstr "" + +msgid "Set to ``0`` by the :envvar:`PYTHONNOUSERSITE` environment variable." +msgstr "" + +msgid "" +"Verbose mode. If greater than ``0``, print a message each time a module is " +"imported, showing the place (filename or built-in module) from which it is " +"loaded." +msgstr "" + +msgid "" +"If greater than or equal to ``2``, print a message for each file that is " +"checked for when searching for a module. Also provides information on module " +"cleanup at exit." +msgstr "" + +msgid "Incremented by the :option:`-v` command line option." +msgstr "" + +msgid "Set by the :envvar:`PYTHONVERBOSE` environment variable value." +msgstr "" + +msgid "" +"Options of the :mod:`warnings` module to build warnings filters, lowest to " +"highest priority: :data:`sys.warnoptions`." +msgstr "" + +msgid "" +"The :mod:`warnings` module adds :data:`sys.warnoptions` in the reverse " +"order: the last :c:member:`PyConfig.warnoptions` item becomes the first item " +"of :data:`warnings.filters` which is checked first (highest priority)." +msgstr "" + +msgid "" +"The :option:`-W` command line options adds its value to :c:member:`~PyConfig." +"warnoptions`, it can be used multiple times." +msgstr "" + +msgid "" +"The :envvar:`PYTHONWARNINGS` environment variable can also be used to add " +"warning options. Multiple options can be specified, separated by commas (``," +"``)." +msgstr "" + +msgid "" +"If equal to ``0``, Python won't try to write ``.pyc`` files on the import of " +"source modules." +msgstr "" + +msgid "" +"Set to ``0`` by the :option:`-B` command line option and the :envvar:" +"`PYTHONDONTWRITEBYTECODE` environment variable." +msgstr "" + +msgid "" +":data:`sys.dont_write_bytecode` is initialized to the inverted value of :c:" +"member:`~PyConfig.write_bytecode`." +msgstr "" + +msgid "Values of the :option:`-X` command line options: :data:`sys._xoptions`." +msgstr "" + +msgid "If non-zero, write performance statistics at Python exit." +msgstr "" + +msgid "" +"Need a special build with the ``Py_STATS`` macro: see :option:`--enable-" +"pystats`." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.parse_argv` is non-zero, :c:member:`~PyConfig.argv` " +"arguments are parsed the same way the regular Python parses :ref:`command " +"line arguments `, and Python arguments are stripped from :" +"c:member:`~PyConfig.argv`." +msgstr "" + +msgid "" +"The :c:member:`~PyConfig.xoptions` options are parsed to set other options: " +"see the :option:`-X` command line option." +msgstr "" + +msgid "The ``show_alloc_count`` field has been removed." +msgstr "" + +msgid "Initialization with PyConfig" +msgstr "" + +msgid "" +"Initializing the interpreter from a populated configuration struct is " +"handled by calling :c:func:`Py_InitializeFromConfig`." +msgstr "" + +msgid "" +"If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` or :c:" +"func:`PyImport_ExtendInittab` are used, they must be set or called after " +"Python preinitialization and before the Python initialization. If Python is " +"initialized multiple times, :c:func:`PyImport_AppendInittab` or :c:func:" +"`PyImport_ExtendInittab` must be called before each Python initialization." +msgstr "" + +msgid "" +"The current configuration (``PyConfig`` type) is stored in " +"``PyInterpreterState.config``." +msgstr "" + +msgid "Example setting the program name::" +msgstr "" + +msgid "" +"void init_python(void)\n" +"{\n" +" PyStatus status;\n" +"\n" +" PyConfig config;\n" +" PyConfig_InitPythonConfig(&config);\n" +"\n" +" /* Set the program name. Implicitly preinitialize Python. */\n" +" status = PyConfig_SetString(&config, &config.program_name,\n" +" L\"/path/to/my_program\");\n" +" if (PyStatus_Exception(status)) {\n" +" goto exception;\n" +" }\n" +"\n" +" status = Py_InitializeFromConfig(&config);\n" +" if (PyStatus_Exception(status)) {\n" +" goto exception;\n" +" }\n" +" PyConfig_Clear(&config);\n" +" return;\n" +"\n" +"exception:\n" +" PyConfig_Clear(&config);\n" +" Py_ExitStatusException(status);\n" +"}" +msgstr "" + +msgid "" +"More complete example modifying the default configuration, read the " +"configuration, and then override some parameters. Note that since 3.11, many " +"parameters are not calculated until initialization, and so values cannot be " +"read from the configuration structure. Any values set before initialize is " +"called will be left unchanged by initialization::" +msgstr "" + +msgid "" +"PyStatus init_python(const char *program_name)\n" +"{\n" +" PyStatus status;\n" +"\n" +" PyConfig config;\n" +" PyConfig_InitPythonConfig(&config);\n" +"\n" +" /* Set the program name before reading the configuration\n" +" (decode byte string from the locale encoding).\n" +"\n" +" Implicitly preinitialize Python. */\n" +" status = PyConfig_SetBytesString(&config, &config.program_name,\n" +" program_name);\n" +" if (PyStatus_Exception(status)) {\n" +" goto done;\n" +" }\n" +"\n" +" /* Read all configuration at once */\n" +" status = PyConfig_Read(&config);\n" +" if (PyStatus_Exception(status)) {\n" +" goto done;\n" +" }\n" +"\n" +" /* Specify sys.path explicitly */\n" +" /* If you want to modify the default set of paths, finish\n" +" initialization first and then use PySys_GetObject(\"path\") */\n" +" config.module_search_paths_set = 1;\n" +" status = PyWideStringList_Append(&config.module_search_paths,\n" +" L\"/path/to/stdlib\");\n" +" if (PyStatus_Exception(status)) {\n" +" goto done;\n" +" }\n" +" status = PyWideStringList_Append(&config.module_search_paths,\n" +" L\"/path/to/more/modules\");\n" +" if (PyStatus_Exception(status)) {\n" +" goto done;\n" +" }\n" +"\n" +" /* Override executable computed by PyConfig_Read() */\n" +" status = PyConfig_SetString(&config, &config.executable,\n" +" L\"/path/to/my_executable\");\n" +" if (PyStatus_Exception(status)) {\n" +" goto done;\n" +" }\n" +"\n" +" status = Py_InitializeFromConfig(&config);\n" +"\n" +"done:\n" +" PyConfig_Clear(&config);\n" +" return status;\n" +"}" +msgstr "" + +msgid "Isolated Configuration" +msgstr "" + +msgid "" +":c:func:`PyPreConfig_InitIsolatedConfig` and :c:func:" +"`PyConfig_InitIsolatedConfig` functions create a configuration to isolate " +"Python from the system. For example, to embed Python into an application." +msgstr "" + +msgid "" +"This configuration ignores global configuration variables, environment " +"variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) " +"and user site directory. The C standard streams (ex: ``stdout``) and the " +"LC_CTYPE locale are left unchanged. Signal handlers are not installed." +msgstr "" + +msgid "" +"Configuration files are still used with this configuration to determine " +"paths that are unspecified. Ensure :c:member:`PyConfig.home` is specified to " +"avoid computing the default path configuration." +msgstr "" + +msgid "Python Configuration" +msgstr "" + +msgid "" +":c:func:`PyPreConfig_InitPythonConfig` and :c:func:" +"`PyConfig_InitPythonConfig` functions create a configuration to build a " +"customized Python which behaves as the regular Python." +msgstr "" + +msgid "" +"Environments variables and command line arguments are used to configure " +"Python, whereas global configuration variables are ignored." +msgstr "" + +msgid "" +"This function enables C locale coercion (:pep:`538`) and :ref:`Python UTF-8 " +"Mode ` (:pep:`540`) depending on the LC_CTYPE locale, :envvar:" +"`PYTHONUTF8` and :envvar:`PYTHONCOERCECLOCALE` environment variables." +msgstr "" + +msgid "Python Path Configuration" +msgstr "" + +msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:" +msgstr "" + +msgid "Path configuration inputs:" +msgstr "" + +msgid ":c:member:`PyConfig.home`" +msgstr "" + +msgid ":c:member:`PyConfig.platlibdir`" +msgstr "" + +msgid ":c:member:`PyConfig.pathconfig_warnings`" +msgstr "" + +msgid ":c:member:`PyConfig.program_name`" +msgstr "" + +msgid ":c:member:`PyConfig.pythonpath_env`" +msgstr "" + +msgid "current working directory: to get absolute paths" +msgstr "" + +msgid "" +"``PATH`` environment variable to get the program full path (from :c:member:" +"`PyConfig.program_name`)" +msgstr "" + +msgid "``__PYVENV_LAUNCHER__`` environment variable" +msgstr "" + +msgid "" +"(Windows only) Application paths in the registry under " +"\"Software\\Python\\PythonCore\\X.Y\\PythonPath\" of HKEY_CURRENT_USER and " +"HKEY_LOCAL_MACHINE (where X.Y is the Python version)." +msgstr "" + +msgid "Path configuration output fields:" +msgstr "" + +msgid ":c:member:`PyConfig.base_exec_prefix`" +msgstr "" + +msgid ":c:member:`PyConfig.base_executable`" +msgstr "" + +msgid ":c:member:`PyConfig.base_prefix`" +msgstr "" + +msgid ":c:member:`PyConfig.exec_prefix`" +msgstr "" + +msgid ":c:member:`PyConfig.executable`" +msgstr "" + +msgid "" +":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig." +"module_search_paths`" +msgstr "" + +msgid ":c:member:`PyConfig.prefix`" +msgstr "" + +msgid "" +"If at least one \"output field\" is not set, Python calculates the path " +"configuration to fill unset fields. If :c:member:`~PyConfig." +"module_search_paths_set` is equal to ``0``, :c:member:`~PyConfig." +"module_search_paths` is overridden and :c:member:`~PyConfig." +"module_search_paths_set` is set to ``1``." +msgstr "" + +msgid "" +"It is possible to completely ignore the function calculating the default " +"path configuration by setting explicitly all path configuration output " +"fields listed above. A string is considered as set even if it is non-empty. " +"``module_search_paths`` is considered as set if ``module_search_paths_set`` " +"is set to ``1``. In this case, ``module_search_paths`` will be used without " +"modification." +msgstr "" + +msgid "" +"Set :c:member:`~PyConfig.pathconfig_warnings` to ``0`` to suppress warnings " +"when calculating the path configuration (Unix only, Windows does not log any " +"warning)." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.base_prefix` or :c:member:`~PyConfig." +"base_exec_prefix` fields are not set, they inherit their value from :c:" +"member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` respectively." +msgstr "" + +msgid ":c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`:" +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.run_filename` is set and is a directory which " +"contains a ``__main__.py`` script, prepend :c:member:`~PyConfig." +"run_filename` to :data:`sys.path`." +msgstr "" + +msgid "If :c:member:`~PyConfig.isolated` is zero:" +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.run_module` is set, prepend the current directory " +"to :data:`sys.path`. Do nothing if the current directory cannot be read." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.run_filename` is set, prepend the directory of the " +"filename to :data:`sys.path`." +msgstr "" + +msgid "Otherwise, prepend an empty string to :data:`sys.path`." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.site_import` is non-zero, :data:`sys.path` can be " +"modified by the :mod:`site` module. If :c:member:`~PyConfig." +"user_site_directory` is non-zero and the user's site-package directory " +"exists, the :mod:`site` module appends the user's site-package directory to :" +"data:`sys.path`." +msgstr "" + +msgid "The following configuration files are used by the path configuration:" +msgstr "" + +msgid "``pyvenv.cfg``" +msgstr "" + +msgid "``._pth`` file (ex: ``python._pth``)" +msgstr "" + +msgid "``pybuilddir.txt`` (Unix only)" +msgstr "" + +msgid "If a ``._pth`` file is present:" +msgstr "" + +msgid "Set :c:member:`~PyConfig.isolated` to ``1``." +msgstr "" + +msgid "Set :c:member:`~PyConfig.use_environment` to ``0``." +msgstr "" + +msgid "Set :c:member:`~PyConfig.site_import` to ``0``." +msgstr "" + +msgid "Set :c:member:`~PyConfig.safe_path` to ``1``." +msgstr "" + +msgid "" +"If :c:member:`~PyConfig.home` is not set and a ``pyvenv.cfg`` file is " +"present in the same directory as :c:member:`~PyConfig.executable`, or its " +"parent, :c:member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` " +"are set that location. When this happens, :c:member:`~PyConfig.base_prefix` " +"and :c:member:`~PyConfig.base_exec_prefix` still keep their value, pointing " +"to the base installation. See :ref:`sys-path-init-virtual-environments` for " +"more information." +msgstr "" + +msgid "" +"The ``__PYVENV_LAUNCHER__`` environment variable is used to set :c:member:" +"`PyConfig.base_executable`." +msgstr "" + +msgid "" +":c:member:`~PyConfig.prefix`, and :c:member:`~PyConfig.exec_prefix`, are now " +"set to the ``pyvenv.cfg`` directory. This was previously done by :mod:" +"`site`, therefore affected by :option:`-S`." +msgstr "" + +msgid "Py_GetArgcArgv()" +msgstr "" + +msgid "Get the original command line arguments, before Python modified them." +msgstr "" + +msgid "See also :c:member:`PyConfig.orig_argv` member." +msgstr "" + +msgid "Delaying main module execution" +msgstr "" + +msgid "" +"In some embedding use cases, it may be desirable to separate interpreter " +"initialization from the execution of the main module." +msgstr "" + +msgid "" +"This separation can be achieved by setting ``PyConfig.run_command`` to the " +"empty string during initialization (to prevent the interpreter from dropping " +"into the interactive prompt), and then subsequently executing the desired " +"main module code using ``__main__.__dict__`` as the global namespace." +msgstr "" + +msgid "main()" +msgstr "" + +msgid "argv (in module sys)" +msgstr "" diff --git a/c-api/intro.po b/c-api/intro.po index beb72d63..37fc74b2 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -11,19 +11,21 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/intro.rst:8 msgid "Introduction" msgstr "Einführung" +#: ../../c-api/intro.rst:10 msgid "" "The Application Programmer's Interface to Python gives C and C++ programmers " "access to the Python interpreter at a variety of levels. The API is equally " @@ -36,6 +38,7 @@ msgid "" "`embedding` Python in an application." msgstr "" +#: ../../c-api/intro.rst:20 msgid "" "Writing an extension module is a relatively well-understood process, where a " "\"cookbook\" approach works well. There are several tools that automate the " @@ -44,6 +47,7 @@ msgid "" "less straightforward than writing an extension." msgstr "" +#: ../../c-api/intro.rst:26 msgid "" "Many API functions are useful independent of whether you're embedding or " "extending Python; moreover, most applications that embed Python will need " @@ -52,20 +56,25 @@ msgid "" "in a real application." msgstr "" +#: ../../c-api/intro.rst:34 msgid "Language version compatibility" msgstr "" +#: ../../c-api/intro.rst:36 msgid "Python's C API is compatible with C11 and C++11 versions of C and C++." msgstr "" +#: ../../c-api/intro.rst:38 msgid "" "This is a lower limit: the C API does not require features from later C/C++ " "versions. You do *not* need to enable your compiler's \"c11 mode\"." msgstr "" +#: ../../c-api/intro.rst:44 msgid "Coding standards" msgstr "" +#: ../../c-api/intro.rst:46 msgid "" "If you're writing C code for inclusion in CPython, you **must** follow the " "guidelines and standards defined in :PEP:`7`. These guidelines apply " @@ -74,36 +83,43 @@ msgid "" "modules, unless you eventually expect to contribute them to Python." msgstr "" +#: ../../c-api/intro.rst:56 msgid "Include Files" msgstr "" +#: ../../c-api/intro.rst:58 msgid "" "All function, type and macro definitions needed to use the Python/C API are " "included in your code by the following line::" msgstr "" +#: ../../c-api/intro.rst:61 msgid "" "#define PY_SSIZE_T_CLEAN\n" "#include " msgstr "" +#: ../../c-api/intro.rst:64 msgid "" "This implies inclusion of the following standard headers: ````, " "````, ````, ````, ```` and ```` (if available)." msgstr "" +#: ../../c-api/intro.rst:70 ../../c-api/intro.rst:145 msgid "" "Since Python may define some pre-processor definitions which affect the " "standard headers on some systems, you *must* include :file:`Python.h` before " "any standard headers are included." msgstr "" +#: ../../c-api/intro.rst:74 msgid "" "It is recommended to always define ``PY_SSIZE_T_CLEAN`` before including " "``Python.h``. See :ref:`arg-parsing` for a description of this macro." msgstr "" +#: ../../c-api/intro.rst:77 msgid "" "All user visible names defined by Python.h (except those defined by the " "included standard headers) have one of the prefixes ``Py`` or ``_Py``. " @@ -112,6 +128,7 @@ msgid "" "names do not have a reserved prefix." msgstr "" +#: ../../c-api/intro.rst:84 msgid "" "User code should never define names that begin with ``Py`` or ``_Py``. This " "confuses the reader, and jeopardizes the portability of the user code to " @@ -119,6 +136,7 @@ msgid "" "of these prefixes." msgstr "" +#: ../../c-api/intro.rst:89 msgid "" "The header files are typically installed with Python. On Unix, these are " "located in the directories :file:`{prefix}/include/pythonversion/` and :file:" @@ -130,6 +148,7 @@ msgid "" "specified to the installer." msgstr "" +#: ../../c-api/intro.rst:98 msgid "" "To include the headers, place both directories (if different) on your " "compiler's search path for includes. Do *not* place the parent directories " @@ -139,15 +158,97 @@ msgid "" "option:`exec_prefix <--exec-prefix>`." msgstr "" +#: ../../c-api/intro.rst:105 msgid "" "C++ users should note that although the API is defined entirely using C, the " "header files properly declare the entry points to be ``extern \"C\"``. As a " "result, there is no need to do anything special to use the API from C++." msgstr "" +#: ../../c-api/intro.rst:113 +msgid "System includes" +msgstr "" + +#: ../../c-api/intro.rst:115 +msgid "" +":file:`Python.h` includes several standard header files. C extensions should " +"include the standard headers that they use, and should not rely on these " +"implicit includes. The implicit includes are:" +msgstr "" + +#: ../../c-api/intro.rst:120 +msgid "````" +msgstr "" + +#: ../../c-api/intro.rst:121 +msgid "```` (on Windows)" +msgstr "" + +#: ../../c-api/intro.rst:122 +msgid "````" +msgstr "" + +#: ../../c-api/intro.rst:123 +msgid "````" +msgstr "" + +#: ../../c-api/intro.rst:124 +msgid "````" +msgstr "" + +#: ../../c-api/intro.rst:125 +msgid "````" +msgstr "" + +#: ../../c-api/intro.rst:126 +msgid "````" +msgstr "" + +#: ../../c-api/intro.rst:127 +msgid "````" +msgstr "" + +#: ../../c-api/intro.rst:128 +msgid "```` (if present)" +msgstr "" + +#: ../../c-api/intro.rst:130 +msgid "" +"The following are included for backwards compatibility, unless using :ref:" +"`Limited API ` 3.13 or newer:" +msgstr "" + +#: ../../c-api/intro.rst:133 +msgid "````" +msgstr "" + +#: ../../c-api/intro.rst:134 +msgid "```` (on POSIX)" +msgstr "" + +#: ../../c-api/intro.rst:136 +msgid "" +"The following are included for backwards compatibility, unless using :ref:" +"`Limited API ` 3.11 or newer:" +msgstr "" + +#: ../../c-api/intro.rst:139 +msgid "````" +msgstr "" + +#: ../../c-api/intro.rst:140 +msgid "````" +msgstr "" + +#: ../../c-api/intro.rst:141 +msgid "````" +msgstr "" + +#: ../../c-api/intro.rst:151 msgid "Useful macros" msgstr "" +#: ../../c-api/intro.rst:153 msgid "" "Several useful macros are defined in the Python header files. Many are " "defined closer to where they are useful (for example, :c:macro:" @@ -155,159 +256,584 @@ msgid "" "utility are defined here. This is not necessarily a complete listing." msgstr "" +#: ../../c-api/intro.rst:161 +msgid "" +"If this macro is defined, then the current system is able to start threads." +msgstr "" + +#: ../../c-api/intro.rst:163 +msgid "" +"Currently, all systems supported by CPython (per :pep:`11`), with the " +"exception of some WebAssembly platforms, support starting threads." +msgstr "" + +#: ../../c-api/intro.rst:170 +msgid "" +"Like :samp:`getenv({s})`, but returns ``NULL`` if :option:`-E` was passed on " +"the command line (see :c:member:`PyConfig.use_environment`)." +msgstr "" + +#: ../../c-api/intro.rst:175 +msgid "Docstring macros" +msgstr "" + +#: ../../c-api/intro.rst:179 +msgid "" +"Creates a variable with name *name* that can be used in docstrings. If " +"Python is built without docstrings (:option:`--without-doc-strings`), the " +"value will be an empty string." +msgstr "" + +#: ../../c-api/intro.rst:183 ../../c-api/intro.rst:200 +#: ../../c-api/intro.rst:468 +msgid "Example::" +msgstr "" + +#: ../../c-api/intro.rst:185 +msgid "" +"PyDoc_STRVAR(pop_doc, \"Remove and return the rightmost element.\");\n" +"\n" +"static PyMethodDef deque_methods[] = {\n" +" // ...\n" +" {\"pop\", (PyCFunction)deque_pop, METH_NOARGS, pop_doc},\n" +" // ...\n" +"}" +msgstr "" + +#: ../../c-api/intro.rst:193 +msgid "Expands to :samp:`PyDoc_VAR({name}) = PyDoc_STR({str})`." +msgstr "" + +#: ../../c-api/intro.rst:197 +msgid "" +"Expands to the given input string, or an empty string if docstrings are " +"disabled (:option:`--without-doc-strings`)." +msgstr "" + +#: ../../c-api/intro.rst:202 +msgid "" +"static PyMethodDef pysqlite_row_methods[] = {\n" +" {\"keys\", (PyCFunction)pysqlite_row_keys, METH_NOARGS,\n" +" PyDoc_STR(\"Returns the keys of the row.\")},\n" +" {NULL, NULL}\n" +"};" +msgstr "" + +#: ../../c-api/intro.rst:210 +msgid "" +"Declares a static character array variable with the given *name*. Expands " +"to :samp:`static const char {name}[]`" +msgstr "" + +#: ../../c-api/intro.rst:213 ../../c-api/intro.rst:354 +#: ../../c-api/intro.rst:365 +msgid "For example::" +msgstr "" + +#: ../../c-api/intro.rst:215 +msgid "" +"PyDoc_VAR(python_doc) = PyDoc_STR(\n" +" \"A genus of constricting snakes in the Pythonidae family native \"\n" +" \"to the tropics and subtropics of the Eastern Hemisphere.\");" +msgstr "" + +#: ../../c-api/intro.rst:221 +msgid "General utility macros" +msgstr "" + +#: ../../c-api/intro.rst:223 +msgid "The following macros are for common tasks not specific to Python." +msgstr "" + +#: ../../c-api/intro.rst:227 +msgid "" +"Use this for unused arguments in a function definition to silence compiler " +"warnings. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }``." +msgstr "" + +#: ../../c-api/intro.rst:234 +msgid "" +"Use a GCC attribute *name*, hiding it from compilers that don't support GCC " +"attributes (such as MSVC)." +msgstr "" + +#: ../../c-api/intro.rst:237 +msgid "" +"This expands to :samp:`__attribute__(({name)})` on a GCC compiler, and " +"expands to nothing on compilers that don't support GCC attributes." +msgstr "" + +#: ../../c-api/intro.rst:242 +msgid "Numeric utilities" +msgstr "" + +#: ../../c-api/intro.rst:246 msgid "Return the absolute value of ``x``." msgstr "" +#: ../../c-api/intro.rst:248 +msgid "" +"The argument may be evaluated more than once. Consequently, do not pass an " +"expression with side-effects directly to this macro." +msgstr "" + +#: ../../c-api/intro.rst:252 +msgid "" +"If the result cannot be represented (for example, if ``x`` has :c:macro:`!" +"INT_MIN` value for :c:expr:`int` type), the behavior is undefined." +msgstr "" + +#: ../../c-api/intro.rst:256 +msgid "Corresponds roughly to :samp:`(({x}) < 0 ? -({x}) : ({x}))`" +msgstr "" + +#: ../../c-api/intro.rst:263 +msgid "Return the larger or smaller of the arguments, respectively." +msgstr "" + +#: ../../c-api/intro.rst:265 +msgid "" +"Any arguments may be evaluated more than once. Consequently, do not pass an " +"expression with side-effects directly to this macro." +msgstr "" + +#: ../../c-api/intro.rst:269 +msgid "" +":c:macro:`!Py_MAX` corresponds roughly to :samp:`((({x}) > ({y})) ? ({x}) : " +"({y}))`." +msgstr "" + +#: ../../c-api/intro.rst:276 +msgid "" +"Similar to :samp:`{integer} >> {positions}`, but forces sign extension, as " +"the C standard does not define whether a right-shift of a signed integer " +"will perform sign extension or a zero-fill." +msgstr "" + +#: ../../c-api/intro.rst:280 +msgid "" +"*integer* should be any signed integer type. *positions* is the number of " +"positions to shift to the right." +msgstr "" + +#: ../../c-api/intro.rst:283 +msgid "" +"Both *integer* and *positions* can be evaluated more than once; " +"consequently, avoid directly passing a function call or some other operation " +"with side-effects to this macro. Instead, store the result as a variable and " +"then pass it." +msgstr "" + +#: ../../c-api/intro.rst:288 +msgid "" +"*type* is unused and only kept for backwards compatibility. Historically, " +"*type* was used to cast *integer*." +msgstr "" + +#: ../../c-api/intro.rst:293 +msgid "" +"This macro is now valid for all signed integer types, not just those for " +"which ``unsigned type`` is legal. As a result, *type* is no longer used." +msgstr "" + +#: ../../c-api/intro.rst:299 +msgid "" +"Argument must be a character or an integer in the range [-128, 127] or [0, " +"255]. This macro returns ``c`` cast to an ``unsigned char``." +msgstr "" + +#: ../../c-api/intro.rst:304 +msgid "Assertion utilities" +msgstr "" + +#: ../../c-api/intro.rst:308 +msgid "" +"Use this when you have a code path that cannot be reached by design. For " +"example, in the ``default:`` clause in a ``switch`` statement for which all " +"possible values are covered in ``case`` statements. Use this in places " +"where you might be tempted to put an ``assert(0)`` or ``abort()`` call." +msgstr "" + +#: ../../c-api/intro.rst:313 +msgid "" +"In release mode, the macro helps the compiler to optimize the code, and " +"avoids a warning about unreachable code. For example, the macro is " +"implemented with ``__builtin_unreachable()`` on GCC in release mode." +msgstr "" + +#: ../../c-api/intro.rst:317 +msgid "" +"In debug mode, and on unsupported compilers, the macro expands to a call to :" +"c:func:`Py_FatalError`." +msgstr "" + +#: ../../c-api/intro.rst:320 +msgid "" +"A use for ``Py_UNREACHABLE()`` is following a call to a function that never " +"returns but that is not declared ``_Noreturn``." +msgstr "" + +#: ../../c-api/intro.rst:323 +msgid "" +"If a code path is very unlikely code but can be reached under exceptional " +"case, this macro must not be used. For example, under low memory condition " +"or if a system call returns a value out of the expected range. In this " +"case, it's better to report the error to the caller. If the error cannot be " +"reported to caller, :c:func:`Py_FatalError` can be used." +msgstr "" + +#: ../../c-api/intro.rst:333 +msgid "" +"Cast *value* to type *smaller* from type *larger*, validating that no " +"information was lost." +msgstr "" + +#: ../../c-api/intro.rst:336 +msgid "" +"On release builds of Python, this is roughly equivalent to :samp:" +"`(({smaller}) {value})` (in C++, :samp:`static_cast<{smaller}>({value})` " +"will be used instead)." +msgstr "" + +#: ../../c-api/intro.rst:340 +msgid "" +"On debug builds (implying that :c:macro:`Py_DEBUG` is defined), this asserts " +"that no information was lost with the cast from *larger* to *smaller*." +msgstr "" + +#: ../../c-api/intro.rst:343 +msgid "" +"*value*, *larger*, and *smaller* may all be evaluated more than once in the " +"expression; consequently, do not pass an expression with side-effects " +"directly to this macro." +msgstr "" + +#: ../../c-api/intro.rst:349 +msgid "" +"Asserts a compile-time condition *cond*, as a statement. The build will fail " +"if the condition is false or cannot be evaluated at compile time." +msgstr "" + +#: ../../c-api/intro.rst:352 +msgid "Corresponds roughly to :samp:`static_assert({cond})` on C23 and above." +msgstr "" + +#: ../../c-api/intro.rst:356 +msgid "Py_BUILD_ASSERT(sizeof(PyTime_t) == sizeof(int64_t));" +msgstr "" + +#: ../../c-api/intro.rst:362 +msgid "" +"Asserts a compile-time condition *cond*, as an expression that evaluates to " +"``0``. The build will fail if the condition is false or cannot be evaluated " +"at compile time." +msgstr "" + +#: ../../c-api/intro.rst:367 +msgid "" +"#define foo_to_char(foo) \\\n" +" ((char *)(foo) + Py_BUILD_ASSERT_EXPR(offsetof(struct foo, string) == 0))" +msgstr "" + +#: ../../c-api/intro.rst:374 +msgid "Type size utilities" +msgstr "" + +#: ../../c-api/intro.rst:378 +msgid "Compute the length of a statically allocated C array at compile time." +msgstr "" + +#: ../../c-api/intro.rst:380 +msgid "" +"The *array* argument must be a C array with a size known at compile time. " +"Passing an array with an unknown size, such as a heap-allocated array, will " +"result in a compilation error on some compilers, or otherwise produce " +"incorrect results." +msgstr "" + +#: ../../c-api/intro.rst:385 +msgid "This is roughly equivalent to::" +msgstr "" + +#: ../../c-api/intro.rst:387 +msgid "sizeof(array) / sizeof((array)[0])" +msgstr "" + +#: ../../c-api/intro.rst:391 +msgid "Return the size of a structure (*type*) *member* in bytes." +msgstr "" + +#: ../../c-api/intro.rst:393 +msgid "Corresponds roughly to :samp:`sizeof((({type} *)NULL)->{member})`." +msgstr "" + +#: ../../c-api/intro.rst:399 +msgid "Macro definition utilities" +msgstr "" + +#: ../../c-api/intro.rst:403 +msgid "" +"This is equivalent to :samp:`{X}`, which is useful for token-pasting in " +"macros, as macro expansions in *X* are forcefully evaluated by the " +"preprocessor." +msgstr "" + +#: ../../c-api/intro.rst:409 +msgid "" +"Convert ``x`` to a C string. For example, ``Py_STRINGIFY(123)`` returns " +"``\"123\"``." +msgstr "" + +#: ../../c-api/intro.rst:416 +msgid "Declaration utilities" +msgstr "" + +#: ../../c-api/intro.rst:418 +msgid "" +"The following macros can be used in declarations. They are most useful for " +"defining the C API itself, and have limited use for extension authors. Most " +"of them expand to compiler-specific spellings of common extensions to the C " +"language." +msgstr "" + +#: ../../c-api/intro.rst:426 msgid "" "Ask the compiler to always inline a static inline function. The compiler can " "ignore it and decide to not inline the function." msgstr "" +#: ../../c-api/intro.rst:429 +msgid "" +"Corresponds to ``always_inline`` attribute in GCC and ``__forceinline`` in " +"MSVC." +msgstr "" + +#: ../../c-api/intro.rst:432 msgid "" "It can be used to inline performance critical static inline functions when " "building Python in debug mode with function inlining disabled. For example, " "MSC disables function inlining when building in debug mode." msgstr "" +#: ../../c-api/intro.rst:436 msgid "" "Marking blindly a static inline function with Py_ALWAYS_INLINE can result in " "worse performances (due to increased code size for example). The compiler is " "usually smarter than the developer for the cost/benefit analysis." msgstr "" +#: ../../c-api/intro.rst:440 msgid "" "If Python is :ref:`built in debug mode ` (if the :c:macro:" "`Py_DEBUG` macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does " "nothing." msgstr "" +#: ../../c-api/intro.rst:443 msgid "It must be specified before the function return type. Usage::" msgstr "" +#: ../../c-api/intro.rst:445 msgid "static inline Py_ALWAYS_INLINE int random(void) { return 4; }" msgstr "" +#: ../../c-api/intro.rst:451 msgid "" -"Argument must be a character or an integer in the range [-128, 127] or [0, " -"255]. This macro returns ``c`` cast to an ``unsigned char``." +"Disable inlining on a function. For example, it reduces the C stack " +"consumption: useful on LTO+PGO builds which heavily inline code (see :issue:" +"`33720`)." msgstr "" +#: ../../c-api/intro.rst:455 msgid "" -"Use this for deprecated declarations. The macro must be placed before the " -"symbol name." +"Corresponds to the ``noinline`` attribute/specification on GCC and MSVC." msgstr "" -msgid "Example::" +#: ../../c-api/intro.rst:457 +msgid "Usage::" +msgstr "" + +#: ../../c-api/intro.rst:459 +msgid "Py_NO_INLINE static int random(void) { return 4; }" +msgstr "" + +#: ../../c-api/intro.rst:465 +msgid "" +"Use this to declare APIs that were deprecated in a specific CPython version. " +"The macro must be placed before the symbol name." msgstr "" +#: ../../c-api/intro.rst:470 msgid "Py_DEPRECATED(3.8) PyAPI_FUNC(int) Py_OldFunction(void);" msgstr "" +#: ../../c-api/intro.rst:472 msgid "MSVC support was added." msgstr "" +#: ../../c-api/intro.rst:477 msgid "" -"Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the " -"command line (see :c:member:`PyConfig.use_environment`)." +"Declare a function returning the specified *type* using a fast-calling " +"qualifier for functions that are local to the current file. Semantically, " +"this is equivalent to :samp:`static {type}`." msgstr "" -msgid "Return the maximum value between ``x`` and ``y``." +#: ../../c-api/intro.rst:483 +msgid "" +"Equivalent to :c:macro:`Py_LOCAL` but additionally requests the function be " +"inlined." msgstr "" -msgid "Return the size of a structure (``type``) ``member`` in bytes." +#: ../../c-api/intro.rst:488 +msgid "" +"Macro used to declare a symbol as local to the shared library (hidden). On " +"supported platforms, it ensures the symbol is not exported." msgstr "" -msgid "Return the minimum value between ``x`` and ``y``." +#: ../../c-api/intro.rst:491 +msgid "" +"On compatible versions of GCC/Clang, it expands to " +"``__attribute__((visibility(\"hidden\")))``." msgstr "" +#: ../../c-api/intro.rst:496 msgid "" -"Disable inlining on a function. For example, it reduces the C stack " -"consumption: useful on LTO+PGO builds which heavily inline code (see :issue:" -"`33720`)." +"Macro used to declare a symbol (function or data) as exported. On Windows, " +"this expands to ``__declspec(dllexport)``. On compatible versions of GCC/" +"Clang, it expands to ``__attribute__((visibility(\"default\")))``. This " +"macro is for defining the C API itself; extension modules should not use it." msgstr "" -msgid "Usage::" +#: ../../c-api/intro.rst:505 +msgid "" +"Macro used to declare a symbol as imported. On Windows, this expands to " +"``__declspec(dllimport)``. This macro is for defining the C API itself; " +"extension modules should not use it." msgstr "" -msgid "Py_NO_INLINE static int random(void) { return 4; }" +#: ../../c-api/intro.rst:512 +msgid "" +"Macro used by CPython to declare a function as part of the C API. Its " +"expansion depends on the platform and build configuration. This macro is " +"intended for defining CPython's C API itself; extension modules should not " +"use it for their own symbols." msgstr "" +#: ../../c-api/intro.rst:520 msgid "" -"Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns ``\"123\"``." +"Macro used by CPython to declare a public global variable as part of the C " +"API. Its expansion depends on the platform and build configuration. This " +"macro is intended for defining CPython's C API itself; extension modules " +"should not use it for their own symbols." msgstr "" +#: ../../c-api/intro.rst:527 +msgid "Outdated macros" +msgstr "" + +#: ../../c-api/intro.rst:529 msgid "" -"Use this when you have a code path that cannot be reached by design. For " -"example, in the ``default:`` clause in a ``switch`` statement for which all " -"possible values are covered in ``case`` statements. Use this in places " -"where you might be tempted to put an ``assert(0)`` or ``abort()`` call." +"The following :term:`soft deprecated` macros have been used to features that " +"have been standardized in C11 (or previous standards)." msgstr "" +#: ../../c-api/intro.rst:534 msgid "" -"In release mode, the macro helps the compiler to optimize the code, and " -"avoids a warning about unreachable code. For example, the macro is " -"implemented with ``__builtin_unreachable()`` on GCC in release mode." +"On some GCC-like compilers, specify alignment to *num* bytes. This does " +"nothing on other compilers." +msgstr "" + +#: ../../c-api/intro.rst:537 +msgid "Use the standard ``alignas`` specifier rather than this macro." msgstr "" +#: ../../c-api/intro.rst:543 msgid "" -"A use for ``Py_UNREACHABLE()`` is following a call a function that never " -"returns but that is not declared :c:macro:`_Py_NO_RETURN`." +"The :c:func:`printf` formatting modifier for :c:type:`size_t`. Use ``\"z\"`` " +"directly instead." msgstr "" +#: ../../c-api/intro.rst:551 msgid "" -"If a code path is very unlikely code but can be reached under exceptional " -"case, this macro must not be used. For example, under low memory condition " -"or if a system call returns a value out of the expected range. In this " -"case, it's better to report the error to the caller. If the error cannot be " -"reported to caller, :c:func:`Py_FatalError` can be used." +"Use *number* as a ``long long`` or ``unsigned long long`` integer literal, " +"respectively." msgstr "" +#: ../../c-api/intro.rst:554 msgid "" -"Use this for unused arguments in a function definition to silence compiler " -"warnings. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }``." +"Expands to *number* followed by ``LL`` or ``LLU``, respectively, but will " +"expand to some compiler-specific suffixes on some older compilers." msgstr "" +#: ../../c-api/intro.rst:557 +msgid "Consider using the C99 standard suffixes ``LL`` and ``LLU`` directly." +msgstr "" + +#: ../../c-api/intro.rst:567 msgid "" -"Creates a variable with name ``name`` that can be used in docstrings. If " -"Python is built without docstrings, the value will be empty." +"Aliases for the types :c:type:`!long long`, :c:type:`!int32_t`, :c:type:`!" +"uint32_t`. :c:type:`!int64_t` and :c:type:`!uint64_t`, respectively. " +"Historically, these types needed compiler-specific extensions." msgstr "" +#: ../../c-api/intro.rst:579 msgid "" -"Use :c:macro:`PyDoc_STRVAR` for docstrings to support building Python " -"without docstrings, as specified in :pep:`7`." +"Aliases for the values :c:macro:`!LLONG_MIN`, :c:macro:`!LLONG_MAX`, :c:" +"macro:`!ULLONG_MAX`, and :c:macro:`!SIZE_MAX`, respectively. Use these " +"standard names instead." msgstr "" +#: ../../c-api/intro.rst:583 msgid "" -"PyDoc_STRVAR(pop_doc, \"Remove and return the rightmost element.\");\n" -"\n" -"static PyMethodDef deque_methods[] = {\n" -" // ...\n" -" {\"pop\", (PyCFunction)deque_pop, METH_NOARGS, pop_doc},\n" -" // ...\n" -"}" +"The required header, ````, :ref:`is included ` in ``Python.h``." msgstr "" +#: ../../c-api/intro.rst:590 +msgid "This is an alias to :c:func:`!memcpy`." +msgstr "" + +#: ../../c-api/intro.rst:592 +msgid "Use :c:func:`!memcpy` directly instead." +msgstr "" + +#: ../../c-api/intro.rst:597 msgid "" -"Creates a docstring for the given input string or an empty string if " -"docstrings are disabled." +"Size of the :c:type:`!wchar_t` type. Use ``sizeof(wchar_t)`` or " +"``WCHAR_WIDTH/8`` instead." msgstr "" +#: ../../c-api/intro.rst:600 msgid "" -"Use :c:macro:`PyDoc_STR` in specifying docstrings to support building Python " -"without docstrings, as specified in :pep:`7`." +"The required header for the latter, ````, :ref:`is included ` in ``Python.h``." msgstr "" +#: ../../c-api/intro.rst:607 msgid "" -"static PyMethodDef pysqlite_row_methods[] = {\n" -" {\"keys\", (PyCFunction)pysqlite_row_keys, METH_NOARGS,\n" -" PyDoc_STR(\"Returns the keys of the row.\")},\n" -" {NULL, NULL}\n" -"};" +"Defined if ``wchar_t`` can hold a Unicode character (UCS-4). Use " +"``sizeof(wchar_t) >= 4`` instead" +msgstr "" + +#: ../../c-api/intro.rst:614 +msgid "This is an alias to the C99-standard ``va_copy`` function." +msgstr "" + +#: ../../c-api/intro.rst:616 +msgid "" +"Historically, this would use a compiler-specific method to copy a " +"``va_list``." msgstr "" +#: ../../c-api/intro.rst:618 +msgid "This is now an alias to ``va_copy``." +msgstr "" + +#: ../../c-api/intro.rst:627 msgid "Objects, Types and Reference Counts" msgstr "" +#: ../../c-api/intro.rst:631 msgid "" "Most Python/C API functions have one or more arguments as well as a return " "value of type :c:expr:`PyObject*`. This type is a pointer to an opaque data " @@ -322,6 +848,7 @@ msgid "" "objects." msgstr "" +#: ../../c-api/intro.rst:642 msgid "" "All Python objects (even Python integers) have a :dfn:`type` and a :dfn:" "`reference count`. An object's type determines what kind of object it is (e." @@ -332,9 +859,11 @@ msgid "" "a Python list." msgstr "" +#: ../../c-api/intro.rst:653 msgid "Reference Counts" msgstr "" +#: ../../c-api/intro.rst:655 msgid "" "The reference count is important because today's computers have a finite " "(and often severely limited) memory size; it counts how many different " @@ -349,6 +878,7 @@ msgid "" "that.\")" msgstr "" +#: ../../c-api/intro.rst:672 msgid "" "Reference counts are always manipulated explicitly. The normal way is to " "use the macro :c:func:`Py_INCREF` to take a new reference to an object (i.e. " @@ -367,6 +897,7 @@ msgid "" "increment is a simple operation." msgstr "" +#: ../../c-api/intro.rst:688 msgid "" "It is not necessary to hold a :term:`strong reference` (i.e. increment the " "reference count) for every local variable that contains a pointer to an " @@ -384,6 +915,7 @@ msgid "" "reference to every argument for the duration of the call." msgstr "" +#: ../../c-api/intro.rst:704 msgid "" "However, a common pitfall is to extract an object from a list and hold on to " "it for a while without taking a new reference. Some other operation might " @@ -394,6 +926,7 @@ msgid "" "`Py_DECREF`, so almost any operation is potentially dangerous." msgstr "" +#: ../../c-api/intro.rst:712 msgid "" "A safe approach is to always use the generic operations (functions whose " "name begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or " @@ -403,9 +936,11 @@ msgid "" "when they are done with the result; this soon becomes second nature." msgstr "" +#: ../../c-api/intro.rst:723 msgid "Reference Count Details" msgstr "" +#: ../../c-api/intro.rst:725 msgid "" "The reference count behavior of functions in the Python/C API is best " "explained in terms of *ownership of references*. Ownership pertains to " @@ -422,14 +957,22 @@ msgid "" "`borrowed reference`." msgstr "" +#: ../../c-api/intro.rst:738 msgid "" "Conversely, when a calling function passes in a reference to an object, " "there are two possibilities: the function *steals* a reference to the " -"object, or it does not. *Stealing a reference* means that when you pass a " -"reference to a function, that function assumes that it now owns that " -"reference, and you are not responsible for it any longer." +"object, or it does not." +msgstr "" + +#: ../../c-api/intro.rst:742 +msgid "" +"*Stealing a reference* means that when you pass a reference to a function, " +"that function assumes that it now owns that reference. Since the new owner " +"can use :c:func:`!Py_DECREF` at its discretion, you (the caller) must not " +"use that reference after the call." msgstr "" +#: ../../c-api/intro.rst:751 msgid "" "Few functions steal references; the two notable exceptions are :c:func:" "`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to " @@ -441,6 +984,7 @@ msgid "" "below)::" msgstr "" +#: ../../c-api/intro.rst:759 msgid "" "PyObject *t;\n" "\n" @@ -450,6 +994,7 @@ msgid "" "PyTuple_SetItem(t, 2, PyUnicode_FromString(\"three\"));" msgstr "" +#: ../../c-api/intro.rst:766 msgid "" "Here, :c:func:`PyLong_FromLong` returns a new reference which is immediately " "stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object " @@ -457,6 +1002,7 @@ msgid "" "another reference before calling the reference-stealing function." msgstr "" +#: ../../c-api/intro.rst:771 msgid "" "Incidentally, :c:func:`PyTuple_SetItem` is the *only* way to set tuple " "items; :c:func:`PySequence_SetItem` and :c:func:`PyObject_SetItem` refuse to " @@ -464,11 +1010,13 @@ msgid "" "func:`PyTuple_SetItem` for tuples that you are creating yourself." msgstr "" +#: ../../c-api/intro.rst:776 msgid "" "Equivalent code for populating a list can be written using :c:func:" "`PyList_New` and :c:func:`PyList_SetItem`." msgstr "" +#: ../../c-api/intro.rst:779 msgid "" "However, in practice, you will rarely use these ways of creating and " "populating a tuple or list. There's a generic function, :c:func:" @@ -477,6 +1025,7 @@ msgid "" "be replaced by the following (which also takes care of the error checking)::" msgstr "" +#: ../../c-api/intro.rst:785 msgid "" "PyObject *tuple, *list;\n" "\n" @@ -484,6 +1033,7 @@ msgid "" "list = Py_BuildValue(\"[iis]\", 1, 2, \"three\");" msgstr "" +#: ../../c-api/intro.rst:790 msgid "" "It is much more common to use :c:func:`PyObject_SetItem` and friends with " "items whose references you are only borrowing, like arguments that were " @@ -494,6 +1044,7 @@ msgid "" "sequence) to a given item::" msgstr "" +#: ../../c-api/intro.rst:797 msgid "" "int\n" "set_all(PyObject *target, PyObject *item)\n" @@ -517,6 +1068,7 @@ msgid "" "}" msgstr "" +#: ../../c-api/intro.rst:820 msgid "" "The situation is slightly different for function return values. While " "passing a reference to most functions does not change your ownership " @@ -529,6 +1081,7 @@ msgid "" "becomes the owner of the reference)." msgstr "" +#: ../../c-api/intro.rst:829 msgid "" "It is important to realize that whether you own a reference returned by a " "function depends on which function you call only --- *the plumage* (the type " @@ -539,12 +1092,14 @@ msgid "" "the same arguments), you do own a reference to the returned object." msgstr "" +#: ../../c-api/intro.rst:841 msgid "" "Here is an example of how you could write a function that computes the sum " "of the items in a list of integers; once using :c:func:`PyList_GetItem`, " "and once using :c:func:`PySequence_GetItem`. ::" msgstr "" +#: ../../c-api/intro.rst:845 msgid "" "long\n" "sum_list(PyObject *list)\n" @@ -569,6 +1124,7 @@ msgid "" "}" msgstr "" +#: ../../c-api/intro.rst:871 msgid "" "long\n" "sum_sequence(PyObject *sequence)\n" @@ -599,9 +1155,11 @@ msgid "" "}" msgstr "" +#: ../../c-api/intro.rst:905 msgid "Types" msgstr "" +#: ../../c-api/intro.rst:907 msgid "" "There are few other data types that play a significant role in the Python/C " "API; most are simple C types such as :c:expr:`int`, :c:expr:`long`, :c:expr:" @@ -612,6 +1170,7 @@ msgid "" "that use them." msgstr "" +#: ../../c-api/intro.rst:917 msgid "" "A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. " "C99 doesn't define such a thing directly (size_t is an unsigned integral " @@ -619,9 +1178,11 @@ msgid "" "positive value of type :c:type:`Py_ssize_t`." msgstr "" +#: ../../c-api/intro.rst:926 msgid "Exceptions" msgstr "Ausnahmen" +#: ../../c-api/intro.rst:928 msgid "" "The Python programmer only needs to deal with exceptions if specific error " "handling is required; unhandled exceptions are automatically propagated to " @@ -630,6 +1191,7 @@ msgid "" "stack traceback." msgstr "" +#: ../../c-api/intro.rst:936 msgid "" "For C programmers, however, error checking always has to be explicit. All " "functions in the Python/C API can raise exceptions, unless an explicit claim " @@ -644,6 +1206,7 @@ msgid "" "explicitly documented." msgstr "" +#: ../../c-api/intro.rst:951 msgid "" "Exception state is maintained in per-thread storage (this is equivalent to " "using global storage in an unthreaded application). A thread can be in one " @@ -656,6 +1219,7 @@ msgid "" "clears the exception state." msgstr "" +#: ../../c-api/intro.rst:961 msgid "" "The full exception state consists of three objects (all of which can be " "``NULL``): the exception type, the corresponding exception value, and the " @@ -668,6 +1232,7 @@ msgid "" "``sys.exc_info()`` and friends." msgstr "" +#: ../../c-api/intro.rst:973 msgid "" "Note that starting with Python 1.5, the preferred, thread-safe way to access " "the exception state from Python code is to call the function :func:`sys." @@ -681,6 +1246,7 @@ msgid "" "referenced by the stack frames in the traceback." msgstr "" +#: ../../c-api/intro.rst:984 msgid "" "As a general principle, a function that calls another function to perform " "some task should check whether the called function raised an exception, and " @@ -691,6 +1257,7 @@ msgid "" "of the error." msgstr "" +#: ../../c-api/intro.rst:993 msgid "" "A simple example of detecting exceptions and passing them on is shown in " "the :c:func:`!sum_sequence` example above. It so happens that this example " @@ -699,6 +1266,7 @@ msgid "" "why you like Python, we show the equivalent Python code::" msgstr "" +#: ../../c-api/intro.rst:999 msgid "" "def incr_item(dict, key):\n" " try:\n" @@ -708,9 +1276,11 @@ msgid "" " dict[key] = item + 1" msgstr "" +#: ../../c-api/intro.rst:1008 msgid "Here is the corresponding C code, in all its glory::" msgstr "" +#: ../../c-api/intro.rst:1010 msgid "" "int\n" "incr_item(PyObject *dict, PyObject *key)\n" @@ -756,6 +1326,7 @@ msgid "" "}" msgstr "" +#: ../../c-api/intro.rst:1060 msgid "" "This example represents an endorsed use of the ``goto`` statement in C! It " "illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:" @@ -768,9 +1339,11 @@ msgid "" "success after the final call made is successful." msgstr "" +#: ../../c-api/intro.rst:1074 msgid "Embedding Python" msgstr "" +#: ../../c-api/intro.rst:1076 msgid "" "The one important task that only embedders (as opposed to extension writers) " "of the Python interpreter have to worry about is the initialization, and " @@ -778,6 +1351,7 @@ msgid "" "the interpreter can only be used after the interpreter has been initialized." msgstr "" +#: ../../c-api/intro.rst:1089 msgid "" "The basic initialization function is :c:func:`Py_Initialize`. This " "initializes the table of loaded modules, and creates the fundamental " @@ -785,6 +1359,7 @@ msgid "" "initializes the module search path (``sys.path``)." msgstr "" +#: ../../c-api/intro.rst:1094 msgid "" ":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys." "argv``). If this variable is needed by Python code that will be executed " @@ -792,6 +1367,7 @@ msgid "" "must be set: see :ref:`Python Initialization Configuration `." msgstr "" +#: ../../c-api/intro.rst:1099 msgid "" "On most systems (in particular, on Unix and Windows, although the details " "are slightly different), :c:func:`Py_Initialize` calculates the module " @@ -803,6 +1379,7 @@ msgid "" "on the shell command search path (the environment variable :envvar:`PATH`)." msgstr "" +#: ../../c-api/intro.rst:1108 msgid "" "For instance, if the Python executable is found in :file:`/usr/local/bin/" "python`, it will assume that the libraries are in :file:`/usr/local/lib/" @@ -813,16 +1390,15 @@ msgid "" "in front of the standard path by setting :envvar:`PYTHONPATH`." msgstr "" +#: ../../c-api/intro.rst:1116 msgid "" "The embedding application can steer the search by setting :c:member:" "`PyConfig.program_name` *before* calling :c:func:`Py_InitializeFromConfig`. " "Note that :envvar:`PYTHONHOME` still overrides this and :envvar:`PYTHONPATH` " -"is still inserted in front of the standard path. An application that " -"requires total control has to provide its own implementation of :c:func:" -"`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, and :c:" -"func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)." +"is still inserted in front of the standard path." msgstr "" +#: ../../c-api/intro.rst:1124 msgid "" "Sometimes, it is desirable to \"uninitialize\" Python. For instance, the " "application may want to start over (make another call to :c:func:" @@ -836,15 +1412,18 @@ msgid "" "released." msgstr "" +#: ../../c-api/intro.rst:1138 msgid "Debugging Builds" msgstr "" +#: ../../c-api/intro.rst:1140 msgid "" "Python can be built with several macros to enable extra checks of the " "interpreter and extension modules. These checks tend to add a large amount " "of overhead to the runtime so they are not enabled by default." msgstr "" +#: ../../c-api/intro.rst:1144 msgid "" "A full list of the various types of debugging builds is in the file :file:" "`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are " @@ -854,23 +1433,38 @@ msgid "" "section." msgstr "" +#: ../../c-api/intro.rst:1152 msgid "" "Compiling the interpreter with the :c:macro:`!Py_DEBUG` macro defined " "produces what is generally meant by :ref:`a debug build of Python `. :c:macro:`!Py_DEBUG` is enabled in the Unix build by adding :option:" -"`--with-pydebug` to the :file:`./configure` command. It is also implied by " -"the presence of the not-Python-specific :c:macro:`!_DEBUG` macro. When :c:" -"macro:`!Py_DEBUG` is enabled in the Unix build, compiler optimization is " -"disabled." +"build>`." msgstr "" +#: ../../c-api/intro.rst:1155 +msgid "" +"On Unix, :c:macro:`!Py_DEBUG` can be enabled by adding :option:`--with-" +"pydebug` to the :file:`./configure` command. This will also disable compiler " +"optimization." +msgstr "" + +#: ../../c-api/intro.rst:1158 +msgid "" +"On Windows, selecting a debug build (e.g., by passing the :option:`-d` " +"option to :file:`PCbuild/build.bat`) automatically enables :c:macro:`!" +"Py_DEBUG`. Additionally, the presence of the not-Python-specific :c:macro:`!" +"_DEBUG` macro, when defined by the compiler, will also implicitly enable :c:" +"macro:`!Py_DEBUG`." +msgstr "" + +#: ../../c-api/intro.rst:1163 msgid "" "In addition to the reference count debugging described below, extra checks " -"are performed, see :ref:`Python Debug Build `." +"are performed. See :ref:`Python Debug Build ` for more details." msgstr "" +#: ../../c-api/intro.rst:1166 msgid "" -"Defining :c:macro:`Py_TRACE_REFS` enables reference tracing (see the :option:" +"Defining ``Py_TRACE_REFS`` enables reference tracing (see the :option:" "`configure --with-trace-refs option <--with-trace-refs>`). When defined, a " "circular doubly linked list of active objects is maintained by adding two " "extra fields to every :c:type:`PyObject`. Total allocations are tracked as " @@ -878,43 +1472,55 @@ msgid "" "this happens after every statement run by the interpreter.)" msgstr "" +#: ../../c-api/intro.rst:1173 msgid "" "Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " "distribution for more detailed information." msgstr "" +#: ../../c-api/intro.rst:1180 msgid "Recommended third party tools" msgstr "" +#: ../../c-api/intro.rst:1182 msgid "" "The following third party tools offer both simpler and more sophisticated " "approaches to creating C, C++ and Rust extensions for Python:" msgstr "" +#: ../../c-api/intro.rst:1185 msgid "`Cython `_" msgstr "" +#: ../../c-api/intro.rst:1186 msgid "`cffi `_" msgstr "" +#: ../../c-api/intro.rst:1187 msgid "`HPy `_" msgstr "" +#: ../../c-api/intro.rst:1188 msgid "`nanobind `_ (C++)" msgstr "" +#: ../../c-api/intro.rst:1189 msgid "`Numba `_" msgstr "" +#: ../../c-api/intro.rst:1190 msgid "`pybind11 `_ (C++)" msgstr "" +#: ../../c-api/intro.rst:1191 msgid "`PyO3 `_ (Rust)" msgstr "" +#: ../../c-api/intro.rst:1192 msgid "`SWIG `_" msgstr "" +#: ../../c-api/intro.rst:1194 msgid "" "Using tools such as these can help avoid writing code that is tightly bound " "to a particular version of CPython, avoid reference counting errors, and " @@ -925,6 +1531,7 @@ msgid "" "sources." msgstr "" +#: ../../c-api/intro.rst:1201 msgid "" "These projects are not supported by the same people who maintain Python, and " "issues need to be raised with the projects directly. Remember to check that " @@ -932,106 +1539,123 @@ msgid "" "outdated." msgstr "" +#: ../../c-api/intro.rst:1208 msgid "" "`Python Packaging User Guide: Binary Extensions `_" msgstr "" +#: ../../c-api/intro.rst:1209 msgid "" "The Python Packaging User Guide not only covers several available tools that " "simplify the creation of binary extensions, but also discusses the various " "reasons why creating an extension module may be desirable in the first place." msgstr "" +#: ../../c-api/intro.rst:629 msgid "object" msgstr "" +#: ../../c-api/intro.rst:629 msgid "type" msgstr "Typ" +#: ../../c-api/intro.rst:668 msgid "Py_INCREF (C function)" msgstr "" +#: ../../c-api/intro.rst:668 msgid "Py_DECREF (C function)" msgstr "" +#: ../../c-api/intro.rst:747 msgid "PyList_SetItem (C function)" msgstr "" +#: ../../c-api/intro.rst:747 msgid "PyTuple_SetItem (C function)" msgstr "" +#: ../../c-api/intro.rst:818 msgid "set_all()" msgstr "" +#: ../../c-api/intro.rst:837 msgid "PyList_GetItem (C function)" msgstr "" +#: ../../c-api/intro.rst:837 msgid "PySequence_GetItem (C function)" msgstr "" +#: ../../c-api/intro.rst:867 msgid "sum_list()" msgstr "" +#: ../../c-api/intro.rst:899 ../../c-api/intro.rst:991 msgid "sum_sequence()" msgstr "" +#: ../../c-api/intro.rst:934 msgid "PyErr_Occurred (C function)" msgstr "" +#: ../../c-api/intro.rst:947 msgid "PyErr_SetString (C function)" msgstr "" +#: ../../c-api/intro.rst:947 ../../c-api/intro.rst:1055 msgid "PyErr_Clear (C function)" msgstr "" +#: ../../c-api/intro.rst:971 msgid "exc_info (in module sys)" msgstr "" +#: ../../c-api/intro.rst:1006 ../../c-api/intro.rst:1053 msgid "incr_item()" msgstr "" +#: ../../c-api/intro.rst:1055 msgid "PyErr_ExceptionMatches (C function)" msgstr "" +#: ../../c-api/intro.rst:1055 msgid "Py_XDECREF (C function)" msgstr "" +#: ../../c-api/intro.rst:1081 msgid "Py_Initialize (C function)" msgstr "" +#: ../../c-api/intro.rst:1081 msgid "module" msgstr "" +#: ../../c-api/intro.rst:1081 msgid "builtins" msgstr "" +#: ../../c-api/intro.rst:1081 msgid "__main__" msgstr "" +#: ../../c-api/intro.rst:1081 msgid "sys" msgstr "sys" +#: ../../c-api/intro.rst:1081 msgid "search" msgstr "" +#: ../../c-api/intro.rst:1081 msgid "path" msgstr "" +#: ../../c-api/intro.rst:1081 msgid "path (in module sys)" msgstr "" -msgid "Py_GetPath (C function)" -msgstr "" - -msgid "Py_GetPrefix (C function)" -msgstr "" - -msgid "Py_GetExecPrefix (C function)" -msgstr "" - -msgid "Py_GetProgramFullPath (C function)" -msgstr "" - +#: ../../c-api/intro.rst:1122 msgid "Py_IsInitialized (C function)" msgstr "" diff --git a/c-api/intro.po~ b/c-api/intro.po~ new file mode 100644 index 00000000..beb72d63 --- /dev/null +++ b/c-api/intro.po~ @@ -0,0 +1,1037 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Introduction" +msgstr "Einführung" + +msgid "" +"The Application Programmer's Interface to Python gives C and C++ programmers " +"access to the Python interpreter at a variety of levels. The API is equally " +"usable from C++, but for brevity it is generally referred to as the Python/C " +"API. There are two fundamentally different reasons for using the Python/C " +"API. The first reason is to write *extension modules* for specific purposes; " +"these are C modules that extend the Python interpreter. This is probably " +"the most common use. The second reason is to use Python as a component in a " +"larger application; this technique is generally referred to as :dfn:" +"`embedding` Python in an application." +msgstr "" + +msgid "" +"Writing an extension module is a relatively well-understood process, where a " +"\"cookbook\" approach works well. There are several tools that automate the " +"process to some extent. While people have embedded Python in other " +"applications since its early existence, the process of embedding Python is " +"less straightforward than writing an extension." +msgstr "" + +msgid "" +"Many API functions are useful independent of whether you're embedding or " +"extending Python; moreover, most applications that embed Python will need " +"to provide a custom extension as well, so it's probably a good idea to " +"become familiar with writing an extension before attempting to embed Python " +"in a real application." +msgstr "" + +msgid "Language version compatibility" +msgstr "" + +msgid "Python's C API is compatible with C11 and C++11 versions of C and C++." +msgstr "" + +msgid "" +"This is a lower limit: the C API does not require features from later C/C++ " +"versions. You do *not* need to enable your compiler's \"c11 mode\"." +msgstr "" + +msgid "Coding standards" +msgstr "" + +msgid "" +"If you're writing C code for inclusion in CPython, you **must** follow the " +"guidelines and standards defined in :PEP:`7`. These guidelines apply " +"regardless of the version of Python you are contributing to. Following " +"these conventions is not necessary for your own third party extension " +"modules, unless you eventually expect to contribute them to Python." +msgstr "" + +msgid "Include Files" +msgstr "" + +msgid "" +"All function, type and macro definitions needed to use the Python/C API are " +"included in your code by the following line::" +msgstr "" + +msgid "" +"#define PY_SSIZE_T_CLEAN\n" +"#include " +msgstr "" + +msgid "" +"This implies inclusion of the following standard headers: ````, " +"````, ````, ````, ```` and ```` (if available)." +msgstr "" + +msgid "" +"Since Python may define some pre-processor definitions which affect the " +"standard headers on some systems, you *must* include :file:`Python.h` before " +"any standard headers are included." +msgstr "" + +msgid "" +"It is recommended to always define ``PY_SSIZE_T_CLEAN`` before including " +"``Python.h``. See :ref:`arg-parsing` for a description of this macro." +msgstr "" + +msgid "" +"All user visible names defined by Python.h (except those defined by the " +"included standard headers) have one of the prefixes ``Py`` or ``_Py``. " +"Names beginning with ``_Py`` are for internal use by the Python " +"implementation and should not be used by extension writers. Structure member " +"names do not have a reserved prefix." +msgstr "" + +msgid "" +"User code should never define names that begin with ``Py`` or ``_Py``. This " +"confuses the reader, and jeopardizes the portability of the user code to " +"future Python versions, which may define additional names beginning with one " +"of these prefixes." +msgstr "" + +msgid "" +"The header files are typically installed with Python. On Unix, these are " +"located in the directories :file:`{prefix}/include/pythonversion/` and :file:" +"`{exec_prefix}/include/pythonversion/`, where :option:`prefix <--prefix>` " +"and :option:`exec_prefix <--exec-prefix>` are defined by the corresponding " +"parameters to Python's :program:`configure` script and *version* is ``'%d." +"%d' % sys.version_info[:2]``. On Windows, the headers are installed in :" +"file:`{prefix}/include`, where ``prefix`` is the installation directory " +"specified to the installer." +msgstr "" + +msgid "" +"To include the headers, place both directories (if different) on your " +"compiler's search path for includes. Do *not* place the parent directories " +"on the search path and then use ``#include ``; this will " +"break on multi-platform builds since the platform independent headers under :" +"option:`prefix <--prefix>` include the platform specific headers from :" +"option:`exec_prefix <--exec-prefix>`." +msgstr "" + +msgid "" +"C++ users should note that although the API is defined entirely using C, the " +"header files properly declare the entry points to be ``extern \"C\"``. As a " +"result, there is no need to do anything special to use the API from C++." +msgstr "" + +msgid "Useful macros" +msgstr "" + +msgid "" +"Several useful macros are defined in the Python header files. Many are " +"defined closer to where they are useful (for example, :c:macro:" +"`Py_RETURN_NONE`, :c:macro:`PyMODINIT_FUNC`). Others of a more general " +"utility are defined here. This is not necessarily a complete listing." +msgstr "" + +msgid "Return the absolute value of ``x``." +msgstr "" + +msgid "" +"Ask the compiler to always inline a static inline function. The compiler can " +"ignore it and decide to not inline the function." +msgstr "" + +msgid "" +"It can be used to inline performance critical static inline functions when " +"building Python in debug mode with function inlining disabled. For example, " +"MSC disables function inlining when building in debug mode." +msgstr "" + +msgid "" +"Marking blindly a static inline function with Py_ALWAYS_INLINE can result in " +"worse performances (due to increased code size for example). The compiler is " +"usually smarter than the developer for the cost/benefit analysis." +msgstr "" + +msgid "" +"If Python is :ref:`built in debug mode ` (if the :c:macro:" +"`Py_DEBUG` macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does " +"nothing." +msgstr "" + +msgid "It must be specified before the function return type. Usage::" +msgstr "" + +msgid "static inline Py_ALWAYS_INLINE int random(void) { return 4; }" +msgstr "" + +msgid "" +"Argument must be a character or an integer in the range [-128, 127] or [0, " +"255]. This macro returns ``c`` cast to an ``unsigned char``." +msgstr "" + +msgid "" +"Use this for deprecated declarations. The macro must be placed before the " +"symbol name." +msgstr "" + +msgid "Example::" +msgstr "" + +msgid "Py_DEPRECATED(3.8) PyAPI_FUNC(int) Py_OldFunction(void);" +msgstr "" + +msgid "MSVC support was added." +msgstr "" + +msgid "" +"Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the " +"command line (see :c:member:`PyConfig.use_environment`)." +msgstr "" + +msgid "Return the maximum value between ``x`` and ``y``." +msgstr "" + +msgid "Return the size of a structure (``type``) ``member`` in bytes." +msgstr "" + +msgid "Return the minimum value between ``x`` and ``y``." +msgstr "" + +msgid "" +"Disable inlining on a function. For example, it reduces the C stack " +"consumption: useful on LTO+PGO builds which heavily inline code (see :issue:" +"`33720`)." +msgstr "" + +msgid "Usage::" +msgstr "" + +msgid "Py_NO_INLINE static int random(void) { return 4; }" +msgstr "" + +msgid "" +"Convert ``x`` to a C string. E.g. ``Py_STRINGIFY(123)`` returns ``\"123\"``." +msgstr "" + +msgid "" +"Use this when you have a code path that cannot be reached by design. For " +"example, in the ``default:`` clause in a ``switch`` statement for which all " +"possible values are covered in ``case`` statements. Use this in places " +"where you might be tempted to put an ``assert(0)`` or ``abort()`` call." +msgstr "" + +msgid "" +"In release mode, the macro helps the compiler to optimize the code, and " +"avoids a warning about unreachable code. For example, the macro is " +"implemented with ``__builtin_unreachable()`` on GCC in release mode." +msgstr "" + +msgid "" +"A use for ``Py_UNREACHABLE()`` is following a call a function that never " +"returns but that is not declared :c:macro:`_Py_NO_RETURN`." +msgstr "" + +msgid "" +"If a code path is very unlikely code but can be reached under exceptional " +"case, this macro must not be used. For example, under low memory condition " +"or if a system call returns a value out of the expected range. In this " +"case, it's better to report the error to the caller. If the error cannot be " +"reported to caller, :c:func:`Py_FatalError` can be used." +msgstr "" + +msgid "" +"Use this for unused arguments in a function definition to silence compiler " +"warnings. Example: ``int func(int a, int Py_UNUSED(b)) { return a; }``." +msgstr "" + +msgid "" +"Creates a variable with name ``name`` that can be used in docstrings. If " +"Python is built without docstrings, the value will be empty." +msgstr "" + +msgid "" +"Use :c:macro:`PyDoc_STRVAR` for docstrings to support building Python " +"without docstrings, as specified in :pep:`7`." +msgstr "" + +msgid "" +"PyDoc_STRVAR(pop_doc, \"Remove and return the rightmost element.\");\n" +"\n" +"static PyMethodDef deque_methods[] = {\n" +" // ...\n" +" {\"pop\", (PyCFunction)deque_pop, METH_NOARGS, pop_doc},\n" +" // ...\n" +"}" +msgstr "" + +msgid "" +"Creates a docstring for the given input string or an empty string if " +"docstrings are disabled." +msgstr "" + +msgid "" +"Use :c:macro:`PyDoc_STR` in specifying docstrings to support building Python " +"without docstrings, as specified in :pep:`7`." +msgstr "" + +msgid "" +"static PyMethodDef pysqlite_row_methods[] = {\n" +" {\"keys\", (PyCFunction)pysqlite_row_keys, METH_NOARGS,\n" +" PyDoc_STR(\"Returns the keys of the row.\")},\n" +" {NULL, NULL}\n" +"};" +msgstr "" + +msgid "Objects, Types and Reference Counts" +msgstr "" + +msgid "" +"Most Python/C API functions have one or more arguments as well as a return " +"value of type :c:expr:`PyObject*`. This type is a pointer to an opaque data " +"type representing an arbitrary Python object. Since all Python object types " +"are treated the same way by the Python language in most situations (e.g., " +"assignments, scope rules, and argument passing), it is only fitting that " +"they should be represented by a single C type. Almost all Python objects " +"live on the heap: you never declare an automatic or static variable of type :" +"c:type:`PyObject`, only pointer variables of type :c:expr:`PyObject*` can " +"be declared. The sole exception are the type objects; since these must " +"never be deallocated, they are typically static :c:type:`PyTypeObject` " +"objects." +msgstr "" + +msgid "" +"All Python objects (even Python integers) have a :dfn:`type` and a :dfn:" +"`reference count`. An object's type determines what kind of object it is (e." +"g., an integer, a list, or a user-defined function; there are many more as " +"explained in :ref:`types`). For each of the well-known types there is a " +"macro to check whether an object is of that type; for instance, " +"``PyList_Check(a)`` is true if (and only if) the object pointed to by *a* is " +"a Python list." +msgstr "" + +msgid "Reference Counts" +msgstr "" + +msgid "" +"The reference count is important because today's computers have a finite " +"(and often severely limited) memory size; it counts how many different " +"places there are that have a :term:`strong reference` to an object. Such a " +"place could be another object, or a global (or static) C variable, or a " +"local variable in some C function. When the last :term:`strong reference` to " +"an object is released (i.e. its reference count becomes zero), the object is " +"deallocated. If it contains references to other objects, those references " +"are released. Those other objects may be deallocated in turn, if there are " +"no more references to them, and so on. (There's an obvious problem with " +"objects that reference each other here; for now, the solution is \"don't do " +"that.\")" +msgstr "" + +msgid "" +"Reference counts are always manipulated explicitly. The normal way is to " +"use the macro :c:func:`Py_INCREF` to take a new reference to an object (i.e. " +"increment its reference count by one), and :c:func:`Py_DECREF` to release " +"that reference (i.e. decrement the reference count by one). The :c:func:" +"`Py_DECREF` macro is considerably more complex than the incref one, since it " +"must check whether the reference count becomes zero and then cause the " +"object's deallocator to be called. The deallocator is a function pointer " +"contained in the object's type structure. The type-specific deallocator " +"takes care of releasing references for other objects contained in the object " +"if this is a compound object type, such as a list, as well as performing any " +"additional finalization that's needed. There's no chance that the reference " +"count can overflow; at least as many bits are used to hold the reference " +"count as there are distinct memory locations in virtual memory (assuming " +"``sizeof(Py_ssize_t) >= sizeof(void*)``). Thus, the reference count " +"increment is a simple operation." +msgstr "" + +msgid "" +"It is not necessary to hold a :term:`strong reference` (i.e. increment the " +"reference count) for every local variable that contains a pointer to an " +"object. In theory, the object's reference count goes up by one when the " +"variable is made to point to it and it goes down by one when the variable " +"goes out of scope. However, these two cancel each other out, so at the end " +"the reference count hasn't changed. The only real reason to use the " +"reference count is to prevent the object from being deallocated as long as " +"our variable is pointing to it. If we know that there is at least one " +"other reference to the object that lives at least as long as our variable, " +"there is no need to take a new :term:`strong reference` (i.e. increment the " +"reference count) temporarily. An important situation where this arises is in " +"objects that are passed as arguments to C functions in an extension module " +"that are called from Python; the call mechanism guarantees to hold a " +"reference to every argument for the duration of the call." +msgstr "" + +msgid "" +"However, a common pitfall is to extract an object from a list and hold on to " +"it for a while without taking a new reference. Some other operation might " +"conceivably remove the object from the list, releasing that reference, and " +"possibly deallocating it. The real danger is that innocent-looking " +"operations may invoke arbitrary Python code which could do this; there is a " +"code path which allows control to flow back to the user from a :c:func:" +"`Py_DECREF`, so almost any operation is potentially dangerous." +msgstr "" + +msgid "" +"A safe approach is to always use the generic operations (functions whose " +"name begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or " +"``PyMapping_``). These operations always create a new :term:`strong " +"reference` (i.e. increment the reference count) of the object they return. " +"This leaves the caller with the responsibility to call :c:func:`Py_DECREF` " +"when they are done with the result; this soon becomes second nature." +msgstr "" + +msgid "Reference Count Details" +msgstr "" + +msgid "" +"The reference count behavior of functions in the Python/C API is best " +"explained in terms of *ownership of references*. Ownership pertains to " +"references, never to objects (objects are not owned: they are always " +"shared). \"Owning a reference\" means being responsible for calling " +"Py_DECREF on it when the reference is no longer needed. Ownership can also " +"be transferred, meaning that the code that receives ownership of the " +"reference then becomes responsible for eventually releasing it by calling :c:" +"func:`Py_DECREF` or :c:func:`Py_XDECREF` when it's no longer needed---or " +"passing on this responsibility (usually to its caller). When a function " +"passes ownership of a reference on to its caller, the caller is said to " +"receive a *new* reference. When no ownership is transferred, the caller is " +"said to *borrow* the reference. Nothing needs to be done for a :term:" +"`borrowed reference`." +msgstr "" + +msgid "" +"Conversely, when a calling function passes in a reference to an object, " +"there are two possibilities: the function *steals* a reference to the " +"object, or it does not. *Stealing a reference* means that when you pass a " +"reference to a function, that function assumes that it now owns that " +"reference, and you are not responsible for it any longer." +msgstr "" + +msgid "" +"Few functions steal references; the two notable exceptions are :c:func:" +"`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to " +"the item (but not to the tuple or list into which the item is put!). These " +"functions were designed to steal a reference because of a common idiom for " +"populating a tuple or list with newly created objects; for example, the code " +"to create the tuple ``(1, 2, \"three\")`` could look like this (forgetting " +"about error handling for the moment; a better way to code this is shown " +"below)::" +msgstr "" + +msgid "" +"PyObject *t;\n" +"\n" +"t = PyTuple_New(3);\n" +"PyTuple_SetItem(t, 0, PyLong_FromLong(1L));\n" +"PyTuple_SetItem(t, 1, PyLong_FromLong(2L));\n" +"PyTuple_SetItem(t, 2, PyUnicode_FromString(\"three\"));" +msgstr "" + +msgid "" +"Here, :c:func:`PyLong_FromLong` returns a new reference which is immediately " +"stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object " +"although the reference to it will be stolen, use :c:func:`Py_INCREF` to grab " +"another reference before calling the reference-stealing function." +msgstr "" + +msgid "" +"Incidentally, :c:func:`PyTuple_SetItem` is the *only* way to set tuple " +"items; :c:func:`PySequence_SetItem` and :c:func:`PyObject_SetItem` refuse to " +"do this since tuples are an immutable data type. You should only use :c:" +"func:`PyTuple_SetItem` for tuples that you are creating yourself." +msgstr "" + +msgid "" +"Equivalent code for populating a list can be written using :c:func:" +"`PyList_New` and :c:func:`PyList_SetItem`." +msgstr "" + +msgid "" +"However, in practice, you will rarely use these ways of creating and " +"populating a tuple or list. There's a generic function, :c:func:" +"`Py_BuildValue`, that can create most common objects from C values, directed " +"by a :dfn:`format string`. For example, the above two blocks of code could " +"be replaced by the following (which also takes care of the error checking)::" +msgstr "" + +msgid "" +"PyObject *tuple, *list;\n" +"\n" +"tuple = Py_BuildValue(\"(iis)\", 1, 2, \"three\");\n" +"list = Py_BuildValue(\"[iis]\", 1, 2, \"three\");" +msgstr "" + +msgid "" +"It is much more common to use :c:func:`PyObject_SetItem` and friends with " +"items whose references you are only borrowing, like arguments that were " +"passed in to the function you are writing. In that case, their behaviour " +"regarding references is much saner, since you don't have to take a new " +"reference just so you can give that reference away (\"have it be stolen\"). " +"For example, this function sets all items of a list (actually, any mutable " +"sequence) to a given item::" +msgstr "" + +msgid "" +"int\n" +"set_all(PyObject *target, PyObject *item)\n" +"{\n" +" Py_ssize_t i, n;\n" +"\n" +" n = PyObject_Length(target);\n" +" if (n < 0)\n" +" return -1;\n" +" for (i = 0; i < n; i++) {\n" +" PyObject *index = PyLong_FromSsize_t(i);\n" +" if (!index)\n" +" return -1;\n" +" if (PyObject_SetItem(target, index, item) < 0) {\n" +" Py_DECREF(index);\n" +" return -1;\n" +" }\n" +" Py_DECREF(index);\n" +" }\n" +" return 0;\n" +"}" +msgstr "" + +msgid "" +"The situation is slightly different for function return values. While " +"passing a reference to most functions does not change your ownership " +"responsibilities for that reference, many functions that return a reference " +"to an object give you ownership of the reference. The reason is simple: in " +"many cases, the returned object is created on the fly, and the reference " +"you get is the only reference to the object. Therefore, the generic " +"functions that return object references, like :c:func:`PyObject_GetItem` " +"and :c:func:`PySequence_GetItem`, always return a new reference (the caller " +"becomes the owner of the reference)." +msgstr "" + +msgid "" +"It is important to realize that whether you own a reference returned by a " +"function depends on which function you call only --- *the plumage* (the type " +"of the object passed as an argument to the function) *doesn't enter into it!" +"* Thus, if you extract an item from a list using :c:func:`PyList_GetItem`, " +"you don't own the reference --- but if you obtain the same item from the " +"same list using :c:func:`PySequence_GetItem` (which happens to take exactly " +"the same arguments), you do own a reference to the returned object." +msgstr "" + +msgid "" +"Here is an example of how you could write a function that computes the sum " +"of the items in a list of integers; once using :c:func:`PyList_GetItem`, " +"and once using :c:func:`PySequence_GetItem`. ::" +msgstr "" + +msgid "" +"long\n" +"sum_list(PyObject *list)\n" +"{\n" +" Py_ssize_t i, n;\n" +" long total = 0, value;\n" +" PyObject *item;\n" +"\n" +" n = PyList_Size(list);\n" +" if (n < 0)\n" +" return -1; /* Not a list */\n" +" for (i = 0; i < n; i++) {\n" +" item = PyList_GetItem(list, i); /* Can't fail */\n" +" if (!PyLong_Check(item)) continue; /* Skip non-integers */\n" +" value = PyLong_AsLong(item);\n" +" if (value == -1 && PyErr_Occurred())\n" +" /* Integer too big to fit in a C long, bail out */\n" +" return -1;\n" +" total += value;\n" +" }\n" +" return total;\n" +"}" +msgstr "" + +msgid "" +"long\n" +"sum_sequence(PyObject *sequence)\n" +"{\n" +" Py_ssize_t i, n;\n" +" long total = 0, value;\n" +" PyObject *item;\n" +" n = PySequence_Length(sequence);\n" +" if (n < 0)\n" +" return -1; /* Has no length */\n" +" for (i = 0; i < n; i++) {\n" +" item = PySequence_GetItem(sequence, i);\n" +" if (item == NULL)\n" +" return -1; /* Not a sequence, or other failure */\n" +" if (PyLong_Check(item)) {\n" +" value = PyLong_AsLong(item);\n" +" Py_DECREF(item);\n" +" if (value == -1 && PyErr_Occurred())\n" +" /* Integer too big to fit in a C long, bail out */\n" +" return -1;\n" +" total += value;\n" +" }\n" +" else {\n" +" Py_DECREF(item); /* Discard reference ownership */\n" +" }\n" +" }\n" +" return total;\n" +"}" +msgstr "" + +msgid "Types" +msgstr "" + +msgid "" +"There are few other data types that play a significant role in the Python/C " +"API; most are simple C types such as :c:expr:`int`, :c:expr:`long`, :c:expr:" +"`double` and :c:expr:`char*`. A few structure types are used to describe " +"static tables used to list the functions exported by a module or the data " +"attributes of a new object type, and another is used to describe the value " +"of a complex number. These will be discussed together with the functions " +"that use them." +msgstr "" + +msgid "" +"A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. " +"C99 doesn't define such a thing directly (size_t is an unsigned integral " +"type). See :pep:`353` for details. ``PY_SSIZE_T_MAX`` is the largest " +"positive value of type :c:type:`Py_ssize_t`." +msgstr "" + +msgid "Exceptions" +msgstr "Ausnahmen" + +msgid "" +"The Python programmer only needs to deal with exceptions if specific error " +"handling is required; unhandled exceptions are automatically propagated to " +"the caller, then to the caller's caller, and so on, until they reach the top-" +"level interpreter, where they are reported to the user accompanied by a " +"stack traceback." +msgstr "" + +msgid "" +"For C programmers, however, error checking always has to be explicit. All " +"functions in the Python/C API can raise exceptions, unless an explicit claim " +"is made otherwise in a function's documentation. In general, when a " +"function encounters an error, it sets an exception, discards any object " +"references that it owns, and returns an error indicator. If not documented " +"otherwise, this indicator is either ``NULL`` or ``-1``, depending on the " +"function's return type. A few functions return a Boolean true/false result, " +"with false indicating an error. Very few functions return no explicit error " +"indicator or have an ambiguous return value, and require explicit testing " +"for errors with :c:func:`PyErr_Occurred`. These exceptions are always " +"explicitly documented." +msgstr "" + +msgid "" +"Exception state is maintained in per-thread storage (this is equivalent to " +"using global storage in an unthreaded application). A thread can be in one " +"of two states: an exception has occurred, or not. The function :c:func:" +"`PyErr_Occurred` can be used to check for this: it returns a borrowed " +"reference to the exception type object when an exception has occurred, and " +"``NULL`` otherwise. There are a number of functions to set the exception " +"state: :c:func:`PyErr_SetString` is the most common (though not the most " +"general) function to set the exception state, and :c:func:`PyErr_Clear` " +"clears the exception state." +msgstr "" + +msgid "" +"The full exception state consists of three objects (all of which can be " +"``NULL``): the exception type, the corresponding exception value, and the " +"traceback. These have the same meanings as the Python result of ``sys." +"exc_info()``; however, they are not the same: the Python objects represent " +"the last exception being handled by a Python :keyword:`try` ... :keyword:" +"`except` statement, while the C level exception state only exists while an " +"exception is being passed on between C functions until it reaches the Python " +"bytecode interpreter's main loop, which takes care of transferring it to " +"``sys.exc_info()`` and friends." +msgstr "" + +msgid "" +"Note that starting with Python 1.5, the preferred, thread-safe way to access " +"the exception state from Python code is to call the function :func:`sys." +"exc_info`, which returns the per-thread exception state for Python code. " +"Also, the semantics of both ways to access the exception state have changed " +"so that a function which catches an exception will save and restore its " +"thread's exception state so as to preserve the exception state of its " +"caller. This prevents common bugs in exception handling code caused by an " +"innocent-looking function overwriting the exception being handled; it also " +"reduces the often unwanted lifetime extension for objects that are " +"referenced by the stack frames in the traceback." +msgstr "" + +msgid "" +"As a general principle, a function that calls another function to perform " +"some task should check whether the called function raised an exception, and " +"if so, pass the exception state on to its caller. It should discard any " +"object references that it owns, and return an error indicator, but it " +"should *not* set another exception --- that would overwrite the exception " +"that was just raised, and lose important information about the exact cause " +"of the error." +msgstr "" + +msgid "" +"A simple example of detecting exceptions and passing them on is shown in " +"the :c:func:`!sum_sequence` example above. It so happens that this example " +"doesn't need to clean up any owned references when it detects an error. The " +"following example function shows some error cleanup. First, to remind you " +"why you like Python, we show the equivalent Python code::" +msgstr "" + +msgid "" +"def incr_item(dict, key):\n" +" try:\n" +" item = dict[key]\n" +" except KeyError:\n" +" item = 0\n" +" dict[key] = item + 1" +msgstr "" + +msgid "Here is the corresponding C code, in all its glory::" +msgstr "" + +msgid "" +"int\n" +"incr_item(PyObject *dict, PyObject *key)\n" +"{\n" +" /* Objects all initialized to NULL for Py_XDECREF */\n" +" PyObject *item = NULL, *const_one = NULL, *incremented_item = NULL;\n" +" int rv = -1; /* Return value initialized to -1 (failure) */\n" +"\n" +" item = PyObject_GetItem(dict, key);\n" +" if (item == NULL) {\n" +" /* Handle KeyError only: */\n" +" if (!PyErr_ExceptionMatches(PyExc_KeyError))\n" +" goto error;\n" +"\n" +" /* Clear the error and use zero: */\n" +" PyErr_Clear();\n" +" item = PyLong_FromLong(0L);\n" +" if (item == NULL)\n" +" goto error;\n" +" }\n" +" const_one = PyLong_FromLong(1L);\n" +" if (const_one == NULL)\n" +" goto error;\n" +"\n" +" incremented_item = PyNumber_Add(item, const_one);\n" +" if (incremented_item == NULL)\n" +" goto error;\n" +"\n" +" if (PyObject_SetItem(dict, key, incremented_item) < 0)\n" +" goto error;\n" +" rv = 0; /* Success */\n" +" /* Continue with cleanup code */\n" +"\n" +" error:\n" +" /* Cleanup code, shared by success and failure path */\n" +"\n" +" /* Use Py_XDECREF() to ignore NULL references */\n" +" Py_XDECREF(item);\n" +" Py_XDECREF(const_one);\n" +" Py_XDECREF(incremented_item);\n" +"\n" +" return rv; /* -1 for error, 0 for success */\n" +"}" +msgstr "" + +msgid "" +"This example represents an endorsed use of the ``goto`` statement in C! It " +"illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:" +"`PyErr_Clear` to handle specific exceptions, and the use of :c:func:" +"`Py_XDECREF` to dispose of owned references that may be ``NULL`` (note the " +"``'X'`` in the name; :c:func:`Py_DECREF` would crash when confronted with a " +"``NULL`` reference). It is important that the variables used to hold owned " +"references are initialized to ``NULL`` for this to work; likewise, the " +"proposed return value is initialized to ``-1`` (failure) and only set to " +"success after the final call made is successful." +msgstr "" + +msgid "Embedding Python" +msgstr "" + +msgid "" +"The one important task that only embedders (as opposed to extension writers) " +"of the Python interpreter have to worry about is the initialization, and " +"possibly the finalization, of the Python interpreter. Most functionality of " +"the interpreter can only be used after the interpreter has been initialized." +msgstr "" + +msgid "" +"The basic initialization function is :c:func:`Py_Initialize`. This " +"initializes the table of loaded modules, and creates the fundamental " +"modules :mod:`builtins`, :mod:`__main__`, and :mod:`sys`. It also " +"initializes the module search path (``sys.path``)." +msgstr "" + +msgid "" +":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys." +"argv``). If this variable is needed by Python code that will be executed " +"later, setting :c:member:`PyConfig.argv` and :c:member:`PyConfig.parse_argv` " +"must be set: see :ref:`Python Initialization Configuration `." +msgstr "" + +msgid "" +"On most systems (in particular, on Unix and Windows, although the details " +"are slightly different), :c:func:`Py_Initialize` calculates the module " +"search path based upon its best guess for the location of the standard " +"Python interpreter executable, assuming that the Python library is found in " +"a fixed location relative to the Python interpreter executable. In " +"particular, it looks for a directory named :file:`lib/python{X.Y}` relative " +"to the parent directory where the executable named :file:`python` is found " +"on the shell command search path (the environment variable :envvar:`PATH`)." +msgstr "" + +msgid "" +"For instance, if the Python executable is found in :file:`/usr/local/bin/" +"python`, it will assume that the libraries are in :file:`/usr/local/lib/" +"python{X.Y}`. (In fact, this particular path is also the \"fallback\" " +"location, used when no executable file named :file:`python` is found along :" +"envvar:`PATH`.) The user can override this behavior by setting the " +"environment variable :envvar:`PYTHONHOME`, or insert additional directories " +"in front of the standard path by setting :envvar:`PYTHONPATH`." +msgstr "" + +msgid "" +"The embedding application can steer the search by setting :c:member:" +"`PyConfig.program_name` *before* calling :c:func:`Py_InitializeFromConfig`. " +"Note that :envvar:`PYTHONHOME` still overrides this and :envvar:`PYTHONPATH` " +"is still inserted in front of the standard path. An application that " +"requires total control has to provide its own implementation of :c:func:" +"`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, and :c:" +"func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)." +msgstr "" + +msgid "" +"Sometimes, it is desirable to \"uninitialize\" Python. For instance, the " +"application may want to start over (make another call to :c:func:" +"`Py_Initialize`) or the application is simply done with its use of Python " +"and wants to free memory allocated by Python. This can be accomplished by " +"calling :c:func:`Py_FinalizeEx`. The function :c:func:`Py_IsInitialized` " +"returns true if Python is currently in the initialized state. More " +"information about these functions is given in a later chapter. Notice that :" +"c:func:`Py_FinalizeEx` does *not* free all memory allocated by the Python " +"interpreter, e.g. memory allocated by extension modules currently cannot be " +"released." +msgstr "" + +msgid "Debugging Builds" +msgstr "" + +msgid "" +"Python can be built with several macros to enable extra checks of the " +"interpreter and extension modules. These checks tend to add a large amount " +"of overhead to the runtime so they are not enabled by default." +msgstr "" + +msgid "" +"A full list of the various types of debugging builds is in the file :file:" +"`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are " +"available that support tracing of reference counts, debugging the memory " +"allocator, or low-level profiling of the main interpreter loop. Only the " +"most frequently used builds will be described in the remainder of this " +"section." +msgstr "" + +msgid "" +"Compiling the interpreter with the :c:macro:`!Py_DEBUG` macro defined " +"produces what is generally meant by :ref:`a debug build of Python `. :c:macro:`!Py_DEBUG` is enabled in the Unix build by adding :option:" +"`--with-pydebug` to the :file:`./configure` command. It is also implied by " +"the presence of the not-Python-specific :c:macro:`!_DEBUG` macro. When :c:" +"macro:`!Py_DEBUG` is enabled in the Unix build, compiler optimization is " +"disabled." +msgstr "" + +msgid "" +"In addition to the reference count debugging described below, extra checks " +"are performed, see :ref:`Python Debug Build `." +msgstr "" + +msgid "" +"Defining :c:macro:`Py_TRACE_REFS` enables reference tracing (see the :option:" +"`configure --with-trace-refs option <--with-trace-refs>`). When defined, a " +"circular doubly linked list of active objects is maintained by adding two " +"extra fields to every :c:type:`PyObject`. Total allocations are tracked as " +"well. Upon exit, all existing references are printed. (In interactive mode " +"this happens after every statement run by the interpreter.)" +msgstr "" + +msgid "" +"Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " +"distribution for more detailed information." +msgstr "" + +msgid "Recommended third party tools" +msgstr "" + +msgid "" +"The following third party tools offer both simpler and more sophisticated " +"approaches to creating C, C++ and Rust extensions for Python:" +msgstr "" + +msgid "`Cython `_" +msgstr "" + +msgid "`cffi `_" +msgstr "" + +msgid "`HPy `_" +msgstr "" + +msgid "`nanobind `_ (C++)" +msgstr "" + +msgid "`Numba `_" +msgstr "" + +msgid "`pybind11 `_ (C++)" +msgstr "" + +msgid "`PyO3 `_ (Rust)" +msgstr "" + +msgid "`SWIG `_" +msgstr "" + +msgid "" +"Using tools such as these can help avoid writing code that is tightly bound " +"to a particular version of CPython, avoid reference counting errors, and " +"focus more on your own code than on using the CPython API. In general, new " +"versions of Python can be supported by updating the tool, and your code will " +"often use newer and more efficient APIs automatically. Some tools also " +"support compiling for other implementations of Python from a single set of " +"sources." +msgstr "" + +msgid "" +"These projects are not supported by the same people who maintain Python, and " +"issues need to be raised with the projects directly. Remember to check that " +"the project is still maintained and supported, as the list above may become " +"outdated." +msgstr "" + +msgid "" +"`Python Packaging User Guide: Binary Extensions `_" +msgstr "" + +msgid "" +"The Python Packaging User Guide not only covers several available tools that " +"simplify the creation of binary extensions, but also discusses the various " +"reasons why creating an extension module may be desirable in the first place." +msgstr "" + +msgid "object" +msgstr "" + +msgid "type" +msgstr "Typ" + +msgid "Py_INCREF (C function)" +msgstr "" + +msgid "Py_DECREF (C function)" +msgstr "" + +msgid "PyList_SetItem (C function)" +msgstr "" + +msgid "PyTuple_SetItem (C function)" +msgstr "" + +msgid "set_all()" +msgstr "" + +msgid "PyList_GetItem (C function)" +msgstr "" + +msgid "PySequence_GetItem (C function)" +msgstr "" + +msgid "sum_list()" +msgstr "" + +msgid "sum_sequence()" +msgstr "" + +msgid "PyErr_Occurred (C function)" +msgstr "" + +msgid "PyErr_SetString (C function)" +msgstr "" + +msgid "PyErr_Clear (C function)" +msgstr "" + +msgid "exc_info (in module sys)" +msgstr "" + +msgid "incr_item()" +msgstr "" + +msgid "PyErr_ExceptionMatches (C function)" +msgstr "" + +msgid "Py_XDECREF (C function)" +msgstr "" + +msgid "Py_Initialize (C function)" +msgstr "" + +msgid "module" +msgstr "" + +msgid "builtins" +msgstr "" + +msgid "__main__" +msgstr "" + +msgid "sys" +msgstr "sys" + +msgid "search" +msgstr "" + +msgid "path" +msgstr "" + +msgid "path (in module sys)" +msgstr "" + +msgid "Py_GetPath (C function)" +msgstr "" + +msgid "Py_GetPrefix (C function)" +msgstr "" + +msgid "Py_GetExecPrefix (C function)" +msgstr "" + +msgid "Py_GetProgramFullPath (C function)" +msgstr "" + +msgid "Py_IsInitialized (C function)" +msgstr "" diff --git a/c-api/iter.po b/c-api/iter.po index 1bf80cb1..8efc7a6a 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -8,31 +8,36 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/iter.rst:6 msgid "Iterator Protocol" msgstr "" +#: ../../c-api/iter.rst:8 msgid "There are two functions specifically for working with iterators." msgstr "" +#: ../../c-api/iter.rst:12 msgid "" "Return non-zero if the object *o* can be safely passed to :c:func:" "`PyIter_NextItem` and ``0`` otherwise. This function always succeeds." msgstr "" +#: ../../c-api/iter.rst:18 msgid "" "Return non-zero if the object *o* provides the :class:`AsyncIterator` " "protocol, and ``0`` otherwise. This function always succeeds." msgstr "" +#: ../../c-api/iter.rst:25 msgid "" "Return ``1`` and set *item* to a :term:`strong reference` of the next value " "of the iterator *iter* on success. Return ``0`` and set *item* to ``NULL`` " @@ -40,11 +45,13 @@ msgid "" "set an exception on error." msgstr "" +#: ../../c-api/iter.rst:34 msgid "" "This is an older version of :c:func:`!PyIter_NextItem`, which is retained " "for backwards compatibility. Prefer :c:func:`PyIter_NextItem`." msgstr "" +#: ../../c-api/iter.rst:38 msgid "" "Return the next value from the iterator *o*. The object must be an iterator " "according to :c:func:`PyIter_Check` (it is up to the caller to check this). " @@ -53,22 +60,27 @@ msgid "" "the exception." msgstr "" +#: ../../c-api/iter.rst:46 msgid "" "The enum value used to represent different results of :c:func:`PyIter_Send`." msgstr "" +#: ../../c-api/iter.rst:53 msgid "Sends the *arg* value into the iterator *iter*. Returns:" msgstr "" +#: ../../c-api/iter.rst:55 msgid "" "``PYGEN_RETURN`` if iterator returns. Return value is returned via *presult*." msgstr "" +#: ../../c-api/iter.rst:56 msgid "" "``PYGEN_NEXT`` if iterator yields. Yielded value is returned via *presult*." msgstr "" +#: ../../c-api/iter.rst:57 msgid "" -"``PYGEN_ERROR`` if iterator has raised and exception. *presult* is set to " +"``PYGEN_ERROR`` if iterator has raised an exception. *presult* is set to " "``NULL``." msgstr "" diff --git a/c-api/iter.po~ b/c-api/iter.po~ new file mode 100644 index 00000000..1bf80cb1 --- /dev/null +++ b/c-api/iter.po~ @@ -0,0 +1,74 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Iterator Protocol" +msgstr "" + +msgid "There are two functions specifically for working with iterators." +msgstr "" + +msgid "" +"Return non-zero if the object *o* can be safely passed to :c:func:" +"`PyIter_NextItem` and ``0`` otherwise. This function always succeeds." +msgstr "" + +msgid "" +"Return non-zero if the object *o* provides the :class:`AsyncIterator` " +"protocol, and ``0`` otherwise. This function always succeeds." +msgstr "" + +msgid "" +"Return ``1`` and set *item* to a :term:`strong reference` of the next value " +"of the iterator *iter* on success. Return ``0`` and set *item* to ``NULL`` " +"if there are no remaining values. Return ``-1``, set *item* to ``NULL`` and " +"set an exception on error." +msgstr "" + +msgid "" +"This is an older version of :c:func:`!PyIter_NextItem`, which is retained " +"for backwards compatibility. Prefer :c:func:`PyIter_NextItem`." +msgstr "" + +msgid "" +"Return the next value from the iterator *o*. The object must be an iterator " +"according to :c:func:`PyIter_Check` (it is up to the caller to check this). " +"If there are no remaining values, returns ``NULL`` with no exception set. If " +"an error occurs while retrieving the item, returns ``NULL`` and passes along " +"the exception." +msgstr "" + +msgid "" +"The enum value used to represent different results of :c:func:`PyIter_Send`." +msgstr "" + +msgid "Sends the *arg* value into the iterator *iter*. Returns:" +msgstr "" + +msgid "" +"``PYGEN_RETURN`` if iterator returns. Return value is returned via *presult*." +msgstr "" + +msgid "" +"``PYGEN_NEXT`` if iterator yields. Yielded value is returned via *presult*." +msgstr "" + +msgid "" +"``PYGEN_ERROR`` if iterator has raised and exception. *presult* is set to " +"``NULL``." +msgstr "" diff --git a/c-api/iterator.po b/c-api/iterator.po index df2c1552..94db98d4 100644 --- a/c-api/iterator.po +++ b/c-api/iterator.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/iterator.rst:6 msgid "Iterator Objects" msgstr "" +#: ../../c-api/iterator.rst:8 msgid "" "Python provides two general-purpose iterator objects. The first, a sequence " "iterator, works with an arbitrary sequence supporting the :meth:`~object." @@ -28,36 +30,116 @@ msgid "" "iteration when the sentinel value is returned." msgstr "" +#: ../../c-api/iterator.rst:17 msgid "" "Type object for iterator objects returned by :c:func:`PySeqIter_New` and the " "one-argument form of the :func:`iter` built-in function for built-in " "sequence types." msgstr "" +#: ../../c-api/iterator.rst:24 msgid "" "Return true if the type of *op* is :c:data:`PySeqIter_Type`. This function " "always succeeds." msgstr "" +#: ../../c-api/iterator.rst:30 msgid "" "Return an iterator that works with a general sequence object, *seq*. The " "iteration ends when the sequence raises :exc:`IndexError` for the " "subscripting operation." msgstr "" +#: ../../c-api/iterator.rst:37 msgid "" "Type object for iterator objects returned by :c:func:`PyCallIter_New` and " "the two-argument form of the :func:`iter` built-in function." msgstr "" +#: ../../c-api/iterator.rst:43 msgid "" "Return true if the type of *op* is :c:data:`PyCallIter_Type`. This function " "always succeeds." msgstr "" +#: ../../c-api/iterator.rst:49 msgid "" "Return a new iterator. The first parameter, *callable*, can be any Python " "callable object that can be called with no parameters; each call to it " "should return the next item in the iteration. When *callable* returns a " "value equal to *sentinel*, the iteration will be terminated." msgstr "" + +#: ../../c-api/iterator.rst:56 +msgid "Range Objects" +msgstr "" + +#: ../../c-api/iterator.rst:60 +msgid "The type object for :class:`range` objects." +msgstr "" + +#: ../../c-api/iterator.rst:65 +msgid "" +"Return true if the object *o* is an instance of a :class:`range` object. " +"This function always succeeds." +msgstr "" + +#: ../../c-api/iterator.rst:70 +msgid "Builtin Iterator Types" +msgstr "" + +#: ../../c-api/iterator.rst:72 +msgid "" +"These are built-in iteration types that are included in Python's C API, but " +"provide no additional functions. They are here for completeness." +msgstr "" + +#: ../../c-api/iterator.rst:80 +msgid "C type" +msgstr "" + +#: ../../c-api/iterator.rst:81 +msgid "Python type" +msgstr "" + +#: ../../c-api/iterator.rst:83 +msgid ":py:class:`enumerate`" +msgstr "" + +#: ../../c-api/iterator.rst:85 +msgid ":py:class:`filter`" +msgstr "" + +#: ../../c-api/iterator.rst:87 +msgid ":py:class:`map`" +msgstr "" + +#: ../../c-api/iterator.rst:89 +msgid ":py:class:`reversed`" +msgstr "" + +#: ../../c-api/iterator.rst:91 +msgid ":py:class:`zip`" +msgstr "" + +#: ../../c-api/iterator.rst:95 +msgid "Other Iterator Objects" +msgstr "" + +#: ../../c-api/iterator.rst:113 +msgid "Type objects for iterators of various built-in objects." +msgstr "" + +#: ../../c-api/iterator.rst:115 +msgid "" +"Do not create instances of these directly; prefer calling :c:func:" +"`PyObject_GetIter` instead." +msgstr "" + +#: ../../c-api/iterator.rst:118 +msgid "" +"Note that there is no guarantee that a given built-in type uses a given " +"iterator type. For example, iterating over :class:`range` will use one of " +"two iterator types depending on the size of the range. Other types may start " +"using a similar scheme in the future, without warning." +msgstr "" diff --git a/c-api/iterator.po~ b/c-api/iterator.po~ new file mode 100644 index 00000000..df2c1552 --- /dev/null +++ b/c-api/iterator.po~ @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Iterator Objects" +msgstr "" + +msgid "" +"Python provides two general-purpose iterator objects. The first, a sequence " +"iterator, works with an arbitrary sequence supporting the :meth:`~object." +"__getitem__` method. The second works with a callable object and a sentinel " +"value, calling the callable for each item in the sequence, and ending the " +"iteration when the sentinel value is returned." +msgstr "" + +msgid "" +"Type object for iterator objects returned by :c:func:`PySeqIter_New` and the " +"one-argument form of the :func:`iter` built-in function for built-in " +"sequence types." +msgstr "" + +msgid "" +"Return true if the type of *op* is :c:data:`PySeqIter_Type`. This function " +"always succeeds." +msgstr "" + +msgid "" +"Return an iterator that works with a general sequence object, *seq*. The " +"iteration ends when the sequence raises :exc:`IndexError` for the " +"subscripting operation." +msgstr "" + +msgid "" +"Type object for iterator objects returned by :c:func:`PyCallIter_New` and " +"the two-argument form of the :func:`iter` built-in function." +msgstr "" + +msgid "" +"Return true if the type of *op* is :c:data:`PyCallIter_Type`. This function " +"always succeeds." +msgstr "" + +msgid "" +"Return a new iterator. The first parameter, *callable*, can be any Python " +"callable object that can be called with no parameters; each call to it " +"should return the next item in the iteration. When *callable* returns a " +"value equal to *sentinel*, the iteration will be terminated." +msgstr "" diff --git a/c-api/lifecycle.po b/c-api/lifecycle.po index 6e5526be..a0a4ef32 100644 --- a/c-api/lifecycle.po +++ b/c-api/lifecycle.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/lifecycle.rst:6 msgid "Object Life Cycle" msgstr "" +#: ../../c-api/lifecycle.rst:8 msgid "" "This section explains how a type's slots relate to each other throughout the " "life of an object. It is not intended to be a complete canonical reference " @@ -27,9 +29,11 @@ msgid "" "`type-structs` for details about a particular slot." msgstr "" +#: ../../c-api/lifecycle.rst:15 msgid "Life Events" msgstr "" +#: ../../c-api/lifecycle.rst:17 msgid "" "The figure below illustrates the order of events that can occur throughout " "an object's life. An arrow from *A* to *B* indicates that event *B* can " @@ -37,23 +41,29 @@ msgid "" "condition that must be true for *B* to occur after *A*." msgstr "" +#: ../../c-api/lifecycle.rst:55 msgid "Diagram showing events in an object's life. Explained in detail below." msgstr "" +#: ../../c-api/lifecycle.rst:63 msgid "Explanation:" msgstr "" +#: ../../c-api/lifecycle.rst:65 msgid "When a new object is constructed by calling its type:" msgstr "" +#: ../../c-api/lifecycle.rst:67 msgid ":c:member:`~PyTypeObject.tp_new` is called to create a new object." msgstr "" +#: ../../c-api/lifecycle.rst:68 msgid "" ":c:member:`~PyTypeObject.tp_alloc` is directly called by :c:member:" "`~PyTypeObject.tp_new` to allocate the memory for the new object." msgstr "" +#: ../../c-api/lifecycle.rst:71 msgid "" ":c:member:`~PyTypeObject.tp_init` initializes the newly created object. :c:" "member:`!tp_init` can be called again to re-initialize an object, if " @@ -61,12 +71,15 @@ msgid "" "example by Python code calling :py:meth:`~object.__new__`." msgstr "" +#: ../../c-api/lifecycle.rst:76 msgid "After :c:member:`!tp_init` completes, the object is ready to use." msgstr "" +#: ../../c-api/lifecycle.rst:77 msgid "Some time after the last reference to an object is removed:" msgstr "" +#: ../../c-api/lifecycle.rst:79 msgid "" "If an object is not marked as *finalized*, it might be finalized by marking " "it as *finalized* and calling its :c:member:`~PyTypeObject.tp_finalize` " @@ -75,18 +88,21 @@ msgid "" "that :c:member:`~PyTypeObject.tp_finalize` is always called." msgstr "" +#: ../../c-api/lifecycle.rst:85 msgid "" "If the object is marked as finalized, :c:member:`~PyTypeObject.tp_clear` " "might be called by the garbage collector to clear references held by the " "object. It is *not* called when the object's reference count reaches zero." msgstr "" +#: ../../c-api/lifecycle.rst:89 msgid "" ":c:member:`~PyTypeObject.tp_dealloc` is called to destroy the object. To " "avoid code duplication, :c:member:`~PyTypeObject.tp_dealloc` typically calls " "into :c:member:`~PyTypeObject.tp_clear` to free up the object's references." msgstr "" +#: ../../c-api/lifecycle.rst:93 msgid "" "When :c:member:`~PyTypeObject.tp_dealloc` finishes object destruction, it " "directly calls :c:member:`~PyTypeObject.tp_free` (usually set to :c:func:" @@ -94,6 +110,7 @@ msgid "" "for the type) to deallocate the memory." msgstr "" +#: ../../c-api/lifecycle.rst:98 msgid "" "The :c:member:`~PyTypeObject.tp_finalize` function is permitted to add a " "reference to the object if desired. If it does, the object is " @@ -108,6 +125,7 @@ msgid "" "both of these behaviors may change in the future." msgstr "" +#: ../../c-api/lifecycle.rst:111 msgid "" ":c:member:`~PyTypeObject.tp_dealloc` can optionally call :c:member:" "`~PyTypeObject.tp_finalize` via :c:func:`PyObject_CallFinalizerFromDealloc` " @@ -117,6 +135,7 @@ msgid "" "documentation for example code." msgstr "" +#: ../../c-api/lifecycle.rst:118 msgid "" "If the object is a member of a :term:`cyclic isolate` and either :c:member:" "`~PyTypeObject.tp_clear` fails to break the reference cycle or the cyclic " @@ -126,17 +145,20 @@ msgid "" "\"leak\"). See :data:`gc.garbage`." msgstr "" +#: ../../c-api/lifecycle.rst:125 msgid "" "If the object is marked as supporting garbage collection (the :c:macro:" "`Py_TPFLAGS_HAVE_GC` flag is set in :c:member:`~PyTypeObject.tp_flags`), the " "following events are also possible:" msgstr "" +#: ../../c-api/lifecycle.rst:129 msgid "" "The garbage collector occasionally calls :c:member:`~PyTypeObject." "tp_traverse` to identify :term:`cyclic isolates `." msgstr "" +#: ../../c-api/lifecycle.rst:132 msgid "" "When the garbage collector discovers a :term:`cyclic isolate`, it finalizes " "one of the objects in the group by marking it as *finalized* and calling " @@ -145,6 +167,7 @@ msgid "" "been finalized." msgstr "" +#: ../../c-api/lifecycle.rst:137 msgid "" ":c:member:`~PyTypeObject.tp_finalize` is permitted to resurrect the object " "by adding a reference from outside the :term:`cyclic isolate`. The new " @@ -153,6 +176,7 @@ msgid "" "longer isolated)." msgstr "" +#: ../../c-api/lifecycle.rst:142 msgid "" "When the garbage collector discovers a :term:`cyclic isolate` and all of the " "objects in the group have already been marked as *finalized*, the garbage " @@ -162,9 +186,11 @@ msgid "" "all of the objects have been cleared." msgstr "" +#: ../../c-api/lifecycle.rst:151 msgid "Cyclic Isolate Destruction" msgstr "" +#: ../../c-api/lifecycle.rst:153 msgid "" "Listed below are the stages of life of a hypothetical :term:`cyclic isolate` " "that continues to exist after each member object is finalized or cleared. " @@ -175,12 +201,14 @@ msgid "" "(see :c:member:`~PyTypeObject.tp_finalize`)." msgstr "" +#: ../../c-api/lifecycle.rst:161 msgid "" "**Reachable** (not yet a cyclic isolate): All objects are in their normal, " "reachable state. A reference cycle could exist, but an external reference " "means the objects are not yet isolated." msgstr "" +#: ../../c-api/lifecycle.rst:164 msgid "" "**Unreachable but consistent:** The final reference from outside the cyclic " "group of objects has been removed, causing the objects to become isolated " @@ -190,6 +218,7 @@ msgid "" "because the next run might not scan every object)." msgstr "" +#: ../../c-api/lifecycle.rst:170 msgid "" "**Mix of finalized and not finalized:** Objects in a cyclic isolate are " "finalized one at a time, which means that there is a period of time when the " @@ -200,11 +229,13 @@ msgid "" "an arbitrary subset of its referents." msgstr "" +#: ../../c-api/lifecycle.rst:177 msgid "" "**All finalized:** All objects in a cyclic isolate are finalized before any " "of them are cleared." msgstr "" +#: ../../c-api/lifecycle.rst:179 msgid "" "**Mix of finalized and cleared:** The objects can be cleared serially or " "concurrently (but with the :term:`GIL` held); either way, some will finish " @@ -212,6 +243,7 @@ msgid "" "a subset of its referents. :pep:`442` calls this stage \"cyclic trash\"." msgstr "" +#: ../../c-api/lifecycle.rst:183 msgid "" "**Leaked:** If a cyclic isolate still exists after all objects in the group " "have been finalized and cleared, then the objects remain indefinitely " @@ -221,6 +253,7 @@ msgid "" "required." msgstr "" +#: ../../c-api/lifecycle.rst:190 msgid "" "If :c:member:`~PyTypeObject.tp_clear` did not exist, then Python would have " "no way to safely break a reference cycle. Simply destroying an object in a " @@ -232,6 +265,7 @@ msgid "" "`~PyTypeObject.tp_dealloc` is called to complete the destruction." msgstr "" +#: ../../c-api/lifecycle.rst:199 msgid "" "Unlike clearing, finalization is not a phase of destruction. A finalized " "object must still behave properly by continuing to fulfill its design " @@ -243,6 +277,7 @@ msgid "" "`~PyTypeObject.tp_dealloc`." msgstr "" +#: ../../c-api/lifecycle.rst:207 msgid "" "The finalization step is not necessary to safely reclaim the objects in a " "cyclic isolate, but its existence makes it easier to design types that " @@ -254,24 +289,29 @@ msgid "" "only non-cleared (but potentially finalized) objects." msgstr "" +#: ../../c-api/lifecycle.rst:216 msgid "To summarize the possible interactions:" msgstr "" +#: ../../c-api/lifecycle.rst:218 msgid "" "A non-finalized object might have references to or from non-finalized and " "finalized objects, but not to or from cleared objects." msgstr "" +#: ../../c-api/lifecycle.rst:220 msgid "" "A finalized object might have references to or from non-finalized, " "finalized, and cleared objects." msgstr "" +#: ../../c-api/lifecycle.rst:222 msgid "" "A cleared object might have references to or from finalized and cleared " "objects, but not to or from non-finalized objects." msgstr "" +#: ../../c-api/lifecycle.rst:225 msgid "" "Without any reference cycles, an object can be simply destroyed once its " "last reference is deleted; the finalization and clearing steps are not " @@ -285,12 +325,15 @@ msgid "" "change in a future version." msgstr "" +#: ../../c-api/lifecycle.rst:237 msgid "Functions" msgstr "" +#: ../../c-api/lifecycle.rst:239 msgid "To allocate and free memory, see :ref:`allocating-objects`." msgstr "" +#: ../../c-api/lifecycle.rst:244 msgid "" "Finalizes the object as described in :c:member:`~PyTypeObject.tp_finalize`. " "Call this function (or :c:func:`PyObject_CallFinalizerFromDealloc`) instead " @@ -301,6 +344,7 @@ msgid "" "change in the future." msgstr "" +#: ../../c-api/lifecycle.rst:257 msgid "" "Same as :c:func:`PyObject_CallFinalizer` but meant to be called at the " "beginning of the object's destructor (:c:member:`~PyTypeObject.tp_dealloc`). " @@ -310,5 +354,6 @@ msgid "" "continue normally." msgstr "" +#: ../../c-api/lifecycle.rst:268 msgid ":c:member:`~PyTypeObject.tp_dealloc` for example code." msgstr "" diff --git a/c-api/lifecycle.po~ b/c-api/lifecycle.po~ new file mode 100644 index 00000000..6e5526be --- /dev/null +++ b/c-api/lifecycle.po~ @@ -0,0 +1,314 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Object Life Cycle" +msgstr "" + +msgid "" +"This section explains how a type's slots relate to each other throughout the " +"life of an object. It is not intended to be a complete canonical reference " +"for the slots; instead, refer to the slot-specific documentation in :ref:" +"`type-structs` for details about a particular slot." +msgstr "" + +msgid "Life Events" +msgstr "" + +msgid "" +"The figure below illustrates the order of events that can occur throughout " +"an object's life. An arrow from *A* to *B* indicates that event *B* can " +"occur after event *A* has occurred, with the arrow's label indicating the " +"condition that must be true for *B* to occur after *A*." +msgstr "" + +msgid "Diagram showing events in an object's life. Explained in detail below." +msgstr "" + +msgid "Explanation:" +msgstr "" + +msgid "When a new object is constructed by calling its type:" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_new` is called to create a new object." +msgstr "" + +msgid "" +":c:member:`~PyTypeObject.tp_alloc` is directly called by :c:member:" +"`~PyTypeObject.tp_new` to allocate the memory for the new object." +msgstr "" + +msgid "" +":c:member:`~PyTypeObject.tp_init` initializes the newly created object. :c:" +"member:`!tp_init` can be called again to re-initialize an object, if " +"desired. The :c:member:`!tp_init` call can also be skipped entirely, for " +"example by Python code calling :py:meth:`~object.__new__`." +msgstr "" + +msgid "After :c:member:`!tp_init` completes, the object is ready to use." +msgstr "" + +msgid "Some time after the last reference to an object is removed:" +msgstr "" + +msgid "" +"If an object is not marked as *finalized*, it might be finalized by marking " +"it as *finalized* and calling its :c:member:`~PyTypeObject.tp_finalize` " +"function. Python does *not* finalize an object when the last reference to " +"it is deleted; use :c:func:`PyObject_CallFinalizerFromDealloc` to ensure " +"that :c:member:`~PyTypeObject.tp_finalize` is always called." +msgstr "" + +msgid "" +"If the object is marked as finalized, :c:member:`~PyTypeObject.tp_clear` " +"might be called by the garbage collector to clear references held by the " +"object. It is *not* called when the object's reference count reaches zero." +msgstr "" + +msgid "" +":c:member:`~PyTypeObject.tp_dealloc` is called to destroy the object. To " +"avoid code duplication, :c:member:`~PyTypeObject.tp_dealloc` typically calls " +"into :c:member:`~PyTypeObject.tp_clear` to free up the object's references." +msgstr "" + +msgid "" +"When :c:member:`~PyTypeObject.tp_dealloc` finishes object destruction, it " +"directly calls :c:member:`~PyTypeObject.tp_free` (usually set to :c:func:" +"`PyObject_Free` or :c:func:`PyObject_GC_Del` automatically as appropriate " +"for the type) to deallocate the memory." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_finalize` function is permitted to add a " +"reference to the object if desired. If it does, the object is " +"*resurrected*, preventing its pending destruction. (Only :c:member:`!" +"tp_finalize` is allowed to resurrect an object; :c:member:`~PyTypeObject." +"tp_clear` and :c:member:`~PyTypeObject.tp_dealloc` cannot without calling " +"into :c:member:`!tp_finalize`.) Resurrecting an object may or may not cause " +"the object's *finalized* mark to be removed. Currently, Python does not " +"remove the *finalized* mark from a resurrected object if it supports garbage " +"collection (i.e., the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set) but does " +"remove the mark if the object does not support garbage collection; either or " +"both of these behaviors may change in the future." +msgstr "" + +msgid "" +":c:member:`~PyTypeObject.tp_dealloc` can optionally call :c:member:" +"`~PyTypeObject.tp_finalize` via :c:func:`PyObject_CallFinalizerFromDealloc` " +"if it wishes to reuse that code to help with object destruction. This is " +"recommended because it guarantees that :c:member:`!tp_finalize` is always " +"called before destruction. See the :c:member:`~PyTypeObject.tp_dealloc` " +"documentation for example code." +msgstr "" + +msgid "" +"If the object is a member of a :term:`cyclic isolate` and either :c:member:" +"`~PyTypeObject.tp_clear` fails to break the reference cycle or the cyclic " +"isolate is not detected (perhaps :func:`gc.disable` was called, or the :c:" +"macro:`Py_TPFLAGS_HAVE_GC` flag was erroneously omitted in one of the " +"involved types), the objects remain indefinitely uncollectable (they " +"\"leak\"). See :data:`gc.garbage`." +msgstr "" + +msgid "" +"If the object is marked as supporting garbage collection (the :c:macro:" +"`Py_TPFLAGS_HAVE_GC` flag is set in :c:member:`~PyTypeObject.tp_flags`), the " +"following events are also possible:" +msgstr "" + +msgid "" +"The garbage collector occasionally calls :c:member:`~PyTypeObject." +"tp_traverse` to identify :term:`cyclic isolates `." +msgstr "" + +msgid "" +"When the garbage collector discovers a :term:`cyclic isolate`, it finalizes " +"one of the objects in the group by marking it as *finalized* and calling " +"its :c:member:`~PyTypeObject.tp_finalize` function, if it has one. This " +"repeats until the cyclic isolate doesn't exist or all of the objects have " +"been finalized." +msgstr "" + +msgid "" +":c:member:`~PyTypeObject.tp_finalize` is permitted to resurrect the object " +"by adding a reference from outside the :term:`cyclic isolate`. The new " +"reference causes the group of objects to no longer form a cyclic isolate " +"(the reference cycle may still exist, but if it does the objects are no " +"longer isolated)." +msgstr "" + +msgid "" +"When the garbage collector discovers a :term:`cyclic isolate` and all of the " +"objects in the group have already been marked as *finalized*, the garbage " +"collector clears one or more of the uncleared objects in the group (possibly " +"concurrently) by calling each's :c:member:`~PyTypeObject.tp_clear` " +"function. This repeats as long as the cyclic isolate still exists and not " +"all of the objects have been cleared." +msgstr "" + +msgid "Cyclic Isolate Destruction" +msgstr "" + +msgid "" +"Listed below are the stages of life of a hypothetical :term:`cyclic isolate` " +"that continues to exist after each member object is finalized or cleared. " +"It is a memory leak if a cyclic isolate progresses through all of these " +"stages; it should vanish once all objects are cleared, if not sooner. A " +"cyclic isolate can vanish either because the reference cycle is broken or " +"because the objects are no longer isolated due to finalizer resurrection " +"(see :c:member:`~PyTypeObject.tp_finalize`)." +msgstr "" + +msgid "" +"**Reachable** (not yet a cyclic isolate): All objects are in their normal, " +"reachable state. A reference cycle could exist, but an external reference " +"means the objects are not yet isolated." +msgstr "" + +msgid "" +"**Unreachable but consistent:** The final reference from outside the cyclic " +"group of objects has been removed, causing the objects to become isolated " +"(thus a cyclic isolate is born). None of the group's objects have been " +"finalized or cleared yet. The cyclic isolate remains at this stage until " +"some future run of the garbage collector (not necessarily the next run " +"because the next run might not scan every object)." +msgstr "" + +msgid "" +"**Mix of finalized and not finalized:** Objects in a cyclic isolate are " +"finalized one at a time, which means that there is a period of time when the " +"cyclic isolate is composed of a mix of finalized and non-finalized objects. " +"Finalization order is unspecified, so it can appear random. A finalized " +"object must behave in a sane manner when non-finalized objects interact with " +"it, and a non-finalized object must be able to tolerate the finalization of " +"an arbitrary subset of its referents." +msgstr "" + +msgid "" +"**All finalized:** All objects in a cyclic isolate are finalized before any " +"of them are cleared." +msgstr "" + +msgid "" +"**Mix of finalized and cleared:** The objects can be cleared serially or " +"concurrently (but with the :term:`GIL` held); either way, some will finish " +"before others. A finalized object must be able to tolerate the clearing of " +"a subset of its referents. :pep:`442` calls this stage \"cyclic trash\"." +msgstr "" + +msgid "" +"**Leaked:** If a cyclic isolate still exists after all objects in the group " +"have been finalized and cleared, then the objects remain indefinitely " +"uncollectable (see :data:`gc.garbage`). It is a bug if a cyclic isolate " +"reaches this stage---it means the :c:member:`~PyTypeObject.tp_clear` methods " +"of the participating objects have failed to break the reference cycle as " +"required." +msgstr "" + +msgid "" +"If :c:member:`~PyTypeObject.tp_clear` did not exist, then Python would have " +"no way to safely break a reference cycle. Simply destroying an object in a " +"cyclic isolate would result in a dangling pointer, triggering undefined " +"behavior when an object referencing the destroyed object is itself " +"destroyed. The clearing step makes object destruction a two-phase process: " +"first :c:member:`~PyTypeObject.tp_clear` is called to partially destroy the " +"objects enough to detangle them from each other, then :c:member:" +"`~PyTypeObject.tp_dealloc` is called to complete the destruction." +msgstr "" + +msgid "" +"Unlike clearing, finalization is not a phase of destruction. A finalized " +"object must still behave properly by continuing to fulfill its design " +"contracts. An object's finalizer is allowed to execute arbitrary Python " +"code, and is even allowed to prevent the impending destruction by adding a " +"reference. The finalizer is only related to destruction by call order---if " +"it runs, it runs before destruction, which starts with :c:member:" +"`~PyTypeObject.tp_clear` (if called) and concludes with :c:member:" +"`~PyTypeObject.tp_dealloc`." +msgstr "" + +msgid "" +"The finalization step is not necessary to safely reclaim the objects in a " +"cyclic isolate, but its existence makes it easier to design types that " +"behave in a sane manner when objects are cleared. Clearing an object might " +"necessarily leave it in a broken, partially destroyed state---it might be " +"unsafe to call any of the cleared object's methods or access any of its " +"attributes. With finalization, only finalized objects can possibly interact " +"with cleared objects; non-finalized objects are guaranteed to interact with " +"only non-cleared (but potentially finalized) objects." +msgstr "" + +msgid "To summarize the possible interactions:" +msgstr "" + +msgid "" +"A non-finalized object might have references to or from non-finalized and " +"finalized objects, but not to or from cleared objects." +msgstr "" + +msgid "" +"A finalized object might have references to or from non-finalized, " +"finalized, and cleared objects." +msgstr "" + +msgid "" +"A cleared object might have references to or from finalized and cleared " +"objects, but not to or from non-finalized objects." +msgstr "" + +msgid "" +"Without any reference cycles, an object can be simply destroyed once its " +"last reference is deleted; the finalization and clearing steps are not " +"necessary to safely reclaim unused objects. However, it can be useful to " +"automatically call :c:member:`~PyTypeObject.tp_finalize` and :c:member:" +"`~PyTypeObject.tp_clear` before destruction anyway because type design is " +"simplified when all objects always experience the same series of events " +"regardless of whether they participated in a cyclic isolate. Python " +"currently only calls :c:member:`~PyTypeObject.tp_finalize` and :c:member:" +"`~PyTypeObject.tp_clear` as needed to destroy a cyclic isolate; this may " +"change in a future version." +msgstr "" + +msgid "Functions" +msgstr "" + +msgid "To allocate and free memory, see :ref:`allocating-objects`." +msgstr "" + +msgid "" +"Finalizes the object as described in :c:member:`~PyTypeObject.tp_finalize`. " +"Call this function (or :c:func:`PyObject_CallFinalizerFromDealloc`) instead " +"of calling :c:member:`~PyTypeObject.tp_finalize` directly because this " +"function may deduplicate multiple calls to :c:member:`!tp_finalize`. " +"Currently, calls are only deduplicated if the type supports garbage " +"collection (i.e., the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set); this may " +"change in the future." +msgstr "" + +msgid "" +"Same as :c:func:`PyObject_CallFinalizer` but meant to be called at the " +"beginning of the object's destructor (:c:member:`~PyTypeObject.tp_dealloc`). " +"There must not be any references to the object. If the object's finalizer " +"resurrects the object, this function returns -1; no further destruction " +"should happen. Otherwise, this function returns 0 and destruction can " +"continue normally." +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_dealloc` for example code." +msgstr "" diff --git a/c-api/list.po b/c-api/list.po index ff92ad92..9a24ea3a 100644 --- a/c-api/list.po +++ b/c-api/list.po @@ -8,39 +8,46 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/list.rst:6 msgid "List Objects" msgstr "" +#: ../../c-api/list.rst:13 msgid "This subtype of :c:type:`PyObject` represents a Python list object." msgstr "" +#: ../../c-api/list.rst:18 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python list type. " "This is the same object as :class:`list` in the Python layer." msgstr "" +#: ../../c-api/list.rst:24 msgid "" "Return true if *p* is a list object or an instance of a subtype of the list " "type. This function always succeeds." msgstr "" +#: ../../c-api/list.rst:30 msgid "" "Return true if *p* is a list object, but not an instance of a subtype of the " "list type. This function always succeeds." msgstr "" +#: ../../c-api/list.rst:36 msgid "Return a new list of length *len* on success, or ``NULL`` on failure." msgstr "" +#: ../../c-api/list.rst:40 msgid "" "If *len* is greater than zero, the returned list object's items are set to " "``NULL``. Thus you cannot use abstract API functions such as :c:func:" @@ -51,14 +58,17 @@ msgid "" "`PyList_SET_ITEM()`." msgstr "" +#: ../../c-api/list.rst:53 msgid "" "Return the length of the list object in *list*; this is equivalent to " "``len(list)`` on a list object." msgstr "" +#: ../../c-api/list.rst:59 msgid "Similar to :c:func:`PyList_Size`, but without error checking." msgstr "" +#: ../../c-api/list.rst:64 msgid "" "Return the object at position *index* in the list pointed to by *list*. The " "position must be non-negative; indexing from the end of the list is not " @@ -66,53 +76,79 @@ msgid "" "``NULL`` and set an :exc:`IndexError` exception." msgstr "" +#: ../../c-api/list.rst:74 msgid "" "Like :c:func:`PyList_GetItemRef`, but returns a :term:`borrowed reference` " "instead of a :term:`strong reference`." msgstr "" +#: ../../c-api/list.rst:79 ../../c-api/list.rst:91 +msgid "" +"In the :term:`free-threaded build`, the returned :term:`borrowed reference` " +"may become invalid if another thread modifies the list concurrently. Prefer :" +"c:func:`PyList_GetItemRef`, which returns a :term:`strong reference`." +msgstr "" + +#: ../../c-api/list.rst:87 msgid "Similar to :c:func:`PyList_GetItem`, but without error checking." msgstr "" +#: ../../c-api/list.rst:99 msgid "" "Set the item at index *index* in list to *item*. Return ``0`` on success. " "If *index* is out of bounds, return ``-1`` and set an :exc:`IndexError` " "exception." msgstr "" +#: ../../c-api/list.rst:105 msgid "" -"This function \"steals\" a reference to *item* and discards a reference to " -"an item already in the list at the affected position." +"This function \":term:`steals `\" a reference to *item*, even on " +"error. On success, it discards a reference to an item already in the list at " +"the affected position (unless it was ``NULL``)." msgstr "" +#: ../../c-api/list.rst:113 msgid "" "Macro form of :c:func:`PyList_SetItem` without error checking. This is " "normally only used to fill in new lists where there is no previous content." msgstr "" +#: ../../c-api/list.rst:116 msgid "" "Bounds checking is performed as an assertion if Python is built in :ref:" "`debug mode ` or :option:`with assertions <--with-assertions>`." msgstr "" +#: ../../c-api/list.rst:122 msgid "" -"This macro \"steals\" a reference to *item*, and, unlike :c:func:" -"`PyList_SetItem`, does *not* discard a reference to any item that is being " -"replaced; any reference in *list* at position *i* will be leaked." +"This macro \":term:`steals `\" a reference to *item*, and, unlike :c:" +"func:`PyList_SetItem`, does *not* discard a reference to any item that is " +"being replaced; any reference in *list* at position *i* will be leaked." msgstr "" +#: ../../c-api/list.rst:129 +msgid "" +"In the :term:`free-threaded build`, this macro has no internal " +"synchronization. It is normally only used to fill in new lists where no " +"other thread has a reference to the list. If the list may be shared, use :c:" +"func:`PyList_SetItem` instead, which uses a :term:`per-object lock`." +msgstr "" + +#: ../../c-api/list.rst:138 msgid "" "Insert the item *item* into list *list* in front of index *index*. Return " "``0`` if successful; return ``-1`` and set an exception if unsuccessful. " "Analogous to ``list.insert(index, item)``." msgstr "" +#: ../../c-api/list.rst:145 msgid "" "Append the object *item* at the end of list *list*. Return ``0`` if " "successful; return ``-1`` and set an exception if unsuccessful. Analogous " "to ``list.append(item)``." msgstr "" +#: ../../c-api/list.rst:152 msgid "" "Return a list of the objects in *list* containing the objects *between* " "*low* and *high*. Return ``NULL`` and set an exception if unsuccessful. " @@ -120,6 +156,7 @@ msgid "" "supported." msgstr "" +#: ../../c-api/list.rst:159 msgid "" "Set the slice of *list* between *low* and *high* to the contents of " "*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may " @@ -128,54 +165,90 @@ msgid "" "list is not supported." msgstr "" +#: ../../c-api/list.rst:167 +msgid "" +"In the :term:`free-threaded build`, when *itemlist* is a :class:`list`, both " +"*list* and *itemlist* are locked for the duration of the operation. For " +"other iterables (or ``NULL``), only *list* is locked." +msgstr "" + +#: ../../c-api/list.rst:174 msgid "" "Extend *list* with the contents of *iterable*. This is the same as " "``PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable)`` and " "analogous to ``list.extend(iterable)`` or ``list += iterable``." msgstr "" +#: ../../c-api/list.rst:178 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" +#: ../../c-api/list.rst:185 +msgid "" +"In the :term:`free-threaded build`, when *iterable* is a :class:`list`, :" +"class:`set`, :class:`dict`, or dict view, both *list* and *iterable* (or its " +"underlying dict) are locked for the duration of the operation. For other " +"iterables, only *list* is locked; *iterable* may be concurrently modified by " +"another thread." +msgstr "" + +#: ../../c-api/list.rst:194 msgid "" "Remove all items from *list*. This is the same as ``PyList_SetSlice(list, " "0, PY_SSIZE_T_MAX, NULL)`` and analogous to ``list.clear()`` or ``del " "list[:]``." msgstr "" +#: ../../c-api/list.rst:198 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" +#: ../../c-api/list.rst:206 msgid "" "Sort the items of *list* in place. Return ``0`` on success, ``-1`` on " "failure. This is equivalent to ``list.sort()``." msgstr "" +#: ../../c-api/list.rst:211 +msgid "" +"In the :term:`free-threaded build`, element comparison via :meth:`~object." +"__lt__` can execute arbitrary Python code, during which the :term:`per-" +"object lock` may be temporarily released. For built-in types (:class:`str`, :" +"class:`int`, :class:`float`), the lock is not released during comparison." +msgstr "" + +#: ../../c-api/list.rst:220 msgid "" "Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on " "failure. This is the equivalent of ``list.reverse()``." msgstr "" +#: ../../c-api/list.rst:228 msgid "" "Return a new tuple object containing the contents of *list*; equivalent to " "``tuple(list)``." msgstr "" +#: ../../c-api/list.rst:8 msgid "object" msgstr "" +#: ../../c-api/list.rst:8 msgid "list" msgstr "" +#: ../../c-api/list.rst:51 ../../c-api/list.rst:226 msgid "built-in function" msgstr "" +#: ../../c-api/list.rst:51 msgid "len" msgstr "" +#: ../../c-api/list.rst:226 msgid "tuple" msgstr "" diff --git a/c-api/list.po~ b/c-api/list.po~ new file mode 100644 index 00000000..ff92ad92 --- /dev/null +++ b/c-api/list.po~ @@ -0,0 +1,181 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "List Objects" +msgstr "" + +msgid "This subtype of :c:type:`PyObject` represents a Python list object." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python list type. " +"This is the same object as :class:`list` in the Python layer." +msgstr "" + +msgid "" +"Return true if *p* is a list object or an instance of a subtype of the list " +"type. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a list object, but not an instance of a subtype of the " +"list type. This function always succeeds." +msgstr "" + +msgid "Return a new list of length *len* on success, or ``NULL`` on failure." +msgstr "" + +msgid "" +"If *len* is greater than zero, the returned list object's items are set to " +"``NULL``. Thus you cannot use abstract API functions such as :c:func:" +"`PySequence_SetItem` or expose the object to Python code before setting all " +"items to a real object with :c:func:`PyList_SetItem` or :c:func:" +"`PyList_SET_ITEM()`. The following APIs are safe APIs before the list is " +"fully initialized: :c:func:`PyList_SetItem()` and :c:func:" +"`PyList_SET_ITEM()`." +msgstr "" + +msgid "" +"Return the length of the list object in *list*; this is equivalent to " +"``len(list)`` on a list object." +msgstr "" + +msgid "Similar to :c:func:`PyList_Size`, but without error checking." +msgstr "" + +msgid "" +"Return the object at position *index* in the list pointed to by *list*. The " +"position must be non-negative; indexing from the end of the list is not " +"supported. If *index* is out of bounds (:code:`<0 or >=len(list)`), return " +"``NULL`` and set an :exc:`IndexError` exception." +msgstr "" + +msgid "" +"Like :c:func:`PyList_GetItemRef`, but returns a :term:`borrowed reference` " +"instead of a :term:`strong reference`." +msgstr "" + +msgid "Similar to :c:func:`PyList_GetItem`, but without error checking." +msgstr "" + +msgid "" +"Set the item at index *index* in list to *item*. Return ``0`` on success. " +"If *index* is out of bounds, return ``-1`` and set an :exc:`IndexError` " +"exception." +msgstr "" + +msgid "" +"This function \"steals\" a reference to *item* and discards a reference to " +"an item already in the list at the affected position." +msgstr "" + +msgid "" +"Macro form of :c:func:`PyList_SetItem` without error checking. This is " +"normally only used to fill in new lists where there is no previous content." +msgstr "" + +msgid "" +"Bounds checking is performed as an assertion if Python is built in :ref:" +"`debug mode ` or :option:`with assertions <--with-assertions>`." +msgstr "" + +msgid "" +"This macro \"steals\" a reference to *item*, and, unlike :c:func:" +"`PyList_SetItem`, does *not* discard a reference to any item that is being " +"replaced; any reference in *list* at position *i* will be leaked." +msgstr "" + +msgid "" +"Insert the item *item* into list *list* in front of index *index*. Return " +"``0`` if successful; return ``-1`` and set an exception if unsuccessful. " +"Analogous to ``list.insert(index, item)``." +msgstr "" + +msgid "" +"Append the object *item* at the end of list *list*. Return ``0`` if " +"successful; return ``-1`` and set an exception if unsuccessful. Analogous " +"to ``list.append(item)``." +msgstr "" + +msgid "" +"Return a list of the objects in *list* containing the objects *between* " +"*low* and *high*. Return ``NULL`` and set an exception if unsuccessful. " +"Analogous to ``list[low:high]``. Indexing from the end of the list is not " +"supported." +msgstr "" + +msgid "" +"Set the slice of *list* between *low* and *high* to the contents of " +"*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may " +"be ``NULL``, indicating the assignment of an empty list (slice deletion). " +"Return ``0`` on success, ``-1`` on failure. Indexing from the end of the " +"list is not supported." +msgstr "" + +msgid "" +"Extend *list* with the contents of *iterable*. This is the same as " +"``PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable)`` and " +"analogous to ``list.extend(iterable)`` or ``list += iterable``." +msgstr "" + +msgid "" +"Raise an exception and return ``-1`` if *list* is not a :class:`list` " +"object. Return 0 on success." +msgstr "" + +msgid "" +"Remove all items from *list*. This is the same as ``PyList_SetSlice(list, " +"0, PY_SSIZE_T_MAX, NULL)`` and analogous to ``list.clear()`` or ``del " +"list[:]``." +msgstr "" + +msgid "" +"Raise an exception and return ``-1`` if *list* is not a :class:`list` " +"object. Return 0 on success." +msgstr "" + +msgid "" +"Sort the items of *list* in place. Return ``0`` on success, ``-1`` on " +"failure. This is equivalent to ``list.sort()``." +msgstr "" + +msgid "" +"Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on " +"failure. This is the equivalent of ``list.reverse()``." +msgstr "" + +msgid "" +"Return a new tuple object containing the contents of *list*; equivalent to " +"``tuple(list)``." +msgstr "" + +msgid "object" +msgstr "" + +msgid "list" +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "len" +msgstr "" + +msgid "tuple" +msgstr "" diff --git a/c-api/long.po b/c-api/long.po index d5d1e6d5..bc54608c 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -8,97 +8,115 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/long.rst:6 msgid "Integer Objects" msgstr "" +#: ../../c-api/long.rst:11 msgid "" "All integers are implemented as \"long\" integer objects of arbitrary size." msgstr "" +#: ../../c-api/long.rst:13 msgid "" "On error, most ``PyLong_As*`` APIs return ``(return type)-1`` which cannot " "be distinguished from a number. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" +#: ../../c-api/long.rst:18 msgid "This subtype of :c:type:`PyObject` represents a Python integer object." msgstr "" +#: ../../c-api/long.rst:23 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python integer type. " "This is the same object as :class:`int` in the Python layer." msgstr "" +#: ../../c-api/long.rst:29 msgid "" "Return true if its argument is a :c:type:`PyLongObject` or a subtype of :c:" "type:`PyLongObject`. This function always succeeds." msgstr "" +#: ../../c-api/long.rst:35 msgid "" "Return true if its argument is a :c:type:`PyLongObject`, but not a subtype " "of :c:type:`PyLongObject`. This function always succeeds." msgstr "" +#: ../../c-api/long.rst:41 msgid "" "Return a new :c:type:`PyLongObject` object from *v*, or ``NULL`` on failure." msgstr "" +#: ../../c-api/long.rst:45 msgid "" "CPython keeps an array of integer objects for all integers between ``-5`` " -"and ``256``. When you create an int in that range you actually just get " +"and ``1024``. When you create an int in that range you actually just get " "back a reference to the existing object." msgstr "" +#: ../../c-api/long.rst:52 msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long`, " "or ``NULL`` on failure." msgstr "" +#: ../../c-api/long.rst:58 msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:type:`Py_ssize_t`, or " "``NULL`` on failure." msgstr "" +#: ../../c-api/long.rst:64 msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:type:`size_t`, or " "``NULL`` on failure." msgstr "" +#: ../../c-api/long.rst:70 msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:expr:`long long`, or " "``NULL`` on failure." msgstr "" +#: ../../c-api/long.rst:76 msgid "" -"Return a new :c:type:`PyLongObject` object from a signed C :c:expr:`int32_t` " -"or :c:expr:`int64_t`, or ``NULL`` with an exception set on failure." +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long " +"long`, or ``NULL`` on failure." msgstr "" +#: ../../c-api/long.rst:83 msgid "" -"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long " -"long`, or ``NULL`` on failure." +"Return a new :c:type:`PyLongObject` object from a signed C :c:expr:`int32_t` " +"or :c:expr:`int64_t`, or ``NULL`` with an exception set on failure." msgstr "" +#: ../../c-api/long.rst:93 msgid "" "Return a new :c:type:`PyLongObject` object from an unsigned C :c:expr:" "`uint32_t` or :c:expr:`uint64_t`, or ``NULL`` with an exception set on " "failure." msgstr "" +#: ../../c-api/long.rst:102 msgid "" "Return a new :c:type:`PyLongObject` object from the integer part of *v*, or " "``NULL`` on failure." msgstr "" +#: ../../c-api/long.rst:108 msgid "" "Return a new :c:type:`PyLongObject` based on the string value in *str*, " "which is interpreted according to the radix in *base*, or ``NULL`` on " @@ -113,27 +131,32 @@ msgid "" "whitespace, :exc:`ValueError` will be raised." msgstr "" +#: ../../c-api/long.rst:119 msgid "" ":c:func:`PyLong_AsNativeBytes()` and :c:func:`PyLong_FromNativeBytes()` " "functions can be used to convert a :c:type:`PyLongObject` to/from an array " "of bytes in base ``256``." msgstr "" +#: ../../c-api/long.rst:126 msgid "" "Convert a sequence of Unicode digits in the string *u* to a Python integer " "value." msgstr "" +#: ../../c-api/long.rst:134 msgid "" "Create a Python integer from the pointer *p*. The pointer value can be " "retrieved from the resulting value using :c:func:`PyLong_AsVoidPtr`." msgstr "" +#: ../../c-api/long.rst:140 msgid "" "Create a Python integer from the value contained in the first *n_bytes* of " "*buffer*, interpreted as a two's-complement signed number." msgstr "" +#: ../../c-api/long.rst:143 msgid "" "*flags* are as for :c:func:`PyLong_AsNativeBytes`. Passing ``-1`` will " "select the native endian that CPython was compiled with and assume that the " @@ -142,51 +165,70 @@ msgid "" "calling :c:func:`PyLong_FromUnsignedNativeBytes`. Other flags are ignored." msgstr "" +#: ../../c-api/long.rst:154 msgid "" "Create a Python integer from the value contained in the first *n_bytes* of " "*buffer*, interpreted as an unsigned number." msgstr "" +#: ../../c-api/long.rst:157 msgid "" "*flags* are as for :c:func:`PyLong_AsNativeBytes`. Passing ``-1`` will " "select the native endian that CPython was compiled with and assume that the " "most-significant bit is not a sign bit. Flags other than endian are ignored." msgstr "" +#: ../../c-api/long.rst:166 +msgid "Macro for creating a Python integer from a process identifier." +msgstr "" + +#: ../../c-api/long.rst:168 +msgid "" +"This can be defined as an alias to :c:func:`PyLong_FromLong` or :c:func:" +"`PyLong_FromLongLong`, depending on the size of the system's PID type." +msgstr "" + +#: ../../c-api/long.rst:181 ../../c-api/long.rst:215 msgid "" "Return a C :c:expr:`long` representation of *obj*. If *obj* is not an " "instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` " "method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" +#: ../../c-api/long.rst:185 msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" "expr:`long`." msgstr "" +#: ../../c-api/long.rst:188 ../../c-api/long.rst:224 ../../c-api/long.rst:245 +#: ../../c-api/long.rst:265 ../../c-api/long.rst:288 msgid "Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" +#: ../../c-api/long.rst:190 ../../c-api/long.rst:226 ../../c-api/long.rst:247 +#: ../../c-api/long.rst:269 ../../c-api/long.rst:353 ../../c-api/long.rst:373 msgid "Use :meth:`~object.__index__` if available." msgstr "" +#: ../../c-api/long.rst:193 ../../c-api/long.rst:229 ../../c-api/long.rst:250 +#: ../../c-api/long.rst:272 ../../c-api/long.rst:356 ../../c-api/long.rst:376 msgid "This function will no longer use :meth:`~object.__int__`." msgstr "" +#: ../../c-api/long.rst:200 msgid "" -"A :term:`soft deprecated` alias. Exactly equivalent to the preferred " -"``PyLong_AsLong``. In particular, it can fail with :exc:`OverflowError` or " -"another exception." -msgstr "" - -msgid "The function is soft deprecated." +"Exactly equivalent to the preferred ``PyLong_AsLong``. In particular, it can " +"fail with :exc:`OverflowError` or another exception." msgstr "" +#: ../../c-api/long.rst:207 msgid "" "Similar to :c:func:`PyLong_AsLong`, but store the result in a C :c:expr:" "`int` instead of a C :c:expr:`long`." msgstr "" +#: ../../c-api/long.rst:219 msgid "" "If the value of *obj* is greater than :c:macro:`LONG_MAX` or less than :c:" "macro:`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " @@ -194,17 +236,20 @@ msgid "" "exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" +#: ../../c-api/long.rst:238 ../../c-api/long.rst:256 msgid "" "Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an " "instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` " "method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" +#: ../../c-api/long.rst:242 msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" "expr:`long long`." msgstr "" +#: ../../c-api/long.rst:260 msgid "" "If the value of *obj* is greater than :c:macro:`LLONG_MAX` or less than :c:" "macro:`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " @@ -212,141 +257,170 @@ msgid "" "exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" +#: ../../c-api/long.rst:282 msgid "" "Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must " "be an instance of :c:type:`PyLongObject`." msgstr "" +#: ../../c-api/long.rst:285 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "type:`Py_ssize_t`." msgstr "" +#: ../../c-api/long.rst:297 msgid "" "Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* " "must be an instance of :c:type:`PyLongObject`." msgstr "" +#: ../../c-api/long.rst:300 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "expr:`unsigned long`." msgstr "" +#: ../../c-api/long.rst:303 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" +#: ../../c-api/long.rst:313 msgid "" "Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be an " "instance of :c:type:`PyLongObject`." msgstr "" +#: ../../c-api/long.rst:316 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "type:`size_t`." msgstr "" +#: ../../c-api/long.rst:319 msgid "" "Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" +#: ../../c-api/long.rst:328 msgid "" "Return a C :c:expr:`unsigned long long` representation of *pylong*. " "*pylong* must be an instance of :c:type:`PyLongObject`." msgstr "" +#: ../../c-api/long.rst:331 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :" "c:expr:`unsigned long long`." msgstr "" +#: ../../c-api/long.rst:334 msgid "" "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" +#: ../../c-api/long.rst:337 msgid "" "A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`." msgstr "" +#: ../../c-api/long.rst:343 msgid "" "Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not " "an instance of :c:type:`PyLongObject`, first call its :meth:`~object." "__index__` method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" +#: ../../c-api/long.rst:347 msgid "" "If the value of *obj* is out of range for an :c:expr:`unsigned long`, return " "the reduction of that value modulo ``ULONG_MAX + 1``." msgstr "" +#: ../../c-api/long.rst:350 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" +#: ../../c-api/long.rst:362 msgid "" "Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* " "is not an instance of :c:type:`PyLongObject`, first call its :meth:`~object." "__index__` method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" +#: ../../c-api/long.rst:367 msgid "" "If the value of *obj* is out of range for an :c:expr:`unsigned long long`, " "return the reduction of that value modulo ``ULLONG_MAX + 1``." msgstr "" +#: ../../c-api/long.rst:370 msgid "" "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` " "to disambiguate." msgstr "" +#: ../../c-api/long.rst:383 msgid "" "Set *\\*value* to a signed C :c:expr:`int32_t` or :c:expr:`int64_t` " "representation of *obj*." msgstr "" +#: ../../c-api/long.rst:386 ../../c-api/long.rst:406 msgid "" "If *obj* is not an instance of :c:type:`PyLongObject`, first call its :meth:" "`~object.__index__` method (if present) to convert it to a :c:type:" "`PyLongObject`." msgstr "" +#: ../../c-api/long.rst:390 ../../c-api/long.rst:411 msgid "If the *obj* value is out of range, raise an :exc:`OverflowError`." msgstr "" +#: ../../c-api/long.rst:392 ../../c-api/long.rst:413 msgid "" "Set *\\*value* and return ``0`` on success. Set an exception and return " "``-1`` on error." msgstr "" +#: ../../c-api/long.rst:395 ../../c-api/long.rst:416 msgid "*value* must not be ``NULL``." msgstr "" +#: ../../c-api/long.rst:403 msgid "" "Set *\\*value* to an unsigned C :c:expr:`uint32_t` or :c:expr:`uint64_t` " "representation of *obj*." msgstr "" +#: ../../c-api/long.rst:410 msgid "If *obj* is negative, raise a :exc:`ValueError`." msgstr "" +#: ../../c-api/long.rst:423 msgid "" "Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an " "instance of :c:type:`PyLongObject`." msgstr "" +#: ../../c-api/long.rst:426 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "expr:`double`." msgstr "" +#: ../../c-api/long.rst:429 msgid "" "Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" +#: ../../c-api/long.rst:434 msgid "" "Convert a Python integer *pylong* to a C :c:expr:`void` pointer. If *pylong* " "cannot be converted, an :exc:`OverflowError` will be raised. This is only " @@ -354,28 +428,34 @@ msgid "" "c:func:`PyLong_FromVoidPtr`." msgstr "" +#: ../../c-api/long.rst:439 msgid "" "Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" +#: ../../c-api/long.rst:444 msgid "" "Copy the Python integer value *pylong* to a native *buffer* of size " "*n_bytes*. The *flags* can be set to ``-1`` to behave similarly to a C cast, " "or to values documented below to control the behavior." msgstr "" +#: ../../c-api/long.rst:448 msgid "" "Returns ``-1`` with an exception raised on error. This may happen if " "*pylong* cannot be interpreted as an integer, or if *pylong* was negative " "and the ``Py_ASNATIVEBYTES_REJECT_NEGATIVE`` flag was set." msgstr "" +#: ../../c-api/long.rst:452 msgid "" "Otherwise, returns the number of bytes required to store the value. If this " "is equal to or less than *n_bytes*, the entire value was copied. All " -"*n_bytes* of the buffer are written: large buffers are padded with zeroes." +"*n_bytes* of the buffer are written: remaining bytes filled by copies of the " +"sign bit." msgstr "" +#: ../../c-api/long.rst:457 msgid "" "If the returned value is greater than *n_bytes*, the value was truncated: as " "many of the lowest bits of the value as could fit are written, and the " @@ -383,20 +463,25 @@ msgid "" "downcast." msgstr "" +#: ../../c-api/long.rst:464 msgid "" "Overflow is not considered an error. If the returned value is larger than " "*n_bytes*, most significant bits were discarded." msgstr "" +#: ../../c-api/long.rst:467 msgid "``0`` will never be returned." msgstr "" +#: ../../c-api/long.rst:469 msgid "Values are always copied as two's-complement." msgstr "" +#: ../../c-api/long.rst:471 msgid "Usage example::" msgstr "" +#: ../../c-api/long.rst:473 msgid "" "int32_t value;\n" "Py_ssize_t bytes = PyLong_AsNativeBytes(pylong, &value, sizeof(value), -1);\n" @@ -413,22 +498,26 @@ msgid "" "}" msgstr "" +#: ../../c-api/long.rst:487 msgid "" "Passing zero to *n_bytes* will return the size of a buffer that would be " "large enough to hold the value. This may be larger than technically " "necessary, but not unreasonably so. If *n_bytes=0*, *buffer* may be ``NULL``." msgstr "" +#: ../../c-api/long.rst:494 msgid "" "Passing *n_bytes=0* to this function is not an accurate way to determine the " "bit length of the value." msgstr "" +#: ../../c-api/long.rst:497 msgid "" "To get at the entire Python value of an unknown size, the function can be " "called twice: first to determine the buffer size, then to fill it::" msgstr "" +#: ../../c-api/long.rst:500 msgid "" "// Ask how much space we need.\n" "Py_ssize_t expected = PyLong_AsNativeBytes(pylong, NULL, 0, -1);\n" @@ -459,55 +548,69 @@ msgid "" "free(bignum);" msgstr "" +#: ../../c-api/long.rst:528 msgid "" "*flags* is either ``-1`` (``Py_ASNATIVEBYTES_DEFAULTS``) to select defaults " "that behave most like a C cast, or a combination of the other flags in the " "table below. Note that ``-1`` cannot be combined with other flags." msgstr "" +#: ../../c-api/long.rst:533 msgid "" "Currently, ``-1`` corresponds to ``Py_ASNATIVEBYTES_NATIVE_ENDIAN | " "Py_ASNATIVEBYTES_UNSIGNED_BUFFER``." msgstr "" +#: ../../c-api/long.rst:539 msgid "Flag" msgstr "" +#: ../../c-api/long.rst:539 msgid "Value" msgstr "" +#: ../../c-api/long.rst:541 msgid "``-1``" msgstr "" +#: ../../c-api/long.rst:542 msgid "``0``" msgstr "" +#: ../../c-api/long.rst:543 msgid "``1``" msgstr "" +#: ../../c-api/long.rst:544 msgid "``3``" msgstr "" +#: ../../c-api/long.rst:545 msgid "``4``" msgstr "" +#: ../../c-api/long.rst:546 msgid "``8``" msgstr "" +#: ../../c-api/long.rst:547 msgid "``16``" msgstr "" +#: ../../c-api/long.rst:550 msgid "" "Specifying ``Py_ASNATIVEBYTES_NATIVE_ENDIAN`` will override any other endian " "flags. Passing ``2`` is reserved." msgstr "" +#: ../../c-api/long.rst:553 msgid "" "By default, sufficient buffer will be requested to include a sign bit. For " "example, when converting 128 with *n_bytes=1*, the function will return 2 " "(or more) in order to store a zero sign bit." msgstr "" +#: ../../c-api/long.rst:557 msgid "" "If ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` is specified, a zero sign bit will " "be omitted from size calculations. This allows, for example, 128 to fit in a " @@ -517,6 +620,7 @@ msgid "" "requested." msgstr "" +#: ../../c-api/long.rst:564 msgid "" "Specifying ``Py_ASNATIVEBYTES_REJECT_NEGATIVE`` causes an exception to be " "set if *pylong* is negative. Without this flag, negative values will be " @@ -524,6 +628,7 @@ msgid "" "of whether ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` was specified." msgstr "" +#: ../../c-api/long.rst:569 msgid "" "If ``Py_ASNATIVEBYTES_ALLOW_INDEX`` is specified and a non-integer value is " "passed, its :meth:`~object.__index__` method will be called first. This may " @@ -533,6 +638,7 @@ msgid "" "`TypeError`." msgstr "" +#: ../../c-api/long.rst:578 msgid "" "With the default *flags* (``-1``, or *UNSIGNED_BUFFER* without " "*REJECT_NEGATIVE*), multiple Python integers can map to a single value " @@ -540,58 +646,82 @@ msgid "" "buffer and set all its bits. This matches typical C cast behavior." msgstr "" +#: ../../c-api/long.rst:589 +msgid "Macro for converting a Python integer into a process identifier." +msgstr "" + +#: ../../c-api/long.rst:591 +msgid "" +"This can be defined as an alias to :c:func:`PyLong_AsLong`, :c:func:" +"`PyLong_FromLongLong`, or :c:func:`PyLong_AsInt`, depending on the size of " +"the system's PID type." +msgstr "" + +#: ../../c-api/long.rst:600 msgid "Get the sign of the integer object *obj*." msgstr "" +#: ../../c-api/long.rst:602 msgid "" "On success, set *\\*sign* to the integer sign (0, -1 or +1 for zero, " "negative or positive integer, respectively) and return 0." msgstr "" +#: ../../c-api/long.rst:605 msgid "" "On failure, return -1 with an exception set. This function always succeeds " "if *obj* is a :c:type:`PyLongObject` or its subtype." msgstr "" +#: ../../c-api/long.rst:613 msgid "Check if the integer object *obj* is positive (``obj > 0``)." msgstr "" +#: ../../c-api/long.rst:615 msgid "" "If *obj* is an instance of :c:type:`PyLongObject` or its subtype, return " "``1`` when it's positive and ``0`` otherwise. Else set an exception and " "return ``-1``." msgstr "" +#: ../../c-api/long.rst:624 msgid "Check if the integer object *obj* is negative (``obj < 0``)." msgstr "" +#: ../../c-api/long.rst:626 msgid "" "If *obj* is an instance of :c:type:`PyLongObject` or its subtype, return " "``1`` when it's negative and ``0`` otherwise. Else set an exception and " "return ``-1``." msgstr "" +#: ../../c-api/long.rst:635 msgid "Check if the integer object *obj* is zero." msgstr "" +#: ../../c-api/long.rst:637 msgid "" "If *obj* is an instance of :c:type:`PyLongObject` or its subtype, return " "``1`` when it's zero and ``0`` otherwise. Else set an exception and return " "``-1``." msgstr "" +#: ../../c-api/long.rst:646 msgid "" "On success, return a read only :term:`named tuple`, that holds information " "about Python's internal representation of integers. See :data:`sys.int_info` " "for description of individual fields." msgstr "" +#: ../../c-api/long.rst:650 msgid "On failure, return ``NULL`` with an exception set." msgstr "" +#: ../../c-api/long.rst:657 msgid "Return 1 if *op* is compact, 0 otherwise." msgstr "" +#: ../../c-api/long.rst:659 msgid "" "This function makes it possible for performance-critical code to implement a " "“fast path” for small integers. For compact values use :c:func:" @@ -599,74 +729,93 @@ msgid "" "`PyLong_As* ` function or :c:func:`PyLong_AsNativeBytes`." msgstr "" +#: ../../c-api/long.rst:665 msgid "The speedup is expected to be negligible for most users." msgstr "" +#: ../../c-api/long.rst:667 msgid "" "Exactly what values are considered compact is an implementation detail and " "is subject to change." msgstr "" +#: ../../c-api/long.rst:675 msgid "" "If *op* is compact, as determined by :c:func:`PyUnstable_Long_IsCompact`, " "return its value." msgstr "" +#: ../../c-api/long.rst:678 msgid "Otherwise, the return value is undefined." msgstr "" +#: ../../c-api/long.rst:684 msgid "Export API" msgstr "" +#: ../../c-api/long.rst:690 msgid "" "Layout of an array of \"digits\" (\"limbs\" in the GMP terminology), used to " "represent absolute value for arbitrary precision integers." msgstr "" +#: ../../c-api/long.rst:693 msgid "" "Use :c:func:`PyLong_GetNativeLayout` to get the native layout of Python :" "class:`int` objects, used internally for integers with \"big enough\" " "absolute value." msgstr "" +#: ../../c-api/long.rst:697 msgid "" "See also :data:`sys.int_info` which exposes similar information in Python." msgstr "" +#: ../../c-api/long.rst:701 msgid "" "Bits per digit. For example, a 15 bit digit means that bits 0-14 contain " "meaningful information." msgstr "" +#: ../../c-api/long.rst:706 msgid "" "Digit size in bytes. For example, a 15 bit digit will require at least 2 " "bytes." msgstr "" +#: ../../c-api/long.rst:711 msgid "Digits order:" msgstr "" +#: ../../c-api/long.rst:713 msgid "``1`` for most significant digit first" msgstr "" +#: ../../c-api/long.rst:714 msgid "``-1`` for least significant digit first" msgstr "" +#: ../../c-api/long.rst:718 msgid "Digit endianness:" msgstr "" +#: ../../c-api/long.rst:720 msgid "``1`` for most significant byte first (big endian)" msgstr "" +#: ../../c-api/long.rst:721 msgid "``-1`` for least significant byte first (little endian)" msgstr "" +#: ../../c-api/long.rst:726 msgid "Get the native layout of Python :class:`int` objects." msgstr "" -msgid "See the :c:struct:`PyLongLayout` structure." +#: ../../c-api/long.rst:728 +msgid "See the :c:type:`PyLongLayout` structure." msgstr "" +#: ../../c-api/long.rst:730 msgid "" "The function must not be called before Python initialization nor after " "Python finalization. The returned layout is valid until Python is finalized. " @@ -674,103 +823,128 @@ msgid "" "it can be cached." msgstr "" +#: ../../c-api/long.rst:738 msgid "Export of a Python :class:`int` object." msgstr "" +#: ../../c-api/long.rst:740 msgid "There are two cases:" msgstr "" +#: ../../c-api/long.rst:742 msgid "" "If :c:member:`digits` is ``NULL``, only use the :c:member:`value` member." msgstr "" +#: ../../c-api/long.rst:743 msgid "" "If :c:member:`digits` is not ``NULL``, use :c:member:`negative`, :c:member:" "`ndigits` and :c:member:`digits` members." msgstr "" +#: ../../c-api/long.rst:748 msgid "" "The native integer value of the exported :class:`int` object. Only valid if :" "c:member:`digits` is ``NULL``." msgstr "" +#: ../../c-api/long.rst:753 msgid "" "``1`` if the number is negative, ``0`` otherwise. Only valid if :c:member:" "`digits` is not ``NULL``." msgstr "" +#: ../../c-api/long.rst:758 msgid "" "Number of digits in :c:member:`digits` array. Only valid if :c:member:" "`digits` is not ``NULL``." msgstr "" +#: ../../c-api/long.rst:763 msgid "Read-only array of unsigned digits. Can be ``NULL``." msgstr "" +#: ../../c-api/long.rst:768 msgid "Export a Python :class:`int` object." msgstr "" +#: ../../c-api/long.rst:770 msgid "" -"*export_long* must point to a :c:struct:`PyLongExport` structure allocated " -"by the caller. It must not be ``NULL``." +"*export_long* must point to a :c:type:`PyLongExport` structure allocated by " +"the caller. It must not be ``NULL``." msgstr "" +#: ../../c-api/long.rst:773 msgid "" "On success, fill in *\\*export_long* and return ``0``. On error, set an " "exception and return ``-1``." msgstr "" +#: ../../c-api/long.rst:776 msgid "" ":c:func:`PyLong_FreeExport` must be called when the export is no longer " "needed." msgstr "" +#: ../../c-api/long.rst:780 msgid "" "This function always succeeds if *obj* is a Python :class:`int` object or a " "subclass." msgstr "" +#: ../../c-api/long.rst:786 msgid "Release the export *export_long* created by :c:func:`PyLong_Export`." msgstr "" +#: ../../c-api/long.rst:789 msgid "" "Calling :c:func:`PyLong_FreeExport` is optional if *export_long->digits* is " "``NULL``." msgstr "" +#: ../../c-api/long.rst:794 msgid "PyLongWriter API" msgstr "" +#: ../../c-api/long.rst:796 msgid "The :c:type:`PyLongWriter` API can be used to import an integer." msgstr "" +#: ../../c-api/long.rst:802 msgid "A Python :class:`int` writer instance." msgstr "" +#: ../../c-api/long.rst:804 msgid "" "The instance must be destroyed by :c:func:`PyLongWriter_Finish` or :c:func:" "`PyLongWriter_Discard`." msgstr "" +#: ../../c-api/long.rst:810 msgid "Create a :c:type:`PyLongWriter`." msgstr "" +#: ../../c-api/long.rst:812 msgid "" "On success, allocate *\\*digits* and return a writer. On error, set an " "exception and return ``NULL``." msgstr "" +#: ../../c-api/long.rst:815 msgid "*negative* is ``1`` if the number is negative, or ``0`` otherwise." msgstr "" +#: ../../c-api/long.rst:817 msgid "" "*ndigits* is the number of digits in the *digits* array. It must be greater " "than 0." msgstr "" +#: ../../c-api/long.rst:820 msgid "*digits* must not be NULL." msgstr "" +#: ../../c-api/long.rst:822 msgid "" "After a successful call to this function, the caller should fill in the " "array of digits *digits* and then call :c:func:`PyLongWriter_Finish` to get " @@ -778,61 +952,110 @@ msgid "" "`PyLong_GetNativeLayout`." msgstr "" +#: ../../c-api/long.rst:827 msgid "" "Digits must be in the range [``0``; ``(1 << bits_per_digit) - 1``] (where " -"the :c:struct:`~PyLongLayout.bits_per_digit` is the number of bits per " -"digit). Any unused most significant digits must be set to ``0``." +"the :c:type:`~PyLongLayout.bits_per_digit` is the number of bits per digit). " +"Any unused most significant digits must be set to ``0``." msgstr "" +#: ../../c-api/long.rst:832 msgid "" "Alternately, call :c:func:`PyLongWriter_Discard` to destroy the writer " "instance without creating an :class:`~int` object." msgstr "" +#: ../../c-api/long.rst:838 msgid "" "Finish a :c:type:`PyLongWriter` created by :c:func:`PyLongWriter_Create`." msgstr "" +#: ../../c-api/long.rst:840 msgid "" "On success, return a Python :class:`int` object. On error, set an exception " "and return ``NULL``." msgstr "" +#: ../../c-api/long.rst:843 msgid "" "The function takes care of normalizing the digits and converts the object to " "a compact integer if needed." msgstr "" +#: ../../c-api/long.rst:846 ../../c-api/long.rst:855 msgid "The writer instance and the *digits* array are invalid after the call." msgstr "" +#: ../../c-api/long.rst:851 msgid "" "Discard a :c:type:`PyLongWriter` created by :c:func:`PyLongWriter_Create`." msgstr "" +#: ../../c-api/long.rst:853 msgid "If *writer* is ``NULL``, no operation is performed." msgstr "" +#: ../../c-api/long.rst:859 +msgid "Deprecated API" +msgstr "" + +#: ../../c-api/long.rst:861 +msgid "" +"These macros are :term:`soft deprecated`. They describe parameters of the " +"internal representation of :c:type:`PyLongObject` instances." +msgstr "" + +#: ../../c-api/long.rst:864 +msgid "" +"Use :c:func:`PyLong_GetNativeLayout` instead, along with :c:func:" +"`PyLong_Export` to read integer data or :c:type:`PyLongWriter` to write it. " +"These currently use the same layout, but are designed to continue working " +"correctly even if CPython's internal integer representation changes." +msgstr "" + +#: ../../c-api/long.rst:872 +msgid "" +"This is equivalent to :c:member:`~PyLongLayout.bits_per_digit` in the output " +"of :c:func:`PyLong_GetNativeLayout`." +msgstr "" + +#: ../../c-api/long.rst:878 +msgid "This is currently equivalent to :c:expr:`1 << PyLong_SHIFT`." +msgstr "" + +#: ../../c-api/long.rst:883 +msgid "This is currently equivalent to :c:expr:`(1 << PyLong_SHIFT) - 1`" +msgstr "" + +#: ../../c-api/long.rst:8 msgid "object" msgstr "" +#: ../../c-api/long.rst:8 msgid "long integer" msgstr "" +#: ../../c-api/long.rst:8 msgid "integer" msgstr "" +#: ../../c-api/long.rst:177 msgid "LONG_MAX (C macro)" msgstr "" +#: ../../c-api/long.rst:177 ../../c-api/long.rst:235 ../../c-api/long.rst:278 +#: ../../c-api/long.rst:293 ../../c-api/long.rst:309 ../../c-api/long.rst:325 msgid "OverflowError (built-in exception)" msgstr "" +#: ../../c-api/long.rst:278 msgid "PY_SSIZE_T_MAX (C macro)" msgstr "" +#: ../../c-api/long.rst:293 msgid "ULONG_MAX (C macro)" msgstr "" +#: ../../c-api/long.rst:309 msgid "SIZE_MAX (C macro)" msgstr "" diff --git a/c-api/long.po~ b/c-api/long.po~ new file mode 100644 index 00000000..d5d1e6d5 --- /dev/null +++ b/c-api/long.po~ @@ -0,0 +1,838 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Integer Objects" +msgstr "" + +msgid "" +"All integers are implemented as \"long\" integer objects of arbitrary size." +msgstr "" + +msgid "" +"On error, most ``PyLong_As*`` APIs return ``(return type)-1`` which cannot " +"be distinguished from a number. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +msgid "This subtype of :c:type:`PyObject` represents a Python integer object." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python integer type. " +"This is the same object as :class:`int` in the Python layer." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyLongObject` or a subtype of :c:" +"type:`PyLongObject`. This function always succeeds." +msgstr "" + +msgid "" +"Return true if its argument is a :c:type:`PyLongObject`, but not a subtype " +"of :c:type:`PyLongObject`. This function always succeeds." +msgstr "" + +msgid "" +"Return a new :c:type:`PyLongObject` object from *v*, or ``NULL`` on failure." +msgstr "" + +msgid "" +"CPython keeps an array of integer objects for all integers between ``-5`` " +"and ``256``. When you create an int in that range you actually just get " +"back a reference to the existing object." +msgstr "" + +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long`, " +"or ``NULL`` on failure." +msgstr "" + +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:type:`Py_ssize_t`, or " +"``NULL`` on failure." +msgstr "" + +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:type:`size_t`, or " +"``NULL`` on failure." +msgstr "" + +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`long long`, or " +"``NULL`` on failure." +msgstr "" + +msgid "" +"Return a new :c:type:`PyLongObject` object from a signed C :c:expr:`int32_t` " +"or :c:expr:`int64_t`, or ``NULL`` with an exception set on failure." +msgstr "" + +msgid "" +"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long " +"long`, or ``NULL`` on failure." +msgstr "" + +msgid "" +"Return a new :c:type:`PyLongObject` object from an unsigned C :c:expr:" +"`uint32_t` or :c:expr:`uint64_t`, or ``NULL`` with an exception set on " +"failure." +msgstr "" + +msgid "" +"Return a new :c:type:`PyLongObject` object from the integer part of *v*, or " +"``NULL`` on failure." +msgstr "" + +msgid "" +"Return a new :c:type:`PyLongObject` based on the string value in *str*, " +"which is interpreted according to the radix in *base*, or ``NULL`` on " +"failure. If *pend* is non-``NULL``, *\\*pend* will point to the end of " +"*str* on success or to the first character that could not be processed on " +"error. If *base* is ``0``, *str* is interpreted using the :ref:`integers` " +"definition; in this case, leading zeros in a non-zero decimal number raises " +"a :exc:`ValueError`. If *base* is not ``0``, it must be between ``2`` and " +"``36``, inclusive. Leading and trailing whitespace and single underscores " +"after a base specifier and between digits are ignored. If there are no " +"digits or *str* is not NULL-terminated following the digits and trailing " +"whitespace, :exc:`ValueError` will be raised." +msgstr "" + +msgid "" +":c:func:`PyLong_AsNativeBytes()` and :c:func:`PyLong_FromNativeBytes()` " +"functions can be used to convert a :c:type:`PyLongObject` to/from an array " +"of bytes in base ``256``." +msgstr "" + +msgid "" +"Convert a sequence of Unicode digits in the string *u* to a Python integer " +"value." +msgstr "" + +msgid "" +"Create a Python integer from the pointer *p*. The pointer value can be " +"retrieved from the resulting value using :c:func:`PyLong_AsVoidPtr`." +msgstr "" + +msgid "" +"Create a Python integer from the value contained in the first *n_bytes* of " +"*buffer*, interpreted as a two's-complement signed number." +msgstr "" + +msgid "" +"*flags* are as for :c:func:`PyLong_AsNativeBytes`. Passing ``-1`` will " +"select the native endian that CPython was compiled with and assume that the " +"most-significant bit is a sign bit. Passing " +"``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` will produce the same result as " +"calling :c:func:`PyLong_FromUnsignedNativeBytes`. Other flags are ignored." +msgstr "" + +msgid "" +"Create a Python integer from the value contained in the first *n_bytes* of " +"*buffer*, interpreted as an unsigned number." +msgstr "" + +msgid "" +"*flags* are as for :c:func:`PyLong_AsNativeBytes`. Passing ``-1`` will " +"select the native endian that CPython was compiled with and assume that the " +"most-significant bit is not a sign bit. Flags other than endian are ignored." +msgstr "" + +msgid "" +"Return a C :c:expr:`long` representation of *obj*. If *obj* is not an " +"instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` " +"method (if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +msgid "" +"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" +"expr:`long`." +msgstr "" + +msgid "Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." +msgstr "" + +msgid "Use :meth:`~object.__index__` if available." +msgstr "" + +msgid "This function will no longer use :meth:`~object.__int__`." +msgstr "" + +msgid "" +"A :term:`soft deprecated` alias. Exactly equivalent to the preferred " +"``PyLong_AsLong``. In particular, it can fail with :exc:`OverflowError` or " +"another exception." +msgstr "" + +msgid "The function is soft deprecated." +msgstr "" + +msgid "" +"Similar to :c:func:`PyLong_AsLong`, but store the result in a C :c:expr:" +"`int` instead of a C :c:expr:`long`." +msgstr "" + +msgid "" +"If the value of *obj* is greater than :c:macro:`LONG_MAX` or less than :c:" +"macro:`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " +"return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other " +"exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." +msgstr "" + +msgid "" +"Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an " +"instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` " +"method (if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +msgid "" +"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" +"expr:`long long`." +msgstr "" + +msgid "" +"If the value of *obj* is greater than :c:macro:`LLONG_MAX` or less than :c:" +"macro:`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " +"return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other " +"exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." +msgstr "" + +msgid "" +"Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must " +"be an instance of :c:type:`PyLongObject`." +msgstr "" + +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"type:`Py_ssize_t`." +msgstr "" + +msgid "" +"Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* " +"must be an instance of :c:type:`PyLongObject`." +msgstr "" + +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"expr:`unsigned long`." +msgstr "" + +msgid "" +"Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +msgid "" +"Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be an " +"instance of :c:type:`PyLongObject`." +msgstr "" + +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"type:`size_t`." +msgstr "" + +msgid "" +"Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +msgid "" +"Return a C :c:expr:`unsigned long long` representation of *pylong*. " +"*pylong* must be an instance of :c:type:`PyLongObject`." +msgstr "" + +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :" +"c:expr:`unsigned long long`." +msgstr "" + +msgid "" +"Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +msgid "" +"A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`." +msgstr "" + +msgid "" +"Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not " +"an instance of :c:type:`PyLongObject`, first call its :meth:`~object." +"__index__` method (if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +msgid "" +"If the value of *obj* is out of range for an :c:expr:`unsigned long`, return " +"the reduction of that value modulo ``ULONG_MAX + 1``." +msgstr "" + +msgid "" +"Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " +"disambiguate." +msgstr "" + +msgid "" +"Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* " +"is not an instance of :c:type:`PyLongObject`, first call its :meth:`~object." +"__index__` method (if present) to convert it to a :c:type:`PyLongObject`." +msgstr "" + +msgid "" +"If the value of *obj* is out of range for an :c:expr:`unsigned long long`, " +"return the reduction of that value modulo ``ULLONG_MAX + 1``." +msgstr "" + +msgid "" +"Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` " +"to disambiguate." +msgstr "" + +msgid "" +"Set *\\*value* to a signed C :c:expr:`int32_t` or :c:expr:`int64_t` " +"representation of *obj*." +msgstr "" + +msgid "" +"If *obj* is not an instance of :c:type:`PyLongObject`, first call its :meth:" +"`~object.__index__` method (if present) to convert it to a :c:type:" +"`PyLongObject`." +msgstr "" + +msgid "If the *obj* value is out of range, raise an :exc:`OverflowError`." +msgstr "" + +msgid "" +"Set *\\*value* and return ``0`` on success. Set an exception and return " +"``-1`` on error." +msgstr "" + +msgid "*value* must not be ``NULL``." +msgstr "" + +msgid "" +"Set *\\*value* to an unsigned C :c:expr:`uint32_t` or :c:expr:`uint64_t` " +"representation of *obj*." +msgstr "" + +msgid "If *obj* is negative, raise a :exc:`ValueError`." +msgstr "" + +msgid "" +"Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an " +"instance of :c:type:`PyLongObject`." +msgstr "" + +msgid "" +"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" +"expr:`double`." +msgstr "" + +msgid "" +"Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." +msgstr "" + +msgid "" +"Convert a Python integer *pylong* to a C :c:expr:`void` pointer. If *pylong* " +"cannot be converted, an :exc:`OverflowError` will be raised. This is only " +"assured to produce a usable :c:expr:`void` pointer for values created with :" +"c:func:`PyLong_FromVoidPtr`." +msgstr "" + +msgid "" +"Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." +msgstr "" + +msgid "" +"Copy the Python integer value *pylong* to a native *buffer* of size " +"*n_bytes*. The *flags* can be set to ``-1`` to behave similarly to a C cast, " +"or to values documented below to control the behavior." +msgstr "" + +msgid "" +"Returns ``-1`` with an exception raised on error. This may happen if " +"*pylong* cannot be interpreted as an integer, or if *pylong* was negative " +"and the ``Py_ASNATIVEBYTES_REJECT_NEGATIVE`` flag was set." +msgstr "" + +msgid "" +"Otherwise, returns the number of bytes required to store the value. If this " +"is equal to or less than *n_bytes*, the entire value was copied. All " +"*n_bytes* of the buffer are written: large buffers are padded with zeroes." +msgstr "" + +msgid "" +"If the returned value is greater than *n_bytes*, the value was truncated: as " +"many of the lowest bits of the value as could fit are written, and the " +"higher bits are ignored. This matches the typical behavior of a C-style " +"downcast." +msgstr "" + +msgid "" +"Overflow is not considered an error. If the returned value is larger than " +"*n_bytes*, most significant bits were discarded." +msgstr "" + +msgid "``0`` will never be returned." +msgstr "" + +msgid "Values are always copied as two's-complement." +msgstr "" + +msgid "Usage example::" +msgstr "" + +msgid "" +"int32_t value;\n" +"Py_ssize_t bytes = PyLong_AsNativeBytes(pylong, &value, sizeof(value), -1);\n" +"if (bytes < 0) {\n" +" // Failed. A Python exception was set with the reason.\n" +" return NULL;\n" +"}\n" +"else if (bytes <= (Py_ssize_t)sizeof(value)) {\n" +" // Success!\n" +"}\n" +"else {\n" +" // Overflow occurred, but 'value' contains the truncated\n" +" // lowest bits of pylong.\n" +"}" +msgstr "" + +msgid "" +"Passing zero to *n_bytes* will return the size of a buffer that would be " +"large enough to hold the value. This may be larger than technically " +"necessary, but not unreasonably so. If *n_bytes=0*, *buffer* may be ``NULL``." +msgstr "" + +msgid "" +"Passing *n_bytes=0* to this function is not an accurate way to determine the " +"bit length of the value." +msgstr "" + +msgid "" +"To get at the entire Python value of an unknown size, the function can be " +"called twice: first to determine the buffer size, then to fill it::" +msgstr "" + +msgid "" +"// Ask how much space we need.\n" +"Py_ssize_t expected = PyLong_AsNativeBytes(pylong, NULL, 0, -1);\n" +"if (expected < 0) {\n" +" // Failed. A Python exception was set with the reason.\n" +" return NULL;\n" +"}\n" +"assert(expected != 0); // Impossible per the API definition.\n" +"uint8_t *bignum = malloc(expected);\n" +"if (!bignum) {\n" +" PyErr_SetString(PyExc_MemoryError, \"bignum malloc failed.\");\n" +" return NULL;\n" +"}\n" +"// Safely get the entire value.\n" +"Py_ssize_t bytes = PyLong_AsNativeBytes(pylong, bignum, expected, -1);\n" +"if (bytes < 0) { // Exception has been set.\n" +" free(bignum);\n" +" return NULL;\n" +"}\n" +"else if (bytes > expected) { // This should not be possible.\n" +" PyErr_SetString(PyExc_RuntimeError,\n" +" \"Unexpected bignum truncation after a size check.\");\n" +" free(bignum);\n" +" return NULL;\n" +"}\n" +"// The expected success given the above pre-check.\n" +"// ... use bignum ...\n" +"free(bignum);" +msgstr "" + +msgid "" +"*flags* is either ``-1`` (``Py_ASNATIVEBYTES_DEFAULTS``) to select defaults " +"that behave most like a C cast, or a combination of the other flags in the " +"table below. Note that ``-1`` cannot be combined with other flags." +msgstr "" + +msgid "" +"Currently, ``-1`` corresponds to ``Py_ASNATIVEBYTES_NATIVE_ENDIAN | " +"Py_ASNATIVEBYTES_UNSIGNED_BUFFER``." +msgstr "" + +msgid "Flag" +msgstr "" + +msgid "Value" +msgstr "" + +msgid "``-1``" +msgstr "" + +msgid "``0``" +msgstr "" + +msgid "``1``" +msgstr "" + +msgid "``3``" +msgstr "" + +msgid "``4``" +msgstr "" + +msgid "``8``" +msgstr "" + +msgid "``16``" +msgstr "" + +msgid "" +"Specifying ``Py_ASNATIVEBYTES_NATIVE_ENDIAN`` will override any other endian " +"flags. Passing ``2`` is reserved." +msgstr "" + +msgid "" +"By default, sufficient buffer will be requested to include a sign bit. For " +"example, when converting 128 with *n_bytes=1*, the function will return 2 " +"(or more) in order to store a zero sign bit." +msgstr "" + +msgid "" +"If ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` is specified, a zero sign bit will " +"be omitted from size calculations. This allows, for example, 128 to fit in a " +"single-byte buffer. If the destination buffer is later treated as signed, a " +"positive input value may become negative. Note that the flag does not affect " +"handling of negative values: for those, space for a sign bit is always " +"requested." +msgstr "" + +msgid "" +"Specifying ``Py_ASNATIVEBYTES_REJECT_NEGATIVE`` causes an exception to be " +"set if *pylong* is negative. Without this flag, negative values will be " +"copied provided there is enough space for at least one sign bit, regardless " +"of whether ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` was specified." +msgstr "" + +msgid "" +"If ``Py_ASNATIVEBYTES_ALLOW_INDEX`` is specified and a non-integer value is " +"passed, its :meth:`~object.__index__` method will be called first. This may " +"result in Python code executing and other threads being allowed to run, " +"which could cause changes to other objects or values in use. When *flags* is " +"``-1``, this option is not set, and non-integer values will raise :exc:" +"`TypeError`." +msgstr "" + +msgid "" +"With the default *flags* (``-1``, or *UNSIGNED_BUFFER* without " +"*REJECT_NEGATIVE*), multiple Python integers can map to a single value " +"without overflow. For example, both ``255`` and ``-1`` fit a single-byte " +"buffer and set all its bits. This matches typical C cast behavior." +msgstr "" + +msgid "Get the sign of the integer object *obj*." +msgstr "" + +msgid "" +"On success, set *\\*sign* to the integer sign (0, -1 or +1 for zero, " +"negative or positive integer, respectively) and return 0." +msgstr "" + +msgid "" +"On failure, return -1 with an exception set. This function always succeeds " +"if *obj* is a :c:type:`PyLongObject` or its subtype." +msgstr "" + +msgid "Check if the integer object *obj* is positive (``obj > 0``)." +msgstr "" + +msgid "" +"If *obj* is an instance of :c:type:`PyLongObject` or its subtype, return " +"``1`` when it's positive and ``0`` otherwise. Else set an exception and " +"return ``-1``." +msgstr "" + +msgid "Check if the integer object *obj* is negative (``obj < 0``)." +msgstr "" + +msgid "" +"If *obj* is an instance of :c:type:`PyLongObject` or its subtype, return " +"``1`` when it's negative and ``0`` otherwise. Else set an exception and " +"return ``-1``." +msgstr "" + +msgid "Check if the integer object *obj* is zero." +msgstr "" + +msgid "" +"If *obj* is an instance of :c:type:`PyLongObject` or its subtype, return " +"``1`` when it's zero and ``0`` otherwise. Else set an exception and return " +"``-1``." +msgstr "" + +msgid "" +"On success, return a read only :term:`named tuple`, that holds information " +"about Python's internal representation of integers. See :data:`sys.int_info` " +"for description of individual fields." +msgstr "" + +msgid "On failure, return ``NULL`` with an exception set." +msgstr "" + +msgid "Return 1 if *op* is compact, 0 otherwise." +msgstr "" + +msgid "" +"This function makes it possible for performance-critical code to implement a " +"“fast path” for small integers. For compact values use :c:func:" +"`PyUnstable_Long_CompactValue`; for others fall back to a :c:func:" +"`PyLong_As* ` function or :c:func:`PyLong_AsNativeBytes`." +msgstr "" + +msgid "The speedup is expected to be negligible for most users." +msgstr "" + +msgid "" +"Exactly what values are considered compact is an implementation detail and " +"is subject to change." +msgstr "" + +msgid "" +"If *op* is compact, as determined by :c:func:`PyUnstable_Long_IsCompact`, " +"return its value." +msgstr "" + +msgid "Otherwise, the return value is undefined." +msgstr "" + +msgid "Export API" +msgstr "" + +msgid "" +"Layout of an array of \"digits\" (\"limbs\" in the GMP terminology), used to " +"represent absolute value for arbitrary precision integers." +msgstr "" + +msgid "" +"Use :c:func:`PyLong_GetNativeLayout` to get the native layout of Python :" +"class:`int` objects, used internally for integers with \"big enough\" " +"absolute value." +msgstr "" + +msgid "" +"See also :data:`sys.int_info` which exposes similar information in Python." +msgstr "" + +msgid "" +"Bits per digit. For example, a 15 bit digit means that bits 0-14 contain " +"meaningful information." +msgstr "" + +msgid "" +"Digit size in bytes. For example, a 15 bit digit will require at least 2 " +"bytes." +msgstr "" + +msgid "Digits order:" +msgstr "" + +msgid "``1`` for most significant digit first" +msgstr "" + +msgid "``-1`` for least significant digit first" +msgstr "" + +msgid "Digit endianness:" +msgstr "" + +msgid "``1`` for most significant byte first (big endian)" +msgstr "" + +msgid "``-1`` for least significant byte first (little endian)" +msgstr "" + +msgid "Get the native layout of Python :class:`int` objects." +msgstr "" + +msgid "See the :c:struct:`PyLongLayout` structure." +msgstr "" + +msgid "" +"The function must not be called before Python initialization nor after " +"Python finalization. The returned layout is valid until Python is finalized. " +"The layout is the same for all Python sub-interpreters in a process, and so " +"it can be cached." +msgstr "" + +msgid "Export of a Python :class:`int` object." +msgstr "" + +msgid "There are two cases:" +msgstr "" + +msgid "" +"If :c:member:`digits` is ``NULL``, only use the :c:member:`value` member." +msgstr "" + +msgid "" +"If :c:member:`digits` is not ``NULL``, use :c:member:`negative`, :c:member:" +"`ndigits` and :c:member:`digits` members." +msgstr "" + +msgid "" +"The native integer value of the exported :class:`int` object. Only valid if :" +"c:member:`digits` is ``NULL``." +msgstr "" + +msgid "" +"``1`` if the number is negative, ``0`` otherwise. Only valid if :c:member:" +"`digits` is not ``NULL``." +msgstr "" + +msgid "" +"Number of digits in :c:member:`digits` array. Only valid if :c:member:" +"`digits` is not ``NULL``." +msgstr "" + +msgid "Read-only array of unsigned digits. Can be ``NULL``." +msgstr "" + +msgid "Export a Python :class:`int` object." +msgstr "" + +msgid "" +"*export_long* must point to a :c:struct:`PyLongExport` structure allocated " +"by the caller. It must not be ``NULL``." +msgstr "" + +msgid "" +"On success, fill in *\\*export_long* and return ``0``. On error, set an " +"exception and return ``-1``." +msgstr "" + +msgid "" +":c:func:`PyLong_FreeExport` must be called when the export is no longer " +"needed." +msgstr "" + +msgid "" +"This function always succeeds if *obj* is a Python :class:`int` object or a " +"subclass." +msgstr "" + +msgid "Release the export *export_long* created by :c:func:`PyLong_Export`." +msgstr "" + +msgid "" +"Calling :c:func:`PyLong_FreeExport` is optional if *export_long->digits* is " +"``NULL``." +msgstr "" + +msgid "PyLongWriter API" +msgstr "" + +msgid "The :c:type:`PyLongWriter` API can be used to import an integer." +msgstr "" + +msgid "A Python :class:`int` writer instance." +msgstr "" + +msgid "" +"The instance must be destroyed by :c:func:`PyLongWriter_Finish` or :c:func:" +"`PyLongWriter_Discard`." +msgstr "" + +msgid "Create a :c:type:`PyLongWriter`." +msgstr "" + +msgid "" +"On success, allocate *\\*digits* and return a writer. On error, set an " +"exception and return ``NULL``." +msgstr "" + +msgid "*negative* is ``1`` if the number is negative, or ``0`` otherwise." +msgstr "" + +msgid "" +"*ndigits* is the number of digits in the *digits* array. It must be greater " +"than 0." +msgstr "" + +msgid "*digits* must not be NULL." +msgstr "" + +msgid "" +"After a successful call to this function, the caller should fill in the " +"array of digits *digits* and then call :c:func:`PyLongWriter_Finish` to get " +"a Python :class:`int`. The layout of *digits* is described by :c:func:" +"`PyLong_GetNativeLayout`." +msgstr "" + +msgid "" +"Digits must be in the range [``0``; ``(1 << bits_per_digit) - 1``] (where " +"the :c:struct:`~PyLongLayout.bits_per_digit` is the number of bits per " +"digit). Any unused most significant digits must be set to ``0``." +msgstr "" + +msgid "" +"Alternately, call :c:func:`PyLongWriter_Discard` to destroy the writer " +"instance without creating an :class:`~int` object." +msgstr "" + +msgid "" +"Finish a :c:type:`PyLongWriter` created by :c:func:`PyLongWriter_Create`." +msgstr "" + +msgid "" +"On success, return a Python :class:`int` object. On error, set an exception " +"and return ``NULL``." +msgstr "" + +msgid "" +"The function takes care of normalizing the digits and converts the object to " +"a compact integer if needed." +msgstr "" + +msgid "The writer instance and the *digits* array are invalid after the call." +msgstr "" + +msgid "" +"Discard a :c:type:`PyLongWriter` created by :c:func:`PyLongWriter_Create`." +msgstr "" + +msgid "If *writer* is ``NULL``, no operation is performed." +msgstr "" + +msgid "object" +msgstr "" + +msgid "long integer" +msgstr "" + +msgid "integer" +msgstr "" + +msgid "LONG_MAX (C macro)" +msgstr "" + +msgid "OverflowError (built-in exception)" +msgstr "" + +msgid "PY_SSIZE_T_MAX (C macro)" +msgstr "" + +msgid "ULONG_MAX (C macro)" +msgstr "" + +msgid "SIZE_MAX (C macro)" +msgstr "" diff --git a/c-api/mapping.po b/c-api/mapping.po index ca3aecc3..351070c0 100644 --- a/c-api/mapping.po +++ b/c-api/mapping.po @@ -8,23 +8,26 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/mapping.rst:6 msgid "Mapping Protocol" msgstr "" +#: ../../c-api/mapping.rst:8 msgid "" "See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and :c:func:" "`PyObject_DelItem`." msgstr "" +#: ../../c-api/mapping.rst:14 msgid "" "Return ``1`` if the object provides the mapping protocol or supports " "slicing, and ``0`` otherwise. Note that it returns ``1`` for Python classes " @@ -33,22 +36,26 @@ msgid "" "succeeds." msgstr "" +#: ../../c-api/mapping.rst:25 msgid "" "Returns the number of keys in object *o* on success, and ``-1`` on failure. " "This is equivalent to the Python expression ``len(o)``." msgstr "" +#: ../../c-api/mapping.rst:31 msgid "" "This is the same as :c:func:`PyObject_GetItem`, but *key* is specified as a :" "c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/mapping.rst:38 msgid "" "Variant of :c:func:`PyObject_GetItem` which doesn't raise :exc:`KeyError` if " "the key is not found." msgstr "" +#: ../../c-api/mapping.rst:41 msgid "" "If the key is found, return ``1`` and set *\\*result* to a new :term:`strong " "reference` to the corresponding value. If the key is not found, return ``0`` " @@ -57,86 +64,103 @@ msgid "" "*\\*result* to ``NULL``." msgstr "" +#: ../../c-api/mapping.rst:53 msgid "" "This is the same as :c:func:`PyMapping_GetOptionalItem`, but *key* is " "specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " "a :c:expr:`PyObject*`." msgstr "" +#: ../../c-api/mapping.rst:62 msgid "" "This is the same as :c:func:`PyObject_SetItem`, but *key* is specified as a :" "c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/mapping.rst:69 msgid "This is an alias of :c:func:`PyObject_DelItem`." msgstr "" +#: ../../c-api/mapping.rst:74 msgid "" "This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as a :" "c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/mapping.rst:81 msgid "" "Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. " "This is equivalent to the Python expression ``key in o``. On failure, return " "``-1``." msgstr "" +#: ../../c-api/mapping.rst:90 msgid "" "This is the same as :c:func:`PyMapping_HasKeyWithError`, but *key* is " "specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " "a :c:expr:`PyObject*`." msgstr "" +#: ../../c-api/mapping.rst:99 msgid "" "Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. " "This is equivalent to the Python expression ``key in o``. This function " "always succeeds." msgstr "" +#: ../../c-api/mapping.rst:105 msgid "" -"Exceptions which occur when this calls :meth:`~object.__getitem__` method " -"are silently ignored. For proper error handling, use :c:func:" +"Exceptions which occur when this calls the :meth:`~object.__getitem__` " +"method are silently ignored. For proper error handling, use :c:func:" "`PyMapping_HasKeyWithError`, :c:func:`PyMapping_GetOptionalItem` or :c:func:" "`PyObject_GetItem()` instead." msgstr "" +#: ../../c-api/mapping.rst:113 msgid "" "This is the same as :c:func:`PyMapping_HasKey`, but *key* is specified as a :" "c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/mapping.rst:119 msgid "" -"Exceptions that occur when this calls :meth:`~object.__getitem__` method or " -"while creating the temporary :class:`str` object are silently ignored. For " -"proper error handling, use :c:func:`PyMapping_HasKeyStringWithError`, :c:" +"Exceptions that occur when this calls the :meth:`~object.__getitem__` method " +"or while creating the temporary :class:`str` object are silently ignored. " +"For proper error handling, use :c:func:`PyMapping_HasKeyStringWithError`, :c:" "func:`PyMapping_GetOptionalItemString` or :c:func:`PyMapping_GetItemString` " "instead." msgstr "" +#: ../../c-api/mapping.rst:129 msgid "" "On success, return a list of the keys in object *o*. On failure, return " "``NULL``." msgstr "" +#: ../../c-api/mapping.rst:132 ../../c-api/mapping.rst:141 +#: ../../c-api/mapping.rst:150 msgid "Previously, the function returned a list or a tuple." msgstr "" +#: ../../c-api/mapping.rst:138 msgid "" "On success, return a list of the values in object *o*. On failure, return " "``NULL``." msgstr "" +#: ../../c-api/mapping.rst:147 msgid "" "On success, return a list of the items in object *o*, where each item is a " "tuple containing a key-value pair. On failure, return ``NULL``." msgstr "" +#: ../../c-api/mapping.rst:23 msgid "built-in function" msgstr "" +#: ../../c-api/mapping.rst:23 msgid "len" msgstr "" diff --git a/c-api/mapping.po~ b/c-api/mapping.po~ new file mode 100644 index 00000000..ca3aecc3 --- /dev/null +++ b/c-api/mapping.po~ @@ -0,0 +1,142 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Mapping Protocol" +msgstr "" + +msgid "" +"See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and :c:func:" +"`PyObject_DelItem`." +msgstr "" + +msgid "" +"Return ``1`` if the object provides the mapping protocol or supports " +"slicing, and ``0`` otherwise. Note that it returns ``1`` for Python classes " +"with a :meth:`~object.__getitem__` method, since in general it is impossible " +"to determine what type of keys the class supports. This function always " +"succeeds." +msgstr "" + +msgid "" +"Returns the number of keys in object *o* on success, and ``-1`` on failure. " +"This is equivalent to the Python expression ``len(o)``." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyObject_GetItem`, but *key* is specified as a :" +"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "" +"Variant of :c:func:`PyObject_GetItem` which doesn't raise :exc:`KeyError` if " +"the key is not found." +msgstr "" + +msgid "" +"If the key is found, return ``1`` and set *\\*result* to a new :term:`strong " +"reference` to the corresponding value. If the key is not found, return ``0`` " +"and set *\\*result* to ``NULL``; the :exc:`KeyError` is silenced. If an " +"error other than :exc:`KeyError` is raised, return ``-1`` and set " +"*\\*result* to ``NULL``." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyMapping_GetOptionalItem`, but *key* is " +"specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyObject_SetItem`, but *key* is specified as a :" +"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "This is an alias of :c:func:`PyObject_DelItem`." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as a :" +"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "" +"Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. " +"This is equivalent to the Python expression ``key in o``. On failure, return " +"``-1``." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyMapping_HasKeyWithError`, but *key* is " +"specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." +msgstr "" + +msgid "" +"Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. " +"This is equivalent to the Python expression ``key in o``. This function " +"always succeeds." +msgstr "" + +msgid "" +"Exceptions which occur when this calls :meth:`~object.__getitem__` method " +"are silently ignored. For proper error handling, use :c:func:" +"`PyMapping_HasKeyWithError`, :c:func:`PyMapping_GetOptionalItem` or :c:func:" +"`PyObject_GetItem()` instead." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyMapping_HasKey`, but *key* is specified as a :" +"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "" +"Exceptions that occur when this calls :meth:`~object.__getitem__` method or " +"while creating the temporary :class:`str` object are silently ignored. For " +"proper error handling, use :c:func:`PyMapping_HasKeyStringWithError`, :c:" +"func:`PyMapping_GetOptionalItemString` or :c:func:`PyMapping_GetItemString` " +"instead." +msgstr "" + +msgid "" +"On success, return a list of the keys in object *o*. On failure, return " +"``NULL``." +msgstr "" + +msgid "Previously, the function returned a list or a tuple." +msgstr "" + +msgid "" +"On success, return a list of the values in object *o*. On failure, return " +"``NULL``." +msgstr "" + +msgid "" +"On success, return a list of the items in object *o*, where each item is a " +"tuple containing a key-value pair. On failure, return ``NULL``." +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "len" +msgstr "" diff --git a/c-api/marshal.po b/c-api/marshal.po index b7ba2022..54431815 100644 --- a/c-api/marshal.po +++ b/c-api/marshal.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/marshal.rst:6 msgid "Data marshalling support" msgstr "" +#: ../../c-api/marshal.rst:8 msgid "" "These routines allow C code to work with serialized objects using the same " "data format as the :mod:`marshal` module. There are functions to write data " @@ -28,78 +30,94 @@ msgid "" "binary mode." msgstr "" +#: ../../c-api/marshal.rst:14 msgid "Numeric values are stored with the least significant byte first." msgstr "" +#: ../../c-api/marshal.rst:16 msgid "" "The module supports several versions of the data format; see the :py:mod:" "`Python module documentation ` for details." msgstr "" +#: ../../c-api/marshal.rst:21 msgid "The current format version. See :py:data:`marshal.version`." msgstr "" +#: ../../c-api/marshal.rst:25 msgid "" "Marshal a :c:expr:`long` integer, *value*, to *file*. This will only write " "the least-significant 32 bits of *value*; regardless of the size of the " "native :c:expr:`long` type. *version* indicates the file format." msgstr "" +#: ../../c-api/marshal.rst:29 ../../c-api/marshal.rst:37 msgid "" "This function can fail, in which case it sets the error indicator. Use :c:" "func:`PyErr_Occurred` to check for that." msgstr "" +#: ../../c-api/marshal.rst:34 msgid "" "Marshal a Python object, *value*, to *file*. *version* indicates the file " "format." msgstr "" +#: ../../c-api/marshal.rst:42 msgid "" "Return a bytes object containing the marshalled representation of *value*. " "*version* indicates the file format." msgstr "" +#: ../../c-api/marshal.rst:46 msgid "The following functions allow marshalled values to be read back in." msgstr "" +#: ../../c-api/marshal.rst:51 msgid "" "Return a C :c:expr:`long` from the data stream in a :c:expr:`FILE*` opened " "for reading. Only a 32-bit value can be read in using this function, " "regardless of the native size of :c:expr:`long`." msgstr "" +#: ../../c-api/marshal.rst:55 ../../c-api/marshal.rst:65 msgid "" "On error, sets the appropriate exception (:exc:`EOFError`) and returns " "``-1``." msgstr "" +#: ../../c-api/marshal.rst:61 msgid "" "Return a C :c:expr:`short` from the data stream in a :c:expr:`FILE*` opened " "for reading. Only a 16-bit value can be read in using this function, " "regardless of the native size of :c:expr:`short`." msgstr "" +#: ../../c-api/marshal.rst:71 msgid "" "Return a Python object from the data stream in a :c:expr:`FILE*` opened for " "reading." msgstr "" +#: ../../c-api/marshal.rst:74 ../../c-api/marshal.rst:88 +#: ../../c-api/marshal.rst:97 msgid "" "On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` " "or :exc:`TypeError`) and returns ``NULL``." msgstr "" +#: ../../c-api/marshal.rst:80 msgid "" "Return a Python object from the data stream in a :c:expr:`FILE*` opened for " "reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function " "assumes that no further objects will be read from the file, allowing it to " "aggressively load file data into memory so that the de-serialization can " "operate from data in memory rather than reading a byte at a time from the " -"file. Only use these variant if you are certain that you won't be reading " +"file. Only use this variant if you are certain that you won't be reading " "anything else from the file." msgstr "" +#: ../../c-api/marshal.rst:94 msgid "" "Return a Python object from the data stream in a byte buffer containing " "*len* bytes pointed to by *data*." diff --git a/c-api/marshal.po~ b/c-api/marshal.po~ new file mode 100644 index 00000000..b7ba2022 --- /dev/null +++ b/c-api/marshal.po~ @@ -0,0 +1,106 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Data marshalling support" +msgstr "" + +msgid "" +"These routines allow C code to work with serialized objects using the same " +"data format as the :mod:`marshal` module. There are functions to write data " +"into the serialization format, and additional functions that can be used to " +"read the data back. Files used to store marshalled data must be opened in " +"binary mode." +msgstr "" + +msgid "Numeric values are stored with the least significant byte first." +msgstr "" + +msgid "" +"The module supports several versions of the data format; see the :py:mod:" +"`Python module documentation ` for details." +msgstr "" + +msgid "The current format version. See :py:data:`marshal.version`." +msgstr "" + +msgid "" +"Marshal a :c:expr:`long` integer, *value*, to *file*. This will only write " +"the least-significant 32 bits of *value*; regardless of the size of the " +"native :c:expr:`long` type. *version* indicates the file format." +msgstr "" + +msgid "" +"This function can fail, in which case it sets the error indicator. Use :c:" +"func:`PyErr_Occurred` to check for that." +msgstr "" + +msgid "" +"Marshal a Python object, *value*, to *file*. *version* indicates the file " +"format." +msgstr "" + +msgid "" +"Return a bytes object containing the marshalled representation of *value*. " +"*version* indicates the file format." +msgstr "" + +msgid "The following functions allow marshalled values to be read back in." +msgstr "" + +msgid "" +"Return a C :c:expr:`long` from the data stream in a :c:expr:`FILE*` opened " +"for reading. Only a 32-bit value can be read in using this function, " +"regardless of the native size of :c:expr:`long`." +msgstr "" + +msgid "" +"On error, sets the appropriate exception (:exc:`EOFError`) and returns " +"``-1``." +msgstr "" + +msgid "" +"Return a C :c:expr:`short` from the data stream in a :c:expr:`FILE*` opened " +"for reading. Only a 16-bit value can be read in using this function, " +"regardless of the native size of :c:expr:`short`." +msgstr "" + +msgid "" +"Return a Python object from the data stream in a :c:expr:`FILE*` opened for " +"reading." +msgstr "" + +msgid "" +"On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` " +"or :exc:`TypeError`) and returns ``NULL``." +msgstr "" + +msgid "" +"Return a Python object from the data stream in a :c:expr:`FILE*` opened for " +"reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function " +"assumes that no further objects will be read from the file, allowing it to " +"aggressively load file data into memory so that the de-serialization can " +"operate from data in memory rather than reading a byte at a time from the " +"file. Only use these variant if you are certain that you won't be reading " +"anything else from the file." +msgstr "" + +msgid "" +"Return a Python object from the data stream in a byte buffer containing " +"*len* bytes pointed to by *data*." +msgstr "" diff --git a/c-api/memory.po b/c-api/memory.po index 7d179a47..18c9a1ab 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -11,22 +11,25 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/memory.rst:8 msgid "Memory Management" msgstr "" +#: ../../c-api/memory.rst:13 msgid "Overview" msgstr "" +#: ../../c-api/memory.rst:15 msgid "" "Memory management in Python involves a private heap containing all Python " "objects and data structures. The management of this private heap is ensured " @@ -35,6 +38,7 @@ msgid "" "aspects, like sharing, segmentation, preallocation or caching." msgstr "" +#: ../../c-api/memory.rst:21 msgid "" "At the lowest level, a raw memory allocator ensures that there is enough " "room in the private heap for storing all Python-related data by interacting " @@ -48,6 +52,7 @@ msgid "" "but ensures that the latter operate within the bounds of the private heap." msgstr "" +#: ../../c-api/memory.rst:32 msgid "" "It is important to understand that the management of the Python heap is " "performed by the interpreter itself and that the user has no control over " @@ -57,6 +62,7 @@ msgid "" "the Python/C API functions listed in this document." msgstr "" +#: ../../c-api/memory.rst:45 msgid "" "To avoid memory corruption, extension writers should never try to operate on " "Python objects with the functions exported by the C library: :c:func:" @@ -68,6 +74,7 @@ msgid "" "in the following example::" msgstr "" +#: ../../c-api/memory.rst:54 msgid "" "PyObject *res;\n" "char *buf = (char *) malloc(BUFSIZ); /* for I/O */\n" @@ -80,12 +87,14 @@ msgid "" "return res;" msgstr "" +#: ../../c-api/memory.rst:64 msgid "" "In this example, the memory request for the I/O buffer is handled by the C " "library allocator. The Python memory manager is involved only in the " "allocation of the bytes object returned as a result." msgstr "" +#: ../../c-api/memory.rst:68 msgid "" "In most situations, however, it is recommended to allocate memory from the " "Python heap specifically because the latter is under control of the Python " @@ -99,39 +108,45 @@ msgid "" "certain circumstances, the Python memory manager may or may not trigger " "appropriate actions, like garbage collection, memory compaction or other " "preventive procedures. Note that by using the C library allocator as shown " -"in the previous example, the allocated memory for the I/O buffer escapes " -"completely the Python memory manager." +"in the previous example, the allocated memory for the I/O buffer completely " +"escapes the Python memory manager." msgstr "" +#: ../../c-api/memory.rst:84 msgid "" "The :envvar:`PYTHONMALLOC` environment variable can be used to configure the " "memory allocators used by Python." msgstr "" +#: ../../c-api/memory.rst:87 msgid "" "The :envvar:`PYTHONMALLOCSTATS` environment variable can be used to print " "statistics of the :ref:`pymalloc memory allocator ` every time a " "new pymalloc object arena is created, and on shutdown." msgstr "" +#: ../../c-api/memory.rst:92 msgid "Allocator Domains" msgstr "" +#: ../../c-api/memory.rst:96 msgid "" "All allocating functions belong to one of three different \"domains\" (see " "also :c:type:`PyMemAllocatorDomain`). These domains represent different " "allocation strategies and are optimized for different purposes. The specific " "details on how every domain allocates memory or what internal functions each " "domain calls is considered an implementation detail, but for debugging " -"purposes a simplified table can be found at :ref:`here `. The APIs used to allocate and free a block of memory must be " +"purposes a simplified table can be found at :ref:`default-memory-" +"allocators`. The APIs used to allocate and free a block of memory must be " "from the same domain. For example, :c:func:`PyMem_Free` must be used to free " "memory allocated using :c:func:`PyMem_Malloc`." msgstr "" +#: ../../c-api/memory.rst:105 msgid "The three allocation domains are:" msgstr "" +#: ../../c-api/memory.rst:107 msgid "" "Raw domain: intended for allocating memory for general-purpose memory " "buffers where the allocation *must* go to the system allocator or where the " @@ -140,6 +155,7 @@ msgid "" "memoryinterface>`." msgstr "" +#: ../../c-api/memory.rst:112 msgid "" "\"Mem\" domain: intended for allocating memory for Python buffers and " "general-purpose memory buffers where the allocation must be performed with " @@ -147,12 +163,14 @@ msgid "" "private heap. See :ref:`Memory Interface `." msgstr "" +#: ../../c-api/memory.rst:117 msgid "" "Object domain: intended for allocating memory for Python objects. The memory " "is taken from the Python private heap. See :ref:`Object allocators " "`." msgstr "" +#: ../../c-api/memory.rst:122 msgid "" "The :term:`free-threaded ` build requires that only Python " "objects are allocated using the \"object\" domain and that all Python " @@ -160,24 +178,29 @@ msgid "" "versions, where this was only a best practice and not a hard requirement." msgstr "" +#: ../../c-api/memory.rst:126 msgid "" "For example, buffers (non-Python objects) should be allocated using :c:func:" "`PyMem_Malloc`, :c:func:`PyMem_RawMalloc`, or :c:func:`malloc`, but not :c:" "func:`PyObject_Malloc`." msgstr "" +#: ../../c-api/memory.rst:129 msgid "See :ref:`Memory Allocation APIs `." msgstr "" +#: ../../c-api/memory.rst:135 msgid "Raw Memory Interface" msgstr "" +#: ../../c-api/memory.rst:137 msgid "" "The following function sets are wrappers to the system allocator. These " "functions are thread-safe, so a :term:`thread state` does not need to be :" "term:`attached `." msgstr "" +#: ../../c-api/memory.rst:141 msgid "" "The :ref:`default raw memory allocator ` uses the " "following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` " @@ -185,51 +208,63 @@ msgid "" "requesting zero bytes." msgstr "" +#: ../../c-api/memory.rst:150 ../../c-api/memory.rst:228 +#: ../../c-api/memory.rst:361 msgid "" "Allocates *n* bytes and returns a pointer of type :c:expr:`void*` to the " "allocated memory, or ``NULL`` if the request fails." msgstr "" +#: ../../c-api/memory.rst:153 msgid "" "Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " "as if ``PyMem_RawMalloc(1)`` had been called instead. The memory will not " "have been initialized in any way." msgstr "" +#: ../../c-api/memory.rst:160 ../../c-api/memory.rst:238 +#: ../../c-api/memory.rst:371 msgid "" -"Allocates *nelem* elements each whose size in bytes is *elsize* and returns " -"a pointer of type :c:expr:`void*` to the allocated memory, or ``NULL`` if " -"the request fails. The memory is initialized to zeros." +"Allocates *nelem* elements each of size *elsize* bytes and returns a pointer " +"of type :c:expr:`void*` to the allocated memory, or ``NULL`` if the request " +"fails. The memory is initialized to zeros." msgstr "" +#: ../../c-api/memory.rst:164 msgid "" "Requesting zero elements or elements of size zero bytes returns a distinct " "non-``NULL`` pointer if possible, as if ``PyMem_RawCalloc(1, 1)`` had been " "called instead." msgstr "" +#: ../../c-api/memory.rst:173 ../../c-api/memory.rst:251 +#: ../../c-api/memory.rst:384 msgid "" "Resizes the memory block pointed to by *p* to *n* bytes. The contents will " "be unchanged to the minimum of the old and the new sizes." msgstr "" +#: ../../c-api/memory.rst:176 msgid "" "If *p* is ``NULL``, the call is equivalent to ``PyMem_RawMalloc(n)``; else " "if *n* is equal to zero, the memory block is resized but is not freed, and " "the returned pointer is non-``NULL``." msgstr "" +#: ../../c-api/memory.rst:180 msgid "" "Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" "func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:func:" "`PyMem_RawCalloc`." msgstr "" +#: ../../c-api/memory.rst:184 msgid "" "If the request fails, :c:func:`PyMem_RawRealloc` returns ``NULL`` and *p* " "remains a valid pointer to the previous memory area." msgstr "" +#: ../../c-api/memory.rst:190 msgid "" "Frees the memory block pointed to by *p*, which must have been returned by a " "previous call to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:" @@ -237,59 +272,80 @@ msgid "" "called before, undefined behavior occurs." msgstr "" +#: ../../c-api/memory.rst:195 ../../c-api/memory.rst:272 +#: ../../c-api/memory.rst:405 msgid "If *p* is ``NULL``, no operation is performed." msgstr "" +#: ../../c-api/memory.rst:201 msgid "Memory Interface" msgstr "" +#: ../../c-api/memory.rst:203 ../../c-api/memory.rst:340 msgid "" "The following function sets, modeled after the ANSI C standard, but " "specifying behavior when requesting zero bytes, are available for allocating " "and releasing memory from the Python heap." msgstr "" +#: ../../c-api/memory.rst:207 msgid "" -"The :ref:`default memory allocator ` uses the :" -"ref:`pymalloc memory allocator `." +"In the GIL-enabled build (default build) the :ref:`default memory allocator " +"` uses the :ref:`pymalloc memory allocator " +"`, whereas in the :term:`free-threaded build`, the default is the :" +"ref:`mimalloc memory allocator ` instead." msgstr "" +#: ../../c-api/memory.rst:215 ../../c-api/memory.rst:357 msgid "" "There must be an :term:`attached thread state` when using these functions." msgstr "" +#: ../../c-api/memory.rst:219 msgid "" "The default allocator is now pymalloc instead of system :c:func:`malloc`." msgstr "" +#: ../../c-api/memory.rst:223 +msgid "" +"In the :term:`free-threaded ` build, the default allocator " +"is now :ref:`mimalloc `." +msgstr "" + +#: ../../c-api/memory.rst:231 msgid "" "Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " "as if ``PyMem_Malloc(1)`` had been called instead. The memory will not have " "been initialized in any way." msgstr "" +#: ../../c-api/memory.rst:242 msgid "" "Requesting zero elements or elements of size zero bytes returns a distinct " "non-``NULL`` pointer if possible, as if ``PyMem_Calloc(1, 1)`` had been " "called instead." msgstr "" +#: ../../c-api/memory.rst:254 msgid "" "If *p* is ``NULL``, the call is equivalent to ``PyMem_Malloc(n)``; else if " "*n* is equal to zero, the memory block is resized but is not freed, and the " "returned pointer is non-``NULL``." msgstr "" +#: ../../c-api/memory.rst:258 msgid "" "Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" "func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`." msgstr "" +#: ../../c-api/memory.rst:261 msgid "" "If the request fails, :c:func:`PyMem_Realloc` returns ``NULL`` and *p* " "remains a valid pointer to the previous memory area." msgstr "" +#: ../../c-api/memory.rst:267 msgid "" "Frees the memory block pointed to by *p*, which must have been returned by a " "previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:" @@ -297,17 +353,20 @@ msgid "" "undefined behavior occurs." msgstr "" +#: ../../c-api/memory.rst:274 msgid "" "The following type-oriented macros are provided for convenience. Note that " "*TYPE* refers to any C type." msgstr "" +#: ../../c-api/memory.rst:280 msgid "" "Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes " "of memory. Returns a pointer cast to ``TYPE*``. The memory will not have " "been initialized in any way." msgstr "" +#: ../../c-api/memory.rst:287 msgid "" "Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * " "sizeof(TYPE))`` bytes. Returns a pointer cast to ``TYPE*``. On return, *p* " @@ -315,42 +374,67 @@ msgid "" "failure." msgstr "" +#: ../../c-api/memory.rst:292 msgid "" "This is a C preprocessor macro; *p* is always reassigned. Save the original " "value of *p* to avoid losing memory when handling errors." msgstr "" +#: ../../c-api/memory.rst:298 msgid "Same as :c:func:`PyMem_Free`." msgstr "" +#: ../../c-api/memory.rst:302 +msgid "Deprecated aliases" +msgstr "" + +#: ../../c-api/memory.rst:304 msgid "" -"In addition, the following macro sets are provided for calling the Python " -"memory allocator directly, without involving the C API functions listed " -"above. However, note that their use does not preserve binary compatibility " -"across Python versions and is therefore deprecated in extension modules." +"These are :term:`soft deprecated` aliases to existing functions and macros. " +"They exist solely for backwards compatibility." +msgstr "" + +#: ../../c-api/memory.rst:311 +msgid "Deprecated alias" +msgstr "" + +#: ../../c-api/memory.rst:312 +msgid "Corresponding function or macro" msgstr "" -msgid "``PyMem_MALLOC(size)``" +#: ../../c-api/memory.rst:314 +msgid ":c:func:`PyMem_Malloc`" msgstr "" -msgid "``PyMem_NEW(type, size)``" +#: ../../c-api/memory.rst:316 +msgid ":c:macro:`PyMem_New`" msgstr "" -msgid "``PyMem_REALLOC(ptr, size)``" +#: ../../c-api/memory.rst:318 ../../c-api/memory.rst:507 +msgid ":c:func:`PyMem_Realloc`" msgstr "" -msgid "``PyMem_RESIZE(ptr, type, size)``" +#: ../../c-api/memory.rst:320 +msgid ":c:macro:`PyMem_Resize`" msgstr "" -msgid "``PyMem_FREE(ptr)``" +#: ../../c-api/memory.rst:322 ../../c-api/memory.rst:324 +#: ../../c-api/memory.rst:509 +msgid ":c:func:`PyMem_Free`" msgstr "" -msgid "``PyMem_DEL(ptr)``" -msgstr "``PyMem_DEL(ptr)``" +#: ../../c-api/memory.rst:328 +msgid "" +"The macros are now aliases of the corresponding functions and macros. " +"Previously, their behavior was the same, but their use did not necessarily " +"preserve binary compatibility across Python versions." +msgstr "" +#: ../../c-api/memory.rst:338 msgid "Object allocators" msgstr "" +#: ../../c-api/memory.rst:345 msgid "" "There is no guarantee that the memory returned by these allocators can be " "successfully cast to a Python object when intercepting the allocating " @@ -358,40 +442,49 @@ msgid "" "Memory Allocators ` section." msgstr "" +#: ../../c-api/memory.rst:350 msgid "" "The :ref:`default object allocator ` uses the :" -"ref:`pymalloc memory allocator `." +"ref:`pymalloc memory allocator `. In the :term:`free-threaded " +"` build, the default is the :ref:`mimalloc memory allocator " +"` instead." msgstr "" +#: ../../c-api/memory.rst:364 msgid "" "Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " "as if ``PyObject_Malloc(1)`` had been called instead. The memory will not " "have been initialized in any way." msgstr "" +#: ../../c-api/memory.rst:375 msgid "" "Requesting zero elements or elements of size zero bytes returns a distinct " "non-``NULL`` pointer if possible, as if ``PyObject_Calloc(1, 1)`` had been " "called instead." msgstr "" +#: ../../c-api/memory.rst:387 msgid "" "If *p* is ``NULL``, the call is equivalent to ``PyObject_Malloc(n)``; else " "if *n* is equal to zero, the memory block is resized but is not freed, and " "the returned pointer is non-``NULL``." msgstr "" +#: ../../c-api/memory.rst:391 msgid "" "Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" "func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:func:" "`PyObject_Calloc`." msgstr "" +#: ../../c-api/memory.rst:394 msgid "" "If the request fails, :c:func:`PyObject_Realloc` returns ``NULL`` and *p* " "remains a valid pointer to the previous memory area." msgstr "" +#: ../../c-api/memory.rst:400 msgid "" "Frees the memory block pointed to by *p*, which must have been returned by a " "previous call to :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:" @@ -399,245 +492,331 @@ msgid "" "called before, undefined behavior occurs." msgstr "" +#: ../../c-api/memory.rst:407 msgid "" "Do not call this directly to free an object's memory; call the type's :c:" "member:`~PyTypeObject.tp_free` slot instead." msgstr "" +#: ../../c-api/memory.rst:410 msgid "" "Do not use this for memory allocated by :c:macro:`PyObject_GC_New` or :c:" "macro:`PyObject_GC_NewVar`; use :c:func:`PyObject_GC_Del` instead." msgstr "" +#: ../../c-api/memory.rst:415 msgid "" ":c:func:`PyObject_GC_Del` is the equivalent of this function for memory " "allocated by types that support garbage collection." msgstr "" +#: ../../c-api/memory.rst:417 ../../c-api/memory.rst:515 msgid ":c:func:`PyObject_Malloc`" msgstr "" +#: ../../c-api/memory.rst:418 ../../c-api/memory.rst:516 msgid ":c:func:`PyObject_Realloc`" msgstr "" +#: ../../c-api/memory.rst:419 ../../c-api/memory.rst:517 msgid ":c:func:`PyObject_Calloc`" msgstr "" +#: ../../c-api/memory.rst:420 msgid ":c:macro:`PyObject_New`" msgstr "" +#: ../../c-api/memory.rst:421 msgid ":c:macro:`PyObject_NewVar`" msgstr "" +#: ../../c-api/memory.rst:422 msgid ":c:func:`PyType_GenericAlloc`" msgstr "" +#: ../../c-api/memory.rst:423 msgid ":c:member:`~PyTypeObject.tp_free`" msgstr "" +#: ../../c-api/memory.rst:429 msgid "Default Memory Allocators" msgstr "" +#: ../../c-api/memory.rst:431 msgid "Default memory allocators:" msgstr "" +#: ../../c-api/memory.rst:434 msgid "Configuration" msgstr "" +#: ../../c-api/memory.rst:434 msgid "Name" msgstr "Name" +#: ../../c-api/memory.rst:434 msgid "PyMem_RawMalloc" msgstr "" +#: ../../c-api/memory.rst:434 msgid "PyMem_Malloc" msgstr "" +#: ../../c-api/memory.rst:434 msgid "PyObject_Malloc" msgstr "" +#: ../../c-api/memory.rst:436 msgid "Release build" msgstr "" +#: ../../c-api/memory.rst:436 msgid "``\"pymalloc\"``" msgstr "" +#: ../../c-api/memory.rst:436 ../../c-api/memory.rst:438 msgid "``malloc``" msgstr "" +#: ../../c-api/memory.rst:436 msgid "``pymalloc``" msgstr "" +#: ../../c-api/memory.rst:437 msgid "Debug build" msgstr "" +#: ../../c-api/memory.rst:437 msgid "``\"pymalloc_debug\"``" msgstr "" +#: ../../c-api/memory.rst:437 ../../c-api/memory.rst:439 msgid "``malloc`` + debug" msgstr "" +#: ../../c-api/memory.rst:437 msgid "``pymalloc`` + debug" msgstr "" +#: ../../c-api/memory.rst:438 msgid "Release build, without pymalloc" msgstr "" +#: ../../c-api/memory.rst:438 msgid "``\"malloc\"``" msgstr "" +#: ../../c-api/memory.rst:439 msgid "Debug build, without pymalloc" msgstr "" +#: ../../c-api/memory.rst:439 msgid "``\"malloc_debug\"``" msgstr "" +#: ../../c-api/memory.rst:440 +msgid "Free-threaded build" +msgstr "" + +#: ../../c-api/memory.rst:440 +msgid "``\"mimalloc\"``" +msgstr "" + +#: ../../c-api/memory.rst:440 +msgid "``mimalloc``" +msgstr "" + +#: ../../c-api/memory.rst:441 +msgid "Free-threaded debug build" +msgstr "" + +#: ../../c-api/memory.rst:441 +msgid "``\"mimalloc_debug\"``" +msgstr "" + +#: ../../c-api/memory.rst:441 +msgid "``mimalloc`` + debug" +msgstr "" + +#: ../../c-api/memory.rst:444 msgid "Legend:" msgstr "" +#: ../../c-api/memory.rst:446 msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." msgstr "" +#: ../../c-api/memory.rst:447 msgid "" "``malloc``: system allocators from the standard C library, C functions: :c:" "func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`." msgstr "" +#: ../../c-api/memory.rst:449 msgid "``pymalloc``: :ref:`pymalloc memory allocator `." msgstr "" -msgid "" -"``mimalloc``: :ref:`mimalloc memory allocator `. The pymalloc " -"allocator will be used if mimalloc support isn't available." +#: ../../c-api/memory.rst:450 +msgid "``mimalloc``: :ref:`mimalloc memory allocator `." msgstr "" +#: ../../c-api/memory.rst:451 msgid "" "\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." msgstr "" +#: ../../c-api/memory.rst:453 msgid "\"Debug build\": :ref:`Python build in debug mode `." msgstr "" +#: ../../c-api/memory.rst:458 msgid "Customize Memory Allocators" msgstr "" +#: ../../c-api/memory.rst:464 msgid "" "Structure used to describe a memory block allocator. The structure has the " "following fields:" msgstr "" +#: ../../c-api/memory.rst:468 ../../c-api/memory.rst:723 msgid "Field" msgstr "" +#: ../../c-api/memory.rst:468 ../../c-api/memory.rst:723 msgid "Meaning" msgstr "" +#: ../../c-api/memory.rst:470 ../../c-api/memory.rst:725 msgid "``void *ctx``" msgstr "" +#: ../../c-api/memory.rst:470 ../../c-api/memory.rst:725 msgid "user context passed as first argument" msgstr "" +#: ../../c-api/memory.rst:472 msgid "``void* malloc(void *ctx, size_t size)``" msgstr "" +#: ../../c-api/memory.rst:472 msgid "allocate a memory block" msgstr "" +#: ../../c-api/memory.rst:474 msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" msgstr "" +#: ../../c-api/memory.rst:474 msgid "allocate a memory block initialized with zeros" msgstr "" +#: ../../c-api/memory.rst:477 msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" msgstr "" +#: ../../c-api/memory.rst:477 msgid "allocate or resize a memory block" msgstr "" +#: ../../c-api/memory.rst:479 msgid "``void free(void *ctx, void *ptr)``" msgstr "" +#: ../../c-api/memory.rst:479 msgid "free a memory block" msgstr "" +#: ../../c-api/memory.rst:482 msgid "" "The :c:type:`!PyMemAllocator` structure was renamed to :c:type:" "`PyMemAllocatorEx` and a new ``calloc`` field was added." msgstr "" +#: ../../c-api/memory.rst:489 msgid "Enum used to identify an allocator domain. Domains:" msgstr "" +#: ../../c-api/memory.rst:495 ../../c-api/memory.rst:504 +#: ../../c-api/memory.rst:513 msgid "Functions:" msgstr "" +#: ../../c-api/memory.rst:497 msgid ":c:func:`PyMem_RawMalloc`" msgstr "" +#: ../../c-api/memory.rst:498 msgid ":c:func:`PyMem_RawRealloc`" msgstr "" +#: ../../c-api/memory.rst:499 msgid ":c:func:`PyMem_RawCalloc`" msgstr "" +#: ../../c-api/memory.rst:500 msgid ":c:func:`PyMem_RawFree`" msgstr "" +#: ../../c-api/memory.rst:506 msgid ":c:func:`PyMem_Malloc`," msgstr "" -msgid ":c:func:`PyMem_Realloc`" -msgstr "" - +#: ../../c-api/memory.rst:508 msgid ":c:func:`PyMem_Calloc`" msgstr "" -msgid ":c:func:`PyMem_Free`" -msgstr "" - +#: ../../c-api/memory.rst:518 msgid ":c:func:`PyObject_Free`" msgstr "" +#: ../../c-api/memory.rst:522 msgid "Get the memory block allocator of the specified domain." msgstr "" +#: ../../c-api/memory.rst:527 msgid "Set the memory block allocator of the specified domain." msgstr "" +#: ../../c-api/memory.rst:529 msgid "" "The new allocator must return a distinct non-``NULL`` pointer when " "requesting zero bytes." msgstr "" +#: ../../c-api/memory.rst:532 msgid "" "For the :c:macro:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" "safe: a :term:`thread state` is not :term:`attached ` " "when the allocator is called." msgstr "" +#: ../../c-api/memory.rst:536 msgid "" "For the remaining domains, the allocator must also be thread-safe: the " "allocator may be called in different interpreters that do not share a :term:" "`GIL`." msgstr "" +#: ../../c-api/memory.rst:540 msgid "" "If the new allocator is not a hook (does not call the previous allocator), " "the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the " "debug hooks on top on the new allocator." msgstr "" +#: ../../c-api/memory.rst:544 msgid "" "See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python " "with PyPreConfig `." msgstr "" +#: ../../c-api/memory.rst:549 msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" msgstr "" +#: ../../c-api/memory.rst:551 msgid "" "It can be called after :c:func:`Py_PreInitialize` and before :c:func:" "`Py_InitializeFromConfig` to install a custom memory allocator. There are no " @@ -647,6 +826,7 @@ msgid "" "allocator domains ` for more information." msgstr "" +#: ../../c-api/memory.rst:559 msgid "" "If called after Python has finish initializing (after :c:func:" "`Py_InitializeFromConfig` has been called) the allocator **must** wrap the " @@ -654,17 +834,21 @@ msgid "" "arbitrary one is **not supported**." msgstr "" +#: ../../c-api/memory.rst:564 msgid "All allocators must be thread-safe." msgstr "" +#: ../../c-api/memory.rst:570 msgid "" "Setup :ref:`debug hooks in the Python memory allocators ` " "to detect memory errors." msgstr "" +#: ../../c-api/memory.rst:577 msgid "Debug hooks on the Python memory allocators" msgstr "" +#: ../../c-api/memory.rst:579 msgid "" "When :ref:`Python is built in debug mode `, the :c:func:" "`PyMem_SetupDebugHooks` function is called at the :ref:`Python " @@ -672,16 +856,19 @@ msgid "" "allocators to detect memory errors." msgstr "" +#: ../../c-api/memory.rst:584 msgid "" "The :envvar:`PYTHONMALLOC` environment variable can be used to install debug " "hooks on a Python compiled in release mode (ex: ``PYTHONMALLOC=debug``)." msgstr "" +#: ../../c-api/memory.rst:587 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function can be used to set debug hooks " "after calling :c:func:`PyMem_SetAllocator`." msgstr "" +#: ../../c-api/memory.rst:590 msgid "" "These debug hooks fill dynamically allocated memory blocks with special, " "recognizable bit patterns. Newly allocated memory is filled with the byte " @@ -691,20 +878,25 @@ msgid "" "these bytes are unlikely to be valid addresses, floats, or ASCII strings." msgstr "" +#: ../../c-api/memory.rst:597 msgid "Runtime checks:" msgstr "" +#: ../../c-api/memory.rst:599 msgid "" "Detect API violations. For example, detect if :c:func:`PyObject_Free` is " "called on a memory block allocated by :c:func:`PyMem_Malloc`." msgstr "" +#: ../../c-api/memory.rst:601 msgid "Detect write before the start of the buffer (buffer underflow)." msgstr "" +#: ../../c-api/memory.rst:602 msgid "Detect write after the end of the buffer (buffer overflow)." msgstr "" +#: ../../c-api/memory.rst:603 msgid "" "Check that there is an :term:`attached thread state` when allocator " "functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " @@ -712,6 +904,7 @@ msgid "" "called." msgstr "" +#: ../../c-api/memory.rst:608 msgid "" "On error, the debug hooks use the :mod:`tracemalloc` module to get the " "traceback where a memory block was allocated. The traceback is only " @@ -719,6 +912,7 @@ msgid "" "memory block was traced." msgstr "" +#: ../../c-api/memory.rst:613 msgid "" "Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each " "block of *N* bytes requested. The memory layout is like so, where p " @@ -728,38 +922,49 @@ msgid "" "from a Python slice):" msgstr "" +#: ../../c-api/memory.rst:619 msgid "``p[-2*S:-S]``" msgstr "``p[-2*S:-S]``" +#: ../../c-api/memory.rst:620 msgid "" "Number of bytes originally asked for. This is a size_t, big-endian (easier " "to read in a memory dump)." msgstr "" +#: ../../c-api/memory.rst:622 msgid "``p[-S]``" msgstr "``p[-S]``" +#: ../../c-api/memory.rst:623 msgid "API identifier (ASCII character):" msgstr "" +#: ../../c-api/memory.rst:625 msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`." msgstr "" +#: ../../c-api/memory.rst:626 msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`." msgstr "" +#: ../../c-api/memory.rst:627 msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." msgstr "" +#: ../../c-api/memory.rst:629 msgid "``p[-S+1:0]``" msgstr "``p[-S+1:0]``" +#: ../../c-api/memory.rst:630 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." msgstr "" +#: ../../c-api/memory.rst:632 msgid "``p[0:N]``" msgstr "" +#: ../../c-api/memory.rst:633 msgid "" "The requested memory, filled with copies of PYMEM_CLEANBYTE, used to catch " "reference to uninitialized memory. When a realloc-like function is called " @@ -770,20 +975,25 @@ msgid "" "bytes are also filled with PYMEM_DEADBYTE." msgstr "" +#: ../../c-api/memory.rst:641 msgid "``p[N:N+S]``" msgstr "" +#: ../../c-api/memory.rst:642 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." msgstr "" +#: ../../c-api/memory.rst:644 msgid "``p[N+S:N+2*S]``" msgstr "``p[N+S:N+2*S]``" +#: ../../c-api/memory.rst:645 msgid "" "Only used if the ``PYMEM_DEBUG_SERIALNO`` macro is defined (not defined by " "default)." msgstr "" +#: ../../c-api/memory.rst:648 msgid "" "A serial number, incremented by 1 on each call to a malloc-like or realloc-" "like function. Big-endian :c:type:`size_t`. If \"bad memory\" is detected " @@ -793,6 +1003,7 @@ msgid "" "number is incremented, and exists so you can set such a breakpoint easily." msgstr "" +#: ../../c-api/memory.rst:655 msgid "" "A realloc-like or free-like function first checks that the " "PYMEM_FORBIDDENBYTE bytes at each end are intact. If they've been altered, " @@ -805,6 +1016,7 @@ msgid "" "getting used)." msgstr "" +#: ../../c-api/memory.rst:664 msgid "" "The :c:func:`PyMem_SetupDebugHooks` function now also works on Python " "compiled in release mode. On error, the debug hooks now use :mod:" @@ -814,6 +1026,7 @@ msgid "" "domains are called." msgstr "" +#: ../../c-api/memory.rst:672 msgid "" "Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " "and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " @@ -821,114 +1034,173 @@ msgid "" "``malloc()`` and ``free()``." msgstr "" +#: ../../c-api/memory.rst:682 msgid "The pymalloc allocator" msgstr "" +#: ../../c-api/memory.rst:684 msgid "" "Python has a *pymalloc* allocator optimized for small objects (smaller or " "equal to 512 bytes) with a short lifetime. It uses memory mappings called " "\"arenas\" with a fixed size of either 256 KiB on 32-bit platforms or 1 MiB " -"on 64-bit platforms. It falls back to :c:func:`PyMem_RawMalloc` and :c:func:" -"`PyMem_RawRealloc` for allocations larger than 512 bytes." +"on 64-bit platforms. When Python is configured with :option:`--with-pymalloc-" +"hugepages`, the arena size on 64-bit platforms is increased to 2 MiB to " +"match the huge page size, and arena allocation will attempt to use huge " +"pages (``MAP_HUGETLB`` on Linux, ``MEM_LARGE_PAGES`` on Windows) with " +"automatic fallback to regular pages. It falls back to :c:func:" +"`PyMem_RawMalloc` and :c:func:`PyMem_RawRealloc` for allocations larger than " +"512 bytes." msgstr "" +#: ../../c-api/memory.rst:694 msgid "" "*pymalloc* is the :ref:`default allocator ` of " "the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:macro:" "`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." msgstr "" +#: ../../c-api/memory.rst:698 msgid "The arena allocator uses the following functions:" msgstr "" +#: ../../c-api/memory.rst:700 msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows," msgstr "" +#: ../../c-api/memory.rst:701 msgid ":c:func:`!mmap` and :c:func:`!munmap` if available," msgstr "" +#: ../../c-api/memory.rst:702 msgid ":c:func:`malloc` and :c:func:`free` otherwise." msgstr "" +#: ../../c-api/memory.rst:704 msgid "" "This allocator is disabled if Python is configured with the :option:`--" "without-pymalloc` option. It can also be disabled at runtime using the :" "envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``)." msgstr "" +#: ../../c-api/memory.rst:708 msgid "" "Typically, it makes sense to disable the pymalloc allocator when building " "Python with AddressSanitizer (:option:`--with-address-sanitizer`) which " "helps uncover low level bugs within the C code." msgstr "" +#: ../../c-api/memory.rst:713 msgid "Customize pymalloc Arena Allocator" msgstr "" +#: ../../c-api/memory.rst:719 msgid "" "Structure used to describe an arena allocator. The structure has three " "fields:" msgstr "" +#: ../../c-api/memory.rst:727 msgid "``void* alloc(void *ctx, size_t size)``" msgstr "" +#: ../../c-api/memory.rst:727 msgid "allocate an arena of size bytes" msgstr "" +#: ../../c-api/memory.rst:729 msgid "``void free(void *ctx, void *ptr, size_t size)``" msgstr "" +#: ../../c-api/memory.rst:729 msgid "free an arena" msgstr "" +#: ../../c-api/memory.rst:734 msgid "Get the arena allocator." msgstr "" +#: ../../c-api/memory.rst:738 msgid "Set the arena allocator." msgstr "" +#: ../../c-api/memory.rst:743 msgid "The mimalloc allocator" msgstr "" +#: ../../c-api/memory.rst:747 +msgid "" +"Python supports the `mimalloc `__ " +"allocator when the underlying platform support is available. mimalloc is a " +"general purpose allocator with excellent performance characteristics, " +"initially developed by Daan Leijen for the runtime systems of the Koka and " +"Lean languages." +msgstr "" + +#: ../../c-api/memory.rst:753 msgid "" -"Python supports the mimalloc allocator when the underlying platform support " -"is available. mimalloc \"is a general purpose allocator with excellent " -"performance characteristics. Initially developed by Daan Leijen for the " -"runtime systems of the Koka and Lean languages.\"" +"Unlike :ref:`pymalloc `, which is optimized for small objects (512 " +"bytes or fewer), mimalloc handles allocations of any size." msgstr "" +#: ../../c-api/memory.rst:756 +msgid "" +"In the :term:`free-threaded ` build, mimalloc is the default " +"and **required** allocator for the :c:macro:`PYMEM_DOMAIN_MEM` and :c:macro:" +"`PYMEM_DOMAIN_OBJ` domains. It cannot be disabled in free-threaded builds. " +"The free-threaded build uses per-thread mimalloc heaps, which allows " +"allocation and deallocation to proceed without locking in most cases." +msgstr "" + +#: ../../c-api/memory.rst:762 +msgid "" +"In the default (non-free-threaded) build, mimalloc is available but not the " +"default allocator. It can be selected at runtime using :envvar:" +"`PYTHONMALLOC`\\ ``=mimalloc`` (or ``mimalloc_debug`` to include :ref:`debug " +"hooks `). It can be disabled at build time using the :" +"option:`--without-mimalloc` configure option, but this option cannot be " +"combined with :option:`--disable-gil`." +msgstr "" + +#: ../../c-api/memory.rst:770 msgid "tracemalloc C API" msgstr "" +#: ../../c-api/memory.rst:776 msgid "Track an allocated memory block in the :mod:`tracemalloc` module." msgstr "" +#: ../../c-api/memory.rst:778 msgid "" "Return ``0`` on success, return ``-1`` on error (failed to allocate memory " "to store the trace). Return ``-2`` if tracemalloc is disabled." msgstr "" +#: ../../c-api/memory.rst:781 msgid "If memory block is already tracked, update the existing trace." msgstr "" +#: ../../c-api/memory.rst:785 msgid "" "Untrack an allocated memory block in the :mod:`tracemalloc` module. Do " "nothing if the block was not tracked." msgstr "" +#: ../../c-api/memory.rst:788 msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." msgstr "" +#: ../../c-api/memory.rst:794 msgid "Examples" msgstr "" +#: ../../c-api/memory.rst:796 msgid "" "Here is the example from section :ref:`memoryoverview`, rewritten so that " "the I/O buffer is allocated from the Python heap by using the first function " "set::" msgstr "" +#: ../../c-api/memory.rst:799 msgid "" "PyObject *res;\n" "char *buf = (char *) PyMem_Malloc(BUFSIZ); /* for I/O */\n" @@ -941,9 +1213,11 @@ msgid "" "return res;" msgstr "" +#: ../../c-api/memory.rst:809 msgid "The same code using the type-oriented function set::" msgstr "" +#: ../../c-api/memory.rst:811 msgid "" "PyObject *res;\n" "char *buf = PyMem_New(char, BUFSIZ); /* for I/O */\n" @@ -956,6 +1230,7 @@ msgid "" "return res;" msgstr "" +#: ../../c-api/memory.rst:821 msgid "" "Note that in the two examples above, the buffer is always manipulated via " "functions belonging to the same set. Indeed, it is required to use the same " @@ -965,6 +1240,7 @@ msgid "" "different allocators operating on different heaps. ::" msgstr "" +#: ../../c-api/memory.rst:828 msgid "" "char *buf1 = PyMem_New(char, BUFSIZ);\n" "char *buf2 = (char *) malloc(BUFSIZ);\n" @@ -975,25 +1251,34 @@ msgid "" "free(buf1); /* Fatal -- should be PyMem_Free() */" msgstr "" +#: ../../c-api/memory.rst:836 msgid "" "In addition to the functions aimed at handling raw memory blocks from the " "Python heap, objects in Python are allocated and released with :c:macro:" "`PyObject_New`, :c:macro:`PyObject_NewVar` and :c:func:`PyObject_Free`." msgstr "" +#: ../../c-api/memory.rst:840 msgid "" "These will be explained in the next chapter on defining and implementing new " "object types in C." msgstr "" +#: ../../c-api/memory.rst:39 msgid "malloc (C function)" msgstr "" +#: ../../c-api/memory.rst:39 msgid "calloc (C function)" msgstr "" +#: ../../c-api/memory.rst:39 msgid "realloc (C function)" msgstr "" +#: ../../c-api/memory.rst:39 msgid "free (C function)" msgstr "" + +#~ msgid "``PyMem_DEL(ptr)``" +#~ msgstr "``PyMem_DEL(ptr)``" diff --git a/c-api/memory.po~ b/c-api/memory.po~ new file mode 100644 index 00000000..7d179a47 --- /dev/null +++ b/c-api/memory.po~ @@ -0,0 +1,999 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Memory Management" +msgstr "" + +msgid "Overview" +msgstr "" + +msgid "" +"Memory management in Python involves a private heap containing all Python " +"objects and data structures. The management of this private heap is ensured " +"internally by the *Python memory manager*. The Python memory manager has " +"different components which deal with various dynamic storage management " +"aspects, like sharing, segmentation, preallocation or caching." +msgstr "" + +msgid "" +"At the lowest level, a raw memory allocator ensures that there is enough " +"room in the private heap for storing all Python-related data by interacting " +"with the memory manager of the operating system. On top of the raw memory " +"allocator, several object-specific allocators operate on the same heap and " +"implement distinct memory management policies adapted to the peculiarities " +"of every object type. For example, integer objects are managed differently " +"within the heap than strings, tuples or dictionaries because integers imply " +"different storage requirements and speed/space tradeoffs. The Python memory " +"manager thus delegates some of the work to the object-specific allocators, " +"but ensures that the latter operate within the bounds of the private heap." +msgstr "" + +msgid "" +"It is important to understand that the management of the Python heap is " +"performed by the interpreter itself and that the user has no control over " +"it, even if they regularly manipulate object pointers to memory blocks " +"inside that heap. The allocation of heap space for Python objects and other " +"internal buffers is performed on demand by the Python memory manager through " +"the Python/C API functions listed in this document." +msgstr "" + +msgid "" +"To avoid memory corruption, extension writers should never try to operate on " +"Python objects with the functions exported by the C library: :c:func:" +"`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`. This will " +"result in mixed calls between the C allocator and the Python memory manager " +"with fatal consequences, because they implement different algorithms and " +"operate on different heaps. However, one may safely allocate and release " +"memory blocks with the C library allocator for individual purposes, as shown " +"in the following example::" +msgstr "" + +msgid "" +"PyObject *res;\n" +"char *buf = (char *) malloc(BUFSIZ); /* for I/O */\n" +"\n" +"if (buf == NULL)\n" +" return PyErr_NoMemory();\n" +"...Do some I/O operation involving buf...\n" +"res = PyBytes_FromString(buf);\n" +"free(buf); /* malloc'ed */\n" +"return res;" +msgstr "" + +msgid "" +"In this example, the memory request for the I/O buffer is handled by the C " +"library allocator. The Python memory manager is involved only in the " +"allocation of the bytes object returned as a result." +msgstr "" + +msgid "" +"In most situations, however, it is recommended to allocate memory from the " +"Python heap specifically because the latter is under control of the Python " +"memory manager. For example, this is required when the interpreter is " +"extended with new object types written in C. Another reason for using the " +"Python heap is the desire to *inform* the Python memory manager about the " +"memory needs of the extension module. Even when the requested memory is used " +"exclusively for internal, highly specific purposes, delegating all memory " +"requests to the Python memory manager causes the interpreter to have a more " +"accurate image of its memory footprint as a whole. Consequently, under " +"certain circumstances, the Python memory manager may or may not trigger " +"appropriate actions, like garbage collection, memory compaction or other " +"preventive procedures. Note that by using the C library allocator as shown " +"in the previous example, the allocated memory for the I/O buffer escapes " +"completely the Python memory manager." +msgstr "" + +msgid "" +"The :envvar:`PYTHONMALLOC` environment variable can be used to configure the " +"memory allocators used by Python." +msgstr "" + +msgid "" +"The :envvar:`PYTHONMALLOCSTATS` environment variable can be used to print " +"statistics of the :ref:`pymalloc memory allocator ` every time a " +"new pymalloc object arena is created, and on shutdown." +msgstr "" + +msgid "Allocator Domains" +msgstr "" + +msgid "" +"All allocating functions belong to one of three different \"domains\" (see " +"also :c:type:`PyMemAllocatorDomain`). These domains represent different " +"allocation strategies and are optimized for different purposes. The specific " +"details on how every domain allocates memory or what internal functions each " +"domain calls is considered an implementation detail, but for debugging " +"purposes a simplified table can be found at :ref:`here `. The APIs used to allocate and free a block of memory must be " +"from the same domain. For example, :c:func:`PyMem_Free` must be used to free " +"memory allocated using :c:func:`PyMem_Malloc`." +msgstr "" + +msgid "The three allocation domains are:" +msgstr "" + +msgid "" +"Raw domain: intended for allocating memory for general-purpose memory " +"buffers where the allocation *must* go to the system allocator or where the " +"allocator can operate without an :term:`attached thread state`. The memory " +"is requested directly from the system. See :ref:`Raw Memory Interface `." +msgstr "" + +msgid "" +"\"Mem\" domain: intended for allocating memory for Python buffers and " +"general-purpose memory buffers where the allocation must be performed with " +"an :term:`attached thread state`. The memory is taken from the Python " +"private heap. See :ref:`Memory Interface `." +msgstr "" + +msgid "" +"Object domain: intended for allocating memory for Python objects. The memory " +"is taken from the Python private heap. See :ref:`Object allocators " +"`." +msgstr "" + +msgid "" +"The :term:`free-threaded ` build requires that only Python " +"objects are allocated using the \"object\" domain and that all Python " +"objects are allocated using that domain. This differs from the prior Python " +"versions, where this was only a best practice and not a hard requirement." +msgstr "" + +msgid "" +"For example, buffers (non-Python objects) should be allocated using :c:func:" +"`PyMem_Malloc`, :c:func:`PyMem_RawMalloc`, or :c:func:`malloc`, but not :c:" +"func:`PyObject_Malloc`." +msgstr "" + +msgid "See :ref:`Memory Allocation APIs `." +msgstr "" + +msgid "Raw Memory Interface" +msgstr "" + +msgid "" +"The following function sets are wrappers to the system allocator. These " +"functions are thread-safe, so a :term:`thread state` does not need to be :" +"term:`attached `." +msgstr "" + +msgid "" +"The :ref:`default raw memory allocator ` uses the " +"following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` " +"and :c:func:`!free`; call ``malloc(1)`` (or ``calloc(1, 1)``) when " +"requesting zero bytes." +msgstr "" + +msgid "" +"Allocates *n* bytes and returns a pointer of type :c:expr:`void*` to the " +"allocated memory, or ``NULL`` if the request fails." +msgstr "" + +msgid "" +"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " +"as if ``PyMem_RawMalloc(1)`` had been called instead. The memory will not " +"have been initialized in any way." +msgstr "" + +msgid "" +"Allocates *nelem* elements each whose size in bytes is *elsize* and returns " +"a pointer of type :c:expr:`void*` to the allocated memory, or ``NULL`` if " +"the request fails. The memory is initialized to zeros." +msgstr "" + +msgid "" +"Requesting zero elements or elements of size zero bytes returns a distinct " +"non-``NULL`` pointer if possible, as if ``PyMem_RawCalloc(1, 1)`` had been " +"called instead." +msgstr "" + +msgid "" +"Resizes the memory block pointed to by *p* to *n* bytes. The contents will " +"be unchanged to the minimum of the old and the new sizes." +msgstr "" + +msgid "" +"If *p* is ``NULL``, the call is equivalent to ``PyMem_RawMalloc(n)``; else " +"if *n* is equal to zero, the memory block is resized but is not freed, and " +"the returned pointer is non-``NULL``." +msgstr "" + +msgid "" +"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" +"func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:func:" +"`PyMem_RawCalloc`." +msgstr "" + +msgid "" +"If the request fails, :c:func:`PyMem_RawRealloc` returns ``NULL`` and *p* " +"remains a valid pointer to the previous memory area." +msgstr "" + +msgid "" +"Frees the memory block pointed to by *p*, which must have been returned by a " +"previous call to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:" +"func:`PyMem_RawCalloc`. Otherwise, or if ``PyMem_RawFree(p)`` has been " +"called before, undefined behavior occurs." +msgstr "" + +msgid "If *p* is ``NULL``, no operation is performed." +msgstr "" + +msgid "Memory Interface" +msgstr "" + +msgid "" +"The following function sets, modeled after the ANSI C standard, but " +"specifying behavior when requesting zero bytes, are available for allocating " +"and releasing memory from the Python heap." +msgstr "" + +msgid "" +"The :ref:`default memory allocator ` uses the :" +"ref:`pymalloc memory allocator `." +msgstr "" + +msgid "" +"There must be an :term:`attached thread state` when using these functions." +msgstr "" + +msgid "" +"The default allocator is now pymalloc instead of system :c:func:`malloc`." +msgstr "" + +msgid "" +"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " +"as if ``PyMem_Malloc(1)`` had been called instead. The memory will not have " +"been initialized in any way." +msgstr "" + +msgid "" +"Requesting zero elements or elements of size zero bytes returns a distinct " +"non-``NULL`` pointer if possible, as if ``PyMem_Calloc(1, 1)`` had been " +"called instead." +msgstr "" + +msgid "" +"If *p* is ``NULL``, the call is equivalent to ``PyMem_Malloc(n)``; else if " +"*n* is equal to zero, the memory block is resized but is not freed, and the " +"returned pointer is non-``NULL``." +msgstr "" + +msgid "" +"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" +"func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`." +msgstr "" + +msgid "" +"If the request fails, :c:func:`PyMem_Realloc` returns ``NULL`` and *p* " +"remains a valid pointer to the previous memory area." +msgstr "" + +msgid "" +"Frees the memory block pointed to by *p*, which must have been returned by a " +"previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:" +"`PyMem_Calloc`. Otherwise, or if ``PyMem_Free(p)`` has been called before, " +"undefined behavior occurs." +msgstr "" + +msgid "" +"The following type-oriented macros are provided for convenience. Note that " +"*TYPE* refers to any C type." +msgstr "" + +msgid "" +"Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes " +"of memory. Returns a pointer cast to ``TYPE*``. The memory will not have " +"been initialized in any way." +msgstr "" + +msgid "" +"Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * " +"sizeof(TYPE))`` bytes. Returns a pointer cast to ``TYPE*``. On return, *p* " +"will be a pointer to the new memory area, or ``NULL`` in the event of " +"failure." +msgstr "" + +msgid "" +"This is a C preprocessor macro; *p* is always reassigned. Save the original " +"value of *p* to avoid losing memory when handling errors." +msgstr "" + +msgid "Same as :c:func:`PyMem_Free`." +msgstr "" + +msgid "" +"In addition, the following macro sets are provided for calling the Python " +"memory allocator directly, without involving the C API functions listed " +"above. However, note that their use does not preserve binary compatibility " +"across Python versions and is therefore deprecated in extension modules." +msgstr "" + +msgid "``PyMem_MALLOC(size)``" +msgstr "" + +msgid "``PyMem_NEW(type, size)``" +msgstr "" + +msgid "``PyMem_REALLOC(ptr, size)``" +msgstr "" + +msgid "``PyMem_RESIZE(ptr, type, size)``" +msgstr "" + +msgid "``PyMem_FREE(ptr)``" +msgstr "" + +msgid "``PyMem_DEL(ptr)``" +msgstr "``PyMem_DEL(ptr)``" + +msgid "Object allocators" +msgstr "" + +msgid "" +"There is no guarantee that the memory returned by these allocators can be " +"successfully cast to a Python object when intercepting the allocating " +"functions in this domain by the methods described in the :ref:`Customize " +"Memory Allocators ` section." +msgstr "" + +msgid "" +"The :ref:`default object allocator ` uses the :" +"ref:`pymalloc memory allocator `." +msgstr "" + +msgid "" +"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, " +"as if ``PyObject_Malloc(1)`` had been called instead. The memory will not " +"have been initialized in any way." +msgstr "" + +msgid "" +"Requesting zero elements or elements of size zero bytes returns a distinct " +"non-``NULL`` pointer if possible, as if ``PyObject_Calloc(1, 1)`` had been " +"called instead." +msgstr "" + +msgid "" +"If *p* is ``NULL``, the call is equivalent to ``PyObject_Malloc(n)``; else " +"if *n* is equal to zero, the memory block is resized but is not freed, and " +"the returned pointer is non-``NULL``." +msgstr "" + +msgid "" +"Unless *p* is ``NULL``, it must have been returned by a previous call to :c:" +"func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:func:" +"`PyObject_Calloc`." +msgstr "" + +msgid "" +"If the request fails, :c:func:`PyObject_Realloc` returns ``NULL`` and *p* " +"remains a valid pointer to the previous memory area." +msgstr "" + +msgid "" +"Frees the memory block pointed to by *p*, which must have been returned by a " +"previous call to :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc` or :c:" +"func:`PyObject_Calloc`. Otherwise, or if ``PyObject_Free(p)`` has been " +"called before, undefined behavior occurs." +msgstr "" + +msgid "" +"Do not call this directly to free an object's memory; call the type's :c:" +"member:`~PyTypeObject.tp_free` slot instead." +msgstr "" + +msgid "" +"Do not use this for memory allocated by :c:macro:`PyObject_GC_New` or :c:" +"macro:`PyObject_GC_NewVar`; use :c:func:`PyObject_GC_Del` instead." +msgstr "" + +msgid "" +":c:func:`PyObject_GC_Del` is the equivalent of this function for memory " +"allocated by types that support garbage collection." +msgstr "" + +msgid ":c:func:`PyObject_Malloc`" +msgstr "" + +msgid ":c:func:`PyObject_Realloc`" +msgstr "" + +msgid ":c:func:`PyObject_Calloc`" +msgstr "" + +msgid ":c:macro:`PyObject_New`" +msgstr "" + +msgid ":c:macro:`PyObject_NewVar`" +msgstr "" + +msgid ":c:func:`PyType_GenericAlloc`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_free`" +msgstr "" + +msgid "Default Memory Allocators" +msgstr "" + +msgid "Default memory allocators:" +msgstr "" + +msgid "Configuration" +msgstr "" + +msgid "Name" +msgstr "Name" + +msgid "PyMem_RawMalloc" +msgstr "" + +msgid "PyMem_Malloc" +msgstr "" + +msgid "PyObject_Malloc" +msgstr "" + +msgid "Release build" +msgstr "" + +msgid "``\"pymalloc\"``" +msgstr "" + +msgid "``malloc``" +msgstr "" + +msgid "``pymalloc``" +msgstr "" + +msgid "Debug build" +msgstr "" + +msgid "``\"pymalloc_debug\"``" +msgstr "" + +msgid "``malloc`` + debug" +msgstr "" + +msgid "``pymalloc`` + debug" +msgstr "" + +msgid "Release build, without pymalloc" +msgstr "" + +msgid "``\"malloc\"``" +msgstr "" + +msgid "Debug build, without pymalloc" +msgstr "" + +msgid "``\"malloc_debug\"``" +msgstr "" + +msgid "Legend:" +msgstr "" + +msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." +msgstr "" + +msgid "" +"``malloc``: system allocators from the standard C library, C functions: :c:" +"func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`." +msgstr "" + +msgid "``pymalloc``: :ref:`pymalloc memory allocator `." +msgstr "" + +msgid "" +"``mimalloc``: :ref:`mimalloc memory allocator `. The pymalloc " +"allocator will be used if mimalloc support isn't available." +msgstr "" + +msgid "" +"\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." +msgstr "" + +msgid "\"Debug build\": :ref:`Python build in debug mode `." +msgstr "" + +msgid "Customize Memory Allocators" +msgstr "" + +msgid "" +"Structure used to describe a memory block allocator. The structure has the " +"following fields:" +msgstr "" + +msgid "Field" +msgstr "" + +msgid "Meaning" +msgstr "" + +msgid "``void *ctx``" +msgstr "" + +msgid "user context passed as first argument" +msgstr "" + +msgid "``void* malloc(void *ctx, size_t size)``" +msgstr "" + +msgid "allocate a memory block" +msgstr "" + +msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" +msgstr "" + +msgid "allocate a memory block initialized with zeros" +msgstr "" + +msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" +msgstr "" + +msgid "allocate or resize a memory block" +msgstr "" + +msgid "``void free(void *ctx, void *ptr)``" +msgstr "" + +msgid "free a memory block" +msgstr "" + +msgid "" +"The :c:type:`!PyMemAllocator` structure was renamed to :c:type:" +"`PyMemAllocatorEx` and a new ``calloc`` field was added." +msgstr "" + +msgid "Enum used to identify an allocator domain. Domains:" +msgstr "" + +msgid "Functions:" +msgstr "" + +msgid ":c:func:`PyMem_RawMalloc`" +msgstr "" + +msgid ":c:func:`PyMem_RawRealloc`" +msgstr "" + +msgid ":c:func:`PyMem_RawCalloc`" +msgstr "" + +msgid ":c:func:`PyMem_RawFree`" +msgstr "" + +msgid ":c:func:`PyMem_Malloc`," +msgstr "" + +msgid ":c:func:`PyMem_Realloc`" +msgstr "" + +msgid ":c:func:`PyMem_Calloc`" +msgstr "" + +msgid ":c:func:`PyMem_Free`" +msgstr "" + +msgid ":c:func:`PyObject_Free`" +msgstr "" + +msgid "Get the memory block allocator of the specified domain." +msgstr "" + +msgid "Set the memory block allocator of the specified domain." +msgstr "" + +msgid "" +"The new allocator must return a distinct non-``NULL`` pointer when " +"requesting zero bytes." +msgstr "" + +msgid "" +"For the :c:macro:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" +"safe: a :term:`thread state` is not :term:`attached ` " +"when the allocator is called." +msgstr "" + +msgid "" +"For the remaining domains, the allocator must also be thread-safe: the " +"allocator may be called in different interpreters that do not share a :term:" +"`GIL`." +msgstr "" + +msgid "" +"If the new allocator is not a hook (does not call the previous allocator), " +"the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the " +"debug hooks on top on the new allocator." +msgstr "" + +msgid "" +"See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python " +"with PyPreConfig `." +msgstr "" + +msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" +msgstr "" + +msgid "" +"It can be called after :c:func:`Py_PreInitialize` and before :c:func:" +"`Py_InitializeFromConfig` to install a custom memory allocator. There are no " +"restrictions over the installed allocator other than the ones imposed by the " +"domain (for instance, the Raw Domain allows the allocator to be called " +"without an :term:`attached thread state`). See :ref:`the section on " +"allocator domains ` for more information." +msgstr "" + +msgid "" +"If called after Python has finish initializing (after :c:func:" +"`Py_InitializeFromConfig` has been called) the allocator **must** wrap the " +"existing allocator. Substituting the current allocator for some other " +"arbitrary one is **not supported**." +msgstr "" + +msgid "All allocators must be thread-safe." +msgstr "" + +msgid "" +"Setup :ref:`debug hooks in the Python memory allocators ` " +"to detect memory errors." +msgstr "" + +msgid "Debug hooks on the Python memory allocators" +msgstr "" + +msgid "" +"When :ref:`Python is built in debug mode `, the :c:func:" +"`PyMem_SetupDebugHooks` function is called at the :ref:`Python " +"preinitialization ` to setup debug hooks on Python memory " +"allocators to detect memory errors." +msgstr "" + +msgid "" +"The :envvar:`PYTHONMALLOC` environment variable can be used to install debug " +"hooks on a Python compiled in release mode (ex: ``PYTHONMALLOC=debug``)." +msgstr "" + +msgid "" +"The :c:func:`PyMem_SetupDebugHooks` function can be used to set debug hooks " +"after calling :c:func:`PyMem_SetAllocator`." +msgstr "" + +msgid "" +"These debug hooks fill dynamically allocated memory blocks with special, " +"recognizable bit patterns. Newly allocated memory is filled with the byte " +"``0xCD`` (``PYMEM_CLEANBYTE``), freed memory is filled with the byte " +"``0xDD`` (``PYMEM_DEADBYTE``). Memory blocks are surrounded by \"forbidden " +"bytes\" filled with the byte ``0xFD`` (``PYMEM_FORBIDDENBYTE``). Strings of " +"these bytes are unlikely to be valid addresses, floats, or ASCII strings." +msgstr "" + +msgid "Runtime checks:" +msgstr "" + +msgid "" +"Detect API violations. For example, detect if :c:func:`PyObject_Free` is " +"called on a memory block allocated by :c:func:`PyMem_Malloc`." +msgstr "" + +msgid "Detect write before the start of the buffer (buffer underflow)." +msgstr "" + +msgid "Detect write after the end of the buffer (buffer overflow)." +msgstr "" + +msgid "" +"Check that there is an :term:`attached thread state` when allocator " +"functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " +"and :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are " +"called." +msgstr "" + +msgid "" +"On error, the debug hooks use the :mod:`tracemalloc` module to get the " +"traceback where a memory block was allocated. The traceback is only " +"displayed if :mod:`tracemalloc` is tracing Python memory allocations and the " +"memory block was traced." +msgstr "" + +msgid "" +"Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each " +"block of *N* bytes requested. The memory layout is like so, where p " +"represents the address returned by a malloc-like or realloc-like function " +"(``p[i:j]`` means the slice of bytes from ``*(p+i)`` inclusive up to " +"``*(p+j)`` exclusive; note that the treatment of negative indices differs " +"from a Python slice):" +msgstr "" + +msgid "``p[-2*S:-S]``" +msgstr "``p[-2*S:-S]``" + +msgid "" +"Number of bytes originally asked for. This is a size_t, big-endian (easier " +"to read in a memory dump)." +msgstr "" + +msgid "``p[-S]``" +msgstr "``p[-S]``" + +msgid "API identifier (ASCII character):" +msgstr "" + +msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`." +msgstr "" + +msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`." +msgstr "" + +msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." +msgstr "" + +msgid "``p[-S+1:0]``" +msgstr "``p[-S+1:0]``" + +msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." +msgstr "" + +msgid "``p[0:N]``" +msgstr "" + +msgid "" +"The requested memory, filled with copies of PYMEM_CLEANBYTE, used to catch " +"reference to uninitialized memory. When a realloc-like function is called " +"requesting a larger memory block, the new excess bytes are also filled with " +"PYMEM_CLEANBYTE. When a free-like function is called, these are overwritten " +"with PYMEM_DEADBYTE, to catch reference to freed memory. When a realloc- " +"like function is called requesting a smaller memory block, the excess old " +"bytes are also filled with PYMEM_DEADBYTE." +msgstr "" + +msgid "``p[N:N+S]``" +msgstr "" + +msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." +msgstr "" + +msgid "``p[N+S:N+2*S]``" +msgstr "``p[N+S:N+2*S]``" + +msgid "" +"Only used if the ``PYMEM_DEBUG_SERIALNO`` macro is defined (not defined by " +"default)." +msgstr "" + +msgid "" +"A serial number, incremented by 1 on each call to a malloc-like or realloc-" +"like function. Big-endian :c:type:`size_t`. If \"bad memory\" is detected " +"later, the serial number gives an excellent way to set a breakpoint on the " +"next run, to capture the instant at which this block was passed out. The " +"static function bumpserialno() in obmalloc.c is the only place the serial " +"number is incremented, and exists so you can set such a breakpoint easily." +msgstr "" + +msgid "" +"A realloc-like or free-like function first checks that the " +"PYMEM_FORBIDDENBYTE bytes at each end are intact. If they've been altered, " +"diagnostic output is written to stderr, and the program is aborted via " +"Py_FatalError(). The other main failure mode is provoking a memory error " +"when a program reads up one of the special bit patterns and tries to use it " +"as an address. If you get in a debugger then and look at the object, you're " +"likely to see that it's entirely filled with PYMEM_DEADBYTE (meaning freed " +"memory is getting used) or PYMEM_CLEANBYTE (meaning uninitialized memory is " +"getting used)." +msgstr "" + +msgid "" +"The :c:func:`PyMem_SetupDebugHooks` function now also works on Python " +"compiled in release mode. On error, the debug hooks now use :mod:" +"`tracemalloc` to get the traceback where a memory block was allocated. The " +"debug hooks now also check if there is an :term:`attached thread state` when " +"functions of :c:macro:`PYMEM_DOMAIN_OBJ` and :c:macro:`PYMEM_DOMAIN_MEM` " +"domains are called." +msgstr "" + +msgid "" +"Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " +"and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " +"``0xDD`` and ``0xFD`` to use the same values than Windows CRT debug " +"``malloc()`` and ``free()``." +msgstr "" + +msgid "The pymalloc allocator" +msgstr "" + +msgid "" +"Python has a *pymalloc* allocator optimized for small objects (smaller or " +"equal to 512 bytes) with a short lifetime. It uses memory mappings called " +"\"arenas\" with a fixed size of either 256 KiB on 32-bit platforms or 1 MiB " +"on 64-bit platforms. It falls back to :c:func:`PyMem_RawMalloc` and :c:func:" +"`PyMem_RawRealloc` for allocations larger than 512 bytes." +msgstr "" + +msgid "" +"*pymalloc* is the :ref:`default allocator ` of " +"the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:macro:" +"`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." +msgstr "" + +msgid "The arena allocator uses the following functions:" +msgstr "" + +msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows," +msgstr "" + +msgid ":c:func:`!mmap` and :c:func:`!munmap` if available," +msgstr "" + +msgid ":c:func:`malloc` and :c:func:`free` otherwise." +msgstr "" + +msgid "" +"This allocator is disabled if Python is configured with the :option:`--" +"without-pymalloc` option. It can also be disabled at runtime using the :" +"envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``)." +msgstr "" + +msgid "" +"Typically, it makes sense to disable the pymalloc allocator when building " +"Python with AddressSanitizer (:option:`--with-address-sanitizer`) which " +"helps uncover low level bugs within the C code." +msgstr "" + +msgid "Customize pymalloc Arena Allocator" +msgstr "" + +msgid "" +"Structure used to describe an arena allocator. The structure has three " +"fields:" +msgstr "" + +msgid "``void* alloc(void *ctx, size_t size)``" +msgstr "" + +msgid "allocate an arena of size bytes" +msgstr "" + +msgid "``void free(void *ctx, void *ptr, size_t size)``" +msgstr "" + +msgid "free an arena" +msgstr "" + +msgid "Get the arena allocator." +msgstr "" + +msgid "Set the arena allocator." +msgstr "" + +msgid "The mimalloc allocator" +msgstr "" + +msgid "" +"Python supports the mimalloc allocator when the underlying platform support " +"is available. mimalloc \"is a general purpose allocator with excellent " +"performance characteristics. Initially developed by Daan Leijen for the " +"runtime systems of the Koka and Lean languages.\"" +msgstr "" + +msgid "tracemalloc C API" +msgstr "" + +msgid "Track an allocated memory block in the :mod:`tracemalloc` module." +msgstr "" + +msgid "" +"Return ``0`` on success, return ``-1`` on error (failed to allocate memory " +"to store the trace). Return ``-2`` if tracemalloc is disabled." +msgstr "" + +msgid "If memory block is already tracked, update the existing trace." +msgstr "" + +msgid "" +"Untrack an allocated memory block in the :mod:`tracemalloc` module. Do " +"nothing if the block was not tracked." +msgstr "" + +msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." +msgstr "" + +msgid "Examples" +msgstr "" + +msgid "" +"Here is the example from section :ref:`memoryoverview`, rewritten so that " +"the I/O buffer is allocated from the Python heap by using the first function " +"set::" +msgstr "" + +msgid "" +"PyObject *res;\n" +"char *buf = (char *) PyMem_Malloc(BUFSIZ); /* for I/O */\n" +"\n" +"if (buf == NULL)\n" +" return PyErr_NoMemory();\n" +"/* ...Do some I/O operation involving buf... */\n" +"res = PyBytes_FromString(buf);\n" +"PyMem_Free(buf); /* allocated with PyMem_Malloc */\n" +"return res;" +msgstr "" + +msgid "The same code using the type-oriented function set::" +msgstr "" + +msgid "" +"PyObject *res;\n" +"char *buf = PyMem_New(char, BUFSIZ); /* for I/O */\n" +"\n" +"if (buf == NULL)\n" +" return PyErr_NoMemory();\n" +"/* ...Do some I/O operation involving buf... */\n" +"res = PyBytes_FromString(buf);\n" +"PyMem_Free(buf); /* allocated with PyMem_New */\n" +"return res;" +msgstr "" + +msgid "" +"Note that in the two examples above, the buffer is always manipulated via " +"functions belonging to the same set. Indeed, it is required to use the same " +"memory API family for a given memory block, so that the risk of mixing " +"different allocators is reduced to a minimum. The following code sequence " +"contains two errors, one of which is labeled as *fatal* because it mixes two " +"different allocators operating on different heaps. ::" +msgstr "" + +msgid "" +"char *buf1 = PyMem_New(char, BUFSIZ);\n" +"char *buf2 = (char *) malloc(BUFSIZ);\n" +"char *buf3 = (char *) PyMem_Malloc(BUFSIZ);\n" +"...\n" +"PyMem_Del(buf3); /* Wrong -- should be PyMem_Free() */\n" +"free(buf2); /* Right -- allocated via malloc() */\n" +"free(buf1); /* Fatal -- should be PyMem_Free() */" +msgstr "" + +msgid "" +"In addition to the functions aimed at handling raw memory blocks from the " +"Python heap, objects in Python are allocated and released with :c:macro:" +"`PyObject_New`, :c:macro:`PyObject_NewVar` and :c:func:`PyObject_Free`." +msgstr "" + +msgid "" +"These will be explained in the next chapter on defining and implementing new " +"object types in C." +msgstr "" + +msgid "malloc (C function)" +msgstr "" + +msgid "calloc (C function)" +msgstr "" + +msgid "realloc (C function)" +msgstr "" + +msgid "free (C function)" +msgstr "" diff --git a/c-api/memoryview.po b/c-api/memoryview.po index a0c3f4ff..cf5b198c 100644 --- a/c-api/memoryview.po +++ b/c-api/memoryview.po @@ -8,24 +8,33 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/memoryview.rst:9 msgid "MemoryView objects" msgstr "" +#: ../../c-api/memoryview.rst:11 msgid "" "A :class:`memoryview` object exposes the C level :ref:`buffer interface " "` as a Python object which can then be passed around like any " "other object." msgstr "" +#: ../../c-api/memoryview.rst:18 +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python memoryview " +"type. This is the same object as :class:`memoryview` in the Python layer." +msgstr "" + +#: ../../c-api/memoryview.rst:24 msgid "" "Create a memoryview object from an object that provides the buffer " "interface. If *obj* supports writable buffer exports, the memoryview object " @@ -33,23 +42,28 @@ msgid "" "the discretion of the exporter." msgstr "" +#: ../../c-api/memoryview.rst:32 msgid "Flag to request a readonly buffer." msgstr "" +#: ../../c-api/memoryview.rst:37 msgid "Flag to request a writable buffer." msgstr "" +#: ../../c-api/memoryview.rst:42 msgid "" "Create a memoryview object using *mem* as the underlying buffer. *flags* can " "be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`." msgstr "" +#: ../../c-api/memoryview.rst:49 msgid "" "Create a memoryview object wrapping the given buffer structure *view*. For " "simple byte buffers, :c:func:`PyMemoryView_FromMemory` is the preferred " "function." msgstr "" +#: ../../c-api/memoryview.rst:55 msgid "" "Create a memoryview object to a :term:`contiguous` chunk of memory (in " "either 'C' or 'F'ortran *order*) from an object that defines the buffer " @@ -58,22 +72,26 @@ msgid "" "new bytes object." msgstr "" +#: ../../c-api/memoryview.rst:61 msgid "" "*buffertype* can be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`." msgstr "" +#: ../../c-api/memoryview.rst:66 msgid "" "Return true if the object *obj* is a memoryview object. It is not currently " "allowed to create subclasses of :class:`memoryview`. This function always " "succeeds." msgstr "" +#: ../../c-api/memoryview.rst:73 msgid "" "Return a pointer to the memoryview's private copy of the exporter's buffer. " "*mview* **must** be a memoryview instance; this macro doesn't check its " "type, you must do it yourself or you will risk crashes." msgstr "" +#: ../../c-api/memoryview.rst:79 msgid "" "Return either a pointer to the exporting object that the memoryview is based " "on or ``NULL`` if the memoryview has been created by one of the functions :c:" @@ -81,8 +99,10 @@ msgid "" "**must** be a memoryview instance." msgstr "" +#: ../../c-api/memoryview.rst:5 msgid "object" msgstr "" +#: ../../c-api/memoryview.rst:5 msgid "memoryview" msgstr "" diff --git a/c-api/memoryview.po~ b/c-api/memoryview.po~ new file mode 100644 index 00000000..a0c3f4ff --- /dev/null +++ b/c-api/memoryview.po~ @@ -0,0 +1,88 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "MemoryView objects" +msgstr "" + +msgid "" +"A :class:`memoryview` object exposes the C level :ref:`buffer interface " +"` as a Python object which can then be passed around like any " +"other object." +msgstr "" + +msgid "" +"Create a memoryview object from an object that provides the buffer " +"interface. If *obj* supports writable buffer exports, the memoryview object " +"will be read/write, otherwise it may be either read-only or read/write at " +"the discretion of the exporter." +msgstr "" + +msgid "Flag to request a readonly buffer." +msgstr "" + +msgid "Flag to request a writable buffer." +msgstr "" + +msgid "" +"Create a memoryview object using *mem* as the underlying buffer. *flags* can " +"be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`." +msgstr "" + +msgid "" +"Create a memoryview object wrapping the given buffer structure *view*. For " +"simple byte buffers, :c:func:`PyMemoryView_FromMemory` is the preferred " +"function." +msgstr "" + +msgid "" +"Create a memoryview object to a :term:`contiguous` chunk of memory (in " +"either 'C' or 'F'ortran *order*) from an object that defines the buffer " +"interface. If memory is contiguous, the memoryview object points to the " +"original memory. Otherwise, a copy is made and the memoryview points to a " +"new bytes object." +msgstr "" + +msgid "" +"*buffertype* can be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`." +msgstr "" + +msgid "" +"Return true if the object *obj* is a memoryview object. It is not currently " +"allowed to create subclasses of :class:`memoryview`. This function always " +"succeeds." +msgstr "" + +msgid "" +"Return a pointer to the memoryview's private copy of the exporter's buffer. " +"*mview* **must** be a memoryview instance; this macro doesn't check its " +"type, you must do it yourself or you will risk crashes." +msgstr "" + +msgid "" +"Return either a pointer to the exporting object that the memoryview is based " +"on or ``NULL`` if the memoryview has been created by one of the functions :c:" +"func:`PyMemoryView_FromMemory` or :c:func:`PyMemoryView_FromBuffer`. *mview* " +"**must** be a memoryview instance." +msgstr "" + +msgid "object" +msgstr "" + +msgid "memoryview" +msgstr "" diff --git a/c-api/method.po b/c-api/method.po index b0c344d7..5611bbfb 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -8,95 +8,115 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/method.rst:6 msgid "Instance Method Objects" msgstr "" +#: ../../c-api/method.rst:10 msgid "" "An instance method is a wrapper for a :c:type:`PyCFunction` and the new way " "to bind a :c:type:`PyCFunction` to a class object. It replaces the former " "call ``PyMethod_New(func, NULL, class)``." msgstr "" +#: ../../c-api/method.rst:17 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python instance " "method type. It is not exposed to Python programs." msgstr "" +#: ../../c-api/method.rst:23 msgid "" "Return true if *o* is an instance method object (has type :c:data:" "`PyInstanceMethod_Type`). The parameter must not be ``NULL``. This function " "always succeeds." msgstr "" +#: ../../c-api/method.rst:30 msgid "" "Return a new instance method object, with *func* being any callable object. " "*func* is the function that will be called when the instance method is " "called." msgstr "" +#: ../../c-api/method.rst:37 msgid "Return the function object associated with the instance method *im*." msgstr "" +#: ../../c-api/method.rst:42 msgid "" "Macro version of :c:func:`PyInstanceMethod_Function` which avoids error " "checking." msgstr "" +#: ../../c-api/method.rst:48 msgid "Method Objects" msgstr "" +#: ../../c-api/method.rst:52 msgid "" "Methods are bound function objects. Methods are always bound to an instance " "of a user-defined class. Unbound methods (methods bound to a class object) " "are no longer available." msgstr "" +#: ../../c-api/method.rst:61 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python method type. " "This is exposed to Python programs as ``types.MethodType``." msgstr "" +#: ../../c-api/method.rst:67 msgid "" "Return true if *o* is a method object (has type :c:data:`PyMethod_Type`). " "The parameter must not be ``NULL``. This function always succeeds." msgstr "" +#: ../../c-api/method.rst:73 msgid "" "Return a new method object, with *func* being any callable object and *self* " "the instance the method should be bound. *func* is the function that will be " "called when the method is called. *self* must not be ``NULL``." msgstr "" +#: ../../c-api/method.rst:80 msgid "Return the function object associated with the method *meth*." msgstr "" +#: ../../c-api/method.rst:85 msgid "" "Macro version of :c:func:`PyMethod_Function` which avoids error checking." msgstr "" +#: ../../c-api/method.rst:90 msgid "Return the instance associated with the method *meth*." msgstr "" +#: ../../c-api/method.rst:95 msgid "Macro version of :c:func:`PyMethod_Self` which avoids error checking." msgstr "" +#: ../../c-api/method.rst:8 ../../c-api/method.rst:50 msgid "object" msgstr "" +#: ../../c-api/method.rst:8 msgid "instancemethod" msgstr "" +#: ../../c-api/method.rst:50 msgid "method" msgstr "" +#: ../../c-api/method.rst:59 msgid "MethodType (in module types)" msgstr "" diff --git a/c-api/method.po~ b/c-api/method.po~ new file mode 100644 index 00000000..b0c344d7 --- /dev/null +++ b/c-api/method.po~ @@ -0,0 +1,102 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Instance Method Objects" +msgstr "" + +msgid "" +"An instance method is a wrapper for a :c:type:`PyCFunction` and the new way " +"to bind a :c:type:`PyCFunction` to a class object. It replaces the former " +"call ``PyMethod_New(func, NULL, class)``." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python instance " +"method type. It is not exposed to Python programs." +msgstr "" + +msgid "" +"Return true if *o* is an instance method object (has type :c:data:" +"`PyInstanceMethod_Type`). The parameter must not be ``NULL``. This function " +"always succeeds." +msgstr "" + +msgid "" +"Return a new instance method object, with *func* being any callable object. " +"*func* is the function that will be called when the instance method is " +"called." +msgstr "" + +msgid "Return the function object associated with the instance method *im*." +msgstr "" + +msgid "" +"Macro version of :c:func:`PyInstanceMethod_Function` which avoids error " +"checking." +msgstr "" + +msgid "Method Objects" +msgstr "" + +msgid "" +"Methods are bound function objects. Methods are always bound to an instance " +"of a user-defined class. Unbound methods (methods bound to a class object) " +"are no longer available." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python method type. " +"This is exposed to Python programs as ``types.MethodType``." +msgstr "" + +msgid "" +"Return true if *o* is a method object (has type :c:data:`PyMethod_Type`). " +"The parameter must not be ``NULL``. This function always succeeds." +msgstr "" + +msgid "" +"Return a new method object, with *func* being any callable object and *self* " +"the instance the method should be bound. *func* is the function that will be " +"called when the method is called. *self* must not be ``NULL``." +msgstr "" + +msgid "Return the function object associated with the method *meth*." +msgstr "" + +msgid "" +"Macro version of :c:func:`PyMethod_Function` which avoids error checking." +msgstr "" + +msgid "Return the instance associated with the method *meth*." +msgstr "" + +msgid "Macro version of :c:func:`PyMethod_Self` which avoids error checking." +msgstr "" + +msgid "object" +msgstr "" + +msgid "instancemethod" +msgstr "" + +msgid "method" +msgstr "" + +msgid "MethodType (in module types)" +msgstr "" diff --git a/c-api/module.po b/c-api/module.po index d96341cf..3980f24b 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -8,33 +8,38 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/module.rst:6 msgid "Module Objects" msgstr "" +#: ../../c-api/module.rst:14 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python module type. " -"This is exposed to Python programs as ``types.ModuleType``." +"This is exposed to Python programs as :py:class:`types.ModuleType`." msgstr "" +#: ../../c-api/module.rst:20 msgid "" "Return true if *p* is a module object, or a subtype of a module object. This " "function always succeeds." msgstr "" +#: ../../c-api/module.rst:26 msgid "" "Return true if *p* is a module object, but not a subtype of :c:data:" "`PyModule_Type`. This function always succeeds." msgstr "" +#: ../../c-api/module.rst:39 msgid "" "Return a new module object with :attr:`module.__name__` set to *name*. The " "module's :attr:`!__name__`, :attr:`~module.__doc__`, :attr:`~module." @@ -43,19 +48,24 @@ msgid "" "setting a :attr:`~module.__file__` attribute." msgstr "" +#: ../../c-api/module.rst:45 ../../c-api/module.rst:836 +#: ../../c-api/module.rst:867 msgid "Return ``NULL`` with an exception set on error." msgstr "" +#: ../../c-api/module.rst:49 msgid "" ":attr:`~module.__package__` and :attr:`~module.__loader__` are now set to " "``None``." msgstr "" +#: ../../c-api/module.rst:56 msgid "" "Similar to :c:func:`PyModule_NewObject`, but the name is a UTF-8 encoded " "string instead of a Unicode object." msgstr "" +#: ../../c-api/module.rst:64 msgid "" "Return the dictionary object that implements *module*'s namespace; this " "object is the same as the :attr:`~object.__dict__` attribute of the module " @@ -63,40 +73,53 @@ msgid "" "object), :exc:`SystemError` is raised and ``NULL`` is returned." msgstr "" +#: ../../c-api/module.rst:69 msgid "" "It is recommended extensions use other ``PyModule_*`` and ``PyObject_*`` " "functions rather than directly manipulate a module's :attr:`~object." "__dict__`." msgstr "" +#: ../../c-api/module.rst:73 +msgid "" +"The returned reference is borrowed from the module; it is valid until the " +"module is destroyed." +msgstr "" + +#: ../../c-api/module.rst:83 msgid "" "Return *module*'s :attr:`~module.__name__` value. If the module does not " "provide one, or if it is not a string, :exc:`SystemError` is raised and " "``NULL`` is returned." msgstr "" +#: ../../c-api/module.rst:92 msgid "" "Similar to :c:func:`PyModule_GetNameObject` but return the name encoded to " "``'utf-8'``." msgstr "" +#: ../../c-api/module.rst:95 msgid "" -"Return the \"state\" of the module, that is, a pointer to the block of " -"memory allocated at module creation time, or ``NULL``. See :c:member:" -"`PyModuleDef.m_size`." +"The returned buffer is only valid until the module is renamed or destroyed. " +"Note that Python code may rename a module by setting its :py:attr:`~module." +"__name__` attribute." msgstr "" +#: ../../c-api/module.rst:101 msgid "" "Return a pointer to the :c:type:`PyModuleDef` struct from which the module " "was created, or ``NULL`` if the module wasn't created from a definition." msgstr "" +#: ../../c-api/module.rst:104 msgid "" "On error, return ``NULL`` with an exception set. Use :c:func:" -"`PyErr_Occurred` to tell this case apart from a mising :c:type:`!" +"`PyErr_Occurred` to tell this case apart from a missing :c:type:`!" "PyModuleDef`." msgstr "" +#: ../../c-api/module.rst:115 msgid "" "Return the name of the file from which *module* was loaded using *module*'s :" "attr:`~module.__file__` attribute. If this is not defined, or if it is not " @@ -104,175 +127,252 @@ msgid "" "reference to a Unicode object." msgstr "" +#: ../../c-api/module.rst:125 msgid "" "Similar to :c:func:`PyModule_GetFilenameObject` but return the filename " "encoded to 'utf-8'." msgstr "" +#: ../../c-api/module.rst:128 +msgid "" +"The returned buffer is only valid until the module's :py:attr:`~module." +"__file__` attribute is reassigned or the module is destroyed." +msgstr "" + +#: ../../c-api/module.rst:131 msgid "" ":c:func:`PyModule_GetFilename` raises :exc:`UnicodeEncodeError` on " "unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead." msgstr "" -msgid "Module definitions" +#: ../../c-api/module.rst:140 +msgid "Module definition" msgstr "" +#: ../../c-api/module.rst:142 msgid "" -"The functions in the previous section work on any module object, including " -"modules imported from Python code." +"Modules created using the C API are typically defined using an array of :c:" +"type:`PySlot` structs, which provides a \"description\" of how a module " +"should be created. See :ref:`capi-slots` for more information on slots in " +"general." msgstr "" +#: ../../c-api/module.rst:149 msgid "" -"Modules defined using the C API typically use a *module definition*, :c:type:" -"`PyModuleDef` -- a statically allocated, constant “description\" of how a " -"module should be created." +"Previously, a :c:type:`PyModuleDef` struct was necessary to define modules. " +"The older way of defining modules is still available: consult either the :" +"ref:`pymoduledef` section or earlier versions of this documentation if you " +"plan to support earlier Python versions." msgstr "" +#: ../../c-api/module.rst:154 msgid "" -"The definition is usually used to define an extension's “main” module object " -"(see :ref:`extension-modules` for details). It is also used to :ref:`create " -"extension modules dynamically `." +"The slots array is usually used to define an extension module's “main” " +"module object (see :ref:`extension-modules` for details). It can also be " +"used to :ref:`create extension modules dynamically `." msgstr "" +#: ../../c-api/module.rst:159 msgid "" -"Unlike :c:func:`PyModule_New`, the definition allows management of *module " -"state* -- a piece of memory that is allocated and cleared together with the " -"module object. Unlike the module's Python attributes, Python code cannot " -"replace or delete data stored in module state." +"Unless specified otherwise, the same slot ID may not be repeated in an array " +"of slots." +msgstr "" + +#: ../../c-api/module.rst:164 +msgid "Metadata slots" msgstr "" +#: ../../c-api/module.rst:168 msgid "" -"The module definition struct, which holds all information needed to create a " -"module object. This structure must be statically allocated (or be otherwise " -"guaranteed to be valid while any modules created from it exist). Usually, " -"there is only one variable of this type for each extension module." +":c:member:`Slot ID ` for the name of the new module, as a NUL-" +"terminated UTF8-encoded ``const char *``." msgstr "" -msgid "Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`." +#: ../../c-api/module.rst:171 +msgid "" +"Note that modules are typically created using a :py:class:`~importlib." +"machinery.ModuleSpec`, and when they are, the name from the spec will be " +"used instead of :c:data:`!Py_mod_name`. However, it is still recommended to " +"include this slot for introspection and debugging purposes." msgstr "" -msgid "Name for the new module." +#: ../../c-api/module.rst:179 +msgid "" +"Use :c:member:`PyModuleDef.m_name` instead to support previous versions." msgstr "" +#: ../../c-api/module.rst:183 msgid "" -"Docstring for the module; usually a docstring variable created with :c:macro:" -"`PyDoc_STRVAR` is used." +":c:type:`Slot ID ` for the docstring of the new module, as a " +"NUL-terminated UTF8-encoded ``const char *``." +msgstr "" + +#: ../../c-api/module.rst:186 +msgid "Usually it is set to a variable created with :c:macro:`PyDoc_STRVAR`." +msgstr "" + +#: ../../c-api/module.rst:190 +msgid "Use :c:member:`PyModuleDef.m_doc` instead to support previous versions." msgstr "" +#: ../../c-api/module.rst:194 +msgid "Feature slots" +msgstr "" + +#: ../../c-api/module.rst:198 msgid "" -"Module state may be kept in a per-module memory area that can be retrieved " -"with :c:func:`PyModule_GetState`, rather than in static globals. This makes " -"modules safe for use in multiple sub-interpreters." +":c:member:`Slot ID ` whose value points to a :c:struct:" +"`PyABIInfo` structure describing the ABI that the extension is using." msgstr "" +#: ../../c-api/module.rst:202 msgid "" -"This memory area is allocated based on *m_size* on module creation, and " -"freed when the module object is deallocated, after the :c:member:" -"`~PyModuleDef.m_free` function has been called, if present." +"A suitable :c:struct:`!PyABIInfo` variable can be defined using the :c:macro:" +"`PyABIInfo_VAR` macro, as in:" msgstr "" +#: ../../c-api/module.rst:205 msgid "" -"Setting it to a non-negative value means that the module can be re-" -"initialized and specifies the additional amount of memory it requires for " -"its state." +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PySlot mymodule_slots[] = {\n" +" PySlot_DATA(Py_mod_abi, &abi_info),\n" +" ...\n" +"};" msgstr "" +#: ../../c-api/module.rst:214 msgid "" -"Setting ``m_size`` to ``-1`` means that the module does not support sub-" -"interpreters, because it has global state. Negative ``m_size`` is only " -"allowed when using :ref:`legacy single-phase initialization ` or when :ref:`creating modules dynamically `." +"When creating a module, Python checks the value of this slot using :c:func:" +"`PyABIInfo_Check`." msgstr "" -msgid "See :PEP:`3121` for more details." +#: ../../c-api/module.rst:217 +msgid "" +"This slot is required, except for modules created from :c:struct:" +"`PyModuleDef`." +msgstr "" + +#: ../../c-api/module.rst:224 ../../c-api/module.rst:263 +msgid ":c:member:`Slot ID ` whose value is one of:" +msgstr "" + +#: ../../c-api/module.rst:230 +msgid "The module does not support being imported in subinterpreters." msgstr "" +#: ../../c-api/module.rst:234 msgid "" -"A pointer to a table of module-level functions, described by :c:type:" -"`PyMethodDef` values. Can be ``NULL`` if no functions are present." +"The module supports being imported in subinterpreters, but only when they " +"share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)" msgstr "" +#: ../../c-api/module.rst:240 msgid "" -"An array of slot definitions for multi-phase initialization, terminated by a " -"``{0, NULL}`` entry. When using legacy single-phase initialization, " -"*m_slots* must be ``NULL``." +"The module supports being imported in subinterpreters, even when they have " +"their own GIL. (See :ref:`isolating-extensions-howto`.)" msgstr "" +#: ../../c-api/module.rst:244 msgid "" -"Prior to version 3.5, this member was always set to ``NULL``, and was " -"defined as:" +"This slot determines whether or not importing this module in a " +"subinterpreter will fail." msgstr "" +#: ../../c-api/module.rst:247 msgid "" -"A traversal function to call during GC traversal of the module object, or " -"``NULL`` if not needed." +"If ``Py_mod_multiple_interpreters`` is not specified, the import machinery " +"defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED``." msgstr "" +#: ../../c-api/module.rst:250 msgid "" -"This function is not called if the module state was requested but is not " -"allocated yet. This is the case immediately after the module is created and " -"before the module is executed (:c:data:`Py_mod_exec` function). More " -"precisely, this function is not called if :c:member:`~PyModuleDef.m_size` is " -"greater than 0 and the module state (as returned by :c:func:" -"`PyModule_GetState`) is ``NULL``." +"For historical reasons, the values are declared as pointers (``void *``). " +"When using :c:type:`PySlot` arrays, use :c:macro:`PySlot_DATA` for :c:macro:" +"`!Py_mod_multiple_interpreters`:" msgstr "" -msgid "No longer called before the module state is allocated." +#: ../../c-api/module.rst:254 +msgid "" +"PySlot_DATA(Py_mod_multiple_interpreters,\n" +" Py_MOD_PER_INTERPRETER_GIL_SUPPORTED)" msgstr "" +#: ../../c-api/module.rst:269 msgid "" -"A clear function to call during GC clearing of the module object, or " -"``NULL`` if not needed." +"The module depends on the presence of the global interpreter lock (GIL), and " +"may access global state without synchronization." +msgstr "" + +#: ../../c-api/module.rst:274 +msgid "The module is safe to run without an active GIL." msgstr "" +#: ../../c-api/module.rst:276 msgid "" -"Like :c:member:`PyTypeObject.tp_clear`, this function is not *always* called " -"before a module is deallocated. For example, when reference counting is " -"enough to determine that an object is no longer used, the cyclic garbage " -"collector is not involved and :c:member:`~PyModuleDef.m_free` is called " -"directly." +"This slot is ignored by Python builds not configured with :option:`--disable-" +"gil`. Otherwise, it determines whether or not importing this module will " +"cause the GIL to be automatically enabled. See :ref:`whatsnew313-free-" +"threaded-cpython` for more detail." msgstr "" +#: ../../c-api/module.rst:281 msgid "" -"A function to call during deallocation of the module object, or ``NULL`` if " -"not needed." +"If ``Py_mod_gil`` is not specified, the import machinery defaults to " +"``Py_MOD_GIL_USED``." +msgstr "" + +#: ../../c-api/module.rst:284 +msgid "" +"For historical reasons, the values are declared as pointers (``void *``). " +"When using :c:type:`PySlot` arrays, use :c:macro:`PySlot_DATA` for :c:macro:" +"`!Py_mod_gil`:" msgstr "" -msgid "Module slots" +#: ../../c-api/module.rst:288 +msgid "PySlot_DATA(Py_mod_gil, Py_MOD_GIL_NOT_USED)" msgstr "" -msgid "A slot ID, chosen from the available values explained below." +#: ../../c-api/module.rst:296 +msgid "Creation and initialization slots" msgstr "" -msgid "Value of the slot, whose meaning depends on the slot ID." +#: ../../c-api/module.rst:300 +msgid "" +":c:member:`Slot ID ` for a function that creates the module " +"object itself. The function must have the signature:" msgstr "" -msgid "The available slot types are:" +#: ../../c-api/module.rst:308 +msgid "The function will be called with:" msgstr "" +#: ../../c-api/module.rst:310 msgid "" -"Specifies a function that is called to create the module object itself. The " -"*value* pointer of this slot must point to a function of the signature:" +"*spec*: a ``ModuleSpec``-like object, meaning that any attributes defined " +"for :py:class:`importlib.machinery.ModuleSpec` have matching semantics. " +"However, any of the attributes may be missing." msgstr "" +#: ../../c-api/module.rst:313 msgid "" -"The function receives a :py:class:`~importlib.machinery.ModuleSpec` " -"instance, as defined in :PEP:`451`, and the module definition. It should " -"return a new module object, or set an error and return ``NULL``." +"*def*: ``NULL``, or the module definition if the module is created from one." msgstr "" +#: ../../c-api/module.rst:315 msgid "" -"This function should be kept minimal. In particular, it should not call " -"arbitrary Python code, as trying to import the same module again may result " -"in an infinite loop." +"The function should return a new module object, or set an error and return " +"``NULL``." msgstr "" +#: ../../c-api/module.rst:318 msgid "" -"Multiple ``Py_mod_create`` slots may not be specified in one module " -"definition." +"This function should be kept minimal. In particular, it should not call " +"arbitrary Python code, as trying to import the same module again may result " +"in an infinite loop." msgstr "" +#: ../../c-api/module.rst:322 msgid "" "If ``Py_mod_create`` is not specified, the import machinery will create a " "normal module object using :c:func:`PyModule_New`. The name is taken from " @@ -281,92 +381,611 @@ msgid "" "through symlinks, all while sharing a single module definition." msgstr "" +#: ../../c-api/module.rst:328 msgid "" "There is no requirement for the returned object to be an instance of :c:type:" -"`PyModule_Type`. Any type can be used, as long as it supports setting and " -"getting import-related attributes. However, only ``PyModule_Type`` instances " -"may be returned if the ``PyModuleDef`` has non-``NULL`` ``m_traverse``, " -"``m_clear``, ``m_free``; non-zero ``m_size``; or slots other than " -"``Py_mod_create``." +"`PyModule_Type`. However, some slots may only be used with :c:type:`!" +"PyModule_Type` instances; in particular:" msgstr "" +#: ../../c-api/module.rst:333 +msgid ":c:macro:`Py_mod_exec`," +msgstr "" + +#: ../../c-api/module.rst:334 msgid "" -"Specifies a function that is called to *execute* the module. This is " -"equivalent to executing the code of a Python module: typically, this " -"function adds classes and constants to the module. The signature of the " -"function is:" +":ref:`module state slots ` (``Py_mod_state_*``)," msgstr "" +#: ../../c-api/module.rst:335 +msgid ":c:macro:`Py_mod_token`." +msgstr "" + +#: ../../c-api/module.rst:341 msgid "" -"If multiple ``Py_mod_exec`` slots are specified, they are processed in the " -"order they appear in the *m_slots* array." +"The *slots* argument may be a ``ModuleSpec``-like object, rather than a " +"true :py:class:`~importlib.machinery.ModuleSpec` instance. Note that " +"previous versions of CPython did not enforce this." msgstr "" -msgid "Specifies one of the following values:" +#: ../../c-api/module.rst:345 +msgid "" +"The *def* argument may now be ``NULL``, since modules are not necessarily " +"made from definitions." msgstr "" -msgid "The module does not support being imported in subinterpreters." +#: ../../c-api/module.rst:350 +msgid "" +":c:member:`Slot ID ` for a function that will :dfn:`execute`, " +"or initialize, the module. This function does the equivalent to executing " +"the code of a Python module: typically, it adds classes and constants to the " +"module. The signature of the function is:" msgstr "" +#: ../../c-api/module.rst:360 msgid "" -"The module supports being imported in subinterpreters, but only when they " -"share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)" +"See the :ref:`capi-module-support-functions` section for some useful " +"functions to call." msgstr "" +#: ../../c-api/module.rst:363 msgid "" -"The module supports being imported in subinterpreters, even when they have " -"their own GIL. (See :ref:`isolating-extensions-howto`.)" +"For backwards compatibility, the :c:type:`PyModuleDef.m_slots` array may " +"contain multiple :c:macro:`!Py_mod_exec` slots; these are processed in the " +"order they appear in the array. Elsewhere (that is, in arguments to :c:func:" +"`PyModule_FromSlotsAndSpec` and in return values of :samp:" +"`PyModExport_{}`), repeating the slot is not allowed." msgstr "" +#: ../../c-api/module.rst:374 msgid "" -"This slot determines whether or not importing this module in a " -"subinterpreter will fail." +"Repeated ``Py_mod_exec`` slots are disallowed, except in :c:type:" +"`PyModuleDef.m_slots`." msgstr "" +#: ../../c-api/module.rst:379 msgid "" -"Multiple ``Py_mod_multiple_interpreters`` slots may not be specified in one " -"module definition." +":c:member:`Slot ID ` for a table of module-level functions, as " +"an array of :c:type:`PyMethodDef` values suitable as the *functions* " +"argument to :c:func:`PyModule_AddFunctions`." msgstr "" +#: ../../c-api/module.rst:383 msgid "" -"If ``Py_mod_multiple_interpreters`` is not specified, the import machinery " -"defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED``." +"Like other slot IDs, a slots array may only contain one :c:macro:`!" +"Py_mod_methods` entry. To add functions from multiple :c:type:`PyMethodDef` " +"arrays, call :c:func:`PyModule_AddFunctions` in the :c:macro:`Py_mod_exec` " +"function." msgstr "" +#: ../../c-api/module.rst:388 msgid "" -"The module depends on the presence of the global interpreter lock (GIL), and " -"may access global state without synchronization." +"The table must be statically allocated (or otherwise guaranteed to outlive " +"the module object)." msgstr "" -msgid "The module is safe to run without an active GIL." +#: ../../c-api/module.rst:393 +msgid "" +"Use :c:member:`PyModuleDef.m_methods` instead to support previous versions." +msgstr "" + +#: ../../c-api/module.rst:398 +msgid "Module state" msgstr "" +#: ../../c-api/module.rst:400 msgid "" -"This slot is ignored by Python builds not configured with :option:`--disable-" -"gil`. Otherwise, it determines whether or not importing this module will " -"cause the GIL to be automatically enabled. See :ref:`whatsnew313-free-" -"threaded-cpython` for more detail." +"Extension modules can have *module state* -- a piece of memory that is " +"allocated on module creation, and freed when the module object is " +"deallocated. The module state is specified using :ref:`dedicated slots `." msgstr "" +#: ../../c-api/module.rst:405 msgid "" -"Multiple ``Py_mod_gil`` slots may not be specified in one module definition." +"A typical use of module state is storing an exception type -- or indeed " +"*any* type object defined by the module --" msgstr "" +#: ../../c-api/module.rst:408 msgid "" -"If ``Py_mod_gil`` is not specified, the import machinery defaults to " -"``Py_MOD_GIL_USED``." +"Unlike the module's Python attributes, Python code cannot replace or delete " +"data stored in module state." +msgstr "" + +#: ../../c-api/module.rst:411 +msgid "" +"Keeping per-module information in attributes and module state, rather than " +"in static globals, makes module objects *isolated* and safer for use in " +"multiple sub-interpreters. It also helps Python do an orderly clean-up when " +"it shuts down." +msgstr "" + +#: ../../c-api/module.rst:416 +msgid "" +"Extensions that keep references to Python objects as part of module state " +"must implement :c:macro:`Py_mod_state_traverse` and :c:macro:" +"`Py_mod_state_clear` functions to avoid reference leaks." +msgstr "" + +#: ../../c-api/module.rst:420 +msgid "To retrieve the state from a given module, use the following functions:" +msgstr "" + +#: ../../c-api/module.rst:424 +msgid "" +"Return the \"state\" of the module, that is, a pointer to the block of " +"memory allocated at module creation time, or ``NULL``. See :c:macro:" +"`Py_mod_state_size`." +msgstr "" + +#: ../../c-api/module.rst:428 +msgid "" +"On error, return ``NULL`` with an exception set. Use :c:func:" +"`PyErr_Occurred` to tell this case apart from missing module state." +msgstr "" + +#: ../../c-api/module.rst:435 +msgid "" +"Set *\\*result* to the size of *module*'s state, as specified using :c:macro:" +"`Py_mod_state_size` (or :c:member:`PyModuleDef.m_size`), and return 0." +msgstr "" + +#: ../../c-api/module.rst:439 +msgid "On error, set *\\*result* to -1, and return -1 with an exception set." +msgstr "" + +#: ../../c-api/module.rst:448 +msgid "Slots for defining module state" +msgstr "" + +#: ../../c-api/module.rst:450 +msgid "" +"The following :c:member:`slot IDs ` are available for " +"defining the module state." +msgstr "" + +#: ../../c-api/module.rst:455 +msgid "" +":c:member:`Slot ID ` for the size of the module state, in " +"bytes." +msgstr "" + +#: ../../c-api/module.rst:458 +msgid "" +"Setting the value to a non-negative value means that the module can be re-" +"initialized and specifies the additional amount of memory it requires for " +"its state." +msgstr "" + +#: ../../c-api/module.rst:462 +msgid "See :PEP:`3121` for more details." +msgstr "" + +#: ../../c-api/module.rst:464 +msgid "" +"Use :c:func:`PyModule_GetStateSize` to retrieve the size of a given module." +msgstr "" + +#: ../../c-api/module.rst:468 +msgid "" +"Use :c:member:`PyModuleDef.m_size` instead to support previous versions." +msgstr "" + +#: ../../c-api/module.rst:472 +msgid "" +":c:member:`Slot ID ` for a traversal function to call during " +"GC traversal of the module object." +msgstr "" + +#: ../../c-api/module.rst:475 +msgid "" +"The signature of the function, and meanings of the arguments, is similar as " +"for :c:member:`PyTypeObject.tp_traverse`:" +msgstr "" + +#: ../../c-api/module.rst:482 ../../c-api/module.rst:504 +#: ../../c-api/module.rst:532 +msgid "" +"This function is not called if the module state was requested but is not " +"allocated yet. This is the case immediately after the module is created and " +"before the module is executed (:c:data:`Py_mod_exec` function). More " +"precisely, this function is not called if the state size (:c:data:" +"`Py_mod_state_size`) is greater than 0 and the module state (as returned by :" +"c:func:`PyModule_GetState`) is ``NULL``." +msgstr "" + +#: ../../c-api/module.rst:491 +msgid "" +"Use :c:member:`PyModuleDef.m_traverse` instead to support previous versions." +msgstr "" + +#: ../../c-api/module.rst:495 +msgid "" +":c:member:`Slot ID ` for a clear function to call during GC " +"clearing of the module object." +msgstr "" + +#: ../../c-api/module.rst:498 ../../c-api/module.rst:526 +msgid "The signature of the function is:" +msgstr "" + +#: ../../c-api/module.rst:511 +msgid "" +"Like :c:member:`PyTypeObject.tp_clear`, this function is not *always* called " +"before a module is deallocated. For example, when reference counting is " +"enough to determine that an object is no longer used, the cyclic garbage " +"collector is not involved and the :c:macro:`Py_mod_state_free` function is " +"called directly." +msgstr "" + +#: ../../c-api/module.rst:519 +msgid "" +"Use :c:member:`PyModuleDef.m_clear` instead to support previous versions." +msgstr "" + +#: ../../c-api/module.rst:523 +msgid "" +":c:member:`Slot ID ` for a function to call during " +"deallocation of the module object." +msgstr "" + +#: ../../c-api/module.rst:541 +msgid "" +"Use :c:member:`PyModuleDef.m_free` instead to support previous versions." +msgstr "" + +#: ../../c-api/module.rst:547 +msgid "Module token" +msgstr "" + +#: ../../c-api/module.rst:549 +msgid "" +"Each module may have an associated *token*: a pointer-sized value intended " +"to identify of the module state's memory layout. This means that if you have " +"a module object, but you are not sure if it “belongs” to your extension, you " +"can check using code like this:" +msgstr "" + +#: ../../c-api/module.rst:554 +msgid "" +"PyObject *module = \n" +"\n" +"void *module_token;\n" +"if (PyModule_GetToken(module, &module_token) < 0) {\n" +" return NULL;\n" +"}\n" +"if (module_token != your_token) {\n" +" PyErr_SetString(PyExc_ValueError, \"unexpected module\")\n" +" return NULL;\n" +"}\n" +"\n" +"// This module's state has the expected memory layout; it's safe to cast\n" +"struct my_state state = (struct my_state*)PyModule_GetState(module)" +msgstr "" + +#: ../../c-api/module.rst:570 +msgid "" +"A module's token -- and the *your_token* value to use in the above code -- " +"is:" +msgstr "" + +#: ../../c-api/module.rst:572 +msgid "" +"For modules created with :c:type:`PyModuleDef`: the address of that :c:type:" +"`PyModuleDef`;" +msgstr "" + +#: ../../c-api/module.rst:574 +msgid "" +"For modules defined with the :c:macro:`Py_mod_token` slot: the value of that " +"slot;" +msgstr "" + +#: ../../c-api/module.rst:576 +msgid "" +"For modules created from an ``PyModExport_*`` :ref:`export hook `: the slots array that the export hook returned (unless " +"overridden with :c:macro:`Py_mod_token`)." +msgstr "" + +#: ../../c-api/module.rst:582 +msgid ":c:member:`Slot ID ` for the module token." +msgstr "" + +#: ../../c-api/module.rst:584 +msgid "" +"If you use this slot to set the module token (rather than rely on the " +"default), you must ensure that:" +msgstr "" + +#: ../../c-api/module.rst:587 +msgid "" +"The pointer outlives the class, so it's not reused for something else while " +"the class exists." +msgstr "" + +#: ../../c-api/module.rst:589 +msgid "" +"It \"belongs\" to the extension module where the class lives, so it will not " +"clash with other extensions." +msgstr "" + +#: ../../c-api/module.rst:591 +msgid "" +"If the token points to a :c:type:`PyModuleDef` struct, the module should " +"behave as if it was created from that :c:type:`PyModuleDef`. In particular, " +"the module state must have matching layout and semantics." +msgstr "" + +#: ../../c-api/module.rst:595 +msgid "" +"Modules created from :c:type:`PyModuleDef` always use the address of the :c:" +"type:`PyModuleDef` as the token. This means that :c:macro:`!Py_mod_token` " +"cannot be used in :c:member:`PyModuleDef.m_slots`." +msgstr "" + +#: ../../c-api/module.rst:604 +msgid "Set *\\*result* to the module token for *module* and return 0." msgstr "" +#: ../../c-api/module.rst:606 +msgid "On error, set *\\*result* to NULL, and return -1 with an exception set." +msgstr "" + +#: ../../c-api/module.rst:610 +msgid "See also :c:func:`PyType_GetModuleByToken`." +msgstr "" + +#: ../../c-api/module.rst:616 msgid "Creating extension modules dynamically" msgstr "" +#: ../../c-api/module.rst:618 +msgid "" +"The following functions may be used to create an extension module " +"dynamically, rather than from an extension's :ref:`export hook `." +msgstr "" + +#: ../../c-api/module.rst:623 +msgid "" +"Create a new module object, given an array of :ref:`slots " +"` and the :py:class:`~importlib.machinery.ModuleSpec` " +"*spec*." +msgstr "" + +#: ../../c-api/module.rst:626 +msgid "" +"The *slots* argument must point to an array of :c:type:`PySlot` structures, " +"terminated by an entry with slot ID of 0 (typically written as :c:macro:" +"`PySlot_END`). The array must include a :c:data:`Py_mod_abi` entry." +msgstr "" + +#: ../../c-api/module.rst:631 +msgid "" +"The *spec* argument may be any ``ModuleSpec``-like object, as described in :" +"c:macro:`Py_mod_create` documentation. Currently, the *spec* must have a " +"``name`` attribute." +msgstr "" + +#: ../../c-api/module.rst:635 +msgid "" +"On success, return the new module. On error, return ``NULL`` with an " +"exception set." +msgstr "" + +#: ../../c-api/module.rst:638 +msgid "" +"Note that this does not process the module's execution slot (:c:data:" +"`Py_mod_exec`). Both :c:func:`!PyModule_FromSlotsAndSpec` and :c:func:" +"`PyModule_Exec` must be called to fully initialize a module. (See also :ref:" +"`multi-phase-initialization`.)" +msgstr "" + +#: ../../c-api/module.rst:648 +msgid "Execute the :c:data:`Py_mod_exec` slot(s) of *module*." +msgstr "" + +#: ../../c-api/module.rst:650 +msgid "On success, return 0. On error, return -1 with an exception set." +msgstr "" + +#: ../../c-api/module.rst:653 +msgid "" +"For clarity: If *module* has no slots, for example if it uses :ref:`legacy " +"single-phase initialization `, this function " +"does nothing and returns 0." +msgstr "" + +#: ../../c-api/module.rst:664 +msgid "Module definition struct" +msgstr "" + +#: ../../c-api/module.rst:666 +msgid "" +"Traditionally, extension modules were defined using a *module definition* as " +"the “description\" of how a module should be created. Rather than using an " +"array of :ref:`slots ` directly, the definition has " +"dedicated members for most common functionality, and allows additional slots " +"as an extension mechanism." +msgstr "" + +#: ../../c-api/module.rst:672 +msgid "" +"This way of defining modules is still available and there are no plans to " +"remove it." +msgstr "" + +#: ../../c-api/module.rst:677 +msgid "" +"The module definition struct, which holds information needed to create a " +"module object." +msgstr "" + +#: ../../c-api/module.rst:680 +msgid "" +"This structure must be statically allocated (or be otherwise guaranteed to " +"be valid while any modules created from it exist). Usually, there is only " +"one variable of this type for each extension module defined this way." +msgstr "" + +#: ../../c-api/module.rst:685 +msgid "" +"The struct, including all members, is part of the :ref:`Stable ABI ` for non-free-threaded builds (``abi3``). In the Stable ABI for free-" +"threaded builds (``abi3t``), this struct is opaque, and unusable in " +"practice; see :ref:`pymoduledef_slot` for a replacement." +msgstr "" + +#: ../../c-api/module.rst:693 +msgid "Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`:" +msgstr "" + +#: ../../c-api/module.rst:699 +msgid "The type of :c:member:`!PyModuleDef.m_base`." +msgstr "" + +#: ../../c-api/module.rst:701 +msgid "" +"The struct is part of the :ref:`Stable ABI ` for non-free-" +"threaded builds (``abi3``). In the Stable ABI for Free-Threaded Builds " +"(``abi3t``), this struct is opaque, and unusable in practice." +msgstr "" + +#: ../../c-api/module.rst:708 +msgid "The required initial value for :c:member:`!PyModuleDef.m_base`." +msgstr "" + +#: ../../c-api/module.rst:712 +msgid "Corresponds to the :c:macro:`Py_mod_name` slot." +msgstr "" + +#: ../../c-api/module.rst:716 +msgid "" +"These members correspond to the :c:macro:`Py_mod_doc` slot. Setting this to " +"NULL is equivalent to omitting the slot." +msgstr "" + +#: ../../c-api/module.rst:721 +msgid "" +"Corresponds to the :c:macro:`Py_mod_state_size` slot. Setting this to zero " +"is equivalent to omitting the slot." +msgstr "" + +#: ../../c-api/module.rst:724 +msgid "" +"When using :ref:`legacy single-phase initialization ` or when creating modules dynamically using :c:func:" +"`PyModule_Create` or :c:func:`PyModule_Create2`, :c:member:`!m_size` may be " +"set to -1. This indicates that the module does not support sub-interpreters, " +"because it has global state." +msgstr "" + +#: ../../c-api/module.rst:732 +msgid "" +"Corresponds to the :c:macro:`Py_mod_methods` slot. Setting this to NULL is " +"equivalent to omitting the slot." +msgstr "" + +#: ../../c-api/module.rst:737 +msgid "" +"An array of additional slots, terminated by a ``{0, NULL}`` entry. Note that " +"the entries use the older :c:type:`PyModuleDef_Slot` structure, rather than :" +"c:type:`PySlot`." +msgstr "" + +#: ../../c-api/module.rst:741 +msgid "" +"If the array contains slots corresponding to :c:type:`PyModuleDef` members, " +"the values must match. For example, if you use :c:macro:`Py_mod_name` in :c:" +"member:`!m_slots`, :c:member:`PyModuleDef.m_name` must be set to the same " +"pointer (not just an equal string)." +msgstr "" + +#: ../../c-api/module.rst:749 +msgid "" +"Prior to version 3.5, this member was always set to ``NULL``, and was " +"defined as:" +msgstr "" + +#: ../../c-api/module.rst:758 +msgid "Older structure defining additional slots of a module." +msgstr "" + +#: ../../c-api/module.rst:760 +msgid "" +"Note that a :c:type:`!PyModuleDef_Slot` array may be included in a :c:type:`!" +"PySlot` array using :c:macro:`Py_mod_slots`, and vice versa using :c:macro:" +"`Py_slot_subslots`." +msgstr "" + +#: ../../c-api/module.rst:764 msgid "" -"The following functions may be used to create a module outside of an " -"extension's :ref:`initialization function `. They are " -"also used in :ref:`single-phase initialization `." +"Each :c:type:`!PyModuleDef_Slot` structure ``modslot`` is interpreted as the " +"following :c:type:`PySlot` structure::" msgstr "" +#: ../../c-api/module.rst:767 +msgid "" +"(PySlot){\n" +" .sl_id=modslot.slot,\n" +" .sl_flags=PySlot_INTPTR | sub_static,\n" +" .sl_ptr=modslot.value\n" +"}" +msgstr "" + +#: ../../c-api/module.rst:773 +msgid "" +"where ``sub_static`` is ``PySlot_STATIC`` if the slot requires the flag " +"(such as for :c:macro:`Py_mod_methods`), or if this flag is present on the " +"\"parent\" :c:macro:`!Py_mod_slots` slot (if any)." +msgstr "" + +#: ../../c-api/module.rst:779 +msgid "Corresponds to :c:member:`PySlot.sl_id`." +msgstr "" + +#: ../../c-api/module.rst:783 +msgid "Corresponds to :c:member:`PySlot.sl_ptr`." +msgstr "" + +#: ../../c-api/module.rst:791 +msgid "" +"These members correspond to the :c:macro:`Py_mod_state_traverse`, :c:macro:" +"`Py_mod_state_clear`, and :c:macro:`Py_mod_state_free` slots, respectively." +msgstr "" + +#: ../../c-api/module.rst:795 +msgid "" +"Setting these members to NULL is equivalent to omitting the corresponding " +"slots." +msgstr "" + +#: ../../c-api/module.rst:800 +msgid "" +":c:member:`m_traverse`, :c:member:`m_clear` and :c:member:`m_free` functions " +"are no longer called before the module state is allocated." +msgstr "" + +#: ../../c-api/module.rst:806 +msgid "The type of ``PyModuleDef`` objects." +msgstr "" + +#: ../../c-api/module.rst:811 +msgid "" +":c:member:`Slot ID ` that works like :c:macro:" +"`Py_slot_subslots`, except it specifies an array of :c:type:" +"`PyModuleDef_Slot` structures." +msgstr "" + +#: ../../c-api/module.rst:819 +msgid "" +"The following API can be used to create modules from a :c:type:`!" +"PyModuleDef` struct:" +msgstr "" + +#: ../../c-api/module.rst:824 msgid "" "Create a new module object, given the definition in *def*. This is a macro " "that calls :c:func:`PyModule_Create2` with *module_api_version* set to :c:" @@ -374,28 +993,37 @@ msgid "" "the :ref:`limited API `." msgstr "" +#: ../../c-api/module.rst:832 msgid "" "Create a new module object, given the definition in *def*, assuming the API " "version *module_api_version*. If that version does not match the version of " "the running interpreter, a :exc:`RuntimeWarning` is emitted." msgstr "" +#: ../../c-api/module.rst:838 msgid "" "This function does not support slots. The :c:member:`~PyModuleDef.m_slots` " "member of *def* must be ``NULL``." msgstr "" +#: ../../c-api/module.rst:844 msgid "" "Most uses of this function should be using :c:func:`PyModule_Create` " "instead; only use this if you are sure you need it." msgstr "" +#: ../../c-api/module.rst:849 msgid "" "This macro calls :c:func:`PyModule_FromDefAndSpec2` with " "*module_api_version* set to :c:macro:`PYTHON_API_VERSION`, or to :c:macro:" "`PYTHON_ABI_VERSION` if using the :ref:`limited API `." msgstr "" +#: ../../c-api/module.rst:858 ../../c-api/module.rst:882 +msgid "Prefer :c:func:`PyModule_FromSlotsAndSpec` in new code." +msgstr "" + +#: ../../c-api/module.rst:862 msgid "" "Create a new module object, given the definition in *def* and the ModuleSpec " "*spec*, assuming the API version *module_api_version*. If that version does " @@ -403,53 +1031,76 @@ msgid "" "emitted." msgstr "" +#: ../../c-api/module.rst:869 msgid "" "Note that this does not process execution slots (:c:data:`Py_mod_exec`). " "Both ``PyModule_FromDefAndSpec`` and ``PyModule_ExecDef`` must be called to " "fully initialize a module." msgstr "" +#: ../../c-api/module.rst:875 msgid "" "Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` " "instead; only use this if you are sure you need it." msgstr "" +#: ../../c-api/module.rst:886 msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*." msgstr "" -msgid "The C API version. Defined for backwards compatibility." +#: ../../c-api/module.rst:892 +msgid "" +"To run a module's own execution slots, prefer :c:func:`PyModule_Exec`, which " +"works on modules that were not created from a :c:type:`PyModuleDef` " +"structure." msgstr "" +#: ../../c-api/module.rst:899 +msgid "" +"The C API version, as an integer (``1013``) and string (``\"1013\"``), " +"respectively. Defined for backwards compatibility." +msgstr "" + +#: ../../c-api/module.rst:902 ../../c-api/module.rst:910 msgid "" "Currently, this constant is not updated in new Python versions, and is not " "useful for versioning. This may change in the future." msgstr "" -msgid "Defined as ``3`` for backwards compatibility." +#: ../../c-api/module.rst:908 +msgid "" +"Defined as ``3`` and ``\"3\"``, respectively, for backwards compatibility." msgstr "" +#: ../../c-api/module.rst:917 msgid "Support functions" msgstr "" +#: ../../c-api/module.rst:919 msgid "" -"The following functions are provided to help initialize a module state. They " -"are intended for a module's execution slots (:c:data:`Py_mod_exec`), the " +"The following functions are provided to help initialize a module object. " +"They are intended for a module's execution slot (:c:data:`Py_mod_exec`), the " "initialization function for legacy :ref:`single-phase initialization `, or code that creates modules dynamically." msgstr "" +#: ../../c-api/module.rst:926 msgid "" "Add an object to *module* as *name*. This is a convenience function which " "can be used from the module's initialization function." msgstr "" +#: ../../c-api/module.rst:929 msgid "" "On success, return ``0``. On error, raise an exception and return ``-1``." msgstr "" +#: ../../c-api/module.rst:931 ../../c-api/module.rst:982 +#: ../../c-api/module.rst:1009 msgid "Example usage::" msgstr "" +#: ../../c-api/module.rst:933 msgid "" "static int\n" "add_spam(PyObject *module, int value)\n" @@ -464,17 +1115,20 @@ msgid "" " }" msgstr "" +#: ../../c-api/module.rst:945 msgid "" "To be convenient, the function accepts ``NULL`` *value* with an exception " "set. In this case, return ``-1`` and just leave the raised exception " "unchanged." msgstr "" +#: ../../c-api/module.rst:949 msgid "" "The example can also be written without checking explicitly if *obj* is " "``NULL``::" msgstr "" +#: ../../c-api/module.rst:952 msgid "" "static int\n" "add_spam(PyObject *module, int value)\n" @@ -486,11 +1140,13 @@ msgid "" " }" msgstr "" +#: ../../c-api/module.rst:961 msgid "" "Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this " "case, since *obj* can be ``NULL``." msgstr "" +#: ../../c-api/module.rst:964 msgid "" "The number of different *name* strings passed to this function should be " "kept small, usually by only using statically allocated strings as *name*. " @@ -500,40 +1156,47 @@ msgid "" "internally to create a key object." msgstr "" +#: ../../c-api/module.rst:977 msgid "" -"Similar to :c:func:`PyModule_AddObjectRef`, but \"steals\" a reference to " -"*value*. It can be called with a result of function that returns a new " -"reference without bothering to check its result or even saving it to a " -"variable." +"Similar to :c:func:`PyModule_AddObjectRef`, but \":term:`steals `\" a " +"reference to *value* (even on error). It can be called with a result of " +"function that returns a new reference without bothering to check its result " +"or even saving it to a variable." msgstr "" +#: ../../c-api/module.rst:984 msgid "" "if (PyModule_Add(module, \"spam\", PyBytes_FromString(value)) < 0) {\n" " goto error;\n" "}" msgstr "" +#: ../../c-api/module.rst:993 msgid "" -"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to " -"*value* on success (if it returns ``0``)." +"Similar to :c:func:`PyModule_AddObjectRef`, but :term:`steals ` a " +"reference to *value* on success (if it returns ``0``)." msgstr "" +#: ../../c-api/module.rst:996 msgid "" "The new :c:func:`PyModule_Add` or :c:func:`PyModule_AddObjectRef` functions " "are recommended, since it is easy to introduce reference leaks by misusing " "the :c:func:`PyModule_AddObject` function." msgstr "" +#: ../../c-api/module.rst:1003 msgid "" "Unlike other functions that steal references, ``PyModule_AddObject()`` only " "releases the reference to *value* **on success**." msgstr "" +#: ../../c-api/module.rst:1006 msgid "" "This means that its return value must be checked, and calling code must :c:" "func:`Py_XDECREF` *value* manually on error." msgstr "" +#: ../../c-api/module.rst:1011 msgid "" "PyObject *obj = PyBytes_FromString(value);\n" "if (PyModule_AddObject(module, \"spam\", obj) < 0) {\n" @@ -547,20 +1210,20 @@ msgid "" "// Py_XDECREF(obj) is not needed here." msgstr "" -msgid ":c:func:`PyModule_AddObject` is :term:`soft deprecated`." -msgstr "" - +#: ../../c-api/module.rst:1027 msgid "" "Add an integer constant to *module* as *name*. This convenience function " "can be used from the module's initialization function. Return ``-1`` with an " "exception set on error, ``0`` on success." msgstr "" +#: ../../c-api/module.rst:1031 msgid "" "This is a convenience function that calls :c:func:`PyLong_FromLong` and :c:" "func:`PyModule_AddObjectRef`; see their documentation for details." msgstr "" +#: ../../c-api/module.rst:1037 msgid "" "Add a string constant to *module* as *name*. This convenience function can " "be used from the module's initialization function. The string *value* must " @@ -568,12 +1231,14 @@ msgid "" "on success." msgstr "" +#: ../../c-api/module.rst:1042 msgid "" "This is a convenience function that calls :c:func:" "`PyUnicode_InternFromString` and :c:func:`PyModule_AddObjectRef`; see their " "documentation for details." msgstr "" +#: ../../c-api/module.rst:1049 msgid "" "Add an int constant to *module*. The name and the value are taken from " "*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int " @@ -581,9 +1246,11 @@ msgid "" "with an exception set on error, ``0`` on success." msgstr "" +#: ../../c-api/module.rst:1057 msgid "Add a string constant to *module*." msgstr "" +#: ../../c-api/module.rst:1061 msgid "" "Add a type object to *module*. The type object is finalized by calling " "internally :c:func:`PyType_Ready`. The name of the type object is taken from " @@ -591,6 +1258,7 @@ msgid "" "``-1`` with an exception set on error, ``0`` on success." msgstr "" +#: ../../c-api/module.rst:1071 msgid "" "Add the functions from the ``NULL`` terminated *functions* array to " "*module*. Refer to the :c:type:`PyMethodDef` documentation for details on " @@ -599,6 +1267,7 @@ msgid "" "first parameter, making them similar to instance methods on Python classes)." msgstr "" +#: ../../c-api/module.rst:1077 msgid "" "This function is called automatically when creating a module from " "``PyModuleDef`` (such as when using :ref:`multi-phase-initialization`, " @@ -607,6 +1276,13 @@ msgid "" "that case they should call this function directly." msgstr "" +#: ../../c-api/module.rst:1084 +msgid "" +"The *functions* array must be statically allocated (or otherwise guaranteed " +"to outlive the module object)." +msgstr "" + +#: ../../c-api/module.rst:1091 msgid "" "Set the docstring for *module* to *docstring*. This function is called " "automatically when creating a module from ``PyModuleDef`` (such as when " @@ -614,6 +1290,11 @@ msgid "" "``PyModule_FromDefAndSpec``)." msgstr "" +#: ../../c-api/module.rst:1096 +msgid "Return ``0`` on success. Return ``-1`` with an exception set on error." +msgstr "" + +#: ../../c-api/module.rst:1103 msgid "" "Indicate that *module* does or does not support running without the global " "interpreter lock (GIL), using one of the values from :c:macro:`Py_mod_gil`. " @@ -625,9 +1306,11 @@ msgid "" "on error, ``0`` on success." msgstr "" +#: ../../c-api/module.rst:1117 msgid "Module lookup (single-phase initialization)" msgstr "" +#: ../../c-api/module.rst:1119 msgid "" "The legacy :ref:`single-phase initialization ` " "initialization scheme creates singleton modules that can be looked up in the " @@ -635,12 +1318,14 @@ msgid "" "retrieved later with only a reference to the module definition." msgstr "" +#: ../../c-api/module.rst:1124 msgid "" "These functions will not work on modules created using multi-phase " "initialization, since multiple such modules can be created from a single " "definition." msgstr "" +#: ../../c-api/module.rst:1129 msgid "" "Returns the module object that was created from *def* for the current " "interpreter. This method requires that the module object has been attached " @@ -649,15 +1334,18 @@ msgid "" "to the interpreter state yet, it returns ``NULL``." msgstr "" +#: ../../c-api/module.rst:1136 msgid "" "Attaches the module object passed to the function to the interpreter state. " "This allows the module object to be accessible via :c:func:" "`PyState_FindModule`." msgstr "" +#: ../../c-api/module.rst:1139 msgid "Only effective on modules created using single-phase initialization." msgstr "" +#: ../../c-api/module.rst:1141 msgid "" "Python calls ``PyState_AddModule`` automatically after importing a module " "that uses :ref:`single-phase initialization `, " @@ -669,48 +1357,62 @@ msgid "" "state updates)." msgstr "" +#: ../../c-api/module.rst:1150 msgid "" "If a module was attached previously using the same *def*, it is replaced by " "the new *module*." msgstr "" +#: ../../c-api/module.rst:1153 ../../c-api/module.rst:1164 msgid "The caller must have an :term:`attached thread state`." msgstr "" +#: ../../c-api/module.rst:1155 msgid "Return ``-1`` with an exception set on error, ``0`` on success." msgstr "" +#: ../../c-api/module.rst:1161 msgid "" "Removes the module object created from *def* from the interpreter state. " "Return ``-1`` with an exception set on error, ``0`` on success." msgstr "" +#: ../../c-api/module.rst:8 msgid "object" msgstr "" +#: ../../c-api/module.rst:8 msgid "module" msgstr "" +#: ../../c-api/module.rst:12 msgid "ModuleType (in module types)" msgstr "" +#: ../../c-api/module.rst:32 ../../c-api/module.rst:79 msgid "__name__ (module attribute)" msgstr "" +#: ../../c-api/module.rst:32 msgid "__doc__ (module attribute)" msgstr "" +#: ../../c-api/module.rst:32 ../../c-api/module.rst:111 msgid "__file__ (module attribute)" msgstr "" +#: ../../c-api/module.rst:32 msgid "__package__ (module attribute)" msgstr "" +#: ../../c-api/module.rst:32 msgid "__loader__ (module attribute)" msgstr "" +#: ../../c-api/module.rst:62 msgid "__dict__ (module attribute)" msgstr "" +#: ../../c-api/module.rst:79 ../../c-api/module.rst:111 msgid "SystemError (built-in exception)" msgstr "" diff --git a/c-api/module.po~ b/c-api/module.po~ new file mode 100644 index 00000000..d96341cf --- /dev/null +++ b/c-api/module.po~ @@ -0,0 +1,716 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Module Objects" +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python module type. " +"This is exposed to Python programs as ``types.ModuleType``." +msgstr "" + +msgid "" +"Return true if *p* is a module object, or a subtype of a module object. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a module object, but not a subtype of :c:data:" +"`PyModule_Type`. This function always succeeds." +msgstr "" + +msgid "" +"Return a new module object with :attr:`module.__name__` set to *name*. The " +"module's :attr:`!__name__`, :attr:`~module.__doc__`, :attr:`~module." +"__package__` and :attr:`~module.__loader__` attributes are filled in (all " +"but :attr:`!__name__` are set to ``None``). The caller is responsible for " +"setting a :attr:`~module.__file__` attribute." +msgstr "" + +msgid "Return ``NULL`` with an exception set on error." +msgstr "" + +msgid "" +":attr:`~module.__package__` and :attr:`~module.__loader__` are now set to " +"``None``." +msgstr "" + +msgid "" +"Similar to :c:func:`PyModule_NewObject`, but the name is a UTF-8 encoded " +"string instead of a Unicode object." +msgstr "" + +msgid "" +"Return the dictionary object that implements *module*'s namespace; this " +"object is the same as the :attr:`~object.__dict__` attribute of the module " +"object. If *module* is not a module object (or a subtype of a module " +"object), :exc:`SystemError` is raised and ``NULL`` is returned." +msgstr "" + +msgid "" +"It is recommended extensions use other ``PyModule_*`` and ``PyObject_*`` " +"functions rather than directly manipulate a module's :attr:`~object." +"__dict__`." +msgstr "" + +msgid "" +"Return *module*'s :attr:`~module.__name__` value. If the module does not " +"provide one, or if it is not a string, :exc:`SystemError` is raised and " +"``NULL`` is returned." +msgstr "" + +msgid "" +"Similar to :c:func:`PyModule_GetNameObject` but return the name encoded to " +"``'utf-8'``." +msgstr "" + +msgid "" +"Return the \"state\" of the module, that is, a pointer to the block of " +"memory allocated at module creation time, or ``NULL``. See :c:member:" +"`PyModuleDef.m_size`." +msgstr "" + +msgid "" +"Return a pointer to the :c:type:`PyModuleDef` struct from which the module " +"was created, or ``NULL`` if the module wasn't created from a definition." +msgstr "" + +msgid "" +"On error, return ``NULL`` with an exception set. Use :c:func:" +"`PyErr_Occurred` to tell this case apart from a mising :c:type:`!" +"PyModuleDef`." +msgstr "" + +msgid "" +"Return the name of the file from which *module* was loaded using *module*'s :" +"attr:`~module.__file__` attribute. If this is not defined, or if it is not " +"a string, raise :exc:`SystemError` and return ``NULL``; otherwise return a " +"reference to a Unicode object." +msgstr "" + +msgid "" +"Similar to :c:func:`PyModule_GetFilenameObject` but return the filename " +"encoded to 'utf-8'." +msgstr "" + +msgid "" +":c:func:`PyModule_GetFilename` raises :exc:`UnicodeEncodeError` on " +"unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead." +msgstr "" + +msgid "Module definitions" +msgstr "" + +msgid "" +"The functions in the previous section work on any module object, including " +"modules imported from Python code." +msgstr "" + +msgid "" +"Modules defined using the C API typically use a *module definition*, :c:type:" +"`PyModuleDef` -- a statically allocated, constant “description\" of how a " +"module should be created." +msgstr "" + +msgid "" +"The definition is usually used to define an extension's “main” module object " +"(see :ref:`extension-modules` for details). It is also used to :ref:`create " +"extension modules dynamically `." +msgstr "" + +msgid "" +"Unlike :c:func:`PyModule_New`, the definition allows management of *module " +"state* -- a piece of memory that is allocated and cleared together with the " +"module object. Unlike the module's Python attributes, Python code cannot " +"replace or delete data stored in module state." +msgstr "" + +msgid "" +"The module definition struct, which holds all information needed to create a " +"module object. This structure must be statically allocated (or be otherwise " +"guaranteed to be valid while any modules created from it exist). Usually, " +"there is only one variable of this type for each extension module." +msgstr "" + +msgid "Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`." +msgstr "" + +msgid "Name for the new module." +msgstr "" + +msgid "" +"Docstring for the module; usually a docstring variable created with :c:macro:" +"`PyDoc_STRVAR` is used." +msgstr "" + +msgid "" +"Module state may be kept in a per-module memory area that can be retrieved " +"with :c:func:`PyModule_GetState`, rather than in static globals. This makes " +"modules safe for use in multiple sub-interpreters." +msgstr "" + +msgid "" +"This memory area is allocated based on *m_size* on module creation, and " +"freed when the module object is deallocated, after the :c:member:" +"`~PyModuleDef.m_free` function has been called, if present." +msgstr "" + +msgid "" +"Setting it to a non-negative value means that the module can be re-" +"initialized and specifies the additional amount of memory it requires for " +"its state." +msgstr "" + +msgid "" +"Setting ``m_size`` to ``-1`` means that the module does not support sub-" +"interpreters, because it has global state. Negative ``m_size`` is only " +"allowed when using :ref:`legacy single-phase initialization ` or when :ref:`creating modules dynamically `." +msgstr "" + +msgid "See :PEP:`3121` for more details." +msgstr "" + +msgid "" +"A pointer to a table of module-level functions, described by :c:type:" +"`PyMethodDef` values. Can be ``NULL`` if no functions are present." +msgstr "" + +msgid "" +"An array of slot definitions for multi-phase initialization, terminated by a " +"``{0, NULL}`` entry. When using legacy single-phase initialization, " +"*m_slots* must be ``NULL``." +msgstr "" + +msgid "" +"Prior to version 3.5, this member was always set to ``NULL``, and was " +"defined as:" +msgstr "" + +msgid "" +"A traversal function to call during GC traversal of the module object, or " +"``NULL`` if not needed." +msgstr "" + +msgid "" +"This function is not called if the module state was requested but is not " +"allocated yet. This is the case immediately after the module is created and " +"before the module is executed (:c:data:`Py_mod_exec` function). More " +"precisely, this function is not called if :c:member:`~PyModuleDef.m_size` is " +"greater than 0 and the module state (as returned by :c:func:" +"`PyModule_GetState`) is ``NULL``." +msgstr "" + +msgid "No longer called before the module state is allocated." +msgstr "" + +msgid "" +"A clear function to call during GC clearing of the module object, or " +"``NULL`` if not needed." +msgstr "" + +msgid "" +"Like :c:member:`PyTypeObject.tp_clear`, this function is not *always* called " +"before a module is deallocated. For example, when reference counting is " +"enough to determine that an object is no longer used, the cyclic garbage " +"collector is not involved and :c:member:`~PyModuleDef.m_free` is called " +"directly." +msgstr "" + +msgid "" +"A function to call during deallocation of the module object, or ``NULL`` if " +"not needed." +msgstr "" + +msgid "Module slots" +msgstr "" + +msgid "A slot ID, chosen from the available values explained below." +msgstr "" + +msgid "Value of the slot, whose meaning depends on the slot ID." +msgstr "" + +msgid "The available slot types are:" +msgstr "" + +msgid "" +"Specifies a function that is called to create the module object itself. The " +"*value* pointer of this slot must point to a function of the signature:" +msgstr "" + +msgid "" +"The function receives a :py:class:`~importlib.machinery.ModuleSpec` " +"instance, as defined in :PEP:`451`, and the module definition. It should " +"return a new module object, or set an error and return ``NULL``." +msgstr "" + +msgid "" +"This function should be kept minimal. In particular, it should not call " +"arbitrary Python code, as trying to import the same module again may result " +"in an infinite loop." +msgstr "" + +msgid "" +"Multiple ``Py_mod_create`` slots may not be specified in one module " +"definition." +msgstr "" + +msgid "" +"If ``Py_mod_create`` is not specified, the import machinery will create a " +"normal module object using :c:func:`PyModule_New`. The name is taken from " +"*spec*, not the definition, to allow extension modules to dynamically adjust " +"to their place in the module hierarchy and be imported under different names " +"through symlinks, all while sharing a single module definition." +msgstr "" + +msgid "" +"There is no requirement for the returned object to be an instance of :c:type:" +"`PyModule_Type`. Any type can be used, as long as it supports setting and " +"getting import-related attributes. However, only ``PyModule_Type`` instances " +"may be returned if the ``PyModuleDef`` has non-``NULL`` ``m_traverse``, " +"``m_clear``, ``m_free``; non-zero ``m_size``; or slots other than " +"``Py_mod_create``." +msgstr "" + +msgid "" +"Specifies a function that is called to *execute* the module. This is " +"equivalent to executing the code of a Python module: typically, this " +"function adds classes and constants to the module. The signature of the " +"function is:" +msgstr "" + +msgid "" +"If multiple ``Py_mod_exec`` slots are specified, they are processed in the " +"order they appear in the *m_slots* array." +msgstr "" + +msgid "Specifies one of the following values:" +msgstr "" + +msgid "The module does not support being imported in subinterpreters." +msgstr "" + +msgid "" +"The module supports being imported in subinterpreters, but only when they " +"share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)" +msgstr "" + +msgid "" +"The module supports being imported in subinterpreters, even when they have " +"their own GIL. (See :ref:`isolating-extensions-howto`.)" +msgstr "" + +msgid "" +"This slot determines whether or not importing this module in a " +"subinterpreter will fail." +msgstr "" + +msgid "" +"Multiple ``Py_mod_multiple_interpreters`` slots may not be specified in one " +"module definition." +msgstr "" + +msgid "" +"If ``Py_mod_multiple_interpreters`` is not specified, the import machinery " +"defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED``." +msgstr "" + +msgid "" +"The module depends on the presence of the global interpreter lock (GIL), and " +"may access global state without synchronization." +msgstr "" + +msgid "The module is safe to run without an active GIL." +msgstr "" + +msgid "" +"This slot is ignored by Python builds not configured with :option:`--disable-" +"gil`. Otherwise, it determines whether or not importing this module will " +"cause the GIL to be automatically enabled. See :ref:`whatsnew313-free-" +"threaded-cpython` for more detail." +msgstr "" + +msgid "" +"Multiple ``Py_mod_gil`` slots may not be specified in one module definition." +msgstr "" + +msgid "" +"If ``Py_mod_gil`` is not specified, the import machinery defaults to " +"``Py_MOD_GIL_USED``." +msgstr "" + +msgid "Creating extension modules dynamically" +msgstr "" + +msgid "" +"The following functions may be used to create a module outside of an " +"extension's :ref:`initialization function `. They are " +"also used in :ref:`single-phase initialization `." +msgstr "" + +msgid "" +"Create a new module object, given the definition in *def*. This is a macro " +"that calls :c:func:`PyModule_Create2` with *module_api_version* set to :c:" +"macro:`PYTHON_API_VERSION`, or to :c:macro:`PYTHON_ABI_VERSION` if using " +"the :ref:`limited API `." +msgstr "" + +msgid "" +"Create a new module object, given the definition in *def*, assuming the API " +"version *module_api_version*. If that version does not match the version of " +"the running interpreter, a :exc:`RuntimeWarning` is emitted." +msgstr "" + +msgid "" +"This function does not support slots. The :c:member:`~PyModuleDef.m_slots` " +"member of *def* must be ``NULL``." +msgstr "" + +msgid "" +"Most uses of this function should be using :c:func:`PyModule_Create` " +"instead; only use this if you are sure you need it." +msgstr "" + +msgid "" +"This macro calls :c:func:`PyModule_FromDefAndSpec2` with " +"*module_api_version* set to :c:macro:`PYTHON_API_VERSION`, or to :c:macro:" +"`PYTHON_ABI_VERSION` if using the :ref:`limited API `." +msgstr "" + +msgid "" +"Create a new module object, given the definition in *def* and the ModuleSpec " +"*spec*, assuming the API version *module_api_version*. If that version does " +"not match the version of the running interpreter, a :exc:`RuntimeWarning` is " +"emitted." +msgstr "" + +msgid "" +"Note that this does not process execution slots (:c:data:`Py_mod_exec`). " +"Both ``PyModule_FromDefAndSpec`` and ``PyModule_ExecDef`` must be called to " +"fully initialize a module." +msgstr "" + +msgid "" +"Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` " +"instead; only use this if you are sure you need it." +msgstr "" + +msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*." +msgstr "" + +msgid "The C API version. Defined for backwards compatibility." +msgstr "" + +msgid "" +"Currently, this constant is not updated in new Python versions, and is not " +"useful for versioning. This may change in the future." +msgstr "" + +msgid "Defined as ``3`` for backwards compatibility." +msgstr "" + +msgid "Support functions" +msgstr "" + +msgid "" +"The following functions are provided to help initialize a module state. They " +"are intended for a module's execution slots (:c:data:`Py_mod_exec`), the " +"initialization function for legacy :ref:`single-phase initialization `, or code that creates modules dynamically." +msgstr "" + +msgid "" +"Add an object to *module* as *name*. This is a convenience function which " +"can be used from the module's initialization function." +msgstr "" + +msgid "" +"On success, return ``0``. On error, raise an exception and return ``-1``." +msgstr "" + +msgid "Example usage::" +msgstr "" + +msgid "" +"static int\n" +"add_spam(PyObject *module, int value)\n" +"{\n" +" PyObject *obj = PyLong_FromLong(value);\n" +" if (obj == NULL) {\n" +" return -1;\n" +" }\n" +" int res = PyModule_AddObjectRef(module, \"spam\", obj);\n" +" Py_DECREF(obj);\n" +" return res;\n" +" }" +msgstr "" + +msgid "" +"To be convenient, the function accepts ``NULL`` *value* with an exception " +"set. In this case, return ``-1`` and just leave the raised exception " +"unchanged." +msgstr "" + +msgid "" +"The example can also be written without checking explicitly if *obj* is " +"``NULL``::" +msgstr "" + +msgid "" +"static int\n" +"add_spam(PyObject *module, int value)\n" +"{\n" +" PyObject *obj = PyLong_FromLong(value);\n" +" int res = PyModule_AddObjectRef(module, \"spam\", obj);\n" +" Py_XDECREF(obj);\n" +" return res;\n" +" }" +msgstr "" + +msgid "" +"Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this " +"case, since *obj* can be ``NULL``." +msgstr "" + +msgid "" +"The number of different *name* strings passed to this function should be " +"kept small, usually by only using statically allocated strings as *name*. " +"For names that aren't known at compile time, prefer calling :c:func:" +"`PyUnicode_FromString` and :c:func:`PyObject_SetAttr` directly. For more " +"details, see :c:func:`PyUnicode_InternFromString`, which may be used " +"internally to create a key object." +msgstr "" + +msgid "" +"Similar to :c:func:`PyModule_AddObjectRef`, but \"steals\" a reference to " +"*value*. It can be called with a result of function that returns a new " +"reference without bothering to check its result or even saving it to a " +"variable." +msgstr "" + +msgid "" +"if (PyModule_Add(module, \"spam\", PyBytes_FromString(value)) < 0) {\n" +" goto error;\n" +"}" +msgstr "" + +msgid "" +"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to " +"*value* on success (if it returns ``0``)." +msgstr "" + +msgid "" +"The new :c:func:`PyModule_Add` or :c:func:`PyModule_AddObjectRef` functions " +"are recommended, since it is easy to introduce reference leaks by misusing " +"the :c:func:`PyModule_AddObject` function." +msgstr "" + +msgid "" +"Unlike other functions that steal references, ``PyModule_AddObject()`` only " +"releases the reference to *value* **on success**." +msgstr "" + +msgid "" +"This means that its return value must be checked, and calling code must :c:" +"func:`Py_XDECREF` *value* manually on error." +msgstr "" + +msgid "" +"PyObject *obj = PyBytes_FromString(value);\n" +"if (PyModule_AddObject(module, \"spam\", obj) < 0) {\n" +" // If 'obj' is not NULL and PyModule_AddObject() failed,\n" +" // 'obj' strong reference must be deleted with Py_XDECREF().\n" +" // If 'obj' is NULL, Py_XDECREF() does nothing.\n" +" Py_XDECREF(obj);\n" +" goto error;\n" +"}\n" +"// PyModule_AddObject() stole a reference to obj:\n" +"// Py_XDECREF(obj) is not needed here." +msgstr "" + +msgid ":c:func:`PyModule_AddObject` is :term:`soft deprecated`." +msgstr "" + +msgid "" +"Add an integer constant to *module* as *name*. This convenience function " +"can be used from the module's initialization function. Return ``-1`` with an " +"exception set on error, ``0`` on success." +msgstr "" + +msgid "" +"This is a convenience function that calls :c:func:`PyLong_FromLong` and :c:" +"func:`PyModule_AddObjectRef`; see their documentation for details." +msgstr "" + +msgid "" +"Add a string constant to *module* as *name*. This convenience function can " +"be used from the module's initialization function. The string *value* must " +"be ``NULL``-terminated. Return ``-1`` with an exception set on error, ``0`` " +"on success." +msgstr "" + +msgid "" +"This is a convenience function that calls :c:func:" +"`PyUnicode_InternFromString` and :c:func:`PyModule_AddObjectRef`; see their " +"documentation for details." +msgstr "" + +msgid "" +"Add an int constant to *module*. The name and the value are taken from " +"*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int " +"constant *AF_INET* with the value of *AF_INET* to *module*. Return ``-1`` " +"with an exception set on error, ``0`` on success." +msgstr "" + +msgid "Add a string constant to *module*." +msgstr "" + +msgid "" +"Add a type object to *module*. The type object is finalized by calling " +"internally :c:func:`PyType_Ready`. The name of the type object is taken from " +"the last component of :c:member:`~PyTypeObject.tp_name` after dot. Return " +"``-1`` with an exception set on error, ``0`` on success." +msgstr "" + +msgid "" +"Add the functions from the ``NULL`` terminated *functions* array to " +"*module*. Refer to the :c:type:`PyMethodDef` documentation for details on " +"individual entries (due to the lack of a shared module namespace, module " +"level \"functions\" implemented in C typically receive the module as their " +"first parameter, making them similar to instance methods on Python classes)." +msgstr "" + +msgid "" +"This function is called automatically when creating a module from " +"``PyModuleDef`` (such as when using :ref:`multi-phase-initialization`, " +"``PyModule_Create``, or ``PyModule_FromDefAndSpec``). Some module authors " +"may prefer defining functions in multiple :c:type:`PyMethodDef` arrays; in " +"that case they should call this function directly." +msgstr "" + +msgid "" +"Set the docstring for *module* to *docstring*. This function is called " +"automatically when creating a module from ``PyModuleDef`` (such as when " +"using :ref:`multi-phase-initialization`, ``PyModule_Create``, or " +"``PyModule_FromDefAndSpec``)." +msgstr "" + +msgid "" +"Indicate that *module* does or does not support running without the global " +"interpreter lock (GIL), using one of the values from :c:macro:`Py_mod_gil`. " +"It must be called during *module*'s initialization function when using :ref:" +"`single-phase-initialization`. If this function is not called during module " +"initialization, the import machinery assumes the module does not support " +"running without the GIL. This function is only available in Python builds " +"configured with :option:`--disable-gil`. Return ``-1`` with an exception set " +"on error, ``0`` on success." +msgstr "" + +msgid "Module lookup (single-phase initialization)" +msgstr "" + +msgid "" +"The legacy :ref:`single-phase initialization ` " +"initialization scheme creates singleton modules that can be looked up in the " +"context of the current interpreter. This allows the module object to be " +"retrieved later with only a reference to the module definition." +msgstr "" + +msgid "" +"These functions will not work on modules created using multi-phase " +"initialization, since multiple such modules can be created from a single " +"definition." +msgstr "" + +msgid "" +"Returns the module object that was created from *def* for the current " +"interpreter. This method requires that the module object has been attached " +"to the interpreter state with :c:func:`PyState_AddModule` beforehand. In " +"case the corresponding module object is not found or has not been attached " +"to the interpreter state yet, it returns ``NULL``." +msgstr "" + +msgid "" +"Attaches the module object passed to the function to the interpreter state. " +"This allows the module object to be accessible via :c:func:" +"`PyState_FindModule`." +msgstr "" + +msgid "Only effective on modules created using single-phase initialization." +msgstr "" + +msgid "" +"Python calls ``PyState_AddModule`` automatically after importing a module " +"that uses :ref:`single-phase initialization `, " +"so it is unnecessary (but harmless) to call it from module initialization " +"code. An explicit call is needed only if the module's own init code " +"subsequently calls ``PyState_FindModule``. The function is mainly intended " +"for implementing alternative import mechanisms (either by calling it " +"directly, or by referring to its implementation for details of the required " +"state updates)." +msgstr "" + +msgid "" +"If a module was attached previously using the same *def*, it is replaced by " +"the new *module*." +msgstr "" + +msgid "The caller must have an :term:`attached thread state`." +msgstr "" + +msgid "Return ``-1`` with an exception set on error, ``0`` on success." +msgstr "" + +msgid "" +"Removes the module object created from *def* from the interpreter state. " +"Return ``-1`` with an exception set on error, ``0`` on success." +msgstr "" + +msgid "object" +msgstr "" + +msgid "module" +msgstr "" + +msgid "ModuleType (in module types)" +msgstr "" + +msgid "__name__ (module attribute)" +msgstr "" + +msgid "__doc__ (module attribute)" +msgstr "" + +msgid "__file__ (module attribute)" +msgstr "" + +msgid "__package__ (module attribute)" +msgstr "" + +msgid "__loader__ (module attribute)" +msgstr "" + +msgid "__dict__ (module attribute)" +msgstr "" + +msgid "SystemError (built-in exception)" +msgstr "" diff --git a/c-api/monitoring.po b/c-api/monitoring.po index 86e322f3..c6ad2378 100644 --- a/c-api/monitoring.po +++ b/c-api/monitoring.po @@ -8,30 +8,35 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/monitoring.rst:6 msgid "Monitoring C API" msgstr "" +#: ../../c-api/monitoring.rst:8 msgid "Added in version 3.13." msgstr "" +#: ../../c-api/monitoring.rst:10 msgid "" "An extension may need to interact with the event monitoring system. " "Subscribing to events and registering callbacks can be done via the Python " "API exposed in :mod:`sys.monitoring`." msgstr "" +#: ../../c-api/monitoring.rst:15 msgid "Generating Execution Events" msgstr "" +#: ../../c-api/monitoring.rst:17 msgid "" "The functions below make it possible for an extension to fire monitoring " "events as it emulates the execution of Python code. Each of these functions " @@ -44,104 +49,129 @@ msgid "" "CodeType` or of a type that emulates it." msgstr "" +#: ../../c-api/monitoring.rst:27 msgid "" "The VM disables tracing when firing an event, so there is no need for user " "code to do that." msgstr "" +#: ../../c-api/monitoring.rst:30 msgid "" "Monitoring functions should not be called with an exception set, except " "those listed below as working with the current exception." msgstr "" +#: ../../c-api/monitoring.rst:35 msgid "" "Representation of the state of an event type. It is allocated by the user " "while its contents are maintained by the monitoring API functions described " "below." msgstr "" +#: ../../c-api/monitoring.rst:39 msgid "" "All of the functions below return 0 on success and -1 (with an exception " "set) on error." msgstr "" +#: ../../c-api/monitoring.rst:41 msgid "See :mod:`sys.monitoring` for descriptions of the events." msgstr "" +#: ../../c-api/monitoring.rst:45 msgid "Fire a ``PY_START`` event." msgstr "" +#: ../../c-api/monitoring.rst:50 msgid "Fire a ``PY_RESUME`` event." msgstr "" +#: ../../c-api/monitoring.rst:55 msgid "Fire a ``PY_RETURN`` event." msgstr "" +#: ../../c-api/monitoring.rst:60 msgid "Fire a ``PY_YIELD`` event." msgstr "" +#: ../../c-api/monitoring.rst:65 msgid "Fire a ``CALL`` event." msgstr "" +#: ../../c-api/monitoring.rst:70 msgid "Fire a ``LINE`` event." msgstr "" +#: ../../c-api/monitoring.rst:75 msgid "Fire a ``JUMP`` event." msgstr "" +#: ../../c-api/monitoring.rst:80 msgid "Fire a ``BRANCH_LEFT`` event." msgstr "" +#: ../../c-api/monitoring.rst:85 msgid "Fire a ``BRANCH_RIGHT`` event." msgstr "" +#: ../../c-api/monitoring.rst:90 msgid "Fire a ``C_RETURN`` event." msgstr "" +#: ../../c-api/monitoring.rst:95 msgid "" "Fire a ``PY_THROW`` event with the current exception (as returned by :c:func:" "`PyErr_GetRaisedException`)." msgstr "" +#: ../../c-api/monitoring.rst:101 msgid "" "Fire a ``RAISE`` event with the current exception (as returned by :c:func:" "`PyErr_GetRaisedException`)." msgstr "" +#: ../../c-api/monitoring.rst:107 msgid "" "Fire a ``C_RAISE`` event with the current exception (as returned by :c:func:" "`PyErr_GetRaisedException`)." msgstr "" +#: ../../c-api/monitoring.rst:113 msgid "" "Fire a ``RERAISE`` event with the current exception (as returned by :c:func:" "`PyErr_GetRaisedException`)." msgstr "" +#: ../../c-api/monitoring.rst:119 msgid "" "Fire an ``EXCEPTION_HANDLED`` event with the current exception (as returned " "by :c:func:`PyErr_GetRaisedException`)." msgstr "" +#: ../../c-api/monitoring.rst:125 msgid "" "Fire a ``PY_UNWIND`` event with the current exception (as returned by :c:" "func:`PyErr_GetRaisedException`)." msgstr "" +#: ../../c-api/monitoring.rst:131 msgid "" "Fire a ``STOP_ITERATION`` event. If ``value`` is an instance of :exc:" "`StopIteration`, it is used. Otherwise, a new :exc:`StopIteration` instance " "is created with ``value`` as its argument." msgstr "" +#: ../../c-api/monitoring.rst:136 msgid "Managing the Monitoring State" msgstr "" +#: ../../c-api/monitoring.rst:138 msgid "" "Monitoring states can be managed with the help of monitoring scopes. A scope " -"would typically correspond to a python function." +"would typically correspond to a Python function." msgstr "" +#: ../../c-api/monitoring.rst:143 msgid "" "Enter a monitored scope. ``event_types`` is an array of the event IDs for " "events that may be fired from the scope. For example, the ID of a " @@ -154,6 +184,7 @@ msgid "" "``state_array``) is given in ``length``." msgstr "" +#: ../../c-api/monitoring.rst:153 msgid "" "The ``version`` argument is a pointer to a value which should be allocated " "by the user together with ``state_array`` and initialized to 0, and then set " @@ -162,6 +193,7 @@ msgid "" "to return quickly if they have not." msgstr "" +#: ../../c-api/monitoring.rst:159 msgid "" "The scopes referred to here are lexical scopes: a function, class or " "method. :c:func:`!PyMonitoring_EnterScope` should be called whenever the " @@ -171,77 +203,97 @@ msgid "" "emulating a generator, the scope needs to be exited and re-entered." msgstr "" +#: ../../c-api/monitoring.rst:166 msgid "The macros for *event_types* are:" msgstr "" +#: ../../c-api/monitoring.rst:174 msgid "Macro" msgstr "" +#: ../../c-api/monitoring.rst:174 msgid "Event" msgstr "" +#: ../../c-api/monitoring.rst:176 msgid ":monitoring-event:`BRANCH_LEFT`" msgstr "" +#: ../../c-api/monitoring.rst:177 msgid ":monitoring-event:`BRANCH_RIGHT`" msgstr "" +#: ../../c-api/monitoring.rst:178 msgid ":monitoring-event:`CALL`" msgstr "" +#: ../../c-api/monitoring.rst:179 msgid ":monitoring-event:`C_RAISE`" msgstr "" +#: ../../c-api/monitoring.rst:180 msgid ":monitoring-event:`C_RETURN`" msgstr "" +#: ../../c-api/monitoring.rst:181 msgid ":monitoring-event:`EXCEPTION_HANDLED`" msgstr "" +#: ../../c-api/monitoring.rst:182 msgid ":monitoring-event:`INSTRUCTION`" msgstr "" +#: ../../c-api/monitoring.rst:183 msgid ":monitoring-event:`JUMP`" msgstr "" +#: ../../c-api/monitoring.rst:184 msgid ":monitoring-event:`LINE`" msgstr "" +#: ../../c-api/monitoring.rst:185 msgid ":monitoring-event:`PY_RESUME`" msgstr "" +#: ../../c-api/monitoring.rst:186 msgid ":monitoring-event:`PY_RETURN`" msgstr "" +#: ../../c-api/monitoring.rst:187 msgid ":monitoring-event:`PY_START`" msgstr "" +#: ../../c-api/monitoring.rst:188 msgid ":monitoring-event:`PY_THROW`" msgstr "" +#: ../../c-api/monitoring.rst:189 msgid ":monitoring-event:`PY_UNWIND`" msgstr "" +#: ../../c-api/monitoring.rst:190 msgid ":monitoring-event:`PY_YIELD`" msgstr "" +#: ../../c-api/monitoring.rst:191 msgid ":monitoring-event:`RAISE`" msgstr "" +#: ../../c-api/monitoring.rst:192 msgid ":monitoring-event:`RERAISE`" msgstr "" +#: ../../c-api/monitoring.rst:193 msgid ":monitoring-event:`STOP_ITERATION`" msgstr "" +#: ../../c-api/monitoring.rst:198 msgid "" "Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`." msgstr "" +#: ../../c-api/monitoring.rst:203 msgid "" "Return true if the event corresponding to the event ID *ev* is a :ref:`local " "event `." msgstr "" - -msgid "This function is :term:`soft deprecated`." -msgstr "" diff --git a/c-api/monitoring.po~ b/c-api/monitoring.po~ new file mode 100644 index 00000000..86e322f3 --- /dev/null +++ b/c-api/monitoring.po~ @@ -0,0 +1,247 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Monitoring C API" +msgstr "" + +msgid "Added in version 3.13." +msgstr "" + +msgid "" +"An extension may need to interact with the event monitoring system. " +"Subscribing to events and registering callbacks can be done via the Python " +"API exposed in :mod:`sys.monitoring`." +msgstr "" + +msgid "Generating Execution Events" +msgstr "" + +msgid "" +"The functions below make it possible for an extension to fire monitoring " +"events as it emulates the execution of Python code. Each of these functions " +"accepts a ``PyMonitoringState`` struct which contains concise information " +"about the activation state of events, as well as the event arguments, which " +"include a ``PyObject*`` representing the code object, the instruction offset " +"and sometimes additional, event-specific arguments (see :mod:`sys." +"monitoring` for details about the signatures of the different event " +"callbacks). The ``codelike`` argument should be an instance of :class:`types." +"CodeType` or of a type that emulates it." +msgstr "" + +msgid "" +"The VM disables tracing when firing an event, so there is no need for user " +"code to do that." +msgstr "" + +msgid "" +"Monitoring functions should not be called with an exception set, except " +"those listed below as working with the current exception." +msgstr "" + +msgid "" +"Representation of the state of an event type. It is allocated by the user " +"while its contents are maintained by the monitoring API functions described " +"below." +msgstr "" + +msgid "" +"All of the functions below return 0 on success and -1 (with an exception " +"set) on error." +msgstr "" + +msgid "See :mod:`sys.monitoring` for descriptions of the events." +msgstr "" + +msgid "Fire a ``PY_START`` event." +msgstr "" + +msgid "Fire a ``PY_RESUME`` event." +msgstr "" + +msgid "Fire a ``PY_RETURN`` event." +msgstr "" + +msgid "Fire a ``PY_YIELD`` event." +msgstr "" + +msgid "Fire a ``CALL`` event." +msgstr "" + +msgid "Fire a ``LINE`` event." +msgstr "" + +msgid "Fire a ``JUMP`` event." +msgstr "" + +msgid "Fire a ``BRANCH_LEFT`` event." +msgstr "" + +msgid "Fire a ``BRANCH_RIGHT`` event." +msgstr "" + +msgid "Fire a ``C_RETURN`` event." +msgstr "" + +msgid "" +"Fire a ``PY_THROW`` event with the current exception (as returned by :c:func:" +"`PyErr_GetRaisedException`)." +msgstr "" + +msgid "" +"Fire a ``RAISE`` event with the current exception (as returned by :c:func:" +"`PyErr_GetRaisedException`)." +msgstr "" + +msgid "" +"Fire a ``C_RAISE`` event with the current exception (as returned by :c:func:" +"`PyErr_GetRaisedException`)." +msgstr "" + +msgid "" +"Fire a ``RERAISE`` event with the current exception (as returned by :c:func:" +"`PyErr_GetRaisedException`)." +msgstr "" + +msgid "" +"Fire an ``EXCEPTION_HANDLED`` event with the current exception (as returned " +"by :c:func:`PyErr_GetRaisedException`)." +msgstr "" + +msgid "" +"Fire a ``PY_UNWIND`` event with the current exception (as returned by :c:" +"func:`PyErr_GetRaisedException`)." +msgstr "" + +msgid "" +"Fire a ``STOP_ITERATION`` event. If ``value`` is an instance of :exc:" +"`StopIteration`, it is used. Otherwise, a new :exc:`StopIteration` instance " +"is created with ``value`` as its argument." +msgstr "" + +msgid "Managing the Monitoring State" +msgstr "" + +msgid "" +"Monitoring states can be managed with the help of monitoring scopes. A scope " +"would typically correspond to a python function." +msgstr "" + +msgid "" +"Enter a monitored scope. ``event_types`` is an array of the event IDs for " +"events that may be fired from the scope. For example, the ID of a " +"``PY_START`` event is the value ``PY_MONITORING_EVENT_PY_START``, which is " +"numerically equal to the base-2 logarithm of ``sys.monitoring.events." +"PY_START``. ``state_array`` is an array with a monitoring state entry for " +"each event in ``event_types``, it is allocated by the user but populated by :" +"c:func:`!PyMonitoring_EnterScope` with information about the activation " +"state of the event. The size of ``event_types`` (and hence also of " +"``state_array``) is given in ``length``." +msgstr "" + +msgid "" +"The ``version`` argument is a pointer to a value which should be allocated " +"by the user together with ``state_array`` and initialized to 0, and then set " +"only by :c:func:`!PyMonitoring_EnterScope` itself. It allows this function " +"to determine whether event states have changed since the previous call, and " +"to return quickly if they have not." +msgstr "" + +msgid "" +"The scopes referred to here are lexical scopes: a function, class or " +"method. :c:func:`!PyMonitoring_EnterScope` should be called whenever the " +"lexical scope is entered. Scopes can be reentered, reusing the same " +"*state_array* and *version*, in situations like when emulating a recursive " +"Python function. When a code-like's execution is paused, such as when " +"emulating a generator, the scope needs to be exited and re-entered." +msgstr "" + +msgid "The macros for *event_types* are:" +msgstr "" + +msgid "Macro" +msgstr "" + +msgid "Event" +msgstr "" + +msgid ":monitoring-event:`BRANCH_LEFT`" +msgstr "" + +msgid ":monitoring-event:`BRANCH_RIGHT`" +msgstr "" + +msgid ":monitoring-event:`CALL`" +msgstr "" + +msgid ":monitoring-event:`C_RAISE`" +msgstr "" + +msgid ":monitoring-event:`C_RETURN`" +msgstr "" + +msgid ":monitoring-event:`EXCEPTION_HANDLED`" +msgstr "" + +msgid ":monitoring-event:`INSTRUCTION`" +msgstr "" + +msgid ":monitoring-event:`JUMP`" +msgstr "" + +msgid ":monitoring-event:`LINE`" +msgstr "" + +msgid ":monitoring-event:`PY_RESUME`" +msgstr "" + +msgid ":monitoring-event:`PY_RETURN`" +msgstr "" + +msgid ":monitoring-event:`PY_START`" +msgstr "" + +msgid ":monitoring-event:`PY_THROW`" +msgstr "" + +msgid ":monitoring-event:`PY_UNWIND`" +msgstr "" + +msgid ":monitoring-event:`PY_YIELD`" +msgstr "" + +msgid ":monitoring-event:`RAISE`" +msgstr "" + +msgid ":monitoring-event:`RERAISE`" +msgstr "" + +msgid ":monitoring-event:`STOP_ITERATION`" +msgstr "" + +msgid "" +"Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`." +msgstr "" + +msgid "" +"Return true if the event corresponding to the event ID *ev* is a :ref:`local " +"event `." +msgstr "" + +msgid "This function is :term:`soft deprecated`." +msgstr "" diff --git a/c-api/none.po b/c-api/none.po index 6bf4e003..c58a5efe 100644 --- a/c-api/none.po +++ b/c-api/none.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/none.rst:6 msgid "The ``None`` Object" msgstr "" +#: ../../c-api/none.rst:10 msgid "" "Note that the :c:type:`PyTypeObject` for ``None`` is not directly exposed in " "the Python/C API. Since ``None`` is a singleton, testing for object " @@ -27,19 +29,24 @@ msgid "" "PyNone_Check` function for the same reason." msgstr "" +#: ../../c-api/none.rst:18 msgid "" "The Python ``None`` object, denoting lack of value. This object has no " "methods and is :term:`immortal`." msgstr "" +#: ../../c-api/none.rst:21 msgid ":c:data:`Py_None` is :term:`immortal`." msgstr "" +#: ../../c-api/none.rst:26 msgid "Return :c:data:`Py_None` from a function." msgstr "" +#: ../../c-api/none.rst:8 msgid "object" msgstr "" +#: ../../c-api/none.rst:8 msgid "None" msgstr "" diff --git a/c-api/none.po~ b/c-api/none.po~ new file mode 100644 index 00000000..6bf4e003 --- /dev/null +++ b/c-api/none.po~ @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "The ``None`` Object" +msgstr "" + +msgid "" +"Note that the :c:type:`PyTypeObject` for ``None`` is not directly exposed in " +"the Python/C API. Since ``None`` is a singleton, testing for object " +"identity (using ``==`` in C) is sufficient. There is no :c:func:`!" +"PyNone_Check` function for the same reason." +msgstr "" + +msgid "" +"The Python ``None`` object, denoting lack of value. This object has no " +"methods and is :term:`immortal`." +msgstr "" + +msgid ":c:data:`Py_None` is :term:`immortal`." +msgstr "" + +msgid "Return :c:data:`Py_None` from a function." +msgstr "" + +msgid "object" +msgstr "" + +msgid "None" +msgstr "" diff --git a/c-api/number.po b/c-api/number.po index ff821a3a..721e4065 100644 --- a/c-api/number.po +++ b/c-api/number.po @@ -8,51 +8,60 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/number.rst:6 msgid "Number Protocol" msgstr "" +#: ../../c-api/number.rst:11 msgid "" "Returns ``1`` if the object *o* provides numeric protocols, and false " "otherwise. This function always succeeds." msgstr "" +#: ../../c-api/number.rst:14 msgid "Returns ``1`` if *o* is an index integer." msgstr "" +#: ../../c-api/number.rst:20 msgid "" "Returns the result of adding *o1* and *o2*, or ``NULL`` on failure. This is " "the equivalent of the Python expression ``o1 + o2``." msgstr "" +#: ../../c-api/number.rst:26 msgid "" "Returns the result of subtracting *o2* from *o1*, or ``NULL`` on failure. " "This is the equivalent of the Python expression ``o1 - o2``." msgstr "" +#: ../../c-api/number.rst:32 msgid "" "Returns the result of multiplying *o1* and *o2*, or ``NULL`` on failure. " "This is the equivalent of the Python expression ``o1 * o2``." msgstr "" +#: ../../c-api/number.rst:38 msgid "" "Returns the result of matrix multiplication on *o1* and *o2*, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``o1 @ o2``." msgstr "" +#: ../../c-api/number.rst:46 msgid "" "Return the floor of *o1* divided by *o2*, or ``NULL`` on failure. This is " "the equivalent of the Python expression ``o1 // o2``." msgstr "" +#: ../../c-api/number.rst:52 msgid "" "Return a reasonable approximation for the mathematical value of *o1* divided " "by *o2*, or ``NULL`` on failure. The return value is \"approximate\" " @@ -62,16 +71,19 @@ msgid "" "expression ``o1 / o2``." msgstr "" +#: ../../c-api/number.rst:61 msgid "" "Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. " "This is the equivalent of the Python expression ``o1 % o2``." msgstr "" +#: ../../c-api/number.rst:69 msgid "" "See the built-in function :func:`divmod`. Returns ``NULL`` on failure. This " "is the equivalent of the Python expression ``divmod(o1, o2)``." msgstr "" +#: ../../c-api/number.rst:77 msgid "" "See the built-in function :func:`pow`. Returns ``NULL`` on failure. This is " "the equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is " @@ -79,81 +91,96 @@ msgid "" "(passing ``NULL`` for *o3* would cause an illegal memory access)." msgstr "" +#: ../../c-api/number.rst:85 msgid "" "Returns the negation of *o* on success, or ``NULL`` on failure. This is the " "equivalent of the Python expression ``-o``." msgstr "" +#: ../../c-api/number.rst:91 msgid "" "Returns *o* on success, or ``NULL`` on failure. This is the equivalent of " "the Python expression ``+o``." msgstr "" +#: ../../c-api/number.rst:99 msgid "" "Returns the absolute value of *o*, or ``NULL`` on failure. This is the " "equivalent of the Python expression ``abs(o)``." msgstr "" +#: ../../c-api/number.rst:105 msgid "" "Returns the bitwise negation of *o* on success, or ``NULL`` on failure. " "This is the equivalent of the Python expression ``~o``." msgstr "" +#: ../../c-api/number.rst:111 msgid "" "Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``o1 << o2``." msgstr "" +#: ../../c-api/number.rst:117 msgid "" "Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``o1 >> o2``." msgstr "" +#: ../../c-api/number.rst:123 msgid "" "Returns the \"bitwise and\" of *o1* and *o2* on success and ``NULL`` on " "failure. This is the equivalent of the Python expression ``o1 & o2``." msgstr "" +#: ../../c-api/number.rst:129 msgid "" "Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or ``NULL`` " "on failure. This is the equivalent of the Python expression ``o1 ^ o2``." msgstr "" +#: ../../c-api/number.rst:135 msgid "" "Returns the \"bitwise or\" of *o1* and *o2* on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``o1 | o2``." msgstr "" +#: ../../c-api/number.rst:141 msgid "" "Returns the result of adding *o1* and *o2*, or ``NULL`` on failure. The " "operation is done *in-place* when *o1* supports it. This is the equivalent " "of the Python statement ``o1 += o2``." msgstr "" +#: ../../c-api/number.rst:148 msgid "" "Returns the result of subtracting *o2* from *o1*, or ``NULL`` on failure. " "The operation is done *in-place* when *o1* supports it. This is the " "equivalent of the Python statement ``o1 -= o2``." msgstr "" +#: ../../c-api/number.rst:155 msgid "" "Returns the result of multiplying *o1* and *o2*, or ``NULL`` on failure. " "The operation is done *in-place* when *o1* supports it. This is the " "equivalent of the Python statement ``o1 *= o2``." msgstr "" +#: ../../c-api/number.rst:162 msgid "" "Returns the result of matrix multiplication on *o1* and *o2*, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 @= o2``." msgstr "" +#: ../../c-api/number.rst:171 msgid "" "Returns the mathematical floor of dividing *o1* by *o2*, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 //= o2``." msgstr "" +#: ../../c-api/number.rst:178 msgid "" "Return a reasonable approximation for the mathematical value of *o1* divided " "by *o2*, or ``NULL`` on failure. The return value is \"approximate\" " @@ -164,12 +191,14 @@ msgid "" "o2``." msgstr "" +#: ../../c-api/number.rst:188 msgid "" "Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. The " "operation is done *in-place* when *o1* supports it. This is the equivalent " "of the Python statement ``o1 %= o2``." msgstr "" +#: ../../c-api/number.rst:197 msgid "" "See the built-in function :func:`pow`. Returns ``NULL`` on failure. The " "operation is done *in-place* when *o1* supports it. This is the equivalent " @@ -179,56 +208,66 @@ msgid "" "an illegal memory access)." msgstr "" +#: ../../c-api/number.rst:206 msgid "" "Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 <<= o2``." msgstr "" +#: ../../c-api/number.rst:213 msgid "" "Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 >>= o2``." msgstr "" +#: ../../c-api/number.rst:220 msgid "" "Returns the \"bitwise and\" of *o1* and *o2* on success and ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 &= o2``." msgstr "" +#: ../../c-api/number.rst:227 msgid "" "Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or ``NULL`` " "on failure. The operation is done *in-place* when *o1* supports it. This " "is the equivalent of the Python statement ``o1 ^= o2``." msgstr "" +#: ../../c-api/number.rst:234 msgid "" "Returns the \"bitwise or\" of *o1* and *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 |= o2``." msgstr "" +#: ../../c-api/number.rst:243 msgid "" "Returns the *o* converted to an integer object on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``int(o)``." msgstr "" +#: ../../c-api/number.rst:251 msgid "" "Returns the *o* converted to a float object on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``float(o)``." msgstr "" +#: ../../c-api/number.rst:257 msgid "" "Returns the *o* converted to a Python int on success or ``NULL`` with a :exc:" "`TypeError` exception raised on failure." msgstr "" +#: ../../c-api/number.rst:260 msgid "" "The result always has exact type :class:`int`. Previously, the result could " "have been an instance of a subclass of ``int``." msgstr "" +#: ../../c-api/number.rst:267 msgid "" "Returns the integer *n* converted to base *base* as a string. The *base* " "argument must be one of 2, 8, 10, or 16. For base 2, 8, or 16, the returned " @@ -237,12 +276,14 @@ msgid "" "`PyNumber_Index` first." msgstr "" +#: ../../c-api/number.rst:276 msgid "" "Returns *o* converted to a :c:type:`Py_ssize_t` value if *o* can be " "interpreted as an integer. If the call fails, an exception is raised and " "``-1`` is returned." msgstr "" +#: ../../c-api/number.rst:279 msgid "" "If *o* can be converted to a Python int but the attempt to convert to a :c:" "type:`Py_ssize_t` value would raise an :exc:`OverflowError`, then the *exc* " @@ -252,26 +293,35 @@ msgid "" "negative integer or ``PY_SSIZE_T_MAX`` for a positive integer." msgstr "" +#: ../../c-api/number.rst:289 msgid "" "Returns ``1`` if *o* is an index integer (has the ``nb_index`` slot of the " "``tp_as_number`` structure filled in), and ``0`` otherwise. This function " "always succeeds." msgstr "" +#: ../../c-api/number.rst:67 ../../c-api/number.rst:75 +#: ../../c-api/number.rst:97 ../../c-api/number.rst:195 +#: ../../c-api/number.rst:241 ../../c-api/number.rst:249 msgid "built-in function" msgstr "" +#: ../../c-api/number.rst:67 msgid "divmod" msgstr "" +#: ../../c-api/number.rst:75 ../../c-api/number.rst:195 msgid "pow" msgstr "" +#: ../../c-api/number.rst:97 msgid "abs" msgstr "" +#: ../../c-api/number.rst:241 msgid "int" msgstr "" +#: ../../c-api/number.rst:249 msgid "float" msgstr "" diff --git a/c-api/number.po~ b/c-api/number.po~ new file mode 100644 index 00000000..ff821a3a --- /dev/null +++ b/c-api/number.po~ @@ -0,0 +1,277 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Number Protocol" +msgstr "" + +msgid "" +"Returns ``1`` if the object *o* provides numeric protocols, and false " +"otherwise. This function always succeeds." +msgstr "" + +msgid "Returns ``1`` if *o* is an index integer." +msgstr "" + +msgid "" +"Returns the result of adding *o1* and *o2*, or ``NULL`` on failure. This is " +"the equivalent of the Python expression ``o1 + o2``." +msgstr "" + +msgid "" +"Returns the result of subtracting *o2* from *o1*, or ``NULL`` on failure. " +"This is the equivalent of the Python expression ``o1 - o2``." +msgstr "" + +msgid "" +"Returns the result of multiplying *o1* and *o2*, or ``NULL`` on failure. " +"This is the equivalent of the Python expression ``o1 * o2``." +msgstr "" + +msgid "" +"Returns the result of matrix multiplication on *o1* and *o2*, or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 @ o2``." +msgstr "" + +msgid "" +"Return the floor of *o1* divided by *o2*, or ``NULL`` on failure. This is " +"the equivalent of the Python expression ``o1 // o2``." +msgstr "" + +msgid "" +"Return a reasonable approximation for the mathematical value of *o1* divided " +"by *o2*, or ``NULL`` on failure. The return value is \"approximate\" " +"because binary floating-point numbers are approximate; it is not possible to " +"represent all real numbers in base two. This function can return a floating-" +"point value when passed two integers. This is the equivalent of the Python " +"expression ``o1 / o2``." +msgstr "" + +msgid "" +"Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. " +"This is the equivalent of the Python expression ``o1 % o2``." +msgstr "" + +msgid "" +"See the built-in function :func:`divmod`. Returns ``NULL`` on failure. This " +"is the equivalent of the Python expression ``divmod(o1, o2)``." +msgstr "" + +msgid "" +"See the built-in function :func:`pow`. Returns ``NULL`` on failure. This is " +"the equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is " +"optional. If *o3* is to be ignored, pass :c:data:`Py_None` in its place " +"(passing ``NULL`` for *o3* would cause an illegal memory access)." +msgstr "" + +msgid "" +"Returns the negation of *o* on success, or ``NULL`` on failure. This is the " +"equivalent of the Python expression ``-o``." +msgstr "" + +msgid "" +"Returns *o* on success, or ``NULL`` on failure. This is the equivalent of " +"the Python expression ``+o``." +msgstr "" + +msgid "" +"Returns the absolute value of *o*, or ``NULL`` on failure. This is the " +"equivalent of the Python expression ``abs(o)``." +msgstr "" + +msgid "" +"Returns the bitwise negation of *o* on success, or ``NULL`` on failure. " +"This is the equivalent of the Python expression ``~o``." +msgstr "" + +msgid "" +"Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 << o2``." +msgstr "" + +msgid "" +"Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 >> o2``." +msgstr "" + +msgid "" +"Returns the \"bitwise and\" of *o1* and *o2* on success and ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 & o2``." +msgstr "" + +msgid "" +"Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or ``NULL`` " +"on failure. This is the equivalent of the Python expression ``o1 ^ o2``." +msgstr "" + +msgid "" +"Returns the \"bitwise or\" of *o1* and *o2* on success, or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 | o2``." +msgstr "" + +msgid "" +"Returns the result of adding *o1* and *o2*, or ``NULL`` on failure. The " +"operation is done *in-place* when *o1* supports it. This is the equivalent " +"of the Python statement ``o1 += o2``." +msgstr "" + +msgid "" +"Returns the result of subtracting *o2* from *o1*, or ``NULL`` on failure. " +"The operation is done *in-place* when *o1* supports it. This is the " +"equivalent of the Python statement ``o1 -= o2``." +msgstr "" + +msgid "" +"Returns the result of multiplying *o1* and *o2*, or ``NULL`` on failure. " +"The operation is done *in-place* when *o1* supports it. This is the " +"equivalent of the Python statement ``o1 *= o2``." +msgstr "" + +msgid "" +"Returns the result of matrix multiplication on *o1* and *o2*, or ``NULL`` on " +"failure. The operation is done *in-place* when *o1* supports it. This is " +"the equivalent of the Python statement ``o1 @= o2``." +msgstr "" + +msgid "" +"Returns the mathematical floor of dividing *o1* by *o2*, or ``NULL`` on " +"failure. The operation is done *in-place* when *o1* supports it. This is " +"the equivalent of the Python statement ``o1 //= o2``." +msgstr "" + +msgid "" +"Return a reasonable approximation for the mathematical value of *o1* divided " +"by *o2*, or ``NULL`` on failure. The return value is \"approximate\" " +"because binary floating-point numbers are approximate; it is not possible to " +"represent all real numbers in base two. This function can return a floating-" +"point value when passed two integers. The operation is done *in-place* when " +"*o1* supports it. This is the equivalent of the Python statement ``o1 /= " +"o2``." +msgstr "" + +msgid "" +"Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. The " +"operation is done *in-place* when *o1* supports it. This is the equivalent " +"of the Python statement ``o1 %= o2``." +msgstr "" + +msgid "" +"See the built-in function :func:`pow`. Returns ``NULL`` on failure. The " +"operation is done *in-place* when *o1* supports it. This is the equivalent " +"of the Python statement ``o1 **= o2`` when o3 is :c:data:`Py_None`, or an in-" +"place variant of ``pow(o1, o2, o3)`` otherwise. If *o3* is to be ignored, " +"pass :c:data:`Py_None` in its place (passing ``NULL`` for *o3* would cause " +"an illegal memory access)." +msgstr "" + +msgid "" +"Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on " +"failure. The operation is done *in-place* when *o1* supports it. This is " +"the equivalent of the Python statement ``o1 <<= o2``." +msgstr "" + +msgid "" +"Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on " +"failure. The operation is done *in-place* when *o1* supports it. This is " +"the equivalent of the Python statement ``o1 >>= o2``." +msgstr "" + +msgid "" +"Returns the \"bitwise and\" of *o1* and *o2* on success and ``NULL`` on " +"failure. The operation is done *in-place* when *o1* supports it. This is " +"the equivalent of the Python statement ``o1 &= o2``." +msgstr "" + +msgid "" +"Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or ``NULL`` " +"on failure. The operation is done *in-place* when *o1* supports it. This " +"is the equivalent of the Python statement ``o1 ^= o2``." +msgstr "" + +msgid "" +"Returns the \"bitwise or\" of *o1* and *o2* on success, or ``NULL`` on " +"failure. The operation is done *in-place* when *o1* supports it. This is " +"the equivalent of the Python statement ``o1 |= o2``." +msgstr "" + +msgid "" +"Returns the *o* converted to an integer object on success, or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``int(o)``." +msgstr "" + +msgid "" +"Returns the *o* converted to a float object on success, or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``float(o)``." +msgstr "" + +msgid "" +"Returns the *o* converted to a Python int on success or ``NULL`` with a :exc:" +"`TypeError` exception raised on failure." +msgstr "" + +msgid "" +"The result always has exact type :class:`int`. Previously, the result could " +"have been an instance of a subclass of ``int``." +msgstr "" + +msgid "" +"Returns the integer *n* converted to base *base* as a string. The *base* " +"argument must be one of 2, 8, 10, or 16. For base 2, 8, or 16, the returned " +"string is prefixed with a base marker of ``'0b'``, ``'0o'``, or ``'0x'``, " +"respectively. If *n* is not a Python int, it is converted with :c:func:" +"`PyNumber_Index` first." +msgstr "" + +msgid "" +"Returns *o* converted to a :c:type:`Py_ssize_t` value if *o* can be " +"interpreted as an integer. If the call fails, an exception is raised and " +"``-1`` is returned." +msgstr "" + +msgid "" +"If *o* can be converted to a Python int but the attempt to convert to a :c:" +"type:`Py_ssize_t` value would raise an :exc:`OverflowError`, then the *exc* " +"argument is the type of exception that will be raised (usually :exc:" +"`IndexError` or :exc:`OverflowError`). If *exc* is ``NULL``, then the " +"exception is cleared and the value is clipped to ``PY_SSIZE_T_MIN`` for a " +"negative integer or ``PY_SSIZE_T_MAX`` for a positive integer." +msgstr "" + +msgid "" +"Returns ``1`` if *o* is an index integer (has the ``nb_index`` slot of the " +"``tp_as_number`` structure filled in), and ``0`` otherwise. This function " +"always succeeds." +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "divmod" +msgstr "" + +msgid "pow" +msgstr "" + +msgid "abs" +msgstr "" + +msgid "int" +msgstr "" + +msgid "float" +msgstr "" diff --git a/c-api/object.po b/c-api/object.po index fb4d3e8f..f0085bb5 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -11,130 +11,164 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-13 14:15+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/object.rst:6 msgid "Object Protocol" msgstr "" +#: ../../c-api/object.rst:11 msgid "Get a :term:`strong reference` to a constant." msgstr "" +#: ../../c-api/object.rst:13 msgid "Set an exception and return ``NULL`` if *constant_id* is invalid." msgstr "" +#: ../../c-api/object.rst:15 msgid "*constant_id* must be one of these constant identifiers:" msgstr "" +#: ../../c-api/object.rst:20 msgid "Constant Identifier" msgstr "" +#: ../../c-api/object.rst:20 msgid "Value" msgstr "" +#: ../../c-api/object.rst:20 msgid "Returned object" msgstr "" +#: ../../c-api/object.rst:22 ../../c-api/object.rst:27 msgid "``0``" msgstr "" +#: ../../c-api/object.rst:22 msgid ":py:data:`None`" msgstr "" +#: ../../c-api/object.rst:23 ../../c-api/object.rst:28 msgid "``1``" msgstr "" +#: ../../c-api/object.rst:23 msgid ":py:data:`False`" msgstr "" +#: ../../c-api/object.rst:24 msgid "``2``" msgstr "" +#: ../../c-api/object.rst:24 msgid ":py:data:`True`" msgstr "" +#: ../../c-api/object.rst:25 msgid "``3``" msgstr "" +#: ../../c-api/object.rst:25 msgid ":py:data:`Ellipsis`" msgstr "" +#: ../../c-api/object.rst:26 msgid "``4``" msgstr "" +#: ../../c-api/object.rst:26 msgid ":py:data:`NotImplemented`" msgstr "" +#: ../../c-api/object.rst:27 msgid "``5``" msgstr "" +#: ../../c-api/object.rst:28 msgid "``6``" msgstr "" +#: ../../c-api/object.rst:29 msgid "``7``" msgstr "" +#: ../../c-api/object.rst:29 msgid "``''``" msgstr "" +#: ../../c-api/object.rst:30 msgid "``8``" msgstr "" +#: ../../c-api/object.rst:30 msgid "``b''``" msgstr "" +#: ../../c-api/object.rst:31 msgid "``9``" msgstr "" +#: ../../c-api/object.rst:31 msgid "``()``" msgstr "" +#: ../../c-api/object.rst:34 msgid "" "Numeric values are only given for projects which cannot use the constant " "identifiers." msgstr "" +#: ../../c-api/object.rst:42 msgid "In CPython, all of these constants are :term:`immortal`." msgstr "" +#: ../../c-api/object.rst:47 msgid "" "Similar to :c:func:`Py_GetConstant`, but return a :term:`borrowed reference`." msgstr "" +#: ../../c-api/object.rst:50 msgid "" "This function is primarily intended for backwards compatibility: using :c:" "func:`Py_GetConstant` is recommended for new code." msgstr "" +#: ../../c-api/object.rst:53 msgid "" "The reference is borrowed from the interpreter, and is valid until the " "interpreter finalization." msgstr "" +#: ../../c-api/object.rst:61 msgid "" "The ``NotImplemented`` singleton, used to signal that an operation is not " "implemented for the given type combination." msgstr "" +#: ../../c-api/object.rst:67 msgid "" "Properly handle returning :c:data:`Py_NotImplemented` from within a C " "function (that is, create a new :term:`strong reference` to :const:" "`NotImplemented` and return it)." msgstr "" +#: ../../c-api/object.rst:74 msgid "" "Flag to be used with multiple functions that print the object (like :c:func:" "`PyObject_Print` and :c:func:`PyFile_WriteObject`). If passed, these " -"function would use the :func:`str` of the object instead of the :func:`repr`." +"functions use the :func:`str` of the object instead of the :func:`repr`." msgstr "" +#: ../../c-api/object.rst:82 msgid "" "Print an object *o*, on file *fp*. Returns ``-1`` on error. The flags " "argument is used to enable certain printing options. The only option " @@ -142,23 +176,78 @@ msgid "" "the object is written instead of the :func:`repr`." msgstr "" +#: ../../c-api/object.rst:90 +msgid "" +"Dump an object *op* to ``stderr``. This should only be used for debugging." +msgstr "" + +#: ../../c-api/object.rst:92 +msgid "" +"The output is intended to try dumping objects even after memory corruption:" +msgstr "" + +#: ../../c-api/object.rst:94 +msgid "" +"Information is written starting with fields that are the least likely to " +"crash when accessed." +msgstr "" + +#: ../../c-api/object.rst:96 +msgid "" +"This function can be called without an :term:`attached thread state`, but " +"it's not recommended to do so: it can cause deadlocks." +msgstr "" + +#: ../../c-api/object.rst:98 +msgid "" +"An object that does not belong to the current interpreter may be dumped, but " +"this may also cause crashes or unintended behavior." +msgstr "" + +#: ../../c-api/object.rst:100 +msgid "" +"Implement a heuristic to detect if the object memory has been freed. Don't " +"display the object contents in this case, only its memory address." +msgstr "" + +#: ../../c-api/object.rst:102 +msgid "The output format may change at any time." +msgstr "" + +#: ../../c-api/object.rst:104 +msgid "Example of output:" +msgstr "" + +#: ../../c-api/object.rst:106 +msgid "" +"object address : 0x7f80124702c0\n" +"object refcount : 2\n" +"object type : 0x9902e0\n" +"object type name: str\n" +"object repr : 'abcdef'" +msgstr "" + +#: ../../c-api/object.rst:119 msgid "" "Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. " "This is equivalent to the Python expression ``hasattr(o, attr_name)``. On " "failure, return ``-1``." msgstr "" +#: ../../c-api/object.rst:128 msgid "" "This is the same as :c:func:`PyObject_HasAttrWithError`, but *attr_name* is " "specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " "a :c:expr:`PyObject*`." msgstr "" +#: ../../c-api/object.rst:137 msgid "" "Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. " "This function always succeeds." msgstr "" +#: ../../c-api/object.rst:142 msgid "" "Exceptions that occur when this calls :meth:`~object.__getattr__` and :meth:" "`~object.__getattribute__` methods aren't propagated, but instead given to :" @@ -167,12 +256,14 @@ msgid "" "`PyObject_GetAttr` instead." msgstr "" +#: ../../c-api/object.rst:151 msgid "" "This is the same as :c:func:`PyObject_HasAttr`, but *attr_name* is specified " "as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/object.rst:157 msgid "" "Exceptions that occur when this calls :meth:`~object.__getattr__` and :meth:" "`~object.__getattribute__` methods or while creating the temporary :class:" @@ -181,33 +272,39 @@ msgid "" "or :c:func:`PyObject_GetAttrString` instead." msgstr "" +#: ../../c-api/object.rst:167 msgid "" "Retrieve an attribute named *attr_name* from object *o*. Returns the " "attribute value on success, or ``NULL`` on failure. This is the equivalent " "of the Python expression ``o.attr_name``." msgstr "" +#: ../../c-api/object.rst:171 msgid "" "If the missing attribute should not be treated as a failure, you can use :c:" "func:`PyObject_GetOptionalAttr` instead." msgstr "" +#: ../../c-api/object.rst:177 msgid "" "This is the same as :c:func:`PyObject_GetAttr`, but *attr_name* is specified " "as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/object.rst:181 msgid "" "If the missing attribute should not be treated as a failure, you can use :c:" "func:`PyObject_GetOptionalAttrString` instead." msgstr "" +#: ../../c-api/object.rst:187 msgid "" "Variant of :c:func:`PyObject_GetAttr` which doesn't raise :exc:" "`AttributeError` if the attribute is not found." msgstr "" +#: ../../c-api/object.rst:190 msgid "" "If the attribute is found, return ``1`` and set *\\*result* to a new :term:" "`strong reference` to the attribute. If the attribute is not found, return " @@ -216,12 +313,14 @@ msgid "" "``-1`` and set *\\*result* to ``NULL``." msgstr "" +#: ../../c-api/object.rst:202 msgid "" "This is the same as :c:func:`PyObject_GetOptionalAttr`, but *attr_name* is " "specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " "a :c:expr:`PyObject*`." msgstr "" +#: ../../c-api/object.rst:210 msgid "" "Generic attribute getter function that is meant to be put into a type " "object's ``tp_getattro`` slot. It looks for a descriptor in the dictionary " @@ -231,29 +330,45 @@ msgid "" "descriptors don't. Otherwise, an :exc:`AttributeError` is raised." msgstr "" +#: ../../c-api/object.rst:220 msgid "" "Set the value of the attribute named *attr_name*, for object *o*, to the " "value *v*. Raise an exception and return ``-1`` on failure; return ``0`` on " "success. This is the equivalent of the Python statement ``o.attr_name = v``." msgstr "" +#: ../../c-api/object.rst:225 msgid "" "If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated " "in favour of using :c:func:`PyObject_DelAttr`, but there are currently no " "plans to remove it." msgstr "" +#: ../../c-api/object.rst:229 ../../c-api/object.rst:246 +msgid "" +"The function must not be called with a ``NULL`` *v* and an exception set. " +"This case can arise from forgetting ``NULL`` checks and would delete the " +"attribute." +msgstr "" + +#: ../../c-api/object.rst:233 ../../c-api/object.rst:258 +msgid "Must not be called with NULL value if an exception is set." +msgstr "" + +#: ../../c-api/object.rst:239 msgid "" "This is the same as :c:func:`PyObject_SetAttr`, but *attr_name* is specified " "as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/object.rst:243 msgid "" "If *v* is ``NULL``, the attribute is deleted, but this feature is deprecated " "in favour of using :c:func:`PyObject_DelAttrString`." msgstr "" +#: ../../c-api/object.rst:250 msgid "" "The number of different attribute names passed to this function should be " "kept small, usually by using a statically allocated string as *attr_name*. " @@ -263,6 +378,7 @@ msgid "" "internally to create a key object." msgstr "" +#: ../../c-api/object.rst:264 msgid "" "Generic attribute setter and deleter function that is meant to be put into a " "type object's :c:member:`~PyTypeObject.tp_setattro` slot. It looks for a " @@ -274,17 +390,20 @@ msgid "" "returned." msgstr "" +#: ../../c-api/object.rst:276 msgid "" "Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on " "failure. This is the equivalent of the Python statement ``del o.attr_name``." msgstr "" +#: ../../c-api/object.rst:282 msgid "" "This is the same as :c:func:`PyObject_DelAttr`, but *attr_name* is specified " "as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/object.rst:286 msgid "" "The number of different attribute names passed to this function should be " "kept small, usually by using a statically allocated string as *attr_name*. " @@ -294,11 +413,13 @@ msgid "" "internally to create a key object for lookup." msgstr "" +#: ../../c-api/object.rst:297 msgid "" "A generic implementation for the getter of a ``__dict__`` descriptor. It " "creates the dictionary if necessary." msgstr "" +#: ../../c-api/object.rst:300 msgid "" "This function may also be called to get the :py:attr:`~object.__dict__` of " "the object *o*. Pass ``NULL`` for *context* when calling it. Since this " @@ -307,25 +428,30 @@ msgid "" "the object." msgstr "" +#: ../../c-api/object.rst:306 msgid "On failure, returns ``NULL`` with an exception set." msgstr "" +#: ../../c-api/object.rst:313 msgid "" "A generic implementation for the setter of a ``__dict__`` descriptor. This " "implementation does not allow the dictionary to be deleted." msgstr "" +#: ../../c-api/object.rst:321 msgid "" "Return a pointer to :py:attr:`~object.__dict__` of the object *obj*. If " "there is no ``__dict__``, return ``NULL`` without setting an exception." msgstr "" +#: ../../c-api/object.rst:324 msgid "" "This function may need to allocate memory for the dictionary, so it may be " "more efficient to call :c:func:`PyObject_GetAttr` when accessing an " "attribute on the object." msgstr "" +#: ../../c-api/object.rst:331 msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " "which must be one of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`, :" @@ -336,28 +462,33 @@ msgid "" "success, or ``NULL`` on failure." msgstr "" +#: ../../c-api/object.rst:341 msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " "like :c:func:`PyObject_RichCompare`, but returns ``-1`` on error, ``0`` if " "the result is false, ``1`` otherwise." msgstr "" +#: ../../c-api/object.rst:346 msgid "" "If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` " "will always return ``1`` for :c:macro:`Py_EQ` and ``0`` for :c:macro:`Py_NE`." msgstr "" +#: ../../c-api/object.rst:351 msgid "" "Format *obj* using *format_spec*. This is equivalent to the Python " "expression ``format(obj, format_spec)``." msgstr "" +#: ../../c-api/object.rst:354 msgid "" "*format_spec* may be ``NULL``. In this case the call is equivalent to " "``format(obj)``. Returns the formatted string on success, ``NULL`` on " "failure." msgstr "" +#: ../../c-api/object.rst:362 msgid "" "Compute a string representation of object *o*. Returns the string " "representation on success, ``NULL`` on failure. This is the equivalent of " @@ -365,11 +496,18 @@ msgid "" "function." msgstr "" +#: ../../c-api/object.rst:366 ../../c-api/object.rst:382 +#: ../../c-api/object.rst:394 +msgid "If argument is ``NULL``, return the string ``''``." +msgstr "" + +#: ../../c-api/object.rst:368 ../../c-api/object.rst:396 msgid "" "This function now includes a debug assertion to help ensure that it does not " "silently discard an active exception." msgstr "" +#: ../../c-api/object.rst:376 msgid "" "As :c:func:`PyObject_Repr`, compute a string representation of object *o*, " "but escape the non-ASCII characters in the string returned by :c:func:" @@ -378,6 +516,7 @@ msgid "" "Called by the :func:`ascii` built-in function." msgstr "" +#: ../../c-api/object.rst:389 msgid "" "Compute a string representation of object *o*. Returns the string " "representation on success, ``NULL`` on failure. This is the equivalent of " @@ -385,6 +524,7 @@ msgid "" "function and, therefore, by the :func:`print` function." msgstr "" +#: ../../c-api/object.rst:405 msgid "" "Compute a bytes representation of object *o*. ``NULL`` is returned on " "failure and a bytes object on success. This is equivalent to the Python " @@ -393,17 +533,25 @@ msgid "" "bytes object." msgstr "" +#: ../../c-api/object.rst:411 +msgid "" +"If argument is ``NULL``, return the :class:`bytes` object ``b''``." +msgstr "" + +#: ../../c-api/object.rst:416 msgid "" "Return ``1`` if the class *derived* is identical to or derived from the " "class *cls*, otherwise return ``0``. In case of an error, return ``-1``." msgstr "" +#: ../../c-api/object.rst:419 ../../c-api/object.rst:438 msgid "" "If *cls* is a tuple, the check will be done against every entry in *cls*. " "The result will be ``1`` when at least one of the checks returns ``1``, " "otherwise it will be ``0``." msgstr "" +#: ../../c-api/object.rst:423 msgid "" "If *cls* has a :meth:`~type.__subclasscheck__` method, it will be called to " "determine the subclass status as described in :pep:`3119`. Otherwise, " @@ -411,44 +559,52 @@ msgid "" "e. contained in :attr:`cls.__mro__ `." msgstr "" +#: ../../c-api/object.rst:428 msgid "" "Normally only class objects, i.e. instances of :class:`type` or a derived " "class, are considered classes. However, objects can override this by having " "a :attr:`~type.__bases__` attribute (which must be a tuple of base classes)." msgstr "" +#: ../../c-api/object.rst:435 msgid "" "Return ``1`` if *inst* is an instance of the class *cls* or a subclass of " "*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception." msgstr "" +#: ../../c-api/object.rst:442 msgid "" "If *cls* has a :meth:`~type.__instancecheck__` method, it will be called to " "determine the subclass status as described in :pep:`3119`. Otherwise, " "*inst* is an instance of *cls* if its class is a subclass of *cls*." msgstr "" +#: ../../c-api/object.rst:446 msgid "" "An instance *inst* can override what is considered its class by having a :" "attr:`~object.__class__` attribute." msgstr "" +#: ../../c-api/object.rst:449 msgid "" "An object *cls* can override if it is considered a class, and what its base " "classes are, by having a :attr:`~type.__bases__` attribute (which must be a " "tuple of base classes)." msgstr "" +#: ../../c-api/object.rst:458 msgid "" "Compute and return the hash value of an object *o*. On failure, return " "``-1``. This is the equivalent of the Python expression ``hash(o)``." msgstr "" +#: ../../c-api/object.rst:461 msgid "" "The return type is now Py_hash_t. This is a signed integer the same size " "as :c:type:`Py_ssize_t`." msgstr "" +#: ../../c-api/object.rst:468 msgid "" "Set a :exc:`TypeError` indicating that ``type(o)`` is not :term:`hashable` " "and return ``-1``. This function receives special treatment when stored in a " @@ -456,18 +612,21 @@ msgid "" "that it is not hashable." msgstr "" +#: ../../c-api/object.rst:476 msgid "" "Returns ``1`` if the object *o* is considered to be true, and ``0`` " "otherwise. This is equivalent to the Python expression ``not not o``. On " "failure, return ``-1``." msgstr "" +#: ../../c-api/object.rst:483 msgid "" "Returns ``0`` if the object *o* is considered to be true, and ``1`` " "otherwise. This is equivalent to the Python expression ``not o``. On " "failure, return ``-1``." msgstr "" +#: ../../c-api/object.rst:492 msgid "" "When *o* is non-``NULL``, returns a type object corresponding to the object " "type of object *o*. On failure, raises :exc:`SystemError` and returns " @@ -478,11 +637,13 @@ msgid "" "when a new :term:`strong reference` is needed." msgstr "" +#: ../../c-api/object.rst:504 msgid "" "Return non-zero if the object *o* is of type *type* or a subtype of *type*, " "and ``0`` otherwise. Both parameters must be non-``NULL``." msgstr "" +#: ../../c-api/object.rst:513 msgid "" "Return the length of object *o*. If the object *o* provides either the " "sequence and mapping protocols, the sequence length is returned. On error, " @@ -490,6 +651,7 @@ msgid "" "``len(o)``." msgstr "" +#: ../../c-api/object.rst:520 msgid "" "Return an estimated length for the object *o*. First try to return its " "actual length, then an estimate using :meth:`~object.__length_hint__`, and " @@ -498,28 +660,33 @@ msgid "" "defaultvalue)``." msgstr "" +#: ../../c-api/object.rst:530 msgid "" "Return element of *o* corresponding to the object *key* or ``NULL`` on " "failure. This is the equivalent of the Python expression ``o[key]``." msgstr "" +#: ../../c-api/object.rst:536 msgid "" "Map the object *key* to the value *v*. Raise an exception and return ``-1`` " "on failure; return ``0`` on success. This is the equivalent of the Python " "statement ``o[key] = v``. This function *does not* steal a reference to *v*." msgstr "" +#: ../../c-api/object.rst:544 msgid "" "Remove the mapping for the object *key* from the object *o*. Return ``-1`` " "on failure. This is equivalent to the Python statement ``del o[key]``." msgstr "" +#: ../../c-api/object.rst:550 msgid "" "This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as a :" "c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" "`PyObject*`." msgstr "" +#: ../../c-api/object.rst:557 msgid "" "This is equivalent to the Python expression ``dir(o)``, returning a " "(possibly empty) list of strings appropriate for the object argument, or " @@ -529,6 +696,7 @@ msgid "" "`PyErr_Occurred` will return false." msgstr "" +#: ../../c-api/object.rst:566 msgid "" "This is equivalent to the Python expression ``iter(o)``. It returns a new " "iterator for the object argument, or the object itself if the object is " @@ -536,12 +704,14 @@ msgid "" "object cannot be iterated." msgstr "" +#: ../../c-api/object.rst:574 msgid "" "This is equivalent to the Python ``__iter__(self): return self`` method. It " "is intended for :term:`iterator` types, to be used in the :c:member:" "`PyTypeObject.tp_iter` slot." msgstr "" +#: ../../c-api/object.rst:580 msgid "" "This is the equivalent to the Python expression ``aiter(o)``. Takes an :" "class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it. " @@ -550,63 +720,77 @@ msgid "" "``NULL`` if the object cannot be iterated." msgstr "" +#: ../../c-api/object.rst:590 msgid "Get a pointer to subclass-specific data reserved for *cls*." msgstr "" +#: ../../c-api/object.rst:592 msgid "" "The object *o* must be an instance of *cls*, and *cls* must have been " "created using negative :c:member:`PyType_Spec.basicsize`. Python does not " "check this." msgstr "" +#: ../../c-api/object.rst:596 msgid "On error, set an exception and return ``NULL``." msgstr "" +#: ../../c-api/object.rst:602 msgid "" "Return the size of the instance memory space reserved for *cls*, i.e. the " "size of the memory :c:func:`PyObject_GetTypeData` returns." msgstr "" +#: ../../c-api/object.rst:605 msgid "" "This may be larger than requested using :c:member:`-PyType_Spec.basicsize " "`; it is safe to use this larger size (e.g. with :c:" "func:`!memset`)." msgstr "" +#: ../../c-api/object.rst:608 msgid "" "The type *cls* **must** have been created using negative :c:member:" "`PyType_Spec.basicsize`. Python does not check this." msgstr "" +#: ../../c-api/object.rst:612 msgid "On error, set an exception and return a negative value." msgstr "" +#: ../../c-api/object.rst:618 msgid "" "Get a pointer to per-item data for a class with :c:macro:" "`Py_TPFLAGS_ITEMS_AT_END`." msgstr "" +#: ../../c-api/object.rst:621 msgid "" "On error, set an exception and return ``NULL``. :py:exc:`TypeError` is " "raised if *o* does not have :c:macro:`Py_TPFLAGS_ITEMS_AT_END` set." msgstr "" +#: ../../c-api/object.rst:629 msgid "Visit the managed dictionary of *obj*." msgstr "" +#: ../../c-api/object.rst:631 msgid "" "This function must only be called in a traverse function of the type which " "has the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set." msgstr "" +#: ../../c-api/object.rst:638 msgid "Clear the managed dictionary of *obj*." msgstr "" +#: ../../c-api/object.rst:640 msgid "" "This function must only be called in a clear function of the type which has " "the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set." msgstr "" +#: ../../c-api/object.rst:647 msgid "" "Enable `deferred reference counting `_ on *obj*, if supported by the runtime. In " @@ -617,6 +801,7 @@ msgid "" "no longer has any references to it." msgstr "" +#: ../../c-api/object.rst:654 msgid "" "This function returns ``1`` if deferred reference counting is enabled on " "*obj*, and ``0`` if deferred reference counting is not supported or if the " @@ -625,6 +810,7 @@ msgid "" "cannot fail." msgstr "" +#: ../../c-api/object.rst:659 msgid "" "This function does nothing on builds with the :term:`GIL` enabled, which do " "not support deferred reference counting. This also does nothing if *obj* is " @@ -632,12 +818,14 @@ msgid "" "and :c:func:`PyObject_GC_IsTracked`)." msgstr "" +#: ../../c-api/object.rst:664 msgid "" "This function is intended to be used soon after *obj* is created, by the " "code that creates it, such as in the object's :c:member:`~PyTypeObject." "tp_new` slot." msgstr "" +#: ../../c-api/object.rst:672 msgid "" "Check if *obj* is a unique temporary object. Returns ``1`` if *obj* is known " "to be a unique temporary object, and ``0`` otherwise. This function cannot " @@ -645,6 +833,7 @@ msgid "" "if *obj* is a unique temporary object." msgstr "" +#: ../../c-api/object.rst:678 msgid "" "If an object is a unique temporary, it is guaranteed that the current code " "has the only reference to the object. For arguments to C functions, this " @@ -656,54 +845,65 @@ msgid "" "argument uniquely referenced." msgstr "" +#: ../../c-api/object.rst:687 msgid "" "In the example below, ``my_func`` is called with a unique temporary object " "as its argument::" msgstr "" +#: ../../c-api/object.rst:690 msgid "my_func([1, 2, 3])" msgstr "" +#: ../../c-api/object.rst:692 msgid "" "In the example below, ``my_func`` is **not** called with a unique temporary " "object as its argument, even if its refcount is ``1``::" msgstr "" +#: ../../c-api/object.rst:695 msgid "" "my_list = [1, 2, 3]\n" "my_func(my_list)" msgstr "" +#: ../../c-api/object.rst:698 msgid "See also the function :c:func:`Py_REFCNT`." msgstr "" +#: ../../c-api/object.rst:704 msgid "" "This function returns non-zero if *obj* is :term:`immortal`, and zero " "otherwise. This function cannot fail." msgstr "" +#: ../../c-api/object.rst:709 msgid "" "Objects that are immortal in one CPython version are not guaranteed to be " "immortal in another." msgstr "" +#: ../../c-api/object.rst:716 msgid "" "Increments the reference count of *obj* if it is not zero. Returns ``1`` if " "the object's reference count was successfully incremented. Otherwise, this " "function returns ``0``." msgstr "" +#: ../../c-api/object.rst:720 msgid "" ":c:func:`PyUnstable_EnableTryIncRef` must have been called earlier on *obj* " -"or this function may spuriously return ``0`` in the :term:`free threading` " -"build." +"or this function may spuriously return ``0`` in the :term:`free-threaded " +"build`." msgstr "" +#: ../../c-api/object.rst:724 msgid "" "This function is logically equivalent to the following C code, except that " -"it behaves atomically in the :term:`free threading` build::" +"it behaves atomically in the :term:`free-threaded build`::" msgstr "" +#: ../../c-api/object.rst:727 msgid "" "if (Py_REFCNT(op) > 0) {\n" " Py_INCREF(op);\n" @@ -712,11 +912,13 @@ msgid "" "return 0;" msgstr "" +#: ../../c-api/object.rst:733 msgid "" "This is intended as a building block for managing weak references without " "the overhead of a Python :ref:`weak reference object `." msgstr "" +#: ../../c-api/object.rst:736 msgid "" "Typically, correct use of this function requires support from *obj*'s " "deallocator (:c:member:`~PyTypeObject.tp_dealloc`). For example, the " @@ -724,6 +926,7 @@ msgid "" "a :py:class:`~weakref.WeakValueDictionary` for a specific type:" msgstr "" +#: ../../c-api/object.rst:742 msgid "" "PyMutex mutex;\n" "\n" @@ -768,55 +971,95 @@ msgid "" "}" msgstr "" +#: ../../c-api/object.rst:790 msgid "" "Enables subsequent uses of :c:func:`PyUnstable_TryIncRef` on *obj*. The " "caller must hold a :term:`strong reference` to *obj* when calling this." msgstr "" +#: ../../c-api/object.rst:797 msgid "Determine if *op* only has one reference." msgstr "" +#: ../../c-api/object.rst:799 msgid "" "On GIL-enabled builds, this function is equivalent to :c:expr:`Py_REFCNT(op) " "== 1`." msgstr "" +#: ../../c-api/object.rst:802 msgid "" -"On a :term:`free threaded ` build, this checks if *op*'s :" -"term:`reference count` is equal to one and additionally checks if *op* is " -"only used by this thread. :c:expr:`Py_REFCNT(op) == 1` is **not** thread-" -"safe on free threaded builds; prefer this function." +"On a :term:`free-threaded build`, this checks if *op*'s :term:`reference " +"count` is equal to one and additionally checks if *op* is only used by this " +"thread. :c:expr:`Py_REFCNT(op) == 1` is **not** thread-safe on free-threaded " +"builds; prefer this function." msgstr "" +#: ../../c-api/object.rst:807 msgid "" "The caller must hold an :term:`attached thread state`, despite the fact that " "this function doesn't call into the Python interpreter. This function cannot " "fail." msgstr "" +#: ../../c-api/object.rst:815 +msgid "" +"Marks the object *op* :term:`immortal`. The argument should be uniquely " +"referenced by the calling thread. This is intended to be used for reducing " +"reference counting contention in the :term:`free-threaded build` for objects " +"which are shared across threads." +msgstr "" + +#: ../../c-api/object.rst:819 +msgid "" +"This is a one-way process: objects can only be made immortal; they cannot be " +"made mortal once again. Immortal objects do not participate in reference " +"counting and will never be garbage collected. If the object is GC-tracked, " +"it is untracked." +msgstr "" + +#: ../../c-api/object.rst:823 +msgid "" +"This function is intended to be used soon after *op* is created, by the code " +"that creates it, such as in the object's :c:member:`~PyTypeObject.tp_new` " +"slot. Returns 1 if the object was made immortal and returns 0 if it was not. " +"This function cannot fail." +msgstr "" + +#: ../../c-api/object.rst:360 ../../c-api/object.rst:374 +#: ../../c-api/object.rst:403 ../../c-api/object.rst:456 +#: ../../c-api/object.rst:490 ../../c-api/object.rst:511 msgid "built-in function" msgstr "" +#: ../../c-api/object.rst:360 msgid "repr" msgstr "" +#: ../../c-api/object.rst:374 msgid "ascii" msgstr "" +#: ../../c-api/object.rst:384 msgid "string" msgstr "" +#: ../../c-api/object.rst:384 msgid "PyObject_Str (C function)" msgstr "" +#: ../../c-api/object.rst:403 msgid "bytes" msgstr "" +#: ../../c-api/object.rst:456 msgid "hash" msgstr "" +#: ../../c-api/object.rst:490 msgid "type" msgstr "Typ" +#: ../../c-api/object.rst:511 msgid "len" msgstr "" diff --git a/c-api/object.po~ b/c-api/object.po~ new file mode 100644 index 00000000..fb4d3e8f --- /dev/null +++ b/c-api/object.po~ @@ -0,0 +1,822 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-13 14:15+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Object Protocol" +msgstr "" + +msgid "Get a :term:`strong reference` to a constant." +msgstr "" + +msgid "Set an exception and return ``NULL`` if *constant_id* is invalid." +msgstr "" + +msgid "*constant_id* must be one of these constant identifiers:" +msgstr "" + +msgid "Constant Identifier" +msgstr "" + +msgid "Value" +msgstr "" + +msgid "Returned object" +msgstr "" + +msgid "``0``" +msgstr "" + +msgid ":py:data:`None`" +msgstr "" + +msgid "``1``" +msgstr "" + +msgid ":py:data:`False`" +msgstr "" + +msgid "``2``" +msgstr "" + +msgid ":py:data:`True`" +msgstr "" + +msgid "``3``" +msgstr "" + +msgid ":py:data:`Ellipsis`" +msgstr "" + +msgid "``4``" +msgstr "" + +msgid ":py:data:`NotImplemented`" +msgstr "" + +msgid "``5``" +msgstr "" + +msgid "``6``" +msgstr "" + +msgid "``7``" +msgstr "" + +msgid "``''``" +msgstr "" + +msgid "``8``" +msgstr "" + +msgid "``b''``" +msgstr "" + +msgid "``9``" +msgstr "" + +msgid "``()``" +msgstr "" + +msgid "" +"Numeric values are only given for projects which cannot use the constant " +"identifiers." +msgstr "" + +msgid "In CPython, all of these constants are :term:`immortal`." +msgstr "" + +msgid "" +"Similar to :c:func:`Py_GetConstant`, but return a :term:`borrowed reference`." +msgstr "" + +msgid "" +"This function is primarily intended for backwards compatibility: using :c:" +"func:`Py_GetConstant` is recommended for new code." +msgstr "" + +msgid "" +"The reference is borrowed from the interpreter, and is valid until the " +"interpreter finalization." +msgstr "" + +msgid "" +"The ``NotImplemented`` singleton, used to signal that an operation is not " +"implemented for the given type combination." +msgstr "" + +msgid "" +"Properly handle returning :c:data:`Py_NotImplemented` from within a C " +"function (that is, create a new :term:`strong reference` to :const:" +"`NotImplemented` and return it)." +msgstr "" + +msgid "" +"Flag to be used with multiple functions that print the object (like :c:func:" +"`PyObject_Print` and :c:func:`PyFile_WriteObject`). If passed, these " +"function would use the :func:`str` of the object instead of the :func:`repr`." +msgstr "" + +msgid "" +"Print an object *o*, on file *fp*. Returns ``-1`` on error. The flags " +"argument is used to enable certain printing options. The only option " +"currently supported is :c:macro:`Py_PRINT_RAW`; if given, the :func:`str` of " +"the object is written instead of the :func:`repr`." +msgstr "" + +msgid "" +"Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. " +"This is equivalent to the Python expression ``hasattr(o, attr_name)``. On " +"failure, return ``-1``." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyObject_HasAttrWithError`, but *attr_name* is " +"specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." +msgstr "" + +msgid "" +"Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. " +"This function always succeeds." +msgstr "" + +msgid "" +"Exceptions that occur when this calls :meth:`~object.__getattr__` and :meth:" +"`~object.__getattribute__` methods aren't propagated, but instead given to :" +"func:`sys.unraisablehook`. For proper error handling, use :c:func:" +"`PyObject_HasAttrWithError`, :c:func:`PyObject_GetOptionalAttr` or :c:func:" +"`PyObject_GetAttr` instead." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyObject_HasAttr`, but *attr_name* is specified " +"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "" +"Exceptions that occur when this calls :meth:`~object.__getattr__` and :meth:" +"`~object.__getattribute__` methods or while creating the temporary :class:" +"`str` object are silently ignored. For proper error handling, use :c:func:" +"`PyObject_HasAttrStringWithError`, :c:func:`PyObject_GetOptionalAttrString` " +"or :c:func:`PyObject_GetAttrString` instead." +msgstr "" + +msgid "" +"Retrieve an attribute named *attr_name* from object *o*. Returns the " +"attribute value on success, or ``NULL`` on failure. This is the equivalent " +"of the Python expression ``o.attr_name``." +msgstr "" + +msgid "" +"If the missing attribute should not be treated as a failure, you can use :c:" +"func:`PyObject_GetOptionalAttr` instead." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyObject_GetAttr`, but *attr_name* is specified " +"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "" +"If the missing attribute should not be treated as a failure, you can use :c:" +"func:`PyObject_GetOptionalAttrString` instead." +msgstr "" + +msgid "" +"Variant of :c:func:`PyObject_GetAttr` which doesn't raise :exc:" +"`AttributeError` if the attribute is not found." +msgstr "" + +msgid "" +"If the attribute is found, return ``1`` and set *\\*result* to a new :term:" +"`strong reference` to the attribute. If the attribute is not found, return " +"``0`` and set *\\*result* to ``NULL``; the :exc:`AttributeError` is " +"silenced. If an error other than :exc:`AttributeError` is raised, return " +"``-1`` and set *\\*result* to ``NULL``." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyObject_GetOptionalAttr`, but *attr_name* is " +"specified as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than " +"a :c:expr:`PyObject*`." +msgstr "" + +msgid "" +"Generic attribute getter function that is meant to be put into a type " +"object's ``tp_getattro`` slot. It looks for a descriptor in the dictionary " +"of classes in the object's MRO as well as an attribute in the object's :attr:" +"`~object.__dict__` (if present). As outlined in :ref:`descriptors`, data " +"descriptors take preference over instance attributes, while non-data " +"descriptors don't. Otherwise, an :exc:`AttributeError` is raised." +msgstr "" + +msgid "" +"Set the value of the attribute named *attr_name*, for object *o*, to the " +"value *v*. Raise an exception and return ``-1`` on failure; return ``0`` on " +"success. This is the equivalent of the Python statement ``o.attr_name = v``." +msgstr "" + +msgid "" +"If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated " +"in favour of using :c:func:`PyObject_DelAttr`, but there are currently no " +"plans to remove it." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyObject_SetAttr`, but *attr_name* is specified " +"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "" +"If *v* is ``NULL``, the attribute is deleted, but this feature is deprecated " +"in favour of using :c:func:`PyObject_DelAttrString`." +msgstr "" + +msgid "" +"The number of different attribute names passed to this function should be " +"kept small, usually by using a statically allocated string as *attr_name*. " +"For attribute names that aren't known at compile time, prefer calling :c:" +"func:`PyUnicode_FromString` and :c:func:`PyObject_SetAttr` directly. For " +"more details, see :c:func:`PyUnicode_InternFromString`, which may be used " +"internally to create a key object." +msgstr "" + +msgid "" +"Generic attribute setter and deleter function that is meant to be put into a " +"type object's :c:member:`~PyTypeObject.tp_setattro` slot. It looks for a " +"data descriptor in the dictionary of classes in the object's MRO, and if " +"found it takes preference over setting or deleting the attribute in the " +"instance dictionary. Otherwise, the attribute is set or deleted in the " +"object's :attr:`~object.__dict__` (if present). On success, ``0`` is " +"returned, otherwise an :exc:`AttributeError` is raised and ``-1`` is " +"returned." +msgstr "" + +msgid "" +"Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on " +"failure. This is the equivalent of the Python statement ``del o.attr_name``." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyObject_DelAttr`, but *attr_name* is specified " +"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "" +"The number of different attribute names passed to this function should be " +"kept small, usually by using a statically allocated string as *attr_name*. " +"For attribute names that aren't known at compile time, prefer calling :c:" +"func:`PyUnicode_FromString` and :c:func:`PyObject_DelAttr` directly. For " +"more details, see :c:func:`PyUnicode_InternFromString`, which may be used " +"internally to create a key object for lookup." +msgstr "" + +msgid "" +"A generic implementation for the getter of a ``__dict__`` descriptor. It " +"creates the dictionary if necessary." +msgstr "" + +msgid "" +"This function may also be called to get the :py:attr:`~object.__dict__` of " +"the object *o*. Pass ``NULL`` for *context* when calling it. Since this " +"function may need to allocate memory for the dictionary, it may be more " +"efficient to call :c:func:`PyObject_GetAttr` when accessing an attribute on " +"the object." +msgstr "" + +msgid "On failure, returns ``NULL`` with an exception set." +msgstr "" + +msgid "" +"A generic implementation for the setter of a ``__dict__`` descriptor. This " +"implementation does not allow the dictionary to be deleted." +msgstr "" + +msgid "" +"Return a pointer to :py:attr:`~object.__dict__` of the object *obj*. If " +"there is no ``__dict__``, return ``NULL`` without setting an exception." +msgstr "" + +msgid "" +"This function may need to allocate memory for the dictionary, so it may be " +"more efficient to call :c:func:`PyObject_GetAttr` when accessing an " +"attribute on the object." +msgstr "" + +msgid "" +"Compare the values of *o1* and *o2* using the operation specified by *opid*, " +"which must be one of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`, :" +"c:macro:`Py_NE`, :c:macro:`Py_GT`, or :c:macro:`Py_GE`, corresponding to " +"``<``, ``<=``, ``==``, ``!=``, ``>``, or ``>=`` respectively. This is the " +"equivalent of the Python expression ``o1 op o2``, where ``op`` is the " +"operator corresponding to *opid*. Returns the value of the comparison on " +"success, or ``NULL`` on failure." +msgstr "" + +msgid "" +"Compare the values of *o1* and *o2* using the operation specified by *opid*, " +"like :c:func:`PyObject_RichCompare`, but returns ``-1`` on error, ``0`` if " +"the result is false, ``1`` otherwise." +msgstr "" + +msgid "" +"If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` " +"will always return ``1`` for :c:macro:`Py_EQ` and ``0`` for :c:macro:`Py_NE`." +msgstr "" + +msgid "" +"Format *obj* using *format_spec*. This is equivalent to the Python " +"expression ``format(obj, format_spec)``." +msgstr "" + +msgid "" +"*format_spec* may be ``NULL``. In this case the call is equivalent to " +"``format(obj)``. Returns the formatted string on success, ``NULL`` on " +"failure." +msgstr "" + +msgid "" +"Compute a string representation of object *o*. Returns the string " +"representation on success, ``NULL`` on failure. This is the equivalent of " +"the Python expression ``repr(o)``. Called by the :func:`repr` built-in " +"function." +msgstr "" + +msgid "" +"This function now includes a debug assertion to help ensure that it does not " +"silently discard an active exception." +msgstr "" + +msgid "" +"As :c:func:`PyObject_Repr`, compute a string representation of object *o*, " +"but escape the non-ASCII characters in the string returned by :c:func:" +"`PyObject_Repr` with ``\\x``, ``\\u`` or ``\\U`` escapes. This generates a " +"string similar to that returned by :c:func:`PyObject_Repr` in Python 2. " +"Called by the :func:`ascii` built-in function." +msgstr "" + +msgid "" +"Compute a string representation of object *o*. Returns the string " +"representation on success, ``NULL`` on failure. This is the equivalent of " +"the Python expression ``str(o)``. Called by the :func:`str` built-in " +"function and, therefore, by the :func:`print` function." +msgstr "" + +msgid "" +"Compute a bytes representation of object *o*. ``NULL`` is returned on " +"failure and a bytes object on success. This is equivalent to the Python " +"expression ``bytes(o)``, when *o* is not an integer. Unlike ``bytes(o)``, a " +"TypeError is raised when *o* is an integer instead of a zero-initialized " +"bytes object." +msgstr "" + +msgid "" +"Return ``1`` if the class *derived* is identical to or derived from the " +"class *cls*, otherwise return ``0``. In case of an error, return ``-1``." +msgstr "" + +msgid "" +"If *cls* is a tuple, the check will be done against every entry in *cls*. " +"The result will be ``1`` when at least one of the checks returns ``1``, " +"otherwise it will be ``0``." +msgstr "" + +msgid "" +"If *cls* has a :meth:`~type.__subclasscheck__` method, it will be called to " +"determine the subclass status as described in :pep:`3119`. Otherwise, " +"*derived* is a subclass of *cls* if it is a direct or indirect subclass, i." +"e. contained in :attr:`cls.__mro__ `." +msgstr "" + +msgid "" +"Normally only class objects, i.e. instances of :class:`type` or a derived " +"class, are considered classes. However, objects can override this by having " +"a :attr:`~type.__bases__` attribute (which must be a tuple of base classes)." +msgstr "" + +msgid "" +"Return ``1`` if *inst* is an instance of the class *cls* or a subclass of " +"*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception." +msgstr "" + +msgid "" +"If *cls* has a :meth:`~type.__instancecheck__` method, it will be called to " +"determine the subclass status as described in :pep:`3119`. Otherwise, " +"*inst* is an instance of *cls* if its class is a subclass of *cls*." +msgstr "" + +msgid "" +"An instance *inst* can override what is considered its class by having a :" +"attr:`~object.__class__` attribute." +msgstr "" + +msgid "" +"An object *cls* can override if it is considered a class, and what its base " +"classes are, by having a :attr:`~type.__bases__` attribute (which must be a " +"tuple of base classes)." +msgstr "" + +msgid "" +"Compute and return the hash value of an object *o*. On failure, return " +"``-1``. This is the equivalent of the Python expression ``hash(o)``." +msgstr "" + +msgid "" +"The return type is now Py_hash_t. This is a signed integer the same size " +"as :c:type:`Py_ssize_t`." +msgstr "" + +msgid "" +"Set a :exc:`TypeError` indicating that ``type(o)`` is not :term:`hashable` " +"and return ``-1``. This function receives special treatment when stored in a " +"``tp_hash`` slot, allowing a type to explicitly indicate to the interpreter " +"that it is not hashable." +msgstr "" + +msgid "" +"Returns ``1`` if the object *o* is considered to be true, and ``0`` " +"otherwise. This is equivalent to the Python expression ``not not o``. On " +"failure, return ``-1``." +msgstr "" + +msgid "" +"Returns ``0`` if the object *o* is considered to be true, and ``1`` " +"otherwise. This is equivalent to the Python expression ``not o``. On " +"failure, return ``-1``." +msgstr "" + +msgid "" +"When *o* is non-``NULL``, returns a type object corresponding to the object " +"type of object *o*. On failure, raises :exc:`SystemError` and returns " +"``NULL``. This is equivalent to the Python expression ``type(o)``. This " +"function creates a new :term:`strong reference` to the return value. There's " +"really no reason to use this function instead of the :c:func:`Py_TYPE()` " +"function, which returns a pointer of type :c:expr:`PyTypeObject*`, except " +"when a new :term:`strong reference` is needed." +msgstr "" + +msgid "" +"Return non-zero if the object *o* is of type *type* or a subtype of *type*, " +"and ``0`` otherwise. Both parameters must be non-``NULL``." +msgstr "" + +msgid "" +"Return the length of object *o*. If the object *o* provides either the " +"sequence and mapping protocols, the sequence length is returned. On error, " +"``-1`` is returned. This is the equivalent to the Python expression " +"``len(o)``." +msgstr "" + +msgid "" +"Return an estimated length for the object *o*. First try to return its " +"actual length, then an estimate using :meth:`~object.__length_hint__`, and " +"finally return the default value. On error return ``-1``. This is the " +"equivalent to the Python expression ``operator.length_hint(o, " +"defaultvalue)``." +msgstr "" + +msgid "" +"Return element of *o* corresponding to the object *key* or ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o[key]``." +msgstr "" + +msgid "" +"Map the object *key* to the value *v*. Raise an exception and return ``-1`` " +"on failure; return ``0`` on success. This is the equivalent of the Python " +"statement ``o[key] = v``. This function *does not* steal a reference to *v*." +msgstr "" + +msgid "" +"Remove the mapping for the object *key* from the object *o*. Return ``-1`` " +"on failure. This is equivalent to the Python statement ``del o[key]``." +msgstr "" + +msgid "" +"This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as a :" +"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +msgid "" +"This is equivalent to the Python expression ``dir(o)``, returning a " +"(possibly empty) list of strings appropriate for the object argument, or " +"``NULL`` if there was an error. If the argument is ``NULL``, this is like " +"the Python ``dir()``, returning the names of the current locals; in this " +"case, if no execution frame is active then ``NULL`` is returned but :c:func:" +"`PyErr_Occurred` will return false." +msgstr "" + +msgid "" +"This is equivalent to the Python expression ``iter(o)``. It returns a new " +"iterator for the object argument, or the object itself if the object is " +"already an iterator. Raises :exc:`TypeError` and returns ``NULL`` if the " +"object cannot be iterated." +msgstr "" + +msgid "" +"This is equivalent to the Python ``__iter__(self): return self`` method. It " +"is intended for :term:`iterator` types, to be used in the :c:member:" +"`PyTypeObject.tp_iter` slot." +msgstr "" + +msgid "" +"This is the equivalent to the Python expression ``aiter(o)``. Takes an :" +"class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it. " +"This is typically a new iterator but if the argument is an :class:" +"`AsyncIterator`, this returns itself. Raises :exc:`TypeError` and returns " +"``NULL`` if the object cannot be iterated." +msgstr "" + +msgid "Get a pointer to subclass-specific data reserved for *cls*." +msgstr "" + +msgid "" +"The object *o* must be an instance of *cls*, and *cls* must have been " +"created using negative :c:member:`PyType_Spec.basicsize`. Python does not " +"check this." +msgstr "" + +msgid "On error, set an exception and return ``NULL``." +msgstr "" + +msgid "" +"Return the size of the instance memory space reserved for *cls*, i.e. the " +"size of the memory :c:func:`PyObject_GetTypeData` returns." +msgstr "" + +msgid "" +"This may be larger than requested using :c:member:`-PyType_Spec.basicsize " +"`; it is safe to use this larger size (e.g. with :c:" +"func:`!memset`)." +msgstr "" + +msgid "" +"The type *cls* **must** have been created using negative :c:member:" +"`PyType_Spec.basicsize`. Python does not check this." +msgstr "" + +msgid "On error, set an exception and return a negative value." +msgstr "" + +msgid "" +"Get a pointer to per-item data for a class with :c:macro:" +"`Py_TPFLAGS_ITEMS_AT_END`." +msgstr "" + +msgid "" +"On error, set an exception and return ``NULL``. :py:exc:`TypeError` is " +"raised if *o* does not have :c:macro:`Py_TPFLAGS_ITEMS_AT_END` set." +msgstr "" + +msgid "Visit the managed dictionary of *obj*." +msgstr "" + +msgid "" +"This function must only be called in a traverse function of the type which " +"has the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set." +msgstr "" + +msgid "Clear the managed dictionary of *obj*." +msgstr "" + +msgid "" +"This function must only be called in a clear function of the type which has " +"the :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag set." +msgstr "" + +msgid "" +"Enable `deferred reference counting `_ on *obj*, if supported by the runtime. In " +"the :term:`free-threaded ` build, this allows the " +"interpreter to avoid reference count adjustments to *obj*, which may improve " +"multi-threaded performance. The tradeoff is that *obj* will only be " +"deallocated by the tracing garbage collector, and not when the interpreter " +"no longer has any references to it." +msgstr "" + +msgid "" +"This function returns ``1`` if deferred reference counting is enabled on " +"*obj*, and ``0`` if deferred reference counting is not supported or if the " +"hint was ignored by the interpreter, such as when deferred reference " +"counting is already enabled on *obj*. This function is thread-safe, and " +"cannot fail." +msgstr "" + +msgid "" +"This function does nothing on builds with the :term:`GIL` enabled, which do " +"not support deferred reference counting. This also does nothing if *obj* is " +"not an object tracked by the garbage collector (see :func:`gc.is_tracked` " +"and :c:func:`PyObject_GC_IsTracked`)." +msgstr "" + +msgid "" +"This function is intended to be used soon after *obj* is created, by the " +"code that creates it, such as in the object's :c:member:`~PyTypeObject." +"tp_new` slot." +msgstr "" + +msgid "" +"Check if *obj* is a unique temporary object. Returns ``1`` if *obj* is known " +"to be a unique temporary object, and ``0`` otherwise. This function cannot " +"fail, but the check is conservative, and may return ``0`` in some cases even " +"if *obj* is a unique temporary object." +msgstr "" + +msgid "" +"If an object is a unique temporary, it is guaranteed that the current code " +"has the only reference to the object. For arguments to C functions, this " +"should be used instead of checking if the reference count is ``1``. Starting " +"with Python 3.14, the interpreter internally avoids some reference count " +"modifications when loading objects onto the operands stack by :term:" +"`borrowing ` references when possible, which means that " +"a reference count of ``1`` by itself does not guarantee that a function " +"argument uniquely referenced." +msgstr "" + +msgid "" +"In the example below, ``my_func`` is called with a unique temporary object " +"as its argument::" +msgstr "" + +msgid "my_func([1, 2, 3])" +msgstr "" + +msgid "" +"In the example below, ``my_func`` is **not** called with a unique temporary " +"object as its argument, even if its refcount is ``1``::" +msgstr "" + +msgid "" +"my_list = [1, 2, 3]\n" +"my_func(my_list)" +msgstr "" + +msgid "See also the function :c:func:`Py_REFCNT`." +msgstr "" + +msgid "" +"This function returns non-zero if *obj* is :term:`immortal`, and zero " +"otherwise. This function cannot fail." +msgstr "" + +msgid "" +"Objects that are immortal in one CPython version are not guaranteed to be " +"immortal in another." +msgstr "" + +msgid "" +"Increments the reference count of *obj* if it is not zero. Returns ``1`` if " +"the object's reference count was successfully incremented. Otherwise, this " +"function returns ``0``." +msgstr "" + +msgid "" +":c:func:`PyUnstable_EnableTryIncRef` must have been called earlier on *obj* " +"or this function may spuriously return ``0`` in the :term:`free threading` " +"build." +msgstr "" + +msgid "" +"This function is logically equivalent to the following C code, except that " +"it behaves atomically in the :term:`free threading` build::" +msgstr "" + +msgid "" +"if (Py_REFCNT(op) > 0) {\n" +" Py_INCREF(op);\n" +" return 1;\n" +"}\n" +"return 0;" +msgstr "" + +msgid "" +"This is intended as a building block for managing weak references without " +"the overhead of a Python :ref:`weak reference object `." +msgstr "" + +msgid "" +"Typically, correct use of this function requires support from *obj*'s " +"deallocator (:c:member:`~PyTypeObject.tp_dealloc`). For example, the " +"following sketch could be adapted to implement a \"weakmap\" that works like " +"a :py:class:`~weakref.WeakValueDictionary` for a specific type:" +msgstr "" + +msgid "" +"PyMutex mutex;\n" +"\n" +"PyObject *\n" +"add_entry(weakmap_key_type *key, PyObject *value)\n" +"{\n" +" PyUnstable_EnableTryIncRef(value);\n" +" weakmap_type weakmap = ...;\n" +" PyMutex_Lock(&mutex);\n" +" weakmap_add_entry(weakmap, key, value);\n" +" PyMutex_Unlock(&mutex);\n" +" Py_RETURN_NONE;\n" +"}\n" +"\n" +"PyObject *\n" +"get_value(weakmap_key_type *key)\n" +"{\n" +" weakmap_type weakmap = ...;\n" +" PyMutex_Lock(&mutex);\n" +" PyObject *result = weakmap_find(weakmap, key);\n" +" if (PyUnstable_TryIncRef(result)) {\n" +" // `result` is safe to use\n" +" PyMutex_Unlock(&mutex);\n" +" return result;\n" +" }\n" +" // if we get here, `result` is starting to be garbage-collected,\n" +" // but has not been removed from the weakmap yet\n" +" PyMutex_Unlock(&mutex);\n" +" return NULL;\n" +"}\n" +"\n" +"// tp_dealloc function for weakmap values\n" +"void\n" +"value_dealloc(PyObject *value)\n" +"{\n" +" weakmap_type weakmap = ...;\n" +" PyMutex_Lock(&mutex);\n" +" weakmap_remove_value(weakmap, value);\n" +"\n" +" ...\n" +" PyMutex_Unlock(&mutex);\n" +"}" +msgstr "" + +msgid "" +"Enables subsequent uses of :c:func:`PyUnstable_TryIncRef` on *obj*. The " +"caller must hold a :term:`strong reference` to *obj* when calling this." +msgstr "" + +msgid "Determine if *op* only has one reference." +msgstr "" + +msgid "" +"On GIL-enabled builds, this function is equivalent to :c:expr:`Py_REFCNT(op) " +"== 1`." +msgstr "" + +msgid "" +"On a :term:`free threaded ` build, this checks if *op*'s :" +"term:`reference count` is equal to one and additionally checks if *op* is " +"only used by this thread. :c:expr:`Py_REFCNT(op) == 1` is **not** thread-" +"safe on free threaded builds; prefer this function." +msgstr "" + +msgid "" +"The caller must hold an :term:`attached thread state`, despite the fact that " +"this function doesn't call into the Python interpreter. This function cannot " +"fail." +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "repr" +msgstr "" + +msgid "ascii" +msgstr "" + +msgid "string" +msgstr "" + +msgid "PyObject_Str (C function)" +msgstr "" + +msgid "bytes" +msgstr "" + +msgid "hash" +msgstr "" + +msgid "type" +msgstr "Typ" + +msgid "len" +msgstr "" diff --git a/c-api/objimpl.po b/c-api/objimpl.po index 3ea267e1..127bfcdb 100644 --- a/c-api/objimpl.po +++ b/c-api/objimpl.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/objimpl.rst:7 msgid "Object Implementation Support" msgstr "" +#: ../../c-api/objimpl.rst:9 msgid "" "This chapter describes the functions, types, and macros used when defining " "new object types." diff --git a/c-api/objimpl.po~ b/c-api/objimpl.po~ new file mode 100644 index 00000000..3ea267e1 --- /dev/null +++ b/c-api/objimpl.po~ @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Object Implementation Support" +msgstr "" + +msgid "" +"This chapter describes the functions, types, and macros used when defining " +"new object types." +msgstr "" diff --git a/c-api/perfmaps.po b/c-api/perfmaps.po index c9b69d4f..c62f01cf 100644 --- a/c-api/perfmaps.po +++ b/c-api/perfmaps.po @@ -8,39 +8,45 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/perfmaps.rst:6 msgid "Support for Perf Maps" msgstr "" +#: ../../c-api/perfmaps.rst:8 msgid "" -"On supported platforms (as of this writing, only Linux), the runtime can " -"take advantage of *perf map files* to make Python functions visible to an " -"external profiling tool (such as `perf `_). A running process may create a file in the ``/tmp`` " -"directory, which contains entries that can map a section of executable code " -"to a name. This interface is described in the `documentation of the Linux " -"Perf tool `_." +"On supported platforms (Linux and macOS), the runtime can take advantage of " +"*perf map files* to make Python functions visible to an external profiling " +"tool (such as `perf `_ or " +"`samply `_). A running process may " +"create a file in the ``/tmp`` directory, which contains entries that can map " +"a section of executable code to a name. This interface is described in the " +"`documentation of the Linux Perf tool `_." msgstr "" +#: ../../c-api/perfmaps.rst:17 msgid "" "In Python, these helper APIs can be used by libraries and features that rely " "on generating machine code on the fly." msgstr "" +#: ../../c-api/perfmaps.rst:20 msgid "" "Note that holding an :term:`attached thread state` is not required for these " "APIs." msgstr "" +#: ../../c-api/perfmaps.rst:24 msgid "" "Open the ``/tmp/perf-$pid.map`` file, unless it's already opened, and create " "a lock to ensure thread-safe writes to the file (provided the writes are " @@ -50,31 +56,105 @@ msgid "" "call." msgstr "" +#: ../../c-api/perfmaps.rst:30 msgid "" "Returns ``0`` on success, ``-1`` on failure to create/open the perf map " "file, or ``-2`` on failure to create a lock. Check ``errno`` for more " "information about the cause of a failure." msgstr "" +#: ../../c-api/perfmaps.rst:36 msgid "" "Write one single entry to the ``/tmp/perf-$pid.map`` file. This function is " "thread safe. Here is what an example entry looks like::" msgstr "" +#: ../../c-api/perfmaps.rst:39 msgid "" "# address size name\n" "7f3529fcf759 b py::bar:/run/t.py" msgstr "" +#: ../../c-api/perfmaps.rst:42 msgid "" "Will call :c:func:`PyUnstable_PerfMapState_Init` before writing the entry, " "if the perf map file is not already opened. Returns ``0`` on success, or the " "same error codes as :c:func:`PyUnstable_PerfMapState_Init` on failure." msgstr "" +#: ../../c-api/perfmaps.rst:48 msgid "" "Close the perf map file opened by :c:func:`PyUnstable_PerfMapState_Init`. " "This is called by the runtime itself during interpreter shut-down. In " "general, there shouldn't be a reason to explicitly call this, except to " "handle specific scenarios such as forking." msgstr "" + +#: ../../c-api/perfmaps.rst:55 +msgid "" +"Open the ``/tmp/perf-$pid.map`` file and append the content of " +"*parent_filename* to it." +msgstr "" + +#: ../../c-api/perfmaps.rst:58 +msgid "" +"This function is available on all platforms but only generates output on " +"platforms that support perf maps (currently only Linux). On other platforms, " +"it does nothing." +msgstr "" + +#: ../../c-api/perfmaps.rst:65 +msgid "Compile the given code object using the current perf trampoline." +msgstr "" + +#: ../../c-api/perfmaps.rst:67 +msgid "" +"The \"current\" trampoline is the one set by the runtime or the most recent :" +"c:func:`PyUnstable_PerfTrampoline_SetPersistAfterFork` call." +msgstr "" + +#: ../../c-api/perfmaps.rst:70 +msgid "" +"If no trampoline is set, falls back to normal compilation (no perf map " +"entry)." +msgstr "" + +#: ../../c-api/perfmaps.rst:0 +msgid "Parameters" +msgstr "" + +#: ../../c-api/perfmaps.rst:72 +msgid "The code object to compile." +msgstr "" + +#: ../../c-api/perfmaps.rst:0 +msgid "Returns" +msgstr "" + +#: ../../c-api/perfmaps.rst:73 ../../c-api/perfmaps.rst:89 +msgid "0 on success, -1 on failure." +msgstr "" + +#: ../../c-api/perfmaps.rst:79 +msgid "Set whether the perf trampoline should persist after a fork." +msgstr "" + +#: ../../c-api/perfmaps.rst:81 +msgid "" +"If ``enable`` is true (non-zero): perf map file remains open/valid post-" +"fork. Child process inherits all existing perf map entries." +msgstr "" + +#: ../../c-api/perfmaps.rst:83 +msgid "" +"If ``enable`` is false (zero): perf map closes post-fork. Child process gets " +"empty perf map." +msgstr "" + +#: ../../c-api/perfmaps.rst:86 +msgid "Default: false (clears on fork)." +msgstr "" + +#: ../../c-api/perfmaps.rst:88 +msgid "1 to enable, 0 to disable." +msgstr "" diff --git a/c-api/perfmaps.po~ b/c-api/perfmaps.po~ new file mode 100644 index 00000000..c9b69d4f --- /dev/null +++ b/c-api/perfmaps.po~ @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Support for Perf Maps" +msgstr "" + +msgid "" +"On supported platforms (as of this writing, only Linux), the runtime can " +"take advantage of *perf map files* to make Python functions visible to an " +"external profiling tool (such as `perf `_). A running process may create a file in the ``/tmp`` " +"directory, which contains entries that can map a section of executable code " +"to a name. This interface is described in the `documentation of the Linux " +"Perf tool `_." +msgstr "" + +msgid "" +"In Python, these helper APIs can be used by libraries and features that rely " +"on generating machine code on the fly." +msgstr "" + +msgid "" +"Note that holding an :term:`attached thread state` is not required for these " +"APIs." +msgstr "" + +msgid "" +"Open the ``/tmp/perf-$pid.map`` file, unless it's already opened, and create " +"a lock to ensure thread-safe writes to the file (provided the writes are " +"done through :c:func:`PyUnstable_WritePerfMapEntry`). Normally, there's no " +"need to call this explicitly; just use :c:func:" +"`PyUnstable_WritePerfMapEntry` and it will initialize the state on first " +"call." +msgstr "" + +msgid "" +"Returns ``0`` on success, ``-1`` on failure to create/open the perf map " +"file, or ``-2`` on failure to create a lock. Check ``errno`` for more " +"information about the cause of a failure." +msgstr "" + +msgid "" +"Write one single entry to the ``/tmp/perf-$pid.map`` file. This function is " +"thread safe. Here is what an example entry looks like::" +msgstr "" + +msgid "" +"# address size name\n" +"7f3529fcf759 b py::bar:/run/t.py" +msgstr "" + +msgid "" +"Will call :c:func:`PyUnstable_PerfMapState_Init` before writing the entry, " +"if the perf map file is not already opened. Returns ``0`` on success, or the " +"same error codes as :c:func:`PyUnstable_PerfMapState_Init` on failure." +msgstr "" + +msgid "" +"Close the perf map file opened by :c:func:`PyUnstable_PerfMapState_Init`. " +"This is called by the runtime itself during interpreter shut-down. In " +"general, there shouldn't be a reason to explicitly call this, except to " +"handle specific scenarios such as forking." +msgstr "" diff --git a/c-api/refcounting.po b/c-api/refcounting.po index a374c94a..9f676799 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -11,27 +11,31 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/refcounting.rst:8 msgid "Reference Counting" msgstr "" +#: ../../c-api/refcounting.rst:10 msgid "" "The functions and macros in this section are used for managing reference " "counts of Python objects." msgstr "" +#: ../../c-api/refcounting.rst:16 msgid "Get the reference count of the Python object *o*." msgstr "" +#: ../../c-api/refcounting.rst:18 msgid "" "Note that the returned value may not actually reflect how many references to " "the object are actually held. For example, some objects are :term:" @@ -40,138 +44,172 @@ msgid "" "accurate, other than a value of 0 or 1." msgstr "" +#: ../../c-api/refcounting.rst:24 msgid "" "Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count." msgstr "" +#: ../../c-api/refcounting.rst:28 msgid "" -"On :term:`free threaded ` builds of Python, returning 1 " +"On :term:`free-threaded builds ` of Python, returning 1 " "isn't sufficient to determine if it's safe to treat *o* as having no access " "by other threads. Use :c:func:`PyUnstable_Object_IsUniquelyReferenced` for " "that instead." msgstr "" +#: ../../c-api/refcounting.rst:33 msgid "" "See also the function :c:func:" "`PyUnstable_Object_IsUniqueReferencedTemporary()`." msgstr "" +#: ../../c-api/refcounting.rst:35 msgid ":c:func:`Py_REFCNT()` is changed to the inline static function." msgstr "" +#: ../../c-api/refcounting.rst:38 msgid "The parameter type is no longer :c:expr:`const PyObject*`." msgstr "" +#: ../../c-api/refcounting.rst:44 msgid "Set the object *o* reference counter to *refcnt*." msgstr "" +#: ../../c-api/refcounting.rst:46 msgid "" "On :ref:`Python build with Free Threading `, if " "*refcnt* is larger than ``UINT32_MAX``, the object is made :term:`immortal`." msgstr "" +#: ../../c-api/refcounting.rst:49 ../../c-api/refcounting.rst:62 +#: ../../c-api/refcounting.rst:128 msgid "This function has no effect on :term:`immortal` objects." msgstr "" +#: ../../c-api/refcounting.rst:53 ../../c-api/refcounting.rst:77 +#: ../../c-api/refcounting.rst:156 msgid "Immortal objects are not modified." msgstr "" +#: ../../c-api/refcounting.rst:59 msgid "" "Indicate taking a new :term:`strong reference` to object *o*, indicating it " "is in use and should not be destroyed." msgstr "" +#: ../../c-api/refcounting.rst:64 msgid "" "This function is usually used to convert a :term:`borrowed reference` to a :" "term:`strong reference` in-place. The :c:func:`Py_NewRef` function can be " "used to create a new :term:`strong reference`." msgstr "" +#: ../../c-api/refcounting.rst:68 msgid "When done using the object, release is by calling :c:func:`Py_DECREF`." msgstr "" +#: ../../c-api/refcounting.rst:70 msgid "" "The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " "use :c:func:`Py_XINCREF`." msgstr "" +#: ../../c-api/refcounting.rst:73 msgid "" "Do not expect this function to actually modify *o* in any way. For at least :" "pep:`some objects <0683>`, this function has no effect." msgstr "" +#: ../../c-api/refcounting.rst:83 msgid "" "Similar to :c:func:`Py_INCREF`, but the object *o* can be ``NULL``, in which " "case this has no effect." msgstr "" +#: ../../c-api/refcounting.rst:86 msgid "See also :c:func:`Py_XNewRef`." msgstr "" +#: ../../c-api/refcounting.rst:91 msgid "" "Create a new :term:`strong reference` to an object: call :c:func:`Py_INCREF` " "on *o* and return the object *o*." msgstr "" +#: ../../c-api/refcounting.rst:94 msgid "" "When the :term:`strong reference` is no longer needed, :c:func:`Py_DECREF` " "should be called on it to release the reference." msgstr "" +#: ../../c-api/refcounting.rst:97 msgid "" "The object *o* must not be ``NULL``; use :c:func:`Py_XNewRef` if *o* can be " "``NULL``." msgstr "" +#: ../../c-api/refcounting.rst:100 msgid "For example::" msgstr "Zum Beispiel::" +#: ../../c-api/refcounting.rst:102 msgid "" "Py_INCREF(obj);\n" "self->attr = obj;" msgstr "" +#: ../../c-api/refcounting.rst:105 msgid "can be written as::" msgstr "" +#: ../../c-api/refcounting.rst:107 msgid "self->attr = Py_NewRef(obj);" msgstr "" +#: ../../c-api/refcounting.rst:109 msgid "See also :c:func:`Py_INCREF`." msgstr "" +#: ../../c-api/refcounting.rst:116 msgid "Similar to :c:func:`Py_NewRef`, but the object *o* can be NULL." msgstr "" +#: ../../c-api/refcounting.rst:118 msgid "If the object *o* is ``NULL``, the function just returns ``NULL``." msgstr "" +#: ../../c-api/refcounting.rst:125 msgid "" "Release a :term:`strong reference` to object *o*, indicating the reference " "is no longer used." msgstr "" +#: ../../c-api/refcounting.rst:130 msgid "" "Once the last :term:`strong reference` is released (i.e. the object's " "reference count reaches 0), the object's type's deallocation function (which " "must not be ``NULL``) is invoked." msgstr "" +#: ../../c-api/refcounting.rst:135 msgid "" "This function is usually used to delete a :term:`strong reference` before " "exiting its scope." msgstr "" +#: ../../c-api/refcounting.rst:138 msgid "" "The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " "use :c:func:`Py_XDECREF`." msgstr "" +#: ../../c-api/refcounting.rst:141 msgid "" "Do not expect this function to actually modify *o* in any way. For at least :" "pep:`some objects <683>`, this function has no effect." msgstr "" +#: ../../c-api/refcounting.rst:147 msgid "" "The deallocation function can cause arbitrary Python code to be invoked (e." "g. when a class instance with a :meth:`~object.__del__` method is " @@ -184,12 +222,14 @@ msgid "" "call :c:func:`Py_DECREF` for the temporary variable." msgstr "" +#: ../../c-api/refcounting.rst:162 msgid "" "Similar to :c:func:`Py_DECREF`, but the object *o* can be ``NULL``, in which " "case this has no effect. The same warning from :c:func:`Py_DECREF` applies " "here as well." msgstr "" +#: ../../c-api/refcounting.rst:169 msgid "" "Release a :term:`strong reference` for object *o*. The object may be " "``NULL``, in which case the macro has no effect; otherwise the effect is the " @@ -199,57 +239,69 @@ msgid "" "and sets the argument to ``NULL`` before releasing the reference." msgstr "" +#: ../../c-api/refcounting.rst:177 msgid "" "It is a good idea to use this macro whenever releasing a reference to an " "object that might be traversed during garbage collection." msgstr "" +#: ../../c-api/refcounting.rst:180 msgid "" "The macro argument is now only evaluated once. If the argument has side " "effects, these are no longer duplicated." msgstr "" +#: ../../c-api/refcounting.rst:187 msgid "" "Indicate taking a new :term:`strong reference` to object *o*. A function " "version of :c:func:`Py_XINCREF`. It can be used for runtime dynamic " "embedding of Python." msgstr "" +#: ../../c-api/refcounting.rst:194 msgid "" "Release a :term:`strong reference` to object *o*. A function version of :c:" "func:`Py_XDECREF`. It can be used for runtime dynamic embedding of Python." msgstr "" +#: ../../c-api/refcounting.rst:201 msgid "" "Macro safely releasing a :term:`strong reference` to object *dst* and " "setting *dst* to *src*." msgstr "" +#: ../../c-api/refcounting.rst:204 msgid "As in case of :c:func:`Py_CLEAR`, \"the obvious\" code can be deadly::" msgstr "" +#: ../../c-api/refcounting.rst:206 msgid "" "Py_DECREF(dst);\n" "dst = src;" msgstr "" +#: ../../c-api/refcounting.rst:209 msgid "The safe way is::" msgstr "" +#: ../../c-api/refcounting.rst:211 msgid "Py_SETREF(dst, src);" msgstr "" +#: ../../c-api/refcounting.rst:213 msgid "" "That arranges to set *dst* to *src* *before* releasing the reference to the " "old value of *dst*, so that any code triggered as a side-effect of *dst* " "getting torn down no longer believes *dst* points to a valid object." msgstr "" +#: ../../c-api/refcounting.rst:220 ../../c-api/refcounting.rst:232 msgid "" "The macro arguments are now only evaluated once. If an argument has side " "effects, these are no longer duplicated." msgstr "" +#: ../../c-api/refcounting.rst:227 msgid "" "Variant of :c:macro:`Py_SETREF` macro that uses :c:func:`Py_XDECREF` instead " "of :c:func:`Py_DECREF`." diff --git a/c-api/refcounting.po~ b/c-api/refcounting.po~ new file mode 100644 index 00000000..a374c94a --- /dev/null +++ b/c-api/refcounting.po~ @@ -0,0 +1,256 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Reference Counting" +msgstr "" + +msgid "" +"The functions and macros in this section are used for managing reference " +"counts of Python objects." +msgstr "" + +msgid "Get the reference count of the Python object *o*." +msgstr "" + +msgid "" +"Note that the returned value may not actually reflect how many references to " +"the object are actually held. For example, some objects are :term:" +"`immortal` and have a very high refcount that does not reflect the actual " +"number of references. Consequently, do not rely on the returned value to be " +"accurate, other than a value of 0 or 1." +msgstr "" + +msgid "" +"Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count." +msgstr "" + +msgid "" +"On :term:`free threaded ` builds of Python, returning 1 " +"isn't sufficient to determine if it's safe to treat *o* as having no access " +"by other threads. Use :c:func:`PyUnstable_Object_IsUniquelyReferenced` for " +"that instead." +msgstr "" + +msgid "" +"See also the function :c:func:" +"`PyUnstable_Object_IsUniqueReferencedTemporary()`." +msgstr "" + +msgid ":c:func:`Py_REFCNT()` is changed to the inline static function." +msgstr "" + +msgid "The parameter type is no longer :c:expr:`const PyObject*`." +msgstr "" + +msgid "Set the object *o* reference counter to *refcnt*." +msgstr "" + +msgid "" +"On :ref:`Python build with Free Threading `, if " +"*refcnt* is larger than ``UINT32_MAX``, the object is made :term:`immortal`." +msgstr "" + +msgid "This function has no effect on :term:`immortal` objects." +msgstr "" + +msgid "Immortal objects are not modified." +msgstr "" + +msgid "" +"Indicate taking a new :term:`strong reference` to object *o*, indicating it " +"is in use and should not be destroyed." +msgstr "" + +msgid "" +"This function is usually used to convert a :term:`borrowed reference` to a :" +"term:`strong reference` in-place. The :c:func:`Py_NewRef` function can be " +"used to create a new :term:`strong reference`." +msgstr "" + +msgid "When done using the object, release is by calling :c:func:`Py_DECREF`." +msgstr "" + +msgid "" +"The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " +"use :c:func:`Py_XINCREF`." +msgstr "" + +msgid "" +"Do not expect this function to actually modify *o* in any way. For at least :" +"pep:`some objects <0683>`, this function has no effect." +msgstr "" + +msgid "" +"Similar to :c:func:`Py_INCREF`, but the object *o* can be ``NULL``, in which " +"case this has no effect." +msgstr "" + +msgid "See also :c:func:`Py_XNewRef`." +msgstr "" + +msgid "" +"Create a new :term:`strong reference` to an object: call :c:func:`Py_INCREF` " +"on *o* and return the object *o*." +msgstr "" + +msgid "" +"When the :term:`strong reference` is no longer needed, :c:func:`Py_DECREF` " +"should be called on it to release the reference." +msgstr "" + +msgid "" +"The object *o* must not be ``NULL``; use :c:func:`Py_XNewRef` if *o* can be " +"``NULL``." +msgstr "" + +msgid "For example::" +msgstr "Zum Beispiel::" + +msgid "" +"Py_INCREF(obj);\n" +"self->attr = obj;" +msgstr "" + +msgid "can be written as::" +msgstr "" + +msgid "self->attr = Py_NewRef(obj);" +msgstr "" + +msgid "See also :c:func:`Py_INCREF`." +msgstr "" + +msgid "Similar to :c:func:`Py_NewRef`, but the object *o* can be NULL." +msgstr "" + +msgid "If the object *o* is ``NULL``, the function just returns ``NULL``." +msgstr "" + +msgid "" +"Release a :term:`strong reference` to object *o*, indicating the reference " +"is no longer used." +msgstr "" + +msgid "" +"Once the last :term:`strong reference` is released (i.e. the object's " +"reference count reaches 0), the object's type's deallocation function (which " +"must not be ``NULL``) is invoked." +msgstr "" + +msgid "" +"This function is usually used to delete a :term:`strong reference` before " +"exiting its scope." +msgstr "" + +msgid "" +"The object must not be ``NULL``; if you aren't sure that it isn't ``NULL``, " +"use :c:func:`Py_XDECREF`." +msgstr "" + +msgid "" +"Do not expect this function to actually modify *o* in any way. For at least :" +"pep:`some objects <683>`, this function has no effect." +msgstr "" + +msgid "" +"The deallocation function can cause arbitrary Python code to be invoked (e." +"g. when a class instance with a :meth:`~object.__del__` method is " +"deallocated). While exceptions in such code are not propagated, the " +"executed code has free access to all Python global variables. This means " +"that any object that is reachable from a global variable should be in a " +"consistent state before :c:func:`Py_DECREF` is invoked. For example, code " +"to delete an object from a list should copy a reference to the deleted " +"object in a temporary variable, update the list data structure, and then " +"call :c:func:`Py_DECREF` for the temporary variable." +msgstr "" + +msgid "" +"Similar to :c:func:`Py_DECREF`, but the object *o* can be ``NULL``, in which " +"case this has no effect. The same warning from :c:func:`Py_DECREF` applies " +"here as well." +msgstr "" + +msgid "" +"Release a :term:`strong reference` for object *o*. The object may be " +"``NULL``, in which case the macro has no effect; otherwise the effect is the " +"same as for :c:func:`Py_DECREF`, except that the argument is also set to " +"``NULL``. The warning for :c:func:`Py_DECREF` does not apply with respect " +"to the object passed because the macro carefully uses a temporary variable " +"and sets the argument to ``NULL`` before releasing the reference." +msgstr "" + +msgid "" +"It is a good idea to use this macro whenever releasing a reference to an " +"object that might be traversed during garbage collection." +msgstr "" + +msgid "" +"The macro argument is now only evaluated once. If the argument has side " +"effects, these are no longer duplicated." +msgstr "" + +msgid "" +"Indicate taking a new :term:`strong reference` to object *o*. A function " +"version of :c:func:`Py_XINCREF`. It can be used for runtime dynamic " +"embedding of Python." +msgstr "" + +msgid "" +"Release a :term:`strong reference` to object *o*. A function version of :c:" +"func:`Py_XDECREF`. It can be used for runtime dynamic embedding of Python." +msgstr "" + +msgid "" +"Macro safely releasing a :term:`strong reference` to object *dst* and " +"setting *dst* to *src*." +msgstr "" + +msgid "As in case of :c:func:`Py_CLEAR`, \"the obvious\" code can be deadly::" +msgstr "" + +msgid "" +"Py_DECREF(dst);\n" +"dst = src;" +msgstr "" + +msgid "The safe way is::" +msgstr "" + +msgid "Py_SETREF(dst, src);" +msgstr "" + +msgid "" +"That arranges to set *dst* to *src* *before* releasing the reference to the " +"old value of *dst*, so that any code triggered as a side-effect of *dst* " +"getting torn down no longer believes *dst* points to a valid object." +msgstr "" + +msgid "" +"The macro arguments are now only evaluated once. If an argument has side " +"effects, these are no longer duplicated." +msgstr "" + +msgid "" +"Variant of :c:macro:`Py_SETREF` macro that uses :c:func:`Py_XDECREF` instead " +"of :c:func:`Py_DECREF`." +msgstr "" diff --git a/c-api/reflection.po b/c-api/reflection.po index 51151f80..49e4fe3d 100644 --- a/c-api/reflection.po +++ b/c-api/reflection.po @@ -8,26 +8,30 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/reflection.rst:6 msgid "Reflection" msgstr "" +#: ../../c-api/reflection.rst:12 msgid "Use :c:func:`PyEval_GetFrameBuiltins` instead." msgstr "" +#: ../../c-api/reflection.rst:14 ../../c-api/reflection.rst:66 msgid "" "Return a dictionary of the builtins in the current execution frame, or the " "interpreter of the thread state if no frame is currently executing." msgstr "" +#: ../../c-api/reflection.rst:22 msgid "" "Use either :c:func:`PyEval_GetFrameLocals` to obtain the same behaviour as " "calling :func:`locals` in Python code, or else call :c:func:" @@ -35,16 +39,19 @@ msgid "" "the :attr:`~frame.f_locals` attribute of the currently executing frame." msgstr "" +#: ../../c-api/reflection.rst:27 msgid "" "Return a mapping providing access to the local variables in the current " "execution frame, or ``NULL`` if no frame is currently executing." msgstr "" +#: ../../c-api/reflection.rst:30 msgid "" "Refer to :func:`locals` for details of the mapping returned at different " "scopes." msgstr "" +#: ../../c-api/reflection.rst:32 msgid "" "As this function returns a :term:`borrowed reference`, the dictionary " "returned for :term:`optimized scopes ` is cached on the " @@ -55,6 +62,7 @@ msgid "" "a new snapshot." msgstr "" +#: ../../c-api/reflection.rst:39 msgid "" "As part of :pep:`667`, :c:func:`PyFrame_GetLocals`, :func:`locals`, and :" "attr:`FrameType.f_locals ` no longer make use of the shared " @@ -62,45 +70,54 @@ msgid "" "semantics>` for additional details." msgstr "" +#: ../../c-api/reflection.rst:50 msgid "Use :c:func:`PyEval_GetFrameGlobals` instead." msgstr "" +#: ../../c-api/reflection.rst:52 msgid "" "Return a dictionary of the global variables in the current execution frame, " "or ``NULL`` if no frame is currently executing." msgstr "" +#: ../../c-api/reflection.rst:58 msgid "" "Return the :term:`attached thread state`'s frame, which is ``NULL`` if no " "frame is currently executing." msgstr "" +#: ../../c-api/reflection.rst:61 msgid "See also :c:func:`PyThreadState_GetFrame`." msgstr "" +#: ../../c-api/reflection.rst:74 msgid "" "Return a dictionary of the local variables in the current execution frame, " "or ``NULL`` if no frame is currently executing. Equivalent to calling :func:" "`locals` in Python code." msgstr "" +#: ../../c-api/reflection.rst:78 msgid "" "To access :attr:`~frame.f_locals` on the current frame without making an " "independent snapshot in :term:`optimized scopes `, call :c:" "func:`PyFrame_GetLocals` on the result of :c:func:`PyEval_GetFrame`." msgstr "" +#: ../../c-api/reflection.rst:87 msgid "" "Return a dictionary of the global variables in the current execution frame, " "or ``NULL`` if no frame is currently executing. Equivalent to calling :func:" "`globals` in Python code." msgstr "" +#: ../../c-api/reflection.rst:96 msgid "" "Return the name of *func* if it is a function, class or instance object, " "else the name of *func*\\s type." msgstr "" +#: ../../c-api/reflection.rst:102 msgid "" "Return a description string, depending on the type of *func*. Return values " "include \"()\" for functions and methods, \" constructor\", \" instance\", " diff --git a/c-api/reflection.po~ b/c-api/reflection.po~ new file mode 100644 index 00000000..51151f80 --- /dev/null +++ b/c-api/reflection.po~ @@ -0,0 +1,109 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Reflection" +msgstr "" + +msgid "Use :c:func:`PyEval_GetFrameBuiltins` instead." +msgstr "" + +msgid "" +"Return a dictionary of the builtins in the current execution frame, or the " +"interpreter of the thread state if no frame is currently executing." +msgstr "" + +msgid "" +"Use either :c:func:`PyEval_GetFrameLocals` to obtain the same behaviour as " +"calling :func:`locals` in Python code, or else call :c:func:" +"`PyFrame_GetLocals` on the result of :c:func:`PyEval_GetFrame` to access " +"the :attr:`~frame.f_locals` attribute of the currently executing frame." +msgstr "" + +msgid "" +"Return a mapping providing access to the local variables in the current " +"execution frame, or ``NULL`` if no frame is currently executing." +msgstr "" + +msgid "" +"Refer to :func:`locals` for details of the mapping returned at different " +"scopes." +msgstr "" + +msgid "" +"As this function returns a :term:`borrowed reference`, the dictionary " +"returned for :term:`optimized scopes ` is cached on the " +"frame object and will remain alive as long as the frame object does. Unlike :" +"c:func:`PyEval_GetFrameLocals` and :func:`locals`, subsequent calls to this " +"function in the same frame will update the contents of the cached dictionary " +"to reflect changes in the state of the local variables rather than returning " +"a new snapshot." +msgstr "" + +msgid "" +"As part of :pep:`667`, :c:func:`PyFrame_GetLocals`, :func:`locals`, and :" +"attr:`FrameType.f_locals ` no longer make use of the shared " +"cache dictionary. Refer to the :ref:`What's New entry ` for additional details." +msgstr "" + +msgid "Use :c:func:`PyEval_GetFrameGlobals` instead." +msgstr "" + +msgid "" +"Return a dictionary of the global variables in the current execution frame, " +"or ``NULL`` if no frame is currently executing." +msgstr "" + +msgid "" +"Return the :term:`attached thread state`'s frame, which is ``NULL`` if no " +"frame is currently executing." +msgstr "" + +msgid "See also :c:func:`PyThreadState_GetFrame`." +msgstr "" + +msgid "" +"Return a dictionary of the local variables in the current execution frame, " +"or ``NULL`` if no frame is currently executing. Equivalent to calling :func:" +"`locals` in Python code." +msgstr "" + +msgid "" +"To access :attr:`~frame.f_locals` on the current frame without making an " +"independent snapshot in :term:`optimized scopes `, call :c:" +"func:`PyFrame_GetLocals` on the result of :c:func:`PyEval_GetFrame`." +msgstr "" + +msgid "" +"Return a dictionary of the global variables in the current execution frame, " +"or ``NULL`` if no frame is currently executing. Equivalent to calling :func:" +"`globals` in Python code." +msgstr "" + +msgid "" +"Return the name of *func* if it is a function, class or instance object, " +"else the name of *func*\\s type." +msgstr "" + +msgid "" +"Return a description string, depending on the type of *func*. Return values " +"include \"()\" for functions and methods, \" constructor\", \" instance\", " +"and \" object\". Concatenated with the result of :c:func:" +"`PyEval_GetFuncName`, the result will be a description of *func*." +msgstr "" diff --git a/c-api/sequence.po b/c-api/sequence.po index fc798448..bed13050 100644 --- a/c-api/sequence.po +++ b/c-api/sequence.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/sequence.rst:6 msgid "Sequence Protocol" msgstr "" +#: ../../c-api/sequence.rst:11 msgid "" "Return ``1`` if the object provides the sequence protocol, and ``0`` " "otherwise. Note that it returns ``1`` for Python classes with a :meth:" @@ -28,102 +30,119 @@ msgid "" "supports. This function always succeeds." msgstr "" +#: ../../c-api/sequence.rst:23 msgid "" "Returns the number of objects in sequence *o* on success, and ``-1`` on " "failure. This is equivalent to the Python expression ``len(o)``." msgstr "" +#: ../../c-api/sequence.rst:29 msgid "" "Return the concatenation of *o1* and *o2* on success, and ``NULL`` on " "failure. This is the equivalent of the Python expression ``o1 + o2``." msgstr "" +#: ../../c-api/sequence.rst:35 msgid "" "Return the result of repeating sequence object *o* *count* times, or " "``NULL`` on failure. This is the equivalent of the Python expression ``o * " "count``." msgstr "" +#: ../../c-api/sequence.rst:41 msgid "" "Return the concatenation of *o1* and *o2* on success, and ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python expression ``o1 += o2``." msgstr "" +#: ../../c-api/sequence.rst:48 msgid "" "Return the result of repeating sequence object *o* *count* times, or " "``NULL`` on failure. The operation is done *in-place* when *o* supports " "it. This is the equivalent of the Python expression ``o *= count``." msgstr "" +#: ../../c-api/sequence.rst:55 msgid "" "Return the *i*\\ th element of *o*, or ``NULL`` on failure. This is the " "equivalent of the Python expression ``o[i]``." msgstr "" +#: ../../c-api/sequence.rst:61 msgid "" "Return the slice of sequence object *o* between *i1* and *i2*, or ``NULL`` " "on failure. This is the equivalent of the Python expression ``o[i1:i2]``." msgstr "" +#: ../../c-api/sequence.rst:67 msgid "" "Assign object *v* to the *i*\\ th element of *o*. Raise an exception and " "return ``-1`` on failure; return ``0`` on success. This is the equivalent " -"of the Python statement ``o[i] = v``. This function *does not* steal a " -"reference to *v*." +"of the Python statement ``o[i] = v``. This function *does not* \":term:" +"`steal`\" a reference to *v*." msgstr "" +#: ../../c-api/sequence.rst:72 msgid "" "If *v* is ``NULL``, the element is deleted, but this feature is deprecated " "in favour of using :c:func:`PySequence_DelItem`." msgstr "" +#: ../../c-api/sequence.rst:78 msgid "" "Delete the *i*\\ th element of object *o*. Returns ``-1`` on failure. This " "is the equivalent of the Python statement ``del o[i]``." msgstr "" +#: ../../c-api/sequence.rst:84 msgid "" "Assign the sequence object *v* to the slice in sequence object *o* from *i1* " "to *i2*. This is the equivalent of the Python statement ``o[i1:i2] = v``." msgstr "" +#: ../../c-api/sequence.rst:90 msgid "" "Delete the slice in sequence object *o* from *i1* to *i2*. Returns ``-1`` " "on failure. This is the equivalent of the Python statement ``del o[i1:i2]``." msgstr "" +#: ../../c-api/sequence.rst:96 msgid "" "Return the number of occurrences of *value* in *o*, that is, return the " "number of keys for which ``o[key] == value``. On failure, return ``-1``. " "This is equivalent to the Python expression ``o.count(value)``." msgstr "" +#: ../../c-api/sequence.rst:103 msgid "" "Determine if *o* contains *value*. If an item in *o* is equal to *value*, " "return ``1``, otherwise return ``0``. On error, return ``-1``. This is " "equivalent to the Python expression ``value in o``." msgstr "" +#: ../../c-api/sequence.rst:110 msgid "Alias for :c:func:`PySequence_Contains`." msgstr "" -msgid "" -"The function is :term:`soft deprecated` and should no longer be used to " -"write new code." +#: ../../c-api/sequence.rst:112 +msgid "The function should no longer be used to write new code." msgstr "" +#: ../../c-api/sequence.rst:118 msgid "" "Return the first index *i* for which ``o[i] == value``. On error, return " "``-1``. This is equivalent to the Python expression ``o.index(value)``." msgstr "" +#: ../../c-api/sequence.rst:124 msgid "" "Return a list object with the same contents as the sequence or iterable *o*, " "or ``NULL`` on failure. The returned list is guaranteed to be new. This is " "equivalent to the Python expression ``list(o)``." msgstr "" +#: ../../c-api/sequence.rst:133 msgid "" "Return a tuple object with the same contents as the sequence or iterable " "*o*, or ``NULL`` on failure. If *o* is a tuple, a new reference will be " @@ -131,6 +150,7 @@ msgid "" "contents. This is equivalent to the Python expression ``tuple(o)``." msgstr "" +#: ../../c-api/sequence.rst:141 msgid "" "Return the sequence or iterable *o* as an object usable by the other " "``PySequence_Fast*`` family of functions. If the object is not a sequence or " @@ -138,17 +158,20 @@ msgid "" "``NULL`` on failure." msgstr "" +#: ../../c-api/sequence.rst:146 msgid "" "The ``PySequence_Fast*`` functions are thus named because they assume *o* is " "a :c:type:`PyTupleObject` or a :c:type:`PyListObject` and access the data " "fields of *o* directly." msgstr "" +#: ../../c-api/sequence.rst:150 msgid "" "As a CPython implementation detail, if *o* is already a sequence or list, it " "will be returned." msgstr "" +#: ../../c-api/sequence.rst:156 msgid "" "Returns the length of *o*, assuming that *o* was returned by :c:func:" "`PySequence_Fast` and that *o* is not ``NULL``. The size can also be " @@ -157,22 +180,26 @@ msgid "" "tuple." msgstr "" +#: ../../c-api/sequence.rst:165 msgid "" "Return the *i*\\ th element of *o*, assuming that *o* was returned by :c:" "func:`PySequence_Fast`, *o* is not ``NULL``, and that *i* is within bounds." msgstr "" +#: ../../c-api/sequence.rst:171 msgid "" "Return the underlying array of PyObject pointers. Assumes that *o* was " "returned by :c:func:`PySequence_Fast` and *o* is not ``NULL``." msgstr "" +#: ../../c-api/sequence.rst:174 msgid "" "Note, if a list gets resized, the reallocation may relocate the items array. " "So, only use the underlying array pointer in contexts where the sequence " "cannot change." msgstr "" +#: ../../c-api/sequence.rst:181 msgid "" "Return the *i*\\ th element of *o* or ``NULL`` on failure. Faster form of :c:" "func:`PySequence_GetItem` but without checking that :c:func:" @@ -180,11 +207,14 @@ msgid "" "indices." msgstr "" +#: ../../c-api/sequence.rst:21 ../../c-api/sequence.rst:131 msgid "built-in function" msgstr "" +#: ../../c-api/sequence.rst:21 msgid "len" msgstr "" +#: ../../c-api/sequence.rst:131 msgid "tuple" msgstr "" diff --git a/c-api/sequence.po~ b/c-api/sequence.po~ new file mode 100644 index 00000000..fc798448 --- /dev/null +++ b/c-api/sequence.po~ @@ -0,0 +1,190 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Sequence Protocol" +msgstr "" + +msgid "" +"Return ``1`` if the object provides the sequence protocol, and ``0`` " +"otherwise. Note that it returns ``1`` for Python classes with a :meth:" +"`~object.__getitem__` method, unless they are :class:`dict` subclasses, " +"since in general it is impossible to determine what type of keys the class " +"supports. This function always succeeds." +msgstr "" + +msgid "" +"Returns the number of objects in sequence *o* on success, and ``-1`` on " +"failure. This is equivalent to the Python expression ``len(o)``." +msgstr "" + +msgid "" +"Return the concatenation of *o1* and *o2* on success, and ``NULL`` on " +"failure. This is the equivalent of the Python expression ``o1 + o2``." +msgstr "" + +msgid "" +"Return the result of repeating sequence object *o* *count* times, or " +"``NULL`` on failure. This is the equivalent of the Python expression ``o * " +"count``." +msgstr "" + +msgid "" +"Return the concatenation of *o1* and *o2* on success, and ``NULL`` on " +"failure. The operation is done *in-place* when *o1* supports it. This is " +"the equivalent of the Python expression ``o1 += o2``." +msgstr "" + +msgid "" +"Return the result of repeating sequence object *o* *count* times, or " +"``NULL`` on failure. The operation is done *in-place* when *o* supports " +"it. This is the equivalent of the Python expression ``o *= count``." +msgstr "" + +msgid "" +"Return the *i*\\ th element of *o*, or ``NULL`` on failure. This is the " +"equivalent of the Python expression ``o[i]``." +msgstr "" + +msgid "" +"Return the slice of sequence object *o* between *i1* and *i2*, or ``NULL`` " +"on failure. This is the equivalent of the Python expression ``o[i1:i2]``." +msgstr "" + +msgid "" +"Assign object *v* to the *i*\\ th element of *o*. Raise an exception and " +"return ``-1`` on failure; return ``0`` on success. This is the equivalent " +"of the Python statement ``o[i] = v``. This function *does not* steal a " +"reference to *v*." +msgstr "" + +msgid "" +"If *v* is ``NULL``, the element is deleted, but this feature is deprecated " +"in favour of using :c:func:`PySequence_DelItem`." +msgstr "" + +msgid "" +"Delete the *i*\\ th element of object *o*. Returns ``-1`` on failure. This " +"is the equivalent of the Python statement ``del o[i]``." +msgstr "" + +msgid "" +"Assign the sequence object *v* to the slice in sequence object *o* from *i1* " +"to *i2*. This is the equivalent of the Python statement ``o[i1:i2] = v``." +msgstr "" + +msgid "" +"Delete the slice in sequence object *o* from *i1* to *i2*. Returns ``-1`` " +"on failure. This is the equivalent of the Python statement ``del o[i1:i2]``." +msgstr "" + +msgid "" +"Return the number of occurrences of *value* in *o*, that is, return the " +"number of keys for which ``o[key] == value``. On failure, return ``-1``. " +"This is equivalent to the Python expression ``o.count(value)``." +msgstr "" + +msgid "" +"Determine if *o* contains *value*. If an item in *o* is equal to *value*, " +"return ``1``, otherwise return ``0``. On error, return ``-1``. This is " +"equivalent to the Python expression ``value in o``." +msgstr "" + +msgid "Alias for :c:func:`PySequence_Contains`." +msgstr "" + +msgid "" +"The function is :term:`soft deprecated` and should no longer be used to " +"write new code." +msgstr "" + +msgid "" +"Return the first index *i* for which ``o[i] == value``. On error, return " +"``-1``. This is equivalent to the Python expression ``o.index(value)``." +msgstr "" + +msgid "" +"Return a list object with the same contents as the sequence or iterable *o*, " +"or ``NULL`` on failure. The returned list is guaranteed to be new. This is " +"equivalent to the Python expression ``list(o)``." +msgstr "" + +msgid "" +"Return a tuple object with the same contents as the sequence or iterable " +"*o*, or ``NULL`` on failure. If *o* is a tuple, a new reference will be " +"returned, otherwise a tuple will be constructed with the appropriate " +"contents. This is equivalent to the Python expression ``tuple(o)``." +msgstr "" + +msgid "" +"Return the sequence or iterable *o* as an object usable by the other " +"``PySequence_Fast*`` family of functions. If the object is not a sequence or " +"iterable, raises :exc:`TypeError` with *m* as the message text. Returns " +"``NULL`` on failure." +msgstr "" + +msgid "" +"The ``PySequence_Fast*`` functions are thus named because they assume *o* is " +"a :c:type:`PyTupleObject` or a :c:type:`PyListObject` and access the data " +"fields of *o* directly." +msgstr "" + +msgid "" +"As a CPython implementation detail, if *o* is already a sequence or list, it " +"will be returned." +msgstr "" + +msgid "" +"Returns the length of *o*, assuming that *o* was returned by :c:func:" +"`PySequence_Fast` and that *o* is not ``NULL``. The size can also be " +"retrieved by calling :c:func:`PySequence_Size` on *o*, but :c:func:" +"`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a list or " +"tuple." +msgstr "" + +msgid "" +"Return the *i*\\ th element of *o*, assuming that *o* was returned by :c:" +"func:`PySequence_Fast`, *o* is not ``NULL``, and that *i* is within bounds." +msgstr "" + +msgid "" +"Return the underlying array of PyObject pointers. Assumes that *o* was " +"returned by :c:func:`PySequence_Fast` and *o* is not ``NULL``." +msgstr "" + +msgid "" +"Note, if a list gets resized, the reallocation may relocate the items array. " +"So, only use the underlying array pointer in contexts where the sequence " +"cannot change." +msgstr "" + +msgid "" +"Return the *i*\\ th element of *o* or ``NULL`` on failure. Faster form of :c:" +"func:`PySequence_GetItem` but without checking that :c:func:" +"`PySequence_Check` on *o* is true and without adjustment for negative " +"indices." +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "len" +msgstr "" + +msgid "tuple" +msgstr "" diff --git a/c-api/set.po b/c-api/set.po index 279b8dca..f53edb9d 100644 --- a/c-api/set.po +++ b/c-api/set.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/set.rst:6 msgid "Set Objects" msgstr "" +#: ../../c-api/set.rst:12 msgid "" "This section details the public API for :class:`set` and :class:`frozenset` " "objects. Any functionality not listed below is best accessed using either " @@ -33,6 +35,7 @@ msgid "" "`PyNumber_InPlaceXor`)." msgstr "" +#: ../../c-api/set.rst:26 msgid "" "This subtype of :c:type:`PyObject` is used to hold the internal data for " "both :class:`set` and :class:`frozenset` objects. It is like a :c:type:" @@ -44,51 +47,61 @@ msgid "" "manipulating the values in the structure." msgstr "" +#: ../../c-api/set.rst:37 msgid "" "This is an instance of :c:type:`PyTypeObject` representing the Python :class:" "`set` type." msgstr "" +#: ../../c-api/set.rst:43 msgid "" "This is an instance of :c:type:`PyTypeObject` representing the Python :class:" "`frozenset` type." msgstr "" +#: ../../c-api/set.rst:46 msgid "" "The following type check macros work on pointers to any Python object. " "Likewise, the constructor functions work with any iterable Python object." msgstr "" +#: ../../c-api/set.rst:52 msgid "" "Return true if *p* is a :class:`set` object or an instance of a subtype. " "This function always succeeds." msgstr "" +#: ../../c-api/set.rst:57 msgid "" "Return true if *p* is a :class:`frozenset` object or an instance of a " "subtype. This function always succeeds." msgstr "" +#: ../../c-api/set.rst:62 msgid "" "Return true if *p* is a :class:`set` object, a :class:`frozenset` object, or " "an instance of a subtype. This function always succeeds." msgstr "" +#: ../../c-api/set.rst:67 msgid "" "Return true if *p* is a :class:`set` object but not an instance of a " "subtype. This function always succeeds." msgstr "" +#: ../../c-api/set.rst:74 msgid "" "Return true if *p* is a :class:`set` object or a :class:`frozenset` object " "but not an instance of a subtype. This function always succeeds." msgstr "" +#: ../../c-api/set.rst:80 msgid "" "Return true if *p* is a :class:`frozenset` object but not an instance of a " "subtype. This function always succeeds." msgstr "" +#: ../../c-api/set.rst:86 msgid "" "Return a new :class:`set` containing objects returned by the *iterable*. " "The *iterable* may be ``NULL`` to create a new empty set. Return the new " @@ -97,6 +110,14 @@ msgid "" "(``c=set(s)``)." msgstr "" +#: ../../c-api/set.rst:94 ../../c-api/set.rst:107 +msgid "" +"The operation is atomic on :term:`free threading ` when " +"*iterable* is a :class:`set`, :class:`frozenset`, :class:`dict` or :class:" +"`frozendict`." +msgstr "" + +#: ../../c-api/set.rst:100 msgid "" "Return a new :class:`frozenset` containing objects returned by the " "*iterable*. The *iterable* may be ``NULL`` to create a new empty frozenset. " @@ -104,20 +125,24 @@ msgid "" "`TypeError` if *iterable* is not actually iterable." msgstr "" +#: ../../c-api/set.rst:111 msgid "" "The following functions and macros are available for instances of :class:" "`set` or :class:`frozenset` or instances of their subtypes." msgstr "" +#: ../../c-api/set.rst:119 msgid "" "Return the length of a :class:`set` or :class:`frozenset` object. Equivalent " "to ``len(anyset)``. Raises a :exc:`SystemError` if *anyset* is not a :class:" "`set`, :class:`frozenset`, or an instance of a subtype." msgstr "" +#: ../../c-api/set.rst:126 msgid "Macro form of :c:func:`PySet_Size` without error checking." msgstr "" +#: ../../c-api/set.rst:131 msgid "" "Return ``1`` if found, ``0`` if not found, and ``-1`` if an error is " "encountered. Unlike the Python :meth:`~object.__contains__` method, this " @@ -127,6 +152,14 @@ msgid "" "instance of a subtype." msgstr "" +#: ../../c-api/set.rst:139 ../../c-api/set.rst:154 ../../c-api/set.rst:174 +msgid "" +"The operation is atomic on :term:`free threading ` when " +"*key* is :class:`str`, :class:`int`, :class:`float`, :class:`bool` or :class:" +"`bytes`." +msgstr "" + +#: ../../c-api/set.rst:144 msgid "" "Add *key* to a :class:`set` instance. Also works with :class:`frozenset` " "instances (like :c:func:`PyTuple_SetItem` it can be used to fill in the " @@ -137,20 +170,23 @@ msgid "" "`set` or its subtype." msgstr "" +#: ../../c-api/set.rst:159 msgid "" "The following functions are available for instances of :class:`set` or its " "subtypes but not for instances of :class:`frozenset` or its subtypes." msgstr "" +#: ../../c-api/set.rst:165 msgid "" "Return ``1`` if found and removed, ``0`` if not found (no action taken), and " "``-1`` if an error is encountered. Does not raise :exc:`KeyError` for " "missing keys. Raise a :exc:`TypeError` if the *key* is unhashable. Unlike " -"the Python :meth:`~frozenset.discard` method, this function does not " -"automatically convert unhashable sets into temporary frozensets. Raise :exc:" -"`SystemError` if *set* is not an instance of :class:`set` or its subtype." +"the Python :meth:`~set.discard` method, this function does not automatically " +"convert unhashable sets into temporary frozensets. Raise :exc:`SystemError` " +"if *set* is not an instance of :class:`set` or its subtype." msgstr "" +#: ../../c-api/set.rst:180 msgid "" "Return a new reference to an arbitrary object in the *set*, and removes the " "object from the *set*. Return ``NULL`` on failure. Raise :exc:`KeyError` " @@ -158,23 +194,58 @@ msgid "" "of :class:`set` or its subtype." msgstr "" +#: ../../c-api/set.rst:188 msgid "" "Empty an existing set of all elements. Return ``0`` on success. Return " "``-1`` and raise :exc:`SystemError` if *set* is not an instance of :class:" "`set` or its subtype." msgstr "" +#: ../../c-api/set.rst:194 +msgid "" +"In the :term:`free-threaded build`, the set is emptied before its entries " +"are cleared, so other threads will observe an empty set rather than " +"intermediate states." +msgstr "" + +#: ../../c-api/set.rst:200 +msgid "Deprecated API" +msgstr "" + +#: ../../c-api/set.rst:204 +msgid "" +"A constant representing the size of an internal preallocated table inside :c:" +"type:`PySetObject` instances." +msgstr "" + +#: ../../c-api/set.rst:207 +msgid "" +"This is documented solely for completeness, as there are no guarantees that " +"a given version of CPython uses preallocated tables with a fixed size. In " +"code that does not deal with unstable set internals, :c:macro:`!" +"PySet_MINSIZE` can be replaced with a small constant like ``8``." +msgstr "" + +#: ../../c-api/set.rst:213 +msgid "If looking for the size of a set, use :c:func:`PySet_Size` instead." +msgstr "" + +#: ../../c-api/set.rst:8 msgid "object" msgstr "" +#: ../../c-api/set.rst:8 msgid "set" msgstr "" +#: ../../c-api/set.rst:8 msgid "frozenset" msgstr "" +#: ../../c-api/set.rst:117 msgid "built-in function" msgstr "" +#: ../../c-api/set.rst:117 msgid "len" msgstr "" diff --git a/c-api/set.po~ b/c-api/set.po~ new file mode 100644 index 00000000..279b8dca --- /dev/null +++ b/c-api/set.po~ @@ -0,0 +1,180 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Set Objects" +msgstr "" + +msgid "" +"This section details the public API for :class:`set` and :class:`frozenset` " +"objects. Any functionality not listed below is best accessed using either " +"the abstract object protocol (including :c:func:`PyObject_CallMethod`, :c:" +"func:`PyObject_RichCompareBool`, :c:func:`PyObject_Hash`, :c:func:" +"`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:`PyObject_Print`, and :c:" +"func:`PyObject_GetIter`) or the abstract number protocol (including :c:func:" +"`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:func:`PyNumber_Or`, :c:func:" +"`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :c:func:" +"`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:" +"`PyNumber_InPlaceXor`)." +msgstr "" + +msgid "" +"This subtype of :c:type:`PyObject` is used to hold the internal data for " +"both :class:`set` and :class:`frozenset` objects. It is like a :c:type:" +"`PyDictObject` in that it is a fixed size for small sets (much like tuple " +"storage) and will point to a separate, variable sized block of memory for " +"medium and large sized sets (much like list storage). None of the fields of " +"this structure should be considered public and all are subject to change. " +"All access should be done through the documented API rather than by " +"manipulating the values in the structure." +msgstr "" + +msgid "" +"This is an instance of :c:type:`PyTypeObject` representing the Python :class:" +"`set` type." +msgstr "" + +msgid "" +"This is an instance of :c:type:`PyTypeObject` representing the Python :class:" +"`frozenset` type." +msgstr "" + +msgid "" +"The following type check macros work on pointers to any Python object. " +"Likewise, the constructor functions work with any iterable Python object." +msgstr "" + +msgid "" +"Return true if *p* is a :class:`set` object or an instance of a subtype. " +"This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a :class:`frozenset` object or an instance of a " +"subtype. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a :class:`set` object, a :class:`frozenset` object, or " +"an instance of a subtype. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a :class:`set` object but not an instance of a " +"subtype. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a :class:`set` object or a :class:`frozenset` object " +"but not an instance of a subtype. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a :class:`frozenset` object but not an instance of a " +"subtype. This function always succeeds." +msgstr "" + +msgid "" +"Return a new :class:`set` containing objects returned by the *iterable*. " +"The *iterable* may be ``NULL`` to create a new empty set. Return the new " +"set on success or ``NULL`` on failure. Raise :exc:`TypeError` if *iterable* " +"is not actually iterable. The constructor is also useful for copying a set " +"(``c=set(s)``)." +msgstr "" + +msgid "" +"Return a new :class:`frozenset` containing objects returned by the " +"*iterable*. The *iterable* may be ``NULL`` to create a new empty frozenset. " +"Return the new set on success or ``NULL`` on failure. Raise :exc:" +"`TypeError` if *iterable* is not actually iterable." +msgstr "" + +msgid "" +"The following functions and macros are available for instances of :class:" +"`set` or :class:`frozenset` or instances of their subtypes." +msgstr "" + +msgid "" +"Return the length of a :class:`set` or :class:`frozenset` object. Equivalent " +"to ``len(anyset)``. Raises a :exc:`SystemError` if *anyset* is not a :class:" +"`set`, :class:`frozenset`, or an instance of a subtype." +msgstr "" + +msgid "Macro form of :c:func:`PySet_Size` without error checking." +msgstr "" + +msgid "" +"Return ``1`` if found, ``0`` if not found, and ``-1`` if an error is " +"encountered. Unlike the Python :meth:`~object.__contains__` method, this " +"function does not automatically convert unhashable sets into temporary " +"frozensets. Raise a :exc:`TypeError` if the *key* is unhashable. Raise :exc:" +"`SystemError` if *anyset* is not a :class:`set`, :class:`frozenset`, or an " +"instance of a subtype." +msgstr "" + +msgid "" +"Add *key* to a :class:`set` instance. Also works with :class:`frozenset` " +"instances (like :c:func:`PyTuple_SetItem` it can be used to fill in the " +"values of brand new frozensets before they are exposed to other code). " +"Return ``0`` on success or ``-1`` on failure. Raise a :exc:`TypeError` if " +"the *key* is unhashable. Raise a :exc:`MemoryError` if there is no room to " +"grow. Raise a :exc:`SystemError` if *set* is not an instance of :class:" +"`set` or its subtype." +msgstr "" + +msgid "" +"The following functions are available for instances of :class:`set` or its " +"subtypes but not for instances of :class:`frozenset` or its subtypes." +msgstr "" + +msgid "" +"Return ``1`` if found and removed, ``0`` if not found (no action taken), and " +"``-1`` if an error is encountered. Does not raise :exc:`KeyError` for " +"missing keys. Raise a :exc:`TypeError` if the *key* is unhashable. Unlike " +"the Python :meth:`~frozenset.discard` method, this function does not " +"automatically convert unhashable sets into temporary frozensets. Raise :exc:" +"`SystemError` if *set* is not an instance of :class:`set` or its subtype." +msgstr "" + +msgid "" +"Return a new reference to an arbitrary object in the *set*, and removes the " +"object from the *set*. Return ``NULL`` on failure. Raise :exc:`KeyError` " +"if the set is empty. Raise a :exc:`SystemError` if *set* is not an instance " +"of :class:`set` or its subtype." +msgstr "" + +msgid "" +"Empty an existing set of all elements. Return ``0`` on success. Return " +"``-1`` and raise :exc:`SystemError` if *set* is not an instance of :class:" +"`set` or its subtype." +msgstr "" + +msgid "object" +msgstr "" + +msgid "set" +msgstr "" + +msgid "frozenset" +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "len" +msgstr "" diff --git a/c-api/slice.po b/c-api/slice.po index cc0c01fe..bc242ce1 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -8,28 +8,32 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/slice.rst:6 msgid "Slice Objects" msgstr "" +#: ../../c-api/slice.rst:11 msgid "" "The type object for slice objects. This is the same as :class:`slice` in " "the Python layer." msgstr "" +#: ../../c-api/slice.rst:17 msgid "" "Return true if *ob* is a slice object; *ob* must not be ``NULL``. This " "function always succeeds." msgstr "" +#: ../../c-api/slice.rst:23 msgid "" "Return a new slice object with the given values. The *start*, *stop*, and " "*step* parameters are used as the values of the slice object attributes of " @@ -37,30 +41,36 @@ msgid "" "``None`` will be used for the corresponding attribute." msgstr "" +#: ../../c-api/slice.rst:28 msgid "" "Return ``NULL`` with an exception set if the new object could not be " "allocated." msgstr "" +#: ../../c-api/slice.rst:34 msgid "" "Retrieve the start, stop and step indices from the slice object *slice*, " "assuming a sequence of length *length*. Treats indices greater than *length* " "as errors." msgstr "" +#: ../../c-api/slice.rst:38 msgid "" "Returns ``0`` on success and ``-1`` on error with no exception set (unless " "one of the indices was not ``None`` and failed to be converted to an " "integer, in which case ``-1`` is returned with an exception set)." msgstr "" +#: ../../c-api/slice.rst:42 msgid "You probably do not want to use this function." msgstr "" +#: ../../c-api/slice.rst:44 ../../c-api/slice.rst:75 msgid "" "The parameter type for the *slice* parameter was ``PySliceObject*`` before." msgstr "" +#: ../../c-api/slice.rst:51 msgid "" "Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, " "stop, and step indices from the slice object *slice* assuming a sequence of " @@ -69,15 +79,18 @@ msgid "" "normal slices." msgstr "" +#: ../../c-api/slice.rst:57 msgid "Return ``0`` on success and ``-1`` on error with an exception set." msgstr "" +#: ../../c-api/slice.rst:60 msgid "" "This function is considered not safe for resizable sequences. Its invocation " "should be replaced by a combination of :c:func:`PySlice_Unpack` and :c:func:" "`PySlice_AdjustIndices` where ::" msgstr "" +#: ../../c-api/slice.rst:64 msgid "" "if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) " "< 0) {\n" @@ -85,9 +98,11 @@ msgid "" "}" msgstr "" +#: ../../c-api/slice.rst:68 msgid "is replaced by ::" msgstr "" +#: ../../c-api/slice.rst:70 msgid "" "if (PySlice_Unpack(slice, &start, &stop, &step) < 0) {\n" " // return error\n" @@ -95,6 +110,7 @@ msgid "" "slicelength = PySlice_AdjustIndices(length, &start, &stop, step);" msgstr "" +#: ../../c-api/slice.rst:79 msgid "" "If ``Py_LIMITED_API`` is not set or set to the value between ``0x03050400`` " "and ``0x03060000`` (not including) or ``0x03060100`` or higher :c:func:`!" @@ -103,12 +119,14 @@ msgid "" "*stop* and *step* are evaluated more than once." msgstr "" +#: ../../c-api/slice.rst:86 msgid "" "If ``Py_LIMITED_API`` is set to the value less than ``0x03050400`` or " "between ``0x03060000`` and ``0x03060100`` (not including) :c:func:`!" "PySlice_GetIndicesEx` is a deprecated function." msgstr "" +#: ../../c-api/slice.rst:94 msgid "" "Extract the start, stop and step data members from a slice object as C " "integers. Silently reduce values larger than ``PY_SSIZE_T_MAX`` to " @@ -117,32 +135,39 @@ msgid "" "less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``." msgstr "" +#: ../../c-api/slice.rst:100 msgid "Return ``-1`` with an exception set on error, ``0`` on success." msgstr "" +#: ../../c-api/slice.rst:107 msgid "" "Adjust start/end slice indices assuming a sequence of the specified length. " "Out of bounds indices are clipped in a manner consistent with the handling " "of normal slices." msgstr "" +#: ../../c-api/slice.rst:111 msgid "" "Return the length of the slice. Always successful. Doesn't call Python " "code." msgstr "" +#: ../../c-api/slice.rst:118 msgid "Ellipsis Object" msgstr "" +#: ../../c-api/slice.rst:123 msgid "" "The type of Python :const:`Ellipsis` object. Same as :class:`types." "EllipsisType` in the Python layer." msgstr "" +#: ../../c-api/slice.rst:129 msgid "" "The Python ``Ellipsis`` object. This object has no methods. Like :c:data:" "`Py_None`, it is an :term:`immortal` singleton object." msgstr "" +#: ../../c-api/slice.rst:132 msgid ":c:data:`Py_Ellipsis` is immortal." msgstr "" diff --git a/c-api/slice.po~ b/c-api/slice.po~ new file mode 100644 index 00000000..cc0c01fe --- /dev/null +++ b/c-api/slice.po~ @@ -0,0 +1,148 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Slice Objects" +msgstr "" + +msgid "" +"The type object for slice objects. This is the same as :class:`slice` in " +"the Python layer." +msgstr "" + +msgid "" +"Return true if *ob* is a slice object; *ob* must not be ``NULL``. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return a new slice object with the given values. The *start*, *stop*, and " +"*step* parameters are used as the values of the slice object attributes of " +"the same names. Any of the values may be ``NULL``, in which case the " +"``None`` will be used for the corresponding attribute." +msgstr "" + +msgid "" +"Return ``NULL`` with an exception set if the new object could not be " +"allocated." +msgstr "" + +msgid "" +"Retrieve the start, stop and step indices from the slice object *slice*, " +"assuming a sequence of length *length*. Treats indices greater than *length* " +"as errors." +msgstr "" + +msgid "" +"Returns ``0`` on success and ``-1`` on error with no exception set (unless " +"one of the indices was not ``None`` and failed to be converted to an " +"integer, in which case ``-1`` is returned with an exception set)." +msgstr "" + +msgid "You probably do not want to use this function." +msgstr "" + +msgid "" +"The parameter type for the *slice* parameter was ``PySliceObject*`` before." +msgstr "" + +msgid "" +"Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, " +"stop, and step indices from the slice object *slice* assuming a sequence of " +"length *length*, and store the length of the slice in *slicelength*. Out of " +"bounds indices are clipped in a manner consistent with the handling of " +"normal slices." +msgstr "" + +msgid "Return ``0`` on success and ``-1`` on error with an exception set." +msgstr "" + +msgid "" +"This function is considered not safe for resizable sequences. Its invocation " +"should be replaced by a combination of :c:func:`PySlice_Unpack` and :c:func:" +"`PySlice_AdjustIndices` where ::" +msgstr "" + +msgid "" +"if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) " +"< 0) {\n" +" // return error\n" +"}" +msgstr "" + +msgid "is replaced by ::" +msgstr "" + +msgid "" +"if (PySlice_Unpack(slice, &start, &stop, &step) < 0) {\n" +" // return error\n" +"}\n" +"slicelength = PySlice_AdjustIndices(length, &start, &stop, step);" +msgstr "" + +msgid "" +"If ``Py_LIMITED_API`` is not set or set to the value between ``0x03050400`` " +"and ``0x03060000`` (not including) or ``0x03060100`` or higher :c:func:`!" +"PySlice_GetIndicesEx` is implemented as a macro using :c:func:`!" +"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*, " +"*stop* and *step* are evaluated more than once." +msgstr "" + +msgid "" +"If ``Py_LIMITED_API`` is set to the value less than ``0x03050400`` or " +"between ``0x03060000`` and ``0x03060100`` (not including) :c:func:`!" +"PySlice_GetIndicesEx` is a deprecated function." +msgstr "" + +msgid "" +"Extract the start, stop and step data members from a slice object as C " +"integers. Silently reduce values larger than ``PY_SSIZE_T_MAX`` to " +"``PY_SSIZE_T_MAX``, silently boost the start and stop values less than " +"``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``, and silently boost the step values " +"less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``." +msgstr "" + +msgid "Return ``-1`` with an exception set on error, ``0`` on success." +msgstr "" + +msgid "" +"Adjust start/end slice indices assuming a sequence of the specified length. " +"Out of bounds indices are clipped in a manner consistent with the handling " +"of normal slices." +msgstr "" + +msgid "" +"Return the length of the slice. Always successful. Doesn't call Python " +"code." +msgstr "" + +msgid "Ellipsis Object" +msgstr "" + +msgid "" +"The type of Python :const:`Ellipsis` object. Same as :class:`types." +"EllipsisType` in the Python layer." +msgstr "" + +msgid "" +"The Python ``Ellipsis`` object. This object has no methods. Like :c:data:" +"`Py_None`, it is an :term:`immortal` singleton object." +msgstr "" + +msgid ":c:data:`Py_Ellipsis` is immortal." +msgstr "" diff --git a/c-api/stable.po b/c-api/stable.po index 1c4f5b9c..22f047d3 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "C API Stability" +#: ../../c-api/stable.rst:7 +msgid "C API and ABI Stability" msgstr "" +#: ../../c-api/stable.rst:9 msgid "" "Unless documented otherwise, Python's C API is covered by the Backwards " "Compatibility Policy, :pep:`387`. Most changes to it are source-compatible " @@ -27,6 +29,7 @@ msgid "" "only done after a deprecation period or to fix serious issues." msgstr "" +#: ../../c-api/stable.rst:15 msgid "" "CPython's Application Binary Interface (ABI) is forward- and backwards-" "compatible across a minor release (if these are compiled the same way; see :" @@ -35,23 +38,28 @@ msgid "" "3.9.x and 3.11.x." msgstr "" +#: ../../c-api/stable.rst:21 msgid "There are two tiers of C API with different stability expectations:" msgstr "" +#: ../../c-api/stable.rst:23 msgid "" ":ref:`Unstable API `, may change in minor versions without a " "deprecation period. It is marked by the ``PyUnstable`` prefix in names." msgstr "" +#: ../../c-api/stable.rst:25 msgid "" ":ref:`Limited API `, is compatible across several minor " "releases. When :c:macro:`Py_LIMITED_API` is defined, only this subset is " "exposed from ``Python.h``." msgstr "" +#: ../../c-api/stable.rst:29 msgid "These are discussed in more detail below." msgstr "" +#: ../../c-api/stable.rst:31 msgid "" "Names prefixed by an underscore, such as ``_Py_InternalState``, are private " "API that can change without notice even in patch releases. If you need to " @@ -60,9 +68,11 @@ msgid "" "case." msgstr "" +#: ../../c-api/stable.rst:40 msgid "Unstable C API" msgstr "" +#: ../../c-api/stable.rst:44 msgid "" "Any API named with the ``PyUnstable`` prefix exposes CPython implementation " "details, and may change in every minor release (e.g. from 3.9 to 3.10) " @@ -70,158 +80,295 @@ msgid "" "release (e.g. from 3.10.0 to 3.10.1)." msgstr "" +#: ../../c-api/stable.rst:49 msgid "" "It is generally intended for specialized, low-level tools like debuggers." msgstr "" +#: ../../c-api/stable.rst:51 msgid "" "Projects that use this API are expected to follow CPython development and " "spend extra effort adjusting to changes." msgstr "" -msgid "Stable Application Binary Interface" +#: ../../c-api/stable.rst:58 +msgid "Stable Application Binary Interfaces" +msgstr "" + +#: ../../c-api/stable.rst:60 +msgid "" +"Python's :dfn:`Stable ABI` allows extensions to be compatible with multiple " +"versions of Python, without recompilation." msgstr "" +#: ../../c-api/stable.rst:65 msgid "" -"For simplicity, this document talks about *extensions*, but the Limited API " -"and Stable ABI work the same way for all uses of the API – for example, " -"embedding Python." +"For simplicity, this document talks about *extensions*, but Stable ABI works " +"the same way for all uses of the API – for example, embedding Python." msgstr "" -msgid "Limited C API" +#: ../../c-api/stable.rst:68 +msgid "There are two Stable ABIs:" msgstr "" +#: ../../c-api/stable.rst:70 msgid "" -"Python 3.2 introduced the *Limited API*, a subset of Python's C API. " -"Extensions that only use the Limited API can be compiled once and be loaded " -"on multiple versions of Python. Contents of the Limited API are :ref:`listed " -"below `." +"``abi3``, introduced in Python 3.2, is compatible with **non**-:term:`free-" +"threaded ` builds of CPython." msgstr "" +#: ../../c-api/stable.rst:73 msgid "" -"Define this macro before including ``Python.h`` to opt in to only use the " -"Limited API, and to select the Limited API version." +"``abi3t``, introduced in Python 3.15, is compatible with :term:`free-" +"threaded ` builds of CPython. It has stricter API " +"limitations than ``abi3``." msgstr "" +#: ../../c-api/stable.rst:79 +msgid "``abi3t`` was added in :pep:`803`" +msgstr "" + +#: ../../c-api/stable.rst:81 msgid "" -"Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` " -"corresponding to the lowest Python version your extension supports. The " -"extension will be ABI-compatible with all Python 3 releases from the " -"specified one onward, and can use Limited API introduced up to that version." +"It is possible for an extension to be compiled for *both* ``abi3`` and " +"``abi3t`` at the same time; the result will be compatible with both free-" +"threaded and non-free-threaded builds of Python. Currently, this has no " +"downsides compared to compiling for ``abi3t`` only." msgstr "" +#: ../../c-api/stable.rst:86 msgid "" -"Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a minimum " -"minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when " -"compiling with future Python versions." +"Each Stable ABI is versioned using the first two numbers of the Python " +"version. For example, Stable ABI 3.14 corresponds to Python 3.14. An " +"extension compiled for Stable ABI 3.x is ABI-compatible with Python 3.x and " +"above." msgstr "" +#: ../../c-api/stable.rst:91 msgid "" -"You can also define ``Py_LIMITED_API`` to ``3``. This works the same as " -"``0x03020000`` (Python 3.2, the version that introduced Limited API)." +"Extensions that target a stable ABI must only use a limited subset of the C " +"API. This subset is known as the :dfn:`Limited API`; its contents are :ref:" +"`listed below `." msgstr "" -msgid "Stable ABI" +#: ../../c-api/stable.rst:95 +msgid "" +"On Windows, extensions that use a Stable ABI should be linked against " +"``python3.dll`` rather than a version-specific library such as ``python39." +"dll``. This library only exposes the relevant symbols." msgstr "" +#: ../../c-api/stable.rst:100 msgid "" -"To enable this, Python provides a *Stable ABI*: a set of symbols that will " -"remain ABI-compatible across Python 3.x versions." +"On some platforms, Python will look for and load shared library files named " +"with the ``abi3`` or ``abi3t`` tag (for example, ``mymodule.abi3.so``). :" +"term:`Free-threaded ` interpreters only recognize the " +"``abi3t`` tag, while non-free-threaded ones will prefer ``abi3`` but fall " +"back to ``abi3t``. Thus, extensions compatible with both ABIs should use the " +"``abi3t`` tag." msgstr "" +#: ../../c-api/stable.rst:107 msgid "" -"The Stable ABI prevents ABI issues, like linker errors due to missing " -"symbols or data corruption due to changes in structure layouts or function " -"signatures. However, other changes in Python can change the *behavior* of " -"extensions. See Python's Backwards Compatibility Policy (:pep:`387`) for " -"details." +"Python does not necessarily check that extensions it loads have compatible " +"ABI. Extension authors are encouraged to add a check using the :c:macro:" +"`Py_mod_abi` slot or the :c:func:`PyABIInfo_Check` function, but the user " +"(or their packaging tool) is ultimately responsible for ensuring that, for " +"example, extensions built for Stable ABI 3.10 are not installed for lower " +"versions of Python." msgstr "" +#: ../../c-api/stable.rst:115 msgid "" -"The Stable ABI contains symbols exposed in the :ref:`Limited API `, but also other ones – for example, functions necessary to support " -"older versions of the Limited API." +"All functions in Stable ABI are present as functions in Python's shared " +"library, not solely as macros. This makes them usable in languages that " +"don't use the C preprocessor, including Python's :py:mod:`ctypes`." +msgstr "" + +#: ../../c-api/stable.rst:124 +msgid "Compiling for Stable ABI" msgstr "" +#: ../../c-api/stable.rst:128 msgid "" -"On Windows, extensions that use the Stable ABI should be linked against " -"``python3.dll`` rather than a version-specific library such as ``python39." -"dll``." +"Build tools (such as, for example, meson-python, scikit-build-core, or " +"Setuptools) often have a mechanism for setting macros and synchronizing them " +"with extension filenames and other metadata. Prefer using such a mechanism, " +"if it exists, over defining the macros manually." msgstr "" +#: ../../c-api/stable.rst:134 msgid "" -"On some platforms, Python will look for and load shared library files named " -"with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not check if such " -"extensions conform to a Stable ABI. The user (or their packaging tools) need " -"to ensure that, for example, extensions built with the 3.10+ Limited API are " -"not installed for lower versions of Python." +"The rest of this section is mainly relevant for tool authors, and for people " +"who compile extensions manually." +msgstr "" + +#: ../../c-api/stable.rst:137 +msgid "`list of recommended tools`_ in the Python Packaging User Guide" +msgstr "" + +#: ../../c-api/stable.rst:141 +msgid "" +"To compile for a Stable ABI, define one or both of the following macros to " +"the lowest Python version your extension should support, in :c:macro:" +"`Py_PACK_VERSION` format. Typically, you should choose a specific value " +"rather than the version of the Python headers you are compiling against." msgstr "" +#: ../../c-api/stable.rst:147 msgid "" -"All functions in the Stable ABI are present as functions in Python's shared " -"library, not solely as macros. This makes them usable from languages that " -"don't use the C preprocessor." +"The macros must be defined before including ``Python.h``. Since :c:macro:" +"`Py_PACK_VERSION` is not available at this point, you will need to use the " +"numeric value directly. For reference, the values for a few recent Python " +"versions are:" msgstr "" -msgid "Limited API Scope and Performance" +#: ../../c-api/stable.rst:1 +msgid "" +"0x30a0000 /* Py_PACK_VERSION(3,10) */\n" +"0x30b0000 /* Py_PACK_VERSION(3,11) */\n" +"0x30c0000 /* Py_PACK_VERSION(3,12) */\n" +"0x30d0000 /* Py_PACK_VERSION(3,13) */\n" +"0x30e0000 /* Py_PACK_VERSION(3,14) */\n" +"0x30f0000 /* Py_PACK_VERSION(3,15) */" msgstr "" +#: ../../c-api/stable.rst:154 msgid "" -"The goal for the Limited API is to allow everything that is possible with " -"the full C API, but possibly with a performance penalty." +"When one of the macros is defined, ``Python.h`` will only expose API that is " +"compatible with the given Stable ABI -- that is, the :ref:`Limited API " +"` plus some definitions that need to be visible to the " +"compiler but should not be used directly. When both are defined, ``Python." +"h`` will only expose API compatible with both Stable ABIs." msgstr "" +#: ../../c-api/stable.rst:163 msgid "" -"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro " -"variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it " -"can rely on version-specific implementation details of the list object." +"Target ``abi3``, that is, non-:term:`free-threaded builds ` of CPython. See :ref:`above ` for common information." msgstr "" +#: ../../c-api/stable.rst:169 msgid "" -"Without ``Py_LIMITED_API`` defined, some C API functions are inlined or " -"replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, " -"allowing stability as Python's data structures are improved, but possibly " -"reducing performance." +"Target ``abi3t``, that is, :term:`free-threaded builds ` of CPython. See :ref:`above ` for common information." msgstr "" +#: ../../c-api/stable.rst:175 msgid "" -"By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile " -"a Limited API extension with a version-specific ABI. This can improve " -"performance for that Python version, but will limit compatibility. Compiling " -"with ``Py_LIMITED_API`` will then yield an extension that can be distributed " -"where a version-specific one is not available – for example, for prereleases " -"of an upcoming Python version." +"Both macros specify a target ABI; the different naming style is due to " +"backwards compatibility." msgstr "" -msgid "Limited API Caveats" +#: ../../c-api/stable.rst:178 +msgid "Historical note" +msgstr "" + +#: ../../c-api/stable.rst:180 +msgid "" +"You can also define ``Py_LIMITED_API`` as ``3``. This works the same as " +"``0x03020000`` (Python 3.2, the version that introduced Stable ABI)." msgstr "" +#: ../../c-api/stable.rst:183 msgid "" -"Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee " -"that code conforms to the :ref:`Limited API ` or the :ref:" -"`Stable ABI `. ``Py_LIMITED_API`` only covers definitions, but " -"an API also includes other issues, such as expected semantics." +"When both are defined, ``Python.h`` may, or may not, redefine :c:macro:`!" +"Py_LIMITED_API` to match :c:macro:`!Py_TARGET_ABI3T`." msgstr "" +#: ../../c-api/stable.rst:186 msgid "" -"One issue that ``Py_LIMITED_API`` does not guard against is calling a " -"function with arguments that are invalid in a lower Python version. For " -"example, consider a function that starts accepting ``NULL`` for an argument. " -"In Python 3.9, ``NULL`` now selects a default behavior, but in Python 3.8, " -"the argument will be used directly, causing a ``NULL`` dereference and " -"crash. A similar argument works for fields of structs." +"On a :term:`free-threaded build` -- that is, when :c:macro:`Py_GIL_DISABLED` " +"is defined -- :c:macro:`!Py_TARGET_ABI3T` defaults to the value of :c:macro:" +"`!Py_LIMITED_API`. This means that there are two ways to build for both " +"``abi3`` and ``abi3t``:" +msgstr "" + +#: ../../c-api/stable.rst:191 +msgid "" +"define both :c:macro:`!Py_LIMITED_API` and :c:macro:`!Py_TARGET_ABI3T`, or" +msgstr "" + +#: ../../c-api/stable.rst:192 +msgid "define only :c:macro:`!Py_LIMITED_API` and:" +msgstr "" + +#: ../../c-api/stable.rst:194 +msgid "on Windows, define :c:macro:`!Py_GIL_DISABLED`;" +msgstr "" + +#: ../../c-api/stable.rst:195 +msgid "on other systems, use the headers of free-threaded build of Python." msgstr "" +#: ../../c-api/stable.rst:201 +msgid "Stable ABI Scope and Performance" +msgstr "" + +#: ../../c-api/stable.rst:203 msgid "" -"Another issue is that some struct fields are currently not hidden when " -"``Py_LIMITED_API`` is defined, even though they're part of the Limited API." +"The goal for Stable ABI is to allow everything that is possible with the " +"full C API, but possibly with a performance penalty. Generally, " +"compatibility with Stable ABI will require some changes to an extension's " +"source code." msgstr "" +#: ../../c-api/stable.rst:208 +msgid "" +"For example, while :c:func:`PyList_GetItem` is available, its \"unsafe\" " +"macro variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster " +"because it can rely on version-specific implementation details of the list " +"object." +msgstr "" + +#: ../../c-api/stable.rst:213 +msgid "" +"For another example, when *not* compiling for Stable ABI, some C API " +"functions are inlined or replaced by macros. Compiling for Stable ABI " +"disables this inlining, allowing stability as Python's data structures are " +"improved, but possibly reducing performance." +msgstr "" + +#: ../../c-api/stable.rst:218 +msgid "" +"By leaving out the :c:macro:`!Py_LIMITED_API` or :c:macro:`!Py_TARGET_ABI3T` " +"definition, it is possible to compile Stable-ABI-compatible source for a " +"version-specific ABI. A potentially faster version-specific extension can " +"then be distributed alongside a version compiled for Stable ABI -- a slower " +"but more compatible fallback." +msgstr "" + +#: ../../c-api/stable.rst:229 +msgid "Stable ABI Caveats" +msgstr "" + +#: ../../c-api/stable.rst:231 +msgid "" +"Note that compiling for Stable ABI is *not* a complete guarantee that code " +"will be compatible with the expected Python versions. Stable ABI prevents " +"*ABI* issues, like linker errors due to missing symbols or data corruption " +"due to changes in structure layouts or function signatures. However, other " +"changes in Python can change the *behavior* of extensions." +msgstr "" + +#: ../../c-api/stable.rst:238 +msgid "" +"One issue that the :c:macro:`Py_TARGET_ABI3T` and :c:macro:`Py_LIMITED_API` " +"macros do not guard against is calling a function with arguments that are " +"invalid in a lower Python version. For example, consider a function that " +"starts accepting ``NULL`` for an argument. In Python 3.9, ``NULL`` now " +"selects a default behavior, but in Python 3.8, the argument will be used " +"directly, causing a ``NULL`` dereference and crash. A similar argument works " +"for fields of structs." +msgstr "" + +#: ../../c-api/stable.rst:246 msgid "" "For these reasons, we recommend testing an extension with *all* minor Python " -"versions it supports, and preferably to build with the *lowest* such version." +"versions it supports." msgstr "" +#: ../../c-api/stable.rst:249 msgid "" "We also recommend reviewing documentation of all used API to check if it is " "explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a " @@ -229,38 +376,246 @@ msgid "" "unintentionally, as bugs)." msgstr "" +#: ../../c-api/stable.rst:254 msgid "" -"Also note that the Limited API is not necessarily stable: compiling with " -"``Py_LIMITED_API`` with Python 3.8 means that the extension will run with " -"Python 3.12, but it will not necessarily *compile* with Python 3.12. In " -"particular, parts of the Limited API may be deprecated and removed, provided " -"that the Stable ABI stays stable." +"Also note that while compiling with ``Py_LIMITED_API`` 3.8 means that the " +"extension should *load* on Python 3.12, and *compile* with Python 3.12, the " +"same source will not necessarily compile with ``Py_LIMITED_API`` set to " +"3.12. In general, parts of the Limited API may be deprecated and removed, " +"provided that Stable ABI stays stable." msgstr "" +#: ../../c-api/stable.rst:265 msgid "Platform Considerations" msgstr "" +#: ../../c-api/stable.rst:267 msgid "" "ABI stability depends not only on Python, but also on the compiler used, " "lower-level libraries and compiler options. For the purposes of the :ref:" -"`Stable ABI `, these details define a “platform”. They usually " +"`Stable ABIs `, these details define a “platform”. They usually " "depend on the OS type and processor architecture" msgstr "" +#: ../../c-api/stable.rst:272 msgid "" "It is the responsibility of each particular distributor of Python to ensure " "that all Python versions on a particular platform are built in a way that " -"does not break the Stable ABI. This is the case with Windows and macOS " -"releases from ``python.org`` and many third-party distributors." +"does not break the Stable ABIs, or the version-specific ABIs. This is the " +"case with Windows and macOS releases from ``python.org`` and many third-" +"party distributors." +msgstr "" + +#: ../../c-api/stable.rst:280 +msgid "ABI Checking" +msgstr "" + +#: ../../c-api/stable.rst:284 +msgid "Python includes a rudimentary check for ABI compatibility." +msgstr "" + +#: ../../c-api/stable.rst:286 +msgid "" +"This check is not comprehensive. It only guards against common cases of " +"incompatible modules being installed for the wrong interpreter. It also does " +"not take :ref:`platform incompatibilities ` into " +"account. It can only be done after an extension is successfully loaded." +msgstr "" + +#: ../../c-api/stable.rst:293 +msgid "" +"Despite these limitations, it is recommended that extension modules use this " +"mechanism, so that detectable incompatibilities raise exceptions rather than " +"crash." +msgstr "" + +#: ../../c-api/stable.rst:297 +msgid "" +"Most modules can use this check via the :c:data:`Py_mod_abi` slot and the :c:" +"macro:`PyABIInfo_VAR` macro, for example like this:" +msgstr "" + +#: ../../c-api/stable.rst:300 +msgid "" +"PyABIInfo_VAR(abi_info);\n" +"\n" +"static PyModuleDef_Slot mymodule_slots[] = {\n" +" {Py_mod_abi, &abi_info},\n" +" ...\n" +"};" +msgstr "" + +#: ../../c-api/stable.rst:310 +msgid "The full API is described below for advanced use cases." +msgstr "" + +#: ../../c-api/stable.rst:314 +msgid "" +"Verify that the given *info* is compatible with the currently running " +"interpreter." +msgstr "" + +#: ../../c-api/stable.rst:317 +msgid "Return 0 on success. On failure, raise an exception and return -1." +msgstr "" + +#: ../../c-api/stable.rst:319 +msgid "" +"If the ABI is incompatible, the raised exception will be :py:exc:" +"`ImportError`." +msgstr "" + +#: ../../c-api/stable.rst:321 +msgid "" +"The *module_name* argument can be ``NULL``, or point to a NUL-terminated " +"UTF-8-encoded string used for error messages." +msgstr "" + +#: ../../c-api/stable.rst:324 +msgid "" +"Note that if *info* describes the ABI that the current code uses (as defined " +"by :c:macro:`PyABIInfo_VAR`, for example), using any other Python C API may " +"lead to crashes. In particular, it is not safe to examine the raised " +"exception." +msgstr "" + +#: ../../c-api/stable.rst:333 +msgid "" +"Define a static :c:struct:`PyABIInfo` variable with the given *NAME* that " +"describes the ABI that the current code will use. This macro expands to:" +msgstr "" + +#: ../../c-api/stable.rst:337 +msgid "" +"static PyABIInfo NAME = {\n" +" 1, 0,\n" +" PyABIInfo_DEFAULT_FLAGS,\n" +" PY_VERSION_HEX,\n" +" PyABIInfo_DEFAULT_ABI_VERSION\n" +"}" +msgstr "" + +#: ../../c-api/stable.rst:352 +msgid "The major version of :c:struct:`PyABIInfo`. Can be set to:" +msgstr "" + +#: ../../c-api/stable.rst:354 +msgid "``0`` to skip all checking, or" +msgstr "" + +#: ../../c-api/stable.rst:355 +msgid "``1`` to specify this version of :c:struct:`!PyABIInfo`." +msgstr "" + +#: ../../c-api/stable.rst:359 +msgid "" +"The minor version of :c:struct:`PyABIInfo`. Must be set to ``0``; larger " +"values are reserved for backwards-compatible future versions of :c:struct:`!" +"PyABIInfo`." +msgstr "" + +#: ../../c-api/stable.rst:367 +msgid "This field is usually set to the following macro:" +msgstr "" + +#: ../../c-api/stable.rst:371 +msgid "" +"Default flags, based on current values of macros such as :c:macro:" +"`Py_LIMITED_API` and :c:macro:`Py_GIL_DISABLED`." +msgstr "" + +#: ../../c-api/stable.rst:374 +msgid "" +"Alternately, the field can be set to the following flags, combined by " +"bitwise OR. Unused bits must be set to zero." +msgstr "" + +#: ../../c-api/stable.rst:378 +msgid "ABI variant -- one of:" +msgstr "" + +#: ../../c-api/stable.rst:382 +msgid "Specifies that Stable ABI is used." +msgstr "" + +#: ../../c-api/stable.rst:386 +msgid "" +"Specifies ABI specific to a particular build of CPython. Internal use only." +msgstr "" + +#: ../../c-api/stable.rst:389 +msgid "Free-threading compatibility -- one of:" +msgstr "" + +#: ../../c-api/stable.rst:393 +msgid "" +"Specifies ABI compatible with :term:`free-threaded builds ` of CPython. (That is, ones compiled with :option:`--disable-gil`; " +"with ``t`` in :py:data:`sys.abiflags`)" +msgstr "" + +#: ../../c-api/stable.rst:400 +msgid "" +"Specifies ABI compatible with non-free-threaded builds of CPython (ones " +"compiled *without* :option:`--disable-gil`)." +msgstr "" + +#: ../../c-api/stable.rst:405 +msgid "" +"Specifies ABI compatible with both free-threaded and non-free-threaded " +"builds of CPython, that is, both ``abi3`` and ``abi3t``." +msgstr "" + +#: ../../c-api/stable.rst:411 +msgid "" +"The version of the Python headers used to build the code, in the format used " +"by :c:macro:`PY_VERSION_HEX`." +msgstr "" + +#: ../../c-api/stable.rst:414 +msgid "" +"This can be set to ``0`` to skip any checks related to this field. This " +"option is meant mainly for projects that do not use the CPython headers " +"directly, and do not emulate a specific version of them." +msgstr "" + +#: ../../c-api/stable.rst:420 +msgid "The ABI version." +msgstr "" + +#: ../../c-api/stable.rst:422 +msgid "" +"For Stable ABI, this field should be the value of :c:macro:`Py_LIMITED_API` " +"or :c:macro:`Py_TARGET_ABI3T`. If both are defined, use the smaller value. " +"(If :c:macro:`Py_LIMITED_API` is ``3``; use :c:expr:`Py_PACK_VERSION(3, 2)` " +"instead of ``3``.)" +msgstr "" + +#: ../../c-api/stable.rst:428 +msgid "Otherwise, it should be set to :c:macro:`PY_VERSION_HEX`." +msgstr "" + +#: ../../c-api/stable.rst:430 +msgid "It can also be set to ``0`` to skip any checks related to this field." +msgstr "" + +#: ../../c-api/stable.rst:436 +msgid "" +"The value that should be used for this field, based on current values of " +"macros such as :c:macro:`Py_LIMITED_API`, :c:macro:`PY_VERSION_HEX` and :c:" +"macro:`Py_GIL_DISABLED`." msgstr "" +#: ../../c-api/stable.rst:447 msgid "Contents of Limited API" msgstr "" +#: ../../c-api/stable.rst:449 msgid "" -"Currently, the :ref:`Limited API ` includes the following " -"items:" +"This is the definitive list of :ref:`Limited API ` for Python " +"|version|:" msgstr "" +#: ../../c-api/stable.rst:42 msgid "PyUnstable" msgstr "" diff --git a/c-api/stable.po~ b/c-api/stable.po~ new file mode 100644 index 00000000..1c4f5b9c --- /dev/null +++ b/c-api/stable.po~ @@ -0,0 +1,266 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "C API Stability" +msgstr "" + +msgid "" +"Unless documented otherwise, Python's C API is covered by the Backwards " +"Compatibility Policy, :pep:`387`. Most changes to it are source-compatible " +"(typically by only adding new API). Changing existing API or removing API is " +"only done after a deprecation period or to fix serious issues." +msgstr "" + +msgid "" +"CPython's Application Binary Interface (ABI) is forward- and backwards-" +"compatible across a minor release (if these are compiled the same way; see :" +"ref:`stable-abi-platform` below). So, code compiled for Python 3.10.0 will " +"work on 3.10.8 and vice versa, but will need to be compiled separately for " +"3.9.x and 3.11.x." +msgstr "" + +msgid "There are two tiers of C API with different stability expectations:" +msgstr "" + +msgid "" +":ref:`Unstable API `, may change in minor versions without a " +"deprecation period. It is marked by the ``PyUnstable`` prefix in names." +msgstr "" + +msgid "" +":ref:`Limited API `, is compatible across several minor " +"releases. When :c:macro:`Py_LIMITED_API` is defined, only this subset is " +"exposed from ``Python.h``." +msgstr "" + +msgid "These are discussed in more detail below." +msgstr "" + +msgid "" +"Names prefixed by an underscore, such as ``_Py_InternalState``, are private " +"API that can change without notice even in patch releases. If you need to " +"use this API, consider reaching out to `CPython developers `_ to discuss adding public API for your use " +"case." +msgstr "" + +msgid "Unstable C API" +msgstr "" + +msgid "" +"Any API named with the ``PyUnstable`` prefix exposes CPython implementation " +"details, and may change in every minor release (e.g. from 3.9 to 3.10) " +"without any deprecation warnings. However, it will not change in a bugfix " +"release (e.g. from 3.10.0 to 3.10.1)." +msgstr "" + +msgid "" +"It is generally intended for specialized, low-level tools like debuggers." +msgstr "" + +msgid "" +"Projects that use this API are expected to follow CPython development and " +"spend extra effort adjusting to changes." +msgstr "" + +msgid "Stable Application Binary Interface" +msgstr "" + +msgid "" +"For simplicity, this document talks about *extensions*, but the Limited API " +"and Stable ABI work the same way for all uses of the API – for example, " +"embedding Python." +msgstr "" + +msgid "Limited C API" +msgstr "" + +msgid "" +"Python 3.2 introduced the *Limited API*, a subset of Python's C API. " +"Extensions that only use the Limited API can be compiled once and be loaded " +"on multiple versions of Python. Contents of the Limited API are :ref:`listed " +"below `." +msgstr "" + +msgid "" +"Define this macro before including ``Python.h`` to opt in to only use the " +"Limited API, and to select the Limited API version." +msgstr "" + +msgid "" +"Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` " +"corresponding to the lowest Python version your extension supports. The " +"extension will be ABI-compatible with all Python 3 releases from the " +"specified one onward, and can use Limited API introduced up to that version." +msgstr "" + +msgid "" +"Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a minimum " +"minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when " +"compiling with future Python versions." +msgstr "" + +msgid "" +"You can also define ``Py_LIMITED_API`` to ``3``. This works the same as " +"``0x03020000`` (Python 3.2, the version that introduced Limited API)." +msgstr "" + +msgid "Stable ABI" +msgstr "" + +msgid "" +"To enable this, Python provides a *Stable ABI*: a set of symbols that will " +"remain ABI-compatible across Python 3.x versions." +msgstr "" + +msgid "" +"The Stable ABI prevents ABI issues, like linker errors due to missing " +"symbols or data corruption due to changes in structure layouts or function " +"signatures. However, other changes in Python can change the *behavior* of " +"extensions. See Python's Backwards Compatibility Policy (:pep:`387`) for " +"details." +msgstr "" + +msgid "" +"The Stable ABI contains symbols exposed in the :ref:`Limited API `, but also other ones – for example, functions necessary to support " +"older versions of the Limited API." +msgstr "" + +msgid "" +"On Windows, extensions that use the Stable ABI should be linked against " +"``python3.dll`` rather than a version-specific library such as ``python39." +"dll``." +msgstr "" + +msgid "" +"On some platforms, Python will look for and load shared library files named " +"with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not check if such " +"extensions conform to a Stable ABI. The user (or their packaging tools) need " +"to ensure that, for example, extensions built with the 3.10+ Limited API are " +"not installed for lower versions of Python." +msgstr "" + +msgid "" +"All functions in the Stable ABI are present as functions in Python's shared " +"library, not solely as macros. This makes them usable from languages that " +"don't use the C preprocessor." +msgstr "" + +msgid "Limited API Scope and Performance" +msgstr "" + +msgid "" +"The goal for the Limited API is to allow everything that is possible with " +"the full C API, but possibly with a performance penalty." +msgstr "" + +msgid "" +"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro " +"variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it " +"can rely on version-specific implementation details of the list object." +msgstr "" + +msgid "" +"Without ``Py_LIMITED_API`` defined, some C API functions are inlined or " +"replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, " +"allowing stability as Python's data structures are improved, but possibly " +"reducing performance." +msgstr "" + +msgid "" +"By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile " +"a Limited API extension with a version-specific ABI. This can improve " +"performance for that Python version, but will limit compatibility. Compiling " +"with ``Py_LIMITED_API`` will then yield an extension that can be distributed " +"where a version-specific one is not available – for example, for prereleases " +"of an upcoming Python version." +msgstr "" + +msgid "Limited API Caveats" +msgstr "" + +msgid "" +"Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee " +"that code conforms to the :ref:`Limited API ` or the :ref:" +"`Stable ABI `. ``Py_LIMITED_API`` only covers definitions, but " +"an API also includes other issues, such as expected semantics." +msgstr "" + +msgid "" +"One issue that ``Py_LIMITED_API`` does not guard against is calling a " +"function with arguments that are invalid in a lower Python version. For " +"example, consider a function that starts accepting ``NULL`` for an argument. " +"In Python 3.9, ``NULL`` now selects a default behavior, but in Python 3.8, " +"the argument will be used directly, causing a ``NULL`` dereference and " +"crash. A similar argument works for fields of structs." +msgstr "" + +msgid "" +"Another issue is that some struct fields are currently not hidden when " +"``Py_LIMITED_API`` is defined, even though they're part of the Limited API." +msgstr "" + +msgid "" +"For these reasons, we recommend testing an extension with *all* minor Python " +"versions it supports, and preferably to build with the *lowest* such version." +msgstr "" + +msgid "" +"We also recommend reviewing documentation of all used API to check if it is " +"explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a " +"few private declarations are exposed for technical reasons (or even " +"unintentionally, as bugs)." +msgstr "" + +msgid "" +"Also note that the Limited API is not necessarily stable: compiling with " +"``Py_LIMITED_API`` with Python 3.8 means that the extension will run with " +"Python 3.12, but it will not necessarily *compile* with Python 3.12. In " +"particular, parts of the Limited API may be deprecated and removed, provided " +"that the Stable ABI stays stable." +msgstr "" + +msgid "Platform Considerations" +msgstr "" + +msgid "" +"ABI stability depends not only on Python, but also on the compiler used, " +"lower-level libraries and compiler options. For the purposes of the :ref:" +"`Stable ABI `, these details define a “platform”. They usually " +"depend on the OS type and processor architecture" +msgstr "" + +msgid "" +"It is the responsibility of each particular distributor of Python to ensure " +"that all Python versions on a particular platform are built in a way that " +"does not break the Stable ABI. This is the case with Windows and macOS " +"releases from ``python.org`` and many third-party distributors." +msgstr "" + +msgid "Contents of Limited API" +msgstr "" + +msgid "" +"Currently, the :ref:`Limited API ` includes the following " +"items:" +msgstr "" + +msgid "PyUnstable" +msgstr "" diff --git a/c-api/structures.po b/c-api/structures.po index 73186d98..88a1949b 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -8,27 +8,31 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/structures.rst:6 msgid "Common Object Structures" msgstr "" +#: ../../c-api/structures.rst:8 msgid "" "There are a large number of structures which are used in the definition of " "object types for Python. This section describes these structures and how " "they are used." msgstr "" +#: ../../c-api/structures.rst:14 msgid "Base object types and macros" msgstr "" +#: ../../c-api/structures.rst:16 msgid "" "All Python objects ultimately share a small number of fields at the " "beginning of the object's representation in memory. These are represented " @@ -39,6 +43,7 @@ msgid "" "`." msgstr "" +#: ../../c-api/structures.rst:26 msgid "" "All object types are extensions of this type. This is a type which contains " "the information Python needs to treat a pointer to an object as an object. " @@ -48,47 +53,96 @@ msgid "" "to a :c:expr:`PyObject*`." msgstr "" +#: ../../c-api/structures.rst:33 msgid "" "The members must not be accessed directly; instead use macros such as :c:" "macro:`Py_REFCNT` and :c:macro:`Py_TYPE`." msgstr "" +#: ../../c-api/structures.rst:36 +msgid "" +"In the :ref:`Stable ABI ` for Free-Threaded Builds (``abi3t``), " +"this struct is opaque; its size and layout may change between Python " +"versions. In Stable ABI for non-free-threaded builds (``abi3``), the :c:" +"member:`!ob_refcnt` and :c:member:`!ob_type` fields are available, but using " +"them directly is discouraged." +msgstr "" + +#: ../../c-api/structures.rst:45 msgid "" "The object's reference count, as returned by :c:macro:`Py_REFCNT`. Do not " "use this field directly; instead use functions and macros such as :c:macro:`!" "Py_REFCNT`, :c:func:`Py_INCREF` and :c:func:`Py_DecRef`." msgstr "" +#: ../../c-api/structures.rst:49 msgid "" "The field type may be different from ``Py_ssize_t``, depending on build " "configuration and platform." msgstr "" +#: ../../c-api/structures.rst:54 msgid "" "The object's type. Do not use this field directly; use :c:macro:`Py_TYPE` " "and :c:func:`Py_SET_TYPE` instead." msgstr "" +#: ../../c-api/structures.rst:60 +msgid "" +"A :ref:`per-object lock `, present only in the :term:`free-" +"threaded ` build (when :c:macro:`Py_GIL_DISABLED` is " +"defined)." +msgstr "" + +#: ../../c-api/structures.rst:63 +msgid "" +"This field is **reserved for use by the critical section API** (:c:macro:" +"`Py_BEGIN_CRITICAL_SECTION` / :c:macro:`Py_END_CRITICAL_SECTION`). Do " +"**not** lock it directly with ``PyMutex_Lock``; doing so can cause " +"deadlocks. If you need your own lock, add a separate :c:type:`PyMutex` " +"field to your object struct." +msgstr "" + +#: ../../c-api/structures.rst:74 msgid "" "An extension of :c:type:`PyObject` that adds the :c:member:`~PyVarObject." "ob_size` field. This is intended for objects that have some notion of " "*length*." msgstr "" +#: ../../c-api/structures.rst:78 msgid "" "As with :c:type:`!PyObject`, the members must not be accessed directly; " "instead use macros such as :c:macro:`Py_SIZE`, :c:macro:`Py_REFCNT` and :c:" "macro:`Py_TYPE`." msgstr "" +#: ../../c-api/structures.rst:82 +msgid "" +"In the :ref:`Stable ABI ` for Free-Threaded Builds (``abi3t``), " +"this struct is opaque; its size and layout may change between Python " +"versions. In Stable ABI for non-free-threaded builds (``abi3``), the :c:" +"member:`!ob_base` and :c:member:`!ob_size` fields are available, but using " +"them directly is discouraged." +msgstr "" + +#: ../../c-api/structures.rst:91 +msgid "" +"Common object header. Typically, this field is not accessed directly; " +"instead :c:type:`!PyVarObject` can be cast to :c:type:`PyObject`." +msgstr "" + +#: ../../c-api/structures.rst:97 msgid "" "A size field, whose contents should be considered an object's internal " "implementation detail." msgstr "" +#: ../../c-api/structures.rst:100 msgid "Do not use this field directly; use :c:macro:`Py_SIZE` instead." msgstr "" +#: ../../c-api/structures.rst:102 msgid "" "Object creation functions such as :c:func:`PyObject_NewVar` will generally " "set this field to the requested size (number of items). After creation, " @@ -96,131 +150,160 @@ msgid "" "`Py_SET_SIZE`." msgstr "" +#: ../../c-api/structures.rst:107 msgid "" "To get an object's publicly exposed length, as returned by the Python " "function :py:func:`len`, use :c:func:`PyObject_Length` instead." msgstr "" +#: ../../c-api/structures.rst:114 msgid "" "This is a macro used when declaring new types which represent objects " "without a varying length. The PyObject_HEAD macro expands to::" msgstr "" +#: ../../c-api/structures.rst:117 msgid "PyObject ob_base;" msgstr "" +#: ../../c-api/structures.rst:119 msgid "See documentation of :c:type:`PyObject` above." msgstr "" +#: ../../c-api/structures.rst:124 msgid "" "This is a macro used when declaring new types which represent objects with a " "length that varies from instance to instance. The PyObject_VAR_HEAD macro " "expands to::" msgstr "" +#: ../../c-api/structures.rst:128 msgid "PyVarObject ob_base;" msgstr "" +#: ../../c-api/structures.rst:130 msgid "See documentation of :c:type:`PyVarObject` above." msgstr "" +#: ../../c-api/structures.rst:135 msgid "" "The base class of all other objects, the same as :class:`object` in Python." msgstr "" +#: ../../c-api/structures.rst:140 msgid "" "Test if the *x* object is the *y* object, the same as ``x is y`` in Python." msgstr "" +#: ../../c-api/structures.rst:147 msgid "" "Test if an object is the ``None`` singleton, the same as ``x is None`` in " "Python." msgstr "" +#: ../../c-api/structures.rst:155 msgid "" "Test if an object is the ``True`` singleton, the same as ``x is True`` in " "Python." msgstr "" +#: ../../c-api/structures.rst:163 msgid "" "Test if an object is the ``False`` singleton, the same as ``x is False`` in " "Python." msgstr "" +#: ../../c-api/structures.rst:171 msgid "Get the type of the Python object *o*." msgstr "" +#: ../../c-api/structures.rst:173 msgid "" "The returned reference is :term:`borrowed ` from *o*. Do " "not release it with :c:func:`Py_DECREF` or similar." msgstr "" +#: ../../c-api/structures.rst:176 msgid "" ":c:func:`Py_TYPE()` is changed to an inline static function. The parameter " "type is no longer :c:expr:`const PyObject*`." msgstr "" +#: ../../c-api/structures.rst:183 msgid "" "Return non-zero if the object *o* type is *type*. Return zero otherwise. " "Equivalent to: ``Py_TYPE(o) == type``." msgstr "" +#: ../../c-api/structures.rst:191 msgid "" "Set the type of object *o* to *type*, without any checking or reference " "counting." msgstr "" +#: ../../c-api/structures.rst:194 msgid "" "This is a very low-level operation. Consider instead setting the Python " "attribute :attr:`~object.__class__` using :c:func:`PyObject_SetAttrString` " "or similar." msgstr "" +#: ../../c-api/structures.rst:198 msgid "" "Note that assigning an incompatible type can lead to undefined behavior." msgstr "" +#: ../../c-api/structures.rst:200 msgid "" "If *type* is a :ref:`heap type `, the caller must create a new " "reference to it. Similarly, if the old type of *o* is a heap type, the " "caller must release a reference to that type." msgstr "" +#: ../../c-api/structures.rst:210 msgid "Get the :c:member:`~PyVarObject.ob_size` field of *o*." msgstr "" +#: ../../c-api/structures.rst:212 msgid "" ":c:func:`Py_SIZE()` is changed to an inline static function. The parameter " "type is no longer :c:expr:`const PyVarObject*`." msgstr "" +#: ../../c-api/structures.rst:219 msgid "Set the :c:member:`~PyVarObject.ob_size` field of *o* to *size*." msgstr "" +#: ../../c-api/structures.rst:226 msgid "" "This is a macro which expands to initialization values for a new :c:type:" "`PyObject` type. This macro expands to::" msgstr "" +#: ../../c-api/structures.rst:229 msgid "" "_PyObject_EXTRA_INIT\n" "1, type," msgstr "" +#: ../../c-api/structures.rst:235 msgid "" "This is a macro which expands to initialization values for a new :c:type:" "`PyVarObject` type, including the :c:member:`~PyVarObject.ob_size` field. " "This macro expands to::" msgstr "" +#: ../../c-api/structures.rst:239 msgid "" "_PyObject_EXTRA_INIT\n" "1, type, size," msgstr "" +#: ../../c-api/structures.rst:244 msgid "Implementing functions and methods" msgstr "" +#: ../../c-api/structures.rst:248 msgid "" "Type of the functions used to implement most Python callables in C. " "Functions of this type take two :c:expr:`PyObject*` parameters and return " @@ -230,43 +313,51 @@ msgid "" "reference." msgstr "" +#: ../../c-api/structures.rst:255 msgid "The function signature is::" msgstr "" +#: ../../c-api/structures.rst:257 msgid "" "PyObject *PyCFunction(PyObject *self,\n" " PyObject *args);" msgstr "" +#: ../../c-api/structures.rst:262 msgid "" "Type of the functions used to implement Python callables in C with " "signature :ref:`METH_VARARGS | METH_KEYWORDS `. " "The function signature is::" msgstr "" +#: ../../c-api/structures.rst:266 msgid "" "PyObject *PyCFunctionWithKeywords(PyObject *self,\n" " PyObject *args,\n" " PyObject *kwargs);" msgstr "" +#: ../../c-api/structures.rst:273 msgid "" "Type of the functions used to implement Python callables in C with " "signature :c:macro:`METH_FASTCALL`. The function signature is::" msgstr "" +#: ../../c-api/structures.rst:277 msgid "" "PyObject *PyCFunctionFast(PyObject *self,\n" " PyObject *const *args,\n" " Py_ssize_t nargs);" msgstr "" +#: ../../c-api/structures.rst:283 msgid "" "Type of the functions used to implement Python callables in C with " "signature :ref:`METH_FASTCALL | METH_KEYWORDS `. The function signature is::" msgstr "" +#: ../../c-api/structures.rst:287 msgid "" "PyObject *PyCFunctionFastWithKeywords(PyObject *self,\n" " PyObject *const *args,\n" @@ -274,12 +365,14 @@ msgid "" " PyObject *kwnames);" msgstr "" +#: ../../c-api/structures.rst:294 msgid "" "Type of the functions used to implement Python callables in C with " "signature :ref:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS `. The function signature is::" msgstr "" +#: ../../c-api/structures.rst:298 msgid "" "PyObject *PyCMethod(PyObject *self,\n" " PyTypeObject *defining_class,\n" @@ -288,23 +381,33 @@ msgid "" " PyObject *kwnames)" msgstr "" +#: ../../c-api/structures.rst:309 msgid "" "Structure used to describe a method of an extension type. This structure " "has four fields:" msgstr "" +#: ../../c-api/structures.rst:314 msgid "Name of the method." msgstr "" +#: ../../c-api/structures.rst:316 +msgid "A ``NULL`` *ml_name* marks the end of a :c:type:`!PyMethodDef` array." +msgstr "" + +#: ../../c-api/structures.rst:320 msgid "Pointer to the C implementation." msgstr "" +#: ../../c-api/structures.rst:324 msgid "Flags bits indicating how the call should be constructed." msgstr "" +#: ../../c-api/structures.rst:328 msgid "Points to the contents of the docstring." msgstr "" +#: ../../c-api/structures.rst:330 msgid "" "The :c:member:`~PyMethodDef.ml_meth` is a C function pointer. The functions " "may be of different types, but they always return :c:expr:`PyObject*`. If " @@ -314,15 +417,18 @@ msgid "" "implementation uses the specific C type of the *self* object." msgstr "" +#: ../../c-api/structures.rst:338 msgid "" "The :c:member:`~PyMethodDef.ml_flags` field is a bitfield which can include " "the following flags. The individual flags indicate either a calling " "convention or a binding convention." msgstr "" +#: ../../c-api/structures.rst:343 msgid "There are these calling conventions:" msgstr "" +#: ../../c-api/structures.rst:347 msgid "" "This is the typical calling convention, where the methods have the type :c:" "type:`PyCFunction`. The function expects two :c:expr:`PyObject*` values. The " @@ -332,6 +438,7 @@ msgid "" "func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`." msgstr "" +#: ../../c-api/structures.rst:357 msgid "" "Can only be used in certain combinations with other flags: :ref:" "`METH_VARARGS | METH_KEYWORDS `, :ref:" @@ -340,9 +447,11 @@ msgid "" "METH_KEYWORDS>`." msgstr "" +#: ../../c-api/structures.rst:365 msgid ":c:expr:`METH_VARARGS | METH_KEYWORDS`" msgstr "" +#: ../../c-api/structures.rst:366 msgid "" "Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. " "The function expects three parameters: *self*, *args*, *kwargs* where " @@ -351,6 +460,7 @@ msgid "" "using :c:func:`PyArg_ParseTupleAndKeywords`." msgstr "" +#: ../../c-api/structures.rst:375 msgid "" "Fast calling convention supporting only positional arguments. The methods " "have the type :c:type:`PyCFunctionFast`. The first parameter is *self*, the " @@ -359,12 +469,15 @@ msgid "" "the array)." msgstr "" +#: ../../c-api/structures.rst:385 msgid "``METH_FASTCALL`` is now part of the :ref:`stable ABI `." msgstr "" +#: ../../c-api/structures.rst:390 msgid ":c:expr:`METH_FASTCALL | METH_KEYWORDS`" msgstr "" +#: ../../c-api/structures.rst:391 msgid "" "Extension of :c:macro:`METH_FASTCALL` supporting also keyword arguments, " "with methods of type :c:type:`PyCFunctionFastWithKeywords`. Keyword " @@ -376,14 +489,17 @@ msgid "" "the positional arguments." msgstr "" +#: ../../c-api/structures.rst:406 msgid "" "Can only be used in the combination with other flags: :ref:`METH_METHOD | " "METH_FASTCALL | METH_KEYWORDS `." msgstr "" +#: ../../c-api/structures.rst:412 msgid ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`" msgstr "" +#: ../../c-api/structures.rst:413 msgid "" "Extension of :ref:`METH_FASTCALL | METH_KEYWORDS ` supporting the *defining class*, that is, the class that " @@ -391,12 +507,14 @@ msgid "" "``Py_TYPE(self)``." msgstr "" +#: ../../c-api/structures.rst:418 msgid "" "The method needs to be of type :c:type:`PyCMethod`, the same as for " "``METH_FASTCALL | METH_KEYWORDS`` with ``defining_class`` argument added " "after ``self``." msgstr "" +#: ../../c-api/structures.rst:427 msgid "" "Methods without parameters don't need to check whether arguments are given " "if they are listed with the :c:macro:`METH_NOARGS` flag. They need to be of " @@ -405,11 +523,13 @@ msgid "" "the second parameter will be ``NULL``." msgstr "" +#: ../../c-api/structures.rst:433 msgid "" "The function must have 2 parameters. Since the second parameter is unused, :" "c:macro:`Py_UNUSED` can be used to prevent a compiler warning." msgstr "" +#: ../../c-api/structures.rst:439 msgid "" "Methods with a single object argument can be listed with the :c:macro:" "`METH_O` flag, instead of invoking :c:func:`PyArg_ParseTuple` with a " @@ -418,30 +538,35 @@ msgid "" "single argument." msgstr "" +#: ../../c-api/structures.rst:445 msgid "" "These two constants are not used to indicate the calling convention but the " -"binding when use with methods of classes. These may not be used for " +"binding when used with methods of classes. These may not be used for " "functions defined for modules. At most one of these flags may be set for " "any given method." msgstr "" +#: ../../c-api/structures.rst:455 msgid "" "The method will be passed the type object as the first parameter rather than " "an instance of the type. This is used to create *class methods*, similar to " -"what is created when using the :func:`classmethod` built-in function." +"what is created when using the :deco:`classmethod` built-in decorator." msgstr "" +#: ../../c-api/structures.rst:465 msgid "" "The method will be passed ``NULL`` as the first parameter rather than an " "instance of the type. This is used to create *static methods*, similar to " -"what is created when using the :func:`staticmethod` built-in function." +"what is created when using the :deco:`staticmethod` built-in decorator." msgstr "" +#: ../../c-api/structures.rst:469 msgid "" "One other constant controls whether a method is loaded in place of another " "definition with the same method name." msgstr "" +#: ../../c-api/structures.rst:475 msgid "" "The method will be loaded in place of existing definitions. Without " "*METH_COEXIST*, the default is to skip repeated definitions. Since slot " @@ -454,17 +579,38 @@ msgid "" "wrapper object calls." msgstr "" +#: ../../c-api/structures.rst:488 +msgid "" +"The type object corresponding to Python C method objects. This is available " +"as :class:`types.BuiltinMethodType` in the Python layer." +msgstr "" + +#: ../../c-api/structures.rst:494 +msgid "" +"Return true if *op* is an instance of the :c:type:`PyCMethod_Type` type or a " +"subtype of it. This function always succeeds." +msgstr "" + +#: ../../c-api/structures.rst:500 +msgid "" +"This is the same as :c:func:`PyCMethod_Check`, but does not account for " +"subtypes." +msgstr "" + +#: ../../c-api/structures.rst:506 msgid "" "Turn *ml* into a Python :term:`callable` object. The caller must ensure that " "*ml* outlives the :term:`callable`. Typically, *ml* is defined as a static " "variable." msgstr "" +#: ../../c-api/structures.rst:510 msgid "" "The *self* parameter will be passed as the *self* argument to the C function " "in ``ml->ml_meth`` when invoked. *self* can be ``NULL``." msgstr "" +#: ../../c-api/structures.rst:514 msgid "" "The :term:`callable` object's ``__module__`` attribute can be set from the " "given *module* argument. *module* should be a Python string, which will be " @@ -472,57 +618,152 @@ msgid "" "can be set to :const:`None` or ``NULL``." msgstr "" +#: ../../c-api/structures.rst:520 msgid ":attr:`function.__module__`" msgstr "" +#: ../../c-api/structures.rst:522 msgid "" "The *cls* parameter will be passed as the *defining_class* argument to the C " "function. Must be set if :c:macro:`METH_METHOD` is set on ``ml->ml_flags``." msgstr "" +#: ../../c-api/structures.rst:531 +msgid "" +"The type object corresponding to Python C function objects. This is " +"available as :class:`types.BuiltinFunctionType` in the Python layer." +msgstr "" + +#: ../../c-api/structures.rst:537 +msgid "" +"Return true if *op* is an instance of the :c:type:`PyCFunction_Type` type or " +"a subtype of it. This function always succeeds." +msgstr "" + +#: ../../c-api/structures.rst:543 +msgid "" +"This is the same as :c:func:`PyCFunction_Check`, but does not account for " +"subtypes." +msgstr "" + +#: ../../c-api/structures.rst:549 msgid "Equivalent to ``PyCMethod_New(ml, self, module, NULL)``." msgstr "" +#: ../../c-api/structures.rst:554 msgid "Equivalent to ``PyCMethod_New(ml, self, NULL, NULL)``." msgstr "" +#: ../../c-api/structures.rst:559 +msgid "" +"Get the function's flags on *func* as they were passed to :c:member:" +"`~PyMethodDef.ml_flags`." +msgstr "" + +#: ../../c-api/structures.rst:562 ../../c-api/structures.rst:580 +#: ../../c-api/structures.rst:600 +msgid "" +"If *func* is not a C function object, this fails with an exception. *func* " +"must not be ``NULL``." +msgstr "" + +#: ../../c-api/structures.rst:565 +msgid "" +"This function returns the function's flags on success, and ``-1`` with an " +"exception set on failure." +msgstr "" + +#: ../../c-api/structures.rst:571 +msgid "" +"This is the same as :c:func:`PyCFunction_GetFlags`, but without error or " +"type checking." +msgstr "" + +#: ../../c-api/structures.rst:577 +msgid "" +"Get the function pointer on *func* as it was passed to :c:member:" +"`~PyMethodDef.ml_meth`." +msgstr "" + +#: ../../c-api/structures.rst:583 +msgid "" +"This function returns the function pointer on success, and ``NULL`` with an " +"exception set on failure." +msgstr "" + +#: ../../c-api/structures.rst:589 +msgid "" +"This is the same as :c:func:`PyCFunction_GetFunction`, but without error or " +"type checking." +msgstr "" + +#: ../../c-api/structures.rst:595 +msgid "" +"Get the \"self\" object on *func*. This is the object that would be passed " +"to the first argument of a :c:type:`PyCFunction`. For C function objects " +"created through a :c:type:`PyMethodDef` on a :c:type:`PyModuleDef`, this is " +"the resulting module object." +msgstr "" + +#: ../../c-api/structures.rst:603 +msgid "" +"This function returns a :term:`borrowed reference` to the \"self\" object on " +"success, and ``NULL`` with an exception set on failure." +msgstr "" + +#: ../../c-api/structures.rst:609 +msgid "" +"This is the same as :c:func:`PyCFunction_GetSelf`, but without error or type " +"checking." +msgstr "" + +#: ../../c-api/structures.rst:614 msgid "Accessing attributes of extension types" msgstr "" +#: ../../c-api/structures.rst:618 msgid "" "Structure which describes an attribute of a type which corresponds to a C " "struct member. When defining a class, put a NULL-terminated array of these " "structures in the :c:member:`~PyTypeObject.tp_members` slot." msgstr "" +#: ../../c-api/structures.rst:623 msgid "Its fields are, in order:" msgstr "" +#: ../../c-api/structures.rst:627 msgid "" "Name of the member. A NULL value marks the end of a ``PyMemberDef[]`` array." msgstr "" +#: ../../c-api/structures.rst:630 msgid "The string should be static, no copy is made of it." msgstr "" +#: ../../c-api/structures.rst:634 msgid "" "The type of the member in the C struct. See :ref:`PyMemberDef-types` for the " "possible values." msgstr "" +#: ../../c-api/structures.rst:639 msgid "" "The offset in bytes that the member is located on the type’s object struct." msgstr "" +#: ../../c-api/structures.rst:643 msgid "" "Zero or more of the :ref:`PyMemberDef-flags`, combined using bitwise OR." msgstr "" +#: ../../c-api/structures.rst:647 msgid "" "The docstring, or NULL. The string should be static, no copy is made of it. " "Typically, it is defined using :c:macro:`PyDoc_STR`." msgstr "" +#: ../../c-api/structures.rst:651 msgid "" "By default (when :c:member:`~PyMemberDef.flags` is ``0``), members allow " "both read and write access. Use the :c:macro:`Py_READONLY` flag for read-" @@ -531,6 +772,7 @@ msgid "" "`T_OBJECT`) members can be deleted." msgstr "" +#: ../../c-api/structures.rst:660 msgid "" "For heap-allocated types (created using :c:func:`PyType_FromSpec` or " "similar), ``PyMemberDef`` may contain a definition for the special member " @@ -540,6 +782,7 @@ msgid "" "Py_RELATIVE_OFFSET``. For example::" msgstr "" +#: ../../c-api/structures.rst:667 msgid "" "static PyMemberDef spam_type_members[] = {\n" " {\"__vectorcalloffset__\", Py_T_PYSSIZET,\n" @@ -548,9 +791,11 @@ msgid "" "};" msgstr "" +#: ../../c-api/structures.rst:673 msgid "(You may need to ``#include `` for :c:func:`!offsetof`.)" msgstr "" +#: ../../c-api/structures.rst:675 msgid "" "The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` and :c:member:" "`~PyTypeObject.tp_weaklistoffset` can be defined similarly using " @@ -559,70 +804,80 @@ msgid "" "and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead." msgstr "" +#: ../../c-api/structures.rst:683 msgid "" "``PyMemberDef`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" +#: ../../c-api/structures.rst:688 msgid "" ":c:macro:`Py_RELATIVE_OFFSET` is now allowed for " "``\"__vectorcalloffset__\"``, ``\"__dictoffset__\"`` and " "``\"__weaklistoffset__\"``." msgstr "" +#: ../../c-api/structures.rst:694 msgid "" "Get an attribute belonging to the object at address *obj_addr*. The " "attribute is described by ``PyMemberDef`` *m*. Returns ``NULL`` on error." msgstr "" +#: ../../c-api/structures.rst:700 msgid "" "``PyMember_GetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" +#: ../../c-api/structures.rst:705 msgid "" "Set an attribute belonging to the object at address *obj_addr* to object " "*o*. The attribute to set is described by ``PyMemberDef`` *m*. Returns " "``0`` if successful and a negative value on failure." msgstr "" +#: ../../c-api/structures.rst:711 msgid "" "``PyMember_SetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" +#: ../../c-api/structures.rst:717 msgid "Member flags" msgstr "" +#: ../../c-api/structures.rst:719 msgid "The following flags can be used with :c:member:`PyMemberDef.flags`:" msgstr "" +#: ../../c-api/structures.rst:723 msgid "Not writable." msgstr "" +#: ../../c-api/structures.rst:727 msgid "" "Emit an ``object.__getattr__`` :ref:`audit event ` before " "reading." msgstr "" +#: ../../c-api/structures.rst:732 msgid "" "Indicates that the :c:member:`~PyMemberDef.offset` of this ``PyMemberDef`` " "entry indicates an offset from the subclass-specific data, rather than from " "``PyObject``." msgstr "" +#: ../../c-api/structures.rst:736 msgid "" -"Can only be used as part of :c:member:`Py_tp_members ` :c:type:`slot ` when creating a class using " -"negative :c:member:`~PyType_Spec.basicsize`. It is mandatory in that case." -msgstr "" - -msgid "" -"This flag is only used in :c:type:`PyType_Slot`. When setting :c:member:" -"`~PyTypeObject.tp_members` during class creation, Python clears it and sets :" -"c:member:`PyMemberDef.offset` to the offset from the ``PyObject`` struct." +"Can only be used as part of the :c:data:`Py_tp_members` :c:type:`slot " +"` when creating a class using negative :c:member:`~PyType_Spec." +"basicsize`. It is mandatory in that case. When setting :c:member:" +"`~PyTypeObject.tp_members` from the slot during class creation, Python " +"clears the flag and sets :c:member:`PyMemberDef.offset` to the offset from " +"the ``PyObject`` struct." msgstr "" +#: ../../c-api/structures.rst:751 msgid "" "The :c:macro:`!RESTRICTED`, :c:macro:`!READ_RESTRICTED` and :c:macro:`!" "WRITE_RESTRICTED` macros available with ``#include \"structmember.h\"`` are " @@ -631,6 +886,7 @@ msgid "" "nothing." msgstr "" +#: ../../c-api/structures.rst:762 msgid "" "The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. The :c:" "macro:`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The new " @@ -639,9 +895,11 @@ msgid "" "names." msgstr "" +#: ../../c-api/structures.rst:771 msgid "Member types" msgstr "" +#: ../../c-api/structures.rst:773 msgid "" ":c:member:`PyMemberDef.type` can be one of the following macros " "corresponding to various C types. When the member is accessed in Python, it " @@ -650,109 +908,147 @@ msgid "" "exception such as :exc:`TypeError` or :exc:`ValueError` is raised." msgstr "" +#: ../../c-api/structures.rst:781 msgid "" "Unless marked (D), attributes defined this way cannot be deleted using e.g. :" "keyword:`del` or :py:func:`delattr`." msgstr "" +#: ../../c-api/structures.rst:785 msgid "Macro name" msgstr "" +#: ../../c-api/structures.rst:785 msgid "C type" msgstr "" +#: ../../c-api/structures.rst:785 msgid "Python type" msgstr "" +#: ../../c-api/structures.rst:787 msgid ":c:expr:`char`" msgstr "" +#: ../../c-api/structures.rst:787 ../../c-api/structures.rst:788 +#: ../../c-api/structures.rst:789 ../../c-api/structures.rst:790 +#: ../../c-api/structures.rst:791 ../../c-api/structures.rst:792 +#: ../../c-api/structures.rst:793 ../../c-api/structures.rst:794 +#: ../../c-api/structures.rst:795 ../../c-api/structures.rst:796 +#: ../../c-api/structures.rst:797 msgid ":py:class:`int`" msgstr "" +#: ../../c-api/structures.rst:788 msgid ":c:expr:`short`" msgstr "" +#: ../../c-api/structures.rst:789 msgid ":c:expr:`int`" msgstr "" +#: ../../c-api/structures.rst:790 msgid ":c:expr:`long`" msgstr "" +#: ../../c-api/structures.rst:791 msgid ":c:expr:`long long`" msgstr "" +#: ../../c-api/structures.rst:792 msgid ":c:expr:`unsigned char`" msgstr "" +#: ../../c-api/structures.rst:793 msgid ":c:expr:`unsigned int`" msgstr "" +#: ../../c-api/structures.rst:794 msgid ":c:expr:`unsigned short`" msgstr "" +#: ../../c-api/structures.rst:795 msgid ":c:expr:`unsigned long`" msgstr "" +#: ../../c-api/structures.rst:796 msgid ":c:expr:`unsigned long long`" msgstr "" +#: ../../c-api/structures.rst:797 msgid ":c:expr:`Py_ssize_t`" msgstr "" +#: ../../c-api/structures.rst:798 msgid ":c:expr:`float`" msgstr "" +#: ../../c-api/structures.rst:798 ../../c-api/structures.rst:799 msgid ":py:class:`float`" msgstr "" +#: ../../c-api/structures.rst:799 msgid ":c:expr:`double`" msgstr "" +#: ../../c-api/structures.rst:800 msgid ":c:expr:`char` (written as 0 or 1)" msgstr "" +#: ../../c-api/structures.rst:800 msgid ":py:class:`bool`" msgstr "" +#: ../../c-api/structures.rst:802 msgid ":c:expr:`const char *` (*)" msgstr "" +#: ../../c-api/structures.rst:802 ../../c-api/structures.rst:803 msgid ":py:class:`str` (RO)" msgstr "" +#: ../../c-api/structures.rst:803 msgid ":c:expr:`const char[]` (*)" msgstr "" +#: ../../c-api/structures.rst:804 msgid ":c:expr:`char` (0-127)" msgstr "" +#: ../../c-api/structures.rst:804 msgid ":py:class:`str` (**)" msgstr "" +#: ../../c-api/structures.rst:805 msgid ":c:expr:`PyObject *`" msgstr "" +#: ../../c-api/structures.rst:805 msgid ":py:class:`object` (D)" msgstr "" +#: ../../c-api/structures.rst:808 msgid "" "(*): Zero-terminated, UTF8-encoded C string. With :c:macro:`!Py_T_STRING` " "the C representation is a pointer; with :c:macro:`!Py_T_STRING_INPLACE` the " "string is stored directly in the structure." msgstr "" +#: ../../c-api/structures.rst:813 msgid "(**): String of length 1. Only ASCII is accepted." msgstr "" +#: ../../c-api/structures.rst:815 msgid "(RO): Implies :c:macro:`Py_READONLY`." msgstr "" +#: ../../c-api/structures.rst:817 msgid "" "(D): Can be deleted, in which case the pointer is set to ``NULL``. Reading a " "``NULL`` pointer raises :py:exc:`AttributeError`." msgstr "" +#: ../../c-api/structures.rst:843 msgid "" "In previous versions, the macros were only available with ``#include " "\"structmember.h\"`` and were named without the ``Py_`` prefix (e.g. as " @@ -760,135 +1056,174 @@ msgid "" "with the following deprecated types:" msgstr "" +#: ../../c-api/structures.rst:851 msgid "" "Like ``Py_T_OBJECT_EX``, but ``NULL`` is converted to ``None``. This results " "in surprising behavior in Python: deleting the attribute effectively sets it " "to ``None``." msgstr "" +#: ../../c-api/structures.rst:857 msgid "Always ``None``. Must be used with :c:macro:`Py_READONLY`." msgstr "" +#: ../../c-api/structures.rst:860 msgid "Defining Getters and Setters" msgstr "" +#: ../../c-api/structures.rst:864 msgid "" "Structure to define property-like access for a type. See also description of " "the :c:member:`PyTypeObject.tp_getset` slot." msgstr "" +#: ../../c-api/structures.rst:869 msgid "attribute name" msgstr "" +#: ../../c-api/structures.rst:873 msgid "C function to get the attribute." msgstr "" +#: ../../c-api/structures.rst:877 msgid "" "Optional C function to set or delete the attribute. If ``NULL``, the " "attribute is read-only." msgstr "" +#: ../../c-api/structures.rst:882 msgid "optional docstring" msgstr "" +#: ../../c-api/structures.rst:886 msgid "" "Optional user data pointer, providing additional data for getter and setter." msgstr "" +#: ../../c-api/structures.rst:890 msgid "" "The ``get`` function takes one :c:expr:`PyObject*` parameter (the instance) " "and a user data pointer (the associated ``closure``):" msgstr "" +#: ../../c-api/structures.rst:893 msgid "" "It should return a new reference on success or ``NULL`` with a set exception " "on failure." msgstr "" +#: ../../c-api/structures.rst:898 msgid "" "``set`` functions take two :c:expr:`PyObject*` parameters (the instance and " "the value to be set) and a user data pointer (the associated ``closure``):" msgstr "" +#: ../../c-api/structures.rst:901 msgid "" "In case the attribute should be deleted the second parameter is ``NULL``. " "Should return ``0`` on success or ``-1`` with a set exception on failure." msgstr "" +#: ../../c-api/structures.rst:453 ../../c-api/structures.rst:463 msgid "built-in function" msgstr "" +#: ../../c-api/structures.rst:453 msgid "classmethod" msgstr "" +#: ../../c-api/structures.rst:463 msgid "staticmethod" msgstr "" +#: ../../c-api/structures.rst:744 msgid "READ_RESTRICTED (C macro)" msgstr "" +#: ../../c-api/structures.rst:744 msgid "WRITE_RESTRICTED (C macro)" msgstr "" +#: ../../c-api/structures.rst:744 msgid "RESTRICTED (C macro)" msgstr "" +#: ../../c-api/structures.rst:757 msgid "READONLY (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_BYTE (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_SHORT (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_INT (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_LONG (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_LONGLONG (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_UBYTE (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_USHORT (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_UINT (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_ULONG (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_ULONGULONG (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_PYSSIZET (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_FLOAT (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_DOUBLE (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_BOOL (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_CHAR (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_STRING (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_STRING_INPLACE (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "T_OBJECT_EX (C macro)" msgstr "" +#: ../../c-api/structures.rst:820 msgid "structmember.h" msgstr "" diff --git a/c-api/structures.po~ b/c-api/structures.po~ new file mode 100644 index 00000000..73186d98 --- /dev/null +++ b/c-api/structures.po~ @@ -0,0 +1,894 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Common Object Structures" +msgstr "" + +msgid "" +"There are a large number of structures which are used in the definition of " +"object types for Python. This section describes these structures and how " +"they are used." +msgstr "" + +msgid "Base object types and macros" +msgstr "" + +msgid "" +"All Python objects ultimately share a small number of fields at the " +"beginning of the object's representation in memory. These are represented " +"by the :c:type:`PyObject` and :c:type:`PyVarObject` types, which are " +"defined, in turn, by the expansions of some macros also used, whether " +"directly or indirectly, in the definition of all other Python objects. " +"Additional macros can be found under :ref:`reference counting " +"`." +msgstr "" + +msgid "" +"All object types are extensions of this type. This is a type which contains " +"the information Python needs to treat a pointer to an object as an object. " +"In a normal \"release\" build, it contains only the object's reference count " +"and a pointer to the corresponding type object. Nothing is actually declared " +"to be a :c:type:`PyObject`, but every pointer to a Python object can be cast " +"to a :c:expr:`PyObject*`." +msgstr "" + +msgid "" +"The members must not be accessed directly; instead use macros such as :c:" +"macro:`Py_REFCNT` and :c:macro:`Py_TYPE`." +msgstr "" + +msgid "" +"The object's reference count, as returned by :c:macro:`Py_REFCNT`. Do not " +"use this field directly; instead use functions and macros such as :c:macro:`!" +"Py_REFCNT`, :c:func:`Py_INCREF` and :c:func:`Py_DecRef`." +msgstr "" + +msgid "" +"The field type may be different from ``Py_ssize_t``, depending on build " +"configuration and platform." +msgstr "" + +msgid "" +"The object's type. Do not use this field directly; use :c:macro:`Py_TYPE` " +"and :c:func:`Py_SET_TYPE` instead." +msgstr "" + +msgid "" +"An extension of :c:type:`PyObject` that adds the :c:member:`~PyVarObject." +"ob_size` field. This is intended for objects that have some notion of " +"*length*." +msgstr "" + +msgid "" +"As with :c:type:`!PyObject`, the members must not be accessed directly; " +"instead use macros such as :c:macro:`Py_SIZE`, :c:macro:`Py_REFCNT` and :c:" +"macro:`Py_TYPE`." +msgstr "" + +msgid "" +"A size field, whose contents should be considered an object's internal " +"implementation detail." +msgstr "" + +msgid "Do not use this field directly; use :c:macro:`Py_SIZE` instead." +msgstr "" + +msgid "" +"Object creation functions such as :c:func:`PyObject_NewVar` will generally " +"set this field to the requested size (number of items). After creation, " +"arbitrary values can be stored in :c:member:`!ob_size` using :c:macro:" +"`Py_SET_SIZE`." +msgstr "" + +msgid "" +"To get an object's publicly exposed length, as returned by the Python " +"function :py:func:`len`, use :c:func:`PyObject_Length` instead." +msgstr "" + +msgid "" +"This is a macro used when declaring new types which represent objects " +"without a varying length. The PyObject_HEAD macro expands to::" +msgstr "" + +msgid "PyObject ob_base;" +msgstr "" + +msgid "See documentation of :c:type:`PyObject` above." +msgstr "" + +msgid "" +"This is a macro used when declaring new types which represent objects with a " +"length that varies from instance to instance. The PyObject_VAR_HEAD macro " +"expands to::" +msgstr "" + +msgid "PyVarObject ob_base;" +msgstr "" + +msgid "See documentation of :c:type:`PyVarObject` above." +msgstr "" + +msgid "" +"The base class of all other objects, the same as :class:`object` in Python." +msgstr "" + +msgid "" +"Test if the *x* object is the *y* object, the same as ``x is y`` in Python." +msgstr "" + +msgid "" +"Test if an object is the ``None`` singleton, the same as ``x is None`` in " +"Python." +msgstr "" + +msgid "" +"Test if an object is the ``True`` singleton, the same as ``x is True`` in " +"Python." +msgstr "" + +msgid "" +"Test if an object is the ``False`` singleton, the same as ``x is False`` in " +"Python." +msgstr "" + +msgid "Get the type of the Python object *o*." +msgstr "" + +msgid "" +"The returned reference is :term:`borrowed ` from *o*. Do " +"not release it with :c:func:`Py_DECREF` or similar." +msgstr "" + +msgid "" +":c:func:`Py_TYPE()` is changed to an inline static function. The parameter " +"type is no longer :c:expr:`const PyObject*`." +msgstr "" + +msgid "" +"Return non-zero if the object *o* type is *type*. Return zero otherwise. " +"Equivalent to: ``Py_TYPE(o) == type``." +msgstr "" + +msgid "" +"Set the type of object *o* to *type*, without any checking or reference " +"counting." +msgstr "" + +msgid "" +"This is a very low-level operation. Consider instead setting the Python " +"attribute :attr:`~object.__class__` using :c:func:`PyObject_SetAttrString` " +"or similar." +msgstr "" + +msgid "" +"Note that assigning an incompatible type can lead to undefined behavior." +msgstr "" + +msgid "" +"If *type* is a :ref:`heap type `, the caller must create a new " +"reference to it. Similarly, if the old type of *o* is a heap type, the " +"caller must release a reference to that type." +msgstr "" + +msgid "Get the :c:member:`~PyVarObject.ob_size` field of *o*." +msgstr "" + +msgid "" +":c:func:`Py_SIZE()` is changed to an inline static function. The parameter " +"type is no longer :c:expr:`const PyVarObject*`." +msgstr "" + +msgid "Set the :c:member:`~PyVarObject.ob_size` field of *o* to *size*." +msgstr "" + +msgid "" +"This is a macro which expands to initialization values for a new :c:type:" +"`PyObject` type. This macro expands to::" +msgstr "" + +msgid "" +"_PyObject_EXTRA_INIT\n" +"1, type," +msgstr "" + +msgid "" +"This is a macro which expands to initialization values for a new :c:type:" +"`PyVarObject` type, including the :c:member:`~PyVarObject.ob_size` field. " +"This macro expands to::" +msgstr "" + +msgid "" +"_PyObject_EXTRA_INIT\n" +"1, type, size," +msgstr "" + +msgid "Implementing functions and methods" +msgstr "" + +msgid "" +"Type of the functions used to implement most Python callables in C. " +"Functions of this type take two :c:expr:`PyObject*` parameters and return " +"one such value. If the return value is ``NULL``, an exception shall have " +"been set. If not ``NULL``, the return value is interpreted as the return " +"value of the function as exposed in Python. The function must return a new " +"reference." +msgstr "" + +msgid "The function signature is::" +msgstr "" + +msgid "" +"PyObject *PyCFunction(PyObject *self,\n" +" PyObject *args);" +msgstr "" + +msgid "" +"Type of the functions used to implement Python callables in C with " +"signature :ref:`METH_VARARGS | METH_KEYWORDS `. " +"The function signature is::" +msgstr "" + +msgid "" +"PyObject *PyCFunctionWithKeywords(PyObject *self,\n" +" PyObject *args,\n" +" PyObject *kwargs);" +msgstr "" + +msgid "" +"Type of the functions used to implement Python callables in C with " +"signature :c:macro:`METH_FASTCALL`. The function signature is::" +msgstr "" + +msgid "" +"PyObject *PyCFunctionFast(PyObject *self,\n" +" PyObject *const *args,\n" +" Py_ssize_t nargs);" +msgstr "" + +msgid "" +"Type of the functions used to implement Python callables in C with " +"signature :ref:`METH_FASTCALL | METH_KEYWORDS `. The function signature is::" +msgstr "" + +msgid "" +"PyObject *PyCFunctionFastWithKeywords(PyObject *self,\n" +" PyObject *const *args,\n" +" Py_ssize_t nargs,\n" +" PyObject *kwnames);" +msgstr "" + +msgid "" +"Type of the functions used to implement Python callables in C with " +"signature :ref:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS `. The function signature is::" +msgstr "" + +msgid "" +"PyObject *PyCMethod(PyObject *self,\n" +" PyTypeObject *defining_class,\n" +" PyObject *const *args,\n" +" Py_ssize_t nargs,\n" +" PyObject *kwnames)" +msgstr "" + +msgid "" +"Structure used to describe a method of an extension type. This structure " +"has four fields:" +msgstr "" + +msgid "Name of the method." +msgstr "" + +msgid "Pointer to the C implementation." +msgstr "" + +msgid "Flags bits indicating how the call should be constructed." +msgstr "" + +msgid "Points to the contents of the docstring." +msgstr "" + +msgid "" +"The :c:member:`~PyMethodDef.ml_meth` is a C function pointer. The functions " +"may be of different types, but they always return :c:expr:`PyObject*`. If " +"the function is not of the :c:type:`PyCFunction`, the compiler will require " +"a cast in the method table. Even though :c:type:`PyCFunction` defines the " +"first parameter as :c:expr:`PyObject*`, it is common that the method " +"implementation uses the specific C type of the *self* object." +msgstr "" + +msgid "" +"The :c:member:`~PyMethodDef.ml_flags` field is a bitfield which can include " +"the following flags. The individual flags indicate either a calling " +"convention or a binding convention." +msgstr "" + +msgid "There are these calling conventions:" +msgstr "" + +msgid "" +"This is the typical calling convention, where the methods have the type :c:" +"type:`PyCFunction`. The function expects two :c:expr:`PyObject*` values. The " +"first one is the *self* object for methods; for module functions, it is the " +"module object. The second parameter (often called *args*) is a tuple object " +"representing all arguments. This parameter is typically processed using :c:" +"func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`." +msgstr "" + +msgid "" +"Can only be used in certain combinations with other flags: :ref:" +"`METH_VARARGS | METH_KEYWORDS `, :ref:" +"`METH_FASTCALL | METH_KEYWORDS ` and :ref:" +"`METH_METHOD | METH_FASTCALL | METH_KEYWORDS `." +msgstr "" + +msgid ":c:expr:`METH_VARARGS | METH_KEYWORDS`" +msgstr "" + +msgid "" +"Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. " +"The function expects three parameters: *self*, *args*, *kwargs* where " +"*kwargs* is a dictionary of all the keyword arguments or possibly ``NULL`` " +"if there are no keyword arguments. The parameters are typically processed " +"using :c:func:`PyArg_ParseTupleAndKeywords`." +msgstr "" + +msgid "" +"Fast calling convention supporting only positional arguments. The methods " +"have the type :c:type:`PyCFunctionFast`. The first parameter is *self*, the " +"second parameter is a C array of :c:expr:`PyObject*` values indicating the " +"arguments and the third parameter is the number of arguments (the length of " +"the array)." +msgstr "" + +msgid "``METH_FASTCALL`` is now part of the :ref:`stable ABI `." +msgstr "" + +msgid ":c:expr:`METH_FASTCALL | METH_KEYWORDS`" +msgstr "" + +msgid "" +"Extension of :c:macro:`METH_FASTCALL` supporting also keyword arguments, " +"with methods of type :c:type:`PyCFunctionFastWithKeywords`. Keyword " +"arguments are passed the same way as in the :ref:`vectorcall protocol " +"`: there is an additional fourth :c:expr:`PyObject*` parameter " +"which is a tuple representing the names of the keyword arguments (which are " +"guaranteed to be strings) or possibly ``NULL`` if there are no keywords. " +"The values of the keyword arguments are stored in the *args* array, after " +"the positional arguments." +msgstr "" + +msgid "" +"Can only be used in the combination with other flags: :ref:`METH_METHOD | " +"METH_FASTCALL | METH_KEYWORDS `." +msgstr "" + +msgid ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`" +msgstr "" + +msgid "" +"Extension of :ref:`METH_FASTCALL | METH_KEYWORDS ` supporting the *defining class*, that is, the class that " +"contains the method in question. The defining class might be a superclass of " +"``Py_TYPE(self)``." +msgstr "" + +msgid "" +"The method needs to be of type :c:type:`PyCMethod`, the same as for " +"``METH_FASTCALL | METH_KEYWORDS`` with ``defining_class`` argument added " +"after ``self``." +msgstr "" + +msgid "" +"Methods without parameters don't need to check whether arguments are given " +"if they are listed with the :c:macro:`METH_NOARGS` flag. They need to be of " +"type :c:type:`PyCFunction`. The first parameter is typically named *self* " +"and will hold a reference to the module or object instance. In all cases " +"the second parameter will be ``NULL``." +msgstr "" + +msgid "" +"The function must have 2 parameters. Since the second parameter is unused, :" +"c:macro:`Py_UNUSED` can be used to prevent a compiler warning." +msgstr "" + +msgid "" +"Methods with a single object argument can be listed with the :c:macro:" +"`METH_O` flag, instead of invoking :c:func:`PyArg_ParseTuple` with a " +"``\"O\"`` argument. They have the type :c:type:`PyCFunction`, with the " +"*self* parameter, and a :c:expr:`PyObject*` parameter representing the " +"single argument." +msgstr "" + +msgid "" +"These two constants are not used to indicate the calling convention but the " +"binding when use with methods of classes. These may not be used for " +"functions defined for modules. At most one of these flags may be set for " +"any given method." +msgstr "" + +msgid "" +"The method will be passed the type object as the first parameter rather than " +"an instance of the type. This is used to create *class methods*, similar to " +"what is created when using the :func:`classmethod` built-in function." +msgstr "" + +msgid "" +"The method will be passed ``NULL`` as the first parameter rather than an " +"instance of the type. This is used to create *static methods*, similar to " +"what is created when using the :func:`staticmethod` built-in function." +msgstr "" + +msgid "" +"One other constant controls whether a method is loaded in place of another " +"definition with the same method name." +msgstr "" + +msgid "" +"The method will be loaded in place of existing definitions. Without " +"*METH_COEXIST*, the default is to skip repeated definitions. Since slot " +"wrappers are loaded before the method table, the existence of a " +"*sq_contains* slot, for example, would generate a wrapped method named :meth:" +"`~object.__contains__` and preclude the loading of a corresponding " +"PyCFunction with the same name. With the flag defined, the PyCFunction will " +"be loaded in place of the wrapper object and will co-exist with the slot. " +"This is helpful because calls to PyCFunctions are optimized more than " +"wrapper object calls." +msgstr "" + +msgid "" +"Turn *ml* into a Python :term:`callable` object. The caller must ensure that " +"*ml* outlives the :term:`callable`. Typically, *ml* is defined as a static " +"variable." +msgstr "" + +msgid "" +"The *self* parameter will be passed as the *self* argument to the C function " +"in ``ml->ml_meth`` when invoked. *self* can be ``NULL``." +msgstr "" + +msgid "" +"The :term:`callable` object's ``__module__`` attribute can be set from the " +"given *module* argument. *module* should be a Python string, which will be " +"used as name of the module the function is defined in. If unavailable, it " +"can be set to :const:`None` or ``NULL``." +msgstr "" + +msgid ":attr:`function.__module__`" +msgstr "" + +msgid "" +"The *cls* parameter will be passed as the *defining_class* argument to the C " +"function. Must be set if :c:macro:`METH_METHOD` is set on ``ml->ml_flags``." +msgstr "" + +msgid "Equivalent to ``PyCMethod_New(ml, self, module, NULL)``." +msgstr "" + +msgid "Equivalent to ``PyCMethod_New(ml, self, NULL, NULL)``." +msgstr "" + +msgid "Accessing attributes of extension types" +msgstr "" + +msgid "" +"Structure which describes an attribute of a type which corresponds to a C " +"struct member. When defining a class, put a NULL-terminated array of these " +"structures in the :c:member:`~PyTypeObject.tp_members` slot." +msgstr "" + +msgid "Its fields are, in order:" +msgstr "" + +msgid "" +"Name of the member. A NULL value marks the end of a ``PyMemberDef[]`` array." +msgstr "" + +msgid "The string should be static, no copy is made of it." +msgstr "" + +msgid "" +"The type of the member in the C struct. See :ref:`PyMemberDef-types` for the " +"possible values." +msgstr "" + +msgid "" +"The offset in bytes that the member is located on the type’s object struct." +msgstr "" + +msgid "" +"Zero or more of the :ref:`PyMemberDef-flags`, combined using bitwise OR." +msgstr "" + +msgid "" +"The docstring, or NULL. The string should be static, no copy is made of it. " +"Typically, it is defined using :c:macro:`PyDoc_STR`." +msgstr "" + +msgid "" +"By default (when :c:member:`~PyMemberDef.flags` is ``0``), members allow " +"both read and write access. Use the :c:macro:`Py_READONLY` flag for read-" +"only access. Certain types, like :c:macro:`Py_T_STRING`, imply :c:macro:" +"`Py_READONLY`. Only :c:macro:`Py_T_OBJECT_EX` (and legacy :c:macro:" +"`T_OBJECT`) members can be deleted." +msgstr "" + +msgid "" +"For heap-allocated types (created using :c:func:`PyType_FromSpec` or " +"similar), ``PyMemberDef`` may contain a definition for the special member " +"``\"__vectorcalloffset__\"``, corresponding to :c:member:`~PyTypeObject." +"tp_vectorcall_offset` in type objects. This member must be defined with " +"``Py_T_PYSSIZET``, and either ``Py_READONLY`` or ``Py_READONLY | " +"Py_RELATIVE_OFFSET``. For example::" +msgstr "" + +msgid "" +"static PyMemberDef spam_type_members[] = {\n" +" {\"__vectorcalloffset__\", Py_T_PYSSIZET,\n" +" offsetof(Spam_object, vectorcall), Py_READONLY},\n" +" {NULL} /* Sentinel */\n" +"};" +msgstr "" + +msgid "(You may need to ``#include `` for :c:func:`!offsetof`.)" +msgstr "" + +msgid "" +"The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` and :c:member:" +"`~PyTypeObject.tp_weaklistoffset` can be defined similarly using " +"``\"__dictoffset__\"`` and ``\"__weaklistoffset__\"`` members, but " +"extensions are strongly encouraged to use :c:macro:`Py_TPFLAGS_MANAGED_DICT` " +"and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead." +msgstr "" + +msgid "" +"``PyMemberDef`` is always available. Previously, it required including " +"``\"structmember.h\"``." +msgstr "" + +msgid "" +":c:macro:`Py_RELATIVE_OFFSET` is now allowed for " +"``\"__vectorcalloffset__\"``, ``\"__dictoffset__\"`` and " +"``\"__weaklistoffset__\"``." +msgstr "" + +msgid "" +"Get an attribute belonging to the object at address *obj_addr*. The " +"attribute is described by ``PyMemberDef`` *m*. Returns ``NULL`` on error." +msgstr "" + +msgid "" +"``PyMember_GetOne`` is always available. Previously, it required including " +"``\"structmember.h\"``." +msgstr "" + +msgid "" +"Set an attribute belonging to the object at address *obj_addr* to object " +"*o*. The attribute to set is described by ``PyMemberDef`` *m*. Returns " +"``0`` if successful and a negative value on failure." +msgstr "" + +msgid "" +"``PyMember_SetOne`` is always available. Previously, it required including " +"``\"structmember.h\"``." +msgstr "" + +msgid "Member flags" +msgstr "" + +msgid "The following flags can be used with :c:member:`PyMemberDef.flags`:" +msgstr "" + +msgid "Not writable." +msgstr "" + +msgid "" +"Emit an ``object.__getattr__`` :ref:`audit event ` before " +"reading." +msgstr "" + +msgid "" +"Indicates that the :c:member:`~PyMemberDef.offset` of this ``PyMemberDef`` " +"entry indicates an offset from the subclass-specific data, rather than from " +"``PyObject``." +msgstr "" + +msgid "" +"Can only be used as part of :c:member:`Py_tp_members ` :c:type:`slot ` when creating a class using " +"negative :c:member:`~PyType_Spec.basicsize`. It is mandatory in that case." +msgstr "" + +msgid "" +"This flag is only used in :c:type:`PyType_Slot`. When setting :c:member:" +"`~PyTypeObject.tp_members` during class creation, Python clears it and sets :" +"c:member:`PyMemberDef.offset` to the offset from the ``PyObject`` struct." +msgstr "" + +msgid "" +"The :c:macro:`!RESTRICTED`, :c:macro:`!READ_RESTRICTED` and :c:macro:`!" +"WRITE_RESTRICTED` macros available with ``#include \"structmember.h\"`` are " +"deprecated. :c:macro:`!READ_RESTRICTED` and :c:macro:`!RESTRICTED` are " +"equivalent to :c:macro:`Py_AUDIT_READ`; :c:macro:`!WRITE_RESTRICTED` does " +"nothing." +msgstr "" + +msgid "" +"The :c:macro:`!READONLY` macro was renamed to :c:macro:`Py_READONLY`. The :c:" +"macro:`!PY_AUDIT_READ` macro was renamed with the ``Py_`` prefix. The new " +"names are now always available. Previously, these required ``#include " +"\"structmember.h\"``. The header is still available and it provides the old " +"names." +msgstr "" + +msgid "Member types" +msgstr "" + +msgid "" +":c:member:`PyMemberDef.type` can be one of the following macros " +"corresponding to various C types. When the member is accessed in Python, it " +"will be converted to the equivalent Python type. When it is set from Python, " +"it will be converted back to the C type. If that is not possible, an " +"exception such as :exc:`TypeError` or :exc:`ValueError` is raised." +msgstr "" + +msgid "" +"Unless marked (D), attributes defined this way cannot be deleted using e.g. :" +"keyword:`del` or :py:func:`delattr`." +msgstr "" + +msgid "Macro name" +msgstr "" + +msgid "C type" +msgstr "" + +msgid "Python type" +msgstr "" + +msgid ":c:expr:`char`" +msgstr "" + +msgid ":py:class:`int`" +msgstr "" + +msgid ":c:expr:`short`" +msgstr "" + +msgid ":c:expr:`int`" +msgstr "" + +msgid ":c:expr:`long`" +msgstr "" + +msgid ":c:expr:`long long`" +msgstr "" + +msgid ":c:expr:`unsigned char`" +msgstr "" + +msgid ":c:expr:`unsigned int`" +msgstr "" + +msgid ":c:expr:`unsigned short`" +msgstr "" + +msgid ":c:expr:`unsigned long`" +msgstr "" + +msgid ":c:expr:`unsigned long long`" +msgstr "" + +msgid ":c:expr:`Py_ssize_t`" +msgstr "" + +msgid ":c:expr:`float`" +msgstr "" + +msgid ":py:class:`float`" +msgstr "" + +msgid ":c:expr:`double`" +msgstr "" + +msgid ":c:expr:`char` (written as 0 or 1)" +msgstr "" + +msgid ":py:class:`bool`" +msgstr "" + +msgid ":c:expr:`const char *` (*)" +msgstr "" + +msgid ":py:class:`str` (RO)" +msgstr "" + +msgid ":c:expr:`const char[]` (*)" +msgstr "" + +msgid ":c:expr:`char` (0-127)" +msgstr "" + +msgid ":py:class:`str` (**)" +msgstr "" + +msgid ":c:expr:`PyObject *`" +msgstr "" + +msgid ":py:class:`object` (D)" +msgstr "" + +msgid "" +"(*): Zero-terminated, UTF8-encoded C string. With :c:macro:`!Py_T_STRING` " +"the C representation is a pointer; with :c:macro:`!Py_T_STRING_INPLACE` the " +"string is stored directly in the structure." +msgstr "" + +msgid "(**): String of length 1. Only ASCII is accepted." +msgstr "" + +msgid "(RO): Implies :c:macro:`Py_READONLY`." +msgstr "" + +msgid "" +"(D): Can be deleted, in which case the pointer is set to ``NULL``. Reading a " +"``NULL`` pointer raises :py:exc:`AttributeError`." +msgstr "" + +msgid "" +"In previous versions, the macros were only available with ``#include " +"\"structmember.h\"`` and were named without the ``Py_`` prefix (e.g. as " +"``T_INT``). The header is still available and contains the old names, along " +"with the following deprecated types:" +msgstr "" + +msgid "" +"Like ``Py_T_OBJECT_EX``, but ``NULL`` is converted to ``None``. This results " +"in surprising behavior in Python: deleting the attribute effectively sets it " +"to ``None``." +msgstr "" + +msgid "Always ``None``. Must be used with :c:macro:`Py_READONLY`." +msgstr "" + +msgid "Defining Getters and Setters" +msgstr "" + +msgid "" +"Structure to define property-like access for a type. See also description of " +"the :c:member:`PyTypeObject.tp_getset` slot." +msgstr "" + +msgid "attribute name" +msgstr "" + +msgid "C function to get the attribute." +msgstr "" + +msgid "" +"Optional C function to set or delete the attribute. If ``NULL``, the " +"attribute is read-only." +msgstr "" + +msgid "optional docstring" +msgstr "" + +msgid "" +"Optional user data pointer, providing additional data for getter and setter." +msgstr "" + +msgid "" +"The ``get`` function takes one :c:expr:`PyObject*` parameter (the instance) " +"and a user data pointer (the associated ``closure``):" +msgstr "" + +msgid "" +"It should return a new reference on success or ``NULL`` with a set exception " +"on failure." +msgstr "" + +msgid "" +"``set`` functions take two :c:expr:`PyObject*` parameters (the instance and " +"the value to be set) and a user data pointer (the associated ``closure``):" +msgstr "" + +msgid "" +"In case the attribute should be deleted the second parameter is ``NULL``. " +"Should return ``0`` on success or ``-1`` with a set exception on failure." +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "classmethod" +msgstr "" + +msgid "staticmethod" +msgstr "" + +msgid "READ_RESTRICTED (C macro)" +msgstr "" + +msgid "WRITE_RESTRICTED (C macro)" +msgstr "" + +msgid "RESTRICTED (C macro)" +msgstr "" + +msgid "READONLY (C macro)" +msgstr "" + +msgid "T_BYTE (C macro)" +msgstr "" + +msgid "T_SHORT (C macro)" +msgstr "" + +msgid "T_INT (C macro)" +msgstr "" + +msgid "T_LONG (C macro)" +msgstr "" + +msgid "T_LONGLONG (C macro)" +msgstr "" + +msgid "T_UBYTE (C macro)" +msgstr "" + +msgid "T_USHORT (C macro)" +msgstr "" + +msgid "T_UINT (C macro)" +msgstr "" + +msgid "T_ULONG (C macro)" +msgstr "" + +msgid "T_ULONGULONG (C macro)" +msgstr "" + +msgid "T_PYSSIZET (C macro)" +msgstr "" + +msgid "T_FLOAT (C macro)" +msgstr "" + +msgid "T_DOUBLE (C macro)" +msgstr "" + +msgid "T_BOOL (C macro)" +msgstr "" + +msgid "T_CHAR (C macro)" +msgstr "" + +msgid "T_STRING (C macro)" +msgstr "" + +msgid "T_STRING_INPLACE (C macro)" +msgstr "" + +msgid "T_OBJECT_EX (C macro)" +msgstr "" + +msgid "structmember.h" +msgstr "" diff --git a/c-api/sys.po b/c-api/sys.po index 5f3960f3..32a9b21e 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/sys.rst:6 msgid "Operating System Utilities" msgstr "" +#: ../../c-api/sys.rst:11 msgid "" "Return the file system representation for *path*. If the object is a :class:" "`str` or :class:`bytes` object, then a new :term:`strong reference` is " @@ -29,6 +31,7 @@ msgid "" "is returned." msgstr "" +#: ../../c-api/sys.rst:24 msgid "" "Return true (nonzero) if the standard I/O file *fp* with name *filename* is " "deemed interactive. This is the case for files for which " @@ -38,9 +41,11 @@ msgid "" "``'???'``." msgstr "" +#: ../../c-api/sys.rst:30 msgid "This function must not be called before Python is initialized." msgstr "" +#: ../../c-api/sys.rst:35 msgid "" "Function to prepare some internal state before a process fork. This should " "be called before calling :c:func:`fork` or any similar function that clones " @@ -48,12 +53,14 @@ msgid "" "defined." msgstr "" +#: ../../c-api/sys.rst:41 msgid "" "The C :c:func:`fork` call should only be made from the :ref:`\"main\" thread " "` (of the :ref:`\"main\" interpreter `). The same is true for ``PyOS_BeforeFork()``." msgstr "" +#: ../../c-api/sys.rst:51 msgid "" "Function to update some internal state after a process fork. This should be " "called from the parent process after calling :c:func:`fork` or any similar " @@ -62,12 +69,14 @@ msgid "" "defined." msgstr "" +#: ../../c-api/sys.rst:58 msgid "" "The C :c:func:`fork` call should only be made from the :ref:`\"main\" thread " "` (of the :ref:`\"main\" interpreter `). The same is true for ``PyOS_AfterFork_Parent()``." msgstr "" +#: ../../c-api/sys.rst:68 msgid "" "Function to update internal interpreter state after a process fork. This " "must be called from the child process after calling :c:func:`fork`, or any " @@ -76,18 +85,21 @@ msgid "" "systems where :c:func:`fork` is defined." msgstr "" +#: ../../c-api/sys.rst:75 msgid "" "The C :c:func:`fork` call should only be made from the :ref:`\"main\" thread " "` (of the :ref:`\"main\" interpreter `). The same is true for ``PyOS_AfterFork_Child()``." msgstr "" +#: ../../c-api/sys.rst:83 msgid "" ":func:`os.register_at_fork` allows registering custom Python functions to be " "called by :c:func:`PyOS_BeforeFork()`, :c:func:`PyOS_AfterFork_Parent` and :" "c:func:`PyOS_AfterFork_Child`." msgstr "" +#: ../../c-api/sys.rst:90 msgid "" "Function to update some internal state after a process fork; this should be " "called in the new process if the Python interpreter will continue to be " @@ -95,9 +107,11 @@ msgid "" "not need to be called." msgstr "" +#: ../../c-api/sys.rst:95 msgid "This function is superseded by :c:func:`PyOS_AfterFork_Child()`." msgstr "" +#: ../../c-api/sys.rst:103 msgid "" "Return true when the interpreter runs out of stack space. This is a " "reliable check, but is only available when :c:macro:`!USE_STACKCHECK` is " @@ -106,30 +120,60 @@ msgid "" "should never change the definition in your own code." msgstr "" +#: ../../c-api/sys.rst:115 msgid "" "Return the current signal handler for signal *i*. This is a thin wrapper " "around either :c:func:`!sigaction` or :c:func:`!signal`. Do not call those " "functions directly!" msgstr "" +#: ../../c-api/sys.rst:122 msgid "" "Set the signal handler for signal *i* to be *h*; return the old signal " "handler. This is a thin wrapper around either :c:func:`!sigaction` or :c:" "func:`!signal`. Do not call those functions directly!" msgstr "" +#: ../../c-api/sys.rst:129 +msgid "Check if a :c:macro:`!SIGINT` signal has been received." +msgstr "" + +#: ../../c-api/sys.rst:131 +msgid "" +"Returns ``1`` if a :c:macro:`!SIGINT` has occurred and clears the signal " +"flag, or ``0`` otherwise." +msgstr "" + +#: ../../c-api/sys.rst:134 +msgid "" +"In most cases, you should prefer :c:func:`PyErr_CheckSignals` over this " +"function. :c:func:`!PyErr_CheckSignals` invokes the appropriate signal " +"handlers for all pending signals, allowing Python code to handle the signal " +"properly. This function only detects :c:macro:`!SIGINT` and does not invoke " +"any Python signal handlers." +msgstr "" + +#: ../../c-api/sys.rst:140 +msgid "" +"This function is async-signal-safe and this function cannot fail. The caller " +"must hold an :term:`attached thread state`." +msgstr "" + +#: ../../c-api/sys.rst:147 msgid "" "This function should not be called directly: use the :c:type:`PyConfig` API " "with the :c:func:`PyConfig_SetBytesString` function which ensures that :ref:" "`Python is preinitialized `." msgstr "" +#: ../../c-api/sys.rst:151 ../../c-api/sys.rst:218 msgid "" "This function must not be called before :ref:`Python is preinitialized ` and so that the LC_CTYPE locale is properly configured: see the :c:" "func:`Py_PreInitialize` function." msgstr "" +#: ../../c-api/sys.rst:155 msgid "" "Decode a byte string from the :term:`filesystem encoding and error handler`. " "If the error handler is :ref:`surrogateescape error handler " @@ -139,48 +183,57 @@ msgid "" "instead of decoding them." msgstr "" +#: ../../c-api/sys.rst:162 msgid "" "Return a pointer to a newly allocated wide character string, use :c:func:" "`PyMem_RawFree` to free the memory. If size is not ``NULL``, write the " "number of wide characters excluding the null character into ``*size``" msgstr "" +#: ../../c-api/sys.rst:166 msgid "" "Return ``NULL`` on decoding error or memory allocation error. If *size* is " "not ``NULL``, ``*size`` is set to ``(size_t)-1`` on memory error or set to " "``(size_t)-2`` on decoding error." msgstr "" +#: ../../c-api/sys.rst:170 ../../c-api/sys.rst:210 msgid "" "The :term:`filesystem encoding and error handler` are selected by :c:func:" "`PyConfig_Read`: see :c:member:`~PyConfig.filesystem_encoding` and :c:member:" "`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`." msgstr "" +#: ../../c-api/sys.rst:174 msgid "" "Decoding errors should never happen, unless there is a bug in the C library." msgstr "" +#: ../../c-api/sys.rst:177 msgid "" "Use the :c:func:`Py_EncodeLocale` function to encode the character string " "back to a byte string." msgstr "" +#: ../../c-api/sys.rst:182 msgid "" "The :c:func:`PyUnicode_DecodeFSDefaultAndSize` and :c:func:" "`PyUnicode_DecodeLocaleAndSize` functions." msgstr "" +#: ../../c-api/sys.rst:187 ../../c-api/sys.rst:229 msgid "" "The function now uses the UTF-8 encoding in the :ref:`Python UTF-8 Mode " "`." msgstr "" +#: ../../c-api/sys.rst:191 msgid "" "The function now uses the UTF-8 encoding on Windows if :c:member:" "`PyPreConfig.legacy_windows_fs_encoding` is zero;" msgstr "" +#: ../../c-api/sys.rst:198 msgid "" "Encode a wide character string to the :term:`filesystem encoding and error " "handler`. If the error handler is :ref:`surrogateescape error handler " @@ -188,70 +241,85 @@ msgid "" "converted to bytes 0x80..0xFF." msgstr "" +#: ../../c-api/sys.rst:203 msgid "" "Return a pointer to a newly allocated byte string, use :c:func:`PyMem_Free` " "to free the memory. Return ``NULL`` on encoding error or memory allocation " "error." msgstr "" +#: ../../c-api/sys.rst:207 msgid "" "If error_pos is not ``NULL``, ``*error_pos`` is set to ``(size_t)-1`` on " "success, or set to the index of the invalid character on encoding error." msgstr "" +#: ../../c-api/sys.rst:214 msgid "" "Use the :c:func:`Py_DecodeLocale` function to decode the bytes string back " "to a wide character string." msgstr "" +#: ../../c-api/sys.rst:224 msgid "" "The :c:func:`PyUnicode_EncodeFSDefault` and :c:func:`PyUnicode_EncodeLocale` " "functions." msgstr "" +#: ../../c-api/sys.rst:233 msgid "" "The function now uses the UTF-8 encoding on Windows if :c:member:" "`PyPreConfig.legacy_windows_fs_encoding` is zero." msgstr "" +#: ../../c-api/sys.rst:239 msgid "" "Similar to :c:func:`!fopen`, but *path* is a Python object and an exception " "is set on error." msgstr "" +#: ../../c-api/sys.rst:242 msgid "" "*path* must be a :class:`str` object, a :class:`bytes` object, or a :term:" "`path-like object`." msgstr "" +#: ../../c-api/sys.rst:245 msgid "" "On success, return the new file pointer. On error, set an exception and " "return ``NULL``." msgstr "" +#: ../../c-api/sys.rst:248 msgid "" "The file must be closed by :c:func:`Py_fclose` rather than calling directly :" "c:func:`!fclose`." msgstr "" +#: ../../c-api/sys.rst:251 msgid "The file descriptor is created non-inheritable (:pep:`446`)." msgstr "" +#: ../../c-api/sys.rst:253 msgid "The caller must have an :term:`attached thread state`." msgstr "" +#: ../../c-api/sys.rst:260 msgid "Close a file that was opened by :c:func:`Py_fopen`." msgstr "" +#: ../../c-api/sys.rst:262 msgid "" "On success, return ``0``. On error, return ``EOF`` and ``errno`` is set to " "indicate the error. In either case, any further access (including another " "call to :c:func:`Py_fclose`) to the stream results in undefined behavior." msgstr "" +#: ../../c-api/sys.rst:273 msgid "System Functions" msgstr "" +#: ../../c-api/sys.rst:275 msgid "" "These are utility functions that make functionality from the :mod:`sys` " "module accessible to C code. They all work with the current interpreter " @@ -259,30 +327,87 @@ msgid "" "state structure." msgstr "" +#: ../../c-api/sys.rst:281 msgid "" -"Return the object *name* from the :mod:`sys` module or ``NULL`` if it does " -"not exist, without setting an exception." +"Get the attribute *name* of the :mod:`sys` module. Return a :term:`strong " +"reference`. Raise :exc:`RuntimeError` and return ``NULL`` if it does not " +"exist or if the :mod:`sys` module cannot be found." msgstr "" +#: ../../c-api/sys.rst:286 msgid "" -"Set *name* in the :mod:`sys` module to *v* unless *v* is ``NULL``, in which " -"case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` " -"on error." +"If the non-existing object should not be treated as a failure, you can use :" +"c:func:`PySys_GetOptionalAttr` instead." +msgstr "" + +#: ../../c-api/sys.rst:293 +msgid "" +"This is the same as :c:func:`PySys_GetAttr`, but *name* is specified as a :c:" +"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +#: ../../c-api/sys.rst:297 +msgid "" +"If the non-existing object should not be treated as a failure, you can use :" +"c:func:`PySys_GetOptionalAttrString` instead." msgstr "" +#: ../../c-api/sys.rst:304 msgid "" -"Reset :data:`sys.warnoptions` to an empty list. This function may be called " -"prior to :c:func:`Py_Initialize`." +"Variant of :c:func:`PySys_GetAttr` which doesn't raise exception if the " +"object does not exist." msgstr "" -msgid "Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." +#: ../../c-api/sys.rst:307 +msgid "" +"Set *\\*result* to a new :term:`strong reference` to the object and return " +"``1`` if the object exists." +msgstr "" + +#: ../../c-api/sys.rst:309 +msgid "" +"Set *\\*result* to ``NULL`` and return ``0`` without setting an exception if " +"the object does not exist." +msgstr "" + +#: ../../c-api/sys.rst:311 +msgid "" +"Set an exception, set *\\*result* to ``NULL``, and return ``-1``, if an " +"error occurred." +msgstr "" + +#: ../../c-api/sys.rst:318 +msgid "" +"This is the same as :c:func:`PySys_GetOptionalAttr`, but *name* is specified " +"as a :c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" +"`PyObject*`." +msgstr "" + +#: ../../c-api/sys.rst:326 +msgid "" +"Similar to :c:func:`PySys_GetAttrString`, but return a :term:`borrowed " +"reference` and return ``NULL`` *without* setting exception on failure." +msgstr "" + +#: ../../c-api/sys.rst:329 +msgid "Preserves exception that was set before the call." +msgstr "" + +#: ../../c-api/sys.rst:333 +msgid "" +"Set *name* in the :mod:`sys` module to *v* unless *v* is ``NULL``, in which " +"case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` " +"on error." msgstr "" +#: ../../c-api/sys.rst:339 msgid "" "Write the output string described by *format* to :data:`sys.stdout`. No " "exceptions are raised, even if truncation occurs (see below)." msgstr "" +#: ../../c-api/sys.rst:342 msgid "" "*format* should limit the total size of the formatted output string to 1000 " "bytes or less -- after 1000 bytes, the output string is truncated. In " @@ -293,40 +418,48 @@ msgid "" "of digits for very large numbers." msgstr "" +#: ../../c-api/sys.rst:350 msgid "" "If a problem occurs, or :data:`sys.stdout` is unset, the formatted message " "is written to the real (C level) *stdout*." msgstr "" +#: ../../c-api/sys.rst:355 msgid "" "As :c:func:`PySys_WriteStdout`, but write to :data:`sys.stderr` or *stderr* " "instead." msgstr "" +#: ../../c-api/sys.rst:360 msgid "" "Function similar to PySys_WriteStdout() but format the message using :c:func:" "`PyUnicode_FromFormatV` and don't truncate the message to an arbitrary " "length." msgstr "" +#: ../../c-api/sys.rst:368 msgid "" "As :c:func:`PySys_FormatStdout`, but write to :data:`sys.stderr` or *stderr* " "instead." msgstr "" +#: ../../c-api/sys.rst:375 msgid "" "Return the current dictionary of :option:`-X` options, similarly to :data:" "`sys._xoptions`. On error, ``NULL`` is returned and an exception is set." msgstr "" +#: ../../c-api/sys.rst:384 msgid "" "Raise an auditing event with any active hooks. Return zero for success and " "non-zero with an exception set on failure." msgstr "" +#: ../../c-api/sys.rst:387 msgid "The *event* string argument must not be *NULL*." msgstr "" +#: ../../c-api/sys.rst:389 msgid "" "If any hooks have been added, *format* and other arguments will be used to " "construct a tuple to pass. Apart from ``N``, the same format characters as " @@ -334,33 +467,40 @@ msgid "" "tuple, it will be added into a single-element tuple." msgstr "" +#: ../../c-api/sys.rst:394 msgid "" "The ``N`` format option must not be used. It consumes a reference, but since " "there is no way to know whether arguments to this function will be consumed, " "using it may cause reference leaks." msgstr "" +#: ../../c-api/sys.rst:398 msgid "" "Note that ``#`` format characters should always be treated as :c:type:" "`Py_ssize_t`, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined." msgstr "" +#: ../../c-api/sys.rst:401 msgid ":func:`sys.audit` performs the same function from Python code." msgstr "" +#: ../../c-api/sys.rst:403 msgid "See also :c:func:`PySys_AuditTuple`." msgstr "" +#: ../../c-api/sys.rst:409 msgid "" "Require :c:type:`Py_ssize_t` for ``#`` format characters. Previously, an " "unavoidable deprecation warning was raised." msgstr "" +#: ../../c-api/sys.rst:415 msgid "" "Similar to :c:func:`PySys_Audit`, but pass arguments as a Python object. " "*args* must be a :class:`tuple`. To pass no arguments, *args* can be *NULL*." msgstr "" +#: ../../c-api/sys.rst:423 msgid "" "Append the callable *hook* to the list of active auditing hooks. Return zero " "on success and non-zero on failure. If the runtime has been initialized, " @@ -368,12 +508,14 @@ msgid "" "all interpreters created by the runtime." msgstr "" +#: ../../c-api/sys.rst:429 msgid "" "The *userData* pointer is passed into the hook function. Since hook " "functions may be called from different runtimes, this pointer should not " "refer directly to Python state." msgstr "" +#: ../../c-api/sys.rst:433 msgid "" "This function is safe to call before :c:func:`Py_Initialize`. When called " "after runtime initialization, existing audit hooks are notified and may " @@ -381,17 +523,20 @@ msgid "" "`Exception` (other errors will not be silenced)." msgstr "" +#: ../../c-api/sys.rst:438 msgid "" "The hook function is always called with an :term:`attached thread state` by " "the Python interpreter that raised the event." msgstr "" +#: ../../c-api/sys.rst:441 msgid "" "See :pep:`578` for a detailed description of auditing. Functions in the " "runtime and standard library that raise events are listed in the :ref:`audit " "events table `. Details are in each function's documentation." msgstr "" +#: ../../c-api/sys.rst:446 ../../c-api/sys.rst:448 msgid "" "If the interpreter is initialized, this function raises an auditing event " "``sys.addaudithook`` with no arguments. If any existing hooks raise an " @@ -400,6 +545,7 @@ msgid "" "hook has been added unless they control all existing hooks." msgstr "" +#: ../../c-api/sys.rst:457 msgid "" "The type of the hook function. *event* is the C string event argument passed " "to :c:func:`PySys_Audit` or :c:func:`PySys_AuditTuple`. *args* is guaranteed " @@ -407,9 +553,11 @@ msgid "" "PySys_AddAuditHook()." msgstr "" +#: ../../c-api/sys.rst:469 msgid "Process Control" msgstr "" +#: ../../c-api/sys.rst:476 msgid "" "Print a fatal error message and kill the process. No cleanup is performed. " "This function should only be invoked when a condition is detected that would " @@ -419,24 +567,29 @@ msgid "" "file:`core` file." msgstr "" +#: ../../c-api/sys.rst:483 msgid "" "The ``Py_FatalError()`` function is replaced with a macro which logs " "automatically the name of the current function, unless the " "``Py_LIMITED_API`` macro is defined." msgstr "" +#: ../../c-api/sys.rst:487 msgid "Log the function name automatically." msgstr "" +#: ../../c-api/sys.rst:497 msgid "" "Exit the current process. This calls :c:func:`Py_FinalizeEx` and then calls " "the standard C library function ``exit(status)``. If :c:func:" "`Py_FinalizeEx` indicates an error, the exit status is set to 120." msgstr "" +#: ../../c-api/sys.rst:501 msgid "Errors from finalization no longer ignored." msgstr "" +#: ../../c-api/sys.rst:511 msgid "" "Register a cleanup function to be called by :c:func:`Py_FinalizeEx`. The " "cleanup function will be called with no arguments and should return no " @@ -448,20 +601,26 @@ msgid "" "should be called by *func*." msgstr "" +#: ../../c-api/sys.rst:521 msgid ":c:func:`PyUnstable_AtExit` for passing a ``void *data`` argument." msgstr "" +#: ../../c-api/sys.rst:101 msgid "USE_STACKCHECK (C macro)" msgstr "" +#: ../../c-api/sys.rst:474 msgid "abort (C function)" msgstr "" +#: ../../c-api/sys.rst:493 ../../c-api/sys.rst:507 msgid "Py_FinalizeEx (C function)" msgstr "" +#: ../../c-api/sys.rst:493 msgid "exit (C function)" msgstr "" +#: ../../c-api/sys.rst:507 msgid "cleanup functions" msgstr "" diff --git a/c-api/sys.po~ b/c-api/sys.po~ new file mode 100644 index 00000000..5f3960f3 --- /dev/null +++ b/c-api/sys.po~ @@ -0,0 +1,467 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Operating System Utilities" +msgstr "" + +msgid "" +"Return the file system representation for *path*. If the object is a :class:" +"`str` or :class:`bytes` object, then a new :term:`strong reference` is " +"returned. If the object implements the :class:`os.PathLike` interface, then :" +"meth:`~os.PathLike.__fspath__` is returned as long as it is a :class:`str` " +"or :class:`bytes` object. Otherwise :exc:`TypeError` is raised and ``NULL`` " +"is returned." +msgstr "" + +msgid "" +"Return true (nonzero) if the standard I/O file *fp* with name *filename* is " +"deemed interactive. This is the case for files for which " +"``isatty(fileno(fp))`` is true. If the :c:member:`PyConfig.interactive` is " +"non-zero, this function also returns true if the *filename* pointer is " +"``NULL`` or if the name is equal to one of the strings ``''`` or " +"``'???'``." +msgstr "" + +msgid "This function must not be called before Python is initialized." +msgstr "" + +msgid "" +"Function to prepare some internal state before a process fork. This should " +"be called before calling :c:func:`fork` or any similar function that clones " +"the current process. Only available on systems where :c:func:`fork` is " +"defined." +msgstr "" + +msgid "" +"The C :c:func:`fork` call should only be made from the :ref:`\"main\" thread " +"` (of the :ref:`\"main\" interpreter `). The same is true for ``PyOS_BeforeFork()``." +msgstr "" + +msgid "" +"Function to update some internal state after a process fork. This should be " +"called from the parent process after calling :c:func:`fork` or any similar " +"function that clones the current process, regardless of whether process " +"cloning was successful. Only available on systems where :c:func:`fork` is " +"defined." +msgstr "" + +msgid "" +"The C :c:func:`fork` call should only be made from the :ref:`\"main\" thread " +"` (of the :ref:`\"main\" interpreter `). The same is true for ``PyOS_AfterFork_Parent()``." +msgstr "" + +msgid "" +"Function to update internal interpreter state after a process fork. This " +"must be called from the child process after calling :c:func:`fork`, or any " +"similar function that clones the current process, if there is any chance the " +"process will call back into the Python interpreter. Only available on " +"systems where :c:func:`fork` is defined." +msgstr "" + +msgid "" +"The C :c:func:`fork` call should only be made from the :ref:`\"main\" thread " +"` (of the :ref:`\"main\" interpreter `). The same is true for ``PyOS_AfterFork_Child()``." +msgstr "" + +msgid "" +":func:`os.register_at_fork` allows registering custom Python functions to be " +"called by :c:func:`PyOS_BeforeFork()`, :c:func:`PyOS_AfterFork_Parent` and :" +"c:func:`PyOS_AfterFork_Child`." +msgstr "" + +msgid "" +"Function to update some internal state after a process fork; this should be " +"called in the new process if the Python interpreter will continue to be " +"used. If a new executable is loaded into the new process, this function does " +"not need to be called." +msgstr "" + +msgid "This function is superseded by :c:func:`PyOS_AfterFork_Child()`." +msgstr "" + +msgid "" +"Return true when the interpreter runs out of stack space. This is a " +"reliable check, but is only available when :c:macro:`!USE_STACKCHECK` is " +"defined (currently on certain versions of Windows using the Microsoft Visual " +"C++ compiler). :c:macro:`!USE_STACKCHECK` will be defined automatically; you " +"should never change the definition in your own code." +msgstr "" + +msgid "" +"Return the current signal handler for signal *i*. This is a thin wrapper " +"around either :c:func:`!sigaction` or :c:func:`!signal`. Do not call those " +"functions directly!" +msgstr "" + +msgid "" +"Set the signal handler for signal *i* to be *h*; return the old signal " +"handler. This is a thin wrapper around either :c:func:`!sigaction` or :c:" +"func:`!signal`. Do not call those functions directly!" +msgstr "" + +msgid "" +"This function should not be called directly: use the :c:type:`PyConfig` API " +"with the :c:func:`PyConfig_SetBytesString` function which ensures that :ref:" +"`Python is preinitialized `." +msgstr "" + +msgid "" +"This function must not be called before :ref:`Python is preinitialized ` and so that the LC_CTYPE locale is properly configured: see the :c:" +"func:`Py_PreInitialize` function." +msgstr "" + +msgid "" +"Decode a byte string from the :term:`filesystem encoding and error handler`. " +"If the error handler is :ref:`surrogateescape error handler " +"`, undecodable bytes are decoded as characters in range " +"U+DC80..U+DCFF; and if a byte sequence can be decoded as a surrogate " +"character, the bytes are escaped using the surrogateescape error handler " +"instead of decoding them." +msgstr "" + +msgid "" +"Return a pointer to a newly allocated wide character string, use :c:func:" +"`PyMem_RawFree` to free the memory. If size is not ``NULL``, write the " +"number of wide characters excluding the null character into ``*size``" +msgstr "" + +msgid "" +"Return ``NULL`` on decoding error or memory allocation error. If *size* is " +"not ``NULL``, ``*size`` is set to ``(size_t)-1`` on memory error or set to " +"``(size_t)-2`` on decoding error." +msgstr "" + +msgid "" +"The :term:`filesystem encoding and error handler` are selected by :c:func:" +"`PyConfig_Read`: see :c:member:`~PyConfig.filesystem_encoding` and :c:member:" +"`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`." +msgstr "" + +msgid "" +"Decoding errors should never happen, unless there is a bug in the C library." +msgstr "" + +msgid "" +"Use the :c:func:`Py_EncodeLocale` function to encode the character string " +"back to a byte string." +msgstr "" + +msgid "" +"The :c:func:`PyUnicode_DecodeFSDefaultAndSize` and :c:func:" +"`PyUnicode_DecodeLocaleAndSize` functions." +msgstr "" + +msgid "" +"The function now uses the UTF-8 encoding in the :ref:`Python UTF-8 Mode " +"`." +msgstr "" + +msgid "" +"The function now uses the UTF-8 encoding on Windows if :c:member:" +"`PyPreConfig.legacy_windows_fs_encoding` is zero;" +msgstr "" + +msgid "" +"Encode a wide character string to the :term:`filesystem encoding and error " +"handler`. If the error handler is :ref:`surrogateescape error handler " +"`, surrogate characters in the range U+DC80..U+DCFF are " +"converted to bytes 0x80..0xFF." +msgstr "" + +msgid "" +"Return a pointer to a newly allocated byte string, use :c:func:`PyMem_Free` " +"to free the memory. Return ``NULL`` on encoding error or memory allocation " +"error." +msgstr "" + +msgid "" +"If error_pos is not ``NULL``, ``*error_pos`` is set to ``(size_t)-1`` on " +"success, or set to the index of the invalid character on encoding error." +msgstr "" + +msgid "" +"Use the :c:func:`Py_DecodeLocale` function to decode the bytes string back " +"to a wide character string." +msgstr "" + +msgid "" +"The :c:func:`PyUnicode_EncodeFSDefault` and :c:func:`PyUnicode_EncodeLocale` " +"functions." +msgstr "" + +msgid "" +"The function now uses the UTF-8 encoding on Windows if :c:member:" +"`PyPreConfig.legacy_windows_fs_encoding` is zero." +msgstr "" + +msgid "" +"Similar to :c:func:`!fopen`, but *path* is a Python object and an exception " +"is set on error." +msgstr "" + +msgid "" +"*path* must be a :class:`str` object, a :class:`bytes` object, or a :term:" +"`path-like object`." +msgstr "" + +msgid "" +"On success, return the new file pointer. On error, set an exception and " +"return ``NULL``." +msgstr "" + +msgid "" +"The file must be closed by :c:func:`Py_fclose` rather than calling directly :" +"c:func:`!fclose`." +msgstr "" + +msgid "The file descriptor is created non-inheritable (:pep:`446`)." +msgstr "" + +msgid "The caller must have an :term:`attached thread state`." +msgstr "" + +msgid "Close a file that was opened by :c:func:`Py_fopen`." +msgstr "" + +msgid "" +"On success, return ``0``. On error, return ``EOF`` and ``errno`` is set to " +"indicate the error. In either case, any further access (including another " +"call to :c:func:`Py_fclose`) to the stream results in undefined behavior." +msgstr "" + +msgid "System Functions" +msgstr "" + +msgid "" +"These are utility functions that make functionality from the :mod:`sys` " +"module accessible to C code. They all work with the current interpreter " +"thread's :mod:`sys` module's dict, which is contained in the internal thread " +"state structure." +msgstr "" + +msgid "" +"Return the object *name* from the :mod:`sys` module or ``NULL`` if it does " +"not exist, without setting an exception." +msgstr "" + +msgid "" +"Set *name* in the :mod:`sys` module to *v* unless *v* is ``NULL``, in which " +"case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` " +"on error." +msgstr "" + +msgid "" +"Reset :data:`sys.warnoptions` to an empty list. This function may be called " +"prior to :c:func:`Py_Initialize`." +msgstr "" + +msgid "Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." +msgstr "" + +msgid "" +"Write the output string described by *format* to :data:`sys.stdout`. No " +"exceptions are raised, even if truncation occurs (see below)." +msgstr "" + +msgid "" +"*format* should limit the total size of the formatted output string to 1000 " +"bytes or less -- after 1000 bytes, the output string is truncated. In " +"particular, this means that no unrestricted \"%s\" formats should occur; " +"these should be limited using \"%.s\" where is a decimal number " +"calculated so that plus the maximum size of other formatted text does " +"not exceed 1000 bytes. Also watch out for \"%f\", which can print hundreds " +"of digits for very large numbers." +msgstr "" + +msgid "" +"If a problem occurs, or :data:`sys.stdout` is unset, the formatted message " +"is written to the real (C level) *stdout*." +msgstr "" + +msgid "" +"As :c:func:`PySys_WriteStdout`, but write to :data:`sys.stderr` or *stderr* " +"instead." +msgstr "" + +msgid "" +"Function similar to PySys_WriteStdout() but format the message using :c:func:" +"`PyUnicode_FromFormatV` and don't truncate the message to an arbitrary " +"length." +msgstr "" + +msgid "" +"As :c:func:`PySys_FormatStdout`, but write to :data:`sys.stderr` or *stderr* " +"instead." +msgstr "" + +msgid "" +"Return the current dictionary of :option:`-X` options, similarly to :data:" +"`sys._xoptions`. On error, ``NULL`` is returned and an exception is set." +msgstr "" + +msgid "" +"Raise an auditing event with any active hooks. Return zero for success and " +"non-zero with an exception set on failure." +msgstr "" + +msgid "The *event* string argument must not be *NULL*." +msgstr "" + +msgid "" +"If any hooks have been added, *format* and other arguments will be used to " +"construct a tuple to pass. Apart from ``N``, the same format characters as " +"used in :c:func:`Py_BuildValue` are available. If the built value is not a " +"tuple, it will be added into a single-element tuple." +msgstr "" + +msgid "" +"The ``N`` format option must not be used. It consumes a reference, but since " +"there is no way to know whether arguments to this function will be consumed, " +"using it may cause reference leaks." +msgstr "" + +msgid "" +"Note that ``#`` format characters should always be treated as :c:type:" +"`Py_ssize_t`, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined." +msgstr "" + +msgid ":func:`sys.audit` performs the same function from Python code." +msgstr "" + +msgid "See also :c:func:`PySys_AuditTuple`." +msgstr "" + +msgid "" +"Require :c:type:`Py_ssize_t` for ``#`` format characters. Previously, an " +"unavoidable deprecation warning was raised." +msgstr "" + +msgid "" +"Similar to :c:func:`PySys_Audit`, but pass arguments as a Python object. " +"*args* must be a :class:`tuple`. To pass no arguments, *args* can be *NULL*." +msgstr "" + +msgid "" +"Append the callable *hook* to the list of active auditing hooks. Return zero " +"on success and non-zero on failure. If the runtime has been initialized, " +"also set an error on failure. Hooks added through this API are called for " +"all interpreters created by the runtime." +msgstr "" + +msgid "" +"The *userData* pointer is passed into the hook function. Since hook " +"functions may be called from different runtimes, this pointer should not " +"refer directly to Python state." +msgstr "" + +msgid "" +"This function is safe to call before :c:func:`Py_Initialize`. When called " +"after runtime initialization, existing audit hooks are notified and may " +"silently abort the operation by raising an error subclassed from :class:" +"`Exception` (other errors will not be silenced)." +msgstr "" + +msgid "" +"The hook function is always called with an :term:`attached thread state` by " +"the Python interpreter that raised the event." +msgstr "" + +msgid "" +"See :pep:`578` for a detailed description of auditing. Functions in the " +"runtime and standard library that raise events are listed in the :ref:`audit " +"events table `. Details are in each function's documentation." +msgstr "" + +msgid "" +"If the interpreter is initialized, this function raises an auditing event " +"``sys.addaudithook`` with no arguments. If any existing hooks raise an " +"exception derived from :class:`Exception`, the new hook will not be added " +"and the exception is cleared. As a result, callers cannot assume that their " +"hook has been added unless they control all existing hooks." +msgstr "" + +msgid "" +"The type of the hook function. *event* is the C string event argument passed " +"to :c:func:`PySys_Audit` or :c:func:`PySys_AuditTuple`. *args* is guaranteed " +"to be a :c:type:`PyTupleObject`. *userData* is the argument passed to " +"PySys_AddAuditHook()." +msgstr "" + +msgid "Process Control" +msgstr "" + +msgid "" +"Print a fatal error message and kill the process. No cleanup is performed. " +"This function should only be invoked when a condition is detected that would " +"make it dangerous to continue using the Python interpreter; e.g., when the " +"object administration appears to be corrupted. On Unix, the standard C " +"library function :c:func:`!abort` is called which will attempt to produce a :" +"file:`core` file." +msgstr "" + +msgid "" +"The ``Py_FatalError()`` function is replaced with a macro which logs " +"automatically the name of the current function, unless the " +"``Py_LIMITED_API`` macro is defined." +msgstr "" + +msgid "Log the function name automatically." +msgstr "" + +msgid "" +"Exit the current process. This calls :c:func:`Py_FinalizeEx` and then calls " +"the standard C library function ``exit(status)``. If :c:func:" +"`Py_FinalizeEx` indicates an error, the exit status is set to 120." +msgstr "" + +msgid "Errors from finalization no longer ignored." +msgstr "" + +msgid "" +"Register a cleanup function to be called by :c:func:`Py_FinalizeEx`. The " +"cleanup function will be called with no arguments and should return no " +"value. At most 32 cleanup functions can be registered. When the " +"registration is successful, :c:func:`Py_AtExit` returns ``0``; on failure, " +"it returns ``-1``. The cleanup function registered last is called first. " +"Each cleanup function will be called at most once. Since Python's internal " +"finalization will have completed before the cleanup function, no Python APIs " +"should be called by *func*." +msgstr "" + +msgid ":c:func:`PyUnstable_AtExit` for passing a ``void *data`` argument." +msgstr "" + +msgid "USE_STACKCHECK (C macro)" +msgstr "" + +msgid "abort (C function)" +msgstr "" + +msgid "Py_FinalizeEx (C function)" +msgstr "" + +msgid "exit (C function)" +msgstr "" + +msgid "cleanup functions" +msgstr "" diff --git a/c-api/time.po b/c-api/time.po index 1d2dab47..c6fe1ba7 100644 --- a/c-api/time.po +++ b/c-api/time.po @@ -8,66 +8,79 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/time.rst:6 msgid "PyTime C API" msgstr "" +#: ../../c-api/time.rst:10 msgid "" "The clock C API provides access to system clocks. It is similar to the " "Python :mod:`time` module." msgstr "" +#: ../../c-api/time.rst:13 msgid "" "For C API related to the :mod:`datetime` module, see :ref:`datetimeobjects`." msgstr "" +#: ../../c-api/time.rst:17 msgid "Types" msgstr "" +#: ../../c-api/time.rst:21 msgid "" "A timestamp or duration in nanoseconds, represented as a signed 64-bit " "integer." msgstr "" +#: ../../c-api/time.rst:24 msgid "" "The reference point for timestamps depends on the clock used. For example, :" "c:func:`PyTime_Time` returns timestamps relative to the UNIX epoch." msgstr "" +#: ../../c-api/time.rst:27 msgid "" "The supported range is around [-292.3 years; +292.3 years]. Using the Unix " "epoch (January 1st, 1970) as reference, the supported date range is around " "[1677-09-21; 2262-04-11]. The exact limits are exposed as constants:" msgstr "" +#: ../../c-api/time.rst:34 msgid "Minimum value of :c:type:`PyTime_t`." msgstr "" +#: ../../c-api/time.rst:38 msgid "Maximum value of :c:type:`PyTime_t`." msgstr "" +#: ../../c-api/time.rst:42 msgid "Clock Functions" msgstr "" +#: ../../c-api/time.rst:44 msgid "" "The following functions take a pointer to a :c:expr:`PyTime_t` that they set " "to the value of a particular clock. Details of each clock are given in the " "documentation of the corresponding Python function." msgstr "" +#: ../../c-api/time.rst:49 msgid "" "The functions return ``0`` on success, or ``-1`` (with an exception set) on " "failure." msgstr "" +#: ../../c-api/time.rst:52 msgid "" "On integer overflow, they set the :c:data:`PyExc_OverflowError` exception " "and set ``*result`` to the value clamped to the ``[PyTime_MIN; PyTime_MAX]`` " @@ -75,37 +88,45 @@ msgid "" "misconfigured system time.)" msgstr "" +#: ../../c-api/time.rst:58 msgid "" "As any other C API (unless otherwise specified), the functions must be " "called with an :term:`attached thread state`." msgstr "" +#: ../../c-api/time.rst:63 msgid "" "Read the monotonic clock. See :func:`time.monotonic` for important details " "on this clock." msgstr "" +#: ../../c-api/time.rst:68 msgid "" "Read the performance counter. See :func:`time.perf_counter` for important " "details on this clock." msgstr "" +#: ../../c-api/time.rst:73 msgid "" "Read the “wall clock” time. See :func:`time.time` for details important on " "this clock." msgstr "" +#: ../../c-api/time.rst:78 msgid "Raw Clock Functions" msgstr "" +#: ../../c-api/time.rst:80 msgid "" "Similar to clock functions, but don't set an exception on error and don't " "require the caller to have an :term:`attached thread state`." msgstr "" +#: ../../c-api/time.rst:83 msgid "On success, the functions return ``0``." msgstr "" +#: ../../c-api/time.rst:85 msgid "" "On failure, they set ``*result`` to ``0`` and return ``-1``, *without* " "setting an exception. To get the cause of the error, :term:`attach , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "PyTime C API" +msgstr "" + +msgid "" +"The clock C API provides access to system clocks. It is similar to the " +"Python :mod:`time` module." +msgstr "" + +msgid "" +"For C API related to the :mod:`datetime` module, see :ref:`datetimeobjects`." +msgstr "" + +msgid "Types" +msgstr "" + +msgid "" +"A timestamp or duration in nanoseconds, represented as a signed 64-bit " +"integer." +msgstr "" + +msgid "" +"The reference point for timestamps depends on the clock used. For example, :" +"c:func:`PyTime_Time` returns timestamps relative to the UNIX epoch." +msgstr "" + +msgid "" +"The supported range is around [-292.3 years; +292.3 years]. Using the Unix " +"epoch (January 1st, 1970) as reference, the supported date range is around " +"[1677-09-21; 2262-04-11]. The exact limits are exposed as constants:" +msgstr "" + +msgid "Minimum value of :c:type:`PyTime_t`." +msgstr "" + +msgid "Maximum value of :c:type:`PyTime_t`." +msgstr "" + +msgid "Clock Functions" +msgstr "" + +msgid "" +"The following functions take a pointer to a :c:expr:`PyTime_t` that they set " +"to the value of a particular clock. Details of each clock are given in the " +"documentation of the corresponding Python function." +msgstr "" + +msgid "" +"The functions return ``0`` on success, or ``-1`` (with an exception set) on " +"failure." +msgstr "" + +msgid "" +"On integer overflow, they set the :c:data:`PyExc_OverflowError` exception " +"and set ``*result`` to the value clamped to the ``[PyTime_MIN; PyTime_MAX]`` " +"range. (On current systems, integer overflows are likely caused by " +"misconfigured system time.)" +msgstr "" + +msgid "" +"As any other C API (unless otherwise specified), the functions must be " +"called with an :term:`attached thread state`." +msgstr "" + +msgid "" +"Read the monotonic clock. See :func:`time.monotonic` for important details " +"on this clock." +msgstr "" + +msgid "" +"Read the performance counter. See :func:`time.perf_counter` for important " +"details on this clock." +msgstr "" + +msgid "" +"Read the “wall clock” time. See :func:`time.time` for details important on " +"this clock." +msgstr "" + +msgid "Raw Clock Functions" +msgstr "" + +msgid "" +"Similar to clock functions, but don't set an exception on error and don't " +"require the caller to have an :term:`attached thread state`." +msgstr "" + +msgid "On success, the functions return ``0``." +msgstr "" + +msgid "" +"On failure, they set ``*result`` to ``0`` and return ``-1``, *without* " +"setting an exception. To get the cause of the error, :term:`attach ` a :term:`thread state`, and call the regular (non-``Raw``) " +"function. Note that the regular function may succeed after the ``Raw`` one " +"failed." +msgstr "" + +msgid "" +"Similar to :c:func:`PyTime_Monotonic`, but don't set an exception on error " +"and don't require an :term:`attached thread state`." +msgstr "" + +msgid "" +"Similar to :c:func:`PyTime_PerfCounter`, but don't set an exception on error " +"and don't require an :term:`attached thread state`." +msgstr "" + +msgid "" +"Similar to :c:func:`PyTime_Time`, but don't set an exception on error and " +"don't require an :term:`attached thread state`." +msgstr "" + +msgid "Conversion functions" +msgstr "" + +msgid "Convert a timestamp to a number of seconds as a C :c:expr:`double`." +msgstr "" + +msgid "" +"The function cannot fail, but note that :c:expr:`double` has limited " +"accuracy for large values." +msgstr "" diff --git a/c-api/tuple.po b/c-api/tuple.po index 0c21bde0..976d40e9 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -8,41 +8,64 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/tuple.rst:6 msgid "Tuple Objects" msgstr "" +#: ../../c-api/tuple.rst:13 msgid "This subtype of :c:type:`PyObject` represents a Python tuple object." msgstr "" +#: ../../c-api/tuple.rst:18 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python tuple type; it " "is the same object as :class:`tuple` in the Python layer." msgstr "" +#: ../../c-api/tuple.rst:24 msgid "" "Return true if *p* is a tuple object or an instance of a subtype of the " "tuple type. This function always succeeds." msgstr "" +#: ../../c-api/tuple.rst:30 msgid "" "Return true if *p* is a tuple object, but not an instance of a subtype of " "the tuple type. This function always succeeds." msgstr "" +#: ../../c-api/tuple.rst:36 msgid "" "Return a new tuple object of size *len*, or ``NULL`` with an exception set " "on failure." msgstr "" +#: ../../c-api/tuple.rst:42 +msgid "" +"Create a tuple of *size* items and copy references from *array* to the new " +"tuple." +msgstr "" + +#: ../../c-api/tuple.rst:45 +msgid "*array* can be NULL if *size* is ``0``." +msgstr "" + +#: ../../c-api/tuple.rst:47 +msgid "" +"On success, return a new reference. On error, set an exception and return " +"``NULL``." +msgstr "" + +#: ../../c-api/tuple.rst:55 msgid "" "Return a new tuple object of size *n*, or ``NULL`` with an exception set on " "failure. The tuple values are initialized to the subsequent *n* C arguments " @@ -50,20 +73,24 @@ msgid "" "``Py_BuildValue(\"(OO)\", a, b)``." msgstr "" +#: ../../c-api/tuple.rst:63 msgid "" "Take a pointer to a tuple object, and return the size of that tuple. On " -"error, return ``-1`` and with an exception set." +"error, return ``-1`` with an exception set." msgstr "" +#: ../../c-api/tuple.rst:69 msgid "Like :c:func:`PyTuple_Size`, but without error checking." msgstr "" +#: ../../c-api/tuple.rst:74 msgid "" "Return the object at position *pos* in the tuple pointed to by *p*. If " "*pos* is negative or out of bounds, return ``NULL`` and set an :exc:" "`IndexError` exception." msgstr "" +#: ../../c-api/tuple.rst:77 msgid "" "The returned reference is borrowed from the tuple *p* (that is: it is only " "valid as long as you hold a reference to *p*). To get a :term:`strong " @@ -71,52 +98,66 @@ msgid "" "func:`PySequence_GetItem`." msgstr "" +#: ../../c-api/tuple.rst:86 msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments." msgstr "" +#: ../../c-api/tuple.rst:91 msgid "" "Return the slice of the tuple pointed to by *p* between *low* and *high*, or " "``NULL`` with an exception set on failure." msgstr "" +#: ../../c-api/tuple.rst:94 msgid "" "This is the equivalent of the Python expression ``p[low:high]``. Indexing " "from the end of the tuple is not supported." msgstr "" +#: ../../c-api/tuple.rst:100 msgid "" "Insert a reference to object *o* at position *pos* of the tuple pointed to " "by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` " -"and set an :exc:`IndexError` exception." +"and set an :exc:`IndexError` exception. This function should only be used to " +"fill in brand new tuples; using it on an existing tuple is thread-unsafe." msgstr "" +#: ../../c-api/tuple.rst:107 msgid "" -"This function \"steals\" a reference to *o* and discards a reference to an " -"item already in the tuple at the affected position." +"This function \":term:`steals `\" a reference to *o* and discards a " +"reference to an item already in the tuple at the affected position (unless " +"it was NULL)." msgstr "" +#: ../../c-api/tuple.rst:114 msgid "" "Like :c:func:`PyTuple_SetItem`, but does no error checking, and should " -"*only* be used to fill in brand new tuples." +"*only* be used to fill in brand new tuples, using it on an existing tuple is " +"thread-unsafe." msgstr "" +#: ../../c-api/tuple.rst:117 ../../c-api/tuple.rst:244 +#: ../../c-api/tuple.rst:262 msgid "" "Bounds checking is performed as an assertion if Python is built in :ref:" "`debug mode ` or :option:`with assertions <--with-assertions>`." msgstr "" +#: ../../c-api/tuple.rst:122 msgid "" -"This function \"steals\" a reference to *o*, and, unlike :c:func:" -"`PyTuple_SetItem`, does *not* discard a reference to any item that is being " -"replaced; any reference in the tuple at position *pos* will be leaked." +"This function \":term:`steals `\" a reference to *o*, and, unlike :c:" +"func:`PyTuple_SetItem`, does *not* discard a reference to any item that is " +"being replaced; any reference in the tuple at position *pos* will be leaked." msgstr "" +#: ../../c-api/tuple.rst:129 msgid "" "This macro should *only* be used on tuples that are newly created. Using " "this macro on a tuple that is already in use (or in other words, has a " "refcount > 1) could lead to undefined behavior." msgstr "" +#: ../../c-api/tuple.rst:136 msgid "" "Can be used to resize a tuple. *newsize* will be the new length of the " "tuple. Because tuples are *supposed* to be immutable, this should only be " @@ -131,50 +172,67 @@ msgid "" "`SystemError`." msgstr "" +#: ../../c-api/tuple.rst:151 msgid "Struct Sequence Objects" msgstr "" +#: ../../c-api/tuple.rst:153 +msgid "" +"A struct sequence object is a :term:`named tuple`, that is, a sequence whose " +"items can also be accessed through attributes. It is similar to :func:" +"`collections.namedtuple`, but provides a slightly different interface." +msgstr "" + +#: ../../c-api/tuple.rst:158 msgid "" -"Struct sequence objects are the C equivalent of :func:`~collections." -"namedtuple` objects, i.e. a sequence whose items can also be accessed " -"through attributes. To create a struct sequence, you first have to create a " -"specific struct sequence type." +"To create a struct sequence, you first have to create a specific struct " +"sequence type." msgstr "" +#: ../../c-api/tuple.rst:163 msgid "" "Create a new struct sequence type from the data in *desc*, described below. " "Instances of the resulting type can be created with :c:func:" "`PyStructSequence_New`." msgstr "" +#: ../../c-api/tuple.rst:166 ../../c-api/tuple.rst:235 msgid "Return ``NULL`` with an exception set on failure." msgstr "" +#: ../../c-api/tuple.rst:171 msgid "Initializes a struct sequence type *type* from *desc* in place." msgstr "" +#: ../../c-api/tuple.rst:176 msgid "" "Like :c:func:`PyStructSequence_InitType`, but returns ``0`` on success and " "``-1`` with an exception set on failure." msgstr "" +#: ../../c-api/tuple.rst:184 msgid "Contains the meta information of a struct sequence type to create." msgstr "" +#: ../../c-api/tuple.rst:188 msgid "" "Fully qualified name of the type; null-terminated UTF-8 encoded. The name " "must contain the module name." msgstr "" +#: ../../c-api/tuple.rst:193 msgid "Pointer to docstring for the type or ``NULL`` to omit." msgstr "" +#: ../../c-api/tuple.rst:197 msgid "Pointer to ``NULL``-terminated array with field names of the new type." msgstr "" +#: ../../c-api/tuple.rst:201 msgid "Number of fields visible to the Python side (if used as tuple)." msgstr "" +#: ../../c-api/tuple.rst:206 msgid "" "Describes a field of a struct sequence. As a struct sequence is modeled as a " "tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:" @@ -183,52 +241,68 @@ msgid "" "described." msgstr "" +#: ../../c-api/tuple.rst:214 msgid "" "Name for the field or ``NULL`` to end the list of named fields, set to :c:" "data:`PyStructSequence_UnnamedField` to leave unnamed." msgstr "" +#: ../../c-api/tuple.rst:219 msgid "Field docstring or ``NULL`` to omit." msgstr "" +#: ../../c-api/tuple.rst:224 msgid "Special value for a field name to leave it unnamed." msgstr "" +#: ../../c-api/tuple.rst:226 msgid "The type was changed from ``char *``." msgstr "" +#: ../../c-api/tuple.rst:232 msgid "" "Creates an instance of *type*, which must have been created with :c:func:" "`PyStructSequence_NewType`." msgstr "" +#: ../../c-api/tuple.rst:240 msgid "" -"Return the object at position *pos* in the struct sequence pointed to by *p*." +"Return the object at position *pos* in the struct sequence pointed to by " +"*p*. The returned reference is borrowed from the struct sequence *p* (that " +"is: it is only valid as long as you hold a reference to *p*)." msgstr "" +#: ../../c-api/tuple.rst:250 msgid "Alias to :c:func:`PyStructSequence_GetItem`." msgstr "" +#: ../../c-api/tuple.rst:252 msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`." msgstr "" +#: ../../c-api/tuple.rst:258 msgid "" "Sets the field at index *pos* of the struct sequence *p* to value *o*. " "Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand " "new instances." msgstr "" -msgid "This function \"steals\" a reference to *o*." +#: ../../c-api/tuple.rst:267 +msgid "This function \":term:`steals `\" a reference to *o*." msgstr "" +#: ../../c-api/tuple.rst:272 msgid "Alias to :c:func:`PyStructSequence_SetItem`." msgstr "" +#: ../../c-api/tuple.rst:274 msgid "Now implemented as an alias to :c:func:`PyStructSequence_SetItem`." msgstr "" +#: ../../c-api/tuple.rst:8 msgid "object" msgstr "" +#: ../../c-api/tuple.rst:8 msgid "tuple" msgstr "" diff --git a/c-api/tuple.po~ b/c-api/tuple.po~ new file mode 100644 index 00000000..0c21bde0 --- /dev/null +++ b/c-api/tuple.po~ @@ -0,0 +1,234 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Tuple Objects" +msgstr "" + +msgid "This subtype of :c:type:`PyObject` represents a Python tuple object." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python tuple type; it " +"is the same object as :class:`tuple` in the Python layer." +msgstr "" + +msgid "" +"Return true if *p* is a tuple object or an instance of a subtype of the " +"tuple type. This function always succeeds." +msgstr "" + +msgid "" +"Return true if *p* is a tuple object, but not an instance of a subtype of " +"the tuple type. This function always succeeds." +msgstr "" + +msgid "" +"Return a new tuple object of size *len*, or ``NULL`` with an exception set " +"on failure." +msgstr "" + +msgid "" +"Return a new tuple object of size *n*, or ``NULL`` with an exception set on " +"failure. The tuple values are initialized to the subsequent *n* C arguments " +"pointing to Python objects. ``PyTuple_Pack(2, a, b)`` is equivalent to " +"``Py_BuildValue(\"(OO)\", a, b)``." +msgstr "" + +msgid "" +"Take a pointer to a tuple object, and return the size of that tuple. On " +"error, return ``-1`` and with an exception set." +msgstr "" + +msgid "Like :c:func:`PyTuple_Size`, but without error checking." +msgstr "" + +msgid "" +"Return the object at position *pos* in the tuple pointed to by *p*. If " +"*pos* is negative or out of bounds, return ``NULL`` and set an :exc:" +"`IndexError` exception." +msgstr "" + +msgid "" +"The returned reference is borrowed from the tuple *p* (that is: it is only " +"valid as long as you hold a reference to *p*). To get a :term:`strong " +"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) ` or :c:" +"func:`PySequence_GetItem`." +msgstr "" + +msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments." +msgstr "" + +msgid "" +"Return the slice of the tuple pointed to by *p* between *low* and *high*, or " +"``NULL`` with an exception set on failure." +msgstr "" + +msgid "" +"This is the equivalent of the Python expression ``p[low:high]``. Indexing " +"from the end of the tuple is not supported." +msgstr "" + +msgid "" +"Insert a reference to object *o* at position *pos* of the tuple pointed to " +"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` " +"and set an :exc:`IndexError` exception." +msgstr "" + +msgid "" +"This function \"steals\" a reference to *o* and discards a reference to an " +"item already in the tuple at the affected position." +msgstr "" + +msgid "" +"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should " +"*only* be used to fill in brand new tuples." +msgstr "" + +msgid "" +"Bounds checking is performed as an assertion if Python is built in :ref:" +"`debug mode ` or :option:`with assertions <--with-assertions>`." +msgstr "" + +msgid "" +"This function \"steals\" a reference to *o*, and, unlike :c:func:" +"`PyTuple_SetItem`, does *not* discard a reference to any item that is being " +"replaced; any reference in the tuple at position *pos* will be leaked." +msgstr "" + +msgid "" +"This macro should *only* be used on tuples that are newly created. Using " +"this macro on a tuple that is already in use (or in other words, has a " +"refcount > 1) could lead to undefined behavior." +msgstr "" + +msgid "" +"Can be used to resize a tuple. *newsize* will be the new length of the " +"tuple. Because tuples are *supposed* to be immutable, this should only be " +"used if there is only one reference to the object. Do *not* use this if the " +"tuple may already be known to some other part of the code. The tuple will " +"always grow or shrink at the end. Think of this as destroying the old tuple " +"and creating a new one, only more efficiently. Returns ``0`` on success. " +"Client code should never assume that the resulting value of ``*p`` will be " +"the same as before calling this function. If the object referenced by ``*p`` " +"is replaced, the original ``*p`` is destroyed. On failure, returns ``-1`` " +"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` or :exc:" +"`SystemError`." +msgstr "" + +msgid "Struct Sequence Objects" +msgstr "" + +msgid "" +"Struct sequence objects are the C equivalent of :func:`~collections." +"namedtuple` objects, i.e. a sequence whose items can also be accessed " +"through attributes. To create a struct sequence, you first have to create a " +"specific struct sequence type." +msgstr "" + +msgid "" +"Create a new struct sequence type from the data in *desc*, described below. " +"Instances of the resulting type can be created with :c:func:" +"`PyStructSequence_New`." +msgstr "" + +msgid "Return ``NULL`` with an exception set on failure." +msgstr "" + +msgid "Initializes a struct sequence type *type* from *desc* in place." +msgstr "" + +msgid "" +"Like :c:func:`PyStructSequence_InitType`, but returns ``0`` on success and " +"``-1`` with an exception set on failure." +msgstr "" + +msgid "Contains the meta information of a struct sequence type to create." +msgstr "" + +msgid "" +"Fully qualified name of the type; null-terminated UTF-8 encoded. The name " +"must contain the module name." +msgstr "" + +msgid "Pointer to docstring for the type or ``NULL`` to omit." +msgstr "" + +msgid "Pointer to ``NULL``-terminated array with field names of the new type." +msgstr "" + +msgid "Number of fields visible to the Python side (if used as tuple)." +msgstr "" + +msgid "" +"Describes a field of a struct sequence. As a struct sequence is modeled as a " +"tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:" +"member:`~PyStructSequence_Desc.fields` array of the :c:type:" +"`PyStructSequence_Desc` determines which field of the struct sequence is " +"described." +msgstr "" + +msgid "" +"Name for the field or ``NULL`` to end the list of named fields, set to :c:" +"data:`PyStructSequence_UnnamedField` to leave unnamed." +msgstr "" + +msgid "Field docstring or ``NULL`` to omit." +msgstr "" + +msgid "Special value for a field name to leave it unnamed." +msgstr "" + +msgid "The type was changed from ``char *``." +msgstr "" + +msgid "" +"Creates an instance of *type*, which must have been created with :c:func:" +"`PyStructSequence_NewType`." +msgstr "" + +msgid "" +"Return the object at position *pos* in the struct sequence pointed to by *p*." +msgstr "" + +msgid "Alias to :c:func:`PyStructSequence_GetItem`." +msgstr "" + +msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`." +msgstr "" + +msgid "" +"Sets the field at index *pos* of the struct sequence *p* to value *o*. " +"Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand " +"new instances." +msgstr "" + +msgid "This function \"steals\" a reference to *o*." +msgstr "" + +msgid "Alias to :c:func:`PyStructSequence_SetItem`." +msgstr "" + +msgid "Now implemented as an alias to :c:func:`PyStructSequence_SetItem`." +msgstr "" + +msgid "object" +msgstr "" + +msgid "tuple" +msgstr "" diff --git a/c-api/type.po b/c-api/type.po index 5fcb76ef..941a8214 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -11,42 +11,49 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/type.rst:6 msgid "Type Objects" msgstr "" +#: ../../c-api/type.rst:13 msgid "The C structure of the objects used to describe built-in types." msgstr "" +#: ../../c-api/type.rst:18 msgid "" "This is the type object for type objects; it is the same object as :class:" "`type` in the Python layer." msgstr "" +#: ../../c-api/type.rst:24 msgid "" "Return non-zero if the object *o* is a type object, including instances of " "types derived from the standard type object. Return 0 in all other cases. " "This function always succeeds." msgstr "" +#: ../../c-api/type.rst:31 msgid "" "Return non-zero if the object *o* is a type object, but not a subtype of the " "standard type object. Return 0 in all other cases. This function always " "succeeds." msgstr "" +#: ../../c-api/type.rst:38 msgid "Clear the internal lookup cache. Return the current version tag." msgstr "" +#: ../../c-api/type.rst:42 msgid "" "Return the :c:member:`~PyTypeObject.tp_flags` member of *type*. This " "function is primarily meant for use with ``Py_LIMITED_API``; the individual " @@ -55,9 +62,11 @@ msgid "" "API `." msgstr "" +#: ../../c-api/type.rst:49 msgid "The return type is now ``unsigned long`` rather than ``long``." msgstr "" +#: ../../c-api/type.rst:55 msgid "" "Return the type object's internal namespace, which is otherwise only exposed " "via a read-only proxy (:attr:`cls.__dict__ `). This is a " @@ -65,23 +74,27 @@ msgid "" "returned dictionary must be treated as read-only." msgstr "" +#: ../../c-api/type.rst:61 msgid "" "This function is meant for specific embedding and language-binding cases, " "where direct access to the dict is necessary and indirect access (e.g. via " "the proxy or :c:func:`PyObject_GetAttr`) isn't adequate." msgstr "" +#: ../../c-api/type.rst:65 msgid "" "Extension modules should continue to use ``tp_dict``, directly or " "indirectly, when setting up their own types." msgstr "" +#: ../../c-api/type.rst:73 msgid "" "Invalidate the internal lookup cache for the type and all of its subtypes. " "This function must be called after any manual modification of the attributes " "or base classes of the type." msgstr "" +#: ../../c-api/type.rst:80 msgid "" "Register *callback* as a type watcher. Return a non-negative integer ID " "which must be passed to future calls to :c:func:`PyType_Watch`. In case of " @@ -89,23 +102,27 @@ msgid "" "exception." msgstr "" +#: ../../c-api/type.rst:85 msgid "" "In free-threaded builds, :c:func:`PyType_AddWatcher` is not thread-safe, so " "it must be called at start up (before spawning the first thread)." msgstr "" +#: ../../c-api/type.rst:93 msgid "" "Clear watcher identified by *watcher_id* (previously returned from :c:func:" "`PyType_AddWatcher`). Return ``0`` on success, ``-1`` on error (e.g. if " "*watcher_id* was never registered.)" msgstr "" +#: ../../c-api/type.rst:97 msgid "" "An extension should never call ``PyType_ClearWatcher`` with a *watcher_id* " "that was not returned to it by a previous call to :c:func:" "`PyType_AddWatcher`." msgstr "" +#: ../../c-api/type.rst:106 msgid "" "Mark *type* as watched. The callback granted *watcher_id* by :c:func:" "`PyType_AddWatcher` will be called whenever :c:func:`PyType_Modified` " @@ -115,39 +132,102 @@ msgid "" "detail and subject to change.)" msgstr "" +#: ../../c-api/type.rst:113 +msgid "The callback is also invoked when a watched heap type is deallocated." +msgstr "" + +#: ../../c-api/type.rst:115 msgid "" "An extension should never call ``PyType_Watch`` with a *watcher_id* that was " "not returned to it by a previous call to :c:func:`PyType_AddWatcher`." msgstr "" +#: ../../c-api/type.rst:120 +msgid "" +"The callback is now also invoked when a watched heap type is deallocated." +msgstr "" + +#: ../../c-api/type.rst:126 +msgid "" +"Mark *type* as not watched. This undoes a previous call to :c:func:" +"`PyType_Watch`. *type* must not be ``NULL``." +msgstr "" + +#: ../../c-api/type.rst:129 +msgid "" +"An extension should never call this function with a *watcher_id* that was " +"not returned to it by a previous call to :c:func:`PyType_AddWatcher`." +msgstr "" + +#: ../../c-api/type.rst:132 +msgid "" +"On success, this function returns ``0``. On failure, this function returns " +"``-1`` with an exception set." +msgstr "" + +#: ../../c-api/type.rst:140 msgid "Type of a type-watcher callback function." msgstr "" +#: ../../c-api/type.rst:142 msgid "" "The callback must not modify *type* or cause :c:func:`PyType_Modified` to be " "called on *type* or any type in its MRO; violating this rule could cause " "infinite recursion." msgstr "" +#: ../../c-api/type.rst:146 +msgid "" +"The callback may be called during type deallocation. In this case, the type " +"object is temporarily resurrected (its reference count is at least 1) and " +"all its attributes are still valid. However, the callback should not store " +"new strong references to the type, as this would resurrect the object and " +"prevent its deallocation." +msgstr "" + +#: ../../c-api/type.rst:154 +msgid "" +"The callback may now be called during deallocation of a watched heap type." +msgstr "" + +#: ../../c-api/type.rst:160 msgid "" "Return non-zero if the type object *o* sets the feature *feature*. Type " "features are denoted by single bit flags." msgstr "" +#: ../../c-api/type.rst:166 +msgid "" +"Return non-zero if the type object *type* sets the subclass flag *flag*. " +"Subclass flags are denoted by :c:macro:`Py_TPFLAGS_*_SUBCLASS " +"`. This function is used by many ``_Check`` " +"functions for common types." +msgstr "" + +#: ../../c-api/type.rst:172 +msgid "" +":c:func:`PyObject_TypeCheck`, which is used as a slower alternative in " +"``_Check`` functions for types that don't come with subclass flags." +msgstr "" + +#: ../../c-api/type.rst:178 msgid "" "Return true if the type object includes support for the cycle detector; this " "tests the type flag :c:macro:`Py_TPFLAGS_HAVE_GC`." msgstr "" +#: ../../c-api/type.rst:184 msgid "Return true if *a* is a subtype of *b*." msgstr "" +#: ../../c-api/type.rst:186 msgid "" "This function only checks for actual subtypes, which means that :meth:`~type." "__subclasscheck__` is not called on *b*. Call :c:func:`PyObject_IsSubclass` " "to do the same check that :func:`issubclass` would do." msgstr "" +#: ../../c-api/type.rst:194 msgid "" "Generic handler for the :c:member:`~PyTypeObject.tp_alloc` slot of a type " "object. Uses Python's default memory allocation mechanism to allocate " @@ -155,11 +235,13 @@ msgid "" "if by calling :c:func:`PyObject_Init` or :c:func:`PyObject_InitVar`." msgstr "" +#: ../../c-api/type.rst:199 msgid "" "Do not call this directly to allocate memory for an object; call the type's :" "c:member:`~PyTypeObject.tp_alloc` slot instead." msgstr "" +#: ../../c-api/type.rst:202 msgid "" "For types that support garbage collection (i.e., the :c:macro:" "`Py_TPFLAGS_HAVE_GC` flag is set), this function behaves like :c:macro:" @@ -171,12 +253,14 @@ msgid "" "paired with :c:func:`PyObject_Free` in :c:member:`~PyTypeObject.tp_free`." msgstr "" +#: ../../c-api/type.rst:215 msgid "" "Generic handler for the :c:member:`~PyTypeObject.tp_new` slot of a type " "object. Creates a new instance using the type's :c:member:`~PyTypeObject." "tp_alloc` slot and returns the resulting object." msgstr "" +#: ../../c-api/type.rst:222 msgid "" "Finalize a type object. This should be called on all type objects to finish " "their initialization. This function is responsible for adding inherited " @@ -184,6 +268,7 @@ msgid "" "and sets an exception on error." msgstr "" +#: ../../c-api/type.rst:228 msgid "" "If some of the base classes implements the GC protocol and the provided type " "does not include the :c:macro:`Py_TPFLAGS_HAVE_GC` in its flags, then the GC " @@ -194,27 +279,32 @@ msgid "" "handle." msgstr "" +#: ../../c-api/type.rst:239 msgid "" "Return the type's name. Equivalent to getting the type's :attr:`~type." "__name__` attribute." msgstr "" +#: ../../c-api/type.rst:247 msgid "" "Return the type's qualified name. Equivalent to getting the type's :attr:" "`~type.__qualname__` attribute." msgstr "" +#: ../../c-api/type.rst:254 msgid "" "Return the type's fully qualified name. Equivalent to ``f\"{type.__module__}." "{type.__qualname__}\"``, or :attr:`type.__qualname__` if :attr:`type." "__module__` is not a string or is equal to ``\"builtins\"``." msgstr "" +#: ../../c-api/type.rst:263 msgid "" "Return the type's module name. Equivalent to getting the :attr:`type." "__module__` attribute." msgstr "" +#: ../../c-api/type.rst:271 msgid "" "Return the function pointer stored in the given slot. If the result is " "``NULL``, this indicates that either the slot is ``NULL``, or that the " @@ -222,55 +312,72 @@ msgid "" "result pointer into the appropriate function type." msgstr "" +#: ../../c-api/type.rst:277 msgid "" "See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument." msgstr "" +#: ../../c-api/type.rst:281 msgid "" ":c:func:`PyType_GetSlot` can now accept all types. Previously, it was " "limited to :ref:`heap types `." msgstr "" +#: ../../c-api/type.rst:288 msgid "" "Return the module object associated with the given type when the type was " "created using :c:func:`PyType_FromModuleAndSpec`." msgstr "" +#: ../../c-api/type.rst:291 ../../c-api/type.rst:355 +msgid "" +"The returned reference is :term:`borrowed ` from *type*, " +"and will be valid as long as you hold a reference to *type*. Do not release " +"it with :c:func:`Py_DECREF` or similar." +msgstr "" + +#: ../../c-api/type.rst:295 ../../c-api/type.rst:316 msgid "" "If no module is associated with the given type, sets :py:class:`TypeError` " "and returns ``NULL``." msgstr "" +#: ../../c-api/type.rst:298 msgid "" "This function is usually used to get the module in which a method is " "defined. Note that in such a method, ``PyType_GetModule(Py_TYPE(self))`` may " "not return the intended result. ``Py_TYPE(self)`` may be a *subclass* of the " "intended class, and subclasses are not necessarily defined in the same " "module as their superclass. See :c:type:`PyCMethod` to get the class that " -"defines the method. See :c:func:`PyType_GetModuleByDef` for cases when :c:" +"defines the method. See :c:func:`PyType_GetModuleByToken` for cases when :c:" "type:`!PyCMethod` cannot be used." msgstr "" +#: ../../c-api/type.rst:312 msgid "" "Return the state of the module object associated with the given type. This " "is a shortcut for calling :c:func:`PyModule_GetState()` on the result of :c:" "func:`PyType_GetModule`." msgstr "" +#: ../../c-api/type.rst:319 msgid "" "If the *type* has an associated module but its state is ``NULL``, returns " "``NULL`` without setting an exception." msgstr "" +#: ../../c-api/type.rst:327 msgid "" -"Find the first superclass whose module was created from the given :c:type:" -"`PyModuleDef` *def*, and return that module." +"Find the first superclass whose module has the given :ref:`module token `, and return that module." msgstr "" +#: ../../c-api/type.rst:330 msgid "" "If no module is found, raises a :py:class:`TypeError` and returns ``NULL``." msgstr "" +#: ../../c-api/type.rst:332 msgid "" "This function is intended to be used together with :c:func:" "`PyModule_GetState()` to get module state from slot methods (such as :c:" @@ -279,89 +386,106 @@ msgid "" "type:`PyCMethod` calling convention." msgstr "" +#: ../../c-api/type.rst:343 msgid "" -"The returned reference is :term:`borrowed ` from *type*, " -"and will be valid as long as you hold a reference to *type*. Do not release " -"it with :c:func:`Py_DECREF` or similar." +"Find the first superclass whose module was created from the given :c:type:" +"`PyModuleDef` *def*, or whose :ref:`module token ` is " +"equal to *def*, and return that module." +msgstr "" + +#: ../../c-api/type.rst:347 +msgid "" +"Note that modules created from a :c:type:`PyModuleDef` always have their " +"token set to the :c:type:`PyModuleDef`'s address. In other words, this " +"function is equivalent to :c:func:`PyType_GetModuleByToken`, except that it:" +msgstr "" + +#: ../../c-api/type.rst:352 +msgid "returns a borrowed reference, and" +msgstr "" + +#: ../../c-api/type.rst:353 +msgid "" +"has a non-``void*`` argument type (which is a cosmetic difference in C)." msgstr "" +#: ../../c-api/type.rst:364 msgid "" "Find the first superclass in *type*'s :term:`method resolution order` whose :" -"c:macro:`Py_tp_token` token is equal to the given one." +"c:macro:`Py_tp_token` token is equal to *tp_token*." msgstr "" +#: ../../c-api/type.rst:367 msgid "" "If found, set *\\*result* to a new :term:`strong reference` to it and return " "``1``." msgstr "" +#: ../../c-api/type.rst:369 msgid "If not found, set *\\*result* to ``NULL`` and return ``0``." msgstr "" +#: ../../c-api/type.rst:370 msgid "" "On error, set *\\*result* to ``NULL`` and return ``-1`` with an exception " "set." msgstr "" +#: ../../c-api/type.rst:373 msgid "" "The *result* argument may be ``NULL``, in which case *\\*result* is not set. " "Use this if you need only the return value." msgstr "" -msgid "The *token* argument may not be ``NULL``." +#: ../../c-api/type.rst:376 +msgid "The *tp_token* argument may not be ``NULL``." msgstr "" +#: ../../c-api/type.rst:383 msgid "Attempt to assign a version tag to the given type." msgstr "" +#: ../../c-api/type.rst:385 msgid "" "Returns 1 if the type already had a valid version tag or a new one was " "assigned, or 0 if a new tag could not be assigned." msgstr "" -msgid "Creating Heap-Allocated Types" -msgstr "" - +#: ../../c-api/type.rst:393 msgid "" -"The following functions and structs are used to create :ref:`heap types " -"`." +"Return true if instances of *type* support creating weak references, false " +"otherwise. This function always succeeds. *type* must not be ``NULL``." msgstr "" -msgid "" -"Create and return a :ref:`heap type ` from the *spec* (see :c:" -"macro:`Py_TPFLAGS_HEAPTYPE`)." +#: ../../c-api/type.rst:397 +msgid ":ref:`weakrefobjects`" msgstr "" -msgid "" -"The metaclass *metaclass* is used to construct the resulting type object. " -"When *metaclass* is ``NULL``, the metaclass is derived from *bases* (or " -"*Py_tp_base[s]* slots if *bases* is ``NULL``, see below)." +#: ../../c-api/type.rst:398 +msgid ":py:mod:`weakref`" msgstr "" -msgid "" -"Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not " -"supported, except if ``tp_new`` is ``NULL``." +#: ../../c-api/type.rst:404 +msgid "Creating Heap-Allocated Types" msgstr "" +#: ../../c-api/type.rst:406 msgid "" -"The *bases* argument can be used to specify base classes; it can either be " -"only one class or a tuple of classes. If *bases* is ``NULL``, the " -"*Py_tp_bases* slot is used instead. If that also is ``NULL``, the " -"*Py_tp_base* slot is used instead. If that also is ``NULL``, the new type " -"derives from :class:`object`." +"The following function is used to create :ref:`heap types `:" msgstr "" +#: ../../c-api/type.rst:410 msgid "" -"The *module* argument can be used to record the module in which the new " -"class is defined. It must be a module object or ``NULL``. If not ``NULL``, " -"the module is associated with the new type and can later be retrieved with :" -"c:func:`PyType_GetModule`. The associated module is not inherited by " -"subclasses; it must be specified for each class individually." +"Create and return a :ref:`heap type ` from a :c:type:`!PySlot` " +"array. See :ref:`capi-slots` for general information on slots, and :ref:" +"`pyslot_type_slot_ids` for slots specific to type creation." msgstr "" +#: ../../c-api/type.rst:415 ../../c-api/type.rst:819 msgid "This function calls :c:func:`PyType_Ready` on the new type." msgstr "" +#: ../../c-api/type.rst:417 msgid "" "Note that this function does *not* fully match the behavior of calling :py:" "class:`type() ` or using the :keyword:`class` statement. With user-" @@ -370,294 +494,739 @@ msgid "" "Specifically:" msgstr "" +#: ../../c-api/type.rst:424 msgid "" ":py:meth:`~object.__new__` is not called on the new class (and it must be " "set to ``type.__new__``)." msgstr "" +#: ../../c-api/type.rst:426 msgid ":py:meth:`~object.__init__` is not called on the new class." msgstr "" +#: ../../c-api/type.rst:427 msgid ":py:meth:`~object.__init_subclass__` is not called on any bases." msgstr "" +#: ../../c-api/type.rst:428 msgid ":py:meth:`~object.__set_name__` is not called on new descriptors." msgstr "" -msgid "Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``." +#: ../../c-api/type.rst:430 +msgid "" +"Slots are typically defined as a global static constant arrays. However, " +"sometimes slot values are not statically known at compile time. For example, " +"slots like :c:data:`Py_tp_bases`, :c:data:`Py_tp_metaclass` and :c:data:" +"`Py_tp_module` require live Python objects. In this case, it is recommended " +"to put such slots on the stack, and use :c:macro:`Py_slot_subslots` to refer " +"to an array of static slots. For example::" msgstr "" +#: ../../c-api/type.rst:438 msgid "" -"The function now accepts a single class as the *bases* argument and ``NULL`` " -"as the ``tp_doc`` slot." +"static const PySlot my_slots[] = {\n" +" PySlot_STATIC_DATA(Py_tp_name, \"MyClass\"),\n" +" PySlot_FUNC(Py_tp_repr, my_repr_func),\n" +" ...\n" +" PySlot_END\n" +"};\n" +"\n" +"PyObject *make_my_class(PyObject *module) {\n" +" PySlot all_slots[] = {\n" +" PySlot_STATIC_DATA(Py_slot_subslots, my_slots),\n" +" PySlot_DATA(Py_tp_module, module),\n" +" PySlot_END\n" +" };\n" +" return PyType_FromSlots(all_slots);\n" +"}" msgstr "" +#: ../../c-api/type.rst:454 msgid "" -"The function now finds and uses a metaclass corresponding to the provided " -"base classes. Previously, only :class:`type` instances were returned." +"Heap types created without the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag may " +"be modified, for example by setting attributes on them, as with classes " +"defined in Python code. Sometimes, such modifications are necessary to fully " +"initialize a type, but you may wish to prevent users from changing the type " +"after the initialization is done:" msgstr "" +#: ../../c-api/type.rst:463 msgid "" -"The :c:member:`~PyTypeObject.tp_new` of the metaclass is *ignored*. which " -"may result in incomplete initialization. Creating classes whose metaclass " -"overrides :c:member:`~PyTypeObject.tp_new` is deprecated." +"Make a type immutable: set the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag." msgstr "" +#: ../../c-api/type.rst:465 +msgid "All base classes of *type* must be immutable." +msgstr "" + +#: ../../c-api/type.rst:467 +msgid "On success, return ``0``. On error, set an exception and return ``-1``." +msgstr "" + +#: ../../c-api/type.rst:470 msgid "" -"Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " -"is no longer allowed." +"The type must not be used before it's made immutable. For example, type " +"instances must not be created before the type is made immutable." msgstr "" -msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``." +#: ../../c-api/type.rst:479 +msgid "Type slot IDs" msgstr "" -msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``." +#: ../../c-api/type.rst:481 +msgid "" +"Most type slot IDs are named like the field names of the structures :c:type:" +"`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:" +"type:`PyMappingMethods` and :c:type:`PyAsyncMethods` with an added ``Py_`` " +"prefix. For example, use:" +msgstr "" + +#: ../../c-api/type.rst:487 +msgid ":c:data:`Py_tp_dealloc` to set :c:member:`PyTypeObject.tp_dealloc`" msgstr "" +#: ../../c-api/type.rst:488 +msgid ":c:data:`Py_nb_add` to set :c:member:`PyNumberMethods.nb_add`" +msgstr "" + +#: ../../c-api/type.rst:489 +msgid ":c:data:`Py_sq_length` to set :c:member:`PySequenceMethods.sq_length`" +msgstr "" + +#: ../../c-api/type.rst:491 msgid "" -"The function now finds and uses a metaclass corresponding to the base " -"classes provided in *Py_tp_base[s]* slots. Previously, only :class:`type` " -"instances were returned." +"The following slots need additional considerations when specified as slots:" msgstr "" +#: ../../c-api/type.rst:493 +msgid ":c:data:`Py_tp_name`" +msgstr "" + +#: ../../c-api/type.rst:494 +msgid ":c:data:`Py_tp_basicsize` and :c:data:`Py_tp_extra_basicsize`" +msgstr "" + +#: ../../c-api/type.rst:495 +msgid ":c:data:`Py_tp_itemsize`" +msgstr "" + +#: ../../c-api/type.rst:496 +msgid ":c:data:`Py_tp_flags`" +msgstr "" + +#: ../../c-api/type.rst:498 msgid "" -"Make a type immutable: set the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag." +"Additional slots do not directly correspond to a :c:type:`!PyTypeObject` " +"struct field:" msgstr "" -msgid "All base classes of *type* must be immutable." +#: ../../c-api/type.rst:501 +msgid ":c:data:`Py_tp_token`" msgstr "" -msgid "On success, return ``0``. On error, set an exception and return ``-1``." +#: ../../c-api/type.rst:502 +msgid ":c:data:`Py_tp_metaclass`" +msgstr "" + +#: ../../c-api/type.rst:503 +msgid ":c:data:`Py_tp_module`" msgstr "" +#: ../../c-api/type.rst:505 msgid "" -"The type must not be used before it's made immutable. For example, type " -"instances must not be created before the type is made immutable." +"The following “offset” fields cannot be set using :c:type:`PyType_Slot`:" msgstr "" -msgid "Structure defining a type's behavior." +#: ../../c-api/type.rst:507 +msgid "" +":c:member:`~PyTypeObject.tp_weaklistoffset` (use :c:macro:" +"`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)" msgstr "" -msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." +#: ../../c-api/type.rst:509 +msgid "" +":c:member:`~PyTypeObject.tp_dictoffset` (use :c:macro:" +"`Py_TPFLAGS_MANAGED_DICT` instead if possible)" msgstr "" +#: ../../c-api/type.rst:511 msgid "" -"If positive, specifies the size of the instance in bytes. It is used to set :" -"c:member:`PyTypeObject.tp_basicsize`." +":c:member:`~PyTypeObject.tp_vectorcall_offset` (use " +"``\"__vectorcalloffset__\"`` in :ref:`PyMemberDef `)" msgstr "" +#: ../../c-api/type.rst:514 msgid "" -"If zero, specifies that :c:member:`~PyTypeObject.tp_basicsize` should be " -"inherited." +"If it is not possible to switch to a ``MANAGED`` flag (for example, for " +"vectorcall or to support Python older than 3.12), specify the offset in :c:" +"data:`Py_tp_members`. See :ref:`PyMemberDef documentation ` for details." msgstr "" +#: ../../c-api/type.rst:520 msgid "" -"If negative, the absolute value specifies how much space instances of the " -"class need *in addition* to the superclass. Use :c:func:" -"`PyObject_GetTypeData` to get a pointer to subclass-specific memory reserved " -"this way. For negative :c:member:`!basicsize`, Python will insert padding " -"when needed to meet :c:member:`~PyTypeObject.tp_basicsize`'s alignment " -"requirements." +"The following internal fields cannot be set at all when creating a heap type:" msgstr "" -msgid "Previously, this field could not be negative." +#: ../../c-api/type.rst:523 +msgid "" +":c:member:`~PyTypeObject.tp_dict`, :c:member:`~PyTypeObject.tp_mro`, :c:" +"member:`~PyTypeObject.tp_cache`, :c:member:`~PyTypeObject.tp_subclasses`, " +"and :c:member:`~PyTypeObject.tp_weaklist`." msgstr "" +#: ../../c-api/type.rst:529 msgid "" -"Size of one element of a variable-size type, in bytes. Used to set :c:member:" -"`PyTypeObject.tp_itemsize`. See ``tp_itemsize`` documentation for caveats." +"The :c:data:`Py_tp_base` slot is equivalent to :c:data:`Py_tp_bases`; both " +"may be set either to a type or a tuple of types. If both are specified, the " +"value of :c:data:`Py_tp_bases` is used." +msgstr "" + +#: ../../c-api/type.rst:534 +msgid "Slot values may not be ``NULL``, except for the following:" msgstr "" +#: ../../c-api/type.rst:536 +msgid ":c:data:`Py_tp_doc`" +msgstr "" + +#: ../../c-api/type.rst:537 msgid "" -"If zero, :c:member:`~PyTypeObject.tp_itemsize` is inherited. Extending " -"arbitrary variable-sized classes is dangerous, since some types use a fixed " -"offset for variable-sized memory, which can then overlap fixed-sized memory " -"used by a subclass. To help prevent mistakes, inheriting ``itemsize`` is " -"only possible in the following situations:" +":c:data:`Py_tp_token` (for clarity, prefer :c:data:`Py_TP_USE_SPEC` rather " +"than ``NULL``)" msgstr "" +#: ../../c-api/type.rst:540 +msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." +msgstr "" + +#: ../../c-api/type.rst:543 msgid "" -"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)." +":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs." +"bf_releasebuffer` are now available under the :ref:`limited API `." msgstr "" +#: ../../c-api/type.rst:548 msgid "" -"The requested :c:member:`PyType_Spec.basicsize` is positive, suggesting that " -"the memory layout of the base class is known." +"The field :c:member:`~PyTypeObject.tp_vectorcall` can now be set using :c:" +"data:`Py_tp_vectorcall`. See the field's documentation for details." msgstr "" +#: ../../c-api/type.rst:553 msgid "" -"The requested :c:member:`PyType_Spec.basicsize` is zero, suggesting that the " -"subclass does not access the instance's memory directly." +"The :c:data:`Py_tp_bases` slot may be set to a single type object, making it " +"equivalent to the :c:data:`Py_tp_base` slot. Previously, a tuple of types " +"was required." msgstr "" -msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." +#: ../../c-api/type.rst:558 +msgid "" +"The following slots correspond to fields in the underlying type structure, " +"but need extra remarks for use as slots:" msgstr "" -msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." +#: ../../c-api/type.rst:563 +msgid "" +":c:member:`Slot ID ` for the name of the type, used to set :c:" +"member:`PyTypeObject.tp_name`." msgstr "" +#: ../../c-api/type.rst:566 msgid "" -"If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:" -"`PyType_FromSpecWithBases` sets it automatically." +"This slot (or :c:member:`PyType_Spec.name`) is required to create a type." msgstr "" +#: ../../c-api/type.rst:568 msgid "" -"Array of :c:type:`PyType_Slot` structures. Terminated by the special slot " -"value ``{0, NULL}``." +"This may not be used in :c:member:`PyType_Spec.slots`. Use :c:member:" +"`PyType_Spec.name` instead." msgstr "" -msgid "Each slot ID should be specified at most once." +#: ../../c-api/type.rst:573 +msgid "" +"CPython processes slots in order. It is recommended to put ``Py_tp_name`` at " +"the beginning of the slots array, so that if processing of a later slots " +"fails, error messages can include the name." msgstr "" +#: ../../c-api/type.rst:582 msgid "" -"Structure defining optional functionality of a type, containing a slot ID " -"and a value pointer." +":c:member:`Slot ID ` for the size of the instance in bytes. It " +"is used to set :c:member:`PyTypeObject.tp_basicsize`." msgstr "" -msgid "A slot ID." +#: ../../c-api/type.rst:585 ../../c-api/type.rst:632 +msgid "The value must be positive." msgstr "" +#: ../../c-api/type.rst:587 msgid "" -"Slot IDs are named like the field names of the structures :c:type:" -"`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:" -"type:`PyMappingMethods` and :c:type:`PyAsyncMethods` with an added ``Py_`` " -"prefix. For example, use:" +"This may not be used in :c:member:`PyType_Spec.slots`. Use :c:member:" +"`PyType_Spec.basicsize` instead." msgstr "" -msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`" +#: ../../c-api/type.rst:590 +msgid "" +"This slot may not be used with :c:func:`PyType_GetSlot`. Use :c:member:" +"`PyTypeObject.tp_basicsize` instead if needed, but be aware that a type's " +"size is often considered an implementation detail." msgstr "" -msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`" +#: ../../c-api/type.rst:598 +msgid "" +":c:member:`Slot ID ` for type data size in bytes, that is, how " +"much space instances of the class need *in addition* to space needed for " +"superclasses." msgstr "" -msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`" +#: ../../c-api/type.rst:602 +msgid "" +"The value is used, together with the size of superclasses, to set :c:member:" +"`PyTypeObject.tp_basicsize`. Python will insert padding as needed to meet :c:" +"member:`!tp_basicsize`'s alignment requirements." msgstr "" +#: ../../c-api/type.rst:607 msgid "" -"An additional slot is supported that does not correspond to a :c:type:`!" -"PyTypeObject` struct field:" +"Use :c:func:`PyObject_GetTypeData` to get a pointer to subclass-specific " +"memory reserved this way." msgstr "" -msgid ":c:data:`Py_tp_token`" +#: ../../c-api/type.rst:610 +msgid "" +"The value must be positive. To specify that instances need no additional " +"size (that is, size should be inherited), omit the :c:macro:`!" +"Py_tp_extra_basicsize` slot rather than set it to zero." msgstr "" +#: ../../c-api/type.rst:615 msgid "" -"The following “offset” fields cannot be set using :c:type:`PyType_Slot`:" +"Specifying both :c:macro:`Py_tp_basicsize` and :c:macro:`!" +"Py_tp_extra_basicsize` is an error." msgstr "" +#: ../../c-api/type.rst:618 ../../c-api/type.rst:665 msgid "" -":c:member:`~PyTypeObject.tp_weaklistoffset` (use :c:macro:" -"`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)" +"This may not be used in :c:member:`PyType_Spec.slots`. Use negative :c:" +"member:`PyType_Spec.basicsize` instead." msgstr "" +#: ../../c-api/type.rst:621 ../../c-api/type.rst:653 +msgid "This slot may not be used with :c:func:`PyType_GetSlot`." +msgstr "" + +#: ../../c-api/type.rst:627 msgid "" -":c:member:`~PyTypeObject.tp_dictoffset` (use :c:macro:" -"`Py_TPFLAGS_MANAGED_DICT` instead if possible)" +":c:member:`Slot ID ` for the size of one element of a variable-" +"size type, in bytes. Used to set :c:member:`PyTypeObject.tp_itemsize`. See :" +"c:member:`!tp_itemsize` documentation for caveats." msgstr "" +#: ../../c-api/type.rst:634 msgid "" -":c:member:`~PyTypeObject.tp_vectorcall_offset` (use " -"``\"__vectorcalloffset__\"`` in :ref:`PyMemberDef `)" +"If this slot is missing, :c:member:`~PyTypeObject.tp_itemsize` is inherited. " +"Extending arbitrary variable-sized classes is dangerous, since some types " +"use a fixed offset for variable-sized memory, which can then overlap fixed-" +"sized memory used by a subclass. To help prevent mistakes, inheriting " +"``itemsize`` is only possible in the following situations:" msgstr "" +#: ../../c-api/type.rst:641 msgid "" -"If it is not possible to switch to a ``MANAGED`` flag (for example, for " -"vectorcall or to support Python older than 3.12), specify the offset in :c:" -"member:`Py_tp_members `. See :ref:`PyMemberDef " -"documentation ` for details." +"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize` is " +"zero)." msgstr "" +#: ../../c-api/type.rst:643 msgid "" -"The following internal fields cannot be set at all when creating a heap type:" +"The requested :c:member:`PyType_Spec.basicsize` is positive, suggesting that " +"the memory layout of the base class is known." msgstr "" +#: ../../c-api/type.rst:645 msgid "" -":c:member:`~PyTypeObject.tp_dict`, :c:member:`~PyTypeObject.tp_mro`, :c:" -"member:`~PyTypeObject.tp_cache`, :c:member:`~PyTypeObject.tp_subclasses`, " -"and :c:member:`~PyTypeObject.tp_weaklist`." +"The requested :c:member:`PyType_Spec.basicsize` is zero, suggesting that the " +"subclass does not access the instance's memory directly." +msgstr "" + +#: ../../c-api/type.rst:648 +msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." msgstr "" +#: ../../c-api/type.rst:650 msgid "" -"Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be problematic on " -"some platforms. To avoid issues, use the *bases* argument of :c:func:" -"`PyType_FromSpecWithBases` instead." +"This may not be used in :c:member:`PyType_Spec.slots`. Use :c:member:" +"`PyType_Spec.itemsize` instead." msgstr "" -msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." +#: ../../c-api/type.rst:659 +msgid "" +":c:member:`Slot ID ` for type flags, used to set :c:member:" +"`PyTypeObject.tp_flags`." msgstr "" +#: ../../c-api/type.rst:662 msgid "" -":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs." -"bf_releasebuffer` are now available under the :ref:`limited API `." +"The ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:" +"`PyType_FromSpecWithBases` sets it automatically." +msgstr "" + +#: ../../c-api/type.rst:668 +msgid "" +"This slot may not be used with :c:func:`PyType_GetSlot`. Use :c:func:" +"`PyType_GetFlags` instead." +msgstr "" + +#: ../../c-api/type.rst:675 +msgid "" +":c:member:`Slot ID ` for type flags, used to set :c:member:" +"`PyTypeObject.tp_bases`." msgstr "" +#: ../../c-api/type.rst:678 msgid "" -"The field :c:member:`~PyTypeObject.tp_vectorcall` can now set using " -"``Py_tp_vectorcall``. See the field's documentation for details." +"The slot can be set to a tuple of type objects which the newly created type " +"should inherit from, like the \"positional arguments\" of a Python :ref:" +"`class definition `." msgstr "" +#: ../../c-api/type.rst:682 msgid "" -"The desired value of the slot. In most cases, this is a pointer to a " -"function." +"Alternately, the slot can be set to a single type object to specify a single " +"base. The effect is the same as specifying a one-element tuple." +msgstr "" + +#: ../../c-api/type.rst:688 +msgid "Previously, :c:macro:`!Py_tp_bases` required a tuple of types." msgstr "" -msgid "*pfunc* values may not be ``NULL``, except for the following slots:" +#: ../../c-api/type.rst:692 +msgid "" +"Equivalent to :c:macro:`Py_tp_bases` (with ``s`` at the end). If both are " +"specified, :c:macro:`!Py_tp_bases` takes priority and this slot is ignored." msgstr "" -msgid "``Py_tp_doc``" +#: ../../c-api/type.rst:698 +msgid "Previously, :c:macro:`!Py_tp_base` required a single type, not a tuple." msgstr "" +#: ../../c-api/type.rst:702 msgid "" -":c:data:`Py_tp_token` (for clarity, prefer :c:data:`Py_TP_USE_SPEC` rather " -"than ``NULL``)" +"When not targeting older Python versions, prefer :c:macro:`!Py_tp_bases`." +msgstr "" + +#: ../../c-api/type.rst:704 +msgid "" +"The following slots do not correspond to public fields in the underlying " +"structures:" +msgstr "" + +#: ../../c-api/type.rst:709 +msgid "" +":c:member:`Slot ID ` for the metaclass used to construct the " +"resulting type object. When omitted the metaclass is derived from bases (:c:" +"macro:`Py_tp_bases` or the *bases* argument of :c:func:" +"`PyType_FromMetaclass`)." +msgstr "" + +#: ../../c-api/type.rst:715 +msgid "" +"Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not " +"supported, except if ``tp_new`` is ``NULL``." +msgstr "" + +#: ../../c-api/type.rst:718 +msgid "" +"This may not be used in :c:member:`PyType_Spec.slots`. Use :c:func:" +"`PyType_FromMetaclass` to specify a metaclass with :c:type:`!PyType_Spec`." msgstr "" +#: ../../c-api/type.rst:722 msgid "" -"A :c:member:`~PyType_Slot.slot` that records a static memory layout ID for a " -"class." +"This slot may not be used with :c:func:`PyType_GetSlot`. Use :c:func:" +"`Py_TYPE` on the type object instead." msgstr "" +#: ../../c-api/type.rst:729 msgid "" -"If the :c:type:`PyType_Spec` of the class is statically allocated, the token " -"can be set to the spec using the special value :c:data:`Py_TP_USE_SPEC`:" +":c:member:`Slot ID ` for recording the module in which the new " +"class is defined." msgstr "" +#: ../../c-api/type.rst:732 +msgid "" +"The value must be a module object. The module is associated with the new " +"type and can later be retrieved with :c:func:`PyType_GetModule`. The " +"associated module is not inherited by subclasses; it must be specified for " +"each class individually." +msgstr "" + +#: ../../c-api/type.rst:738 +msgid "" +"This may not be used in :c:member:`PyType_Spec.slots`. Use :c:func:" +"`PyType_FromMetaclass` to specify a module with :c:type:`!PyType_Spec`." +msgstr "" + +#: ../../c-api/type.rst:742 +msgid "" +"This slot may not be used with :c:func:`PyType_GetSlot`. Use :c:func:" +"`PyType_GetModule` instead." +msgstr "" + +#: ../../c-api/type.rst:749 +msgid "" +":c:member:`Slot ID ` for recording a static memory layout ID " +"for a class." +msgstr "" + +#: ../../c-api/type.rst:752 +msgid "" +"If the class is defined using a :c:type:`PyType_Spec`, and that spec is " +"statically allocated, the token can be set to the spec using the special " +"value :c:data:`Py_TP_USE_SPEC`:" +msgstr "" + +#: ../../c-api/type.rst:756 msgid "" "static PyType_Slot foo_slots[] = {\n" " {Py_tp_token, Py_TP_USE_SPEC}," msgstr "" +#: ../../c-api/type.rst:761 msgid "It can also be set to an arbitrary pointer, but you must ensure that:" msgstr "" +#: ../../c-api/type.rst:763 msgid "" "The pointer outlives the class, so it's not reused for something else while " "the class exists." msgstr "" +#: ../../c-api/type.rst:765 msgid "" "It \"belongs\" to the extension module where the class lives, so it will not " "clash with other extensions." msgstr "" +#: ../../c-api/type.rst:768 msgid "" "Use :c:func:`PyType_GetBaseByToken` to check if a class's superclass has a " "given token -- that is, check whether the memory layout is compatible." msgstr "" +#: ../../c-api/type.rst:771 msgid "" "To get the token for a given class (without considering superclasses), use :" "c:func:`PyType_GetSlot` with ``Py_tp_token``." msgstr "" +#: ../../c-api/type.rst:780 msgid "" "Used as a value with :c:data:`Py_tp_token` to set the token to the class's :" -"c:type:`PyType_Spec`. Expands to ``NULL``." +"c:type:`PyType_Spec`. May only be used for classes defined using :c:type:`!" +"PyType_Spec`." +msgstr "" + +#: ../../c-api/type.rst:784 +msgid "Expands to ``NULL``." +msgstr "" + +#: ../../c-api/type.rst:790 +msgid "" +":c:member:`Slot ID ` that works like :c:macro:" +"`Py_slot_subslots`, except it specifies an array of :c:type:`PyType_Slot` " +"structures." +msgstr "" + +#: ../../c-api/type.rst:798 +msgid "Soft-deprecated API" +msgstr "" + +#: ../../c-api/type.rst:800 +msgid "" +"The following functions are :term:`soft deprecated`. They will continue to " +"work, but new features will be added as slots for :c:func:" +"`PyType_FromSlots`, not as arguments to new ``PyType_From*`` functions." +msgstr "" + +#: ../../c-api/type.rst:806 +msgid "" +"Create and return a :ref:`heap type ` from the *spec* (see :c:" +"macro:`Py_TPFLAGS_HEAPTYPE`)." +msgstr "" + +#: ../../c-api/type.rst:809 +msgid "" +"A non-``NULL`` *metaclass* argument corresponds to the :c:macro:" +"`Py_tp_metaclass` slot." +msgstr "" + +#: ../../c-api/type.rst:812 +msgid "" +"A non-``NULL`` *bases* argument corresponds to the :c:data:`Py_tp_bases` " +"slot, and takes precedence over :c:data:`Py_tp_bases` and :c:data:" +"`Py_tp_bases` slots." +msgstr "" + +#: ../../c-api/type.rst:816 +msgid "" +"A non-``NULL`` *module* argument corresponds to the :c:macro:`Py_tp_module` " +"slot." +msgstr "" + +#: ../../c-api/type.rst:821 +msgid "" +"Note that this function does *not* fully match the behavior of calling :py:" +"class:`type() ` or using the :keyword:`class` statement. See the note " +"in :c:func:`PyType_FromSlots` documentation for details." +msgstr "" + +#: ../../c-api/type.rst:829 ../../c-api/type.rst:860 ../../c-api/type.rst:886 +#: ../../c-api/type.rst:911 +msgid "Prefer :c:func:`PyType_FromSlots` in new code." +msgstr "" + +#: ../../c-api/type.rst:834 +msgid "Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``." +msgstr "" + +#: ../../c-api/type.rst:840 +msgid "" +"The function now accepts a single class as the *bases* argument and ``NULL`` " +"as the ``tp_doc`` slot." +msgstr "" + +#: ../../c-api/type.rst:845 ../../c-api/type.rst:871 +msgid "" +"The function now finds and uses a metaclass corresponding to the provided " +"base classes. Previously, only :class:`type` instances were returned." +msgstr "" + +#: ../../c-api/type.rst:848 ../../c-api/type.rst:874 ../../c-api/type.rst:899 +msgid "" +"The :c:member:`~PyTypeObject.tp_new` of the metaclass is *ignored*. which " +"may result in incomplete initialization. Creating classes whose metaclass " +"overrides :c:member:`~PyTypeObject.tp_new` is deprecated." +msgstr "" + +#: ../../c-api/type.rst:855 ../../c-api/type.rst:881 ../../c-api/type.rst:906 +msgid "" +"Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " +"is no longer allowed." +msgstr "" + +#: ../../c-api/type.rst:865 +msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``." +msgstr "" + +#: ../../c-api/type.rst:891 +msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``." +msgstr "" + +#: ../../c-api/type.rst:895 +msgid "" +"The function now finds and uses a metaclass corresponding to the base " +"classes provided in *Py_tp_base[s]* slots. Previously, only :class:`type` " +"instances were returned." +msgstr "" + +#: ../../c-api/type.rst:924 +msgid "" +"Structure defining a type's behavior, used for soft-deprecated functions " +"like :c:func:`PyType_FromMetaclass`." +msgstr "" + +#: ../../c-api/type.rst:927 +msgid "" +"This structure contains several members that can instead be specified as :" +"ref:`slots ` for :c:func:`PyType_FromSlots`, and an " +"array of slot entries with a simpler structure." +msgstr "" + +#: ../../c-api/type.rst:933 +msgid "Corresponds to :c:macro:`Py_tp_name`." +msgstr "" + +#: ../../c-api/type.rst:937 +msgid "If positive, corresponds to :c:macro:`Py_tp_basicsize`." +msgstr "" + +#: ../../c-api/type.rst:939 +msgid "" +"If negative, corresponds to :c:macro:`Py_tp_extra_basicsize` set to the " +"absolute value." +msgstr "" + +#: ../../c-api/type.rst:944 +msgid "Previously, this field could not be negative." +msgstr "" + +#: ../../c-api/type.rst:948 +msgid "Corresponds to :c:macro:`Py_tp_itemsize`." +msgstr "" + +#: ../../c-api/type.rst:952 +msgid "Corresponds to :c:macro:`Py_tp_flags`." +msgstr "" + +#: ../../c-api/type.rst:956 +msgid "Array of :c:type:`PyType_Slot` (not :c:type:`PySlot`) structures." +msgstr "" + +#: ../../c-api/type.rst:958 +msgid "" +"Terminated by the special slot value ``{0, NULL}``. Each slot ID should be " +"specified at most once." +msgstr "" + +#: ../../c-api/type.rst:971 +msgid "" +"Structure defining optional functionality of a type, used for soft-" +"deprecated functions like :c:func:`PyType_FromMetaclass`." +msgstr "" + +#: ../../c-api/type.rst:974 +msgid "" +"Note that a :c:type:`!PyType_Slot` array may be included in a :c:type:`!" +"PySlot` array using :c:macro:`Py_tp_slots`, and vice versa using :c:macro:" +"`Py_slot_subslots`." +msgstr "" + +#: ../../c-api/type.rst:978 +msgid "" +"Each :c:type:`!PyType_Slot` structure ``tpslot`` is interpreted as the " +"following :c:type:`PySlot` structure::" +msgstr "" + +#: ../../c-api/type.rst:981 +msgid "" +"(PySlot){\n" +" .sl_id=tpslot.slot,\n" +" .sl_flags=PySlot_INTPTR | sub_static,\n" +" .sl_ptr=tpslot.func\n" +"}" +msgstr "" + +#: ../../c-api/type.rst:987 +msgid "" +"where ``sub_static`` is ``PySlot_STATIC`` if the slot requires the flag " +"(such as for :c:macro:`Py_tp_methods`), or if this flag is present on the " +"\"parent\" :c:macro:`!Py_tp_slots` slot (if any)." +msgstr "" + +#: ../../c-api/type.rst:993 +msgid "Corresponds to :c:member:`PySlot.sl_id`." +msgstr "" + +#: ../../c-api/type.rst:997 +msgid "Corresponds to :c:member:`PySlot.sl_ptr`." msgstr "" +#: ../../c-api/type.rst:8 msgid "object" msgstr "" +#: ../../c-api/type.rst:8 msgid "type" msgstr "Typ" diff --git a/c-api/type.po~ b/c-api/type.po~ new file mode 100644 index 00000000..5fcb76ef --- /dev/null +++ b/c-api/type.po~ @@ -0,0 +1,663 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Type Objects" +msgstr "" + +msgid "The C structure of the objects used to describe built-in types." +msgstr "" + +msgid "" +"This is the type object for type objects; it is the same object as :class:" +"`type` in the Python layer." +msgstr "" + +msgid "" +"Return non-zero if the object *o* is a type object, including instances of " +"types derived from the standard type object. Return 0 in all other cases. " +"This function always succeeds." +msgstr "" + +msgid "" +"Return non-zero if the object *o* is a type object, but not a subtype of the " +"standard type object. Return 0 in all other cases. This function always " +"succeeds." +msgstr "" + +msgid "Clear the internal lookup cache. Return the current version tag." +msgstr "" + +msgid "" +"Return the :c:member:`~PyTypeObject.tp_flags` member of *type*. This " +"function is primarily meant for use with ``Py_LIMITED_API``; the individual " +"flag bits are guaranteed to be stable across Python releases, but access to :" +"c:member:`~PyTypeObject.tp_flags` itself is not part of the :ref:`limited " +"API `." +msgstr "" + +msgid "The return type is now ``unsigned long`` rather than ``long``." +msgstr "" + +msgid "" +"Return the type object's internal namespace, which is otherwise only exposed " +"via a read-only proxy (:attr:`cls.__dict__ `). This is a " +"replacement for accessing :c:member:`~PyTypeObject.tp_dict` directly. The " +"returned dictionary must be treated as read-only." +msgstr "" + +msgid "" +"This function is meant for specific embedding and language-binding cases, " +"where direct access to the dict is necessary and indirect access (e.g. via " +"the proxy or :c:func:`PyObject_GetAttr`) isn't adequate." +msgstr "" + +msgid "" +"Extension modules should continue to use ``tp_dict``, directly or " +"indirectly, when setting up their own types." +msgstr "" + +msgid "" +"Invalidate the internal lookup cache for the type and all of its subtypes. " +"This function must be called after any manual modification of the attributes " +"or base classes of the type." +msgstr "" + +msgid "" +"Register *callback* as a type watcher. Return a non-negative integer ID " +"which must be passed to future calls to :c:func:`PyType_Watch`. In case of " +"error (e.g. no more watcher IDs available), return ``-1`` and set an " +"exception." +msgstr "" + +msgid "" +"In free-threaded builds, :c:func:`PyType_AddWatcher` is not thread-safe, so " +"it must be called at start up (before spawning the first thread)." +msgstr "" + +msgid "" +"Clear watcher identified by *watcher_id* (previously returned from :c:func:" +"`PyType_AddWatcher`). Return ``0`` on success, ``-1`` on error (e.g. if " +"*watcher_id* was never registered.)" +msgstr "" + +msgid "" +"An extension should never call ``PyType_ClearWatcher`` with a *watcher_id* " +"that was not returned to it by a previous call to :c:func:" +"`PyType_AddWatcher`." +msgstr "" + +msgid "" +"Mark *type* as watched. The callback granted *watcher_id* by :c:func:" +"`PyType_AddWatcher` will be called whenever :c:func:`PyType_Modified` " +"reports a change to *type*. (The callback may be called only once for a " +"series of consecutive modifications to *type*, if :c:func:`!_PyType_Lookup` " +"is not called on *type* between the modifications; this is an implementation " +"detail and subject to change.)" +msgstr "" + +msgid "" +"An extension should never call ``PyType_Watch`` with a *watcher_id* that was " +"not returned to it by a previous call to :c:func:`PyType_AddWatcher`." +msgstr "" + +msgid "Type of a type-watcher callback function." +msgstr "" + +msgid "" +"The callback must not modify *type* or cause :c:func:`PyType_Modified` to be " +"called on *type* or any type in its MRO; violating this rule could cause " +"infinite recursion." +msgstr "" + +msgid "" +"Return non-zero if the type object *o* sets the feature *feature*. Type " +"features are denoted by single bit flags." +msgstr "" + +msgid "" +"Return true if the type object includes support for the cycle detector; this " +"tests the type flag :c:macro:`Py_TPFLAGS_HAVE_GC`." +msgstr "" + +msgid "Return true if *a* is a subtype of *b*." +msgstr "" + +msgid "" +"This function only checks for actual subtypes, which means that :meth:`~type." +"__subclasscheck__` is not called on *b*. Call :c:func:`PyObject_IsSubclass` " +"to do the same check that :func:`issubclass` would do." +msgstr "" + +msgid "" +"Generic handler for the :c:member:`~PyTypeObject.tp_alloc` slot of a type " +"object. Uses Python's default memory allocation mechanism to allocate " +"memory for a new instance, zeros the memory, then initializes the memory as " +"if by calling :c:func:`PyObject_Init` or :c:func:`PyObject_InitVar`." +msgstr "" + +msgid "" +"Do not call this directly to allocate memory for an object; call the type's :" +"c:member:`~PyTypeObject.tp_alloc` slot instead." +msgstr "" + +msgid "" +"For types that support garbage collection (i.e., the :c:macro:" +"`Py_TPFLAGS_HAVE_GC` flag is set), this function behaves like :c:macro:" +"`PyObject_GC_New` or :c:macro:`PyObject_GC_NewVar` (except the memory is " +"guaranteed to be zeroed before initialization), and should be paired with :c:" +"func:`PyObject_GC_Del` in :c:member:`~PyTypeObject.tp_free`. Otherwise, it " +"behaves like :c:macro:`PyObject_New` or :c:macro:`PyObject_NewVar` (except " +"the memory is guaranteed to be zeroed before initialization) and should be " +"paired with :c:func:`PyObject_Free` in :c:member:`~PyTypeObject.tp_free`." +msgstr "" + +msgid "" +"Generic handler for the :c:member:`~PyTypeObject.tp_new` slot of a type " +"object. Creates a new instance using the type's :c:member:`~PyTypeObject." +"tp_alloc` slot and returns the resulting object." +msgstr "" + +msgid "" +"Finalize a type object. This should be called on all type objects to finish " +"their initialization. This function is responsible for adding inherited " +"slots from a type's base class. Return ``0`` on success, or return ``-1`` " +"and sets an exception on error." +msgstr "" + +msgid "" +"If some of the base classes implements the GC protocol and the provided type " +"does not include the :c:macro:`Py_TPFLAGS_HAVE_GC` in its flags, then the GC " +"protocol will be automatically implemented from its parents. On the " +"contrary, if the type being created does include :c:macro:" +"`Py_TPFLAGS_HAVE_GC` in its flags then it **must** implement the GC protocol " +"itself by at least implementing the :c:member:`~PyTypeObject.tp_traverse` " +"handle." +msgstr "" + +msgid "" +"Return the type's name. Equivalent to getting the type's :attr:`~type." +"__name__` attribute." +msgstr "" + +msgid "" +"Return the type's qualified name. Equivalent to getting the type's :attr:" +"`~type.__qualname__` attribute." +msgstr "" + +msgid "" +"Return the type's fully qualified name. Equivalent to ``f\"{type.__module__}." +"{type.__qualname__}\"``, or :attr:`type.__qualname__` if :attr:`type." +"__module__` is not a string or is equal to ``\"builtins\"``." +msgstr "" + +msgid "" +"Return the type's module name. Equivalent to getting the :attr:`type." +"__module__` attribute." +msgstr "" + +msgid "" +"Return the function pointer stored in the given slot. If the result is " +"``NULL``, this indicates that either the slot is ``NULL``, or that the " +"function was called with invalid parameters. Callers will typically cast the " +"result pointer into the appropriate function type." +msgstr "" + +msgid "" +"See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument." +msgstr "" + +msgid "" +":c:func:`PyType_GetSlot` can now accept all types. Previously, it was " +"limited to :ref:`heap types `." +msgstr "" + +msgid "" +"Return the module object associated with the given type when the type was " +"created using :c:func:`PyType_FromModuleAndSpec`." +msgstr "" + +msgid "" +"If no module is associated with the given type, sets :py:class:`TypeError` " +"and returns ``NULL``." +msgstr "" + +msgid "" +"This function is usually used to get the module in which a method is " +"defined. Note that in such a method, ``PyType_GetModule(Py_TYPE(self))`` may " +"not return the intended result. ``Py_TYPE(self)`` may be a *subclass* of the " +"intended class, and subclasses are not necessarily defined in the same " +"module as their superclass. See :c:type:`PyCMethod` to get the class that " +"defines the method. See :c:func:`PyType_GetModuleByDef` for cases when :c:" +"type:`!PyCMethod` cannot be used." +msgstr "" + +msgid "" +"Return the state of the module object associated with the given type. This " +"is a shortcut for calling :c:func:`PyModule_GetState()` on the result of :c:" +"func:`PyType_GetModule`." +msgstr "" + +msgid "" +"If the *type* has an associated module but its state is ``NULL``, returns " +"``NULL`` without setting an exception." +msgstr "" + +msgid "" +"Find the first superclass whose module was created from the given :c:type:" +"`PyModuleDef` *def*, and return that module." +msgstr "" + +msgid "" +"If no module is found, raises a :py:class:`TypeError` and returns ``NULL``." +msgstr "" + +msgid "" +"This function is intended to be used together with :c:func:" +"`PyModule_GetState()` to get module state from slot methods (such as :c:" +"member:`~PyTypeObject.tp_init` or :c:member:`~PyNumberMethods.nb_add`) and " +"other places where a method's defining class cannot be passed using the :c:" +"type:`PyCMethod` calling convention." +msgstr "" + +msgid "" +"The returned reference is :term:`borrowed ` from *type*, " +"and will be valid as long as you hold a reference to *type*. Do not release " +"it with :c:func:`Py_DECREF` or similar." +msgstr "" + +msgid "" +"Find the first superclass in *type*'s :term:`method resolution order` whose :" +"c:macro:`Py_tp_token` token is equal to the given one." +msgstr "" + +msgid "" +"If found, set *\\*result* to a new :term:`strong reference` to it and return " +"``1``." +msgstr "" + +msgid "If not found, set *\\*result* to ``NULL`` and return ``0``." +msgstr "" + +msgid "" +"On error, set *\\*result* to ``NULL`` and return ``-1`` with an exception " +"set." +msgstr "" + +msgid "" +"The *result* argument may be ``NULL``, in which case *\\*result* is not set. " +"Use this if you need only the return value." +msgstr "" + +msgid "The *token* argument may not be ``NULL``." +msgstr "" + +msgid "Attempt to assign a version tag to the given type." +msgstr "" + +msgid "" +"Returns 1 if the type already had a valid version tag or a new one was " +"assigned, or 0 if a new tag could not be assigned." +msgstr "" + +msgid "Creating Heap-Allocated Types" +msgstr "" + +msgid "" +"The following functions and structs are used to create :ref:`heap types " +"`." +msgstr "" + +msgid "" +"Create and return a :ref:`heap type ` from the *spec* (see :c:" +"macro:`Py_TPFLAGS_HEAPTYPE`)." +msgstr "" + +msgid "" +"The metaclass *metaclass* is used to construct the resulting type object. " +"When *metaclass* is ``NULL``, the metaclass is derived from *bases* (or " +"*Py_tp_base[s]* slots if *bases* is ``NULL``, see below)." +msgstr "" + +msgid "" +"Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not " +"supported, except if ``tp_new`` is ``NULL``." +msgstr "" + +msgid "" +"The *bases* argument can be used to specify base classes; it can either be " +"only one class or a tuple of classes. If *bases* is ``NULL``, the " +"*Py_tp_bases* slot is used instead. If that also is ``NULL``, the " +"*Py_tp_base* slot is used instead. If that also is ``NULL``, the new type " +"derives from :class:`object`." +msgstr "" + +msgid "" +"The *module* argument can be used to record the module in which the new " +"class is defined. It must be a module object or ``NULL``. If not ``NULL``, " +"the module is associated with the new type and can later be retrieved with :" +"c:func:`PyType_GetModule`. The associated module is not inherited by " +"subclasses; it must be specified for each class individually." +msgstr "" + +msgid "This function calls :c:func:`PyType_Ready` on the new type." +msgstr "" + +msgid "" +"Note that this function does *not* fully match the behavior of calling :py:" +"class:`type() ` or using the :keyword:`class` statement. With user-" +"provided base types or metaclasses, prefer :ref:`calling ` :py:" +"class:`type` (or the metaclass) over ``PyType_From*`` functions. " +"Specifically:" +msgstr "" + +msgid "" +":py:meth:`~object.__new__` is not called on the new class (and it must be " +"set to ``type.__new__``)." +msgstr "" + +msgid ":py:meth:`~object.__init__` is not called on the new class." +msgstr "" + +msgid ":py:meth:`~object.__init_subclass__` is not called on any bases." +msgstr "" + +msgid ":py:meth:`~object.__set_name__` is not called on new descriptors." +msgstr "" + +msgid "Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``." +msgstr "" + +msgid "" +"The function now accepts a single class as the *bases* argument and ``NULL`` " +"as the ``tp_doc`` slot." +msgstr "" + +msgid "" +"The function now finds and uses a metaclass corresponding to the provided " +"base classes. Previously, only :class:`type` instances were returned." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_new` of the metaclass is *ignored*. which " +"may result in incomplete initialization. Creating classes whose metaclass " +"overrides :c:member:`~PyTypeObject.tp_new` is deprecated." +msgstr "" + +msgid "" +"Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " +"is no longer allowed." +msgstr "" + +msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``." +msgstr "" + +msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``." +msgstr "" + +msgid "" +"The function now finds and uses a metaclass corresponding to the base " +"classes provided in *Py_tp_base[s]* slots. Previously, only :class:`type` " +"instances were returned." +msgstr "" + +msgid "" +"Make a type immutable: set the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag." +msgstr "" + +msgid "All base classes of *type* must be immutable." +msgstr "" + +msgid "On success, return ``0``. On error, set an exception and return ``-1``." +msgstr "" + +msgid "" +"The type must not be used before it's made immutable. For example, type " +"instances must not be created before the type is made immutable." +msgstr "" + +msgid "Structure defining a type's behavior." +msgstr "" + +msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." +msgstr "" + +msgid "" +"If positive, specifies the size of the instance in bytes. It is used to set :" +"c:member:`PyTypeObject.tp_basicsize`." +msgstr "" + +msgid "" +"If zero, specifies that :c:member:`~PyTypeObject.tp_basicsize` should be " +"inherited." +msgstr "" + +msgid "" +"If negative, the absolute value specifies how much space instances of the " +"class need *in addition* to the superclass. Use :c:func:" +"`PyObject_GetTypeData` to get a pointer to subclass-specific memory reserved " +"this way. For negative :c:member:`!basicsize`, Python will insert padding " +"when needed to meet :c:member:`~PyTypeObject.tp_basicsize`'s alignment " +"requirements." +msgstr "" + +msgid "Previously, this field could not be negative." +msgstr "" + +msgid "" +"Size of one element of a variable-size type, in bytes. Used to set :c:member:" +"`PyTypeObject.tp_itemsize`. See ``tp_itemsize`` documentation for caveats." +msgstr "" + +msgid "" +"If zero, :c:member:`~PyTypeObject.tp_itemsize` is inherited. Extending " +"arbitrary variable-sized classes is dangerous, since some types use a fixed " +"offset for variable-sized memory, which can then overlap fixed-sized memory " +"used by a subclass. To help prevent mistakes, inheriting ``itemsize`` is " +"only possible in the following situations:" +msgstr "" + +msgid "" +"The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)." +msgstr "" + +msgid "" +"The requested :c:member:`PyType_Spec.basicsize` is positive, suggesting that " +"the memory layout of the base class is known." +msgstr "" + +msgid "" +"The requested :c:member:`PyType_Spec.basicsize` is zero, suggesting that the " +"subclass does not access the instance's memory directly." +msgstr "" + +msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." +msgstr "" + +msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." +msgstr "" + +msgid "" +"If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:" +"`PyType_FromSpecWithBases` sets it automatically." +msgstr "" + +msgid "" +"Array of :c:type:`PyType_Slot` structures. Terminated by the special slot " +"value ``{0, NULL}``." +msgstr "" + +msgid "Each slot ID should be specified at most once." +msgstr "" + +msgid "" +"Structure defining optional functionality of a type, containing a slot ID " +"and a value pointer." +msgstr "" + +msgid "A slot ID." +msgstr "" + +msgid "" +"Slot IDs are named like the field names of the structures :c:type:" +"`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:" +"type:`PyMappingMethods` and :c:type:`PyAsyncMethods` with an added ``Py_`` " +"prefix. For example, use:" +msgstr "" + +msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`" +msgstr "" + +msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`" +msgstr "" + +msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`" +msgstr "" + +msgid "" +"An additional slot is supported that does not correspond to a :c:type:`!" +"PyTypeObject` struct field:" +msgstr "" + +msgid ":c:data:`Py_tp_token`" +msgstr "" + +msgid "" +"The following “offset” fields cannot be set using :c:type:`PyType_Slot`:" +msgstr "" + +msgid "" +":c:member:`~PyTypeObject.tp_weaklistoffset` (use :c:macro:" +"`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)" +msgstr "" + +msgid "" +":c:member:`~PyTypeObject.tp_dictoffset` (use :c:macro:" +"`Py_TPFLAGS_MANAGED_DICT` instead if possible)" +msgstr "" + +msgid "" +":c:member:`~PyTypeObject.tp_vectorcall_offset` (use " +"``\"__vectorcalloffset__\"`` in :ref:`PyMemberDef `)" +msgstr "" + +msgid "" +"If it is not possible to switch to a ``MANAGED`` flag (for example, for " +"vectorcall or to support Python older than 3.12), specify the offset in :c:" +"member:`Py_tp_members `. See :ref:`PyMemberDef " +"documentation ` for details." +msgstr "" + +msgid "" +"The following internal fields cannot be set at all when creating a heap type:" +msgstr "" + +msgid "" +":c:member:`~PyTypeObject.tp_dict`, :c:member:`~PyTypeObject.tp_mro`, :c:" +"member:`~PyTypeObject.tp_cache`, :c:member:`~PyTypeObject.tp_subclasses`, " +"and :c:member:`~PyTypeObject.tp_weaklist`." +msgstr "" + +msgid "" +"Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be problematic on " +"some platforms. To avoid issues, use the *bases* argument of :c:func:" +"`PyType_FromSpecWithBases` instead." +msgstr "" + +msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." +msgstr "" + +msgid "" +":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs." +"bf_releasebuffer` are now available under the :ref:`limited API `." +msgstr "" + +msgid "" +"The field :c:member:`~PyTypeObject.tp_vectorcall` can now set using " +"``Py_tp_vectorcall``. See the field's documentation for details." +msgstr "" + +msgid "" +"The desired value of the slot. In most cases, this is a pointer to a " +"function." +msgstr "" + +msgid "*pfunc* values may not be ``NULL``, except for the following slots:" +msgstr "" + +msgid "``Py_tp_doc``" +msgstr "" + +msgid "" +":c:data:`Py_tp_token` (for clarity, prefer :c:data:`Py_TP_USE_SPEC` rather " +"than ``NULL``)" +msgstr "" + +msgid "" +"A :c:member:`~PyType_Slot.slot` that records a static memory layout ID for a " +"class." +msgstr "" + +msgid "" +"If the :c:type:`PyType_Spec` of the class is statically allocated, the token " +"can be set to the spec using the special value :c:data:`Py_TP_USE_SPEC`:" +msgstr "" + +msgid "" +"static PyType_Slot foo_slots[] = {\n" +" {Py_tp_token, Py_TP_USE_SPEC}," +msgstr "" + +msgid "It can also be set to an arbitrary pointer, but you must ensure that:" +msgstr "" + +msgid "" +"The pointer outlives the class, so it's not reused for something else while " +"the class exists." +msgstr "" + +msgid "" +"It \"belongs\" to the extension module where the class lives, so it will not " +"clash with other extensions." +msgstr "" + +msgid "" +"Use :c:func:`PyType_GetBaseByToken` to check if a class's superclass has a " +"given token -- that is, check whether the memory layout is compatible." +msgstr "" + +msgid "" +"To get the token for a given class (without considering superclasses), use :" +"c:func:`PyType_GetSlot` with ``Py_tp_token``." +msgstr "" + +msgid "" +"Used as a value with :c:data:`Py_tp_token` to set the token to the class's :" +"c:type:`PyType_Spec`. Expands to ``NULL``." +msgstr "" + +msgid "object" +msgstr "" + +msgid "type" +msgstr "Typ" diff --git a/c-api/typehints.po b/c-api/typehints.po index 4a9d17c1..72cc18e1 100644 --- a/c-api/typehints.po +++ b/c-api/typehints.po @@ -8,24 +8,27 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/typehints.rst:6 msgid "Objects for Type Hinting" msgstr "" +#: ../../c-api/typehints.rst:8 msgid "" "Various built-in types for type hinting are provided. Currently, two types " "exist -- :ref:`GenericAlias ` and :ref:`Union `. Only ``GenericAlias`` is exposed to C." msgstr "" +#: ../../c-api/typehints.rst:14 msgid "" "Create a :ref:`GenericAlias ` object. Equivalent to " "calling the Python class :class:`types.GenericAlias`. The *origin* and " @@ -40,23 +43,27 @@ msgid "" "is returned." msgstr "" +#: ../../c-api/typehints.rst:28 msgid "Here's an example of how to make an extension type generic::" msgstr "" +#: ../../c-api/typehints.rst:30 msgid "" "...\n" "static PyMethodDef my_obj_methods[] = {\n" " // Other methods.\n" " ...\n" -" {\"__class_getitem__\", Py_GenericAlias, METH_O|METH_CLASS, \"See PEP " -"585\"}\n" +" {\"__class_getitem__\", Py_GenericAlias, METH_O|METH_CLASS, \"my_obj is " +"generic over its contained type\"}\n" " ...\n" "}" msgstr "" +#: ../../c-api/typehints.rst:38 msgid "The data model method :meth:`~object.__class_getitem__`." msgstr "" +#: ../../c-api/typehints.rst:44 msgid "" "The C type of the object returned by :c:func:`Py_GenericAlias`. Equivalent " "to :class:`types.GenericAlias` in Python." diff --git a/c-api/typehints.po~ b/c-api/typehints.po~ new file mode 100644 index 00000000..4a9d17c1 --- /dev/null +++ b/c-api/typehints.po~ @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Objects for Type Hinting" +msgstr "" + +msgid "" +"Various built-in types for type hinting are provided. Currently, two types " +"exist -- :ref:`GenericAlias ` and :ref:`Union `. Only ``GenericAlias`` is exposed to C." +msgstr "" + +msgid "" +"Create a :ref:`GenericAlias ` object. Equivalent to " +"calling the Python class :class:`types.GenericAlias`. The *origin* and " +"*args* arguments set the ``GenericAlias``\\ 's ``__origin__`` and " +"``__args__`` attributes respectively. *origin* should be a :c:expr:" +"`PyTypeObject*`, and *args* can be a :c:expr:`PyTupleObject*` or any " +"``PyObject*``. If *args* passed is not a tuple, a 1-tuple is automatically " +"constructed and ``__args__`` is set to ``(args,)``. Minimal checking is done " +"for the arguments, so the function will succeed even if *origin* is not a " +"type. The ``GenericAlias``\\ 's ``__parameters__`` attribute is constructed " +"lazily from ``__args__``. On failure, an exception is raised and ``NULL`` " +"is returned." +msgstr "" + +msgid "Here's an example of how to make an extension type generic::" +msgstr "" + +msgid "" +"...\n" +"static PyMethodDef my_obj_methods[] = {\n" +" // Other methods.\n" +" ...\n" +" {\"__class_getitem__\", Py_GenericAlias, METH_O|METH_CLASS, \"See PEP " +"585\"}\n" +" ...\n" +"}" +msgstr "" + +msgid "The data model method :meth:`~object.__class_getitem__`." +msgstr "" + +msgid "" +"The C type of the object returned by :c:func:`Py_GenericAlias`. Equivalent " +"to :class:`types.GenericAlias` in Python." +msgstr "" diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 0376b335..fe0b1b5c 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -11,19 +11,21 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-13 14:15+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/typeobj.rst:6 msgid "Type Object Structures" msgstr "" +#: ../../c-api/typeobj.rst:8 msgid "" "Perhaps one of the most important structures of the Python object system is " "the structure that defines a new type: the :c:type:`PyTypeObject` " @@ -34,6 +36,7 @@ msgid "" "module that implements new types." msgstr "" +#: ../../c-api/typeobj.rst:16 msgid "" "Type objects are fairly large compared to most of the standard types. The " "reason for the size is that each type object stores a large number of " @@ -43,406 +46,599 @@ msgid "" "they occur in the structure." msgstr "" +#: ../../c-api/typeobj.rst:23 msgid "" "In addition to the following quick reference, the :ref:`typedef-examples` " "section provides at-a-glance insight into the meaning and use of :c:type:" "`PyTypeObject`." msgstr "" +#: ../../c-api/typeobj.rst:29 msgid "Quick Reference" msgstr "" +#: ../../c-api/typeobj.rst:34 msgid "\"tp slots\"" msgstr "" +#: ../../c-api/typeobj.rst:40 msgid "PyTypeObject Slot [#slots]_" msgstr "" +#: ../../c-api/typeobj.rst:40 ../../c-api/typeobj.rst:201 msgid ":ref:`Type `" msgstr "" +#: ../../c-api/typeobj.rst:40 msgid "special methods/attrs" msgstr "" +#: ../../c-api/typeobj.rst:40 msgid "Info [#cols]_" msgstr "" +#: ../../c-api/typeobj.rst:42 msgid "O" msgstr "" +#: ../../c-api/typeobj.rst:42 msgid "T" msgstr "" +#: ../../c-api/typeobj.rst:42 msgid "D" msgstr "" +#: ../../c-api/typeobj.rst:42 msgid "I" msgstr "" +#: ../../c-api/typeobj.rst:44 msgid " :c:member:`~PyTypeObject.tp_name`" msgstr "" +#: ../../c-api/typeobj.rst:44 ../../c-api/typeobj.rst:86 +#: ../../c-api/typeobj.rst:372 ../../c-api/typeobj.rst:377 msgid "const char *" msgstr "" +#: ../../c-api/typeobj.rst:44 msgid "__name__" msgstr "" +#: ../../c-api/typeobj.rst:44 ../../c-api/typeobj.rst:46 +#: ../../c-api/typeobj.rst:48 ../../c-api/typeobj.rst:50 +#: ../../c-api/typeobj.rst:52 ../../c-api/typeobj.rst:62 +#: ../../c-api/typeobj.rst:70 ../../c-api/typeobj.rst:72 +#: ../../c-api/typeobj.rst:74 ../../c-api/typeobj.rst:76 +#: ../../c-api/typeobj.rst:79 ../../c-api/typeobj.rst:84 +#: ../../c-api/typeobj.rst:86 ../../c-api/typeobj.rst:88 +#: ../../c-api/typeobj.rst:90 ../../c-api/typeobj.rst:92 +#: ../../c-api/typeobj.rst:99 ../../c-api/typeobj.rst:101 +#: ../../c-api/typeobj.rst:103 ../../c-api/typeobj.rst:105 +#: ../../c-api/typeobj.rst:107 ../../c-api/typeobj.rst:109 +#: ../../c-api/typeobj.rst:111 ../../c-api/typeobj.rst:115 +#: ../../c-api/typeobj.rst:117 ../../c-api/typeobj.rst:120 +#: ../../c-api/typeobj.rst:122 ../../c-api/typeobj.rst:124 +#: ../../c-api/typeobj.rst:126 ../../c-api/typeobj.rst:128 +#: ../../c-api/typeobj.rst:130 ../../c-api/typeobj.rst:146 msgid "X" msgstr "" +#: ../../c-api/typeobj.rst:46 msgid ":c:member:`~PyTypeObject.tp_basicsize`" msgstr "" +#: ../../c-api/typeobj.rst:46 ../../c-api/typeobj.rst:48 +#: ../../c-api/typeobj.rst:52 ../../c-api/typeobj.rst:99 +#: ../../c-api/typeobj.rst:120 ../../c-api/typeobj.rst:343 +#: ../../c-api/typeobj.rst:417 ../../c-api/typeobj.rst:448 +#: ../../c-api/typeobj.rst:453 msgid ":c:type:`Py_ssize_t`" msgstr "" +#: ../../c-api/typeobj.rst:48 msgid ":c:member:`~PyTypeObject.tp_itemsize`" msgstr "" +#: ../../c-api/typeobj.rst:50 msgid ":c:member:`~PyTypeObject.tp_dealloc`" msgstr "" +#: ../../c-api/typeobj.rst:50 ../../c-api/typeobj.rst:142 +#: ../../c-api/typeobj.rst:146 ../../c-api/typeobj.rst:347 msgid ":c:type:`destructor`" msgstr "" +#: ../../c-api/typeobj.rst:52 msgid ":c:member:`~PyTypeObject.tp_vectorcall_offset`" msgstr "" +#: ../../c-api/typeobj.rst:54 msgid "(:c:member:`~PyTypeObject.tp_getattr`)" msgstr "" +#: ../../c-api/typeobj.rst:54 ../../c-api/typeobj.rst:371 msgid ":c:type:`getattrfunc`" msgstr "" +#: ../../c-api/typeobj.rst:54 ../../c-api/typeobj.rst:76 msgid "__getattribute__, __getattr__" msgstr "" +#: ../../c-api/typeobj.rst:54 ../../c-api/typeobj.rst:57 +#: ../../c-api/typeobj.rst:70 ../../c-api/typeobj.rst:76 +#: ../../c-api/typeobj.rst:79 ../../c-api/typeobj.rst:88 +#: ../../c-api/typeobj.rst:90 ../../c-api/typeobj.rst:92 msgid "G" msgstr "" +#: ../../c-api/typeobj.rst:57 msgid "(:c:member:`~PyTypeObject.tp_setattr`)" msgstr "" +#: ../../c-api/typeobj.rst:57 ../../c-api/typeobj.rst:376 msgid ":c:type:`setattrfunc`" msgstr "" +#: ../../c-api/typeobj.rst:57 ../../c-api/typeobj.rst:79 msgid "__setattr__, __delattr__" msgstr "" +#: ../../c-api/typeobj.rst:60 msgid ":c:member:`~PyTypeObject.tp_as_async`" msgstr "" +#: ../../c-api/typeobj.rst:60 msgid ":c:type:`PyAsyncMethods` *" msgstr "" +#: ../../c-api/typeobj.rst:60 ../../c-api/typeobj.rst:64 +#: ../../c-api/typeobj.rst:66 ../../c-api/typeobj.rst:68 +#: ../../c-api/typeobj.rst:82 msgid ":ref:`sub-slots`" msgstr "" +#: ../../c-api/typeobj.rst:60 ../../c-api/typeobj.rst:64 +#: ../../c-api/typeobj.rst:66 ../../c-api/typeobj.rst:68 +#: ../../c-api/typeobj.rst:82 msgid "%" msgstr "" +#: ../../c-api/typeobj.rst:62 msgid ":c:member:`~PyTypeObject.tp_repr`" msgstr "" +#: ../../c-api/typeobj.rst:62 ../../c-api/typeobj.rst:74 +#: ../../c-api/typeobj.rst:369 msgid ":c:type:`reprfunc`" msgstr "" +#: ../../c-api/typeobj.rst:62 msgid "__repr__" msgstr "" +#: ../../c-api/typeobj.rst:64 msgid ":c:member:`~PyTypeObject.tp_as_number`" msgstr "" +#: ../../c-api/typeobj.rst:64 msgid ":c:type:`PyNumberMethods` *" msgstr "" +#: ../../c-api/typeobj.rst:66 msgid ":c:member:`~PyTypeObject.tp_as_sequence`" msgstr "" +#: ../../c-api/typeobj.rst:66 msgid ":c:type:`PySequenceMethods` *" msgstr "" +#: ../../c-api/typeobj.rst:68 msgid ":c:member:`~PyTypeObject.tp_as_mapping`" msgstr "" +#: ../../c-api/typeobj.rst:68 msgid ":c:type:`PyMappingMethods` *" msgstr "" +#: ../../c-api/typeobj.rst:70 msgid ":c:member:`~PyTypeObject.tp_hash`" msgstr "" +#: ../../c-api/typeobj.rst:70 ../../c-api/typeobj.rst:405 msgid ":c:type:`hashfunc`" msgstr "" +#: ../../c-api/typeobj.rst:70 msgid "__hash__" msgstr "" +#: ../../c-api/typeobj.rst:72 msgid ":c:member:`~PyTypeObject.tp_call`" msgstr "" +#: ../../c-api/typeobj.rst:72 ../../c-api/typeobj.rst:237 +#: ../../c-api/typeobj.rst:240 ../../c-api/typeobj.rst:441 msgid ":c:type:`ternaryfunc`" msgstr "" +#: ../../c-api/typeobj.rst:72 msgid "__call__" msgstr "" +#: ../../c-api/typeobj.rst:74 msgid ":c:member:`~PyTypeObject.tp_str`" msgstr "" +#: ../../c-api/typeobj.rst:74 msgid "__str__" msgstr "" +#: ../../c-api/typeobj.rst:76 msgid ":c:member:`~PyTypeObject.tp_getattro`" msgstr "" +#: ../../c-api/typeobj.rst:76 ../../c-api/typeobj.rst:382 msgid ":c:type:`getattrofunc`" msgstr "" +#: ../../c-api/typeobj.rst:79 msgid ":c:member:`~PyTypeObject.tp_setattro`" msgstr "" +#: ../../c-api/typeobj.rst:79 ../../c-api/typeobj.rst:387 msgid ":c:type:`setattrofunc`" msgstr "" +#: ../../c-api/typeobj.rst:82 msgid ":c:member:`~PyTypeObject.tp_as_buffer`" msgstr "" +#: ../../c-api/typeobj.rst:82 msgid ":c:type:`PyBufferProcs` *" msgstr "" +#: ../../c-api/typeobj.rst:84 msgid ":c:member:`~PyTypeObject.tp_flags`" msgstr "" +#: ../../c-api/typeobj.rst:84 msgid "unsigned long" msgstr "" +#: ../../c-api/typeobj.rst:84 ../../c-api/typeobj.rst:99 +#: ../../c-api/typeobj.rst:113 ../../c-api/typeobj.rst:120 +#: ../../c-api/typeobj.rst:124 ../../c-api/typeobj.rst:126 +#: ../../c-api/typeobj.rst:128 msgid "?" msgstr "" +#: ../../c-api/typeobj.rst:86 msgid ":c:member:`~PyTypeObject.tp_doc`" msgstr "" +#: ../../c-api/typeobj.rst:86 msgid "__doc__" msgstr "" +#: ../../c-api/typeobj.rst:88 msgid ":c:member:`~PyTypeObject.tp_traverse`" msgstr "" +#: ../../c-api/typeobj.rst:88 ../../c-api/typeobj.rst:351 msgid ":c:type:`traverseproc`" msgstr "" +#: ../../c-api/typeobj.rst:90 msgid ":c:member:`~PyTypeObject.tp_clear`" msgstr "" +#: ../../c-api/typeobj.rst:90 ../../c-api/typeobj.rst:130 +#: ../../c-api/typeobj.rst:248 ../../c-api/typeobj.rst:430 msgid ":c:type:`inquiry`" msgstr "" +#: ../../c-api/typeobj.rst:92 msgid ":c:member:`~PyTypeObject.tp_richcompare`" msgstr "" +#: ../../c-api/typeobj.rst:92 ../../c-api/typeobj.rst:407 msgid ":c:type:`richcmpfunc`" msgstr "" +#: ../../c-api/typeobj.rst:92 msgid "__lt__, __le__, __eq__, __ne__, __gt__, __ge__" msgstr "" +#: ../../c-api/typeobj.rst:99 msgid "(:c:member:`~PyTypeObject.tp_weaklistoffset`)" msgstr "" +#: ../../c-api/typeobj.rst:101 msgid ":c:member:`~PyTypeObject.tp_iter`" msgstr "" +#: ../../c-api/typeobj.rst:101 ../../c-api/typeobj.rst:413 msgid ":c:type:`getiterfunc`" msgstr "" +#: ../../c-api/typeobj.rst:101 msgid "__iter__" msgstr "" +#: ../../c-api/typeobj.rst:103 msgid ":c:member:`~PyTypeObject.tp_iternext`" msgstr "" +#: ../../c-api/typeobj.rst:103 ../../c-api/typeobj.rst:415 msgid ":c:type:`iternextfunc`" msgstr "" +#: ../../c-api/typeobj.rst:103 msgid "__next__" msgstr "" +#: ../../c-api/typeobj.rst:105 msgid ":c:member:`~PyTypeObject.tp_methods`" msgstr "" +#: ../../c-api/typeobj.rst:105 msgid ":c:type:`PyMethodDef` []" msgstr "" +#: ../../c-api/typeobj.rst:107 msgid ":c:member:`~PyTypeObject.tp_members`" msgstr "" +#: ../../c-api/typeobj.rst:107 msgid ":c:type:`PyMemberDef` []" msgstr "" +#: ../../c-api/typeobj.rst:109 msgid ":c:member:`~PyTypeObject.tp_getset`" msgstr "" +#: ../../c-api/typeobj.rst:109 msgid ":c:type:`PyGetSetDef` []" msgstr "" +#: ../../c-api/typeobj.rst:111 msgid ":c:member:`~PyTypeObject.tp_base`" msgstr "" +#: ../../c-api/typeobj.rst:111 ../../c-api/typeobj.rst:342 +#: ../../c-api/typeobj.rst:357 msgid ":c:type:`PyTypeObject` *" msgstr "" +#: ../../c-api/typeobj.rst:111 msgid "__base__" msgstr "" +#: ../../c-api/typeobj.rst:113 msgid ":c:member:`~PyTypeObject.tp_dict`" msgstr "" +#: ../../c-api/typeobj.rst:113 ../../c-api/typeobj.rst:132 +#: ../../c-api/typeobj.rst:134 ../../c-api/typeobj.rst:136 +#: ../../c-api/typeobj.rst:140 ../../c-api/typeobj.rst:342 +#: ../../c-api/typeobj.rst:347 ../../c-api/typeobj.rst:351 +#: ../../c-api/typeobj.rst:357 ../../c-api/typeobj.rst:358 +#: ../../c-api/typeobj.rst:359 ../../c-api/typeobj.rst:363 +#: ../../c-api/typeobj.rst:364 ../../c-api/typeobj.rst:365 +#: ../../c-api/typeobj.rst:369 ../../c-api/typeobj.rst:371 +#: ../../c-api/typeobj.rst:376 ../../c-api/typeobj.rst:378 +#: ../../c-api/typeobj.rst:382 ../../c-api/typeobj.rst:383 +#: ../../c-api/typeobj.rst:387 ../../c-api/typeobj.rst:388 +#: ../../c-api/typeobj.rst:389 ../../c-api/typeobj.rst:393 +#: ../../c-api/typeobj.rst:394 ../../c-api/typeobj.rst:395 +#: ../../c-api/typeobj.rst:399 ../../c-api/typeobj.rst:400 +#: ../../c-api/typeobj.rst:401 ../../c-api/typeobj.rst:405 +#: ../../c-api/typeobj.rst:407 ../../c-api/typeobj.rst:408 +#: ../../c-api/typeobj.rst:413 ../../c-api/typeobj.rst:415 +#: ../../c-api/typeobj.rst:417 ../../c-api/typeobj.rst:419 +#: ../../c-api/typeobj.rst:425 ../../c-api/typeobj.rst:430 +#: ../../c-api/typeobj.rst:432 ../../c-api/typeobj.rst:436 +#: ../../c-api/typeobj.rst:437 ../../c-api/typeobj.rst:441 +#: ../../c-api/typeobj.rst:442 ../../c-api/typeobj.rst:443 +#: ../../c-api/typeobj.rst:447 ../../c-api/typeobj.rst:452 +#: ../../c-api/typeobj.rst:454 ../../c-api/typeobj.rst:458 +#: ../../c-api/typeobj.rst:459 ../../c-api/typeobj.rst:463 +#: ../../c-api/typeobj.rst:464 ../../c-api/typeobj.rst:465 msgid ":c:type:`PyObject` *" msgstr "" +#: ../../c-api/typeobj.rst:113 msgid "__dict__" msgstr "" +#: ../../c-api/typeobj.rst:115 msgid ":c:member:`~PyTypeObject.tp_descr_get`" msgstr "" +#: ../../c-api/typeobj.rst:115 ../../c-api/typeobj.rst:393 msgid ":c:type:`descrgetfunc`" msgstr "" +#: ../../c-api/typeobj.rst:115 msgid "__get__" msgstr "" +#: ../../c-api/typeobj.rst:117 msgid ":c:member:`~PyTypeObject.tp_descr_set`" msgstr "" +#: ../../c-api/typeobj.rst:117 ../../c-api/typeobj.rst:399 msgid ":c:type:`descrsetfunc`" msgstr "" +#: ../../c-api/typeobj.rst:117 msgid "__set__, __delete__" msgstr "" +#: ../../c-api/typeobj.rst:120 msgid "(:c:member:`~PyTypeObject.tp_dictoffset`)" msgstr "" +#: ../../c-api/typeobj.rst:122 msgid ":c:member:`~PyTypeObject.tp_init`" msgstr "" +#: ../../c-api/typeobj.rst:122 ../../c-api/typeobj.rst:363 msgid ":c:type:`initproc`" msgstr "" +#: ../../c-api/typeobj.rst:122 msgid "__init__" msgstr "" +#: ../../c-api/typeobj.rst:124 msgid ":c:member:`~PyTypeObject.tp_alloc`" msgstr "" +#: ../../c-api/typeobj.rst:124 ../../c-api/typeobj.rst:342 msgid ":c:type:`allocfunc`" msgstr "" +#: ../../c-api/typeobj.rst:126 msgid ":c:member:`~PyTypeObject.tp_new`" msgstr "" +#: ../../c-api/typeobj.rst:126 ../../c-api/typeobj.rst:357 msgid ":c:type:`newfunc`" msgstr "" +#: ../../c-api/typeobj.rst:126 msgid "__new__" msgstr "" +#: ../../c-api/typeobj.rst:128 msgid ":c:member:`~PyTypeObject.tp_free`" msgstr "" +#: ../../c-api/typeobj.rst:128 ../../c-api/typeobj.rst:349 msgid ":c:type:`freefunc`" msgstr "" +#: ../../c-api/typeobj.rst:130 msgid ":c:member:`~PyTypeObject.tp_is_gc`" msgstr "" +#: ../../c-api/typeobj.rst:132 msgid "<:c:member:`~PyTypeObject.tp_bases`>" msgstr "" +#: ../../c-api/typeobj.rst:132 msgid "__bases__" msgstr "" +#: ../../c-api/typeobj.rst:132 ../../c-api/typeobj.rst:134 msgid "~" msgstr "" +#: ../../c-api/typeobj.rst:134 msgid "<:c:member:`~PyTypeObject.tp_mro`>" msgstr "" +#: ../../c-api/typeobj.rst:134 msgid "__mro__" msgstr "" +#: ../../c-api/typeobj.rst:136 msgid "[:c:member:`~PyTypeObject.tp_cache`]" msgstr "" +#: ../../c-api/typeobj.rst:138 msgid "[:c:member:`~PyTypeObject.tp_subclasses`]" msgstr "" +#: ../../c-api/typeobj.rst:138 ../../c-api/typeobj.rst:279 +#: ../../c-api/typeobj.rst:349 ../../c-api/typeobj.rst:353 msgid "void *" msgstr "" +#: ../../c-api/typeobj.rst:138 msgid "__subclasses__" msgstr "" +#: ../../c-api/typeobj.rst:140 msgid "[:c:member:`~PyTypeObject.tp_weaklist`]" msgstr "" +#: ../../c-api/typeobj.rst:142 msgid "(:c:member:`~PyTypeObject.tp_del`)" msgstr "" +#: ../../c-api/typeobj.rst:144 msgid "[:c:member:`~PyTypeObject.tp_version_tag`]" msgstr "" +#: ../../c-api/typeobj.rst:144 msgid "unsigned int" msgstr "" +#: ../../c-api/typeobj.rst:146 msgid ":c:member:`~PyTypeObject.tp_finalize`" msgstr "" +#: ../../c-api/typeobj.rst:146 msgid "__del__" msgstr "" +#: ../../c-api/typeobj.rst:148 msgid ":c:member:`~PyTypeObject.tp_vectorcall`" msgstr "" +#: ../../c-api/typeobj.rst:148 msgid ":c:type:`vectorcallfunc`" msgstr ":c:type:`vectorcallfunc`" +#: ../../c-api/typeobj.rst:150 msgid "[:c:member:`~PyTypeObject.tp_watched`]" msgstr "" +#: ../../c-api/typeobj.rst:150 msgid "unsigned char" msgstr "" +#: ../../c-api/typeobj.rst:155 msgid "" "**()**: A slot name in parentheses indicates it is (effectively) deprecated." msgstr "" +#: ../../c-api/typeobj.rst:157 msgid "" "**<>**: Names in angle brackets should be initially set to ``NULL`` and " "treated as read-only." msgstr "" +#: ../../c-api/typeobj.rst:160 msgid "**[]**: Names in square brackets are for internal use only." msgstr "" +#: ../../c-api/typeobj.rst:162 msgid "" "**** (as a prefix) means the field is required (must be non-``NULL``)." msgstr "" +#: ../../c-api/typeobj.rst:164 msgid "Columns:" msgstr "" +#: ../../c-api/typeobj.rst:166 msgid "**\"O\"**: set on :c:data:`PyBaseObject_Type`" msgstr "" +#: ../../c-api/typeobj.rst:168 msgid "**\"T\"**: set on :c:data:`PyType_Type`" msgstr "" +#: ../../c-api/typeobj.rst:170 msgid "**\"D\"**: default (if slot is set to ``NULL``)" msgstr "" +#: ../../c-api/typeobj.rst:172 msgid "" "X - PyType_Ready sets this value if it is NULL\n" "~ - PyType_Ready always sets this value (it should be NULL)\n" @@ -451,9 +647,11 @@ msgid "" "Also see the inheritance column (\"I\")." msgstr "" +#: ../../c-api/typeobj.rst:180 msgid "**\"I\"**: inheritance" msgstr "" +#: ../../c-api/typeobj.rst:182 msgid "" "X - type slot is inherited via *PyType_Ready* if defined with a *NULL* " "value\n" @@ -463,395 +661,551 @@ msgid "" "? - it's complicated; see the slot's description" msgstr "" +#: ../../c-api/typeobj.rst:189 msgid "" "Note that some slots are effectively inherited through the normal attribute " "lookup chain." msgstr "" +#: ../../c-api/typeobj.rst:195 msgid "sub-slots" msgstr "" +#: ../../c-api/typeobj.rst:201 msgid "Slot" msgstr "" +#: ../../c-api/typeobj.rst:201 msgid "special methods" msgstr "" +#: ../../c-api/typeobj.rst:204 msgid ":c:member:`~PyAsyncMethods.am_await`" msgstr "" +#: ../../c-api/typeobj.rst:204 ../../c-api/typeobj.rst:206 +#: ../../c-api/typeobj.rst:208 ../../c-api/typeobj.rst:242 +#: ../../c-api/typeobj.rst:244 ../../c-api/typeobj.rst:246 +#: ../../c-api/typeobj.rst:250 ../../c-api/typeobj.rst:277 +#: ../../c-api/typeobj.rst:281 ../../c-api/typeobj.rst:291 +#: ../../c-api/typeobj.rst:432 msgid ":c:type:`unaryfunc`" msgstr "" +#: ../../c-api/typeobj.rst:204 msgid "__await__" msgstr "" +#: ../../c-api/typeobj.rst:206 msgid ":c:member:`~PyAsyncMethods.am_aiter`" msgstr "" +#: ../../c-api/typeobj.rst:206 msgid "__aiter__" msgstr "" +#: ../../c-api/typeobj.rst:208 msgid ":c:member:`~PyAsyncMethods.am_anext`" msgstr "" +#: ../../c-api/typeobj.rst:208 msgid "__anext__" msgstr "" +#: ../../c-api/typeobj.rst:210 msgid ":c:member:`~PyAsyncMethods.am_send`" msgstr "" +#: ../../c-api/typeobj.rst:210 msgid ":c:type:`sendfunc`" msgstr "" +#: ../../c-api/typeobj.rst:214 msgid ":c:member:`~PyNumberMethods.nb_add`" msgstr "" +#: ../../c-api/typeobj.rst:214 ../../c-api/typeobj.rst:217 +#: ../../c-api/typeobj.rst:219 ../../c-api/typeobj.rst:222 +#: ../../c-api/typeobj.rst:224 ../../c-api/typeobj.rst:227 +#: ../../c-api/typeobj.rst:229 ../../c-api/typeobj.rst:232 +#: ../../c-api/typeobj.rst:234 ../../c-api/typeobj.rst:252 +#: ../../c-api/typeobj.rst:255 ../../c-api/typeobj.rst:257 +#: ../../c-api/typeobj.rst:260 ../../c-api/typeobj.rst:262 +#: ../../c-api/typeobj.rst:265 ../../c-api/typeobj.rst:267 +#: ../../c-api/typeobj.rst:270 ../../c-api/typeobj.rst:272 +#: ../../c-api/typeobj.rst:275 ../../c-api/typeobj.rst:283 +#: ../../c-api/typeobj.rst:285 ../../c-api/typeobj.rst:287 +#: ../../c-api/typeobj.rst:289 ../../c-api/typeobj.rst:293 +#: ../../c-api/typeobj.rst:296 ../../c-api/typeobj.rst:302 +#: ../../c-api/typeobj.rst:311 ../../c-api/typeobj.rst:322 +#: ../../c-api/typeobj.rst:436 msgid ":c:type:`binaryfunc`" msgstr "" +#: ../../c-api/typeobj.rst:214 msgid "__add__ __radd__" msgstr "" +#: ../../c-api/typeobj.rst:217 msgid ":c:member:`~PyNumberMethods.nb_inplace_add`" msgstr "" +#: ../../c-api/typeobj.rst:217 ../../c-api/typeobj.rst:322 msgid "__iadd__" msgstr "" +#: ../../c-api/typeobj.rst:219 msgid ":c:member:`~PyNumberMethods.nb_subtract`" msgstr "" +#: ../../c-api/typeobj.rst:219 msgid "__sub__ __rsub__" msgstr "" +#: ../../c-api/typeobj.rst:222 msgid ":c:member:`~PyNumberMethods.nb_inplace_subtract`" msgstr "" +#: ../../c-api/typeobj.rst:222 msgid "__isub__" msgstr "" +#: ../../c-api/typeobj.rst:224 msgid ":c:member:`~PyNumberMethods.nb_multiply`" msgstr "" +#: ../../c-api/typeobj.rst:224 msgid "__mul__ __rmul__" msgstr "" +#: ../../c-api/typeobj.rst:227 msgid ":c:member:`~PyNumberMethods.nb_inplace_multiply`" msgstr "" +#: ../../c-api/typeobj.rst:227 ../../c-api/typeobj.rst:324 msgid "__imul__" msgstr "" +#: ../../c-api/typeobj.rst:229 msgid ":c:member:`~PyNumberMethods.nb_remainder`" msgstr "" +#: ../../c-api/typeobj.rst:229 msgid "__mod__ __rmod__" msgstr "" +#: ../../c-api/typeobj.rst:232 msgid ":c:member:`~PyNumberMethods.nb_inplace_remainder`" msgstr "" +#: ../../c-api/typeobj.rst:232 msgid "__imod__" msgstr "" +#: ../../c-api/typeobj.rst:234 msgid ":c:member:`~PyNumberMethods.nb_divmod`" msgstr "" +#: ../../c-api/typeobj.rst:234 msgid "__divmod__ __rdivmod__" msgstr "" +#: ../../c-api/typeobj.rst:237 msgid ":c:member:`~PyNumberMethods.nb_power`" msgstr "" +#: ../../c-api/typeobj.rst:237 msgid "__pow__ __rpow__" msgstr "" +#: ../../c-api/typeobj.rst:240 msgid ":c:member:`~PyNumberMethods.nb_inplace_power`" msgstr "" +#: ../../c-api/typeobj.rst:240 msgid "__ipow__" msgstr "" +#: ../../c-api/typeobj.rst:242 msgid ":c:member:`~PyNumberMethods.nb_negative`" msgstr "" +#: ../../c-api/typeobj.rst:242 msgid "__neg__" msgstr "" +#: ../../c-api/typeobj.rst:244 msgid ":c:member:`~PyNumberMethods.nb_positive`" msgstr "" +#: ../../c-api/typeobj.rst:244 msgid "__pos__" msgstr "" +#: ../../c-api/typeobj.rst:246 msgid ":c:member:`~PyNumberMethods.nb_absolute`" msgstr "" +#: ../../c-api/typeobj.rst:246 msgid "__abs__" msgstr "" +#: ../../c-api/typeobj.rst:248 msgid ":c:member:`~PyNumberMethods.nb_bool`" msgstr "" +#: ../../c-api/typeobj.rst:248 msgid "__bool__" msgstr "" +#: ../../c-api/typeobj.rst:250 msgid ":c:member:`~PyNumberMethods.nb_invert`" msgstr "" +#: ../../c-api/typeobj.rst:250 msgid "__invert__" msgstr "" +#: ../../c-api/typeobj.rst:252 msgid ":c:member:`~PyNumberMethods.nb_lshift`" msgstr "" +#: ../../c-api/typeobj.rst:252 msgid "__lshift__ __rlshift__" msgstr "" +#: ../../c-api/typeobj.rst:255 msgid ":c:member:`~PyNumberMethods.nb_inplace_lshift`" msgstr "" +#: ../../c-api/typeobj.rst:255 msgid "__ilshift__" msgstr "" +#: ../../c-api/typeobj.rst:257 msgid ":c:member:`~PyNumberMethods.nb_rshift`" msgstr "" +#: ../../c-api/typeobj.rst:257 msgid "__rshift__ __rrshift__" msgstr "" +#: ../../c-api/typeobj.rst:260 msgid ":c:member:`~PyNumberMethods.nb_inplace_rshift`" msgstr "" +#: ../../c-api/typeobj.rst:260 msgid "__irshift__" msgstr "" +#: ../../c-api/typeobj.rst:262 msgid ":c:member:`~PyNumberMethods.nb_and`" msgstr "" +#: ../../c-api/typeobj.rst:262 msgid "__and__ __rand__" msgstr "" +#: ../../c-api/typeobj.rst:265 msgid ":c:member:`~PyNumberMethods.nb_inplace_and`" msgstr "" +#: ../../c-api/typeobj.rst:265 msgid "__iand__" msgstr "" +#: ../../c-api/typeobj.rst:267 msgid ":c:member:`~PyNumberMethods.nb_xor`" msgstr "" +#: ../../c-api/typeobj.rst:267 msgid "__xor__ __rxor__" msgstr "" +#: ../../c-api/typeobj.rst:270 msgid ":c:member:`~PyNumberMethods.nb_inplace_xor`" msgstr "" +#: ../../c-api/typeobj.rst:270 msgid "__ixor__" msgstr "" +#: ../../c-api/typeobj.rst:272 msgid ":c:member:`~PyNumberMethods.nb_or`" msgstr "" +#: ../../c-api/typeobj.rst:272 msgid "__or__ __ror__" msgstr "" +#: ../../c-api/typeobj.rst:275 msgid ":c:member:`~PyNumberMethods.nb_inplace_or`" msgstr "" +#: ../../c-api/typeobj.rst:275 msgid "__ior__" msgstr "" +#: ../../c-api/typeobj.rst:277 msgid ":c:member:`~PyNumberMethods.nb_int`" msgstr "" +#: ../../c-api/typeobj.rst:277 msgid "__int__" msgstr "" +#: ../../c-api/typeobj.rst:279 msgid ":c:member:`~PyNumberMethods.nb_reserved`" msgstr "" +#: ../../c-api/typeobj.rst:281 msgid ":c:member:`~PyNumberMethods.nb_float`" msgstr "" +#: ../../c-api/typeobj.rst:281 msgid "__float__" msgstr "" +#: ../../c-api/typeobj.rst:283 msgid ":c:member:`~PyNumberMethods.nb_floor_divide`" msgstr "" +#: ../../c-api/typeobj.rst:283 msgid "__floordiv__" msgstr "" +#: ../../c-api/typeobj.rst:285 msgid ":c:member:`~PyNumberMethods.nb_inplace_floor_divide`" msgstr "" +#: ../../c-api/typeobj.rst:285 msgid "__ifloordiv__" msgstr "" +#: ../../c-api/typeobj.rst:287 msgid ":c:member:`~PyNumberMethods.nb_true_divide`" msgstr "" +#: ../../c-api/typeobj.rst:287 msgid "__truediv__" msgstr "" +#: ../../c-api/typeobj.rst:289 msgid ":c:member:`~PyNumberMethods.nb_inplace_true_divide`" msgstr "" +#: ../../c-api/typeobj.rst:289 msgid "__itruediv__" msgstr "" +#: ../../c-api/typeobj.rst:291 msgid ":c:member:`~PyNumberMethods.nb_index`" msgstr "" +#: ../../c-api/typeobj.rst:291 msgid "__index__" msgstr "" +#: ../../c-api/typeobj.rst:293 msgid ":c:member:`~PyNumberMethods.nb_matrix_multiply`" msgstr "" +#: ../../c-api/typeobj.rst:293 msgid "__matmul__ __rmatmul__" msgstr "" +#: ../../c-api/typeobj.rst:296 msgid ":c:member:`~PyNumberMethods.nb_inplace_matrix_multiply`" msgstr "" +#: ../../c-api/typeobj.rst:296 msgid "__imatmul__" msgstr "" +#: ../../c-api/typeobj.rst:300 msgid ":c:member:`~PyMappingMethods.mp_length`" msgstr "" +#: ../../c-api/typeobj.rst:300 ../../c-api/typeobj.rst:309 +#: ../../c-api/typeobj.rst:417 msgid ":c:type:`lenfunc`" msgstr "" +#: ../../c-api/typeobj.rst:300 ../../c-api/typeobj.rst:309 msgid "__len__" msgstr "" +#: ../../c-api/typeobj.rst:302 msgid ":c:member:`~PyMappingMethods.mp_subscript`" msgstr "" +#: ../../c-api/typeobj.rst:302 ../../c-api/typeobj.rst:315 msgid "__getitem__" msgstr "" +#: ../../c-api/typeobj.rst:304 msgid ":c:member:`~PyMappingMethods.mp_ass_subscript`" msgstr "" +#: ../../c-api/typeobj.rst:304 ../../c-api/typeobj.rst:463 msgid ":c:type:`objobjargproc`" msgstr "" +#: ../../c-api/typeobj.rst:304 msgid "__setitem__, __delitem__" msgstr "" +#: ../../c-api/typeobj.rst:309 msgid ":c:member:`~PySequenceMethods.sq_length`" msgstr "" +#: ../../c-api/typeobj.rst:311 msgid ":c:member:`~PySequenceMethods.sq_concat`" msgstr "" +#: ../../c-api/typeobj.rst:311 msgid "__add__" msgstr "" +#: ../../c-api/typeobj.rst:313 msgid ":c:member:`~PySequenceMethods.sq_repeat`" msgstr "" +#: ../../c-api/typeobj.rst:313 ../../c-api/typeobj.rst:315 +#: ../../c-api/typeobj.rst:324 ../../c-api/typeobj.rst:447 msgid ":c:type:`ssizeargfunc`" msgstr "" +#: ../../c-api/typeobj.rst:313 msgid "__mul__" msgstr "" +#: ../../c-api/typeobj.rst:315 msgid ":c:member:`~PySequenceMethods.sq_item`" msgstr "" +#: ../../c-api/typeobj.rst:317 msgid ":c:member:`~PySequenceMethods.sq_ass_item`" msgstr "" +#: ../../c-api/typeobj.rst:317 ../../c-api/typeobj.rst:452 msgid ":c:type:`ssizeobjargproc`" msgstr "" +#: ../../c-api/typeobj.rst:317 msgid "__setitem__ __delitem__" msgstr "" +#: ../../c-api/typeobj.rst:320 msgid ":c:member:`~PySequenceMethods.sq_contains`" msgstr "" +#: ../../c-api/typeobj.rst:320 ../../c-api/typeobj.rst:458 msgid ":c:type:`objobjproc`" msgstr "" +#: ../../c-api/typeobj.rst:320 msgid "__contains__" msgstr "" +#: ../../c-api/typeobj.rst:322 msgid ":c:member:`~PySequenceMethods.sq_inplace_concat`" msgstr "" +#: ../../c-api/typeobj.rst:324 msgid ":c:member:`~PySequenceMethods.sq_inplace_repeat`" msgstr "" +#: ../../c-api/typeobj.rst:328 msgid ":c:member:`~PyBufferProcs.bf_getbuffer`" msgstr "" +#: ../../c-api/typeobj.rst:328 msgid ":c:func:`getbufferproc`" msgstr "" +#: ../../c-api/typeobj.rst:328 msgid "__buffer__" msgstr "" +#: ../../c-api/typeobj.rst:330 msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`" msgstr "" +#: ../../c-api/typeobj.rst:330 msgid ":c:func:`releasebufferproc`" msgstr "" -msgid "__release_\\ buffer\\__" +#: ../../c-api/typeobj.rst:330 +msgid "__release_ buffer\\__" msgstr "" +#: ../../c-api/typeobj.rst:337 msgid "slot typedefs" msgstr "" +#: ../../c-api/typeobj.rst:340 msgid "typedef" msgstr "" +#: ../../c-api/typeobj.rst:340 msgid "Parameter Types" msgstr "" +#: ../../c-api/typeobj.rst:340 msgid "Return Type" msgstr "" +#: ../../c-api/typeobj.rst:347 ../../c-api/typeobj.rst:349 +#: ../../c-api/typeobj.rst:425 msgid "void" msgstr "" +#: ../../c-api/typeobj.rst:352 msgid ":c:type:`visitproc`" msgstr "" +#: ../../c-api/typeobj.rst:351 ../../c-api/typeobj.rst:363 +#: ../../c-api/typeobj.rst:376 ../../c-api/typeobj.rst:387 +#: ../../c-api/typeobj.rst:399 ../../c-api/typeobj.rst:409 +#: ../../c-api/typeobj.rst:419 ../../c-api/typeobj.rst:421 +#: ../../c-api/typeobj.rst:430 ../../c-api/typeobj.rst:452 +#: ../../c-api/typeobj.rst:458 ../../c-api/typeobj.rst:463 msgid "int" msgstr "" +#: ../../c-api/typeobj.rst:405 msgid "Py_hash_t" msgstr "" +#: ../../c-api/typeobj.rst:419 msgid ":c:type:`getbufferproc`" msgstr "" +#: ../../c-api/typeobj.rst:420 ../../c-api/typeobj.rst:426 msgid ":c:type:`Py_buffer` *" msgstr "" +#: ../../c-api/typeobj.rst:425 msgid ":c:type:`releasebufferproc`" msgstr "" +#: ../../c-api/typeobj.rst:470 msgid "See :ref:`slot-typedefs` below for more detail." msgstr "" +#: ../../c-api/typeobj.rst:474 msgid "PyTypeObject Definition" msgstr "" +#: ../../c-api/typeobj.rst:476 msgid "" "The structure definition for :c:type:`PyTypeObject` can be found in :file:" "`Include/cpython/object.h`. For convenience of reference, this repeats the " "definition found there:" msgstr "" +#: ../../c-api/typeobj.rst:482 msgid "" "typedef struct _typeobject {\n" " PyObject_VAR_HEAD\n" @@ -950,9 +1304,11 @@ msgid "" "} PyTypeObject;\n" msgstr "" +#: ../../c-api/typeobj.rst:486 msgid "PyObject Slots" msgstr "" +#: ../../c-api/typeobj.rst:488 msgid "" "The type object structure extends the :c:type:`PyVarObject` structure. The :" "c:member:`~PyVarObject.ob_size` field is used for dynamic types (created by :" @@ -962,9 +1318,11 @@ msgid "" "the :c:member:`~PyVarObject.ob_size` field." msgstr "" +#: ../../c-api/typeobj.rst:495 msgid ":c:member:`PyObject.ob_refcnt`" msgstr "" +#: ../../c-api/typeobj.rst:497 msgid "" "The type object's reference count is initialized to ``1`` by the " "``PyObject_HEAD_INIT`` macro. Note that for :ref:`statically allocated type " @@ -974,15 +1332,52 @@ msgid "" "instances *do* count as references." msgstr "" +#: ../../c-api/typeobj.rst:504 ../../c-api/typeobj.rst:527 +#: ../../c-api/typeobj.rst:543 ../../c-api/typeobj.rst:590 +#: ../../c-api/typeobj.rst:672 ../../c-api/typeobj.rst:816 +#: ../../c-api/typeobj.rst:861 ../../c-api/typeobj.rst:880 +#: ../../c-api/typeobj.rst:899 ../../c-api/typeobj.rst:917 +#: ../../c-api/typeobj.rst:943 ../../c-api/typeobj.rst:960 +#: ../../c-api/typeobj.rst:972 ../../c-api/typeobj.rst:984 +#: ../../c-api/typeobj.rst:1019 ../../c-api/typeobj.rst:1043 +#: ../../c-api/typeobj.rst:1065 ../../c-api/typeobj.rst:1088 +#: ../../c-api/typeobj.rst:1116 ../../c-api/typeobj.rst:1135 +#: ../../c-api/typeobj.rst:1154 ../../c-api/typeobj.rst:1194 +#: ../../c-api/typeobj.rst:1205 ../../c-api/typeobj.rst:1215 +#: ../../c-api/typeobj.rst:1225 ../../c-api/typeobj.rst:1239 +#: ../../c-api/typeobj.rst:1257 ../../c-api/typeobj.rst:1280 +#: ../../c-api/typeobj.rst:1298 ../../c-api/typeobj.rst:1313 +#: ../../c-api/typeobj.rst:1348 ../../c-api/typeobj.rst:1395 +#: ../../c-api/typeobj.rst:1421 ../../c-api/typeobj.rst:1440 +#: ../../c-api/typeobj.rst:1470 ../../c-api/typeobj.rst:1492 +#: ../../c-api/typeobj.rst:1530 ../../c-api/typeobj.rst:1542 +#: ../../c-api/typeobj.rst:1568 ../../c-api/typeobj.rst:1582 +#: ../../c-api/typeobj.rst:1728 ../../c-api/typeobj.rst:1795 +#: ../../c-api/typeobj.rst:1831 ../../c-api/typeobj.rst:1858 +#: ../../c-api/typeobj.rst:1884 ../../c-api/typeobj.rst:1899 +#: ../../c-api/typeobj.rst:1916 ../../c-api/typeobj.rst:1932 +#: ../../c-api/typeobj.rst:1964 ../../c-api/typeobj.rst:1996 +#: ../../c-api/typeobj.rst:2024 ../../c-api/typeobj.rst:2044 +#: ../../c-api/typeobj.rst:2073 ../../c-api/typeobj.rst:2119 +#: ../../c-api/typeobj.rst:2138 ../../c-api/typeobj.rst:2180 +#: ../../c-api/typeobj.rst:2205 ../../c-api/typeobj.rst:2245 +#: ../../c-api/typeobj.rst:2270 ../../c-api/typeobj.rst:2283 +#: ../../c-api/typeobj.rst:2293 ../../c-api/typeobj.rst:2310 +#: ../../c-api/typeobj.rst:2327 ../../c-api/typeobj.rst:2343 +#: ../../c-api/typeobj.rst:2487 ../../c-api/typeobj.rst:2547 msgid "**Inheritance:**" msgstr "" +#: ../../c-api/typeobj.rst:506 ../../c-api/typeobj.rst:545 +#: ../../c-api/typeobj.rst:592 msgid "This field is not inherited by subtypes." msgstr "" +#: ../../c-api/typeobj.rst:509 msgid ":c:member:`PyObject.ob_type`" msgstr "" +#: ../../c-api/typeobj.rst:511 msgid "" "This is the type's type, in other words its metatype. It is initialized by " "the argument to the ``PyObject_HEAD_INIT`` macro, and its value should " @@ -994,9 +1389,11 @@ msgid "" "doing anything else. This is typically done like this::" msgstr "" +#: ../../c-api/typeobj.rst:520 msgid "Foo_Type.ob_type = &PyType_Type;" msgstr "" +#: ../../c-api/typeobj.rst:522 msgid "" "This should be done before any instances of the type are created. :c:func:" "`PyType_Ready` checks if :c:member:`~PyObject.ob_type` is ``NULL``, and if " @@ -1004,27 +1401,39 @@ msgid "" "class. :c:func:`PyType_Ready` will not change this field if it is non-zero." msgstr "" +#: ../../c-api/typeobj.rst:529 ../../c-api/typeobj.rst:818 +#: ../../c-api/typeobj.rst:945 ../../c-api/typeobj.rst:1045 +#: ../../c-api/typeobj.rst:1067 ../../c-api/typeobj.rst:1860 +#: ../../c-api/typeobj.rst:1886 ../../c-api/typeobj.rst:2026 +#: ../../c-api/typeobj.rst:2046 ../../c-api/typeobj.rst:2121 +#: ../../c-api/typeobj.rst:2247 ../../c-api/typeobj.rst:2489 msgid "This field is inherited by subtypes." msgstr "" +#: ../../c-api/typeobj.rst:533 msgid "PyVarObject Slots" msgstr "" +#: ../../c-api/typeobj.rst:535 msgid ":c:member:`PyVarObject.ob_size`" msgstr "" +#: ../../c-api/typeobj.rst:537 msgid "" "For :ref:`statically allocated type objects `, this should be " "initialized to zero. For :ref:`dynamically allocated type objects `, this field has a special internal meaning." msgstr "" +#: ../../c-api/typeobj.rst:541 msgid "This field should be accessed using the :c:func:`Py_SIZE()` macro." msgstr "" +#: ../../c-api/typeobj.rst:549 msgid "PyTypeObject Slots" msgstr "" +#: ../../c-api/typeobj.rst:551 msgid "" "Each slot has a section describing inheritance. If :c:func:`PyType_Ready` " "may set a value when the field is set to ``NULL`` then there will also be a " @@ -1032,6 +1441,13 @@ msgid "" "`PyBaseObject_Type` and :c:data:`PyType_Type` effectively act as defaults.)" msgstr "" +#: ../../c-api/typeobj.rst:558 +msgid "" +"See :c:macro:`Py_tp_name` for the corresponding :c:member:`Slot ID `." +msgstr "" + +#: ../../c-api/typeobj.rst:561 msgid "" "Pointer to a NUL-terminated string containing the name of the type. For " "types that are accessible as module globals, the string should be the full " @@ -1043,12 +1459,14 @@ msgid "" "tp_name` initializer ``\"P.Q.M.T\"``." msgstr "" +#: ../../c-api/typeobj.rst:569 msgid "" "For :ref:`dynamically allocated type objects `, this should just " "be the type name, and the module name explicitly stored in the type dict as " "the value for key ``'__module__'``." msgstr "" +#: ../../c-api/typeobj.rst:574 msgid "" "For :ref:`statically allocated type objects `, the *tp_name* " "field should contain a dot. Everything before the last dot is made " @@ -1056,6 +1474,7 @@ msgid "" "the last dot is made accessible as the :attr:`~type.__name__` attribute." msgstr "" +#: ../../c-api/typeobj.rst:580 msgid "" "If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is " "made accessible as the :attr:`~type.__name__` attribute, and the :attr:" @@ -1065,16 +1484,26 @@ msgid "" "created with pydoc." msgstr "" +#: ../../c-api/typeobj.rst:586 msgid "" "This field must not be ``NULL``. It is the only required field in :c:func:" "`PyTypeObject` (other than potentially :c:member:`~PyTypeObject." "tp_itemsize`)." msgstr "" +#: ../../c-api/typeobj.rst:598 msgid "" "These fields allow calculating the size in bytes of instances of the type." msgstr "" +#: ../../c-api/typeobj.rst:600 +msgid "" +"See :c:macro:`Py_tp_basicsize`, :c:macro:`Py_tp_extra_basicsize` and :c:" +"macro:`Py_tp_itemsize` for the corresponding :c:member:`Slot IDs `." +msgstr "" + +#: ../../c-api/typeobj.rst:604 msgid "" "There are two kinds of types: types with fixed-length instances have a zero :" "c:member:`!tp_itemsize` field, types with variable-length instances have a " @@ -1084,6 +1513,7 @@ msgid "" "`PyUnstable_Object_GC_NewWithExtraData`.)" msgstr "" +#: ../../c-api/typeobj.rst:611 msgid "" "For a type with variable-length instances, the instances must have an :c:" "member:`~PyVarObject.ob_size` field, and the instance size is :c:member:`!" @@ -1091,6 +1521,7 @@ msgid "" "\"length\" of the object." msgstr "" +#: ../../c-api/typeobj.rst:616 msgid "" "Functions like :c:func:`PyObject_NewVar` will take the value of N as an " "argument, and store in the instance's :c:member:`~PyVarObject.ob_size` " @@ -1101,11 +1532,13 @@ msgid "" "`PyLong_Export`." msgstr "" +#: ../../c-api/typeobj.rst:626 msgid "" "The :c:member:`~PyVarObject.ob_size` field should be accessed using the :c:" "func:`Py_SIZE()` and :c:func:`Py_SET_SIZE()` macros." msgstr "" +#: ../../c-api/typeobj.rst:629 msgid "" "Also, the presence of an :c:member:`~PyVarObject.ob_size` field in the " "instance layout doesn't mean that the instance structure is variable-length. " @@ -1115,11 +1548,13 @@ msgid "" "`PyList_Size` instead.)" msgstr "" +#: ../../c-api/typeobj.rst:636 msgid "" "The :c:member:`!tp_basicsize` includes size needed for data of the type's :c:" "member:`~PyTypeObject.tp_base`, plus any extra data needed by each instance." msgstr "" +#: ../../c-api/typeobj.rst:640 msgid "" "The correct way to set :c:member:`!tp_basicsize` is to use the ``sizeof`` " "operator on the struct used to declare the instance layout. This struct must " @@ -1128,6 +1563,7 @@ msgid "" "tp_basicsize`." msgstr "" +#: ../../c-api/typeobj.rst:646 msgid "" "Since every type is a subtype of :py:type:`object`, this struct must " "include :c:type:`PyObject` or :c:type:`PyVarObject` (depending on whether :c:" @@ -1136,19 +1572,23 @@ msgid "" "respectively." msgstr "" +#: ../../c-api/typeobj.rst:652 msgid "" "The basic size does not include the GC header size, as that header is not " "part of :c:macro:`PyObject_HEAD`." msgstr "" +#: ../../c-api/typeobj.rst:655 msgid "" "For cases where struct used to declare the base type is unknown, see :c:" "member:`PyType_Spec.basicsize` and :c:func:`PyType_FromMetaclass`." msgstr "" +#: ../../c-api/typeobj.rst:658 msgid "Notes about alignment:" msgstr "" +#: ../../c-api/typeobj.rst:660 msgid "" ":c:member:`!tp_basicsize` must be a multiple of ``_Alignof(PyObject)``. When " "using ``sizeof`` on a ``struct`` that includes :c:macro:`PyObject_HEAD`, as " @@ -1157,6 +1597,7 @@ msgid "" "you." msgstr "" +#: ../../c-api/typeobj.rst:665 msgid "" "If the variable items require a particular alignment, :c:member:`!" "tp_basicsize` and :c:member:`!tp_itemsize` must each be a multiple of that " @@ -1164,12 +1605,14 @@ msgid "" "your responsibility that both fields are a multiple of ``_Alignof(double)``." msgstr "" +#: ../../c-api/typeobj.rst:674 msgid "" "These fields are inherited separately by subtypes. (That is, if the field is " "set to zero, :c:func:`PyType_Ready` will copy the value from the base type, " "indicating that the instances do not need additional storage.)" msgstr "" +#: ../../c-api/typeobj.rst:679 msgid "" "If the base type has a non-zero :c:member:`~PyTypeObject.tp_itemsize`, it is " "generally not safe to set :c:member:`~PyTypeObject.tp_itemsize` to a " @@ -1177,13 +1620,16 @@ msgid "" "implementation of the base type)." msgstr "" +#: ../../c-api/typeobj.rst:688 msgid "" "A pointer to the instance destructor function. The function signature is::" msgstr "" +#: ../../c-api/typeobj.rst:690 msgid "void tp_dealloc(PyObject *self);" msgstr "" +#: ../../c-api/typeobj.rst:692 msgid "" "The destructor function should remove all references which the instance owns " "(e.g., call :c:func:`Py_CLEAR`), free all memory buffers owned by the " @@ -1191,6 +1637,7 @@ msgid "" "free the object itself." msgstr "" +#: ../../c-api/typeobj.rst:697 msgid "" "If you may call functions that may set the error indicator, you must use :c:" "func:`PyErr_GetRaisedException` and :c:func:`PyErr_SetRaisedException` to " @@ -1198,6 +1645,7 @@ msgid "" "could have occurred while processing a different error):" msgstr "" +#: ../../c-api/typeobj.rst:702 msgid "" "static void\n" "foo_dealloc(foo_object *self)\n" @@ -1209,45 +1657,53 @@ msgid "" "}" msgstr "" +#: ../../c-api/typeobj.rst:713 msgid "" "The dealloc handler itself must not raise an exception; if it hits an error " "case it should call :c:func:`PyErr_FormatUnraisable` to log (and clear) an " "unraisable exception." msgstr "" +#: ../../c-api/typeobj.rst:717 msgid "No guarantees are made about when an object is destroyed, except:" msgstr "" +#: ../../c-api/typeobj.rst:719 msgid "" "Python will destroy an object immediately or some time after the final " "reference to the object is deleted, unless its finalizer (:c:member:" "`~PyTypeObject.tp_finalize`) subsequently resurrects the object." msgstr "" +#: ../../c-api/typeobj.rst:723 msgid "" "An object will not be destroyed while it is being automatically finalized (:" "c:member:`~PyTypeObject.tp_finalize`) or automatically cleared (:c:member:" "`~PyTypeObject.tp_clear`)." msgstr "" +#: ../../c-api/typeobj.rst:727 msgid "" "CPython currently destroys an object immediately from :c:func:`Py_DECREF` " "when the new reference count is zero, but this may change in a future " "version." msgstr "" +#: ../../c-api/typeobj.rst:731 msgid "" "It is recommended to call :c:func:`PyObject_CallFinalizerFromDealloc` at the " "beginning of :c:member:`!tp_dealloc` to guarantee that the object is always " "finalized before destruction." msgstr "" +#: ../../c-api/typeobj.rst:735 msgid "" "If the type supports garbage collection (the :c:macro:`Py_TPFLAGS_HAVE_GC` " "flag is set), the destructor should call :c:func:`PyObject_GC_UnTrack` " "before clearing any member fields." msgstr "" +#: ../../c-api/typeobj.rst:739 msgid "" "It is permissible to call :c:member:`~PyTypeObject.tp_clear` from :c:member:" "`!tp_dealloc` to reduce code duplication and to guarantee that the object is " @@ -1255,6 +1711,7 @@ msgid "" "have already been called." msgstr "" +#: ../../c-api/typeobj.rst:744 msgid "" "If the type is heap allocated (:c:macro:`Py_TPFLAGS_HEAPTYPE`), the " "deallocator should release the owned reference to its type object (via :c:" @@ -1262,6 +1719,7 @@ msgid "" "below.::" msgstr "" +#: ../../c-api/typeobj.rst:749 msgid "" "static void\n" "foo_dealloc(PyObject *op)\n" @@ -1273,6 +1731,7 @@ msgid "" "}" msgstr "" +#: ../../c-api/typeobj.rst:758 msgid "" ":c:member:`!tp_dealloc` must leave the exception status unchanged. If it " "needs to call something that might raise an exception, the exception state " @@ -1280,9 +1739,11 @@ msgid "" "with :c:func:`PyErr_WriteUnraisable`)." msgstr "" +#: ../../c-api/typeobj.rst:763 msgid "Example::" msgstr "" +#: ../../c-api/typeobj.rst:765 msgid "" "static void\n" "foo_dealloc(PyObject *self)\n" @@ -1324,6 +1785,7 @@ msgid "" "}" msgstr "" +#: ../../c-api/typeobj.rst:804 msgid "" ":c:member:`!tp_dealloc` may be called from any Python thread, not just the " "thread which created the object (if the object becomes part of a refcount " @@ -1336,28 +1798,34 @@ msgid "" "violate any assumptions of the library." msgstr "" +#: ../../c-api/typeobj.rst:822 ../../c-api/typeobj.rst:1739 +#: ../../c-api/typeobj.rst:2502 msgid "" ":ref:`life-cycle` for details about how this slot relates to other slots." msgstr "" +#: ../../c-api/typeobj.rst:827 msgid "" "An optional offset to a per-instance function that implements calling the " "object using the :ref:`vectorcall protocol `, a more efficient " "alternative of the simpler :c:member:`~PyTypeObject.tp_call`." msgstr "" +#: ../../c-api/typeobj.rst:832 msgid "" "This field is only used if the flag :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` is " "set. If so, this must be a positive integer containing the offset in the " "instance of a :c:type:`vectorcallfunc` pointer." msgstr "" +#: ../../c-api/typeobj.rst:836 msgid "" "The *vectorcallfunc* pointer may be ``NULL``, in which case the instance " "behaves as if :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` was not set: calling the " "instance falls back to :c:member:`~PyTypeObject.tp_call`." msgstr "" +#: ../../c-api/typeobj.rst:840 msgid "" "Any class that sets ``Py_TPFLAGS_HAVE_VECTORCALL`` must also set :c:member:" "`~PyTypeObject.tp_call` and make sure its behaviour is consistent with the " @@ -1365,11 +1833,13 @@ msgid "" "`PyVectorcall_Call`." msgstr "" +#: ../../c-api/typeobj.rst:847 msgid "" "Before version 3.8, this slot was named ``tp_print``. In Python 2.x, it was " "used for printing to a file. In Python 3.0 to 3.7, it was unused." msgstr "" +#: ../../c-api/typeobj.rst:853 msgid "" "Before version 3.12, it was not recommended for :ref:`mutable heap types " "` to implement the vectorcall protocol. When a user sets :attr:" @@ -1379,6 +1849,7 @@ msgid "" "`Py_TPFLAGS_HAVE_VECTORCALL` flag." msgstr "" +#: ../../c-api/typeobj.rst:863 msgid "" "This field is always inherited. However, the :c:macro:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag is not always inherited. If it's not set, " @@ -1386,9 +1857,11 @@ msgid "" "func:`PyVectorcall_Call` is explicitly called." msgstr "" +#: ../../c-api/typeobj.rst:874 msgid "An optional pointer to the get-attribute-string function." msgstr "" +#: ../../c-api/typeobj.rst:876 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_getattro` function, " @@ -1396,11 +1869,13 @@ msgid "" "attribute name." msgstr "" +#: ../../c-api/typeobj.rst:882 ../../c-api/typeobj.rst:1090 msgid "" "Group: :c:member:`~PyTypeObject.tp_getattr`, :c:member:`~PyTypeObject." "tp_getattro`" msgstr "" +#: ../../c-api/typeobj.rst:884 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_getattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " @@ -1409,10 +1884,12 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" +#: ../../c-api/typeobj.rst:893 ../../c-api/typeobj.rst:1105 msgid "" "An optional pointer to the function for setting and deleting attributes." msgstr "" +#: ../../c-api/typeobj.rst:895 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, " @@ -1420,11 +1897,13 @@ msgid "" "attribute name." msgstr "" +#: ../../c-api/typeobj.rst:901 ../../c-api/typeobj.rst:1118 msgid "" "Group: :c:member:`~PyTypeObject.tp_setattr`, :c:member:`~PyTypeObject." "tp_setattro`" msgstr "" +#: ../../c-api/typeobj.rst:903 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_setattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " @@ -1433,31 +1912,38 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" +#: ../../c-api/typeobj.rst:910 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement :term:`awaitable` and :term:`asynchronous iterator` " "protocols at the C-level. See :ref:`async-structs` for details." msgstr "" +#: ../../c-api/typeobj.rst:914 msgid "Formerly known as ``tp_compare`` and ``tp_reserved``." msgstr "" +#: ../../c-api/typeobj.rst:919 msgid "" "The :c:member:`~PyTypeObject.tp_as_async` field is not inherited, but the " "contained fields are inherited individually." msgstr "" +#: ../../c-api/typeobj.rst:929 msgid "" "An optional pointer to a function that implements the built-in function :" "func:`repr`." msgstr "" +#: ../../c-api/typeobj.rst:932 msgid "The signature is the same as for :c:func:`PyObject_Repr`::" msgstr "" +#: ../../c-api/typeobj.rst:934 msgid "PyObject *tp_repr(PyObject *self);" msgstr "" +#: ../../c-api/typeobj.rst:936 msgid "" "The function must return a string or a Unicode object. Ideally, this " "function should return a string that, when passed to :func:`eval`, given a " @@ -1466,65 +1952,85 @@ msgid "" "``'>'`` from which both the type and the value of the object can be deduced." msgstr "" +#: ../../c-api/typeobj.rst:947 ../../c-api/typeobj.rst:1028 +#: ../../c-api/typeobj.rst:1069 ../../c-api/typeobj.rst:1096 +#: ../../c-api/typeobj.rst:1124 ../../c-api/typeobj.rst:1169 +#: ../../c-api/typeobj.rst:1804 ../../c-api/typeobj.rst:1838 +#: ../../c-api/typeobj.rst:1968 ../../c-api/typeobj.rst:2001 +#: ../../c-api/typeobj.rst:2080 ../../c-api/typeobj.rst:2123 +#: ../../c-api/typeobj.rst:2145 ../../c-api/typeobj.rst:2186 +#: ../../c-api/typeobj.rst:2216 ../../c-api/typeobj.rst:2249 msgid "**Default:**" msgstr "" +#: ../../c-api/typeobj.rst:949 msgid "" "When this field is not set, a string of the form ``<%s object at %p>`` is " "returned, where ``%s`` is replaced by the type name, and ``%p`` by the " "object's memory address." msgstr "" +#: ../../c-api/typeobj.rst:956 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the number protocol. These fields are documented " "in :ref:`number-structs`." msgstr "" +#: ../../c-api/typeobj.rst:962 msgid "" "The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the " "contained fields are inherited individually." msgstr "" +#: ../../c-api/typeobj.rst:968 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the sequence protocol. These fields are documented " "in :ref:`sequence-structs`." msgstr "" +#: ../../c-api/typeobj.rst:974 msgid "" "The :c:member:`~PyTypeObject.tp_as_sequence` field is not inherited, but the " "contained fields are inherited individually." msgstr "" +#: ../../c-api/typeobj.rst:980 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the mapping protocol. These fields are documented " "in :ref:`mapping-structs`." msgstr "" +#: ../../c-api/typeobj.rst:986 msgid "" "The :c:member:`~PyTypeObject.tp_as_mapping` field is not inherited, but the " "contained fields are inherited individually." msgstr "" +#: ../../c-api/typeobj.rst:996 msgid "" "An optional pointer to a function that implements the built-in function :" "func:`hash`." msgstr "" +#: ../../c-api/typeobj.rst:999 msgid "The signature is the same as for :c:func:`PyObject_Hash`::" msgstr "" +#: ../../c-api/typeobj.rst:1001 msgid "Py_hash_t tp_hash(PyObject *);" msgstr "" +#: ../../c-api/typeobj.rst:1003 msgid "" "The value ``-1`` should not be returned as a normal return value; when an " "error occurs during the computation of the hash value, the function should " "set an exception and return ``-1``." msgstr "" +#: ../../c-api/typeobj.rst:1007 msgid "" "When this field is not set (*and* :c:member:`~PyTypeObject.tp_richcompare` " "is not set), an attempt to take the hash of the object raises :exc:" @@ -1532,6 +2038,7 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" +#: ../../c-api/typeobj.rst:1011 msgid "" "This field can be set explicitly to :c:func:`PyObject_HashNotImplemented` to " "block inheritance of the hash method from a parent type. This is interpreted " @@ -1542,11 +2049,13 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" +#: ../../c-api/typeobj.rst:1021 ../../c-api/typeobj.rst:1797 msgid "" "Group: :c:member:`~PyTypeObject.tp_hash`, :c:member:`~PyTypeObject." "tp_richcompare`" msgstr "" +#: ../../c-api/typeobj.rst:1023 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_richcompare`: a subtype inherits both of :c:member:`~PyTypeObject." @@ -1555,18 +2064,22 @@ msgid "" "are both ``NULL``." msgstr "" +#: ../../c-api/typeobj.rst:1030 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericHash`." msgstr "" +#: ../../c-api/typeobj.rst:1037 msgid "" "An optional pointer to a function that implements calling the object. This " "should be ``NULL`` if the object is not callable. The signature is the same " "as for :c:func:`PyObject_Call`::" msgstr "" +#: ../../c-api/typeobj.rst:1041 msgid "PyObject *tp_call(PyObject *self, PyObject *args, PyObject *kwargs);" msgstr "" +#: ../../c-api/typeobj.rst:1052 msgid "" "An optional pointer to a function that implements the built-in operation :" "func:`str`. (Note that :class:`str` is a type now, and :func:`str` calls " @@ -1575,12 +2088,15 @@ msgid "" "this handler.)" msgstr "" +#: ../../c-api/typeobj.rst:1057 msgid "The signature is the same as for :c:func:`PyObject_Str`::" msgstr "" +#: ../../c-api/typeobj.rst:1059 msgid "PyObject *tp_str(PyObject *self);" msgstr "" +#: ../../c-api/typeobj.rst:1061 msgid "" "The function must return a string or a Unicode object. It should be a " "\"friendly\" string representation of the object, as this is the " @@ -1588,26 +2104,32 @@ msgid "" "function." msgstr "" +#: ../../c-api/typeobj.rst:1071 msgid "" "When this field is not set, :c:func:`PyObject_Repr` is called to return a " "string representation." msgstr "" +#: ../../c-api/typeobj.rst:1079 msgid "An optional pointer to the get-attribute function." msgstr "" +#: ../../c-api/typeobj.rst:1081 msgid "The signature is the same as for :c:func:`PyObject_GetAttr`::" msgstr "" +#: ../../c-api/typeobj.rst:1083 msgid "PyObject *tp_getattro(PyObject *self, PyObject *attr);" msgstr "" +#: ../../c-api/typeobj.rst:1085 msgid "" "It is usually convenient to set this field to :c:func:" "`PyObject_GenericGetAttr`, which implements the normal way of looking for " "object attributes." msgstr "" +#: ../../c-api/typeobj.rst:1092 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_getattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " @@ -1616,15 +2138,19 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" +#: ../../c-api/typeobj.rst:1098 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." msgstr "" +#: ../../c-api/typeobj.rst:1107 msgid "The signature is the same as for :c:func:`PyObject_SetAttr`::" msgstr "" +#: ../../c-api/typeobj.rst:1109 msgid "int tp_setattro(PyObject *self, PyObject *attr, PyObject *value);" msgstr "" +#: ../../c-api/typeobj.rst:1111 msgid "" "In addition, setting *value* to ``NULL`` to delete an attribute must be " "supported. It is usually convenient to set this field to :c:func:" @@ -1632,6 +2158,7 @@ msgid "" "attributes." msgstr "" +#: ../../c-api/typeobj.rst:1120 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_setattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " @@ -1640,20 +2167,30 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" +#: ../../c-api/typeobj.rst:1126 msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." msgstr "" +#: ../../c-api/typeobj.rst:1131 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the buffer interface. These fields are documented " "in :ref:`buffer-structs`." msgstr "" +#: ../../c-api/typeobj.rst:1137 msgid "" "The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, but the " "contained fields are inherited individually." msgstr "" +#: ../../c-api/typeobj.rst:1143 +msgid "" +"See :c:macro:`Py_tp_flags` for the corresponding :c:member:`Slot ID `." +msgstr "" + +#: ../../c-api/typeobj.rst:1146 msgid "" "This field is a bit mask of various flags. Some flags indicate variant " "semantics for certain situations; others are used to indicate that certain " @@ -1665,6 +2202,7 @@ msgid "" "accessed and must be considered to have a zero or ``NULL`` value instead." msgstr "" +#: ../../c-api/typeobj.rst:1156 msgid "" "Inheritance of this field is complicated. Most flag bits are inherited " "individually, i.e. if the base type has a flag bit set, the subtype inherits " @@ -1679,14 +2217,17 @@ msgid "" "the subtype exist and have ``NULL`` values." msgstr "" +#: ../../c-api/typeobj.rst:1171 msgid "" ":c:data:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " "Py_TPFLAGS_BASETYPE``." msgstr "" +#: ../../c-api/typeobj.rst:1174 msgid "**Bit Masks:**" msgstr "" +#: ../../c-api/typeobj.rst:1178 msgid "" "The following bit masks are currently defined; these can be ORed together " "using the ``|`` operator to form the value of the :c:member:`~PyTypeObject." @@ -1695,6 +2236,7 @@ msgid "" "zero." msgstr "" +#: ../../c-api/typeobj.rst:1185 msgid "" "This bit is set when the type object itself is allocated on the heap, for " "example, types created dynamically using :c:func:`PyType_FromSpec`. In this " @@ -1707,25 +2249,32 @@ msgid "" "reference cycle with their own module object." msgstr "" +#: ../../c-api/typeobj.rst:1196 ../../c-api/typeobj.rst:1207 +#: ../../c-api/typeobj.rst:1217 ../../c-api/typeobj.rst:1227 +#: ../../c-api/typeobj.rst:1259 msgid "???" msgstr "" +#: ../../c-api/typeobj.rst:1201 msgid "" "This bit is set when the type can be used as the base type of another type. " "If this bit is clear, the type cannot be subtyped (similar to a \"final\" " "class in Java)." msgstr "" +#: ../../c-api/typeobj.rst:1212 msgid "" "This bit is set when the type object has been fully initialized by :c:func:" "`PyType_Ready`." msgstr "" +#: ../../c-api/typeobj.rst:1222 msgid "" "This bit is set while :c:func:`PyType_Ready` is in the process of " "initializing the type object." msgstr "" +#: ../../c-api/typeobj.rst:1232 msgid "" "This bit is set when the object supports garbage collection. If this bit is " "set, memory for new instances (see :c:member:`~PyTypeObject.tp_alloc`) must " @@ -1735,11 +2284,14 @@ msgid "" "`supporting-cycle-detection`." msgstr "" +#: ../../c-api/typeobj.rst:1241 ../../c-api/typeobj.rst:1584 +#: ../../c-api/typeobj.rst:1730 msgid "" "Group: :c:macro:`Py_TPFLAGS_HAVE_GC`, :c:member:`~PyTypeObject." "tp_traverse`, :c:member:`~PyTypeObject.tp_clear`" msgstr "" +#: ../../c-api/typeobj.rst:1243 msgid "" "The :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :c:" "member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` " @@ -1749,166 +2301,225 @@ msgid "" "values." msgstr "" +#: ../../c-api/typeobj.rst:1253 msgid "" "This is a bitmask of all the bits that pertain to the existence of certain " "fields in the type object and its extension structures. Currently, it " "includes the following bits: :c:macro:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`." msgstr "" +#: ../../c-api/typeobj.rst:1264 msgid "This bit indicates that objects behave like unbound methods." msgstr "" +#: ../../c-api/typeobj.rst:1266 msgid "If this flag is set for ``type(meth)``, then:" msgstr "" +#: ../../c-api/typeobj.rst:1268 msgid "" "``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) must be " "equivalent to ``meth(obj, *args, **kwds)``." msgstr "" +#: ../../c-api/typeobj.rst:1271 msgid "" "``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " "``meth(*args, **kwds)``." msgstr "" +#: ../../c-api/typeobj.rst:1274 msgid "" "This flag enables an optimization for typical method calls like ``obj." "meth()``: it avoids creating a temporary \"bound method\" object for ``obj." "meth``." msgstr "" +#: ../../c-api/typeobj.rst:1282 msgid "" "This flag is never inherited by types without the :c:macro:" "`Py_TPFLAGS_IMMUTABLETYPE` flag set. For extension types, it is inherited " "whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited." msgstr "" +#: ../../c-api/typeobj.rst:1288 msgid "" "This bit indicates that instances of the class have a :attr:`~object." "__dict__` attribute, and that the space for the dictionary is managed by the " "VM." msgstr "" -msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set." +#: ../../c-api/typeobj.rst:1291 ../../c-api/typeobj.rst:1309 +msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` must also be set." msgstr "" +#: ../../c-api/typeobj.rst:1293 msgid "" "The type traverse function must call :c:func:`PyObject_VisitManagedDict` and " "its clear function must call :c:func:`PyObject_ClearManagedDict`." msgstr "" +#: ../../c-api/typeobj.rst:1300 msgid "" "This flag is inherited unless the :c:member:`~PyTypeObject.tp_dictoffset` " "field is set in a superclass." msgstr "" +#: ../../c-api/typeobj.rst:1306 msgid "" "This bit indicates that instances of the class should be weakly " "referenceable." msgstr "" +#: ../../c-api/typeobj.rst:1315 msgid "" "This flag is inherited unless the :c:member:`~PyTypeObject." "tp_weaklistoffset` field is set in a superclass." msgstr "" +#: ../../c-api/typeobj.rst:1321 +msgid "" +"These bits indicate that the VM will manage some fields by storing them " +"before the object. Currently, this macro is equivalent to :c:expr:" +"`Py_TPFLAGS_MANAGED_DICT | Py_TPFLAGS_MANAGED_WEAKREF`." +msgstr "" + +#: ../../c-api/typeobj.rst:1325 +msgid "" +"This macro value relies on the implementation of the VM, so its value is not " +"stable and may change in a future version. Prefer using individual flags " +"instead." +msgstr "" + +#: ../../c-api/typeobj.rst:1334 msgid "" "Only usable with variable-size types, i.e. ones with non-zero :c:member:" "`~PyTypeObject.tp_itemsize`." msgstr "" +#: ../../c-api/typeobj.rst:1337 msgid "" "Indicates that the variable-sized portion of an instance of this type is at " "the end of the instance's memory area, at an offset of ``Py_TYPE(obj)-" ">tp_basicsize`` (which may be different in each subclass)." msgstr "" +#: ../../c-api/typeobj.rst:1342 msgid "" "When setting this flag, be sure that all superclasses either use this memory " "layout, or are not variable-sized. Python does not check this." msgstr "" +#: ../../c-api/typeobj.rst:1350 msgid "This flag is inherited." msgstr "" +#: ../../c-api/typeobj.rst:1364 msgid "" -"These flags are used by functions such as :c:func:`PyLong_Check` to quickly " -"determine if a type is a subclass of a built-in type; such specific checks " -"are faster than a generic check, like :c:func:`PyObject_IsInstance`. Custom " -"types that inherit from built-ins should have their :c:member:`~PyTypeObject." -"tp_flags` set appropriately, or the code that interacts with such types will " -"behave differently depending on what kind of check is used." +"Functions such as :c:func:`PyLong_Check` will call :c:func:" +"`PyType_FastSubclass` with one of these flags to quickly determine if a type " +"is a subclass of a built-in type; such specific checks are faster than a " +"generic check, like :c:func:`PyObject_IsInstance`. Custom types that inherit " +"from built-ins should have their :c:member:`~PyTypeObject.tp_flags` set " +"appropriately, or the code that interacts with such types will behave " +"differently depending on what kind of check is used." msgstr "" +#: ../../c-api/typeobj.rst:1375 msgid "" "This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is " "present in the type structure." msgstr "" +#: ../../c-api/typeobj.rst:1380 msgid "" "This flag isn't necessary anymore, as the interpreter assumes the :c:member:" "`~PyTypeObject.tp_finalize` slot is always present in the type structure." msgstr "" +#: ../../c-api/typeobj.rst:1391 msgid "" "This bit is set when the class implements the :ref:`vectorcall protocol " "`. See :c:member:`~PyTypeObject.tp_vectorcall_offset` for " "details." msgstr "" +#: ../../c-api/typeobj.rst:1397 msgid "" "This bit is inherited if :c:member:`~PyTypeObject.tp_call` is also inherited." msgstr "" +#: ../../c-api/typeobj.rst:1400 +msgid "as ``_Py_TPFLAGS_HAVE_VECTORCALL``" +msgstr "" + +#: ../../c-api/typeobj.rst:1404 +msgid "" +"Renamed to the current name, without the leading underscore. The old " +"provisional name is :term:`soft deprecated`." +msgstr "" + +#: ../../c-api/typeobj.rst:1409 msgid "" "This flag is now removed from a class when the class's :py:meth:`~object." "__call__` method is reassigned." msgstr "" +#: ../../c-api/typeobj.rst:1412 msgid "This flag can now be inherited by mutable classes." msgstr "" +#: ../../c-api/typeobj.rst:1416 msgid "" "This bit is set for type objects that are immutable: type attributes cannot " "be set nor deleted." msgstr "" +#: ../../c-api/typeobj.rst:1418 msgid "" ":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types " "`." msgstr "" +#: ../../c-api/typeobj.rst:1423 ../../c-api/typeobj.rst:1532 +#: ../../c-api/typeobj.rst:1544 msgid "This flag is not inherited." msgstr "" +#: ../../c-api/typeobj.rst:1429 msgid "" "Disallow creating instances of the type: set :c:member:`~PyTypeObject." "tp_new` to NULL and don't create the ``__new__`` key in the type dictionary." msgstr "" +#: ../../c-api/typeobj.rst:1433 msgid "" "The flag must be set before creating the type, not after. For example, it " "must be set before :c:func:`PyType_Ready` is called on the type." msgstr "" +#: ../../c-api/typeobj.rst:1436 msgid "" "The flag is set automatically on :ref:`static types ` if :c:" "member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` and :c:" "member:`~PyTypeObject.tp_new` is NULL." msgstr "" +#: ../../c-api/typeobj.rst:1442 msgid "" "This flag is not inherited. However, subclasses will not be instantiable " "unless they provide a non-NULL :c:member:`~PyTypeObject.tp_new` (which is " "only possible via the C API)." msgstr "" +#: ../../c-api/typeobj.rst:1449 msgid "" "To disallow instantiating a class directly but allow instantiating its " "subclasses (e.g. for an :term:`abstract base class`), do not use this flag. " "Instead, make :c:member:`~PyTypeObject.tp_new` only succeed for subclasses." msgstr "" +#: ../../c-api/typeobj.rst:1460 msgid "" "This bit indicates that instances of the class may match mapping patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -1916,19 +2527,23 @@ msgid "" "unset when registering :class:`collections.abc.Sequence`." msgstr "" +#: ../../c-api/typeobj.rst:1467 ../../c-api/typeobj.rst:1489 msgid "" ":c:macro:`Py_TPFLAGS_MAPPING` and :c:macro:`Py_TPFLAGS_SEQUENCE` are " "mutually exclusive; it is an error to enable both flags simultaneously." msgstr "" +#: ../../c-api/typeobj.rst:1472 msgid "" "This flag is inherited by types that do not already set :c:macro:" "`Py_TPFLAGS_SEQUENCE`." msgstr "" +#: ../../c-api/typeobj.rst:1475 ../../c-api/typeobj.rst:1497 msgid ":pep:`634` -- Structural Pattern Matching: Specification" msgstr "" +#: ../../c-api/typeobj.rst:1482 msgid "" "This bit indicates that instances of the class may match sequence patterns " "when used as the subject of a :keyword:`match` block. It is automatically " @@ -1936,142 +2551,85 @@ msgid "" "unset when registering :class:`collections.abc.Mapping`." msgstr "" +#: ../../c-api/typeobj.rst:1494 msgid "" "This flag is inherited by types that do not already set :c:macro:" "`Py_TPFLAGS_MAPPING`." msgstr "" +#: ../../c-api/typeobj.rst:1504 msgid "" "Internal. Do not set or unset this flag. To indicate that a class has " "changed call :c:func:`PyType_Modified`" msgstr "" +#: ../../c-api/typeobj.rst:1508 msgid "" "This flag is present in header files, but is not be used. It will be removed " "in a future version of CPython" msgstr "" +#: ../../c-api/typeobj.rst:1514 msgid "" -"An optional pointer to a NUL-terminated C string giving the docstring for " -"this type object. This is exposed as the :attr:`~type.__doc__` attribute on " -"the type and instances of the type." -msgstr "" - -msgid "This field is *not* inherited by subtypes." -msgstr "" - -msgid "" -"An optional pointer to a traversal function for the garbage collector. This " -"is only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " -"signature is::" -msgstr "" - -msgid "int tp_traverse(PyObject *self, visitproc visit, void *arg);" -msgstr "" - -msgid "" -"More information about Python's garbage collection scheme can be found in " -"section :ref:`supporting-cycle-detection`." -msgstr "" - -msgid "" -"The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage " -"collector to detect reference cycles. A typical implementation of a :c:" -"member:`~PyTypeObject.tp_traverse` function simply calls :c:func:`Py_VISIT` " -"on each of the instance's members that are Python objects that the instance " -"owns. For example, this is function :c:func:`!local_traverse` from the :mod:" -"`!_thread` extension module::" -msgstr "" - -msgid "" -"static int\n" -"local_traverse(PyObject *op, visitproc visit, void *arg)\n" -"{\n" -" localobject *self = (localobject *) op;\n" -" Py_VISIT(self->args);\n" -" Py_VISIT(self->kw);\n" -" Py_VISIT(self->dict);\n" -" return 0;\n" -"}" -msgstr "" - -msgid "" -"Note that :c:func:`Py_VISIT` is called only on those members that can " -"participate in reference cycles. Although there is also a ``self->key`` " -"member, it can only be ``NULL`` or a Python string and therefore cannot be " -"part of a reference cycle." +"This macro does nothing. Historically, this would indicate that the :c:" +"member:`~PyTypeObject.tp_version_tag` field was available and initialized." msgstr "" +#: ../../c-api/typeobj.rst:1524 msgid "" -"On the other hand, even if you know a member can never be part of a cycle, " -"as a debugging aid you may want to visit it anyway just so the :mod:`gc` " -"module's :func:`~gc.get_referents` function will include it." +"This bit indicates that instances of this type will have an \"inline " +"values\" array (containing the object's attributes) placed directly after " +"the end of the object." msgstr "" -msgid "" -"Heap types (:c:macro:`Py_TPFLAGS_HEAPTYPE`) must visit their type with::" -msgstr "" - -msgid "Py_VISIT(Py_TYPE(self));" +#: ../../c-api/typeobj.rst:1528 +msgid "This requires that :c:macro:`Py_TPFLAGS_HAVE_GC` is set." msgstr "" +#: ../../c-api/typeobj.rst:1539 msgid "" -"It is only needed since Python 3.9. To support Python 3.8 and older, this " -"line must be conditional::" +"This bit indicates that this is an abstract type and therefore cannot be " +"instantiated." msgstr "" -msgid "" -"#if PY_VERSION_HEX >= 0x03090000\n" -" Py_VISIT(Py_TYPE(self));\n" -"#endif" +#: ../../c-api/typeobj.rst:1547 +msgid ":mod:`abc`" msgstr "" +#: ../../c-api/typeobj.rst:1552 msgid "" -"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" -"`~PyTypeObject.tp_flags` field, the traverse function must call :c:func:" -"`PyObject_VisitManagedDict` like this::" -msgstr "" - -msgid "PyObject_VisitManagedDict((PyObject*)self, visit, arg);" +"Internal. Do not set or unset this flag. Historically, this was a reserved " +"flag for use in Stackless Python." msgstr "" +#: ../../c-api/typeobj.rst:1556 msgid "" -"When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members " -"that the instance *owns* (by having :term:`strong references ` to them) must be visited. For instance, if an object supports " -"weak references via the :c:member:`~PyTypeObject.tp_weaklist` slot, the " -"pointer supporting the linked list (what *tp_weaklist* points to) must " -"**not** be visited as the instance does not directly own the weak references " -"to itself (the weakreference list is there to support the weak reference " -"machinery, but the instance has no strong reference to the elements inside " -"it, as they are allowed to be removed even if the instance is still alive)." +"This flag is present in header files, but is not be used. This may be " +"removed in a future version of CPython." msgstr "" +#: ../../c-api/typeobj.rst:1564 msgid "" -"Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:" -"func:`!local_traverse` to have these specific names; don't name them just " -"anything." +"An optional pointer to a NUL-terminated C string giving the docstring for " +"this type object. This is exposed as the :attr:`~type.__doc__` attribute on " +"the type and instances of the type." msgstr "" -msgid "" -"Instances of :ref:`heap-allocated types ` hold a reference to " -"their type. Their traversal function must therefore either visit :c:func:" -"`Py_TYPE(self) `, or delegate this responsibility by calling " -"``tp_traverse`` of another heap-allocated type (such as a heap-allocated " -"superclass). If they do not, the type object may not be garbage-collected." +#: ../../c-api/typeobj.rst:1570 +msgid "This field is *not* inherited by subtypes." msgstr "" +#: ../../c-api/typeobj.rst:1577 msgid "" -"The :c:member:`~PyTypeObject.tp_traverse` function can be called from any " -"thread." +"An optional pointer to a traversal function for the garbage collector. This " +"is only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set." msgstr "" -msgid "" -"Heap-allocated types are expected to visit ``Py_TYPE(self)`` in " -"``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses." +#: ../../c-api/typeobj.rst:1580 +msgid "See :ref:`gc-traversal` for documentation." msgstr "" +#: ../../c-api/typeobj.rst:1586 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_clear` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" @@ -2079,12 +2637,15 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" +#: ../../c-api/typeobj.rst:1596 msgid "An optional pointer to a clear function. The signature is::" msgstr "" +#: ../../c-api/typeobj.rst:1598 msgid "int tp_clear(PyObject *);" msgstr "" +#: ../../c-api/typeobj.rst:1600 msgid "" "The purpose of this function is to break reference cycles that are causing " "a :term:`cyclic isolate` so that the objects can be safely destroyed. A " @@ -2092,6 +2653,7 @@ msgid "" "to satisfy design invariants held during normal use." msgstr "" +#: ../../c-api/typeobj.rst:1605 msgid "" ":c:member:`!tp_clear` does not need to delete references to objects that " "can't participate in reference cycles, such as Python strings or Python " @@ -2102,37 +2664,44 @@ msgid "" "func:`Py_CLEAR`.)" msgstr "" +#: ../../c-api/typeobj.rst:1613 msgid "" "Any non-trivial cleanup should be performed in :c:member:`~PyTypeObject." "tp_finalize` instead of :c:member:`!tp_clear`." msgstr "" +#: ../../c-api/typeobj.rst:1618 msgid "" "If :c:member:`!tp_clear` fails to break a reference cycle then the objects " "in the :term:`cyclic isolate` may remain indefinitely uncollectable " "(\"leak\"). See :data:`gc.garbage`." msgstr "" +#: ../../c-api/typeobj.rst:1624 msgid "" "Referents (direct and indirect) might have already been cleared; they are " "not guaranteed to be in a consistent state." msgstr "" +#: ../../c-api/typeobj.rst:1629 msgid "" "The :c:member:`~PyTypeObject.tp_clear` function can be called from any " "thread." msgstr "" +#: ../../c-api/typeobj.rst:1634 msgid "" "An object is not guaranteed to be automatically cleared before its " "destructor (:c:member:`~PyTypeObject.tp_dealloc`) is called." msgstr "" +#: ../../c-api/typeobj.rst:1637 msgid "" "This function differs from the destructor (:c:member:`~PyTypeObject." "tp_dealloc`) in the following ways:" msgstr "" +#: ../../c-api/typeobj.rst:1640 msgid "" "The purpose of clearing an object is to remove references to other objects " "that might participate in a reference cycle. The purpose of the destructor, " @@ -2142,6 +2711,7 @@ msgid "" "`~PyTypeObject.tp_free`)." msgstr "" +#: ../../c-api/typeobj.rst:1646 msgid "" "When :c:member:`!tp_clear` is called, other objects might still hold " "references to the object being cleared. Because of this, :c:member:`!" @@ -2151,6 +2721,7 @@ msgid "" "object itself by deallocating it." msgstr "" +#: ../../c-api/typeobj.rst:1652 msgid "" ":c:member:`!tp_clear` might never be automatically called. An object's " "destructor, on the other hand, will be automatically called some time after " @@ -2158,17 +2729,20 @@ msgid "" "object or the object is a member of a :term:`cyclic isolate`)." msgstr "" +#: ../../c-api/typeobj.rst:1657 msgid "" "No guarantees are made about when, if, or how often Python automatically " "clears an object, except:" msgstr "" +#: ../../c-api/typeobj.rst:1660 msgid "" "Python will not automatically clear an object if it is reachable, i.e., " "there is a reference to it and it is not a member of a :term:`cyclic " "isolate`." msgstr "" +#: ../../c-api/typeobj.rst:1663 msgid "" "Python will not automatically clear an object if it has not been " "automatically finalized (see :c:member:`~PyTypeObject.tp_finalize`). (If " @@ -2176,12 +2750,14 @@ msgid "" "automatically finalized again before it is cleared.)" msgstr "" +#: ../../c-api/typeobj.rst:1667 msgid "" "If an object is a member of a :term:`cyclic isolate`, Python will not " "automatically clear it if any member of the cyclic isolate has not yet been " "automatically finalized (:c:member:`~PyTypeObject.tp_finalize`)." msgstr "" +#: ../../c-api/typeobj.rst:1670 msgid "" "Python will not destroy an object until after any automatic calls to its :c:" "member:`!tp_clear` function have returned. This ensures that the act of " @@ -2189,17 +2765,20 @@ msgid "" "member:`!tp_clear` is still executing." msgstr "" +#: ../../c-api/typeobj.rst:1674 msgid "" "Python will not automatically call :c:member:`!tp_clear` multiple times " "concurrently." msgstr "" +#: ../../c-api/typeobj.rst:1677 msgid "" "CPython currently only automatically clears objects as needed to break " "reference cycles in a :term:`cyclic isolate`, but future versions might " "clear objects regularly before their destruction." msgstr "" +#: ../../c-api/typeobj.rst:1681 msgid "" "Taken together, all :c:member:`~PyTypeObject.tp_clear` functions in the " "system must combine to break all reference cycles. This is subtle, and if " @@ -2212,6 +2791,7 @@ msgid "" "good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`." msgstr "" +#: ../../c-api/typeobj.rst:1692 msgid "" "Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the " "instance's references to those of its members that may be Python objects, " @@ -2219,6 +2799,7 @@ msgid "" "example::" msgstr "" +#: ../../c-api/typeobj.rst:1696 msgid "" "static int\n" "local_clear(PyObject *op)\n" @@ -2232,6 +2813,7 @@ msgid "" "}" msgstr "" +#: ../../c-api/typeobj.rst:1707 msgid "" "The :c:func:`Py_CLEAR` macro should be used, because clearing references is " "delicate: the reference to the contained object must not be released (via :" @@ -2246,15 +2828,24 @@ msgid "" "performs the operations in a safe order." msgstr "" +#: ../../c-api/typeobj.rst:1719 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" "`~PyTypeObject.tp_flags` field, the clear function must call :c:func:" "`PyObject_ClearManagedDict` like this::" msgstr "" +#: ../../c-api/typeobj.rst:1723 msgid "PyObject_ClearManagedDict((PyObject*)self);" msgstr "" +#: ../../c-api/typeobj.rst:1725 +msgid "" +"More information about Python's garbage collection scheme can be found in " +"section :ref:`supporting-cycle-detection`." +msgstr "" + +#: ../../c-api/typeobj.rst:1732 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_traverse` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :" @@ -2262,18 +2853,22 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" +#: ../../c-api/typeobj.rst:1746 msgid "" "An optional pointer to the rich comparison function, whose signature is::" msgstr "" +#: ../../c-api/typeobj.rst:1748 msgid "PyObject *tp_richcompare(PyObject *self, PyObject *other, int op);" msgstr "" +#: ../../c-api/typeobj.rst:1750 msgid "" "The first parameter is guaranteed to be an instance of the type that is " "defined by :c:type:`PyTypeObject`." msgstr "" +#: ../../c-api/typeobj.rst:1753 msgid "" "The function should return the result of the comparison (usually ``Py_True`` " "or ``Py_False``). If the comparison is undefined, it must return " @@ -2281,39 +2876,50 @@ msgid "" "set an exception condition." msgstr "" +#: ../../c-api/typeobj.rst:1758 msgid "" "The following constants are defined to be used as the third argument for :c:" "member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:" msgstr "" +#: ../../c-api/typeobj.rst:1764 msgid "Constant" msgstr "" +#: ../../c-api/typeobj.rst:1764 msgid "Comparison" msgstr "" +#: ../../c-api/typeobj.rst:1766 msgid "``<``" msgstr "``<``" +#: ../../c-api/typeobj.rst:1768 msgid "``<=``" msgstr "``<=``" +#: ../../c-api/typeobj.rst:1770 msgid "``==``" msgstr "``==``" +#: ../../c-api/typeobj.rst:1772 msgid "``!=``" msgstr "``!=``" +#: ../../c-api/typeobj.rst:1774 msgid "``>``" msgstr "``>``" +#: ../../c-api/typeobj.rst:1776 msgid "``>=``" msgstr "``>=``" +#: ../../c-api/typeobj.rst:1779 msgid "" "The following macro is defined to ease writing rich comparison functions:" msgstr "" +#: ../../c-api/typeobj.rst:1783 msgid "" "Return ``Py_True`` or ``Py_False`` from the function, depending on the " "result of a comparison. VAL_A and VAL_B must be orderable by C comparison " @@ -2321,12 +2927,15 @@ msgid "" "specifies the requested operation, as for :c:func:`PyObject_RichCompare`." msgstr "" +#: ../../c-api/typeobj.rst:1789 msgid "The returned value is a new :term:`strong reference`." msgstr "" +#: ../../c-api/typeobj.rst:1791 msgid "On error, sets an exception and returns ``NULL`` from the function." msgstr "" +#: ../../c-api/typeobj.rst:1799 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:" @@ -2334,6 +2943,7 @@ msgid "" "tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" +#: ../../c-api/typeobj.rst:1806 msgid "" ":c:data:`PyBaseObject_Type` provides a :c:member:`~PyTypeObject." "tp_richcompare` implementation, which may be inherited. However, if only :c:" @@ -2342,11 +2952,13 @@ msgid "" "comparisons." msgstr "" +#: ../../c-api/typeobj.rst:1815 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` " "should be used instead, if at all possible." msgstr "" +#: ../../c-api/typeobj.rst:1818 msgid "" "If the instances of this type are weakly referenceable, this field is " "greater than zero and contains the offset in the instance structure of the " @@ -2356,16 +2968,19 @@ msgid "" "`PyObject*` which is initialized to ``NULL``." msgstr "" +#: ../../c-api/typeobj.rst:1825 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that " "is the list head for weak references to the type object itself." msgstr "" +#: ../../c-api/typeobj.rst:1828 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " "and :c:member:`~PyTypeObject.tp_weaklistoffset`." msgstr "" +#: ../../c-api/typeobj.rst:1833 msgid "" "This field is inherited by subtypes, but see the rules listed below. A " "subtype may override this offset; this means that the subtype uses a " @@ -2374,6 +2989,7 @@ msgid "" "not be a problem." msgstr "" +#: ../../c-api/typeobj.rst:1840 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the :c:member:" "`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject." @@ -2381,89 +2997,107 @@ msgid "" "unsafe to use this field." msgstr "" +#: ../../c-api/typeobj.rst:1850 msgid "" "An optional pointer to a function that returns an :term:`iterator` for the " "object. Its presence normally signals that the instances of this type are :" "term:`iterable` (although sequences may be iterable without this function)." msgstr "" +#: ../../c-api/typeobj.rst:1854 msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" msgstr "" +#: ../../c-api/typeobj.rst:1856 msgid "PyObject *tp_iter(PyObject *self);" msgstr "" +#: ../../c-api/typeobj.rst:1867 msgid "" "An optional pointer to a function that returns the next item in an :term:" "`iterator`. The signature is::" msgstr "" +#: ../../c-api/typeobj.rst:1870 msgid "PyObject *tp_iternext(PyObject *self);" msgstr "" +#: ../../c-api/typeobj.rst:1872 msgid "" -"When the iterator is exhausted, it must return ``NULL``; a :exc:" -"`StopIteration` exception may or may not be set. When another error occurs, " -"it must return ``NULL`` too. Its presence signals that the instances of " -"this type are iterators." +"When the iterator is :term:`exhausted`, the ``tp_iternext`` function must " +"return ``NULL``; a :exc:`StopIteration` exception may or may not be set. " +"When another error occurs, it must return ``NULL`` too. The presence of " +"``tp_iternext`` signals that the instances of this type are iterators." msgstr "" +#: ../../c-api/typeobj.rst:1878 msgid "" "Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` " "function, and that function should return the iterator instance itself (not " "a new iterator instance)." msgstr "" +#: ../../c-api/typeobj.rst:1882 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "" +#: ../../c-api/typeobj.rst:1893 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMethodDef` structures, declaring regular methods of this type." msgstr "" +#: ../../c-api/typeobj.rst:1896 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor." msgstr "" +#: ../../c-api/typeobj.rst:1901 msgid "" "This field is not inherited by subtypes (methods are inherited through a " "different mechanism)." msgstr "" +#: ../../c-api/typeobj.rst:1909 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMemberDef` structures, declaring regular data members (fields or slots) " "of instances of this type." msgstr "" +#: ../../c-api/typeobj.rst:1913 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor." msgstr "" +#: ../../c-api/typeobj.rst:1918 msgid "" "This field is not inherited by subtypes (members are inherited through a " "different mechanism)." msgstr "" +#: ../../c-api/typeobj.rst:1926 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyGetSetDef` structures, declaring computed attributes of instances of this " "type." msgstr "" +#: ../../c-api/typeobj.rst:1929 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor." msgstr "" +#: ../../c-api/typeobj.rst:1934 msgid "" "This field is not inherited by subtypes (computed attributes are inherited " "through a different mechanism)." msgstr "" +#: ../../c-api/typeobj.rst:1940 msgid "" "An optional pointer to a base type from which type properties are " "inherited. At this level, only single inheritance is supported; multiple " @@ -2471,6 +3105,11 @@ msgid "" "metatype." msgstr "" +#: ../../c-api/typeobj.rst:1944 +msgid "For the corresponding slot ID, see :c:macro:`Py_tp_base`." +msgstr "" + +#: ../../c-api/typeobj.rst:1950 msgid "" "Slot initialization is subject to the rules of initializing globals. C99 " "requires the initializers to be \"address constants\". Function designators " @@ -2478,6 +3117,7 @@ msgid "" "valid C99 address constants." msgstr "" +#: ../../c-api/typeobj.rst:1955 msgid "" "However, the unary '&' operator applied to a non-static variable like :c:" "data:`PyBaseObject_Type` is not required to produce an address constant. " @@ -2485,22 +3125,27 @@ msgid "" "strictly standard conforming in this particular behavior." msgstr "" +#: ../../c-api/typeobj.rst:1961 msgid "" "Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " "extension module's init function." msgstr "" +#: ../../c-api/typeobj.rst:1966 msgid "This field is not inherited by subtypes (obviously)." msgstr "" +#: ../../c-api/typeobj.rst:1970 msgid "" "This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " "is known as the type :class:`object`)." msgstr "" +#: ../../c-api/typeobj.rst:1976 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" +#: ../../c-api/typeobj.rst:1978 msgid "" "This field should normally be initialized to ``NULL`` before PyType_Ready is " "called; it may also be initialized to a dictionary containing initial " @@ -2511,57 +3156,72 @@ msgid "" "be treated as read-only." msgstr "" +#: ../../c-api/typeobj.rst:1986 msgid "" "Some types may not store their dictionary in this slot. Use :c:func:" "`PyType_GetDict` to retrieve the dictionary for an arbitrary type." msgstr "" +#: ../../c-api/typeobj.rst:1992 msgid "" "Internals detail: For static builtin types, this is always ``NULL``. " "Instead, the dict for such types is stored on ``PyInterpreterState``. Use :c:" "func:`PyType_GetDict` to get the dict for an arbitrary type." msgstr "" +#: ../../c-api/typeobj.rst:1998 msgid "" "This field is not inherited by subtypes (though the attributes defined in " "here are inherited through a different mechanism)." msgstr "" +#: ../../c-api/typeobj.rst:2003 msgid "" "If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " "dictionary to it." msgstr "" +#: ../../c-api/typeobj.rst:2008 msgid "" "It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:" "member:`~PyTypeObject.tp_dict` with the dictionary C-API." msgstr "" +#: ../../c-api/typeobj.rst:2016 msgid "An optional pointer to a \"descriptor get\" function." msgstr "" +#: ../../c-api/typeobj.rst:2018 ../../c-api/typeobj.rst:2036 +#: ../../c-api/typeobj.rst:2102 ../../c-api/typeobj.rst:2134 +#: ../../c-api/typeobj.rst:2159 msgid "The function signature is::" msgstr "" +#: ../../c-api/typeobj.rst:2020 msgid "PyObject * tp_descr_get(PyObject *self, PyObject *obj, PyObject *type);" msgstr "" +#: ../../c-api/typeobj.rst:2033 msgid "" "An optional pointer to a function for setting and deleting a descriptor's " "value." msgstr "" +#: ../../c-api/typeobj.rst:2038 msgid "int tp_descr_set(PyObject *self, PyObject *obj, PyObject *value);" msgstr "" +#: ../../c-api/typeobj.rst:2040 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "" +#: ../../c-api/typeobj.rst:2051 msgid "" "While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_DICT` " "should be used instead, if at all possible." msgstr "" +#: ../../c-api/typeobj.rst:2054 msgid "" "If the instances of this type have a dictionary containing instance " "variables, this field is non-zero and contains the offset in the instances " @@ -2569,16 +3229,19 @@ msgid "" "func:`PyObject_GenericGetAttr`." msgstr "" +#: ../../c-api/typeobj.rst:2059 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is " "the dictionary for attributes of the type object itself." msgstr "" +#: ../../c-api/typeobj.rst:2062 msgid "" "The value specifies the offset of the dictionary from the start of the " "instance structure." msgstr "" +#: ../../c-api/typeobj.rst:2064 msgid "" "The :c:member:`~PyTypeObject.tp_dictoffset` should be regarded as write-" "only. To get the pointer to the dictionary call :c:func:" @@ -2587,11 +3250,13 @@ msgid "" "to call :c:func:`PyObject_GetAttr` when accessing an attribute on the object." msgstr "" +#: ../../c-api/typeobj.rst:2070 msgid "" "It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit and :c:" "member:`~PyTypeObject.tp_dictoffset`." msgstr "" +#: ../../c-api/typeobj.rst:2075 msgid "" "This field is inherited by subtypes. A subtype should not override this " "offset; doing so could be unsafe, if C code tries to access the dictionary " @@ -2599,21 +3264,25 @@ msgid "" "`Py_TPFLAGS_MANAGED_DICT`." msgstr "" +#: ../../c-api/typeobj.rst:2082 msgid "" "This slot has no default. For :ref:`static types `, if the " "field is ``NULL`` then no :attr:`~object.__dict__` gets created for " "instances." msgstr "" +#: ../../c-api/typeobj.rst:2085 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" "`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject.tp_dictoffset` " "will be set to ``-1``, to indicate that it is unsafe to use this field." msgstr "" +#: ../../c-api/typeobj.rst:2095 msgid "An optional pointer to an instance initialization function." msgstr "" +#: ../../c-api/typeobj.rst:2097 msgid "" "This function corresponds to the :meth:`~object.__init__` method of " "classes. Like :meth:`!__init__`, it is possible to create an instance " @@ -2621,15 +3290,18 @@ msgid "" "instance by calling its :meth:`!__init__` method again." msgstr "" +#: ../../c-api/typeobj.rst:2104 msgid "int tp_init(PyObject *self, PyObject *args, PyObject *kwds);" msgstr "" +#: ../../c-api/typeobj.rst:2106 msgid "" "The self argument is the instance to be initialized; the *args* and *kwds* " "arguments represent positional and keyword arguments of the call to :meth:" "`~object.__init__`." msgstr "" +#: ../../c-api/typeobj.rst:2110 msgid "" "The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called " "when an instance is created normally by calling its type, after the type's :" @@ -2641,41 +3313,52 @@ msgid "" "subtype's :c:member:`~PyTypeObject.tp_init` is called." msgstr "" +#: ../../c-api/typeobj.rst:2117 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" +#: ../../c-api/typeobj.rst:2125 msgid "" "For :ref:`static types ` this field does not have a default." msgstr "" +#: ../../c-api/typeobj.rst:2132 msgid "An optional pointer to an instance allocation function." msgstr "" +#: ../../c-api/typeobj.rst:2136 msgid "PyObject *tp_alloc(PyTypeObject *self, Py_ssize_t nitems);" msgstr "" +#: ../../c-api/typeobj.rst:2140 msgid "" "Static subtypes inherit this slot, which will be :c:func:" "`PyType_GenericAlloc` if inherited from :class:`object`." msgstr "" +#: ../../c-api/typeobj.rst:2143 ../../c-api/typeobj.rst:2214 msgid ":ref:`Heap subtypes ` do not inherit this slot." msgstr "" +#: ../../c-api/typeobj.rst:2147 msgid "" "For heap subtypes, this field is always set to :c:func:`PyType_GenericAlloc`." msgstr "" +#: ../../c-api/typeobj.rst:2150 ../../c-api/typeobj.rst:2222 msgid "For static subtypes, this slot is inherited (see above)." msgstr "" +#: ../../c-api/typeobj.rst:2157 msgid "An optional pointer to an instance creation function." msgstr "" +#: ../../c-api/typeobj.rst:2161 msgid "" "PyObject *tp_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds);" msgstr "" +#: ../../c-api/typeobj.rst:2163 msgid "" "The *subtype* argument is the type of the object being created; the *args* " "and *kwds* arguments represent positional and keyword arguments of the call " @@ -2684,6 +3367,7 @@ msgid "" "that type (but not an unrelated type)." msgstr "" +#: ../../c-api/typeobj.rst:2169 msgid "" "The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" ">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " @@ -2695,17 +3379,20 @@ msgid "" "be deferred to :c:member:`~PyTypeObject.tp_init`." msgstr "" +#: ../../c-api/typeobj.rst:2177 msgid "" "Set the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow " "creating instances of the type in Python." msgstr "" +#: ../../c-api/typeobj.rst:2182 msgid "" "This field is inherited by subtypes, except it is not inherited by :ref:" "`static types ` whose :c:member:`~PyTypeObject.tp_base` is " "``NULL`` or ``&PyBaseObject_Type``." msgstr "" +#: ../../c-api/typeobj.rst:2188 msgid "" "For :ref:`static types ` this field has no default. This means " "if the slot is defined as ``NULL``, the type cannot be called to create new " @@ -2713,18 +3400,22 @@ msgid "" "factory function." msgstr "" +#: ../../c-api/typeobj.rst:2198 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" +#: ../../c-api/typeobj.rst:2200 msgid "void tp_free(void *self);" msgstr "" +#: ../../c-api/typeobj.rst:2202 msgid "" "This function must free the memory allocated by :c:member:`~PyTypeObject." "tp_alloc`." msgstr "" +#: ../../c-api/typeobj.rst:2207 msgid "" "Static subtypes inherit this slot, which will be :c:func:`PyObject_Free` if " "inherited from :class:`object`. Exception: If the type supports garbage " @@ -2733,15 +3424,18 @@ msgid "" "this slot is not inherited but instead defaults to :c:func:`PyObject_GC_Del`." msgstr "" +#: ../../c-api/typeobj.rst:2218 msgid "" "For :ref:`heap subtypes `, this slot defaults to a deallocator " "suitable to match :c:func:`PyType_GenericAlloc` and the value of the :c:" "macro:`Py_TPFLAGS_HAVE_GC` flag." msgstr "" +#: ../../c-api/typeobj.rst:2229 msgid "An optional pointer to a function called by the garbage collector." msgstr "" +#: ../../c-api/typeobj.rst:2231 msgid "" "The garbage collector needs to know whether a particular object is " "collectible or not. Normally, it is sufficient to look at the object's " @@ -2753,75 +3447,90 @@ msgid "" "instance. The signature is::" msgstr "" +#: ../../c-api/typeobj.rst:2239 msgid "int tp_is_gc(PyObject *self);" msgstr "" +#: ../../c-api/typeobj.rst:2241 msgid "" "(The only example of this are types themselves. The metatype, :c:data:" "`PyType_Type`, defines this function to distinguish between statically and :" "ref:`dynamically allocated types `.)" msgstr "" +#: ../../c-api/typeobj.rst:2251 msgid "" "This slot has no default. If this field is ``NULL``, :c:macro:" "`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." msgstr "" +#: ../../c-api/typeobj.rst:2257 msgid "Tuple of base types." msgstr "" +#: ../../c-api/typeobj.rst:2259 ../../c-api/typeobj.rst:2280 msgid "" "This field should be set to ``NULL`` and treated as read-only. Python will " "fill it in when the type is :c:func:`initialized `." msgstr "" -msgid "" -"For dynamically created classes, the ``Py_tp_bases`` :c:type:`slot " -"` can be used instead of the *bases* argument of :c:func:" -"`PyType_FromSpecWithBases`. The argument form is preferred." +#: ../../c-api/typeobj.rst:2262 +msgid "For the corresponding slot ID, see :c:macro:`Py_tp_bases`." msgstr "" +#: ../../c-api/typeobj.rst:2266 msgid "" "Multiple inheritance does not work well for statically defined types. If you " "set ``tp_bases`` to a tuple, Python will not raise an error, but some slots " "will only be inherited from the first base." msgstr "" +#: ../../c-api/typeobj.rst:2272 ../../c-api/typeobj.rst:2295 +#: ../../c-api/typeobj.rst:2312 ../../c-api/typeobj.rst:2329 +#: ../../c-api/typeobj.rst:2345 msgid "This field is not inherited." msgstr "" +#: ../../c-api/typeobj.rst:2277 msgid "" "Tuple containing the expanded set of base types, starting with the type " "itself and ending with :class:`object`, in Method Resolution Order." msgstr "" +#: ../../c-api/typeobj.rst:2285 msgid "" "This field is not inherited; it is calculated fresh by :c:func:" "`PyType_Ready`." msgstr "" +#: ../../c-api/typeobj.rst:2291 msgid "Unused. Internal use only." msgstr "" +#: ../../c-api/typeobj.rst:2300 msgid "" "A collection of subclasses. Internal use only. May be an invalid pointer." msgstr "" +#: ../../c-api/typeobj.rst:2302 msgid "" "To get a list of subclasses, call the Python method :py:meth:`~type." "__subclasses__`." msgstr "" +#: ../../c-api/typeobj.rst:2307 msgid "" "For some types, this field does not hold a valid :c:expr:`PyObject*`. The " "type was changed to :c:expr:`void*` to indicate this." msgstr "" +#: ../../c-api/typeobj.rst:2317 msgid "" "Weak reference list head, for weak references to this type object. Not " "inherited. Internal use only." msgstr "" +#: ../../c-api/typeobj.rst:2322 msgid "" "Internals detail: For the static builtin types this is always ``NULL``, even " "if weakrefs are added. Instead, the weakrefs for each are stored on " @@ -2829,22 +3538,27 @@ msgid "" "``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction." msgstr "" +#: ../../c-api/typeobj.rst:2336 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" +#: ../../c-api/typeobj.rst:2341 msgid "Used to index into the method cache. Internal use only." msgstr "" +#: ../../c-api/typeobj.rst:2352 msgid "" "An optional pointer to an instance finalization function. This is the C " "implementation of the :meth:`~object.__del__` special method. Its signature " "is::" msgstr "" +#: ../../c-api/typeobj.rst:2356 msgid "void tp_finalize(PyObject *self);" msgstr "" +#: ../../c-api/typeobj.rst:2358 msgid "" "The primary purpose of finalization is to perform any non-trivial cleanup " "that must be performed before the object is destroyed, while the object and " @@ -2852,6 +3566,7 @@ msgid "" "consistent state. The finalizer is allowed to execute arbitrary Python code." msgstr "" +#: ../../c-api/typeobj.rst:2364 msgid "" "Before Python automatically finalizes an object, some of the object's direct " "or indirect referents might have themselves been automatically finalized. " @@ -2859,12 +3574,14 @@ msgid "" "member:`~PyTypeObject.tp_clear`) yet." msgstr "" +#: ../../c-api/typeobj.rst:2369 msgid "" "Other non-finalized objects might still be using a finalized object, so the " "finalizer must leave the object in a sane state (e.g., invariants are still " "met)." msgstr "" +#: ../../c-api/typeobj.rst:2375 msgid "" "After Python automatically finalizes an object, Python might start " "automatically clearing (:c:member:`~PyTypeObject.tp_clear`) the object and " @@ -2873,6 +3590,7 @@ msgid "" "cleared referents." msgstr "" +#: ../../c-api/typeobj.rst:2383 msgid "" "An object is not guaranteed to be automatically finalized before its " "destructor (:c:member:`~PyTypeObject.tp_dealloc`) is called. It is " @@ -2881,21 +3599,25 @@ msgid "" "finalized before destruction." msgstr "" +#: ../../c-api/typeobj.rst:2391 msgid "" "The :c:member:`~PyTypeObject.tp_finalize` function can be called from any " "thread, although the :term:`GIL` will be held." msgstr "" +#: ../../c-api/typeobj.rst:2396 msgid "" "The :c:member:`!tp_finalize` function can be called during shutdown, after " "some global variables have been deleted. See the documentation of the :meth:" "`~object.__del__` method for details." msgstr "" +#: ../../c-api/typeobj.rst:2400 msgid "" "When Python finalizes an object, it behaves like the following algorithm:" msgstr "" +#: ../../c-api/typeobj.rst:2402 msgid "" "Python might mark the object as *finalized*. Currently, Python always marks " "objects whose type supports garbage collection (i.e., the :c:macro:" @@ -2903,11 +3625,13 @@ msgid "" "never marks other types of objects; this might change in a future version." msgstr "" +#: ../../c-api/typeobj.rst:2407 msgid "" "If the object is not marked as *finalized* and its :c:member:`!tp_finalize` " "finalizer function is non-``NULL``, the finalizer function is called." msgstr "" +#: ../../c-api/typeobj.rst:2410 msgid "" "If the finalizer function was called and the finalizer made the object " "reachable (i.e., there is a reference to the object and it is not a member " @@ -2917,6 +3641,7 @@ msgid "" "make it reachable, i.e., the object is (still) a member of a cyclic isolate." msgstr "" +#: ../../c-api/typeobj.rst:2417 msgid "" "If the finalizer resurrected the object, the object's pending destruction is " "canceled and the object's *finalized* mark might be removed if present. " @@ -2924,6 +3649,7 @@ msgid "" "future version." msgstr "" +#: ../../c-api/typeobj.rst:2422 msgid "" "*Automatic finalization* refers to any finalization performed by Python " "except via calls to :c:func:`PyObject_CallFinalizer` or :c:func:" @@ -2931,12 +3657,14 @@ msgid "" "or how often an object is automatically finalized, except:" msgstr "" +#: ../../c-api/typeobj.rst:2427 msgid "" "Python will not automatically finalize an object if it is reachable, i.e., " "there is a reference to it and it is not a member of a :term:`cyclic " "isolate`." msgstr "" +#: ../../c-api/typeobj.rst:2430 msgid "" "Python will not automatically finalize an object if finalizing it would not " "mark the object as *finalized*. Currently, this applies to objects whose " @@ -2946,45 +3674,53 @@ msgid "" "`PyObject_CallFinalizerFromDealloc`." msgstr "" +#: ../../c-api/typeobj.rst:2436 msgid "" "Python will not automatically finalize any two members of a :term:`cyclic " "isolate` concurrently." msgstr "" +#: ../../c-api/typeobj.rst:2438 msgid "" "Python will not automatically finalize an object after it has automatically " "cleared (:c:member:`~PyTypeObject.tp_clear`) the object." msgstr "" +#: ../../c-api/typeobj.rst:2440 msgid "" "If an object is a member of a :term:`cyclic isolate`, Python will not " "automatically finalize it after automatically clearing (see :c:member:" "`~PyTypeObject.tp_clear`) any other member." msgstr "" +#: ../../c-api/typeobj.rst:2443 msgid "" "Python will automatically finalize every member of a :term:`cyclic isolate` " "before it automatically clears (see :c:member:`~PyTypeObject.tp_clear`) any " "of them." msgstr "" +#: ../../c-api/typeobj.rst:2446 msgid "" "If Python is going to automatically clear an object (:c:member:" "`~PyTypeObject.tp_clear`), it will automatically finalize the object first." msgstr "" +#: ../../c-api/typeobj.rst:2450 msgid "" "Python currently only automatically finalizes objects that are members of a :" "term:`cyclic isolate`, but future versions might finalize objects regularly " "before their destruction." msgstr "" +#: ../../c-api/typeobj.rst:2454 msgid "" "To manually finalize an object, do not call this function directly; call :c:" "func:`PyObject_CallFinalizer` or :c:func:`PyObject_CallFinalizerFromDealloc` " "instead." msgstr "" +#: ../../c-api/typeobj.rst:2458 msgid "" ":c:member:`~PyTypeObject.tp_finalize` should leave the current exception " "status unchanged. The recommended way to write a non-trivial finalizer is " @@ -2995,6 +3731,7 @@ msgid "" "`PyErr_WriteUnraisable` or :c:func:`PyErr_FormatUnraisable`. For example::" msgstr "" +#: ../../c-api/typeobj.rst:2467 msgid "" "static void\n" "foo_finalize(PyObject *self)\n" @@ -3017,21 +3754,26 @@ msgid "" "}" msgstr "" +#: ../../c-api/typeobj.rst:2495 msgid "" "Before version 3.8 it was necessary to set the :c:macro:" "`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be used. " "This is no longer required." msgstr "" +#: ../../c-api/typeobj.rst:2501 msgid ":pep:`442`: \"Safe object finalization\"" msgstr "" +#: ../../c-api/typeobj.rst:2504 msgid ":c:func:`PyObject_CallFinalizer`" msgstr "" +#: ../../c-api/typeobj.rst:2505 msgid ":c:func:`PyObject_CallFinalizerFromDealloc`" msgstr "" +#: ../../c-api/typeobj.rst:2512 msgid "" "A :ref:`vectorcall function ` to use for calls of this type " "object (rather than instances). In other words, ``tp_vectorcall`` can be " @@ -3039,11 +3781,13 @@ msgid "" "of *type*." msgstr "" +#: ../../c-api/typeobj.rst:2517 msgid "" "As with any vectorcall function, if ``tp_vectorcall`` is ``NULL``, the " "*tp_call* protocol (``Py_TYPE(type)->tp_call``) is used instead." msgstr "" +#: ../../c-api/typeobj.rst:2522 msgid "" "The :ref:`vectorcall protocol ` requires that the vectorcall " "function has the same behavior as the corresponding ``tp_call``. This means " @@ -3051,22 +3795,27 @@ msgid "" ">tp_call``." msgstr "" +#: ../../c-api/typeobj.rst:2527 msgid "" "Specifically, if *type* uses the default metaclass, ``type->tp_vectorcall`` " "must behave the same as :c:expr:`PyType_Type->tp_call`, which:" msgstr "" +#: ../../c-api/typeobj.rst:2531 msgid "calls ``type->tp_new``," msgstr "" +#: ../../c-api/typeobj.rst:2533 msgid "" "if the result is a subclass of *type*, calls ``type->tp_init`` on the result " "of ``tp_new``, and" msgstr "" +#: ../../c-api/typeobj.rst:2536 msgid "returns the result of ``tp_new``." msgstr "" +#: ../../c-api/typeobj.rst:2538 msgid "" "Typically, ``tp_vectorcall`` is overridden to optimize this process for " "specific :c:member:`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject." @@ -3075,53 +3824,65 @@ msgid "" "__init__`, respectively)." msgstr "" +#: ../../c-api/typeobj.rst:2549 msgid "This field is never inherited." msgstr "" +#: ../../c-api/typeobj.rst:2551 msgid "(the field exists since 3.8 but it's only used since 3.9)" msgstr "" +#: ../../c-api/typeobj.rst:2556 msgid "Internal. Do not use." msgstr "" +#: ../../c-api/typeobj.rst:2564 msgid "Static Types" msgstr "" +#: ../../c-api/typeobj.rst:2566 msgid "" "Traditionally, types defined in C code are *static*, that is, a static :c:" "type:`PyTypeObject` structure is defined directly in code and initialized " "using :c:func:`PyType_Ready`." msgstr "" +#: ../../c-api/typeobj.rst:2570 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" +#: ../../c-api/typeobj.rst:2572 msgid "" "Static types are limited to one base, i.e. they cannot use multiple " "inheritance." msgstr "" +#: ../../c-api/typeobj.rst:2574 msgid "" "Static type objects (but not necessarily their instances) are immutable. It " "is not possible to add or modify the type object's attributes from Python." msgstr "" +#: ../../c-api/typeobj.rst:2576 msgid "" "Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" "specific state." msgstr "" +#: ../../c-api/typeobj.rst:2580 msgid "" "Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API " "` as an opaque struct, any extension modules using static " "types must be compiled for a specific Python minor version." msgstr "" +#: ../../c-api/typeobj.rst:2588 msgid "Heap Types" msgstr "" +#: ../../c-api/typeobj.rst:2590 msgid "" "An alternative to :ref:`static types ` is *heap-allocated " "types*, or *heap types* for short, which correspond closely to classes " @@ -3129,24 +3890,29 @@ msgid "" "`Py_TPFLAGS_HEAPTYPE` flag set." msgstr "" +#: ../../c-api/typeobj.rst:2595 msgid "" "This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" "func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, :c:func:" "`PyType_FromModuleAndSpec`, or :c:func:`PyType_FromMetaclass`." msgstr "" +#: ../../c-api/typeobj.rst:2603 msgid "Number Object Structures" msgstr "" +#: ../../c-api/typeobj.rst:2607 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the number protocol. Each function is used by the function of " "similar name documented in the :ref:`number` section." msgstr "" +#: ../../c-api/typeobj.rst:2613 ../../c-api/typeobj.rst:3085 msgid "Here is the structure definition::" msgstr "" +#: ../../c-api/typeobj.rst:2615 msgid "" "typedef struct {\n" " binaryfunc nb_add;\n" @@ -3192,6 +3958,7 @@ msgid "" "} PyNumberMethods;" msgstr "" +#: ../../c-api/typeobj.rst:2660 msgid "" "Binary and ternary functions must check the type of all their operands, and " "implement the necessary conversions (at least one of the operands is an " @@ -3201,26 +3968,31 @@ msgid "" "and set an exception." msgstr "" +#: ../../c-api/typeobj.rst:2669 msgid "" "The :c:member:`~PyNumberMethods.nb_reserved` field should always be " "``NULL``. It was previously called :c:member:`!nb_long`, and was renamed in " "Python 3.0.1." msgstr "" +#: ../../c-api/typeobj.rst:2820 msgid "Mapping Object Structures" msgstr "" +#: ../../c-api/typeobj.rst:2824 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the mapping protocol. It has three members:" msgstr "" +#: ../../c-api/typeobj.rst:2831 msgid "" "This function is used by :c:func:`PyMapping_Size` and :c:func:" "`PyObject_Size`, and has the same signature. This slot may be set to " "``NULL`` if the object has no defined length." msgstr "" +#: ../../c-api/typeobj.rst:2839 msgid "" "This function is used by :c:func:`PyObject_GetItem` and :c:func:" "`PySequence_GetSlice`, and has the same signature as :c:func:`!" @@ -3228,6 +4000,7 @@ msgid "" "`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." msgstr "" +#: ../../c-api/typeobj.rst:2849 msgid "" "This function is used by :c:func:`PyObject_SetItem`, :c:func:" "`PyObject_DelItem`, :c:func:`PySequence_SetSlice` and :c:func:" @@ -3237,14 +4010,17 @@ msgid "" "deletion." msgstr "" +#: ../../c-api/typeobj.rst:2860 msgid "Sequence Object Structures" msgstr "" +#: ../../c-api/typeobj.rst:2864 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the sequence protocol." msgstr "" +#: ../../c-api/typeobj.rst:2871 msgid "" "This function is used by :c:func:`PySequence_Size` and :c:func:" "`PyObject_Size`, and has the same signature. It is also used for handling " @@ -3252,18 +4028,21 @@ msgid "" "member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" +#: ../../c-api/typeobj.rst:2880 msgid "" "This function is used by :c:func:`PySequence_Concat` and has the same " "signature. It is also used by the ``+`` operator, after trying the numeric " "addition via the :c:member:`~PyNumberMethods.nb_add` slot." msgstr "" +#: ../../c-api/typeobj.rst:2888 msgid "" "This function is used by :c:func:`PySequence_Repeat` and has the same " "signature. It is also used by the ``*`` operator, after trying numeric " "multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot." msgstr "" +#: ../../c-api/typeobj.rst:2896 msgid "" "This function is used by :c:func:`PySequence_GetItem` and has the same " "signature. It is also used by :c:func:`PyObject_GetItem`, after trying the " @@ -3272,6 +4051,7 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" +#: ../../c-api/typeobj.rst:2902 msgid "" "Negative indexes are handled as follows: if the :c:member:" "`~PySequenceMethods.sq_length` slot is filled, it is called and the sequence " @@ -3280,6 +4060,7 @@ msgid "" "index is passed as is to the function." msgstr "" +#: ../../c-api/typeobj.rst:2911 msgid "" "This function is used by :c:func:`PySequence_SetItem` and has the same " "signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:" @@ -3288,12 +4069,14 @@ msgid "" "``NULL`` if the object does not support item assignment and deletion." msgstr "" +#: ../../c-api/typeobj.rst:2922 msgid "" "This function may be used by :c:func:`PySequence_Contains` and has the same " "signature. This slot may be left to ``NULL``, in this case :c:func:`!" "PySequence_Contains` simply traverses the sequence until it finds a match." msgstr "" +#: ../../c-api/typeobj.rst:2931 msgid "" "This function is used by :c:func:`PySequence_InPlaceConcat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3303,6 +4086,7 @@ msgid "" "c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" +#: ../../c-api/typeobj.rst:2942 msgid "" "This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -3312,60 +4096,110 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" +#: ../../c-api/typeobj.rst:2953 msgid "Buffer Object Structures" msgstr "" +#: ../../c-api/typeobj.rst:2957 msgid "" "This structure holds pointers to the functions required by the :ref:`Buffer " "protocol `. The protocol defines how an exporter object can " "expose its internal data to consumer objects." msgstr "" +#: ../../c-api/typeobj.rst:2965 ../../c-api/typeobj.rst:3034 +#: ../../c-api/typeobj.rst:3098 ../../c-api/typeobj.rst:3111 +#: ../../c-api/typeobj.rst:3125 ../../c-api/typeobj.rst:3137 msgid "The signature of this function is::" msgstr "" +#: ../../c-api/typeobj.rst:2967 msgid "int (PyObject *exporter, Py_buffer *view, int flags);" msgstr "" +#: ../../c-api/typeobj.rst:2969 msgid "" "Handle a request to *exporter* to fill in *view* as specified by *flags*. " "Except for point (3), an implementation of this function MUST take these " "steps:" msgstr "" +#: ../../c-api/typeobj.rst:2973 msgid "" -"Check if the request can be met. If not, raise :exc:`BufferError`, set :c:" -"expr:`view->obj` to ``NULL`` and return ``-1``." +"Check if the request can be met. If not, raise :exc:`BufferError`, set " +"``view->obj`` to ``NULL`` and return ``-1``." msgstr "" +#: ../../c-api/typeobj.rst:2976 msgid "Fill in the requested fields." msgstr "" +#: ../../c-api/typeobj.rst:2978 msgid "Increment an internal counter for the number of exports." msgstr "" -msgid "" -"Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`." +#: ../../c-api/typeobj.rst:2980 +msgid "Set ``view->obj`` to *exporter* and increment ``view->obj``." msgstr "" +#: ../../c-api/typeobj.rst:2982 msgid "Return ``0``." msgstr "" +#: ../../c-api/typeobj.rst:2984 ../../c-api/typeobj.rst:3047 +msgid "**Thread safety:**" +msgstr "" + +#: ../../c-api/typeobj.rst:2986 +msgid "In the :term:`free-threaded build`, implementations must ensure:" +msgstr "" + +#: ../../c-api/typeobj.rst:2988 +msgid "The export counter increment in step (3) is atomic." +msgstr "" + +#: ../../c-api/typeobj.rst:2990 +msgid "" +"The underlying buffer data remains valid and at a stable memory location for " +"the lifetime of all exports." +msgstr "" + +#: ../../c-api/typeobj.rst:2993 +msgid "" +"For objects that support resizing or reallocation (such as :class:" +"`bytearray`), the export counter is checked atomically before such " +"operations, and :exc:`BufferError` is raised if exports exist." +msgstr "" + +#: ../../c-api/typeobj.rst:2997 +msgid "The function is safe to call concurrently from multiple threads." +msgstr "" + +#: ../../c-api/typeobj.rst:2999 +msgid "" +"See also :ref:`thread-safety-memoryview` for the Python-level thread safety " +"guarantees of :class:`memoryview` objects." +msgstr "" + +#: ../../c-api/typeobj.rst:3002 msgid "" "If *exporter* is part of a chain or tree of buffer providers, two main " "schemes can be used:" msgstr "" +#: ../../c-api/typeobj.rst:3005 msgid "" -"Re-export: Each member of the tree acts as the exporting object and sets :c:" -"expr:`view->obj` to a new reference to itself." +"Re-export: Each member of the tree acts as the exporting object and sets " +"``view->obj`` to a new reference to itself." msgstr "" +#: ../../c-api/typeobj.rst:3008 msgid "" "Redirect: The buffer request is redirected to the root object of the tree. " -"Here, :c:expr:`view->obj` will be a new reference to the root object." +"Here, ``view->obj`` will be a new reference to the root object." msgstr "" +#: ../../c-api/typeobj.rst:3012 msgid "" "The individual fields of *view* are described in section :ref:`Buffer " "structure `, the rules how an exporter must react to " @@ -3373,6 +4207,7 @@ msgid "" "types>`." msgstr "" +#: ../../c-api/typeobj.rst:3017 msgid "" "All memory pointed to in the :c:type:`Py_buffer` structure belongs to the " "exporter and must remain valid until there are no consumers left. :c:member:" @@ -3381,19 +4216,23 @@ msgid "" "internal` are read-only for the consumer." msgstr "" +#: ../../c-api/typeobj.rst:3024 msgid "" ":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes " "buffer while dealing correctly with all request types." msgstr "" +#: ../../c-api/typeobj.rst:3027 msgid "" ":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " "this function." msgstr "" +#: ../../c-api/typeobj.rst:3036 msgid "void (PyObject *exporter, Py_buffer *view);" msgstr "" +#: ../../c-api/typeobj.rst:3038 msgid "" "Handle a request to release the resources of the buffer. If no resources " "need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be " @@ -3401,12 +4240,30 @@ msgid "" "these optional steps:" msgstr "" +#: ../../c-api/typeobj.rst:3043 msgid "Decrement an internal counter for the number of exports." msgstr "" +#: ../../c-api/typeobj.rst:3045 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" +#: ../../c-api/typeobj.rst:3049 +msgid "In the :term:`free-threaded build`:" +msgstr "" + +#: ../../c-api/typeobj.rst:3051 +msgid "The export counter decrement in step (1) must be atomic." +msgstr "" + +#: ../../c-api/typeobj.rst:3053 +msgid "" +"Resource cleanup when the counter reaches zero must be done atomically, as " +"the final release may race with concurrent releases from other threads and " +"deallocation must only happen once." +msgstr "" + +#: ../../c-api/typeobj.rst:3057 msgid "" "The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep " "track of buffer-specific resources. This field is guaranteed to remain " @@ -3414,25 +4271,30 @@ msgid "" "*view* argument." msgstr "" +#: ../../c-api/typeobj.rst:3063 msgid "" -"This function MUST NOT decrement :c:expr:`view->obj`, since that is done " +"This function MUST NOT decrement ``view->obj``, since that is done " "automatically in :c:func:`PyBuffer_Release` (this scheme is useful for " "breaking reference cycles)." msgstr "" +#: ../../c-api/typeobj.rst:3068 msgid "" ":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " "function." msgstr "" +#: ../../c-api/typeobj.rst:3076 msgid "Async Object Structures" msgstr "" +#: ../../c-api/typeobj.rst:3082 msgid "" "This structure holds pointers to the functions required to implement :term:" "`awaitable` and :term:`asynchronous iterator` objects." msgstr "" +#: ../../c-api/typeobj.rst:3087 msgid "" "typedef struct {\n" " unaryfunc am_await;\n" @@ -3442,49 +4304,61 @@ msgid "" "} PyAsyncMethods;" msgstr "" +#: ../../c-api/typeobj.rst:3100 msgid "PyObject *am_await(PyObject *self);" msgstr "" +#: ../../c-api/typeobj.rst:3102 msgid "" "The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " "must return ``1`` for it." msgstr "" +#: ../../c-api/typeobj.rst:3105 msgid "" "This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." msgstr "" +#: ../../c-api/typeobj.rst:3113 msgid "PyObject *am_aiter(PyObject *self);" msgstr "" +#: ../../c-api/typeobj.rst:3115 msgid "" "Must return an :term:`asynchronous iterator` object. See :meth:`~object." "__anext__` for details." msgstr "" +#: ../../c-api/typeobj.rst:3118 msgid "" "This slot may be set to ``NULL`` if an object does not implement " "asynchronous iteration protocol." msgstr "" +#: ../../c-api/typeobj.rst:3127 msgid "PyObject *am_anext(PyObject *self);" msgstr "" +#: ../../c-api/typeobj.rst:3129 msgid "" "Must return an :term:`awaitable` object. See :meth:`~object.__anext__` for " "details. This slot may be set to ``NULL``." msgstr "" +#: ../../c-api/typeobj.rst:3139 msgid "PySendResult am_send(PyObject *self, PyObject *arg, PyObject **result);" msgstr "" +#: ../../c-api/typeobj.rst:3141 msgid "" "See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``." msgstr "" +#: ../../c-api/typeobj.rst:3150 msgid "Slot Type typedefs" msgstr "" +#: ../../c-api/typeobj.rst:3154 msgid "" "The purpose of this function is to separate memory allocation from memory " "initialization. It should return a pointer to a block of memory of adequate " @@ -3498,62 +4372,80 @@ msgid "" "length of the block should be :c:member:`~PyTypeObject.tp_basicsize`." msgstr "" +#: ../../c-api/typeobj.rst:3164 msgid "" "This function should not do any other instance initialization, not even to " "allocate additional memory; that should be done by :c:member:`~PyTypeObject." "tp_new`." msgstr "" +#: ../../c-api/typeobj.rst:3171 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr "" +#: ../../c-api/typeobj.rst:3175 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr "" +#: ../../c-api/typeobj.rst:3179 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr "" +#: ../../c-api/typeobj.rst:3183 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr "" +#: ../../c-api/typeobj.rst:3187 ../../c-api/typeobj.rst:3196 msgid "Return the value of the named attribute for the object." msgstr "" +#: ../../c-api/typeobj.rst:3191 ../../c-api/typeobj.rst:3202 msgid "" "Set the value of the named attribute for the object. The value argument is " "set to ``NULL`` to delete the attribute." msgstr "" +#: ../../c-api/typeobj.rst:3198 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr "" +#: ../../c-api/typeobj.rst:3205 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "" +#: ../../c-api/typeobj.rst:3209 msgid "See :c:member:`~PyTypeObject.tp_descr_get`." msgstr "" +#: ../../c-api/typeobj.rst:3213 msgid "See :c:member:`~PyTypeObject.tp_descr_set`." msgstr "" +#: ../../c-api/typeobj.rst:3217 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr "" +#: ../../c-api/typeobj.rst:3221 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr "" +#: ../../c-api/typeobj.rst:3225 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr "" +#: ../../c-api/typeobj.rst:3229 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr "" +#: ../../c-api/typeobj.rst:3243 msgid "See :c:member:`~PyAsyncMethods.am_send`." msgstr "" +#: ../../c-api/typeobj.rst:3259 msgid "Examples" msgstr "" +#: ../../c-api/typeobj.rst:3261 msgid "" "The following are simple examples of Python type definitions. They include " "common usage you may encounter. Some demonstrate tricky corner cases. For " @@ -3561,9 +4453,11 @@ msgid "" "and :ref:`new-types-topics`." msgstr "" +#: ../../c-api/typeobj.rst:3266 msgid "A basic :ref:`static type `::" msgstr "" +#: ../../c-api/typeobj.rst:3268 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -3581,11 +4475,13 @@ msgid "" "};" msgstr "" +#: ../../c-api/typeobj.rst:3283 msgid "" "You may also find older code (especially in the CPython code base) with a " "more verbose initializer::" msgstr "" +#: ../../c-api/typeobj.rst:3286 msgid "" "static PyTypeObject MyObject_Type = {\n" " PyVarObject_HEAD_INIT(NULL, 0)\n" @@ -3629,9 +4525,11 @@ msgid "" "};" msgstr "" +#: ../../c-api/typeobj.rst:3327 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "" +#: ../../c-api/typeobj.rst:3329 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -3657,12 +4555,14 @@ msgid "" "};" msgstr "" +#: ../../c-api/typeobj.rst:3352 msgid "" "A str subclass that cannot be subclassed and cannot be called to create " "instances (e.g. uses a separate factory func) using :c:macro:" "`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" msgstr "" +#: ../../c-api/typeobj.rst:3356 msgid "" "typedef struct {\n" " PyUnicodeObject raw;\n" @@ -3680,10 +4580,12 @@ msgid "" "};" msgstr "" +#: ../../c-api/typeobj.rst:3371 msgid "" "The simplest :ref:`static type ` with fixed-length instances::" msgstr "" +#: ../../c-api/typeobj.rst:3373 msgid "" "typedef struct {\n" " PyObject_HEAD\n" @@ -3695,11 +4597,13 @@ msgid "" "};" msgstr "" +#: ../../c-api/typeobj.rst:3382 msgid "" "The simplest :ref:`static type ` with variable-length " "instances::" msgstr "" +#: ../../c-api/typeobj.rst:3384 msgid "" "typedef struct {\n" " PyObject_VAR_HEAD\n" @@ -3714,11 +4618,14 @@ msgid "" "};" msgstr "" +#: ../../c-api/typeobj.rst:927 ../../c-api/typeobj.rst:994 msgid "built-in function" msgstr "" +#: ../../c-api/typeobj.rst:927 msgid "repr" msgstr "" +#: ../../c-api/typeobj.rst:994 msgid "hash" msgstr "" diff --git a/c-api/typeobj.po~ b/c-api/typeobj.po~ new file mode 100644 index 00000000..0376b335 --- /dev/null +++ b/c-api/typeobj.po~ @@ -0,0 +1,3724 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-13 14:15+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Type Object Structures" +msgstr "" + +msgid "" +"Perhaps one of the most important structures of the Python object system is " +"the structure that defines a new type: the :c:type:`PyTypeObject` " +"structure. Type objects can be handled using any of the ``PyObject_*`` or " +"``PyType_*`` functions, but do not offer much that's interesting to most " +"Python applications. These objects are fundamental to how objects behave, so " +"they are very important to the interpreter itself and to any extension " +"module that implements new types." +msgstr "" + +msgid "" +"Type objects are fairly large compared to most of the standard types. The " +"reason for the size is that each type object stores a large number of " +"values, mostly C function pointers, each of which implements a small part of " +"the type's functionality. The fields of the type object are examined in " +"detail in this section. The fields will be described in the order in which " +"they occur in the structure." +msgstr "" + +msgid "" +"In addition to the following quick reference, the :ref:`typedef-examples` " +"section provides at-a-glance insight into the meaning and use of :c:type:" +"`PyTypeObject`." +msgstr "" + +msgid "Quick Reference" +msgstr "" + +msgid "\"tp slots\"" +msgstr "" + +msgid "PyTypeObject Slot [#slots]_" +msgstr "" + +msgid ":ref:`Type `" +msgstr "" + +msgid "special methods/attrs" +msgstr "" + +msgid "Info [#cols]_" +msgstr "" + +msgid "O" +msgstr "" + +msgid "T" +msgstr "" + +msgid "D" +msgstr "" + +msgid "I" +msgstr "" + +msgid " :c:member:`~PyTypeObject.tp_name`" +msgstr "" + +msgid "const char *" +msgstr "" + +msgid "__name__" +msgstr "" + +msgid "X" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_basicsize`" +msgstr "" + +msgid ":c:type:`Py_ssize_t`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_itemsize`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_dealloc`" +msgstr "" + +msgid ":c:type:`destructor`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_vectorcall_offset`" +msgstr "" + +msgid "(:c:member:`~PyTypeObject.tp_getattr`)" +msgstr "" + +msgid ":c:type:`getattrfunc`" +msgstr "" + +msgid "__getattribute__, __getattr__" +msgstr "" + +msgid "G" +msgstr "" + +msgid "(:c:member:`~PyTypeObject.tp_setattr`)" +msgstr "" + +msgid ":c:type:`setattrfunc`" +msgstr "" + +msgid "__setattr__, __delattr__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_as_async`" +msgstr "" + +msgid ":c:type:`PyAsyncMethods` *" +msgstr "" + +msgid ":ref:`sub-slots`" +msgstr "" + +msgid "%" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_repr`" +msgstr "" + +msgid ":c:type:`reprfunc`" +msgstr "" + +msgid "__repr__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_as_number`" +msgstr "" + +msgid ":c:type:`PyNumberMethods` *" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_as_sequence`" +msgstr "" + +msgid ":c:type:`PySequenceMethods` *" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_as_mapping`" +msgstr "" + +msgid ":c:type:`PyMappingMethods` *" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_hash`" +msgstr "" + +msgid ":c:type:`hashfunc`" +msgstr "" + +msgid "__hash__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_call`" +msgstr "" + +msgid ":c:type:`ternaryfunc`" +msgstr "" + +msgid "__call__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_str`" +msgstr "" + +msgid "__str__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_getattro`" +msgstr "" + +msgid ":c:type:`getattrofunc`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_setattro`" +msgstr "" + +msgid ":c:type:`setattrofunc`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_as_buffer`" +msgstr "" + +msgid ":c:type:`PyBufferProcs` *" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_flags`" +msgstr "" + +msgid "unsigned long" +msgstr "" + +msgid "?" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_doc`" +msgstr "" + +msgid "__doc__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_traverse`" +msgstr "" + +msgid ":c:type:`traverseproc`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_clear`" +msgstr "" + +msgid ":c:type:`inquiry`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_richcompare`" +msgstr "" + +msgid ":c:type:`richcmpfunc`" +msgstr "" + +msgid "__lt__, __le__, __eq__, __ne__, __gt__, __ge__" +msgstr "" + +msgid "(:c:member:`~PyTypeObject.tp_weaklistoffset`)" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_iter`" +msgstr "" + +msgid ":c:type:`getiterfunc`" +msgstr "" + +msgid "__iter__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_iternext`" +msgstr "" + +msgid ":c:type:`iternextfunc`" +msgstr "" + +msgid "__next__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_methods`" +msgstr "" + +msgid ":c:type:`PyMethodDef` []" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_members`" +msgstr "" + +msgid ":c:type:`PyMemberDef` []" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_getset`" +msgstr "" + +msgid ":c:type:`PyGetSetDef` []" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_base`" +msgstr "" + +msgid ":c:type:`PyTypeObject` *" +msgstr "" + +msgid "__base__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_dict`" +msgstr "" + +msgid ":c:type:`PyObject` *" +msgstr "" + +msgid "__dict__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_descr_get`" +msgstr "" + +msgid ":c:type:`descrgetfunc`" +msgstr "" + +msgid "__get__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_descr_set`" +msgstr "" + +msgid ":c:type:`descrsetfunc`" +msgstr "" + +msgid "__set__, __delete__" +msgstr "" + +msgid "(:c:member:`~PyTypeObject.tp_dictoffset`)" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_init`" +msgstr "" + +msgid ":c:type:`initproc`" +msgstr "" + +msgid "__init__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr "" + +msgid ":c:type:`allocfunc`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_new`" +msgstr "" + +msgid ":c:type:`newfunc`" +msgstr "" + +msgid "__new__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_free`" +msgstr "" + +msgid ":c:type:`freefunc`" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_is_gc`" +msgstr "" + +msgid "<:c:member:`~PyTypeObject.tp_bases`>" +msgstr "" + +msgid "__bases__" +msgstr "" + +msgid "~" +msgstr "" + +msgid "<:c:member:`~PyTypeObject.tp_mro`>" +msgstr "" + +msgid "__mro__" +msgstr "" + +msgid "[:c:member:`~PyTypeObject.tp_cache`]" +msgstr "" + +msgid "[:c:member:`~PyTypeObject.tp_subclasses`]" +msgstr "" + +msgid "void *" +msgstr "" + +msgid "__subclasses__" +msgstr "" + +msgid "[:c:member:`~PyTypeObject.tp_weaklist`]" +msgstr "" + +msgid "(:c:member:`~PyTypeObject.tp_del`)" +msgstr "" + +msgid "[:c:member:`~PyTypeObject.tp_version_tag`]" +msgstr "" + +msgid "unsigned int" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_finalize`" +msgstr "" + +msgid "__del__" +msgstr "" + +msgid ":c:member:`~PyTypeObject.tp_vectorcall`" +msgstr "" + +msgid ":c:type:`vectorcallfunc`" +msgstr ":c:type:`vectorcallfunc`" + +msgid "[:c:member:`~PyTypeObject.tp_watched`]" +msgstr "" + +msgid "unsigned char" +msgstr "" + +msgid "" +"**()**: A slot name in parentheses indicates it is (effectively) deprecated." +msgstr "" + +msgid "" +"**<>**: Names in angle brackets should be initially set to ``NULL`` and " +"treated as read-only." +msgstr "" + +msgid "**[]**: Names in square brackets are for internal use only." +msgstr "" + +msgid "" +"**** (as a prefix) means the field is required (must be non-``NULL``)." +msgstr "" + +msgid "Columns:" +msgstr "" + +msgid "**\"O\"**: set on :c:data:`PyBaseObject_Type`" +msgstr "" + +msgid "**\"T\"**: set on :c:data:`PyType_Type`" +msgstr "" + +msgid "**\"D\"**: default (if slot is set to ``NULL``)" +msgstr "" + +msgid "" +"X - PyType_Ready sets this value if it is NULL\n" +"~ - PyType_Ready always sets this value (it should be NULL)\n" +"? - PyType_Ready may set this value depending on other slots\n" +"\n" +"Also see the inheritance column (\"I\")." +msgstr "" + +msgid "**\"I\"**: inheritance" +msgstr "" + +msgid "" +"X - type slot is inherited via *PyType_Ready* if defined with a *NULL* " +"value\n" +"% - the slots of the sub-struct are inherited individually\n" +"G - inherited, but only in combination with other slots; see the slot's " +"description\n" +"? - it's complicated; see the slot's description" +msgstr "" + +msgid "" +"Note that some slots are effectively inherited through the normal attribute " +"lookup chain." +msgstr "" + +msgid "sub-slots" +msgstr "" + +msgid "Slot" +msgstr "" + +msgid "special methods" +msgstr "" + +msgid ":c:member:`~PyAsyncMethods.am_await`" +msgstr "" + +msgid ":c:type:`unaryfunc`" +msgstr "" + +msgid "__await__" +msgstr "" + +msgid ":c:member:`~PyAsyncMethods.am_aiter`" +msgstr "" + +msgid "__aiter__" +msgstr "" + +msgid ":c:member:`~PyAsyncMethods.am_anext`" +msgstr "" + +msgid "__anext__" +msgstr "" + +msgid ":c:member:`~PyAsyncMethods.am_send`" +msgstr "" + +msgid ":c:type:`sendfunc`" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_add`" +msgstr "" + +msgid ":c:type:`binaryfunc`" +msgstr "" + +msgid "__add__ __radd__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_add`" +msgstr "" + +msgid "__iadd__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_subtract`" +msgstr "" + +msgid "__sub__ __rsub__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_subtract`" +msgstr "" + +msgid "__isub__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_multiply`" +msgstr "" + +msgid "__mul__ __rmul__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_multiply`" +msgstr "" + +msgid "__imul__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_remainder`" +msgstr "" + +msgid "__mod__ __rmod__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_remainder`" +msgstr "" + +msgid "__imod__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_divmod`" +msgstr "" + +msgid "__divmod__ __rdivmod__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_power`" +msgstr "" + +msgid "__pow__ __rpow__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_power`" +msgstr "" + +msgid "__ipow__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_negative`" +msgstr "" + +msgid "__neg__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_positive`" +msgstr "" + +msgid "__pos__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_absolute`" +msgstr "" + +msgid "__abs__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_bool`" +msgstr "" + +msgid "__bool__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_invert`" +msgstr "" + +msgid "__invert__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_lshift`" +msgstr "" + +msgid "__lshift__ __rlshift__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_lshift`" +msgstr "" + +msgid "__ilshift__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_rshift`" +msgstr "" + +msgid "__rshift__ __rrshift__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_rshift`" +msgstr "" + +msgid "__irshift__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_and`" +msgstr "" + +msgid "__and__ __rand__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_and`" +msgstr "" + +msgid "__iand__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_xor`" +msgstr "" + +msgid "__xor__ __rxor__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_xor`" +msgstr "" + +msgid "__ixor__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_or`" +msgstr "" + +msgid "__or__ __ror__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_or`" +msgstr "" + +msgid "__ior__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_int`" +msgstr "" + +msgid "__int__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_reserved`" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_float`" +msgstr "" + +msgid "__float__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_floor_divide`" +msgstr "" + +msgid "__floordiv__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_floor_divide`" +msgstr "" + +msgid "__ifloordiv__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_true_divide`" +msgstr "" + +msgid "__truediv__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_true_divide`" +msgstr "" + +msgid "__itruediv__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_index`" +msgstr "" + +msgid "__index__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_matrix_multiply`" +msgstr "" + +msgid "__matmul__ __rmatmul__" +msgstr "" + +msgid ":c:member:`~PyNumberMethods.nb_inplace_matrix_multiply`" +msgstr "" + +msgid "__imatmul__" +msgstr "" + +msgid ":c:member:`~PyMappingMethods.mp_length`" +msgstr "" + +msgid ":c:type:`lenfunc`" +msgstr "" + +msgid "__len__" +msgstr "" + +msgid ":c:member:`~PyMappingMethods.mp_subscript`" +msgstr "" + +msgid "__getitem__" +msgstr "" + +msgid ":c:member:`~PyMappingMethods.mp_ass_subscript`" +msgstr "" + +msgid ":c:type:`objobjargproc`" +msgstr "" + +msgid "__setitem__, __delitem__" +msgstr "" + +msgid ":c:member:`~PySequenceMethods.sq_length`" +msgstr "" + +msgid ":c:member:`~PySequenceMethods.sq_concat`" +msgstr "" + +msgid "__add__" +msgstr "" + +msgid ":c:member:`~PySequenceMethods.sq_repeat`" +msgstr "" + +msgid ":c:type:`ssizeargfunc`" +msgstr "" + +msgid "__mul__" +msgstr "" + +msgid ":c:member:`~PySequenceMethods.sq_item`" +msgstr "" + +msgid ":c:member:`~PySequenceMethods.sq_ass_item`" +msgstr "" + +msgid ":c:type:`ssizeobjargproc`" +msgstr "" + +msgid "__setitem__ __delitem__" +msgstr "" + +msgid ":c:member:`~PySequenceMethods.sq_contains`" +msgstr "" + +msgid ":c:type:`objobjproc`" +msgstr "" + +msgid "__contains__" +msgstr "" + +msgid ":c:member:`~PySequenceMethods.sq_inplace_concat`" +msgstr "" + +msgid ":c:member:`~PySequenceMethods.sq_inplace_repeat`" +msgstr "" + +msgid ":c:member:`~PyBufferProcs.bf_getbuffer`" +msgstr "" + +msgid ":c:func:`getbufferproc`" +msgstr "" + +msgid "__buffer__" +msgstr "" + +msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`" +msgstr "" + +msgid ":c:func:`releasebufferproc`" +msgstr "" + +msgid "__release_\\ buffer\\__" +msgstr "" + +msgid "slot typedefs" +msgstr "" + +msgid "typedef" +msgstr "" + +msgid "Parameter Types" +msgstr "" + +msgid "Return Type" +msgstr "" + +msgid "void" +msgstr "" + +msgid ":c:type:`visitproc`" +msgstr "" + +msgid "int" +msgstr "" + +msgid "Py_hash_t" +msgstr "" + +msgid ":c:type:`getbufferproc`" +msgstr "" + +msgid ":c:type:`Py_buffer` *" +msgstr "" + +msgid ":c:type:`releasebufferproc`" +msgstr "" + +msgid "See :ref:`slot-typedefs` below for more detail." +msgstr "" + +msgid "PyTypeObject Definition" +msgstr "" + +msgid "" +"The structure definition for :c:type:`PyTypeObject` can be found in :file:" +"`Include/cpython/object.h`. For convenience of reference, this repeats the " +"definition found there:" +msgstr "" + +msgid "" +"typedef struct _typeobject {\n" +" PyObject_VAR_HEAD\n" +" const char *tp_name; /* For printing, in format \".\" */\n" +" Py_ssize_t tp_basicsize, tp_itemsize; /* For allocation */\n" +"\n" +" /* Methods to implement standard operations */\n" +"\n" +" destructor tp_dealloc;\n" +" Py_ssize_t tp_vectorcall_offset;\n" +" getattrfunc tp_getattr;\n" +" setattrfunc tp_setattr;\n" +" PyAsyncMethods *tp_as_async; /* formerly known as tp_compare (Python 2)\n" +" or tp_reserved (Python 3) */\n" +" reprfunc tp_repr;\n" +"\n" +" /* Method suites for standard classes */\n" +"\n" +" PyNumberMethods *tp_as_number;\n" +" PySequenceMethods *tp_as_sequence;\n" +" PyMappingMethods *tp_as_mapping;\n" +"\n" +" /* More standard operations (here for binary compatibility) */\n" +"\n" +" hashfunc tp_hash;\n" +" ternaryfunc tp_call;\n" +" reprfunc tp_str;\n" +" getattrofunc tp_getattro;\n" +" setattrofunc tp_setattro;\n" +"\n" +" /* Functions to access object as input/output buffer */\n" +" PyBufferProcs *tp_as_buffer;\n" +"\n" +" /* Flags to define presence of optional/expanded features */\n" +" unsigned long tp_flags;\n" +"\n" +" const char *tp_doc; /* Documentation string */\n" +"\n" +" /* Assigned meaning in release 2.0 */\n" +" /* call function for all accessible objects */\n" +" traverseproc tp_traverse;\n" +"\n" +" /* delete references to contained objects */\n" +" inquiry tp_clear;\n" +"\n" +" /* Assigned meaning in release 2.1 */\n" +" /* rich comparisons */\n" +" richcmpfunc tp_richcompare;\n" +"\n" +" /* weak reference enabler */\n" +" Py_ssize_t tp_weaklistoffset;\n" +"\n" +" /* Iterators */\n" +" getiterfunc tp_iter;\n" +" iternextfunc tp_iternext;\n" +"\n" +" /* Attribute descriptor and subclassing stuff */\n" +" PyMethodDef *tp_methods;\n" +" PyMemberDef *tp_members;\n" +" PyGetSetDef *tp_getset;\n" +" // Strong reference on a heap type, borrowed reference on a static type\n" +" PyTypeObject *tp_base;\n" +" PyObject *tp_dict;\n" +" descrgetfunc tp_descr_get;\n" +" descrsetfunc tp_descr_set;\n" +" Py_ssize_t tp_dictoffset;\n" +" initproc tp_init;\n" +" allocfunc tp_alloc;\n" +" newfunc tp_new;\n" +" freefunc tp_free; /* Low-level free-memory routine */\n" +" inquiry tp_is_gc; /* For PyObject_IS_GC */\n" +" PyObject *tp_bases;\n" +" PyObject *tp_mro; /* method resolution order */\n" +" PyObject *tp_cache; /* no longer used */\n" +" void *tp_subclasses; /* for static builtin types this is an index */\n" +" PyObject *tp_weaklist; /* not used for static builtin types */\n" +" destructor tp_del;\n" +"\n" +" /* Type attribute cache version tag. Added in version 2.6.\n" +" * If zero, the cache is invalid and must be initialized.\n" +" */\n" +" unsigned int tp_version_tag;\n" +"\n" +" destructor tp_finalize;\n" +" vectorcallfunc tp_vectorcall;\n" +"\n" +" /* bitset of which type-watchers care about this type */\n" +" unsigned char tp_watched;\n" +"\n" +" /* Number of tp_version_tag values used.\n" +" * Set to _Py_ATTR_CACHE_UNUSED if the attribute cache is\n" +" * disabled for this type (e.g. due to custom MRO entries).\n" +" * Otherwise, limited to MAX_VERSIONS_PER_CLASS (defined elsewhere).\n" +" */\n" +" uint16_t tp_versions_used;\n" +"} PyTypeObject;\n" +msgstr "" + +msgid "PyObject Slots" +msgstr "" + +msgid "" +"The type object structure extends the :c:type:`PyVarObject` structure. The :" +"c:member:`~PyVarObject.ob_size` field is used for dynamic types (created by :" +"c:func:`!type_new`, usually called from a class statement). Note that :c:" +"data:`PyType_Type` (the metatype) initializes :c:member:`~PyTypeObject." +"tp_itemsize`, which means that its instances (i.e. type objects) *must* have " +"the :c:member:`~PyVarObject.ob_size` field." +msgstr "" + +msgid ":c:member:`PyObject.ob_refcnt`" +msgstr "" + +msgid "" +"The type object's reference count is initialized to ``1`` by the " +"``PyObject_HEAD_INIT`` macro. Note that for :ref:`statically allocated type " +"objects `, the type's instances (objects whose :c:member:" +"`~PyObject.ob_type` points back to the type) do *not* count as references. " +"But for :ref:`dynamically allocated type objects `, the " +"instances *do* count as references." +msgstr "" + +msgid "**Inheritance:**" +msgstr "" + +msgid "This field is not inherited by subtypes." +msgstr "" + +msgid ":c:member:`PyObject.ob_type`" +msgstr "" + +msgid "" +"This is the type's type, in other words its metatype. It is initialized by " +"the argument to the ``PyObject_HEAD_INIT`` macro, and its value should " +"normally be ``&PyType_Type``. However, for dynamically loadable extension " +"modules that must be usable on Windows (at least), the compiler complains " +"that this is not a valid initializer. Therefore, the convention is to pass " +"``NULL`` to the ``PyObject_HEAD_INIT`` macro and to initialize this field " +"explicitly at the start of the module's initialization function, before " +"doing anything else. This is typically done like this::" +msgstr "" + +msgid "Foo_Type.ob_type = &PyType_Type;" +msgstr "" + +msgid "" +"This should be done before any instances of the type are created. :c:func:" +"`PyType_Ready` checks if :c:member:`~PyObject.ob_type` is ``NULL``, and if " +"so, initializes it to the :c:member:`~PyObject.ob_type` field of the base " +"class. :c:func:`PyType_Ready` will not change this field if it is non-zero." +msgstr "" + +msgid "This field is inherited by subtypes." +msgstr "" + +msgid "PyVarObject Slots" +msgstr "" + +msgid ":c:member:`PyVarObject.ob_size`" +msgstr "" + +msgid "" +"For :ref:`statically allocated type objects `, this should be " +"initialized to zero. For :ref:`dynamically allocated type objects `, this field has a special internal meaning." +msgstr "" + +msgid "This field should be accessed using the :c:func:`Py_SIZE()` macro." +msgstr "" + +msgid "PyTypeObject Slots" +msgstr "" + +msgid "" +"Each slot has a section describing inheritance. If :c:func:`PyType_Ready` " +"may set a value when the field is set to ``NULL`` then there will also be a " +"\"Default\" section. (Note that many fields set on :c:data:" +"`PyBaseObject_Type` and :c:data:`PyType_Type` effectively act as defaults.)" +msgstr "" + +msgid "" +"Pointer to a NUL-terminated string containing the name of the type. For " +"types that are accessible as module globals, the string should be the full " +"module name, followed by a dot, followed by the type name; for built-in " +"types, it should be just the type name. If the module is a submodule of a " +"package, the full package name is part of the full module name. For " +"example, a type named :class:`!T` defined in module :mod:`!M` in subpackage :" +"mod:`!Q` in package :mod:`!P` should have the :c:member:`~PyTypeObject." +"tp_name` initializer ``\"P.Q.M.T\"``." +msgstr "" + +msgid "" +"For :ref:`dynamically allocated type objects `, this should just " +"be the type name, and the module name explicitly stored in the type dict as " +"the value for key ``'__module__'``." +msgstr "" + +msgid "" +"For :ref:`statically allocated type objects `, the *tp_name* " +"field should contain a dot. Everything before the last dot is made " +"accessible as the :attr:`~type.__module__` attribute, and everything after " +"the last dot is made accessible as the :attr:`~type.__name__` attribute." +msgstr "" + +msgid "" +"If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is " +"made accessible as the :attr:`~type.__name__` attribute, and the :attr:" +"`~type.__module__` attribute is undefined (unless explicitly set in the " +"dictionary, as explained above). This means your type will be impossible to " +"pickle. Additionally, it will not be listed in module documentations " +"created with pydoc." +msgstr "" + +msgid "" +"This field must not be ``NULL``. It is the only required field in :c:func:" +"`PyTypeObject` (other than potentially :c:member:`~PyTypeObject." +"tp_itemsize`)." +msgstr "" + +msgid "" +"These fields allow calculating the size in bytes of instances of the type." +msgstr "" + +msgid "" +"There are two kinds of types: types with fixed-length instances have a zero :" +"c:member:`!tp_itemsize` field, types with variable-length instances have a " +"non-zero :c:member:`!tp_itemsize` field. For a type with fixed-length " +"instances, all instances have the same size, given in :c:member:`!" +"tp_basicsize`. (Exceptions to this rule can be made using :c:func:" +"`PyUnstable_Object_GC_NewWithExtraData`.)" +msgstr "" + +msgid "" +"For a type with variable-length instances, the instances must have an :c:" +"member:`~PyVarObject.ob_size` field, and the instance size is :c:member:`!" +"tp_basicsize` plus N times :c:member:`!tp_itemsize`, where N is the " +"\"length\" of the object." +msgstr "" + +msgid "" +"Functions like :c:func:`PyObject_NewVar` will take the value of N as an " +"argument, and store in the instance's :c:member:`~PyVarObject.ob_size` " +"field. Note that the :c:member:`~PyVarObject.ob_size` field may later be " +"used for other purposes. For example, :py:type:`int` instances use the bits " +"of :c:member:`~PyVarObject.ob_size` in an implementation-defined way; the " +"underlying storage and its size should be accessed using :c:func:" +"`PyLong_Export`." +msgstr "" + +msgid "" +"The :c:member:`~PyVarObject.ob_size` field should be accessed using the :c:" +"func:`Py_SIZE()` and :c:func:`Py_SET_SIZE()` macros." +msgstr "" + +msgid "" +"Also, the presence of an :c:member:`~PyVarObject.ob_size` field in the " +"instance layout doesn't mean that the instance structure is variable-length. " +"For example, the :py:type:`list` type has fixed-length instances, yet those " +"instances have a :c:member:`~PyVarObject.ob_size` field. (As with :py:type:" +"`int`, avoid reading lists' :c:member:`!ob_size` directly. Call :c:func:" +"`PyList_Size` instead.)" +msgstr "" + +msgid "" +"The :c:member:`!tp_basicsize` includes size needed for data of the type's :c:" +"member:`~PyTypeObject.tp_base`, plus any extra data needed by each instance." +msgstr "" + +msgid "" +"The correct way to set :c:member:`!tp_basicsize` is to use the ``sizeof`` " +"operator on the struct used to declare the instance layout. This struct must " +"include the struct used to declare the base type. In other words, :c:member:" +"`!tp_basicsize` must be greater than or equal to the base's :c:member:`!" +"tp_basicsize`." +msgstr "" + +msgid "" +"Since every type is a subtype of :py:type:`object`, this struct must " +"include :c:type:`PyObject` or :c:type:`PyVarObject` (depending on whether :c:" +"member:`~PyVarObject.ob_size` should be included). These are usually defined " +"by the macro :c:macro:`PyObject_HEAD` or :c:macro:`PyObject_VAR_HEAD`, " +"respectively." +msgstr "" + +msgid "" +"The basic size does not include the GC header size, as that header is not " +"part of :c:macro:`PyObject_HEAD`." +msgstr "" + +msgid "" +"For cases where struct used to declare the base type is unknown, see :c:" +"member:`PyType_Spec.basicsize` and :c:func:`PyType_FromMetaclass`." +msgstr "" + +msgid "Notes about alignment:" +msgstr "" + +msgid "" +":c:member:`!tp_basicsize` must be a multiple of ``_Alignof(PyObject)``. When " +"using ``sizeof`` on a ``struct`` that includes :c:macro:`PyObject_HEAD`, as " +"recommended, the compiler ensures this. When not using a C ``struct``, or " +"when using compiler extensions like ``__attribute__((packed))``, it is up to " +"you." +msgstr "" + +msgid "" +"If the variable items require a particular alignment, :c:member:`!" +"tp_basicsize` and :c:member:`!tp_itemsize` must each be a multiple of that " +"alignment. For example, if a type's variable part stores a ``double``, it is " +"your responsibility that both fields are a multiple of ``_Alignof(double)``." +msgstr "" + +msgid "" +"These fields are inherited separately by subtypes. (That is, if the field is " +"set to zero, :c:func:`PyType_Ready` will copy the value from the base type, " +"indicating that the instances do not need additional storage.)" +msgstr "" + +msgid "" +"If the base type has a non-zero :c:member:`~PyTypeObject.tp_itemsize`, it is " +"generally not safe to set :c:member:`~PyTypeObject.tp_itemsize` to a " +"different non-zero value in a subtype (though this depends on the " +"implementation of the base type)." +msgstr "" + +msgid "" +"A pointer to the instance destructor function. The function signature is::" +msgstr "" + +msgid "void tp_dealloc(PyObject *self);" +msgstr "" + +msgid "" +"The destructor function should remove all references which the instance owns " +"(e.g., call :c:func:`Py_CLEAR`), free all memory buffers owned by the " +"instance, and call the type's :c:member:`~PyTypeObject.tp_free` function to " +"free the object itself." +msgstr "" + +msgid "" +"If you may call functions that may set the error indicator, you must use :c:" +"func:`PyErr_GetRaisedException` and :c:func:`PyErr_SetRaisedException` to " +"ensure you don't clobber a preexisting error indicator (the deallocation " +"could have occurred while processing a different error):" +msgstr "" + +msgid "" +"static void\n" +"foo_dealloc(foo_object *self)\n" +"{\n" +" PyObject *et, *ev, *etb;\n" +" PyObject *exc = PyErr_GetRaisedException();\n" +" ...\n" +" PyErr_SetRaisedException(exc);\n" +"}" +msgstr "" + +msgid "" +"The dealloc handler itself must not raise an exception; if it hits an error " +"case it should call :c:func:`PyErr_FormatUnraisable` to log (and clear) an " +"unraisable exception." +msgstr "" + +msgid "No guarantees are made about when an object is destroyed, except:" +msgstr "" + +msgid "" +"Python will destroy an object immediately or some time after the final " +"reference to the object is deleted, unless its finalizer (:c:member:" +"`~PyTypeObject.tp_finalize`) subsequently resurrects the object." +msgstr "" + +msgid "" +"An object will not be destroyed while it is being automatically finalized (:" +"c:member:`~PyTypeObject.tp_finalize`) or automatically cleared (:c:member:" +"`~PyTypeObject.tp_clear`)." +msgstr "" + +msgid "" +"CPython currently destroys an object immediately from :c:func:`Py_DECREF` " +"when the new reference count is zero, but this may change in a future " +"version." +msgstr "" + +msgid "" +"It is recommended to call :c:func:`PyObject_CallFinalizerFromDealloc` at the " +"beginning of :c:member:`!tp_dealloc` to guarantee that the object is always " +"finalized before destruction." +msgstr "" + +msgid "" +"If the type supports garbage collection (the :c:macro:`Py_TPFLAGS_HAVE_GC` " +"flag is set), the destructor should call :c:func:`PyObject_GC_UnTrack` " +"before clearing any member fields." +msgstr "" + +msgid "" +"It is permissible to call :c:member:`~PyTypeObject.tp_clear` from :c:member:" +"`!tp_dealloc` to reduce code duplication and to guarantee that the object is " +"always cleared before destruction. Beware that :c:member:`!tp_clear` might " +"have already been called." +msgstr "" + +msgid "" +"If the type is heap allocated (:c:macro:`Py_TPFLAGS_HEAPTYPE`), the " +"deallocator should release the owned reference to its type object (via :c:" +"func:`Py_DECREF`) after calling the type deallocator. See the example code " +"below.::" +msgstr "" + +msgid "" +"static void\n" +"foo_dealloc(PyObject *op)\n" +"{\n" +" foo_object *self = (foo_object *) op;\n" +" PyObject_GC_UnTrack(self);\n" +" Py_CLEAR(self->ref);\n" +" Py_TYPE(self)->tp_free(self);\n" +"}" +msgstr "" + +msgid "" +":c:member:`!tp_dealloc` must leave the exception status unchanged. If it " +"needs to call something that might raise an exception, the exception state " +"must be backed up first and restored later (after logging any exceptions " +"with :c:func:`PyErr_WriteUnraisable`)." +msgstr "" + +msgid "Example::" +msgstr "" + +msgid "" +"static void\n" +"foo_dealloc(PyObject *self)\n" +"{\n" +" PyObject *exc = PyErr_GetRaisedException();\n" +"\n" +" if (PyObject_CallFinalizerFromDealloc(self) < 0) {\n" +" // self was resurrected.\n" +" goto done;\n" +" }\n" +"\n" +" PyTypeObject *tp = Py_TYPE(self);\n" +"\n" +" if (tp->tp_flags & Py_TPFLAGS_HAVE_GC) {\n" +" PyObject_GC_UnTrack(self);\n" +" }\n" +"\n" +" // Optional, but convenient to avoid code duplication.\n" +" if (tp->tp_clear && tp->tp_clear(self) < 0) {\n" +" PyErr_WriteUnraisable(self);\n" +" }\n" +"\n" +" // Any additional destruction goes here.\n" +"\n" +" tp->tp_free(self);\n" +" self = NULL; // In case PyErr_WriteUnraisable() is called below.\n" +"\n" +" if (tp->tp_flags & Py_TPFLAGS_HEAPTYPE) {\n" +" Py_CLEAR(tp);\n" +" }\n" +"\n" +"done:\n" +" // Optional, if something was called that might have raised an\n" +" // exception.\n" +" if (PyErr_Occurred()) {\n" +" PyErr_WriteUnraisable(self);\n" +" }\n" +" PyErr_SetRaisedException(exc);\n" +"}" +msgstr "" + +msgid "" +":c:member:`!tp_dealloc` may be called from any Python thread, not just the " +"thread which created the object (if the object becomes part of a refcount " +"cycle, that cycle might be collected by a garbage collection on any " +"thread). This is not a problem for Python API calls, since the thread on " +"which :c:member:`!tp_dealloc` is called with an :term:`attached thread " +"state`. However, if the object being destroyed in turn destroys objects " +"from some other C library, care should be taken to ensure that destroying " +"those objects on the thread which called :c:member:`!tp_dealloc` will not " +"violate any assumptions of the library." +msgstr "" + +msgid "" +":ref:`life-cycle` for details about how this slot relates to other slots." +msgstr "" + +msgid "" +"An optional offset to a per-instance function that implements calling the " +"object using the :ref:`vectorcall protocol `, a more efficient " +"alternative of the simpler :c:member:`~PyTypeObject.tp_call`." +msgstr "" + +msgid "" +"This field is only used if the flag :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` is " +"set. If so, this must be a positive integer containing the offset in the " +"instance of a :c:type:`vectorcallfunc` pointer." +msgstr "" + +msgid "" +"The *vectorcallfunc* pointer may be ``NULL``, in which case the instance " +"behaves as if :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` was not set: calling the " +"instance falls back to :c:member:`~PyTypeObject.tp_call`." +msgstr "" + +msgid "" +"Any class that sets ``Py_TPFLAGS_HAVE_VECTORCALL`` must also set :c:member:" +"`~PyTypeObject.tp_call` and make sure its behaviour is consistent with the " +"*vectorcallfunc* function. This can be done by setting *tp_call* to :c:func:" +"`PyVectorcall_Call`." +msgstr "" + +msgid "" +"Before version 3.8, this slot was named ``tp_print``. In Python 2.x, it was " +"used for printing to a file. In Python 3.0 to 3.7, it was unused." +msgstr "" + +msgid "" +"Before version 3.12, it was not recommended for :ref:`mutable heap types " +"` to implement the vectorcall protocol. When a user sets :attr:" +"`~object.__call__` in Python code, only *tp_call* is updated, likely making " +"it inconsistent with the vectorcall function. Since 3.12, setting " +"``__call__`` will disable vectorcall optimization by clearing the :c:macro:" +"`Py_TPFLAGS_HAVE_VECTORCALL` flag." +msgstr "" + +msgid "" +"This field is always inherited. However, the :c:macro:" +"`Py_TPFLAGS_HAVE_VECTORCALL` flag is not always inherited. If it's not set, " +"then the subclass won't use :ref:`vectorcall `, except when :c:" +"func:`PyVectorcall_Call` is explicitly called." +msgstr "" + +msgid "An optional pointer to the get-attribute-string function." +msgstr "" + +msgid "" +"This field is deprecated. When it is defined, it should point to a function " +"that acts the same as the :c:member:`~PyTypeObject.tp_getattro` function, " +"but taking a C string instead of a Python string object to give the " +"attribute name." +msgstr "" + +msgid "" +"Group: :c:member:`~PyTypeObject.tp_getattr`, :c:member:`~PyTypeObject." +"tp_getattro`" +msgstr "" + +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_getattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " +"and :c:member:`~PyTypeObject.tp_getattro` from its base type when the " +"subtype's :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject." +"tp_getattro` are both ``NULL``." +msgstr "" + +msgid "" +"An optional pointer to the function for setting and deleting attributes." +msgstr "" + +msgid "" +"This field is deprecated. When it is defined, it should point to a function " +"that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, " +"but taking a C string instead of a Python string object to give the " +"attribute name." +msgstr "" + +msgid "" +"Group: :c:member:`~PyTypeObject.tp_setattr`, :c:member:`~PyTypeObject." +"tp_setattro`" +msgstr "" + +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_setattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " +"and :c:member:`~PyTypeObject.tp_setattro` from its base type when the " +"subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject." +"tp_setattro` are both ``NULL``." +msgstr "" + +msgid "" +"Pointer to an additional structure that contains fields relevant only to " +"objects which implement :term:`awaitable` and :term:`asynchronous iterator` " +"protocols at the C-level. See :ref:`async-structs` for details." +msgstr "" + +msgid "Formerly known as ``tp_compare`` and ``tp_reserved``." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_as_async` field is not inherited, but the " +"contained fields are inherited individually." +msgstr "" + +msgid "" +"An optional pointer to a function that implements the built-in function :" +"func:`repr`." +msgstr "" + +msgid "The signature is the same as for :c:func:`PyObject_Repr`::" +msgstr "" + +msgid "PyObject *tp_repr(PyObject *self);" +msgstr "" + +msgid "" +"The function must return a string or a Unicode object. Ideally, this " +"function should return a string that, when passed to :func:`eval`, given a " +"suitable environment, returns an object with the same value. If this is not " +"feasible, it should return a string starting with ``'<'`` and ending with " +"``'>'`` from which both the type and the value of the object can be deduced." +msgstr "" + +msgid "**Default:**" +msgstr "" + +msgid "" +"When this field is not set, a string of the form ``<%s object at %p>`` is " +"returned, where ``%s`` is replaced by the type name, and ``%p`` by the " +"object's memory address." +msgstr "" + +msgid "" +"Pointer to an additional structure that contains fields relevant only to " +"objects which implement the number protocol. These fields are documented " +"in :ref:`number-structs`." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the " +"contained fields are inherited individually." +msgstr "" + +msgid "" +"Pointer to an additional structure that contains fields relevant only to " +"objects which implement the sequence protocol. These fields are documented " +"in :ref:`sequence-structs`." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_as_sequence` field is not inherited, but the " +"contained fields are inherited individually." +msgstr "" + +msgid "" +"Pointer to an additional structure that contains fields relevant only to " +"objects which implement the mapping protocol. These fields are documented " +"in :ref:`mapping-structs`." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_as_mapping` field is not inherited, but the " +"contained fields are inherited individually." +msgstr "" + +msgid "" +"An optional pointer to a function that implements the built-in function :" +"func:`hash`." +msgstr "" + +msgid "The signature is the same as for :c:func:`PyObject_Hash`::" +msgstr "" + +msgid "Py_hash_t tp_hash(PyObject *);" +msgstr "" + +msgid "" +"The value ``-1`` should not be returned as a normal return value; when an " +"error occurs during the computation of the hash value, the function should " +"set an exception and return ``-1``." +msgstr "" + +msgid "" +"When this field is not set (*and* :c:member:`~PyTypeObject.tp_richcompare` " +"is not set), an attempt to take the hash of the object raises :exc:" +"`TypeError`. This is the same as setting it to :c:func:" +"`PyObject_HashNotImplemented`." +msgstr "" + +msgid "" +"This field can be set explicitly to :c:func:`PyObject_HashNotImplemented` to " +"block inheritance of the hash method from a parent type. This is interpreted " +"as the equivalent of ``__hash__ = None`` at the Python level, causing " +"``isinstance(o, collections.Hashable)`` to correctly return ``False``. Note " +"that the converse is also true - setting ``__hash__ = None`` on a class at " +"the Python level will result in the ``tp_hash`` slot being set to :c:func:" +"`PyObject_HashNotImplemented`." +msgstr "" + +msgid "" +"Group: :c:member:`~PyTypeObject.tp_hash`, :c:member:`~PyTypeObject." +"tp_richcompare`" +msgstr "" + +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_richcompare`: a subtype inherits both of :c:member:`~PyTypeObject." +"tp_richcompare` and :c:member:`~PyTypeObject.tp_hash`, when the subtype's :c:" +"member:`~PyTypeObject.tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` " +"are both ``NULL``." +msgstr "" + +msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericHash`." +msgstr "" + +msgid "" +"An optional pointer to a function that implements calling the object. This " +"should be ``NULL`` if the object is not callable. The signature is the same " +"as for :c:func:`PyObject_Call`::" +msgstr "" + +msgid "PyObject *tp_call(PyObject *self, PyObject *args, PyObject *kwargs);" +msgstr "" + +msgid "" +"An optional pointer to a function that implements the built-in operation :" +"func:`str`. (Note that :class:`str` is a type now, and :func:`str` calls " +"the constructor for that type. This constructor calls :c:func:" +"`PyObject_Str` to do the actual work, and :c:func:`PyObject_Str` will call " +"this handler.)" +msgstr "" + +msgid "The signature is the same as for :c:func:`PyObject_Str`::" +msgstr "" + +msgid "PyObject *tp_str(PyObject *self);" +msgstr "" + +msgid "" +"The function must return a string or a Unicode object. It should be a " +"\"friendly\" string representation of the object, as this is the " +"representation that will be used, among other things, by the :func:`print` " +"function." +msgstr "" + +msgid "" +"When this field is not set, :c:func:`PyObject_Repr` is called to return a " +"string representation." +msgstr "" + +msgid "An optional pointer to the get-attribute function." +msgstr "" + +msgid "The signature is the same as for :c:func:`PyObject_GetAttr`::" +msgstr "" + +msgid "PyObject *tp_getattro(PyObject *self, PyObject *attr);" +msgstr "" + +msgid "" +"It is usually convenient to set this field to :c:func:" +"`PyObject_GenericGetAttr`, which implements the normal way of looking for " +"object attributes." +msgstr "" + +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_getattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " +"and :c:member:`~PyTypeObject.tp_getattro` from its base type when the " +"subtype's :c:member:`~PyTypeObject.tp_getattr` and :c:member:`~PyTypeObject." +"tp_getattro` are both ``NULL``." +msgstr "" + +msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." +msgstr "" + +msgid "The signature is the same as for :c:func:`PyObject_SetAttr`::" +msgstr "" + +msgid "int tp_setattro(PyObject *self, PyObject *attr, PyObject *value);" +msgstr "" + +msgid "" +"In addition, setting *value* to ``NULL`` to delete an attribute must be " +"supported. It is usually convenient to set this field to :c:func:" +"`PyObject_GenericSetAttr`, which implements the normal way of setting object " +"attributes." +msgstr "" + +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_setattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " +"and :c:member:`~PyTypeObject.tp_setattro` from its base type when the " +"subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject." +"tp_setattro` are both ``NULL``." +msgstr "" + +msgid ":c:data:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." +msgstr "" + +msgid "" +"Pointer to an additional structure that contains fields relevant only to " +"objects which implement the buffer interface. These fields are documented " +"in :ref:`buffer-structs`." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, but the " +"contained fields are inherited individually." +msgstr "" + +msgid "" +"This field is a bit mask of various flags. Some flags indicate variant " +"semantics for certain situations; others are used to indicate that certain " +"fields in the type object (or in the extension structures referenced via :c:" +"member:`~PyTypeObject.tp_as_number`, :c:member:`~PyTypeObject." +"tp_as_sequence`, :c:member:`~PyTypeObject.tp_as_mapping`, and :c:member:" +"`~PyTypeObject.tp_as_buffer`) that were historically not always present are " +"valid; if such a flag bit is clear, the type fields it guards must not be " +"accessed and must be considered to have a zero or ``NULL`` value instead." +msgstr "" + +msgid "" +"Inheritance of this field is complicated. Most flag bits are inherited " +"individually, i.e. if the base type has a flag bit set, the subtype inherits " +"this flag bit. The flag bits that pertain to extension structures are " +"strictly inherited if the extension structure is inherited, i.e. the base " +"type's value of the flag bit is copied into the subtype together with a " +"pointer to the extension structure. The :c:macro:`Py_TPFLAGS_HAVE_GC` flag " +"bit is inherited together with the :c:member:`~PyTypeObject.tp_traverse` " +"and :c:member:`~PyTypeObject.tp_clear` fields, i.e. if the :c:macro:" +"`Py_TPFLAGS_HAVE_GC` flag bit is clear in the subtype and the :c:member:" +"`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` fields in " +"the subtype exist and have ``NULL`` values." +msgstr "" + +msgid "" +":c:data:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " +"Py_TPFLAGS_BASETYPE``." +msgstr "" + +msgid "**Bit Masks:**" +msgstr "" + +msgid "" +"The following bit masks are currently defined; these can be ORed together " +"using the ``|`` operator to form the value of the :c:member:`~PyTypeObject." +"tp_flags` field. The macro :c:func:`PyType_HasFeature` takes a type and a " +"flags value, *tp* and *f*, and checks whether ``tp->tp_flags & f`` is non-" +"zero." +msgstr "" + +msgid "" +"This bit is set when the type object itself is allocated on the heap, for " +"example, types created dynamically using :c:func:`PyType_FromSpec`. In this " +"case, the :c:member:`~PyObject.ob_type` field of its instances is considered " +"a reference to the type, and the type object is INCREF'ed when a new " +"instance is created, and DECREF'ed when an instance is destroyed (this does " +"not apply to instances of subtypes; only the type referenced by the " +"instance's ob_type gets INCREF'ed or DECREF'ed). Heap types should also :ref:" +"`support garbage collection ` as they can form a " +"reference cycle with their own module object." +msgstr "" + +msgid "???" +msgstr "" + +msgid "" +"This bit is set when the type can be used as the base type of another type. " +"If this bit is clear, the type cannot be subtyped (similar to a \"final\" " +"class in Java)." +msgstr "" + +msgid "" +"This bit is set when the type object has been fully initialized by :c:func:" +"`PyType_Ready`." +msgstr "" + +msgid "" +"This bit is set while :c:func:`PyType_Ready` is in the process of " +"initializing the type object." +msgstr "" + +msgid "" +"This bit is set when the object supports garbage collection. If this bit is " +"set, memory for new instances (see :c:member:`~PyTypeObject.tp_alloc`) must " +"be allocated using :c:macro:`PyObject_GC_New` or :c:func:" +"`PyType_GenericAlloc` and deallocated (see :c:member:`~PyTypeObject." +"tp_free`) using :c:func:`PyObject_GC_Del`. More information in section :ref:" +"`supporting-cycle-detection`." +msgstr "" + +msgid "" +"Group: :c:macro:`Py_TPFLAGS_HAVE_GC`, :c:member:`~PyTypeObject." +"tp_traverse`, :c:member:`~PyTypeObject.tp_clear`" +msgstr "" + +msgid "" +"The :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :c:" +"member:`~PyTypeObject.tp_traverse` and :c:member:`~PyTypeObject.tp_clear` " +"fields, i.e. if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is clear in the " +"subtype and the :c:member:`~PyTypeObject.tp_traverse` and :c:member:" +"`~PyTypeObject.tp_clear` fields in the subtype exist and have ``NULL`` " +"values." +msgstr "" + +msgid "" +"This is a bitmask of all the bits that pertain to the existence of certain " +"fields in the type object and its extension structures. Currently, it " +"includes the following bits: :c:macro:`Py_TPFLAGS_HAVE_STACKLESS_EXTENSION`." +msgstr "" + +msgid "This bit indicates that objects behave like unbound methods." +msgstr "" + +msgid "If this flag is set for ``type(meth)``, then:" +msgstr "" + +msgid "" +"``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) must be " +"equivalent to ``meth(obj, *args, **kwds)``." +msgstr "" + +msgid "" +"``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " +"``meth(*args, **kwds)``." +msgstr "" + +msgid "" +"This flag enables an optimization for typical method calls like ``obj." +"meth()``: it avoids creating a temporary \"bound method\" object for ``obj." +"meth``." +msgstr "" + +msgid "" +"This flag is never inherited by types without the :c:macro:" +"`Py_TPFLAGS_IMMUTABLETYPE` flag set. For extension types, it is inherited " +"whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited." +msgstr "" + +msgid "" +"This bit indicates that instances of the class have a :attr:`~object." +"__dict__` attribute, and that the space for the dictionary is managed by the " +"VM." +msgstr "" + +msgid "If this flag is set, :c:macro:`Py_TPFLAGS_HAVE_GC` should also be set." +msgstr "" + +msgid "" +"The type traverse function must call :c:func:`PyObject_VisitManagedDict` and " +"its clear function must call :c:func:`PyObject_ClearManagedDict`." +msgstr "" + +msgid "" +"This flag is inherited unless the :c:member:`~PyTypeObject.tp_dictoffset` " +"field is set in a superclass." +msgstr "" + +msgid "" +"This bit indicates that instances of the class should be weakly " +"referenceable." +msgstr "" + +msgid "" +"This flag is inherited unless the :c:member:`~PyTypeObject." +"tp_weaklistoffset` field is set in a superclass." +msgstr "" + +msgid "" +"Only usable with variable-size types, i.e. ones with non-zero :c:member:" +"`~PyTypeObject.tp_itemsize`." +msgstr "" + +msgid "" +"Indicates that the variable-sized portion of an instance of this type is at " +"the end of the instance's memory area, at an offset of ``Py_TYPE(obj)-" +">tp_basicsize`` (which may be different in each subclass)." +msgstr "" + +msgid "" +"When setting this flag, be sure that all superclasses either use this memory " +"layout, or are not variable-sized. Python does not check this." +msgstr "" + +msgid "This flag is inherited." +msgstr "" + +msgid "" +"These flags are used by functions such as :c:func:`PyLong_Check` to quickly " +"determine if a type is a subclass of a built-in type; such specific checks " +"are faster than a generic check, like :c:func:`PyObject_IsInstance`. Custom " +"types that inherit from built-ins should have their :c:member:`~PyTypeObject." +"tp_flags` set appropriately, or the code that interacts with such types will " +"behave differently depending on what kind of check is used." +msgstr "" + +msgid "" +"This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is " +"present in the type structure." +msgstr "" + +msgid "" +"This flag isn't necessary anymore, as the interpreter assumes the :c:member:" +"`~PyTypeObject.tp_finalize` slot is always present in the type structure." +msgstr "" + +msgid "" +"This bit is set when the class implements the :ref:`vectorcall protocol " +"`. See :c:member:`~PyTypeObject.tp_vectorcall_offset` for " +"details." +msgstr "" + +msgid "" +"This bit is inherited if :c:member:`~PyTypeObject.tp_call` is also inherited." +msgstr "" + +msgid "" +"This flag is now removed from a class when the class's :py:meth:`~object." +"__call__` method is reassigned." +msgstr "" + +msgid "This flag can now be inherited by mutable classes." +msgstr "" + +msgid "" +"This bit is set for type objects that are immutable: type attributes cannot " +"be set nor deleted." +msgstr "" + +msgid "" +":c:func:`PyType_Ready` automatically applies this flag to :ref:`static types " +"`." +msgstr "" + +msgid "This flag is not inherited." +msgstr "" + +msgid "" +"Disallow creating instances of the type: set :c:member:`~PyTypeObject." +"tp_new` to NULL and don't create the ``__new__`` key in the type dictionary." +msgstr "" + +msgid "" +"The flag must be set before creating the type, not after. For example, it " +"must be set before :c:func:`PyType_Ready` is called on the type." +msgstr "" + +msgid "" +"The flag is set automatically on :ref:`static types ` if :c:" +"member:`~PyTypeObject.tp_base` is NULL or ``&PyBaseObject_Type`` and :c:" +"member:`~PyTypeObject.tp_new` is NULL." +msgstr "" + +msgid "" +"This flag is not inherited. However, subclasses will not be instantiable " +"unless they provide a non-NULL :c:member:`~PyTypeObject.tp_new` (which is " +"only possible via the C API)." +msgstr "" + +msgid "" +"To disallow instantiating a class directly but allow instantiating its " +"subclasses (e.g. for an :term:`abstract base class`), do not use this flag. " +"Instead, make :c:member:`~PyTypeObject.tp_new` only succeed for subclasses." +msgstr "" + +msgid "" +"This bit indicates that instances of the class may match mapping patterns " +"when used as the subject of a :keyword:`match` block. It is automatically " +"set when registering or subclassing :class:`collections.abc.Mapping`, and " +"unset when registering :class:`collections.abc.Sequence`." +msgstr "" + +msgid "" +":c:macro:`Py_TPFLAGS_MAPPING` and :c:macro:`Py_TPFLAGS_SEQUENCE` are " +"mutually exclusive; it is an error to enable both flags simultaneously." +msgstr "" + +msgid "" +"This flag is inherited by types that do not already set :c:macro:" +"`Py_TPFLAGS_SEQUENCE`." +msgstr "" + +msgid ":pep:`634` -- Structural Pattern Matching: Specification" +msgstr "" + +msgid "" +"This bit indicates that instances of the class may match sequence patterns " +"when used as the subject of a :keyword:`match` block. It is automatically " +"set when registering or subclassing :class:`collections.abc.Sequence`, and " +"unset when registering :class:`collections.abc.Mapping`." +msgstr "" + +msgid "" +"This flag is inherited by types that do not already set :c:macro:" +"`Py_TPFLAGS_MAPPING`." +msgstr "" + +msgid "" +"Internal. Do not set or unset this flag. To indicate that a class has " +"changed call :c:func:`PyType_Modified`" +msgstr "" + +msgid "" +"This flag is present in header files, but is not be used. It will be removed " +"in a future version of CPython" +msgstr "" + +msgid "" +"An optional pointer to a NUL-terminated C string giving the docstring for " +"this type object. This is exposed as the :attr:`~type.__doc__` attribute on " +"the type and instances of the type." +msgstr "" + +msgid "This field is *not* inherited by subtypes." +msgstr "" + +msgid "" +"An optional pointer to a traversal function for the garbage collector. This " +"is only used if the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " +"signature is::" +msgstr "" + +msgid "int tp_traverse(PyObject *self, visitproc visit, void *arg);" +msgstr "" + +msgid "" +"More information about Python's garbage collection scheme can be found in " +"section :ref:`supporting-cycle-detection`." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage " +"collector to detect reference cycles. A typical implementation of a :c:" +"member:`~PyTypeObject.tp_traverse` function simply calls :c:func:`Py_VISIT` " +"on each of the instance's members that are Python objects that the instance " +"owns. For example, this is function :c:func:`!local_traverse` from the :mod:" +"`!_thread` extension module::" +msgstr "" + +msgid "" +"static int\n" +"local_traverse(PyObject *op, visitproc visit, void *arg)\n" +"{\n" +" localobject *self = (localobject *) op;\n" +" Py_VISIT(self->args);\n" +" Py_VISIT(self->kw);\n" +" Py_VISIT(self->dict);\n" +" return 0;\n" +"}" +msgstr "" + +msgid "" +"Note that :c:func:`Py_VISIT` is called only on those members that can " +"participate in reference cycles. Although there is also a ``self->key`` " +"member, it can only be ``NULL`` or a Python string and therefore cannot be " +"part of a reference cycle." +msgstr "" + +msgid "" +"On the other hand, even if you know a member can never be part of a cycle, " +"as a debugging aid you may want to visit it anyway just so the :mod:`gc` " +"module's :func:`~gc.get_referents` function will include it." +msgstr "" + +msgid "" +"Heap types (:c:macro:`Py_TPFLAGS_HEAPTYPE`) must visit their type with::" +msgstr "" + +msgid "Py_VISIT(Py_TYPE(self));" +msgstr "" + +msgid "" +"It is only needed since Python 3.9. To support Python 3.8 and older, this " +"line must be conditional::" +msgstr "" + +msgid "" +"#if PY_VERSION_HEX >= 0x03090000\n" +" Py_VISIT(Py_TYPE(self));\n" +"#endif" +msgstr "" + +msgid "" +"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" +"`~PyTypeObject.tp_flags` field, the traverse function must call :c:func:" +"`PyObject_VisitManagedDict` like this::" +msgstr "" + +msgid "PyObject_VisitManagedDict((PyObject*)self, visit, arg);" +msgstr "" + +msgid "" +"When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members " +"that the instance *owns* (by having :term:`strong references ` to them) must be visited. For instance, if an object supports " +"weak references via the :c:member:`~PyTypeObject.tp_weaklist` slot, the " +"pointer supporting the linked list (what *tp_weaklist* points to) must " +"**not** be visited as the instance does not directly own the weak references " +"to itself (the weakreference list is there to support the weak reference " +"machinery, but the instance has no strong reference to the elements inside " +"it, as they are allowed to be removed even if the instance is still alive)." +msgstr "" + +msgid "" +"Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:" +"func:`!local_traverse` to have these specific names; don't name them just " +"anything." +msgstr "" + +msgid "" +"Instances of :ref:`heap-allocated types ` hold a reference to " +"their type. Their traversal function must therefore either visit :c:func:" +"`Py_TYPE(self) `, or delegate this responsibility by calling " +"``tp_traverse`` of another heap-allocated type (such as a heap-allocated " +"superclass). If they do not, the type object may not be garbage-collected." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_traverse` function can be called from any " +"thread." +msgstr "" + +msgid "" +"Heap-allocated types are expected to visit ``Py_TYPE(self)`` in " +"``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses." +msgstr "" + +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_clear` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" +"member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` " +"are all inherited from the base type if they are all zero in the subtype." +msgstr "" + +msgid "An optional pointer to a clear function. The signature is::" +msgstr "" + +msgid "int tp_clear(PyObject *);" +msgstr "" + +msgid "" +"The purpose of this function is to break reference cycles that are causing " +"a :term:`cyclic isolate` so that the objects can be safely destroyed. A " +"cleared object is a partially destroyed object; the object is not obligated " +"to satisfy design invariants held during normal use." +msgstr "" + +msgid "" +":c:member:`!tp_clear` does not need to delete references to objects that " +"can't participate in reference cycles, such as Python strings or Python " +"integers. However, it may be convenient to clear all references, and write " +"the type's :c:member:`~PyTypeObject.tp_dealloc` function to invoke :c:member:" +"`!tp_clear` to avoid code duplication. (Beware that :c:member:`!tp_clear` " +"might have already been called. Prefer calling idempotent functions like :c:" +"func:`Py_CLEAR`.)" +msgstr "" + +msgid "" +"Any non-trivial cleanup should be performed in :c:member:`~PyTypeObject." +"tp_finalize` instead of :c:member:`!tp_clear`." +msgstr "" + +msgid "" +"If :c:member:`!tp_clear` fails to break a reference cycle then the objects " +"in the :term:`cyclic isolate` may remain indefinitely uncollectable " +"(\"leak\"). See :data:`gc.garbage`." +msgstr "" + +msgid "" +"Referents (direct and indirect) might have already been cleared; they are " +"not guaranteed to be in a consistent state." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_clear` function can be called from any " +"thread." +msgstr "" + +msgid "" +"An object is not guaranteed to be automatically cleared before its " +"destructor (:c:member:`~PyTypeObject.tp_dealloc`) is called." +msgstr "" + +msgid "" +"This function differs from the destructor (:c:member:`~PyTypeObject." +"tp_dealloc`) in the following ways:" +msgstr "" + +msgid "" +"The purpose of clearing an object is to remove references to other objects " +"that might participate in a reference cycle. The purpose of the destructor, " +"on the other hand, is a superset: it must release *all* resources it owns, " +"including references to objects that cannot participate in a reference cycle " +"(e.g., integers) as well as the object's own memory (by calling :c:member:" +"`~PyTypeObject.tp_free`)." +msgstr "" + +msgid "" +"When :c:member:`!tp_clear` is called, other objects might still hold " +"references to the object being cleared. Because of this, :c:member:`!" +"tp_clear` must not deallocate the object's own memory (:c:member:" +"`~PyTypeObject.tp_free`). The destructor, on the other hand, is only called " +"when no (strong) references exist, and as such, must safely destroy the " +"object itself by deallocating it." +msgstr "" + +msgid "" +":c:member:`!tp_clear` might never be automatically called. An object's " +"destructor, on the other hand, will be automatically called some time after " +"the object becomes unreachable (i.e., either there are no references to the " +"object or the object is a member of a :term:`cyclic isolate`)." +msgstr "" + +msgid "" +"No guarantees are made about when, if, or how often Python automatically " +"clears an object, except:" +msgstr "" + +msgid "" +"Python will not automatically clear an object if it is reachable, i.e., " +"there is a reference to it and it is not a member of a :term:`cyclic " +"isolate`." +msgstr "" + +msgid "" +"Python will not automatically clear an object if it has not been " +"automatically finalized (see :c:member:`~PyTypeObject.tp_finalize`). (If " +"the finalizer resurrected the object, the object may or may not be " +"automatically finalized again before it is cleared.)" +msgstr "" + +msgid "" +"If an object is a member of a :term:`cyclic isolate`, Python will not " +"automatically clear it if any member of the cyclic isolate has not yet been " +"automatically finalized (:c:member:`~PyTypeObject.tp_finalize`)." +msgstr "" + +msgid "" +"Python will not destroy an object until after any automatic calls to its :c:" +"member:`!tp_clear` function have returned. This ensures that the act of " +"breaking a reference cycle does not invalidate the ``self`` pointer while :c:" +"member:`!tp_clear` is still executing." +msgstr "" + +msgid "" +"Python will not automatically call :c:member:`!tp_clear` multiple times " +"concurrently." +msgstr "" + +msgid "" +"CPython currently only automatically clears objects as needed to break " +"reference cycles in a :term:`cyclic isolate`, but future versions might " +"clear objects regularly before their destruction." +msgstr "" + +msgid "" +"Taken together, all :c:member:`~PyTypeObject.tp_clear` functions in the " +"system must combine to break all reference cycles. This is subtle, and if " +"in any doubt supply a :c:member:`~PyTypeObject.tp_clear` function. For " +"example, the tuple type does not implement a :c:member:`~PyTypeObject." +"tp_clear` function, because it's possible to prove that no reference cycle " +"can be composed entirely of tuples. Therefore the :c:member:`~PyTypeObject." +"tp_clear` functions of other types are responsible for breaking any cycle " +"containing a tuple. This isn't immediately obvious, and there's rarely a " +"good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`." +msgstr "" + +msgid "" +"Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the " +"instance's references to those of its members that may be Python objects, " +"and set its pointers to those members to ``NULL``, as in the following " +"example::" +msgstr "" + +msgid "" +"static int\n" +"local_clear(PyObject *op)\n" +"{\n" +" localobject *self = (localobject *) op;\n" +" Py_CLEAR(self->key);\n" +" Py_CLEAR(self->args);\n" +" Py_CLEAR(self->kw);\n" +" Py_CLEAR(self->dict);\n" +" return 0;\n" +"}" +msgstr "" + +msgid "" +"The :c:func:`Py_CLEAR` macro should be used, because clearing references is " +"delicate: the reference to the contained object must not be released (via :" +"c:func:`Py_DECREF`) until after the pointer to the contained object is set " +"to ``NULL``. This is because releasing the reference may cause the " +"contained object to become trash, triggering a chain of reclamation activity " +"that may include invoking arbitrary Python code (due to finalizers, or " +"weakref callbacks, associated with the contained object). If it's possible " +"for such code to reference *self* again, it's important that the pointer to " +"the contained object be ``NULL`` at that time, so that *self* knows the " +"contained object can no longer be used. The :c:func:`Py_CLEAR` macro " +"performs the operations in a safe order." +msgstr "" + +msgid "" +"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" +"`~PyTypeObject.tp_flags` field, the clear function must call :c:func:" +"`PyObject_ClearManagedDict` like this::" +msgstr "" + +msgid "PyObject_ClearManagedDict((PyObject*)self);" +msgstr "" + +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_traverse` and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :" +"c:member:`~PyTypeObject.tp_traverse`, and :c:member:`~PyTypeObject.tp_clear` " +"are all inherited from the base type if they are all zero in the subtype." +msgstr "" + +msgid "" +"An optional pointer to the rich comparison function, whose signature is::" +msgstr "" + +msgid "PyObject *tp_richcompare(PyObject *self, PyObject *other, int op);" +msgstr "" + +msgid "" +"The first parameter is guaranteed to be an instance of the type that is " +"defined by :c:type:`PyTypeObject`." +msgstr "" + +msgid "" +"The function should return the result of the comparison (usually ``Py_True`` " +"or ``Py_False``). If the comparison is undefined, it must return " +"``Py_NotImplemented``, if another error occurred it must return ``NULL`` and " +"set an exception condition." +msgstr "" + +msgid "" +"The following constants are defined to be used as the third argument for :c:" +"member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:" +msgstr "" + +msgid "Constant" +msgstr "" + +msgid "Comparison" +msgstr "" + +msgid "``<``" +msgstr "``<``" + +msgid "``<=``" +msgstr "``<=``" + +msgid "``==``" +msgstr "``==``" + +msgid "``!=``" +msgstr "``!=``" + +msgid "``>``" +msgstr "``>``" + +msgid "``>=``" +msgstr "``>=``" + +msgid "" +"The following macro is defined to ease writing rich comparison functions:" +msgstr "" + +msgid "" +"Return ``Py_True`` or ``Py_False`` from the function, depending on the " +"result of a comparison. VAL_A and VAL_B must be orderable by C comparison " +"operators (for example, they may be C ints or floats). The third argument " +"specifies the requested operation, as for :c:func:`PyObject_RichCompare`." +msgstr "" + +msgid "The returned value is a new :term:`strong reference`." +msgstr "" + +msgid "On error, sets an exception and returns ``NULL`` from the function." +msgstr "" + +msgid "" +"This field is inherited by subtypes together with :c:member:`~PyTypeObject." +"tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:" +"member:`~PyTypeObject.tp_hash` when the subtype's :c:member:`~PyTypeObject." +"tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." +msgstr "" + +msgid "" +":c:data:`PyBaseObject_Type` provides a :c:member:`~PyTypeObject." +"tp_richcompare` implementation, which may be inherited. However, if only :c:" +"member:`~PyTypeObject.tp_hash` is defined, not even the inherited function " +"is used and instances of the type will not be able to participate in any " +"comparisons." +msgstr "" + +msgid "" +"While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` " +"should be used instead, if at all possible." +msgstr "" + +msgid "" +"If the instances of this type are weakly referenceable, this field is " +"greater than zero and contains the offset in the instance structure of the " +"weak reference list head (ignoring the GC header, if present); this offset " +"is used by :c:func:`PyObject_ClearWeakRefs` and the ``PyWeakref_*`` " +"functions. The instance structure needs to include a field of type :c:expr:" +"`PyObject*` which is initialized to ``NULL``." +msgstr "" + +msgid "" +"Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that " +"is the list head for weak references to the type object itself." +msgstr "" + +msgid "" +"It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit " +"and :c:member:`~PyTypeObject.tp_weaklistoffset`." +msgstr "" + +msgid "" +"This field is inherited by subtypes, but see the rules listed below. A " +"subtype may override this offset; this means that the subtype uses a " +"different weak reference list head than the base type. Since the list head " +"is always found via :c:member:`~PyTypeObject.tp_weaklistoffset`, this should " +"not be a problem." +msgstr "" + +msgid "" +"If the :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` bit is set in the :c:member:" +"`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject." +"tp_weaklistoffset` will be set to a negative value, to indicate that it is " +"unsafe to use this field." +msgstr "" + +msgid "" +"An optional pointer to a function that returns an :term:`iterator` for the " +"object. Its presence normally signals that the instances of this type are :" +"term:`iterable` (although sequences may be iterable without this function)." +msgstr "" + +msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" +msgstr "" + +msgid "PyObject *tp_iter(PyObject *self);" +msgstr "" + +msgid "" +"An optional pointer to a function that returns the next item in an :term:" +"`iterator`. The signature is::" +msgstr "" + +msgid "PyObject *tp_iternext(PyObject *self);" +msgstr "" + +msgid "" +"When the iterator is exhausted, it must return ``NULL``; a :exc:" +"`StopIteration` exception may or may not be set. When another error occurs, " +"it must return ``NULL`` too. Its presence signals that the instances of " +"this type are iterators." +msgstr "" + +msgid "" +"Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` " +"function, and that function should return the iterator instance itself (not " +"a new iterator instance)." +msgstr "" + +msgid "This function has the same signature as :c:func:`PyIter_Next`." +msgstr "" + +msgid "" +"An optional pointer to a static ``NULL``-terminated array of :c:type:" +"`PyMethodDef` structures, declaring regular methods of this type." +msgstr "" + +msgid "" +"For each entry in the array, an entry is added to the type's dictionary " +"(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor." +msgstr "" + +msgid "" +"This field is not inherited by subtypes (methods are inherited through a " +"different mechanism)." +msgstr "" + +msgid "" +"An optional pointer to a static ``NULL``-terminated array of :c:type:" +"`PyMemberDef` structures, declaring regular data members (fields or slots) " +"of instances of this type." +msgstr "" + +msgid "" +"For each entry in the array, an entry is added to the type's dictionary " +"(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor." +msgstr "" + +msgid "" +"This field is not inherited by subtypes (members are inherited through a " +"different mechanism)." +msgstr "" + +msgid "" +"An optional pointer to a static ``NULL``-terminated array of :c:type:" +"`PyGetSetDef` structures, declaring computed attributes of instances of this " +"type." +msgstr "" + +msgid "" +"For each entry in the array, an entry is added to the type's dictionary " +"(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor." +msgstr "" + +msgid "" +"This field is not inherited by subtypes (computed attributes are inherited " +"through a different mechanism)." +msgstr "" + +msgid "" +"An optional pointer to a base type from which type properties are " +"inherited. At this level, only single inheritance is supported; multiple " +"inheritance require dynamically creating a type object by calling the " +"metatype." +msgstr "" + +msgid "" +"Slot initialization is subject to the rules of initializing globals. C99 " +"requires the initializers to be \"address constants\". Function designators " +"like :c:func:`PyType_GenericNew`, with implicit conversion to a pointer, are " +"valid C99 address constants." +msgstr "" + +msgid "" +"However, the unary '&' operator applied to a non-static variable like :c:" +"data:`PyBaseObject_Type` is not required to produce an address constant. " +"Compilers may support this (gcc does), MSVC does not. Both compilers are " +"strictly standard conforming in this particular behavior." +msgstr "" + +msgid "" +"Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " +"extension module's init function." +msgstr "" + +msgid "This field is not inherited by subtypes (obviously)." +msgstr "" + +msgid "" +"This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " +"is known as the type :class:`object`)." +msgstr "" + +msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." +msgstr "" + +msgid "" +"This field should normally be initialized to ``NULL`` before PyType_Ready is " +"called; it may also be initialized to a dictionary containing initial " +"attributes for the type. Once :c:func:`PyType_Ready` has initialized the " +"type, extra attributes for the type may be added to this dictionary only if " +"they don't correspond to overloaded operations (like :meth:`~object." +"__add__`). Once initialization for the type has finished, this field should " +"be treated as read-only." +msgstr "" + +msgid "" +"Some types may not store their dictionary in this slot. Use :c:func:" +"`PyType_GetDict` to retrieve the dictionary for an arbitrary type." +msgstr "" + +msgid "" +"Internals detail: For static builtin types, this is always ``NULL``. " +"Instead, the dict for such types is stored on ``PyInterpreterState``. Use :c:" +"func:`PyType_GetDict` to get the dict for an arbitrary type." +msgstr "" + +msgid "" +"This field is not inherited by subtypes (though the attributes defined in " +"here are inherited through a different mechanism)." +msgstr "" + +msgid "" +"If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " +"dictionary to it." +msgstr "" + +msgid "" +"It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:" +"member:`~PyTypeObject.tp_dict` with the dictionary C-API." +msgstr "" + +msgid "An optional pointer to a \"descriptor get\" function." +msgstr "" + +msgid "The function signature is::" +msgstr "" + +msgid "PyObject * tp_descr_get(PyObject *self, PyObject *obj, PyObject *type);" +msgstr "" + +msgid "" +"An optional pointer to a function for setting and deleting a descriptor's " +"value." +msgstr "" + +msgid "int tp_descr_set(PyObject *self, PyObject *obj, PyObject *value);" +msgstr "" + +msgid "The *value* argument is set to ``NULL`` to delete the value." +msgstr "" + +msgid "" +"While this field is still supported, :c:macro:`Py_TPFLAGS_MANAGED_DICT` " +"should be used instead, if at all possible." +msgstr "" + +msgid "" +"If the instances of this type have a dictionary containing instance " +"variables, this field is non-zero and contains the offset in the instances " +"of the type of the instance variable dictionary; this offset is used by :c:" +"func:`PyObject_GenericGetAttr`." +msgstr "" + +msgid "" +"Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is " +"the dictionary for attributes of the type object itself." +msgstr "" + +msgid "" +"The value specifies the offset of the dictionary from the start of the " +"instance structure." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_dictoffset` should be regarded as write-" +"only. To get the pointer to the dictionary call :c:func:" +"`PyObject_GenericGetDict`. Calling :c:func:`PyObject_GenericGetDict` may " +"need to allocate memory for the dictionary, so it is may be more efficient " +"to call :c:func:`PyObject_GetAttr` when accessing an attribute on the object." +msgstr "" + +msgid "" +"It is an error to set both the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit and :c:" +"member:`~PyTypeObject.tp_dictoffset`." +msgstr "" + +msgid "" +"This field is inherited by subtypes. A subtype should not override this " +"offset; doing so could be unsafe, if C code tries to access the dictionary " +"at the previous offset. To properly support inheritance, use :c:macro:" +"`Py_TPFLAGS_MANAGED_DICT`." +msgstr "" + +msgid "" +"This slot has no default. For :ref:`static types `, if the " +"field is ``NULL`` then no :attr:`~object.__dict__` gets created for " +"instances." +msgstr "" + +msgid "" +"If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` bit is set in the :c:member:" +"`~PyTypeObject.tp_flags` field, then :c:member:`~PyTypeObject.tp_dictoffset` " +"will be set to ``-1``, to indicate that it is unsafe to use this field." +msgstr "" + +msgid "An optional pointer to an instance initialization function." +msgstr "" + +msgid "" +"This function corresponds to the :meth:`~object.__init__` method of " +"classes. Like :meth:`!__init__`, it is possible to create an instance " +"without calling :meth:`!__init__`, and it is possible to reinitialize an " +"instance by calling its :meth:`!__init__` method again." +msgstr "" + +msgid "int tp_init(PyObject *self, PyObject *args, PyObject *kwds);" +msgstr "" + +msgid "" +"The self argument is the instance to be initialized; the *args* and *kwds* " +"arguments represent positional and keyword arguments of the call to :meth:" +"`~object.__init__`." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called " +"when an instance is created normally by calling its type, after the type's :" +"c:member:`~PyTypeObject.tp_new` function has returned an instance of the " +"type. If the :c:member:`~PyTypeObject.tp_new` function returns an instance " +"of some other type that is not a subtype of the original type, no :c:member:" +"`~PyTypeObject.tp_init` function is called; if :c:member:`~PyTypeObject." +"tp_new` returns an instance of a subtype of the original type, the " +"subtype's :c:member:`~PyTypeObject.tp_init` is called." +msgstr "" + +msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." +msgstr "" + +msgid "" +"For :ref:`static types ` this field does not have a default." +msgstr "" + +msgid "An optional pointer to an instance allocation function." +msgstr "" + +msgid "PyObject *tp_alloc(PyTypeObject *self, Py_ssize_t nitems);" +msgstr "" + +msgid "" +"Static subtypes inherit this slot, which will be :c:func:" +"`PyType_GenericAlloc` if inherited from :class:`object`." +msgstr "" + +msgid ":ref:`Heap subtypes ` do not inherit this slot." +msgstr "" + +msgid "" +"For heap subtypes, this field is always set to :c:func:`PyType_GenericAlloc`." +msgstr "" + +msgid "For static subtypes, this slot is inherited (see above)." +msgstr "" + +msgid "An optional pointer to an instance creation function." +msgstr "" + +msgid "" +"PyObject *tp_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds);" +msgstr "" + +msgid "" +"The *subtype* argument is the type of the object being created; the *args* " +"and *kwds* arguments represent positional and keyword arguments of the call " +"to the type. Note that *subtype* doesn't have to equal the type whose :c:" +"member:`~PyTypeObject.tp_new` function is called; it may be a subtype of " +"that type (but not an unrelated type)." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" +">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " +"only as much further initialization as is absolutely necessary. " +"Initialization that can safely be ignored or repeated should be placed in " +"the :c:member:`~PyTypeObject.tp_init` handler. A good rule of thumb is that " +"for immutable types, all initialization should take place in :c:member:" +"`~PyTypeObject.tp_new`, while for mutable types, most initialization should " +"be deferred to :c:member:`~PyTypeObject.tp_init`." +msgstr "" + +msgid "" +"Set the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag to disallow " +"creating instances of the type in Python." +msgstr "" + +msgid "" +"This field is inherited by subtypes, except it is not inherited by :ref:" +"`static types ` whose :c:member:`~PyTypeObject.tp_base` is " +"``NULL`` or ``&PyBaseObject_Type``." +msgstr "" + +msgid "" +"For :ref:`static types ` this field has no default. This means " +"if the slot is defined as ``NULL``, the type cannot be called to create new " +"instances; presumably there is some other way to create instances, like a " +"factory function." +msgstr "" + +msgid "" +"An optional pointer to an instance deallocation function. Its signature is::" +msgstr "" + +msgid "void tp_free(void *self);" +msgstr "" + +msgid "" +"This function must free the memory allocated by :c:member:`~PyTypeObject." +"tp_alloc`." +msgstr "" + +msgid "" +"Static subtypes inherit this slot, which will be :c:func:`PyObject_Free` if " +"inherited from :class:`object`. Exception: If the type supports garbage " +"collection (i.e., the :c:macro:`Py_TPFLAGS_HAVE_GC` flag is set in :c:member:" +"`~PyTypeObject.tp_flags`) and it would inherit :c:func:`PyObject_Free`, then " +"this slot is not inherited but instead defaults to :c:func:`PyObject_GC_Del`." +msgstr "" + +msgid "" +"For :ref:`heap subtypes `, this slot defaults to a deallocator " +"suitable to match :c:func:`PyType_GenericAlloc` and the value of the :c:" +"macro:`Py_TPFLAGS_HAVE_GC` flag." +msgstr "" + +msgid "An optional pointer to a function called by the garbage collector." +msgstr "" + +msgid "" +"The garbage collector needs to know whether a particular object is " +"collectible or not. Normally, it is sufficient to look at the object's " +"type's :c:member:`~PyTypeObject.tp_flags` field, and check the :c:macro:" +"`Py_TPFLAGS_HAVE_GC` flag bit. But some types have a mixture of statically " +"and dynamically allocated instances, and the statically allocated instances " +"are not collectible. Such types should define this function; it should " +"return ``1`` for a collectible instance, and ``0`` for a non-collectible " +"instance. The signature is::" +msgstr "" + +msgid "int tp_is_gc(PyObject *self);" +msgstr "" + +msgid "" +"(The only example of this are types themselves. The metatype, :c:data:" +"`PyType_Type`, defines this function to distinguish between statically and :" +"ref:`dynamically allocated types `.)" +msgstr "" + +msgid "" +"This slot has no default. If this field is ``NULL``, :c:macro:" +"`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." +msgstr "" + +msgid "Tuple of base types." +msgstr "" + +msgid "" +"This field should be set to ``NULL`` and treated as read-only. Python will " +"fill it in when the type is :c:func:`initialized `." +msgstr "" + +msgid "" +"For dynamically created classes, the ``Py_tp_bases`` :c:type:`slot " +"` can be used instead of the *bases* argument of :c:func:" +"`PyType_FromSpecWithBases`. The argument form is preferred." +msgstr "" + +msgid "" +"Multiple inheritance does not work well for statically defined types. If you " +"set ``tp_bases`` to a tuple, Python will not raise an error, but some slots " +"will only be inherited from the first base." +msgstr "" + +msgid "This field is not inherited." +msgstr "" + +msgid "" +"Tuple containing the expanded set of base types, starting with the type " +"itself and ending with :class:`object`, in Method Resolution Order." +msgstr "" + +msgid "" +"This field is not inherited; it is calculated fresh by :c:func:" +"`PyType_Ready`." +msgstr "" + +msgid "Unused. Internal use only." +msgstr "" + +msgid "" +"A collection of subclasses. Internal use only. May be an invalid pointer." +msgstr "" + +msgid "" +"To get a list of subclasses, call the Python method :py:meth:`~type." +"__subclasses__`." +msgstr "" + +msgid "" +"For some types, this field does not hold a valid :c:expr:`PyObject*`. The " +"type was changed to :c:expr:`void*` to indicate this." +msgstr "" + +msgid "" +"Weak reference list head, for weak references to this type object. Not " +"inherited. Internal use only." +msgstr "" + +msgid "" +"Internals detail: For the static builtin types this is always ``NULL``, even " +"if weakrefs are added. Instead, the weakrefs for each are stored on " +"``PyInterpreterState``. Use the public C-API or the internal " +"``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction." +msgstr "" + +msgid "" +"This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." +msgstr "" + +msgid "Used to index into the method cache. Internal use only." +msgstr "" + +msgid "" +"An optional pointer to an instance finalization function. This is the C " +"implementation of the :meth:`~object.__del__` special method. Its signature " +"is::" +msgstr "" + +msgid "void tp_finalize(PyObject *self);" +msgstr "" + +msgid "" +"The primary purpose of finalization is to perform any non-trivial cleanup " +"that must be performed before the object is destroyed, while the object and " +"any other objects it directly or indirectly references are still in a " +"consistent state. The finalizer is allowed to execute arbitrary Python code." +msgstr "" + +msgid "" +"Before Python automatically finalizes an object, some of the object's direct " +"or indirect referents might have themselves been automatically finalized. " +"However, none of the referents will have been automatically cleared (:c:" +"member:`~PyTypeObject.tp_clear`) yet." +msgstr "" + +msgid "" +"Other non-finalized objects might still be using a finalized object, so the " +"finalizer must leave the object in a sane state (e.g., invariants are still " +"met)." +msgstr "" + +msgid "" +"After Python automatically finalizes an object, Python might start " +"automatically clearing (:c:member:`~PyTypeObject.tp_clear`) the object and " +"its referents (direct and indirect). Cleared objects are not guaranteed to " +"be in a consistent state; a finalized object must be able to tolerate " +"cleared referents." +msgstr "" + +msgid "" +"An object is not guaranteed to be automatically finalized before its " +"destructor (:c:member:`~PyTypeObject.tp_dealloc`) is called. It is " +"recommended to call :c:func:`PyObject_CallFinalizerFromDealloc` at the " +"beginning of :c:member:`!tp_dealloc` to guarantee that the object is always " +"finalized before destruction." +msgstr "" + +msgid "" +"The :c:member:`~PyTypeObject.tp_finalize` function can be called from any " +"thread, although the :term:`GIL` will be held." +msgstr "" + +msgid "" +"The :c:member:`!tp_finalize` function can be called during shutdown, after " +"some global variables have been deleted. See the documentation of the :meth:" +"`~object.__del__` method for details." +msgstr "" + +msgid "" +"When Python finalizes an object, it behaves like the following algorithm:" +msgstr "" + +msgid "" +"Python might mark the object as *finalized*. Currently, Python always marks " +"objects whose type supports garbage collection (i.e., the :c:macro:" +"`Py_TPFLAGS_HAVE_GC` flag is set in :c:member:`~PyTypeObject.tp_flags`) and " +"never marks other types of objects; this might change in a future version." +msgstr "" + +msgid "" +"If the object is not marked as *finalized* and its :c:member:`!tp_finalize` " +"finalizer function is non-``NULL``, the finalizer function is called." +msgstr "" + +msgid "" +"If the finalizer function was called and the finalizer made the object " +"reachable (i.e., there is a reference to the object and it is not a member " +"of a :term:`cyclic isolate`), then the finalizer is said to have " +"*resurrected* the object. It is unspecified whether the finalizer can also " +"resurrect the object by adding a new reference to the object that does not " +"make it reachable, i.e., the object is (still) a member of a cyclic isolate." +msgstr "" + +msgid "" +"If the finalizer resurrected the object, the object's pending destruction is " +"canceled and the object's *finalized* mark might be removed if present. " +"Currently, Python never removes the *finalized* mark; this might change in a " +"future version." +msgstr "" + +msgid "" +"*Automatic finalization* refers to any finalization performed by Python " +"except via calls to :c:func:`PyObject_CallFinalizer` or :c:func:" +"`PyObject_CallFinalizerFromDealloc`. No guarantees are made about when, if, " +"or how often an object is automatically finalized, except:" +msgstr "" + +msgid "" +"Python will not automatically finalize an object if it is reachable, i.e., " +"there is a reference to it and it is not a member of a :term:`cyclic " +"isolate`." +msgstr "" + +msgid "" +"Python will not automatically finalize an object if finalizing it would not " +"mark the object as *finalized*. Currently, this applies to objects whose " +"type does not support garbage collection, i.e., the :c:macro:" +"`Py_TPFLAGS_HAVE_GC` flag is not set. Such objects can still be manually " +"finalized by calling :c:func:`PyObject_CallFinalizer` or :c:func:" +"`PyObject_CallFinalizerFromDealloc`." +msgstr "" + +msgid "" +"Python will not automatically finalize any two members of a :term:`cyclic " +"isolate` concurrently." +msgstr "" + +msgid "" +"Python will not automatically finalize an object after it has automatically " +"cleared (:c:member:`~PyTypeObject.tp_clear`) the object." +msgstr "" + +msgid "" +"If an object is a member of a :term:`cyclic isolate`, Python will not " +"automatically finalize it after automatically clearing (see :c:member:" +"`~PyTypeObject.tp_clear`) any other member." +msgstr "" + +msgid "" +"Python will automatically finalize every member of a :term:`cyclic isolate` " +"before it automatically clears (see :c:member:`~PyTypeObject.tp_clear`) any " +"of them." +msgstr "" + +msgid "" +"If Python is going to automatically clear an object (:c:member:" +"`~PyTypeObject.tp_clear`), it will automatically finalize the object first." +msgstr "" + +msgid "" +"Python currently only automatically finalizes objects that are members of a :" +"term:`cyclic isolate`, but future versions might finalize objects regularly " +"before their destruction." +msgstr "" + +msgid "" +"To manually finalize an object, do not call this function directly; call :c:" +"func:`PyObject_CallFinalizer` or :c:func:`PyObject_CallFinalizerFromDealloc` " +"instead." +msgstr "" + +msgid "" +":c:member:`~PyTypeObject.tp_finalize` should leave the current exception " +"status unchanged. The recommended way to write a non-trivial finalizer is " +"to back up the exception at the beginning by calling :c:func:" +"`PyErr_GetRaisedException` and restore the exception at the end by calling :" +"c:func:`PyErr_SetRaisedException`. If an exception is encountered in the " +"middle of the finalizer, log and clear it with :c:func:" +"`PyErr_WriteUnraisable` or :c:func:`PyErr_FormatUnraisable`. For example::" +msgstr "" + +msgid "" +"static void\n" +"foo_finalize(PyObject *self)\n" +"{\n" +" // Save the current exception, if any.\n" +" PyObject *exc = PyErr_GetRaisedException();\n" +"\n" +" // ...\n" +"\n" +" if (do_something_that_might_raise() != success_indicator) {\n" +" PyErr_WriteUnraisable(self);\n" +" goto done;\n" +" }\n" +"\n" +"done:\n" +" // Restore the saved exception. This silently discards any exception\n" +" // raised above, so be sure to call PyErr_WriteUnraisable first if\n" +" // necessary.\n" +" PyErr_SetRaisedException(exc);\n" +"}" +msgstr "" + +msgid "" +"Before version 3.8 it was necessary to set the :c:macro:" +"`Py_TPFLAGS_HAVE_FINALIZE` flags bit in order for this field to be used. " +"This is no longer required." +msgstr "" + +msgid ":pep:`442`: \"Safe object finalization\"" +msgstr "" + +msgid ":c:func:`PyObject_CallFinalizer`" +msgstr "" + +msgid ":c:func:`PyObject_CallFinalizerFromDealloc`" +msgstr "" + +msgid "" +"A :ref:`vectorcall function ` to use for calls of this type " +"object (rather than instances). In other words, ``tp_vectorcall`` can be " +"used to optimize ``type.__call__``, which typically returns a new instance " +"of *type*." +msgstr "" + +msgid "" +"As with any vectorcall function, if ``tp_vectorcall`` is ``NULL``, the " +"*tp_call* protocol (``Py_TYPE(type)->tp_call``) is used instead." +msgstr "" + +msgid "" +"The :ref:`vectorcall protocol ` requires that the vectorcall " +"function has the same behavior as the corresponding ``tp_call``. This means " +"that ``type->tp_vectorcall`` must match the behavior of ``Py_TYPE(type)-" +">tp_call``." +msgstr "" + +msgid "" +"Specifically, if *type* uses the default metaclass, ``type->tp_vectorcall`` " +"must behave the same as :c:expr:`PyType_Type->tp_call`, which:" +msgstr "" + +msgid "calls ``type->tp_new``," +msgstr "" + +msgid "" +"if the result is a subclass of *type*, calls ``type->tp_init`` on the result " +"of ``tp_new``, and" +msgstr "" + +msgid "returns the result of ``tp_new``." +msgstr "" + +msgid "" +"Typically, ``tp_vectorcall`` is overridden to optimize this process for " +"specific :c:member:`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject." +"tp_init`. When doing this for user-subclassable types, note that both can be " +"overridden (using :py:func:`~object.__new__` and :py:func:`~object." +"__init__`, respectively)." +msgstr "" + +msgid "This field is never inherited." +msgstr "" + +msgid "(the field exists since 3.8 but it's only used since 3.9)" +msgstr "" + +msgid "Internal. Do not use." +msgstr "" + +msgid "Static Types" +msgstr "" + +msgid "" +"Traditionally, types defined in C code are *static*, that is, a static :c:" +"type:`PyTypeObject` structure is defined directly in code and initialized " +"using :c:func:`PyType_Ready`." +msgstr "" + +msgid "" +"This results in types that are limited relative to types defined in Python:" +msgstr "" + +msgid "" +"Static types are limited to one base, i.e. they cannot use multiple " +"inheritance." +msgstr "" + +msgid "" +"Static type objects (but not necessarily their instances) are immutable. It " +"is not possible to add or modify the type object's attributes from Python." +msgstr "" + +msgid "" +"Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" +"specific state." +msgstr "" + +msgid "" +"Also, since :c:type:`PyTypeObject` is only part of the :ref:`Limited API " +"` as an opaque struct, any extension modules using static " +"types must be compiled for a specific Python minor version." +msgstr "" + +msgid "Heap Types" +msgstr "" + +msgid "" +"An alternative to :ref:`static types ` is *heap-allocated " +"types*, or *heap types* for short, which correspond closely to classes " +"created by Python's ``class`` statement. Heap types have the :c:macro:" +"`Py_TPFLAGS_HEAPTYPE` flag set." +msgstr "" + +msgid "" +"This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" +"func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`, :c:func:" +"`PyType_FromModuleAndSpec`, or :c:func:`PyType_FromMetaclass`." +msgstr "" + +msgid "Number Object Structures" +msgstr "" + +msgid "" +"This structure holds pointers to the functions which an object uses to " +"implement the number protocol. Each function is used by the function of " +"similar name documented in the :ref:`number` section." +msgstr "" + +msgid "Here is the structure definition::" +msgstr "" + +msgid "" +"typedef struct {\n" +" binaryfunc nb_add;\n" +" binaryfunc nb_subtract;\n" +" binaryfunc nb_multiply;\n" +" binaryfunc nb_remainder;\n" +" binaryfunc nb_divmod;\n" +" ternaryfunc nb_power;\n" +" unaryfunc nb_negative;\n" +" unaryfunc nb_positive;\n" +" unaryfunc nb_absolute;\n" +" inquiry nb_bool;\n" +" unaryfunc nb_invert;\n" +" binaryfunc nb_lshift;\n" +" binaryfunc nb_rshift;\n" +" binaryfunc nb_and;\n" +" binaryfunc nb_xor;\n" +" binaryfunc nb_or;\n" +" unaryfunc nb_int;\n" +" void *nb_reserved;\n" +" unaryfunc nb_float;\n" +"\n" +" binaryfunc nb_inplace_add;\n" +" binaryfunc nb_inplace_subtract;\n" +" binaryfunc nb_inplace_multiply;\n" +" binaryfunc nb_inplace_remainder;\n" +" ternaryfunc nb_inplace_power;\n" +" binaryfunc nb_inplace_lshift;\n" +" binaryfunc nb_inplace_rshift;\n" +" binaryfunc nb_inplace_and;\n" +" binaryfunc nb_inplace_xor;\n" +" binaryfunc nb_inplace_or;\n" +"\n" +" binaryfunc nb_floor_divide;\n" +" binaryfunc nb_true_divide;\n" +" binaryfunc nb_inplace_floor_divide;\n" +" binaryfunc nb_inplace_true_divide;\n" +"\n" +" unaryfunc nb_index;\n" +"\n" +" binaryfunc nb_matrix_multiply;\n" +" binaryfunc nb_inplace_matrix_multiply;\n" +"} PyNumberMethods;" +msgstr "" + +msgid "" +"Binary and ternary functions must check the type of all their operands, and " +"implement the necessary conversions (at least one of the operands is an " +"instance of the defined type). If the operation is not defined for the " +"given operands, binary and ternary functions must return " +"``Py_NotImplemented``, if another error occurred they must return ``NULL`` " +"and set an exception." +msgstr "" + +msgid "" +"The :c:member:`~PyNumberMethods.nb_reserved` field should always be " +"``NULL``. It was previously called :c:member:`!nb_long`, and was renamed in " +"Python 3.0.1." +msgstr "" + +msgid "Mapping Object Structures" +msgstr "" + +msgid "" +"This structure holds pointers to the functions which an object uses to " +"implement the mapping protocol. It has three members:" +msgstr "" + +msgid "" +"This function is used by :c:func:`PyMapping_Size` and :c:func:" +"`PyObject_Size`, and has the same signature. This slot may be set to " +"``NULL`` if the object has no defined length." +msgstr "" + +msgid "" +"This function is used by :c:func:`PyObject_GetItem` and :c:func:" +"`PySequence_GetSlice`, and has the same signature as :c:func:`!" +"PyObject_GetItem`. This slot must be filled for the :c:func:" +"`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." +msgstr "" + +msgid "" +"This function is used by :c:func:`PyObject_SetItem`, :c:func:" +"`PyObject_DelItem`, :c:func:`PySequence_SetSlice` and :c:func:" +"`PySequence_DelSlice`. It has the same signature as :c:func:`!" +"PyObject_SetItem`, but *v* can also be set to ``NULL`` to delete an item. " +"If this slot is ``NULL``, the object does not support item assignment and " +"deletion." +msgstr "" + +msgid "Sequence Object Structures" +msgstr "" + +msgid "" +"This structure holds pointers to the functions which an object uses to " +"implement the sequence protocol." +msgstr "" + +msgid "" +"This function is used by :c:func:`PySequence_Size` and :c:func:" +"`PyObject_Size`, and has the same signature. It is also used for handling " +"negative indices via the :c:member:`~PySequenceMethods.sq_item` and the :c:" +"member:`~PySequenceMethods.sq_ass_item` slots." +msgstr "" + +msgid "" +"This function is used by :c:func:`PySequence_Concat` and has the same " +"signature. It is also used by the ``+`` operator, after trying the numeric " +"addition via the :c:member:`~PyNumberMethods.nb_add` slot." +msgstr "" + +msgid "" +"This function is used by :c:func:`PySequence_Repeat` and has the same " +"signature. It is also used by the ``*`` operator, after trying numeric " +"multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot." +msgstr "" + +msgid "" +"This function is used by :c:func:`PySequence_GetItem` and has the same " +"signature. It is also used by :c:func:`PyObject_GetItem`, after trying the " +"subscription via the :c:member:`~PyMappingMethods.mp_subscript` slot. This " +"slot must be filled for the :c:func:`PySequence_Check` function to return " +"``1``, it can be ``NULL`` otherwise." +msgstr "" + +msgid "" +"Negative indexes are handled as follows: if the :c:member:" +"`~PySequenceMethods.sq_length` slot is filled, it is called and the sequence " +"length is used to compute a positive index which is passed to :c:member:" +"`~PySequenceMethods.sq_item`. If :c:member:`!sq_length` is ``NULL``, the " +"index is passed as is to the function." +msgstr "" + +msgid "" +"This function is used by :c:func:`PySequence_SetItem` and has the same " +"signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:" +"`PyObject_DelItem`, after trying the item assignment and deletion via the :c:" +"member:`~PyMappingMethods.mp_ass_subscript` slot. This slot may be left to " +"``NULL`` if the object does not support item assignment and deletion." +msgstr "" + +msgid "" +"This function may be used by :c:func:`PySequence_Contains` and has the same " +"signature. This slot may be left to ``NULL``, in this case :c:func:`!" +"PySequence_Contains` simply traverses the sequence until it finds a match." +msgstr "" + +msgid "" +"This function is used by :c:func:`PySequence_InPlaceConcat` and has the same " +"signature. It should modify its first operand, and return it. This slot " +"may be left to ``NULL``, in this case :c:func:`!PySequence_InPlaceConcat` " +"will fall back to :c:func:`PySequence_Concat`. It is also used by the " +"augmented assignment ``+=``, after trying numeric in-place addition via the :" +"c:member:`~PyNumberMethods.nb_inplace_add` slot." +msgstr "" + +msgid "" +"This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same " +"signature. It should modify its first operand, and return it. This slot " +"may be left to ``NULL``, in this case :c:func:`!PySequence_InPlaceRepeat` " +"will fall back to :c:func:`PySequence_Repeat`. It is also used by the " +"augmented assignment ``*=``, after trying numeric in-place multiplication " +"via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." +msgstr "" + +msgid "Buffer Object Structures" +msgstr "" + +msgid "" +"This structure holds pointers to the functions required by the :ref:`Buffer " +"protocol `. The protocol defines how an exporter object can " +"expose its internal data to consumer objects." +msgstr "" + +msgid "The signature of this function is::" +msgstr "" + +msgid "int (PyObject *exporter, Py_buffer *view, int flags);" +msgstr "" + +msgid "" +"Handle a request to *exporter* to fill in *view* as specified by *flags*. " +"Except for point (3), an implementation of this function MUST take these " +"steps:" +msgstr "" + +msgid "" +"Check if the request can be met. If not, raise :exc:`BufferError`, set :c:" +"expr:`view->obj` to ``NULL`` and return ``-1``." +msgstr "" + +msgid "Fill in the requested fields." +msgstr "" + +msgid "Increment an internal counter for the number of exports." +msgstr "" + +msgid "" +"Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`." +msgstr "" + +msgid "Return ``0``." +msgstr "" + +msgid "" +"If *exporter* is part of a chain or tree of buffer providers, two main " +"schemes can be used:" +msgstr "" + +msgid "" +"Re-export: Each member of the tree acts as the exporting object and sets :c:" +"expr:`view->obj` to a new reference to itself." +msgstr "" + +msgid "" +"Redirect: The buffer request is redirected to the root object of the tree. " +"Here, :c:expr:`view->obj` will be a new reference to the root object." +msgstr "" + +msgid "" +"The individual fields of *view* are described in section :ref:`Buffer " +"structure `, the rules how an exporter must react to " +"specific requests are in section :ref:`Buffer request types `." +msgstr "" + +msgid "" +"All memory pointed to in the :c:type:`Py_buffer` structure belongs to the " +"exporter and must remain valid until there are no consumers left. :c:member:" +"`~Py_buffer.format`, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer." +"strides`, :c:member:`~Py_buffer.suboffsets` and :c:member:`~Py_buffer." +"internal` are read-only for the consumer." +msgstr "" + +msgid "" +":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes " +"buffer while dealing correctly with all request types." +msgstr "" + +msgid "" +":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " +"this function." +msgstr "" + +msgid "void (PyObject *exporter, Py_buffer *view);" +msgstr "" + +msgid "" +"Handle a request to release the resources of the buffer. If no resources " +"need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be " +"``NULL``. Otherwise, a standard implementation of this function will take " +"these optional steps:" +msgstr "" + +msgid "Decrement an internal counter for the number of exports." +msgstr "" + +msgid "If the counter is ``0``, free all memory associated with *view*." +msgstr "" + +msgid "" +"The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep " +"track of buffer-specific resources. This field is guaranteed to remain " +"constant, while a consumer MAY pass a copy of the original buffer as the " +"*view* argument." +msgstr "" + +msgid "" +"This function MUST NOT decrement :c:expr:`view->obj`, since that is done " +"automatically in :c:func:`PyBuffer_Release` (this scheme is useful for " +"breaking reference cycles)." +msgstr "" + +msgid "" +":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " +"function." +msgstr "" + +msgid "Async Object Structures" +msgstr "" + +msgid "" +"This structure holds pointers to the functions required to implement :term:" +"`awaitable` and :term:`asynchronous iterator` objects." +msgstr "" + +msgid "" +"typedef struct {\n" +" unaryfunc am_await;\n" +" unaryfunc am_aiter;\n" +" unaryfunc am_anext;\n" +" sendfunc am_send;\n" +"} PyAsyncMethods;" +msgstr "" + +msgid "PyObject *am_await(PyObject *self);" +msgstr "" + +msgid "" +"The returned object must be an :term:`iterator`, i.e. :c:func:`PyIter_Check` " +"must return ``1`` for it." +msgstr "" + +msgid "" +"This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." +msgstr "" + +msgid "PyObject *am_aiter(PyObject *self);" +msgstr "" + +msgid "" +"Must return an :term:`asynchronous iterator` object. See :meth:`~object." +"__anext__` for details." +msgstr "" + +msgid "" +"This slot may be set to ``NULL`` if an object does not implement " +"asynchronous iteration protocol." +msgstr "" + +msgid "PyObject *am_anext(PyObject *self);" +msgstr "" + +msgid "" +"Must return an :term:`awaitable` object. See :meth:`~object.__anext__` for " +"details. This slot may be set to ``NULL``." +msgstr "" + +msgid "PySendResult am_send(PyObject *self, PyObject *arg, PyObject **result);" +msgstr "" + +msgid "" +"See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``." +msgstr "" + +msgid "Slot Type typedefs" +msgstr "" + +msgid "" +"The purpose of this function is to separate memory allocation from memory " +"initialization. It should return a pointer to a block of memory of adequate " +"length for the instance, suitably aligned, and initialized to zeros, but " +"with :c:member:`~PyObject.ob_refcnt` set to ``1`` and :c:member:`~PyObject." +"ob_type` set to the type argument. If the type's :c:member:`~PyTypeObject." +"tp_itemsize` is non-zero, the object's :c:member:`~PyVarObject.ob_size` " +"field should be initialized to *nitems* and the length of the allocated " +"memory block should be ``tp_basicsize + nitems*tp_itemsize``, rounded up to " +"a multiple of ``sizeof(void*)``; otherwise, *nitems* is not used and the " +"length of the block should be :c:member:`~PyTypeObject.tp_basicsize`." +msgstr "" + +msgid "" +"This function should not do any other instance initialization, not even to " +"allocate additional memory; that should be done by :c:member:`~PyTypeObject." +"tp_new`." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_free`." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_new`." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_init`." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_repr`." +msgstr "" + +msgid "Return the value of the named attribute for the object." +msgstr "" + +msgid "" +"Set the value of the named attribute for the object. The value argument is " +"set to ``NULL`` to delete the attribute." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_getattro`." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_setattro`." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_descr_get`." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_descr_set`." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_hash`." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_richcompare`." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_iter`." +msgstr "" + +msgid "See :c:member:`~PyTypeObject.tp_iternext`." +msgstr "" + +msgid "See :c:member:`~PyAsyncMethods.am_send`." +msgstr "" + +msgid "Examples" +msgstr "" + +msgid "" +"The following are simple examples of Python type definitions. They include " +"common usage you may encounter. Some demonstrate tricky corner cases. For " +"more examples, practical info, and a tutorial, see :ref:`defining-new-types` " +"and :ref:`new-types-topics`." +msgstr "" + +msgid "A basic :ref:`static type `::" +msgstr "" + +msgid "" +"typedef struct {\n" +" PyObject_HEAD\n" +" const char *data;\n" +"} MyObject;\n" +"\n" +"static PyTypeObject MyObject_Type = {\n" +" PyVarObject_HEAD_INIT(NULL, 0)\n" +" .tp_name = \"mymod.MyObject\",\n" +" .tp_basicsize = sizeof(MyObject),\n" +" .tp_doc = PyDoc_STR(\"My objects\"),\n" +" .tp_new = myobj_new,\n" +" .tp_dealloc = (destructor)myobj_dealloc,\n" +" .tp_repr = (reprfunc)myobj_repr,\n" +"};" +msgstr "" + +msgid "" +"You may also find older code (especially in the CPython code base) with a " +"more verbose initializer::" +msgstr "" + +msgid "" +"static PyTypeObject MyObject_Type = {\n" +" PyVarObject_HEAD_INIT(NULL, 0)\n" +" \"mymod.MyObject\", /* tp_name */\n" +" sizeof(MyObject), /* tp_basicsize */\n" +" 0, /* tp_itemsize */\n" +" (destructor)myobj_dealloc, /* tp_dealloc */\n" +" 0, /* tp_vectorcall_offset */\n" +" 0, /* tp_getattr */\n" +" 0, /* tp_setattr */\n" +" 0, /* tp_as_async */\n" +" (reprfunc)myobj_repr, /* tp_repr */\n" +" 0, /* tp_as_number */\n" +" 0, /* tp_as_sequence */\n" +" 0, /* tp_as_mapping */\n" +" 0, /* tp_hash */\n" +" 0, /* tp_call */\n" +" 0, /* tp_str */\n" +" 0, /* tp_getattro */\n" +" 0, /* tp_setattro */\n" +" 0, /* tp_as_buffer */\n" +" 0, /* tp_flags */\n" +" PyDoc_STR(\"My objects\"), /* tp_doc */\n" +" 0, /* tp_traverse */\n" +" 0, /* tp_clear */\n" +" 0, /* tp_richcompare */\n" +" 0, /* tp_weaklistoffset */\n" +" 0, /* tp_iter */\n" +" 0, /* tp_iternext */\n" +" 0, /* tp_methods */\n" +" 0, /* tp_members */\n" +" 0, /* tp_getset */\n" +" 0, /* tp_base */\n" +" 0, /* tp_dict */\n" +" 0, /* tp_descr_get */\n" +" 0, /* tp_descr_set */\n" +" 0, /* tp_dictoffset */\n" +" 0, /* tp_init */\n" +" 0, /* tp_alloc */\n" +" myobj_new, /* tp_new */\n" +"};" +msgstr "" + +msgid "A type that supports weakrefs, instance dicts, and hashing::" +msgstr "" + +msgid "" +"typedef struct {\n" +" PyObject_HEAD\n" +" const char *data;\n" +"} MyObject;\n" +"\n" +"static PyTypeObject MyObject_Type = {\n" +" PyVarObject_HEAD_INIT(NULL, 0)\n" +" .tp_name = \"mymod.MyObject\",\n" +" .tp_basicsize = sizeof(MyObject),\n" +" .tp_doc = PyDoc_STR(\"My objects\"),\n" +" .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |\n" +" Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_MANAGED_DICT |\n" +" Py_TPFLAGS_MANAGED_WEAKREF,\n" +" .tp_new = myobj_new,\n" +" .tp_traverse = (traverseproc)myobj_traverse,\n" +" .tp_clear = (inquiry)myobj_clear,\n" +" .tp_alloc = PyType_GenericNew,\n" +" .tp_dealloc = (destructor)myobj_dealloc,\n" +" .tp_repr = (reprfunc)myobj_repr,\n" +" .tp_hash = (hashfunc)myobj_hash,\n" +" .tp_richcompare = PyBaseObject_Type.tp_richcompare,\n" +"};" +msgstr "" + +msgid "" +"A str subclass that cannot be subclassed and cannot be called to create " +"instances (e.g. uses a separate factory func) using :c:macro:" +"`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::" +msgstr "" + +msgid "" +"typedef struct {\n" +" PyUnicodeObject raw;\n" +" char *extra;\n" +"} MyStr;\n" +"\n" +"static PyTypeObject MyStr_Type = {\n" +" PyVarObject_HEAD_INIT(NULL, 0)\n" +" .tp_name = \"mymod.MyStr\",\n" +" .tp_basicsize = sizeof(MyStr),\n" +" .tp_base = NULL, // set to &PyUnicode_Type in module init\n" +" .tp_doc = PyDoc_STR(\"my custom str\"),\n" +" .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DISALLOW_INSTANTIATION,\n" +" .tp_repr = (reprfunc)myobj_repr,\n" +"};" +msgstr "" + +msgid "" +"The simplest :ref:`static type ` with fixed-length instances::" +msgstr "" + +msgid "" +"typedef struct {\n" +" PyObject_HEAD\n" +"} MyObject;\n" +"\n" +"static PyTypeObject MyObject_Type = {\n" +" PyVarObject_HEAD_INIT(NULL, 0)\n" +" .tp_name = \"mymod.MyObject\",\n" +"};" +msgstr "" + +msgid "" +"The simplest :ref:`static type ` with variable-length " +"instances::" +msgstr "" + +msgid "" +"typedef struct {\n" +" PyObject_VAR_HEAD\n" +" const char *data[1];\n" +"} MyObject;\n" +"\n" +"static PyTypeObject MyObject_Type = {\n" +" PyVarObject_HEAD_INIT(NULL, 0)\n" +" .tp_name = \"mymod.MyObject\",\n" +" .tp_basicsize = sizeof(MyObject) - sizeof(char *),\n" +" .tp_itemsize = sizeof(char *),\n" +"};" +msgstr "" + +msgid "built-in function" +msgstr "" + +msgid "repr" +msgstr "" + +msgid "hash" +msgstr "" diff --git a/c-api/unicode.po b/c-api/unicode.po index c9972dea..503a2957 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -11,22 +11,25 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-29 14:15+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/unicode.rst:6 msgid "Unicode Objects and Codecs" msgstr "Unicode Objekte und Codecs" +#: ../../c-api/unicode.rst:9 msgid "Unicode Objects" msgstr "Unicode Objekte" +#: ../../c-api/unicode.rst:11 msgid "" "Since the implementation of :pep:`393` in Python 3.3, Unicode objects " "internally use a variety of representations, in order to allow handling the " @@ -42,65 +45,93 @@ msgstr "" "128, 256 oder 65536 liegen; andernfalls müssen Codepunkte unterhalb von " "1114112 sein (gesamter Unicode Bereich)." +#: ../../c-api/unicode.rst:17 msgid "" "UTF-8 representation is created on demand and cached in the Unicode object." msgstr "" +#: ../../c-api/unicode.rst:20 msgid "" "The :c:type:`Py_UNICODE` representation has been removed since Python 3.12 " "with deprecated APIs. See :pep:`623` for more information." msgstr "" +#: ../../c-api/unicode.rst:26 msgid "Unicode Type" msgstr "" +#: ../../c-api/unicode.rst:28 msgid "" "These are the basic Unicode object types used for the Unicode implementation " "in Python:" msgstr "" +#: ../../c-api/unicode.rst:33 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python Unicode type. " "It is exposed to Python code as :py:class:`str`." msgstr "" +#: ../../c-api/unicode.rst:39 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python Unicode " "iterator type. It is used to iterate over Unicode string objects." msgstr "" +#: ../../c-api/unicode.rst:47 msgid "" "These types are typedefs for unsigned integer types wide enough to contain " "characters of 32 bits, 16 bits and 8 bits, respectively. When dealing with " "single Unicode characters, use :c:type:`Py_UCS4`." msgstr "" +#: ../../c-api/unicode.rst:58 msgid "" "These subtypes of :c:type:`PyObject` represent a Python Unicode object. In " "almost all cases, they shouldn't be used directly, since all API functions " "that deal with Unicode objects take and return :c:type:`PyObject` pointers." msgstr "" +#: ../../c-api/unicode.rst:65 +msgid "" +"The structure of a particular object can be determined using the following " +"macros. The macros cannot fail; their behavior is undefined if their " +"argument is not a Python Unicode object." +msgstr "" + +#: ../../c-api/unicode.rst:74 +msgid "True if *o* uses the :c:struct:`PyCompactUnicodeObject` structure." +msgstr "" + +#: ../../c-api/unicode.rst:81 +msgid "True if *o* uses the :c:struct:`PyASCIIObject` structure." +msgstr "" + +#: ../../c-api/unicode.rst:86 msgid "" "The following APIs are C macros and static inlined functions for fast checks " "and access to internal read-only data of Unicode objects:" msgstr "" +#: ../../c-api/unicode.rst:91 msgid "" "Return true if the object *obj* is a Unicode object or an instance of a " "Unicode subtype. This function always succeeds." msgstr "" +#: ../../c-api/unicode.rst:97 msgid "" "Return true if the object *obj* is a Unicode object, but not an instance of " "a subtype. This function always succeeds." msgstr "" +#: ../../c-api/unicode.rst:103 msgid "" "Return the length of the Unicode string, in code points. *unicode* has to " "be a Unicode object in the \"canonical\" representation (not checked)." msgstr "" +#: ../../c-api/unicode.rst:113 msgid "" "Return a pointer to the canonical representation cast to UCS1, UCS2 or UCS4 " "integer types for direct character access. No checks are performed if the " @@ -108,12 +139,15 @@ msgid "" "`PyUnicode_KIND` to select the right function." msgstr "" +#: ../../c-api/unicode.rst:125 msgid "Return values of the :c:func:`PyUnicode_KIND` macro." msgstr "" +#: ../../c-api/unicode.rst:129 msgid "``PyUnicode_WCHAR_KIND`` has been removed." msgstr "" +#: ../../c-api/unicode.rst:135 msgid "" "Return one of the PyUnicode kind constants (see above) that indicate how " "many bytes per character this Unicode object uses to store its data. " @@ -121,15 +155,18 @@ msgid "" "(not checked)." msgstr "" +#: ../../c-api/unicode.rst:144 msgid "" "Return a void pointer to the raw Unicode buffer. *unicode* has to be a " "Unicode object in the \"canonical\" representation (not checked)." msgstr "" +#: ../../c-api/unicode.rst:153 msgid "" "Write the code point *value* to the given zero-based *index* in a string." msgstr "" +#: ../../c-api/unicode.rst:155 msgid "" "The *kind* value and *data* pointer must have been obtained from a string " "using :c:func:`PyUnicode_KIND` and :c:func:`PyUnicode_DATA` respectively. " @@ -138,157 +175,230 @@ msgid "" "apply." msgstr "" +#: ../../c-api/unicode.rst:161 msgid "" "The function performs no checks for any of its requirements, and is intended " "for usage in loops." msgstr "" +#: ../../c-api/unicode.rst:170 msgid "" "Read a code point from a canonical representation *data* (as obtained with :" "c:func:`PyUnicode_DATA`). No checks or ready calls are performed." msgstr "" +#: ../../c-api/unicode.rst:178 msgid "" "Read a character from a Unicode object *unicode*, which must be in the " "\"canonical\" representation. This is less efficient than :c:func:" "`PyUnicode_READ` if you do multiple consecutive reads." msgstr "" +#: ../../c-api/unicode.rst:187 msgid "" "Return the maximum code point that is suitable for creating another string " "based on *unicode*, which must be in the \"canonical\" representation. This " "is always an approximation but more efficient than iterating over the string." msgstr "" +#: ../../c-api/unicode.rst:196 msgid "" "Return ``1`` if the string is a valid identifier according to the language " "definition, section :ref:`identifiers`. Return ``0`` otherwise." msgstr "" +#: ../../c-api/unicode.rst:199 msgid "" "The function does not call :c:func:`Py_FatalError` anymore if the string is " "not ready." msgstr "" +#: ../../c-api/unicode.rst:206 msgid "" "Return true if the string only contains ASCII characters. Equivalent to :py:" "meth:`str.isascii`." msgstr "" +#: ../../c-api/unicode.rst:214 +msgid "" +"If the hash of *str*, as returned by :c:func:`PyObject_Hash`, has been " +"cached and is immediately available, return it. Otherwise, return ``-1`` " +"*without* setting an exception." +msgstr "" + +#: ../../c-api/unicode.rst:218 +msgid "" +"If *str* is not a string (that is, if ``PyUnicode_Check(obj)`` is false), " +"the behavior is undefined." +msgstr "" + +#: ../../c-api/unicode.rst:221 +msgid "This function never fails with an exception." +msgstr "" + +#: ../../c-api/unicode.rst:223 +msgid "" +"Note that there are no guarantees on when an object's hash is cached, and " +"the (non-)existence of a cached hash does not imply that the string has any " +"other properties." +msgstr "" + +#: ../../c-api/unicode.rst:229 msgid "Unicode Character Properties" msgstr "" +#: ../../c-api/unicode.rst:231 msgid "" "Unicode provides many different character properties. The most often needed " "ones are available through these macros which are mapped to C functions " "depending on the Python configuration." msgstr "" +#: ../../c-api/unicode.rst:238 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a whitespace character." msgstr "" +#: ../../c-api/unicode.rst:243 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a lowercase character." msgstr "" +#: ../../c-api/unicode.rst:248 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an uppercase character." msgstr "" +#: ../../c-api/unicode.rst:253 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a titlecase character." msgstr "" +#: ../../c-api/unicode.rst:258 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a linebreak character." msgstr "" +#: ../../c-api/unicode.rst:263 msgid "Return ``1`` or ``0`` depending on whether *ch* is a decimal character." msgstr "" +#: ../../c-api/unicode.rst:268 msgid "Return ``1`` or ``0`` depending on whether *ch* is a digit character." msgstr "" +#: ../../c-api/unicode.rst:273 msgid "Return ``1`` or ``0`` depending on whether *ch* is a numeric character." msgstr "" +#: ../../c-api/unicode.rst:278 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character." msgstr "" +#: ../../c-api/unicode.rst:283 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character." msgstr "" +#: ../../c-api/unicode.rst:288 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a printable character, in " "the sense of :meth:`str.isprintable`." msgstr "" +#: ../../c-api/unicode.rst:292 msgid "These APIs can be used for fast direct character conversions:" msgstr "" +#: ../../c-api/unicode.rst:297 msgid "Return the character *ch* converted to lower case." msgstr "" +#: ../../c-api/unicode.rst:302 msgid "Return the character *ch* converted to upper case." msgstr "" +#: ../../c-api/unicode.rst:307 msgid "Return the character *ch* converted to title case." msgstr "" +#: ../../c-api/unicode.rst:312 msgid "" "Return the character *ch* converted to a decimal positive integer. Return " "``-1`` if this is not possible. This function does not raise exceptions." msgstr "" +#: ../../c-api/unicode.rst:318 msgid "" "Return the character *ch* converted to a single digit integer. Return ``-1`` " "if this is not possible. This function does not raise exceptions." msgstr "" +#: ../../c-api/unicode.rst:324 msgid "" "Return the character *ch* converted to a double. Return ``-1.0`` if this is " "not possible. This function does not raise exceptions." msgstr "" +#: ../../c-api/unicode.rst:328 msgid "These APIs can be used to work with surrogates:" msgstr "" +#: ../../c-api/unicode.rst:332 msgid "Check if *ch* is a surrogate (``0xD800 <= ch <= 0xDFFF``)." msgstr "" +#: ../../c-api/unicode.rst:336 msgid "Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``)." msgstr "" +#: ../../c-api/unicode.rst:340 msgid "Check if *ch* is a low surrogate (``0xDC00 <= ch <= 0xDFFF``)." msgstr "" +#: ../../c-api/unicode.rst:344 +msgid "" +"Return the high UTF-16 surrogate (``0xD800`` to ``0xDBFF``) for a Unicode " +"code point in the range ``[0x10000; 0x10FFFF]``." +msgstr "" + +#: ../../c-api/unicode.rst:349 +msgid "" +"Return the low UTF-16 surrogate (``0xDC00`` to ``0xDFFF``) for a Unicode " +"code point in the range ``[0x10000; 0x10FFFF]``." +msgstr "" + +#: ../../c-api/unicode.rst:354 msgid "" "Join two surrogate code points and return a single :c:type:`Py_UCS4` value. " "*high* and *low* are respectively the leading and trailing surrogates in a " -"surrogate pair. *high* must be in the range [0xD800; 0xDBFF] and *low* must " -"be in the range [0xDC00; 0xDFFF]." +"surrogate pair. *high* must be in the range ``[0xD800; 0xDBFF]`` and *low* " +"must be in the range ``[0xDC00; 0xDFFF]``." msgstr "" +#: ../../c-api/unicode.rst:361 msgid "Creating and accessing Unicode strings" msgstr "" +#: ../../c-api/unicode.rst:363 msgid "" "To create Unicode objects and access their basic sequence properties, use " "these APIs:" msgstr "" +#: ../../c-api/unicode.rst:368 msgid "" "Create a new Unicode object. *maxchar* should be the true maximum code " "point to be placed in the string. As an approximation, it can be rounded up " "to the nearest value in the sequence 127, 255, 65535, 1114111." msgstr "" +#: ../../c-api/unicode.rst:372 msgid "On error, set an exception and return ``NULL``." msgstr "" +#: ../../c-api/unicode.rst:374 msgid "" "After creation, the string can be filled by :c:func:`PyUnicode_WriteChar`, :" "c:func:`PyUnicode_CopyCharacters`, :c:func:`PyUnicode_Fill`, :c:func:" @@ -297,31 +407,38 @@ msgid "" "before it's filled with its final contents, a string:" msgstr "" +#: ../../c-api/unicode.rst:381 msgid "must not be hashed," msgstr "" +#: ../../c-api/unicode.rst:382 msgid "" "must not be :c:func:`converted to UTF-8 `, or " "another non-\"canonical\" representation," msgstr "" +#: ../../c-api/unicode.rst:384 msgid "must not have its reference count changed," msgstr "" +#: ../../c-api/unicode.rst:385 msgid "must not be shared with code that might do one of the above." msgstr "" +#: ../../c-api/unicode.rst:387 msgid "" "This list is not exhaustive. Avoiding these uses is your responsibility; " "Python does not always check these requirements." msgstr "" +#: ../../c-api/unicode.rst:390 msgid "" "To avoid accidentally exposing a partially-written string object, prefer " "using the :c:type:`PyUnicodeWriter` API, or one of the ``PyUnicode_From*`` " "functions below." msgstr "" +#: ../../c-api/unicode.rst:401 msgid "" "Create a new Unicode object with the given *kind* (possible values are :c:" "macro:`PyUnicode_1BYTE_KIND` etc., as returned by :c:func:" @@ -329,6 +446,7 @@ msgid "" "1, 2 or 4 bytes per character, as given by the kind." msgstr "" +#: ../../c-api/unicode.rst:406 msgid "" "If necessary, the input *buffer* is copied and transformed into the " "canonical representation. For example, if the *buffer* is a UCS4 string (:c:" @@ -336,6 +454,7 @@ msgid "" "range, it will be transformed into UCS1 (:c:macro:`PyUnicode_1BYTE_KIND`)." msgstr "" +#: ../../c-api/unicode.rst:417 msgid "" "Create a Unicode object from the char buffer *str*. The bytes will be " "interpreted as being UTF-8 encoded. The buffer is copied into the new " @@ -343,23 +462,29 @@ msgid "" "data is not allowed." msgstr "" +#: ../../c-api/unicode.rst:423 msgid "This function raises :exc:`SystemError` when:" msgstr "" +#: ../../c-api/unicode.rst:425 msgid "*size* < 0," msgstr "" +#: ../../c-api/unicode.rst:426 msgid "*str* is ``NULL`` and *size* > 0" msgstr "" +#: ../../c-api/unicode.rst:428 msgid "*str* == ``NULL`` with *size* > 0 is not allowed anymore." msgstr "" +#: ../../c-api/unicode.rst:434 msgid "" "Create a Unicode object from a UTF-8 encoded null-terminated char buffer " "*str*." msgstr "" +#: ../../c-api/unicode.rst:440 msgid "" "Take a C :c:func:`printf`\\ -style *format* string and a variable number of " "arguments, calculate the size of the resulting Python Unicode string and " @@ -368,19 +493,23 @@ msgid "" "*format* ASCII-encoded string." msgstr "" +#: ../../c-api/unicode.rst:446 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" msgstr "" +#: ../../c-api/unicode.rst:449 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "" +#: ../../c-api/unicode.rst:451 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." msgstr "" +#: ../../c-api/unicode.rst:454 msgid "" "Minimum field width (optional). If specified as an ``'*'`` (asterisk), the " "actual width is given in the next argument, which must be of type :c:expr:" @@ -388,6 +517,7 @@ msgid "" "optional precision." msgstr "" +#: ../../c-api/unicode.rst:459 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. If " "specified as ``'*'`` (an asterisk), the actual precision is given in the " @@ -395,240 +525,316 @@ msgid "" "comes after the precision." msgstr "" +#: ../../c-api/unicode.rst:464 msgid "Length modifier (optional)." msgstr "" +#: ../../c-api/unicode.rst:466 msgid "Conversion type." msgstr "" +#: ../../c-api/unicode.rst:468 msgid "The conversion flag characters are:" msgstr "" +#: ../../c-api/unicode.rst:473 msgid "Flag" msgstr "" +#: ../../c-api/unicode.rst:473 msgid "Meaning" msgstr "" +#: ../../c-api/unicode.rst:475 msgid "``0``" msgstr "" +#: ../../c-api/unicode.rst:475 msgid "The conversion will be zero padded for numeric values." msgstr "" +#: ../../c-api/unicode.rst:477 msgid "``-``" msgstr "" +#: ../../c-api/unicode.rst:477 msgid "" "The converted value is left adjusted (overrides the ``0`` flag if both are " "given)." msgstr "" +#: ../../c-api/unicode.rst:481 msgid "" "The length modifiers for following integer conversions (``d``, ``i``, ``o``, " "``u``, ``x``, or ``X``) specify the type of the argument (:c:expr:`int` by " "default):" msgstr "" +#: ../../c-api/unicode.rst:488 msgid "Modifier" msgstr "" +#: ../../c-api/unicode.rst:488 msgid "Types" msgstr "" +#: ../../c-api/unicode.rst:490 msgid "``l``" msgstr "" +#: ../../c-api/unicode.rst:490 msgid ":c:expr:`long` or :c:expr:`unsigned long`" msgstr "" +#: ../../c-api/unicode.rst:492 msgid "``ll``" msgstr "" +#: ../../c-api/unicode.rst:492 msgid ":c:expr:`long long` or :c:expr:`unsigned long long`" msgstr "" +#: ../../c-api/unicode.rst:494 msgid "``j``" msgstr "" +#: ../../c-api/unicode.rst:494 msgid ":c:type:`intmax_t` or :c:type:`uintmax_t`" msgstr "" +#: ../../c-api/unicode.rst:496 msgid "``z``" msgstr "" +#: ../../c-api/unicode.rst:496 msgid ":c:type:`size_t` or :c:type:`ssize_t`" msgstr "" +#: ../../c-api/unicode.rst:498 msgid "``t``" msgstr "" +#: ../../c-api/unicode.rst:498 msgid ":c:type:`ptrdiff_t`" msgstr "" +#: ../../c-api/unicode.rst:501 msgid "" "The length modifier ``l`` for following conversions ``s`` or ``V`` specify " "that the type of the argument is :c:expr:`const wchar_t*`." msgstr "" +#: ../../c-api/unicode.rst:504 msgid "The conversion specifiers are:" msgstr "" +#: ../../c-api/unicode.rst:510 msgid "Conversion Specifier" msgstr "" +#: ../../c-api/unicode.rst:511 msgid "Type" msgstr "" +#: ../../c-api/unicode.rst:512 msgid "Comment" msgstr "" +#: ../../c-api/unicode.rst:514 msgid "``%``" msgstr "" +#: ../../c-api/unicode.rst:515 msgid "*n/a*" msgstr "" +#: ../../c-api/unicode.rst:516 msgid "The literal ``%`` character." msgstr "" +#: ../../c-api/unicode.rst:518 msgid "``d``, ``i``" msgstr "" +#: ../../c-api/unicode.rst:519 ../../c-api/unicode.rst:523 +#: ../../c-api/unicode.rst:527 ../../c-api/unicode.rst:531 +#: ../../c-api/unicode.rst:535 msgid "Specified by the length modifier" msgstr "" +#: ../../c-api/unicode.rst:520 msgid "The decimal representation of a signed C integer." msgstr "" +#: ../../c-api/unicode.rst:522 msgid "``u``" msgstr "" +#: ../../c-api/unicode.rst:524 msgid "The decimal representation of an unsigned C integer." msgstr "" +#: ../../c-api/unicode.rst:526 msgid "``o``" msgstr "" +#: ../../c-api/unicode.rst:528 msgid "The octal representation of an unsigned C integer." msgstr "" +#: ../../c-api/unicode.rst:530 msgid "``x``" msgstr "" +#: ../../c-api/unicode.rst:532 msgid "The hexadecimal representation of an unsigned C integer (lowercase)." msgstr "" +#: ../../c-api/unicode.rst:534 msgid "``X``" msgstr "" +#: ../../c-api/unicode.rst:536 msgid "The hexadecimal representation of an unsigned C integer (uppercase)." msgstr "" +#: ../../c-api/unicode.rst:538 msgid "``c``" msgstr "" +#: ../../c-api/unicode.rst:539 msgid ":c:expr:`int`" msgstr "" +#: ../../c-api/unicode.rst:540 msgid "A single character." msgstr "" +#: ../../c-api/unicode.rst:542 msgid "``s``" msgstr "" +#: ../../c-api/unicode.rst:543 msgid ":c:expr:`const char*` or :c:expr:`const wchar_t*`" msgstr "" +#: ../../c-api/unicode.rst:544 msgid "A null-terminated C character array." msgstr "" +#: ../../c-api/unicode.rst:546 msgid "``p``" msgstr "" +#: ../../c-api/unicode.rst:547 msgid ":c:expr:`const void*`" msgstr "" +#: ../../c-api/unicode.rst:548 msgid "" "The hex representation of a C pointer. Mostly equivalent to " "``printf(\"%p\")`` except that it is guaranteed to start with the literal " "``0x`` regardless of what the platform's ``printf`` yields." msgstr "" +#: ../../c-api/unicode.rst:553 msgid "``A``" msgstr "" +#: ../../c-api/unicode.rst:554 ../../c-api/unicode.rst:558 +#: ../../c-api/unicode.rst:568 ../../c-api/unicode.rst:572 +#: ../../c-api/unicode.rst:576 ../../c-api/unicode.rst:581 msgid ":c:expr:`PyObject*`" msgstr "" +#: ../../c-api/unicode.rst:555 msgid "The result of calling :func:`ascii`." msgstr "" +#: ../../c-api/unicode.rst:557 msgid "``U``" msgstr "" +#: ../../c-api/unicode.rst:559 msgid "A Unicode object." msgstr "" +#: ../../c-api/unicode.rst:561 msgid "``V``" msgstr "" +#: ../../c-api/unicode.rst:562 msgid ":c:expr:`PyObject*`, :c:expr:`const char*` or :c:expr:`const wchar_t*`" msgstr "" +#: ../../c-api/unicode.rst:563 msgid "" "A Unicode object (which may be ``NULL``) and a null-terminated C character " "array as a second parameter (which will be used, if the first parameter is " "``NULL``)." msgstr "" +#: ../../c-api/unicode.rst:567 msgid "``S``" msgstr "" +#: ../../c-api/unicode.rst:569 msgid "The result of calling :c:func:`PyObject_Str`." msgstr "" +#: ../../c-api/unicode.rst:571 msgid "``R``" msgstr "" +#: ../../c-api/unicode.rst:573 msgid "The result of calling :c:func:`PyObject_Repr`." msgstr "" +#: ../../c-api/unicode.rst:575 msgid "``T``" msgstr "" +#: ../../c-api/unicode.rst:577 msgid "" "Get the fully qualified name of an object type; call :c:func:" "`PyType_GetFullyQualifiedName`." msgstr "" +#: ../../c-api/unicode.rst:580 msgid "``#T``" msgstr "" +#: ../../c-api/unicode.rst:582 msgid "" "Similar to ``T`` format, but use a colon (``:``) as separator between the " "module name and the qualified name." msgstr "" +#: ../../c-api/unicode.rst:585 msgid "``N``" msgstr "" +#: ../../c-api/unicode.rst:586 ../../c-api/unicode.rst:591 msgid ":c:expr:`PyTypeObject*`" msgstr "" +#: ../../c-api/unicode.rst:587 msgid "" "Get the fully qualified name of a type; call :c:func:" "`PyType_GetFullyQualifiedName`." msgstr "" +#: ../../c-api/unicode.rst:590 msgid "``#N``" msgstr "" +#: ../../c-api/unicode.rst:592 msgid "" "Similar to ``N`` format, but use a colon (``:``) as separator between the " "module name and the qualified name." msgstr "" +#: ../../c-api/unicode.rst:596 msgid "" "The width formatter unit is number of characters rather than bytes. The " "precision formatter unit is number of bytes or :c:type:`wchar_t` items (if " @@ -638,23 +844,28 @@ msgid "" "``PyObject*`` argument is not ``NULL``)." msgstr "" +#: ../../c-api/unicode.rst:604 msgid "" "Unlike to C :c:func:`printf` the ``0`` flag has effect even when a precision " "is given for integer conversions (``d``, ``i``, ``u``, ``o``, ``x``, or " "``X``)." msgstr "" +#: ../../c-api/unicode.rst:608 msgid "Support for ``\"%lld\"`` and ``\"%llu\"`` added." msgstr "" +#: ../../c-api/unicode.rst:611 msgid "Support for ``\"%li\"``, ``\"%lli\"`` and ``\"%zi\"`` added." msgstr "" +#: ../../c-api/unicode.rst:614 msgid "" "Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, " "``\"%U\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." msgstr "" +#: ../../c-api/unicode.rst:618 msgid "" "Support for conversion specifiers ``o`` and ``X``. Support for length " "modifiers ``j`` and ``t``. Length modifiers are now applied to all integer " @@ -663,41 +874,50 @@ msgid "" "flag ``-``." msgstr "" +#: ../../c-api/unicode.rst:626 msgid "" "An unrecognized format character now sets a :exc:`SystemError`. In previous " "versions it caused all the rest of the format string to be copied as-is to " "the result string, and any extra arguments discarded." msgstr "" +#: ../../c-api/unicode.rst:630 msgid "Support for ``%T``, ``%#T``, ``%N`` and ``%#N`` formats added." msgstr "" +#: ../../c-api/unicode.rst:636 msgid "" "Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two " "arguments." msgstr "" +#: ../../c-api/unicode.rst:642 msgid "" "Copy an instance of a Unicode subtype to a new true Unicode object if " "necessary. If *obj* is already a true Unicode object (not a subtype), return " "a new :term:`strong reference` to the object." msgstr "" +#: ../../c-api/unicode.rst:646 msgid "" "Objects other than Unicode or its subtypes will cause a :exc:`TypeError`." msgstr "" +#: ../../c-api/unicode.rst:651 msgid "Create a Unicode Object from the given Unicode code point *ordinal*." msgstr "" +#: ../../c-api/unicode.rst:653 msgid "" "The ordinal must be in ``range(0x110000)``. A :exc:`ValueError` is raised in " "the case it is not." msgstr "" +#: ../../c-api/unicode.rst:660 msgid "Decode an encoded object *obj* to a Unicode object." msgstr "" +#: ../../c-api/unicode.rst:662 msgid "" ":class:`bytes`, :class:`bytearray` and other :term:`bytes-like objects " "` are decoded according to the given *encoding* and using " @@ -705,33 +925,40 @@ msgid "" "interface use the default values (see :ref:`builtincodecs` for details)." msgstr "" +#: ../../c-api/unicode.rst:668 msgid "" "All other objects, including Unicode objects, cause a :exc:`TypeError` to be " "set." msgstr "" +#: ../../c-api/unicode.rst:671 msgid "" "The API returns ``NULL`` if there was an error. The caller is responsible " "for decref'ing the returned objects." msgstr "" +#: ../../c-api/unicode.rst:677 msgid "" "Append the string *right* to the end of *p_left*. *p_left* must point to a :" "term:`strong reference` to a Unicode object; :c:func:`!PyUnicode_Append` " -"releases (\"steals\") this reference." +"releases (\":term:`steals `\") this reference." msgstr "" +#: ../../c-api/unicode.rst:682 msgid "On error, set *\\*p_left* to ``NULL`` and set an exception." msgstr "" +#: ../../c-api/unicode.rst:684 msgid "On success, set *\\*p_left* to a new strong reference to the result." msgstr "" +#: ../../c-api/unicode.rst:689 msgid "" "The function is similar to :c:func:`PyUnicode_Append`, with the only " "difference being that it decrements the reference count of *right* by one." msgstr "" +#: ../../c-api/unicode.rst:695 msgid "" "Return a mapping suitable for decoding a custom single-byte encoding. Given " "a Unicode string *string* of up to 256 characters representing an encoding " @@ -740,22 +967,27 @@ msgid "" "return ``NULL`` on invalid input." msgstr "" +#: ../../c-api/unicode.rst:706 msgid "" "Return the name of the default string encoding, ``\"utf-8\"``. See :func:" "`sys.getdefaultencoding`." msgstr "" +#: ../../c-api/unicode.rst:709 msgid "" "The returned string does not need to be freed, and is valid until " "interpreter shutdown." msgstr "" +#: ../../c-api/unicode.rst:715 msgid "Return the length of the Unicode object, in code points." msgstr "" +#: ../../c-api/unicode.rst:717 msgid "On error, set an exception and return ``-1``." msgstr "" +#: ../../c-api/unicode.rst:728 msgid "" "Copy characters from one Unicode object into another. This function " "performs character conversion when necessary and falls back to :c:func:`!" @@ -763,51 +995,62 @@ msgid "" "otherwise returns the number of copied characters." msgstr "" +#: ../../c-api/unicode.rst:733 ../../c-api/unicode.rst:763 +#: ../../c-api/unicode.rst:783 msgid "" "The string must not have been “used” yet. See :c:func:`PyUnicode_New` for " "details." msgstr "" +#: ../../c-api/unicode.rst:741 msgid "" "Resize a Unicode object *\\*unicode* to the new *length* in code points." msgstr "" +#: ../../c-api/unicode.rst:743 msgid "" "Try to resize the string in place (which is usually faster than allocating a " "new string and copying characters), or create a new string." msgstr "" +#: ../../c-api/unicode.rst:746 msgid "" "*\\*unicode* is modified to point to the new (resized) object and ``0`` is " "returned on success. Otherwise, ``-1`` is returned and an exception is set, " "and *\\*unicode* is left untouched." msgstr "" +#: ../../c-api/unicode.rst:750 msgid "" "The function doesn't check string content, the result may not be a string in " "canonical representation." msgstr "" +#: ../../c-api/unicode.rst:757 msgid "" "Fill a string with a character: write *fill_char* into ``unicode[start:" "start+length]``." msgstr "" +#: ../../c-api/unicode.rst:760 msgid "" "Fail if *fill_char* is bigger than the string maximum character, or if the " "string has more than 1 reference." msgstr "" +#: ../../c-api/unicode.rst:766 msgid "" -"Return the number of written character, or return ``-1`` and raise an " +"Return the number of written characters, or return ``-1`` and raise an " "exception on error." msgstr "" +#: ../../c-api/unicode.rst:775 msgid "" "Write a *character* to the string *unicode* at the zero-based *index*. " "Return ``0`` on success, ``-1`` on error with an exception set." msgstr "" +#: ../../c-api/unicode.rst:778 msgid "" "This function checks that *unicode* is a Unicode object, that the index is " "not out of bounds, and that the object's reference count is one. See :c:func:" @@ -815,21 +1058,25 @@ msgid "" "responsibility." msgstr "" +#: ../../c-api/unicode.rst:791 msgid "" "Read a character from a string. This function checks that *unicode* is a " "Unicode object and the index is not out of bounds, in contrast to :c:func:" "`PyUnicode_READ_CHAR`, which performs no error checking." msgstr "" +#: ../../c-api/unicode.rst:795 msgid "Return character on success, ``-1`` on error with an exception set." msgstr "" +#: ../../c-api/unicode.rst:803 msgid "" "Return a substring of *unicode*, from character index *start* (included) to " "character index *end* (excluded). Negative indices are not supported. On " "error, set an exception and return ``NULL``." msgstr "" +#: ../../c-api/unicode.rst:813 msgid "" "Copy the string *unicode* into a UCS4 buffer, including a null character, if " "*copy_null* is set. Returns ``NULL`` and sets an exception on error (in " @@ -837,6 +1084,7 @@ msgid "" "*unicode*). *buffer* is returned on success." msgstr "" +#: ../../c-api/unicode.rst:823 msgid "" "Copy the string *unicode* into a new UCS4 buffer that is allocated using :c:" "func:`PyMem_Malloc`. If this fails, ``NULL`` is returned with a :exc:" @@ -844,14 +1092,17 @@ msgid "" "appended." msgstr "" +#: ../../c-api/unicode.rst:832 msgid "Locale Encoding" msgstr "" +#: ../../c-api/unicode.rst:834 msgid "" "The current locale encoding can be used to decode text from the operating " "system." msgstr "" +#: ../../c-api/unicode.rst:841 msgid "" "Decode a string from UTF-8 on Android and VxWorks, or from the current " "locale encoding on other platforms. The supported error handlers are " @@ -860,17 +1111,21 @@ msgid "" "null character but cannot contain embedded null characters." msgstr "" +#: ../../c-api/unicode.rst:848 msgid "" "Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from the :" "term:`filesystem encoding and error handler`." msgstr "" +#: ../../c-api/unicode.rst:851 ../../c-api/unicode.rst:886 msgid "This function ignores the :ref:`Python UTF-8 Mode `." msgstr "" +#: ../../c-api/unicode.rst:855 ../../c-api/unicode.rst:971 msgid "The :c:func:`Py_DecodeLocale` function." msgstr "" +#: ../../c-api/unicode.rst:859 msgid "" "The function now also uses the current locale encoding for the " "``surrogateescape`` error handler, except on Android. Previously, :c:func:" @@ -878,11 +1133,13 @@ msgid "" "locale encoding was used for ``strict``." msgstr "" +#: ../../c-api/unicode.rst:868 msgid "" "Similar to :c:func:`PyUnicode_DecodeLocaleAndSize`, but compute the string " "length using :c:func:`!strlen`." msgstr "" +#: ../../c-api/unicode.rst:876 msgid "" "Encode a Unicode object to UTF-8 on Android and VxWorks, or to the current " "locale encoding on other platforms. The supported error handlers are " @@ -891,14 +1148,17 @@ msgid "" "`bytes` object. *unicode* cannot contain embedded null characters." msgstr "" +#: ../../c-api/unicode.rst:883 msgid "" "Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to the :term:" "`filesystem encoding and error handler`." msgstr "" +#: ../../c-api/unicode.rst:890 ../../c-api/unicode.rst:1002 msgid "The :c:func:`Py_EncodeLocale` function." msgstr "" +#: ../../c-api/unicode.rst:894 msgid "" "The function now also uses the current locale encoding for the " "``surrogateescape`` error handler, except on Android. Previously, :c:func:" @@ -906,20 +1166,24 @@ msgid "" "locale encoding was used for ``strict``." msgstr "" +#: ../../c-api/unicode.rst:903 msgid "File System Encoding" msgstr "" +#: ../../c-api/unicode.rst:905 msgid "" "Functions encoding to and decoding from the :term:`filesystem encoding and " "error handler` (:pep:`383` and :pep:`529`)." msgstr "" +#: ../../c-api/unicode.rst:908 msgid "" "To encode file names to :class:`bytes` during argument parsing, the " "``\"O&\"`` converter should be used, passing :c:func:`!" "PyUnicode_FSConverter` as the conversion function:" msgstr "" +#: ../../c-api/unicode.rst:914 msgid "" ":ref:`PyArg_Parse\\* converter `: encode :class:`str` objects " "-- obtained directly or through the :class:`os.PathLike` interface -- to :" @@ -932,20 +1196,24 @@ msgid "" "not allowed in the result. On failure, return ``0`` with an exception set." msgstr "" +#: ../../c-api/unicode.rst:926 msgid "" "If *obj* is ``NULL``, the function releases a strong reference stored in the " "variable referred by *result* and returns ``1``." msgstr "" +#: ../../c-api/unicode.rst:931 ../../c-api/unicode.rst:958 msgid "Accepts a :term:`path-like object`." msgstr "" +#: ../../c-api/unicode.rst:934 msgid "" "To decode file names to :class:`str` during argument parsing, the ``\"O&\"`` " "converter should be used, passing :c:func:`!PyUnicode_FSDecoder` as the " "conversion function:" msgstr "" +#: ../../c-api/unicode.rst:940 msgid "" ":ref:`PyArg_Parse\\* converter `: decode :class:`bytes` objects " "-- obtained either directly or indirectly through the :class:`os.PathLike` " @@ -959,51 +1227,63 @@ msgid "" "result. On failure, return ``0`` with an exception set." msgstr "" +#: ../../c-api/unicode.rst:953 msgid "" "If *obj* is ``NULL``, release the strong reference to the object referred to " "by *result* and return ``1``." msgstr "" +#: ../../c-api/unicode.rst:964 msgid "Decode a string from the :term:`filesystem encoding and error handler`." msgstr "" +#: ../../c-api/unicode.rst:966 msgid "" "If you need to decode a string from the current locale encoding, use :c:func:" "`PyUnicode_DecodeLocaleAndSize`." msgstr "" +#: ../../c-api/unicode.rst:973 ../../c-api/unicode.rst:986 +#: ../../c-api/unicode.rst:1006 msgid "" "The :term:`filesystem error handler ` " "is now used." msgstr "" +#: ../../c-api/unicode.rst:980 msgid "" "Decode a null-terminated string from the :term:`filesystem encoding and " "error handler`." msgstr "" +#: ../../c-api/unicode.rst:983 msgid "" "If the string length is known, use :c:func:" "`PyUnicode_DecodeFSDefaultAndSize`." msgstr "" +#: ../../c-api/unicode.rst:993 msgid "" "Encode a Unicode object to the :term:`filesystem encoding and error " "handler`, and return :class:`bytes`. Note that the resulting :class:`bytes` " "object can contain null bytes." msgstr "" +#: ../../c-api/unicode.rst:997 msgid "" "If you need to encode a string to the current locale encoding, use :c:func:" "`PyUnicode_EncodeLocale`." msgstr "" +#: ../../c-api/unicode.rst:1011 msgid "wchar_t Support" msgstr "" +#: ../../c-api/unicode.rst:1013 msgid ":c:type:`wchar_t` support for platforms which support it:" msgstr "" +#: ../../c-api/unicode.rst:1017 msgid "" "Create a Unicode object from the :c:type:`wchar_t` buffer *wstr* of the " "given *size*. Passing ``-1`` as the *size* indicates that the function must " @@ -1011,6 +1291,7 @@ msgid "" "failure." msgstr "" +#: ../../c-api/unicode.rst:1025 msgid "" "Copy the Unicode object contents into the :c:type:`wchar_t` buffer *wstr*. " "At most *size* :c:type:`wchar_t` characters are copied (excluding a possibly " @@ -1018,11 +1299,13 @@ msgid "" "`wchar_t` characters copied or ``-1`` in case of an error." msgstr "" +#: ../../c-api/unicode.rst:1030 msgid "" "When *wstr* is ``NULL``, instead return the *size* that would be required to " "store all of *unicode* including a terminating null." msgstr "" +#: ../../c-api/unicode.rst:1033 msgid "" "Note that the resulting :c:expr:`wchar_t*` string may or may not be null-" "terminated. It is the responsibility of the caller to make sure that the :c:" @@ -1032,6 +1315,7 @@ msgid "" "most C functions." msgstr "" +#: ../../c-api/unicode.rst:1043 msgid "" "Convert the Unicode object to a wide character string. The output string " "always ends with a null character. If *size* is not ``NULL``, write the " @@ -1042,31 +1326,37 @@ msgid "" "`wchar_t*` string contains null characters a :exc:`ValueError` is raised." msgstr "" +#: ../../c-api/unicode.rst:1051 msgid "" "Returns a buffer allocated by :c:macro:`PyMem_New` (use :c:func:`PyMem_Free` " "to free it) on success. On error, returns ``NULL`` and *\\*size* is " "undefined. Raises a :exc:`MemoryError` if memory allocation is failed." msgstr "" +#: ../../c-api/unicode.rst:1058 msgid "" "Raises a :exc:`ValueError` if *size* is ``NULL`` and the :c:expr:`wchar_t*` " "string contains null characters." msgstr "" +#: ../../c-api/unicode.rst:1066 msgid "Built-in Codecs" msgstr "" +#: ../../c-api/unicode.rst:1068 msgid "" "Python provides a set of built-in codecs which are written in C for speed. " "All of these codecs are directly usable via the following functions." msgstr "" +#: ../../c-api/unicode.rst:1071 msgid "" "Many of the following APIs take two arguments encoding and errors, and they " "have the same semantics as the ones of the built-in :func:`str` string " "object constructor." msgstr "" +#: ../../c-api/unicode.rst:1075 msgid "" "Setting encoding to ``NULL`` causes the default encoding to be used which is " "UTF-8. The file system calls should use :c:func:`PyUnicode_FSConverter` for " @@ -1074,34 +1364,42 @@ msgid "" "handler` internally." msgstr "" +#: ../../c-api/unicode.rst:1080 msgid "" "Error handling is set by errors which may also be set to ``NULL`` meaning to " "use the default handling defined for the codec. Default error handling for " "all built-in codecs is \"strict\" (:exc:`ValueError` is raised)." msgstr "" +#: ../../c-api/unicode.rst:1084 msgid "" "The codecs all use a similar interface. Only deviations from the following " "generic ones are documented for simplicity." msgstr "" +#: ../../c-api/unicode.rst:1089 msgid "Generic Codecs" msgstr "" +#: ../../c-api/unicode.rst:1091 msgid "The following macro is provided:" msgstr "" +#: ../../c-api/unicode.rst:1096 msgid "The Unicode code point ``U+FFFD`` (replacement character)." msgstr "" +#: ../../c-api/unicode.rst:1098 msgid "" "This Unicode character is used as the replacement character during decoding " "if the *errors* argument is set to \"replace\"." msgstr "" +#: ../../c-api/unicode.rst:1102 msgid "These are the generic codec APIs:" msgstr "" +#: ../../c-api/unicode.rst:1108 msgid "" "Create a Unicode object by decoding *size* bytes of the encoded string " "*str*. *encoding* and *errors* have the same meaning as the parameters of " @@ -1110,6 +1408,7 @@ msgid "" "was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1118 msgid "" "Encode a Unicode object and return the result as Python bytes object. " "*encoding* and *errors* have the same meaning as the parameters of the same " @@ -1118,17 +1417,21 @@ msgid "" "was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1126 msgid "UTF-8 Codecs" msgstr "" +#: ../../c-api/unicode.rst:1128 msgid "These are the UTF-8 codec APIs:" msgstr "" +#: ../../c-api/unicode.rst:1133 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1140 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF8`. If " "*consumed* is not ``NULL``, trailing incomplete UTF-8 byte sequences will " @@ -1136,17 +1439,20 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" +#: ../../c-api/unicode.rst:1148 msgid "" "Encode a Unicode object using UTF-8 and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1152 ../../c-api/unicode.rst:1167 msgid "" "The function fails if the string contains surrogate code points (``U+D800`` " "- ``U+DFFF``)." msgstr "" +#: ../../c-api/unicode.rst:1158 msgid "" "Return a pointer to the UTF-8 encoding of the Unicode object, and store the " "size of the encoded representation (in bytes) in *size*. The *size* " @@ -1155,11 +1461,13 @@ msgid "" "regardless of whether there are any other null code points." msgstr "" +#: ../../c-api/unicode.rst:1164 msgid "" "On error, set an exception, set *size* to ``-1`` (if it's not NULL) and " "return ``NULL``." msgstr "" +#: ../../c-api/unicode.rst:1170 msgid "" "This caches the UTF-8 representation of the string in the Unicode object, " "and subsequent calls will return a pointer to the same buffer. The caller " @@ -1168,15 +1476,19 @@ msgid "" "collected." msgstr "" -msgid "The return type is now ``const char *`` rather of ``char *``." +#: ../../c-api/unicode.rst:1177 ../../c-api/unicode.rst:1199 +msgid "The return type is now ``const char *`` rather than ``char *``." msgstr "" +#: ../../c-api/unicode.rst:1180 msgid "This function is a part of the :ref:`limited API `." msgstr "" +#: ../../c-api/unicode.rst:1186 msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." msgstr "" +#: ../../c-api/unicode.rst:1190 msgid "" "This function does not have any special behavior for `null characters " "`_ embedded within *unicode*. " @@ -1186,29 +1498,35 @@ msgid "" "c:func:`PyUnicode_AsUTF8AndSize` instead." msgstr "" +#: ../../c-api/unicode.rst:1204 msgid "UTF-32 Codecs" msgstr "" +#: ../../c-api/unicode.rst:1206 msgid "These are the UTF-32 codec APIs:" msgstr "" +#: ../../c-api/unicode.rst:1212 msgid "" "Decode *size* bytes from a UTF-32 encoded buffer string and return the " "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " "handling. It defaults to \"strict\"." msgstr "" +#: ../../c-api/unicode.rst:1216 ../../c-api/unicode.rst:1266 msgid "" "If *byteorder* is non-``NULL``, the decoder starts decoding using the given " "byte order::" msgstr "" +#: ../../c-api/unicode.rst:1219 ../../c-api/unicode.rst:1269 msgid "" "*byteorder == -1: little endian\n" "*byteorder == 0: native order\n" "*byteorder == 1: big endian" msgstr "" +#: ../../c-api/unicode.rst:1223 msgid "" "If ``*byteorder`` is zero, and the first four bytes of the input data are a " "byte order mark (BOM), the decoder switches to this byte order and the BOM " @@ -1216,17 +1534,21 @@ msgid "" "``-1`` or ``1``, any byte order mark is copied to the output." msgstr "" +#: ../../c-api/unicode.rst:1228 msgid "" "After completion, *\\*byteorder* is set to the current byte order at the end " "of input data." msgstr "" +#: ../../c-api/unicode.rst:1231 ../../c-api/unicode.rst:1282 msgid "If *byteorder* is ``NULL``, the codec starts in native order mode." msgstr "" +#: ../../c-api/unicode.rst:1233 ../../c-api/unicode.rst:1284 msgid "Return ``NULL`` if an exception was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1239 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF32`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF32Stateful` will not " @@ -1235,24 +1557,29 @@ msgid "" "number of bytes that have been decoded will be stored in *consumed*." msgstr "" +#: ../../c-api/unicode.rst:1248 msgid "" "Return a Python byte string using the UTF-32 encoding in native byte order. " "The string always starts with a BOM mark. Error handling is \"strict\". " "Return ``NULL`` if an exception was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1254 msgid "UTF-16 Codecs" msgstr "" +#: ../../c-api/unicode.rst:1256 msgid "These are the UTF-16 codec APIs:" msgstr "" +#: ../../c-api/unicode.rst:1262 msgid "" "Decode *size* bytes from a UTF-16 encoded buffer string and return the " "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " "handling. It defaults to \"strict\"." msgstr "" +#: ../../c-api/unicode.rst:1273 msgid "" "If ``*byteorder`` is zero, and the first two bytes of the input data are a " "byte order mark (BOM), the decoder switches to this byte order and the BOM " @@ -1261,11 +1588,13 @@ msgid "" "result in either a ``\\ufeff`` or a ``\\ufffe`` character)." msgstr "" +#: ../../c-api/unicode.rst:1279 msgid "" "After completion, ``*byteorder`` is set to the current byte order at the end " "of input data." msgstr "" +#: ../../c-api/unicode.rst:1290 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF16Stateful` will not " @@ -1275,23 +1604,28 @@ msgid "" "*consumed*." msgstr "" +#: ../../c-api/unicode.rst:1299 msgid "" "Return a Python byte string using the UTF-16 encoding in native byte order. " "The string always starts with a BOM mark. Error handling is \"strict\". " "Return ``NULL`` if an exception was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1305 msgid "UTF-7 Codecs" msgstr "" +#: ../../c-api/unicode.rst:1307 msgid "These are the UTF-7 codec APIs:" msgstr "" +#: ../../c-api/unicode.rst:1312 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1319 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF7`. If " "*consumed* is not ``NULL``, trailing incomplete UTF-7 base-64 sections will " @@ -1299,83 +1633,101 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" +#: ../../c-api/unicode.rst:1326 msgid "Unicode-Escape Codecs" msgstr "" +#: ../../c-api/unicode.rst:1328 msgid "These are the \"Unicode Escape\" codec APIs:" msgstr "" +#: ../../c-api/unicode.rst:1334 msgid "" "Create a Unicode object by decoding *size* bytes of the Unicode-Escape " "encoded string *str*. Return ``NULL`` if an exception was raised by the " "codec." msgstr "" +#: ../../c-api/unicode.rst:1340 msgid "" "Encode a Unicode object using Unicode-Escape and return the result as a " "bytes object. Error handling is \"strict\". Return ``NULL`` if an " "exception was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1346 msgid "Raw-Unicode-Escape Codecs" msgstr "" +#: ../../c-api/unicode.rst:1348 msgid "These are the \"Raw Unicode Escape\" codec APIs:" msgstr "" +#: ../../c-api/unicode.rst:1354 msgid "" "Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape " "encoded string *str*. Return ``NULL`` if an exception was raised by the " "codec." msgstr "" +#: ../../c-api/unicode.rst:1360 msgid "" "Encode a Unicode object using Raw-Unicode-Escape and return the result as a " "bytes object. Error handling is \"strict\". Return ``NULL`` if an " "exception was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1366 msgid "Latin-1 Codecs" msgstr "" +#: ../../c-api/unicode.rst:1368 msgid "" "These are the Latin-1 codec APIs: Latin-1 corresponds to the first 256 " "Unicode ordinals and only these are accepted by the codecs during encoding." msgstr "" +#: ../../c-api/unicode.rst:1374 msgid "" "Create a Unicode object by decoding *size* bytes of the Latin-1 encoded " "string *str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1380 msgid "" "Encode a Unicode object using Latin-1 and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1386 msgid "ASCII Codecs" msgstr "" +#: ../../c-api/unicode.rst:1388 msgid "" "These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All " "other codes generate errors." msgstr "" +#: ../../c-api/unicode.rst:1394 msgid "" "Create a Unicode object by decoding *size* bytes of the ASCII encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1400 msgid "" "Encode a Unicode object using ASCII and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1406 msgid "Character Map Codecs" msgstr "" +#: ../../c-api/unicode.rst:1408 msgid "" "This codec is special in that it can be used to implement many different " "codecs (and this is in fact what was done to obtain most of the standard " @@ -1385,15 +1737,18 @@ msgid "" "sequences work well." msgstr "" +#: ../../c-api/unicode.rst:1414 msgid "These are the mapping codec APIs:" msgstr "" +#: ../../c-api/unicode.rst:1419 msgid "" "Create a Unicode object by decoding *size* bytes of the encoded string *str* " "using the given *mapping* object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1423 msgid "" "If *mapping* is ``NULL``, Latin-1 decoding will be applied. Else *mapping* " "must map bytes ordinals (integers in the range from 0 to 255) to Unicode " @@ -1403,12 +1758,14 @@ msgid "" "treated as undefined mappings and cause an error." msgstr "" +#: ../../c-api/unicode.rst:1434 msgid "" "Encode a Unicode object using the given *mapping* object and return the " "result as a bytes object. Error handling is \"strict\". Return ``NULL`` if " "an exception was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1438 msgid "" "The *mapping* object must map Unicode ordinal integers to bytes objects, " "integers in the range from 0 to 255 or ``None``. Unmapped character " @@ -1416,34 +1773,41 @@ msgid "" "``None`` are treated as \"undefined mapping\" and cause an error." msgstr "" +#: ../../c-api/unicode.rst:1444 msgid "The following codec API is special in that maps Unicode to Unicode." msgstr "" +#: ../../c-api/unicode.rst:1448 msgid "" "Translate a string by applying a character mapping table to it and return " "the resulting Unicode object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" +#: ../../c-api/unicode.rst:1452 msgid "" "The mapping table must map Unicode ordinal integers to Unicode ordinal " "integers or ``None`` (causing deletion of the character)." msgstr "" +#: ../../c-api/unicode.rst:1455 msgid "" "Mapping tables need only provide the :meth:`~object.__getitem__` interface; " "dictionaries and sequences work well. Unmapped character ordinals (ones " "which cause a :exc:`LookupError`) are left untouched and are copied as-is." msgstr "" +#: ../../c-api/unicode.rst:1459 msgid "" "*errors* has the usual meaning for codecs. It may be ``NULL`` which " "indicates to use the default error handling." msgstr "" +#: ../../c-api/unicode.rst:1464 msgid "MBCS codecs for Windows" msgstr "" +#: ../../c-api/unicode.rst:1466 msgid "" "These are the MBCS codec APIs. They are currently only available on Windows " "and use the Win32 MBCS converters to implement the conversions. Note that " @@ -1451,11 +1815,13 @@ msgid "" "is defined by the user settings on the machine running the codec." msgstr "" +#: ../../c-api/unicode.rst:1473 msgid "" "Create a Unicode object by decoding *size* bytes of the MBCS encoded string " "*str*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1480 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeMBCS`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeMBCSStateful` will not " @@ -1463,38 +1829,46 @@ msgid "" "will be stored in *consumed*." msgstr "" +#: ../../c-api/unicode.rst:1489 msgid "" "Similar to :c:func:`PyUnicode_DecodeMBCSStateful`, except uses the code page " "specified by *code_page*." msgstr "" +#: ../../c-api/unicode.rst:1495 msgid "" "Encode a Unicode object using MBCS and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +#: ../../c-api/unicode.rst:1502 msgid "" "Encode the Unicode object using the specified code page and return a Python " "bytes object. Return ``NULL`` if an exception was raised by the codec. Use :" "c:macro:`!CP_ACP` code page to get the MBCS encoder." msgstr "" +#: ../../c-api/unicode.rst:1512 msgid "Methods and Slot Functions" msgstr "" +#: ../../c-api/unicode.rst:1514 msgid "" "The following APIs are capable of handling Unicode objects and strings on " "input (we refer to them as strings in the descriptions) and return Unicode " "objects or integers as appropriate." msgstr "" +#: ../../c-api/unicode.rst:1518 msgid "They all return ``NULL`` or ``-1`` if an exception occurs." msgstr "" +#: ../../c-api/unicode.rst:1523 msgid "Concat two strings giving a new Unicode string." msgstr "" +#: ../../c-api/unicode.rst:1528 msgid "" "Split a string giving a list of Unicode strings. If *sep* is ``NULL``, " "splitting will be done at all whitespace substrings. Otherwise, splits " @@ -1503,26 +1877,33 @@ msgid "" "list." msgstr "" +#: ../../c-api/unicode.rst:1533 ../../c-api/unicode.rst:1543 +#: ../../c-api/unicode.rst:1564 ../../c-api/unicode.rst:1577 msgid "On error, return ``NULL`` with an exception set." msgstr "" +#: ../../c-api/unicode.rst:1535 msgid "Equivalent to :py:meth:`str.split`." msgstr "" +#: ../../c-api/unicode.rst:1540 msgid "" "Similar to :c:func:`PyUnicode_Split`, but splitting will be done beginning " "at the end of the string." msgstr "" +#: ../../c-api/unicode.rst:1545 msgid "Equivalent to :py:meth:`str.rsplit`." msgstr "" +#: ../../c-api/unicode.rst:1550 msgid "" "Split a Unicode string at line breaks, returning a list of Unicode strings. " "CRLF is considered to be one line break. If *keepends* is ``0``, the Line " "break characters are not included in the resulting strings." msgstr "" +#: ../../c-api/unicode.rst:1557 msgid "" "Split a Unicode string at the first occurrence of *sep*, and return a 3-" "tuple containing the part before the separator, the separator itself, and " @@ -1530,32 +1911,39 @@ msgid "" "tuple containing the string itself, followed by two empty strings." msgstr "" +#: ../../c-api/unicode.rst:1562 ../../c-api/unicode.rst:1575 msgid "*sep* must not be empty." msgstr "" +#: ../../c-api/unicode.rst:1566 msgid "Equivalent to :py:meth:`str.partition`." msgstr "" +#: ../../c-api/unicode.rst:1571 msgid "" "Similar to :c:func:`PyUnicode_Partition`, but split a Unicode string at the " "last occurrence of *sep*. If the separator is not found, return a 3-tuple " "containing two empty strings, followed by the string itself." msgstr "" +#: ../../c-api/unicode.rst:1579 msgid "Equivalent to :py:meth:`str.rpartition`." msgstr "" +#: ../../c-api/unicode.rst:1584 msgid "" "Join a sequence of strings using the given *separator* and return the " "resulting Unicode string." msgstr "" +#: ../../c-api/unicode.rst:1591 msgid "" "Return ``1`` if *substr* matches ``unicode[start:end]`` at the given tail " "end (*direction* == ``-1`` means to do a prefix match, *direction* == ``1`` " "a suffix match), ``0`` otherwise. Return ``-1`` if an error occurred." msgstr "" +#: ../../c-api/unicode.rst:1599 msgid "" "Return the first position of *substr* in ``unicode[start:end]`` using the " "given *direction* (*direction* == ``1`` means to do a forward search, " @@ -1564,6 +1952,7 @@ msgid "" "``-2`` indicates that an error occurred and an exception has been set." msgstr "" +#: ../../c-api/unicode.rst:1609 msgid "" "Return the first position of the character *ch* in ``unicode[start:end]`` " "using the given *direction* (*direction* == ``1`` means to do a forward " @@ -1573,59 +1962,73 @@ msgid "" "set." msgstr "" +#: ../../c-api/unicode.rst:1617 msgid "" "*start* and *end* are now adjusted to behave like ``unicode[start:end]``." msgstr "" +#: ../../c-api/unicode.rst:1624 msgid "" "Return the number of non-overlapping occurrences of *substr* in " "``unicode[start:end]``. Return ``-1`` if an error occurred." msgstr "" +#: ../../c-api/unicode.rst:1631 msgid "" "Replace at most *maxcount* occurrences of *substr* in *unicode* with " "*replstr* and return the resulting Unicode object. *maxcount* == ``-1`` " "means replace all occurrences." msgstr "" +#: ../../c-api/unicode.rst:1638 msgid "" "Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, " "and greater than, respectively." msgstr "" +#: ../../c-api/unicode.rst:1641 msgid "" "This function returns ``-1`` upon failure, so one should call :c:func:" "`PyErr_Occurred` to check for errors." msgstr "" +#: ../../c-api/unicode.rst:1646 msgid "The :c:func:`PyUnicode_Equal` function." msgstr "" +#: ../../c-api/unicode.rst:1651 msgid "Test if two strings are equal:" msgstr "" +#: ../../c-api/unicode.rst:1653 msgid "Return ``1`` if *a* is equal to *b*." msgstr "" +#: ../../c-api/unicode.rst:1654 msgid "Return ``0`` if *a* is not equal to *b*." msgstr "" +#: ../../c-api/unicode.rst:1655 msgid "" "Set a :exc:`TypeError` exception and return ``-1`` if *a* or *b* is not a :" "class:`str` object." msgstr "" +#: ../../c-api/unicode.rst:1658 msgid "The function always succeeds if *a* and *b* are :class:`str` objects." msgstr "" +#: ../../c-api/unicode.rst:1660 msgid "" "The function works for :class:`str` subclasses, but does not honor custom " "``__eq__()`` method." msgstr "" +#: ../../c-api/unicode.rst:1665 msgid "The :c:func:`PyUnicode_Compare` function." msgstr "" +#: ../../c-api/unicode.rst:1672 msgid "" "Compare a Unicode object with a char buffer which is interpreted as being " "UTF-8 or ASCII encoded and return true (``1``) if they are equal, or false " @@ -1634,15 +2037,18 @@ msgid "" "is returned." msgstr "" +#: ../../c-api/unicode.rst:1679 ../../c-api/unicode.rst:1700 msgid "This function does not raise exceptions." msgstr "" +#: ../../c-api/unicode.rst:1686 msgid "" "Similar to :c:func:`PyUnicode_EqualToUTF8AndSize`, but compute *string* " "length using :c:func:`!strlen`. If the Unicode object contains null " "characters, false (``0``) is returned." msgstr "" +#: ../../c-api/unicode.rst:1695 msgid "" "Compare a Unicode object, *unicode*, with *string* and return ``-1``, ``0``, " "``1`` for less than, equal, and greater than, respectively. It is best to " @@ -1650,38 +2056,47 @@ msgid "" "string as ISO-8859-1 if it contains non-ASCII characters." msgstr "" +#: ../../c-api/unicode.rst:1705 msgid "Rich compare two Unicode strings and return one of the following:" msgstr "" +#: ../../c-api/unicode.rst:1707 msgid "``NULL`` in case an exception was raised" msgstr "" +#: ../../c-api/unicode.rst:1708 msgid ":c:data:`Py_True` or :c:data:`Py_False` for successful comparisons" msgstr "" +#: ../../c-api/unicode.rst:1709 msgid ":c:data:`Py_NotImplemented` in case the type combination is unknown" msgstr "" +#: ../../c-api/unicode.rst:1711 msgid "" "Possible values for *op* are :c:macro:`Py_GT`, :c:macro:`Py_GE`, :c:macro:" "`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_LT`, and :c:macro:`Py_LE`." msgstr "" +#: ../../c-api/unicode.rst:1717 msgid "" "Return a new string object from *format* and *args*; this is analogous to " "``format % args``." msgstr "" +#: ../../c-api/unicode.rst:1723 msgid "" "Check whether *substr* is contained in *unicode* and return true or false " "accordingly." msgstr "" +#: ../../c-api/unicode.rst:1726 msgid "" "*substr* has to coerce to a one element Unicode string. ``-1`` is returned " "if there was an error." msgstr "" +#: ../../c-api/unicode.rst:1732 msgid "" "Intern the argument :c:expr:`*p_unicode` in place. The argument must be the " "address of a pointer variable pointing to a Python Unicode string object. " @@ -1692,6 +2107,7 @@ msgid "" "interns it." msgstr "" +#: ../../c-api/unicode.rst:1739 msgid "" "(Clarification: even though there is a lot of talk about references, think " "of this function as reference-neutral. You must own the object you pass in; " @@ -1699,33 +2115,39 @@ msgid "" "the result.)" msgstr "" +#: ../../c-api/unicode.rst:1744 msgid "" "This function never raises an exception. On error, it leaves its argument " "unchanged without interning it." msgstr "" +#: ../../c-api/unicode.rst:1747 msgid "" "Instances of subclasses of :py:class:`str` may not be interned, that is, :c:" "expr:`PyUnicode_CheckExact(*p_unicode)` must be true. If it is not, then -- " "as with any other error -- the argument is left unchanged." msgstr "" +#: ../../c-api/unicode.rst:1751 msgid "" "Note that interned strings are not “immortal”. You must keep a reference to " "the result to benefit from interning." msgstr "" +#: ../../c-api/unicode.rst:1757 msgid "" "A combination of :c:func:`PyUnicode_FromString` and :c:func:" "`PyUnicode_InternInPlace`, meant for statically allocated strings." msgstr "" +#: ../../c-api/unicode.rst:1760 msgid "" "Return a new (\"owned\") reference to either a new Unicode string object " "that has been interned, or an earlier interned string object with the same " "value." msgstr "" +#: ../../c-api/unicode.rst:1764 msgid "" "Python may keep a reference to the result, or make it :term:`immortal`, " "preventing it from being garbage-collected promptly. For interning an " @@ -1734,12 +2156,14 @@ msgid "" "`PyUnicode_InternInPlace` directly." msgstr "" +#: ../../c-api/unicode.rst:1773 msgid "" "Return a non-zero value if *str* is interned, zero if not. The *str* " "argument must be a string; this is not checked. This function always " "succeeds." msgstr "" +#: ../../c-api/unicode.rst:1779 msgid "" "A non-zero return value may carry additional information about *how* the " "string is interned. The meaning of such non-zero values, as well as each " @@ -1747,167 +2171,227 @@ msgid "" "versions." msgstr "" +#: ../../c-api/unicode.rst:1786 msgid "PyUnicodeWriter" msgstr "" +#: ../../c-api/unicode.rst:1788 msgid "" "The :c:type:`PyUnicodeWriter` API can be used to create a Python :class:" "`str` object." msgstr "" +#: ../../c-api/unicode.rst:1795 msgid "A Unicode writer instance." msgstr "" +#: ../../c-api/unicode.rst:1797 msgid "" "The instance must be destroyed by :c:func:`PyUnicodeWriter_Finish` on " "success, or :c:func:`PyUnicodeWriter_Discard` on error." msgstr "" +#: ../../c-api/unicode.rst:1802 msgid "Create a Unicode writer instance." msgstr "" +#: ../../c-api/unicode.rst:1804 msgid "*length* must be greater than or equal to ``0``." msgstr "" +#: ../../c-api/unicode.rst:1806 msgid "" "If *length* is greater than ``0``, preallocate an internal buffer of " "*length* characters." msgstr "" +#: ../../c-api/unicode.rst:1809 ../../c-api/unicode.rst:1815 msgid "Set an exception and return ``NULL`` on error." msgstr "" +#: ../../c-api/unicode.rst:1813 msgid "" "Return the final Python :class:`str` object and destroy the writer instance." msgstr "" +#: ../../c-api/unicode.rst:1817 ../../c-api/unicode.rst:1825 msgid "The writer instance is invalid after this call." msgstr "" +#: ../../c-api/unicode.rst:1821 msgid "Discard the internal Unicode buffer and destroy the writer instance." msgstr "" +#: ../../c-api/unicode.rst:1823 msgid "If *writer* is ``NULL``, no operation is performed." msgstr "" +#: ../../c-api/unicode.rst:1829 msgid "Write the single Unicode character *ch* into *writer*." msgstr "" +#: ../../c-api/unicode.rst:1831 ../../c-api/unicode.rst:1841 +#: ../../c-api/unicode.rst:1856 ../../c-api/unicode.rst:1866 +#: ../../c-api/unicode.rst:1875 ../../c-api/unicode.rst:1882 +#: ../../c-api/unicode.rst:1895 ../../c-api/unicode.rst:1910 +#: ../../c-api/unicode.rst:1917 ../../c-api/unicode.rst:1936 msgid "" "On success, return ``0``. On error, set an exception, leave the writer " "unchanged, and return ``-1``." msgstr "" +#: ../../c-api/unicode.rst:1836 msgid "" "Decode the string *str* from UTF-8 in strict mode and write the output into " "*writer*." msgstr "" +#: ../../c-api/unicode.rst:1838 ../../c-api/unicode.rst:1850 +#: ../../c-api/unicode.rst:1925 msgid "" "*size* is the string length in bytes. If *size* is equal to ``-1``, call " "``strlen(str)`` to get the string length." msgstr "" +#: ../../c-api/unicode.rst:1844 msgid "See also :c:func:`PyUnicodeWriter_DecodeUTF8Stateful`." msgstr "" +#: ../../c-api/unicode.rst:1848 msgid "Write the ASCII string *str* into *writer*." msgstr "" +#: ../../c-api/unicode.rst:1853 msgid "" "*str* must only contain ASCII characters. The behavior is undefined if *str* " "contains non-ASCII characters." msgstr "" +#: ../../c-api/unicode.rst:1861 msgid "Write the wide string *str* into *writer*." msgstr "" +#: ../../c-api/unicode.rst:1863 msgid "" "*size* is a number of wide characters. If *size* is equal to ``-1``, call " "``wcslen(str)`` to get the string length." msgstr "" +#: ../../c-api/unicode.rst:1871 msgid "Writer the UCS4 string *str* into *writer*." msgstr "" +#: ../../c-api/unicode.rst:1873 msgid "*size* is a number of UCS4 characters." msgstr "" +#: ../../c-api/unicode.rst:1880 msgid "" "Call :c:func:`PyObject_Str` on *obj* and write the output into *writer*." msgstr "" +#: ../../c-api/unicode.rst:1885 +msgid "" +"To write a :class:`str` subclass which overrides the :meth:`~object.__str__` " +"method, :c:func:`PyUnicode_FromObject` can be used to get the original " +"string." +msgstr "" + +#: ../../c-api/unicode.rst:1891 msgid "" "Call :c:func:`PyObject_Repr` on *obj* and write the output into *writer*." msgstr "" +#: ../../c-api/unicode.rst:1893 +msgid "If *obj* is ``NULL``, write the string ``\"\"`` into *writer*." +msgstr "" + +#: ../../c-api/unicode.rst:1900 +msgid "Added support for ``NULL``." +msgstr "" + +#: ../../c-api/unicode.rst:1904 msgid "Write the substring ``str[start:end]`` into *writer*." msgstr "" +#: ../../c-api/unicode.rst:1906 msgid "" "*str* must be Python :class:`str` object. *start* must be greater than or " "equal to 0, and less than or equal to *end*. *end* must be less than or " "equal to *str* length." msgstr "" +#: ../../c-api/unicode.rst:1915 msgid "" "Similar to :c:func:`PyUnicode_FromFormat`, but write the output directly " "into *writer*." msgstr "" +#: ../../c-api/unicode.rst:1922 msgid "" "Decode the string *str* from UTF-8 with *errors* error handler and write the " "output into *writer*." msgstr "" +#: ../../c-api/unicode.rst:1928 msgid "" "*errors* is an :ref:`error handler ` name, such as " "``\"replace\"``. If *errors* is ``NULL``, use the strict error handler." msgstr "" +#: ../../c-api/unicode.rst:1931 msgid "" "If *consumed* is not ``NULL``, set *\\*consumed* to the number of decoded " "bytes on success. If *consumed* is ``NULL``, treat trailing incomplete UTF-8 " "byte sequences as an error." msgstr "" +#: ../../c-api/unicode.rst:1939 msgid "See also :c:func:`PyUnicodeWriter_WriteUTF8`." msgstr "" +#: ../../c-api/unicode.rst:1942 msgid "Deprecated API" msgstr "" +#: ../../c-api/unicode.rst:1944 msgid "The following API is deprecated." msgstr "" +#: ../../c-api/unicode.rst:1948 msgid "" "This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit " "type depending on the platform. Please use :c:type:`wchar_t` directly " "instead." msgstr "" +#: ../../c-api/unicode.rst:1952 msgid "" "In previous versions, this was a 16-bit type or a 32-bit type depending on " "whether you selected a \"narrow\" or \"wide\" Unicode version of Python at " "build time." msgstr "" +#: ../../c-api/unicode.rst:1962 msgid "" "Do nothing and return ``0``. This API is kept only for backward " "compatibility, but there are no plans to remove it." msgstr "" +#: ../../c-api/unicode.rst:1968 msgid "" "This API does nothing since Python 3.12. Previously, this needed to be " "called for each string created using the old API (:c:func:`!" "PyUnicode_FromUnicode` or similar)." msgstr "" +#: ../../c-api/unicode.rst:1976 msgid "" "Do nothing and return ``1``. This API is kept only for backward " "compatibility, but there are no plans to remove it." msgstr "" +#: ../../c-api/unicode.rst:1982 msgid "" "This API does nothing since Python 3.12. Previously, this could be called to " "check if :c:func:`PyUnicode_READY` is necessary." diff --git a/c-api/unicode.po~ b/c-api/unicode.po~ new file mode 100644 index 00000000..c9972dea --- /dev/null +++ b/c-api/unicode.po~ @@ -0,0 +1,1914 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-29 14:15+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Unicode Objects and Codecs" +msgstr "Unicode Objekte und Codecs" + +msgid "Unicode Objects" +msgstr "Unicode Objekte" + +msgid "" +"Since the implementation of :pep:`393` in Python 3.3, Unicode objects " +"internally use a variety of representations, in order to allow handling the " +"complete range of Unicode characters while staying memory efficient. There " +"are special cases for strings where all code points are below 128, 256, or " +"65536; otherwise, code points must be below 1114112 (which is the full " +"Unicode range)." +msgstr "" +"Seit der Umsetzung von :pep:`393` in Python 3.3 verwenden Unicode Objekte " +"intern eine Vielzahl von Repräsentationen, um die gesamte Bandbreite der " +"Unicode Zeichen verarbeiten zu können und dabei speichereffizient zu " +"bleiben. Es gibt Spezialfälle für Zeichenketten, deren Codepunkte alle unter " +"128, 256 oder 65536 liegen; andernfalls müssen Codepunkte unterhalb von " +"1114112 sein (gesamter Unicode Bereich)." + +msgid "" +"UTF-8 representation is created on demand and cached in the Unicode object." +msgstr "" + +msgid "" +"The :c:type:`Py_UNICODE` representation has been removed since Python 3.12 " +"with deprecated APIs. See :pep:`623` for more information." +msgstr "" + +msgid "Unicode Type" +msgstr "" + +msgid "" +"These are the basic Unicode object types used for the Unicode implementation " +"in Python:" +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python Unicode type. " +"It is exposed to Python code as :py:class:`str`." +msgstr "" + +msgid "" +"This instance of :c:type:`PyTypeObject` represents the Python Unicode " +"iterator type. It is used to iterate over Unicode string objects." +msgstr "" + +msgid "" +"These types are typedefs for unsigned integer types wide enough to contain " +"characters of 32 bits, 16 bits and 8 bits, respectively. When dealing with " +"single Unicode characters, use :c:type:`Py_UCS4`." +msgstr "" + +msgid "" +"These subtypes of :c:type:`PyObject` represent a Python Unicode object. In " +"almost all cases, they shouldn't be used directly, since all API functions " +"that deal with Unicode objects take and return :c:type:`PyObject` pointers." +msgstr "" + +msgid "" +"The following APIs are C macros and static inlined functions for fast checks " +"and access to internal read-only data of Unicode objects:" +msgstr "" + +msgid "" +"Return true if the object *obj* is a Unicode object or an instance of a " +"Unicode subtype. This function always succeeds." +msgstr "" + +msgid "" +"Return true if the object *obj* is a Unicode object, but not an instance of " +"a subtype. This function always succeeds." +msgstr "" + +msgid "" +"Return the length of the Unicode string, in code points. *unicode* has to " +"be a Unicode object in the \"canonical\" representation (not checked)." +msgstr "" + +msgid "" +"Return a pointer to the canonical representation cast to UCS1, UCS2 or UCS4 " +"integer types for direct character access. No checks are performed if the " +"canonical representation has the correct character size; use :c:func:" +"`PyUnicode_KIND` to select the right function." +msgstr "" + +msgid "Return values of the :c:func:`PyUnicode_KIND` macro." +msgstr "" + +msgid "``PyUnicode_WCHAR_KIND`` has been removed." +msgstr "" + +msgid "" +"Return one of the PyUnicode kind constants (see above) that indicate how " +"many bytes per character this Unicode object uses to store its data. " +"*unicode* has to be a Unicode object in the \"canonical\" representation " +"(not checked)." +msgstr "" + +msgid "" +"Return a void pointer to the raw Unicode buffer. *unicode* has to be a " +"Unicode object in the \"canonical\" representation (not checked)." +msgstr "" + +msgid "" +"Write the code point *value* to the given zero-based *index* in a string." +msgstr "" + +msgid "" +"The *kind* value and *data* pointer must have been obtained from a string " +"using :c:func:`PyUnicode_KIND` and :c:func:`PyUnicode_DATA` respectively. " +"You must hold a reference to that string while calling :c:func:`!" +"PyUnicode_WRITE`. All requirements of :c:func:`PyUnicode_WriteChar` also " +"apply." +msgstr "" + +msgid "" +"The function performs no checks for any of its requirements, and is intended " +"for usage in loops." +msgstr "" + +msgid "" +"Read a code point from a canonical representation *data* (as obtained with :" +"c:func:`PyUnicode_DATA`). No checks or ready calls are performed." +msgstr "" + +msgid "" +"Read a character from a Unicode object *unicode*, which must be in the " +"\"canonical\" representation. This is less efficient than :c:func:" +"`PyUnicode_READ` if you do multiple consecutive reads." +msgstr "" + +msgid "" +"Return the maximum code point that is suitable for creating another string " +"based on *unicode*, which must be in the \"canonical\" representation. This " +"is always an approximation but more efficient than iterating over the string." +msgstr "" + +msgid "" +"Return ``1`` if the string is a valid identifier according to the language " +"definition, section :ref:`identifiers`. Return ``0`` otherwise." +msgstr "" + +msgid "" +"The function does not call :c:func:`Py_FatalError` anymore if the string is " +"not ready." +msgstr "" + +msgid "" +"Return true if the string only contains ASCII characters. Equivalent to :py:" +"meth:`str.isascii`." +msgstr "" + +msgid "Unicode Character Properties" +msgstr "" + +msgid "" +"Unicode provides many different character properties. The most often needed " +"ones are available through these macros which are mapped to C functions " +"depending on the Python configuration." +msgstr "" + +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is a whitespace character." +msgstr "" + +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is a lowercase character." +msgstr "" + +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is an uppercase character." +msgstr "" + +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is a titlecase character." +msgstr "" + +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is a linebreak character." +msgstr "" + +msgid "Return ``1`` or ``0`` depending on whether *ch* is a decimal character." +msgstr "" + +msgid "Return ``1`` or ``0`` depending on whether *ch* is a digit character." +msgstr "" + +msgid "Return ``1`` or ``0`` depending on whether *ch* is a numeric character." +msgstr "" + +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character." +msgstr "" + +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character." +msgstr "" + +msgid "" +"Return ``1`` or ``0`` depending on whether *ch* is a printable character, in " +"the sense of :meth:`str.isprintable`." +msgstr "" + +msgid "These APIs can be used for fast direct character conversions:" +msgstr "" + +msgid "Return the character *ch* converted to lower case." +msgstr "" + +msgid "Return the character *ch* converted to upper case." +msgstr "" + +msgid "Return the character *ch* converted to title case." +msgstr "" + +msgid "" +"Return the character *ch* converted to a decimal positive integer. Return " +"``-1`` if this is not possible. This function does not raise exceptions." +msgstr "" + +msgid "" +"Return the character *ch* converted to a single digit integer. Return ``-1`` " +"if this is not possible. This function does not raise exceptions." +msgstr "" + +msgid "" +"Return the character *ch* converted to a double. Return ``-1.0`` if this is " +"not possible. This function does not raise exceptions." +msgstr "" + +msgid "These APIs can be used to work with surrogates:" +msgstr "" + +msgid "Check if *ch* is a surrogate (``0xD800 <= ch <= 0xDFFF``)." +msgstr "" + +msgid "Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``)." +msgstr "" + +msgid "Check if *ch* is a low surrogate (``0xDC00 <= ch <= 0xDFFF``)." +msgstr "" + +msgid "" +"Join two surrogate code points and return a single :c:type:`Py_UCS4` value. " +"*high* and *low* are respectively the leading and trailing surrogates in a " +"surrogate pair. *high* must be in the range [0xD800; 0xDBFF] and *low* must " +"be in the range [0xDC00; 0xDFFF]." +msgstr "" + +msgid "Creating and accessing Unicode strings" +msgstr "" + +msgid "" +"To create Unicode objects and access their basic sequence properties, use " +"these APIs:" +msgstr "" + +msgid "" +"Create a new Unicode object. *maxchar* should be the true maximum code " +"point to be placed in the string. As an approximation, it can be rounded up " +"to the nearest value in the sequence 127, 255, 65535, 1114111." +msgstr "" + +msgid "On error, set an exception and return ``NULL``." +msgstr "" + +msgid "" +"After creation, the string can be filled by :c:func:`PyUnicode_WriteChar`, :" +"c:func:`PyUnicode_CopyCharacters`, :c:func:`PyUnicode_Fill`, :c:func:" +"`PyUnicode_WRITE` or similar. Since strings are supposed to be immutable, " +"take care to not “use” the result while it is being modified. In particular, " +"before it's filled with its final contents, a string:" +msgstr "" + +msgid "must not be hashed," +msgstr "" + +msgid "" +"must not be :c:func:`converted to UTF-8 `, or " +"another non-\"canonical\" representation," +msgstr "" + +msgid "must not have its reference count changed," +msgstr "" + +msgid "must not be shared with code that might do one of the above." +msgstr "" + +msgid "" +"This list is not exhaustive. Avoiding these uses is your responsibility; " +"Python does not always check these requirements." +msgstr "" + +msgid "" +"To avoid accidentally exposing a partially-written string object, prefer " +"using the :c:type:`PyUnicodeWriter` API, or one of the ``PyUnicode_From*`` " +"functions below." +msgstr "" + +msgid "" +"Create a new Unicode object with the given *kind* (possible values are :c:" +"macro:`PyUnicode_1BYTE_KIND` etc., as returned by :c:func:" +"`PyUnicode_KIND`). The *buffer* must point to an array of *size* units of " +"1, 2 or 4 bytes per character, as given by the kind." +msgstr "" + +msgid "" +"If necessary, the input *buffer* is copied and transformed into the " +"canonical representation. For example, if the *buffer* is a UCS4 string (:c:" +"macro:`PyUnicode_4BYTE_KIND`) and it consists only of codepoints in the UCS1 " +"range, it will be transformed into UCS1 (:c:macro:`PyUnicode_1BYTE_KIND`)." +msgstr "" + +msgid "" +"Create a Unicode object from the char buffer *str*. The bytes will be " +"interpreted as being UTF-8 encoded. The buffer is copied into the new " +"object. The return value might be a shared object, i.e. modification of the " +"data is not allowed." +msgstr "" + +msgid "This function raises :exc:`SystemError` when:" +msgstr "" + +msgid "*size* < 0," +msgstr "" + +msgid "*str* is ``NULL`` and *size* > 0" +msgstr "" + +msgid "*str* == ``NULL`` with *size* > 0 is not allowed anymore." +msgstr "" + +msgid "" +"Create a Unicode object from a UTF-8 encoded null-terminated char buffer " +"*str*." +msgstr "" + +msgid "" +"Take a C :c:func:`printf`\\ -style *format* string and a variable number of " +"arguments, calculate the size of the resulting Python Unicode string and " +"return a string with the values formatted into it. The variable arguments " +"must be C types and must correspond exactly to the format characters in the " +"*format* ASCII-encoded string." +msgstr "" + +msgid "" +"A conversion specifier contains two or more characters and has the following " +"components, which must occur in this order:" +msgstr "" + +msgid "The ``'%'`` character, which marks the start of the specifier." +msgstr "" + +msgid "" +"Conversion flags (optional), which affect the result of some conversion " +"types." +msgstr "" + +msgid "" +"Minimum field width (optional). If specified as an ``'*'`` (asterisk), the " +"actual width is given in the next argument, which must be of type :c:expr:" +"`int`, and the object to convert comes after the minimum field width and " +"optional precision." +msgstr "" + +msgid "" +"Precision (optional), given as a ``'.'`` (dot) followed by the precision. If " +"specified as ``'*'`` (an asterisk), the actual precision is given in the " +"next argument, which must be of type :c:expr:`int`, and the value to convert " +"comes after the precision." +msgstr "" + +msgid "Length modifier (optional)." +msgstr "" + +msgid "Conversion type." +msgstr "" + +msgid "The conversion flag characters are:" +msgstr "" + +msgid "Flag" +msgstr "" + +msgid "Meaning" +msgstr "" + +msgid "``0``" +msgstr "" + +msgid "The conversion will be zero padded for numeric values." +msgstr "" + +msgid "``-``" +msgstr "" + +msgid "" +"The converted value is left adjusted (overrides the ``0`` flag if both are " +"given)." +msgstr "" + +msgid "" +"The length modifiers for following integer conversions (``d``, ``i``, ``o``, " +"``u``, ``x``, or ``X``) specify the type of the argument (:c:expr:`int` by " +"default):" +msgstr "" + +msgid "Modifier" +msgstr "" + +msgid "Types" +msgstr "" + +msgid "``l``" +msgstr "" + +msgid ":c:expr:`long` or :c:expr:`unsigned long`" +msgstr "" + +msgid "``ll``" +msgstr "" + +msgid ":c:expr:`long long` or :c:expr:`unsigned long long`" +msgstr "" + +msgid "``j``" +msgstr "" + +msgid ":c:type:`intmax_t` or :c:type:`uintmax_t`" +msgstr "" + +msgid "``z``" +msgstr "" + +msgid ":c:type:`size_t` or :c:type:`ssize_t`" +msgstr "" + +msgid "``t``" +msgstr "" + +msgid ":c:type:`ptrdiff_t`" +msgstr "" + +msgid "" +"The length modifier ``l`` for following conversions ``s`` or ``V`` specify " +"that the type of the argument is :c:expr:`const wchar_t*`." +msgstr "" + +msgid "The conversion specifiers are:" +msgstr "" + +msgid "Conversion Specifier" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Comment" +msgstr "" + +msgid "``%``" +msgstr "" + +msgid "*n/a*" +msgstr "" + +msgid "The literal ``%`` character." +msgstr "" + +msgid "``d``, ``i``" +msgstr "" + +msgid "Specified by the length modifier" +msgstr "" + +msgid "The decimal representation of a signed C integer." +msgstr "" + +msgid "``u``" +msgstr "" + +msgid "The decimal representation of an unsigned C integer." +msgstr "" + +msgid "``o``" +msgstr "" + +msgid "The octal representation of an unsigned C integer." +msgstr "" + +msgid "``x``" +msgstr "" + +msgid "The hexadecimal representation of an unsigned C integer (lowercase)." +msgstr "" + +msgid "``X``" +msgstr "" + +msgid "The hexadecimal representation of an unsigned C integer (uppercase)." +msgstr "" + +msgid "``c``" +msgstr "" + +msgid ":c:expr:`int`" +msgstr "" + +msgid "A single character." +msgstr "" + +msgid "``s``" +msgstr "" + +msgid ":c:expr:`const char*` or :c:expr:`const wchar_t*`" +msgstr "" + +msgid "A null-terminated C character array." +msgstr "" + +msgid "``p``" +msgstr "" + +msgid ":c:expr:`const void*`" +msgstr "" + +msgid "" +"The hex representation of a C pointer. Mostly equivalent to " +"``printf(\"%p\")`` except that it is guaranteed to start with the literal " +"``0x`` regardless of what the platform's ``printf`` yields." +msgstr "" + +msgid "``A``" +msgstr "" + +msgid ":c:expr:`PyObject*`" +msgstr "" + +msgid "The result of calling :func:`ascii`." +msgstr "" + +msgid "``U``" +msgstr "" + +msgid "A Unicode object." +msgstr "" + +msgid "``V``" +msgstr "" + +msgid ":c:expr:`PyObject*`, :c:expr:`const char*` or :c:expr:`const wchar_t*`" +msgstr "" + +msgid "" +"A Unicode object (which may be ``NULL``) and a null-terminated C character " +"array as a second parameter (which will be used, if the first parameter is " +"``NULL``)." +msgstr "" + +msgid "``S``" +msgstr "" + +msgid "The result of calling :c:func:`PyObject_Str`." +msgstr "" + +msgid "``R``" +msgstr "" + +msgid "The result of calling :c:func:`PyObject_Repr`." +msgstr "" + +msgid "``T``" +msgstr "" + +msgid "" +"Get the fully qualified name of an object type; call :c:func:" +"`PyType_GetFullyQualifiedName`." +msgstr "" + +msgid "``#T``" +msgstr "" + +msgid "" +"Similar to ``T`` format, but use a colon (``:``) as separator between the " +"module name and the qualified name." +msgstr "" + +msgid "``N``" +msgstr "" + +msgid ":c:expr:`PyTypeObject*`" +msgstr "" + +msgid "" +"Get the fully qualified name of a type; call :c:func:" +"`PyType_GetFullyQualifiedName`." +msgstr "" + +msgid "``#N``" +msgstr "" + +msgid "" +"Similar to ``N`` format, but use a colon (``:``) as separator between the " +"module name and the qualified name." +msgstr "" + +msgid "" +"The width formatter unit is number of characters rather than bytes. The " +"precision formatter unit is number of bytes or :c:type:`wchar_t` items (if " +"the length modifier ``l`` is used) for ``\"%s\"`` and ``\"%V\"`` (if the " +"``PyObject*`` argument is ``NULL``), and a number of characters for " +"``\"%A\"``, ``\"%U\"``, ``\"%S\"``, ``\"%R\"`` and ``\"%V\"`` (if the " +"``PyObject*`` argument is not ``NULL``)." +msgstr "" + +msgid "" +"Unlike to C :c:func:`printf` the ``0`` flag has effect even when a precision " +"is given for integer conversions (``d``, ``i``, ``u``, ``o``, ``x``, or " +"``X``)." +msgstr "" + +msgid "Support for ``\"%lld\"`` and ``\"%llu\"`` added." +msgstr "" + +msgid "Support for ``\"%li\"``, ``\"%lli\"`` and ``\"%zi\"`` added." +msgstr "" + +msgid "" +"Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, " +"``\"%U\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." +msgstr "" + +msgid "" +"Support for conversion specifiers ``o`` and ``X``. Support for length " +"modifiers ``j`` and ``t``. Length modifiers are now applied to all integer " +"conversions. Length modifier ``l`` is now applied to conversion specifiers " +"``s`` and ``V``. Support for variable width and precision ``*``. Support for " +"flag ``-``." +msgstr "" + +msgid "" +"An unrecognized format character now sets a :exc:`SystemError`. In previous " +"versions it caused all the rest of the format string to be copied as-is to " +"the result string, and any extra arguments discarded." +msgstr "" + +msgid "Support for ``%T``, ``%#T``, ``%N`` and ``%#N`` formats added." +msgstr "" + +msgid "" +"Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two " +"arguments." +msgstr "" + +msgid "" +"Copy an instance of a Unicode subtype to a new true Unicode object if " +"necessary. If *obj* is already a true Unicode object (not a subtype), return " +"a new :term:`strong reference` to the object." +msgstr "" + +msgid "" +"Objects other than Unicode or its subtypes will cause a :exc:`TypeError`." +msgstr "" + +msgid "Create a Unicode Object from the given Unicode code point *ordinal*." +msgstr "" + +msgid "" +"The ordinal must be in ``range(0x110000)``. A :exc:`ValueError` is raised in " +"the case it is not." +msgstr "" + +msgid "Decode an encoded object *obj* to a Unicode object." +msgstr "" + +msgid "" +":class:`bytes`, :class:`bytearray` and other :term:`bytes-like objects " +"` are decoded according to the given *encoding* and using " +"the error handling defined by *errors*. Both can be ``NULL`` to have the " +"interface use the default values (see :ref:`builtincodecs` for details)." +msgstr "" + +msgid "" +"All other objects, including Unicode objects, cause a :exc:`TypeError` to be " +"set." +msgstr "" + +msgid "" +"The API returns ``NULL`` if there was an error. The caller is responsible " +"for decref'ing the returned objects." +msgstr "" + +msgid "" +"Append the string *right* to the end of *p_left*. *p_left* must point to a :" +"term:`strong reference` to a Unicode object; :c:func:`!PyUnicode_Append` " +"releases (\"steals\") this reference." +msgstr "" + +msgid "On error, set *\\*p_left* to ``NULL`` and set an exception." +msgstr "" + +msgid "On success, set *\\*p_left* to a new strong reference to the result." +msgstr "" + +msgid "" +"The function is similar to :c:func:`PyUnicode_Append`, with the only " +"difference being that it decrements the reference count of *right* by one." +msgstr "" + +msgid "" +"Return a mapping suitable for decoding a custom single-byte encoding. Given " +"a Unicode string *string* of up to 256 characters representing an encoding " +"table, returns either a compact internal mapping object or a dictionary " +"mapping character ordinals to byte values. Raises a :exc:`TypeError` and " +"return ``NULL`` on invalid input." +msgstr "" + +msgid "" +"Return the name of the default string encoding, ``\"utf-8\"``. See :func:" +"`sys.getdefaultencoding`." +msgstr "" + +msgid "" +"The returned string does not need to be freed, and is valid until " +"interpreter shutdown." +msgstr "" + +msgid "Return the length of the Unicode object, in code points." +msgstr "" + +msgid "On error, set an exception and return ``-1``." +msgstr "" + +msgid "" +"Copy characters from one Unicode object into another. This function " +"performs character conversion when necessary and falls back to :c:func:`!" +"memcpy` if possible. Returns ``-1`` and sets an exception on error, " +"otherwise returns the number of copied characters." +msgstr "" + +msgid "" +"The string must not have been “used” yet. See :c:func:`PyUnicode_New` for " +"details." +msgstr "" + +msgid "" +"Resize a Unicode object *\\*unicode* to the new *length* in code points." +msgstr "" + +msgid "" +"Try to resize the string in place (which is usually faster than allocating a " +"new string and copying characters), or create a new string." +msgstr "" + +msgid "" +"*\\*unicode* is modified to point to the new (resized) object and ``0`` is " +"returned on success. Otherwise, ``-1`` is returned and an exception is set, " +"and *\\*unicode* is left untouched." +msgstr "" + +msgid "" +"The function doesn't check string content, the result may not be a string in " +"canonical representation." +msgstr "" + +msgid "" +"Fill a string with a character: write *fill_char* into ``unicode[start:" +"start+length]``." +msgstr "" + +msgid "" +"Fail if *fill_char* is bigger than the string maximum character, or if the " +"string has more than 1 reference." +msgstr "" + +msgid "" +"Return the number of written character, or return ``-1`` and raise an " +"exception on error." +msgstr "" + +msgid "" +"Write a *character* to the string *unicode* at the zero-based *index*. " +"Return ``0`` on success, ``-1`` on error with an exception set." +msgstr "" + +msgid "" +"This function checks that *unicode* is a Unicode object, that the index is " +"not out of bounds, and that the object's reference count is one. See :c:func:" +"`PyUnicode_WRITE` for a version that skips these checks, making them your " +"responsibility." +msgstr "" + +msgid "" +"Read a character from a string. This function checks that *unicode* is a " +"Unicode object and the index is not out of bounds, in contrast to :c:func:" +"`PyUnicode_READ_CHAR`, which performs no error checking." +msgstr "" + +msgid "Return character on success, ``-1`` on error with an exception set." +msgstr "" + +msgid "" +"Return a substring of *unicode*, from character index *start* (included) to " +"character index *end* (excluded). Negative indices are not supported. On " +"error, set an exception and return ``NULL``." +msgstr "" + +msgid "" +"Copy the string *unicode* into a UCS4 buffer, including a null character, if " +"*copy_null* is set. Returns ``NULL`` and sets an exception on error (in " +"particular, a :exc:`SystemError` if *buflen* is smaller than the length of " +"*unicode*). *buffer* is returned on success." +msgstr "" + +msgid "" +"Copy the string *unicode* into a new UCS4 buffer that is allocated using :c:" +"func:`PyMem_Malloc`. If this fails, ``NULL`` is returned with a :exc:" +"`MemoryError` set. The returned buffer always has an extra null code point " +"appended." +msgstr "" + +msgid "Locale Encoding" +msgstr "" + +msgid "" +"The current locale encoding can be used to decode text from the operating " +"system." +msgstr "" + +msgid "" +"Decode a string from UTF-8 on Android and VxWorks, or from the current " +"locale encoding on other platforms. The supported error handlers are " +"``\"strict\"`` and ``\"surrogateescape\"`` (:pep:`383`). The decoder uses " +"``\"strict\"`` error handler if *errors* is ``NULL``. *str* must end with a " +"null character but cannot contain embedded null characters." +msgstr "" + +msgid "" +"Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from the :" +"term:`filesystem encoding and error handler`." +msgstr "" + +msgid "This function ignores the :ref:`Python UTF-8 Mode `." +msgstr "" + +msgid "The :c:func:`Py_DecodeLocale` function." +msgstr "" + +msgid "" +"The function now also uses the current locale encoding for the " +"``surrogateescape`` error handler, except on Android. Previously, :c:func:" +"`Py_DecodeLocale` was used for the ``surrogateescape``, and the current " +"locale encoding was used for ``strict``." +msgstr "" + +msgid "" +"Similar to :c:func:`PyUnicode_DecodeLocaleAndSize`, but compute the string " +"length using :c:func:`!strlen`." +msgstr "" + +msgid "" +"Encode a Unicode object to UTF-8 on Android and VxWorks, or to the current " +"locale encoding on other platforms. The supported error handlers are " +"``\"strict\"`` and ``\"surrogateescape\"`` (:pep:`383`). The encoder uses " +"``\"strict\"`` error handler if *errors* is ``NULL``. Return a :class:" +"`bytes` object. *unicode* cannot contain embedded null characters." +msgstr "" + +msgid "" +"Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to the :term:" +"`filesystem encoding and error handler`." +msgstr "" + +msgid "The :c:func:`Py_EncodeLocale` function." +msgstr "" + +msgid "" +"The function now also uses the current locale encoding for the " +"``surrogateescape`` error handler, except on Android. Previously, :c:func:" +"`Py_EncodeLocale` was used for the ``surrogateescape``, and the current " +"locale encoding was used for ``strict``." +msgstr "" + +msgid "File System Encoding" +msgstr "" + +msgid "" +"Functions encoding to and decoding from the :term:`filesystem encoding and " +"error handler` (:pep:`383` and :pep:`529`)." +msgstr "" + +msgid "" +"To encode file names to :class:`bytes` during argument parsing, the " +"``\"O&\"`` converter should be used, passing :c:func:`!" +"PyUnicode_FSConverter` as the conversion function:" +msgstr "" + +msgid "" +":ref:`PyArg_Parse\\* converter `: encode :class:`str` objects " +"-- obtained directly or through the :class:`os.PathLike` interface -- to :" +"class:`bytes` using :c:func:`PyUnicode_EncodeFSDefault`; :class:`bytes` " +"objects are output as-is. *result* must be an address of a C variable of " +"type :c:expr:`PyObject*` (or :c:expr:`PyBytesObject*`). On success, set the " +"variable to a new :term:`strong reference` to a :ref:`bytes object " +"` which must be released when it is no longer used and return " +"a non-zero value (:c:macro:`Py_CLEANUP_SUPPORTED`). Embedded null bytes are " +"not allowed in the result. On failure, return ``0`` with an exception set." +msgstr "" + +msgid "" +"If *obj* is ``NULL``, the function releases a strong reference stored in the " +"variable referred by *result* and returns ``1``." +msgstr "" + +msgid "Accepts a :term:`path-like object`." +msgstr "" + +msgid "" +"To decode file names to :class:`str` during argument parsing, the ``\"O&\"`` " +"converter should be used, passing :c:func:`!PyUnicode_FSDecoder` as the " +"conversion function:" +msgstr "" + +msgid "" +":ref:`PyArg_Parse\\* converter `: decode :class:`bytes` objects " +"-- obtained either directly or indirectly through the :class:`os.PathLike` " +"interface -- to :class:`str` using :c:func:" +"`PyUnicode_DecodeFSDefaultAndSize`; :class:`str` objects are output as-is. " +"*result* must be an address of a C variable of type :c:expr:`PyObject*` (or :" +"c:expr:`PyUnicodeObject*`). On success, set the variable to a new :term:" +"`strong reference` to a :ref:`Unicode object ` which must be " +"released when it is no longer used and return a non-zero value (:c:macro:" +"`Py_CLEANUP_SUPPORTED`). Embedded null characters are not allowed in the " +"result. On failure, return ``0`` with an exception set." +msgstr "" + +msgid "" +"If *obj* is ``NULL``, release the strong reference to the object referred to " +"by *result* and return ``1``." +msgstr "" + +msgid "Decode a string from the :term:`filesystem encoding and error handler`." +msgstr "" + +msgid "" +"If you need to decode a string from the current locale encoding, use :c:func:" +"`PyUnicode_DecodeLocaleAndSize`." +msgstr "" + +msgid "" +"The :term:`filesystem error handler ` " +"is now used." +msgstr "" + +msgid "" +"Decode a null-terminated string from the :term:`filesystem encoding and " +"error handler`." +msgstr "" + +msgid "" +"If the string length is known, use :c:func:" +"`PyUnicode_DecodeFSDefaultAndSize`." +msgstr "" + +msgid "" +"Encode a Unicode object to the :term:`filesystem encoding and error " +"handler`, and return :class:`bytes`. Note that the resulting :class:`bytes` " +"object can contain null bytes." +msgstr "" + +msgid "" +"If you need to encode a string to the current locale encoding, use :c:func:" +"`PyUnicode_EncodeLocale`." +msgstr "" + +msgid "wchar_t Support" +msgstr "" + +msgid ":c:type:`wchar_t` support for platforms which support it:" +msgstr "" + +msgid "" +"Create a Unicode object from the :c:type:`wchar_t` buffer *wstr* of the " +"given *size*. Passing ``-1`` as the *size* indicates that the function must " +"itself compute the length, using :c:func:`!wcslen`. Return ``NULL`` on " +"failure." +msgstr "" + +msgid "" +"Copy the Unicode object contents into the :c:type:`wchar_t` buffer *wstr*. " +"At most *size* :c:type:`wchar_t` characters are copied (excluding a possibly " +"trailing null termination character). Return the number of :c:type:" +"`wchar_t` characters copied or ``-1`` in case of an error." +msgstr "" + +msgid "" +"When *wstr* is ``NULL``, instead return the *size* that would be required to " +"store all of *unicode* including a terminating null." +msgstr "" + +msgid "" +"Note that the resulting :c:expr:`wchar_t*` string may or may not be null-" +"terminated. It is the responsibility of the caller to make sure that the :c:" +"expr:`wchar_t*` string is null-terminated in case this is required by the " +"application. Also, note that the :c:expr:`wchar_t*` string might contain " +"null characters, which would cause the string to be truncated when used with " +"most C functions." +msgstr "" + +msgid "" +"Convert the Unicode object to a wide character string. The output string " +"always ends with a null character. If *size* is not ``NULL``, write the " +"number of wide characters (excluding the trailing null termination " +"character) into *\\*size*. Note that the resulting :c:type:`wchar_t` string " +"might contain null characters, which would cause the string to be truncated " +"when used with most C functions. If *size* is ``NULL`` and the :c:expr:" +"`wchar_t*` string contains null characters a :exc:`ValueError` is raised." +msgstr "" + +msgid "" +"Returns a buffer allocated by :c:macro:`PyMem_New` (use :c:func:`PyMem_Free` " +"to free it) on success. On error, returns ``NULL`` and *\\*size* is " +"undefined. Raises a :exc:`MemoryError` if memory allocation is failed." +msgstr "" + +msgid "" +"Raises a :exc:`ValueError` if *size* is ``NULL`` and the :c:expr:`wchar_t*` " +"string contains null characters." +msgstr "" + +msgid "Built-in Codecs" +msgstr "" + +msgid "" +"Python provides a set of built-in codecs which are written in C for speed. " +"All of these codecs are directly usable via the following functions." +msgstr "" + +msgid "" +"Many of the following APIs take two arguments encoding and errors, and they " +"have the same semantics as the ones of the built-in :func:`str` string " +"object constructor." +msgstr "" + +msgid "" +"Setting encoding to ``NULL`` causes the default encoding to be used which is " +"UTF-8. The file system calls should use :c:func:`PyUnicode_FSConverter` for " +"encoding file names. This uses the :term:`filesystem encoding and error " +"handler` internally." +msgstr "" + +msgid "" +"Error handling is set by errors which may also be set to ``NULL`` meaning to " +"use the default handling defined for the codec. Default error handling for " +"all built-in codecs is \"strict\" (:exc:`ValueError` is raised)." +msgstr "" + +msgid "" +"The codecs all use a similar interface. Only deviations from the following " +"generic ones are documented for simplicity." +msgstr "" + +msgid "Generic Codecs" +msgstr "" + +msgid "The following macro is provided:" +msgstr "" + +msgid "The Unicode code point ``U+FFFD`` (replacement character)." +msgstr "" + +msgid "" +"This Unicode character is used as the replacement character during decoding " +"if the *errors* argument is set to \"replace\"." +msgstr "" + +msgid "These are the generic codec APIs:" +msgstr "" + +msgid "" +"Create a Unicode object by decoding *size* bytes of the encoded string " +"*str*. *encoding* and *errors* have the same meaning as the parameters of " +"the same name in the :func:`str` built-in function. The codec to be used is " +"looked up using the Python codec registry. Return ``NULL`` if an exception " +"was raised by the codec." +msgstr "" + +msgid "" +"Encode a Unicode object and return the result as Python bytes object. " +"*encoding* and *errors* have the same meaning as the parameters of the same " +"name in the Unicode :meth:`~str.encode` method. The codec to be used is " +"looked up using the Python codec registry. Return ``NULL`` if an exception " +"was raised by the codec." +msgstr "" + +msgid "UTF-8 Codecs" +msgstr "" + +msgid "These are the UTF-8 codec APIs:" +msgstr "" + +msgid "" +"Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string " +"*str*. Return ``NULL`` if an exception was raised by the codec." +msgstr "" + +msgid "" +"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF8`. If " +"*consumed* is not ``NULL``, trailing incomplete UTF-8 byte sequences will " +"not be treated as an error. Those bytes will not be decoded and the number " +"of bytes that have been decoded will be stored in *consumed*." +msgstr "" + +msgid "" +"Encode a Unicode object using UTF-8 and return the result as Python bytes " +"object. Error handling is \"strict\". Return ``NULL`` if an exception was " +"raised by the codec." +msgstr "" + +msgid "" +"The function fails if the string contains surrogate code points (``U+D800`` " +"- ``U+DFFF``)." +msgstr "" + +msgid "" +"Return a pointer to the UTF-8 encoding of the Unicode object, and store the " +"size of the encoded representation (in bytes) in *size*. The *size* " +"argument can be ``NULL``; in this case no size will be stored. The returned " +"buffer always has an extra null byte appended (not included in *size*), " +"regardless of whether there are any other null code points." +msgstr "" + +msgid "" +"On error, set an exception, set *size* to ``-1`` (if it's not NULL) and " +"return ``NULL``." +msgstr "" + +msgid "" +"This caches the UTF-8 representation of the string in the Unicode object, " +"and subsequent calls will return a pointer to the same buffer. The caller " +"is not responsible for deallocating the buffer. The buffer is deallocated " +"and pointers to it become invalid when the Unicode object is garbage " +"collected." +msgstr "" + +msgid "The return type is now ``const char *`` rather of ``char *``." +msgstr "" + +msgid "This function is a part of the :ref:`limited API `." +msgstr "" + +msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." +msgstr "" + +msgid "" +"This function does not have any special behavior for `null characters " +"`_ embedded within *unicode*. " +"As a result, strings containing null characters will remain in the returned " +"string, which some C functions might interpret as the end of the string, " +"leading to truncation. If truncation is an issue, it is recommended to use :" +"c:func:`PyUnicode_AsUTF8AndSize` instead." +msgstr "" + +msgid "UTF-32 Codecs" +msgstr "" + +msgid "These are the UTF-32 codec APIs:" +msgstr "" + +msgid "" +"Decode *size* bytes from a UTF-32 encoded buffer string and return the " +"corresponding Unicode object. *errors* (if non-``NULL``) defines the error " +"handling. It defaults to \"strict\"." +msgstr "" + +msgid "" +"If *byteorder* is non-``NULL``, the decoder starts decoding using the given " +"byte order::" +msgstr "" + +msgid "" +"*byteorder == -1: little endian\n" +"*byteorder == 0: native order\n" +"*byteorder == 1: big endian" +msgstr "" + +msgid "" +"If ``*byteorder`` is zero, and the first four bytes of the input data are a " +"byte order mark (BOM), the decoder switches to this byte order and the BOM " +"is not copied into the resulting Unicode string. If ``*byteorder`` is " +"``-1`` or ``1``, any byte order mark is copied to the output." +msgstr "" + +msgid "" +"After completion, *\\*byteorder* is set to the current byte order at the end " +"of input data." +msgstr "" + +msgid "If *byteorder* is ``NULL``, the codec starts in native order mode." +msgstr "" + +msgid "Return ``NULL`` if an exception was raised by the codec." +msgstr "" + +msgid "" +"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF32`. If " +"*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF32Stateful` will not " +"treat trailing incomplete UTF-32 byte sequences (such as a number of bytes " +"not divisible by four) as an error. Those bytes will not be decoded and the " +"number of bytes that have been decoded will be stored in *consumed*." +msgstr "" + +msgid "" +"Return a Python byte string using the UTF-32 encoding in native byte order. " +"The string always starts with a BOM mark. Error handling is \"strict\". " +"Return ``NULL`` if an exception was raised by the codec." +msgstr "" + +msgid "UTF-16 Codecs" +msgstr "" + +msgid "These are the UTF-16 codec APIs:" +msgstr "" + +msgid "" +"Decode *size* bytes from a UTF-16 encoded buffer string and return the " +"corresponding Unicode object. *errors* (if non-``NULL``) defines the error " +"handling. It defaults to \"strict\"." +msgstr "" + +msgid "" +"If ``*byteorder`` is zero, and the first two bytes of the input data are a " +"byte order mark (BOM), the decoder switches to this byte order and the BOM " +"is not copied into the resulting Unicode string. If ``*byteorder`` is " +"``-1`` or ``1``, any byte order mark is copied to the output (where it will " +"result in either a ``\\ufeff`` or a ``\\ufffe`` character)." +msgstr "" + +msgid "" +"After completion, ``*byteorder`` is set to the current byte order at the end " +"of input data." +msgstr "" + +msgid "" +"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If " +"*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF16Stateful` will not " +"treat trailing incomplete UTF-16 byte sequences (such as an odd number of " +"bytes or a split surrogate pair) as an error. Those bytes will not be " +"decoded and the number of bytes that have been decoded will be stored in " +"*consumed*." +msgstr "" + +msgid "" +"Return a Python byte string using the UTF-16 encoding in native byte order. " +"The string always starts with a BOM mark. Error handling is \"strict\". " +"Return ``NULL`` if an exception was raised by the codec." +msgstr "" + +msgid "UTF-7 Codecs" +msgstr "" + +msgid "These are the UTF-7 codec APIs:" +msgstr "" + +msgid "" +"Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string " +"*str*. Return ``NULL`` if an exception was raised by the codec." +msgstr "" + +msgid "" +"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF7`. If " +"*consumed* is not ``NULL``, trailing incomplete UTF-7 base-64 sections will " +"not be treated as an error. Those bytes will not be decoded and the number " +"of bytes that have been decoded will be stored in *consumed*." +msgstr "" + +msgid "Unicode-Escape Codecs" +msgstr "" + +msgid "These are the \"Unicode Escape\" codec APIs:" +msgstr "" + +msgid "" +"Create a Unicode object by decoding *size* bytes of the Unicode-Escape " +"encoded string *str*. Return ``NULL`` if an exception was raised by the " +"codec." +msgstr "" + +msgid "" +"Encode a Unicode object using Unicode-Escape and return the result as a " +"bytes object. Error handling is \"strict\". Return ``NULL`` if an " +"exception was raised by the codec." +msgstr "" + +msgid "Raw-Unicode-Escape Codecs" +msgstr "" + +msgid "These are the \"Raw Unicode Escape\" codec APIs:" +msgstr "" + +msgid "" +"Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape " +"encoded string *str*. Return ``NULL`` if an exception was raised by the " +"codec." +msgstr "" + +msgid "" +"Encode a Unicode object using Raw-Unicode-Escape and return the result as a " +"bytes object. Error handling is \"strict\". Return ``NULL`` if an " +"exception was raised by the codec." +msgstr "" + +msgid "Latin-1 Codecs" +msgstr "" + +msgid "" +"These are the Latin-1 codec APIs: Latin-1 corresponds to the first 256 " +"Unicode ordinals and only these are accepted by the codecs during encoding." +msgstr "" + +msgid "" +"Create a Unicode object by decoding *size* bytes of the Latin-1 encoded " +"string *str*. Return ``NULL`` if an exception was raised by the codec." +msgstr "" + +msgid "" +"Encode a Unicode object using Latin-1 and return the result as Python bytes " +"object. Error handling is \"strict\". Return ``NULL`` if an exception was " +"raised by the codec." +msgstr "" + +msgid "ASCII Codecs" +msgstr "" + +msgid "" +"These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All " +"other codes generate errors." +msgstr "" + +msgid "" +"Create a Unicode object by decoding *size* bytes of the ASCII encoded string " +"*str*. Return ``NULL`` if an exception was raised by the codec." +msgstr "" + +msgid "" +"Encode a Unicode object using ASCII and return the result as Python bytes " +"object. Error handling is \"strict\". Return ``NULL`` if an exception was " +"raised by the codec." +msgstr "" + +msgid "Character Map Codecs" +msgstr "" + +msgid "" +"This codec is special in that it can be used to implement many different " +"codecs (and this is in fact what was done to obtain most of the standard " +"codecs included in the :mod:`!encodings` package). The codec uses mappings " +"to encode and decode characters. The mapping objects provided must support " +"the :meth:`~object.__getitem__` mapping interface; dictionaries and " +"sequences work well." +msgstr "" + +msgid "These are the mapping codec APIs:" +msgstr "" + +msgid "" +"Create a Unicode object by decoding *size* bytes of the encoded string *str* " +"using the given *mapping* object. Return ``NULL`` if an exception was " +"raised by the codec." +msgstr "" + +msgid "" +"If *mapping* is ``NULL``, Latin-1 decoding will be applied. Else *mapping* " +"must map bytes ordinals (integers in the range from 0 to 255) to Unicode " +"strings, integers (which are then interpreted as Unicode ordinals) or " +"``None``. Unmapped data bytes -- ones which cause a :exc:`LookupError`, as " +"well as ones which get mapped to ``None``, ``0xFFFE`` or ``'\\ufffe'``, are " +"treated as undefined mappings and cause an error." +msgstr "" + +msgid "" +"Encode a Unicode object using the given *mapping* object and return the " +"result as a bytes object. Error handling is \"strict\". Return ``NULL`` if " +"an exception was raised by the codec." +msgstr "" + +msgid "" +"The *mapping* object must map Unicode ordinal integers to bytes objects, " +"integers in the range from 0 to 255 or ``None``. Unmapped character " +"ordinals (ones which cause a :exc:`LookupError`) as well as mapped to " +"``None`` are treated as \"undefined mapping\" and cause an error." +msgstr "" + +msgid "The following codec API is special in that maps Unicode to Unicode." +msgstr "" + +msgid "" +"Translate a string by applying a character mapping table to it and return " +"the resulting Unicode object. Return ``NULL`` if an exception was raised by " +"the codec." +msgstr "" + +msgid "" +"The mapping table must map Unicode ordinal integers to Unicode ordinal " +"integers or ``None`` (causing deletion of the character)." +msgstr "" + +msgid "" +"Mapping tables need only provide the :meth:`~object.__getitem__` interface; " +"dictionaries and sequences work well. Unmapped character ordinals (ones " +"which cause a :exc:`LookupError`) are left untouched and are copied as-is." +msgstr "" + +msgid "" +"*errors* has the usual meaning for codecs. It may be ``NULL`` which " +"indicates to use the default error handling." +msgstr "" + +msgid "MBCS codecs for Windows" +msgstr "" + +msgid "" +"These are the MBCS codec APIs. They are currently only available on Windows " +"and use the Win32 MBCS converters to implement the conversions. Note that " +"MBCS (or DBCS) is a class of encodings, not just one. The target encoding " +"is defined by the user settings on the machine running the codec." +msgstr "" + +msgid "" +"Create a Unicode object by decoding *size* bytes of the MBCS encoded string " +"*str*. Return ``NULL`` if an exception was raised by the codec." +msgstr "" + +msgid "" +"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeMBCS`. If " +"*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeMBCSStateful` will not " +"decode trailing lead byte and the number of bytes that have been decoded " +"will be stored in *consumed*." +msgstr "" + +msgid "" +"Similar to :c:func:`PyUnicode_DecodeMBCSStateful`, except uses the code page " +"specified by *code_page*." +msgstr "" + +msgid "" +"Encode a Unicode object using MBCS and return the result as Python bytes " +"object. Error handling is \"strict\". Return ``NULL`` if an exception was " +"raised by the codec." +msgstr "" + +msgid "" +"Encode the Unicode object using the specified code page and return a Python " +"bytes object. Return ``NULL`` if an exception was raised by the codec. Use :" +"c:macro:`!CP_ACP` code page to get the MBCS encoder." +msgstr "" + +msgid "Methods and Slot Functions" +msgstr "" + +msgid "" +"The following APIs are capable of handling Unicode objects and strings on " +"input (we refer to them as strings in the descriptions) and return Unicode " +"objects or integers as appropriate." +msgstr "" + +msgid "They all return ``NULL`` or ``-1`` if an exception occurs." +msgstr "" + +msgid "Concat two strings giving a new Unicode string." +msgstr "" + +msgid "" +"Split a string giving a list of Unicode strings. If *sep* is ``NULL``, " +"splitting will be done at all whitespace substrings. Otherwise, splits " +"occur at the given separator. At most *maxsplit* splits will be done. If " +"negative, no limit is set. Separators are not included in the resulting " +"list." +msgstr "" + +msgid "On error, return ``NULL`` with an exception set." +msgstr "" + +msgid "Equivalent to :py:meth:`str.split`." +msgstr "" + +msgid "" +"Similar to :c:func:`PyUnicode_Split`, but splitting will be done beginning " +"at the end of the string." +msgstr "" + +msgid "Equivalent to :py:meth:`str.rsplit`." +msgstr "" + +msgid "" +"Split a Unicode string at line breaks, returning a list of Unicode strings. " +"CRLF is considered to be one line break. If *keepends* is ``0``, the Line " +"break characters are not included in the resulting strings." +msgstr "" + +msgid "" +"Split a Unicode string at the first occurrence of *sep*, and return a 3-" +"tuple containing the part before the separator, the separator itself, and " +"the part after the separator. If the separator is not found, return a 3-" +"tuple containing the string itself, followed by two empty strings." +msgstr "" + +msgid "*sep* must not be empty." +msgstr "" + +msgid "Equivalent to :py:meth:`str.partition`." +msgstr "" + +msgid "" +"Similar to :c:func:`PyUnicode_Partition`, but split a Unicode string at the " +"last occurrence of *sep*. If the separator is not found, return a 3-tuple " +"containing two empty strings, followed by the string itself." +msgstr "" + +msgid "Equivalent to :py:meth:`str.rpartition`." +msgstr "" + +msgid "" +"Join a sequence of strings using the given *separator* and return the " +"resulting Unicode string." +msgstr "" + +msgid "" +"Return ``1`` if *substr* matches ``unicode[start:end]`` at the given tail " +"end (*direction* == ``-1`` means to do a prefix match, *direction* == ``1`` " +"a suffix match), ``0`` otherwise. Return ``-1`` if an error occurred." +msgstr "" + +msgid "" +"Return the first position of *substr* in ``unicode[start:end]`` using the " +"given *direction* (*direction* == ``1`` means to do a forward search, " +"*direction* == ``-1`` a backward search). The return value is the index of " +"the first match; a value of ``-1`` indicates that no match was found, and " +"``-2`` indicates that an error occurred and an exception has been set." +msgstr "" + +msgid "" +"Return the first position of the character *ch* in ``unicode[start:end]`` " +"using the given *direction* (*direction* == ``1`` means to do a forward " +"search, *direction* == ``-1`` a backward search). The return value is the " +"index of the first match; a value of ``-1`` indicates that no match was " +"found, and ``-2`` indicates that an error occurred and an exception has been " +"set." +msgstr "" + +msgid "" +"*start* and *end* are now adjusted to behave like ``unicode[start:end]``." +msgstr "" + +msgid "" +"Return the number of non-overlapping occurrences of *substr* in " +"``unicode[start:end]``. Return ``-1`` if an error occurred." +msgstr "" + +msgid "" +"Replace at most *maxcount* occurrences of *substr* in *unicode* with " +"*replstr* and return the resulting Unicode object. *maxcount* == ``-1`` " +"means replace all occurrences." +msgstr "" + +msgid "" +"Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, " +"and greater than, respectively." +msgstr "" + +msgid "" +"This function returns ``-1`` upon failure, so one should call :c:func:" +"`PyErr_Occurred` to check for errors." +msgstr "" + +msgid "The :c:func:`PyUnicode_Equal` function." +msgstr "" + +msgid "Test if two strings are equal:" +msgstr "" + +msgid "Return ``1`` if *a* is equal to *b*." +msgstr "" + +msgid "Return ``0`` if *a* is not equal to *b*." +msgstr "" + +msgid "" +"Set a :exc:`TypeError` exception and return ``-1`` if *a* or *b* is not a :" +"class:`str` object." +msgstr "" + +msgid "The function always succeeds if *a* and *b* are :class:`str` objects." +msgstr "" + +msgid "" +"The function works for :class:`str` subclasses, but does not honor custom " +"``__eq__()`` method." +msgstr "" + +msgid "The :c:func:`PyUnicode_Compare` function." +msgstr "" + +msgid "" +"Compare a Unicode object with a char buffer which is interpreted as being " +"UTF-8 or ASCII encoded and return true (``1``) if they are equal, or false " +"(``0``) otherwise. If the Unicode object contains surrogate code points " +"(``U+D800`` - ``U+DFFF``) or the C string is not valid UTF-8, false (``0``) " +"is returned." +msgstr "" + +msgid "This function does not raise exceptions." +msgstr "" + +msgid "" +"Similar to :c:func:`PyUnicode_EqualToUTF8AndSize`, but compute *string* " +"length using :c:func:`!strlen`. If the Unicode object contains null " +"characters, false (``0``) is returned." +msgstr "" + +msgid "" +"Compare a Unicode object, *unicode*, with *string* and return ``-1``, ``0``, " +"``1`` for less than, equal, and greater than, respectively. It is best to " +"pass only ASCII-encoded strings, but the function interprets the input " +"string as ISO-8859-1 if it contains non-ASCII characters." +msgstr "" + +msgid "Rich compare two Unicode strings and return one of the following:" +msgstr "" + +msgid "``NULL`` in case an exception was raised" +msgstr "" + +msgid ":c:data:`Py_True` or :c:data:`Py_False` for successful comparisons" +msgstr "" + +msgid ":c:data:`Py_NotImplemented` in case the type combination is unknown" +msgstr "" + +msgid "" +"Possible values for *op* are :c:macro:`Py_GT`, :c:macro:`Py_GE`, :c:macro:" +"`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_LT`, and :c:macro:`Py_LE`." +msgstr "" + +msgid "" +"Return a new string object from *format* and *args*; this is analogous to " +"``format % args``." +msgstr "" + +msgid "" +"Check whether *substr* is contained in *unicode* and return true or false " +"accordingly." +msgstr "" + +msgid "" +"*substr* has to coerce to a one element Unicode string. ``-1`` is returned " +"if there was an error." +msgstr "" + +msgid "" +"Intern the argument :c:expr:`*p_unicode` in place. The argument must be the " +"address of a pointer variable pointing to a Python Unicode string object. " +"If there is an existing interned string that is the same as :c:expr:" +"`*p_unicode`, it sets :c:expr:`*p_unicode` to it (releasing the reference to " +"the old string object and creating a new :term:`strong reference` to the " +"interned string object), otherwise it leaves :c:expr:`*p_unicode` alone and " +"interns it." +msgstr "" + +msgid "" +"(Clarification: even though there is a lot of talk about references, think " +"of this function as reference-neutral. You must own the object you pass in; " +"after the call you no longer own the passed-in reference, but you newly own " +"the result.)" +msgstr "" + +msgid "" +"This function never raises an exception. On error, it leaves its argument " +"unchanged without interning it." +msgstr "" + +msgid "" +"Instances of subclasses of :py:class:`str` may not be interned, that is, :c:" +"expr:`PyUnicode_CheckExact(*p_unicode)` must be true. If it is not, then -- " +"as with any other error -- the argument is left unchanged." +msgstr "" + +msgid "" +"Note that interned strings are not “immortal”. You must keep a reference to " +"the result to benefit from interning." +msgstr "" + +msgid "" +"A combination of :c:func:`PyUnicode_FromString` and :c:func:" +"`PyUnicode_InternInPlace`, meant for statically allocated strings." +msgstr "" + +msgid "" +"Return a new (\"owned\") reference to either a new Unicode string object " +"that has been interned, or an earlier interned string object with the same " +"value." +msgstr "" + +msgid "" +"Python may keep a reference to the result, or make it :term:`immortal`, " +"preventing it from being garbage-collected promptly. For interning an " +"unbounded number of different strings, such as ones coming from user input, " +"prefer calling :c:func:`PyUnicode_FromString` and :c:func:" +"`PyUnicode_InternInPlace` directly." +msgstr "" + +msgid "" +"Return a non-zero value if *str* is interned, zero if not. The *str* " +"argument must be a string; this is not checked. This function always " +"succeeds." +msgstr "" + +msgid "" +"A non-zero return value may carry additional information about *how* the " +"string is interned. The meaning of such non-zero values, as well as each " +"specific string's intern-related details, may change between CPython " +"versions." +msgstr "" + +msgid "PyUnicodeWriter" +msgstr "" + +msgid "" +"The :c:type:`PyUnicodeWriter` API can be used to create a Python :class:" +"`str` object." +msgstr "" + +msgid "A Unicode writer instance." +msgstr "" + +msgid "" +"The instance must be destroyed by :c:func:`PyUnicodeWriter_Finish` on " +"success, or :c:func:`PyUnicodeWriter_Discard` on error." +msgstr "" + +msgid "Create a Unicode writer instance." +msgstr "" + +msgid "*length* must be greater than or equal to ``0``." +msgstr "" + +msgid "" +"If *length* is greater than ``0``, preallocate an internal buffer of " +"*length* characters." +msgstr "" + +msgid "Set an exception and return ``NULL`` on error." +msgstr "" + +msgid "" +"Return the final Python :class:`str` object and destroy the writer instance." +msgstr "" + +msgid "The writer instance is invalid after this call." +msgstr "" + +msgid "Discard the internal Unicode buffer and destroy the writer instance." +msgstr "" + +msgid "If *writer* is ``NULL``, no operation is performed." +msgstr "" + +msgid "Write the single Unicode character *ch* into *writer*." +msgstr "" + +msgid "" +"On success, return ``0``. On error, set an exception, leave the writer " +"unchanged, and return ``-1``." +msgstr "" + +msgid "" +"Decode the string *str* from UTF-8 in strict mode and write the output into " +"*writer*." +msgstr "" + +msgid "" +"*size* is the string length in bytes. If *size* is equal to ``-1``, call " +"``strlen(str)`` to get the string length." +msgstr "" + +msgid "See also :c:func:`PyUnicodeWriter_DecodeUTF8Stateful`." +msgstr "" + +msgid "Write the ASCII string *str* into *writer*." +msgstr "" + +msgid "" +"*str* must only contain ASCII characters. The behavior is undefined if *str* " +"contains non-ASCII characters." +msgstr "" + +msgid "Write the wide string *str* into *writer*." +msgstr "" + +msgid "" +"*size* is a number of wide characters. If *size* is equal to ``-1``, call " +"``wcslen(str)`` to get the string length." +msgstr "" + +msgid "Writer the UCS4 string *str* into *writer*." +msgstr "" + +msgid "*size* is a number of UCS4 characters." +msgstr "" + +msgid "" +"Call :c:func:`PyObject_Str` on *obj* and write the output into *writer*." +msgstr "" + +msgid "" +"Call :c:func:`PyObject_Repr` on *obj* and write the output into *writer*." +msgstr "" + +msgid "Write the substring ``str[start:end]`` into *writer*." +msgstr "" + +msgid "" +"*str* must be Python :class:`str` object. *start* must be greater than or " +"equal to 0, and less than or equal to *end*. *end* must be less than or " +"equal to *str* length." +msgstr "" + +msgid "" +"Similar to :c:func:`PyUnicode_FromFormat`, but write the output directly " +"into *writer*." +msgstr "" + +msgid "" +"Decode the string *str* from UTF-8 with *errors* error handler and write the " +"output into *writer*." +msgstr "" + +msgid "" +"*errors* is an :ref:`error handler ` name, such as " +"``\"replace\"``. If *errors* is ``NULL``, use the strict error handler." +msgstr "" + +msgid "" +"If *consumed* is not ``NULL``, set *\\*consumed* to the number of decoded " +"bytes on success. If *consumed* is ``NULL``, treat trailing incomplete UTF-8 " +"byte sequences as an error." +msgstr "" + +msgid "See also :c:func:`PyUnicodeWriter_WriteUTF8`." +msgstr "" + +msgid "Deprecated API" +msgstr "" + +msgid "The following API is deprecated." +msgstr "" + +msgid "" +"This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit " +"type depending on the platform. Please use :c:type:`wchar_t` directly " +"instead." +msgstr "" + +msgid "" +"In previous versions, this was a 16-bit type or a 32-bit type depending on " +"whether you selected a \"narrow\" or \"wide\" Unicode version of Python at " +"build time." +msgstr "" + +msgid "" +"Do nothing and return ``0``. This API is kept only for backward " +"compatibility, but there are no plans to remove it." +msgstr "" + +msgid "" +"This API does nothing since Python 3.12. Previously, this needed to be " +"called for each string created using the old API (:c:func:`!" +"PyUnicode_FromUnicode` or similar)." +msgstr "" + +msgid "" +"Do nothing and return ``1``. This API is kept only for backward " +"compatibility, but there are no plans to remove it." +msgstr "" + +msgid "" +"This API does nothing since Python 3.12. Previously, this could be called to " +"check if :c:func:`PyUnicode_READY` is necessary." +msgstr "" diff --git a/c-api/utilities.po b/c-api/utilities.po index 60dac3fc..5435b917 100644 --- a/c-api/utilities.po +++ b/c-api/utilities.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/utilities.rst:7 msgid "Utilities" msgstr "" +#: ../../c-api/utilities.rst:9 msgid "" "The functions in this chapter perform various utility tasks, ranging from " "helping C code be more portable across platforms, using Python modules from " diff --git a/c-api/utilities.po~ b/c-api/utilities.po~ new file mode 100644 index 00000000..60dac3fc --- /dev/null +++ b/c-api/utilities.po~ @@ -0,0 +1,28 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Utilities" +msgstr "" + +msgid "" +"The functions in this chapter perform various utility tasks, ranging from " +"helping C code be more portable across platforms, using Python modules from " +"C, and parsing function arguments and constructing Python values from C " +"values." +msgstr "" diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index 8e27609a..2b43980f 100644 --- a/c-api/veryhigh.po +++ b/c-api/veryhigh.po @@ -8,31 +8,36 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-29 14:15+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/veryhigh.rst:8 msgid "The Very High Level Layer" msgstr "" +#: ../../c-api/veryhigh.rst:10 msgid "" "The functions in this chapter will let you execute Python source code given " "in a file or a buffer, but they will not let you interact in a more detailed " "way with the interpreter." msgstr "" +#: ../../c-api/veryhigh.rst:14 msgid "" "Several of these functions accept a start symbol from the grammar as a " "parameter. The available start symbols are :c:data:`Py_eval_input`, :c:data:" -"`Py_file_input`, and :c:data:`Py_single_input`. These are described " -"following the functions which accept them as parameters." +"`Py_file_input`, :c:data:`Py_single_input`, and :c:data:" +"`Py_func_type_input`. These are described following the functions which " +"accept them as parameters." msgstr "" +#: ../../c-api/veryhigh.rst:20 msgid "" "Note also that several of these functions take :c:expr:`FILE*` parameters. " "One particular issue which needs to be handled carefully is that the :c:type:" @@ -44,21 +49,25 @@ msgid "" "runtime is using." msgstr "" +#: ../../c-api/veryhigh.rst:31 msgid "" "This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " "leaving *closeit* set to ``0`` and *flags* set to ``NULL``." msgstr "" +#: ../../c-api/veryhigh.rst:37 msgid "" "This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " "leaving the *closeit* argument set to ``0``." msgstr "" +#: ../../c-api/veryhigh.rst:43 msgid "" "This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " "leaving the *flags* argument set to ``NULL``." msgstr "" +#: ../../c-api/veryhigh.rst:49 msgid "" "If *fp* refers to a file associated with an interactive device (console or " "terminal input or Unix pseudo-terminal), return the value of :c:func:" @@ -69,11 +78,13 @@ msgid "" "before ``PyRun_SimpleFileExFlags()`` returns." msgstr "" +#: ../../c-api/veryhigh.rst:61 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleStringFlags` below, " "leaving the :c:struct:`PyCompilerFlags`\\* argument set to ``NULL``." msgstr "" +#: ../../c-api/veryhigh.rst:67 msgid "" "Executes the Python source code from *command* in the :mod:`__main__` module " "according to the *flags* argument. If :mod:`__main__` does not already " @@ -82,22 +93,26 @@ msgid "" "information. For the meaning of *flags*, see below." msgstr "" +#: ../../c-api/veryhigh.rst:73 msgid "" "Note that if an otherwise unhandled :exc:`SystemExit` is raised, this " "function will not return ``-1``, but exit the process, as long as :c:member:" "`PyConfig.inspect` is zero." msgstr "" +#: ../../c-api/veryhigh.rst:80 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " "leaving *closeit* set to ``0`` and *flags* set to ``NULL``." msgstr "" +#: ../../c-api/veryhigh.rst:86 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" +#: ../../c-api/veryhigh.rst:92 msgid "" "Similar to :c:func:`PyRun_SimpleStringFlags`, but the Python source code is " "read from *fp* instead of an in-memory string. *filename* should be the name " @@ -106,24 +121,22 @@ msgid "" "``PyRun_SimpleFileExFlags()`` returns." msgstr "" +#: ../../c-api/veryhigh.rst:99 msgid "" "On Windows, *fp* should be opened as binary mode (e.g. ``fopen(filename, " "\"rb\")``). Otherwise, Python may not handle script file with LF line ending " "correctly." msgstr "" -msgid "" -"This is a simplified interface to :c:func:`PyRun_InteractiveOneFlags` below, " -"leaving *flags* set to ``NULL``." -msgstr "" - +#: ../../c-api/veryhigh.rst:105 msgid "" "Read and execute a single statement from a file associated with an " "interactive device according to the *flags* argument. The user will be " -"prompted using ``sys.ps1`` and ``sys.ps2``. *filename* is decoded from the :" -"term:`filesystem encoding and error handler`." +"prompted using ``sys.ps1`` and ``sys.ps2``. *filename* must be a Python :" +"class:`str` object." msgstr "" +#: ../../c-api/veryhigh.rst:110 msgid "" "Returns ``0`` when the input was executed successfully, ``-1`` if there was " "an exception, or an error code from the :file:`errcode.h` include file " @@ -132,11 +145,26 @@ msgid "" "specifically if needed.)" msgstr "" +#: ../../c-api/veryhigh.rst:119 +msgid "" +"This is a simplified interface to :c:func:`PyRun_InteractiveOneFlags` below, " +"leaving *flags* set to ``NULL``." +msgstr "" + +#: ../../c-api/veryhigh.rst:125 +msgid "" +"Similar to :c:func:`PyRun_InteractiveOneObject`, but *filename* is a :c:expr:" +"`const char*`, which is decoded from the :term:`filesystem encoding and " +"error handler`." +msgstr "" + +#: ../../c-api/veryhigh.rst:132 msgid "" "This is a simplified interface to :c:func:`PyRun_InteractiveLoopFlags` " "below, leaving *flags* set to ``NULL``." msgstr "" +#: ../../c-api/veryhigh.rst:138 msgid "" "Read and execute statements from a file associated with an interactive " "device until EOF is reached. The user will be prompted using ``sys.ps1`` " @@ -144,20 +172,23 @@ msgid "" "and error handler`. Returns ``0`` at EOF or a negative number upon failure." msgstr "" +#: ../../c-api/veryhigh.rst:146 msgid "" "Can be set to point to a function with the prototype ``int func(void)``. " "The function will be called when Python's interpreter prompt is about to " "become idle and wait for user input from the terminal. The return value is " "ignored. Overriding this hook can be used to integrate the interpreter's " -"prompt with other event loops, as done in the :file:`Modules/_tkinter.c` in " -"the Python source code." +"prompt with other event loops, as done in :file:`Modules/_tkinter.c` in the " +"Python source code." msgstr "" +#: ../../c-api/veryhigh.rst:154 ../../c-api/veryhigh.rst:178 msgid "" "This function is only called from the :ref:`main interpreter `." msgstr "" +#: ../../c-api/veryhigh.rst:161 msgid "" "Can be set to point to a function with the prototype ``char *func(FILE " "*stdin, FILE *stdout, char *prompt)``, overriding the default function used " @@ -168,51 +199,59 @@ msgid "" "line-editing and tab-completion features." msgstr "" +#: ../../c-api/veryhigh.rst:170 msgid "" "The result must be a string allocated by :c:func:`PyMem_RawMalloc` or :c:" "func:`PyMem_RawRealloc`, or ``NULL`` if an error occurred." msgstr "" +#: ../../c-api/veryhigh.rst:173 msgid "" "The result must be allocated by :c:func:`PyMem_RawMalloc` or :c:func:" "`PyMem_RawRealloc`, instead of being allocated by :c:func:`PyMem_Malloc` or :" "c:func:`PyMem_Realloc`." msgstr "" +#: ../../c-api/veryhigh.rst:184 msgid "" "This is a simplified interface to :c:func:`PyRun_StringFlags` below, leaving " "*flags* set to ``NULL``." msgstr "" +#: ../../c-api/veryhigh.rst:190 msgid "" "Execute Python source code from *str* in the context specified by the " "objects *globals* and *locals* with the compiler flags specified by " "*flags*. *globals* must be a dictionary; *locals* can be any object that " "implements the mapping protocol. The parameter *start* specifies the start " -"symbol and must one of the following: :c:data:`Py_eval_input`, :c:data:" -"`Py_file_input`, or :c:data:`Py_single_input`." +"symbol and must be one of the :ref:`available start symbols `." msgstr "" +#: ../../c-api/veryhigh.rst:196 msgid "" "Returns the result of executing the code as a Python object, or ``NULL`` if " "an exception was raised." msgstr "" +#: ../../c-api/veryhigh.rst:202 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*closeit* set to ``0`` and *flags* set to ``NULL``." msgstr "" +#: ../../c-api/veryhigh.rst:208 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*flags* set to ``NULL``." msgstr "" +#: ../../c-api/veryhigh.rst:214 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*closeit* set to ``0``." msgstr "" +#: ../../c-api/veryhigh.rst:220 msgid "" "Similar to :c:func:`PyRun_StringFlags`, but the Python source code is read " "from *fp* instead of an in-memory string. *filename* should be the name of " @@ -221,26 +260,30 @@ msgid "" "`PyRun_FileExFlags` returns." msgstr "" +#: ../../c-api/veryhigh.rst:229 msgid "" "This is a simplified interface to :c:func:`Py_CompileStringFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" +#: ../../c-api/veryhigh.rst:235 msgid "" "This is a simplified interface to :c:func:`Py_CompileStringExFlags` below, " "with *optimize* set to ``-1``." msgstr "" +#: ../../c-api/veryhigh.rst:241 msgid "" "Parse and compile the Python source code in *str*, returning the resulting " "code object. The start symbol is given by *start*; this can be used to " -"constrain the code which can be compiled and should be :c:data:" -"`Py_eval_input`, :c:data:`Py_file_input`, or :c:data:`Py_single_input`. The " -"filename specified by *filename* is used to construct the code object and " -"may appear in tracebacks or :exc:`SyntaxError` exception messages. This " -"returns ``NULL`` if the code cannot be parsed or compiled." +"constrain the code which can be compiled and should be :ref:`available start " +"symbols `. The filename specified by *filename* is used to " +"construct the code object and may appear in tracebacks or :exc:`SyntaxError` " +"exception messages. This returns ``NULL`` if the code cannot be parsed or " +"compiled." msgstr "" +#: ../../c-api/veryhigh.rst:249 msgid "" "The integer *optimize* specifies the optimization level of the compiler; a " "value of ``-1`` selects the optimization level of the interpreter as given " @@ -249,17 +292,20 @@ msgid "" "or ``2`` (docstrings are removed too)." msgstr "" +#: ../../c-api/veryhigh.rst:260 msgid "" "Like :c:func:`Py_CompileStringObject`, but *filename* is a byte string " "decoded from the :term:`filesystem encoding and error handler`." msgstr "" +#: ../../c-api/veryhigh.rst:267 msgid "" "This is a simplified interface to :c:func:`PyEval_EvalCodeEx`, with just the " "code object, and global and local variables. The other arguments are set to " "``NULL``." msgstr "" +#: ../../c-api/veryhigh.rst:274 msgid "" "Evaluate a precompiled code object, given a particular environment for its " "evaluation. This environment consists of a dictionary of global variables, " @@ -268,11 +314,13 @@ msgid "" "only_parameter>` arguments and a closure tuple of cells." msgstr "" +#: ../../c-api/veryhigh.rst:283 msgid "" "Evaluate an execution frame. This is a simplified interface to :c:func:" "`PyEval_EvalFrameEx`, for backward compatibility." msgstr "" +#: ../../c-api/veryhigh.rst:289 msgid "" "This is the main, unvarnished function of Python interpretation. The code " "object associated with the execution frame *f* is executed, interpreting " @@ -282,33 +330,19 @@ msgid "" "of generator objects." msgstr "" +#: ../../c-api/veryhigh.rst:296 msgid "" "This function now includes a debug assertion to help ensure that it does not " "silently discard an active exception." msgstr "" +#: ../../c-api/veryhigh.rst:303 msgid "" "This function changes the flags of the current evaluation frame, and returns " "true on success, false on failure." msgstr "" -msgid "" -"The start symbol from the Python grammar for isolated expressions; for use " -"with :c:func:`Py_CompileString`." -msgstr "" - -msgid "" -"The start symbol from the Python grammar for sequences of statements as read " -"from a file or other source; for use with :c:func:`Py_CompileString`. This " -"is the symbol to use when compiling arbitrarily long Python source code." -msgstr "" - -msgid "" -"The start symbol from the Python grammar for a single statement; for use " -"with :c:func:`Py_CompileString`. This is the symbol used for the interactive " -"interpreter loop." -msgstr "" - +#: ../../c-api/veryhigh.rst:309 msgid "" "This is the structure used to hold compiler flags. In cases where code is " "only being compiled, it is passed as ``int flags``, and in cases where code " @@ -316,36 +350,148 @@ msgid "" "case, ``from __future__ import`` can modify *flags*." msgstr "" +#: ../../c-api/veryhigh.rst:314 msgid "" "Whenever ``PyCompilerFlags *flags`` is ``NULL``, :c:member:`~PyCompilerFlags." "cf_flags` is treated as equal to ``0``, and any modification due to ``from " "__future__ import`` is discarded." msgstr "" +#: ../../c-api/veryhigh.rst:320 msgid "Compiler flags." msgstr "" +#: ../../c-api/veryhigh.rst:324 msgid "" "*cf_feature_version* is the minor Python version. It should be initialized " "to ``PY_MINOR_VERSION``." msgstr "" +#: ../../c-api/veryhigh.rst:327 msgid "" "The field is ignored by default, it is used if and only if ``PyCF_ONLY_AST`` " "flag is set in :c:member:`~PyCompilerFlags.cf_flags`." msgstr "" +#: ../../c-api/veryhigh.rst:330 msgid "Added *cf_feature_version* field." msgstr "" +#: ../../c-api/veryhigh.rst:333 msgid "The available compiler flags are accessible as macros:" msgstr "" +#: ../../c-api/veryhigh.rst:342 msgid "" "See :ref:`compiler flags ` in documentation of the :py:" "mod:`!ast` Python module, which exports these constants under the same names." msgstr "" +#: ../../c-api/veryhigh.rst:347 +msgid "Low-level flags" +msgstr "" + +#: ../../c-api/veryhigh.rst:348 +msgid "" +"The following flags and masks serve narrow needs of the standard library and " +"interactive interpreters. Code outside the standard library rarely has a " +"reason to use them. They are considered implementation details and may " +"change at any time." +msgstr "" + +#: ../../c-api/veryhigh.rst:355 +msgid "" +"This flag is a private interface between the compiler and the :mod:`codeop` " +"module. Do not use it; its behavior is unsupported and may change without " +"warning." +msgstr "" + +#: ../../c-api/veryhigh.rst:359 +msgid "" +"With this flag set, when compilation fails because the source text ends " +"where more input is expected, for example in the middle of an indented block " +"or an unterminated string literal, the error raised is the undocumented " +"``_IncompleteInputError``, a subclass of :exc:`SyntaxError`. The :mod:" +"`codeop` module sets this flag, together with :c:macro:" +"`PyCF_DONT_IMPLY_DEDENT`, to tell input that is incomplete apart from input " +"with a real syntax error, so that interactive interpreters know when to " +"prompt for another line instead of reporting an error." +msgstr "" + +#: ../../c-api/veryhigh.rst:373 +msgid "" +"By default, when compiling with the :c:var:`Py_single_input` start symbol, " +"reaching the end of the source text implicitly closes any open indented " +"blocks. With this flag set, open blocks are only closed if the last line of " +"the source ends with a newline; otherwise, compilation fails with a :exc:" +"`SyntaxError`:" +msgstr "" + +#: ../../c-api/veryhigh.rst:379 +msgid "" +"PyCompilerFlags flags = {\n" +" .cf_flags = 0,\n" +" .cf_feature_version = PY_MINOR_VERSION,\n" +"};\n" +"const char *source = \"if a:\\n pass\";\n" +"\n" +"/* The \"if\" block is closed implicitly;\n" +" this returns a code object: */\n" +"Py_CompileStringFlags(source, \"\", Py_single_input, &flags);\n" +"\n" +"/* With the flag, this fails with a SyntaxError,\n" +" because the last line does not end with a newline: */\n" +"flags.cf_flags = PyCF_DONT_IMPLY_DEDENT;\n" +"Py_CompileStringFlags(source, \"\", Py_single_input, &flags);" +msgstr "" + +#: ../../c-api/veryhigh.rst:396 +msgid "" +"The :mod:`codeop` module uses this flag to detect incomplete interactive " +"input. While the user is still typing inside an indented block, the source " +"does not yet end with a newline, so it fails to compile and the user is " +"prompted for another line." +msgstr "" + +#: ../../c-api/veryhigh.rst:403 +msgid "" +"Read the source text as UTF-8, ignoring its :pep:`263` encoding declaration " +"(\"coding cookie\"), if any:" +msgstr "" + +#: ../../c-api/veryhigh.rst:406 +msgid "" +"PyCompilerFlags flags = {\n" +" .cf_flags = 0,\n" +" .cf_feature_version = PY_MINOR_VERSION,\n" +"};\n" +"const char *source = \"# coding: latin-1\\ns = '\\xe9'\\n\";\n" +"\n" +"/* The coding cookie is honored: byte 0xE9 is decoded as\n" +" Latin-1, and this returns a code object that sets s to \"é\": */\n" +"Py_CompileStringFlags(source, \"\", Py_file_input, &flags);\n" +"\n" +"/* With the flag, the cookie is ignored and compilation fails\n" +" with a SyntaxError, because 0xE9 is not valid UTF-8: */\n" +"flags.cf_flags = PyCF_IGNORE_COOKIE;\n" +"Py_CompileStringFlags(source, \"\", Py_file_input, &flags);" +msgstr "" + +#: ../../c-api/veryhigh.rst:423 +msgid "" +"The :func:`compile`, :func:`eval` and :func:`exec` built-in functions set " +"this flag when the source is a :class:`str` object, because they pass the " +"text to the parser encoded as UTF-8." +msgstr "" + +#: ../../c-api/veryhigh.rst:429 +msgid "" +"Mark the source text as known to be UTF-8 encoded. The :func:`compile`, :" +"func:`eval` and :func:`exec` built-in functions set this flag, but it " +"currently has no effect." +msgstr "" + +#: ../../c-api/veryhigh.rst:433 msgid "" "The \"``PyCF``\" flags above can be combined with \"``CO_FUTURE``\" flags " "such as :c:macro:`CO_FUTURE_ANNOTATIONS` to enable features normally " @@ -353,5 +499,119 @@ msgid "" "`c_codeobject_flags` for a complete list." msgstr "" +#: ../../c-api/veryhigh.rst:438 +msgid "The following masks combine several flags:" +msgstr "" + +#: ../../c-api/veryhigh.rst:442 +msgid "" +"Bitmask of all ``CO_FUTURE`` flags (see :ref:`c_codeobject_flags`), which " +"select features normally enabled by :ref:`future statements `. When " +"code compiled with a ``PyCompilerFlags *flags`` argument contains a ``from " +"__future__ import`` statement, the flag for the imported feature is added to " +"*flags*, so that code executed later in the same context inherits it." +msgstr "" + +#: ../../c-api/veryhigh.rst:452 +msgid "" +"Do not use this mask in new code. It is kept only so that old code passing " +"its flags to :func:`compile` keeps working." +msgstr "" + +#: ../../c-api/veryhigh.rst:455 +msgid "" +"Bitmask of flags for obsolete future features that no longer have any effect." +msgstr "" + +#: ../../c-api/veryhigh.rst:460 +msgid "" +"Bitmask of all ``PyCF`` flags that change how the source is compiled, such " +"as :c:macro:`PyCF_ONLY_AST`. The :func:`compile` built-in function uses this " +"mask to validate its *flags* argument." +msgstr "" + +#: ../../c-api/veryhigh.rst:469 +msgid "Available start symbols" +msgstr "" + +#: ../../c-api/veryhigh.rst:476 +msgid "" +"The start symbol from the Python grammar for isolated expressions; for use " +"with :c:func:`Py_CompileString`." +msgstr "" + +#: ../../c-api/veryhigh.rst:484 +msgid "" +"The start symbol from the Python grammar for sequences of statements as read " +"from a file or other source; for use with :c:func:`Py_CompileString`. This " +"is the symbol to use when compiling arbitrarily long Python source code." +msgstr "" + +#: ../../c-api/veryhigh.rst:493 +msgid "" +"The start symbol from the Python grammar for a single statement; for use " +"with :c:func:`Py_CompileString`. This is the symbol used for the interactive " +"interpreter loop." +msgstr "" + +#: ../../c-api/veryhigh.rst:502 +msgid "" +"The start symbol from the Python grammar for a function type; for use with :" +"c:func:`Py_CompileString`. This is used to parse \"signature type comments\" " +"from :pep:`484`." +msgstr "" + +#: ../../c-api/veryhigh.rst:506 +msgid "This requires the :c:macro:`PyCF_ONLY_AST` flag to be set." +msgstr "" + +#: ../../c-api/veryhigh.rst:509 +msgid ":py:class:`ast.FunctionType`" +msgstr "" + +#: ../../c-api/veryhigh.rst:510 +msgid ":pep:`484`" +msgstr "" + +#: ../../c-api/veryhigh.rst:516 +msgid "Stack Effects" +msgstr "" + +#: ../../c-api/veryhigh.rst:519 +msgid ":py:func:`dis.stack_effect`" +msgstr "" + +#: ../../c-api/veryhigh.rst:524 +msgid "Sentinel value representing an invalid stack effect." +msgstr "" + +#: ../../c-api/veryhigh.rst:526 +msgid "This is currently equivalent to ``INT_MAX``." +msgstr "" + +#: ../../c-api/veryhigh.rst:533 +msgid "Compute the stack effect of *opcode* with argument *oparg*." +msgstr "" + +#: ../../c-api/veryhigh.rst:535 ../../c-api/veryhigh.rst:549 +msgid "" +"On success, this function returns the stack effect; on failure, this " +"returns :c:macro:`PY_INVALID_STACK_EFFECT`." +msgstr "" + +#: ../../c-api/veryhigh.rst:543 +msgid "" +"Similar to :c:func:`PyCompile_OpcodeStackEffect`, but don't include the " +"stack effect of jumping if *jump* is zero." +msgstr "" + +#: ../../c-api/veryhigh.rst:546 +msgid "" +"If *jump* is ``0``, this will not include the stack effect of jumping, but " +"if *jump* is ``1`` or ``-1``, this will include it." +msgstr "" + +#: ../../c-api/veryhigh.rst:474 ../../c-api/veryhigh.rst:482 +#: ../../c-api/veryhigh.rst:491 ../../c-api/veryhigh.rst:500 msgid "Py_CompileString (C function)" msgstr "" diff --git a/c-api/veryhigh.po~ b/c-api/veryhigh.po~ new file mode 100644 index 00000000..8e27609a --- /dev/null +++ b/c-api/veryhigh.po~ @@ -0,0 +1,357 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-29 14:15+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "The Very High Level Layer" +msgstr "" + +msgid "" +"The functions in this chapter will let you execute Python source code given " +"in a file or a buffer, but they will not let you interact in a more detailed " +"way with the interpreter." +msgstr "" + +msgid "" +"Several of these functions accept a start symbol from the grammar as a " +"parameter. The available start symbols are :c:data:`Py_eval_input`, :c:data:" +"`Py_file_input`, and :c:data:`Py_single_input`. These are described " +"following the functions which accept them as parameters." +msgstr "" + +msgid "" +"Note also that several of these functions take :c:expr:`FILE*` parameters. " +"One particular issue which needs to be handled carefully is that the :c:type:" +"`FILE` structure for different C libraries can be different and " +"incompatible. Under Windows (at least), it is possible for dynamically " +"linked extensions to actually use different libraries, so care should be " +"taken that :c:expr:`FILE*` parameters are only passed to these functions if " +"it is certain that they were created by the same library that the Python " +"runtime is using." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " +"leaving *closeit* set to ``0`` and *flags* set to ``NULL``." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " +"leaving the *closeit* argument set to ``0``." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, " +"leaving the *flags* argument set to ``NULL``." +msgstr "" + +msgid "" +"If *fp* refers to a file associated with an interactive device (console or " +"terminal input or Unix pseudo-terminal), return the value of :c:func:" +"`PyRun_InteractiveLoop`, otherwise return the result of :c:func:" +"`PyRun_SimpleFile`. *filename* is decoded from the filesystem encoding (:" +"func:`sys.getfilesystemencoding`). If *filename* is ``NULL``, this function " +"uses ``\"???\"`` as the filename. If *closeit* is true, the file is closed " +"before ``PyRun_SimpleFileExFlags()`` returns." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_SimpleStringFlags` below, " +"leaving the :c:struct:`PyCompilerFlags`\\* argument set to ``NULL``." +msgstr "" + +msgid "" +"Executes the Python source code from *command* in the :mod:`__main__` module " +"according to the *flags* argument. If :mod:`__main__` does not already " +"exist, it is created. Returns ``0`` on success or ``-1`` if an exception " +"was raised. If there was an error, there is no way to get the exception " +"information. For the meaning of *flags*, see below." +msgstr "" + +msgid "" +"Note that if an otherwise unhandled :exc:`SystemExit` is raised, this " +"function will not return ``-1``, but exit the process, as long as :c:member:" +"`PyConfig.inspect` is zero." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " +"leaving *closeit* set to ``0`` and *flags* set to ``NULL``." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " +"leaving *flags* set to ``NULL``." +msgstr "" + +msgid "" +"Similar to :c:func:`PyRun_SimpleStringFlags`, but the Python source code is " +"read from *fp* instead of an in-memory string. *filename* should be the name " +"of the file, it is decoded from :term:`filesystem encoding and error " +"handler`. If *closeit* is true, the file is closed before " +"``PyRun_SimpleFileExFlags()`` returns." +msgstr "" + +msgid "" +"On Windows, *fp* should be opened as binary mode (e.g. ``fopen(filename, " +"\"rb\")``). Otherwise, Python may not handle script file with LF line ending " +"correctly." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_InteractiveOneFlags` below, " +"leaving *flags* set to ``NULL``." +msgstr "" + +msgid "" +"Read and execute a single statement from a file associated with an " +"interactive device according to the *flags* argument. The user will be " +"prompted using ``sys.ps1`` and ``sys.ps2``. *filename* is decoded from the :" +"term:`filesystem encoding and error handler`." +msgstr "" + +msgid "" +"Returns ``0`` when the input was executed successfully, ``-1`` if there was " +"an exception, or an error code from the :file:`errcode.h` include file " +"distributed as part of Python if there was a parse error. (Note that :file:" +"`errcode.h` is not included by :file:`Python.h`, so must be included " +"specifically if needed.)" +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_InteractiveLoopFlags` " +"below, leaving *flags* set to ``NULL``." +msgstr "" + +msgid "" +"Read and execute statements from a file associated with an interactive " +"device until EOF is reached. The user will be prompted using ``sys.ps1`` " +"and ``sys.ps2``. *filename* is decoded from the :term:`filesystem encoding " +"and error handler`. Returns ``0`` at EOF or a negative number upon failure." +msgstr "" + +msgid "" +"Can be set to point to a function with the prototype ``int func(void)``. " +"The function will be called when Python's interpreter prompt is about to " +"become idle and wait for user input from the terminal. The return value is " +"ignored. Overriding this hook can be used to integrate the interpreter's " +"prompt with other event loops, as done in the :file:`Modules/_tkinter.c` in " +"the Python source code." +msgstr "" + +msgid "" +"This function is only called from the :ref:`main interpreter `." +msgstr "" + +msgid "" +"Can be set to point to a function with the prototype ``char *func(FILE " +"*stdin, FILE *stdout, char *prompt)``, overriding the default function used " +"to read a single line of input at the interpreter's prompt. The function is " +"expected to output the string *prompt* if it's not ``NULL``, and then read a " +"line of input from the provided standard input file, returning the resulting " +"string. For example, The :mod:`readline` module sets this hook to provide " +"line-editing and tab-completion features." +msgstr "" + +msgid "" +"The result must be a string allocated by :c:func:`PyMem_RawMalloc` or :c:" +"func:`PyMem_RawRealloc`, or ``NULL`` if an error occurred." +msgstr "" + +msgid "" +"The result must be allocated by :c:func:`PyMem_RawMalloc` or :c:func:" +"`PyMem_RawRealloc`, instead of being allocated by :c:func:`PyMem_Malloc` or :" +"c:func:`PyMem_Realloc`." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_StringFlags` below, leaving " +"*flags* set to ``NULL``." +msgstr "" + +msgid "" +"Execute Python source code from *str* in the context specified by the " +"objects *globals* and *locals* with the compiler flags specified by " +"*flags*. *globals* must be a dictionary; *locals* can be any object that " +"implements the mapping protocol. The parameter *start* specifies the start " +"symbol and must one of the following: :c:data:`Py_eval_input`, :c:data:" +"`Py_file_input`, or :c:data:`Py_single_input`." +msgstr "" + +msgid "" +"Returns the result of executing the code as a Python object, or ``NULL`` if " +"an exception was raised." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " +"*closeit* set to ``0`` and *flags* set to ``NULL``." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " +"*flags* set to ``NULL``." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " +"*closeit* set to ``0``." +msgstr "" + +msgid "" +"Similar to :c:func:`PyRun_StringFlags`, but the Python source code is read " +"from *fp* instead of an in-memory string. *filename* should be the name of " +"the file, it is decoded from the :term:`filesystem encoding and error " +"handler`. If *closeit* is true, the file is closed before :c:func:" +"`PyRun_FileExFlags` returns." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`Py_CompileStringFlags` below, " +"leaving *flags* set to ``NULL``." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`Py_CompileStringExFlags` below, " +"with *optimize* set to ``-1``." +msgstr "" + +msgid "" +"Parse and compile the Python source code in *str*, returning the resulting " +"code object. The start symbol is given by *start*; this can be used to " +"constrain the code which can be compiled and should be :c:data:" +"`Py_eval_input`, :c:data:`Py_file_input`, or :c:data:`Py_single_input`. The " +"filename specified by *filename* is used to construct the code object and " +"may appear in tracebacks or :exc:`SyntaxError` exception messages. This " +"returns ``NULL`` if the code cannot be parsed or compiled." +msgstr "" + +msgid "" +"The integer *optimize* specifies the optimization level of the compiler; a " +"value of ``-1`` selects the optimization level of the interpreter as given " +"by :option:`-O` options. Explicit levels are ``0`` (no optimization; " +"``__debug__`` is true), ``1`` (asserts are removed, ``__debug__`` is false) " +"or ``2`` (docstrings are removed too)." +msgstr "" + +msgid "" +"Like :c:func:`Py_CompileStringObject`, but *filename* is a byte string " +"decoded from the :term:`filesystem encoding and error handler`." +msgstr "" + +msgid "" +"This is a simplified interface to :c:func:`PyEval_EvalCodeEx`, with just the " +"code object, and global and local variables. The other arguments are set to " +"``NULL``." +msgstr "" + +msgid "" +"Evaluate a precompiled code object, given a particular environment for its " +"evaluation. This environment consists of a dictionary of global variables, " +"a mapping object of local variables, arrays of arguments, keywords and " +"defaults, a dictionary of default values for :ref:`keyword-only ` arguments and a closure tuple of cells." +msgstr "" + +msgid "" +"Evaluate an execution frame. This is a simplified interface to :c:func:" +"`PyEval_EvalFrameEx`, for backward compatibility." +msgstr "" + +msgid "" +"This is the main, unvarnished function of Python interpretation. The code " +"object associated with the execution frame *f* is executed, interpreting " +"bytecode and executing calls as needed. The additional *throwflag* " +"parameter can mostly be ignored - if true, then it causes an exception to " +"immediately be thrown; this is used for the :meth:`~generator.throw` methods " +"of generator objects." +msgstr "" + +msgid "" +"This function now includes a debug assertion to help ensure that it does not " +"silently discard an active exception." +msgstr "" + +msgid "" +"This function changes the flags of the current evaluation frame, and returns " +"true on success, false on failure." +msgstr "" + +msgid "" +"The start symbol from the Python grammar for isolated expressions; for use " +"with :c:func:`Py_CompileString`." +msgstr "" + +msgid "" +"The start symbol from the Python grammar for sequences of statements as read " +"from a file or other source; for use with :c:func:`Py_CompileString`. This " +"is the symbol to use when compiling arbitrarily long Python source code." +msgstr "" + +msgid "" +"The start symbol from the Python grammar for a single statement; for use " +"with :c:func:`Py_CompileString`. This is the symbol used for the interactive " +"interpreter loop." +msgstr "" + +msgid "" +"This is the structure used to hold compiler flags. In cases where code is " +"only being compiled, it is passed as ``int flags``, and in cases where code " +"is being executed, it is passed as ``PyCompilerFlags *flags``. In this " +"case, ``from __future__ import`` can modify *flags*." +msgstr "" + +msgid "" +"Whenever ``PyCompilerFlags *flags`` is ``NULL``, :c:member:`~PyCompilerFlags." +"cf_flags` is treated as equal to ``0``, and any modification due to ``from " +"__future__ import`` is discarded." +msgstr "" + +msgid "Compiler flags." +msgstr "" + +msgid "" +"*cf_feature_version* is the minor Python version. It should be initialized " +"to ``PY_MINOR_VERSION``." +msgstr "" + +msgid "" +"The field is ignored by default, it is used if and only if ``PyCF_ONLY_AST`` " +"flag is set in :c:member:`~PyCompilerFlags.cf_flags`." +msgstr "" + +msgid "Added *cf_feature_version* field." +msgstr "" + +msgid "The available compiler flags are accessible as macros:" +msgstr "" + +msgid "" +"See :ref:`compiler flags ` in documentation of the :py:" +"mod:`!ast` Python module, which exports these constants under the same names." +msgstr "" + +msgid "" +"The \"``PyCF``\" flags above can be combined with \"``CO_FUTURE``\" flags " +"such as :c:macro:`CO_FUTURE_ANNOTATIONS` to enable features normally " +"selectable using :ref:`future statements `. See :ref:" +"`c_codeobject_flags` for a complete list." +msgstr "" + +msgid "Py_CompileString (C function)" +msgstr "" diff --git a/c-api/weakref.po b/c-api/weakref.po index e1a1d2c7..37a58d86 100644 --- a/c-api/weakref.po +++ b/c-api/weakref.po @@ -8,18 +8,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../../c-api/weakref.rst:6 msgid "Weak Reference Objects" msgstr "" +#: ../../c-api/weakref.rst:8 msgid "" "Python supports *weak references* as first-class objects. There are two " "specific object types which directly implement weak references. The first " @@ -27,20 +29,30 @@ msgid "" "original object as much as it can." msgstr "" +#: ../../c-api/weakref.rst:16 msgid "" "Return non-zero if *ob* is either a reference or proxy object. This " "function always succeeds." msgstr "" +#: ../../c-api/weakref.rst:22 +msgid "" +"Return non-zero if *ob* is a reference object or a subclass of the reference " +"type. This function always succeeds." +msgstr "" + +#: ../../c-api/weakref.rst:28 msgid "" -"Return non-zero if *ob* is a reference object. This function always " -"succeeds." +"Return non-zero if *ob* is a reference object, but not a subclass of the " +"reference type. This function always succeeds." msgstr "" +#: ../../c-api/weakref.rst:34 msgid "" "Return non-zero if *ob* is a proxy object. This function always succeeds." msgstr "" +#: ../../c-api/weakref.rst:39 msgid "" "Return a weak reference object for the object *ob*. This will always return " "a new reference, but is not guaranteed to create a new object; an existing " @@ -48,10 +60,17 @@ msgid "" "a callable object that receives notification when *ob* is garbage collected; " "it should accept a single parameter, which will be the weak reference object " "itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a " -"weakly referenceable object, or if *callback* is not callable, ``None``, or " -"``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." +"weakly referenceable object, this will raise :exc:`TypeError` and return " +"``NULL``." msgstr "" +#: ../../c-api/weakref.rst:49 ../../c-api/weakref.rst:65 +msgid "" +":c:func:`PyType_SUPPORTS_WEAKREFS` for checking if *ob* is weakly " +"referenceable." +msgstr "" + +#: ../../c-api/weakref.rst:55 msgid "" "Return a weak reference proxy object for the object *ob*. This will always " "return a new reference, but is not guaranteed to create a new object; an " @@ -59,64 +78,55 @@ msgid "" "can be a callable object that receives notification when *ob* is garbage " "collected; it should accept a single parameter, which will be the weak " "reference object itself. *callback* may also be ``None`` or ``NULL``. If " -"*ob* is not a weakly referenceable object, or if *callback* is not callable, " -"``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." +"*ob* weakly referenceable object, this will raise :exc:`TypeError` and " +"return ``NULL``." msgstr "" +#: ../../c-api/weakref.rst:71 msgid "" "Get a :term:`strong reference` to the referenced object from a weak " "reference, *ref*, into *\\*pobj*." msgstr "" +#: ../../c-api/weakref.rst:74 msgid "" "On success, set *\\*pobj* to a new :term:`strong reference` to the " "referenced object and return 1." msgstr "" +#: ../../c-api/weakref.rst:76 msgid "If the reference is dead, set *\\*pobj* to ``NULL`` and return 0." msgstr "" +#: ../../c-api/weakref.rst:77 msgid "On error, raise an exception and return -1." msgstr "" -msgid "" -"Return a :term:`borrowed reference` to the referenced object from a weak " -"reference, *ref*. If the referent is no longer live, returns ``Py_None``." -msgstr "" - -msgid "" -"This function returns a :term:`borrowed reference` to the referenced object. " -"This means that you should always call :c:func:`Py_INCREF` on the object " -"except when it cannot be destroyed before the last usage of the borrowed " -"reference." -msgstr "" - -msgid "Use :c:func:`PyWeakref_GetRef` instead." -msgstr "" - -msgid "Similar to :c:func:`PyWeakref_GetObject`, but does no error checking." -msgstr "" - +#: ../../c-api/weakref.rst:84 msgid "" "Test if the weak reference *ref* is dead. Returns 1 if the reference is " "dead, 0 if it is alive, and -1 with an error set if *ref* is not a weak " "reference object." msgstr "" +#: ../../c-api/weakref.rst:93 msgid "" "This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler " "to clear weak references." msgstr "" +#: ../../c-api/weakref.rst:96 msgid "" "This iterates through the weak references for *object* and calls callbacks " "for those references which have one. It returns when all callbacks have been " "attempted." msgstr "" +#: ../../c-api/weakref.rst:103 msgid "Clears the weakrefs for *object* without calling the callbacks." msgstr "" +#: ../../c-api/weakref.rst:105 msgid "" "This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler " "for types with finalizers (i.e., :meth:`~object.__del__`). The handler for " @@ -125,6 +135,7 @@ msgid "" "clear any weakrefs that may have been created by the finalizer." msgstr "" +#: ../../c-api/weakref.rst:111 msgid "" "In most circumstances, it's more appropriate to use :c:func:" "`PyObject_ClearWeakRefs` to clear weakrefs instead of this function." diff --git a/c-api/weakref.po~ b/c-api/weakref.po~ new file mode 100644 index 00000000..e1a1d2c7 --- /dev/null +++ b/c-api/weakref.po~ @@ -0,0 +1,131 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-25 14:12+0000\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Weak Reference Objects" +msgstr "" + +msgid "" +"Python supports *weak references* as first-class objects. There are two " +"specific object types which directly implement weak references. The first " +"is a simple reference object, and the second acts as a proxy for the " +"original object as much as it can." +msgstr "" + +msgid "" +"Return non-zero if *ob* is either a reference or proxy object. This " +"function always succeeds." +msgstr "" + +msgid "" +"Return non-zero if *ob* is a reference object. This function always " +"succeeds." +msgstr "" + +msgid "" +"Return non-zero if *ob* is a proxy object. This function always succeeds." +msgstr "" + +msgid "" +"Return a weak reference object for the object *ob*. This will always return " +"a new reference, but is not guaranteed to create a new object; an existing " +"reference object may be returned. The second parameter, *callback*, can be " +"a callable object that receives notification when *ob* is garbage collected; " +"it should accept a single parameter, which will be the weak reference object " +"itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a " +"weakly referenceable object, or if *callback* is not callable, ``None``, or " +"``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." +msgstr "" + +msgid "" +"Return a weak reference proxy object for the object *ob*. This will always " +"return a new reference, but is not guaranteed to create a new object; an " +"existing proxy object may be returned. The second parameter, *callback*, " +"can be a callable object that receives notification when *ob* is garbage " +"collected; it should accept a single parameter, which will be the weak " +"reference object itself. *callback* may also be ``None`` or ``NULL``. If " +"*ob* is not a weakly referenceable object, or if *callback* is not callable, " +"``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." +msgstr "" + +msgid "" +"Get a :term:`strong reference` to the referenced object from a weak " +"reference, *ref*, into *\\*pobj*." +msgstr "" + +msgid "" +"On success, set *\\*pobj* to a new :term:`strong reference` to the " +"referenced object and return 1." +msgstr "" + +msgid "If the reference is dead, set *\\*pobj* to ``NULL`` and return 0." +msgstr "" + +msgid "On error, raise an exception and return -1." +msgstr "" + +msgid "" +"Return a :term:`borrowed reference` to the referenced object from a weak " +"reference, *ref*. If the referent is no longer live, returns ``Py_None``." +msgstr "" + +msgid "" +"This function returns a :term:`borrowed reference` to the referenced object. " +"This means that you should always call :c:func:`Py_INCREF` on the object " +"except when it cannot be destroyed before the last usage of the borrowed " +"reference." +msgstr "" + +msgid "Use :c:func:`PyWeakref_GetRef` instead." +msgstr "" + +msgid "Similar to :c:func:`PyWeakref_GetObject`, but does no error checking." +msgstr "" + +msgid "" +"Test if the weak reference *ref* is dead. Returns 1 if the reference is " +"dead, 0 if it is alive, and -1 with an error set if *ref* is not a weak " +"reference object." +msgstr "" + +msgid "" +"This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler " +"to clear weak references." +msgstr "" + +msgid "" +"This iterates through the weak references for *object* and calls callbacks " +"for those references which have one. It returns when all callbacks have been " +"attempted." +msgstr "" + +msgid "Clears the weakrefs for *object* without calling the callbacks." +msgstr "" + +msgid "" +"This function is called by the :c:member:`~PyTypeObject.tp_dealloc` handler " +"for types with finalizers (i.e., :meth:`~object.__del__`). The handler for " +"those objects first calls :c:func:`PyObject_ClearWeakRefs` to clear weakrefs " +"and call their callbacks, then the finalizer, and finally this function to " +"clear any weakrefs that may have been created by the finalizer." +msgstr "" + +msgid "" +"In most circumstances, it's more appropriate to use :c:func:" +"`PyObject_ClearWeakRefs` to clear weakrefs instead of this function." +msgstr "" diff --git a/cpython-src b/cpython-src new file mode 160000 index 00000000..3dfa2557 --- /dev/null +++ b/cpython-src @@ -0,0 +1 @@ +Subproject commit 3dfa2557358f55c3836ee2ec5415018d06d3f3c1 diff --git a/extending/index.po b/extending/index.po index 246eb2b6..ac1c9c60 100644 --- a/extending/index.po +++ b/extending/index.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -38,18 +38,19 @@ msgstr "" msgid "" "This document assumes basic knowledge about C and Python. For an informal " "introduction to Python, see :ref:`tutorial-index`. :ref:`reference-index` " -"gives a more formal definition of the language. :ref:`library-index` " -"documents the existing object types, functions and modules (both built-in " -"and written in Python) that give the language its wide application range." +"gives a more formal definition of the language. :ref:`builtins-index` " +"documents the built-in functions and object types, and :ref:`library-index` " +"documents the modules (both built-in and written in Python) that give the " +"language its wide application range." msgstr "" -#: ../../extending/index.rst:23 +#: ../../extending/index.rst:24 msgid "" "For a detailed description of the whole Python/C API, see the separate :ref:" "`c-api-index`." msgstr "" -#: ../../extending/index.rst:26 +#: ../../extending/index.rst:27 msgid "" "To support extensions, Python's C API (Application Programmers Interface) " "defines a set of functions, macros and variables that provide access to most " @@ -57,7 +58,7 @@ msgid "" "C source file by including the header ``\"Python.h\"``." msgstr "" -#: ../../extending/index.rst:33 +#: ../../extending/index.rst:34 msgid "" "The C extension interface is specific to CPython, and extension modules do " "not work on other Python implementations. In many cases, it is possible to " @@ -70,11 +71,11 @@ msgid "" "writing and compiling a C extension module." msgstr "" -#: ../../extending/index.rst:58 +#: ../../extending/index.rst:59 msgid "Recommended third party tools" msgstr "" -#: ../../extending/index.rst:60 +#: ../../extending/index.rst:61 msgid "" "This document only covers the basic tools for creating extensions provided " "as part of this version of CPython. Some :ref:`third party tools , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../extending/index.rst:5 +msgid "Extending and Embedding the Python Interpreter" +msgstr "" + +#: ../../extending/index.rst:7 +msgid "" +"This document describes how to write modules in C or C++ to extend the " +"Python interpreter with new modules. Those modules can do what Python code " +"does -- define functions, object types and methods -- but also interact with " +"native libraries or achieve better performance by avoiding the overhead of " +"an interpreter. The document also describes how to embed the Python " +"interpreter in another application, for use as an extension language. " +"Finally, it shows how to compile and link extension modules so that they can " +"be loaded dynamically (at run time) into the interpreter, if the underlying " +"operating system supports this feature." +msgstr "" + +#: ../../extending/index.rst:17 +msgid "" +"This document assumes basic knowledge about C and Python. For an informal " +"introduction to Python, see :ref:`tutorial-index`. :ref:`reference-index` " +"gives a more formal definition of the language. :ref:`library-index` " +"documents the existing object types, functions and modules (both built-in " +"and written in Python) that give the language its wide application range." +msgstr "" + +#: ../../extending/index.rst:23 +msgid "" +"For a detailed description of the whole Python/C API, see the separate :ref:" +"`c-api-index`." +msgstr "" + +#: ../../extending/index.rst:26 +msgid "" +"To support extensions, Python's C API (Application Programmers Interface) " +"defines a set of functions, macros and variables that provide access to most " +"aspects of the Python run-time system. The Python API is incorporated in a " +"C source file by including the header ``\"Python.h\"``." +msgstr "" + +#: ../../extending/index.rst:33 +msgid "" +"The C extension interface is specific to CPython, and extension modules do " +"not work on other Python implementations. In many cases, it is possible to " +"avoid writing C extensions and preserve portability to other " +"implementations. For example, if your use case is calling C library " +"functions or system calls, you should consider using the :mod:`ctypes` " +"module or the `cffi `_ library rather than " +"writing custom C code. These modules let you write Python code to interface " +"with C code and are more portable between implementations of Python than " +"writing and compiling a C extension module." +msgstr "" + +#: ../../extending/index.rst:58 +msgid "Recommended third party tools" +msgstr "" + +#: ../../extending/index.rst:60 +msgid "" +"This document only covers the basic tools for creating extensions provided " +"as part of this version of CPython. Some :ref:`third party tools ` offer both simpler and more sophisticated approaches to creating C " +"and C++ extensions for Python." +msgstr "" + +#: ../../extending/index.rst:65 +msgid "" +"While this document is aimed at extension authors, it should also be helpful " +"to the authors of such tools. For example, the tutorial module can serve as " +"a simple test case for a build tool or sample expected output of a code " +"generator." +msgstr "" + +#: ../../extending/index.rst:72 +msgid "C API Tutorial" +msgstr "" + +#: ../../extending/index.rst:74 +msgid "" +"This tutorial describes how to write a simple module in C or C++, using the " +"Python C API -- that is, using the basic tools provided as part of this " +"version of CPython." +msgstr "" + +#: ../../extending/index.rst:79 +msgid ":ref:`first-extension-module`" +msgstr "" + +#: ../../extending/index.rst:83 +msgid "Guides for intermediate topics" +msgstr "" + +#: ../../extending/index.rst:85 +msgid "" +"This section of the guide covers creating C and C++ extensions without " +"assistance from third party tools. It is intended primarily for creators of " +"those tools, rather than being a recommended way to create your own C " +"extensions." +msgstr "" + +#: ../../extending/index.rst:90 +msgid ":ref:`extending-intro`" +msgstr "" + +#: ../../extending/index.rst:91 +msgid ":ref:`defining-new-types`" +msgstr "" + +#: ../../extending/index.rst:92 +msgid ":ref:`new-types-topics`" +msgstr "" + +#: ../../extending/index.rst:93 +msgid ":ref:`building`" +msgstr "" + +#: ../../extending/index.rst:94 +msgid ":ref:`building-on-windows`" +msgstr "" + +#: ../../extending/index.rst:97 +msgid "Embedding the CPython runtime in a larger application" +msgstr "" + +#: ../../extending/index.rst:99 +msgid "" +"Sometimes, rather than creating an extension that runs inside the Python " +"interpreter as the main application, it is desirable to instead embed the " +"CPython runtime inside a larger application. This section covers some of the " +"details involved in doing that successfully." +msgstr "" + +#: ../../extending/index.rst:104 +msgid ":ref:`embedding`" +msgstr "" diff --git a/faq/design.po b/faq/design.po index 1920a4da..1055336b 100644 --- a/faq/design.po +++ b/faq/design.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -662,11 +662,11 @@ msgid "" "however, that a tuple is only hashable if all of its elements are hashable." msgstr "" -#: ../../faq/design.rst:434 +#: ../../faq/design.rst:436 msgid "How are lists implemented in CPython?" msgstr "" -#: ../../faq/design.rst:436 +#: ../../faq/design.rst:438 msgid "" "CPython's lists are really variable-length arrays, not Lisp-style linked " "lists. The implementation uses a contiguous array of references to other " @@ -674,13 +674,13 @@ msgid "" "head structure." msgstr "" -#: ../../faq/design.rst:440 +#: ../../faq/design.rst:442 msgid "" "This makes indexing a list ``a[i]`` an operation whose cost is independent " "of the size of the list or the value of the index." msgstr "" -#: ../../faq/design.rst:443 +#: ../../faq/design.rst:445 msgid "" "When items are appended or inserted, the array of references is resized. " "Some cleverness is applied to improve the performance of appending items " @@ -689,10 +689,15 @@ msgid "" msgstr "" #: ../../faq/design.rst:450 +msgid "" +"See :ref:`time-complexity` for the costs of the various list operations." +msgstr "" + +#: ../../faq/design.rst:456 msgid "How are dictionaries implemented in CPython?" msgstr "" -#: ../../faq/design.rst:452 +#: ../../faq/design.rst:458 msgid "" "CPython's dictionaries are implemented as resizable hash tables. Compared " "to B-trees, this gives better performance for lookup (the most common " @@ -700,7 +705,7 @@ msgid "" "simpler." msgstr "" -#: ../../faq/design.rst:456 +#: ../../faq/design.rst:462 msgid "" "Dictionaries work by computing a hash code for each key stored in the " "dictionary using the :func:`hash` built-in function. The hash code varies " @@ -713,11 +718,17 @@ msgid "" "O notation -- to retrieve a key." msgstr "" -#: ../../faq/design.rst:467 +#: ../../faq/design.rst:471 +msgid "" +"See :ref:`time-complexity` for the costs of the various dictionary " +"operations." +msgstr "" + +#: ../../faq/design.rst:475 msgid "Why must dictionary keys be immutable?" msgstr "" -#: ../../faq/design.rst:469 +#: ../../faq/design.rst:477 msgid "" "The hash table implementation of dictionaries uses a hash value calculated " "from the key value to find the key. If the key were a mutable object, its " @@ -730,7 +741,7 @@ msgid "" "would be different." msgstr "" -#: ../../faq/design.rst:478 +#: ../../faq/design.rst:486 msgid "" "If you want a dictionary indexed with a list, simply convert the list to a " "tuple first; the function ``tuple(L)`` creates a tuple with the same entries " @@ -738,23 +749,23 @@ msgid "" "dictionary keys." msgstr "" -#: ../../faq/design.rst:482 +#: ../../faq/design.rst:490 msgid "Some unacceptable solutions that have been proposed:" msgstr "" -#: ../../faq/design.rst:484 +#: ../../faq/design.rst:492 msgid "" "Hash lists by their address (object ID). This doesn't work because if you " "construct a new list with the same value it won't be found; e.g.::" msgstr "" -#: ../../faq/design.rst:487 +#: ../../faq/design.rst:495 msgid "" "mydict = {[1, 2]: '12'}\n" "print(mydict[[1, 2]])" msgstr "" -#: ../../faq/design.rst:490 +#: ../../faq/design.rst:498 msgid "" "would raise a :exc:`KeyError` exception because the id of the ``[1, 2]`` " "used in the second line differs from that in the first line. In other " @@ -762,14 +773,14 @@ msgid "" "`is`." msgstr "" -#: ../../faq/design.rst:494 +#: ../../faq/design.rst:502 msgid "" "Make a copy when using a list as a key. This doesn't work because the list, " "being a mutable object, could contain a reference to itself, and then the " "copying code would run into an infinite loop." msgstr "" -#: ../../faq/design.rst:498 +#: ../../faq/design.rst:506 msgid "" "Allow lists as keys but tell the user not to modify them. This would allow " "a class of hard-to-track bugs in programs when you forgot or modified a list " @@ -777,7 +788,7 @@ msgid "" "every value in ``d.keys()`` is usable as a key of the dictionary." msgstr "" -#: ../../faq/design.rst:503 +#: ../../faq/design.rst:511 msgid "" "Mark lists as read-only once they are used as a dictionary key. The problem " "is that it's not just the top-level object that could change its value; you " @@ -787,7 +798,7 @@ msgid "" "loop." msgstr "" -#: ../../faq/design.rst:509 +#: ../../faq/design.rst:517 msgid "" "There is a trick to get around this if you need to, but use it at your own " "risk: You can wrap a mutable structure inside a class instance which has " @@ -797,7 +808,7 @@ msgid "" "the object is in the dictionary (or other structure). ::" msgstr "" -#: ../../faq/design.rst:517 +#: ../../faq/design.rst:525 msgid "" "class ListWrapper:\n" " def __init__(self, the_list):\n" @@ -817,14 +828,14 @@ msgid "" " return result" msgstr "" -#: ../../faq/design.rst:534 +#: ../../faq/design.rst:542 msgid "" "Note that the hash computation is complicated by the possibility that some " "members of the list may be unhashable and also by the possibility of " "arithmetic overflow." msgstr "" -#: ../../faq/design.rst:538 +#: ../../faq/design.rst:546 msgid "" "Furthermore it must always be the case that if ``o1 == o2`` (ie ``o1." "__eq__(o2) is True``) then ``hash(o1) == hash(o2)`` (ie, ``o1.__hash__() == " @@ -833,7 +844,7 @@ msgid "" "based structures will misbehave." msgstr "" -#: ../../faq/design.rst:543 +#: ../../faq/design.rst:551 msgid "" "In the case of :class:`!ListWrapper`, whenever the wrapper object is in a " "dictionary the wrapped list must not change to avoid anomalies. Don't do " @@ -841,11 +852,11 @@ msgid "" "consequences of not meeting them correctly. Consider yourself warned." msgstr "" -#: ../../faq/design.rst:550 +#: ../../faq/design.rst:558 msgid "Why doesn't list.sort() return the sorted list?" msgstr "" -#: ../../faq/design.rst:552 +#: ../../faq/design.rst:560 msgid "" "In situations where performance matters, making a copy of the list just to " "sort it would be wasteful. Therefore, :meth:`list.sort` sorts the list in " @@ -855,7 +866,7 @@ msgid "" "around." msgstr "" -#: ../../faq/design.rst:558 +#: ../../faq/design.rst:566 msgid "" "If you want to return a new list, use the built-in :func:`sorted` function " "instead. This function creates a new list from a provided iterable, sorts " @@ -863,17 +874,17 @@ msgid "" "dictionary in sorted order::" msgstr "" -#: ../../faq/design.rst:563 +#: ../../faq/design.rst:571 msgid "" "for key in sorted(mydict):\n" " ... # do whatever with mydict[key]..." msgstr "" -#: ../../faq/design.rst:568 +#: ../../faq/design.rst:576 msgid "How do you specify and enforce an interface spec in Python?" msgstr "" -#: ../../faq/design.rst:570 +#: ../../faq/design.rst:578 msgid "" "An interface specification for a module as provided by languages such as C++ " "and Java describes the prototypes for the methods and functions of the " @@ -881,7 +892,7 @@ msgid "" "helps in the construction of large programs." msgstr "" -#: ../../faq/design.rst:575 +#: ../../faq/design.rst:583 msgid "" "Python 2.6 adds an :mod:`abc` module that lets you define Abstract Base " "Classes (ABCs). You can then use :func:`isinstance` and :func:`issubclass` " @@ -891,13 +902,13 @@ msgid "" "`~collections.abc.MutableMapping`." msgstr "" -#: ../../faq/design.rst:582 +#: ../../faq/design.rst:590 msgid "" "For Python, many of the advantages of interface specifications can be " "obtained by an appropriate test discipline for components." msgstr "" -#: ../../faq/design.rst:585 +#: ../../faq/design.rst:593 msgid "" "A good test suite for a module can both provide a regression test and serve " "as a module interface specification and a set of examples. Many Python " @@ -909,7 +920,7 @@ msgid "" "in a module." msgstr "" -#: ../../faq/design.rst:593 +#: ../../faq/design.rst:601 msgid "" "An appropriate testing discipline can help build large complex applications " "in Python as well as having interface specifications would. In fact, it can " @@ -921,7 +932,7 @@ msgid "" "test suite." msgstr "" -#: ../../faq/design.rst:601 +#: ../../faq/design.rst:609 msgid "" "Writing test suites is very helpful, and you might want to design your code " "to make it easily tested. One increasingly popular technique, test-driven " @@ -930,11 +941,11 @@ msgid "" "not write test cases at all." msgstr "" -#: ../../faq/design.rst:609 +#: ../../faq/design.rst:617 msgid "Why is there no goto?" msgstr "" -#: ../../faq/design.rst:611 +#: ../../faq/design.rst:619 msgid "" "In the 1970s people realized that unrestricted goto could lead to messy " "\"spaghetti\" code that was hard to understand and revise. In a high-level " @@ -945,7 +956,7 @@ msgid "" "`continue` and :keyword:`break`)." msgstr "" -#: ../../faq/design.rst:618 +#: ../../faq/design.rst:626 msgid "" "One can also use exceptions to provide a \"structured goto\" that works even " "across function calls. Many feel that exceptions can conveniently emulate " @@ -953,7 +964,7 @@ msgid "" "other languages. For example::" msgstr "" -#: ../../faq/design.rst:624 +#: ../../faq/design.rst:632 msgid "" "class label(Exception): pass # declare a label\n" "\n" @@ -966,24 +977,24 @@ msgid "" "..." msgstr "" -#: ../../faq/design.rst:634 +#: ../../faq/design.rst:642 msgid "" "This doesn't allow you to jump into the middle of a loop, but that's usually " "considered an abuse of ``goto`` anyway. Use sparingly." msgstr "" -#: ../../faq/design.rst:639 +#: ../../faq/design.rst:647 msgid "Why can't raw strings (r-strings) end with a backslash?" msgstr "" -#: ../../faq/design.rst:641 +#: ../../faq/design.rst:649 msgid "" "More precisely, they can't end with an odd number of backslashes: the " "unpaired backslash at the end escapes the closing quote character, leaving " "an unterminated string." msgstr "" -#: ../../faq/design.rst:645 +#: ../../faq/design.rst:653 msgid "" "Raw strings were designed to ease creating input for processors (chiefly " "regular expression engines) that want to do their own backslash escape " @@ -993,51 +1004,51 @@ msgid "" "rules work well when r-strings are used for their intended purpose." msgstr "" -#: ../../faq/design.rst:652 +#: ../../faq/design.rst:660 msgid "" "If you're trying to build Windows pathnames, note that all Windows system " "calls accept forward slashes too::" msgstr "" -#: ../../faq/design.rst:655 +#: ../../faq/design.rst:663 msgid "f = open(\"/mydir/file.txt\") # works fine!" msgstr "" -#: ../../faq/design.rst:657 +#: ../../faq/design.rst:665 msgid "" "If you're trying to build a pathname for a DOS command, try e.g. one of ::" msgstr "" -#: ../../faq/design.rst:659 +#: ../../faq/design.rst:667 msgid "" "dir = r\"\\this\\is\\my\\dos\\dir\" \"\\\\\"\n" "dir = r\"\\this\\is\\my\\dos\\dir\\ \"[:-1]\n" "dir = \"\\\\this\\\\is\\\\my\\\\dos\\\\dir\\\\\"" msgstr "" -#: ../../faq/design.rst:665 +#: ../../faq/design.rst:673 msgid "Why doesn't Python have a \"with\" statement for attribute assignments?" msgstr "" -#: ../../faq/design.rst:667 +#: ../../faq/design.rst:675 msgid "" "Python has a :keyword:`with` statement that wraps the execution of a block, " "calling code on the entrance and exit from the block. Some languages have a " "construct that looks like this::" msgstr "" -#: ../../faq/design.rst:671 +#: ../../faq/design.rst:679 msgid "" "with obj:\n" " a = 1 # equivalent to obj.a = 1\n" " total = total + 1 # obj.total = obj.total + 1" msgstr "" -#: ../../faq/design.rst:675 +#: ../../faq/design.rst:683 msgid "In Python, such a construct would be ambiguous." msgstr "" -#: ../../faq/design.rst:677 +#: ../../faq/design.rst:685 msgid "" "Other languages, such as Object Pascal, Delphi, and C++, use static types, " "so it's possible to know, in an unambiguous way, what member is being " @@ -1045,7 +1056,7 @@ msgid "" "*always* knows the scope of every variable at compile time." msgstr "" -#: ../../faq/design.rst:682 +#: ../../faq/design.rst:690 msgid "" "Python uses dynamic types. It is impossible to know in advance which " "attribute will be referenced at runtime. Member attributes may be added or " @@ -1054,18 +1065,18 @@ msgid "" "one, or a member attribute?" msgstr "" -#: ../../faq/design.rst:688 +#: ../../faq/design.rst:696 msgid "For instance, take the following incomplete snippet::" msgstr "" -#: ../../faq/design.rst:690 +#: ../../faq/design.rst:698 msgid "" "def foo(a):\n" " with a:\n" " print(x)" msgstr "" -#: ../../faq/design.rst:694 +#: ../../faq/design.rst:702 msgid "" "The snippet assumes that ``a`` must have a member attribute called ``x``. " "However, there is nothing in Python that tells the interpreter this. What " @@ -1074,25 +1085,25 @@ msgid "" "you see, the dynamic nature of Python makes such choices much harder." msgstr "" -#: ../../faq/design.rst:700 +#: ../../faq/design.rst:708 msgid "" "The primary benefit of :keyword:`with` and similar language features " "(reduction of code volume) can, however, easily be achieved in Python by " "assignment. Instead of::" msgstr "" -#: ../../faq/design.rst:703 +#: ../../faq/design.rst:711 msgid "" "function(args).mydict[index][index].a = 21\n" "function(args).mydict[index][index].b = 42\n" "function(args).mydict[index][index].c = 63" msgstr "" -#: ../../faq/design.rst:707 +#: ../../faq/design.rst:715 msgid "write this::" msgstr "" -#: ../../faq/design.rst:709 +#: ../../faq/design.rst:717 msgid "" "ref = function(args).mydict[index][index]\n" "ref.a = 21\n" @@ -1100,25 +1111,25 @@ msgid "" "ref.c = 63" msgstr "" -#: ../../faq/design.rst:714 +#: ../../faq/design.rst:722 msgid "" "This also has the side-effect of increasing execution speed because name " "bindings are resolved at run-time in Python, and the second version only " "needs to perform the resolution once." msgstr "" -#: ../../faq/design.rst:718 +#: ../../faq/design.rst:726 msgid "" "Similar proposals that would introduce syntax to further reduce code volume, " "such as using a 'leading dot', have been rejected in favour of explicitness " "(see https://mail.python.org/pipermail/python-ideas/2016-May/040070.html)." msgstr "" -#: ../../faq/design.rst:724 +#: ../../faq/design.rst:732 msgid "Why don't generators support the with statement?" msgstr "" -#: ../../faq/design.rst:726 +#: ../../faq/design.rst:734 msgid "" "For technical reasons, a generator used directly as a context manager would " "not work correctly. When, as is most common, a generator is used as an " @@ -1127,40 +1138,40 @@ msgid "" "`with` statement." msgstr "" -#: ../../faq/design.rst:734 +#: ../../faq/design.rst:742 msgid "Why are colons required for the if/while/def/class statements?" msgstr "" -#: ../../faq/design.rst:736 +#: ../../faq/design.rst:744 msgid "" "The colon is required primarily to enhance readability (one of the results " "of the experimental ABC language). Consider this::" msgstr "" -#: ../../faq/design.rst:739 +#: ../../faq/design.rst:747 msgid "" "if a == b\n" " print(a)" msgstr "" -#: ../../faq/design.rst:742 +#: ../../faq/design.rst:750 msgid "versus ::" msgstr "" -#: ../../faq/design.rst:744 +#: ../../faq/design.rst:752 msgid "" "if a == b:\n" " print(a)" msgstr "" -#: ../../faq/design.rst:747 +#: ../../faq/design.rst:755 msgid "" "Notice how the second one is slightly easier to read. Notice further how a " "colon sets off the example in this FAQ answer; it's a standard usage in " "English." msgstr "" -#: ../../faq/design.rst:750 +#: ../../faq/design.rst:758 msgid "" "Another minor reason is that the colon makes it easier for editors with " "syntax highlighting; they can look for colons to decide when indentation " @@ -1168,17 +1179,17 @@ msgid "" "the program text." msgstr "" -#: ../../faq/design.rst:756 +#: ../../faq/design.rst:764 msgid "Why does Python allow commas at the end of lists and tuples?" msgstr "" -#: ../../faq/design.rst:758 +#: ../../faq/design.rst:766 msgid "" "Python lets you add a trailing comma at the end of lists, tuples, and " "dictionaries::" msgstr "" -#: ../../faq/design.rst:761 +#: ../../faq/design.rst:769 msgid "" "[1, 2, 3,]\n" "('a', 'b', 'c',)\n" @@ -1188,11 +1199,11 @@ msgid "" "}" msgstr "" -#: ../../faq/design.rst:769 +#: ../../faq/design.rst:777 msgid "There are several reasons to allow this." msgstr "Es gint mehrere Gründe dies zu erlauben." -#: ../../faq/design.rst:771 +#: ../../faq/design.rst:779 msgid "" "When you have a literal value for a list, tuple, or dictionary spread across " "multiple lines, it's easier to add more elements because you don't have to " @@ -1200,13 +1211,13 @@ msgid "" "reordered without creating a syntax error." msgstr "" -#: ../../faq/design.rst:776 +#: ../../faq/design.rst:784 msgid "" "Accidentally omitting the comma can lead to errors that are hard to " "diagnose. For example::" msgstr "" -#: ../../faq/design.rst:779 +#: ../../faq/design.rst:787 msgid "" "x = [\n" " \"fee\",\n" @@ -1216,14 +1227,14 @@ msgid "" "]" msgstr "" -#: ../../faq/design.rst:786 +#: ../../faq/design.rst:794 msgid "" "This list looks like it has four elements, but it actually contains three: " "\"fee\", \"fiefoo\" and \"fum\". Always adding the comma avoids this source " "of error." msgstr "" -#: ../../faq/design.rst:789 +#: ../../faq/design.rst:797 msgid "" "Allowing the trailing comma may also make programmatic code generation " "easier." diff --git a/faq/design.po~ b/faq/design.po~ new file mode 100644 index 00000000..1920a4da --- /dev/null +++ b/faq/design.po~ @@ -0,0 +1,1230 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../faq/design.rst:3 +msgid "Design and History FAQ" +msgstr "Design und Geschichte FAQ" + +#: ../../faq/design.rst:6 +msgid "Contents" +msgstr "Inhalt" + +#: ../../faq/design.rst:11 +msgid "Why does Python use indentation for grouping of statements?" +msgstr "" + +#: ../../faq/design.rst:13 +msgid "" +"Guido van Rossum believes that using indentation for grouping is extremely " +"elegant and contributes a lot to the clarity of the average Python program. " +"Most people learn to love this feature after a while." +msgstr "" + +#: ../../faq/design.rst:17 +msgid "" +"Since there are no begin/end brackets there cannot be a disagreement between " +"grouping perceived by the parser and the human reader. Occasionally C " +"programmers will encounter a fragment of code like this::" +msgstr "" + +#: ../../faq/design.rst:21 +msgid "" +"if (x <= y)\n" +" x++;\n" +" y--;\n" +"z++;" +msgstr "" + +#: ../../faq/design.rst:26 +msgid "" +"Only the ``x++`` statement is executed if the condition is true, but the " +"indentation leads many to believe otherwise. Even experienced C programmers " +"will sometimes stare at it a long time wondering as to why ``y`` is being " +"decremented even for ``x > y``." +msgstr "" + +#: ../../faq/design.rst:31 +msgid "" +"Because there are no begin/end brackets, Python is much less prone to coding-" +"style conflicts. In C there are many different ways to place the braces. " +"After becoming used to reading and writing code using a particular style, it " +"is normal to feel somewhat uneasy when reading (or being required to write) " +"in a different one." +msgstr "" + +#: ../../faq/design.rst:38 +msgid "" +"Many coding styles place begin/end brackets on a line by themselves. This " +"makes programs considerably longer and wastes valuable screen space, making " +"it harder to get a good overview of a program. Ideally, a function should " +"fit on one screen (say, 20--30 lines). 20 lines of Python can do a lot more " +"work than 20 lines of C. This is not solely due to the lack of begin/end " +"brackets -- the lack of declarations and the high-level data types are also " +"responsible -- but the indentation-based syntax certainly helps." +msgstr "" + +#: ../../faq/design.rst:48 +msgid "Why am I getting strange results with simple arithmetic operations?" +msgstr "" + +#: ../../faq/design.rst:50 +msgid "See the next question." +msgstr "Nächste Frage ansehen." + +#: ../../faq/design.rst:54 +msgid "Why are floating-point calculations so inaccurate?" +msgstr "" + +#: ../../faq/design.rst:56 +msgid "Users are often surprised by results like this::" +msgstr "Nutzer sind oft von solechen Ergebnissen überrascht::" + +#: ../../faq/design.rst:58 +msgid "" +">>> 1.2 - 1.0\n" +"0.19999999999999996" +msgstr "" + +#: ../../faq/design.rst:61 +msgid "" +"and think it is a bug in Python. It's not. This has little to do with " +"Python, and much more to do with how the underlying platform handles " +"floating-point numbers." +msgstr "" + +#: ../../faq/design.rst:65 +msgid "" +"The :class:`float` type in CPython uses a C ``double`` for storage. A :" +"class:`float` object's value is stored in binary floating-point with a fixed " +"precision (typically 53 bits) and Python uses C operations, which in turn " +"rely on the hardware implementation in the processor, to perform floating-" +"point operations. This means that as far as floating-point operations are " +"concerned, Python behaves like many popular languages including C and Java." +msgstr "" + +#: ../../faq/design.rst:72 +msgid "" +"Many numbers that can be written easily in decimal notation cannot be " +"expressed exactly in binary floating point. For example, after::" +msgstr "" + +#: ../../faq/design.rst:75 +msgid ">>> x = 1.2" +msgstr "" + +#: ../../faq/design.rst:77 +msgid "" +"the value stored for ``x`` is a (very good) approximation to the decimal " +"value ``1.2``, but is not exactly equal to it. On a typical machine, the " +"actual stored value is::" +msgstr "" + +#: ../../faq/design.rst:81 +msgid "1.0011001100110011001100110011001100110011001100110011 (binary)" +msgstr "" + +#: ../../faq/design.rst:83 +msgid "which is exactly::" +msgstr "" + +#: ../../faq/design.rst:85 +msgid "1.1999999999999999555910790149937383830547332763671875 (decimal)" +msgstr "" + +#: ../../faq/design.rst:87 +msgid "" +"The typical precision of 53 bits provides Python floats with 15--16 decimal " +"digits of accuracy." +msgstr "" + +#: ../../faq/design.rst:90 +msgid "" +"For a fuller explanation, please see the :ref:`floating-point arithmetic " +"` chapter in the Python tutorial." +msgstr "" + +#: ../../faq/design.rst:95 +msgid "Why are Python strings immutable?" +msgstr "" + +#: ../../faq/design.rst:97 +msgid "There are several advantages." +msgstr "Es gibt mehrere Vorteile." + +#: ../../faq/design.rst:99 +msgid "" +"One is performance: knowing that a string is immutable means we can allocate " +"space for it at creation time, and the storage requirements are fixed and " +"unchanging. This is also one of the reasons for the distinction between " +"tuples and lists." +msgstr "" + +#: ../../faq/design.rst:104 +msgid "" +"Another advantage is that strings in Python are considered as \"elemental\" " +"as numbers. No amount of activity will change the value 8 to anything else, " +"and in Python, no amount of activity will change the string \"eight\" to " +"anything else." +msgstr "" + +#: ../../faq/design.rst:112 +msgid "Why must 'self' be used explicitly in method definitions and calls?" +msgstr "" + +#: ../../faq/design.rst:114 +msgid "" +"The idea was borrowed from Modula-3. It turns out to be very useful, for a " +"variety of reasons." +msgstr "" + +#: ../../faq/design.rst:117 +msgid "" +"First, it's more obvious that you are using a method or instance attribute " +"instead of a local variable. Reading ``self.x`` or ``self.meth()`` makes it " +"absolutely clear that an instance variable or method is used even if you " +"don't know the class definition by heart. In C++, you can sort of tell by " +"the lack of a local variable declaration (assuming globals are rare or " +"easily recognizable) -- but in Python, there are no local variable " +"declarations, so you'd have to look up the class definition to be sure. " +"Some C++ and Java coding standards call for instance attributes to have an " +"``m_`` prefix, so this explicitness is still useful in those languages, too." +msgstr "" + +#: ../../faq/design.rst:127 +msgid "" +"Second, it means that no special syntax is necessary if you want to " +"explicitly reference or call the method from a particular class. In C++, if " +"you want to use a method from a base class which is overridden in a derived " +"class, you have to use the ``::`` operator -- in Python you can write " +"``baseclass.methodname(self, )``. This is particularly " +"useful for :meth:`~object.__init__` methods, and in general in cases where a " +"derived class method wants to extend the base class method of the same name " +"and thus has to call the base class method somehow." +msgstr "" + +#: ../../faq/design.rst:136 +msgid "" +"Finally, for instance variables it solves a syntactic problem with " +"assignment: since local variables in Python are (by definition!) those " +"variables to which a value is assigned in a function body (and that aren't " +"explicitly declared global), there has to be some way to tell the " +"interpreter that an assignment was meant to assign to an instance variable " +"instead of to a local variable, and it should preferably be syntactic (for " +"efficiency reasons). C++ does this through declarations, but Python doesn't " +"have declarations and it would be a pity having to introduce them just for " +"this purpose. Using the explicit ``self.var`` solves this nicely. " +"Similarly, for using instance variables, having to write ``self.var`` means " +"that references to unqualified names inside a method don't have to search " +"the instance's directories. To put it another way, local variables and " +"instance variables live in two different namespaces, and you need to tell " +"Python which namespace to use." +msgstr "" + +#: ../../faq/design.rst:154 +msgid "Why can't I use an assignment in an expression?" +msgstr "" + +#: ../../faq/design.rst:156 +msgid "Starting in Python 3.8, you can!" +msgstr "" + +#: ../../faq/design.rst:158 +msgid "" +"Assignment expressions using the walrus operator ``:=`` assign a variable in " +"an expression::" +msgstr "" + +#: ../../faq/design.rst:161 +msgid "" +"while chunk := fp.read(200):\n" +" print(chunk)" +msgstr "" + +#: ../../faq/design.rst:164 +msgid "See :pep:`572` for more information." +msgstr "" + +#: ../../faq/design.rst:169 +msgid "" +"Why does Python use methods for some functionality (e.g. list.index()) but " +"functions for other (e.g. len(list))?" +msgstr "" + +#: ../../faq/design.rst:171 +msgid "As Guido said:" +msgstr "" + +#: ../../faq/design.rst:173 +msgid "" +"(a) For some operations, prefix notation just reads better than postfix -- " +"prefix (and infix!) operations have a long tradition in mathematics which " +"likes notations where the visuals help the mathematician thinking about a " +"problem. Compare the easy with which we rewrite a formula like x*(a+b) into " +"x*a + x*b to the clumsiness of doing the same thing using a raw OO notation." +msgstr "" + +#: ../../faq/design.rst:180 +msgid "" +"(b) When I read code that says len(x) I *know* that it is asking for the " +"length of something. This tells me two things: the result is an integer, and " +"the argument is some kind of container. To the contrary, when I read x." +"len(), I have to already know that x is some kind of container implementing " +"an interface or inheriting from a class that has a standard len(). Witness " +"the confusion we occasionally have when a class that is not implementing a " +"mapping has a get() or keys() method, or something that isn't a file has a " +"write() method." +msgstr "" + +#: ../../faq/design.rst:189 +msgid "https://mail.python.org/pipermail/python-3000/2006-November/004643.html" +msgstr "" + +#: ../../faq/design.rst:193 +msgid "Why is join() a string method instead of a list or tuple method?" +msgstr "" + +#: ../../faq/design.rst:195 +msgid "" +"Strings became much more like other standard types starting in Python 1.6, " +"when methods were added which give the same functionality that has always " +"been available using the functions of the string module. Most of these new " +"methods have been widely accepted, but the one which appears to make some " +"programmers feel uncomfortable is::" +msgstr "" + +#: ../../faq/design.rst:201 +msgid "\", \".join(['1', '2', '4', '8', '16'])" +msgstr "" + +#: ../../faq/design.rst:203 +msgid "which gives the result::" +msgstr "" + +#: ../../faq/design.rst:205 +msgid "\"1, 2, 4, 8, 16\"" +msgstr "" + +#: ../../faq/design.rst:207 +msgid "There are two common arguments against this usage." +msgstr "" + +#: ../../faq/design.rst:209 +msgid "" +"The first runs along the lines of: \"It looks really ugly using a method of " +"a string literal (string constant)\", to which the answer is that it might, " +"but a string literal is just a fixed value. If the methods are to be allowed " +"on names bound to strings there is no logical reason to make them " +"unavailable on literals." +msgstr "" + +#: ../../faq/design.rst:215 +msgid "" +"The second objection is typically cast as: \"I am really telling a sequence " +"to join its members together with a string constant\". Sadly, you aren't. " +"For some reason there seems to be much less difficulty with having :meth:" +"`~str.split` as a string method, since in that case it is easy to see that ::" +msgstr "" + +#: ../../faq/design.rst:220 +msgid "\"1, 2, 4, 8, 16\".split(\", \")" +msgstr "" + +#: ../../faq/design.rst:222 +msgid "" +"is an instruction to a string literal to return the substrings delimited by " +"the given separator (or, by default, arbitrary runs of white space)." +msgstr "" + +#: ../../faq/design.rst:225 +msgid "" +":meth:`~str.join` is a string method because in using it you are telling the " +"separator string to iterate over a sequence of strings and insert itself " +"between adjacent elements. This method can be used with any argument which " +"obeys the rules for sequence objects, including any new classes you might " +"define yourself. Similar methods exist for bytes and bytearray objects." +msgstr "" + +#: ../../faq/design.rst:233 +msgid "How fast are exceptions?" +msgstr "" + +#: ../../faq/design.rst:235 +msgid "" +"A :keyword:`try`/:keyword:`except` block is extremely efficient if no " +"exceptions are raised. Actually catching an exception is expensive. In " +"versions of Python prior to 2.0 it was common to use this idiom::" +msgstr "" + +#: ../../faq/design.rst:240 +msgid "" +"try:\n" +" value = mydict[key]\n" +"except KeyError:\n" +" mydict[key] = getvalue(key)\n" +" value = mydict[key]" +msgstr "" + +#: ../../faq/design.rst:246 +msgid "" +"This only made sense when you expected the dict to have the key almost all " +"the time. If that wasn't the case, you coded it like this::" +msgstr "" + +#: ../../faq/design.rst:249 +msgid "" +"if key in mydict:\n" +" value = mydict[key]\n" +"else:\n" +" value = mydict[key] = getvalue(key)" +msgstr "" + +#: ../../faq/design.rst:254 +msgid "" +"For this specific case, you could also use ``value = dict.setdefault(key, " +"getvalue(key))``, but only if the ``getvalue()`` call is cheap enough " +"because it is evaluated in all cases." +msgstr "" + +#: ../../faq/design.rst:260 +msgid "Why isn't there a switch or case statement in Python?" +msgstr "" + +#: ../../faq/design.rst:262 +msgid "" +"In general, structured switch statements execute one block of code when an " +"expression has a particular value or set of values. Since Python 3.10 one " +"can easily match literal values, or constants within a namespace, with a " +"``match ... case`` statement. See :ref:`the specification ` and :ref:" +"`the tutorial ` for more information about :keyword:`match` " +"statements. An older alternative is a sequence of ``if... elif... elif... " +"else``." +msgstr "" + +#: ../../faq/design.rst:270 +msgid "" +"For cases where you need to choose from a very large number of " +"possibilities, you can create a dictionary mapping case values to functions " +"to call. For example::" +msgstr "" + +#: ../../faq/design.rst:274 +msgid "" +"functions = {'a': function_1,\n" +" 'b': function_2,\n" +" 'c': self.method_1}\n" +"\n" +"func = functions[value]\n" +"func()" +msgstr "" + +#: ../../faq/design.rst:281 +msgid "" +"For calling methods on objects, you can simplify yet further by using the :" +"func:`getattr` built-in to retrieve methods with a particular name::" +msgstr "" + +#: ../../faq/design.rst:284 +msgid "" +"class MyVisitor:\n" +" def visit_a(self):\n" +" ...\n" +"\n" +" def dispatch(self, value):\n" +" method_name = 'visit_' + str(value)\n" +" method = getattr(self, method_name)\n" +" method()" +msgstr "" + +#: ../../faq/design.rst:293 +msgid "" +"It's suggested that you use a prefix for the method names, such as " +"``visit_`` in this example. Without such a prefix, if values are coming " +"from an untrusted source, an attacker would be able to call any method on " +"your object." +msgstr "" + +#: ../../faq/design.rst:297 +msgid "" +"Imitating switch with fallthrough, as with C's switch-case-default, is " +"possible, much harder, and less needed." +msgstr "" + +#: ../../faq/design.rst:302 +msgid "" +"Can't you emulate threads in the interpreter instead of relying on an OS-" +"specific thread implementation?" +msgstr "" + +#: ../../faq/design.rst:304 +msgid "" +"Answer 1: Unfortunately, the interpreter pushes at least one C stack frame " +"for each Python stack frame. Also, extensions can call back into Python at " +"almost random moments. Therefore, a complete threads implementation " +"requires thread support for C." +msgstr "" + +#: ../../faq/design.rst:309 +msgid "" +"Answer 2: Fortunately, there is `Stackless Python `_, which has a completely redesigned " +"interpreter loop that avoids the C stack." +msgstr "" + +#: ../../faq/design.rst:314 +msgid "Why can't lambda expressions contain statements?" +msgstr "" + +#: ../../faq/design.rst:316 +msgid "" +"Python lambda expressions cannot contain statements because Python's " +"syntactic framework can't handle statements nested inside expressions. " +"However, in Python, this is not a serious problem. Unlike lambda forms in " +"other languages, where they add functionality, Python lambdas are only a " +"shorthand notation if you're too lazy to define a function." +msgstr "" + +#: ../../faq/design.rst:322 +msgid "" +"Functions are already first class objects in Python, and can be declared in " +"a local scope. Therefore the only advantage of using a lambda instead of a " +"locally defined function is that you don't need to invent a name for the " +"function -- but that's just a local variable to which the function object " +"(which is exactly the same type of object that a lambda expression yields) " +"is assigned!" +msgstr "" + +#: ../../faq/design.rst:330 +msgid "Can Python be compiled to machine code, C or some other language?" +msgstr "" + +#: ../../faq/design.rst:332 +msgid "" +"`Cython `_ compiles a modified version of Python with " +"optional annotations into C extensions. `Nuitka `_ is " +"an up-and-coming compiler of Python into C++ code, aiming to support the " +"full Python language." +msgstr "" + +#: ../../faq/design.rst:339 +msgid "How does Python manage memory?" +msgstr "" + +#: ../../faq/design.rst:341 +msgid "" +"The details of Python memory management depend on the implementation. The " +"standard implementation of Python, :term:`CPython`, uses reference counting " +"to detect inaccessible objects, and another mechanism to collect reference " +"cycles, periodically executing a cycle detection algorithm which looks for " +"inaccessible cycles and deletes the objects involved. The :mod:`gc` module " +"provides functions to perform a garbage collection, obtain debugging " +"statistics, and tune the collector's parameters." +msgstr "" + +#: ../../faq/design.rst:349 +msgid "" +"Other implementations (such as `Jython `_ or `PyPy " +"`_), however, can rely on a different mechanism such as a " +"full-blown garbage collector. This difference can cause some subtle porting " +"problems if your Python code depends on the behavior of the reference " +"counting implementation." +msgstr "" + +#: ../../faq/design.rst:355 +msgid "" +"In some Python implementations, the following code (which is fine in " +"CPython) will probably run out of file descriptors::" +msgstr "" + +#: ../../faq/design.rst:358 +msgid "" +"for file in very_long_list_of_files:\n" +" f = open(file)\n" +" c = f.read(1)" +msgstr "" + +#: ../../faq/design.rst:362 +msgid "" +"Indeed, using CPython's reference counting and destructor scheme, each new " +"assignment to ``f`` closes the previous file. With a traditional GC, " +"however, those file objects will only get collected (and closed) at varying " +"and possibly long intervals." +msgstr "" + +#: ../../faq/design.rst:367 +msgid "" +"If you want to write code that will work with any Python implementation, you " +"should explicitly close the file or use the :keyword:`with` statement; this " +"will work regardless of memory management scheme::" +msgstr "" + +#: ../../faq/design.rst:371 +msgid "" +"for file in very_long_list_of_files:\n" +" with open(file) as f:\n" +" c = f.read(1)" +msgstr "" + +#: ../../faq/design.rst:377 +msgid "Why doesn't CPython use a more traditional garbage collection scheme?" +msgstr "" + +#: ../../faq/design.rst:379 +msgid "" +"For one thing, this is not a C standard feature and hence it's not portable. " +"(Yes, we know about the Boehm GC library. It has bits of assembler code for " +"*most* common platforms, not for all of them, and although it is mostly " +"transparent, it isn't completely transparent; patches are required to get " +"Python to work with it.)" +msgstr "" + +#: ../../faq/design.rst:385 +msgid "" +"Traditional GC also becomes a problem when Python is embedded into other " +"applications. While in a standalone Python it's fine to replace the " +"standard ``malloc()`` and ``free()`` with versions provided by the GC " +"library, an application embedding Python may want to have its *own* " +"substitute for ``malloc()`` and ``free()``, and may not want Python's. " +"Right now, CPython works with anything that implements ``malloc()`` and " +"``free()`` properly." +msgstr "" + +#: ../../faq/design.rst:394 +msgid "Why isn't all memory freed when CPython exits?" +msgstr "" + +#: ../../faq/design.rst:396 +msgid "" +"Objects referenced from the global namespaces of Python modules are not " +"always deallocated when Python exits. This may happen if there are circular " +"references. There are also certain bits of memory that are allocated by the " +"C library that are impossible to free (e.g. a tool like Purify will complain " +"about these). Python is, however, aggressive about cleaning up memory on " +"exit and does try to destroy every single object." +msgstr "" + +#: ../../faq/design.rst:403 +msgid "" +"If you want to force Python to delete certain things on deallocation use " +"the :mod:`atexit` module to run a function that will force those deletions." +msgstr "" + +#: ../../faq/design.rst:408 +msgid "Why are there separate tuple and list data types?" +msgstr "" + +#: ../../faq/design.rst:410 +msgid "" +"Lists and tuples, while similar in many respects, are generally used in " +"fundamentally different ways. Tuples can be thought of as being similar to " +"Pascal ``records`` or C ``structs``; they're small collections of related " +"data which may be of different types which are operated on as a group. For " +"example, a Cartesian coordinate is appropriately represented as a tuple of " +"two or three numbers." +msgstr "" + +#: ../../faq/design.rst:417 +msgid "" +"Lists, on the other hand, are more like arrays in other languages. They " +"tend to hold a varying number of objects all of which have the same type and " +"which are operated on one-by-one. For example, :func:`os.listdir('.') ` returns a list of strings representing the files in the current " +"directory. Functions which operate on this output would generally not break " +"if you added another file or two to the directory." +msgstr "" + +#: ../../faq/design.rst:425 +msgid "" +"Tuples are :term:`immutable`, meaning that once a tuple has been created, " +"you can't replace any of its elements with a new value. Lists are :term:" +"`mutable`, meaning that you can always change a list's elements. Only :term:" +"`hashable` objects can be used as dictionary keys. Most immutable types are " +"hashable, which is why tuples, but not lists, can be used as keys. Note, " +"however, that a tuple is only hashable if all of its elements are hashable." +msgstr "" + +#: ../../faq/design.rst:434 +msgid "How are lists implemented in CPython?" +msgstr "" + +#: ../../faq/design.rst:436 +msgid "" +"CPython's lists are really variable-length arrays, not Lisp-style linked " +"lists. The implementation uses a contiguous array of references to other " +"objects, and keeps a pointer to this array and the array's length in a list " +"head structure." +msgstr "" + +#: ../../faq/design.rst:440 +msgid "" +"This makes indexing a list ``a[i]`` an operation whose cost is independent " +"of the size of the list or the value of the index." +msgstr "" + +#: ../../faq/design.rst:443 +msgid "" +"When items are appended or inserted, the array of references is resized. " +"Some cleverness is applied to improve the performance of appending items " +"repeatedly; when the array must be grown, some extra space is allocated so " +"the next few times don't require an actual resize." +msgstr "" + +#: ../../faq/design.rst:450 +msgid "How are dictionaries implemented in CPython?" +msgstr "" + +#: ../../faq/design.rst:452 +msgid "" +"CPython's dictionaries are implemented as resizable hash tables. Compared " +"to B-trees, this gives better performance for lookup (the most common " +"operation by far) under most circumstances, and the implementation is " +"simpler." +msgstr "" + +#: ../../faq/design.rst:456 +msgid "" +"Dictionaries work by computing a hash code for each key stored in the " +"dictionary using the :func:`hash` built-in function. The hash code varies " +"widely depending on the key and a per-process seed; for example, " +"``'Python'`` could hash to ``-539294296`` while ``'python'``, a string that " +"differs by a single bit, could hash to ``1142331976``. The hash code is " +"then used to calculate a location in an internal array where the value will " +"be stored. Assuming that you're storing keys that all have different hash " +"values, this means that dictionaries take constant time -- *O*\\ (1), in Big-" +"O notation -- to retrieve a key." +msgstr "" + +#: ../../faq/design.rst:467 +msgid "Why must dictionary keys be immutable?" +msgstr "" + +#: ../../faq/design.rst:469 +msgid "" +"The hash table implementation of dictionaries uses a hash value calculated " +"from the key value to find the key. If the key were a mutable object, its " +"value could change, and thus its hash could also change. But since whoever " +"changes the key object can't tell that it was being used as a dictionary " +"key, it can't move the entry around in the dictionary. Then, when you try " +"to look up the same object in the dictionary it won't be found because its " +"hash value is different. If you tried to look up the old value it wouldn't " +"be found either, because the value of the object found in that hash bin " +"would be different." +msgstr "" + +#: ../../faq/design.rst:478 +msgid "" +"If you want a dictionary indexed with a list, simply convert the list to a " +"tuple first; the function ``tuple(L)`` creates a tuple with the same entries " +"as the list ``L``. Tuples are immutable and can therefore be used as " +"dictionary keys." +msgstr "" + +#: ../../faq/design.rst:482 +msgid "Some unacceptable solutions that have been proposed:" +msgstr "" + +#: ../../faq/design.rst:484 +msgid "" +"Hash lists by their address (object ID). This doesn't work because if you " +"construct a new list with the same value it won't be found; e.g.::" +msgstr "" + +#: ../../faq/design.rst:487 +msgid "" +"mydict = {[1, 2]: '12'}\n" +"print(mydict[[1, 2]])" +msgstr "" + +#: ../../faq/design.rst:490 +msgid "" +"would raise a :exc:`KeyError` exception because the id of the ``[1, 2]`` " +"used in the second line differs from that in the first line. In other " +"words, dictionary keys should be compared using ``==``, not using :keyword:" +"`is`." +msgstr "" + +#: ../../faq/design.rst:494 +msgid "" +"Make a copy when using a list as a key. This doesn't work because the list, " +"being a mutable object, could contain a reference to itself, and then the " +"copying code would run into an infinite loop." +msgstr "" + +#: ../../faq/design.rst:498 +msgid "" +"Allow lists as keys but tell the user not to modify them. This would allow " +"a class of hard-to-track bugs in programs when you forgot or modified a list " +"by accident. It also invalidates an important invariant of dictionaries: " +"every value in ``d.keys()`` is usable as a key of the dictionary." +msgstr "" + +#: ../../faq/design.rst:503 +msgid "" +"Mark lists as read-only once they are used as a dictionary key. The problem " +"is that it's not just the top-level object that could change its value; you " +"could use a tuple containing a list as a key. Entering anything as a key " +"into a dictionary would require marking all objects reachable from there as " +"read-only -- and again, self-referential objects could cause an infinite " +"loop." +msgstr "" + +#: ../../faq/design.rst:509 +msgid "" +"There is a trick to get around this if you need to, but use it at your own " +"risk: You can wrap a mutable structure inside a class instance which has " +"both a :meth:`~object.__eq__` and a :meth:`~object.__hash__` method. You " +"must then make sure that the hash value for all such wrapper objects that " +"reside in a dictionary (or other hash based structure), remain fixed while " +"the object is in the dictionary (or other structure). ::" +msgstr "" + +#: ../../faq/design.rst:517 +msgid "" +"class ListWrapper:\n" +" def __init__(self, the_list):\n" +" self.the_list = the_list\n" +"\n" +" def __eq__(self, other):\n" +" return self.the_list == other.the_list\n" +"\n" +" def __hash__(self):\n" +" l = self.the_list\n" +" result = 98767 - len(l)*555\n" +" for i, el in enumerate(l):\n" +" try:\n" +" result = result + (hash(el) % 9999999) * 1001 + i\n" +" except Exception:\n" +" result = (result % 7777777) + i * 333\n" +" return result" +msgstr "" + +#: ../../faq/design.rst:534 +msgid "" +"Note that the hash computation is complicated by the possibility that some " +"members of the list may be unhashable and also by the possibility of " +"arithmetic overflow." +msgstr "" + +#: ../../faq/design.rst:538 +msgid "" +"Furthermore it must always be the case that if ``o1 == o2`` (ie ``o1." +"__eq__(o2) is True``) then ``hash(o1) == hash(o2)`` (ie, ``o1.__hash__() == " +"o2.__hash__()``), regardless of whether the object is in a dictionary or " +"not. If you fail to meet these restrictions dictionaries and other hash " +"based structures will misbehave." +msgstr "" + +#: ../../faq/design.rst:543 +msgid "" +"In the case of :class:`!ListWrapper`, whenever the wrapper object is in a " +"dictionary the wrapped list must not change to avoid anomalies. Don't do " +"this unless you are prepared to think hard about the requirements and the " +"consequences of not meeting them correctly. Consider yourself warned." +msgstr "" + +#: ../../faq/design.rst:550 +msgid "Why doesn't list.sort() return the sorted list?" +msgstr "" + +#: ../../faq/design.rst:552 +msgid "" +"In situations where performance matters, making a copy of the list just to " +"sort it would be wasteful. Therefore, :meth:`list.sort` sorts the list in " +"place. In order to remind you of that fact, it does not return the sorted " +"list. This way, you won't be fooled into accidentally overwriting a list " +"when you need a sorted copy but also need to keep the unsorted version " +"around." +msgstr "" + +#: ../../faq/design.rst:558 +msgid "" +"If you want to return a new list, use the built-in :func:`sorted` function " +"instead. This function creates a new list from a provided iterable, sorts " +"it and returns it. For example, here's how to iterate over the keys of a " +"dictionary in sorted order::" +msgstr "" + +#: ../../faq/design.rst:563 +msgid "" +"for key in sorted(mydict):\n" +" ... # do whatever with mydict[key]..." +msgstr "" + +#: ../../faq/design.rst:568 +msgid "How do you specify and enforce an interface spec in Python?" +msgstr "" + +#: ../../faq/design.rst:570 +msgid "" +"An interface specification for a module as provided by languages such as C++ " +"and Java describes the prototypes for the methods and functions of the " +"module. Many feel that compile-time enforcement of interface specifications " +"helps in the construction of large programs." +msgstr "" + +#: ../../faq/design.rst:575 +msgid "" +"Python 2.6 adds an :mod:`abc` module that lets you define Abstract Base " +"Classes (ABCs). You can then use :func:`isinstance` and :func:`issubclass` " +"to check whether an instance or a class implements a particular ABC. The :" +"mod:`collections.abc` module defines a set of useful ABCs such as :class:" +"`~collections.abc.Iterable`, :class:`~collections.abc.Container`, and :class:" +"`~collections.abc.MutableMapping`." +msgstr "" + +#: ../../faq/design.rst:582 +msgid "" +"For Python, many of the advantages of interface specifications can be " +"obtained by an appropriate test discipline for components." +msgstr "" + +#: ../../faq/design.rst:585 +msgid "" +"A good test suite for a module can both provide a regression test and serve " +"as a module interface specification and a set of examples. Many Python " +"modules can be run as a script to provide a simple \"self test.\" Even " +"modules which use complex external interfaces can often be tested in " +"isolation using trivial \"stub\" emulations of the external interface. The :" +"mod:`doctest` and :mod:`unittest` modules or third-party test frameworks can " +"be used to construct exhaustive test suites that exercise every line of code " +"in a module." +msgstr "" + +#: ../../faq/design.rst:593 +msgid "" +"An appropriate testing discipline can help build large complex applications " +"in Python as well as having interface specifications would. In fact, it can " +"be better because an interface specification cannot test certain properties " +"of a program. For example, the :meth:`list.append` method is expected to " +"add new elements to the end of some internal list; an interface " +"specification cannot test that your :meth:`list.append` implementation will " +"actually do this correctly, but it's trivial to check this property in a " +"test suite." +msgstr "" + +#: ../../faq/design.rst:601 +msgid "" +"Writing test suites is very helpful, and you might want to design your code " +"to make it easily tested. One increasingly popular technique, test-driven " +"development, calls for writing parts of the test suite first, before you " +"write any of the actual code. Of course Python allows you to be sloppy and " +"not write test cases at all." +msgstr "" + +#: ../../faq/design.rst:609 +msgid "Why is there no goto?" +msgstr "" + +#: ../../faq/design.rst:611 +msgid "" +"In the 1970s people realized that unrestricted goto could lead to messy " +"\"spaghetti\" code that was hard to understand and revise. In a high-level " +"language, it is also unneeded as long as there are ways to branch (in " +"Python, with :keyword:`if` statements and :keyword:`or`, :keyword:`and`, " +"and :keyword:`if`/:keyword:`else` expressions) and loop (with :keyword:" +"`while` and :keyword:`for` statements, possibly containing :keyword:" +"`continue` and :keyword:`break`)." +msgstr "" + +#: ../../faq/design.rst:618 +msgid "" +"One can also use exceptions to provide a \"structured goto\" that works even " +"across function calls. Many feel that exceptions can conveniently emulate " +"all reasonable uses of the ``go`` or ``goto`` constructs of C, Fortran, and " +"other languages. For example::" +msgstr "" + +#: ../../faq/design.rst:624 +msgid "" +"class label(Exception): pass # declare a label\n" +"\n" +"try:\n" +" ...\n" +" if condition: raise label() # goto label\n" +" ...\n" +"except label: # where to goto\n" +" pass\n" +"..." +msgstr "" + +#: ../../faq/design.rst:634 +msgid "" +"This doesn't allow you to jump into the middle of a loop, but that's usually " +"considered an abuse of ``goto`` anyway. Use sparingly." +msgstr "" + +#: ../../faq/design.rst:639 +msgid "Why can't raw strings (r-strings) end with a backslash?" +msgstr "" + +#: ../../faq/design.rst:641 +msgid "" +"More precisely, they can't end with an odd number of backslashes: the " +"unpaired backslash at the end escapes the closing quote character, leaving " +"an unterminated string." +msgstr "" + +#: ../../faq/design.rst:645 +msgid "" +"Raw strings were designed to ease creating input for processors (chiefly " +"regular expression engines) that want to do their own backslash escape " +"processing. Such processors consider an unmatched trailing backslash to be " +"an error anyway, so raw strings disallow that. In return, they allow you to " +"pass on the string quote character by escaping it with a backslash. These " +"rules work well when r-strings are used for their intended purpose." +msgstr "" + +#: ../../faq/design.rst:652 +msgid "" +"If you're trying to build Windows pathnames, note that all Windows system " +"calls accept forward slashes too::" +msgstr "" + +#: ../../faq/design.rst:655 +msgid "f = open(\"/mydir/file.txt\") # works fine!" +msgstr "" + +#: ../../faq/design.rst:657 +msgid "" +"If you're trying to build a pathname for a DOS command, try e.g. one of ::" +msgstr "" + +#: ../../faq/design.rst:659 +msgid "" +"dir = r\"\\this\\is\\my\\dos\\dir\" \"\\\\\"\n" +"dir = r\"\\this\\is\\my\\dos\\dir\\ \"[:-1]\n" +"dir = \"\\\\this\\\\is\\\\my\\\\dos\\\\dir\\\\\"" +msgstr "" + +#: ../../faq/design.rst:665 +msgid "Why doesn't Python have a \"with\" statement for attribute assignments?" +msgstr "" + +#: ../../faq/design.rst:667 +msgid "" +"Python has a :keyword:`with` statement that wraps the execution of a block, " +"calling code on the entrance and exit from the block. Some languages have a " +"construct that looks like this::" +msgstr "" + +#: ../../faq/design.rst:671 +msgid "" +"with obj:\n" +" a = 1 # equivalent to obj.a = 1\n" +" total = total + 1 # obj.total = obj.total + 1" +msgstr "" + +#: ../../faq/design.rst:675 +msgid "In Python, such a construct would be ambiguous." +msgstr "" + +#: ../../faq/design.rst:677 +msgid "" +"Other languages, such as Object Pascal, Delphi, and C++, use static types, " +"so it's possible to know, in an unambiguous way, what member is being " +"assigned to. This is the main point of static typing -- the compiler " +"*always* knows the scope of every variable at compile time." +msgstr "" + +#: ../../faq/design.rst:682 +msgid "" +"Python uses dynamic types. It is impossible to know in advance which " +"attribute will be referenced at runtime. Member attributes may be added or " +"removed from objects on the fly. This makes it impossible to know, from a " +"simple reading, what attribute is being referenced: a local one, a global " +"one, or a member attribute?" +msgstr "" + +#: ../../faq/design.rst:688 +msgid "For instance, take the following incomplete snippet::" +msgstr "" + +#: ../../faq/design.rst:690 +msgid "" +"def foo(a):\n" +" with a:\n" +" print(x)" +msgstr "" + +#: ../../faq/design.rst:694 +msgid "" +"The snippet assumes that ``a`` must have a member attribute called ``x``. " +"However, there is nothing in Python that tells the interpreter this. What " +"should happen if ``a`` is, let us say, an integer? If there is a global " +"variable named ``x``, will it be used inside the :keyword:`with` block? As " +"you see, the dynamic nature of Python makes such choices much harder." +msgstr "" + +#: ../../faq/design.rst:700 +msgid "" +"The primary benefit of :keyword:`with` and similar language features " +"(reduction of code volume) can, however, easily be achieved in Python by " +"assignment. Instead of::" +msgstr "" + +#: ../../faq/design.rst:703 +msgid "" +"function(args).mydict[index][index].a = 21\n" +"function(args).mydict[index][index].b = 42\n" +"function(args).mydict[index][index].c = 63" +msgstr "" + +#: ../../faq/design.rst:707 +msgid "write this::" +msgstr "" + +#: ../../faq/design.rst:709 +msgid "" +"ref = function(args).mydict[index][index]\n" +"ref.a = 21\n" +"ref.b = 42\n" +"ref.c = 63" +msgstr "" + +#: ../../faq/design.rst:714 +msgid "" +"This also has the side-effect of increasing execution speed because name " +"bindings are resolved at run-time in Python, and the second version only " +"needs to perform the resolution once." +msgstr "" + +#: ../../faq/design.rst:718 +msgid "" +"Similar proposals that would introduce syntax to further reduce code volume, " +"such as using a 'leading dot', have been rejected in favour of explicitness " +"(see https://mail.python.org/pipermail/python-ideas/2016-May/040070.html)." +msgstr "" + +#: ../../faq/design.rst:724 +msgid "Why don't generators support the with statement?" +msgstr "" + +#: ../../faq/design.rst:726 +msgid "" +"For technical reasons, a generator used directly as a context manager would " +"not work correctly. When, as is most common, a generator is used as an " +"iterator run to completion, no closing is needed. When it is, wrap it as :" +"func:`contextlib.closing(generator) ` in the :keyword:" +"`with` statement." +msgstr "" + +#: ../../faq/design.rst:734 +msgid "Why are colons required for the if/while/def/class statements?" +msgstr "" + +#: ../../faq/design.rst:736 +msgid "" +"The colon is required primarily to enhance readability (one of the results " +"of the experimental ABC language). Consider this::" +msgstr "" + +#: ../../faq/design.rst:739 +msgid "" +"if a == b\n" +" print(a)" +msgstr "" + +#: ../../faq/design.rst:742 +msgid "versus ::" +msgstr "" + +#: ../../faq/design.rst:744 +msgid "" +"if a == b:\n" +" print(a)" +msgstr "" + +#: ../../faq/design.rst:747 +msgid "" +"Notice how the second one is slightly easier to read. Notice further how a " +"colon sets off the example in this FAQ answer; it's a standard usage in " +"English." +msgstr "" + +#: ../../faq/design.rst:750 +msgid "" +"Another minor reason is that the colon makes it easier for editors with " +"syntax highlighting; they can look for colons to decide when indentation " +"needs to be increased instead of having to do a more elaborate parsing of " +"the program text." +msgstr "" + +#: ../../faq/design.rst:756 +msgid "Why does Python allow commas at the end of lists and tuples?" +msgstr "" + +#: ../../faq/design.rst:758 +msgid "" +"Python lets you add a trailing comma at the end of lists, tuples, and " +"dictionaries::" +msgstr "" + +#: ../../faq/design.rst:761 +msgid "" +"[1, 2, 3,]\n" +"('a', 'b', 'c',)\n" +"d = {\n" +" \"A\": [1, 5],\n" +" \"B\": [6, 7], # last trailing comma is optional but good style\n" +"}" +msgstr "" + +#: ../../faq/design.rst:769 +msgid "There are several reasons to allow this." +msgstr "Es gint mehrere Gründe dies zu erlauben." + +#: ../../faq/design.rst:771 +msgid "" +"When you have a literal value for a list, tuple, or dictionary spread across " +"multiple lines, it's easier to add more elements because you don't have to " +"remember to add a comma to the previous line. The lines can also be " +"reordered without creating a syntax error." +msgstr "" + +#: ../../faq/design.rst:776 +msgid "" +"Accidentally omitting the comma can lead to errors that are hard to " +"diagnose. For example::" +msgstr "" + +#: ../../faq/design.rst:779 +msgid "" +"x = [\n" +" \"fee\",\n" +" \"fie\"\n" +" \"foo\",\n" +" \"fum\"\n" +"]" +msgstr "" + +#: ../../faq/design.rst:786 +msgid "" +"This list looks like it has four elements, but it actually contains three: " +"\"fee\", \"fiefoo\" and \"fum\". Always adding the comma avoids this source " +"of error." +msgstr "" + +#: ../../faq/design.rst:789 +msgid "" +"Allowing the trailing comma may also make programmatic code generation " +"easier." +msgstr "" diff --git a/faq/programming.po b/faq/programming.po index 9d5a6ec3..96a5a00c 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -1724,7 +1724,8 @@ msgid "" ":class:`str` and :class:`bytes` objects are immutable, therefore " "concatenating many strings together is inefficient as each concatenation " "creates a new object. In the general case, the total runtime cost is " -"quadratic in the total string length." +"quadratic in the total string length. See :ref:`time-complexity` for more " +"information." msgstr "" #: ../../faq/programming.rst:1141 diff --git a/faq/programming.po~ b/faq/programming.po~ new file mode 100644 index 00000000..9d5a6ec3 --- /dev/null +++ b/faq/programming.po~ @@ -0,0 +1,3409 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../faq/programming.rst:5 +msgid "Programming FAQ" +msgstr "" + +#: ../../faq/programming.rst:8 +msgid "Contents" +msgstr "Inhalt" + +#: ../../faq/programming.rst:12 +msgid "General questions" +msgstr "" + +#: ../../faq/programming.rst:15 +msgid "" +"Is there a source code-level debugger with breakpoints and single-stepping?" +msgstr "" + +#: ../../faq/programming.rst:17 ../../faq/programming.rst:56 +msgid "Yes." +msgstr "" + +#: ../../faq/programming.rst:19 +msgid "" +"Several debuggers for Python are described below, and the built-in function :" +"func:`breakpoint` allows you to drop into any of them." +msgstr "" + +#: ../../faq/programming.rst:22 +msgid "" +"The pdb module is a simple but adequate console-mode debugger for Python. It " +"is part of the standard Python library, and is :mod:`documented in the " +"Library Reference Manual `. You can also write your own debugger by " +"using the code for pdb as an example." +msgstr "" + +#: ../../faq/programming.rst:27 +msgid "" +"The IDLE interactive development environment, which is part of the standard " +"Python distribution (normally available as :mod:`idlelib`), includes a " +"graphical debugger." +msgstr "" + +#: ../../faq/programming.rst:31 +msgid "" +"PythonWin is a Python IDE that includes a GUI debugger based on pdb. The " +"PythonWin debugger colors breakpoints and has quite a few cool features such " +"as debugging non-PythonWin programs. PythonWin is available as part of " +"`pywin32 `_ project and as a part of " +"the `ActivePython `_ " +"distribution." +msgstr "" + +#: ../../faq/programming.rst:38 +msgid "" +"`Eric `_ is an IDE built on PyQt and " +"the Scintilla editing component." +msgstr "" + +#: ../../faq/programming.rst:41 +msgid "" +"`trepan3k `_ is a gdb-like " +"debugger." +msgstr "" + +#: ../../faq/programming.rst:43 +msgid "" +"`Visual Studio Code `_ is an IDE with " +"debugging tools that integrates with version-control software." +msgstr "" + +#: ../../faq/programming.rst:46 +msgid "" +"There are a number of commercial Python IDEs that include graphical " +"debuggers. They include:" +msgstr "" + +#: ../../faq/programming.rst:49 +msgid "`Wing IDE `_" +msgstr "" + +#: ../../faq/programming.rst:50 +msgid "`PyCharm `_" +msgstr "" + +#: ../../faq/programming.rst:54 +msgid "Are there tools to help find bugs or perform static analysis?" +msgstr "" + +#: ../../faq/programming.rst:58 +msgid "" +"`Ruff `__, `Pylint `__ and `Pyflakes `__ do basic " +"checking that will help you catch bugs sooner." +msgstr "" + +#: ../../faq/programming.rst:63 +msgid "" +"Static type checkers such as `mypy `__, `ty `__, `Pyrefly `__, and `pytype " +"`__ can check type hints in Python source " +"code." +msgstr "" + +#: ../../faq/programming.rst:73 +msgid "How can I create a stand-alone binary from a Python script?" +msgstr "" + +#: ../../faq/programming.rst:75 +msgid "" +"You don't need the ability to compile Python to C code if all you want is a " +"stand-alone program that users can download and run without having to " +"install the Python distribution first. There are a number of tools that " +"determine the set of modules required by a program and bind these modules " +"together with a Python binary to produce a single executable." +msgstr "" + +#: ../../faq/programming.rst:81 +msgid "" +"One is to use the freeze tool, which is included in the Python source tree " +"as :source:`Tools/freeze`. It converts Python byte code to C arrays; with a " +"C compiler you can embed all your modules into a new program, which is then " +"linked with the standard Python modules." +msgstr "" + +#: ../../faq/programming.rst:87 +msgid "" +"It works by scanning your source recursively for import statements (in both " +"forms) and looking for the modules in the standard Python path as well as in " +"the source directory (for built-in modules). It then turns the bytecode for " +"modules written in Python into C code (array initializers that can be turned " +"into code objects using the marshal module) and creates a custom-made config " +"file that only contains those built-in modules which are actually used in " +"the program. It then compiles the generated C code and links it with the " +"rest of the Python interpreter to form a self-contained binary which acts " +"exactly like your script." +msgstr "" + +#: ../../faq/programming.rst:96 +msgid "" +"The following packages can help with the creation of console and GUI " +"executables:" +msgstr "" + +#: ../../faq/programming.rst:99 +msgid "`Nuitka `_ (Cross-platform)" +msgstr "" + +#: ../../faq/programming.rst:100 +msgid "`PyInstaller `_ (Cross-platform)" +msgstr "" + +#: ../../faq/programming.rst:101 +msgid "" +"`PyOxidizer `_ (Cross-platform)" +msgstr "" + +#: ../../faq/programming.rst:102 +msgid "" +"`cx_Freeze `_ (Cross-platform)" +msgstr "" + +#: ../../faq/programming.rst:103 +msgid "`py2app `_ (macOS only)" +msgstr "" + +#: ../../faq/programming.rst:104 +msgid "`py2exe `_ (Windows only)" +msgstr "" + +#: ../../faq/programming.rst:108 +msgid "Are there coding standards or a style guide for Python programs?" +msgstr "" + +#: ../../faq/programming.rst:110 +msgid "" +"Yes. The coding style required for standard library modules is documented " +"as :pep:`8`." +msgstr "" + +#: ../../faq/programming.rst:115 +msgid "Core language" +msgstr "" + +#: ../../faq/programming.rst:120 +msgid "Why am I getting an UnboundLocalError when the variable has a value?" +msgstr "" + +#: ../../faq/programming.rst:122 +msgid "" +"It can be a surprise to get the :exc:`UnboundLocalError` in previously " +"working code when it is modified by adding an assignment statement somewhere " +"in the body of a function." +msgstr "" + +#: ../../faq/programming.rst:126 +msgid "This code:" +msgstr "" + +#: ../../faq/programming.rst:135 +msgid "works, but this code:" +msgstr "" + +#: ../../faq/programming.rst:142 +msgid "results in an :exc:`!UnboundLocalError`:" +msgstr "" + +#: ../../faq/programming.rst:149 +msgid "" +"This is because when you make an assignment to a variable in a scope, that " +"variable becomes local to that scope and shadows any similarly named " +"variable in the outer scope. Since the last statement in foo assigns a new " +"value to ``x``, the compiler recognizes it as a local variable. " +"Consequently when the earlier ``print(x)`` attempts to print the " +"uninitialized local variable and an error results." +msgstr "" + +#: ../../faq/programming.rst:156 +msgid "" +"In the example above you can access the outer scope variable by declaring it " +"global:" +msgstr "" + +#: ../../faq/programming.rst:168 +msgid "" +"This explicit declaration is required in order to remind you that (unlike " +"the superficially analogous situation with class and instance variables) you " +"are actually modifying the value of the variable in the outer scope:" +msgstr "" + +#: ../../faq/programming.rst:175 +msgid "" +"You can do a similar thing in a nested scope using the :keyword:`nonlocal` " +"keyword:" +msgstr "" + +#: ../../faq/programming.rst:193 +msgid "What are the rules for local and global variables in Python?" +msgstr "" + +#: ../../faq/programming.rst:195 +msgid "" +"In Python, variables that are only referenced inside a function are " +"implicitly global. If a variable is assigned a value anywhere within the " +"function's body, it's assumed to be a local unless explicitly declared as " +"global." +msgstr "" + +#: ../../faq/programming.rst:199 +msgid "" +"Though a bit surprising at first, a moment's consideration explains this. " +"On one hand, requiring :keyword:`global` for assigned variables provides a " +"bar against unintended side-effects. On the other hand, if ``global`` was " +"required for all global references, you'd be using ``global`` all the time. " +"You'd have to declare as global every reference to a built-in function or to " +"a component of an imported module. This clutter would defeat the usefulness " +"of the ``global`` declaration for identifying side-effects." +msgstr "" + +#: ../../faq/programming.rst:209 +msgid "" +"Why do lambdas defined in a loop with different values all return the same " +"result?" +msgstr "" + +#: ../../faq/programming.rst:211 +msgid "" +"Assume you use a for loop to define a few different lambdas (or even plain " +"functions), for example::" +msgstr "" + +#: ../../faq/programming.rst:214 +msgid "" +">>> squares = []\n" +">>> for x in range(5):\n" +"... squares.append(lambda: x**2)" +msgstr "" + +#: ../../faq/programming.rst:218 +msgid "" +"This gives you a list that contains 5 lambdas that calculate ``x**2``. You " +"might expect that, when called, they would return, respectively, ``0``, " +"``1``, ``4``, ``9``, and ``16``. However, when you actually try you will " +"see that they all return ``16``::" +msgstr "" + +#: ../../faq/programming.rst:223 +msgid "" +">>> squares[2]()\n" +"16\n" +">>> squares[4]()\n" +"16" +msgstr "" + +#: ../../faq/programming.rst:228 +msgid "" +"This happens because ``x`` is not local to the lambdas, but is defined in " +"the outer scope, and it is accessed when the lambda is called --- not when " +"it is defined. At the end of the loop, the value of ``x`` is ``4``, so all " +"the functions now return ``4**2``, that is ``16``. You can also verify this " +"by changing the value of ``x`` and see how the results of the lambdas " +"change::" +msgstr "" + +#: ../../faq/programming.rst:234 +msgid "" +">>> x = 8\n" +">>> squares[2]()\n" +"64" +msgstr "" + +#: ../../faq/programming.rst:238 +msgid "" +"In order to avoid this, you need to save the values in variables local to " +"the lambdas, so that they don't rely on the value of the global ``x``::" +msgstr "" + +#: ../../faq/programming.rst:241 +msgid "" +">>> squares = []\n" +">>> for x in range(5):\n" +"... squares.append(lambda n=x: n**2)" +msgstr "" + +#: ../../faq/programming.rst:245 +msgid "" +"Here, ``n=x`` creates a new variable ``n`` local to the lambda and computed " +"when the lambda is defined so that it has the same value that ``x`` had at " +"that point in the loop. This means that the value of ``n`` will be ``0`` in " +"the first lambda, ``1`` in the second, ``2`` in the third, and so on. " +"Therefore each lambda will now return the correct result::" +msgstr "" + +#: ../../faq/programming.rst:251 +msgid "" +">>> squares[2]()\n" +"4\n" +">>> squares[4]()\n" +"16" +msgstr "" + +#: ../../faq/programming.rst:256 +msgid "" +"Note that this behaviour is not peculiar to lambdas, but applies to regular " +"functions too." +msgstr "" + +#: ../../faq/programming.rst:261 +msgid "How do I share global variables across modules?" +msgstr "" + +#: ../../faq/programming.rst:263 +msgid "" +"The canonical way to share information across modules within a single " +"program is to create a special module (often called config or cfg). Just " +"import the config module in all modules of your application; the module then " +"becomes available as a global name. Because there is only one instance of " +"each module, any changes made to the module object get reflected " +"everywhere. For example:" +msgstr "" + +#: ../../faq/programming.rst:269 +msgid "config.py::" +msgstr "" + +#: ../../faq/programming.rst:271 +msgid "x = 0 # Default value of the 'x' configuration setting" +msgstr "" + +#: ../../faq/programming.rst:273 +msgid "mod.py::" +msgstr "" + +#: ../../faq/programming.rst:275 +msgid "" +"import config\n" +"config.x = 1" +msgstr "" + +#: ../../faq/programming.rst:278 +msgid "main.py::" +msgstr "" + +#: ../../faq/programming.rst:280 +msgid "" +"import config\n" +"import mod\n" +"print(config.x)" +msgstr "" + +#: ../../faq/programming.rst:284 +msgid "" +"Note that using a module is also the basis for implementing the singleton " +"design pattern, for the same reason." +msgstr "" + +#: ../../faq/programming.rst:289 +msgid "What are the \"best practices\" for using import in a module?" +msgstr "" + +#: ../../faq/programming.rst:291 +msgid "" +"In general, don't use ``from modulename import *``. Doing so clutters the " +"importer's namespace, and makes it much harder for linters to detect " +"undefined names." +msgstr "" + +#: ../../faq/programming.rst:295 +msgid "" +"Import modules at the top of a file. Doing so makes it clear what other " +"modules your code requires and avoids questions of whether the module name " +"is in scope. Using one import per line makes it easy to add and delete " +"module imports, but using multiple imports per line uses less screen space." +msgstr "" + +#: ../../faq/programming.rst:300 +msgid "It's good practice if you import modules in the following order:" +msgstr "" + +#: ../../faq/programming.rst:302 +msgid "" +"standard library modules -- such as :mod:`sys`, :mod:`os`, :mod:`argparse`, :" +"mod:`re`" +msgstr "" + +#: ../../faq/programming.rst:303 +msgid "" +"third-party library modules (anything installed in Python's site-packages " +"directory) -- such as :pypi:`dateutil`, :pypi:`requests`, :pypi:`tzdata`" +msgstr "" + +#: ../../faq/programming.rst:305 +msgid "locally developed modules" +msgstr "" + +#: ../../faq/programming.rst:307 +msgid "" +"It is sometimes necessary to move imports to a function or class to avoid " +"problems with circular imports. Gordon McMillan says:" +msgstr "" + +#: ../../faq/programming.rst:310 +msgid "" +"Circular imports are fine where both modules use the \"import \" " +"form of import. They fail when the 2nd module wants to grab a name out of " +"the first (\"from module import name\") and the import is at the top level. " +"That's because names in the 1st are not yet available, because the first " +"module is busy importing the 2nd." +msgstr "" + +#: ../../faq/programming.rst:316 +msgid "" +"In this case, if the second module is only used in one function, then the " +"import can easily be moved into that function. By the time the import is " +"called, the first module will have finished initializing, and the second " +"module can do its import." +msgstr "" + +#: ../../faq/programming.rst:321 +msgid "" +"It may also be necessary to move imports out of the top level of code if " +"some of the modules are platform-specific. In that case, it may not even be " +"possible to import all of the modules at the top of the file. In this case, " +"importing the correct modules in the corresponding platform-specific code is " +"a good option." +msgstr "" + +#: ../../faq/programming.rst:326 +msgid "" +"Only move imports into a local scope, such as inside a function definition, " +"if it's necessary to solve a problem such as avoiding a circular import or " +"are trying to reduce the initialization time of a module. This technique is " +"especially helpful if many of the imports are unnecessary depending on how " +"the program executes. You may also want to move imports into a function if " +"the modules are only ever used in that function. Note that loading a module " +"the first time may be expensive because of the one time initialization of " +"the module, but loading a module multiple times is virtually free, costing " +"only a couple of dictionary lookups. Even if the module name has gone out " +"of scope, the module is probably available in :data:`sys.modules`." +msgstr "" + +#: ../../faq/programming.rst:339 +msgid "Why are default values shared between objects?" +msgstr "" + +#: ../../faq/programming.rst:341 +msgid "" +"This type of bug commonly bites neophyte programmers. Consider this " +"function::" +msgstr "" + +#: ../../faq/programming.rst:343 +msgid "" +"def foo(mydict={}): # Danger: shared reference to one dict for all calls\n" +" ... compute something ...\n" +" mydict[key] = value\n" +" return mydict" +msgstr "" + +#: ../../faq/programming.rst:348 +msgid "" +"The first time you call this function, ``mydict`` contains a single item. " +"The second time, ``mydict`` contains two items because when ``foo()`` begins " +"executing, ``mydict`` starts out with an item already in it." +msgstr "" + +#: ../../faq/programming.rst:352 +msgid "" +"It is often expected that a function call creates new objects for default " +"values. This is not what happens. Default values are created exactly once, " +"when the function is defined. If that object is changed, like the " +"dictionary in this example, subsequent calls to the function will refer to " +"this changed object." +msgstr "" + +#: ../../faq/programming.rst:357 +msgid "" +"By definition, immutable objects such as numbers, strings, tuples, and " +"``None``, are safe from change. Changes to mutable objects such as " +"dictionaries, lists, and class instances can lead to confusion." +msgstr "" + +#: ../../faq/programming.rst:361 +msgid "" +"Because of this feature, it is good programming practice to not use mutable " +"objects as default values. Instead, use ``None`` as the default value and " +"inside the function, check if the parameter is ``None`` and create a new " +"list/dictionary/whatever if it is. For example, don't write::" +msgstr "" + +#: ../../faq/programming.rst:366 +msgid "" +"def foo(mydict={}):\n" +" ..." +msgstr "" + +#: ../../faq/programming.rst:369 +msgid "but::" +msgstr "" + +#: ../../faq/programming.rst:371 +msgid "" +"def foo(mydict=None):\n" +" if mydict is None:\n" +" mydict = {} # create a new dict for local namespace" +msgstr "" + +#: ../../faq/programming.rst:375 +msgid "" +"This feature can be useful. When you have a function that's time-consuming " +"to compute, a common technique is to cache the parameters and the resulting " +"value of each call to the function, and return the cached value if the same " +"value is requested again. This is called \"memoizing\", and can be " +"implemented like this::" +msgstr "" + +#: ../../faq/programming.rst:380 +msgid "" +"# Callers can only provide two parameters and optionally pass _cache by " +"keyword\n" +"def expensive(arg1, arg2, *, _cache={}):\n" +" if (arg1, arg2) in _cache:\n" +" return _cache[(arg1, arg2)]\n" +"\n" +" # Calculate the value\n" +" result = ... expensive computation ...\n" +" _cache[(arg1, arg2)] = result # Store result in the cache\n" +" return result" +msgstr "" + +#: ../../faq/programming.rst:390 +msgid "" +"You could use a global variable containing a dictionary instead of the " +"default value; it's a matter of taste." +msgstr "" + +#: ../../faq/programming.rst:395 +msgid "" +"How can I pass optional or keyword parameters from one function to another?" +msgstr "" + +#: ../../faq/programming.rst:397 +msgid "" +"Collect the arguments using the ``*`` and ``**`` specifiers in the " +"function's parameter list; this gives you the positional arguments as a " +"tuple and the keyword arguments as a dictionary. You can then pass these " +"arguments when calling another function by using ``*`` and ``**``::" +msgstr "" + +#: ../../faq/programming.rst:402 +msgid "" +"def f(x, *args, **kwargs):\n" +" ...\n" +" kwargs['width'] = '14.3c'\n" +" ...\n" +" g(x, *args, **kwargs)" +msgstr "" + +#: ../../faq/programming.rst:416 +msgid "What is the difference between arguments and parameters?" +msgstr "" + +#: ../../faq/programming.rst:418 +msgid "" +":term:`Parameters ` are defined by the names that appear in a " +"function definition, whereas :term:`arguments ` are the values " +"actually passed to a function when calling it. Parameters define what :term:" +"`kind of arguments ` a function can accept. For example, given " +"the function definition::" +msgstr "" + +#: ../../faq/programming.rst:424 +msgid "" +"def func(foo, bar=None, **kwargs):\n" +" pass" +msgstr "" + +#: ../../faq/programming.rst:427 +msgid "" +"*foo*, *bar* and *kwargs* are parameters of ``func``. However, when calling " +"``func``, for example::" +msgstr "" + +#: ../../faq/programming.rst:430 +msgid "func(42, bar=314, extra=somevar)" +msgstr "" + +#: ../../faq/programming.rst:432 +msgid "the values ``42``, ``314``, and ``somevar`` are arguments." +msgstr "" + +#: ../../faq/programming.rst:436 +msgid "Why did changing list 'y' also change list 'x'?" +msgstr "" + +#: ../../faq/programming.rst:438 +msgid "If you wrote code like::" +msgstr "" + +#: ../../faq/programming.rst:440 +msgid "" +">>> x = []\n" +">>> y = x\n" +">>> y.append(10)\n" +">>> y\n" +"[10]\n" +">>> x\n" +"[10]" +msgstr "" + +#: ../../faq/programming.rst:448 +msgid "" +"you might be wondering why appending an element to ``y`` changed ``x`` too." +msgstr "" + +#: ../../faq/programming.rst:450 +msgid "There are two factors that produce this result:" +msgstr "" + +#: ../../faq/programming.rst:452 +msgid "" +"Variables are simply names that refer to objects. Doing ``y = x`` doesn't " +"create a copy of the list -- it creates a new variable ``y`` that refers to " +"the same object ``x`` refers to. This means that there is only one object " +"(the list), and both ``x`` and ``y`` refer to it." +msgstr "" + +#: ../../faq/programming.rst:456 +msgid "" +"Lists are :term:`mutable`, which means that you can change their content." +msgstr "" + +#: ../../faq/programming.rst:458 +msgid "" +"After the call to :meth:`~sequence.append`, the content of the mutable " +"object has changed from ``[]`` to ``[10]``. Since both the variables refer " +"to the same object, using either name accesses the modified value ``[10]``." +msgstr "" + +#: ../../faq/programming.rst:462 +msgid "If we instead assign an immutable object to ``x``::" +msgstr "" + +#: ../../faq/programming.rst:464 +msgid "" +">>> x = 5 # ints are immutable\n" +">>> y = x\n" +">>> x = x + 1 # 5 can't be mutated, we are creating a new object here\n" +">>> x\n" +"6\n" +">>> y\n" +"5" +msgstr "" + +#: ../../faq/programming.rst:472 +msgid "" +"we can see that in this case ``x`` and ``y`` are not equal anymore. This is " +"because integers are :term:`immutable`, and when we do ``x = x + 1`` we are " +"not mutating the int ``5`` by incrementing its value; instead, we are " +"creating a new object (the int ``6``) and assigning it to ``x`` (that is, " +"changing which object ``x`` refers to). After this assignment we have two " +"objects (the ints ``6`` and ``5``) and two variables that refer to them " +"(``x`` now refers to ``6`` but ``y`` still refers to ``5``)." +msgstr "" + +#: ../../faq/programming.rst:480 +msgid "" +"Some operations (for example ``y.append(10)`` and ``y.sort()``) mutate the " +"object, whereas superficially similar operations (for example ``y = y + " +"[10]`` and :func:`sorted(y) `) create a new object. In general in " +"Python (and in all cases in the standard library) a method that mutates an " +"object will return ``None`` to help avoid getting the two types of " +"operations confused. So if you mistakenly write ``y.sort()`` thinking it " +"will give you a sorted copy of ``y``, you'll instead end up with ``None``, " +"which will likely cause your program to generate an easily diagnosed error." +msgstr "" + +#: ../../faq/programming.rst:489 +msgid "" +"However, there is one class of operations where the same operation sometimes " +"has different behaviors with different types: the augmented assignment " +"operators. For example, ``+=`` mutates lists but not tuples or ints " +"(``a_list += [1, 2, 3]`` is equivalent to ``a_list.extend([1, 2, 3])`` and " +"mutates ``a_list``, whereas ``some_tuple += (1, 2, 3)`` and ``some_int += " +"1`` create new objects)." +msgstr "" + +#: ../../faq/programming.rst:496 +msgid "In other words:" +msgstr "" + +#: ../../faq/programming.rst:498 +msgid "" +"If we have a mutable object (such as :class:`list`, :class:`dict`, :class:" +"`set`), we can use some specific operations to mutate it and all the " +"variables that refer to it will see the change." +msgstr "" + +#: ../../faq/programming.rst:501 +msgid "" +"If we have an immutable object (such as :class:`str`, :class:`int`, :class:" +"`tuple`), all the variables that refer to it will always see the same value, " +"but operations that transform that value into a new value always return a " +"new object." +msgstr "" + +#: ../../faq/programming.rst:506 +msgid "" +"If you want to know if two variables refer to the same object or not, you " +"can use the :keyword:`is` operator, or the built-in function :func:`id`." +msgstr "" + +#: ../../faq/programming.rst:511 +msgid "How do I write a function with output parameters (call by reference)?" +msgstr "" + +#: ../../faq/programming.rst:513 +msgid "" +"Remember that arguments are passed by assignment in Python. Since " +"assignment just creates references to objects, there's no alias between an " +"argument name in the caller and callee, and consequently no call-by-" +"reference. You can achieve the desired effect in a number of ways." +msgstr "" + +#: ../../faq/programming.rst:518 +msgid "By returning a tuple of the results::" +msgstr "" + +#: ../../faq/programming.rst:520 +msgid "" +">>> def func1(a, b):\n" +"... a = 'new-value' # a and b are local names\n" +"... b = b + 1 # assigned to new objects\n" +"... return a, b # return new values\n" +"...\n" +">>> x, y = 'old-value', 99\n" +">>> func1(x, y)\n" +"('new-value', 100)" +msgstr "" + +#: ../../faq/programming.rst:529 +msgid "This is almost always the clearest solution." +msgstr "" + +#: ../../faq/programming.rst:531 +msgid "" +"By using global variables. This isn't thread-safe, and is not recommended." +msgstr "" + +#: ../../faq/programming.rst:533 +msgid "By passing a mutable (changeable in-place) object::" +msgstr "" + +#: ../../faq/programming.rst:535 +msgid "" +">>> def func2(a):\n" +"... a[0] = 'new-value' # 'a' references a mutable list\n" +"... a[1] = a[1] + 1 # changes a shared object\n" +"...\n" +">>> args = ['old-value', 99]\n" +">>> func2(args)\n" +">>> args\n" +"['new-value', 100]" +msgstr "" + +#: ../../faq/programming.rst:544 +msgid "By passing in a dictionary that gets mutated::" +msgstr "" + +#: ../../faq/programming.rst:546 +msgid "" +">>> def func3(args):\n" +"... args['a'] = 'new-value' # args is a mutable dictionary\n" +"... args['b'] = args['b'] + 1 # change it in-place\n" +"...\n" +">>> args = {'a': 'old-value', 'b': 99}\n" +">>> func3(args)\n" +">>> args\n" +"{'a': 'new-value', 'b': 100}" +msgstr "" + +#: ../../faq/programming.rst:555 +msgid "Or bundle up values in a class instance::" +msgstr "" + +#: ../../faq/programming.rst:557 +msgid "" +">>> class Namespace:\n" +"... def __init__(self, /, **args):\n" +"... for key, value in args.items():\n" +"... setattr(self, key, value)\n" +"...\n" +">>> def func4(args):\n" +"... args.a = 'new-value' # args is a mutable Namespace\n" +"... args.b = args.b + 1 # change object in-place\n" +"...\n" +">>> args = Namespace(a='old-value', b=99)\n" +">>> func4(args)\n" +">>> vars(args)\n" +"{'a': 'new-value', 'b': 100}" +msgstr "" + +#: ../../faq/programming.rst:572 +msgid "There's almost never a good reason to get this complicated." +msgstr "" + +#: ../../faq/programming.rst:574 +msgid "Your best choice is to return a tuple containing the multiple results." +msgstr "" + +#: ../../faq/programming.rst:578 +msgid "How do you make a higher order function in Python?" +msgstr "" + +#: ../../faq/programming.rst:580 +msgid "" +"You have two choices: you can use nested scopes or you can use callable " +"objects. For example, suppose you wanted to define ``linear(a,b)`` which " +"returns a function ``f(x)`` that computes the value ``a*x+b``. Using nested " +"scopes::" +msgstr "" + +#: ../../faq/programming.rst:584 +msgid "" +"def linear(a, b):\n" +" def result(x):\n" +" return a * x + b\n" +" return result" +msgstr "" + +#: ../../faq/programming.rst:589 +msgid "Or using a callable object::" +msgstr "" + +#: ../../faq/programming.rst:591 +msgid "" +"class linear:\n" +"\n" +" def __init__(self, a, b):\n" +" self.a, self.b = a, b\n" +"\n" +" def __call__(self, x):\n" +" return self.a * x + self.b" +msgstr "" + +#: ../../faq/programming.rst:599 +msgid "In both cases, ::" +msgstr "" + +#: ../../faq/programming.rst:601 +msgid "taxes = linear(0.3, 2)" +msgstr "" + +#: ../../faq/programming.rst:603 +msgid "gives a callable object where ``taxes(10e6) == 0.3 * 10e6 + 2``." +msgstr "" + +#: ../../faq/programming.rst:605 +msgid "" +"The callable object approach has the disadvantage that it is a bit slower " +"and results in slightly longer code. However, note that a collection of " +"callables can share their signature via inheritance::" +msgstr "" + +#: ../../faq/programming.rst:609 +msgid "" +"class exponential(linear):\n" +" # __init__ inherited\n" +" def __call__(self, x):\n" +" return self.a * (x ** self.b)" +msgstr "" + +#: ../../faq/programming.rst:614 +msgid "Object can encapsulate state for several methods::" +msgstr "" + +#: ../../faq/programming.rst:616 +msgid "" +"class counter:\n" +"\n" +" value = 0\n" +"\n" +" def set(self, x):\n" +" self.value = x\n" +"\n" +" def up(self):\n" +" self.value = self.value + 1\n" +"\n" +" def down(self):\n" +" self.value = self.value - 1\n" +"\n" +"count = counter()\n" +"inc, dec, reset = count.up, count.down, count.set" +msgstr "" + +#: ../../faq/programming.rst:632 +msgid "" +"Here ``inc()``, ``dec()`` and ``reset()`` act like functions which share the " +"same counting variable." +msgstr "" + +#: ../../faq/programming.rst:637 +msgid "How do I copy an object in Python?" +msgstr "" + +#: ../../faq/programming.rst:639 +msgid "" +"In general, try :func:`copy.copy` or :func:`copy.deepcopy` for the general " +"case. Not all objects can be copied, but most can." +msgstr "" + +#: ../../faq/programming.rst:642 +msgid "" +"Some objects can be copied more easily. Dictionaries have a :meth:`~dict." +"copy` method::" +msgstr "" + +#: ../../faq/programming.rst:645 +msgid "newdict = olddict.copy()" +msgstr "" + +#: ../../faq/programming.rst:647 +msgid "Sequences can be copied by slicing::" +msgstr "" + +#: ../../faq/programming.rst:649 +msgid "new_l = l[:]" +msgstr "" + +#: ../../faq/programming.rst:653 +msgid "How can I find the methods or attributes of an object?" +msgstr "" + +#: ../../faq/programming.rst:655 +msgid "" +"For an instance ``x`` of a user-defined class, :func:`dir(x) ` returns " +"an alphabetized list of the names containing the instance attributes and " +"methods and attributes defined by its class." +msgstr "" + +#: ../../faq/programming.rst:661 +msgid "How can my code discover the name of an object?" +msgstr "" + +#: ../../faq/programming.rst:663 +msgid "" +"Generally speaking, it can't, because objects don't really have names. " +"Essentially, assignment always binds a name to a value; the same is true of " +"``def`` and ``class`` statements, but in that case the value is a callable. " +"Consider the following code::" +msgstr "" + +#: ../../faq/programming.rst:668 +msgid "" +">>> class A:\n" +"... pass\n" +"...\n" +">>> B = A\n" +">>> a = B()\n" +">>> b = a\n" +">>> print(b)\n" +"<__main__.A object at 0x16D07CC>\n" +">>> print(a)\n" +"<__main__.A object at 0x16D07CC>" +msgstr "" + +#: ../../faq/programming.rst:679 +msgid "" +"Arguably the class has a name: even though it is bound to two names and " +"invoked through the name ``B`` the created instance is still reported as an " +"instance of class ``A``. However, it is impossible to say whether the " +"instance's name is ``a`` or ``b``, since both names are bound to the same " +"value." +msgstr "" + +#: ../../faq/programming.rst:684 +msgid "" +"Generally speaking it should not be necessary for your code to \"know the " +"names\" of particular values. Unless you are deliberately writing " +"introspective programs, this is usually an indication that a change of " +"approach might be beneficial." +msgstr "" + +#: ../../faq/programming.rst:689 +msgid "" +"In comp.lang.python, Fredrik Lundh once gave an excellent analogy in answer " +"to this question:" +msgstr "" + +#: ../../faq/programming.rst:692 +msgid "" +"The same way as you get the name of that cat you found on your porch: the " +"cat (object) itself cannot tell you its name, and it doesn't really care -- " +"so the only way to find out what it's called is to ask all your neighbours " +"(namespaces) if it's their cat (object)..." +msgstr "" + +#: ../../faq/programming.rst:697 +msgid "" +"....and don't be surprised if you'll find that it's known by many names, or " +"no name at all!" +msgstr "" + +#: ../../faq/programming.rst:702 +msgid "What's up with the comma operator's precedence?" +msgstr "" + +#: ../../faq/programming.rst:704 +msgid "Comma is not an operator in Python. Consider this session::" +msgstr "" + +#: ../../faq/programming.rst:706 +msgid "" +">>> \"a\" in \"b\", \"a\"\n" +"(False, 'a')" +msgstr "" + +#: ../../faq/programming.rst:709 +msgid "" +"Since the comma is not an operator, but a separator between expressions the " +"above is evaluated as if you had entered::" +msgstr "" + +#: ../../faq/programming.rst:712 +msgid "(\"a\" in \"b\"), \"a\"" +msgstr "" + +#: ../../faq/programming.rst:714 +msgid "not::" +msgstr "" + +#: ../../faq/programming.rst:716 +msgid "\"a\" in (\"b\", \"a\")" +msgstr "" + +#: ../../faq/programming.rst:718 +msgid "" +"The same is true of the various assignment operators (``=``, ``+=``, and so " +"on). They are not truly operators but syntactic delimiters in assignment " +"statements." +msgstr "" + +#: ../../faq/programming.rst:723 +msgid "Is there an equivalent of C's \"?:\" ternary operator?" +msgstr "" + +#: ../../faq/programming.rst:725 +msgid "Yes, there is. The syntax is as follows::" +msgstr "" + +#: ../../faq/programming.rst:727 +msgid "" +"[on_true] if [expression] else [on_false]\n" +"\n" +"x, y = 50, 25\n" +"small = x if x < y else y" +msgstr "" + +#: ../../faq/programming.rst:732 +msgid "" +"Before this syntax was introduced in Python 2.5, a common idiom was to use " +"logical operators::" +msgstr "" + +#: ../../faq/programming.rst:735 +msgid "[expression] and [on_true] or [on_false]" +msgstr "" + +#: ../../faq/programming.rst:737 +msgid "" +"However, this idiom is unsafe, as it can give wrong results when *on_true* " +"has a false boolean value. Therefore, it is always better to use the ``... " +"if ... else ...`` form." +msgstr "" + +#: ../../faq/programming.rst:743 +msgid "Is it possible to write obfuscated one-liners in Python?" +msgstr "" + +#: ../../faq/programming.rst:745 +msgid "" +"Yes. Usually this is done by nesting :keyword:`lambda` within :keyword:`!" +"lambda`. See the following three examples, slightly adapted from Ulf " +"Bartelt::" +msgstr "" + +#: ../../faq/programming.rst:748 +msgid "" +"from functools import reduce\n" +"\n" +"# Primes < 1000\n" +"print(list(filter(None,map(lambda y:y*reduce(lambda x,y:x*y!=0,\n" +"map(lambda x,y=y:y%x,range(2,int(pow(y,0.5)+1))),1),range(2,1000)))))\n" +"\n" +"# First 10 Fibonacci numbers\n" +"print(list(map(lambda x,f=lambda x,f:(f(x-1,f)+f(x-2,f)) if x>1 else 1:\n" +"f(x,f), range(10))))\n" +"\n" +"# Mandelbrot set\n" +"print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+'\\n'+y,map(lambda " +"y,\n" +"Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,Sy=Sy,L=lambda yc,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,i=IM,\n" +"Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,\n" +"i=i,Sx=Sx,F=lambda xc,yc,x,y,k,f=lambda xc,yc,x,y,k,f:(k<=0)or (x*x+y*y\n" +">=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr(\n" +"64+F(Ru+x*(Ro-Ru)/Sx,yc,0,0,i)),range(Sx))):L(Iu+y*(Io-Iu)/Sy),range(Sy\n" +"))))(-2.1, 0.7, -1.2, 1.2, 30, 80, 24))\n" +"# \\___ ___/ \\___ ___/ | | |__ lines on screen\n" +"# V V | |______ columns on screen\n" +"# | | |__________ maximum of \"iterations\"\n" +"# | |_________________ range on y axis\n" +"# |____________________________ range on x axis" +msgstr "" + +#: ../../faq/programming.rst:772 +msgid "Don't try this at home, kids!" +msgstr "" + +#: ../../faq/programming.rst:778 +msgid "What does the slash(/) in the parameter list of a function mean?" +msgstr "" + +#: ../../faq/programming.rst:780 +msgid "" +"A slash in the argument list of a function denotes that the parameters prior " +"to it are positional-only. Positional-only parameters are the ones without " +"an externally usable name. Upon calling a function that accepts positional-" +"only parameters, arguments are mapped to parameters based solely on their " +"position. For example, :func:`divmod` is a function that accepts positional-" +"only parameters. Its documentation looks like this::" +msgstr "" + +#: ../../faq/programming.rst:787 +msgid "" +">>> help(divmod)\n" +"Help on built-in function divmod in module builtins:\n" +"\n" +"divmod(x, y, /)\n" +" Return the tuple (x//y, x%y). Invariant: div*y + mod == x." +msgstr "" + +#: ../../faq/programming.rst:793 +msgid "" +"The slash at the end of the parameter list means that both parameters are " +"positional-only. Thus, calling :func:`divmod` with keyword arguments would " +"lead to an error::" +msgstr "" + +#: ../../faq/programming.rst:797 +msgid "" +">>> divmod(x=3, y=4)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: divmod() takes no keyword arguments" +msgstr "" + +#: ../../faq/programming.rst:804 +msgid "Numbers and strings" +msgstr "" + +#: ../../faq/programming.rst:807 +msgid "How do I specify hexadecimal and octal integers?" +msgstr "" + +#: ../../faq/programming.rst:809 +msgid "" +"To specify an octal digit, precede the octal value with a zero, and then a " +"lower or uppercase \"o\". For example, to set the variable \"a\" to the " +"octal value \"10\" (8 in decimal), type::" +msgstr "" + +#: ../../faq/programming.rst:813 +msgid "" +">>> a = 0o10\n" +">>> a\n" +"8" +msgstr "" + +#: ../../faq/programming.rst:817 +msgid "" +"Hexadecimal is just as easy. Simply precede the hexadecimal number with a " +"zero, and then a lower or uppercase \"x\". Hexadecimal digits can be " +"specified in lower or uppercase. For example, in the Python interpreter::" +msgstr "" + +#: ../../faq/programming.rst:821 +msgid "" +">>> a = 0xa5\n" +">>> a\n" +"165\n" +">>> b = 0XB2\n" +">>> b\n" +"178" +msgstr "" + +#: ../../faq/programming.rst:830 +msgid "Why does -22 // 10 return -3?" +msgstr "" + +#: ../../faq/programming.rst:832 +msgid "" +"It's primarily driven by the desire that ``i % j`` have the same sign as " +"``j``. If you want that, and also want::" +msgstr "" + +#: ../../faq/programming.rst:835 +msgid "i == (i // j) * j + (i % j)" +msgstr "" + +#: ../../faq/programming.rst:837 +msgid "" +"then integer division has to return the floor. C also requires that " +"identity to hold, and then compilers that truncate ``i // j`` need to make " +"``i % j`` have the same sign as ``i``." +msgstr "" + +#: ../../faq/programming.rst:841 +msgid "" +"There are few real use cases for ``i % j`` when ``j`` is negative. When " +"``j`` is positive, there are many, and in virtually all of them it's more " +"useful for ``i % j`` to be ``>= 0``. If the clock says 10 now, what did it " +"say 200 hours ago? ``-190 % 12 == 2`` is useful; ``-190 % 12 == -10`` is a " +"bug waiting to bite." +msgstr "" + +#: ../../faq/programming.rst:849 +msgid "How do I get int literal attribute instead of SyntaxError?" +msgstr "" + +#: ../../faq/programming.rst:851 +msgid "" +"Trying to lookup an ``int`` literal attribute in the normal manner gives a :" +"exc:`SyntaxError` because the period is seen as a decimal point::" +msgstr "" + +#: ../../faq/programming.rst:854 +msgid "" +">>> 1.__class__\n" +" File \"\", line 1\n" +" 1.__class__\n" +" ^\n" +"SyntaxError: invalid decimal literal" +msgstr "" + +#: ../../faq/programming.rst:860 +msgid "" +"The solution is to separate the literal from the period with either a space " +"or parentheses." +msgstr "" + +#: ../../faq/programming.rst:870 +msgid "How do I convert a string to a number?" +msgstr "" + +#: ../../faq/programming.rst:872 +msgid "" +"For integers, use the built-in :func:`int` type constructor, for example, " +"``int('144') == 144``. Similarly, :func:`float` converts to a floating-" +"point number, for example, ``float('144') == 144.0``." +msgstr "" + +#: ../../faq/programming.rst:876 +msgid "" +"By default, these interpret the number as decimal, so that ``int('0144') == " +"144`` holds true, and ``int('0x144')`` raises :exc:`ValueError`. " +"``int(string, base)`` takes the base to convert from as a second optional " +"argument, so ``int( '0x144', 16) == 324``. If the base is specified as 0, " +"the number is interpreted using Python's rules: a leading '0o' indicates " +"octal, and '0x' indicates a hex number." +msgstr "" + +#: ../../faq/programming.rst:883 +msgid "" +"Do not use the built-in function :func:`eval` if all you need is to convert " +"strings to numbers. :func:`eval` will be significantly slower and it " +"presents a security risk: someone could pass you a Python expression that " +"might have unwanted side effects. For example, someone could pass " +"``__import__('os').system(\"rm -rf $HOME\")`` which would erase your home " +"directory." +msgstr "" + +#: ../../faq/programming.rst:890 +msgid "" +":func:`eval` also has the effect of interpreting numbers as Python " +"expressions, so that, for example, ``eval('09')`` gives a syntax error " +"because Python does not allow leading '0' in a decimal number (except '0')." +msgstr "" + +#: ../../faq/programming.rst:896 +msgid "How do I convert a number to a string?" +msgstr "" + +#: ../../faq/programming.rst:898 +msgid "" +"For example, to convert the number ``144`` to the string ``'144'``, use the " +"built-in type constructor :func:`str`. If you want a hexadecimal or octal " +"representation, use the built-in functions :func:`hex` or :func:`oct`. For " +"fancy formatting, see the :ref:`f-strings` and :ref:`formatstrings` " +"sections. For example, ``\"{:04d}\".format(144)`` yields ``'0144'`` and " +"``\"{:.3f}\".format(1.0/3.0)`` yields ``'0.333'``." +msgstr "" + +#: ../../faq/programming.rst:907 +msgid "How do I modify a string in place?" +msgstr "" + +#: ../../faq/programming.rst:909 +msgid "" +"You can't, because strings are immutable. In most situations, you should " +"simply construct a new string from the various parts you want to assemble it " +"from. However, if you need an object with the ability to modify in-place " +"Unicode data, try using an :class:`io.StringIO` object or the :mod:`array` " +"module::" +msgstr "" + +#: ../../faq/programming.rst:915 +msgid "" +">>> import io\n" +">>> s = \"Hello, world\"\n" +">>> sio = io.StringIO(s)\n" +">>> sio.getvalue()\n" +"'Hello, world'\n" +">>> sio.seek(7)\n" +"7\n" +">>> sio.write(\"there!\")\n" +"6\n" +">>> sio.getvalue()\n" +"'Hello, there!'\n" +"\n" +">>> import array\n" +">>> a = array.array('w', s)\n" +">>> print(a)\n" +"array('w', 'Hello, world')\n" +">>> a[0] = 'y'\n" +">>> print(a)\n" +"array('w', 'yello, world')\n" +">>> a.tounicode()\n" +"'yello, world'" +msgstr "" + +#: ../../faq/programming.rst:939 +msgid "How do I use strings to call functions/methods?" +msgstr "" + +#: ../../faq/programming.rst:941 +msgid "There are various techniques." +msgstr "" + +#: ../../faq/programming.rst:943 +msgid "" +"The best is to use a dictionary that maps strings to functions. The primary " +"advantage of this technique is that the strings do not need to match the " +"names of the functions. This is also the primary technique used to emulate " +"a case construct::" +msgstr "" + +#: ../../faq/programming.rst:948 +msgid "" +"def a():\n" +" pass\n" +"\n" +"def b():\n" +" pass\n" +"\n" +"dispatch = {'go': a, 'stop': b} # Note lack of parens for funcs\n" +"\n" +"dispatch[get_input()]() # Note trailing parens to call function" +msgstr "" + +#: ../../faq/programming.rst:958 +msgid "Use the built-in function :func:`getattr`::" +msgstr "" + +#: ../../faq/programming.rst:960 +msgid "" +"import foo\n" +"getattr(foo, 'bar')()" +msgstr "" + +#: ../../faq/programming.rst:963 +msgid "" +"Note that :func:`getattr` works on any object, including classes, class " +"instances, modules, and so on." +msgstr "" + +#: ../../faq/programming.rst:966 +msgid "This is used in several places in the standard library, like this::" +msgstr "" + +#: ../../faq/programming.rst:968 +msgid "" +"class Foo:\n" +" def do_foo(self):\n" +" ...\n" +"\n" +" def do_bar(self):\n" +" ...\n" +"\n" +"f = getattr(foo_instance, 'do_' + opname)\n" +"f()" +msgstr "" + +#: ../../faq/programming.rst:979 +msgid "Use :func:`locals` to resolve the function name::" +msgstr "" + +#: ../../faq/programming.rst:981 +msgid "" +"def myFunc():\n" +" print(\"hello\")\n" +"\n" +"fname = \"myFunc\"\n" +"\n" +"f = locals()[fname]\n" +"f()" +msgstr "" + +#: ../../faq/programming.rst:991 +msgid "" +"Is there an equivalent to Perl's ``chomp()`` for removing trailing newlines " +"from strings?" +msgstr "" + +#: ../../faq/programming.rst:993 +msgid "" +"You can use ``S.rstrip(\"\\r\\n\")`` to remove all occurrences of any line " +"terminator from the end of the string ``S`` without removing other trailing " +"whitespace. If the string ``S`` represents more than one line, with several " +"empty lines at the end, the line terminators for all the blank lines will be " +"removed::" +msgstr "" + +#: ../../faq/programming.rst:999 +msgid "" +">>> lines = (\"line 1 \\r\\n\"\n" +"... \"\\r\\n\"\n" +"... \"\\r\\n\")\n" +">>> lines.rstrip(\"\\n\\r\")\n" +"'line 1 '" +msgstr "" + +#: ../../faq/programming.rst:1005 +msgid "" +"Since this is typically only desired when reading text one line at a time, " +"using ``S.rstrip()`` this way works well." +msgstr "" + +#: ../../faq/programming.rst:1010 +msgid "Is there a ``scanf()`` or ``sscanf()`` equivalent?" +msgstr "" + +#: ../../faq/programming.rst:1012 +msgid "Not as such." +msgstr "" + +#: ../../faq/programming.rst:1014 +msgid "" +"For simple input parsing, the easiest approach is usually to split the line " +"into whitespace-delimited words using the :meth:`~str.split` method of " +"string objects and then convert decimal strings to numeric values using :" +"func:`int` or :func:`float`. :meth:`!split` supports an optional \"sep\" " +"parameter which is useful if the line uses something other than whitespace " +"as a separator." +msgstr "" + +#: ../../faq/programming.rst:1020 +msgid "" +"For more complicated input parsing, regular expressions are more powerful " +"than C's ``sscanf`` and better suited for the task." +msgstr "" + +#: ../../faq/programming.rst:1025 +msgid "What does ``UnicodeDecodeError`` or ``UnicodeEncodeError`` error mean?" +msgstr "" + +#: ../../faq/programming.rst:1027 +msgid "See the :ref:`unicode-howto`." +msgstr "" + +#: ../../faq/programming.rst:1033 +msgid "Can I end a raw string with an odd number of backslashes?" +msgstr "" + +#: ../../faq/programming.rst:1035 +msgid "" +"A raw string ending with an odd number of backslashes will escape the " +"string's quote::" +msgstr "" + +#: ../../faq/programming.rst:1037 +msgid "" +">>> r'C:\\this\\will\\not\\work\\'\n" +" File \"\", line 1\n" +" r'C:\\this\\will\\not\\work\\'\n" +" ^\n" +"SyntaxError: unterminated string literal (detected at line 1)" +msgstr "" + +#: ../../faq/programming.rst:1043 +msgid "" +"There are several workarounds for this. One is to use regular strings and " +"double the backslashes::" +msgstr "" + +#: ../../faq/programming.rst:1046 +msgid "" +">>> 'C:\\\\this\\\\will\\\\work\\\\'\n" +"'C:\\\\this\\\\will\\\\work\\\\'" +msgstr "" + +#: ../../faq/programming.rst:1049 +msgid "" +"Another is to concatenate a regular string containing an escaped backslash " +"to the raw string::" +msgstr "" + +#: ../../faq/programming.rst:1052 +msgid "" +">>> r'C:\\this\\will\\work' '\\\\'\n" +"'C:\\\\this\\\\will\\\\work\\\\'" +msgstr "" + +#: ../../faq/programming.rst:1055 +msgid "" +"It is also possible to use :func:`os.path.join` to append a backslash on " +"Windows::" +msgstr "" + +#: ../../faq/programming.rst:1057 +msgid "" +">>> os.path.join(r'C:\\this\\will\\work', '')\n" +"'C:\\\\this\\\\will\\\\work\\\\'" +msgstr "" + +#: ../../faq/programming.rst:1060 +msgid "" +"Note that while a backslash will \"escape\" a quote for the purposes of " +"determining where the raw string ends, no escaping occurs when interpreting " +"the value of the raw string. That is, the backslash remains present in the " +"value of the raw string::" +msgstr "" + +#: ../../faq/programming.rst:1065 +msgid "" +">>> r'backslash\\'preserved'\n" +"\"backslash\\\\'preserved\"" +msgstr "" + +#: ../../faq/programming.rst:1068 +msgid "Also see the specification in the :ref:`language reference `." +msgstr "" + +#: ../../faq/programming.rst:1072 +msgid "Performance" +msgstr "" + +#: ../../faq/programming.rst:1075 +msgid "My program is too slow. How do I speed it up?" +msgstr "" + +#: ../../faq/programming.rst:1077 +msgid "" +"That's a tough one, in general. First, here is a list of things to remember " +"before diving further:" +msgstr "" + +#: ../../faq/programming.rst:1080 +msgid "" +"Performance characteristics vary across Python implementations. This FAQ " +"focuses on :term:`CPython`." +msgstr "" + +#: ../../faq/programming.rst:1082 +msgid "" +"Behaviour can vary across operating systems, especially when talking about I/" +"O or multi-threading." +msgstr "" + +#: ../../faq/programming.rst:1084 +msgid "" +"You should always find the hot spots in your program *before* attempting to " +"optimize any code (see the :mod:`profile` module)." +msgstr "" + +#: ../../faq/programming.rst:1086 +msgid "" +"Writing benchmark scripts will allow you to iterate quickly when searching " +"for improvements (see the :mod:`timeit` module)." +msgstr "" + +#: ../../faq/programming.rst:1088 +msgid "" +"It is highly recommended to have good code coverage (through unit testing or " +"any other technique) before potentially introducing regressions hidden in " +"sophisticated optimizations." +msgstr "" + +#: ../../faq/programming.rst:1092 +msgid "" +"That being said, there are many tricks to speed up Python code. Here are " +"some general principles which go a long way towards reaching acceptable " +"performance levels:" +msgstr "" + +#: ../../faq/programming.rst:1096 +msgid "" +"Making your algorithms faster (or changing to faster ones) can yield much " +"larger benefits than trying to sprinkle micro-optimization tricks all over " +"your code." +msgstr "" + +#: ../../faq/programming.rst:1100 +msgid "" +"Use the right data structures. Study documentation for the :ref:`bltin-" +"types` and the :mod:`collections` module." +msgstr "" + +#: ../../faq/programming.rst:1103 +msgid "" +"When the standard library provides a primitive for doing something, it is " +"likely (although not guaranteed) to be faster than any alternative you may " +"come up with. This is doubly true for primitives written in C, such as " +"builtins and some extension types. For example, be sure to use either the :" +"meth:`list.sort` built-in method or the related :func:`sorted` function to " +"do sorting (and see the :ref:`sortinghowto` for examples of moderately " +"advanced usage)." +msgstr "" + +#: ../../faq/programming.rst:1111 +msgid "" +"Abstractions tend to create indirections and force the interpreter to work " +"more. If the levels of indirection outweigh the amount of useful work done, " +"your program will be slower. You should avoid excessive abstraction, " +"especially under the form of tiny functions or methods (which are also often " +"detrimental to readability)." +msgstr "" + +#: ../../faq/programming.rst:1117 +msgid "" +"If you have reached the limit of what pure Python can allow, there are tools " +"to take you further away. For example, `Cython `_ can " +"compile a slightly modified version of Python code into a C extension, and " +"can be used on many different platforms. Cython can take advantage of " +"compilation (and optional type annotations) to make your code significantly " +"faster than when interpreted. If you are confident in your C programming " +"skills, you can also :ref:`write a C extension module ` " +"yourself." +msgstr "" + +#: ../../faq/programming.rst:1127 +msgid "" +"The wiki page devoted to `performance tips `_." +msgstr "" + +#: ../../faq/programming.rst:1134 +msgid "What is the most efficient way to concatenate many strings together?" +msgstr "" + +#: ../../faq/programming.rst:1136 +msgid "" +":class:`str` and :class:`bytes` objects are immutable, therefore " +"concatenating many strings together is inefficient as each concatenation " +"creates a new object. In the general case, the total runtime cost is " +"quadratic in the total string length." +msgstr "" + +#: ../../faq/programming.rst:1141 +msgid "" +"To accumulate many :class:`str` objects, the recommended idiom is to place " +"them into a list and call :meth:`str.join` at the end::" +msgstr "" + +#: ../../faq/programming.rst:1144 +msgid "" +"chunks = []\n" +"for s in my_strings:\n" +" chunks.append(s)\n" +"result = ''.join(chunks)" +msgstr "" + +#: ../../faq/programming.rst:1149 +msgid "(Another reasonably efficient idiom is to use :class:`io.StringIO`.)" +msgstr "" + +#: ../../faq/programming.rst:1151 +msgid "" +"To accumulate many :class:`bytes` objects, the recommended idiom is to " +"extend a :class:`bytearray` object using in-place concatenation (the ``+=`` " +"operator)::" +msgstr "" + +#: ../../faq/programming.rst:1154 +msgid "" +"result = bytearray()\n" +"for b in my_bytes_objects:\n" +" result += b" +msgstr "" + +#: ../../faq/programming.rst:1160 +msgid "Sequences (tuples/lists)" +msgstr "" + +#: ../../faq/programming.rst:1163 +msgid "How do I convert between tuples and lists?" +msgstr "" + +#: ../../faq/programming.rst:1165 +msgid "" +"The type constructor ``tuple(seq)`` converts any sequence (actually, any " +"iterable) into a tuple with the same items in the same order." +msgstr "" + +#: ../../faq/programming.rst:1168 +msgid "" +"For example, ``tuple([1, 2, 3])`` yields ``(1, 2, 3)`` and ``tuple('abc')`` " +"yields ``('a', 'b', 'c')``. If the argument is a tuple, it does not make a " +"copy but returns the same object, so it is cheap to call :func:`tuple` when " +"you aren't sure that an object is already a tuple." +msgstr "" + +#: ../../faq/programming.rst:1173 +msgid "" +"The type constructor ``list(seq)`` converts any sequence or iterable into a " +"list with the same items in the same order. For example, ``list((1, 2, " +"3))`` yields ``[1, 2, 3]`` and ``list('abc')`` yields ``['a', 'b', 'c']``. " +"If the argument is a list, it makes a copy just like ``seq[:]`` would." +msgstr "" + +#: ../../faq/programming.rst:1180 +msgid "What's a negative index?" +msgstr "" + +#: ../../faq/programming.rst:1182 +msgid "" +"Python sequences are indexed with positive numbers and negative numbers. " +"For positive numbers 0 is the first index 1 is the second index and so " +"forth. For negative indices -1 is the last index and -2 is the penultimate " +"(next to last) index and so forth. Think of ``seq[-n]`` as the same as " +"``seq[len(seq)-n]``." +msgstr "" + +#: ../../faq/programming.rst:1187 +msgid "" +"Using negative indices can be very convenient. For example ``S[:-1]`` is " +"all of the string except for its last character, which is useful for " +"removing the trailing newline from a string." +msgstr "" + +#: ../../faq/programming.rst:1193 +msgid "How do I iterate over a sequence in reverse order?" +msgstr "" + +#: ../../faq/programming.rst:1195 +msgid "Use the :func:`reversed` built-in function::" +msgstr "" + +#: ../../faq/programming.rst:1197 +msgid "" +"for x in reversed(sequence):\n" +" ... # do something with x ..." +msgstr "" + +#: ../../faq/programming.rst:1200 +msgid "" +"This won't touch your original sequence, but build a new copy with reversed " +"order to iterate over." +msgstr "" + +#: ../../faq/programming.rst:1205 +msgid "How do you remove duplicates from a list?" +msgstr "" + +#: ../../faq/programming.rst:1207 +msgid "See the Python Cookbook for a long discussion of many ways to do this:" +msgstr "" + +#: ../../faq/programming.rst:1209 +msgid "https://code.activestate.com/recipes/52560/" +msgstr "" + +#: ../../faq/programming.rst:1211 +msgid "" +"If you don't mind reordering the list, sort it and then scan from the end of " +"the list, deleting duplicates as you go::" +msgstr "" + +#: ../../faq/programming.rst:1214 +msgid "" +"if mylist:\n" +" mylist.sort()\n" +" last = mylist[-1]\n" +" for i in range(len(mylist)-2, -1, -1):\n" +" if last == mylist[i]:\n" +" del mylist[i]\n" +" else:\n" +" last = mylist[i]" +msgstr "" + +#: ../../faq/programming.rst:1223 +msgid "" +"If all elements of the list may be used as set keys (that is, they are all :" +"term:`hashable`) this is often faster::" +msgstr "" + +#: ../../faq/programming.rst:1226 +msgid "mylist = list(set(mylist))" +msgstr "" + +#: ../../faq/programming.rst:1228 +msgid "" +"This converts the list into a set, thereby removing duplicates, and then " +"back into a list." +msgstr "" + +#: ../../faq/programming.rst:1233 +msgid "How do you remove multiple items from a list?" +msgstr "" + +#: ../../faq/programming.rst:1235 +msgid "" +"As with removing duplicates, explicitly iterating in reverse with a delete " +"condition is one possibility. However, it is easier and faster to use slice " +"replacement with an implicit or explicit forward iteration. Here are three " +"variations::" +msgstr "" + +#: ../../faq/programming.rst:1240 +msgid "" +"mylist[:] = filter(keep_function, mylist)\n" +"mylist[:] = (x for x in mylist if keep_condition)\n" +"mylist[:] = [x for x in mylist if keep_condition]" +msgstr "" + +#: ../../faq/programming.rst:1244 +msgid "The list comprehension may be fastest." +msgstr "" + +#: ../../faq/programming.rst:1248 +msgid "How do you make an array in Python?" +msgstr "" + +#: ../../faq/programming.rst:1250 +msgid "Use a list::" +msgstr "" + +#: ../../faq/programming.rst:1252 +msgid "[\"this\", 1, \"is\", \"an\", \"array\"]" +msgstr "" + +#: ../../faq/programming.rst:1254 +msgid "" +"Lists are equivalent to C or Pascal arrays in their time complexity; the " +"primary difference is that a Python list can contain objects of many " +"different types." +msgstr "" + +#: ../../faq/programming.rst:1257 +msgid "" +"The ``array`` module also provides methods for creating arrays of fixed " +"types with compact representations, but they are slower to index than " +"lists. Also note that `NumPy `_ and other third-party " +"packages define array-like structures with various characteristics as well." +msgstr "" + +#: ../../faq/programming.rst:1263 +msgid "" +"To get Lisp-style linked lists, you can emulate *cons cells* using tuples::" +msgstr "" + +#: ../../faq/programming.rst:1265 +msgid "lisp_list = (\"like\", (\"this\", (\"example\", None) ) )" +msgstr "" + +#: ../../faq/programming.rst:1267 +msgid "" +"If mutability is desired, you could use lists instead of tuples. Here the " +"analogue of a Lisp *car* is ``lisp_list[0]`` and the analogue of *cdr* is " +"``lisp_list[1]``. Only do this if you're sure you really need to, because " +"it's usually a lot slower than using Python lists." +msgstr "" + +#: ../../faq/programming.rst:1276 +msgid "How do I create a multidimensional list?" +msgstr "" + +#: ../../faq/programming.rst:1278 +msgid "You probably tried to make a multidimensional array like this::" +msgstr "" + +#: ../../faq/programming.rst:1280 +msgid ">>> A = [[None] * 2] * 3" +msgstr "" + +#: ../../faq/programming.rst:1282 +msgid "This looks correct if you print it:" +msgstr "" + +#: ../../faq/programming.rst:1288 +msgid "" +">>> A\n" +"[[None, None], [None, None], [None, None]]" +msgstr "" + +#: ../../faq/programming.rst:1293 +msgid "But when you assign a value, it shows up in multiple places:" +msgstr "" + +#: ../../faq/programming.rst:1299 +msgid "" +">>> A[0][0] = 5\n" +">>> A\n" +"[[5, None], [5, None], [5, None]]" +msgstr "" + +#: ../../faq/programming.rst:1305 +msgid "" +"The reason is that replicating a list with ``*`` doesn't create copies, it " +"only creates references to the existing objects. The ``*3`` creates a list " +"containing 3 references to the same list of length two. Changes to one row " +"will show in all rows, which is almost certainly not what you want." +msgstr "" + +#: ../../faq/programming.rst:1310 +msgid "" +"The suggested approach is to create a list of the desired length first and " +"then fill in each element with a newly created list::" +msgstr "" + +#: ../../faq/programming.rst:1313 +msgid "" +"A = [None] * 3\n" +"for i in range(3):\n" +" A[i] = [None] * 2" +msgstr "" + +#: ../../faq/programming.rst:1317 +msgid "" +"This generates a list containing 3 different lists of length two. You can " +"also use a list comprehension::" +msgstr "" + +#: ../../faq/programming.rst:1320 +msgid "" +"w, h = 2, 3\n" +"A = [[None] * w for i in range(h)]" +msgstr "" + +#: ../../faq/programming.rst:1323 +msgid "" +"Or, you can use an extension that provides a matrix datatype; `NumPy " +"`_ is the best known." +msgstr "" + +#: ../../faq/programming.rst:1328 +msgid "How do I apply a method or function to a sequence of objects?" +msgstr "" + +#: ../../faq/programming.rst:1330 +msgid "" +"To call a method or function and accumulate the return values in a list, a :" +"term:`list comprehension` is an elegant solution::" +msgstr "" + +#: ../../faq/programming.rst:1333 +msgid "" +"result = [obj.method() for obj in mylist]\n" +"\n" +"result = [function(obj) for obj in mylist]" +msgstr "" + +#: ../../faq/programming.rst:1337 +msgid "" +"To just run the method or function without saving the return values, a " +"plain :keyword:`for` loop will suffice::" +msgstr "" + +#: ../../faq/programming.rst:1340 +msgid "" +"for obj in mylist:\n" +" obj.method()\n" +"\n" +"for obj in mylist:\n" +" function(obj)" +msgstr "" + +#: ../../faq/programming.rst:1350 +msgid "" +"Why does a_tuple[i] += ['item'] raise an exception when the addition works?" +msgstr "" + +#: ../../faq/programming.rst:1352 +msgid "" +"This is because of a combination of the fact that augmented assignment " +"operators are *assignment* operators, and the difference between mutable and " +"immutable objects in Python." +msgstr "" + +#: ../../faq/programming.rst:1356 +msgid "" +"This discussion applies in general when augmented assignment operators are " +"applied to elements of a tuple that point to mutable objects, but we'll use " +"a ``list`` and ``+=`` as our exemplar." +msgstr "" + +#: ../../faq/programming.rst:1360 +msgid "If you wrote::" +msgstr "" + +#: ../../faq/programming.rst:1362 +msgid "" +">>> a_tuple = (1, 2)\n" +">>> a_tuple[0] += 1\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: 'tuple' object does not support item assignment" +msgstr "" + +#: ../../faq/programming.rst:1368 +msgid "" +"The reason for the exception should be immediately clear: ``1`` is added to " +"the object ``a_tuple[0]`` points to (``1``), producing the result object, " +"``2``, but when we attempt to assign the result of the computation, ``2``, " +"to element ``0`` of the tuple, we get an error because we can't change what " +"an element of a tuple points to." +msgstr "" + +#: ../../faq/programming.rst:1374 +msgid "" +"Under the covers, what this augmented assignment statement is doing is " +"approximately this::" +msgstr "" + +#: ../../faq/programming.rst:1377 +msgid "" +">>> result = a_tuple[0] + 1\n" +">>> a_tuple[0] = result\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: 'tuple' object does not support item assignment" +msgstr "" + +#: ../../faq/programming.rst:1383 +msgid "" +"It is the assignment part of the operation that produces the error, since a " +"tuple is immutable." +msgstr "" + +#: ../../faq/programming.rst:1386 +msgid "When you write something like::" +msgstr "" + +#: ../../faq/programming.rst:1388 +msgid "" +">>> a_tuple = (['foo'], 'bar')\n" +">>> a_tuple[0] += ['item']\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: 'tuple' object does not support item assignment" +msgstr "" + +#: ../../faq/programming.rst:1394 +msgid "" +"The exception is a bit more surprising, and even more surprising is the fact " +"that even though there was an error, the append worked::" +msgstr "" + +#: ../../faq/programming.rst:1397 +msgid "" +">>> a_tuple[0]\n" +"['foo', 'item']" +msgstr "" + +#: ../../faq/programming.rst:1400 +msgid "" +"To see why this happens, you need to know that (a) if an object implements " +"an :meth:`~object.__iadd__` magic method, it gets called when the ``+=`` " +"augmented assignment is executed, and its return value is what gets used in " +"the assignment statement; and (b) for lists, :meth:`!__iadd__` is equivalent " +"to calling :meth:`~sequence.extend` on the list and returning the list. " +"That's why we say that for lists, ``+=`` is a \"shorthand\" for :meth:`list." +"extend`::" +msgstr "" + +#: ../../faq/programming.rst:1408 +msgid "" +">>> a_list = []\n" +">>> a_list += [1]\n" +">>> a_list\n" +"[1]" +msgstr "" + +#: ../../faq/programming.rst:1413 +msgid "This is equivalent to::" +msgstr "" + +#: ../../faq/programming.rst:1415 +msgid "" +">>> result = a_list.__iadd__([1])\n" +">>> a_list = result" +msgstr "" + +#: ../../faq/programming.rst:1418 +msgid "" +"The object pointed to by a_list has been mutated, and the pointer to the " +"mutated object is assigned back to ``a_list``. The end result of the " +"assignment is a no-op, since it is a pointer to the same object that " +"``a_list`` was previously pointing to, but the assignment still happens." +msgstr "" + +#: ../../faq/programming.rst:1423 +msgid "Thus, in our tuple example what is happening is equivalent to::" +msgstr "" + +#: ../../faq/programming.rst:1425 +msgid "" +">>> result = a_tuple[0].__iadd__(['item'])\n" +">>> a_tuple[0] = result\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: 'tuple' object does not support item assignment" +msgstr "" + +#: ../../faq/programming.rst:1431 +msgid "" +"The :meth:`!__iadd__` succeeds, and thus the list is extended, but even " +"though ``result`` points to the same object that ``a_tuple[0]`` already " +"points to, that final assignment still results in an error, because tuples " +"are immutable." +msgstr "" + +#: ../../faq/programming.rst:1437 +msgid "" +"I want to do a complicated sort: can you do a Schwartzian Transform in " +"Python?" +msgstr "" + +#: ../../faq/programming.rst:1439 +msgid "" +"The technique, attributed to Randal Schwartz of the Perl community, sorts " +"the elements of a list by a metric which maps each element to its \"sort " +"value\". In Python, use the ``key`` argument for the :meth:`list.sort` " +"method::" +msgstr "" + +#: ../../faq/programming.rst:1443 +msgid "" +"Isorted = L[:]\n" +"Isorted.sort(key=lambda s: int(s[10:15]))" +msgstr "" + +#: ../../faq/programming.rst:1448 +msgid "How can I sort one list by values from another list?" +msgstr "" + +#: ../../faq/programming.rst:1450 +msgid "" +"Merge them into an iterator of tuples, sort the resulting list, and then " +"pick out the element you want." +msgstr "" + +#: ../../faq/programming.rst:1465 +msgid "Objects" +msgstr "" + +#: ../../faq/programming.rst:1468 +msgid "What is a class?" +msgstr "" + +#: ../../faq/programming.rst:1470 +msgid "" +"A class is the particular object type created by executing a class " +"statement. Class objects are used as templates to create instance objects, " +"which embody both the data (attributes) and code (methods) specific to a " +"datatype." +msgstr "" + +#: ../../faq/programming.rst:1474 +msgid "" +"A class can be based on one or more other classes, called its base " +"class(es). It then inherits the attributes and methods of its base classes. " +"This allows an object model to be successively refined by inheritance. You " +"might have a generic ``Mailbox`` class that provides basic accessor methods " +"for a mailbox, and subclasses such as ``MboxMailbox``, ``MaildirMailbox``, " +"``OutlookMailbox`` that handle various specific mailbox formats." +msgstr "" + +#: ../../faq/programming.rst:1483 +msgid "What is a method?" +msgstr "" + +#: ../../faq/programming.rst:1485 +msgid "" +"A method is a function on some object ``x`` that you normally call as ``x." +"name(arguments...)``. Methods are defined as functions inside the class " +"definition::" +msgstr "" + +#: ../../faq/programming.rst:1489 +msgid "" +"class C:\n" +" def meth(self, arg):\n" +" return arg * 2 + self.attribute" +msgstr "" + +#: ../../faq/programming.rst:1495 +msgid "What is self?" +msgstr "" + +#: ../../faq/programming.rst:1497 +msgid "" +"Self is merely a conventional name for the first argument of a method. A " +"method defined as ``meth(self, a, b, c)`` should be called as ``x.meth(a, b, " +"c)`` for some instance ``x`` of the class in which the definition occurs; " +"the called method will think it is called as ``meth(x, a, b, c)``." +msgstr "" + +#: ../../faq/programming.rst:1502 +msgid "See also :ref:`why-self`." +msgstr "" + +#: ../../faq/programming.rst:1506 +msgid "" +"How do I check if an object is an instance of a given class or of a subclass " +"of it?" +msgstr "" + +#: ../../faq/programming.rst:1508 +msgid "" +"Use the built-in function :func:`isinstance(obj, cls) `. You " +"can check if an object is an instance of any of a number of classes by " +"providing a tuple instead of a single class, for example, ``isinstance(obj, " +"(class1, class2, ...))``, and can also check whether an object is one of " +"Python's built-in types, for example, ``isinstance(obj, str)`` or " +"``isinstance(obj, (int, float, complex))``." +msgstr "" + +#: ../../faq/programming.rst:1515 +msgid "" +"Note that :func:`isinstance` also checks for virtual inheritance from an :" +"term:`abstract base class`. So, the test will return ``True`` for a " +"registered class even if hasn't directly or indirectly inherited from it. " +"To test for \"true inheritance\", scan the :term:`method resolution order` " +"(MRO) of the class:" +msgstr "" + +#: ../../faq/programming.rst:1521 +msgid "" +"from collections.abc import Mapping\n" +"\n" +"class P:\n" +" pass\n" +"\n" +"class C(P):\n" +" pass\n" +"\n" +"Mapping.register(P)" +msgstr "" + +#: ../../faq/programming.rst:1533 +msgid "" +">>> c = C()\n" +">>> isinstance(c, C) # direct\n" +"True\n" +">>> isinstance(c, P) # indirect\n" +"True\n" +">>> isinstance(c, Mapping) # virtual\n" +"True\n" +"\n" +"# Actual inheritance chain\n" +">>> type(c).__mro__\n" +"(, , )\n" +"\n" +"# Test for \"true inheritance\"\n" +">>> Mapping in type(c).__mro__\n" +"False" +msgstr "" + +#: ../../faq/programming.rst:1551 +msgid "" +"Note that most programs do not use :func:`isinstance` on user-defined " +"classes very often. If you are developing the classes yourself, a more " +"proper object-oriented style is to define methods on the classes that " +"encapsulate a particular behaviour, instead of checking the object's class " +"and doing a different thing based on what class it is. For example, if you " +"have a function that does something::" +msgstr "" + +#: ../../faq/programming.rst:1558 +msgid "" +"def search(obj):\n" +" if isinstance(obj, Mailbox):\n" +" ... # code to search a mailbox\n" +" elif isinstance(obj, Document):\n" +" ... # code to search a document\n" +" elif ..." +msgstr "" + +#: ../../faq/programming.rst:1565 +msgid "" +"A better approach is to define a ``search()`` method on all the classes and " +"just call it::" +msgstr "" + +#: ../../faq/programming.rst:1568 +msgid "" +"class Mailbox:\n" +" def search(self):\n" +" ... # code to search a mailbox\n" +"\n" +"class Document:\n" +" def search(self):\n" +" ... # code to search a document\n" +"\n" +"obj.search()" +msgstr "" + +#: ../../faq/programming.rst:1580 +msgid "What is delegation?" +msgstr "" + +#: ../../faq/programming.rst:1582 +msgid "" +"Delegation is an object-oriented technique (also called a design pattern). " +"Let's say you have an object ``x`` and want to change the behaviour of just " +"one of its methods. You can create a new class that provides a new " +"implementation of the method you're interested in changing and delegates all " +"other methods to the corresponding method of ``x``." +msgstr "" + +#: ../../faq/programming.rst:1588 +msgid "" +"Python programmers can easily implement delegation. For example, the " +"following class implements a class that behaves like a file but converts all " +"written data to uppercase::" +msgstr "" + +#: ../../faq/programming.rst:1592 +msgid "" +"class UpperOut:\n" +"\n" +" def __init__(self, outfile):\n" +" self._outfile = outfile\n" +"\n" +" def write(self, s):\n" +" self._outfile.write(s.upper())\n" +"\n" +" def __getattr__(self, name):\n" +" return getattr(self._outfile, name)" +msgstr "" + +#: ../../faq/programming.rst:1603 +msgid "" +"Here the ``UpperOut`` class redefines the ``write()`` method to convert the " +"argument string to uppercase before calling the underlying ``self._outfile." +"write()`` method. All other methods are delegated to the underlying ``self." +"_outfile`` object. The delegation is accomplished via the :meth:`~object." +"__getattr__` method; consult :ref:`the language reference ` for more information about controlling attribute access." +msgstr "" + +#: ../../faq/programming.rst:1610 +msgid "" +"Note that for more general cases delegation can get trickier. When " +"attributes must be set as well as retrieved, the class must define a :meth:" +"`~object.__setattr__` method too, and it must do so carefully. The basic " +"implementation of :meth:`!__setattr__` is roughly equivalent to the " +"following::" +msgstr "" + +#: ../../faq/programming.rst:1615 +msgid "" +"class X:\n" +" ...\n" +" def __setattr__(self, name, value):\n" +" self.__dict__[name] = value\n" +" ..." +msgstr "" + +#: ../../faq/programming.rst:1621 +msgid "" +"Many :meth:`~object.__setattr__` implementations call :meth:`!object." +"__setattr__` to set an attribute on self without causing infinite recursion::" +msgstr "" + +#: ../../faq/programming.rst:1624 +msgid "" +"class X:\n" +" def __setattr__(self, name, value):\n" +" # Custom logic here...\n" +" object.__setattr__(self, name, value)" +msgstr "" + +#: ../../faq/programming.rst:1629 +msgid "" +"Alternatively, it is possible to set attributes by inserting entries into :" +"attr:`self.__dict__ ` directly." +msgstr "" + +#: ../../faq/programming.rst:1634 +msgid "" +"How do I call a method defined in a base class from a derived class that " +"extends it?" +msgstr "" + +#: ../../faq/programming.rst:1636 +msgid "Use the built-in :func:`super` function::" +msgstr "" + +#: ../../faq/programming.rst:1638 +msgid "" +"class Derived(Base):\n" +" def meth(self):\n" +" super().meth() # calls Base.meth" +msgstr "" + +#: ../../faq/programming.rst:1642 +msgid "" +"In the example, :func:`super` will automatically determine the instance from " +"which it was called (the ``self`` value), look up the :term:`method " +"resolution order` (MRO) with ``type(self).__mro__``, and return the next in " +"line after ``Derived`` in the MRO: ``Base``." +msgstr "" + +#: ../../faq/programming.rst:1649 +msgid "How can I organize my code to make it easier to change the base class?" +msgstr "" + +#: ../../faq/programming.rst:1651 +msgid "" +"You could assign the base class to an alias and derive from the alias. Then " +"all you have to change is the value assigned to the alias. Incidentally, " +"this trick is also handy if you want to decide dynamically (such as " +"depending on availability of resources) which base class to use. Example::" +msgstr "" + +#: ../../faq/programming.rst:1656 +msgid "" +"class Base:\n" +" ...\n" +"\n" +"BaseAlias = Base\n" +"\n" +"class Derived(BaseAlias):\n" +" ..." +msgstr "" + +#: ../../faq/programming.rst:1666 +msgid "How do I create static class data and static class methods?" +msgstr "" + +#: ../../faq/programming.rst:1668 +msgid "" +"Both static data and static methods (in the sense of C++ or Java) are " +"supported in Python." +msgstr "" + +#: ../../faq/programming.rst:1671 +msgid "" +"For static data, simply define a class attribute. To assign a new value to " +"the attribute, you have to explicitly use the class name in the assignment::" +msgstr "" + +#: ../../faq/programming.rst:1674 +msgid "" +"class C:\n" +" count = 0 # number of times C.__init__ called\n" +"\n" +" def __init__(self):\n" +" C.count = C.count + 1\n" +"\n" +" def getcount(self):\n" +" return C.count # or return self.count" +msgstr "" + +#: ../../faq/programming.rst:1683 +msgid "" +"``c.count`` also refers to ``C.count`` for any ``c`` such that " +"``isinstance(c, C)`` holds, unless overridden by ``c`` itself or by some " +"class on the base-class search path from ``c.__class__`` back to ``C``." +msgstr "" + +#: ../../faq/programming.rst:1687 +msgid "" +"Caution: within a method of C, an assignment like ``self.count = 42`` " +"creates a new and unrelated instance named \"count\" in ``self``'s own " +"dict. Rebinding of a class-static data name must always specify the class " +"whether inside a method or not::" +msgstr "" + +#: ../../faq/programming.rst:1692 +msgid "C.count = 314" +msgstr "" + +#: ../../faq/programming.rst:1694 +msgid "Static methods are possible::" +msgstr "" + +#: ../../faq/programming.rst:1696 +msgid "" +"class C:\n" +" @staticmethod\n" +" def static(arg1, arg2, arg3):\n" +" # No 'self' parameter!\n" +" ..." +msgstr "" + +#: ../../faq/programming.rst:1702 +msgid "" +"However, a far more straightforward way to get the effect of a static method " +"is via a simple module-level function::" +msgstr "" + +#: ../../faq/programming.rst:1705 +msgid "" +"def getcount():\n" +" return C.count" +msgstr "" + +#: ../../faq/programming.rst:1708 +msgid "" +"If your code is structured so as to define one class (or tightly related " +"class hierarchy) per module, this supplies the desired encapsulation." +msgstr "" + +#: ../../faq/programming.rst:1713 +msgid "How can I overload constructors (or methods) in Python?" +msgstr "" + +#: ../../faq/programming.rst:1715 +msgid "" +"This answer actually applies to all methods, but the question usually comes " +"up first in the context of constructors." +msgstr "" + +#: ../../faq/programming.rst:1718 +msgid "In C++ you'd write:" +msgstr "" + +#: ../../faq/programming.rst:1720 +msgid "" +"class C {\n" +" C() { cout << \"No arguments\\n\"; }\n" +" C(int i) { cout << \"Argument is \" << i << \"\\n\"; }\n" +"}" +msgstr "" + +#: ../../faq/programming.rst:1727 +msgid "" +"In Python you have to write a single constructor that catches all cases " +"using default arguments. For example::" +msgstr "" + +#: ../../faq/programming.rst:1730 +msgid "" +"class C:\n" +" def __init__(self, i=None):\n" +" if i is None:\n" +" print(\"No arguments\")\n" +" else:\n" +" print(\"Argument is\", i)" +msgstr "" + +#: ../../faq/programming.rst:1737 +msgid "This is not entirely equivalent, but close enough in practice." +msgstr "" + +#: ../../faq/programming.rst:1739 +msgid "You could also try a variable-length argument list, for example::" +msgstr "" + +#: ../../faq/programming.rst:1741 +msgid "" +"def __init__(self, *args):\n" +" ..." +msgstr "" + +#: ../../faq/programming.rst:1744 +msgid "The same approach works for all method definitions." +msgstr "" + +#: ../../faq/programming.rst:1748 +msgid "I try to use __spam and I get an error about _SomeClassName__spam." +msgstr "" + +#: ../../faq/programming.rst:1750 +msgid "" +"Variable names with double leading underscores are \"mangled\" to provide a " +"simple but effective way to define class private variables. Any identifier " +"of the form ``__spam`` (at least two leading underscores, at most one " +"trailing underscore) is textually replaced with ``_classname__spam``, where " +"``classname`` is the current class name with any leading underscores " +"stripped." +msgstr "" + +#: ../../faq/programming.rst:1756 +msgid "" +"The identifier can be used unchanged within the class, but to access it " +"outside the class, the mangled name must be used:" +msgstr "" + +#: ../../faq/programming.rst:1759 +msgid "" +"class A:\n" +" def __one(self):\n" +" return 1\n" +" def two(self):\n" +" return 2 * self.__one()\n" +"\n" +"class B(A):\n" +" def three(self):\n" +" return 3 * self._A__one()\n" +"\n" +"four = 4 * A()._A__one()" +msgstr "" + +#: ../../faq/programming.rst:1773 +msgid "" +"In particular, this does not guarantee privacy since an outside user can " +"still deliberately access the private attribute; many Python programmers " +"never bother to use private variable names at all." +msgstr "" + +#: ../../faq/programming.rst:1779 +msgid "" +"The :ref:`private name mangling specifications ` for " +"details and special cases." +msgstr "" + +#: ../../faq/programming.rst:1784 +msgid "My class defines __del__ but it is not called when I delete the object." +msgstr "" + +#: ../../faq/programming.rst:1786 +msgid "There are several possible reasons for this." +msgstr "" + +#: ../../faq/programming.rst:1788 +msgid "" +"The :keyword:`del` statement does not necessarily call :meth:`~object." +"__del__` -- it simply decrements the object's reference count, and if this " +"reaches zero :meth:`!__del__` is called." +msgstr "" + +#: ../../faq/programming.rst:1792 +msgid "" +"If your data structures contain circular links (for example, a tree where " +"each child has a parent reference and each parent has a list of children) " +"the reference counts will never go back to zero. Once in a while Python " +"runs an algorithm to detect such cycles, but the garbage collector might run " +"some time after the last reference to your data structure vanishes, so your :" +"meth:`!__del__` method may be called at an inconvenient and random time. " +"This is inconvenient if you're trying to reproduce a problem. Worse, the " +"order in which object's :meth:`!__del__` methods are executed is arbitrary. " +"You can run :func:`gc.collect` to force a collection, but there *are* " +"pathological cases where objects will never be collected." +msgstr "" + +#: ../../faq/programming.rst:1803 +msgid "" +"Despite the cycle collector, it's still a good idea to define an explicit " +"``close()`` method on objects to be called whenever you're done with them. " +"The ``close()`` method can then remove attributes that refer to subobjects. " +"Don't call :meth:`!__del__` directly -- :meth:`!__del__` should call " +"``close()`` and ``close()`` should make sure that it can be called more than " +"once for the same object." +msgstr "" + +#: ../../faq/programming.rst:1810 +msgid "" +"Another way to avoid cyclical references is to use the :mod:`weakref` " +"module, which allows you to point to objects without incrementing their " +"reference count. Tree data structures, for instance, should use weak " +"references for their parent and sibling references (if they need them!)." +msgstr "" + +#: ../../faq/programming.rst:1823 +msgid "" +"Finally, if your :meth:`!__del__` method raises an exception, a warning " +"message is printed to :data:`sys.stderr`." +msgstr "" + +#: ../../faq/programming.rst:1828 +msgid "How do I get a list of all instances of a given class?" +msgstr "" + +#: ../../faq/programming.rst:1830 +msgid "" +"Python does not keep track of all instances of a class (or of a built-in " +"type). You can program the class's constructor to keep track of all " +"instances by keeping a list of weak references to each instance." +msgstr "" + +#: ../../faq/programming.rst:1836 +msgid "Why does the result of ``id()`` appear to be not unique?" +msgstr "" + +#: ../../faq/programming.rst:1838 +msgid "" +"The :func:`id` builtin returns an integer that is guaranteed to be unique " +"during the lifetime of the object. Since in CPython, this is the object's " +"memory address, it happens frequently that after an object is deleted from " +"memory, the next freshly created object is allocated at the same position in " +"memory. This is illustrated by this example:" +msgstr "" + +#: ../../faq/programming.rst:1849 +msgid "" +"The two ids belong to different integer objects that are created before, and " +"deleted immediately after execution of the ``id()`` call. To be sure that " +"objects whose id you want to examine are still alive, create another " +"reference to the object:" +msgstr "" + +#: ../../faq/programming.rst:1864 +msgid "When can I rely on identity tests with the *is* operator?" +msgstr "" + +#: ../../faq/programming.rst:1866 +msgid "" +"The ``is`` operator tests for object identity. The test ``a is b`` is " +"equivalent to ``id(a) == id(b)``." +msgstr "" + +#: ../../faq/programming.rst:1869 +msgid "" +"The most important property of an identity test is that an object is always " +"identical to itself, ``a is a`` always returns ``True``. Identity tests are " +"usually faster than equality tests. And unlike equality tests, identity " +"tests are guaranteed to return a boolean ``True`` or ``False``." +msgstr "" + +#: ../../faq/programming.rst:1874 +msgid "" +"However, identity tests can *only* be substituted for equality tests when " +"object identity is assured. Generally, there are three circumstances where " +"identity is guaranteed:" +msgstr "" + +#: ../../faq/programming.rst:1878 +msgid "" +"Assignments create new names but do not change object identity. After the " +"assignment ``new = old``, it is guaranteed that ``new is old``." +msgstr "" + +#: ../../faq/programming.rst:1881 +msgid "" +"Putting an object in a container that stores object references does not " +"change object identity. After the list assignment ``s[0] = x``, it is " +"guaranteed that ``s[0] is x``." +msgstr "" + +#: ../../faq/programming.rst:1885 +msgid "" +"If an object is a singleton, it means that only one instance of that object " +"can exist. After the assignments ``a = None`` and ``b = None``, it is " +"guaranteed that ``a is b`` because ``None`` is a singleton." +msgstr "" + +#: ../../faq/programming.rst:1889 +msgid "" +"In most other circumstances, identity tests are inadvisable and equality " +"tests are preferred. In particular, identity tests should not be used to " +"check constants such as :class:`int` and :class:`str` which aren't " +"guaranteed to be singletons::" +msgstr "" + +#: ../../faq/programming.rst:1894 +msgid "" +">>> a = 10_000_000\n" +">>> b = 5_000_000\n" +">>> c = b + 5_000_000\n" +">>> a is c\n" +"False\n" +"\n" +">>> a = 'Python'\n" +">>> b = 'Py'\n" +">>> c = b + 'thon'\n" +">>> a is c\n" +"False" +msgstr "" + +#: ../../faq/programming.rst:1906 +msgid "Likewise, new instances of mutable containers are never identical::" +msgstr "" + +#: ../../faq/programming.rst:1908 +msgid "" +">>> a = []\n" +">>> b = []\n" +">>> a is b\n" +"False" +msgstr "" + +#: ../../faq/programming.rst:1913 +msgid "" +"In the standard library code, you will see several common patterns for " +"correctly using identity tests:" +msgstr "" + +#: ../../faq/programming.rst:1916 +msgid "" +"As recommended by :pep:`8`, an identity test is the preferred way to check " +"for ``None``. This reads like plain English in code and avoids confusion " +"with other objects that may have boolean values that evaluate to false." +msgstr "" + +#: ../../faq/programming.rst:1920 +msgid "" +"Detecting optional arguments can be tricky when ``None`` is a valid input " +"value. In those situations, you can create a singleton sentinel object " +"guaranteed to be distinct from other objects. For example, here is how to " +"implement a method that behaves like :meth:`dict.pop`:" +msgstr "" + +#: ../../faq/programming.rst:1925 +msgid "" +"_sentinel = sentinel('_sentinel')\n" +"\n" +"def pop(self, key, default=_sentinel):\n" +" if key in self:\n" +" value = self[key]\n" +" del self[key]\n" +" return value\n" +" if default is _sentinel:\n" +" raise KeyError(key)\n" +" return default" +msgstr "" + +#: ../../faq/programming.rst:1938 +msgid "" +"Container implementations sometimes need to augment equality tests with " +"identity tests. This prevents the code from being confused by objects such " +"as ``float('NaN')`` that are not equal to themselves." +msgstr "" + +#: ../../faq/programming.rst:1942 +msgid "" +"For example, here is the implementation of :meth:`!collections.abc.Sequence." +"__contains__`::" +msgstr "" + +#: ../../faq/programming.rst:1945 +msgid "" +"def __contains__(self, value):\n" +" for v in self:\n" +" if v is value or v == value:\n" +" return True\n" +" return False" +msgstr "" + +#: ../../faq/programming.rst:1953 +msgid "" +"How can a subclass control what data is stored in an immutable instance?" +msgstr "" + +#: ../../faq/programming.rst:1955 +msgid "" +"When subclassing an immutable type, override the :meth:`~object.__new__` " +"method instead of the :meth:`~object.__init__` method. The latter only runs " +"*after* an instance is created, which is too late to alter data in an " +"immutable instance." +msgstr "" + +#: ../../faq/programming.rst:1960 +msgid "" +"All of these immutable classes have a different signature than their parent " +"class:" +msgstr "" + +#: ../../faq/programming.rst:1963 +msgid "" +"import datetime as dt\n" +"\n" +"class FirstOfMonthDate(dt.date):\n" +" \"Always choose the first day of the month\"\n" +" def __new__(cls, year, month, day):\n" +" return super().__new__(cls, year, month, 1)\n" +"\n" +"class NamedInt(int):\n" +" \"Allow text names for some numbers\"\n" +" xlat = {'zero': 0, 'one': 1, 'ten': 10}\n" +" def __new__(cls, value):\n" +" value = cls.xlat.get(value, value)\n" +" return super().__new__(cls, value)\n" +"\n" +"class TitleStr(str):\n" +" \"Convert str to name suitable for a URL path\"\n" +" def __new__(cls, s):\n" +" s = s.lower().replace(' ', '-')\n" +" s = ''.join([c for c in s if c.isalnum() or c == '-'])\n" +" return super().__new__(cls, s)" +msgstr "" + +#: ../../faq/programming.rst:1986 +msgid "The classes can be used like this:" +msgstr "" + +#: ../../faq/programming.rst:1988 +msgid "" +">>> FirstOfMonthDate(2012, 2, 14)\n" +"FirstOfMonthDate(2012, 2, 1)\n" +">>> NamedInt('ten')\n" +"10\n" +">>> NamedInt(20)\n" +"20\n" +">>> TitleStr('Blog: Why Python Rocks')\n" +"'blog-why-python-rocks'" +msgstr "" + +#: ../../faq/programming.rst:2003 +msgid "How do I cache method calls?" +msgstr "" + +#: ../../faq/programming.rst:2005 +msgid "" +"The two principal tools for caching methods are :deco:`functools." +"cached_property` and :deco:`functools.lru_cache`. The former stores results " +"at the instance level and the latter at the class level." +msgstr "" + +#: ../../faq/programming.rst:2010 +msgid "" +"The ``cached_property`` approach only works with methods that do not take " +"any arguments. It does not create a reference to the instance. The cached " +"method result will be kept only as long as the instance is alive." +msgstr "" + +#: ../../faq/programming.rst:2014 +msgid "" +"The advantage is that when an instance is no longer used, the cached method " +"result will be released right away. The disadvantage is that if instances " +"accumulate, so too will the accumulated method results. They can grow " +"without bound." +msgstr "" + +#: ../../faq/programming.rst:2019 +msgid "" +"The ``lru_cache`` approach works with methods that have :term:`hashable` " +"arguments. It creates a reference to the instance unless special efforts " +"are made to pass in weak references." +msgstr "" + +#: ../../faq/programming.rst:2023 +msgid "" +"The advantage of the least recently used algorithm is that the cache is " +"bounded by the specified *maxsize*. The disadvantage is that instances are " +"kept alive until they age out of the cache or until the cache is cleared." +msgstr "" + +#: ../../faq/programming.rst:2028 +msgid "This example shows the various techniques::" +msgstr "" + +#: ../../faq/programming.rst:2030 +msgid "" +"class Weather:\n" +" \"Lookup weather information on a government website\"\n" +"\n" +" def __init__(self, station_id):\n" +" self._station_id = station_id\n" +" # The _station_id is private and immutable\n" +"\n" +" def current_temperature(self):\n" +" \"Latest hourly observation\"\n" +" # Do not cache this because old results\n" +" # can be out of date.\n" +"\n" +" @cached_property\n" +" def location(self):\n" +" \"Return the longitude/latitude coordinates of the station\"\n" +" # Result only depends on the station_id\n" +"\n" +" @lru_cache(maxsize=20)\n" +" def historic_rainfall(self, date, units='mm'):\n" +" \"Rainfall on a given date\"\n" +" # Depends on the station_id, date, and units." +msgstr "" + +#: ../../faq/programming.rst:2052 +msgid "" +"The above example assumes that the *station_id* never changes. If the " +"relevant instance attributes are mutable, the ``cached_property`` approach " +"can't be made to work because it cannot detect changes to the attributes." +msgstr "" + +#: ../../faq/programming.rst:2057 +msgid "" +"To make the ``lru_cache`` approach work when the *station_id* is mutable, " +"the class needs to define the :meth:`~object.__eq__` and :meth:`~object." +"__hash__` methods so that the cache can detect relevant attribute updates::" +msgstr "" + +#: ../../faq/programming.rst:2061 +msgid "" +"class Weather:\n" +" \"Example with a mutable station identifier\"\n" +"\n" +" def __init__(self, station_id):\n" +" self.station_id = station_id\n" +"\n" +" def change_station(self, station_id):\n" +" self.station_id = station_id\n" +"\n" +" def __eq__(self, other):\n" +" return self.station_id == other.station_id\n" +"\n" +" def __hash__(self):\n" +" return hash(self.station_id)\n" +"\n" +" @lru_cache(maxsize=20)\n" +" def historic_rainfall(self, date, units='cm'):\n" +" 'Rainfall on a given date'\n" +" # Depends on the station_id, date, and units." +msgstr "" + +#: ../../faq/programming.rst:2083 +msgid "Modules" +msgstr "" + +#: ../../faq/programming.rst:2086 +msgid "How do I create a .pyc file?" +msgstr "" + +#: ../../faq/programming.rst:2088 +msgid "" +"When a module is imported for the first time (or when the source file has " +"changed since the current compiled file was created) a ``.pyc`` file " +"containing the compiled code should be created in a ``__pycache__`` " +"subdirectory of the directory containing the ``.py`` file. The ``.pyc`` " +"file will have a filename that starts with the same name as the ``.py`` " +"file, and ends with ``.pyc``, with a middle component that depends on the " +"particular ``python`` binary that created it. (See :pep:`3147` for details.)" +msgstr "" + +#: ../../faq/programming.rst:2096 +msgid "" +"One reason that a ``.pyc`` file may not be created is a permissions problem " +"with the directory containing the source file, meaning that the " +"``__pycache__`` subdirectory cannot be created. This can happen, for " +"example, if you develop as one user but run as another, such as if you are " +"testing with a web server." +msgstr "" + +#: ../../faq/programming.rst:2101 +msgid "" +"Unless the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable is set, " +"creation of a .pyc file is automatic if you're importing a module and Python " +"has the ability (permissions, free space, and so on) to create a " +"``__pycache__`` subdirectory and write the compiled module to that " +"subdirectory." +msgstr "" + +#: ../../faq/programming.rst:2106 +msgid "" +"Running Python on a top-level script is not considered an import and no ``." +"pyc`` will be created. For example, if you have a top-level module ``foo." +"py`` that imports another module ``xyz.py``, when you run ``foo`` (by typing " +"``python foo.py`` as a shell command), a ``.pyc`` will be created for " +"``xyz`` because ``xyz`` is imported, but no ``.pyc`` file will be created " +"for ``foo`` since ``foo.py`` isn't being imported." +msgstr "" + +#: ../../faq/programming.rst:2113 +msgid "" +"If you need to create a ``.pyc`` file for ``foo`` -- that is, to create a ``." +"pyc`` file for a module that is not imported -- you can, using the :mod:" +"`py_compile` and :mod:`compileall` modules." +msgstr "" + +#: ../../faq/programming.rst:2117 +msgid "" +"The :mod:`py_compile` module can manually compile any module. One way is to " +"use the ``compile()`` function in that module interactively::" +msgstr "" + +#: ../../faq/programming.rst:2120 +msgid "" +">>> import py_compile\n" +">>> py_compile.compile('foo.py')" +msgstr "" + +#: ../../faq/programming.rst:2123 +msgid "" +"This will write the ``.pyc`` to a ``__pycache__`` subdirectory in the same " +"location as ``foo.py`` (or you can override that with the optional parameter " +"*cfile*)." +msgstr "" + +#: ../../faq/programming.rst:2127 +msgid "" +"You can also automatically compile all files in a directory or directories " +"using the :mod:`compileall` module. You can do it from the shell prompt by " +"running ``compileall.py`` and providing the path of a directory containing " +"Python files to compile::" +msgstr "" + +#: ../../faq/programming.rst:2132 +msgid "python -m compileall ." +msgstr "" + +#: ../../faq/programming.rst:2136 +msgid "How do I find the current module name?" +msgstr "" + +#: ../../faq/programming.rst:2138 +msgid "" +"A module can find out its own module name by looking at the predefined " +"global variable ``__name__``. If this has the value ``'__main__'``, the " +"program is running as a script. Many modules that are usually used by " +"importing them also provide a command-line interface or a self-test, and " +"only execute this code after checking ``__name__``::" +msgstr "" + +#: ../../faq/programming.rst:2144 +msgid "" +"def main():\n" +" print('Running test...')\n" +" ...\n" +"\n" +"if __name__ == '__main__':\n" +" main()" +msgstr "" + +#: ../../faq/programming.rst:2153 +msgid "How can I have modules that mutually import each other?" +msgstr "" + +#: ../../faq/programming.rst:2155 +msgid "Suppose you have the following modules:" +msgstr "" + +#: ../../faq/programming.rst:2157 +msgid ":file:`foo.py`::" +msgstr "" + +#: ../../faq/programming.rst:2159 +msgid "" +"from bar import bar_var\n" +"foo_var = 1" +msgstr "" + +#: ../../faq/programming.rst:2162 +msgid ":file:`bar.py`::" +msgstr "" + +#: ../../faq/programming.rst:2164 +msgid "" +"from foo import foo_var\n" +"bar_var = 2" +msgstr "" + +#: ../../faq/programming.rst:2167 +msgid "The problem is that the interpreter will perform the following steps:" +msgstr "" + +#: ../../faq/programming.rst:2169 +msgid "main imports ``foo``" +msgstr "" + +#: ../../faq/programming.rst:2170 +msgid "Empty globals for ``foo`` are created" +msgstr "" + +#: ../../faq/programming.rst:2171 +msgid "``foo`` is compiled and starts executing" +msgstr "" + +#: ../../faq/programming.rst:2172 +msgid "``foo`` imports ``bar``" +msgstr "" + +#: ../../faq/programming.rst:2173 +msgid "Empty globals for ``bar`` are created" +msgstr "" + +#: ../../faq/programming.rst:2174 +msgid "``bar`` is compiled and starts executing" +msgstr "" + +#: ../../faq/programming.rst:2175 +msgid "" +"``bar`` imports ``foo`` (which is a no-op since there already is a module " +"named ``foo``)" +msgstr "" + +#: ../../faq/programming.rst:2176 +msgid "" +"The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set " +"``bar.foo_var = foo.foo_var``" +msgstr "" + +#: ../../faq/programming.rst:2178 +msgid "" +"The last step fails, because Python isn't done with interpreting ``foo`` yet " +"and the global symbol dictionary for ``foo`` is still empty." +msgstr "" + +#: ../../faq/programming.rst:2181 +msgid "" +"The same thing happens when you use ``import foo``, and then try to access " +"``foo.foo_var`` in global code." +msgstr "" + +#: ../../faq/programming.rst:2184 +msgid "There are (at least) three possible workarounds for this problem." +msgstr "" + +#: ../../faq/programming.rst:2186 +msgid "" +"Guido van Rossum recommends avoiding all uses of ``from import ..." +"``, and placing all code inside functions. Initializations of global " +"variables and class variables should use constants or built-in functions " +"only. This means everything from an imported module is referenced as " +"``.``." +msgstr "" + +#: ../../faq/programming.rst:2191 +msgid "" +"Jim Roskind suggests performing steps in the following order in each module:" +msgstr "" + +#: ../../faq/programming.rst:2193 +msgid "" +"exports (globals, functions, and classes that don't need imported base " +"classes)" +msgstr "" + +#: ../../faq/programming.rst:2195 +msgid "``import`` statements" +msgstr "" + +#: ../../faq/programming.rst:2196 +msgid "" +"active code (including globals that are initialized from imported values)." +msgstr "" + +#: ../../faq/programming.rst:2198 +msgid "" +"Van Rossum doesn't like this approach much because the imports appear in a " +"strange place, but it does work." +msgstr "" + +#: ../../faq/programming.rst:2201 +msgid "" +"Matthias Urlichs recommends restructuring your code so that the recursive " +"import is not necessary in the first place." +msgstr "" + +#: ../../faq/programming.rst:2204 +msgid "These solutions are not mutually exclusive." +msgstr "" + +#: ../../faq/programming.rst:2208 +msgid "__import__('x.y.z') returns ; how do I get z?" +msgstr "" + +#: ../../faq/programming.rst:2210 +msgid "" +"Consider using the convenience function :func:`~importlib.import_module` " +"from :mod:`importlib` instead::" +msgstr "" + +#: ../../faq/programming.rst:2213 +msgid "z = importlib.import_module('x.y.z')" +msgstr "" + +#: ../../faq/programming.rst:2217 +msgid "" +"When I edit an imported module and reimport it, the changes don't show up. " +"Why does this happen?" +msgstr "" + +#: ../../faq/programming.rst:2219 +msgid "" +"For reasons of efficiency as well as consistency, Python only reads the " +"module file on the first time a module is imported. If it didn't, in a " +"program consisting of many modules where each one imports the same basic " +"module, the basic module would be parsed and re-parsed many times. To force " +"re-reading of a changed module, do this::" +msgstr "" + +#: ../../faq/programming.rst:2225 +msgid "" +"import importlib\n" +"import modname\n" +"importlib.reload(modname)" +msgstr "" + +#: ../../faq/programming.rst:2229 +msgid "" +"Warning: this technique is not 100% fool-proof. In particular, modules " +"containing statements like::" +msgstr "" + +#: ../../faq/programming.rst:2232 +msgid "from modname import some_objects" +msgstr "" + +#: ../../faq/programming.rst:2234 +msgid "" +"will continue to work with the old version of the imported objects. If the " +"module contains class definitions, existing class instances will *not* be " +"updated to use the new class definition. This can result in the following " +"paradoxical behaviour::" +msgstr "" + +#: ../../faq/programming.rst:2239 +msgid "" +">>> import importlib\n" +">>> import cls\n" +">>> c = cls.C() # Create an instance of C\n" +">>> importlib.reload(cls)\n" +"\n" +">>> isinstance(c, cls.C) # isinstance is false?!?\n" +"False" +msgstr "" + +#: ../../faq/programming.rst:2247 +msgid "" +"The nature of the problem is made clear if you print out the \"identity\" of " +"the class objects::" +msgstr "" + +#: ../../faq/programming.rst:2250 +msgid "" +">>> hex(id(c.__class__))\n" +"'0x7352a0'\n" +">>> hex(id(cls.C))\n" +"'0x4198d0'" +msgstr "" + +#: ../../faq/programming.rst:409 +msgid "argument" +msgstr "" + +#: ../../faq/programming.rst:409 +msgid "difference from parameter" +msgstr "" + +#: ../../faq/programming.rst:409 +msgid "parameter" +msgstr "" + +#: ../../faq/programming.rst:409 +msgid "difference from argument" +msgstr "" diff --git a/glossary.po b/glossary.po index 9ed095fa..5f8d7e51 100644 --- a/glossary.po +++ b/glossary.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2026-08-30 00:02+0000\n" "Last-Translator: Swen Bachmann <142266608+sba72@users.noreply.github.com>\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -1300,18 +1300,30 @@ msgstr "" "die mit der Anweisung :keyword:`type` erstellt wurden." #: ../../glossary.rst:507 +msgid "exhausted" +msgstr "" + +#: ../../glossary.rst:509 +msgid "" +"An :term:`iterator` that has produced all of its values is said to be :dfn:" +"`exhausted`. Further attempts to get the next value (for example, calls to :" +"func:`next`) raise :exc:`StopIteration` (or :exc:`StopAsyncIteration` in the " +"case of an :term:`asynchronous iterator`)." +msgstr "" + +#: ../../glossary.rst:515 msgid "expression" msgstr "Ausdruck" -#: ../../glossary.rst:509 +#: ../../glossary.rst:517 +#, fuzzy msgid "" "A piece of syntax which can be evaluated to some value. In other words, an " "expression is an accumulation of expression elements like literals, names, " -"attribute access, operators or function calls which all return a value. In " -"contrast to many other languages, not all language constructs are " -"expressions. There are also :term:`statement`\\s which cannot be used as " -"expressions, such as :keyword:`while`. Assignments are also statements, not " -"expressions." +"attribute access, operators or function calls which all return a value. Not " +"all language constructs are expressions. There are also :term:" +"`statement`\\s which cannot be used as expressions, such as :keyword:" +"`while`. Assignments are also statements, not expressions." msgstr "" "Ein Syntaxelement, das zu einem Wert ausgewertet werden kann. Mit anderen " "Worten: Ein Ausdruck ist eine Zusammenstellung von Ausdruckselementen wie " @@ -1322,11 +1334,11 @@ msgstr "" "beispielsweise :keyword:`while`. Auch Zuweisungen sind Anweisungen und keine " "Ausdrücke." -#: ../../glossary.rst:516 +#: ../../glossary.rst:524 msgid "extension module" msgstr "Erweiterungsmodul" -#: ../../glossary.rst:518 +#: ../../glossary.rst:526 msgid "" "A module written in C or C++, using Python's C API to interact with the core " "and with user code." @@ -1334,15 +1346,15 @@ msgstr "" "Ein in C oder C++ geschriebenes Modul, das die C-API von Python nutzt, um " "mit dem Kern und dem Anwendercode zu interagieren." -#: ../../glossary.rst:520 +#: ../../glossary.rst:528 msgid "f-string" msgstr "f-String" -#: ../../glossary.rst:521 +#: ../../glossary.rst:529 msgid "f-strings" msgstr "f-Strings" -#: ../../glossary.rst:523 +#: ../../glossary.rst:531 msgid "" "String literals prefixed with ``f`` or ``F`` are commonly called \"f-" "strings\" which is short for :ref:`formatted string literals `. " @@ -1352,11 +1364,11 @@ msgstr "" "gemeinhin als \"f-Strings\" bezeichnet, was die Abkürzung für :ref:" "`formatierte Zeichenfolgenliterale ` ist. Siehe auch :pep:`498`." -#: ../../glossary.rst:526 +#: ../../glossary.rst:534 msgid "file object" msgstr "Dateiobjekt" -#: ../../glossary.rst:528 +#: ../../glossary.rst:536 msgid "" "An object exposing a file-oriented API (with methods such as :meth:`!read` " "or :meth:`!write`) to an underlying resource. Depending on the way it was " @@ -1374,7 +1386,7 @@ msgstr "" "`dateiähnliche Objekte ` oder :dfn:`Streams ` " "bezeichnet." -#: ../../glossary.rst:536 +#: ../../glossary.rst:544 msgid "" "There are actually three categories of file objects: raw :term:`binary files " "`, buffered :term:`binary files ` and :term:`text " @@ -1388,19 +1400,19 @@ msgstr "" "mod:`io` definiert. Die übliche Vorgehensweise zum Erstellen eines " "Dateiobjekts ist die Verwendung der Funktion :func:`open` ." -#: ../../glossary.rst:541 +#: ../../glossary.rst:549 msgid "file-like object" msgstr "dateiähnliches Objekt" -#: ../../glossary.rst:543 +#: ../../glossary.rst:551 msgid "A synonym for :term:`file object`." msgstr "Ein Synonym für :term:`Dateiobjekt `." -#: ../../glossary.rst:544 +#: ../../glossary.rst:552 msgid "filesystem encoding and error handler" msgstr "Dateisystem-Kodierung und Fehlerbehandlung" -#: ../../glossary.rst:546 +#: ../../glossary.rst:554 msgid "" "Encoding and error handler used by Python to decode bytes from the operating " "system and encode Unicode to the operating system." @@ -1409,7 +1421,7 @@ msgstr "" "Bytes aus dem Betriebssystem und zum Kodieren von Unicode für das " "Betriebssystem." -#: ../../glossary.rst:549 +#: ../../glossary.rst:557 msgid "" "The filesystem encoding must guarantee to successfully decode all bytes " "below 128. If the file system encoding fails to provide this guarantee, API " @@ -1420,7 +1432,7 @@ msgstr "" "nicht bieten kann, können API-Funktionen die Ausnahme :exc:`UnicodeError` " "auslösen." -#: ../../glossary.rst:553 +#: ../../glossary.rst:561 msgid "" "The :func:`sys.getfilesystemencoding` and :func:`sys." "getfilesystemencodeerrors` functions can be used to get the filesystem " @@ -1430,7 +1442,7 @@ msgstr "" "getfilesystemencodeerrors` lassen sich die Kodierung des Dateisystems und " "der Fehlerbehandler abrufen." -#: ../../glossary.rst:557 +#: ../../glossary.rst:565 msgid "" "The :term:`filesystem encoding and error handler` are configured at Python " "startup by the :c:func:`PyConfig_Read` function: see :c:member:`~PyConfig." @@ -1443,16 +1455,16 @@ msgstr "" "filesystem_encoding` und :c:member:`~PyConfig.filesystem_errors`, die zu :c:" "type:`PyConfig` gehören." -#: ../../glossary.rst:562 +#: ../../glossary.rst:570 msgid "See also the :term:`locale encoding`." msgstr "" "Siehe auch den Begriff :term:`Lokalisierungskodierung `." -#: ../../glossary.rst:563 +#: ../../glossary.rst:571 msgid "finder" msgstr "Finder" -#: ../../glossary.rst:565 +#: ../../glossary.rst:573 msgid "" "An object that tries to find the :term:`loader` for a module that is being " "imported." @@ -1460,7 +1472,7 @@ msgstr "" "Ein Objekt, das versucht, den :term:`loader` für ein Modul zu finden, das " "gerade importiert wird." -#: ../../glossary.rst:568 +#: ../../glossary.rst:576 msgid "" "There are two types of finder: :term:`meta path finders ` " "for use with :data:`sys.meta_path`, and :term:`path entry finders ` zur Verwendung mit :data:`sys." "path_hooks`." -#: ../../glossary.rst:572 +#: ../../glossary.rst:580 msgid "" "See :ref:`finders-and-loaders` and :mod:`importlib` for much more detail." msgstr "" "Weitere Informationen findest du unter :ref:`finders-and-loaders` und :mod:" "`importlib`." -#: ../../glossary.rst:573 +#: ../../glossary.rst:581 msgid "floor division" msgstr "Etagenaufteilung" -#: ../../glossary.rst:575 +#: ../../glossary.rst:583 msgid "" "Mathematical division that rounds down to nearest integer. The floor " "division operator is ``//``. For example, the expression ``11 // 4`` " @@ -1497,11 +1509,11 @@ msgstr "" "``-3`` ist, da es sich dabei um ``-2.75`` handelt, das *nach unten* " "abgerundet wurde. Siehe :pep:`238`." -#: ../../glossary.rst:580 +#: ../../glossary.rst:588 msgid "free threading" msgstr "freies Einfädeln" -#: ../../glossary.rst:582 +#: ../../glossary.rst:590 msgid "" "A threading model where multiple threads can run Python bytecode " "simultaneously within the same interpreter. This is in contrast to the :" @@ -1513,11 +1525,11 @@ msgstr "" "zum :term:`global interpreter lock`, bei dem jeweils nur ein Thread Python-" "Bytecode ausführen kann. Siehe :pep:`703`." -#: ../../glossary.rst:586 +#: ../../glossary.rst:594 msgid "free-threaded build" msgstr "Build mit freien Threads" -#: ../../glossary.rst:589 +#: ../../glossary.rst:597 msgid "" "A build of :term:`CPython` that supports :term:`free threading`, configured " "using the :option:`--disable-gil` option before compilation." @@ -1526,15 +1538,15 @@ msgstr "" "threading>` unterstützt und vor der Kompilierung mit der Option :option:`--" "disable-gil` konfiguriert wurde." -#: ../../glossary.rst:592 +#: ../../glossary.rst:600 msgid "See :ref:`freethreading-python-howto`." msgstr "Siehe :ref:`freethreading-python-howto`." -#: ../../glossary.rst:593 +#: ../../glossary.rst:601 msgid "free variable" msgstr "freie Variable" -#: ../../glossary.rst:595 +#: ../../glossary.rst:603 msgid "" "Formally, as defined in the :ref:`language execution model `, a " "free variable is any variable used in a namespace which is not a local " @@ -1551,11 +1563,11 @@ msgstr "" "`codeobject.co_freevars` manchmal auch als Synonym für :term:`Closure-" "Variable ` verwendet." -#: ../../glossary.rst:600 +#: ../../glossary.rst:608 msgid "function" msgstr "Funktion" -#: ../../glossary.rst:602 +#: ../../glossary.rst:610 msgid "" "A series of statements which returns some value to a caller. It can also be " "passed zero or more :term:`arguments ` which may be used in the " @@ -1568,17 +1580,17 @@ msgstr "" "`Parameter `, :term:`Methode ` sowie den Abschnitt :ref:" "`function` ." -#: ../../glossary.rst:606 +#: ../../glossary.rst:614 msgid "function annotation" msgstr "Funktionsanmerkung" -#: ../../glossary.rst:608 +#: ../../glossary.rst:616 msgid "An :term:`annotation` of a function parameter or return value." msgstr "" "Eine :term:`Annotation ` eines Funktionsparameters oder eines " "Rückgabewerts." -#: ../../glossary.rst:610 +#: ../../glossary.rst:618 msgid "" "Function annotations are usually used for :term:`type hints `: " "for example, this function is expected to take two :class:`int` arguments " @@ -1589,7 +1601,7 @@ msgstr "" "class:`int` Argumente entgegennimmt und zudem einen :class:`int` " "Rückgabewert hat::" -#: ../../glossary.rst:615 +#: ../../glossary.rst:623 msgid "" "def sum_two_numbers(a: int, b: int) -> int:\n" " return a + b" @@ -1597,13 +1609,13 @@ msgstr "" "def sum_two_numbers(a: int, b: int) -> int:\n" " return a + b" -#: ../../glossary.rst:618 +#: ../../glossary.rst:626 msgid "Function annotation syntax is explained in section :ref:`function`." msgstr "" "Die Syntax für Funktionsannotationen wird im Abschnitt :ref:`function` " "erläutert." -#: ../../glossary.rst:620 +#: ../../glossary.rst:628 msgid "" "See :term:`variable annotation` and :pep:`484`, which describe this " "functionality. Also see :ref:`annotations-howto` for best practices on " @@ -1613,11 +1625,11 @@ msgstr "" "diese Funktionalität beschrieben wird. Siehe außerdem :ref:`annotations-" "howto` für bewährte Vorgehensweisen beim Umgang mit Annotationen." -#: ../../glossary.rst:624 +#: ../../glossary.rst:632 msgid "__future__" msgstr "__Zukunft__" -#: ../../glossary.rst:626 +#: ../../glossary.rst:634 msgid "" "A :ref:`future statement `, ``from __future__ import ``, " "directs the compiler to compile the current module using syntax or semantics " @@ -1636,7 +1648,7 @@ msgstr "" "Sprache aufgenommen wurde und wann sie zur Standardeinstellung wird (oder " "wurde)::" -#: ../../glossary.rst:634 +#: ../../glossary.rst:642 msgid "" ">>> import __future__\n" ">>> __future__.division\n" @@ -1646,11 +1658,11 @@ msgstr "" ">>> __future__.division\n" "_Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)" -#: ../../glossary.rst:637 +#: ../../glossary.rst:645 msgid "garbage collection" msgstr "Garbage Collection" -#: ../../glossary.rst:639 +#: ../../glossary.rst:647 msgid "" "The process of freeing memory when it is not used anymore. Python performs " "garbage collection via reference counting and a cyclic garbage collector " @@ -1663,11 +1675,11 @@ msgstr "" "auflösen kann. Der Garbage Collector lässt sich über das Modul :mod:`gc` " "steuern." -#: ../../glossary.rst:644 ../../glossary.rst:645 +#: ../../glossary.rst:652 ../../glossary.rst:653 msgid "generator" msgstr "Generator" -#: ../../glossary.rst:647 +#: ../../glossary.rst:655 msgid "" "Informally used to mean either a :term:`generator function` or a :term:" "`generator iterator`, depending on context. The formal terms :term:" @@ -1681,11 +1693,11 @@ msgstr "" "` sind in der Praxis selten; der Begriff \"Generator\" " "allein reicht fast immer aus." -#: ../../glossary.rst:652 ../../glossary.rst:653 +#: ../../glossary.rst:660 ../../glossary.rst:661 msgid "generator function" msgstr "Generatorfunktion" -#: ../../glossary.rst:655 +#: ../../glossary.rst:663 msgid "" "A function which returns a :term:`generator` object. It looks like a normal " "function except that it contains :keyword:`yield` expressions for producing " @@ -1698,11 +1710,11 @@ msgstr "" "`for`\\-Schleife verwendet oder mit der Funktion :func:`next` einzeln " "abgerufen werden können. Siehe :ref:`yieldexpr`." -#: ../../glossary.rst:660 +#: ../../glossary.rst:668 msgid "generator iterator" msgstr "Generator-Iterator" -#: ../../glossary.rst:662 +#: ../../glossary.rst:670 msgid "" "An object created by a :term:`generator function` or a :term:`generator " "expression`." @@ -1710,7 +1722,7 @@ msgstr "" "Ein Objekt, das durch eine :term:`Generatorfunktion ` " "oder einen :term:`Generatorausdruck ` erstellt wurde." -#: ../../glossary.rst:665 +#: ../../glossary.rst:673 msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " "execution state (including local variables and pending try-statements). When " @@ -1723,7 +1735,7 @@ msgstr "" "wird, setzt er dort fort, wo er aufgehört hat (im Gegensatz zu Funktionen, " "die bei jedem Aufruf von vorne beginnen)." -#: ../../glossary.rst:670 +#: ../../glossary.rst:678 msgid "" "Generator iterators also implement the :meth:`~generator.send` method to " "send a value into the suspended generator, and the :meth:`~generator.throw` " @@ -1735,11 +1747,11 @@ msgstr "" "Methode :meth:`~generator.throw` , um an der Stelle, an der der Generator " "angehalten wurde, eine Ausnahme auszulösen. Siehe :ref:`generator-methods`." -#: ../../glossary.rst:675 ../../glossary.rst:676 +#: ../../glossary.rst:683 ../../glossary.rst:684 msgid "generator expression" msgstr "Generatorausdruck" -#: ../../glossary.rst:678 +#: ../../glossary.rst:686 msgid "" "An :term:`expression` that returns an :term:`iterator`. It looks like a " "normal expression followed by a :keyword:`!for` clause defining a loop " @@ -1752,7 +1764,7 @@ msgstr "" "definiert, sowie einer optionalen :keyword:`!if` -Klausel. Der kombinierte " "Ausdruck generiert Werte für eine umschließende Funktion::" -#: ../../glossary.rst:683 +#: ../../glossary.rst:691 msgid "" ">>> sum(i*i for i in range(10)) # sum of squares 0, 1, 4, ... 81\n" "285" @@ -1761,11 +1773,11 @@ msgstr "" "4, ..., 81\n" "285" -#: ../../glossary.rst:685 +#: ../../glossary.rst:693 msgid "generic function" msgstr "generische Funktion" -#: ../../glossary.rst:687 +#: ../../glossary.rst:695 msgid "" "A function composed of multiple functions implementing the same operation " "for different types. Which implementation should be used during a call is " @@ -1776,7 +1788,7 @@ msgstr "" "einem Aufruf verwendet werden soll, wird durch den Dispatch-Algorithmus " "bestimmt." -#: ../../glossary.rst:691 +#: ../../glossary.rst:699 msgid "" "See also the :term:`single dispatch` glossary entry, the :deco:`functools." "singledispatch` decorator, and :pep:`443`." @@ -1784,11 +1796,11 @@ msgstr "" "Siehe auch den Glossareintrag :term:`single dispatch`, den Dekorator :deco:" "`functools.singledispatch` sowie :pep:`443`." -#: ../../glossary.rst:693 +#: ../../glossary.rst:701 msgid "generic type" msgstr "generischer Typ" -#: ../../glossary.rst:695 +#: ../../glossary.rst:703 msgid "" "A :term:`type` that can be parameterized; typically a :ref:`container " "class` such as :class:`list` or :class:`dict`. Used for :" @@ -1799,7 +1811,7 @@ msgstr "" "class:`dict`. Wird für :term:`Typ-Hinweise ` und :term:" "`Annotationen ` verwendet." -#: ../../glossary.rst:700 +#: ../../glossary.rst:708 msgid "" "For more details, see :ref:`generic alias types`, :pep:" "`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module." @@ -1808,19 +1820,19 @@ msgstr "" "genericalias>`, :pep:`483`, :pep:`484`, :pep:`585` sowie im Modul :mod:" "`typing` ." -#: ../../glossary.rst:702 +#: ../../glossary.rst:710 msgid "GIL" msgstr "GIL" -#: ../../glossary.rst:704 +#: ../../glossary.rst:712 msgid "See :term:`global interpreter lock`." msgstr "Siehe :term:`Global Interpreter Lock `." -#: ../../glossary.rst:705 +#: ../../glossary.rst:713 msgid "global interpreter lock" msgstr "Global Interpreter Lock" -#: ../../glossary.rst:707 +#: ../../glossary.rst:715 msgid "" "The mechanism used by the :term:`CPython` interpreter to assure that only " "one thread executes Python :term:`bytecode` at a time. This simplifies the " @@ -1839,7 +1851,7 @@ msgstr "" "Interpreters, geht jedoch zu Lasten eines Großteils der Parallelität, die " "Multiprozessor-Rechner bieten." -#: ../../glossary.rst:716 +#: ../../glossary.rst:724 msgid "" "However, some extension modules, either standard or third-party, are " "designed so as to release the GIL when doing computationally intensive tasks " @@ -1851,7 +1863,7 @@ msgstr "" "rechenintensiven Aufgaben wie Komprimierung oder Hashing freigeben. Außerdem " "wird das GIL bei E/A-Vorgängen stets freigegeben." -#: ../../glossary.rst:721 +#: ../../glossary.rst:729 msgid "" "As of Python 3.13, the GIL can be disabled using the :option:`--disable-gil` " "build configuration. After building Python with this option, code must be " @@ -1868,7 +1880,7 @@ msgstr "" "Leistung für Multithread-Anwendungen und erleichtert die effiziente Nutzung " "von Multi-Core-CPUs. Weitere Details findest du unter :pep:`703`." -#: ../../glossary.rst:728 +#: ../../glossary.rst:736 msgid "" "In prior versions of Python's C API, a function might declare that it " "requires the GIL to be held in order to use it. This refers to having an :" @@ -1878,11 +1890,11 @@ msgstr "" "dass für ihre Verwendung das GIL gesperrt sein muss. Dies bezieht sich auf " "einen :term:`angeschlossenen Thread-Zustand `." -#: ../../glossary.rst:731 +#: ../../glossary.rst:739 msgid "global state" msgstr "globaler Zustand" -#: ../../glossary.rst:733 +#: ../../glossary.rst:741 msgid "" "Data that is accessible throughout a program, such as module-level " "variables, class variables, or C static variables in :term:`extension " @@ -1897,11 +1909,11 @@ msgstr "" "in der Regel eine Synchronisation, um :term:`Wettlaufbedingungen ` und :term:`Datenwettläufe ` zu vermeiden." -#: ../../glossary.rst:739 +#: ../../glossary.rst:747 msgid "hash-based pyc" msgstr "Hash-basierte PYC-Datei" -#: ../../glossary.rst:741 +#: ../../glossary.rst:749 msgid "" "A bytecode cache file that uses the hash rather than the last-modified time " "of the corresponding source file to determine its validity. See :ref:`pyc-" @@ -1911,11 +1923,11 @@ msgstr "" "Wert anstelle des Zeitstempels der letzten Änderung der entsprechenden " "Quelldatei heranzieht. Siehe :ref:`pyc-invalidation`." -#: ../../glossary.rst:744 +#: ../../glossary.rst:752 msgid "hashable" msgstr "hashbar" -#: ../../glossary.rst:746 +#: ../../glossary.rst:754 msgid "" "An object is *hashable* if it has a hash value which never changes during " "its lifetime (it needs a :meth:`~object.__hash__` method), and can be " @@ -1928,7 +1940,7 @@ msgstr "" "benötigt eine :meth:`~object.__eq__`-Methode). Hashbare Objekte, die als " "gleich verglichen werden, müssen denselben Hash-Wert haben." -#: ../../glossary.rst:752 +#: ../../glossary.rst:760 msgid "" "Hashability makes an object usable as a dictionary key and a set member, " "because these data structures use the hash value internally." @@ -1937,7 +1949,7 @@ msgstr "" "als Element in einer Menge verwendet werden, da diese Datenstrukturen intern " "den Hashwert nutzen." -#: ../../glossary.rst:755 +#: ../../glossary.rst:763 msgid "" "Most of Python's immutable built-in objects are hashable; mutable containers " "(such as lists or dictionaries) are not; immutable containers (such as " @@ -1953,11 +1965,11 @@ msgstr "" "Klassen sind, sind standardmäßig hashbar. Sie sind alle ungleich (außer mit " "sich selbst), und ihr Hash-Wert wird aus ihrem :func:`id` abgeleitet." -#: ../../glossary.rst:762 +#: ../../glossary.rst:770 msgid "IDLE" msgstr "LEERLAUF" -#: ../../glossary.rst:764 +#: ../../glossary.rst:772 msgid "" "An Integrated Development and Learning Environment for Python. :ref:`idle` " "is a basic editor and interpreter environment which ships with the standard " @@ -1967,11 +1979,11 @@ msgstr "" "ist eine einfache Editor- und Interpreter-Umgebung, die im Lieferumfang der " "Standarddistribution von Python enthalten ist." -#: ../../glossary.rst:767 +#: ../../glossary.rst:775 msgid "immortal" msgstr "unsterblich" -#: ../../glossary.rst:769 +#: ../../glossary.rst:777 msgid "" "*Immortal objects* are a CPython implementation detail introduced in :pep:" "`683`." @@ -1979,7 +1991,7 @@ msgstr "" "*Unsterbliche Objekte* sind ein Implementierungsdetail von CPython, das in :" "pep:`683` eingeführt wurde." -#: ../../glossary.rst:772 +#: ../../glossary.rst:780 msgid "" "If an object is immortal, its :term:`reference count` is never modified, and " "therefore it is never deallocated while the interpreter is running. For " @@ -1990,7 +2002,7 @@ msgstr "" "niemals freigegeben wird. Beispielsweise sind :const:`True` und :const:" "`None` in CPython unsterblich." -#: ../../glossary.rst:776 +#: ../../glossary.rst:784 msgid "" "Immortal objects can be identified via :func:`sys._is_immortal`, or via :c:" "func:`PyUnstable_IsImmortal` in the C API." @@ -1998,11 +2010,11 @@ msgstr "" "Unsterbliche Objekte können über :func:`sys._is_immortal` oder über :c:" "func:`PyUnstable_IsImmortal` in der C-API identifiziert werden." -#: ../../glossary.rst:778 +#: ../../glossary.rst:786 msgid "immutable" msgstr "unveränderlich" -#: ../../glossary.rst:780 +#: ../../glossary.rst:788 msgid "" "An object with a fixed value. Immutable objects include numbers, strings " "and tuples. Such an object cannot be altered. A new object has to be " @@ -2022,11 +2034,11 @@ msgstr "" "Bedenken hinsichtlich unsachgemäß synchronisierter :term:`gleichzeitiger " "Änderungen ` entfallen." -#: ../../glossary.rst:787 +#: ../../glossary.rst:795 msgid "import path" msgstr "Importpfad" -#: ../../glossary.rst:789 +#: ../../glossary.rst:797 msgid "" "A list of locations (or :term:`path entries `) that are searched " "by the :term:`path based finder` for modules to import. During import, this " @@ -2039,11 +2051,11 @@ msgstr "" "in der Regel aus :data:`sys.path`, bei Unterpaketen kann sie jedoch auch aus " "dem Attribut ``__path__`` des übergeordneten Pakets stammen." -#: ../../glossary.rst:794 +#: ../../glossary.rst:802 msgid "importing" msgstr "Importieren" -#: ../../glossary.rst:796 +#: ../../glossary.rst:804 msgid "" "The process by which Python code in one module is made available to Python " "code in another module." @@ -2051,11 +2063,11 @@ msgstr "" "Der Vorgang, durch den Python-Code in einem Modul für Python-Code in einem " "anderen Modul verfügbar gemacht wird." -#: ../../glossary.rst:798 +#: ../../glossary.rst:806 msgid "importer" msgstr "Importeur" -#: ../../glossary.rst:800 +#: ../../glossary.rst:808 msgid "" "An object that both finds and loads a module; both a :term:`finder` and :" "term:`loader` object." @@ -2063,11 +2075,11 @@ msgstr "" "Ein Objekt, das sowohl ein Modul findet als auch lädt; es ist sowohl ein :" "term:`Finder `- als auch ein :term:`Loader `-Objekt." -#: ../../glossary.rst:802 +#: ../../glossary.rst:810 msgid "index" msgstr "Inhaltsverzeichnis" -#: ../../glossary.rst:804 +#: ../../glossary.rst:812 msgid "" "A numeric value that represents the position of an element in a :term:" "`sequence`." @@ -2075,7 +2087,7 @@ msgstr "" "Ein numerischer Wert, der die Position eines Elements in einer :term:" "`Sequenz ` angibt." -#: ../../glossary.rst:807 +#: ../../glossary.rst:815 msgid "" "In Python, indexing starts at zero. For example, ``things[0]`` names the " "*first* element of ``things``; ``things[1]`` names the second one." @@ -2084,7 +2096,7 @@ msgstr "" "``things[0]`` das *erste* Element von ``things`` ; ``things[1]`` " "bezeichnet das zweite Element." -#: ../../glossary.rst:811 +#: ../../glossary.rst:819 msgid "" "In some contexts, Python allows negative indexes for counting from the end " "of a sequence, and indexing using :term:`slices `." @@ -2093,15 +2105,15 @@ msgstr "" "Sequenz aus zu zählen, sowie die Indizierung mithilfe von :term:`Slices " "`." -#: ../../glossary.rst:814 +#: ../../glossary.rst:822 msgid "See also :term:`subscript`." msgstr "Siehe auch :term:`Index `." -#: ../../glossary.rst:815 +#: ../../glossary.rst:823 msgid "interactive" msgstr "interaktiv" -#: ../../glossary.rst:817 +#: ../../glossary.rst:825 msgid "" "Python has an interactive interpreter which means you can enter statements " "and expressions at the interpreter prompt, immediately execute them and see " @@ -2118,11 +2130,11 @@ msgstr "" "Module und Pakete zu untersuchen (siehe auch ``help(x)``). Weitere " "Informationen zum interaktiven Modus findest du unter :ref:`tut-interac`." -#: ../../glossary.rst:824 +#: ../../glossary.rst:832 msgid "interpreted" msgstr "interpretiert" -#: ../../glossary.rst:826 +#: ../../glossary.rst:834 msgid "" "Python is an interpreted language, as opposed to a compiled one, though the " "distinction can be blurry because of the presence of the bytecode compiler. " @@ -2140,11 +2152,11 @@ msgstr "" "Sprachen, allerdings laufen ihre Programme im Allgemeinen auch langsamer. " "Siehe auch :term:`interaktiv `." -#: ../../glossary.rst:833 +#: ../../glossary.rst:841 msgid "interpreter shutdown" msgstr "Beenden des Interpreters" -#: ../../glossary.rst:835 +#: ../../glossary.rst:843 msgid "" "When asked to shut down, the Python interpreter enters a special phase where " "it gradually releases all allocated resources, such as modules and various " @@ -2166,7 +2178,7 @@ msgstr "" "funktionieren (häufige Beispiele sind Bibliotheksmodule oder die " "Warnmechanismen)." -#: ../../glossary.rst:844 +#: ../../glossary.rst:852 msgid "" "The main reason for interpreter shutdown is that the ``__main__`` module or " "the script being run has finished executing." @@ -2174,11 +2186,11 @@ msgstr "" "Der Hauptgrund für das Beenden des Interpreters ist, dass das Modul " "``__main__`` oder das ausgeführte Skript die Ausführung abgeschlossen hat." -#: ../../glossary.rst:846 +#: ../../glossary.rst:854 msgid "iterable" msgstr "iterierbar" -#: ../../glossary.rst:848 +#: ../../glossary.rst:856 msgid "" "An object capable of returning its members one at a time. Examples of " "iterables include all sequence types (such as :class:`list`, :class:`str`, " @@ -2195,7 +2207,7 @@ msgstr "" "__getitem__` -Methode definieren, die die :term:`sequence`-Semantik " "implementiert." -#: ../../glossary.rst:856 +#: ../../glossary.rst:864 msgid "" "Iterables can be used in a :keyword:`for` loop and in many other places " "where a sequence is needed (:func:`zip`, :func:`map`, ...). When an " @@ -2219,26 +2231,28 @@ msgstr "" "Dauer der Schleife enthält. Siehe auch :term:`iterator`, :term:`sequence` " "und :term:`generator`." -#: ../../glossary.rst:866 +#: ../../glossary.rst:874 msgid "iterator" msgstr "Iterator" -#: ../../glossary.rst:868 +#: ../../glossary.rst:876 +#, fuzzy msgid "" "An object representing a stream of data. Repeated calls to the iterator's :" "meth:`~iterator.__next__` method (or passing it to the built-in function :" "func:`next`) return successive items in the stream. When no more data are " "available a :exc:`StopIteration` exception is raised instead. At this " -"point, the iterator object is exhausted and any further calls to its :meth:`!" -"__next__` method just raise :exc:`StopIteration` again. Iterators are " -"required to have an :meth:`~iterator.__iter__` method that returns the " -"iterator object itself so every iterator is also iterable and may be used in " -"most places where other iterables are accepted. One notable exception is " -"code which attempts multiple iteration passes. A container object (such as " -"a :class:`list`) produces a fresh new iterator each time you pass it to the :" -"func:`iter` function or use it in a :keyword:`for` loop. Attempting this " -"with an iterator will just return the same exhausted iterator object used in " -"the previous iteration pass, making it appear like an empty container." +"point, the iterator object is :term:`exhausted` and any further calls to " +"its :meth:`!__next__` method just raise :exc:`StopIteration` again. " +"Iterators are required to have an :meth:`~iterator.__iter__` method that " +"returns the iterator object itself so every iterator is also iterable and " +"may be used in most places where other iterables are accepted. One notable " +"exception is code which attempts multiple iteration passes. A container " +"object (such as a :class:`list`) produces a fresh new iterator each time you " +"pass it to the :func:`iter` function or use it in a :keyword:`for` loop. " +"Attempting this with an iterator will just return the same exhausted " +"iterator object used in the previous iteration pass, making it appear like " +"an empty container." msgstr "" "Ein Objekt, das einen Datenstrom darstellt. Wiederholte Aufrufe der " "Methode :meth:`~iterator.__next__` des Iterators (oder die Übergabe an die " @@ -2259,11 +2273,11 @@ msgstr "" "das bereits im vorherigen Iterationsdurchlauf verwendet wurde, wodurch es so " "aussieht, als wäre der Container leer." -#: ../../glossary.rst:883 +#: ../../glossary.rst:891 msgid "More information can be found in :ref:`typeiter`." msgstr "Weitere Informationen finden Sie unter :ref:`typeiter`." -#: ../../glossary.rst:887 +#: ../../glossary.rst:895 msgid "" "CPython does not consistently apply the requirement that an iterator define :" "meth:`~iterator.__iter__`. And also please note that :term:`free-threaded " @@ -2275,11 +2289,11 @@ msgstr "" "`free-threaded ` CPython kein :term:`thread-safe` Verhalten " "von Iterator-Operationen garantiert." -#: ../../glossary.rst:892 +#: ../../glossary.rst:900 msgid "key" msgstr "Schlüssel" -#: ../../glossary.rst:894 +#: ../../glossary.rst:902 msgid "" "A value that identifies an entry in a :term:`mapping`. See also :term:" "`subscript`." @@ -2287,11 +2301,11 @@ msgstr "" "Ein Wert, der einen Eintrag in einem :term:`Mapping ` " "identifiziert. Siehe auch :term:`Index `." -#: ../../glossary.rst:896 +#: ../../glossary.rst:904 msgid "key function" msgstr "Schlüsselfunktion" -#: ../../glossary.rst:898 +#: ../../glossary.rst:906 msgid "" "A key function or collation function is a callable that returns a value used " "for sorting or ordering. For example, :func:`locale.strxfrm` is used to " @@ -2303,7 +2317,7 @@ msgstr "" "Sortierschlüssel zu erzeugen, der die lokalspezifischen Sortierkonventionen " "berücksichtigt." -#: ../../glossary.rst:903 +#: ../../glossary.rst:911 msgid "" "A number of tools in Python accept key functions to control how elements are " "ordered or grouped. They include :func:`min`, :func:`max`, :func:`sorted`, :" @@ -2316,7 +2330,7 @@ msgstr "" "sort` , :func:`heapq.merge` , :func:`heapq.nsmallest` , :func:`heapq." "nlargest` und :func:`itertools.groupby` ." -#: ../../glossary.rst:909 +#: ../../glossary.rst:917 msgid "" "There are several ways to create a key function. For example. the :meth:" "`str.casefold` method can serve as a key function for case insensitive " @@ -2336,19 +2350,19 @@ msgstr "" "Beispiele für die Erstellung und Verwendung von Schlüsselfunktionen finden " "Sie im :ref:`Sorting HOW TO `." -#: ../../glossary.rst:916 +#: ../../glossary.rst:924 msgid "keyword argument" msgstr "Schlüsselwortargument" -#: ../../glossary.rst:918 ../../glossary.rst:1305 +#: ../../glossary.rst:926 ../../glossary.rst:1313 msgid "See :term:`argument`." msgstr "Siehe :term:`Argument `." -#: ../../glossary.rst:919 +#: ../../glossary.rst:927 msgid "lambda" msgstr "Lambda" -#: ../../glossary.rst:921 +#: ../../glossary.rst:929 msgid "" "An anonymous inline function consisting of a single :term:`expression` which " "is evaluated when the function is called. The syntax to create a lambda " @@ -2359,11 +2373,11 @@ msgstr "" "Syntax zum Erstellen einer Lambda-Funktion lautet ``lambda [parameters]: " "expression``" -#: ../../glossary.rst:924 +#: ../../glossary.rst:932 msgid "LBYL" msgstr "LBYL" -#: ../../glossary.rst:926 +#: ../../glossary.rst:934 msgid "" "Look before you leap. This coding style explicitly tests for pre-conditions " "before making calls or lookups. This style contrasts with the :term:`EAFP` " @@ -2376,7 +2390,7 @@ msgstr "" "und zeichnet sich durch das häufige Vorkommen von :keyword:`if` -Anweisungen " "aus." -#: ../../glossary.rst:931 +#: ../../glossary.rst:939 msgid "" "In a multi-threaded environment, the LBYL approach can risk introducing a :" "term:`race condition` between \"the looking\" and \"the leaping\". For " @@ -2393,33 +2407,34 @@ msgstr "" "lässt sich mit :term:`Locks ` oder durch Verwendung des :term:`EAFP`-" "Ansatzes lösen. Siehe auch :term:`thread-safe`." -#: ../../glossary.rst:937 +#: ../../glossary.rst:945 msgid "lexical analyzer" msgstr "Lexikalischer Analysator" -#: ../../glossary.rst:940 +#: ../../glossary.rst:948 msgid "Formal name for the *tokenizer*; see :term:`token`." msgstr "Formale Bezeichnung für den *Tokenizer*; siehe :term:`token`." -#: ../../glossary.rst:941 +#: ../../glossary.rst:949 msgid "list" msgstr "Liste" -#: ../../glossary.rst:943 +#: ../../glossary.rst:951 +#, fuzzy msgid "" "A built-in Python :term:`sequence`. Despite its name it is more akin to an " "array in other languages than to a linked list since access to elements is " -"*O*\\ (1)." +"*O*\\ (1). See :ref:`time-complexity`." msgstr "" "Eine in Python integrierte :term:`Sequenz `. Trotz ihres Namens " "ähnelt sie eher einem Array in anderen Sprachen als einer verketteten Liste, " "da der Zugriff auf die Elemente *O*\\ (1) ist." -#: ../../glossary.rst:946 +#: ../../glossary.rst:954 msgid "list comprehension" msgstr "Listenkomprimierung" -#: ../../glossary.rst:948 +#: ../../glossary.rst:956 msgid "" "A compact way to process all or part of the elements in a sequence and " "return a list with the results. ``result = ['{:#04x}'.format(x) for x in " @@ -2434,11 +2449,11 @@ msgstr "" "0 bis 255 enthalten. Die Klausel :keyword:`if` ist optional. Wird sie " "weggelassen, werden alle Elemente in ``range(256)`` verarbeitet." -#: ../../glossary.rst:954 +#: ../../glossary.rst:962 msgid "lock" msgstr "Schloss" -#: ../../glossary.rst:956 +#: ../../glossary.rst:964 msgid "" "A :term:`synchronization primitive` that allows only one thread at a time to " "access a shared resource. A thread must acquire a lock before accessing the " @@ -2467,11 +2482,11 @@ msgstr "" "Muster und thread-lokale Zustände. Siehe auch :term:`Deadlock ` " "und :term:`reentrant`." -#: ../../glossary.rst:967 +#: ../../glossary.rst:975 msgid "lock-free" msgstr "sperrfrei" -#: ../../glossary.rst:969 +#: ../../glossary.rst:977 msgid "" "An operation that does not acquire any :term:`lock` and uses atomic CPU " "instructions to ensure correctness. Lock-free operations can execute " @@ -2492,11 +2507,11 @@ msgstr "" "beobachten können, selbst wenn diese Änderungen die :term:`per-object lock` " "halten." -#: ../../glossary.rst:977 +#: ../../glossary.rst:985 msgid "loader" msgstr "Lader" -#: ../../glossary.rst:979 +#: ../../glossary.rst:987 msgid "" "An object that loads a module. It must define the :meth:`!exec_module` and :" "meth:`!create_module` methods to implement the :class:`~importlib.abc." @@ -2508,23 +2523,23 @@ msgstr "" "`~importlib.abc.Loader` zu implementieren. Ein Loader wird in der Regel von " "einem :term:`finder` zurückgegeben. Siehe auch:" -#: ../../glossary.rst:985 +#: ../../glossary.rst:993 msgid ":ref:`finders-and-loaders`" msgstr ":ref:`finders-and-loaders`" -#: ../../glossary.rst:986 +#: ../../glossary.rst:994 msgid ":class:`importlib.abc.Loader`" msgstr ":class:`importlib.abc.Loader`" -#: ../../glossary.rst:987 +#: ../../glossary.rst:995 msgid ":pep:`302`" msgstr ":pep:`302`" -#: ../../glossary.rst:988 +#: ../../glossary.rst:996 msgid "locale encoding" msgstr "Ländereinstellung, Kodierung" -#: ../../glossary.rst:990 +#: ../../glossary.rst:998 msgid "" "On Unix, it is the encoding of the LC_CTYPE locale. It can be set with :func:" "`locale.setlocale(locale.LC_CTYPE, new_locale) `." @@ -2533,43 +2548,43 @@ msgstr "" "mit :func:`locale.setlocale(locale.LC_CTYPE, new_locale) ` " "festgelegt werden." -#: ../../glossary.rst:993 +#: ../../glossary.rst:1001 msgid "On Windows, it is the ANSI code page (ex: ``\"cp1252\"``)." msgstr "Unter Windows ist dies die ANSI-Codepage (z. B.: ``\"cp1252\"``)." -#: ../../glossary.rst:995 +#: ../../glossary.rst:1003 msgid "" "On Android and VxWorks, Python uses ``\"utf-8\"`` as the locale encoding." msgstr "" "Unter Android und VxWorks verwendet Python ``\"utf-8\"`` als Locale-" "Kodierung." -#: ../../glossary.rst:997 +#: ../../glossary.rst:1005 msgid ":func:`locale.getencoding` can be used to get the locale encoding." msgstr "" ":func:`locale.getencoding` kann verwendet werden, um die Kodierung der " "Ländereinstellung abzurufen." -#: ../../glossary.rst:999 +#: ../../glossary.rst:1007 msgid "See also the :term:`filesystem encoding and error handler`." msgstr "" "Siehe auch den Eintrag :term:`Dateisystem-Kodierung und Fehlerbehandlung " "`." -#: ../../glossary.rst:1000 +#: ../../glossary.rst:1008 msgid "magic method" msgstr "magische Methode" -#: ../../glossary.rst:1004 +#: ../../glossary.rst:1012 msgid "An informal synonym for :term:`special method`." msgstr "" "Ein umgangssprachliches Synonym für :term:`Spezialmethode `." -#: ../../glossary.rst:1005 +#: ../../glossary.rst:1013 msgid "mapping" msgstr "Kartierung" -#: ../../glossary.rst:1007 +#: ../../glossary.rst:1015 msgid "" "A container object that supports arbitrary key lookups and implements the " "methods specified in the :class:`collections.abc.Mapping` or :class:" @@ -2585,11 +2600,11 @@ msgstr "" "sind :class:`dict`, :class:`collections.defaultdict`, :class:`collections." "OrderedDict` und :class:`collections.Counter`." -#: ../../glossary.rst:1013 +#: ../../glossary.rst:1021 msgid "meta path finder" msgstr "Meta-Pfadfinder" -#: ../../glossary.rst:1015 +#: ../../glossary.rst:1023 msgid "" "A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path " "finders are related to, but different from :term:`path entry finders `, unterscheiden sich jedoch von " "diesen." -#: ../../glossary.rst:1019 +#: ../../glossary.rst:1027 msgid "" "See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " "finders implement." @@ -2608,11 +2623,11 @@ msgstr "" "Unter :class:`importlib.abc.MetaPathFinder` findest du die Methoden, die " "Meta-Path-Finder implementieren." -#: ../../glossary.rst:1021 +#: ../../glossary.rst:1029 msgid "metaclass" msgstr "Metaklasse" -#: ../../glossary.rst:1023 +#: ../../glossary.rst:1031 msgid "" "The class of a class. Class definitions create a class name, a class " "dictionary, and a list of base classes. The metaclass is responsible for " @@ -2636,15 +2651,15 @@ msgstr "" "Sicherheit, zur Verfolgung der Objekterstellung, zur Implementierung von " "Singletons und für viele andere Aufgaben eingesetzt." -#: ../../glossary.rst:1033 +#: ../../glossary.rst:1041 msgid "More information can be found in :ref:`metaclasses`." msgstr "Weitere Informationen finden Sie unter :ref:`metaclasses`." -#: ../../glossary.rst:1002 ../../glossary.rst:1034 ../../glossary.rst:1488 +#: ../../glossary.rst:1010 ../../glossary.rst:1042 ../../glossary.rst:1496 msgid "method" msgstr "Methode" -#: ../../glossary.rst:1036 +#: ../../glossary.rst:1044 msgid "" "A function which is defined inside a class body. If called as an attribute " "of an instance of that class, the method will get the instance object as its " @@ -2656,11 +2671,11 @@ msgstr "" "Instanzobjekt als erstes :term:`Argument ` (das üblicherweise als " "``self`` bezeichnet wird). Siehe :term:`function` und :term:`nested scope`." -#: ../../glossary.rst:1040 +#: ../../glossary.rst:1048 msgid "method resolution order" msgstr "Reihenfolge der Methodenauflösung" -#: ../../glossary.rst:1042 +#: ../../glossary.rst:1050 msgid "" "Method Resolution Order is the order in which base classes are searched for " "a member during lookup. See :ref:`python_2.3_mro` for details of the " @@ -2671,11 +2686,11 @@ msgstr "" "Informationen zu dem Algorithmus, der seit der Version 2.3 vom Python-" "Interpreter verwendet wird, findest du unter :ref:`python_2.3_mro`." -#: ../../glossary.rst:1045 +#: ../../glossary.rst:1053 msgid "module" msgstr "Modul" -#: ../../glossary.rst:1047 +#: ../../glossary.rst:1055 msgid "" "An object that serves as an organizational unit of Python code. Modules " "have a namespace containing arbitrary Python objects. Modules are loaded " @@ -2686,15 +2701,15 @@ msgstr "" "werden durch den Vorgang des :term:`Importierens ` in Python " "geladen." -#: ../../glossary.rst:1051 +#: ../../glossary.rst:1059 msgid "See also :term:`package`." msgstr "Siehe auch :term:`Paket `." -#: ../../glossary.rst:1052 +#: ../../glossary.rst:1060 msgid "module spec" msgstr "Modulspezifikation" -#: ../../glossary.rst:1054 +#: ../../glossary.rst:1062 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." @@ -2703,24 +2718,24 @@ msgstr "" "eines Moduls verwendet werden. Eine Instanz von :class:`importlib.machinery." "ModuleSpec`." -#: ../../glossary.rst:1057 +#: ../../glossary.rst:1065 msgid "See also :ref:`module-specs`." msgstr "Siehe auch :ref:`module-specs`." -#: ../../glossary.rst:1058 +#: ../../glossary.rst:1066 msgid "MRO" msgstr "MRO" -#: ../../glossary.rst:1060 +#: ../../glossary.rst:1068 msgid "See :term:`method resolution order`." msgstr "" "Siehe :term:`Reihenfolge der Methodenauflösung `." -#: ../../glossary.rst:1061 +#: ../../glossary.rst:1069 msgid "mutable" msgstr "veränderlich" -#: ../../glossary.rst:1063 +#: ../../glossary.rst:1071 msgid "" "An :term:`object` with state that is allowed to change during the course of " "the program. In multi-threaded programs, mutable objects that are shared " @@ -2735,11 +2750,11 @@ msgstr "" "Siehe auch :term:`unveränderlich `, :term:`thread-sicher ` und :term:`parallele Änderung `." -#: ../../glossary.rst:1068 +#: ../../glossary.rst:1076 msgid "named tuple" msgstr "benanntes Tupel" -#: ../../glossary.rst:1070 +#: ../../glossary.rst:1078 msgid "" "The term \"named tuple\" applies to any type or class that inherits from " "tuple and whose indexable elements are also accessible using named " @@ -2750,7 +2765,7 @@ msgstr "" "Attribute zugänglich sind. Der Typ oder die Klasse kann darüber hinaus noch " "weitere Merkmale aufweisen." -#: ../../glossary.rst:1074 +#: ../../glossary.rst:1082 msgid "" "Several built-in types are named tuples, including the values returned by :" "func:`time.localtime` and :func:`os.stat`. Another example is :data:`sys." @@ -2760,7 +2775,7 @@ msgstr "" "von :func:`time.localtime` und :func:`os.stat` zurückgegebenen Werte. Ein " "weiteres Beispiel ist :data:`sys.float_info`: ::" -#: ../../glossary.rst:1078 +#: ../../glossary.rst:1086 msgid "" ">>> sys.float_info[1] # indexed access\n" "1024\n" @@ -2776,7 +2791,7 @@ msgstr "" ">>> isinstance(sys.float_info, tuple) # Typ eines Tupels\n" "True" -#: ../../glossary.rst:1085 +#: ../../glossary.rst:1093 msgid "" "Some named tuples are built-in types (such as the above examples). " "Alternatively, a named tuple can be created from a regular class definition " @@ -2795,11 +2810,11 @@ msgstr "" "fügen zudem einige zusätzliche Methoden hinzu, die in manuell geschriebenen " "oder integrierten benannten Tupeln möglicherweise nicht vorhanden sind." -#: ../../glossary.rst:1093 +#: ../../glossary.rst:1101 msgid "namespace" msgstr "Namensraum" -#: ../../glossary.rst:1095 +#: ../../glossary.rst:1103 msgid "" "The place where a variable is stored. Namespaces are implemented as " "dictionaries. There are the local, global and built-in namespaces as well " @@ -2823,11 +2838,11 @@ msgstr "" "wird deutlich, dass diese Funktionen jeweils von den Modulen :mod:`random` " "und :mod:`itertools` implementiert werden." -#: ../../glossary.rst:1105 +#: ../../glossary.rst:1113 msgid "namespace package" msgstr "Namensraum-Paket" -#: ../../glossary.rst:1107 +#: ../../glossary.rst:1115 msgid "" "A :term:`package` which serves only as a container for subpackages. " "Namespace packages may have no physical representation, and specifically are " @@ -2838,7 +2853,7 @@ msgstr "" "Darstellung und unterscheiden sich insbesondere von einem :term:`normalen " "Paket `, da sie keine Datei ``__init__.py`` enthalten." -#: ../../glossary.rst:1112 +#: ../../glossary.rst:1120 msgid "" "Namespace packages allow several individually installable packages to have a " "common parent package. Otherwise, it is recommended to use a :term:`regular " @@ -2848,22 +2863,22 @@ msgstr "" "ein gemeinsames übergeordnetes Paket haben. Andernfalls wird empfohlen, ein :" "term:`normales Paket ` zu verwenden." -#: ../../glossary.rst:1115 +#: ../../glossary.rst:1123 msgid "" "For more information, see :pep:`420` and :ref:`reference-namespace-package`." msgstr "" "Weitere Informationen findest du unter :pep:`420` und :ref:`reference-" "namespace-package`." -#: ../../glossary.rst:1117 +#: ../../glossary.rst:1125 msgid "See also :term:`module`." msgstr "Siehe auch :term:`Modul `." -#: ../../glossary.rst:1118 +#: ../../glossary.rst:1126 msgid "native code" msgstr "Nativcode" -#: ../../glossary.rst:1120 +#: ../../glossary.rst:1128 msgid "" "Code that is compiled to machine instructions and runs directly on the " "processor, as opposed to code that is interpreted or runs in a virtual " @@ -2878,11 +2893,11 @@ msgstr "" "`Erweiterungsmodulen `, der von Python aus aufgerufen " "werden kann. Siehe auch :term:`Erweiterungsmodul `." -#: ../../glossary.rst:1125 +#: ../../glossary.rst:1133 msgid "nested scope" msgstr "verschachtelter Gültigkeitsbereich" -#: ../../glossary.rst:1127 +#: ../../glossary.rst:1135 msgid "" "The ability to refer to a variable in an enclosing definition. For " "instance, a function defined inside another function can refer to variables " @@ -2900,11 +2915,11 @@ msgstr "" "globale Variablen im globalen Namensraum. Die Anweisung :keyword:" "`nonlocal` ermöglicht das Schreiben in äußere Gültigkeitsbereiche." -#: ../../glossary.rst:1134 +#: ../../glossary.rst:1142 msgid "new-style class" msgstr "Klasse im neuen Stil" -#: ../../glossary.rst:1136 +#: ../../glossary.rst:1144 msgid "" "Old name for the flavor of classes now used for all class objects. In " "earlier Python versions, only new-style classes could use Python's newer, " @@ -2918,11 +2933,11 @@ msgstr "" "Eigenschaften, :meth:`~object.__getattribute__` , Klassenmethoden und " "statische Methoden." -#: ../../glossary.rst:1141 +#: ../../glossary.rst:1149 msgid "non-deterministic" msgstr "nicht deterministisch" -#: ../../glossary.rst:1143 +#: ../../glossary.rst:1151 msgid "" "Behavior where the outcome of a program can vary between executions with the " "same inputs. In multi-threaded programs, non-deterministic behavior often " @@ -2940,11 +2955,11 @@ msgstr "" "`Synchronisationsprimitiven ` trägt dazu bei, ein " "deterministisches Verhalten sicherzustellen." -#: ../../glossary.rst:1150 +#: ../../glossary.rst:1158 msgid "object" msgstr "Objekt" -#: ../../glossary.rst:1152 +#: ../../glossary.rst:1160 msgid "" "Any data with state (attributes or value) and defined behavior (methods). " "Also the ultimate base class of any :term:`new-style class`." @@ -2953,11 +2968,11 @@ msgstr "" "Verhalten (Methoden). Außerdem die oberste Basisklasse jeder :term:`Klasse " "neuen Stils `." -#: ../../glossary.rst:1155 +#: ../../glossary.rst:1163 msgid "optimized scope" msgstr "optimierter Umfang" -#: ../../glossary.rst:1157 +#: ../../glossary.rst:1165 msgid "" "A scope where target local variable names are reliably known to the compiler " "when the code is compiled, allowing optimization of read and write access to " @@ -2976,11 +2991,11 @@ msgstr "" "nur diejenigen, die auf einer bekannten Menge lokaler und nichtlokaler " "Variablennamen beruhen, sind auf optimierte Gültigkeitsbereiche beschränkt." -#: ../../glossary.rst:1164 +#: ../../glossary.rst:1172 msgid "optional module" msgstr "optionales Modul" -#: ../../glossary.rst:1166 +#: ../../glossary.rst:1174 msgid "" "An :term:`extension module` that is part of the :term:`standard library`, " "but may be absent in some builds of :term:`CPython`, usually due to missing " @@ -2993,7 +3008,7 @@ msgstr "" "Bibliotheken von Drittanbietern oder weil das Modul für eine bestimmte " "Plattform nicht verfügbar ist." -#: ../../glossary.rst:1171 +#: ../../glossary.rst:1179 msgid "" "See :ref:`optional-module-requirements` for a list of optional modules that " "require third-party libraries." @@ -3001,11 +3016,11 @@ msgstr "" "Eine Liste der optionalen Module, für die Bibliotheken von Drittanbietern " "erforderlich sind, findest du unter :ref:`optional-module-requirements`." -#: ../../glossary.rst:1173 +#: ../../glossary.rst:1181 msgid "package" msgstr "Paket" -#: ../../glossary.rst:1175 +#: ../../glossary.rst:1183 msgid "" "A Python :term:`module` which can contain submodules or recursively, " "subpackages. Technically, a package is a Python module with a ``__path__`` " @@ -3015,17 +3030,17 @@ msgstr "" "Unterpakete enthalten kann. Technisch gesehen ist ein Paket ein Python-Modul " "mit einem Attribut vom Typ ``__path__`` ." -#: ../../glossary.rst:1179 +#: ../../glossary.rst:1187 msgid "See also :term:`regular package` and :term:`namespace package`." msgstr "" "Siehe auch :term:`reguläres Paket ` und :term:`Namensraum-" "Paket `." -#: ../../glossary.rst:1180 +#: ../../glossary.rst:1188 msgid "parallelism" msgstr "Parallelität" -#: ../../glossary.rst:1182 +#: ../../glossary.rst:1190 msgid "" "Executing multiple operations at the same time (e.g. on multiple CPU " "cores). In Python builds with the :term:`global interpreter lock (GIL) " @@ -3044,11 +3059,11 @@ msgstr "" "threading>` Python können mehrere Python-Threads Python-Code gleichzeitig " "auf verschiedenen Kernen ausführen." -#: ../../glossary.rst:1190 +#: ../../glossary.rst:1198 msgid "parameter" msgstr "Parameter" -#: ../../glossary.rst:1192 +#: ../../glossary.rst:1200 msgid "" "A named entity in a :term:`function` (or method) definition that specifies " "an :term:`argument` (or in some cases, arguments) that the function can " @@ -3059,7 +3074,7 @@ msgstr "" "Fällen mehrere Argumente) angibt, das bzw. die die Funktion entgegennehmen " "kann. Es gibt fünf Arten von Parametern:" -#: ../../glossary.rst:1196 +#: ../../glossary.rst:1204 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " @@ -3071,11 +3086,11 @@ msgstr "" "` übergeben werden kann. Dies ist die Standardart von Parametern, " "zum Beispiel *foo* und *bar* im Folgenden::" -#: ../../glossary.rst:1201 +#: ../../glossary.rst:1209 msgid "def func(foo, bar=None): ..." msgstr "def func(foo, bar=None): ..." -#: ../../glossary.rst:1205 +#: ../../glossary.rst:1213 msgid "" ":dfn:`positional-only`: specifies an argument that can be supplied only by " "position. Positional-only parameters can be defined by including a ``/`` " @@ -3088,11 +3103,11 @@ msgstr "" "Parameterliste der Funktionsdefinition hinter ihnen das Zeichen ``/`` " "einfügt, zum Beispiel *posonly1* und *posonly2* im folgenden Beispiel::" -#: ../../glossary.rst:1210 +#: ../../glossary.rst:1218 msgid "def func(posonly1, posonly2, /, positional_or_keyword): ..." msgstr "def func(posonly1, posonly2, /, positional_or_keyword): ..." -#: ../../glossary.rst:1214 +#: ../../glossary.rst:1222 msgid "" ":dfn:`keyword-only`: specifies an argument that can be supplied only by " "keyword. Keyword-only parameters can be defined by including a single var-" @@ -3107,11 +3122,11 @@ msgstr "" "aufgenommen wird, zum Beispiel *kw_only1* und *kw_only2* im folgenden " "Beispiel::" -#: ../../glossary.rst:1220 +#: ../../glossary.rst:1228 msgid "def func(arg, *, kw_only1, kw_only2): ..." msgstr "def func(arg, *, kw_only1, kw_only2): ..." -#: ../../glossary.rst:1222 +#: ../../glossary.rst:1230 msgid "" ":dfn:`var-positional`: specifies that an arbitrary sequence of positional " "arguments can be provided (in addition to any positional arguments already " @@ -3125,11 +3140,11 @@ msgstr "" "Ein solcher Parameter kann definiert werden, indem dem Parameternamen " "``*`` vorangestellt wird, zum Beispiel *args* im folgenden Beispiel::" -#: ../../glossary.rst:1228 +#: ../../glossary.rst:1236 msgid "def func(*args, **kwargs): ..." msgstr "def func(*args, **kwargs): ..." -#: ../../glossary.rst:1230 +#: ../../glossary.rst:1238 msgid "" ":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " "provided (in addition to any keyword arguments already accepted by other " @@ -3142,7 +3157,7 @@ msgstr "" "kann definiert werden, indem dem Parameternamen ``**`` vorangestellt wird, " "beispielsweise *kwargs* im obigen Beispiel." -#: ../../glossary.rst:1236 +#: ../../glossary.rst:1244 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." @@ -3150,7 +3165,7 @@ msgstr "" "Parameter können sowohl optionale als auch erforderliche Argumente sowie " "Standardwerte für einige optionale Argumente festlegen." -#: ../../glossary.rst:1239 +#: ../../glossary.rst:1247 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " @@ -3162,11 +3177,11 @@ msgstr "" "die Klasse :class:`inspect.Parameter`, den Abschnitt :ref:`function` sowie :" "pep:`362`." -#: ../../glossary.rst:1243 +#: ../../glossary.rst:1251 msgid "per-object lock" msgstr "Objektspezifische Sperre" -#: ../../glossary.rst:1245 +#: ../../glossary.rst:1253 msgid "" "A :term:`lock` associated with an individual object instance rather than a " "global lock shared across all objects. In :term:`free-threaded ` abfragt, um Module zum Importieren " "zu finden." -#: ../../glossary.rst:1257 +#: ../../glossary.rst:1265 msgid "path entry finder" msgstr "Pfadeintrags-Finder" -#: ../../glossary.rst:1259 +#: ../../glossary.rst:1267 msgid "" "A :term:`finder` returned by a callable on :data:`sys.path_hooks` (i.e. a :" "term:`path entry hook`) which knows how to locate modules given a :term:" @@ -3213,7 +3228,7 @@ msgstr "" "Funktion (d. h. einem :term:`path entry hook`) zurückgegeben wird, die weiß, " "wie man Module anhand eines :term:`path entry` findet." -#: ../../glossary.rst:1263 +#: ../../glossary.rst:1271 msgid "" "See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " "finders implement." @@ -3221,11 +3236,11 @@ msgstr "" "Unter :class:`importlib.abc.PathEntryFinder` findest du die Methoden, die " "von Path-Entry-Findern implementiert werden." -#: ../../glossary.rst:1265 +#: ../../glossary.rst:1273 msgid "path entry hook" msgstr "Pfadeintrag-Hook" -#: ../../glossary.rst:1267 +#: ../../glossary.rst:1275 msgid "" "A callable on the :data:`sys.path_hooks` list which returns a :term:`path " "entry finder` if it knows how to find modules on a specific :term:`path " @@ -3236,11 +3251,11 @@ msgstr "" "wie Module auf einem bestimmten :term:`Pfadeintrag ` gefunden " "werden können." -#: ../../glossary.rst:1270 +#: ../../glossary.rst:1278 msgid "path based finder" msgstr "Pfadbasierter Sucher" -#: ../../glossary.rst:1272 +#: ../../glossary.rst:1280 msgid "" "One of the default :term:`meta path finders ` which " "searches an :term:`import path` for modules." @@ -3248,11 +3263,11 @@ msgstr "" "Einer der standardmäßigen :term:`Meta-Pfadfinder `, der " "einen :term:`Importpfad ` nach Modulen durchsucht." -#: ../../glossary.rst:1274 +#: ../../glossary.rst:1282 msgid "path-like object" msgstr "pfadähnliches Objekt" -#: ../../glossary.rst:1276 +#: ../../glossary.rst:1284 msgid "" "An object representing a file system path. A path-like object is either a :" "class:`str` or :class:`bytes` object representing a path, or an object " @@ -3273,11 +3288,11 @@ msgstr "" "ein :class:`str` - bzw. :class:`bytes` -Ergebnis gewährleisten. Eingeführt " "durch :pep:`519` ." -#: ../../glossary.rst:1284 +#: ../../glossary.rst:1292 msgid "PEP" msgstr "PEP" -#: ../../glossary.rst:1286 +#: ../../glossary.rst:1294 msgid "" "Python Enhancement Proposal. A PEP is a design document providing " "information to the Python community, or describing a new feature for Python " @@ -3290,7 +3305,7 @@ msgstr "" "technische Spezifikation sowie eine Begründung für die vorgeschlagenen " "Funktionen enthalten." -#: ../../glossary.rst:1292 +#: ../../glossary.rst:1300 msgid "" "PEPs are intended to be the primary mechanisms for proposing major new " "features, for collecting community input on an issue, and for documenting " @@ -3304,15 +3319,15 @@ msgstr "" "PEP-Autor ist dafür verantwortlich, einen Konsens innerhalb der Community " "herzustellen und abweichende Meinungen zu dokumentieren." -#: ../../glossary.rst:1298 +#: ../../glossary.rst:1306 msgid "See :pep:`1`." msgstr "Siehe :pep:`1`." -#: ../../glossary.rst:1299 +#: ../../glossary.rst:1307 msgid "portion" msgstr "Anteil" -#: ../../glossary.rst:1301 +#: ../../glossary.rst:1309 msgid "" "A set of files in a single directory (possibly stored in a zip file) that " "contribute to a namespace package, as defined in :pep:`420`." @@ -3321,15 +3336,15 @@ msgstr "" "in einer ZIP-Datei gespeichert sind), die zu einem Namespace-Paket " "beitragen, wie unter :pep:`420` definiert." -#: ../../glossary.rst:1303 +#: ../../glossary.rst:1311 msgid "positional argument" msgstr "Positionsargument" -#: ../../glossary.rst:1306 +#: ../../glossary.rst:1314 msgid "provisional API" msgstr "vorläufige API" -#: ../../glossary.rst:1308 +#: ../../glossary.rst:1316 msgid "" "A provisional API is one which has been deliberately excluded from the " "standard library's backwards compatibility guarantees. While major changes " @@ -3349,7 +3364,7 @@ msgstr "" "erfolgen nur, wenn schwerwiegende grundlegende Mängel aufgedeckt werden, die " "vor der Aufnahme der API übersehen wurden." -#: ../../glossary.rst:1317 +#: ../../glossary.rst:1325 msgid "" "Even for provisional APIs, backwards incompatible changes are seen as a " "\"solution of last resort\" - every attempt will still be made to find a " @@ -3359,7 +3374,7 @@ msgstr "" "\"letzter Ausweg\" – es wird weiterhin alles versucht, um für alle " "festgestellten Probleme eine rückwärtskompatible Lösung zu finden." -#: ../../glossary.rst:1321 +#: ../../glossary.rst:1329 msgid "" "This process allows the standard library to continue to evolve over time, " "without locking in problematic design errors for extended periods of time. " @@ -3370,19 +3385,19 @@ msgstr "" "über längere Zeiträume hinweg festgeschrieben werden. Weitere Einzelheiten " "findest du unter :pep:`411`." -#: ../../glossary.rst:1324 +#: ../../glossary.rst:1332 msgid "provisional package" msgstr "vorläufiges Paket" -#: ../../glossary.rst:1326 +#: ../../glossary.rst:1334 msgid "See :term:`provisional API`." msgstr "Siehe :term:`vorläufige API `." -#: ../../glossary.rst:1327 +#: ../../glossary.rst:1335 msgid "Python 3000" msgstr "Python 3000" -#: ../../glossary.rst:1329 +#: ../../glossary.rst:1337 msgid "" "Nickname for the Python 3.x release line (coined long ago when the release " "of version 3 was something in the distant future.) This is also abbreviated " @@ -3392,11 +3407,11 @@ msgstr "" "wurde, als die Veröffentlichung von Version 3 noch in ferner Zukunft lag). " "Er wird auch mit \"Py3k\" abgekürzt." -#: ../../glossary.rst:1332 +#: ../../glossary.rst:1340 msgid "Pythonic" msgstr "Pythonesk" -#: ../../glossary.rst:1334 +#: ../../glossary.rst:1342 msgid "" "An idea or piece of code which closely follows the most common idioms of the " "Python language, rather than implementing code using concepts common to " @@ -3414,7 +3429,7 @@ msgstr "" "eine solche Konstruktion, sodass Personen, die mit Python nicht vertraut " "sind, manchmal stattdessen einen numerischen Zähler verwenden::" -#: ../../glossary.rst:1341 +#: ../../glossary.rst:1349 msgid "" "for i in range(len(food)):\n" " print(food[i])" @@ -3422,11 +3437,11 @@ msgstr "" "for i in range(len(food)):\n" " print(food[i])" -#: ../../glossary.rst:1344 +#: ../../glossary.rst:1352 msgid "As opposed to the cleaner, Pythonic method::" msgstr "Im Gegensatz zu der übersichtlicheren, pythonesken Methode::" -#: ../../glossary.rst:1346 +#: ../../glossary.rst:1354 msgid "" "for piece in food:\n" " print(piece)" @@ -3434,11 +3449,11 @@ msgstr "" "für Stück in Essen:\n" " print(Stück)" -#: ../../glossary.rst:1348 +#: ../../glossary.rst:1356 msgid "qualified name" msgstr "qualifizierter Name" -#: ../../glossary.rst:1350 +#: ../../glossary.rst:1358 msgid "" "A dotted name showing the \"path\" from a module's global scope to a class, " "function or method defined in that module, as defined in :pep:`3155`. For " @@ -3450,7 +3465,7 @@ msgstr "" "angibt, wie in :pep:`3155` definiert. Bei Funktionen und Klassen der " "obersten Ebene entspricht der qualifizierte Name dem Namen des Objekts::" -#: ../../glossary.rst:1355 +#: ../../glossary.rst:1363 msgid "" ">>> class C:\n" "... class D:\n" @@ -3476,7 +3491,7 @@ msgstr "" ">>> C.D.meth.__qualname__\n" "'C.D.meth'" -#: ../../glossary.rst:1367 +#: ../../glossary.rst:1375 msgid "" "When used to refer to modules, the *fully qualified name* means the entire " "dotted path to the module, including any parent packages, e.g. ``email.mime." @@ -3486,7 +3501,7 @@ msgstr "" "durch Punkte getrennten Pfad zum Modul, einschließlich aller übergeordneten " "Pakete, z. B. ``email.mime.text``::" -#: ../../glossary.rst:1371 +#: ../../glossary.rst:1379 msgid "" ">>> import email.mime.text\n" ">>> email.mime.text.__name__\n" @@ -3496,11 +3511,11 @@ msgstr "" ">>> email.mime.text.__name__\n" "'email.mime.text'" -#: ../../glossary.rst:1374 +#: ../../glossary.rst:1382 msgid "race condition" msgstr "Race-Condition" -#: ../../glossary.rst:1376 +#: ../../glossary.rst:1384 msgid "" "A condition of a program where the behavior depends on the relative timing " "or ordering of events, particularly in multi-threaded programs. Race " @@ -3522,11 +3537,11 @@ msgstr "" "term:`Locks ` und anderen :term:`Synchronisationsprimitiven " "` hilft, Race Conditions zu vermeiden." -#: ../../glossary.rst:1386 +#: ../../glossary.rst:1394 msgid "reference count" msgstr "Referenzanzahl" -#: ../../glossary.rst:1388 +#: ../../glossary.rst:1396 msgid "" "The number of references to an object. When the reference count of an " "object drops to zero, it is deallocated. Some objects are :term:`immortal` " @@ -3545,7 +3560,7 @@ msgstr "" "können die Funktion :func:`sys.getrefcount` aufrufen, um die " "Referenzanzahl für ein bestimmtes Objekt abzurufen." -#: ../../glossary.rst:1397 +#: ../../glossary.rst:1405 msgid "" "In :term:`CPython`, reference counts are not considered to be stable or well-" "defined values; the number of references to an object, and how that number " @@ -3556,11 +3571,11 @@ msgstr "" "Weise, wie diese Anzahl durch Python-Code beeinflusst wird, kann je nach " "Version variieren." -#: ../../glossary.rst:1401 +#: ../../glossary.rst:1409 msgid "regular package" msgstr "Standardpaket" -#: ../../glossary.rst:1403 +#: ../../glossary.rst:1411 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." @@ -3568,15 +3583,15 @@ msgstr "" "Ein herkömmliches :term:`Paket `, beispielsweise ein Verzeichnis, " "das eine Datei vom Typ ``__init__.py`` enthält." -#: ../../glossary.rst:1406 +#: ../../glossary.rst:1414 msgid "See also :term:`namespace package`." msgstr "Siehe auch: :term:`Namensraum-Paket `." -#: ../../glossary.rst:1407 +#: ../../glossary.rst:1415 msgid "reentrant" msgstr "wiederkehrend" -#: ../../glossary.rst:1409 +#: ../../glossary.rst:1417 msgid "" "A property of a function or :term:`lock` that allows it to be called or " "acquired multiple times by the same thread without causing errors or a :term:" @@ -3586,7 +3601,7 @@ msgstr "" "dass diese mehrfach vom selben Thread aufgerufen bzw. erworben wird, ohne " "dass dabei Fehler oder ein :term:`Deadlock ` auftreten." -#: ../../glossary.rst:1413 +#: ../../glossary.rst:1421 msgid "" "For functions, reentrancy means the function can be safely called again " "before a previous invocation has completed, which is important when " @@ -3601,7 +3616,7 @@ msgstr "" "deterministisch ` sein, wenn sie in einem Multithread-" "Programm reentrant aufgerufen werden." -#: ../../glossary.rst:1419 +#: ../../glossary.rst:1427 msgid "" "For locks, Python's :class:`threading.RLock` (reentrant lock) is reentrant, " "meaning a thread that already holds the lock can acquire it again without " @@ -3614,15 +3629,15 @@ msgstr "" "dazu ist :class:`threading.Lock` nicht reentrant – der Versuch, sie " "zweimal vom selben Thread aus zu erwerben, führt zu einem Deadlock." -#: ../../glossary.rst:1425 +#: ../../glossary.rst:1433 msgid "See also :term:`lock` and :term:`deadlock`." msgstr "Siehe auch :term:`lock` und :term:`deadlock`." -#: ../../glossary.rst:1426 +#: ../../glossary.rst:1434 msgid "REPL" msgstr "REPL" -#: ../../glossary.rst:1428 +#: ../../glossary.rst:1436 msgid "" "An acronym for the \"read–eval–print loop\", another name for the :term:" "`interactive` interpreter shell." @@ -3631,11 +3646,11 @@ msgstr "" "Schleife), eine andere Bezeichnung für die :term:`interaktive ` " "Interpreter-Shell." -#: ../../glossary.rst:1430 +#: ../../glossary.rst:1438 msgid "__slots__" msgstr "__slots__" -#: ../../glossary.rst:1432 +#: ../../glossary.rst:1440 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " @@ -3650,11 +3665,11 @@ msgstr "" "Fällen eingesetzt werden, in denen in einer speicherintensiven Anwendung " "eine große Anzahl von Instanzen vorliegt." -#: ../../glossary.rst:1437 +#: ../../glossary.rst:1445 msgid "sequence" msgstr "Sequenz" -#: ../../glossary.rst:1439 +#: ../../glossary.rst:1447 msgid "" "An :term:`iterable` which supports efficient element access using integer " "indices via the :meth:`~object.__getitem__` special method and defines a :" @@ -3675,7 +3690,7 @@ msgstr "" "die Suchvorgänge beliebige :term:`hashable`-Schlüssel anstelle von " "Ganzzahlen verwenden." -#: ../../glossary.rst:1448 +#: ../../glossary.rst:1456 msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " "richer interface that goes beyond just :meth:`~object.__getitem__` and :meth:" @@ -3695,11 +3710,11 @@ msgstr "" "Sequenzmethoden im Allgemeinen findest du unter :ref:`Common Sequence " "Operations `." -#: ../../glossary.rst:1458 +#: ../../glossary.rst:1466 msgid "set comprehension" msgstr "Mengenkomprimierung" -#: ../../glossary.rst:1460 +#: ../../glossary.rst:1468 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a set with the results. ``results = {c for c in 'abracadabra' if c " @@ -3712,11 +3727,11 @@ msgstr "" "erzeugt die Menge der Zeichenfolgen ``{'r', 'd'}``. Siehe :ref:" "`comprehensions`." -#: ../../glossary.rst:1464 +#: ../../glossary.rst:1472 msgid "single dispatch" msgstr "Einzelversand" -#: ../../glossary.rst:1466 +#: ../../glossary.rst:1474 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." @@ -3725,11 +3740,11 @@ msgstr "" "der die Implementierung anhand des Typs eines einzelnen Arguments ausgewählt " "wird." -#: ../../glossary.rst:1468 +#: ../../glossary.rst:1476 msgid "slice" msgstr "Scheibe" -#: ../../glossary.rst:1470 +#: ../../glossary.rst:1478 msgid "" "An object of type :class:`slice`, used to describe a portion of a :term:" "`sequence`. A slice object is created when using the :ref:`slicing " @@ -3742,11 +3757,11 @@ msgstr "" "verwendet wird, bei der Doppelpunkte in eckigen Klammern stehen, wie " "beispielsweise in ``variable_name[1:3:5]``." -#: ../../glossary.rst:1475 +#: ../../glossary.rst:1483 msgid "soft deprecated" msgstr "weich veraltet" -#: ../../glossary.rst:1477 +#: ../../glossary.rst:1485 msgid "" "A soft deprecated API should not be used in new code, but it is safe for " "already existing code to use it. The API remains documented and tested, but " @@ -3757,7 +3772,7 @@ msgstr "" "API bleibt dokumentiert und wird weiterhin getestet, wird jedoch nicht mehr " "weiterentwickelt." -#: ../../glossary.rst:1481 +#: ../../glossary.rst:1489 msgid "" "Soft deprecation, unlike normal deprecation, does not plan on removing the " "API and will not emit warnings." @@ -3765,7 +3780,7 @@ msgstr "" "Im Gegensatz zur normalen Veralterung ist bei einer Soft Deprecation nicht " "vorgesehen, die API zu entfernen, und es werden keine Warnungen ausgegeben." -#: ../../glossary.rst:1484 +#: ../../glossary.rst:1492 msgid "" "See `PEP 387: Soft Deprecation `_." @@ -3773,11 +3788,11 @@ msgstr "" "Siehe `PEP 387: Soft Deprecation `_." -#: ../../glossary.rst:1486 +#: ../../glossary.rst:1494 msgid "special method" msgstr "spezielle Methode" -#: ../../glossary.rst:1490 +#: ../../glossary.rst:1498 msgid "" "A method that is called implicitly by Python to execute a certain operation " "on a type, such as addition. Such methods have names starting and ending " @@ -3789,11 +3804,11 @@ msgstr "" "solcher Methoden beginnen und enden mit zwei Unterstrichen. Spezielle " "Methoden sind unter :ref:`specialnames` dokumentiert." -#: ../../glossary.rst:1494 +#: ../../glossary.rst:1502 msgid "standard library" msgstr "Standardbibliothek" -#: ../../glossary.rst:1496 +#: ../../glossary.rst:1504 msgid "" "The collection of :term:`packages `, :term:`modules ` and :" "term:`extension modules ` distributed as a part of the " @@ -3807,7 +3822,7 @@ msgstr "" "Sammlung kann je nach Plattform, verfügbaren Systembibliotheken oder anderen " "Kriterien variieren. Die Dokumentation findest du unter :ref:`library-index`." -#: ../../glossary.rst:1502 +#: ../../glossary.rst:1510 msgid "" "See also :data:`sys.stdlib_module_names` for a list of all possible standard " "library module names." @@ -3815,11 +3830,11 @@ msgstr "" "Eine Liste aller möglichen Namen von Standardbibliotheksmodulen findest du " "unter :data:`sys.stdlib_module_names`." -#: ../../glossary.rst:1504 +#: ../../glossary.rst:1512 msgid "statement" msgstr "Erklärung" -#: ../../glossary.rst:1506 +#: ../../glossary.rst:1514 msgid "" "A statement is part of a suite (a \"block\" of code). A statement is either " "an :term:`expression` or one of several constructs with a keyword, such as :" @@ -3830,11 +3845,11 @@ msgstr "" "Konstrukten mit einem Schlüsselwort, wie beispielsweise :keyword:`if` , :" "keyword:`while` oder :keyword:`for` ." -#: ../../glossary.rst:1509 +#: ../../glossary.rst:1517 msgid "static type checker" msgstr "statischer Typprüfer" -#: ../../glossary.rst:1511 +#: ../../glossary.rst:1519 msgid "" "An external tool that reads Python code and analyzes it, looking for issues " "such as incorrect types. See also :term:`type hints ` and the :" @@ -3844,19 +3859,19 @@ msgstr "" "beispielsweise falsche Typen zu erkennen. Siehe auch :term:`Typangaben ` und das Modul :mod:`typing` ." -#: ../../glossary.rst:1514 +#: ../../glossary.rst:1522 msgid "stdlib" msgstr "stdlib" -#: ../../glossary.rst:1516 +#: ../../glossary.rst:1524 msgid "An abbreviation of :term:`standard library`." msgstr "Eine Abkürzung für :term:`Standardbibliothek `." -#: ../../glossary.rst:1517 +#: ../../glossary.rst:1525 msgid "steal" msgstr "stehlen" -#: ../../glossary.rst:1519 +#: ../../glossary.rst:1527 msgid "" "In Python's C API, \"*stealing*\" an argument means that ownership of the " "argument is transferred to the called function. The caller must not use that " @@ -3869,16 +3884,16 @@ msgstr "" "Allgemeinen tun Funktionen, die ein Argument stehlen, dies auch dann, wenn " "sie fehlschlagen." -#: ../../glossary.rst:1524 +#: ../../glossary.rst:1532 msgid "See :ref:`api-refcountdetails` for a full explanation." msgstr "" "Eine ausführliche Erläuterung findest du unter :ref:`api-refcountdetails`." -#: ../../glossary.rst:1525 +#: ../../glossary.rst:1533 msgid "strong reference" msgstr "starke Referenz" -#: ../../glossary.rst:1527 +#: ../../glossary.rst:1535 msgid "" "In Python's C API, a strong reference is a reference to an object which is " "owned by the code holding the reference. The strong reference is taken by " @@ -3891,7 +3906,7 @@ msgstr "" "hergestellt und durch den Aufruf von :c:func:`Py_DECREF` beim Löschen der " "Referenz freigegeben." -#: ../../glossary.rst:1533 +#: ../../glossary.rst:1541 msgid "" "The :c:func:`Py_NewRef` function can be used to create a strong reference to " "an object. Usually, the :c:func:`Py_DECREF` function must be called on the " @@ -3903,15 +3918,15 @@ msgstr "" "für die starke Referenz aufgerufen werden, bevor der Geltungsbereich der " "starken Referenz verlassen wird, um ein Referenzleck zu vermeiden." -#: ../../glossary.rst:1538 +#: ../../glossary.rst:1546 msgid "See also :term:`borrowed reference`." msgstr "Siehe auch: :term:`entlehnte Referenz `." -#: ../../glossary.rst:1539 +#: ../../glossary.rst:1547 msgid "subscript" msgstr "Index" -#: ../../glossary.rst:1541 +#: ../../glossary.rst:1549 msgid "" "The expression in square brackets of a :ref:`subscription expression " "`, for example, the ``3`` in ``items[3]``. Usually used to " @@ -3926,11 +3941,11 @@ msgstr "" "wird, oder als :term:`Index `, wenn eine :term:`Sequenz ` " "indiziert wird." -#: ../../glossary.rst:1547 +#: ../../glossary.rst:1555 msgid "synchronization primitive" msgstr "Synchronisationsprimitive" -#: ../../glossary.rst:1549 +#: ../../glossary.rst:1557 msgid "" "A basic building block for coordinating (synchronizing) the execution of " "multiple threads to ensure :term:`thread-safe` access to shared resources. " @@ -3955,15 +3970,15 @@ msgstr "" "`Race-Conditions ` zu verhindern und die Thread-Ausführung " "zu koordinieren. Siehe auch :term:`lock`." -#: ../../glossary.rst:1559 +#: ../../glossary.rst:1567 msgid "t-string" msgstr "T-String" -#: ../../glossary.rst:1560 +#: ../../glossary.rst:1568 msgid "t-strings" msgstr "T-Strings" -#: ../../glossary.rst:1562 +#: ../../glossary.rst:1570 msgid "" "String literals prefixed with ``t`` or ``T`` are commonly called \"t-" "strings\" which is short for :ref:`template string literals `." @@ -3972,11 +3987,11 @@ msgstr "" "gemeinhin als t-Strings bezeichnet, was die Abkürzung für :ref:`Template-" "Zeichenfolgenliterale ` ist." -#: ../../glossary.rst:1565 +#: ../../glossary.rst:1573 msgid "text encoding" msgstr "Textkodierung" -#: ../../glossary.rst:1567 +#: ../../glossary.rst:1575 msgid "" "A string in Python is a sequence of Unicode code points (in range " "``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " @@ -3986,7 +4001,7 @@ msgstr "" "Bereich ``U+0000``--``U+10FFFF``). Um eine Zeichenkette zu speichern oder zu " "übertragen, muss sie als Bytefolge serialisiert werden." -#: ../../glossary.rst:1571 +#: ../../glossary.rst:1579 msgid "" "Serializing a string into a sequence of bytes is known as \"encoding\", and " "recreating the string from the sequence of bytes is known as \"decoding\"." @@ -3995,7 +4010,7 @@ msgstr "" "bezeichnet, und die Rekonstruktion der Zeichenkette aus der Bytefolge wird " "als \"Dekodierung\" bezeichnet." -#: ../../glossary.rst:1574 +#: ../../glossary.rst:1582 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." @@ -4004,11 +4019,11 @@ msgstr "" "`Codecs `, die zusammenfassend als \"Textkodierungen\" " "bezeichnet werden." -#: ../../glossary.rst:1577 +#: ../../glossary.rst:1585 msgid "text file" msgstr "Textdatei" -#: ../../glossary.rst:1579 +#: ../../glossary.rst:1587 msgid "" "A :term:`file object` able to read and write :class:`str` objects. Often, a " "text file actually accesses a byte-oriented datastream and handles the :term:" @@ -4023,7 +4038,7 @@ msgstr "" "Textmodus geöffnet wurden (``'r'`` oder ``'w'``), :data:`sys.stdin`, :data:" "`sys.stdout` sowie Instanzen von :class:`io.StringIO`." -#: ../../glossary.rst:1586 +#: ../../glossary.rst:1594 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." @@ -4031,11 +4046,11 @@ msgstr "" "Siehe auch :term:`Binärdatei ` für ein Dateiobjekt, das :term:" "`byteähnliche Objekte ` lesen und schreiben kann." -#: ../../glossary.rst:1588 +#: ../../glossary.rst:1596 msgid "thread state" msgstr "Thread-Status" -#: ../../glossary.rst:1591 +#: ../../glossary.rst:1599 msgid "" "The information used by the :term:`CPython` runtime to run in an OS thread. " "For example, this includes the current exception, if any, and the state of " @@ -4046,7 +4061,7 @@ msgstr "" "beispielsweise die aktuelle Ausnahme (falls vorhanden) und der Zustand des " "Bytecode-Interpreters." -#: ../../glossary.rst:1595 +#: ../../glossary.rst:1603 msgid "" "Each thread state is bound to a single OS thread, but threads may have many " "thread states available. At most, one of them may be :term:`attached " @@ -4056,7 +4071,7 @@ msgstr "" "aber Threads können über mehrere Thread-Zustände verfügen. Höchstens einer " "davon darf gleichzeitig :term:`attached ` sein." -#: ../../glossary.rst:1599 +#: ../../glossary.rst:1607 msgid "" "An :term:`attached thread state` is required to call most of Python's C API, " "unless a function explicitly documents otherwise. The bytecode interpreter " @@ -4068,7 +4083,7 @@ msgstr "" "angegeben ist. Der Bytecode-Interpreter läuft nur unter einem " "angeschlossenen Thread-Zustand." -#: ../../glossary.rst:1603 +#: ../../glossary.rst:1611 msgid "" "Each thread state belongs to a single interpreter, but each interpreter may " "have many thread states, including multiple for the same OS thread. Thread " @@ -4082,7 +4097,7 @@ msgstr "" "können an denselben Thread gebunden sein, aber zu jedem Zeitpunkt kann nur " "einer in diesem Thread :term:`angeschlossen ` sein." -#: ../../glossary.rst:1609 +#: ../../glossary.rst:1617 msgid "" "See :ref:`Thread State and the Global Interpreter Lock ` for more " "information." @@ -4090,11 +4105,11 @@ msgstr "" "Weitere Informationen findest du unter :ref:`Thread-Zustand und das Global " "Interpreter Lock `." -#: ../../glossary.rst:1611 +#: ../../glossary.rst:1619 msgid "thread-safe" msgstr "thread-safe" -#: ../../glossary.rst:1613 +#: ../../glossary.rst:1621 msgid "" "A module, function, or class that behaves correctly when used by multiple " "threads concurrently. Thread-safe code uses appropriate :term:" @@ -4120,11 +4135,11 @@ msgstr "" "in Multithread-Programmen zu :term:`Race-Conditions ` und :" "term:`Datenkonflikten ` führen." -#: ../../glossary.rst:1624 +#: ../../glossary.rst:1632 msgid "token" msgstr "Token" -#: ../../glossary.rst:1627 +#: ../../glossary.rst:1635 msgid "" "A small unit of source code, generated by the :ref:`lexical analyzer " "` (also called the *tokenizer*). Names, numbers, strings, " @@ -4135,7 +4150,7 @@ msgstr "" "Zeichenketten, Operatoren, Zeilenumbrüche und Ähnliches werden durch Token " "dargestellt." -#: ../../glossary.rst:1632 +#: ../../glossary.rst:1640 msgid "" "The :mod:`tokenize` module exposes Python's lexical analyzer. The :mod:" "`token` module contains information on the various types of tokens." @@ -4144,11 +4159,11 @@ msgstr "" "bereit. Das Modul :mod:`token` enthält Informationen zu den verschiedenen " "Token-Typen." -#: ../../glossary.rst:1635 +#: ../../glossary.rst:1643 msgid "triple-quoted string" msgstr "Zeichenkette in dreifachen Anführungszeichen" -#: ../../glossary.rst:1637 +#: ../../glossary.rst:1645 msgid "" "A string which is bound by three instances of either a quotation mark (\") " "or an apostrophe ('). While they don't provide any functionality not " @@ -4167,11 +4182,11 @@ msgstr "" "erstrecken, ohne dass das Fortsetzungszeichen verwendet werden muss, was sie " "besonders nützlich beim Schreiben von Docstrings macht." -#: ../../glossary.rst:1644 +#: ../../glossary.rst:1652 msgid "type" msgstr "Typ" -#: ../../glossary.rst:1646 +#: ../../glossary.rst:1654 msgid "" "The type of a Python object determines what kind of object it is; every " "object has a type. An object's type is accessible as its :attr:`~object." @@ -4182,17 +4197,17 @@ msgstr "" "Attribut :attr:`~object.__class__` zugänglich oder kann mit ``type(obj)`` " "abgerufen werden." -#: ../../glossary.rst:1650 +#: ../../glossary.rst:1658 msgid "type alias" msgstr "Typalias" -#: ../../glossary.rst:1652 +#: ../../glossary.rst:1660 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "" "Ein Synonym für einen Typ, das durch die Zuweisung des Typs zu einem " "Bezeichner erstellt wird." -#: ../../glossary.rst:1654 +#: ../../glossary.rst:1662 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" @@ -4200,7 +4215,7 @@ msgstr "" "Typ-Aliase sind nützlich, um :term:`Typ-Hinweise ` zu " "vereinfachen. Zum Beispiel::" -#: ../../glossary.rst:1657 +#: ../../glossary.rst:1665 msgid "" "def remove_gray_shades(\n" " colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" @@ -4210,11 +4225,11 @@ msgstr "" " colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" " pass" -#: ../../glossary.rst:1661 +#: ../../glossary.rst:1669 msgid "could be made more readable like this::" msgstr "könnte so lesbarer gestaltet werden::" -#: ../../glossary.rst:1663 +#: ../../glossary.rst:1671 msgid "" "Color = tuple[int, int, int]\n" "\n" @@ -4226,16 +4241,16 @@ msgstr "" "def remove_gray_shades(colors: Liste[Farbe]) -> Liste[Farbe]:\n" " pass" -#: ../../glossary.rst:1668 ../../glossary.rst:1682 +#: ../../glossary.rst:1676 ../../glossary.rst:1690 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "" "Siehe :mod:`typing` und :pep:`484`, wo diese Funktion beschrieben wird." -#: ../../glossary.rst:1669 +#: ../../glossary.rst:1677 msgid "type hint" msgstr "Typhinweis" -#: ../../glossary.rst:1671 +#: ../../glossary.rst:1679 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." @@ -4244,7 +4259,7 @@ msgstr "" "Variable, ein Klassenattribut oder einen Funktionsparameter bzw. " "Rückgabewert angibt." -#: ../../glossary.rst:1674 +#: ../../glossary.rst:1682 msgid "" "Type hints are optional and are not enforced by Python but they are useful " "to :term:`static type checkers `. They can also aid " @@ -4255,7 +4270,7 @@ msgstr "" "können sie IDEs bei der Code-Vervollständigung und beim Refactoring " "unterstützen." -#: ../../glossary.rst:1678 +#: ../../glossary.rst:1686 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." @@ -4264,11 +4279,11 @@ msgstr "" "jedoch für lokale Variablen, können über :func:`typing.get_type_hints` " "abgerufen werden." -#: ../../glossary.rst:1683 +#: ../../glossary.rst:1691 msgid "universal newlines" msgstr "universelle Zeilenumbrüche" -#: ../../glossary.rst:1685 +#: ../../glossary.rst:1693 msgid "" "A manner of interpreting text streams in which all of the following are " "recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " @@ -4282,24 +4297,24 @@ msgstr "" "Konvention ``'\\r'``. Siehe :pep:`278` und :pep:`3116` sowie :func:`bytes." "splitlines` für eine weitere Anwendungsmöglichkeit." -#: ../../glossary.rst:1690 +#: ../../glossary.rst:1698 msgid "variable annotation" msgstr "Variablenbeschriftung" -#: ../../glossary.rst:1692 +#: ../../glossary.rst:1700 msgid "An :term:`annotation` of a variable or a class attribute." msgstr "" "Eine :term:`Annotation ` einer Variablen oder eines " "Klassenattributs." -#: ../../glossary.rst:1694 +#: ../../glossary.rst:1702 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "" "Bei der Annotation einer Variablen oder eines Klassenattributs ist die " "Zuweisung optional::" -#: ../../glossary.rst:1696 +#: ../../glossary.rst:1704 msgid "" "class C:\n" " field: 'annotation'" @@ -4307,7 +4322,7 @@ msgstr "" "Klasse C:\n" " Feld: 'annotation'" -#: ../../glossary.rst:1699 +#: ../../glossary.rst:1707 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" @@ -4316,17 +4331,17 @@ msgstr "" "verwendet – beispielsweise wird erwartet, dass diese Variable Werte vom Typ :" "class:`int` annimmt::" -#: ../../glossary.rst:1703 +#: ../../glossary.rst:1711 msgid "count: int = 0" msgstr "Zähler: int = 0" -#: ../../glossary.rst:1705 +#: ../../glossary.rst:1713 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "" "Die Syntax für die Annotation von Variablen wird im Abschnitt :ref:" "`annassign` erläutert." -#: ../../glossary.rst:1707 +#: ../../glossary.rst:1715 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality. Also see :ref:`annotations-howto` for best practices on " @@ -4337,11 +4352,11 @@ msgstr "" "`annotations-howto` für bewährte Vorgehensweisen beim Umgang mit " "Annotationen." -#: ../../glossary.rst:1711 +#: ../../glossary.rst:1719 msgid "virtual environment" msgstr "virtuelle Umgebung" -#: ../../glossary.rst:1713 +#: ../../glossary.rst:1721 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -4353,15 +4368,15 @@ msgstr "" "aktualisieren, ohne das Verhalten anderer Python-Anwendungen zu " "beeinträchtigen, die auf demselben System ausgeführt werden." -#: ../../glossary.rst:1718 +#: ../../glossary.rst:1726 msgid "See also :mod:`venv`." msgstr "Siehe auch :mod:`venv`." -#: ../../glossary.rst:1719 +#: ../../glossary.rst:1727 msgid "virtual machine" msgstr "virtuelle Maschine" -#: ../../glossary.rst:1721 +#: ../../glossary.rst:1729 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -4370,11 +4385,11 @@ msgstr "" "Python führt den vom Bytecode-Compiler erzeugten :term:`Bytecode ` " "aus." -#: ../../glossary.rst:1723 +#: ../../glossary.rst:1731 msgid "walrus operator" msgstr "Walross-Betreiber" -#: ../../glossary.rst:1725 +#: ../../glossary.rst:1733 msgid "" "A light-hearted way to refer to the :ref:`assignment expression ` operator ``:=`` because it looks a bit like a walrus if you " @@ -4384,11 +4399,11 @@ msgstr "" "expressions>` Operator ``:=``, da er ein bisschen wie ein Walross aussieht, " "wenn man den Kopf etwas dreht." -#: ../../glossary.rst:1728 +#: ../../glossary.rst:1736 msgid "Zen of Python" msgstr "Zen von Python" -#: ../../glossary.rst:1730 +#: ../../glossary.rst:1738 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " @@ -4415,10 +4430,10 @@ msgstr "C-zusammenhängend" msgid "Fortran contiguous" msgstr "Fortran–zusammenhängend" -#: ../../glossary.rst:1002 +#: ../../glossary.rst:1010 msgid "magic" msgstr "Magie" -#: ../../glossary.rst:1488 +#: ../../glossary.rst:1496 msgid "special" msgstr "besonders" diff --git a/glossary.po~ b/glossary.po~ new file mode 100644 index 00000000..9ed095fa --- /dev/null +++ b/glossary.po~ @@ -0,0 +1,4424 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# Swen Bachmann, 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2026-08-30 00:02+0000\n" +"Last-Translator: Swen Bachmann <142266608+sba72@users.noreply.github.com>\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../glossary.rst:5 +msgid "Glossary" +msgstr "Glossar" + +#: ../../glossary.rst:10 +msgid "``>>>``" +msgstr "``>>>``" + +#: ../../glossary.rst:12 +msgid "" +"The default Python prompt of the :term:`interactive` shell. Often seen for " +"code examples which can be executed interactively in the interpreter." +msgstr "" +"Die Standard-Python-Eingabeaufforderung der :term:`interaktiven " +"` Shell. Wird häufig bei Code-Beispielen verwendet, die " +"interaktiv im Interpreter ausgeführt werden können." + +#: ../../glossary.rst:15 +msgid "``...``" +msgstr "``...``" + +#: ../../glossary.rst:17 +msgid "Can refer to:" +msgstr "Kann sich beziehen auf:" + +#: ../../glossary.rst:19 +msgid "" +"The default Python prompt of the :term:`interactive` shell when entering the " +"code for an indented code block, when within a pair of matching left and " +"right delimiters (parentheses, square brackets, curly braces or triple " +"quotes), or after specifying a decorator." +msgstr "" +"Die Standard-Python-Eingabeaufforderung der :term:`interactive`-Shell bei " +"der Eingabe von Code für einen eingerückten Codeblock, wenn dieser sich " +"innerhalb eines Paares übereinstimmender linker und rechter Begrenzer " +"(Klammern, eckige Klammern, geschweifte Klammern oder dreifache " +"Anführungszeichen) befindet, oder nach der Angabe eines Dekorators." + +#: ../../glossary.rst:26 +msgid "" +"The three dots form of the :ref:`Ellipsis ` object." +msgstr "" +"Die drei Punkte bilden das :ref:`Ellipsis- ` -Objekt." + +#: ../../glossary.rst:27 +msgid "abstract base class" +msgstr "Abstrakte Basisklasse" + +#: ../../glossary.rst:29 +msgid "" +"Abstract base classes complement :term:`duck-typing` by providing a way to " +"define interfaces when other techniques like :func:`hasattr` would be clumsy " +"or subtly wrong (for example with :ref:`magic methods `). " +"ABCs introduce virtual subclasses, which are classes that don't inherit from " +"a class but are still recognized by :func:`isinstance` and :func:" +"`issubclass`; see the :mod:`abc` module documentation. Python comes with " +"many built-in ABCs for data structures (in the :mod:`collections.abc` " +"module), numbers (in the :mod:`numbers` module), streams (in the :mod:`io` " +"module), import finders and loaders (in the :mod:`importlib.abc` module). " +"You can create your own ABCs with the :mod:`abc` module." +msgstr "" +"Abstrakte Basisklassen (abstract base class / ABC) ergänzen :term:`Duck-" +"Typing `, indem sie eine Möglichkeit bieten, Schnittstellen zu " +"definieren, wenn andere Techniken wie :func:`hasattr` umständlich oder in " +"subtiler Weise falsch wären (zum Beispiel bei :ref:`magischen Methoden " +"`). ABCs führen virtuelle Unterklassen ein – das sind " +"Klassen, die nicht von einer Klasse erben, aber dennoch von :func:" +"`isinstance` und :func:`issubclass` erkannt werden; siehe die Dokumentation " +"zum Modul :mod:`abc`. Python enthält viele integrierte ABCs für " +"Datenstrukturen (im Modul :mod:`collections.abc` ), Zahlen (im Modul :mod:" +"`numbers` ), Streams (im Modul :mod:`io` ) sowie Import-Finder und Loader " +"(im Modul :mod:`importlib.abc` ). Mit dem Modul :mod:`abc` kannst du eigene " +"ABCs erstellen." + +#: ../../glossary.rst:40 +msgid "annotate function" +msgstr "Annotate-Funktion" + +#: ../../glossary.rst:42 +msgid "" +"A callable that can be called to retrieve the :term:`annotations " +"` of an object. Annotate functions are usually :term:`functions " +"`, automatically generated as the :attr:`~object.__annotate__` " +"attribute of functions, classes, and modules. Annotate functions are a " +"subset of :term:`evaluate functions `." +msgstr "" +"Eine Callable-Funktion, die aufgerufen werden kann, um die :term:" +"`Annotationen ` eines Objekts abzurufen. Annotate-Funktionen " +"sind in der Regel :term:`Funktionen `, die automatisch als " +"Attribut :attr:`~object.__annotate__` von Funktionen, Klassen und Modulen " +"generiert werden. Annotate-Funktionen sind eine Teilmenge der :term:" +"`Evaluate-Funktionen `." + +#: ../../glossary.rst:47 +msgid "annotation" +msgstr "Anmerkung" + +#: ../../glossary.rst:49 +msgid "" +"A label associated with a variable, a class attribute or a function " +"parameter or return value, used by convention as a :term:`type hint`." +msgstr "" +"Eine Bezeichnung, die einer Variablen, einem Klassenattribut oder einem " +"Funktionsparameter bzw. Rückgabewert zugeordnet ist und üblicherweise als :" +"term:`Typhinweis ` verwendet wird." + +#: ../../glossary.rst:53 +msgid "" +"Annotations of local variables cannot be accessed at runtime, but " +"annotations of global variables, class attributes, and functions can be " +"retrieved by calling :func:`annotationlib.get_annotations` on modules, " +"classes, and functions, respectively." +msgstr "" +"Auf Annotationen lokaler Variablen kann zur Laufzeit nicht zugegriffen " +"werden, doch Annotationen globaler Variablen, Klassenattribute und " +"Funktionen lassen sich durch Aufruf von :func:`annotationlib." +"get_annotations` für Module, Klassen bzw. Funktionen abrufen." + +#: ../../glossary.rst:58 +msgid "" +"See :term:`variable annotation`, :term:`function annotation`, :pep:`484`, :" +"pep:`526`, and :pep:`649`, which describe this functionality. Also see :ref:" +"`annotations-howto` for best practices on working with annotations." +msgstr "" +"Siehe :term:`Variablen-Annotation `, :term:`Funktions-" +"Annotation `, :pep:`484`, :pep:`526` und :pep:`649`, wo " +"diese Funktionalität beschrieben wird. Siehe außerdem :ref:`annotations-" +"howto` für bewährte Vorgehensweisen beim Umgang mit Annotationen." + +#: ../../glossary.rst:62 +msgid "argument" +msgstr "Argument" + +#: ../../glossary.rst:64 +msgid "" +"A value passed to a :term:`function` (or :term:`method`) when calling the " +"function. There are two kinds of argument:" +msgstr "" +"Ein Wert, der beim Aufruf einer :term:`Funktion ` (oder :term:" +"`Methode `) an diese übergeben wird. Es gibt zwei Arten von " +"Argumenten:" + +#: ../../glossary.rst:67 +msgid "" +":dfn:`keyword argument`: an argument preceded by an identifier (e.g. " +"``name=``) in a function call or passed as a value in a dictionary preceded " +"by ``**``. For example, ``3`` and ``5`` are both keyword arguments in the " +"following calls to :func:`complex`::" +msgstr "" +":dfn:`Schlüsselwortargument `: Ein Argument, dem in einem " +"Funktionsaufruf ein Bezeichner vorangestellt ist (z. B. ``name=``) oder das " +"in einem Wörterbuch als Wert übergeben wird, dem ``**`` vorangestellt ist. " +"Beispielsweise sind sowohl ``3`` als auch ``5`` Schlüsselwortargumente in " +"den folgenden Aufrufen von :func:`complex` ::" + +#: ../../glossary.rst:72 +msgid "" +"complex(real=3, imag=5)\n" +"complex(**{'real': 3, 'imag': 5})" +msgstr "" +"complex(real=3, imag=5)\n" +"complex(**{'real': 3, 'imag': 5})" + +#: ../../glossary.rst:75 +msgid "" +":dfn:`positional argument`: an argument that is not a keyword argument. " +"Positional arguments can appear at the beginning of an argument list and/or " +"be passed as elements of an :term:`iterable` preceded by ``*``. For example, " +"``3`` and ``5`` are both positional arguments in the following calls::" +msgstr "" +":dfn:`Positionsargument `: Ein Argument, das kein " +"Schlüsselwortargument ist. Positionsargumente können am Anfang einer " +"Argumentliste stehen und/oder als Elemente eines :term:`iterable` übergeben " +"werden, dem ``*`` vorangestellt ist. Beispielsweise sind sowohl ``3`` als " +"auch ``5`` Positionsargumente in den folgenden Aufrufen::" + +#: ../../glossary.rst:81 +msgid "" +"complex(3, 5)\n" +"complex(*(3, 5))" +msgstr "" +"complex(3, 5)\n" +"complex(*(3, 5))" + +#: ../../glossary.rst:84 +msgid "" +"Arguments are assigned to the named local variables in a function body. See " +"the :ref:`calls` section for the rules governing this assignment. " +"Syntactically, any expression can be used to represent an argument; the " +"evaluated value is assigned to the local variable." +msgstr "" +"Argumente werden im Funktionskörper den benannten lokalen Variablen " +"zugewiesen. Die Regeln für diese Zuweisung findest du im Abschnitt :ref:" +"`calls` . Syntaktisch kann jeder Ausdruck zur Darstellung eines Arguments " +"verwendet werden. Der ausgewertete Wert wird der lokalen Variablen " +"zugewiesen." + +#: ../../glossary.rst:89 +msgid "" +"See also the :term:`parameter` glossary entry, the FAQ question on :ref:`the " +"difference between arguments and parameters `, " +"and :pep:`362`." +msgstr "" +"Siehe auch den Glossareintrag zu :term:`parameter`, die FAQ-Frage zum :ref:" +"`Unterschied zwischen Argumenten und Parametern ` " +"sowie :pep:`362`." + +#: ../../glossary.rst:92 +msgid "asynchronous context manager" +msgstr "asynchroner Kontextmanager" + +#: ../../glossary.rst:94 +msgid "" +"An object which controls the environment seen in an :keyword:`async with` " +"statement by defining :meth:`~object.__aenter__` and :meth:`~object." +"__aexit__` methods. Introduced by :pep:`492`." +msgstr "" +"Ein Objekt, das die in einer :keyword:`async with`-Anweisung angezeigte " +"Umgebung steuert, indem es die Methoden :meth:`~object.__aenter__` und :" +"meth:`~object.__aexit__` definiert. Eingeführt durch :pep:`492`." + +#: ../../glossary.rst:97 +msgid "asynchronous generator" +msgstr "asynchroner Generator" + +#: ../../glossary.rst:99 +msgid "" +"Informally used to mean either an :term:`asynchronous generator function` or " +"an :term:`asynchronous generator iterator`, depending on context. The " +"formal terms :term:`asynchronous generator function` and :term:`asynchronous " +"generator iterator` are uncommon in practice; \"asynchronous generator\" " +"alone is almost always sufficient." +msgstr "" +"Wird umgangssprachlich je nach Kontext entweder für eine :term:`asynchrone " +"Generatorfunktion ` oder einen :term:" +"`asynchronen Generator-Iterator ` " +"verwendet. Die formalen Begriffe :term:`asynchrone Generatorfunktion " +"` und :term:`asynchroner Generator-Iterator " +"` sind in der Praxis selten; \"asynchroner " +"Generator\" allein reicht fast immer aus." + +#: ../../glossary.rst:104 +msgid "asynchronous generator function" +msgstr "asynchrone Generatorfunktion" + +#: ../../glossary.rst:106 +msgid "" +"A function which returns an :term:`asynchronous generator iterator`. It " +"looks like a coroutine function defined with :keyword:`async def` except " +"that it contains :keyword:`yield` expressions for producing a series of " +"values usable in an :keyword:`async for` loop. See :pep:`525`." +msgstr "" +"Eine Funktion, die einen :term:`asynchronen Generator-Iterator ` zurückgibt. Sie ähnelt einer mit :keyword:`async def` " +"definierten Coroutine-Funktion, enthält jedoch Ausdrücke vom Typ :keyword:" +"`yield`, um eine Reihe von Werten zu erzeugen, die in einer :keyword:`async " +"for`-Schleife verwendet werden können. Siehe :pep:`525`." + +#: ../../glossary.rst:111 +msgid "" +"An asynchronous generator function may contain :keyword:`await` expressions " +"as well as :keyword:`async for`, and :keyword:`async with` statements." +msgstr "" +"Eine asynchrone Generatorfunktion kann sowohl :keyword:`await` -Ausdrücke " +"als auch :keyword:`async for`- und :keyword:`async with`-Anweisungen " +"enthalten." + +#: ../../glossary.rst:114 +msgid "asynchronous generator iterator" +msgstr "asynchrone Generator-Iterator" + +#: ../../glossary.rst:116 +msgid "An object created by an :term:`asynchronous generator function`." +msgstr "" +"Ein Objekt, das von einer :term:`asynchronen Generatorfunktion ` erstellt wurde." + +#: ../../glossary.rst:118 +msgid "" +"This is an :term:`asynchronous iterator` which when called using the :meth:" +"`~object.__anext__` method returns an awaitable object which will execute " +"the body of the asynchronous generator function until the next :keyword:" +"`yield` expression." +msgstr "" +"Dies ist ein :term:`asynchroner Iterator `, der beim " +"Aufruf mit der Methode :meth:`~object.__anext__` ein awaitable-Objekt " +"zurückgibt, das den Körper der asynchronen Generatorfunktion bis zum " +"nächsten :keyword:`yield` -Ausdruck ausführt." + +#: ../../glossary.rst:123 +msgid "" +"Each :keyword:`yield` temporarily suspends processing, remembering the " +"execution state (including local variables and pending try-statements). " +"When the *asynchronous generator iterator* effectively resumes with another " +"awaitable returned by :meth:`~object.__anext__`, it picks up where it left " +"off. See :pep:`492` and :pep:`525`." +msgstr "" +"Jeder :keyword:`yield` unterbricht die Verarbeitung vorübergehend und " +"speichert dabei den Ausführungsstatus (einschließlich lokaler Variablen und " +"ausstehender \"try\"-Anweisungen). Wenn der *asynchrone Generator-Iterator* " +"mit einem anderen von :meth:`~object.__anext__` zurückgegebenen " +"\"awaitable\" effektiv fortgesetzt wird, setzt er die Ausführung an der " +"Stelle fort, an der er unterbrochen wurde. Siehe :pep:`492` und :pep:`525`." + +#: ../../glossary.rst:128 +msgid "asynchronous iterable" +msgstr "asynchrones Iterabel" + +#: ../../glossary.rst:130 +msgid "" +"An object, that can be used in an :keyword:`async for` statement. Must " +"return an :term:`asynchronous iterator` from its :meth:`~object.__aiter__` " +"method. Introduced by :pep:`492`." +msgstr "" +"Ein Objekt, das in einer :keyword:`async for`-Anweisung verwendet werden " +"kann. Es muss über seine Methode :meth:`~object.__aiter__` einen :term:" +"`asynchronen Iterator ` zurückgeben. Eingeführt " +"durch :pep:`492`." + +#: ../../glossary.rst:133 +msgid "asynchronous iterator" +msgstr "asynchroner Iterator" + +#: ../../glossary.rst:135 +msgid "" +"An object that implements the :meth:`~object.__aiter__` and :meth:`~object." +"__anext__` methods. :meth:`~object.__anext__` must return an :term:" +"`awaitable` object. :keyword:`async for` resolves the awaitables returned by " +"an asynchronous iterator's :meth:`~object.__anext__` method until it raises " +"a :exc:`StopAsyncIteration` exception. Introduced by :pep:`492`." +msgstr "" +"Ein Objekt, das die Methoden :meth:`~object.__aiter__` und :meth:`~object." +"__anext__` implementiert. :meth:`~object.__anext__` muss ein :term:" +"`awaitable`-Objekt zurückgeben. :keyword:`async for` verarbeitet die von der " +"Methode :meth:`~object.__anext__` eines asynchronen Iterators " +"zurückgegebenen `awaitables`, bis eine Ausnahme vom Typ :exc:" +"`StopAsyncIteration` ausgelöst wird. Eingeführt durch :pep:`492`." + +#: ../../glossary.rst:140 +msgid "atomic operation" +msgstr "atomare Operation" + +#: ../../glossary.rst:142 +msgid "" +"An operation that appears to execute as a single, indivisible step: no other " +"thread can observe it half-done, and its effects become visible all at " +"once. Python does not guarantee that high-level statements are atomic (for " +"example, ``x += 1`` performs multiple bytecode operations and is not " +"atomic). Atomicity is only guaranteed where explicitly documented. See " +"also :term:`race condition` and :term:`data race`." +msgstr "" +"Eine Operation, die scheinbar als ein einziger, unteilbarer Schritt " +"ausgeführt wird: Kein anderer Thread kann sie in einem unvollendeten Zustand " +"beobachten, und ihre Auswirkungen werden auf einmal sichtbar. Python " +"garantiert nicht, dass Anweisungen auf hoher Ebene atomar sind " +"(beispielsweise führt ``x += 1`` mehrere Bytecode-Operationen aus und ist " +"nicht atomar). Atomarität wird nur dort garantiert, wo dies ausdrücklich " +"dokumentiert ist. Siehe auch :term:`Race Condition ` und :" +"term:`Data Race `." + +#: ../../glossary.rst:148 +msgid "attached thread state" +msgstr "Zustand des angehängten Threads" + +#: ../../glossary.rst:151 +msgid "A :term:`thread state` that is active for the current OS thread." +msgstr "" +"Ein :term:`Thread-Status `, der für den aktuellen " +"Betriebssystem-Thread aktiv ist." + +#: ../../glossary.rst:153 +msgid "" +"When a :term:`thread state` is attached, the OS thread has access to the " +"full Python C API and can safely invoke the bytecode interpreter." +msgstr "" +"Wenn ein :term:`Thread-Status ` zugeordnet ist, hat der " +"Betriebssystem-Thread Zugriff auf die vollständige Python-C-API und kann den " +"Bytecode-Interpreter sicher aufrufen." + +#: ../../glossary.rst:157 +msgid "" +"Unless a function explicitly notes otherwise, attempting to call the C API " +"without an attached thread state will result in a fatal error or undefined " +"behavior. A thread state can be attached and detached explicitly by the " +"user through the C API, or implicitly by the runtime, including during " +"blocking C calls and by the bytecode interpreter in between calls." +msgstr "" +"Sofern in einer Funktion nicht ausdrücklich anders angegeben, führt der " +"Versuch, die C-API ohne angehängten Thread-Status aufzurufen, zu einem " +"schwerwiegenden Fehler oder zu undefiniertem Verhalten. Ein Thread-Status " +"kann vom Benutzer explizit über die C-API angehängt und entfernt werden oder " +"implizit von der Laufzeitumgebung, unter anderem während blockierender C-" +"Aufrufe und durch den Bytecode-Interpreter zwischen den Aufrufen." + +#: ../../glossary.rst:164 +msgid "" +"On most builds of Python, having an attached thread state implies that the " +"caller holds the :term:`GIL` for the current interpreter, so only one OS " +"thread can have an attached thread state at a given moment. In :term:`free-" +"threaded builds ` of Python, threads can concurrently " +"hold an attached thread state, allowing for true parallelism of the bytecode " +"interpreter." +msgstr "" +"Bei den meisten Python-Builds bedeutet ein zugeordneter Thread-Zustand, dass " +"der Aufrufer den :term:`GIL` für den aktuellen Interpreter hält, sodass zu " +"einem bestimmten Zeitpunkt nur ein Betriebssystem-Thread einen zugeordneten " +"Thread-Zustand haben kann. In :term:`free-threaded-Versionen ` von Python können mehrere Threads gleichzeitig einen angehängten " +"Thread-Status halten, was eine echte Parallelität des Bytecode-Interpreters " +"ermöglicht." + +#: ../../glossary.rst:170 +msgid "attribute" +msgstr "Attribut" + +#: ../../glossary.rst:172 +msgid "" +"A value associated with an object which is usually referenced by name using " +"dotted expressions. For example, if an object *o* has an attribute *a* it " +"would be referenced as *o.a*." +msgstr "" +"Ein Wert, der einem Objekt zugeordnet ist und auf den in der Regel mithilfe " +"von Punktnotation unter Angabe des Namens verwiesen wird. Wenn " +"beispielsweise ein Objekt *o* ein Attribut *a* hat, würde darauf als *o.a* " +"verwiesen werden." + +#: ../../glossary.rst:177 +msgid "" +"It is possible to give an object an attribute whose name is not an " +"identifier as defined by :ref:`identifiers`, for example using :func:" +"`setattr`, if the object allows it. Such an attribute will not be accessible " +"using a dotted expression, and would instead need to be retrieved with :func:" +"`getattr`." +msgstr "" +"Es ist möglich, einem Objekt ein Attribut zuzuweisen, dessen Name kein " +"Bezeichner im Sinne von :ref:`identifiers` ist, beispielsweise mithilfe von :" +"func:`setattr`, sofern das Objekt dies zulässt. Auf ein solches Attribut " +"kann nicht über einen Punktausdruck zugegriffen werden; stattdessen muss es " +"mit :func:`getattr` abgerufen werden." + +#: ../../glossary.rst:182 +msgid "awaitable" +msgstr "abwartbar" + +#: ../../glossary.rst:184 +msgid "" +"An object that can be used in an :keyword:`await` expression. Can be a :" +"term:`coroutine` or an object with an :meth:`~object.__await__` method. See " +"also :pep:`492`." +msgstr "" +"Ein Objekt, das in einem Ausdruck vom Typ :keyword:`await` verwendet " +"werden kann. Kann eine :term:`coroutine` oder ein Objekt mit einer Methode " +"vom Typ :meth:`~object.__await__` sein. Siehe auch :pep:`492`." + +#: ../../glossary.rst:187 +msgid "BDFL" +msgstr "BDFL" + +#: ../../glossary.rst:189 +msgid "" +"Benevolent Dictator For Life, a.k.a. `Guido van Rossum `_, Python's creator." +msgstr "" +"Wohltätiger Diktator auf Lebenszeit, auch bekannt als `Guido van Rossum " +"`_ , der Schöpfer von Python." + +#: ../../glossary.rst:191 +msgid "binary file" +msgstr "Binärdatei" + +#: ../../glossary.rst:193 +msgid "" +"A :term:`file object` able to read and write :term:`bytes-like objects " +"`. Examples of binary files are files opened in binary " +"mode (``'rb'``, ``'wb'`` or ``'rb+'``), :data:`sys.stdin.buffer `, :data:`sys.stdout.buffer `, and instances of :class:`io." +"BytesIO` and :class:`gzip.GzipFile`." +msgstr "" +"Ein :term:`Dateiobjekt `, das :term:`byteähnliche Objekte " +"` lesen und schreiben kann. Beispiele für Binärdateien " +"sind Dateien, die im Binärmodus geöffnet wurden (``'rb'``, ``'wb'`` oder " +"``'rb+'``), :data:`sys.stdin.buffer `, :data:`sys.stdout.buffer " +"` sowie Instanzen von :class:`io.BytesIO` und :class:`gzip." +"GzipFile`." + +#: ../../glossary.rst:200 +msgid "" +"See also :term:`text file` for a file object able to read and write :class:" +"`str` objects." +msgstr "" +"Siehe auch :term:`Textdatei ` für ein Dateiobjekt, das Objekte " +"vom Typ :class:`str` lesen und schreiben kann." + +#: ../../glossary.rst:202 +msgid "borrowed reference" +msgstr "entlehnte Referenz" + +#: ../../glossary.rst:204 +msgid "" +"In Python's C API, a borrowed reference is a reference to an object, where " +"the code using the object does not own the reference. It becomes a dangling " +"pointer if the object is destroyed. For example, a garbage collection can " +"remove the last :term:`strong reference` to the object and so destroy it." +msgstr "" +"In der C-API von Python ist eine ausgeliehene Referenz eine Referenz auf ein " +"Objekt, wobei der Code, der das Objekt verwendet, nicht Eigentümer der " +"Referenz ist. Sie wird zu einem dangling pointer, wenn das Objekt zerstört " +"wird. Beispielsweise kann eine Garbage Collection die letzte :term:`starke " +"Referenz ` auf das Objekt entfernen und es so zerstören." + +#: ../../glossary.rst:210 +msgid "" +"Calling :c:func:`Py_INCREF` on the :term:`borrowed reference` is recommended " +"to convert it to a :term:`strong reference` in-place, except when the object " +"cannot be destroyed before the last usage of the borrowed reference. The :c:" +"func:`Py_NewRef` function can be used to create a new :term:`strong " +"reference`." +msgstr "" +"Es wird empfohlen, die Funktion :c:func:`Py_INCREF` auf die :term:" +"`geliehene Referenz ` anzuwenden, um diese an Ort und " +"Stelle in eine :term:`starke Referenz ` umzuwandeln – es " +"sei denn, das Objekt kann nicht vor der letzten Verwendung der geliehenen " +"Referenz zerstört werden. Mit der Funktion :c:func:`Py_NewRef` kann eine " +"neue :term:`starke Referenz ` erstellt werden." + +#: ../../glossary.rst:215 +msgid "bytes-like object" +msgstr "Byte-ähnliches Objekt" + +#: ../../glossary.rst:217 +msgid "" +"An object that supports the :ref:`bufferobjects` and can export a C-:term:" +"`contiguous` buffer. This includes all :class:`bytes`, :class:`bytearray`, " +"and :class:`array.array` objects, as well as many common :class:`memoryview` " +"objects. Bytes-like objects can be used for various operations that work " +"with binary data; these include compression, saving to a binary file, and " +"sending over a socket." +msgstr "" +"Ein Objekt, das die Schnittstelle :ref:`bufferobjects` unterstützt und " +"einen C-:term:`contiguous`-Puffer exportieren kann. Dazu gehören alle " +"Objekte vom Typ :class:`bytes` , :class:`bytearray` und :class:`array." +"array` sowie viele gängige Objekte vom Typ :class:`memoryview` . Bytes-" +"ähnliche Objekte können für verschiedene Operationen verwendet werden, die " +"mit Binärdaten arbeiten; dazu gehören Komprimierung, das Speichern in einer " +"Binärdatei und das Senden über einen Socket." + +#: ../../glossary.rst:224 +msgid "" +"Some operations need the binary data to be mutable. The documentation often " +"refers to these as \"read-write bytes-like objects\". Example mutable " +"buffer objects include :class:`bytearray` and a :class:`memoryview` of a :" +"class:`bytearray`. Other operations require the binary data to be stored in " +"immutable objects (\"read-only bytes-like objects\"); examples of these " +"include :class:`bytes` and a :class:`memoryview` of a :class:`bytes` object." +msgstr "" +"Bei einigen Operationen müssen die Binärdaten veränderbar sein. In der " +"Dokumentation werden diese häufig als \"les- und schreibbare byteähnliche " +"Objekte\" bezeichnet. Beispiele für veränderbare Pufferobjekte sind :class:" +"`bytearray` und ein :class:`memoryview` eines :class:`bytearray` -" +"Objekts. Andere Operationen erfordern, dass die Binärdaten in " +"unveränderbaren Objekten (read-only bytes-like objects) gespeichert werden; " +"Beispiele hierfür sind :class:`bytes` und ein :class:`memoryview` " +"eines :class:`bytes` -Objekts." + +#: ../../glossary.rst:232 +msgid "bytecode" +msgstr "Bytecode" + +#: ../../glossary.rst:234 +msgid "" +"Python source code is compiled into bytecode, the internal representation of " +"a Python program in the CPython interpreter. The bytecode is also cached in " +"``.pyc`` files so that executing the same file is faster the second time " +"(recompilation from source to bytecode can be avoided). This \"intermediate " +"language\" is said to run on a :term:`virtual machine` that executes the " +"machine code corresponding to each bytecode. Do note that bytecodes are not " +"expected to work between different Python virtual machines, nor to be stable " +"between Python releases." +msgstr "" +"Python-Quellcode wird zu Bytecode kompiliert, der internen Darstellung eines " +"Python-Programms im CPython-Interpreter. Der Bytecode wird zudem in ``." +"pyc`` -Dateien zwischengespeichert, sodass die Ausführung derselben Datei " +"beim zweiten Mal schneller erfolgt (eine Neukompilierung vom Quellcode zum " +"Bytecode kann vermieden werden). Diese \"Zwischensprache\" läuft auf einer :" +"term:`virtuellen Maschine `, die den jedem Bytecode " +"entsprechenden Maschinencode ausführt. Beachte jedoch, dass Bytecodes nicht " +"unbedingt zwischen verschiedenen virtuellen Python-Maschinen funktionieren " +"und auch nicht über Python-Versionen hinweg stabil sind." + +#: ../../glossary.rst:244 +msgid "" +"A list of bytecode instructions can be found in the documentation for :ref:" +"`the dis module `." +msgstr "" +"Eine Liste der Bytecode-Befehle findest du in der Dokumentation zum :ref:" +"`dis-Modul `." + +#: ../../glossary.rst:246 +msgid "callable" +msgstr "abrufbar" + +#: ../../glossary.rst:248 +msgid "" +"A callable is an object that can be called, possibly with a set of arguments " +"(see :term:`argument`), with the following syntax::" +msgstr "" +"Ein Callable ist ein Objekt, das aufgerufen werden kann, gegebenenfalls mit " +"einer Reihe von Argumenten (siehe :term:`argument`), und zwar mit folgender " +"Syntax::" + +#: ../../glossary.rst:251 +msgid "callable(argument1, argument2, argumentN)" +msgstr "callable(argument1, argument2, argumentN)" + +#: ../../glossary.rst:253 +msgid "" +"A :term:`function`, and by extension a :term:`method`, is a callable. An " +"instance of a class that implements the :meth:`~object.__call__` method is " +"also a callable." +msgstr "" +"Eine :term:`Funktion ` und im weiteren Sinne auch eine :term:" +"`Methode ` ist ein aufrufbares Objekt. Eine Instanz einer Klasse, " +"die die Methode :meth:`~object.__call__` implementiert, ist ebenfalls ein " +"aufrufbares Objekt." + +#: ../../glossary.rst:256 +msgid "callback" +msgstr "Callback" + +#: ../../glossary.rst:258 +msgid "" +"A subroutine function which is passed as an argument to be executed at some " +"point in the future." +msgstr "" +"Eine Unterprogrammfunktion, die als Argument übergeben wird, um zu einem " +"späteren Zeitpunkt ausgeführt zu werden." + +#: ../../glossary.rst:260 +msgid "class" +msgstr "Klasse" + +#: ../../glossary.rst:262 +msgid "" +"A template for creating user-defined objects. Class definitions normally " +"contain method definitions which operate on instances of the class." +msgstr "" +"Eine Vorlage zum Erstellen benutzerdefinierter Objekte. Klassendefinitionen " +"enthalten in der Regel Methodendefinitionen, die auf Instanzen der Klasse " +"angewendet werden." + +#: ../../glossary.rst:265 +msgid "class variable" +msgstr "Klassenvariable" + +#: ../../glossary.rst:267 +msgid "" +"A variable defined in a class and intended to be modified only at class " +"level (i.e., not in an instance of the class)." +msgstr "" +"Eine Variable, die in einer Klasse definiert ist und nur auf Klassenebene " +"(d. h. nicht in einer Instanz der Klasse) geändert werden soll." + +#: ../../glossary.rst:269 +msgid "closure variable" +msgstr "Closure-Variable" + +#: ../../glossary.rst:271 +msgid "" +"A :term:`free variable` referenced from a :term:`nested scope` that is " +"defined in an outer scope rather than being resolved at runtime from the " +"globals or builtin namespaces. May be explicitly defined with the :keyword:" +"`nonlocal` keyword to allow write access, or implicitly defined if the " +"variable is only being read." +msgstr "" +"Eine :term:`freie Variable `, auf die aus einem :term:" +"`verschachtelten Gültigkeitsbereich ` verwiesen wird und die " +"in einem äußeren Gültigkeitsbereich definiert ist, anstatt zur Laufzeit aus " +"den globalen oder eingebauten Namensräumen aufgelöst zu werden. Sie kann " +"explizit mit dem Schlüsselwort :keyword:`nonlocal` definiert werden, um " +"Schreibzugriff zu ermöglichen, oder implizit, wenn die Variable nur gelesen " +"wird." + +#: ../../glossary.rst:276 +msgid "" +"For example, in the ``inner`` function in the following code, both ``x`` and " +"``print`` are :term:`free variables `, but only ``x`` is a " +"*closure variable*::" +msgstr "" +"Beispielsweise sind in der Funktion ``inner`` im folgenden Code sowohl " +"``x`` als auch ``print`` :term:`freie Variablen `, aber nur " +"``x`` ist eine *Closure-Variable*::" + +#: ../../glossary.rst:279 +msgid "" +"def outer():\n" +" x = 0\n" +" def inner():\n" +" nonlocal x\n" +" x += 1\n" +" print(x)\n" +" return inner" +msgstr "" +"def outer():\n" +" x = 0\n" +" def inner():\n" +" nonlocal x\n" +" x += 1\n" +" print(x)\n" +" return inner" + +#: ../../glossary.rst:287 +msgid "" +"Due to the :attr:`codeobject.co_freevars` attribute (which, despite its " +"name, only includes the names of closure variables rather than listing all " +"referenced free variables), the more general :term:`free variable` term is " +"sometimes used even when the intended meaning is to refer specifically to " +"closure variables." +msgstr "" +"Aufgrund des Attributs :attr:`codeobject.co_freevars` (das trotz seines " +"Namens lediglich die Namen von Closure-Variablen enthält, anstatt alle " +"referenzierten freien Variablen aufzulisten) wird der allgemeinere Begriff :" +"term:`freie Variable ` manchmal verwendet, selbst wenn " +"eigentlich speziell auf Closure-Variablen Bezug genommen werden soll." + +#: ../../glossary.rst:291 +msgid "complex number" +msgstr "komplexe Zahl" + +#: ../../glossary.rst:293 +msgid "" +"An extension of the familiar real number system in which all numbers are " +"expressed as a sum of a real part and an imaginary part. Imaginary numbers " +"are real multiples of the imaginary unit (the square root of ``-1``), often " +"written ``i`` in mathematics or ``j`` in engineering. Python has built-in " +"support for complex numbers, which are written with this latter notation; " +"the imaginary part is written with a ``j`` suffix, e.g., ``3+1j``. To get " +"access to complex equivalents of the :mod:`math` module, use :mod:`cmath`. " +"Use of complex numbers is a fairly advanced mathematical feature. If you're " +"not aware of a need for them, it's almost certain you can safely ignore them." +msgstr "" +"Eine Erweiterung des bekannten Systems der reellen Zahlen, in der alle " +"Zahlen als Summe aus einem reellen und einem imaginären Teil ausgedrückt " +"werden. Imaginäre Zahlen sind reelle Vielfache der imaginären Einheit (der " +"Quadratwurzel von ``-1``), die in der Mathematik häufig als ``i`` und im " +"Ingenieurwesen als ``j`` geschrieben werden. Python bietet integrierte " +"Unterstützung für komplexe Zahlen, die in der letztgenannten Notation " +"geschrieben werden; der Imaginärteil wird mit dem Suffix ``j`` angegeben, " +"z. B. ``3+1j`` . Um auf die komplexen Entsprechungen des Moduls :mod:" +"`math` zuzugreifen, verwende :mod:`cmath` . Die Verwendung komplexer " +"Zahlen ist eine recht fortgeschrittene mathematische Funktion. Wenn du " +"keinen Bedarf dafür siehst, kannst du diese Funktionen mit ziemlicher " +"Sicherheit getrost ignorieren." + +#: ../../glossary.rst:303 +msgid "concurrency" +msgstr "Gleichzeitigkeit" + +#: ../../glossary.rst:305 +msgid "" +"The ability of a computer program to perform multiple tasks at the same " +"time. Python provides libraries for writing programs that make use of " +"different forms of concurrency. :mod:`asyncio` is a library for dealing " +"with asynchronous tasks and coroutines. :mod:`threading` provides access to " +"operating system threads and :mod:`multiprocessing` to operating system " +"processes. Multi-core processors can execute threads and processes on " +"different CPU cores at the same time (see :term:`parallelism`)." +msgstr "" +"Die Fähigkeit eines Computerprogramms, mehrere Aufgaben gleichzeitig " +"auszuführen. Python bietet Bibliotheken zum Schreiben von Programmen, die " +"verschiedene Formen der Gleichzeitigkeit nutzen. :mod:`asyncio` ist eine " +"Bibliothek für den Umgang mit asynchronen Aufgaben und Coroutinen. :mod:" +"`threading` bietet Zugriff auf Betriebssystem-Threads und :mod:" +"`multiprocessing` auf Betriebssystem-Prozesse. Multi-Core-Prozessoren " +"können Threads und Prozesse gleichzeitig auf verschiedenen CPU-Kernen " +"ausführen (siehe :term:`Parallelität `)." + +#: ../../glossary.rst:313 +msgid "concurrent modification" +msgstr "gleichzeitige Änderung" + +#: ../../glossary.rst:315 +msgid "" +"When multiple threads modify shared data at the same time. Concurrent " +"modification without proper synchronization can cause :term:`race conditions " +"`, and might also trigger a :term:`data race `, " +"data corruption, or both." +msgstr "" +"Wenn mehrere Threads gleichzeitig gemeinsam genutzte Daten ändern. Eine " +"gleichzeitige Änderung ohne ordnungsgemäße Synchronisation kann zu :term:" +"`Race Conditions ` führen und möglicherweise auch einen :" +"term:`Datenkonflikt `, Datenbeschädigungen oder beides auslösen." + +#: ../../glossary.rst:319 +msgid "context" +msgstr "Kontext" + +#: ../../glossary.rst:321 +msgid "" +"This term has different meanings depending on where and how it is used. Some " +"common meanings:" +msgstr "" +"Dieser Begriff hat je nach Kontext und Verwendung unterschiedliche " +"Bedeutungen. Einige gängige Bedeutungen:" + +#: ../../glossary.rst:324 +msgid "" +"The temporary state or environment established by a :term:`context manager` " +"via a :keyword:`with` statement." +msgstr "" +"Der temporäre Zustand oder die Umgebung, die von einem :term:`Context " +"Manager ` über eine :keyword:`with` -Anweisung " +"eingerichtet wird." + +#: ../../glossary.rst:326 +msgid "" +"The collection of key­value bindings associated with a particular :class:" +"`contextvars.Context` object and accessed via :class:`~contextvars." +"ContextVar` objects. Also see :term:`context variable`." +msgstr "" +"Die Sammlung von Schlüssel-Wert-Zuordnungen, die einem bestimmten :class:" +"`contextvars.Context`-Objekt zugeordnet sind und über :class:`~contextvars." +"ContextVar`-Objekte abgerufen werden. Siehe auch :term:`Kontextvariable " +"`." + +#: ../../glossary.rst:330 +msgid "" +"A :class:`contextvars.Context` object. Also see :term:`current context`." +msgstr "" +"Ein :class:`contextvars.Context` -Objekt. Siehe auch :term:`aktueller " +"Kontext `." + +#: ../../glossary.rst:332 +msgid "context management protocol" +msgstr "Kontextverwaltungsprotokoll" + +#: ../../glossary.rst:334 +msgid "" +"The :meth:`~object.__enter__` and :meth:`~object.__exit__` methods called by " +"the :keyword:`with` statement. See :pep:`343`." +msgstr "" +"Die Methoden :meth:`~object.__enter__` und :meth:`~object.__exit__` , die " +"von der Anweisung :keyword:`with` aufgerufen werden. Siehe :pep:`343`." + +#: ../../glossary.rst:336 +msgid "context manager" +msgstr "Kontextmanager" + +#: ../../glossary.rst:338 +msgid "" +"An object which implements the :term:`context management protocol` and " +"controls the environment seen in a :keyword:`with` statement. See :pep:" +"`343`." +msgstr "" +"Ein Objekt, das das :term:`Kontextverwaltungsprotokoll ` implementiert und die Umgebung steuert, die in einer :keyword:" +"`with` -Anweisung sichtbar ist. Siehe :pep:`343`." + +#: ../../glossary.rst:341 +msgid "context variable" +msgstr "Kontextvariable" + +#: ../../glossary.rst:343 +msgid "" +"A variable whose value depends on which context is the :term:`current " +"context`. Values are accessed via :class:`contextvars.ContextVar` objects. " +"Context variables are primarily used to isolate state between concurrent " +"asynchronous tasks." +msgstr "" +"Eine Variable, deren Wert davon abhängt, welcher Kontext gerade aktiv ist, " +"wird als :term:`aktueller Kontext ` bezeichnet. Der Zugriff " +"auf die Werte erfolgt über Objekte vom Typ :class:`contextvars." +"ContextVar` . Kontextvariablen werden in erster Linie dazu verwendet, den " +"Zustand zwischen parallel laufenden asynchronen Aufgaben zu isolieren." + +#: ../../glossary.rst:347 +msgid "contiguous" +msgstr "zusammenhängend" + +#: ../../glossary.rst:351 +msgid "" +"A buffer is considered contiguous exactly if it is either *C-contiguous* or " +"*Fortran contiguous*. Zero-dimensional buffers are C and Fortran " +"contiguous. In one-dimensional arrays, the items must be laid out in memory " +"next to each other, in order of increasing indexes starting from zero. In " +"multidimensional C-contiguous arrays, the last index varies the fastest when " +"visiting items in order of memory address. However, in Fortran contiguous " +"arrays, the first index varies the fastest." +msgstr "" +"Ein Puffer gilt genau dann als zusammenhängend, wenn er entweder *C-" +"zusammenhängend* oder *Fortran-zusammenhängend* ist. Null-dimensionale " +"Puffer sind sowohl C- als auch Fortran-zusammenhängend. In eindimensionalen " +"Arrays müssen die Elemente im Speicher nebeneinander angeordnet sein, und " +"zwar in aufsteigender Reihenfolge der Indizes, beginnend bei Null. In " +"mehrdimensionalen C-zusammenhängenden Arrays ändert sich der letzte Index am " +"schnellsten, wenn die Elemente in der Reihenfolge ihrer Speicheradressen " +"durchlaufen werden. In Fortran-zusammenhängenden Arrays hingegen ändert " +"sich der erste Index am schnellsten." + +#: ../../glossary.rst:359 +msgid "coroutine" +msgstr "Koroutine" + +#: ../../glossary.rst:361 +msgid "" +"Coroutines are a more generalized form of subroutines. Subroutines are " +"entered at one point and exited at another point. Coroutines can be " +"entered, exited, and resumed at many different points. They can be " +"implemented with the :keyword:`async def` statement. See also :pep:`492`." +msgstr "" +"Coroutinen sind eine verallgemeinerte Form von Unterprogrammen. " +"Unterprogramme werden an einer Stelle aufgerufen und an einer anderen Stelle " +"beendet. Coroutinen können an vielen verschiedenen Stellen aufgerufen, " +"beendet und fortgesetzt werden. Sie lassen sich mit der Anweisung :keyword:" +"`async def` implementieren. Siehe auch :pep:`492`." + +#: ../../glossary.rst:366 +msgid "coroutine function" +msgstr "Coroutinen-Funktion" + +#: ../../glossary.rst:368 +msgid "" +"A function which returns a :term:`coroutine` object. A coroutine function " +"may be defined with the :keyword:`async def` statement, and may contain :" +"keyword:`await`, :keyword:`async for`, and :keyword:`async with` keywords. " +"These were introduced by :pep:`492`." +msgstr "" +"Eine Funktion, die ein :term:`coroutine`-Objekt zurückgibt. Eine Coroutine-" +"Funktion kann mit der Anweisung :keyword:`async def` definiert werden und " +"die Schlüsselwörter :keyword:`await`, :keyword:`async for` sowie :keyword:" +"`async with` enthalten. Diese wurden mit :pep:`492` eingeführt." + +#: ../../glossary.rst:373 +msgid "CPython" +msgstr "CPython" + +#: ../../glossary.rst:375 +msgid "" +"The canonical implementation of the Python programming language, as " +"distributed on `python.org `_. The term \"CPython\" " +"is used when necessary to distinguish this implementation from others such " +"as Jython or IronPython." +msgstr "" +"Die kanonische Implementierung der Programmiersprache Python, wie sie auf " +"`python.org `_ bereitgestellt wird. Der Begriff " +"\"CPython\" wird bei Bedarf verwendet, um diese Implementierung von anderen " +"wie Jython oder IronPython zu unterscheiden." + +#: ../../glossary.rst:379 +msgid "current context" +msgstr "aktueller Kontext" + +#: ../../glossary.rst:381 +msgid "" +"The :term:`context` (:class:`contextvars.Context` object) that is currently " +"used by :class:`~contextvars.ContextVar` objects to access (get or set) the " +"values of :term:`context variables `. Each thread has its " +"own current context. Frameworks for executing asynchronous tasks (see :mod:" +"`asyncio`) associate each task with a context which becomes the current " +"context whenever the task starts or resumes execution." +msgstr "" +"Der :term:`Kontext ` (:class:`contextvars.Context`-Objekt), der " +"derzeit von :class:`~contextvars.ContextVar`-Objekten verwendet wird, um auf " +"die Werte von :term:`Kontextvariablen ` zuzugreifen " +"(abzurufen oder festzulegen). Jeder Thread verfügt über einen eigenen " +"aktuellen Kontext. Frameworks zur Ausführung asynchroner Aufgaben (siehe :" +"mod:`asyncio`) ordnen jeder Aufgabe einen Kontext zu, der zum aktuellen " +"Kontext wird, sobald die Aufgabe ihre Ausführung beginnt oder fortsetzt." + +#: ../../glossary.rst:387 +msgid "cyclic isolate" +msgstr "zyklisches Isolat" + +#: ../../glossary.rst:389 +msgid "" +"A subgroup of one or more objects that reference each other in a reference " +"cycle, but are not referenced by objects outside the group. The goal of " +"the :term:`cyclic garbage collector ` is to identify " +"these groups and break the reference cycles so that the memory can be " +"reclaimed." +msgstr "" +"Eine Untergruppe aus einem oder mehreren Objekten, die sich in einem " +"Referenzzyklus gegenseitig referenzieren, aber von Objekten außerhalb der " +"Gruppe nicht referenziert werden. Das Ziel des :term:`zyklischen Garbage " +"Collectors ` besteht darin, diese Gruppen zu " +"identifizieren und die Referenzzyklen aufzubrechen, damit der Speicher " +"freigegeben werden kann." + +#: ../../glossary.rst:393 +msgid "data race" +msgstr "Datenkonflikt" + +#: ../../glossary.rst:395 +msgid "" +"A situation where multiple threads access the same memory location " +"concurrently, at least one of the accesses is a write, and the threads do " +"not use any synchronization to control their access. Data races lead to :" +"term:`non-deterministic` behavior and can cause data corruption. Proper use " +"of :term:`locks ` and other :term:`synchronization primitives " +"` prevents data races. Note that data races can " +"only happen in native code, but that :term:`native code` might be exposed in " +"a Python API. See also :term:`race condition` and :term:`thread-safe`." +msgstr "" +"Eine Situation, in der mehrere Threads gleichzeitig auf dieselbe " +"Speicherstelle zugreifen, mindestens einer der Zugriffe ein Schreibzugriff " +"ist und die Threads keine Synchronisierung verwenden, um ihren Zugriff zu " +"steuern. Datenkonflikte führen zu :term:`nicht deterministischem ` Verhalten und können Datenkorruption verursachen. Der " +"richtige Einsatz von :term:`Schlössern ` und anderen :term:" +"`Synchronisationsprimitiven ` verhindert " +"Datenkonflikte. Beachte, dass Datenkonflikte nur in nativem Code auftreten " +"können, dass :term:`Nativcode ` jedoch in einer Python-API " +"zugänglich gemacht werden kann. Siehe auch :term:`Race-Condition ` und :term:`thread-safe`." + +#: ../../glossary.rst:404 +msgid "deadlock" +msgstr "Pattsituation" + +#: ../../glossary.rst:406 +msgid "" +"A situation in which two or more tasks (threads, processes, or coroutines) " +"wait indefinitely for each other to release resources or complete actions, " +"preventing any from making progress. For example, if thread A holds lock 1 " +"and waits for lock 2, while thread B holds lock 2 and waits for lock 1, both " +"threads will wait indefinitely. In Python this often arises from acquiring " +"multiple locks in conflicting orders or from circular join/await " +"dependencies. Deadlocks can be avoided by always acquiring multiple :term:" +"`locks ` in a consistent order. See also :term:`lock` and :term:" +"`reentrant`." +msgstr "" +"Eine Situation, in der zwei oder mehr Aufgaben (Threads, Prozesse oder " +"Coroutinen) unbegrenzt darauf warten, dass die jeweils anderen Ressourcen " +"freigeben oder Aktionen abschließen, wodurch keine der Aufgaben vorankommt. " +"Wenn beispielsweise Thread A die Sperre 1 hält und auf die Sperre 2 wartet, " +"während Thread B die Sperre 2 hält und auf die Sperre 1 wartet, werden beide " +"Threads auf unbestimmte Zeit warten. In Python entsteht dies häufig durch " +"das Erlangen mehrerer Sperren in widersprüchlicher Reihenfolge oder durch " +"zirkuläre join/await-Abhängigkeiten. Deadlocks lassen sich vermeiden, indem " +"mehrere :term:`Sperren ` stets in einer konsistenten Reihenfolge " +"erworben werden. Siehe auch :term:`Sperre ` und :term:`reentrant`." + +#: ../../glossary.rst:415 +msgid "decorator" +msgstr "Dekorateur" + +#: ../../glossary.rst:417 +msgid "" +"A function returning another function, usually applied as a function " +"transformation using the ``@wrapper`` syntax. Common examples for " +"decorators are :deco:`classmethod` and :deco:`staticmethod`." +msgstr "" +"Eine Funktion, die eine andere Funktion zurückgibt und in der Regel als " +"Funktionstransformation mithilfe der Syntax ``@wrapper`` angewendet wird. " +"Gängige Beispiele für Dekoratoren sind :deco:`classmethod` und :deco:" +"`staticmethod`." + +#: ../../glossary.rst:421 +msgid "" +"The decorator syntax is merely syntactic sugar, the following two function " +"definitions are semantically equivalent::" +msgstr "" +"Die Dekorator-Syntax ist lediglich Syntactic Sugar; die folgenden beiden " +"Funktionsdefinitionen sind semantisch gleichbedeutend::" + +#: ../../glossary.rst:424 +msgid "" +"def f(arg):\n" +" ...\n" +"f = staticmethod(f)\n" +"\n" +"@staticmethod\n" +"def f(arg):\n" +" ..." +msgstr "" +"def f(arg):\n" +" ...\n" +"f = staticmethod(f)\n" +"\n" +"@staticmethod\n" +"def f(arg):\n" +" ..." + +#: ../../glossary.rst:432 +msgid "" +"The same concept exists for classes, but is less commonly used there. See " +"the documentation for :ref:`function definitions ` and :ref:`class " +"definitions ` for more about decorators." +msgstr "" +"Das gleiche Konzept gibt es auch für Klassen, wird dort jedoch seltener " +"verwendet. Weitere Informationen zu Dekoratoren findest du in der " +"Dokumentation zu :ref:`Funktionsdefinitionen ` und :ref:" +"`Klassendefinitionen `." + +#: ../../glossary.rst:435 +msgid "descriptor" +msgstr "Deskriptor" + +#: ../../glossary.rst:437 +msgid "" +"Any object which defines the methods :meth:`~object.__get__`, :meth:`~object." +"__set__`, or :meth:`~object.__delete__`. When a class attribute is a " +"descriptor, its special binding behavior is triggered upon attribute " +"lookup. Normally, using *a.b* to get, set or delete an attribute looks up " +"the object named *b* in the class dictionary for *a*, but if *b* is a " +"descriptor, the respective descriptor method gets called. Understanding " +"descriptors is a key to a deep understanding of Python because they are the " +"basis for many features including functions, methods, properties, class " +"methods, static methods, and reference to super classes." +msgstr "" +"Jedes Objekt, das die Methoden :meth:`~object.__get__` , :meth:`~object." +"__set__` oder :meth:`~object.__delete__` definiert. Wenn ein " +"Klassenattribut ein Deskriptor ist, wird sein spezielles Bindungsverhalten " +"bei der Attributsuche ausgelöst. Normalerweise wird bei der Verwendung von " +"*a.b* zum Abrufen, Setzen oder Löschen eines Attributs das Objekt mit dem " +"Namen *b* im Klassenwörterbuch von *a* nachgeschlagen; ist *b* jedoch ein " +"Deskriptor, wird die entsprechende Deskriptormethode aufgerufen. Das " +"Verständnis von Deskriptoren ist der Schlüssel zu einem tiefgreifenden " +"Verständnis von Python, da sie die Grundlage für viele Funktionen bilden, " +"darunter Funktionen, Methoden, Eigenschaften, Klassenmethoden, statische " +"Methoden und Verweise auf Oberklassen." + +#: ../../glossary.rst:448 +msgid "" +"For more information about descriptors' methods, see :ref:`descriptors` or " +"the :ref:`Descriptor How To Guide `." +msgstr "" +"Weitere Informationen zu den Methoden von Deskriptoren findest du unter :ref:" +"`descriptors` oder im :ref:`Descriptor How To Guide `." + +#: ../../glossary.rst:450 +msgid "dictionary" +msgstr "Wörterbuch" + +#: ../../glossary.rst:452 +msgid "" +"An associative array, where arbitrary keys are mapped to values. The keys " +"can be any object with :meth:`~object.__hash__` and :meth:`~object.__eq__` " +"methods. Called a hash in Perl." +msgstr "" +"Ein assoziatives Array, bei dem beliebige Schlüssel Werten zugeordnet " +"werden. Die Schlüssel können beliebige Objekte sein, die über die Methoden :" +"meth:`~object.__hash__` und :meth:`~object.__eq__` verfügen. In Perl wird " +"dies als Hash bezeichnet." + +#: ../../glossary.rst:456 +msgid "dictionary comprehension" +msgstr "Wörterbuchverständnis" + +#: ../../glossary.rst:458 +msgid "" +"A compact way to process all or part of the elements in an iterable and " +"return a dictionary with the results. ``results = {n: n ** 2 for n in " +"range(10)}`` generates a dictionary containing key ``n`` mapped to value ``n " +"** 2``. See :ref:`comprehensions`." +msgstr "" +"Eine kompakte Möglichkeit, alle oder einen Teil der Elemente eines " +"iterierbaren Objekts zu verarbeiten und ein Wörterbuch mit den Ergebnissen " +"zurückzugeben. ``results = {n: n ** 2 for n in range(10)}`` generiert ein " +"Wörterbuch, das Schlüssel- ``n`` enthält, die den Wert- ``n ** 2`` " +"zugeordnet sind. Siehe :ref:`comprehensions`." + +#: ../../glossary.rst:462 +msgid "dictionary view" +msgstr "Wörterbuchansicht" + +#: ../../glossary.rst:464 +msgid "" +"The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and :meth:" +"`dict.items` are called dictionary views. They provide a dynamic view on the " +"dictionary’s entries, which means that when the dictionary changes, the view " +"reflects these changes. To force the dictionary view to become a full list " +"use ``list(dictview)``. See :ref:`dict-views`." +msgstr "" +"Die Objekte, die von den Methoden :meth:`dict.keys` , :meth:`dict.values` " +"und :meth:`dict.items` zurückgegeben werden, werden als Dictionary-" +"Ansichten bezeichnet. Sie bieten eine dynamische Ansicht der Einträge im " +"Dictionary, was bedeutet, dass sich Änderungen am Dictionary unmittelbar in " +"der Ansicht widerspiegeln. Um die Dictionary-Ansicht zwangsweise in eine " +"vollständige Liste umzuwandeln, verwende ``list(dictview)``. Siehe :ref:" +"`dict-views`." + +#: ../../glossary.rst:470 +msgid "docstring" +msgstr "docstring" + +#: ../../glossary.rst:472 +msgid "" +"A string literal which appears as the first expression in a class, function " +"or module. While ignored when the suite is executed, it is recognized by " +"the compiler and put into the :attr:`~definition.__doc__` attribute of the " +"enclosing class, function or module. Since it is available via " +"introspection, it is the canonical place for documentation of the object." +msgstr "" +"Ein String-Literal, das als erster Ausdruck in einer Klasse, Funktion oder " +"einem Modul erscheint. Es wird zwar bei der Ausführung der Testsuite " +"ignoriert, jedoch vom Compiler erkannt und in das Attribut :attr:" +"`~definition.__doc__` der umschließenden Klasse, Funktion oder des Moduls " +"übernommen. Da es über Introspektion verfügbar ist, stellt es den " +"kanonischen Ort für die Dokumentation des Objekts dar." + +#: ../../glossary.rst:478 +msgid "duck-typing" +msgstr "Duck-Typing" + +#: ../../glossary.rst:480 +msgid "" +"A programming style which does not look at an object's type to determine if " +"it has the right interface; instead, the method or attribute is simply " +"called or used (\"If it looks like a duck and quacks like a duck, it must be " +"a duck.\") By emphasizing interfaces rather than specific types, well-" +"designed code improves its flexibility by allowing polymorphic " +"substitution. Duck-typing avoids tests using :func:`type` or :func:" +"`isinstance`. (Note, however, that duck-typing can be complemented with :" +"term:`abstract base classes `.) Instead, it typically " +"employs :func:`hasattr` tests or :term:`EAFP` programming." +msgstr "" +"Ein Programmierstil, bei dem nicht der Typ eines Objekts herangezogen wird, " +"um festzustellen, ob es über die richtige Schnittstelle verfügt; stattdessen " +"wird die Methode oder das Attribut einfach aufgerufen bzw. verwendet (\"Wenn " +"es wie eine Ente aussieht und wie eine Ente quakt, muss es eine Ente sein." +"\") Durch die Betonung von Schnittstellen anstelle spezifischer Typen " +"verbessert gut gestalteter Code seine Flexibilität, indem er polymorphe " +"Substitution ermöglicht. Duck-Typing vermeidet Tests mit :func:`type` " +"oder :func:`isinstance` . (Beachte jedoch, dass Duck-Typing durch :term:" +"`abstrakte Basisklassen ` ergänzt werden kann.) " +"Stattdessen werden typischerweise :func:`hasattr` -Tests oder :term:`EAFP`-" +"Programmierung eingesetzt." + +#: ../../glossary.rst:489 +msgid "dunder" +msgstr "dunder" + +#: ../../glossary.rst:491 +msgid "" +"An informal short-hand for \"double underscore\", used when talking about a :" +"term:`special method`. For example, ``__init__`` is often pronounced " +"\"dunder init\"." +msgstr "" +"Eine umgangssprachliche Abkürzung für \"doppelter Unterstrich\", die " +"verwendet wird, wenn von einer :term:`speziellen Methode ` " +"die Rede ist. So wird beispielsweise ``__init__`` oft als \"dunder init\" " +"ausgesprochen." + +#: ../../glossary.rst:494 +msgid "EAFP" +msgstr "EAFP" + +#: ../../glossary.rst:496 +msgid "" +"Easier to ask for forgiveness than permission. This common Python coding " +"style assumes the existence of valid keys or attributes and catches " +"exceptions if the assumption proves false. This clean and fast style is " +"characterized by the presence of many :keyword:`try` and :keyword:`except` " +"statements. The technique contrasts with the :term:`LBYL` style common to " +"many other languages such as C." +msgstr "" +"Es ist einfacher, um Verzeihung zu bitten als um Erlaubnis. Dieser gängige " +"Python-Programmierstil geht von der Existenz gültiger Schlüssel oder " +"Attribute aus und fängt Ausnahmen ab, falls sich diese Annahme als falsch " +"erweist. Dieser übersichtliche und schnelle Stil zeichnet sich durch das " +"häufige Vorkommen von :keyword:`try` - und :keyword:`except` -Anweisungen " +"aus. Diese Technik steht im Gegensatz zum :term:`LBYL`-Stil, der in vielen " +"anderen Sprachen wie beispielsweise C üblich ist." + +#: ../../glossary.rst:502 +msgid "evaluate function" +msgstr "Funktion auswerten" + +#: ../../glossary.rst:504 +msgid "" +"A function that can be called to evaluate a lazily evaluated attribute of an " +"object, such as the value of type aliases created with the :keyword:`type` " +"statement." +msgstr "" +"Eine Funktion, die aufgerufen werden kann, um ein verzögert ausgewertetes " +"Attribut eines Objekts zu berechnen, beispielsweise den Wert von Typaliasen, " +"die mit der Anweisung :keyword:`type` erstellt wurden." + +#: ../../glossary.rst:507 +msgid "expression" +msgstr "Ausdruck" + +#: ../../glossary.rst:509 +msgid "" +"A piece of syntax which can be evaluated to some value. In other words, an " +"expression is an accumulation of expression elements like literals, names, " +"attribute access, operators or function calls which all return a value. In " +"contrast to many other languages, not all language constructs are " +"expressions. There are also :term:`statement`\\s which cannot be used as " +"expressions, such as :keyword:`while`. Assignments are also statements, not " +"expressions." +msgstr "" +"Ein Syntaxelement, das zu einem Wert ausgewertet werden kann. Mit anderen " +"Worten: Ein Ausdruck ist eine Zusammenstellung von Ausdruckselementen wie " +"Literalen, Namen, Attributzugriffen, Operatoren oder Funktionsaufrufen, die " +"alle einen Wert zurückgeben. Im Gegensatz zu vielen anderen Sprachen sind " +"nicht alle Sprachkonstrukte Ausdrücke. Es gibt auch :term:`Anweisungen " +"`\\s, die nicht als Ausdrücke verwendet werden können, wie " +"beispielsweise :keyword:`while`. Auch Zuweisungen sind Anweisungen und keine " +"Ausdrücke." + +#: ../../glossary.rst:516 +msgid "extension module" +msgstr "Erweiterungsmodul" + +#: ../../glossary.rst:518 +msgid "" +"A module written in C or C++, using Python's C API to interact with the core " +"and with user code." +msgstr "" +"Ein in C oder C++ geschriebenes Modul, das die C-API von Python nutzt, um " +"mit dem Kern und dem Anwendercode zu interagieren." + +#: ../../glossary.rst:520 +msgid "f-string" +msgstr "f-String" + +#: ../../glossary.rst:521 +msgid "f-strings" +msgstr "f-Strings" + +#: ../../glossary.rst:523 +msgid "" +"String literals prefixed with ``f`` or ``F`` are commonly called \"f-" +"strings\" which is short for :ref:`formatted string literals `. " +"See also :pep:`498`." +msgstr "" +"Zeichenfolgenliterale, denen ``f`` oder ``F`` vorangestellt ist, werden " +"gemeinhin als \"f-Strings\" bezeichnet, was die Abkürzung für :ref:" +"`formatierte Zeichenfolgenliterale ` ist. Siehe auch :pep:`498`." + +#: ../../glossary.rst:526 +msgid "file object" +msgstr "Dateiobjekt" + +#: ../../glossary.rst:528 +msgid "" +"An object exposing a file-oriented API (with methods such as :meth:`!read` " +"or :meth:`!write`) to an underlying resource. Depending on the way it was " +"created, a file object can mediate access to a real on-disk file or to " +"another type of storage or communication device (for example standard input/" +"output, in-memory buffers, sockets, pipes, etc.). File objects are also " +"called :dfn:`file-like objects` or :dfn:`streams`." +msgstr "" +"Ein Objekt, das eine dateiorientierte API (mit Methoden wie :meth:`!read` " +"oder :meth:`!write` ) für eine zugrunde liegende Ressource bereitstellt. " +"Je nach Art seiner Erstellung kann ein Dateiobjekt den Zugriff auf eine " +"echte Datei auf der Festplatte oder auf eine andere Art von Speicher- oder " +"Kommunikationsgerät vermitteln (z. B. Standardeingabe/-ausgabe, Puffer im " +"Arbeitsspeicher, Sockets, Pipes usw.). Dateiobjekte werden auch als :dfn:" +"`dateiähnliche Objekte ` oder :dfn:`Streams ` " +"bezeichnet." + +#: ../../glossary.rst:536 +msgid "" +"There are actually three categories of file objects: raw :term:`binary files " +"`, buffered :term:`binary files ` and :term:`text " +"files `. Their interfaces are defined in the :mod:`io` module. " +"The canonical way to create a file object is by using the :func:`open` " +"function." +msgstr "" +"Es gibt insgesamt drei Kategorien von Dateiobjekten: rohe :term:" +"`Binärdateien `, gepufferte :term:`Binärdateien ` " +"und :term:`Textdateien `. Deine Schnittstellen sind im Modul :" +"mod:`io` definiert. Die übliche Vorgehensweise zum Erstellen eines " +"Dateiobjekts ist die Verwendung der Funktion :func:`open` ." + +#: ../../glossary.rst:541 +msgid "file-like object" +msgstr "dateiähnliches Objekt" + +#: ../../glossary.rst:543 +msgid "A synonym for :term:`file object`." +msgstr "Ein Synonym für :term:`Dateiobjekt `." + +#: ../../glossary.rst:544 +msgid "filesystem encoding and error handler" +msgstr "Dateisystem-Kodierung und Fehlerbehandlung" + +#: ../../glossary.rst:546 +msgid "" +"Encoding and error handler used by Python to decode bytes from the operating " +"system and encode Unicode to the operating system." +msgstr "" +"Von Python verwendete Kodierung und Fehlerbehandlung zum Dekodieren von " +"Bytes aus dem Betriebssystem und zum Kodieren von Unicode für das " +"Betriebssystem." + +#: ../../glossary.rst:549 +msgid "" +"The filesystem encoding must guarantee to successfully decode all bytes " +"below 128. If the file system encoding fails to provide this guarantee, API " +"functions can raise :exc:`UnicodeError`." +msgstr "" +"Die Dateisystemkodierung muss gewährleisten, dass alle Bytes unter 128 " +"erfolgreich dekodiert werden. Wenn die Dateisystemkodierung diese Garantie " +"nicht bieten kann, können API-Funktionen die Ausnahme :exc:`UnicodeError` " +"auslösen." + +#: ../../glossary.rst:553 +msgid "" +"The :func:`sys.getfilesystemencoding` and :func:`sys." +"getfilesystemencodeerrors` functions can be used to get the filesystem " +"encoding and error handler." +msgstr "" +"Mit den Funktionen :func:`sys.getfilesystemencoding` und :func:`sys." +"getfilesystemencodeerrors` lassen sich die Kodierung des Dateisystems und " +"der Fehlerbehandler abrufen." + +#: ../../glossary.rst:557 +msgid "" +"The :term:`filesystem encoding and error handler` are configured at Python " +"startup by the :c:func:`PyConfig_Read` function: see :c:member:`~PyConfig." +"filesystem_encoding` and :c:member:`~PyConfig.filesystem_errors` members of :" +"c:type:`PyConfig`." +msgstr "" +"Die :term:`Dateisystem-Kodierung und der Fehlerbehandler ` werden beim Start von Python über die " +"Funktion :c:func:`PyConfig_Read` konfiguriert: siehe :c:member:`~PyConfig." +"filesystem_encoding` und :c:member:`~PyConfig.filesystem_errors`, die zu :c:" +"type:`PyConfig` gehören." + +#: ../../glossary.rst:562 +msgid "See also the :term:`locale encoding`." +msgstr "" +"Siehe auch den Begriff :term:`Lokalisierungskodierung `." + +#: ../../glossary.rst:563 +msgid "finder" +msgstr "Finder" + +#: ../../glossary.rst:565 +msgid "" +"An object that tries to find the :term:`loader` for a module that is being " +"imported." +msgstr "" +"Ein Objekt, das versucht, den :term:`loader` für ein Modul zu finden, das " +"gerade importiert wird." + +#: ../../glossary.rst:568 +msgid "" +"There are two types of finder: :term:`meta path finders ` " +"for use with :data:`sys.meta_path`, and :term:`path entry finders ` for use with :data:`sys.path_hooks`." +msgstr "" +"Es gibt zwei Arten von Suchfunktionen: :term:`Meta-Pfad-Suchfunktionen ` zur Verwendung mit :data:`sys.meta_path` sowie :term:`Pfad-" +"Eingabe-Suchfunktionen ` zur Verwendung mit :data:`sys." +"path_hooks`." + +#: ../../glossary.rst:572 +msgid "" +"See :ref:`finders-and-loaders` and :mod:`importlib` for much more detail." +msgstr "" +"Weitere Informationen findest du unter :ref:`finders-and-loaders` und :mod:" +"`importlib`." + +#: ../../glossary.rst:573 +msgid "floor division" +msgstr "Etagenaufteilung" + +#: ../../glossary.rst:575 +msgid "" +"Mathematical division that rounds down to nearest integer. The floor " +"division operator is ``//``. For example, the expression ``11 // 4`` " +"evaluates to ``2`` in contrast to the ``2.75`` returned by float true " +"division. Note that ``(-11) // 4`` is ``-3`` because that is ``-2.75`` " +"rounded *downward*. See :pep:`238`." +msgstr "" +"Mathematische Division, bei der auf die nächste ganze Zahl abgerundet wird. " +"Der Operator für die Floor-Division lautet ``//``. Der Ausdruck ``11 // 4`` " +"ergibt beispielsweise ``2`` – im Gegensatz zu ``2.75``, das bei einer echten " +"Float-Division zurückgegeben wird. Beachte, dass ``(-11) // 4`` gleich " +"``-3`` ist, da es sich dabei um ``-2.75`` handelt, das *nach unten* " +"abgerundet wurde. Siehe :pep:`238`." + +#: ../../glossary.rst:580 +msgid "free threading" +msgstr "freies Einfädeln" + +#: ../../glossary.rst:582 +msgid "" +"A threading model where multiple threads can run Python bytecode " +"simultaneously within the same interpreter. This is in contrast to the :" +"term:`global interpreter lock` which allows only one thread to execute " +"Python bytecode at a time. See :pep:`703`." +msgstr "" +"Ein Threading-Modell, bei dem mehrere Threads Python-Bytecode gleichzeitig " +"innerhalb desselben Interpreters ausführen können. Dies steht im Gegensatz " +"zum :term:`global interpreter lock`, bei dem jeweils nur ein Thread Python-" +"Bytecode ausführen kann. Siehe :pep:`703`." + +#: ../../glossary.rst:586 +msgid "free-threaded build" +msgstr "Build mit freien Threads" + +#: ../../glossary.rst:589 +msgid "" +"A build of :term:`CPython` that supports :term:`free threading`, configured " +"using the :option:`--disable-gil` option before compilation." +msgstr "" +"Eine Version von :term:`CPython`, die :term:`Free Threading ` unterstützt und vor der Kompilierung mit der Option :option:`--" +"disable-gil` konfiguriert wurde." + +#: ../../glossary.rst:592 +msgid "See :ref:`freethreading-python-howto`." +msgstr "Siehe :ref:`freethreading-python-howto`." + +#: ../../glossary.rst:593 +msgid "free variable" +msgstr "freie Variable" + +#: ../../glossary.rst:595 +msgid "" +"Formally, as defined in the :ref:`language execution model `, a " +"free variable is any variable used in a namespace which is not a local " +"variable in that namespace. See :term:`closure variable` for an example. " +"Pragmatically, due to the name of the :attr:`codeobject.co_freevars` " +"attribute, the term is also sometimes used as a synonym for :term:`closure " +"variable`." +msgstr "" +"Formal gesehen ist, gemäß der Definition im :ref:`Sprachausführungsmodell " +"`, eine freie Variable jede Variable, die in einem Namensraum " +"verwendet wird und keine lokale Variable in diesem Namensraum ist. Ein " +"Beispiel findest du unter :term:`Closure-Variable `. In " +"der Praxis wird der Begriff aufgrund des Namens des Attributs :attr:" +"`codeobject.co_freevars` manchmal auch als Synonym für :term:`Closure-" +"Variable ` verwendet." + +#: ../../glossary.rst:600 +msgid "function" +msgstr "Funktion" + +#: ../../glossary.rst:602 +msgid "" +"A series of statements which returns some value to a caller. It can also be " +"passed zero or more :term:`arguments ` which may be used in the " +"execution of the body. See also :term:`parameter`, :term:`method`, and the :" +"ref:`function` section." +msgstr "" +"Eine Anweisungsfolge, die einen Wert an den Aufrufer zurückgibt. Ihr können " +"zudem null oder mehr :term:`Argumente ` übergeben werden, die bei " +"der Ausführung des Hauptteils verwendet werden können. Siehe auch :term:" +"`Parameter `, :term:`Methode ` sowie den Abschnitt :ref:" +"`function` ." + +#: ../../glossary.rst:606 +msgid "function annotation" +msgstr "Funktionsanmerkung" + +#: ../../glossary.rst:608 +msgid "An :term:`annotation` of a function parameter or return value." +msgstr "" +"Eine :term:`Annotation ` eines Funktionsparameters oder eines " +"Rückgabewerts." + +#: ../../glossary.rst:610 +msgid "" +"Function annotations are usually used for :term:`type hints `: " +"for example, this function is expected to take two :class:`int` arguments " +"and is also expected to have an :class:`int` return value::" +msgstr "" +"Funktionsannotationen werden in der Regel für :term:`Typangaben `: verwendet. Beispielsweise wird erwartet, dass diese Funktion zwei :" +"class:`int` Argumente entgegennimmt und zudem einen :class:`int` " +"Rückgabewert hat::" + +#: ../../glossary.rst:615 +msgid "" +"def sum_two_numbers(a: int, b: int) -> int:\n" +" return a + b" +msgstr "" +"def sum_two_numbers(a: int, b: int) -> int:\n" +" return a + b" + +#: ../../glossary.rst:618 +msgid "Function annotation syntax is explained in section :ref:`function`." +msgstr "" +"Die Syntax für Funktionsannotationen wird im Abschnitt :ref:`function` " +"erläutert." + +#: ../../glossary.rst:620 +msgid "" +"See :term:`variable annotation` and :pep:`484`, which describe this " +"functionality. Also see :ref:`annotations-howto` for best practices on " +"working with annotations." +msgstr "" +"Siehe :term:`Variablen-Annotation ` und :pep:`484`, wo " +"diese Funktionalität beschrieben wird. Siehe außerdem :ref:`annotations-" +"howto` für bewährte Vorgehensweisen beim Umgang mit Annotationen." + +#: ../../glossary.rst:624 +msgid "__future__" +msgstr "__Zukunft__" + +#: ../../glossary.rst:626 +msgid "" +"A :ref:`future statement `, ``from __future__ import ``, " +"directs the compiler to compile the current module using syntax or semantics " +"that will become standard in a future release of Python. The :mod:" +"`__future__` module documents the possible values of *feature*. By " +"importing this module and evaluating its variables, you can see when a new " +"feature was first added to the language and when it will (or did) become the " +"default::" +msgstr "" +"Eine :ref:`Future-Anweisung `, ``from __future__ import ``, " +"weist den Compiler an, das aktuelle Modul unter Verwendung einer Syntax oder " +"Semantik zu kompilieren, die in einer zukünftigen Version von Python zum " +"Standard werden wird. Das Modul :mod:`__future__` dokumentiert die " +"möglichen Werte von *feature*. Durch Importieren dieses Moduls und Auswerten " +"seiner Variablen kannst du sehen, wann eine neue Funktion erstmals in die " +"Sprache aufgenommen wurde und wann sie zur Standardeinstellung wird (oder " +"wurde)::" + +#: ../../glossary.rst:634 +msgid "" +">>> import __future__\n" +">>> __future__.division\n" +"_Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)" +msgstr "" +">>> import __future__\n" +">>> __future__.division\n" +"_Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)" + +#: ../../glossary.rst:637 +msgid "garbage collection" +msgstr "Garbage Collection" + +#: ../../glossary.rst:639 +msgid "" +"The process of freeing memory when it is not used anymore. Python performs " +"garbage collection via reference counting and a cyclic garbage collector " +"that is able to detect and break reference cycles. The garbage collector " +"can be controlled using the :mod:`gc` module." +msgstr "" +"Der Vorgang, bei dem Speicher freigegeben wird, wenn er nicht mehr benötigt " +"wird. Python führt die Speicherbereinigung mithilfe der Referenzzählung und " +"eines zyklischen Garbage Collectors durch, der Referenzzyklen erkennen und " +"auflösen kann. Der Garbage Collector lässt sich über das Modul :mod:`gc` " +"steuern." + +#: ../../glossary.rst:644 ../../glossary.rst:645 +msgid "generator" +msgstr "Generator" + +#: ../../glossary.rst:647 +msgid "" +"Informally used to mean either a :term:`generator function` or a :term:" +"`generator iterator`, depending on context. The formal terms :term:" +"`generator function` and :term:`generator iterator` are uncommon in " +"practice; \"generator\" alone is almost always sufficient." +msgstr "" +"Wird umgangssprachlich je nach Kontext entweder für eine :term:" +"`Generatorfunktion ` oder einen :term:`Generator-" +"Iterator ` verwendet. Die formalen Begriffe :term:" +"`Generatorfunktion ` und :term:`Generator-Iterator " +"` sind in der Praxis selten; der Begriff \"Generator\" " +"allein reicht fast immer aus." + +#: ../../glossary.rst:652 ../../glossary.rst:653 +msgid "generator function" +msgstr "Generatorfunktion" + +#: ../../glossary.rst:655 +msgid "" +"A function which returns a :term:`generator` object. It looks like a normal " +"function except that it contains :keyword:`yield` expressions for producing " +"a series of values usable in a :keyword:`for`\\-loop or that can be " +"retrieved one at a time with the :func:`next` function. See :ref:`yieldexpr`." +msgstr "" +"Eine Funktion, die ein :term:`generator`-Objekt zurückgibt. Sie sieht wie " +"eine normale Funktion aus, enthält jedoch Ausdrücke vom Typ :keyword:" +"`yield` , um eine Reihe von Werten zu erzeugen, die in einer :keyword:" +"`for`\\-Schleife verwendet oder mit der Funktion :func:`next` einzeln " +"abgerufen werden können. Siehe :ref:`yieldexpr`." + +#: ../../glossary.rst:660 +msgid "generator iterator" +msgstr "Generator-Iterator" + +#: ../../glossary.rst:662 +msgid "" +"An object created by a :term:`generator function` or a :term:`generator " +"expression`." +msgstr "" +"Ein Objekt, das durch eine :term:`Generatorfunktion ` " +"oder einen :term:`Generatorausdruck ` erstellt wurde." + +#: ../../glossary.rst:665 +msgid "" +"Each :keyword:`yield` temporarily suspends processing, remembering the " +"execution state (including local variables and pending try-statements). When " +"the *generator iterator* resumes, it picks up where it left off (in contrast " +"to functions which start fresh on every invocation)." +msgstr "" +"Jeder :keyword:`yield` unterbricht die Verarbeitung vorübergehend und " +"speichert dabei den Ausführungszustand (einschließlich lokaler Variablen und " +"ausstehender try-Anweisungen). Wenn der *Generator-Iterator* fortgesetzt " +"wird, setzt er dort fort, wo er aufgehört hat (im Gegensatz zu Funktionen, " +"die bei jedem Aufruf von vorne beginnen)." + +#: ../../glossary.rst:670 +msgid "" +"Generator iterators also implement the :meth:`~generator.send` method to " +"send a value into the suspended generator, and the :meth:`~generator.throw` " +"method to raise an exception at the point where the generator was paused. " +"See :ref:`generator-methods`." +msgstr "" +"Generator-Iteratoren implementieren außerdem die Methode :meth:`~generator." +"send` , um einen Wert an den angehaltenen Generator zu übergeben, sowie die " +"Methode :meth:`~generator.throw` , um an der Stelle, an der der Generator " +"angehalten wurde, eine Ausnahme auszulösen. Siehe :ref:`generator-methods`." + +#: ../../glossary.rst:675 ../../glossary.rst:676 +msgid "generator expression" +msgstr "Generatorausdruck" + +#: ../../glossary.rst:678 +msgid "" +"An :term:`expression` that returns an :term:`iterator`. It looks like a " +"normal expression followed by a :keyword:`!for` clause defining a loop " +"variable, range, and an optional :keyword:`!if` clause. The combined " +"expression generates values for an enclosing function::" +msgstr "" +"Ein :term:`Ausdruck `, der einen :term:`Iterator ` " +"zurückgibt. Er sieht aus wie ein normaler Ausdruck, gefolgt von einer :" +"keyword:`!for` -Klausel, die eine Schleifenvariable und einen Bereich " +"definiert, sowie einer optionalen :keyword:`!if` -Klausel. Der kombinierte " +"Ausdruck generiert Werte für eine umschließende Funktion::" + +#: ../../glossary.rst:683 +msgid "" +">>> sum(i*i for i in range(10)) # sum of squares 0, 1, 4, ... 81\n" +"285" +msgstr "" +">>> sum(i*i for i in range(10)) # Summe der Quadrate von 0, 1, " +"4, ..., 81\n" +"285" + +#: ../../glossary.rst:685 +msgid "generic function" +msgstr "generische Funktion" + +#: ../../glossary.rst:687 +msgid "" +"A function composed of multiple functions implementing the same operation " +"for different types. Which implementation should be used during a call is " +"determined by the dispatch algorithm." +msgstr "" +"Eine Funktion, die aus mehreren Funktionen besteht, welche dieselbe " +"Operation für verschiedene Typen implementieren. Welche Implementierung bei " +"einem Aufruf verwendet werden soll, wird durch den Dispatch-Algorithmus " +"bestimmt." + +#: ../../glossary.rst:691 +msgid "" +"See also the :term:`single dispatch` glossary entry, the :deco:`functools." +"singledispatch` decorator, and :pep:`443`." +msgstr "" +"Siehe auch den Glossareintrag :term:`single dispatch`, den Dekorator :deco:" +"`functools.singledispatch` sowie :pep:`443`." + +#: ../../glossary.rst:693 +msgid "generic type" +msgstr "generischer Typ" + +#: ../../glossary.rst:695 +msgid "" +"A :term:`type` that can be parameterized; typically a :ref:`container " +"class` such as :class:`list` or :class:`dict`. Used for :" +"term:`type hints ` and :term:`annotations `." +msgstr "" +"Ein :term:`Typ `, der parametrisiert werden kann; typischerweise eine :" +"ref:`Containerklasse` wie beispielsweise :class:`list` oder :" +"class:`dict`. Wird für :term:`Typ-Hinweise ` und :term:" +"`Annotationen ` verwendet." + +#: ../../glossary.rst:700 +msgid "" +"For more details, see :ref:`generic alias types`, :pep:" +"`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module." +msgstr "" +"Weitere Informationen findest du unter :ref:`generische Alias-Typen`, :pep:`483`, :pep:`484`, :pep:`585` sowie im Modul :mod:" +"`typing` ." + +#: ../../glossary.rst:702 +msgid "GIL" +msgstr "GIL" + +#: ../../glossary.rst:704 +msgid "See :term:`global interpreter lock`." +msgstr "Siehe :term:`Global Interpreter Lock `." + +#: ../../glossary.rst:705 +msgid "global interpreter lock" +msgstr "Global Interpreter Lock" + +#: ../../glossary.rst:707 +msgid "" +"The mechanism used by the :term:`CPython` interpreter to assure that only " +"one thread executes Python :term:`bytecode` at a time. This simplifies the " +"CPython implementation by making the object model (including critical built-" +"in types such as :class:`dict`) implicitly safe against concurrent access. " +"Locking the entire interpreter makes it easier for the interpreter to be " +"multi-threaded, at the expense of much of the parallelism afforded by multi-" +"processor machines." +msgstr "" +"Der Mechanismus, den der :term:`CPython`-Interpreter verwendet, um " +"sicherzustellen, dass jeweils nur ein Thread Python-:term:`Bytecode " +"` ausführt. Dies vereinfacht die CPython-Implementierung, indem " +"das Objektmodell (einschließlich kritischer integrierter Typen wie :class:" +"`dict`) implizit gegen gleichzeitigen Zugriff abgesichert wird. Das Sperren " +"des gesamten Interpreters erleichtert die Multithread-Fähigkeit des " +"Interpreters, geht jedoch zu Lasten eines Großteils der Parallelität, die " +"Multiprozessor-Rechner bieten." + +#: ../../glossary.rst:716 +msgid "" +"However, some extension modules, either standard or third-party, are " +"designed so as to release the GIL when doing computationally intensive tasks " +"such as compression or hashing. Also, the GIL is always released when doing " +"I/O." +msgstr "" +"Einige Erweiterungsmodule – sei es Standardmodule oder Module von " +"Drittanbietern – sind jedoch so konzipiert, dass sie das GIL bei " +"rechenintensiven Aufgaben wie Komprimierung oder Hashing freigeben. Außerdem " +"wird das GIL bei E/A-Vorgängen stets freigegeben." + +#: ../../glossary.rst:721 +msgid "" +"As of Python 3.13, the GIL can be disabled using the :option:`--disable-gil` " +"build configuration. After building Python with this option, code must be " +"run with :option:`-X gil=0 <-X>` or after setting the :envvar:`PYTHON_GIL=0 " +"` environment variable. This feature enables improved " +"performance for multi-threaded applications and makes it easier to use multi-" +"core CPUs efficiently. For more details, see :pep:`703`." +msgstr "" +"Ab Python 3.13 kann der GIL mithilfe der Build-Konfiguration :option:`--" +"disable-gil` deaktiviert werden. Nach dem Kompilieren von Python mit dieser " +"Option muss der Code mit der Option :option:`-X gil=0 <-X>` ausgeführt " +"werden oder nachdem die Umgebungsvariable :envvar:`PYTHON_GIL=0 " +"` gesetzt wurde. Diese Funktion ermöglicht eine verbesserte " +"Leistung für Multithread-Anwendungen und erleichtert die effiziente Nutzung " +"von Multi-Core-CPUs. Weitere Details findest du unter :pep:`703`." + +#: ../../glossary.rst:728 +msgid "" +"In prior versions of Python's C API, a function might declare that it " +"requires the GIL to be held in order to use it. This refers to having an :" +"term:`attached thread state`." +msgstr "" +"In früheren Versionen der C-API von Python konnte eine Funktion angeben, " +"dass für ihre Verwendung das GIL gesperrt sein muss. Dies bezieht sich auf " +"einen :term:`angeschlossenen Thread-Zustand `." + +#: ../../glossary.rst:731 +msgid "global state" +msgstr "globaler Zustand" + +#: ../../glossary.rst:733 +msgid "" +"Data that is accessible throughout a program, such as module-level " +"variables, class variables, or C static variables in :term:`extension " +"modules `. In multi-threaded programs, global state " +"shared between threads typically requires synchronization to avoid :term:" +"`race conditions ` and :term:`data races `." +msgstr "" +"Daten, auf die im gesamten Programm zugegriffen werden kann, wie " +"beispielsweise Variablen auf Modulebene, Klassenvariablen oder statische C-" +"Variablen in :term:`Erweiterungsmodulen `. In Multithread-" +"Programmen erfordert der zwischen Threads gemeinsam genutzte globale Zustand " +"in der Regel eine Synchronisation, um :term:`Wettlaufbedingungen ` und :term:`Datenwettläufe ` zu vermeiden." + +#: ../../glossary.rst:739 +msgid "hash-based pyc" +msgstr "Hash-basierte PYC-Datei" + +#: ../../glossary.rst:741 +msgid "" +"A bytecode cache file that uses the hash rather than the last-modified time " +"of the corresponding source file to determine its validity. See :ref:`pyc-" +"invalidation`." +msgstr "" +"Eine Bytecode-Cache-Datei, die zur Überprüfung ihrer Gültigkeit den Hash-" +"Wert anstelle des Zeitstempels der letzten Änderung der entsprechenden " +"Quelldatei heranzieht. Siehe :ref:`pyc-invalidation`." + +#: ../../glossary.rst:744 +msgid "hashable" +msgstr "hashbar" + +#: ../../glossary.rst:746 +msgid "" +"An object is *hashable* if it has a hash value which never changes during " +"its lifetime (it needs a :meth:`~object.__hash__` method), and can be " +"compared to other objects (it needs an :meth:`~object.__eq__` method). " +"Hashable objects which compare equal must have the same hash value." +msgstr "" +"Ein Objekt ist *hashbar*, wenn es einen Hash-Wert besitzt, der sich während " +"seiner Lebensdauer nicht ändert (es benötigt eine :meth:`~object.__hash__`-" +"Methode), und wenn es mit anderen Objekten verglichen werden kann (es " +"benötigt eine :meth:`~object.__eq__`-Methode). Hashbare Objekte, die als " +"gleich verglichen werden, müssen denselben Hash-Wert haben." + +#: ../../glossary.rst:752 +msgid "" +"Hashability makes an object usable as a dictionary key and a set member, " +"because these data structures use the hash value internally." +msgstr "" +"Dank der Hashbarkeit kann ein Objekt als Schlüssel in einem Wörterbuch und " +"als Element in einer Menge verwendet werden, da diese Datenstrukturen intern " +"den Hashwert nutzen." + +#: ../../glossary.rst:755 +msgid "" +"Most of Python's immutable built-in objects are hashable; mutable containers " +"(such as lists or dictionaries) are not; immutable containers (such as " +"tuples and frozensets) are only hashable if their elements are hashable. " +"Objects which are instances of user-defined classes are hashable by " +"default. They all compare unequal (except with themselves), and their hash " +"value is derived from their :func:`id`." +msgstr "" +"Die meisten unveränderlichen, in Python integrierten Objekte sind hashbar; " +"veränderbare Container (wie Listen oder Wörterbücher) sind es nicht; " +"unveränderliche Container (wie Tupel und FrozenSets) sind nur dann hashbar, " +"wenn ihre Elemente hashbar sind. Objekte, die Instanzen benutzerdefinierter " +"Klassen sind, sind standardmäßig hashbar. Sie sind alle ungleich (außer mit " +"sich selbst), und ihr Hash-Wert wird aus ihrem :func:`id` abgeleitet." + +#: ../../glossary.rst:762 +msgid "IDLE" +msgstr "LEERLAUF" + +#: ../../glossary.rst:764 +msgid "" +"An Integrated Development and Learning Environment for Python. :ref:`idle` " +"is a basic editor and interpreter environment which ships with the standard " +"distribution of Python." +msgstr "" +"Eine integrierte Entwicklungs- und Lernumgebung für Python. :ref:`idle` " +"ist eine einfache Editor- und Interpreter-Umgebung, die im Lieferumfang der " +"Standarddistribution von Python enthalten ist." + +#: ../../glossary.rst:767 +msgid "immortal" +msgstr "unsterblich" + +#: ../../glossary.rst:769 +msgid "" +"*Immortal objects* are a CPython implementation detail introduced in :pep:" +"`683`." +msgstr "" +"*Unsterbliche Objekte* sind ein Implementierungsdetail von CPython, das in :" +"pep:`683` eingeführt wurde." + +#: ../../glossary.rst:772 +msgid "" +"If an object is immortal, its :term:`reference count` is never modified, and " +"therefore it is never deallocated while the interpreter is running. For " +"example, :const:`True` and :const:`None` are immortal in CPython." +msgstr "" +"Ist ein Objekt unsterblich, wird seine :term:`Referenzanzahl ` niemals geändert, sodass es während der Laufzeit des Interpreters " +"niemals freigegeben wird. Beispielsweise sind :const:`True` und :const:" +"`None` in CPython unsterblich." + +#: ../../glossary.rst:776 +msgid "" +"Immortal objects can be identified via :func:`sys._is_immortal`, or via :c:" +"func:`PyUnstable_IsImmortal` in the C API." +msgstr "" +"Unsterbliche Objekte können über :func:`sys._is_immortal` oder über :c:" +"func:`PyUnstable_IsImmortal` in der C-API identifiziert werden." + +#: ../../glossary.rst:778 +msgid "immutable" +msgstr "unveränderlich" + +#: ../../glossary.rst:780 +msgid "" +"An object with a fixed value. Immutable objects include numbers, strings " +"and tuples. Such an object cannot be altered. A new object has to be " +"created if a different value has to be stored. They play an important role " +"in places where a constant hash value is needed, for example as a key in a " +"dictionary. Immutable objects are inherently :term:`thread-safe` because " +"their state cannot be modified after creation, eliminating concerns about " +"improperly synchronized :term:`concurrent modification`." +msgstr "" +"Ein Objekt mit einem festen Wert. Zu den unveränderlichen Objekten zählen " +"Zahlen, Zeichenketten und Tupel. Ein solches Objekt kann nicht verändert " +"werden. Wenn ein anderer Wert gespeichert werden soll, muss ein neues Objekt " +"erstellt werden. Sie spielen eine wichtige Rolle in Fällen, in denen ein " +"konstanter Hash-Wert benötigt wird, beispielsweise als Schlüssel in einem " +"Wörterbuch. Unveränderliche Objekte sind von Natur aus :term:`thread-safe`, " +"da ihr Zustand nach der Erstellung nicht mehr geändert werden kann, wodurch " +"Bedenken hinsichtlich unsachgemäß synchronisierter :term:`gleichzeitiger " +"Änderungen ` entfallen." + +#: ../../glossary.rst:787 +msgid "import path" +msgstr "Importpfad" + +#: ../../glossary.rst:789 +msgid "" +"A list of locations (or :term:`path entries `) that are searched " +"by the :term:`path based finder` for modules to import. During import, this " +"list of locations usually comes from :data:`sys.path`, but for subpackages " +"it may also come from the parent package's ``__path__`` attribute." +msgstr "" +"Eine Liste von Speicherorten (oder :term:`Pfadeinträge `), die " +"vom :term:`Pfad-basierten Finder ` nach zu importierenden " +"Modulen durchsucht werden. Beim Import stammt diese Liste der Speicherorte " +"in der Regel aus :data:`sys.path`, bei Unterpaketen kann sie jedoch auch aus " +"dem Attribut ``__path__`` des übergeordneten Pakets stammen." + +#: ../../glossary.rst:794 +msgid "importing" +msgstr "Importieren" + +#: ../../glossary.rst:796 +msgid "" +"The process by which Python code in one module is made available to Python " +"code in another module." +msgstr "" +"Der Vorgang, durch den Python-Code in einem Modul für Python-Code in einem " +"anderen Modul verfügbar gemacht wird." + +#: ../../glossary.rst:798 +msgid "importer" +msgstr "Importeur" + +#: ../../glossary.rst:800 +msgid "" +"An object that both finds and loads a module; both a :term:`finder` and :" +"term:`loader` object." +msgstr "" +"Ein Objekt, das sowohl ein Modul findet als auch lädt; es ist sowohl ein :" +"term:`Finder `- als auch ein :term:`Loader `-Objekt." + +#: ../../glossary.rst:802 +msgid "index" +msgstr "Inhaltsverzeichnis" + +#: ../../glossary.rst:804 +msgid "" +"A numeric value that represents the position of an element in a :term:" +"`sequence`." +msgstr "" +"Ein numerischer Wert, der die Position eines Elements in einer :term:" +"`Sequenz ` angibt." + +#: ../../glossary.rst:807 +msgid "" +"In Python, indexing starts at zero. For example, ``things[0]`` names the " +"*first* element of ``things``; ``things[1]`` names the second one." +msgstr "" +"In Python beginnt die Indizierung bei Null. So bezeichnet beispielsweise " +"``things[0]`` das *erste* Element von ``things`` ; ``things[1]`` " +"bezeichnet das zweite Element." + +#: ../../glossary.rst:811 +msgid "" +"In some contexts, Python allows negative indexes for counting from the end " +"of a sequence, and indexing using :term:`slices `." +msgstr "" +"In bestimmten Kontexten erlaubt Python negative Indizes, um vom Ende einer " +"Sequenz aus zu zählen, sowie die Indizierung mithilfe von :term:`Slices " +"`." + +#: ../../glossary.rst:814 +msgid "See also :term:`subscript`." +msgstr "Siehe auch :term:`Index `." + +#: ../../glossary.rst:815 +msgid "interactive" +msgstr "interaktiv" + +#: ../../glossary.rst:817 +msgid "" +"Python has an interactive interpreter which means you can enter statements " +"and expressions at the interpreter prompt, immediately execute them and see " +"their results. Just launch ``python`` with no arguments (possibly by " +"selecting it from your computer's main menu). It is a very powerful way to " +"test out new ideas or inspect modules and packages (remember ``help(x)``). " +"For more on interactive mode, see :ref:`tut-interac`." +msgstr "" +"Python verfügt über einen interaktiven Interpreter, d. h., du kannst " +"Anweisungen und Ausdrücke an der Interpreter-Eingabeaufforderung eingeben, " +"diese sofort ausführen und die Ergebnisse anzeigen lassen. Starte einfach " +"``python`` ohne Argumente (z. B. über das Hauptmenü deines Computers). Dies " +"ist eine sehr leistungsstarke Methode, um neue Ideen auszuprobieren oder " +"Module und Pakete zu untersuchen (siehe auch ``help(x)``). Weitere " +"Informationen zum interaktiven Modus findest du unter :ref:`tut-interac`." + +#: ../../glossary.rst:824 +msgid "interpreted" +msgstr "interpretiert" + +#: ../../glossary.rst:826 +msgid "" +"Python is an interpreted language, as opposed to a compiled one, though the " +"distinction can be blurry because of the presence of the bytecode compiler. " +"This means that source files can be run directly without explicitly creating " +"an executable which is then run. Interpreted languages typically have a " +"shorter development/debug cycle than compiled ones, though their programs " +"generally also run more slowly. See also :term:`interactive`." +msgstr "" +"Python ist eine interpretierte Sprache im Gegensatz zu einer kompilierten " +"Sprache, auch wenn diese Unterscheidung aufgrund des Bytecode-Compilers " +"nicht immer eindeutig ist. Das bedeutet, dass Quelldateien direkt ausgeführt " +"werden können, ohne dass zuvor explizit eine ausführbare Datei erstellt und " +"anschließend ausgeführt werden muss. Interpretierte Sprachen haben in der " +"Regel einen kürzeren Entwicklungs- und Debugging-Zyklus als kompilierte " +"Sprachen, allerdings laufen ihre Programme im Allgemeinen auch langsamer. " +"Siehe auch :term:`interaktiv `." + +#: ../../glossary.rst:833 +msgid "interpreter shutdown" +msgstr "Beenden des Interpreters" + +#: ../../glossary.rst:835 +msgid "" +"When asked to shut down, the Python interpreter enters a special phase where " +"it gradually releases all allocated resources, such as modules and various " +"critical internal structures. It also makes several calls to the :term:" +"`garbage collector `. This can trigger the execution of " +"code in user-defined destructors or weakref callbacks. Code executed during " +"the shutdown phase can encounter various exceptions as the resources it " +"relies on may not function anymore (common examples are library modules or " +"the warnings machinery)." +msgstr "" +"Wenn der Python-Interpreter zum Beenden aufgefordert wird, wechselt er in " +"eine spezielle Phase, in der er nach und nach alle zugewiesenen Ressourcen, " +"wie beispielsweise Module und verschiedene wichtige interne Strukturen, " +"freigibt. Außerdem ruft er mehrmals den :term:`Garbage Collector ` auf. Dies kann die Ausführung von Code in benutzerdefinierten " +"Destruktoren oder weakref-Callbacks auslösen. Bei der Ausführung von Code " +"während der Beendigungsphase können verschiedene Ausnahmen auftreten, da die " +"Ressourcen, auf die er angewiesen ist, möglicherweise nicht mehr " +"funktionieren (häufige Beispiele sind Bibliotheksmodule oder die " +"Warnmechanismen)." + +#: ../../glossary.rst:844 +msgid "" +"The main reason for interpreter shutdown is that the ``__main__`` module or " +"the script being run has finished executing." +msgstr "" +"Der Hauptgrund für das Beenden des Interpreters ist, dass das Modul " +"``__main__`` oder das ausgeführte Skript die Ausführung abgeschlossen hat." + +#: ../../glossary.rst:846 +msgid "iterable" +msgstr "iterierbar" + +#: ../../glossary.rst:848 +msgid "" +"An object capable of returning its members one at a time. Examples of " +"iterables include all sequence types (such as :class:`list`, :class:`str`, " +"and :class:`tuple`) and some non-sequence types like :class:`dict`, :term:" +"`file objects `, and objects of any classes you define with an :" +"meth:`~object.__iter__` method or with a :meth:`~object.__getitem__` method " +"that implements :term:`sequence` semantics." +msgstr "" +"Ein Objekt, das seine Elemente nacheinander zurückgeben kann. Beispiele für " +"iterierbare Objekte sind alle Sequenztypen (wie :class:`list`, :class:`str` " +"und :class:`tuple`) sowie einige Nicht-Sequenztypen wie :class:`dict`, :term:" +"`Dateiobjekte ` und Objekte beliebiger Klassen, die du mit " +"einer :meth:`~object.__iter__` -Methode oder einer :meth:`~object." +"__getitem__` -Methode definieren, die die :term:`sequence`-Semantik " +"implementiert." + +#: ../../glossary.rst:856 +msgid "" +"Iterables can be used in a :keyword:`for` loop and in many other places " +"where a sequence is needed (:func:`zip`, :func:`map`, ...). When an " +"iterable object is passed as an argument to the built-in function :func:" +"`iter`, it returns an iterator for the object. This iterator is good for " +"one pass over the set of values. When using iterables, it is usually not " +"necessary to call :func:`iter` or deal with iterator objects yourself. The :" +"keyword:`for` statement does that automatically for you, creating a " +"temporary unnamed variable to hold the iterator for the duration of the " +"loop. See also :term:`iterator`, :term:`sequence`, and :term:`generator`." +msgstr "" +"Iterables können in einer :keyword:`for` -Schleife und an vielen anderen " +"Stellen verwendet werden, an denen eine Sequenz benötigt wird (:func:`zip`, :" +"func:`map`, …). Wenn ein iterierbares Objekt als Argument an die integrierte " +"Funktion :func:`iter` übergeben wird, gibt diese einen Iterator für das " +"Objekt zurück. Dieser Iterator reicht für einen Durchlauf durch die " +"Wertemenge aus. Bei der Verwendung von Iterables ist es in der Regel nicht " +"notwendig, :func:`iter` aufzurufen oder sich selbst um Iterator-Objekte zu " +"kümmern. Die Anweisung :keyword:`for` übernimmt dies automatisch für dich " +"und erstellt eine temporäre, unbenannte Variable, die den Iterator für die " +"Dauer der Schleife enthält. Siehe auch :term:`iterator`, :term:`sequence` " +"und :term:`generator`." + +#: ../../glossary.rst:866 +msgid "iterator" +msgstr "Iterator" + +#: ../../glossary.rst:868 +msgid "" +"An object representing a stream of data. Repeated calls to the iterator's :" +"meth:`~iterator.__next__` method (or passing it to the built-in function :" +"func:`next`) return successive items in the stream. When no more data are " +"available a :exc:`StopIteration` exception is raised instead. At this " +"point, the iterator object is exhausted and any further calls to its :meth:`!" +"__next__` method just raise :exc:`StopIteration` again. Iterators are " +"required to have an :meth:`~iterator.__iter__` method that returns the " +"iterator object itself so every iterator is also iterable and may be used in " +"most places where other iterables are accepted. One notable exception is " +"code which attempts multiple iteration passes. A container object (such as " +"a :class:`list`) produces a fresh new iterator each time you pass it to the :" +"func:`iter` function or use it in a :keyword:`for` loop. Attempting this " +"with an iterator will just return the same exhausted iterator object used in " +"the previous iteration pass, making it appear like an empty container." +msgstr "" +"Ein Objekt, das einen Datenstrom darstellt. Wiederholte Aufrufe der " +"Methode :meth:`~iterator.__next__` des Iterators (oder die Übergabe an die " +"integrierte Funktion :func:`next` ) geben aufeinanderfolgende Elemente des " +"Datenstroms zurück. Sind keine Daten mehr verfügbar, wird stattdessen die " +"Ausnahme :exc:`StopIteration` ausgelöst. Zu diesem Zeitpunkt ist das " +"Iterator-Objekt erschöpft, und weitere Aufrufe seiner Methode :meth:`!" +"__next__` lösen lediglich erneut eine :exc:`StopIteration`-Ausnahme aus. " +"Iteratoren müssen über eine Methode :meth:`~iterator.__iter__` verfügen, " +"die das Iterator-Objekt selbst zurückgibt, sodass jeder Iterator auch " +"iterierbar ist und an den meisten Stellen verwendet werden kann, an denen " +"andere iterierbare Objekte akzeptiert werden. Eine bemerkenswerte Ausnahme " +"bildet Code, der mehrere Iterationsdurchläufe versucht. Ein Containerobjekt " +"(wie beispielsweise ein :class:`list`) erzeugt jedes Mal einen neuen " +"Iterator, wenn man es an die Funktion :func:`iter` übergibt oder in " +"einer :keyword:`for`-Schleife verwendet. Versucht man dies mit einem " +"Iterator, wird lediglich dasselbe erschöpfte Iteratorobjekt zurückgegeben, " +"das bereits im vorherigen Iterationsdurchlauf verwendet wurde, wodurch es so " +"aussieht, als wäre der Container leer." + +#: ../../glossary.rst:883 +msgid "More information can be found in :ref:`typeiter`." +msgstr "Weitere Informationen finden Sie unter :ref:`typeiter`." + +#: ../../glossary.rst:887 +msgid "" +"CPython does not consistently apply the requirement that an iterator define :" +"meth:`~iterator.__iter__`. And also please note that :term:`free-threaded " +"` CPython does not guarantee :term:`thread-safe` behavior of " +"iterator operations." +msgstr "" +"CPython wendet die Anforderung, dass ein Iterator :meth:`~iterator." +"__iter__` definieren muss, nicht konsequent an. Beachte außerdem, dass :term:" +"`free-threaded ` CPython kein :term:`thread-safe` Verhalten " +"von Iterator-Operationen garantiert." + +#: ../../glossary.rst:892 +msgid "key" +msgstr "Schlüssel" + +#: ../../glossary.rst:894 +msgid "" +"A value that identifies an entry in a :term:`mapping`. See also :term:" +"`subscript`." +msgstr "" +"Ein Wert, der einen Eintrag in einem :term:`Mapping ` " +"identifiziert. Siehe auch :term:`Index `." + +#: ../../glossary.rst:896 +msgid "key function" +msgstr "Schlüsselfunktion" + +#: ../../glossary.rst:898 +msgid "" +"A key function or collation function is a callable that returns a value used " +"for sorting or ordering. For example, :func:`locale.strxfrm` is used to " +"produce a sort key that is aware of locale specific sort conventions." +msgstr "" +"Eine Schlüsselfunktion oder Sortierfunktion ist ein aufrufbares Objekt, das " +"einen Wert zurückgibt, der zum Sortieren oder Ordnen verwendet wird. " +"Beispielsweise wird :func:`locale.strxfrm` verwendet, um einen " +"Sortierschlüssel zu erzeugen, der die lokalspezifischen Sortierkonventionen " +"berücksichtigt." + +#: ../../glossary.rst:903 +msgid "" +"A number of tools in Python accept key functions to control how elements are " +"ordered or grouped. They include :func:`min`, :func:`max`, :func:`sorted`, :" +"meth:`list.sort`, :func:`heapq.merge`, :func:`heapq.nsmallest`, :func:`heapq." +"nlargest`, and :func:`itertools.groupby`." +msgstr "" +"Eine Reihe von Tools in Python unterstützt Schlüssel-Funktionen, mit denen " +"sich die Anordnung oder Gruppierung von Elementen steuern lässt. Dazu " +"gehören :func:`min` , :func:`max` , :func:`sorted` , :meth:`list." +"sort` , :func:`heapq.merge` , :func:`heapq.nsmallest` , :func:`heapq." +"nlargest` und :func:`itertools.groupby` ." + +#: ../../glossary.rst:909 +msgid "" +"There are several ways to create a key function. For example. the :meth:" +"`str.casefold` method can serve as a key function for case insensitive " +"sorts. Alternatively, a key function can be built from a :keyword:`lambda` " +"expression such as ``lambda r: (r[0], r[2])``. Also, :func:`operator." +"attrgetter`, :func:`operator.itemgetter`, and :func:`operator.methodcaller` " +"are three key function constructors. See the :ref:`Sorting HOW TO " +"` for examples of how to create and use key functions." +msgstr "" +"Es gibt verschiedene Möglichkeiten, eine Schlüsselfunktion zu erstellen. " +"Beispielsweise kann die Methode :meth:`str.casefold` als Schlüsselfunktion " +"für die Sortierung ohne Berücksichtigung der Groß-/Kleinschreibung dienen. " +"Alternativ kann eine Schlüsselfunktion aus einem Ausdruck vom Typ :keyword:" +"`lambda` erstellt werden, wie beispielsweise ``lambda r: (r[0], r[2])``. " +"Außerdem sind :func:`operator.attrgetter`, :func:`operator.itemgetter` und :" +"func:`operator.methodcaller` drei Konstruktoren für Schlüsselfunktionen. " +"Beispiele für die Erstellung und Verwendung von Schlüsselfunktionen finden " +"Sie im :ref:`Sorting HOW TO `." + +#: ../../glossary.rst:916 +msgid "keyword argument" +msgstr "Schlüsselwortargument" + +#: ../../glossary.rst:918 ../../glossary.rst:1305 +msgid "See :term:`argument`." +msgstr "Siehe :term:`Argument `." + +#: ../../glossary.rst:919 +msgid "lambda" +msgstr "Lambda" + +#: ../../glossary.rst:921 +msgid "" +"An anonymous inline function consisting of a single :term:`expression` which " +"is evaluated when the function is called. The syntax to create a lambda " +"function is ``lambda [parameters]: expression``" +msgstr "" +"Eine anonyme Inline-Funktion, die aus einem einzigen :term:`Ausdruck " +"` besteht, der beim Aufruf der Funktion ausgewertet wird. Die " +"Syntax zum Erstellen einer Lambda-Funktion lautet ``lambda [parameters]: " +"expression``" + +#: ../../glossary.rst:924 +msgid "LBYL" +msgstr "LBYL" + +#: ../../glossary.rst:926 +msgid "" +"Look before you leap. This coding style explicitly tests for pre-conditions " +"before making calls or lookups. This style contrasts with the :term:`EAFP` " +"approach and is characterized by the presence of many :keyword:`if` " +"statements." +msgstr "" +"Erst schauen, dann springen. Bei diesem Programmierstil werden " +"Vorbedingungen explizit geprüft, bevor Funktionen aufgerufen oder Abfragen " +"durchgeführt werden. Dieser Stil steht im Gegensatz zum :term:`EAFP`-Ansatz " +"und zeichnet sich durch das häufige Vorkommen von :keyword:`if` -Anweisungen " +"aus." + +#: ../../glossary.rst:931 +msgid "" +"In a multi-threaded environment, the LBYL approach can risk introducing a :" +"term:`race condition` between \"the looking\" and \"the leaping\". For " +"example, the code, ``if key in mapping: return mapping[key]`` can fail if " +"another thread removes *key* from *mapping* after the test, but before the " +"lookup. This issue can be solved with :term:`locks ` or by using the :" +"term:`EAFP` approach. See also :term:`thread-safe`." +msgstr "" +"In einer Multithread-Umgebung besteht bei dem LBYL-Ansatz die Gefahr, dass " +"eine :term:`Race Condition ` zwischen dem \"Nachschlagen\" " +"und dem \"Springen\" entsteht. Beispielsweise kann der Code ``if key in " +"mapping: return mapping[key]`` fehlschlagen, wenn ein anderer Thread *key* " +"nach dem Test, aber vor der Suche aus *mapping* entfernt. Dieses Problem " +"lässt sich mit :term:`Locks ` oder durch Verwendung des :term:`EAFP`-" +"Ansatzes lösen. Siehe auch :term:`thread-safe`." + +#: ../../glossary.rst:937 +msgid "lexical analyzer" +msgstr "Lexikalischer Analysator" + +#: ../../glossary.rst:940 +msgid "Formal name for the *tokenizer*; see :term:`token`." +msgstr "Formale Bezeichnung für den *Tokenizer*; siehe :term:`token`." + +#: ../../glossary.rst:941 +msgid "list" +msgstr "Liste" + +#: ../../glossary.rst:943 +msgid "" +"A built-in Python :term:`sequence`. Despite its name it is more akin to an " +"array in other languages than to a linked list since access to elements is " +"*O*\\ (1)." +msgstr "" +"Eine in Python integrierte :term:`Sequenz `. Trotz ihres Namens " +"ähnelt sie eher einem Array in anderen Sprachen als einer verketteten Liste, " +"da der Zugriff auf die Elemente *O*\\ (1) ist." + +#: ../../glossary.rst:946 +msgid "list comprehension" +msgstr "Listenkomprimierung" + +#: ../../glossary.rst:948 +msgid "" +"A compact way to process all or part of the elements in a sequence and " +"return a list with the results. ``result = ['{:#04x}'.format(x) for x in " +"range(256) if x % 2 == 0]`` generates a list of strings containing even hex " +"numbers (0x..) in the range from 0 to 255. The :keyword:`if` clause is " +"optional. If omitted, all elements in ``range(256)`` are processed." +msgstr "" +"Eine kompakte Möglichkeit, alle oder einen Teil der Elemente einer Sequenz " +"zu verarbeiten und eine Liste mit den Ergebnissen zurückzugeben. ``result " +"= ['{:#04x}'.format(x) for x in range(256) if x % 2 == 0]`` generiert eine " +"Liste von Zeichenketten, die gerade Hexadezimalzahlen (0x..) im Bereich von " +"0 bis 255 enthalten. Die Klausel :keyword:`if` ist optional. Wird sie " +"weggelassen, werden alle Elemente in ``range(256)`` verarbeitet." + +#: ../../glossary.rst:954 +msgid "lock" +msgstr "Schloss" + +#: ../../glossary.rst:956 +msgid "" +"A :term:`synchronization primitive` that allows only one thread at a time to " +"access a shared resource. A thread must acquire a lock before accessing the " +"protected resource and release it afterward. If a thread attempts to " +"acquire a lock that is already held by another thread, it will block until " +"the lock becomes available. Python's :mod:`threading` module provides :" +"class:`~threading.Lock` (a basic lock) and :class:`~threading.RLock` (a :" +"term:`reentrant` lock). Locks are used to prevent :term:`race conditions " +"` and ensure :term:`thread-safe` access to shared data. " +"Alternative design patterns to locks exist such as queues, producer/consumer " +"patterns, and thread-local state. See also :term:`deadlock`, and :term:" +"`reentrant`." +msgstr "" +"Eine :term:`Synchronisationsprimitive `, die es " +"nur einem Thread gleichzeitig erlaubt, auf eine gemeinsam genutzte Ressource " +"zuzugreifen. Ein Thread muss vor dem Zugriff auf die geschützte Ressource " +"eine Sperre erwerben und diese anschließend wieder freigeben. Versucht ein " +"Thread, eine Sperre zu erwerben, die bereits von einem anderen Thread " +"gehalten wird, wird er blockiert, bis die Sperre verfügbar wird. Das Python-" +"Modul :mod:`threading` stellt :class:`~threading.Lock` (eine einfache " +"Sperre) und :class:`~threading.RLock` (eine :term:`reentrante ` " +"Sperre) bereit. Sperren werden verwendet, um :term:`Race-Conditions ` zu verhindern und einen :term:`thread-safe` Zugriff auf " +"gemeinsam genutzte Daten zu gewährleisten. Es gibt alternative " +"Entwurfsmuster zu Sperren, wie z. B. Warteschlangen, Produzenten-Konsumenten-" +"Muster und thread-lokale Zustände. Siehe auch :term:`Deadlock ` " +"und :term:`reentrant`." + +#: ../../glossary.rst:967 +msgid "lock-free" +msgstr "sperrfrei" + +#: ../../glossary.rst:969 +msgid "" +"An operation that does not acquire any :term:`lock` and uses atomic CPU " +"instructions to ensure correctness. Lock-free operations can execute " +"concurrently without blocking each other and cannot be blocked by operations " +"that hold locks. In :term:`free-threaded ` Python, built-in " +"types like :class:`dict` and :class:`list` provide lock-free read " +"operations, which means other threads may observe intermediate states during " +"multi-step modifications even when those modifications hold the :term:`per-" +"object lock`." +msgstr "" +"Eine Operation, die keine :term:`Sperre ` erwirbt und atomare CPU-" +"Befehle verwendet, um die Korrektheit zu gewährleisten. Sperrfreie " +"Operationen können parallel ausgeführt werden, ohne sich gegenseitig zu " +"blockieren, und können nicht durch Operationen blockiert werden, die Sperren " +"halten. In :term:`free-threaded ` Python bieten integrierte " +"Typen wie :class:`dict` und :class:`list` lock-freie Leseoperationen, was " +"bedeutet, dass andere Threads bei mehrstufigen Änderungen Zwischenzustände " +"beobachten können, selbst wenn diese Änderungen die :term:`per-object lock` " +"halten." + +#: ../../glossary.rst:977 +msgid "loader" +msgstr "Lader" + +#: ../../glossary.rst:979 +msgid "" +"An object that loads a module. It must define the :meth:`!exec_module` and :" +"meth:`!create_module` methods to implement the :class:`~importlib.abc." +"Loader` interface. A loader is typically returned by a :term:`finder`. See " +"also:" +msgstr "" +"Ein Objekt, das ein Modul lädt. Es muss die Methoden :meth:`!exec_module` " +"und :meth:`!create_module` definieren, um die Schnittstelle :class:" +"`~importlib.abc.Loader` zu implementieren. Ein Loader wird in der Regel von " +"einem :term:`finder` zurückgegeben. Siehe auch:" + +#: ../../glossary.rst:985 +msgid ":ref:`finders-and-loaders`" +msgstr ":ref:`finders-and-loaders`" + +#: ../../glossary.rst:986 +msgid ":class:`importlib.abc.Loader`" +msgstr ":class:`importlib.abc.Loader`" + +#: ../../glossary.rst:987 +msgid ":pep:`302`" +msgstr ":pep:`302`" + +#: ../../glossary.rst:988 +msgid "locale encoding" +msgstr "Ländereinstellung, Kodierung" + +#: ../../glossary.rst:990 +msgid "" +"On Unix, it is the encoding of the LC_CTYPE locale. It can be set with :func:" +"`locale.setlocale(locale.LC_CTYPE, new_locale) `." +msgstr "" +"Unter Unix handelt es sich um die Kodierung der Locale LC_CTYPE. Sie kann " +"mit :func:`locale.setlocale(locale.LC_CTYPE, new_locale) ` " +"festgelegt werden." + +#: ../../glossary.rst:993 +msgid "On Windows, it is the ANSI code page (ex: ``\"cp1252\"``)." +msgstr "Unter Windows ist dies die ANSI-Codepage (z. B.: ``\"cp1252\"``)." + +#: ../../glossary.rst:995 +msgid "" +"On Android and VxWorks, Python uses ``\"utf-8\"`` as the locale encoding." +msgstr "" +"Unter Android und VxWorks verwendet Python ``\"utf-8\"`` als Locale-" +"Kodierung." + +#: ../../glossary.rst:997 +msgid ":func:`locale.getencoding` can be used to get the locale encoding." +msgstr "" +":func:`locale.getencoding` kann verwendet werden, um die Kodierung der " +"Ländereinstellung abzurufen." + +#: ../../glossary.rst:999 +msgid "See also the :term:`filesystem encoding and error handler`." +msgstr "" +"Siehe auch den Eintrag :term:`Dateisystem-Kodierung und Fehlerbehandlung " +"`." + +#: ../../glossary.rst:1000 +msgid "magic method" +msgstr "magische Methode" + +#: ../../glossary.rst:1004 +msgid "An informal synonym for :term:`special method`." +msgstr "" +"Ein umgangssprachliches Synonym für :term:`Spezialmethode `." + +#: ../../glossary.rst:1005 +msgid "mapping" +msgstr "Kartierung" + +#: ../../glossary.rst:1007 +msgid "" +"A container object that supports arbitrary key lookups and implements the " +"methods specified in the :class:`collections.abc.Mapping` or :class:" +"`collections.abc.MutableMapping` :ref:`abstract base classes `. Examples include :class:`dict`, :class:" +"`collections.defaultdict`, :class:`collections.OrderedDict` and :class:" +"`collections.Counter`." +msgstr "" +"Ein Container-Objekt, das die Suche nach beliebigen Schlüsseln unterstützt " +"und die Methoden implementiert, die in den :class:`collections.abc.Mapping` " +"oder :class:`collections.abc.MutableMapping`:ref:`abstrakten Basisklassen " +"` festgelegt sind. Beispiele hierfür " +"sind :class:`dict`, :class:`collections.defaultdict`, :class:`collections." +"OrderedDict` und :class:`collections.Counter`." + +#: ../../glossary.rst:1013 +msgid "meta path finder" +msgstr "Meta-Pfadfinder" + +#: ../../glossary.rst:1015 +msgid "" +"A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path " +"finders are related to, but different from :term:`path entry finders `." +msgstr "" +"Ein :term:`Finder `, der bei einer Suche auf :data:`sys.meta_path` " +"zurückgegeben wird. Meta-Pfadfinder stehen in Zusammenhang mit :term:" +"`Pfadeintrags-Findern `, unterscheiden sich jedoch von " +"diesen." + +#: ../../glossary.rst:1019 +msgid "" +"See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " +"finders implement." +msgstr "" +"Unter :class:`importlib.abc.MetaPathFinder` findest du die Methoden, die " +"Meta-Path-Finder implementieren." + +#: ../../glossary.rst:1021 +msgid "metaclass" +msgstr "Metaklasse" + +#: ../../glossary.rst:1023 +msgid "" +"The class of a class. Class definitions create a class name, a class " +"dictionary, and a list of base classes. The metaclass is responsible for " +"taking those three arguments and creating the class. Most object oriented " +"programming languages provide a default implementation. What makes Python " +"special is that it is possible to create custom metaclasses. Most users " +"never need this tool, but when the need arises, metaclasses can provide " +"powerful, elegant solutions. They have been used for logging attribute " +"access, adding thread-safety, tracking object creation, implementing " +"singletons, and many other tasks." +msgstr "" +"Die Klasse einer Klasse. Klassendefinitionen legen einen Klassennamen, ein " +"Klassenwörterbuch und eine Liste von Basisklassen fest. Die Metaklasse ist " +"dafür zuständig, diese drei Argumente zu übernehmen und die Klasse zu " +"erstellen. Die meisten objektorientierten Programmiersprachen bieten eine " +"Standardimplementierung. Das Besondere an Python ist, dass es möglich ist, " +"benutzerdefinierte Metaklassen zu erstellen. Die meisten Nutzer benötigen " +"dieses Werkzeug nie, doch wenn der Bedarf entsteht, können Metaklassen " +"leistungsstarke und elegante Lösungen bieten. Sie wurden bereits zur " +"Protokollierung des Zugriffs auf Attribute, zur Gewährleistung der Thread-" +"Sicherheit, zur Verfolgung der Objekterstellung, zur Implementierung von " +"Singletons und für viele andere Aufgaben eingesetzt." + +#: ../../glossary.rst:1033 +msgid "More information can be found in :ref:`metaclasses`." +msgstr "Weitere Informationen finden Sie unter :ref:`metaclasses`." + +#: ../../glossary.rst:1002 ../../glossary.rst:1034 ../../glossary.rst:1488 +msgid "method" +msgstr "Methode" + +#: ../../glossary.rst:1036 +msgid "" +"A function which is defined inside a class body. If called as an attribute " +"of an instance of that class, the method will get the instance object as its " +"first :term:`argument` (which is usually called ``self``). See :term:" +"`function` and :term:`nested scope`." +msgstr "" +"Eine Funktion, die innerhalb des Klassenkörpers definiert ist. Wird sie als " +"Attribut einer Instanz dieser Klasse aufgerufen, erhält die Methode das " +"Instanzobjekt als erstes :term:`Argument ` (das üblicherweise als " +"``self`` bezeichnet wird). Siehe :term:`function` und :term:`nested scope`." + +#: ../../glossary.rst:1040 +msgid "method resolution order" +msgstr "Reihenfolge der Methodenauflösung" + +#: ../../glossary.rst:1042 +msgid "" +"Method Resolution Order is the order in which base classes are searched for " +"a member during lookup. See :ref:`python_2.3_mro` for details of the " +"algorithm used by the Python interpreter since the 2.3 release." +msgstr "" +"Die Auflösungsreihenfolge von Methoden ist die Reihenfolge, in der bei der " +"Suche nach einem Mitglied die Basisklassen durchsucht werden. Weitere " +"Informationen zu dem Algorithmus, der seit der Version 2.3 vom Python-" +"Interpreter verwendet wird, findest du unter :ref:`python_2.3_mro`." + +#: ../../glossary.rst:1045 +msgid "module" +msgstr "Modul" + +#: ../../glossary.rst:1047 +msgid "" +"An object that serves as an organizational unit of Python code. Modules " +"have a namespace containing arbitrary Python objects. Modules are loaded " +"into Python by the process of :term:`importing`." +msgstr "" +"Ein Objekt, das als Organisationseinheit für Python-Code dient. Module " +"verfügen über einen Namensraum, der beliebige Python-Objekte enthält. Module " +"werden durch den Vorgang des :term:`Importierens ` in Python " +"geladen." + +#: ../../glossary.rst:1051 +msgid "See also :term:`package`." +msgstr "Siehe auch :term:`Paket `." + +#: ../../glossary.rst:1052 +msgid "module spec" +msgstr "Modulspezifikation" + +#: ../../glossary.rst:1054 +msgid "" +"A namespace containing the import-related information used to load a module. " +"An instance of :class:`importlib.machinery.ModuleSpec`." +msgstr "" +"Ein Namespace, der die Import-bezogenen Informationen enthält, die zum Laden " +"eines Moduls verwendet werden. Eine Instanz von :class:`importlib.machinery." +"ModuleSpec`." + +#: ../../glossary.rst:1057 +msgid "See also :ref:`module-specs`." +msgstr "Siehe auch :ref:`module-specs`." + +#: ../../glossary.rst:1058 +msgid "MRO" +msgstr "MRO" + +#: ../../glossary.rst:1060 +msgid "See :term:`method resolution order`." +msgstr "" +"Siehe :term:`Reihenfolge der Methodenauflösung `." + +#: ../../glossary.rst:1061 +msgid "mutable" +msgstr "veränderlich" + +#: ../../glossary.rst:1063 +msgid "" +"An :term:`object` with state that is allowed to change during the course of " +"the program. In multi-threaded programs, mutable objects that are shared " +"between threads require careful synchronization to avoid :term:`race " +"conditions `. See also :term:`immutable`, :term:`thread-" +"safe`, and :term:`concurrent modification`." +msgstr "" +"Ein :term:`Objekt ` mit einem Zustand, der sich im Verlauf des " +"Programms ändern darf. In Multithread-Programmen erfordern veränderbare " +"Objekte, die von mehreren Threads gemeinsam genutzt werden, eine sorgfältige " +"Synchronisation, um :term:`Race-Conditions ` zu vermeiden. " +"Siehe auch :term:`unveränderlich `, :term:`thread-sicher ` und :term:`parallele Änderung `." + +#: ../../glossary.rst:1068 +msgid "named tuple" +msgstr "benanntes Tupel" + +#: ../../glossary.rst:1070 +msgid "" +"The term \"named tuple\" applies to any type or class that inherits from " +"tuple and whose indexable elements are also accessible using named " +"attributes. The type or class may have other features as well." +msgstr "" +"Der Begriff \"benanntes Tupel\" bezieht sich auf jeden Typ oder jede Klasse, " +"die von \"Tupel\" erbt und deren indizierbare Elemente auch über benannte " +"Attribute zugänglich sind. Der Typ oder die Klasse kann darüber hinaus noch " +"weitere Merkmale aufweisen." + +#: ../../glossary.rst:1074 +msgid "" +"Several built-in types are named tuples, including the values returned by :" +"func:`time.localtime` and :func:`os.stat`. Another example is :data:`sys." +"float_info`::" +msgstr "" +"Mehrere integrierte Datentypen werden als Tupel bezeichnet, darunter die " +"von :func:`time.localtime` und :func:`os.stat` zurückgegebenen Werte. Ein " +"weiteres Beispiel ist :data:`sys.float_info`: ::" + +#: ../../glossary.rst:1078 +msgid "" +">>> sys.float_info[1] # indexed access\n" +"1024\n" +">>> sys.float_info.max_exp # named field access\n" +"1024\n" +">>> isinstance(sys.float_info, tuple) # kind of tuple\n" +"True" +msgstr "" +">>> sys.float_info[1] # indizierter Zugriff\n" +"1024\n" +">>> sys.float_info.max_exp # Zugriff auf ein benanntes Feld\n" +"1024\n" +">>> isinstance(sys.float_info, tuple) # Typ eines Tupels\n" +"True" + +#: ../../glossary.rst:1085 +msgid "" +"Some named tuples are built-in types (such as the above examples). " +"Alternatively, a named tuple can be created from a regular class definition " +"that inherits from :class:`tuple` and that defines named fields. Such a " +"class can be written by hand, or it can be created by inheriting :class:" +"`typing.NamedTuple`, or with the factory function :func:`collections." +"namedtuple`. The latter techniques also add some extra methods that may not " +"be found in hand-written or built-in named tuples." +msgstr "" +"Einige benannte Tupel sind integrierte Typen (wie die obigen Beispiele). " +"Alternativ kann ein benanntes Tupel aus einer regulären Klassendefinition " +"erstellt werden, die von :class:`tuple` erbt und benannte Felder " +"definiert. Eine solche Klasse kann manuell geschrieben werden oder durch " +"Vererbung von :class:`typing.NamedTuple` bzw. mit der Factory-Funktion :" +"func:`collections.namedtuple` erstellt werden. Die letztgenannten Techniken " +"fügen zudem einige zusätzliche Methoden hinzu, die in manuell geschriebenen " +"oder integrierten benannten Tupeln möglicherweise nicht vorhanden sind." + +#: ../../glossary.rst:1093 +msgid "namespace" +msgstr "Namensraum" + +#: ../../glossary.rst:1095 +msgid "" +"The place where a variable is stored. Namespaces are implemented as " +"dictionaries. There are the local, global and built-in namespaces as well " +"as nested namespaces in objects (in methods). Namespaces support modularity " +"by preventing naming conflicts. For instance, the functions :func:`builtins." +"open <.open>` and :func:`os.open` are distinguished by their namespaces. " +"Namespaces also aid readability and maintainability by making it clear which " +"module implements a function. For instance, writing :func:`random.seed` or :" +"func:`itertools.islice` makes it clear that those functions are implemented " +"by the :mod:`random` and :mod:`itertools` modules, respectively." +msgstr "" +"Der Ort, an dem eine Variable gespeichert wird. Namensräume werden als " +"Wörterbücher implementiert. Es gibt lokale, globale und integrierte " +"Namensräume sowie verschachtelte Namensräume in Objekten (in Methoden). " +"Namensräume unterstützen die Modularität, indem sie Namenskonflikte " +"verhindern. Beispielsweise unterscheiden sich die Funktionen :func:" +"`builtins.open <.open>` und :func:`os.open` durch ihre Namensräume. " +"Namensräume tragen zudem zur Lesbarkeit und Wartbarkeit bei, indem sie " +"deutlich machen, welches Modul eine Funktion implementiert. Wenn man " +"beispielsweise :func:`random.seed` oder :func:`itertools.islice` schreibt, " +"wird deutlich, dass diese Funktionen jeweils von den Modulen :mod:`random` " +"und :mod:`itertools` implementiert werden." + +#: ../../glossary.rst:1105 +msgid "namespace package" +msgstr "Namensraum-Paket" + +#: ../../glossary.rst:1107 +msgid "" +"A :term:`package` which serves only as a container for subpackages. " +"Namespace packages may have no physical representation, and specifically are " +"not like a :term:`regular package` because they have no ``__init__.py`` file." +msgstr "" +"Ein :term:`Paket `, das ausschließlich als Container für " +"Unterpakete dient. Namespace-Pakete haben möglicherweise keine physische " +"Darstellung und unterscheiden sich insbesondere von einem :term:`normalen " +"Paket `, da sie keine Datei ``__init__.py`` enthalten." + +#: ../../glossary.rst:1112 +msgid "" +"Namespace packages allow several individually installable packages to have a " +"common parent package. Otherwise, it is recommended to use a :term:`regular " +"package`." +msgstr "" +"Namespace-Pakete ermöglichen es, dass mehrere einzeln installierbare Pakete " +"ein gemeinsames übergeordnetes Paket haben. Andernfalls wird empfohlen, ein :" +"term:`normales Paket ` zu verwenden." + +#: ../../glossary.rst:1115 +msgid "" +"For more information, see :pep:`420` and :ref:`reference-namespace-package`." +msgstr "" +"Weitere Informationen findest du unter :pep:`420` und :ref:`reference-" +"namespace-package`." + +#: ../../glossary.rst:1117 +msgid "See also :term:`module`." +msgstr "Siehe auch :term:`Modul `." + +#: ../../glossary.rst:1118 +msgid "native code" +msgstr "Nativcode" + +#: ../../glossary.rst:1120 +msgid "" +"Code that is compiled to machine instructions and runs directly on the " +"processor, as opposed to code that is interpreted or runs in a virtual " +"machine. In the context of Python, native code typically refers to C, C++, " +"Rust or Fortran code in :term:`extension modules ` that " +"can be called from Python. See also :term:`extension module`." +msgstr "" +"Code, der zu Maschinenbefehlen kompiliert wird und direkt auf dem Prozessor " +"ausgeführt wird, im Gegensatz zu Code, der interpretiert wird oder in einer " +"virtuellen Maschine läuft. Im Zusammenhang mit Python bezieht sich " +"\"nativer Code\" in der Regel auf C-, C++-, Rust- oder Fortran-Code in :term:" +"`Erweiterungsmodulen `, der von Python aus aufgerufen " +"werden kann. Siehe auch :term:`Erweiterungsmodul `." + +#: ../../glossary.rst:1125 +msgid "nested scope" +msgstr "verschachtelter Gültigkeitsbereich" + +#: ../../glossary.rst:1127 +msgid "" +"The ability to refer to a variable in an enclosing definition. For " +"instance, a function defined inside another function can refer to variables " +"in the outer function. Note that nested scopes by default work only for " +"reference and not for assignment. Local variables both read and write in " +"the innermost scope. Likewise, global variables read and write to the " +"global namespace. The :keyword:`nonlocal` allows writing to outer scopes." +msgstr "" +"Die Möglichkeit, in einer umschließenden Definition auf eine Variable zu " +"verweisen. So kann beispielsweise eine innerhalb einer anderen Funktion " +"definierte Funktion auf Variablen in der äußeren Funktion verweisen. " +"Beachte, dass verschachtelte Gültigkeitsbereiche standardmäßig nur für " +"Verweise und nicht für Zuweisungen gelten. Lokale Variablen lesen und " +"schreiben im innersten Gültigkeitsbereich. Ebenso lesen und schreiben " +"globale Variablen im globalen Namensraum. Die Anweisung :keyword:" +"`nonlocal` ermöglicht das Schreiben in äußere Gültigkeitsbereiche." + +#: ../../glossary.rst:1134 +msgid "new-style class" +msgstr "Klasse im neuen Stil" + +#: ../../glossary.rst:1136 +msgid "" +"Old name for the flavor of classes now used for all class objects. In " +"earlier Python versions, only new-style classes could use Python's newer, " +"versatile features like :attr:`~object.__slots__`, descriptors, properties, :" +"meth:`~object.__getattribute__`, class methods, and static methods." +msgstr "" +"Alte Bezeichnung für den \"Flavor\" von Klassen, der nun für alle " +"Klassenobjekte verwendet wird. In früheren Python-Versionen konnten nur " +"Klassen des neuen Stils die neueren, vielseitigen Funktionen von Python " +"nutzen, wie beispielsweise :attr:`~object.__slots__` , Deskriptoren, " +"Eigenschaften, :meth:`~object.__getattribute__` , Klassenmethoden und " +"statische Methoden." + +#: ../../glossary.rst:1141 +msgid "non-deterministic" +msgstr "nicht deterministisch" + +#: ../../glossary.rst:1143 +msgid "" +"Behavior where the outcome of a program can vary between executions with the " +"same inputs. In multi-threaded programs, non-deterministic behavior often " +"results from :term:`race conditions ` where the relative " +"timing or interleaving of threads affects the result. Proper synchronization " +"using :term:`locks ` and other :term:`synchronization primitives " +"` helps ensure deterministic behavior." +msgstr "" +"Verhalten, bei dem das Ergebnis eines Programms bei gleichen Eingaben von " +"Ausführung zu Ausführung variieren kann. In Multithread-Programmen " +"resultiert nichtdeterministisches Verhalten häufig aus :term:`Race-" +"Conditions `, bei denen der relative zeitliche Ablauf oder " +"die Verflechtung von Threads das Ergebnis beeinflusst. Eine ordnungsgemäße " +"Synchronisation mithilfe von :term:`Locks ` und anderen :term:" +"`Synchronisationsprimitiven ` trägt dazu bei, ein " +"deterministisches Verhalten sicherzustellen." + +#: ../../glossary.rst:1150 +msgid "object" +msgstr "Objekt" + +#: ../../glossary.rst:1152 +msgid "" +"Any data with state (attributes or value) and defined behavior (methods). " +"Also the ultimate base class of any :term:`new-style class`." +msgstr "" +"Jede Dateninstanz mit einem Zustand (Attribute oder Wert) und definiertem " +"Verhalten (Methoden). Außerdem die oberste Basisklasse jeder :term:`Klasse " +"neuen Stils `." + +#: ../../glossary.rst:1155 +msgid "optimized scope" +msgstr "optimierter Umfang" + +#: ../../glossary.rst:1157 +msgid "" +"A scope where target local variable names are reliably known to the compiler " +"when the code is compiled, allowing optimization of read and write access to " +"these names. The local namespaces for functions, generators, coroutines, " +"comprehensions, and generator expressions are optimized in this fashion. " +"Note: most interpreter optimizations are applied to all scopes, only those " +"relying on a known set of local and nonlocal variable names are restricted " +"to optimized scopes." +msgstr "" +"Ein Geltungsbereich, in dem die Namen der lokalen Zielvariablen dem Compiler " +"zum Zeitpunkt der Kompilierung zuverlässig bekannt sind, wodurch der Lese- " +"und Schreibzugriff auf diese Namen optimiert werden kann. Die lokalen " +"Namensräume für Funktionen, Generatoren, Koroutinen, Comprehensions und " +"Generatorausdrücke werden auf diese Weise optimiert. Hinweis: Die meisten " +"Interpreter-Optimierungen werden auf alle Gültigkeitsbereiche angewendet; " +"nur diejenigen, die auf einer bekannten Menge lokaler und nichtlokaler " +"Variablennamen beruhen, sind auf optimierte Gültigkeitsbereiche beschränkt." + +#: ../../glossary.rst:1164 +msgid "optional module" +msgstr "optionales Modul" + +#: ../../glossary.rst:1166 +msgid "" +"An :term:`extension module` that is part of the :term:`standard library`, " +"but may be absent in some builds of :term:`CPython`, usually due to missing " +"third-party libraries or because the module is not available for a given " +"platform." +msgstr "" +"Ein :term:`Erweiterungsmodul `, das Teil der :term:" +"`Standardbibliothek ` ist, jedoch in einigen Builds von :" +"term:`CPython` möglicherweise fehlt – in der Regel aufgrund fehlender " +"Bibliotheken von Drittanbietern oder weil das Modul für eine bestimmte " +"Plattform nicht verfügbar ist." + +#: ../../glossary.rst:1171 +msgid "" +"See :ref:`optional-module-requirements` for a list of optional modules that " +"require third-party libraries." +msgstr "" +"Eine Liste der optionalen Module, für die Bibliotheken von Drittanbietern " +"erforderlich sind, findest du unter :ref:`optional-module-requirements`." + +#: ../../glossary.rst:1173 +msgid "package" +msgstr "Paket" + +#: ../../glossary.rst:1175 +msgid "" +"A Python :term:`module` which can contain submodules or recursively, " +"subpackages. Technically, a package is a Python module with a ``__path__`` " +"attribute." +msgstr "" +"Ein Python-:term:`Modul `, das Untermodule oder – rekursiv – " +"Unterpakete enthalten kann. Technisch gesehen ist ein Paket ein Python-Modul " +"mit einem Attribut vom Typ ``__path__`` ." + +#: ../../glossary.rst:1179 +msgid "See also :term:`regular package` and :term:`namespace package`." +msgstr "" +"Siehe auch :term:`reguläres Paket ` und :term:`Namensraum-" +"Paket `." + +#: ../../glossary.rst:1180 +msgid "parallelism" +msgstr "Parallelität" + +#: ../../glossary.rst:1182 +msgid "" +"Executing multiple operations at the same time (e.g. on multiple CPU " +"cores). In Python builds with the :term:`global interpreter lock (GIL) " +"`, only one thread runs Python bytecode at a time, " +"so taking advantage of multiple CPU cores typically involves multiple " +"processes (e.g. :mod:`multiprocessing`) or native extensions that release " +"the GIL. In :term:`free-threaded ` Python, multiple Python " +"threads can run Python code simultaneously on different cores." +msgstr "" +"Die gleichzeitige Ausführung mehrerer Operationen (z. B. auf mehreren CPU-" +"Kernen). In Python-Builds mit dem :term:`global interpreter lock (GIL) " +"` führt jeweils nur ein Thread Python-Bytecode aus. " +"Um die Vorteile mehrerer CPU-Kerne nutzen zu können, sind daher in der Regel " +"mehrere Prozesse (z. B. :mod:`multiprocessing`) oder native Erweiterungen " +"erforderlich, die das GIL aufheben. In :term:`free-threaded ` Python können mehrere Python-Threads Python-Code gleichzeitig " +"auf verschiedenen Kernen ausführen." + +#: ../../glossary.rst:1190 +msgid "parameter" +msgstr "Parameter" + +#: ../../glossary.rst:1192 +msgid "" +"A named entity in a :term:`function` (or method) definition that specifies " +"an :term:`argument` (or in some cases, arguments) that the function can " +"accept. There are five kinds of parameter:" +msgstr "" +"Eine benannte Entität in einer :term:`Funktions `- (oder " +"Methoden-)Definition, die ein :term:`Argument ` (oder in manchen " +"Fällen mehrere Argumente) angibt, das bzw. die die Funktion entgegennehmen " +"kann. Es gibt fünf Arten von Parametern:" + +#: ../../glossary.rst:1196 +msgid "" +":dfn:`positional-or-keyword`: specifies an argument that can be passed " +"either :term:`positionally ` or as a :term:`keyword argument " +"`. This is the default kind of parameter, for example *foo* and " +"*bar* in the following::" +msgstr "" +":dfn:`positional-or-keyword`: Gibt ein Argument an, das entweder :term:" +"`positionsbezogen ` oder als :term:`Schlüsselwortargument " +"` übergeben werden kann. Dies ist die Standardart von Parametern, " +"zum Beispiel *foo* und *bar* im Folgenden::" + +#: ../../glossary.rst:1201 +msgid "def func(foo, bar=None): ..." +msgstr "def func(foo, bar=None): ..." + +#: ../../glossary.rst:1205 +msgid "" +":dfn:`positional-only`: specifies an argument that can be supplied only by " +"position. Positional-only parameters can be defined by including a ``/`` " +"character in the parameter list of the function definition after them, for " +"example *posonly1* and *posonly2* in the following::" +msgstr "" +":dfn:`positional-only`: Gibt ein Argument an, das nur über die Position " +"übergeben werden kann. Parameter, die ausschließlich über die Position " +"übergeben werden können, lassen sich definieren, indem man in der " +"Parameterliste der Funktionsdefinition hinter ihnen das Zeichen ``/`` " +"einfügt, zum Beispiel *posonly1* und *posonly2* im folgenden Beispiel::" + +#: ../../glossary.rst:1210 +msgid "def func(posonly1, posonly2, /, positional_or_keyword): ..." +msgstr "def func(posonly1, posonly2, /, positional_or_keyword): ..." + +#: ../../glossary.rst:1214 +msgid "" +":dfn:`keyword-only`: specifies an argument that can be supplied only by " +"keyword. Keyword-only parameters can be defined by including a single var-" +"positional parameter or bare ``*`` in the parameter list of the function " +"definition before them, for example *kw_only1* and *kw_only2* in the " +"following::" +msgstr "" +":dfn:`keyword-only`: Gibt ein Argument an, das nur als Schlüsselwort " +"übergeben werden kann. Schlüsselwort-Parameter können definiert werden, " +"indem ein einzelner variabler Positionsparameter oder ein reines Schlüssel " +"``*`` us in die Parameterliste der vorangehenden Funktionsdefinition " +"aufgenommen wird, zum Beispiel *kw_only1* und *kw_only2* im folgenden " +"Beispiel::" + +#: ../../glossary.rst:1220 +msgid "def func(arg, *, kw_only1, kw_only2): ..." +msgstr "def func(arg, *, kw_only1, kw_only2): ..." + +#: ../../glossary.rst:1222 +msgid "" +":dfn:`var-positional`: specifies that an arbitrary sequence of positional " +"arguments can be provided (in addition to any positional arguments already " +"accepted by other parameters). Such a parameter can be defined by " +"prepending the parameter name with ``*``, for example *args* in the " +"following::" +msgstr "" +":dfn:`var-positional`: Gibt an, dass eine beliebige Folge von " +"Positionsargumenten angegeben werden kann (zusätzlich zu den " +"Positionsargumenten, die bereits von anderen Parametern akzeptiert werden). " +"Ein solcher Parameter kann definiert werden, indem dem Parameternamen " +"``*`` vorangestellt wird, zum Beispiel *args* im folgenden Beispiel::" + +#: ../../glossary.rst:1228 +msgid "def func(*args, **kwargs): ..." +msgstr "def func(*args, **kwargs): ..." + +#: ../../glossary.rst:1230 +msgid "" +":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " +"provided (in addition to any keyword arguments already accepted by other " +"parameters). Such a parameter can be defined by prepending the parameter " +"name with ``**``, for example *kwargs* in the example above." +msgstr "" +":dfn:`var-keyword`: Gibt an, dass beliebig viele Schlüsselwortargumente " +"angegeben werden können (zusätzlich zu den Schlüsselwortargumenten, die " +"bereits von anderen Parametern akzeptiert werden). Ein solcher Parameter " +"kann definiert werden, indem dem Parameternamen ``**`` vorangestellt wird, " +"beispielsweise *kwargs* im obigen Beispiel." + +#: ../../glossary.rst:1236 +msgid "" +"Parameters can specify both optional and required arguments, as well as " +"default values for some optional arguments." +msgstr "" +"Parameter können sowohl optionale als auch erforderliche Argumente sowie " +"Standardwerte für einige optionale Argumente festlegen." + +#: ../../glossary.rst:1239 +msgid "" +"See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " +"difference between arguments and parameters `, " +"the :class:`inspect.Parameter` class, the :ref:`function` section, and :pep:" +"`362`." +msgstr "" +"Siehe auch den Glossareintrag :term:`argument`, die FAQ-Frage zu :ref:`dem " +"Unterschied zwischen Argumenten und Parametern `, " +"die Klasse :class:`inspect.Parameter`, den Abschnitt :ref:`function` sowie :" +"pep:`362`." + +#: ../../glossary.rst:1243 +msgid "per-object lock" +msgstr "Objektspezifische Sperre" + +#: ../../glossary.rst:1245 +msgid "" +"A :term:`lock` associated with an individual object instance rather than a " +"global lock shared across all objects. In :term:`free-threaded ` Python, built-in types like :class:`dict` and :class:`list` use " +"per-object locks to allow concurrent operations on different objects while " +"serializing operations on the same object. Operations that hold the per-" +"object lock prevent other locking operations on the same object from " +"proceeding, but do not block :term:`lock-free` operations." +msgstr "" +"Ein :term:`Lock `, der mit einer einzelnen Objektinstanz verknüpft " +"ist, im Gegensatz zu einem globalen Lock, der von allen Objekten gemeinsam " +"genutzt wird. In :term:`free-threaded ` Python verwenden " +"integrierte Typen wie :class:`dict` und :class:`list` objektbezogene " +"Sperren, um parallele Operationen an verschiedenen Objekten zu ermöglichen, " +"während Operationen am selben Objekt serialisiert werden. Operationen, die " +"die objektbezogene Sperre halten, verhindern, dass andere Sperroperationen " +"am selben Objekt fortgesetzt werden, blockieren jedoch keine :term:`lock-" +"free`-Operationen." + +#: ../../glossary.rst:1253 +msgid "path entry" +msgstr "Pfadeintrag" + +#: ../../glossary.rst:1255 +msgid "" +"A single location on the :term:`import path` which the :term:`path based " +"finder` consults to find modules for importing." +msgstr "" +"Ein einzelner Speicherort im :term:`Importpfad `, den der :term:" +"`pfadbasierte Finder ` abfragt, um Module zum Importieren " +"zu finden." + +#: ../../glossary.rst:1257 +msgid "path entry finder" +msgstr "Pfadeintrags-Finder" + +#: ../../glossary.rst:1259 +msgid "" +"A :term:`finder` returned by a callable on :data:`sys.path_hooks` (i.e. a :" +"term:`path entry hook`) which knows how to locate modules given a :term:" +"`path entry`." +msgstr "" +"Ein :term:`finder`, der von einer auf :data:`sys.path_hooks` aufrufbaren " +"Funktion (d. h. einem :term:`path entry hook`) zurückgegeben wird, die weiß, " +"wie man Module anhand eines :term:`path entry` findet." + +#: ../../glossary.rst:1263 +msgid "" +"See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " +"finders implement." +msgstr "" +"Unter :class:`importlib.abc.PathEntryFinder` findest du die Methoden, die " +"von Path-Entry-Findern implementiert werden." + +#: ../../glossary.rst:1265 +msgid "path entry hook" +msgstr "Pfadeintrag-Hook" + +#: ../../glossary.rst:1267 +msgid "" +"A callable on the :data:`sys.path_hooks` list which returns a :term:`path " +"entry finder` if it knows how to find modules on a specific :term:`path " +"entry`." +msgstr "" +"Eine auf der Liste :data:`sys.path_hooks` aufrufbare Funktion, die einen :" +"term:`Pfadeintrag-Finder ` zurückgibt, sofern sie weiß, " +"wie Module auf einem bestimmten :term:`Pfadeintrag ` gefunden " +"werden können." + +#: ../../glossary.rst:1270 +msgid "path based finder" +msgstr "Pfadbasierter Sucher" + +#: ../../glossary.rst:1272 +msgid "" +"One of the default :term:`meta path finders ` which " +"searches an :term:`import path` for modules." +msgstr "" +"Einer der standardmäßigen :term:`Meta-Pfadfinder `, der " +"einen :term:`Importpfad ` nach Modulen durchsucht." + +#: ../../glossary.rst:1274 +msgid "path-like object" +msgstr "pfadähnliches Objekt" + +#: ../../glossary.rst:1276 +msgid "" +"An object representing a file system path. A path-like object is either a :" +"class:`str` or :class:`bytes` object representing a path, or an object " +"implementing the :class:`os.PathLike` protocol. An object that supports the :" +"class:`os.PathLike` protocol can be converted to a :class:`str` or :class:" +"`bytes` file system path by calling the :func:`os.fspath` function; :func:" +"`os.fsdecode` and :func:`os.fsencode` can be used to guarantee a :class:" +"`str` or :class:`bytes` result instead, respectively. Introduced by :pep:" +"`519`." +msgstr "" +"Ein Objekt, das einen Dateisystempfad darstellt. Ein pfadähnliches Objekt " +"ist entweder ein :class:`str` - oder ein :class:`bytes` -Objekt, das einen " +"Pfad darstellt, oder ein Objekt, das das :class:`os.PathLike` -Protokoll " +"implementiert. Ein Objekt, das das :class:`os.PathLike` -Protokoll " +"unterstützt, kann durch Aufruf der Funktion :func:`os.fspath` in einen :" +"class:`str` - oder :class:`bytes` -Dateisystempfad umgewandelt werden; " +"mit :func:`os.fsdecode` bzw. :func:`os.fsencode` lässt sich stattdessen " +"ein :class:`str` - bzw. :class:`bytes` -Ergebnis gewährleisten. Eingeführt " +"durch :pep:`519` ." + +#: ../../glossary.rst:1284 +msgid "PEP" +msgstr "PEP" + +#: ../../glossary.rst:1286 +msgid "" +"Python Enhancement Proposal. A PEP is a design document providing " +"information to the Python community, or describing a new feature for Python " +"or its processes or environment. PEPs should provide a concise technical " +"specification and a rationale for proposed features." +msgstr "" +"Python Enhancement Proposal. Ein PEP ist ein Entwurfsdokument, das der " +"Python-Community Informationen liefert oder eine neue Funktion für Python, " +"dessen Prozesse oder dessen Umgebung beschreibt. PEPs sollten eine prägnante " +"technische Spezifikation sowie eine Begründung für die vorgeschlagenen " +"Funktionen enthalten." + +#: ../../glossary.rst:1292 +msgid "" +"PEPs are intended to be the primary mechanisms for proposing major new " +"features, for collecting community input on an issue, and for documenting " +"the design decisions that have gone into Python. The PEP author is " +"responsible for building consensus within the community and documenting " +"dissenting opinions." +msgstr "" +"PEPs sollen als primäre Mechanismen dienen, um wichtige neue Funktionen " +"vorzuschlagen, Rückmeldungen der Community zu einem Thema einzuholen und die " +"Designentscheidungen zu dokumentieren, die in Python eingeflossen sind. Der " +"PEP-Autor ist dafür verantwortlich, einen Konsens innerhalb der Community " +"herzustellen und abweichende Meinungen zu dokumentieren." + +#: ../../glossary.rst:1298 +msgid "See :pep:`1`." +msgstr "Siehe :pep:`1`." + +#: ../../glossary.rst:1299 +msgid "portion" +msgstr "Anteil" + +#: ../../glossary.rst:1301 +msgid "" +"A set of files in a single directory (possibly stored in a zip file) that " +"contribute to a namespace package, as defined in :pep:`420`." +msgstr "" +"Eine Sammlung von Dateien in einem einzigen Verzeichnis (die möglicherweise " +"in einer ZIP-Datei gespeichert sind), die zu einem Namespace-Paket " +"beitragen, wie unter :pep:`420` definiert." + +#: ../../glossary.rst:1303 +msgid "positional argument" +msgstr "Positionsargument" + +#: ../../glossary.rst:1306 +msgid "provisional API" +msgstr "vorläufige API" + +#: ../../glossary.rst:1308 +msgid "" +"A provisional API is one which has been deliberately excluded from the " +"standard library's backwards compatibility guarantees. While major changes " +"to such interfaces are not expected, as long as they are marked provisional, " +"backwards incompatible changes (up to and including removal of the " +"interface) may occur if deemed necessary by core developers. Such changes " +"will not be made gratuitously -- they will occur only if serious fundamental " +"flaws are uncovered that were missed prior to the inclusion of the API." +msgstr "" +"Eine vorläufige API ist eine Schnittstelle, die bewusst von den " +"Rückwärtskompatibilitätsgarantien der Standardbibliothek ausgenommen wurde. " +"Zwar sind größere Änderungen an solchen Schnittstellen nicht zu erwarten, " +"solange sie als vorläufig gekennzeichnet sind, doch können " +"rückwärtsinkompatible Änderungen (bis hin zur Entfernung der Schnittstelle) " +"vorgenommen werden, wenn dies von den Kernentwicklern als notwendig erachtet " +"wird. Solche Änderungen werden nicht ohne triftigen Grund vorgenommen – sie " +"erfolgen nur, wenn schwerwiegende grundlegende Mängel aufgedeckt werden, die " +"vor der Aufnahme der API übersehen wurden." + +#: ../../glossary.rst:1317 +msgid "" +"Even for provisional APIs, backwards incompatible changes are seen as a " +"\"solution of last resort\" - every attempt will still be made to find a " +"backwards compatible resolution to any identified problems." +msgstr "" +"Selbst bei vorläufigen APIs gelten rückwärtsinkompatible Änderungen als " +"\"letzter Ausweg\" – es wird weiterhin alles versucht, um für alle " +"festgestellten Probleme eine rückwärtskompatible Lösung zu finden." + +#: ../../glossary.rst:1321 +msgid "" +"This process allows the standard library to continue to evolve over time, " +"without locking in problematic design errors for extended periods of time. " +"See :pep:`411` for more details." +msgstr "" +"Dieser Prozess ermöglicht es, dass sich die Standardbibliothek im Laufe der " +"Zeit weiterentwickeln kann, ohne dass problematische Konstruktionsfehler " +"über längere Zeiträume hinweg festgeschrieben werden. Weitere Einzelheiten " +"findest du unter :pep:`411`." + +#: ../../glossary.rst:1324 +msgid "provisional package" +msgstr "vorläufiges Paket" + +#: ../../glossary.rst:1326 +msgid "See :term:`provisional API`." +msgstr "Siehe :term:`vorläufige API `." + +#: ../../glossary.rst:1327 +msgid "Python 3000" +msgstr "Python 3000" + +#: ../../glossary.rst:1329 +msgid "" +"Nickname for the Python 3.x release line (coined long ago when the release " +"of version 3 was something in the distant future.) This is also abbreviated " +"\"Py3k\"." +msgstr "" +"Spitzname für die Python-3.x-Versionsreihe (der vor langer Zeit geprägt " +"wurde, als die Veröffentlichung von Version 3 noch in ferner Zukunft lag). " +"Er wird auch mit \"Py3k\" abgekürzt." + +#: ../../glossary.rst:1332 +msgid "Pythonic" +msgstr "Pythonesk" + +#: ../../glossary.rst:1334 +msgid "" +"An idea or piece of code which closely follows the most common idioms of the " +"Python language, rather than implementing code using concepts common to " +"other languages. For example, a common idiom in Python is to loop over all " +"elements of an iterable using a :keyword:`for` statement. Many other " +"languages don't have this type of construct, so people unfamiliar with " +"Python sometimes use a numerical counter instead::" +msgstr "" +"Eine Idee oder ein Codeabschnitt, der sich eng an die gängigsten " +"Konventionen der Programmiersprache Python hält, anstatt Code unter " +"Verwendung von Konzepten zu implementieren, die in anderen Sprachen üblich " +"sind. Ein gängiges Beispiel in Python ist beispielsweise die " +"Durchlaufschleife über alle Elemente eines iterierbaren Objekts mithilfe " +"einer :keyword:`for` -Anweisung. Viele andere Sprachen verfügen nicht über " +"eine solche Konstruktion, sodass Personen, die mit Python nicht vertraut " +"sind, manchmal stattdessen einen numerischen Zähler verwenden::" + +#: ../../glossary.rst:1341 +msgid "" +"for i in range(len(food)):\n" +" print(food[i])" +msgstr "" +"for i in range(len(food)):\n" +" print(food[i])" + +#: ../../glossary.rst:1344 +msgid "As opposed to the cleaner, Pythonic method::" +msgstr "Im Gegensatz zu der übersichtlicheren, pythonesken Methode::" + +#: ../../glossary.rst:1346 +msgid "" +"for piece in food:\n" +" print(piece)" +msgstr "" +"für Stück in Essen:\n" +" print(Stück)" + +#: ../../glossary.rst:1348 +msgid "qualified name" +msgstr "qualifizierter Name" + +#: ../../glossary.rst:1350 +msgid "" +"A dotted name showing the \"path\" from a module's global scope to a class, " +"function or method defined in that module, as defined in :pep:`3155`. For " +"top-level functions and classes, the qualified name is the same as the " +"object's name::" +msgstr "" +"Ein gepunkteter Name, der den \"Pfad\" vom globalen Gültigkeitsbereich eines " +"Moduls zu einer in diesem Modul definierten Klasse, Funktion oder Methode " +"angibt, wie in :pep:`3155` definiert. Bei Funktionen und Klassen der " +"obersten Ebene entspricht der qualifizierte Name dem Namen des Objekts::" + +#: ../../glossary.rst:1355 +msgid "" +">>> class C:\n" +"... class D:\n" +"... def meth(self):\n" +"... pass\n" +"...\n" +">>> C.__qualname__\n" +"'C'\n" +">>> C.D.__qualname__\n" +"'C.D'\n" +">>> C.D.meth.__qualname__\n" +"'C.D.meth'" +msgstr "" +">>> class C:\n" +"... class D:\n" +"... def meth(self):\n" +"... pass\n" +"...\n" +">>> C.__qualname__\n" +"'C'\n" +">>> C.D.__qualname__\n" +"'C.D'\n" +">>> C.D.meth.__qualname__\n" +"'C.D.meth'" + +#: ../../glossary.rst:1367 +msgid "" +"When used to refer to modules, the *fully qualified name* means the entire " +"dotted path to the module, including any parent packages, e.g. ``email.mime." +"text``::" +msgstr "" +"Im Zusammenhang mit Modulen bezeichnet der *vollständige Name* den gesamten, " +"durch Punkte getrennten Pfad zum Modul, einschließlich aller übergeordneten " +"Pakete, z. B. ``email.mime.text``::" + +#: ../../glossary.rst:1371 +msgid "" +">>> import email.mime.text\n" +">>> email.mime.text.__name__\n" +"'email.mime.text'" +msgstr "" +">>> import email.mime.text\n" +">>> email.mime.text.__name__\n" +"'email.mime.text'" + +#: ../../glossary.rst:1374 +msgid "race condition" +msgstr "Race-Condition" + +#: ../../glossary.rst:1376 +msgid "" +"A condition of a program where the behavior depends on the relative timing " +"or ordering of events, particularly in multi-threaded programs. Race " +"conditions can lead to :term:`non-deterministic` behavior and bugs that are " +"difficult to reproduce. A :term:`data race` is a specific type of race " +"condition involving unsynchronized access to shared memory. The :term:" +"`LBYL` coding style is particularly susceptible to race conditions in multi-" +"threaded code. Using :term:`locks ` and other :term:`synchronization " +"primitives ` helps prevent race conditions." +msgstr "" +"Ein Zustand eines Programms, bei dem das Verhalten vom relativen zeitlichen " +"Ablauf oder der Reihenfolge von Ereignissen abhängt, insbesondere in " +"Multithread-Programmen. Race-Bedingungen können zu :term:`nicht-" +"deterministischem ` Verhalten und schwer reproduzierbaren " +"Fehlern führen. Ein :term:`Datenrennen ` ist eine spezielle Art " +"von Race Condition, bei der es um den nicht synchronisierten Zugriff auf " +"gemeinsam genutzten Speicher geht. Der :term:`LBYL`-Programmierstil ist in " +"Multithread-Code besonders anfällig für Race Conditions. Die Verwendung von :" +"term:`Locks ` und anderen :term:`Synchronisationsprimitiven " +"` hilft, Race Conditions zu vermeiden." + +#: ../../glossary.rst:1386 +msgid "reference count" +msgstr "Referenzanzahl" + +#: ../../glossary.rst:1388 +msgid "" +"The number of references to an object. When the reference count of an " +"object drops to zero, it is deallocated. Some objects are :term:`immortal` " +"and have reference counts that are never modified, and therefore the objects " +"are never deallocated. Reference counting is generally not visible to " +"Python code, but it is a key element of the :term:`CPython` implementation. " +"Programmers can call the :func:`sys.getrefcount` function to return the " +"reference count for a particular object." +msgstr "" +"Die Anzahl der Verweise auf ein Objekt. Wenn die Referenzanzahl eines " +"Objekts auf null sinkt, wird es freigegeben. Einige Objekte sind :term:" +"`unsterblich ` und haben Referenzanzahlen, die niemals geändert " +"werden; daher werden diese Objekte niemals freigegeben. Die Referenzzählung " +"ist für Python-Code im Allgemeinen nicht sichtbar, stellt jedoch ein " +"Schlüsselelement der :term:`CPython`-Implementierung dar. Programmierer " +"können die Funktion :func:`sys.getrefcount` aufrufen, um die " +"Referenzanzahl für ein bestimmtes Objekt abzurufen." + +#: ../../glossary.rst:1397 +msgid "" +"In :term:`CPython`, reference counts are not considered to be stable or well-" +"defined values; the number of references to an object, and how that number " +"is affected by Python code, may be different between versions." +msgstr "" +"In :term:`CPython` gelten Referenzzähler nicht als stabile oder genau " +"definierte Werte; die Anzahl der Verweise auf ein Objekt und die Art und " +"Weise, wie diese Anzahl durch Python-Code beeinflusst wird, kann je nach " +"Version variieren." + +#: ../../glossary.rst:1401 +msgid "regular package" +msgstr "Standardpaket" + +#: ../../glossary.rst:1403 +msgid "" +"A traditional :term:`package`, such as a directory containing an ``__init__." +"py`` file." +msgstr "" +"Ein herkömmliches :term:`Paket `, beispielsweise ein Verzeichnis, " +"das eine Datei vom Typ ``__init__.py`` enthält." + +#: ../../glossary.rst:1406 +msgid "See also :term:`namespace package`." +msgstr "Siehe auch: :term:`Namensraum-Paket `." + +#: ../../glossary.rst:1407 +msgid "reentrant" +msgstr "wiederkehrend" + +#: ../../glossary.rst:1409 +msgid "" +"A property of a function or :term:`lock` that allows it to be called or " +"acquired multiple times by the same thread without causing errors or a :term:" +"`deadlock`." +msgstr "" +"Eine Eigenschaft einer Funktion oder eines :term:`lock`, die es ermöglicht, " +"dass diese mehrfach vom selben Thread aufgerufen bzw. erworben wird, ohne " +"dass dabei Fehler oder ein :term:`Deadlock ` auftreten." + +#: ../../glossary.rst:1413 +msgid "" +"For functions, reentrancy means the function can be safely called again " +"before a previous invocation has completed, which is important when " +"functions may be called recursively or from signal handlers. Thread-unsafe " +"functions may be :term:`non-deterministic` if they're called reentrantly in " +"a multithreaded program." +msgstr "" +"Bei Funktionen bedeutet Reentranz, dass die Funktion sicher erneut " +"aufgerufen werden kann, bevor ein vorheriger Aufruf abgeschlossen ist. Dies " +"ist wichtig, wenn Funktionen rekursiv oder aus Signal-Handlern heraus " +"aufgerufen werden können. Thread-unsichere Funktionen können :term:`nicht " +"deterministisch ` sein, wenn sie in einem Multithread-" +"Programm reentrant aufgerufen werden." + +#: ../../glossary.rst:1419 +msgid "" +"For locks, Python's :class:`threading.RLock` (reentrant lock) is reentrant, " +"meaning a thread that already holds the lock can acquire it again without " +"blocking. In contrast, :class:`threading.Lock` is not reentrant - " +"attempting to acquire it twice from the same thread will cause a deadlock." +msgstr "" +"Was Sperren betrifft, ist die Python-Sperre :class:`threading.RLock` " +"(Reentrant-Sperre) reentrant, was bedeutet, dass ein Thread, der die Sperre " +"bereits hält, sie erneut erwerben kann, ohne zu blockieren. Im Gegensatz " +"dazu ist :class:`threading.Lock` nicht reentrant – der Versuch, sie " +"zweimal vom selben Thread aus zu erwerben, führt zu einem Deadlock." + +#: ../../glossary.rst:1425 +msgid "See also :term:`lock` and :term:`deadlock`." +msgstr "Siehe auch :term:`lock` und :term:`deadlock`." + +#: ../../glossary.rst:1426 +msgid "REPL" +msgstr "REPL" + +#: ../../glossary.rst:1428 +msgid "" +"An acronym for the \"read–eval–print loop\", another name for the :term:" +"`interactive` interpreter shell." +msgstr "" +"Eine Abkürzung für \"read–eval–print loop\" (Lesen–Auswerten–Ausgeben-" +"Schleife), eine andere Bezeichnung für die :term:`interaktive ` " +"Interpreter-Shell." + +#: ../../glossary.rst:1430 +msgid "__slots__" +msgstr "__slots__" + +#: ../../glossary.rst:1432 +msgid "" +"A declaration inside a class that saves memory by pre-declaring space for " +"instance attributes and eliminating instance dictionaries. Though popular, " +"the technique is somewhat tricky to get right and is best reserved for rare " +"cases where there are large numbers of instances in a memory-critical " +"application." +msgstr "" +"Eine Deklaration innerhalb einer Klasse, die Speicherplatz spart, indem " +"Speicherplatz für Instanzattribute vorab reserviert und Instanz-Dictionaries " +"vermieden werden. Obwohl diese Technik weit verbreitet ist, ist ihre " +"korrekte Anwendung etwas knifflig und sollte am besten nur in seltenen " +"Fällen eingesetzt werden, in denen in einer speicherintensiven Anwendung " +"eine große Anzahl von Instanzen vorliegt." + +#: ../../glossary.rst:1437 +msgid "sequence" +msgstr "Sequenz" + +#: ../../glossary.rst:1439 +msgid "" +"An :term:`iterable` which supports efficient element access using integer " +"indices via the :meth:`~object.__getitem__` special method and defines a :" +"meth:`~object.__len__` method that returns the length of the sequence. Some " +"built-in sequence types are :class:`list`, :class:`str`, :class:`tuple`, " +"and :class:`bytes`. Note that :class:`dict` also supports :meth:`~object." +"__getitem__` and :meth:`!__len__`, but is considered a mapping rather than a " +"sequence because the lookups use arbitrary :term:`hashable` keys rather than " +"integers." +msgstr "" +"Ein :term:`iterable`, das einen effizienten Zugriff auf Elemente mithilfe " +"ganzzahliger Indizes über die spezielle Methode :meth:`~object.__getitem__` " +"unterstützt und eine Methode :meth:`~object.__len__` definiert, die die " +"Länge der Sequenz zurückgibt. Einige integrierte Sequenztypen sind :class:" +"`list`, :class:`str`, :class:`tuple` und :class:`bytes`. Beachte, dass :" +"class:`dict` ebenfalls :meth:`~object.__getitem__` und :meth:`!__len__` " +"unterstützt, jedoch eher als Mapping denn als Sequenz betrachtet wird, da " +"die Suchvorgänge beliebige :term:`hashable`-Schlüssel anstelle von " +"Ganzzahlen verwenden." + +#: ../../glossary.rst:1448 +msgid "" +"The :class:`collections.abc.Sequence` abstract base class defines a much " +"richer interface that goes beyond just :meth:`~object.__getitem__` and :meth:" +"`~object.__len__`, adding :meth:`~sequence.count`, :meth:`~sequence.index`, :" +"meth:`~object.__contains__`, and :meth:`~object.__reversed__`. Types that " +"implement this expanded interface can be registered explicitly using :func:" +"`~abc.ABCMeta.register`. For more documentation on sequence methods " +"generally, see :ref:`Common Sequence Operations `." +msgstr "" +"Die abstrakte Basisklasse :class:`collections.abc.Sequence` definiert eine " +"wesentlich umfangreichere Schnittstelle, die über die Methoden :meth:" +"`~object.__getitem__` und :meth:`~object.__len__` hinausgeht und um die " +"Methoden :meth:`~sequence.count`, :meth:`~sequence.index`, :meth:`~object." +"__contains__` sowie :meth:`~object.__reversed__` erweitert wird. Typen, die " +"diese erweiterte Schnittstelle implementieren, können explizit mit :func:" +"`~abc.ABCMeta.register` registriert werden. Weitere Informationen zu " +"Sequenzmethoden im Allgemeinen findest du unter :ref:`Common Sequence " +"Operations `." + +#: ../../glossary.rst:1458 +msgid "set comprehension" +msgstr "Mengenkomprimierung" + +#: ../../glossary.rst:1460 +msgid "" +"A compact way to process all or part of the elements in an iterable and " +"return a set with the results. ``results = {c for c in 'abracadabra' if c " +"not in 'abc'}`` generates the set of strings ``{'r', 'd'}``. See :ref:" +"`comprehensions`." +msgstr "" +"Eine kompakte Möglichkeit, alle oder einen Teil der Elemente einer " +"iterierbaren Struktur zu verarbeiten und eine Menge mit den Ergebnissen " +"zurückzugeben. ``results = {c for c in 'abracadabra' if c not in 'abc'}`` " +"erzeugt die Menge der Zeichenfolgen ``{'r', 'd'}``. Siehe :ref:" +"`comprehensions`." + +#: ../../glossary.rst:1464 +msgid "single dispatch" +msgstr "Einzelversand" + +#: ../../glossary.rst:1466 +msgid "" +"A form of :term:`generic function` dispatch where the implementation is " +"chosen based on the type of a single argument." +msgstr "" +"Eine Form der :term:`generischen Funktionsauswahl `, bei " +"der die Implementierung anhand des Typs eines einzelnen Arguments ausgewählt " +"wird." + +#: ../../glossary.rst:1468 +msgid "slice" +msgstr "Scheibe" + +#: ../../glossary.rst:1470 +msgid "" +"An object of type :class:`slice`, used to describe a portion of a :term:" +"`sequence`. A slice object is created when using the :ref:`slicing " +"` form of :ref:`subscript notation `, with colons " +"inside square brackets, such as in ``variable_name[1:3:5]``." +msgstr "" +"Ein Objekt vom Typ :class:`slice`, das zur Beschreibung eines Teils einer :" +"term:`Sequenz ` dient. Ein Slice-Objekt wird erstellt, wenn die :" +"ref:`Slicing- ` -Form der :ref:`Indexnotation ` " +"verwendet wird, bei der Doppelpunkte in eckigen Klammern stehen, wie " +"beispielsweise in ``variable_name[1:3:5]``." + +#: ../../glossary.rst:1475 +msgid "soft deprecated" +msgstr "weich veraltet" + +#: ../../glossary.rst:1477 +msgid "" +"A soft deprecated API should not be used in new code, but it is safe for " +"already existing code to use it. The API remains documented and tested, but " +"will not be enhanced further." +msgstr "" +"Eine soft deprecated API sollte in neuem Code nicht mehr verwendet werden, " +"bei bereits vorhandenem Code ist ihre Verwendung jedoch unbedenklich. Die " +"API bleibt dokumentiert und wird weiterhin getestet, wird jedoch nicht mehr " +"weiterentwickelt." + +#: ../../glossary.rst:1481 +msgid "" +"Soft deprecation, unlike normal deprecation, does not plan on removing the " +"API and will not emit warnings." +msgstr "" +"Im Gegensatz zur normalen Veralterung ist bei einer Soft Deprecation nicht " +"vorgesehen, die API zu entfernen, und es werden keine Warnungen ausgegeben." + +#: ../../glossary.rst:1484 +msgid "" +"See `PEP 387: Soft Deprecation `_." +msgstr "" +"Siehe `PEP 387: Soft Deprecation `_." + +#: ../../glossary.rst:1486 +msgid "special method" +msgstr "spezielle Methode" + +#: ../../glossary.rst:1490 +msgid "" +"A method that is called implicitly by Python to execute a certain operation " +"on a type, such as addition. Such methods have names starting and ending " +"with double underscores. Special methods are documented in :ref:" +"`specialnames`." +msgstr "" +"Eine Methode, die von Python implizit aufgerufen wird, um eine bestimmte " +"Operation auf einem Typ auszuführen, beispielsweise eine Addition. Die Namen " +"solcher Methoden beginnen und enden mit zwei Unterstrichen. Spezielle " +"Methoden sind unter :ref:`specialnames` dokumentiert." + +#: ../../glossary.rst:1494 +msgid "standard library" +msgstr "Standardbibliothek" + +#: ../../glossary.rst:1496 +msgid "" +"The collection of :term:`packages `, :term:`modules ` and :" +"term:`extension modules ` distributed as a part of the " +"official Python interpreter package. The exact membership of the collection " +"may vary based on platform, available system libraries, or other criteria. " +"Documentation can be found at :ref:`library-index`." +msgstr "" +"Die Sammlung von :term:`Paketen `, :term:`Modulen ` und :" +"term:`Erweiterungsmodulen `, die als Teil des offiziellen " +"Python-Interpreter-Pakets bereitgestellt wird. Der genaue Umfang der " +"Sammlung kann je nach Plattform, verfügbaren Systembibliotheken oder anderen " +"Kriterien variieren. Die Dokumentation findest du unter :ref:`library-index`." + +#: ../../glossary.rst:1502 +msgid "" +"See also :data:`sys.stdlib_module_names` for a list of all possible standard " +"library module names." +msgstr "" +"Eine Liste aller möglichen Namen von Standardbibliotheksmodulen findest du " +"unter :data:`sys.stdlib_module_names`." + +#: ../../glossary.rst:1504 +msgid "statement" +msgstr "Erklärung" + +#: ../../glossary.rst:1506 +msgid "" +"A statement is part of a suite (a \"block\" of code). A statement is either " +"an :term:`expression` or one of several constructs with a keyword, such as :" +"keyword:`if`, :keyword:`while` or :keyword:`for`." +msgstr "" +"Eine Anweisung ist Teil einer Suite (eines \"Code-Blocks\"). Eine Anweisung " +"ist entweder ein :term:`Ausdruck ` oder eine von mehreren " +"Konstrukten mit einem Schlüsselwort, wie beispielsweise :keyword:`if` , :" +"keyword:`while` oder :keyword:`for` ." + +#: ../../glossary.rst:1509 +msgid "static type checker" +msgstr "statischer Typprüfer" + +#: ../../glossary.rst:1511 +msgid "" +"An external tool that reads Python code and analyzes it, looking for issues " +"such as incorrect types. See also :term:`type hints ` and the :" +"mod:`typing` module." +msgstr "" +"Ein externes Tool, das Python-Code ausliest und analysiert, um Probleme wie " +"beispielsweise falsche Typen zu erkennen. Siehe auch :term:`Typangaben ` und das Modul :mod:`typing` ." + +#: ../../glossary.rst:1514 +msgid "stdlib" +msgstr "stdlib" + +#: ../../glossary.rst:1516 +msgid "An abbreviation of :term:`standard library`." +msgstr "Eine Abkürzung für :term:`Standardbibliothek `." + +#: ../../glossary.rst:1517 +msgid "steal" +msgstr "stehlen" + +#: ../../glossary.rst:1519 +msgid "" +"In Python's C API, \"*stealing*\" an argument means that ownership of the " +"argument is transferred to the called function. The caller must not use that " +"reference after the call. Generally, functions that \"steal\" an argument do " +"so even if they fail." +msgstr "" +"In der C-API von Python bedeutet das *Stehlen* eines Arguments, dass das " +"Eigentumsrecht an dem Argument auf die aufgerufene Funktion übertragen wird. " +"Der Aufrufer darf diese Referenz nach dem Aufruf nicht mehr verwenden. Im " +"Allgemeinen tun Funktionen, die ein Argument stehlen, dies auch dann, wenn " +"sie fehlschlagen." + +#: ../../glossary.rst:1524 +msgid "See :ref:`api-refcountdetails` for a full explanation." +msgstr "" +"Eine ausführliche Erläuterung findest du unter :ref:`api-refcountdetails`." + +#: ../../glossary.rst:1525 +msgid "strong reference" +msgstr "starke Referenz" + +#: ../../glossary.rst:1527 +msgid "" +"In Python's C API, a strong reference is a reference to an object which is " +"owned by the code holding the reference. The strong reference is taken by " +"calling :c:func:`Py_INCREF` when the reference is created and released with :" +"c:func:`Py_DECREF` when the reference is deleted." +msgstr "" +"In der C-API von Python ist eine starke Referenz eine Referenz auf ein " +"Objekt, das dem Code gehört, der die Referenz enthält. Die starke Referenz " +"wird durch den Aufruf von :c:func:`Py_INCREF` beim Erstellen der Referenz " +"hergestellt und durch den Aufruf von :c:func:`Py_DECREF` beim Löschen der " +"Referenz freigegeben." + +#: ../../glossary.rst:1533 +msgid "" +"The :c:func:`Py_NewRef` function can be used to create a strong reference to " +"an object. Usually, the :c:func:`Py_DECREF` function must be called on the " +"strong reference before exiting the scope of the strong reference, to avoid " +"leaking one reference." +msgstr "" +"Mit der Funktion :c:func:`Py_NewRef` lässt sich eine starke Referenz auf " +"ein Objekt erstellen. In der Regel muss die Funktion :c:func:`Py_DECREF` " +"für die starke Referenz aufgerufen werden, bevor der Geltungsbereich der " +"starken Referenz verlassen wird, um ein Referenzleck zu vermeiden." + +#: ../../glossary.rst:1538 +msgid "See also :term:`borrowed reference`." +msgstr "Siehe auch: :term:`entlehnte Referenz `." + +#: ../../glossary.rst:1539 +msgid "subscript" +msgstr "Index" + +#: ../../glossary.rst:1541 +msgid "" +"The expression in square brackets of a :ref:`subscription expression " +"`, for example, the ``3`` in ``items[3]``. Usually used to " +"select an element of a container. Also called a :term:`key` when " +"subscripting a :term:`mapping`, or an :term:`index` when subscripting a :" +"term:`sequence`." +msgstr "" +"Der Ausdruck in eckigen Klammern eines :ref:`Abonnementausdrucks " +"`, zum Beispiel der ``3`` in ``items[3]``. Wird in der Regel " +"verwendet, um ein Element eines Containers auszuwählen. Wird auch als :term:" +"`Schlüssel ` bezeichnet, wenn ein :term:`Mapping ` indiziert " +"wird, oder als :term:`Index `, wenn eine :term:`Sequenz ` " +"indiziert wird." + +#: ../../glossary.rst:1547 +msgid "synchronization primitive" +msgstr "Synchronisationsprimitive" + +#: ../../glossary.rst:1549 +msgid "" +"A basic building block for coordinating (synchronizing) the execution of " +"multiple threads to ensure :term:`thread-safe` access to shared resources. " +"Python's :mod:`threading` module provides several synchronization primitives " +"including :class:`~threading.Lock`, :class:`~threading.RLock`, :class:" +"`~threading.Semaphore`, :class:`~threading.Condition`, :class:`~threading." +"Event`, and :class:`~threading.Barrier`. Additionally, the :mod:`queue` " +"module provides multi-producer, multi-consumer queues that are especially " +"useful in multithreaded programs. These primitives help prevent :term:`race " +"conditions ` and coordinate thread execution. See also :" +"term:`lock`." +msgstr "" +"Ein grundlegender Baustein zur Koordination (Synchronisation) der Ausführung " +"mehrerer Threads, um einen :term:`thread-safe` Zugriff auf gemeinsam " +"genutzte Ressourcen zu gewährleisten. Das Python-Modul :mod:`threading` " +"stellt mehrere Synchronisationsprimitive bereit, darunter :class:" +"`~threading.Lock` , :class:`~threading.RLock` , :class:`~threading." +"Semaphore` , :class:`~threading.Condition` , :class:`~threading.Event` " +"und :class:`~threading.Barrier` . Darüber hinaus bietet das Modul :mod:" +"`queue` Multi-Producer- und Multi-Consumer-Warteschlangen, die besonders in " +"Multithread-Programmen nützlich sind. Diese Primitive tragen dazu bei, :term:" +"`Race-Conditions ` zu verhindern und die Thread-Ausführung " +"zu koordinieren. Siehe auch :term:`lock`." + +#: ../../glossary.rst:1559 +msgid "t-string" +msgstr "T-String" + +#: ../../glossary.rst:1560 +msgid "t-strings" +msgstr "T-Strings" + +#: ../../glossary.rst:1562 +msgid "" +"String literals prefixed with ``t`` or ``T`` are commonly called \"t-" +"strings\" which is short for :ref:`template string literals `." +msgstr "" +"Zeichenfolgenliterale, denen ``t`` oder ``T`` vorangestellt ist, werden " +"gemeinhin als t-Strings bezeichnet, was die Abkürzung für :ref:`Template-" +"Zeichenfolgenliterale ` ist." + +#: ../../glossary.rst:1565 +msgid "text encoding" +msgstr "Textkodierung" + +#: ../../glossary.rst:1567 +msgid "" +"A string in Python is a sequence of Unicode code points (in range " +"``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " +"serialized as a sequence of bytes." +msgstr "" +"Eine Zeichenkette in Python ist eine Folge von Unicode-Codepunkten (im " +"Bereich ``U+0000``--``U+10FFFF``). Um eine Zeichenkette zu speichern oder zu " +"übertragen, muss sie als Bytefolge serialisiert werden." + +#: ../../glossary.rst:1571 +msgid "" +"Serializing a string into a sequence of bytes is known as \"encoding\", and " +"recreating the string from the sequence of bytes is known as \"decoding\"." +msgstr "" +"Die Umwandlung einer Zeichenkette in eine Bytefolge wird als \"Kodierung\" " +"bezeichnet, und die Rekonstruktion der Zeichenkette aus der Bytefolge wird " +"als \"Dekodierung\" bezeichnet." + +#: ../../glossary.rst:1574 +msgid "" +"There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." +msgstr "" +"Es gibt eine Vielzahl verschiedener Text-Serialisierungsverfahren :ref:" +"`Codecs `, die zusammenfassend als \"Textkodierungen\" " +"bezeichnet werden." + +#: ../../glossary.rst:1577 +msgid "text file" +msgstr "Textdatei" + +#: ../../glossary.rst:1579 +msgid "" +"A :term:`file object` able to read and write :class:`str` objects. Often, a " +"text file actually accesses a byte-oriented datastream and handles the :term:" +"`text encoding` automatically. Examples of text files are files opened in " +"text mode (``'r'`` or ``'w'``), :data:`sys.stdin`, :data:`sys.stdout`, and " +"instances of :class:`io.StringIO`." +msgstr "" +"Ein :term:`Dateiobjekt `, das :class:`str` -Objekte lesen und " +"schreiben kann. Häufig greift eine Textdatei tatsächlich auf einen " +"byteurientierten Datenstrom zu und übernimmt die :term:`Textkodierung ` automatisch. Beispiele für Textdateien sind Dateien, die im " +"Textmodus geöffnet wurden (``'r'`` oder ``'w'``), :data:`sys.stdin`, :data:" +"`sys.stdout` sowie Instanzen von :class:`io.StringIO`." + +#: ../../glossary.rst:1586 +msgid "" +"See also :term:`binary file` for a file object able to read and write :term:" +"`bytes-like objects `." +msgstr "" +"Siehe auch :term:`Binärdatei ` für ein Dateiobjekt, das :term:" +"`byteähnliche Objekte ` lesen und schreiben kann." + +#: ../../glossary.rst:1588 +msgid "thread state" +msgstr "Thread-Status" + +#: ../../glossary.rst:1591 +msgid "" +"The information used by the :term:`CPython` runtime to run in an OS thread. " +"For example, this includes the current exception, if any, and the state of " +"the bytecode interpreter." +msgstr "" +"Die Informationen, die von der :term:`CPython`-Laufzeitumgebung verwendet " +"werden, um in einem Betriebssystem-Thread ausgeführt zu werden. Dazu gehören " +"beispielsweise die aktuelle Ausnahme (falls vorhanden) und der Zustand des " +"Bytecode-Interpreters." + +#: ../../glossary.rst:1595 +msgid "" +"Each thread state is bound to a single OS thread, but threads may have many " +"thread states available. At most, one of them may be :term:`attached " +"` at once." +msgstr "" +"Jeder Thread-Zustand ist an einen einzelnen Betriebssystem-Thread gebunden, " +"aber Threads können über mehrere Thread-Zustände verfügen. Höchstens einer " +"davon darf gleichzeitig :term:`attached ` sein." + +#: ../../glossary.rst:1599 +msgid "" +"An :term:`attached thread state` is required to call most of Python's C API, " +"unless a function explicitly documents otherwise. The bytecode interpreter " +"only runs under an attached thread state." +msgstr "" +"Für den Aufruf der meisten Funktionen der Python-C-API ist ein :term:" +"`angeschlossener Thread-Zustand ` erforderlich, " +"sofern in der Dokumentation einer Funktion nicht ausdrücklich etwas anderes " +"angegeben ist. Der Bytecode-Interpreter läuft nur unter einem " +"angeschlossenen Thread-Zustand." + +#: ../../glossary.rst:1603 +msgid "" +"Each thread state belongs to a single interpreter, but each interpreter may " +"have many thread states, including multiple for the same OS thread. Thread " +"states from multiple interpreters may be bound to the same thread, but only " +"one can be :term:`attached ` in that thread at any " +"given moment." +msgstr "" +"Jeder Thread-Zustand gehört zu einem einzelnen Interpreter, aber jeder " +"Interpreter kann viele Thread-Zustände haben, darunter auch mehrere für " +"denselben Betriebssystem-Thread. Thread-Zustände aus mehreren Interpretern " +"können an denselben Thread gebunden sein, aber zu jedem Zeitpunkt kann nur " +"einer in diesem Thread :term:`angeschlossen ` sein." + +#: ../../glossary.rst:1609 +msgid "" +"See :ref:`Thread State and the Global Interpreter Lock ` for more " +"information." +msgstr "" +"Weitere Informationen findest du unter :ref:`Thread-Zustand und das Global " +"Interpreter Lock `." + +#: ../../glossary.rst:1611 +msgid "thread-safe" +msgstr "thread-safe" + +#: ../../glossary.rst:1613 +msgid "" +"A module, function, or class that behaves correctly when used by multiple " +"threads concurrently. Thread-safe code uses appropriate :term:" +"`synchronization primitives ` like :term:`locks " +"` to protect shared mutable state, or is designed to avoid shared " +"mutable state entirely. In the :term:`free-threaded ` " +"build, built-in types like :class:`dict`, :class:`list`, and :class:`set` " +"use internal locking to make many operations thread-safe, although thread " +"safety is not necessarily guaranteed. Code that is not thread-safe may " +"experience :term:`race conditions ` and :term:`data races " +"` when used in multi-threaded programs." +msgstr "" +"Ein Modul, eine Funktion oder eine Klasse, die sich bei gleichzeitiger " +"Nutzung durch mehrere Threads korrekt verhält. Thread-sicherer Code " +"verwendet geeignete :term:`Synchronisationsprimitive ` wie :term:`Locks `, um gemeinsam genutzte, veränderbare " +"Zustände zu schützen, oder ist so konzipiert, dass gemeinsam genutzte, " +"veränderbare Zustände gänzlich vermieden werden. In der :term:`free-" +"threaded `-Version verwenden integrierte Typen wie :class:" +"`dict`, :class:`list` und :class:`set` interne Sperren, um viele Operationen " +"threadsicher zu machen, obwohl die Threadsicherheit nicht unbedingt " +"garantiert ist. Code, der nicht threadsicher ist, kann bei der Verwendung " +"in Multithread-Programmen zu :term:`Race-Conditions ` und :" +"term:`Datenkonflikten ` führen." + +#: ../../glossary.rst:1624 +msgid "token" +msgstr "Token" + +#: ../../glossary.rst:1627 +msgid "" +"A small unit of source code, generated by the :ref:`lexical analyzer " +"` (also called the *tokenizer*). Names, numbers, strings, " +"operators, newlines and similar are represented by tokens." +msgstr "" +"Eine kleine Einheit des Quellcodes, die vom :ref:`lexikalischen Analysator " +"` (auch *Tokenizer* genannt) generiert wird. Namen, Zahlen, " +"Zeichenketten, Operatoren, Zeilenumbrüche und Ähnliches werden durch Token " +"dargestellt." + +#: ../../glossary.rst:1632 +msgid "" +"The :mod:`tokenize` module exposes Python's lexical analyzer. The :mod:" +"`token` module contains information on the various types of tokens." +msgstr "" +"Das Modul :mod:`tokenize` stellt den lexikalischen Analysator von Python " +"bereit. Das Modul :mod:`token` enthält Informationen zu den verschiedenen " +"Token-Typen." + +#: ../../glossary.rst:1635 +msgid "triple-quoted string" +msgstr "Zeichenkette in dreifachen Anführungszeichen" + +#: ../../glossary.rst:1637 +msgid "" +"A string which is bound by three instances of either a quotation mark (\") " +"or an apostrophe ('). While they don't provide any functionality not " +"available with single-quoted strings, they are useful for a number of " +"reasons. They allow you to include unescaped single and double quotes " +"within a string and they can span multiple lines without the use of the " +"continuation character, making them especially useful when writing " +"docstrings." +msgstr "" +"Eine Zeichenkette, die durch drei aufeinanderfolgende einfache " +"Anführungszeichen (\") oder Apostrophe (') begrenzt wird. Obwohl sie keine " +"Funktionen bieten, die bei Zeichenketten in einfachen Anführungszeichen " +"nicht verfügbar sind, sind sie aus verschiedenen Gründen nützlich. Sie " +"ermöglichen es, nicht maskierte einfache und doppelte Anführungszeichen in " +"eine Zeichenkette einzufügen, und sie können sich über mehrere Zeilen " +"erstrecken, ohne dass das Fortsetzungszeichen verwendet werden muss, was sie " +"besonders nützlich beim Schreiben von Docstrings macht." + +#: ../../glossary.rst:1644 +msgid "type" +msgstr "Typ" + +#: ../../glossary.rst:1646 +msgid "" +"The type of a Python object determines what kind of object it is; every " +"object has a type. An object's type is accessible as its :attr:`~object." +"__class__` attribute or can be retrieved with ``type(obj)``." +msgstr "" +"Der Typ eines Python-Objekts bestimmt, um welche Art von Objekt es sich " +"handelt; jedes Objekt hat einen Typ. Der Typ eines Objekts ist über das " +"Attribut :attr:`~object.__class__` zugänglich oder kann mit ``type(obj)`` " +"abgerufen werden." + +#: ../../glossary.rst:1650 +msgid "type alias" +msgstr "Typalias" + +#: ../../glossary.rst:1652 +msgid "A synonym for a type, created by assigning the type to an identifier." +msgstr "" +"Ein Synonym für einen Typ, das durch die Zuweisung des Typs zu einem " +"Bezeichner erstellt wird." + +#: ../../glossary.rst:1654 +msgid "" +"Type aliases are useful for simplifying :term:`type hints `. For " +"example::" +msgstr "" +"Typ-Aliase sind nützlich, um :term:`Typ-Hinweise ` zu " +"vereinfachen. Zum Beispiel::" + +#: ../../glossary.rst:1657 +msgid "" +"def remove_gray_shades(\n" +" colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" +" pass" +msgstr "" +"def remove_gray_shades(\n" +" colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" +" pass" + +#: ../../glossary.rst:1661 +msgid "could be made more readable like this::" +msgstr "könnte so lesbarer gestaltet werden::" + +#: ../../glossary.rst:1663 +msgid "" +"Color = tuple[int, int, int]\n" +"\n" +"def remove_gray_shades(colors: list[Color]) -> list[Color]:\n" +" pass" +msgstr "" +"Farbe = Tupel[int, int, int]\n" +"\n" +"def remove_gray_shades(colors: Liste[Farbe]) -> Liste[Farbe]:\n" +" pass" + +#: ../../glossary.rst:1668 ../../glossary.rst:1682 +msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." +msgstr "" +"Siehe :mod:`typing` und :pep:`484`, wo diese Funktion beschrieben wird." + +#: ../../glossary.rst:1669 +msgid "type hint" +msgstr "Typhinweis" + +#: ../../glossary.rst:1671 +msgid "" +"An :term:`annotation` that specifies the expected type for a variable, a " +"class attribute, or a function parameter or return value." +msgstr "" +"Eine :term:`Annotation `, die den erwarteten Typ für eine " +"Variable, ein Klassenattribut oder einen Funktionsparameter bzw. " +"Rückgabewert angibt." + +#: ../../glossary.rst:1674 +msgid "" +"Type hints are optional and are not enforced by Python but they are useful " +"to :term:`static type checkers `. They can also aid " +"IDEs with code completion and refactoring." +msgstr "" +"Typangaben sind optional und werden von Python nicht erzwungen, sind jedoch " +"für :term:`statische Typprüfer ` nützlich. Außerdem " +"können sie IDEs bei der Code-Vervollständigung und beim Refactoring " +"unterstützen." + +#: ../../glossary.rst:1678 +msgid "" +"Type hints of global variables, class attributes, and functions, but not " +"local variables, can be accessed using :func:`typing.get_type_hints`." +msgstr "" +"Typhinweise für globale Variablen, Klassenattribute und Funktionen, nicht " +"jedoch für lokale Variablen, können über :func:`typing.get_type_hints` " +"abgerufen werden." + +#: ../../glossary.rst:1683 +msgid "universal newlines" +msgstr "universelle Zeilenumbrüche" + +#: ../../glossary.rst:1685 +msgid "" +"A manner of interpreting text streams in which all of the following are " +"recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " +"Windows convention ``'\\r\\n'``, and the old Macintosh convention " +"``'\\r'``. See :pep:`278` and :pep:`3116`, as well as :func:`bytes." +"splitlines` for an additional use." +msgstr "" +"Eine Methode zur Interpretation von Textströmen, bei der alle folgenden " +"Zeichenfolgen als Zeilenende erkannt werden: die Unix-Zeilenende-Konvention " +"``'\\n'``, die Windows-Konvention ``'\\r\\n'`` und die alte Macintosh-" +"Konvention ``'\\r'``. Siehe :pep:`278` und :pep:`3116` sowie :func:`bytes." +"splitlines` für eine weitere Anwendungsmöglichkeit." + +#: ../../glossary.rst:1690 +msgid "variable annotation" +msgstr "Variablenbeschriftung" + +#: ../../glossary.rst:1692 +msgid "An :term:`annotation` of a variable or a class attribute." +msgstr "" +"Eine :term:`Annotation ` einer Variablen oder eines " +"Klassenattributs." + +#: ../../glossary.rst:1694 +msgid "" +"When annotating a variable or a class attribute, assignment is optional::" +msgstr "" +"Bei der Annotation einer Variablen oder eines Klassenattributs ist die " +"Zuweisung optional::" + +#: ../../glossary.rst:1696 +msgid "" +"class C:\n" +" field: 'annotation'" +msgstr "" +"Klasse C:\n" +" Feld: 'annotation'" + +#: ../../glossary.rst:1699 +msgid "" +"Variable annotations are usually used for :term:`type hints `: " +"for example this variable is expected to take :class:`int` values::" +msgstr "" +"Variablenannotationen werden in der Regel für :term:`Typangaben ` " +"verwendet – beispielsweise wird erwartet, dass diese Variable Werte vom Typ :" +"class:`int` annimmt::" + +#: ../../glossary.rst:1703 +msgid "count: int = 0" +msgstr "Zähler: int = 0" + +#: ../../glossary.rst:1705 +msgid "Variable annotation syntax is explained in section :ref:`annassign`." +msgstr "" +"Die Syntax für die Annotation von Variablen wird im Abschnitt :ref:" +"`annassign` erläutert." + +#: ../../glossary.rst:1707 +msgid "" +"See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " +"this functionality. Also see :ref:`annotations-howto` for best practices on " +"working with annotations." +msgstr "" +"Siehe :term:`Funktionsannotation `, :pep:`484` und :pep:" +"`526`, wo diese Funktionalität beschrieben wird. Siehe auch :ref:" +"`annotations-howto` für bewährte Vorgehensweisen beim Umgang mit " +"Annotationen." + +#: ../../glossary.rst:1711 +msgid "virtual environment" +msgstr "virtuelle Umgebung" + +#: ../../glossary.rst:1713 +msgid "" +"A cooperatively isolated runtime environment that allows Python users and " +"applications to install and upgrade Python distribution packages without " +"interfering with the behaviour of other Python applications running on the " +"same system." +msgstr "" +"Eine kooperativ isolierte Laufzeitumgebung, die es Python-Anwendern und -" +"Anwendungen ermöglicht, Python-Distributionspakete zu installieren und zu " +"aktualisieren, ohne das Verhalten anderer Python-Anwendungen zu " +"beeinträchtigen, die auf demselben System ausgeführt werden." + +#: ../../glossary.rst:1718 +msgid "See also :mod:`venv`." +msgstr "Siehe auch :mod:`venv`." + +#: ../../glossary.rst:1719 +msgid "virtual machine" +msgstr "virtuelle Maschine" + +#: ../../glossary.rst:1721 +msgid "" +"A computer defined entirely in software. Python's virtual machine executes " +"the :term:`bytecode` emitted by the bytecode compiler." +msgstr "" +"Ein vollständig in Software definierter Computer. Die virtuelle Maschine von " +"Python führt den vom Bytecode-Compiler erzeugten :term:`Bytecode ` " +"aus." + +#: ../../glossary.rst:1723 +msgid "walrus operator" +msgstr "Walross-Betreiber" + +#: ../../glossary.rst:1725 +msgid "" +"A light-hearted way to refer to the :ref:`assignment expression ` operator ``:=`` because it looks a bit like a walrus if you " +"turn your head." +msgstr "" +"Eine scherzhafte Bezeichnung für den :ref:`Zuweisungsausdruck ` Operator ``:=``, da er ein bisschen wie ein Walross aussieht, " +"wenn man den Kopf etwas dreht." + +#: ../../glossary.rst:1728 +msgid "Zen of Python" +msgstr "Zen von Python" + +#: ../../glossary.rst:1730 +msgid "" +"Listing of Python design principles and philosophies that are helpful in " +"understanding and using the language. The listing can be found by typing " +"\"``import this``\" at the interactive prompt." +msgstr "" +"Eine Auflistung der Python-Entwurfsprinzipien und -Philosophien, die zum " +"Verständnis und zur Anwendung der Sprache hilfreich sind. Die Auflistung " +"kann durch Eingabe von \"``import this`` \" an der interaktiven " +"Eingabeaufforderung aufgerufen werden." + +#: ../../glossary.rst:24 +msgid "..." +msgstr "..." + +#: ../../glossary.rst:24 +msgid "ellipsis literal" +msgstr "Ellipsis-Literal" + +#: ../../glossary.rst:349 +msgid "C-contiguous" +msgstr "C-zusammenhängend" + +#: ../../glossary.rst:349 +msgid "Fortran contiguous" +msgstr "Fortran–zusammenhängend" + +#: ../../glossary.rst:1002 +msgid "magic" +msgstr "Magie" + +#: ../../glossary.rst:1488 +msgid "special" +msgstr "besonders" diff --git a/howto/annotations.po b/howto/annotations.po index 93d31d07..977f0888 100644 --- a/howto/annotations.po +++ b/howto/annotations.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -21,7 +21,7 @@ msgstr "" msgid "Annotations Best Practices" msgstr "" -#: ../../howto/annotations.rst:-1 +#: ../../howto/annotations.rst:7 msgid "Abstract" msgstr "" diff --git a/howto/annotations.po~ b/howto/annotations.po~ new file mode 100644 index 00000000..93d31d07 --- /dev/null +++ b/howto/annotations.po~ @@ -0,0 +1,380 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../howto/annotations.rst:5 +msgid "Annotations Best Practices" +msgstr "" + +#: ../../howto/annotations.rst:-1 +msgid "Abstract" +msgstr "" + +#: ../../howto/annotations.rst:9 +msgid "" +"This document is designed to encapsulate the best practices for working with " +"annotations dicts. If you write Python code that examines " +"``__annotations__`` on Python objects, we encourage you to follow the " +"guidelines described below." +msgstr "" + +#: ../../howto/annotations.rst:14 +msgid "" +"The document is organized into four sections: best practices for accessing " +"the annotations of an object in Python versions 3.10 and newer, best " +"practices for accessing the annotations of an object in Python versions 3.9 " +"and older, other best practices for ``__annotations__`` that apply to any " +"Python version, and quirks of ``__annotations__``." +msgstr "" + +#: ../../howto/annotations.rst:24 +msgid "" +"Note that this document is specifically about working with " +"``__annotations__``, not uses *for* annotations. If you're looking for " +"information on how to use \"type hints\" in your code, please see the :mod:" +"`typing` module." +msgstr "" + +#: ../../howto/annotations.rst:31 +msgid "Accessing The Annotations Dict Of An Object In Python 3.10 And Newer" +msgstr "" + +#: ../../howto/annotations.rst:33 +msgid "" +"Python 3.10 adds a new function to the standard library: :func:`inspect." +"get_annotations`. In Python versions 3.10 through 3.13, calling this " +"function is the best practice for accessing the annotations dict of any " +"object that supports annotations. This function can also \"un-stringize\" " +"stringized annotations for you." +msgstr "" + +#: ../../howto/annotations.rst:40 +msgid "" +"In Python 3.14, there is a new :mod:`annotationlib` module with " +"functionality for working with annotations. This includes a :func:" +"`annotationlib.get_annotations` function, which supersedes :func:`inspect." +"get_annotations`." +msgstr "" + +#: ../../howto/annotations.rst:45 +msgid "" +"If for some reason :func:`inspect.get_annotations` isn't viable for your use " +"case, you may access the ``__annotations__`` data member manually. Best " +"practice for this changed in Python 3.10 as well: as of Python 3.10, ``o." +"__annotations__`` is guaranteed to *always* work on Python functions, " +"classes, and modules. If you're certain the object you're examining is one " +"of these three *specific* objects, you may simply use ``o.__annotations__`` " +"to get at the object's annotations dict." +msgstr "" + +#: ../../howto/annotations.rst:55 +msgid "" +"However, other types of callables--for example, callables created by :func:" +"`functools.partial`--may not have an ``__annotations__`` attribute defined. " +"When accessing the ``__annotations__`` of a possibly unknown object, best " +"practice in Python versions 3.10 and newer is to call :func:`getattr` with " +"three arguments, for example ``getattr(o, '__annotations__', None)``." +msgstr "" + +#: ../../howto/annotations.rst:63 +msgid "" +"Before Python 3.10, accessing ``__annotations__`` on a class that defines no " +"annotations but that has a parent class with annotations would return the " +"parent's ``__annotations__``. In Python 3.10 and newer, the child class's " +"annotations will be an empty dict instead." +msgstr "" + +#: ../../howto/annotations.rst:71 +msgid "Accessing The Annotations Dict Of An Object In Python 3.9 And Older" +msgstr "" + +#: ../../howto/annotations.rst:73 +msgid "" +"In Python 3.9 and older, accessing the annotations dict of an object is much " +"more complicated than in newer versions. The problem is a design flaw in " +"these older versions of Python, specifically to do with class annotations." +msgstr "" + +#: ../../howto/annotations.rst:78 +msgid "" +"Best practice for accessing the annotations dict of other objects--" +"functions, other callables, and modules--is the same as best practice for " +"3.10, assuming you aren't calling :func:`inspect.get_annotations`: you " +"should use three-argument :func:`getattr` to access the object's " +"``__annotations__`` attribute." +msgstr "" + +#: ../../howto/annotations.rst:85 +msgid "" +"Unfortunately, this isn't best practice for classes. The problem is that, " +"since ``__annotations__`` is optional on classes, and because classes can " +"inherit attributes from their base classes, accessing the " +"``__annotations__`` attribute of a class may inadvertently return the " +"annotations dict of a *base class.* As an example::" +msgstr "" + +#: ../../howto/annotations.rst:92 +msgid "" +"class Base:\n" +" a: int = 3\n" +" b: str = 'abc'\n" +"\n" +"class Derived(Base):\n" +" pass\n" +"\n" +"print(Derived.__annotations__)" +msgstr "" + +#: ../../howto/annotations.rst:101 +msgid "This will print the annotations dict from ``Base``, not ``Derived``." +msgstr "" + +#: ../../howto/annotations.rst:104 +msgid "" +"Your code will have to have a separate code path if the object you're " +"examining is a class (``isinstance(o, type)``). In that case, best practice " +"relies on an implementation detail of Python 3.9 and before: if a class has " +"annotations defined, they are stored in the class's :attr:`~type.__dict__` " +"dictionary. Since the class may or may not have annotations defined, best " +"practice is to call the :meth:`~dict.get` method on the class dict." +msgstr "" + +#: ../../howto/annotations.rst:112 +msgid "" +"To put it all together, here is some sample code that safely accesses the " +"``__annotations__`` attribute on an arbitrary object in Python 3.9 and " +"before::" +msgstr "" + +#: ../../howto/annotations.rst:116 +msgid "" +"if isinstance(o, type):\n" +" ann = o.__dict__.get('__annotations__', None)\n" +"else:\n" +" ann = getattr(o, '__annotations__', None)" +msgstr "" + +#: ../../howto/annotations.rst:121 +msgid "" +"After running this code, ``ann`` should be either a dictionary or ``None``. " +"You're encouraged to double-check the type of ``ann`` using :func:" +"`isinstance` before further examination." +msgstr "" + +#: ../../howto/annotations.rst:126 +msgid "" +"Note that some exotic or malformed type objects may not have a :attr:`~type." +"__dict__` attribute, so for extra safety you may also wish to use :func:" +"`getattr` to access :attr:`!__dict__`." +msgstr "" + +#: ../../howto/annotations.rst:132 +msgid "Manually Un-Stringizing Stringized Annotations" +msgstr "" + +#: ../../howto/annotations.rst:134 +msgid "" +"In situations where some annotations may be \"stringized\", and you wish to " +"evaluate those strings to produce the Python values they represent, it " +"really is best to call :func:`inspect.get_annotations` to do this work for " +"you." +msgstr "" + +#: ../../howto/annotations.rst:140 +msgid "" +"If you're using Python 3.9 or older, or if for some reason you can't use :" +"func:`inspect.get_annotations`, you'll need to duplicate its logic. You're " +"encouraged to examine the implementation of :func:`inspect.get_annotations` " +"in the current Python version and follow a similar approach." +msgstr "" + +#: ../../howto/annotations.rst:146 +msgid "" +"In a nutshell, if you wish to evaluate a stringized annotation on an " +"arbitrary object ``o``:" +msgstr "" + +#: ../../howto/annotations.rst:149 +msgid "" +"If ``o`` is a module, use ``o.__dict__`` as the ``globals`` when calling :" +"func:`eval`." +msgstr "" + +#: ../../howto/annotations.rst:151 +msgid "" +"If ``o`` is a class, use ``sys.modules[o.__module__].__dict__`` as the " +"``globals``, and ``dict(vars(o))`` as the ``locals``, when calling :func:" +"`eval`." +msgstr "" + +#: ../../howto/annotations.rst:154 +msgid "" +"If ``o`` is a wrapped callable using :func:`functools.update_wrapper`, :deco:" +"`functools.wraps`, or :func:`functools.partial`, iteratively unwrap it by " +"accessing either ``o.__wrapped__`` or ``o.func`` as appropriate, until you " +"have found the root unwrapped function." +msgstr "" + +#: ../../howto/annotations.rst:158 +msgid "" +"If ``o`` is a callable (but not a class), use :attr:`o.__globals__ ` as the globals when calling :func:`eval`." +msgstr "" + +#: ../../howto/annotations.rst:162 +msgid "" +"However, not all string values used as annotations can be successfully " +"turned into Python values by :func:`eval`. String values could theoretically " +"contain any valid string, and in practice there are valid use cases for type " +"hints that require annotating with string values that specifically *can't* " +"be evaluated. For example:" +msgstr "" + +#: ../../howto/annotations.rst:169 +msgid "" +":pep:`604` union types using ``|``, before support for this was added to " +"Python 3.10." +msgstr "" + +#: ../../howto/annotations.rst:171 +msgid "" +"Definitions that aren't needed at runtime, only imported when :const:`typing." +"TYPE_CHECKING` is true." +msgstr "" + +#: ../../howto/annotations.rst:174 +msgid "" +"If :func:`eval` attempts to evaluate such values, it will fail and raise an " +"exception. So, when designing a library API that works with annotations, " +"it's recommended to only attempt to evaluate string values when explicitly " +"requested to by the caller." +msgstr "" + +#: ../../howto/annotations.rst:182 +msgid "Best Practices For ``__annotations__`` In Any Python Version" +msgstr "" + +#: ../../howto/annotations.rst:184 +msgid "" +"You should avoid assigning to the ``__annotations__`` member of objects " +"directly. Let Python manage setting ``__annotations__``." +msgstr "" + +#: ../../howto/annotations.rst:187 +msgid "" +"If you do assign directly to the ``__annotations__`` member of an object, " +"you should always set it to a ``dict`` object." +msgstr "" + +#: ../../howto/annotations.rst:190 +msgid "" +"You should avoid accessing ``__annotations__`` directly on any object. " +"Instead, use :func:`annotationlib.get_annotations` (Python 3.14+) or :func:" +"`inspect.get_annotations` (Python 3.10+)." +msgstr "" + +#: ../../howto/annotations.rst:194 +msgid "" +"If you do directly access the ``__annotations__`` member of an object, you " +"should ensure that it's a dictionary before attempting to examine its " +"contents." +msgstr "" + +#: ../../howto/annotations.rst:198 +msgid "You should avoid modifying ``__annotations__`` dicts." +msgstr "" + +#: ../../howto/annotations.rst:200 +msgid "" +"You should avoid deleting the ``__annotations__`` attribute of an object." +msgstr "" + +#: ../../howto/annotations.rst:205 +msgid "``__annotations__`` Quirks" +msgstr "" + +#: ../../howto/annotations.rst:207 +msgid "" +"In all versions of Python 3, function objects lazy-create an annotations " +"dict if no annotations are defined on that object. You can delete the " +"``__annotations__`` attribute using ``del fn.__annotations__``, but if you " +"then access ``fn.__annotations__`` the object will create a new empty dict " +"that it will store and return as its annotations. Deleting the annotations " +"on a function before it has lazily created its annotations dict will throw " +"an ``AttributeError``; using ``del fn.__annotations__`` twice in a row is " +"guaranteed to always throw an ``AttributeError``." +msgstr "" + +#: ../../howto/annotations.rst:217 +msgid "" +"Everything in the above paragraph also applies to class and module objects " +"in Python 3.10 and newer." +msgstr "" + +#: ../../howto/annotations.rst:220 +msgid "" +"In all versions of Python 3, you can set ``__annotations__`` on a function " +"object to ``None``. However, subsequently accessing the annotations on that " +"object using ``fn.__annotations__`` will lazy-create an empty dictionary as " +"per the first paragraph of this section. This is *not* true of modules and " +"classes, in any Python version; those objects permit setting " +"``__annotations__`` to any Python value, and will retain whatever value is " +"set." +msgstr "" + +#: ../../howto/annotations.rst:228 +msgid "" +"If Python stringizes your annotations for you (using ``from __future__ " +"import annotations``), and you specify a string as an annotation, the string " +"will itself be quoted. In effect the annotation is quoted *twice.* For " +"example::" +msgstr "" + +#: ../../howto/annotations.rst:234 +msgid "" +"from __future__ import annotations\n" +"def foo(a: \"str\"): pass\n" +"\n" +"print(foo.__annotations__)" +msgstr "" + +#: ../../howto/annotations.rst:239 +msgid "" +"This prints ``{'a': \"'str'\"}``. This shouldn't really be considered a " +"\"quirk\"; it's mentioned here simply because it might be surprising." +msgstr "" + +#: ../../howto/annotations.rst:242 +msgid "" +"If you use a class with a custom metaclass and access ``__annotations__`` on " +"the class, you may observe unexpected behavior; see :pep:`749 <749#pep749-" +"metaclasses>` for some examples. You can avoid these quirks by using :func:" +"`annotationlib.get_annotations` on Python 3.14+ or :func:`inspect." +"get_annotations` on Python 3.10+. On earlier versions of Python, you can " +"avoid these bugs by accessing the annotations from the class's :attr:`~type." +"__dict__` (for example, ``cls.__dict__.get('__annotations__', None)``)." +msgstr "" + +#: ../../howto/annotations.rst:251 +msgid "" +"In some versions of Python, instances of classes may have an " +"``__annotations__`` attribute. However, this is not supported functionality. " +"If you need the annotations of an instance, you can use :func:`type` to " +"access its class (for example, ``annotationlib." +"get_annotations(type(myinstance))`` on Python 3.14+)." +msgstr "" diff --git a/howto/curses.po b/howto/curses.po index 54c8f1fe..d4dd8fb0 100644 --- a/howto/curses.po +++ b/howto/curses.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -25,7 +25,7 @@ msgstr "" msgid "Curses Programming with Python" msgstr "" -#: ../../howto/curses.rst:-1 +#: ../../howto/curses.rst:10 msgid "Abstract" msgstr "" @@ -405,7 +405,7 @@ msgstr "" msgid "Form" msgstr "" -#: ../../howto/curses.rst:277 ../../howto/curses.rst:345 +#: ../../howto/curses.rst:277 ../../howto/curses.rst:348 msgid "Description" msgstr "Beschreibung" @@ -456,26 +456,27 @@ msgstr "" msgid "" "The :meth:`~curses.window.addstr` method takes a Python string or bytestring " "as the value to be displayed. The contents of bytestrings are sent to the " -"terminal as-is. Strings are encoded to bytes using the value of the " -"window's :attr:`~window.encoding` attribute; this defaults to the default " -"system encoding as returned by :func:`locale.getencoding`." +"terminal as-is. On a build without wide-character support strings are " +"encoded using the value of the window's :attr:`~window.encoding` attribute; " +"this defaults to the default system encoding as returned by :func:`locale." +"getencoding`." msgstr "" -#: ../../howto/curses.rst:304 +#: ../../howto/curses.rst:306 msgid "" "The :meth:`~curses.window.addch` methods take a character, which can be " "either a string of length 1, a bytestring of length 1, or an integer." msgstr "" -#: ../../howto/curses.rst:307 +#: ../../howto/curses.rst:309 msgid "" -"Constants are provided for extension characters; these constants are " -"integers greater than 255. For example, :const:`ACS_PLMINUS` is a +/- " -"symbol, and :const:`ACS_ULCORNER` is the upper left corner of a box (handy " -"for drawing borders). You can also use the appropriate Unicode character." +"Constants are provided for the characters of the terminal's alternate " +"character set. For example, :const:`ACS_PLMINUS` is a +/- symbol, and :const:" +"`ACS_ULCORNER` is the upper left corner of a box (handy for drawing " +"borders). You can also use the appropriate Unicode character." msgstr "" -#: ../../howto/curses.rst:313 +#: ../../howto/curses.rst:316 msgid "" "Windows remember where the cursor was left after the last operation, so if " "you leave out the *y,x* coordinates, the string or character will be " @@ -486,21 +487,20 @@ msgid "" "cursor blinking at some apparently random location." msgstr "" -#: ../../howto/curses.rst:321 +#: ../../howto/curses.rst:324 msgid "" "If your application doesn't need a blinking cursor at all, you can call " -"``curs_set(False)`` to make it invisible. For compatibility with older " -"curses versions, there's a ``leaveok(bool)`` function that's a synonym for :" -"func:`~curses.curs_set`. When *bool* is true, the curses library will " -"attempt to suppress the flashing cursor, and you won't need to worry about " -"leaving it in odd locations." +"``curs_set(False)`` to make it invisible. The window method :meth:`~curses." +"window.leaveok` does something different: when its argument is true, curses " +"leaves the cursor wherever the last update put it, instead of moving it back " +"to the window's cursor position." msgstr "" -#: ../../howto/curses.rst:330 +#: ../../howto/curses.rst:333 msgid "Attributes and Color" msgstr "" -#: ../../howto/curses.rst:332 +#: ../../howto/curses.rst:335 msgid "" "Characters can be displayed in different ways. Status lines in a text-based " "application are commonly shown in reverse video, or a text viewer may need " @@ -508,7 +508,7 @@ msgid "" "an attribute for each cell on the screen." msgstr "" -#: ../../howto/curses.rst:337 +#: ../../howto/curses.rst:340 msgid "" "An attribute is an integer, each bit representing a different attribute. " "You can try to display text with multiple attribute bits set, but curses " @@ -518,79 +518,79 @@ msgid "" "attributes, listed here." msgstr "" -#: ../../howto/curses.rst:345 +#: ../../howto/curses.rst:348 msgid "Attribute" msgstr "" -#: ../../howto/curses.rst:347 +#: ../../howto/curses.rst:350 msgid ":const:`A_BLINK`" msgstr "" -#: ../../howto/curses.rst:347 +#: ../../howto/curses.rst:350 msgid "Blinking text" msgstr "" -#: ../../howto/curses.rst:349 +#: ../../howto/curses.rst:352 msgid ":const:`A_BOLD`" msgstr "" -#: ../../howto/curses.rst:349 +#: ../../howto/curses.rst:352 msgid "Extra bright or bold text" msgstr "" -#: ../../howto/curses.rst:351 +#: ../../howto/curses.rst:354 msgid ":const:`A_DIM`" msgstr "" -#: ../../howto/curses.rst:351 +#: ../../howto/curses.rst:354 msgid "Half bright text" msgstr "" -#: ../../howto/curses.rst:353 +#: ../../howto/curses.rst:356 msgid ":const:`A_REVERSE`" msgstr "" -#: ../../howto/curses.rst:353 +#: ../../howto/curses.rst:356 msgid "Reverse-video text" msgstr "" -#: ../../howto/curses.rst:355 +#: ../../howto/curses.rst:358 msgid ":const:`A_STANDOUT`" msgstr "" -#: ../../howto/curses.rst:355 +#: ../../howto/curses.rst:358 msgid "The best highlighting mode available" msgstr "" -#: ../../howto/curses.rst:357 +#: ../../howto/curses.rst:360 msgid ":const:`A_UNDERLINE`" msgstr "" -#: ../../howto/curses.rst:357 +#: ../../howto/curses.rst:360 msgid "Underlined text" msgstr "" -#: ../../howto/curses.rst:360 +#: ../../howto/curses.rst:363 msgid "" "So, to display a reverse-video status line on the top line of the screen, " "you could code::" msgstr "" -#: ../../howto/curses.rst:363 +#: ../../howto/curses.rst:366 msgid "" "stdscr.addstr(0, 0, \"Current mode: Typing mode\",\n" " curses.A_REVERSE)\n" "stdscr.refresh()" msgstr "" -#: ../../howto/curses.rst:367 +#: ../../howto/curses.rst:370 msgid "" "The curses library also supports color on those terminals that provide it. " "The most common such terminal is probably the Linux console, followed by " "color xterms." msgstr "" -#: ../../howto/curses.rst:371 +#: ../../howto/curses.rst:374 msgid "" "To use color, you must call the :func:`~curses.start_color` function soon " "after calling :func:`~curses.initscr`, to initialize the default color set " @@ -602,7 +602,7 @@ msgid "" "for the sake of these functions.)" msgstr "" -#: ../../howto/curses.rst:381 +#: ../../howto/curses.rst:384 msgid "" "The curses library maintains a finite number of color pairs, containing a " "foreground (or text) color and a background color. You can get the " @@ -612,17 +612,17 @@ msgid "" "work on all terminals." msgstr "" -#: ../../howto/curses.rst:388 +#: ../../howto/curses.rst:391 msgid "An example, which displays a line of text using color pair 1::" msgstr "" -#: ../../howto/curses.rst:390 +#: ../../howto/curses.rst:393 msgid "" "stdscr.addstr(\"Pretty text\", curses.color_pair(1))\n" "stdscr.refresh()" msgstr "" -#: ../../howto/curses.rst:393 +#: ../../howto/curses.rst:396 msgid "" "As I said before, a color pair consists of a foreground and background " "color. The ``init_pair(n, f, b)`` function changes the definition of color " @@ -630,7 +630,7 @@ msgid "" "hard-wired to white on black, and cannot be changed." msgstr "" -#: ../../howto/curses.rst:398 +#: ../../howto/curses.rst:401 msgid "" "Colors are numbered, and :func:`start_color` initializes 8 basic colors when " "it activates color mode. They are: 0:black, 1:red, 2:green, 3:yellow, 4:" @@ -639,28 +639,28 @@ msgid "" "const:`curses.COLOR_RED`, and so forth." msgstr "" -#: ../../howto/curses.rst:404 +#: ../../howto/curses.rst:407 msgid "" "Let's put all this together. To change color 1 to red text on a white " "background, you would call::" msgstr "" -#: ../../howto/curses.rst:407 +#: ../../howto/curses.rst:410 msgid "curses.init_pair(1, curses.COLOR_RED, curses.COLOR_WHITE)" msgstr "" -#: ../../howto/curses.rst:409 +#: ../../howto/curses.rst:412 msgid "" "When you change a color pair, any text already displayed using that color " "pair will change to the new colors. You can also display new text in this " "color with::" msgstr "" -#: ../../howto/curses.rst:413 +#: ../../howto/curses.rst:416 msgid "stdscr.addstr(0,0, \"RED ALERT!\", curses.color_pair(1))" msgstr "" -#: ../../howto/curses.rst:415 +#: ../../howto/curses.rst:418 msgid "" "Very fancy terminals can change the definitions of the actual colors to a " "given RGB value. This lets you change color 1, which is usually red, to " @@ -672,72 +672,78 @@ msgid "" "your system's man pages for more information." msgstr "" -#: ../../howto/curses.rst:426 +#: ../../howto/curses.rst:429 msgid "User Input" msgstr "" -#: ../../howto/curses.rst:428 +#: ../../howto/curses.rst:431 msgid "" "The C curses library offers only very simple input mechanisms. Python's :mod:" "`curses` module adds a basic text-input widget. (Other libraries such as :" "pypi:`Urwid` have more extensive collections of widgets.)" msgstr "" -#: ../../howto/curses.rst:432 -msgid "There are two methods for getting input from a window:" +#: ../../howto/curses.rst:435 +msgid "There are three methods for getting input from a window:" msgstr "" -#: ../../howto/curses.rst:434 +#: ../../howto/curses.rst:437 msgid "" -":meth:`~curses.window.getch` refreshes the screen and then waits for the " +":meth:`~curses.window.get_wch` refreshes the screen and then waits for the " "user to hit a key, displaying the key if :func:`~curses.echo` has been " "called earlier. You can optionally specify a coordinate to which the cursor " "should be moved before pausing." msgstr "" -#: ../../howto/curses.rst:439 +#: ../../howto/curses.rst:442 msgid "" -":meth:`~curses.window.getkey` does the same thing but converts the integer " -"to a string. Individual characters are returned as 1-character strings, and " -"special keys such as function keys return longer strings containing a key " -"name such as ``KEY_UP`` or ``^G``." +":meth:`~curses.window.getch` does the same thing but returns the code of the " +"key instead of a character. With ncurses this is a single byte of the key's " +"encoding in the current locale, so a character encoded with several bytes " +"takes several calls, one byte per call." msgstr "" -#: ../../howto/curses.rst:444 +#: ../../howto/curses.rst:448 +msgid "" +":meth:`~curses.window.getkey` does the same as :meth:`!getch` but returns a " +"string: an ordinary key as a 1-character string, and a special key as its " +"name, such as ``KEY_UP``." +msgstr "" + +#: ../../howto/curses.rst:453 msgid "" "It's possible to not wait for the user using the :meth:`~curses.window." -"nodelay` window method. After ``nodelay(True)``, :meth:`!getch` and :meth:`!" -"getkey` for the window become non-blocking. To signal that no input is " -"ready, :meth:`!getch` returns ``curses.ERR`` (a value of -1) and :meth:`!" -"getkey` raises an exception. There's also a :func:`~curses.halfdelay` " -"function, which can be used to (in effect) set a timer on each :meth:`!" -"getch`; if no input becomes available within a specified delay (measured in " -"tenths of a second), curses raises an exception." +"nodelay` window method. After ``nodelay(True)``, the reads for the window " +"become non-blocking. To signal that no input is ready, :meth:`!get_wch` and :" +"meth:`!getkey` raise an exception, and :meth:`!getch` returns ``-1``. " +"There's also a :func:`~curses.halfdelay` function, which can be used to (in " +"effect) set a timer on each read; if no input becomes available within a " +"specified delay (measured in tenths of a second), the read fails the same " +"way." msgstr "" -#: ../../howto/curses.rst:454 +#: ../../howto/curses.rst:464 msgid "" -"The :meth:`!getch` method returns an integer; if it's between 0 and 255, it " -"represents the ASCII code of the key pressed. Values greater than 255 are " -"special keys such as Page Up, Home, or the cursor keys. You can compare the " -"value returned to constants such as :const:`curses.KEY_PPAGE`, :const:" -"`curses.KEY_HOME`, or :const:`curses.KEY_LEFT`. The main loop of your " -"program may look something like this::" +"Special keys such as Page Up, Home, or the cursor keys are returned by all " +"three as one of the :ref:`KEY_* constants `, all " +"larger than 255. You can compare the value returned to constants such as :" +"const:`curses.KEY_PPAGE`, :const:`curses.KEY_HOME`, or :const:`curses." +"KEY_LEFT`. The main loop of your program may look something like this::" msgstr "" -#: ../../howto/curses.rst:461 +#: ../../howto/curses.rst:472 msgid "" "while True:\n" -" c = stdscr.getch()\n" -" if c == ord('p'):\n" +" c = stdscr.get_wch()\n" +" if c == 'p':\n" " PrintDocument()\n" -" elif c == ord('q'):\n" +" elif c == 'q':\n" " break # Exit the while loop\n" " elif c == curses.KEY_HOME:\n" " x = y = 0" msgstr "" -#: ../../howto/curses.rst:470 +#: ../../howto/curses.rst:481 msgid "" "The :mod:`curses.ascii` module supplies ASCII class membership functions " "that take either integer or 1-character string arguments; these may be " @@ -747,24 +753,24 @@ msgid "" "returns the control character corresponding to its argument." msgstr "" -#: ../../howto/curses.rst:477 +#: ../../howto/curses.rst:488 msgid "" -"There's also a method to retrieve an entire string, :meth:`~curses.window." +"There's also a method to retrieve an entire line, :meth:`~curses.window." "getstr`. It isn't used very often, because its functionality is quite " -"limited; the only editing keys available are the backspace key and the Enter " -"key, which terminates the string. It can optionally be limited to a fixed " -"number of characters. ::" +"limited; the only editing keys available are the erase and kill characters, " +"and the Enter key, which terminates the line. It returns a bytes object, and " +"can optionally be limited to a fixed number of bytes. ::" msgstr "" -#: ../../howto/curses.rst:483 +#: ../../howto/curses.rst:495 msgid "" "curses.echo() # Enable echoing of characters\n" "\n" -"# Get a 15-character string, with the cursor on the top line\n" +"# Get a line of at most 15 bytes, with the cursor on the top line\n" "s = stdscr.getstr(0,0, 15)" msgstr "" -#: ../../howto/curses.rst:488 +#: ../../howto/curses.rst:500 msgid "" "The :mod:`curses.textpad` module supplies a text box that supports an Emacs-" "like set of keybindings. Various methods of the :class:`~curses.textpad." @@ -772,7 +778,7 @@ msgid "" "results either with or without trailing spaces. Here's an example::" msgstr "" -#: ../../howto/curses.rst:494 +#: ../../howto/curses.rst:506 msgid "" "import curses\n" "from curses.textpad import Textbox, rectangle\n" @@ -793,16 +799,16 @@ msgid "" " message = box.gather()" msgstr "" -#: ../../howto/curses.rst:512 +#: ../../howto/curses.rst:524 msgid "" "See the library documentation on :mod:`curses.textpad` for more details." msgstr "" -#: ../../howto/curses.rst:516 +#: ../../howto/curses.rst:528 msgid "For More Information" msgstr "" -#: ../../howto/curses.rst:518 +#: ../../howto/curses.rst:530 msgid "" "This HOWTO doesn't cover some advanced topics, such as reading the contents " "of the screen or capturing mouse events from an xterm instance, but the " @@ -810,7 +816,7 @@ msgid "" "complete. You should browse it next." msgstr "" -#: ../../howto/curses.rst:523 +#: ../../howto/curses.rst:535 msgid "" "If you're in doubt about the detailed behavior of the curses functions, " "consult the manual pages for your curses implementation, whether it's " @@ -819,7 +825,7 @@ msgid "" "ref:`ACS_\\* ` characters available to you." msgstr "" -#: ../../howto/curses.rst:530 +#: ../../howto/curses.rst:542 msgid "" "Because the curses API is so large, some functions aren't supported in the " "Python interface. Often this isn't because they're difficult to implement, " @@ -829,29 +835,29 @@ msgid "" "org/>`_ to learn more about submitting patches to Python." msgstr "" -#: ../../howto/curses.rst:538 +#: ../../howto/curses.rst:550 msgid "" "`Writing Programs with NCURSES `_: a lengthy tutorial for C programmers." msgstr "" -#: ../../howto/curses.rst:540 +#: ../../howto/curses.rst:552 msgid "`The ncurses man page `_" msgstr "" -#: ../../howto/curses.rst:541 +#: ../../howto/curses.rst:553 msgid "" "`The ncurses FAQ `_" msgstr "" -#: ../../howto/curses.rst:542 +#: ../../howto/curses.rst:554 msgid "" "`\"Use curses... don't swear\" `_: video of a PyCon 2013 talk on controlling terminals using " "curses or Urwid." msgstr "" -#: ../../howto/curses.rst:544 +#: ../../howto/curses.rst:556 msgid "" "`\"Console Applications with Urwid\" `_: video of a PyCon CA 2012 talk demonstrating some " diff --git a/howto/curses.po~ b/howto/curses.po~ new file mode 100644 index 00000000..54c8f1fe --- /dev/null +++ b/howto/curses.po~ @@ -0,0 +1,862 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../howto/curses.rst:5 +msgid "Curses Programming with Python" +msgstr "" + +#: ../../howto/curses.rst:-1 +msgid "Abstract" +msgstr "" + +#: ../../howto/curses.rst:12 +msgid "" +"This document describes how to use the :mod:`curses` extension module to " +"control text-mode displays." +msgstr "" + +#: ../../howto/curses.rst:17 +msgid "What is curses?" +msgstr "" + +#: ../../howto/curses.rst:19 +msgid "" +"The curses library supplies a terminal-independent screen-painting and " +"keyboard-handling facility for text-based terminals; such terminals include " +"VT100s, the Linux console, and the simulated terminal provided by various " +"programs. Display terminals support various control codes to perform common " +"operations such as moving the cursor, scrolling the screen, and erasing " +"areas. Different terminals use widely differing codes, and often have their " +"own minor quirks." +msgstr "" + +#: ../../howto/curses.rst:27 +msgid "" +"In a world of graphical displays, one might ask \"why bother\"? It's true " +"that character-cell display terminals are an obsolete technology, but there " +"are niches in which being able to do fancy things with them are still " +"valuable. One niche is on small-footprint or embedded Unixes that don't run " +"an X server. Another is tools such as OS installers and kernel " +"configurators that may have to run before any graphical support is available." +msgstr "" + +#: ../../howto/curses.rst:35 +msgid "" +"The curses library provides fairly basic functionality, providing the " +"programmer with an abstraction of a display containing multiple non-" +"overlapping windows of text. The contents of a window can be changed in " +"various ways---adding text, erasing it, changing its appearance---and the " +"curses library will figure out what control codes need to be sent to the " +"terminal to produce the right output. curses doesn't provide many user-" +"interface concepts such as buttons, checkboxes, or dialogs; if you need such " +"features, consider a user interface library such as :pypi:`Urwid`." +msgstr "" + +#: ../../howto/curses.rst:45 +msgid "" +"The curses library was originally written for BSD Unix; the later System V " +"versions of Unix from AT&T added many enhancements and new functions. BSD " +"curses is no longer maintained, having been replaced by ncurses, which is an " +"open-source implementation of the AT&T interface. If you're using an open-" +"source Unix such as Linux or FreeBSD, your system almost certainly uses " +"ncurses. Since most current commercial Unix versions are based on System V " +"code, all the functions described here will probably be available. The " +"older versions of curses carried by some proprietary Unixes may not support " +"everything, though." +msgstr "" + +#: ../../howto/curses.rst:55 +msgid "" +"The Windows version of Python doesn't include the :mod:`curses` module. The " +"third-party :pypi:`windows-curses` package provides the same interface on " +"Windows." +msgstr "" + +#: ../../howto/curses.rst:60 +msgid "The Python curses module" +msgstr "" + +#: ../../howto/curses.rst:62 +msgid "" +"The Python module is a fairly simple wrapper over the C functions provided " +"by curses; if you're already familiar with curses programming in C, it's " +"really easy to transfer that knowledge to Python. The biggest difference is " +"that the Python interface makes things simpler by merging different C " +"functions such as :c:func:`!addstr`, :c:func:`!mvaddstr`, and :c:func:`!" +"mvwaddstr` into a single :meth:`~curses.window.addstr` method. You'll see " +"this covered in more detail later." +msgstr "" + +#: ../../howto/curses.rst:70 +msgid "" +"This HOWTO is an introduction to writing text-mode programs with curses and " +"Python. It doesn't attempt to be a complete guide to the curses API; for " +"that, see the Python library guide's section on ncurses, and the C manual " +"pages for ncurses. It will, however, give you the basic ideas." +msgstr "" + +#: ../../howto/curses.rst:77 +msgid "Starting and ending a curses application" +msgstr "" + +#: ../../howto/curses.rst:79 +msgid "" +"Before doing anything, curses must be initialized. This is done by calling " +"the :func:`~curses.initscr` function, which will determine the terminal " +"type, send any required setup codes to the terminal, and create various " +"internal data structures. If successful, :func:`!initscr` returns a window " +"object representing the entire screen; this is usually called ``stdscr`` " +"after the name of the corresponding C variable. ::" +msgstr "" + +#: ../../howto/curses.rst:87 +msgid "" +"import curses\n" +"stdscr = curses.initscr()" +msgstr "" + +#: ../../howto/curses.rst:90 +msgid "" +"Usually curses applications turn off automatic echoing of keys to the " +"screen, in order to be able to read keys and only display them under certain " +"circumstances. This requires calling the :func:`~curses.noecho` function. ::" +msgstr "" + +#: ../../howto/curses.rst:95 +msgid "curses.noecho()" +msgstr "" + +#: ../../howto/curses.rst:97 +msgid "" +"Applications will also commonly need to react to keys instantly, without " +"requiring the Enter key to be pressed; this is called cbreak mode, as " +"opposed to the usual buffered input mode. ::" +msgstr "" + +#: ../../howto/curses.rst:101 +msgid "curses.cbreak()" +msgstr "" + +#: ../../howto/curses.rst:103 +msgid "" +"Terminals usually return special keys, such as the cursor keys or navigation " +"keys such as Page Up and Home, as a multibyte escape sequence. While you " +"could write your application to expect such sequences and process them " +"accordingly, curses can do it for you, returning a special value such as :" +"const:`curses.KEY_LEFT`. To get curses to do the job, you'll have to enable " +"keypad mode. ::" +msgstr "" + +#: ../../howto/curses.rst:110 +msgid "stdscr.keypad(True)" +msgstr "" + +#: ../../howto/curses.rst:112 +msgid "" +"Terminating a curses application is much easier than starting one. You'll " +"need to call::" +msgstr "" + +#: ../../howto/curses.rst:115 +msgid "" +"curses.nocbreak()\n" +"stdscr.keypad(False)\n" +"curses.echo()" +msgstr "" + +#: ../../howto/curses.rst:119 +msgid "" +"to reverse the curses-friendly terminal settings. Then call the :func:" +"`~curses.endwin` function to restore the terminal to its original operating " +"mode. ::" +msgstr "" + +#: ../../howto/curses.rst:123 +msgid "curses.endwin()" +msgstr "" + +#: ../../howto/curses.rst:125 +msgid "" +"A common problem when debugging a curses application is to get your terminal " +"messed up when the application dies without restoring the terminal to its " +"previous state. In Python this commonly happens when your code is buggy and " +"raises an uncaught exception. Keys are no longer echoed to the screen when " +"you type them, for example, which makes using the shell difficult." +msgstr "" + +#: ../../howto/curses.rst:131 +msgid "" +"In Python you can avoid these complications and make debugging much easier " +"by importing the :func:`curses.wrapper` function and using it like this::" +msgstr "" + +#: ../../howto/curses.rst:134 +msgid "" +"from curses import wrapper\n" +"\n" +"def main(stdscr):\n" +" # Clear screen\n" +" stdscr.clear()\n" +"\n" +" # This raises ZeroDivisionError when i == 10.\n" +" for i in range(0, 11):\n" +" v = i-10\n" +" stdscr.addstr(i, 0, '10 divided by {} is {}'.format(v, 10/v))\n" +"\n" +" stdscr.refresh()\n" +" stdscr.getkey()\n" +"\n" +"wrapper(main)" +msgstr "" + +#: ../../howto/curses.rst:150 +msgid "" +"The :func:`~curses.wrapper` function takes a callable object and does the " +"initializations described above, also initializing colors if color support " +"is present. :func:`!wrapper` then runs your provided callable. Once the " +"callable returns, :func:`!wrapper` will restore the original state of the " +"terminal. The callable is called inside a :keyword:`try`...\\ :keyword:" +"`except` that catches exceptions, restores the state of the terminal, and " +"then re-raises the exception. Therefore your terminal won't be left in a " +"funny state on exception and you'll be able to read the exception's message " +"and traceback." +msgstr "" + +#: ../../howto/curses.rst:164 +msgid "Windows and Pads" +msgstr "" + +#: ../../howto/curses.rst:166 +msgid "" +"Windows are the basic abstraction in curses. A window object represents a " +"rectangular area of the screen, and supports methods to display text, erase " +"it, allow the user to input strings, and so forth." +msgstr "" + +#: ../../howto/curses.rst:170 +msgid "" +"The ``stdscr`` object returned by the :func:`~curses.initscr` function is a " +"window object that covers the entire screen. Many programs may need only " +"this single window, but you might wish to divide the screen into smaller " +"windows, in order to redraw or clear them separately. The :func:`~curses." +"newwin` function creates a new window of a given size, returning the new " +"window object. ::" +msgstr "" + +#: ../../howto/curses.rst:177 +msgid "" +"begin_x = 20; begin_y = 7\n" +"height = 5; width = 40\n" +"win = curses.newwin(height, width, begin_y, begin_x)" +msgstr "" + +#: ../../howto/curses.rst:181 +msgid "" +"Note that the coordinate system used in curses is unusual. Coordinates are " +"always passed in the order *y,x*, and the top-left corner of a window is " +"coordinate (0,0). This breaks the normal convention for handling " +"coordinates where the *x* coordinate comes first. This is an unfortunate " +"difference from most other computer applications, but it's been part of " +"curses since it was first written, and it's too late to change things now." +msgstr "" + +#: ../../howto/curses.rst:189 +msgid "" +"Your application can determine the size of the screen by using the :data:" +"`curses.LINES` and :data:`curses.COLS` variables to obtain the *y* and *x* " +"sizes. Legal coordinates will then extend from ``(0,0)`` to ``(curses.LINES " +"- 1, curses.COLS - 1)``." +msgstr "" + +#: ../../howto/curses.rst:194 +msgid "" +"When you call a method to display or erase text, the effect doesn't " +"immediately show up on the display. Instead you must call the :meth:" +"`~curses.window.refresh` method of window objects to update the screen." +msgstr "" + +#: ../../howto/curses.rst:199 +msgid "" +"This is because curses was originally written with slow 300-baud terminal " +"connections in mind; with these terminals, minimizing the time required to " +"redraw the screen was very important. Instead curses accumulates changes to " +"the screen and displays them in the most efficient manner when you call :" +"meth:`!refresh`. For example, if your program displays some text in a " +"window and then clears the window, there's no need to send the original text " +"because they're never visible." +msgstr "" + +#: ../../howto/curses.rst:208 +msgid "" +"In practice, explicitly telling curses to redraw a window doesn't really " +"complicate programming with curses much. Most programs go into a flurry of " +"activity, and then pause waiting for a keypress or some other action on the " +"part of the user. All you have to do is to be sure that the screen has been " +"redrawn before pausing to wait for user input, by first calling :meth:`!" +"stdscr.refresh` or the :meth:`!refresh` method of some other relevant window." +msgstr "" + +#: ../../howto/curses.rst:216 +msgid "" +"A pad is a special case of a window; it can be larger than the actual " +"display screen, and only a portion of the pad displayed at a time. Creating " +"a pad requires the pad's height and width, while refreshing a pad requires " +"giving the coordinates of the on-screen area where a subsection of the pad " +"will be displayed. ::" +msgstr "" + +#: ../../howto/curses.rst:222 +msgid "" +"pad = curses.newpad(100, 100)\n" +"# These loops fill the pad with letters; addch() is\n" +"# explained in the next section\n" +"for y in range(0, 99):\n" +" for x in range(0, 99):\n" +" pad.addch(y,x, ord('a') + (x*x+y*y) % 26)\n" +"\n" +"# Displays a section of the pad in the middle of the screen.\n" +"# (0,0) : coordinate of upper-left corner of pad area to display.\n" +"# (5,5) : coordinate of upper-left corner of window area to be filled\n" +"# with pad content.\n" +"# (20, 75) : coordinate of lower-right corner of window area to be\n" +"# : filled with pad content.\n" +"pad.refresh( 0,0, 5,5, 20,75)" +msgstr "" + +#: ../../howto/curses.rst:237 +msgid "" +"The :meth:`!refresh` call displays a section of the pad in the rectangle " +"extending from coordinate (5,5) to coordinate (20,75) on the screen; the " +"upper left corner of the displayed section is coordinate (0,0) on the pad. " +"Beyond that difference, pads are exactly like ordinary windows and support " +"the same methods." +msgstr "" + +#: ../../howto/curses.rst:243 +msgid "" +"If you have multiple windows and pads on screen there is a more efficient " +"way to update the screen and prevent annoying screen flicker as each part of " +"the screen gets updated. :meth:`!refresh` actually does two things:" +msgstr "" + +#: ../../howto/curses.rst:248 +msgid "" +"Calls the :meth:`~curses.window.noutrefresh` method of each window to update " +"an underlying data structure representing the desired state of the screen." +msgstr "" + +#: ../../howto/curses.rst:251 +msgid "" +"Calls the function :func:`~curses.doupdate` function to change the physical " +"screen to match the desired state recorded in the data structure." +msgstr "" + +#: ../../howto/curses.rst:254 +msgid "" +"Instead you can call :meth:`!noutrefresh` on a number of windows to update " +"the data structure, and then call :func:`!doupdate` to update the screen." +msgstr "" + +#: ../../howto/curses.rst:260 +msgid "Displaying Text" +msgstr "" + +#: ../../howto/curses.rst:262 +msgid "" +"From a C programmer's point of view, curses may sometimes look like a twisty " +"maze of functions, all subtly different. For example, :c:func:`!addstr` " +"displays a string at the current cursor location in the ``stdscr`` window, " +"while :c:func:`!mvaddstr` moves to a given y,x coordinate first before " +"displaying the string. :c:func:`!waddstr` is just like :c:func:`!addstr`, " +"but allows specifying a window to use instead of using ``stdscr`` by " +"default. :c:func:`!mvwaddstr` allows specifying both a window and a " +"coordinate." +msgstr "" + +#: ../../howto/curses.rst:271 +msgid "" +"Fortunately the Python interface hides all these details. ``stdscr`` is a " +"window object like any other, and methods such as :meth:`~curses.window." +"addstr` accept multiple argument forms. Usually there are four different " +"forms." +msgstr "" + +#: ../../howto/curses.rst:277 +msgid "Form" +msgstr "" + +#: ../../howto/curses.rst:277 ../../howto/curses.rst:345 +msgid "Description" +msgstr "Beschreibung" + +#: ../../howto/curses.rst:279 +msgid "*str* or *ch*" +msgstr "" + +#: ../../howto/curses.rst:279 +msgid "Display the string *str* or character *ch* at the current position" +msgstr "" + +#: ../../howto/curses.rst:282 +msgid "*str* or *ch*, *attr*" +msgstr "" + +#: ../../howto/curses.rst:282 +msgid "" +"Display the string *str* or character *ch*, using attribute *attr* at the " +"current position" +msgstr "" + +#: ../../howto/curses.rst:286 +msgid "*y*, *x*, *str* or *ch*" +msgstr "" + +#: ../../howto/curses.rst:286 +msgid "Move to position *y,x* within the window, and display *str* or *ch*" +msgstr "" + +#: ../../howto/curses.rst:289 +msgid "*y*, *x*, *str* or *ch*, *attr*" +msgstr "" + +#: ../../howto/curses.rst:289 +msgid "" +"Move to position *y,x* within the window, and display *str* or *ch*, using " +"attribute *attr*" +msgstr "" + +#: ../../howto/curses.rst:293 +msgid "" +"Attributes allow displaying text in highlighted forms such as boldface, " +"underline, reverse code, or in color. They'll be explained in more detail " +"in the next subsection." +msgstr "" + +#: ../../howto/curses.rst:298 +msgid "" +"The :meth:`~curses.window.addstr` method takes a Python string or bytestring " +"as the value to be displayed. The contents of bytestrings are sent to the " +"terminal as-is. Strings are encoded to bytes using the value of the " +"window's :attr:`~window.encoding` attribute; this defaults to the default " +"system encoding as returned by :func:`locale.getencoding`." +msgstr "" + +#: ../../howto/curses.rst:304 +msgid "" +"The :meth:`~curses.window.addch` methods take a character, which can be " +"either a string of length 1, a bytestring of length 1, or an integer." +msgstr "" + +#: ../../howto/curses.rst:307 +msgid "" +"Constants are provided for extension characters; these constants are " +"integers greater than 255. For example, :const:`ACS_PLMINUS` is a +/- " +"symbol, and :const:`ACS_ULCORNER` is the upper left corner of a box (handy " +"for drawing borders). You can also use the appropriate Unicode character." +msgstr "" + +#: ../../howto/curses.rst:313 +msgid "" +"Windows remember where the cursor was left after the last operation, so if " +"you leave out the *y,x* coordinates, the string or character will be " +"displayed wherever the last operation left off. You can also move the " +"cursor with the ``move(y,x)`` method. Because some terminals always display " +"a flashing cursor, you may want to ensure that the cursor is positioned in " +"some location where it won't be distracting; it can be confusing to have the " +"cursor blinking at some apparently random location." +msgstr "" + +#: ../../howto/curses.rst:321 +msgid "" +"If your application doesn't need a blinking cursor at all, you can call " +"``curs_set(False)`` to make it invisible. For compatibility with older " +"curses versions, there's a ``leaveok(bool)`` function that's a synonym for :" +"func:`~curses.curs_set`. When *bool* is true, the curses library will " +"attempt to suppress the flashing cursor, and you won't need to worry about " +"leaving it in odd locations." +msgstr "" + +#: ../../howto/curses.rst:330 +msgid "Attributes and Color" +msgstr "" + +#: ../../howto/curses.rst:332 +msgid "" +"Characters can be displayed in different ways. Status lines in a text-based " +"application are commonly shown in reverse video, or a text viewer may need " +"to highlight certain words. curses supports this by allowing you to specify " +"an attribute for each cell on the screen." +msgstr "" + +#: ../../howto/curses.rst:337 +msgid "" +"An attribute is an integer, each bit representing a different attribute. " +"You can try to display text with multiple attribute bits set, but curses " +"doesn't guarantee that all the possible combinations are available, or that " +"they're all visually distinct. That depends on the ability of the terminal " +"being used, so it's safest to stick to the most commonly available " +"attributes, listed here." +msgstr "" + +#: ../../howto/curses.rst:345 +msgid "Attribute" +msgstr "" + +#: ../../howto/curses.rst:347 +msgid ":const:`A_BLINK`" +msgstr "" + +#: ../../howto/curses.rst:347 +msgid "Blinking text" +msgstr "" + +#: ../../howto/curses.rst:349 +msgid ":const:`A_BOLD`" +msgstr "" + +#: ../../howto/curses.rst:349 +msgid "Extra bright or bold text" +msgstr "" + +#: ../../howto/curses.rst:351 +msgid ":const:`A_DIM`" +msgstr "" + +#: ../../howto/curses.rst:351 +msgid "Half bright text" +msgstr "" + +#: ../../howto/curses.rst:353 +msgid ":const:`A_REVERSE`" +msgstr "" + +#: ../../howto/curses.rst:353 +msgid "Reverse-video text" +msgstr "" + +#: ../../howto/curses.rst:355 +msgid ":const:`A_STANDOUT`" +msgstr "" + +#: ../../howto/curses.rst:355 +msgid "The best highlighting mode available" +msgstr "" + +#: ../../howto/curses.rst:357 +msgid ":const:`A_UNDERLINE`" +msgstr "" + +#: ../../howto/curses.rst:357 +msgid "Underlined text" +msgstr "" + +#: ../../howto/curses.rst:360 +msgid "" +"So, to display a reverse-video status line on the top line of the screen, " +"you could code::" +msgstr "" + +#: ../../howto/curses.rst:363 +msgid "" +"stdscr.addstr(0, 0, \"Current mode: Typing mode\",\n" +" curses.A_REVERSE)\n" +"stdscr.refresh()" +msgstr "" + +#: ../../howto/curses.rst:367 +msgid "" +"The curses library also supports color on those terminals that provide it. " +"The most common such terminal is probably the Linux console, followed by " +"color xterms." +msgstr "" + +#: ../../howto/curses.rst:371 +msgid "" +"To use color, you must call the :func:`~curses.start_color` function soon " +"after calling :func:`~curses.initscr`, to initialize the default color set " +"(the :func:`curses.wrapper` function does this automatically). Once that's " +"done, the :func:`~curses.has_colors` function returns TRUE if the terminal " +"in use can actually display color. (Note: curses uses the American spelling " +"'color', instead of the Canadian/British spelling 'colour'. If you're used " +"to the British spelling, you'll have to resign yourself to misspelling it " +"for the sake of these functions.)" +msgstr "" + +#: ../../howto/curses.rst:381 +msgid "" +"The curses library maintains a finite number of color pairs, containing a " +"foreground (or text) color and a background color. You can get the " +"attribute value corresponding to a color pair with the :func:`~curses." +"color_pair` function; this can be bitwise-OR'ed with other attributes such " +"as :const:`A_REVERSE`, but again, such combinations are not guaranteed to " +"work on all terminals." +msgstr "" + +#: ../../howto/curses.rst:388 +msgid "An example, which displays a line of text using color pair 1::" +msgstr "" + +#: ../../howto/curses.rst:390 +msgid "" +"stdscr.addstr(\"Pretty text\", curses.color_pair(1))\n" +"stdscr.refresh()" +msgstr "" + +#: ../../howto/curses.rst:393 +msgid "" +"As I said before, a color pair consists of a foreground and background " +"color. The ``init_pair(n, f, b)`` function changes the definition of color " +"pair *n*, to foreground color f and background color b. Color pair 0 is " +"hard-wired to white on black, and cannot be changed." +msgstr "" + +#: ../../howto/curses.rst:398 +msgid "" +"Colors are numbered, and :func:`start_color` initializes 8 basic colors when " +"it activates color mode. They are: 0:black, 1:red, 2:green, 3:yellow, 4:" +"blue, 5:magenta, 6:cyan, and 7:white. The :mod:`curses` module defines " +"named constants for each of these colors: :const:`curses.COLOR_BLACK`, :" +"const:`curses.COLOR_RED`, and so forth." +msgstr "" + +#: ../../howto/curses.rst:404 +msgid "" +"Let's put all this together. To change color 1 to red text on a white " +"background, you would call::" +msgstr "" + +#: ../../howto/curses.rst:407 +msgid "curses.init_pair(1, curses.COLOR_RED, curses.COLOR_WHITE)" +msgstr "" + +#: ../../howto/curses.rst:409 +msgid "" +"When you change a color pair, any text already displayed using that color " +"pair will change to the new colors. You can also display new text in this " +"color with::" +msgstr "" + +#: ../../howto/curses.rst:413 +msgid "stdscr.addstr(0,0, \"RED ALERT!\", curses.color_pair(1))" +msgstr "" + +#: ../../howto/curses.rst:415 +msgid "" +"Very fancy terminals can change the definitions of the actual colors to a " +"given RGB value. This lets you change color 1, which is usually red, to " +"purple or blue or any other color you like. Unfortunately, the Linux " +"console doesn't support this, so I'm unable to try it out, and can't provide " +"any examples. You can check if your terminal can do this by calling :func:" +"`~curses.can_change_color`, which returns ``True`` if the capability is " +"there. If you're lucky enough to have such a talented terminal, consult " +"your system's man pages for more information." +msgstr "" + +#: ../../howto/curses.rst:426 +msgid "User Input" +msgstr "" + +#: ../../howto/curses.rst:428 +msgid "" +"The C curses library offers only very simple input mechanisms. Python's :mod:" +"`curses` module adds a basic text-input widget. (Other libraries such as :" +"pypi:`Urwid` have more extensive collections of widgets.)" +msgstr "" + +#: ../../howto/curses.rst:432 +msgid "There are two methods for getting input from a window:" +msgstr "" + +#: ../../howto/curses.rst:434 +msgid "" +":meth:`~curses.window.getch` refreshes the screen and then waits for the " +"user to hit a key, displaying the key if :func:`~curses.echo` has been " +"called earlier. You can optionally specify a coordinate to which the cursor " +"should be moved before pausing." +msgstr "" + +#: ../../howto/curses.rst:439 +msgid "" +":meth:`~curses.window.getkey` does the same thing but converts the integer " +"to a string. Individual characters are returned as 1-character strings, and " +"special keys such as function keys return longer strings containing a key " +"name such as ``KEY_UP`` or ``^G``." +msgstr "" + +#: ../../howto/curses.rst:444 +msgid "" +"It's possible to not wait for the user using the :meth:`~curses.window." +"nodelay` window method. After ``nodelay(True)``, :meth:`!getch` and :meth:`!" +"getkey` for the window become non-blocking. To signal that no input is " +"ready, :meth:`!getch` returns ``curses.ERR`` (a value of -1) and :meth:`!" +"getkey` raises an exception. There's also a :func:`~curses.halfdelay` " +"function, which can be used to (in effect) set a timer on each :meth:`!" +"getch`; if no input becomes available within a specified delay (measured in " +"tenths of a second), curses raises an exception." +msgstr "" + +#: ../../howto/curses.rst:454 +msgid "" +"The :meth:`!getch` method returns an integer; if it's between 0 and 255, it " +"represents the ASCII code of the key pressed. Values greater than 255 are " +"special keys such as Page Up, Home, or the cursor keys. You can compare the " +"value returned to constants such as :const:`curses.KEY_PPAGE`, :const:" +"`curses.KEY_HOME`, or :const:`curses.KEY_LEFT`. The main loop of your " +"program may look something like this::" +msgstr "" + +#: ../../howto/curses.rst:461 +msgid "" +"while True:\n" +" c = stdscr.getch()\n" +" if c == ord('p'):\n" +" PrintDocument()\n" +" elif c == ord('q'):\n" +" break # Exit the while loop\n" +" elif c == curses.KEY_HOME:\n" +" x = y = 0" +msgstr "" + +#: ../../howto/curses.rst:470 +msgid "" +"The :mod:`curses.ascii` module supplies ASCII class membership functions " +"that take either integer or 1-character string arguments; these may be " +"useful in writing more readable tests for such loops. It also supplies " +"conversion functions that take either integer or 1-character-string " +"arguments and return the same type. For example, :func:`curses.ascii.ctrl` " +"returns the control character corresponding to its argument." +msgstr "" + +#: ../../howto/curses.rst:477 +msgid "" +"There's also a method to retrieve an entire string, :meth:`~curses.window." +"getstr`. It isn't used very often, because its functionality is quite " +"limited; the only editing keys available are the backspace key and the Enter " +"key, which terminates the string. It can optionally be limited to a fixed " +"number of characters. ::" +msgstr "" + +#: ../../howto/curses.rst:483 +msgid "" +"curses.echo() # Enable echoing of characters\n" +"\n" +"# Get a 15-character string, with the cursor on the top line\n" +"s = stdscr.getstr(0,0, 15)" +msgstr "" + +#: ../../howto/curses.rst:488 +msgid "" +"The :mod:`curses.textpad` module supplies a text box that supports an Emacs-" +"like set of keybindings. Various methods of the :class:`~curses.textpad." +"Textbox` class support editing with input validation and gathering the edit " +"results either with or without trailing spaces. Here's an example::" +msgstr "" + +#: ../../howto/curses.rst:494 +msgid "" +"import curses\n" +"from curses.textpad import Textbox, rectangle\n" +"\n" +"def main(stdscr):\n" +" stdscr.addstr(0, 0, \"Enter IM message: (hit Ctrl-G to send)\")\n" +"\n" +" editwin = curses.newwin(5,30, 2,1)\n" +" rectangle(stdscr, 1,0, 1+5+1, 1+30+1)\n" +" stdscr.refresh()\n" +"\n" +" box = Textbox(editwin)\n" +"\n" +" # Let the user edit until Ctrl-G is struck.\n" +" box.edit()\n" +"\n" +" # Get resulting contents\n" +" message = box.gather()" +msgstr "" + +#: ../../howto/curses.rst:512 +msgid "" +"See the library documentation on :mod:`curses.textpad` for more details." +msgstr "" + +#: ../../howto/curses.rst:516 +msgid "For More Information" +msgstr "" + +#: ../../howto/curses.rst:518 +msgid "" +"This HOWTO doesn't cover some advanced topics, such as reading the contents " +"of the screen or capturing mouse events from an xterm instance, but the " +"Python library page for the :mod:`curses` module is now reasonably " +"complete. You should browse it next." +msgstr "" + +#: ../../howto/curses.rst:523 +msgid "" +"If you're in doubt about the detailed behavior of the curses functions, " +"consult the manual pages for your curses implementation, whether it's " +"ncurses or a proprietary Unix vendor's. The manual pages will document any " +"quirks, and provide complete lists of all the functions, attributes, and :" +"ref:`ACS_\\* ` characters available to you." +msgstr "" + +#: ../../howto/curses.rst:530 +msgid "" +"Because the curses API is so large, some functions aren't supported in the " +"Python interface. Often this isn't because they're difficult to implement, " +"but because no one has needed them yet. Also, Python doesn't yet support " +"the menu library associated with ncurses. Patches adding support for these " +"would be welcome; see `the Python Developer's Guide `_ to learn more about submitting patches to Python." +msgstr "" + +#: ../../howto/curses.rst:538 +msgid "" +"`Writing Programs with NCURSES `_: a lengthy tutorial for C programmers." +msgstr "" + +#: ../../howto/curses.rst:540 +msgid "`The ncurses man page `_" +msgstr "" + +#: ../../howto/curses.rst:541 +msgid "" +"`The ncurses FAQ `_" +msgstr "" + +#: ../../howto/curses.rst:542 +msgid "" +"`\"Use curses... don't swear\" `_: video of a PyCon 2013 talk on controlling terminals using " +"curses or Urwid." +msgstr "" + +#: ../../howto/curses.rst:544 +msgid "" +"`\"Console Applications with Urwid\" `_: video of a PyCon CA 2012 talk demonstrating some " +"applications written using Urwid." +msgstr "" + +#~ msgid "Release" +#~ msgstr "Release" diff --git a/howto/functional.po b/howto/functional.po index 8179d511..d9e4805a 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -961,68 +961,68 @@ msgstr "" #: ../../howto/functional.rst:723 msgid "" -"It doesn't construct an in-memory list and exhaust all the input iterators " -"before returning; instead tuples are constructed and returned only if " -"they're requested. (The technical term for this behaviour is `lazy " -"evaluation `__.)" +"It doesn't construct an in-memory list and :term:`exhaust ` all " +"the input iterators before returning; instead tuples are constructed and " +"returned only if they're requested. (The technical term for this behaviour " +"is `lazy evaluation `__.)" msgstr "" -#: ../../howto/functional.rst:728 +#: ../../howto/functional.rst:729 msgid "" "This iterator is intended to be used with iterables that are all of the same " "length. If the iterables are of different lengths, the resulting stream " "will be the same length as the shortest iterable. ::" msgstr "" -#: ../../howto/functional.rst:732 +#: ../../howto/functional.rst:733 msgid "" "zip(['a', 'b'], (1, 2, 3)) =>\n" " ('a', 1), ('b', 2)" msgstr "" -#: ../../howto/functional.rst:735 +#: ../../howto/functional.rst:736 msgid "" "You should avoid doing this, though, because an element may be taken from " "the longer iterators and discarded. This means you can't go on to use the " "iterators further because you risk skipping a discarded element." msgstr "" -#: ../../howto/functional.rst:741 +#: ../../howto/functional.rst:742 msgid "The itertools module" msgstr "" -#: ../../howto/functional.rst:743 +#: ../../howto/functional.rst:744 msgid "" "The :mod:`itertools` module contains a number of commonly used iterators as " "well as functions for combining several iterators. This section will " "introduce the module's contents by showing small examples." msgstr "" -#: ../../howto/functional.rst:747 +#: ../../howto/functional.rst:748 msgid "The module's functions fall into a few broad classes:" msgstr "" -#: ../../howto/functional.rst:749 +#: ../../howto/functional.rst:750 msgid "Functions that create a new iterator based on an existing iterator." msgstr "" -#: ../../howto/functional.rst:750 +#: ../../howto/functional.rst:751 msgid "Functions for treating an iterator's elements as function arguments." msgstr "" -#: ../../howto/functional.rst:751 +#: ../../howto/functional.rst:752 msgid "Functions for selecting portions of an iterator's output." msgstr "" -#: ../../howto/functional.rst:752 +#: ../../howto/functional.rst:753 msgid "A function for grouping an iterator's output." msgstr "" -#: ../../howto/functional.rst:755 +#: ../../howto/functional.rst:756 msgid "Creating new iterators" msgstr "" -#: ../../howto/functional.rst:757 +#: ../../howto/functional.rst:758 msgid "" ":func:`itertools.count(start, step) ` returns an infinite " "stream of evenly spaced values. You can optionally supply the starting " @@ -1030,7 +1030,7 @@ msgid "" "defaults to 1::" msgstr "" -#: ../../howto/functional.rst:761 +#: ../../howto/functional.rst:762 msgid "" "itertools.count() =>\n" " 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...\n" @@ -1040,7 +1040,7 @@ msgid "" " 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, ..." msgstr "" -#: ../../howto/functional.rst:768 +#: ../../howto/functional.rst:769 msgid "" ":func:`itertools.cycle(iter) ` saves a copy of the contents " "of a provided iterable and returns a new iterator that returns its elements " @@ -1048,20 +1048,20 @@ msgid "" "infinitely. ::" msgstr "" -#: ../../howto/functional.rst:772 +#: ../../howto/functional.rst:773 msgid "" "itertools.cycle([1, 2, 3, 4, 5]) =>\n" " 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, ..." msgstr "" -#: ../../howto/functional.rst:775 +#: ../../howto/functional.rst:776 msgid "" ":func:`itertools.repeat(elem, [n]) ` returns the provided " "element *n* times, or returns the element endlessly if *n* is not " "provided. ::" msgstr "" -#: ../../howto/functional.rst:778 +#: ../../howto/functional.rst:779 msgid "" "itertools.repeat('abc') =>\n" " abc, abc, abc, abc, abc, abc, abc, abc, abc, abc, ...\n" @@ -1069,21 +1069,21 @@ msgid "" " abc, abc, abc, abc, abc" msgstr "" -#: ../../howto/functional.rst:783 +#: ../../howto/functional.rst:784 msgid "" ":func:`itertools.chain(iterA, iterB, ...) ` takes an " "arbitrary number of iterables as input, and returns all the elements of the " "first iterator, then all the elements of the second, and so on, until all of " -"the iterables have been exhausted. ::" +"the iterables have been :term:`exhausted`. ::" msgstr "" -#: ../../howto/functional.rst:788 +#: ../../howto/functional.rst:789 msgid "" "itertools.chain(['a', 'b', 'c'], (1, 2, 3)) =>\n" " a, b, c, 1, 2, 3" msgstr "" -#: ../../howto/functional.rst:791 +#: ../../howto/functional.rst:792 msgid "" ":func:`itertools.islice(iter, [start], stop, [step]) ` " "returns a stream that's a slice of the iterator. With a single *stop* " @@ -1094,7 +1094,7 @@ msgid "" "*step*. ::" msgstr "" -#: ../../howto/functional.rst:798 +#: ../../howto/functional.rst:799 msgid "" "itertools.islice(range(10), 8) =>\n" " 0, 1, 2, 3, 4, 5, 6, 7\n" @@ -1104,7 +1104,7 @@ msgid "" " 2, 4, 6" msgstr "" -#: ../../howto/functional.rst:805 +#: ../../howto/functional.rst:806 msgid "" ":func:`itertools.tee(iter, [n]) ` replicates an iterator; it " "returns *n* independent iterators that will all return the contents of the " @@ -1114,7 +1114,7 @@ msgid "" "and one of the new iterators is consumed more than the others. ::" msgstr "" -#: ../../howto/functional.rst:813 +#: ../../howto/functional.rst:814 msgid "" "itertools.tee( itertools.count() ) =>\n" " iterA, iterB\n" @@ -1126,11 +1126,11 @@ msgid "" " 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ..." msgstr "" -#: ../../howto/functional.rst:824 +#: ../../howto/functional.rst:825 msgid "Calling functions on elements" msgstr "" -#: ../../howto/functional.rst:826 +#: ../../howto/functional.rst:827 msgid "" "The :mod:`operator` module contains a set of functions corresponding to " "Python's operators. Some examples are :func:`operator.add(a, b) ` assumes that the " "iterable will return a stream of tuples, and calls *func* using these tuples " "as the arguments::" msgstr "" -#: ../../howto/functional.rst:836 +#: ../../howto/functional.rst:837 msgid "" "itertools.starmap(os.path.join,\n" " [('/bin', 'python'), ('/usr', 'bin', 'java'),\n" @@ -1155,37 +1155,37 @@ msgid "" " /bin/python, /usr/bin/java, /usr/bin/perl, /usr/bin/ruby" msgstr "" -#: ../../howto/functional.rst:844 +#: ../../howto/functional.rst:845 msgid "Selecting elements" msgstr "" -#: ../../howto/functional.rst:846 +#: ../../howto/functional.rst:847 msgid "" "Another group of functions chooses a subset of an iterator's elements based " "on a predicate." msgstr "" -#: ../../howto/functional.rst:849 +#: ../../howto/functional.rst:850 msgid "" ":func:`itertools.filterfalse(predicate, iter) ` is " "the opposite of :func:`filter`, returning all elements for which the " "predicate returns false::" msgstr "" -#: ../../howto/functional.rst:853 +#: ../../howto/functional.rst:854 msgid "" "itertools.filterfalse(is_even, itertools.count()) =>\n" " 1, 3, 5, 7, 9, 11, 13, 15, ..." msgstr "" -#: ../../howto/functional.rst:856 +#: ../../howto/functional.rst:857 msgid "" ":func:`itertools.takewhile(predicate, iter) ` returns " "elements for as long as the predicate returns true. Once the predicate " "returns false, the iterator will signal the end of its results. ::" msgstr "" -#: ../../howto/functional.rst:860 +#: ../../howto/functional.rst:861 msgid "" "def less_than_10(x):\n" " return x < 10\n" @@ -1197,14 +1197,14 @@ msgid "" " 0" msgstr "" -#: ../../howto/functional.rst:869 +#: ../../howto/functional.rst:870 msgid "" ":func:`itertools.dropwhile(predicate, iter) ` discards " "elements while the predicate returns true, and then returns the rest of the " "iterable's results. ::" msgstr "" -#: ../../howto/functional.rst:873 +#: ../../howto/functional.rst:874 msgid "" "itertools.dropwhile(less_than_10, itertools.count()) =>\n" " 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ...\n" @@ -1213,32 +1213,32 @@ msgid "" " 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ..." msgstr "" -#: ../../howto/functional.rst:879 +#: ../../howto/functional.rst:880 msgid "" ":func:`itertools.compress(data, selectors) ` takes two " "iterators and returns only those elements of *data* for which the " "corresponding element of *selectors* is true, stopping whenever either one " -"is exhausted::" +"is :term:`exhausted`::" msgstr "" -#: ../../howto/functional.rst:883 +#: ../../howto/functional.rst:884 msgid "" "itertools.compress([1, 2, 3, 4, 5], [True, True, False, False, True]) =>\n" " 1, 2, 5" msgstr "" -#: ../../howto/functional.rst:888 +#: ../../howto/functional.rst:889 msgid "Combinatoric functions" msgstr "" -#: ../../howto/functional.rst:890 +#: ../../howto/functional.rst:891 msgid "" "The :func:`itertools.combinations(iterable, r) ` " "returns an iterator giving all possible *r*-tuple combinations of the " "elements contained in *iterable*. ::" msgstr "" -#: ../../howto/functional.rst:894 +#: ../../howto/functional.rst:895 msgid "" "itertools.combinations([1, 2, 3, 4, 5], 2) =>\n" " (1, 2), (1, 3), (1, 4), (1, 5),\n" @@ -1252,7 +1252,7 @@ msgid "" " (3, 4, 5)" msgstr "" -#: ../../howto/functional.rst:905 +#: ../../howto/functional.rst:906 msgid "" "The elements within each tuple remain in the same order as *iterable* " "returned them. For example, the number 1 is always before 2, 3, 4, or 5 in " @@ -1261,7 +1261,7 @@ msgid "" "constraint on the order, returning all possible arrangements of length *r*::" msgstr "" -#: ../../howto/functional.rst:912 +#: ../../howto/functional.rst:913 msgid "" "itertools.permutations([1, 2, 3, 4, 5], 2) =>\n" " (1, 2), (1, 3), (1, 4), (1, 5),\n" @@ -1276,32 +1276,32 @@ msgid "" " (5, 4, 3, 2, 1)" msgstr "" -#: ../../howto/functional.rst:924 +#: ../../howto/functional.rst:925 msgid "" "If you don't supply a value for *r* the length of the iterable is used, " "meaning that all the elements are permuted." msgstr "" -#: ../../howto/functional.rst:927 +#: ../../howto/functional.rst:928 msgid "" "Note that these functions produce all of the possible combinations by " "position and don't require that the contents of *iterable* are unique::" msgstr "" -#: ../../howto/functional.rst:930 +#: ../../howto/functional.rst:931 msgid "" "itertools.permutations('aba', 3) =>\n" " ('a', 'b', 'a'), ('a', 'a', 'b'), ('b', 'a', 'a'),\n" " ('b', 'a', 'a'), ('a', 'a', 'b'), ('a', 'b', 'a')" msgstr "" -#: ../../howto/functional.rst:934 +#: ../../howto/functional.rst:935 msgid "" "The identical tuple ``('a', 'a', 'b')`` occurs twice, but the two 'a' " "strings came from different positions." msgstr "" -#: ../../howto/functional.rst:937 +#: ../../howto/functional.rst:938 msgid "" "The :func:`itertools.combinations_with_replacement(iterable, r) ` function relaxes a different constraint: " @@ -1310,7 +1310,7 @@ msgid "" "the second element is selected. ::" msgstr "" -#: ../../howto/functional.rst:943 +#: ../../howto/functional.rst:944 msgid "" "itertools.combinations_with_replacement([1, 2, 3, 4, 5], 2) =>\n" " (1, 1), (1, 2), (1, 3), (1, 4), (1, 5),\n" @@ -1320,11 +1320,11 @@ msgid "" " (5, 5)" msgstr "" -#: ../../howto/functional.rst:952 +#: ../../howto/functional.rst:953 msgid "Grouping elements" msgstr "" -#: ../../howto/functional.rst:954 +#: ../../howto/functional.rst:955 msgid "" "The last function I'll discuss, :func:`itertools.groupby(iter, " "key_func=None) `, is the most complicated. " @@ -1333,14 +1333,14 @@ msgid "" "key is simply each element itself." msgstr "" -#: ../../howto/functional.rst:959 +#: ../../howto/functional.rst:960 msgid "" ":func:`~itertools.groupby` collects all the consecutive elements from the " "underlying iterable that have the same key value, and returns a stream of 2-" "tuples containing a key value and an iterator for the elements with that key." msgstr "" -#: ../../howto/functional.rst:965 +#: ../../howto/functional.rst:966 msgid "" "city_list = [('Decatur', 'AL'), ('Huntsville', 'AL'), ('Selma', 'AL'),\n" " ('Anchorage', 'AK'), ('Nome', 'AK'),\n" @@ -1365,7 +1365,7 @@ msgid "" " ('Flagstaff', 'AZ'), ('Phoenix', 'AZ'), ('Tucson', 'AZ')" msgstr "" -#: ../../howto/functional.rst:987 +#: ../../howto/functional.rst:988 msgid "" ":func:`~itertools.groupby` assumes that the underlying iterable's contents " "will already be sorted based on the key. Note that the returned iterators " @@ -1373,11 +1373,11 @@ msgid "" "iterator-1 before requesting iterator-2 and its corresponding key." msgstr "" -#: ../../howto/functional.rst:994 +#: ../../howto/functional.rst:995 msgid "The functools module" msgstr "" -#: ../../howto/functional.rst:996 +#: ../../howto/functional.rst:997 msgid "" "The :mod:`functools` module contains some higher-order functions. A **higher-" "order function** takes one or more functions as input and returns a new " @@ -1385,7 +1385,7 @@ msgid "" "partial` function." msgstr "" -#: ../../howto/functional.rst:1001 +#: ../../howto/functional.rst:1002 msgid "" "For programs written in a functional style, you'll sometimes want to " "construct variants of existing functions that have some of the parameters " @@ -1395,7 +1395,7 @@ msgid "" "\"partial function application\"." msgstr "" -#: ../../howto/functional.rst:1007 +#: ../../howto/functional.rst:1008 msgid "" "The constructor for :func:`~functools.partial` takes the arguments " "``(function, arg1, arg2, ..., kwarg1=value1, kwarg2=value2)``. The " @@ -1403,11 +1403,11 @@ msgid "" "with the filled-in arguments." msgstr "" -#: ../../howto/functional.rst:1012 +#: ../../howto/functional.rst:1013 msgid "Here's a small but realistic example::" msgstr "" -#: ../../howto/functional.rst:1014 +#: ../../howto/functional.rst:1015 msgid "" "import functools\n" "\n" @@ -1420,7 +1420,7 @@ msgid "" "server_log('Unable to open socket')" msgstr "" -#: ../../howto/functional.rst:1024 +#: ../../howto/functional.rst:1025 msgid "" ":func:`functools.reduce(func, iter, [initial_value]) ` " "cumulatively performs an operation on all the iterable's elements and, " @@ -1429,13 +1429,13 @@ msgid "" "reduce` takes the first two elements A and B returned by the iterator and " "calculates ``func(A, B)``. It then requests the third element, C, " "calculates ``func(func(A, B), C)``, combines this result with the fourth " -"element returned, and continues until the iterable is exhausted. If the " -"iterable returns no values at all, a :exc:`TypeError` exception is raised. " -"If the initial value is supplied, it's used as a starting point and " +"element returned, and continues until the iterable is :term:`exhausted`. If " +"the iterable returns no values at all, a :exc:`TypeError` exception is " +"raised. If the initial value is supplied, it's used as a starting point and " "``func(initial_value, A)`` is the first calculation. ::" msgstr "" -#: ../../howto/functional.rst:1036 +#: ../../howto/functional.rst:1037 msgid "" ">>> import operator, functools\n" ">>> functools.reduce(operator.concat, ['A', 'BB', 'C'])\n" @@ -1450,20 +1450,20 @@ msgid "" "1" msgstr "" -#: ../../howto/functional.rst:1048 +#: ../../howto/functional.rst:1049 msgid "" "If you use :func:`operator.add` with :func:`functools.reduce`, you'll add up " "all the elements of the iterable. This case is so common that there's a " "special built-in called :func:`sum` to compute it:" msgstr "" -#: ../../howto/functional.rst:1060 +#: ../../howto/functional.rst:1061 msgid "" "For many uses of :func:`functools.reduce`, though, it can be clearer to just " "write the obvious :keyword:`for` loop::" msgstr "" -#: ../../howto/functional.rst:1063 +#: ../../howto/functional.rst:1064 msgid "" "import functools\n" "# Instead of:\n" @@ -1475,7 +1475,7 @@ msgid "" " product *= i" msgstr "" -#: ../../howto/functional.rst:1072 +#: ../../howto/functional.rst:1073 msgid "" "A related function is :func:`itertools.accumulate(iterable, func=operator." "add) `. It performs the same calculation, but instead " @@ -1483,7 +1483,7 @@ msgid "" "iterator that also yields each partial result::" msgstr "" -#: ../../howto/functional.rst:1077 +#: ../../howto/functional.rst:1078 msgid "" "itertools.accumulate([1, 2, 3, 4, 5]) =>\n" " 1, 3, 6, 10, 15\n" @@ -1492,11 +1492,11 @@ msgid "" " 1, 2, 6, 24, 120" msgstr "" -#: ../../howto/functional.rst:1085 +#: ../../howto/functional.rst:1086 msgid "The operator module" msgstr "" -#: ../../howto/functional.rst:1087 +#: ../../howto/functional.rst:1088 msgid "" "The :mod:`operator` module was mentioned earlier. It contains a set of " "functions corresponding to Python's operators. These functions are often " @@ -1504,60 +1504,60 @@ msgid "" "functions that perform a single operation." msgstr "" -#: ../../howto/functional.rst:1092 +#: ../../howto/functional.rst:1093 msgid "Some of the functions in this module are:" msgstr "" -#: ../../howto/functional.rst:1094 +#: ../../howto/functional.rst:1095 msgid "" "Math operations: ``add()``, ``sub()``, ``mul()``, ``floordiv()``, " "``abs()``, ..." msgstr "" -#: ../../howto/functional.rst:1095 +#: ../../howto/functional.rst:1096 msgid "Logical operations: ``not_()``, ``truth()``." msgstr "" -#: ../../howto/functional.rst:1096 +#: ../../howto/functional.rst:1097 msgid "Bitwise operations: ``and_()``, ``or_()``, ``invert()``." msgstr "" -#: ../../howto/functional.rst:1097 +#: ../../howto/functional.rst:1098 msgid "" "Comparisons: ``eq()``, ``ne()``, ``lt()``, ``le()``, ``gt()``, and ``ge()``." msgstr "" -#: ../../howto/functional.rst:1098 +#: ../../howto/functional.rst:1099 msgid "Object identity: ``is_()``, ``is_not()``." msgstr "" -#: ../../howto/functional.rst:1100 +#: ../../howto/functional.rst:1101 msgid "Consult the operator module's documentation for a complete list." msgstr "" -#: ../../howto/functional.rst:1104 +#: ../../howto/functional.rst:1105 msgid "Small functions and the lambda expression" msgstr "" -#: ../../howto/functional.rst:1106 +#: ../../howto/functional.rst:1107 msgid "" "When writing functional-style programs, you'll often need little functions " "that act as predicates or that combine elements in some way." msgstr "" -#: ../../howto/functional.rst:1109 +#: ../../howto/functional.rst:1110 msgid "" "If there's a Python built-in or a module function that's suitable, you don't " "need to define a new function at all::" msgstr "" -#: ../../howto/functional.rst:1112 +#: ../../howto/functional.rst:1113 msgid "" "stripped_lines = [line.strip() for line in lines]\n" "existing_files = filter(os.path.exists, file_list)" msgstr "" -#: ../../howto/functional.rst:1115 +#: ../../howto/functional.rst:1116 msgid "" "If the function you need doesn't exist, you need to write it. One way to " "write small functions is to use the :keyword:`lambda` expression. " @@ -1566,20 +1566,20 @@ msgid "" "expression::" msgstr "" -#: ../../howto/functional.rst:1120 +#: ../../howto/functional.rst:1121 msgid "" "adder = lambda x, y: x+y\n" "\n" "print_assign = lambda name, value: name + '=' + str(value)" msgstr "" -#: ../../howto/functional.rst:1124 +#: ../../howto/functional.rst:1125 msgid "" "An alternative is to just use the ``def`` statement and define a function in " "the usual way::" msgstr "" -#: ../../howto/functional.rst:1127 +#: ../../howto/functional.rst:1128 msgid "" "def adder(x, y):\n" " return x + y\n" @@ -1588,13 +1588,13 @@ msgid "" " return name + '=' + str(value)" msgstr "" -#: ../../howto/functional.rst:1133 +#: ../../howto/functional.rst:1134 msgid "" "Which alternative is preferable? That's a style question; my usual course " "is to avoid using ``lambda``." msgstr "" -#: ../../howto/functional.rst:1136 +#: ../../howto/functional.rst:1137 msgid "" "One reason for my preference is that ``lambda`` is quite limited in the " "functions it can define. The result has to be computable as a single " @@ -1604,20 +1604,20 @@ msgid "" "that's hard to read. Quick, what's the following code doing? ::" msgstr "" -#: ../../howto/functional.rst:1143 +#: ../../howto/functional.rst:1144 msgid "" "import functools\n" "total = functools.reduce(lambda a, b: (0, a[1] + b[1]), items)[1]" msgstr "" -#: ../../howto/functional.rst:1146 +#: ../../howto/functional.rst:1147 msgid "" "You can figure it out, but it takes time to disentangle the expression to " "figure out what's going on. Using a short nested ``def`` statements makes " "things a little bit better::" msgstr "" -#: ../../howto/functional.rst:1150 +#: ../../howto/functional.rst:1151 msgid "" "import functools\n" "def combine(a, b):\n" @@ -1626,70 +1626,70 @@ msgid "" "total = functools.reduce(combine, items)[1]" msgstr "" -#: ../../howto/functional.rst:1156 +#: ../../howto/functional.rst:1157 msgid "But it would be best of all if I had simply used a ``for`` loop::" msgstr "" -#: ../../howto/functional.rst:1158 +#: ../../howto/functional.rst:1159 msgid "" "total = 0\n" "for a, b in items:\n" " total += b" msgstr "" -#: ../../howto/functional.rst:1162 +#: ../../howto/functional.rst:1163 msgid "Or the :func:`sum` built-in and a generator expression::" msgstr "" -#: ../../howto/functional.rst:1164 +#: ../../howto/functional.rst:1165 msgid "total = sum(b for a, b in items)" msgstr "" -#: ../../howto/functional.rst:1166 +#: ../../howto/functional.rst:1167 msgid "" "Many uses of :func:`functools.reduce` are clearer when written as ``for`` " "loops." msgstr "" -#: ../../howto/functional.rst:1168 +#: ../../howto/functional.rst:1169 msgid "" "Fredrik Lundh once suggested the following set of rules for refactoring uses " "of ``lambda``:" msgstr "" -#: ../../howto/functional.rst:1171 +#: ../../howto/functional.rst:1172 msgid "Write a lambda function." msgstr "" -#: ../../howto/functional.rst:1172 +#: ../../howto/functional.rst:1173 msgid "Write a comment explaining what the heck that lambda does." msgstr "" -#: ../../howto/functional.rst:1173 +#: ../../howto/functional.rst:1174 msgid "" "Study the comment for a while, and think of a name that captures the essence " "of the comment." msgstr "" -#: ../../howto/functional.rst:1175 +#: ../../howto/functional.rst:1176 msgid "Convert the lambda to a def statement, using that name." msgstr "" -#: ../../howto/functional.rst:1176 +#: ../../howto/functional.rst:1177 msgid "Remove the comment." msgstr "" -#: ../../howto/functional.rst:1178 +#: ../../howto/functional.rst:1179 msgid "" "I really like these rules, but you're free to disagree about whether this " "lambda-free style is better." msgstr "" -#: ../../howto/functional.rst:1183 +#: ../../howto/functional.rst:1184 msgid "Revision History and Acknowledgements" msgstr "" -#: ../../howto/functional.rst:1185 +#: ../../howto/functional.rst:1186 msgid "" "This HOWTO was originally written by A. M. Kuchling. The author would like " "to thank the following people for offering suggestions, corrections and " @@ -1698,40 +1698,40 @@ msgid "" "Jussi Salmela, Collin Winter, Blake Winton." msgstr "" -#: ../../howto/functional.rst:1191 +#: ../../howto/functional.rst:1192 msgid "Version 0.1: posted June 30 2006." msgstr "" -#: ../../howto/functional.rst:1193 +#: ../../howto/functional.rst:1194 msgid "Version 0.11: posted July 1 2006. Typo fixes." msgstr "" -#: ../../howto/functional.rst:1195 +#: ../../howto/functional.rst:1196 msgid "" "Version 0.2: posted July 10 2006. Merged genexp and listcomp sections into " "one. Typo fixes." msgstr "" -#: ../../howto/functional.rst:1198 +#: ../../howto/functional.rst:1199 msgid "" "Version 0.21: Added more references suggested on the tutor mailing list." msgstr "" -#: ../../howto/functional.rst:1200 +#: ../../howto/functional.rst:1201 msgid "" "Version 0.30: Adds a section on the ``functional`` module written by Collin " "Winter; adds short section on the operator module; a few other edits." msgstr "" -#: ../../howto/functional.rst:1205 +#: ../../howto/functional.rst:1206 msgid "References" msgstr "" -#: ../../howto/functional.rst:1208 +#: ../../howto/functional.rst:1209 msgid "General" msgstr "" -#: ../../howto/functional.rst:1210 +#: ../../howto/functional.rst:1211 msgid "" "**Structure and Interpretation of Computer Programs**, by Harold Abelson and " "Gerald Jay Sussman with Julie Sussman. The book can be found at https://" @@ -1742,39 +1742,39 @@ msgid "" "functional-style Python code." msgstr "" -#: ../../howto/functional.rst:1218 +#: ../../howto/functional.rst:1219 msgid "" "https://defmacro.org/2006/06/19/fp.html: A general introduction to " "functional programming that uses Java examples and has a lengthy historical " "introduction." msgstr "" -#: ../../howto/functional.rst:1221 +#: ../../howto/functional.rst:1222 msgid "" "https://en.wikipedia.org/wiki/Functional_programming: General Wikipedia " "entry describing functional programming." msgstr "" -#: ../../howto/functional.rst:1224 +#: ../../howto/functional.rst:1225 msgid "https://en.wikipedia.org/wiki/Coroutine: Entry for coroutines." msgstr "" -#: ../../howto/functional.rst:1226 +#: ../../howto/functional.rst:1227 msgid "" "https://en.wikipedia.org/wiki/Partial_application: Entry for the concept of " "partial function application." msgstr "" -#: ../../howto/functional.rst:1228 +#: ../../howto/functional.rst:1229 msgid "" "https://en.wikipedia.org/wiki/Currying: Entry for the concept of currying." msgstr "" -#: ../../howto/functional.rst:1231 +#: ../../howto/functional.rst:1232 msgid "Python-specific" msgstr "" -#: ../../howto/functional.rst:1233 +#: ../../howto/functional.rst:1234 msgid "" "https://gnosis.cx/TPiP/: The first chapter of David Mertz's book :title-" "reference:`Text Processing in Python` discusses functional programming for " @@ -1782,7 +1782,7 @@ msgid "" "Text Processing\"." msgstr "" -#: ../../howto/functional.rst:1238 +#: ../../howto/functional.rst:1239 msgid "" "Mertz also wrote a 3-part series of articles on functional programming for " "IBM's DeveloperWorks site; see `part 1 `__." msgstr "" -#: ../../howto/functional.rst:1246 +#: ../../howto/functional.rst:1247 msgid "Python documentation" msgstr "" -#: ../../howto/functional.rst:1248 +#: ../../howto/functional.rst:1249 msgid "Documentation for the :mod:`itertools` module." msgstr "" -#: ../../howto/functional.rst:1250 +#: ../../howto/functional.rst:1251 msgid "Documentation for the :mod:`functools` module." msgstr "" -#: ../../howto/functional.rst:1252 +#: ../../howto/functional.rst:1253 msgid "Documentation for the :mod:`operator` module." msgstr "" -#: ../../howto/functional.rst:1254 +#: ../../howto/functional.rst:1255 msgid ":pep:`289`: \"Generator Expressions\"" msgstr "" -#: ../../howto/functional.rst:1256 +#: ../../howto/functional.rst:1257 msgid "" ":pep:`342`: \"Coroutines via Enhanced Generators\" describes the new " "generator features in Python 2.5." diff --git a/howto/functional.po~ b/howto/functional.po~ new file mode 100644 index 00000000..8179d511 --- /dev/null +++ b/howto/functional.po~ @@ -0,0 +1,1822 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../howto/functional.rst:5 +msgid "Functional Programming HOWTO" +msgstr "" + +#: ../../howto/functional.rst:7 +msgid "" +"In this document, we'll take a tour of Python's features suitable for " +"implementing programs in a functional style. After an introduction to the " +"concepts of functional programming, we'll look at language features such as :" +"term:`iterator`\\s and :term:`generator`\\s and relevant library modules " +"such as :mod:`itertools` and :mod:`functools`." +msgstr "" + +#: ../../howto/functional.rst:15 +msgid "Introduction" +msgstr "Einführung" + +#: ../../howto/functional.rst:17 +msgid "" +"This section explains the basic concept of functional programming; if you're " +"just interested in learning about Python language features, skip to the next " +"section on :ref:`functional-howto-iterators`." +msgstr "" + +#: ../../howto/functional.rst:21 +msgid "" +"Programming languages support decomposing problems in several different ways:" +msgstr "" + +#: ../../howto/functional.rst:23 +msgid "" +"Most programming languages are **procedural**: programs are lists of " +"instructions that tell the computer what to do with the program's input. C, " +"Pascal, and even Unix shells are procedural languages." +msgstr "" + +#: ../../howto/functional.rst:27 +msgid "" +"In **declarative** languages, you write a specification that describes the " +"problem to be solved, and the language implementation figures out how to " +"perform the computation efficiently. SQL is the declarative language you're " +"most likely to be familiar with; a SQL query describes the data set you want " +"to retrieve, and the SQL engine decides whether to scan tables or use " +"indexes, which subclauses should be performed first, etc." +msgstr "" + +#: ../../howto/functional.rst:34 +msgid "" +"**Object-oriented** programs manipulate collections of objects. Objects " +"have internal state and support methods that query or modify this internal " +"state in some way. Smalltalk and Java are object-oriented languages. C++ " +"and Python are languages that support object-oriented programming, but don't " +"force the use of object-oriented features." +msgstr "" + +#: ../../howto/functional.rst:40 +msgid "" +"**Functional** programming decomposes a problem into a set of functions. " +"Ideally, functions only take inputs and produce outputs, and don't have any " +"internal state that affects the output produced for a given input. Well-" +"known functional languages include the ML family (Standard ML, OCaml, and " +"other variants) and Haskell." +msgstr "" + +#: ../../howto/functional.rst:46 +msgid "" +"The designers of some computer languages choose to emphasize one particular " +"approach to programming. This often makes it difficult to write programs " +"that use a different approach. Other languages are multi-paradigm languages " +"that support several different approaches. Lisp, C++, and Python are multi-" +"paradigm; you can write programs or libraries that are largely procedural, " +"object-oriented, or functional in all of these languages. In a large " +"program, different sections might be written using different approaches; the " +"GUI might be object-oriented while the processing logic is procedural or " +"functional, for example." +msgstr "" + +#: ../../howto/functional.rst:57 +msgid "" +"In a functional program, input flows through a set of functions. Each " +"function operates on its input and produces some output. Functional style " +"discourages functions with side effects that modify internal state or make " +"other changes that aren't visible in the function's return value. Functions " +"that have no side effects at all are called **purely functional**. Avoiding " +"side effects means not using data structures that get updated as a program " +"runs; every function's output must only depend on its input." +msgstr "" + +#: ../../howto/functional.rst:65 +msgid "" +"Some languages are very strict about purity and don't even have assignment " +"statements such as ``a=3`` or ``c = a + b``, but it's difficult to avoid all " +"side effects, such as printing to the screen or writing to a disk file. " +"Another example is a call to the :func:`print` or :func:`time.sleep` " +"function, neither of which returns a useful value. Both are called only for " +"their side effects of sending some text to the screen or pausing execution " +"for a second." +msgstr "" + +#: ../../howto/functional.rst:72 +msgid "" +"Python programs written in functional style usually won't go to the extreme " +"of avoiding all I/O or all assignments; instead, they'll provide a " +"functional-appearing interface but will use non-functional features " +"internally. For example, the implementation of a function will still use " +"assignments to local variables, but won't modify global variables or have " +"other side effects." +msgstr "" + +#: ../../howto/functional.rst:78 +msgid "" +"Functional programming can be considered the opposite of object-oriented " +"programming. Objects are little capsules containing some internal state " +"along with a collection of method calls that let you modify this state, and " +"programs consist of making the right set of state changes. Functional " +"programming wants to avoid state changes as much as possible and works with " +"data flowing between functions. In Python you might combine the two " +"approaches by writing functions that take and return instances representing " +"objects in your application (e-mail messages, transactions, etc.)." +msgstr "" + +#: ../../howto/functional.rst:87 +msgid "" +"Functional design may seem like an odd constraint to work under. Why should " +"you avoid objects and side effects? There are theoretical and practical " +"advantages to the functional style:" +msgstr "" + +#: ../../howto/functional.rst:91 +msgid "Formal provability." +msgstr "" + +#: ../../howto/functional.rst:92 +msgid "Modularity." +msgstr "" + +#: ../../howto/functional.rst:93 +msgid "Composability." +msgstr "" + +#: ../../howto/functional.rst:94 +msgid "Ease of debugging and testing." +msgstr "" + +#: ../../howto/functional.rst:98 +msgid "Formal provability" +msgstr "" + +#: ../../howto/functional.rst:100 +msgid "" +"A theoretical benefit is that it's easier to construct a mathematical proof " +"that a functional program is correct." +msgstr "" + +#: ../../howto/functional.rst:103 +msgid "" +"For a long time researchers have been interested in finding ways to " +"mathematically prove programs correct. This is different from testing a " +"program on numerous inputs and concluding that its output is usually " +"correct, or reading a program's source code and concluding that the code " +"looks right; the goal is instead a rigorous proof that a program produces " +"the right result for all possible inputs." +msgstr "" + +#: ../../howto/functional.rst:110 +msgid "" +"The technique used to prove programs correct is to write down " +"**invariants**, properties of the input data and of the program's variables " +"that are always true. For each line of code, you then show that if " +"invariants X and Y are true **before** the line is executed, the slightly " +"different invariants X' and Y' are true **after** the line is executed. " +"This continues until you reach the end of the program, at which point the " +"invariants should match the desired conditions on the program's output." +msgstr "" + +#: ../../howto/functional.rst:118 +msgid "" +"Functional programming's avoidance of assignments arose because assignments " +"are difficult to handle with this technique; assignments can break " +"invariants that were true before the assignment without producing any new " +"invariants that can be propagated onward." +msgstr "" + +#: ../../howto/functional.rst:123 +msgid "" +"Unfortunately, proving programs correct is largely impractical and not " +"relevant to Python software. Even trivial programs require proofs that are " +"several pages long; the proof of correctness for a moderately complicated " +"program would be enormous, and few or none of the programs you use daily " +"(the Python interpreter, your XML parser, your web browser) could be proven " +"correct. Even if you wrote down or generated a proof, there would then be " +"the question of verifying the proof; maybe there's an error in it, and you " +"wrongly believe you've proved the program correct." +msgstr "" + +#: ../../howto/functional.rst:134 +msgid "Modularity" +msgstr "" + +#: ../../howto/functional.rst:136 +msgid "" +"A more practical benefit of functional programming is that it forces you to " +"break apart your problem into small pieces. Programs are more modular as a " +"result. It's easier to specify and write a small function that does one " +"thing than a large function that performs a complicated transformation. " +"Small functions are also easier to read and to check for errors." +msgstr "" + +#: ../../howto/functional.rst:144 +msgid "Ease of debugging and testing" +msgstr "" + +#: ../../howto/functional.rst:146 +msgid "Testing and debugging a functional-style program is easier." +msgstr "" + +#: ../../howto/functional.rst:148 +msgid "" +"Debugging is simplified because functions are generally small and clearly " +"specified. When a program doesn't work, each function is an interface point " +"where you can check that the data are correct. You can look at the " +"intermediate inputs and outputs to quickly isolate the function that's " +"responsible for a bug." +msgstr "" + +#: ../../howto/functional.rst:153 +msgid "" +"Testing is easier because each function is a potential subject for a unit " +"test. Functions don't depend on system state that needs to be replicated " +"before running a test; instead you only have to synthesize the right input " +"and then check that the output matches expectations." +msgstr "" + +#: ../../howto/functional.rst:160 +msgid "Composability" +msgstr "" + +#: ../../howto/functional.rst:162 +msgid "" +"As you work on a functional-style program, you'll write a number of " +"functions with varying inputs and outputs. Some of these functions will be " +"unavoidably specialized to a particular application, but others will be " +"useful in a wide variety of programs. For example, a function that takes a " +"directory path and returns all the XML files in the directory, or a function " +"that takes a filename and returns its contents, can be applied to many " +"different situations." +msgstr "" + +#: ../../howto/functional.rst:169 +msgid "" +"Over time you'll form a personal library of utilities. Often you'll " +"assemble new programs by arranging existing functions in a new configuration " +"and writing a few functions specialized for the current task." +msgstr "" + +#: ../../howto/functional.rst:177 +msgid "Iterators" +msgstr "" + +#: ../../howto/functional.rst:179 +msgid "" +"I'll start by looking at a Python language feature that's an important " +"foundation for writing functional-style programs: iterators." +msgstr "" + +#: ../../howto/functional.rst:182 +msgid "" +"An iterator is an object representing a stream of data; this object returns " +"the data one element at a time. A Python iterator must support a method " +"called :meth:`~iterator.__next__` that takes no arguments and always returns " +"the next element of the stream. If there are no more elements in the " +"stream, :meth:`~iterator.__next__` must raise the :exc:`StopIteration` " +"exception. Iterators don't have to be finite, though; it's perfectly " +"reasonable to write an iterator that produces an infinite stream of data." +msgstr "" + +#: ../../howto/functional.rst:190 +msgid "" +"The built-in :func:`iter` function takes an arbitrary object and tries to " +"return an iterator that will return the object's contents or elements, " +"raising :exc:`TypeError` if the object doesn't support iteration. Several " +"of Python's built-in data types support iteration, the most common being " +"lists and dictionaries. An object is called :term:`iterable` if you can get " +"an iterator for it." +msgstr "" + +#: ../../howto/functional.rst:197 +msgid "You can experiment with the iteration interface manually:" +msgstr "" + +#: ../../howto/functional.rst:215 +msgid "" +"Python expects iterable objects in several different contexts, the most " +"important being the :keyword:`for` statement. In the statement ``for X in " +"Y``, Y must be an iterator or some object for which :func:`iter` can create " +"an iterator. These two statements are equivalent::" +msgstr "" + +#: ../../howto/functional.rst:221 +msgid "" +"for i in iter(obj):\n" +" print(i)\n" +"\n" +"for i in obj:\n" +" print(i)" +msgstr "" + +#: ../../howto/functional.rst:227 +msgid "" +"Iterators can be materialized as lists or tuples by using the :func:`list` " +"or :func:`tuple` constructor functions:" +msgstr "" + +#: ../../howto/functional.rst:236 +msgid "" +"Sequence unpacking also supports iterators: if you know an iterator will " +"return N elements, you can unpack them into an N-tuple:" +msgstr "" + +#: ../../howto/functional.rst:245 +msgid "" +"Built-in functions such as :func:`max` and :func:`min` can take a single " +"iterator argument and will return the largest or smallest element. The " +"``\"in\"`` and ``\"not in\"`` operators also support iterators: ``X in " +"iterator`` is true if X is found in the stream returned by the iterator. " +"You'll run into obvious problems if the iterator is infinite; :func:`max`, :" +"func:`min` will never return, and if the element X never appears in the " +"stream, the ``\"in\"`` and ``\"not in\"`` operators won't return either." +msgstr "" + +#: ../../howto/functional.rst:253 +msgid "" +"Note that you can only go forward in an iterator; there's no way to get the " +"previous element, reset the iterator, or make a copy of it. Iterator " +"objects can optionally provide these additional capabilities, but the " +"iterator protocol only specifies the :meth:`~iterator.__next__` method. " +"Functions may therefore consume all of the iterator's output, and if you " +"need to do something different with the same stream, you'll have to create a " +"new iterator." +msgstr "" + +#: ../../howto/functional.rst:263 +msgid "Data Types That Support Iterators" +msgstr "" + +#: ../../howto/functional.rst:265 +msgid "" +"We've already seen how lists and tuples support iterators. In fact, any " +"Python sequence type, such as strings, will automatically support creation " +"of an iterator." +msgstr "" + +#: ../../howto/functional.rst:269 +msgid "" +"Calling :func:`iter` on a dictionary returns an iterator that will loop over " +"the dictionary's keys::" +msgstr "" + +#: ../../howto/functional.rst:272 +msgid "" +">>> m = {'Jan': 1, 'Feb': 2, 'Mar': 3, 'Apr': 4, 'May': 5, 'Jun': 6,\n" +"... 'Jul': 7, 'Aug': 8, 'Sep': 9, 'Oct': 10, 'Nov': 11, 'Dec': 12}\n" +">>> for key in m:\n" +"... print(key, m[key])\n" +"Jan 1\n" +"Feb 2\n" +"Mar 3\n" +"Apr 4\n" +"May 5\n" +"Jun 6\n" +"Jul 7\n" +"Aug 8\n" +"Sep 9\n" +"Oct 10\n" +"Nov 11\n" +"Dec 12" +msgstr "" + +#: ../../howto/functional.rst:289 +msgid "" +"Note that starting with Python 3.7, dictionary iteration order is guaranteed " +"to be the same as the insertion order. In earlier versions, the behaviour " +"was unspecified and could vary between implementations." +msgstr "" + +#: ../../howto/functional.rst:293 +msgid "" +"Applying :func:`iter` to a dictionary always loops over the keys, but " +"dictionaries have methods that return other iterators. If you want to " +"iterate over values or key/value pairs, you can explicitly call the :meth:" +"`~dict.values` or :meth:`~dict.items` methods to get an appropriate iterator." +msgstr "" + +#: ../../howto/functional.rst:299 +msgid "" +"The :func:`dict` constructor can accept an iterator that returns a finite " +"stream of ``(key, value)`` tuples:" +msgstr "" + +#: ../../howto/functional.rst:306 +msgid "" +"Files also support iteration by calling the :meth:`~io.TextIOBase.readline` " +"method until there are no more lines in the file. This means you can read " +"each line of a file like this::" +msgstr "" + +#: ../../howto/functional.rst:310 +msgid "" +"for line in file:\n" +" # do something for each line\n" +" ..." +msgstr "" + +#: ../../howto/functional.rst:314 +msgid "" +"Sets can take their contents from an iterable and let you iterate over the " +"set's elements::" +msgstr "" + +#: ../../howto/functional.rst:317 +msgid "" +">>> S = {2, 3, 5, 7, 11, 13}\n" +">>> for i in S:\n" +"... print(i)\n" +"2\n" +"3\n" +"5\n" +"7\n" +"11\n" +"13" +msgstr "" + +#: ../../howto/functional.rst:330 +msgid "Generator expressions and list comprehensions" +msgstr "" + +#: ../../howto/functional.rst:332 +msgid "" +"Two common operations on an iterator's output are 1) performing some " +"operation for every element, 2) selecting a subset of elements that meet " +"some condition. For example, given a list of strings, you might want to " +"strip off trailing whitespace from each line or extract all the strings " +"containing a given substring." +msgstr "" + +#: ../../howto/functional.rst:338 +msgid "" +"List comprehensions and generator expressions (short form: \"listcomps\" and " +"\"genexps\") are a concise notation for such operations, borrowed from the " +"functional programming language Haskell (https://www.haskell.org/). You can " +"strip all the whitespace from a stream of strings with the following code::" +msgstr "" + +#: ../../howto/functional.rst:343 +msgid "" +">>> line_list = [' line 1\\n', 'line 2 \\n', ' \\n', '']\n" +"\n" +">>> # Generator expression -- returns iterator\n" +">>> stripped_iter = (line.strip() for line in line_list)\n" +"\n" +">>> # List comprehension -- returns list\n" +">>> stripped_list = [line.strip() for line in line_list]" +msgstr "" + +#: ../../howto/functional.rst:351 +msgid "" +"You can select only certain elements by adding an ``\"if\"`` condition::" +msgstr "" + +#: ../../howto/functional.rst:353 +msgid "" +">>> stripped_list = [line.strip() for line in line_list\n" +"... if line != \"\"]" +msgstr "" + +#: ../../howto/functional.rst:356 +msgid "" +"With a list comprehension, you get back a Python list; ``stripped_list`` is " +"a list containing the resulting lines, not an iterator. Generator " +"expressions return an iterator that computes the values as necessary, not " +"needing to materialize all the values at once. This means that list " +"comprehensions aren't useful if you're working with iterators that return an " +"infinite stream or a very large amount of data. Generator expressions are " +"preferable in these situations." +msgstr "" + +#: ../../howto/functional.rst:363 +msgid "" +"Generator expressions are surrounded by parentheses (\"()\") and list " +"comprehensions are surrounded by square brackets (\"[]\"). Generator " +"expressions have the form::" +msgstr "" + +#: ../../howto/functional.rst:367 +msgid "" +"( expression for expr in sequence1\n" +" if condition1\n" +" for expr2 in sequence2\n" +" if condition2\n" +" for expr3 in sequence3\n" +" if condition3\n" +" ...\n" +" for exprN in sequenceN\n" +" if conditionN )" +msgstr "" + +#: ../../howto/functional.rst:377 +msgid "" +"Again, for a list comprehension only the outside brackets are different " +"(square brackets instead of parentheses)." +msgstr "" + +#: ../../howto/functional.rst:380 +msgid "" +"The elements of the generated output will be the successive values of " +"``expression``. The ``if`` clauses are all optional; if present, " +"``expression`` is only evaluated and added to the result when ``condition`` " +"is true." +msgstr "" + +#: ../../howto/functional.rst:384 +msgid "" +"Generator expressions always have to be written inside parentheses, but the " +"parentheses signalling a function call also count. If you want to create an " +"iterator that will be immediately passed to a function you can write::" +msgstr "" + +#: ../../howto/functional.rst:388 +msgid "obj_total = sum(obj.count for obj in list_all_objects())" +msgstr "" + +#: ../../howto/functional.rst:390 +msgid "" +"The ``for...in`` clauses contain the sequences to be iterated over. The " +"sequences do not have to be the same length, because they are iterated over " +"from left to right, **not** in parallel. For each element in ``sequence1``, " +"``sequence2`` is looped over from the beginning. ``sequence3`` is then " +"looped over for each resulting pair of elements from ``sequence1`` and " +"``sequence2``." +msgstr "" + +#: ../../howto/functional.rst:396 +msgid "" +"To put it another way, a list comprehension or generator expression is " +"equivalent to the following Python code::" +msgstr "" + +#: ../../howto/functional.rst:399 +msgid "" +"for expr1 in sequence1:\n" +" if not (condition1):\n" +" continue # Skip this element\n" +" for expr2 in sequence2:\n" +" if not (condition2):\n" +" continue # Skip this element\n" +" ...\n" +" for exprN in sequenceN:\n" +" if not (conditionN):\n" +" continue # Skip this element\n" +"\n" +" # Output the value of\n" +" # the expression." +msgstr "" + +#: ../../howto/functional.rst:413 +msgid "" +"This means that when there are multiple ``for...in`` clauses but no ``if`` " +"clauses, the length of the resulting output will be equal to the product of " +"the lengths of all the sequences. If you have two lists of length 3, the " +"output list is 9 elements long:" +msgstr "" + +#: ../../howto/functional.rst:425 +msgid "" +"To avoid introducing an ambiguity into Python's grammar, if ``expression`` " +"is creating a tuple, it must be surrounded with parentheses. The first list " +"comprehension below is a syntax error, while the second one is correct::" +msgstr "" + +#: ../../howto/functional.rst:429 +msgid "" +"# Syntax error\n" +"[x, y for x in seq1 for y in seq2]\n" +"# Correct\n" +"[(x, y) for x in seq1 for y in seq2]" +msgstr "" + +#: ../../howto/functional.rst:436 +msgid "Generators" +msgstr "" + +#: ../../howto/functional.rst:438 +msgid "" +"Generators are a special class of functions that simplify the task of " +"writing iterators. Regular functions compute a value and return it, but " +"generators return an iterator that returns a stream of values." +msgstr "" + +#: ../../howto/functional.rst:442 +msgid "" +"You're doubtless familiar with how regular function calls work in Python or " +"C. When you call a function, it gets a private namespace where its local " +"variables are created. When the function reaches a ``return`` statement, " +"the local variables are destroyed and the value is returned to the caller. " +"A later call to the same function creates a new private namespace and a " +"fresh set of local variables. But, what if the local variables weren't " +"thrown away on exiting a function? What if you could later resume the " +"function where it left off? This is what generators provide; they can be " +"thought of as resumable functions." +msgstr "" + +#: ../../howto/functional.rst:451 +msgid "Here's the simplest example of a generator function:" +msgstr "" + +#: ../../howto/functional.rst:457 +msgid "" +"Any function containing a :keyword:`yield` keyword is a generator function; " +"this is detected by Python's :term:`bytecode` compiler which compiles the " +"function specially as a result." +msgstr "" + +#: ../../howto/functional.rst:461 +msgid "" +"When you call a generator function, it doesn't return a single value; " +"instead it returns a generator object that supports the iterator protocol. " +"On executing the ``yield`` expression, the generator outputs the value of " +"``i``, similar to a ``return`` statement. The big difference between " +"``yield`` and a ``return`` statement is that on reaching a ``yield`` the " +"generator's state of execution is suspended and local variables are " +"preserved. On the next call to the generator's :meth:`~generator.__next__` " +"method, the function will resume executing." +msgstr "" + +#: ../../howto/functional.rst:470 +msgid "Here's a sample usage of the ``generate_ints()`` generator:" +msgstr "" + +#: ../../howto/functional.rst:487 +msgid "" +"You could equally write ``for i in generate_ints(5)``, or ``a, b, c = " +"generate_ints(3)``." +msgstr "" + +#: ../../howto/functional.rst:490 +msgid "" +"Inside a generator function, ``return value`` causes " +"``StopIteration(value)`` to be raised from the :meth:`~generator.__next__` " +"method. Once this happens, or the bottom of the function is reached, the " +"procession of values ends and the generator cannot yield any further values." +msgstr "" + +#: ../../howto/functional.rst:495 +msgid "" +"You could achieve the effect of generators manually by writing your own " +"class and storing all the local variables of the generator as instance " +"variables. For example, returning a list of integers could be done by " +"setting ``self.count`` to 0, and having the :meth:`~iterator.__next__` " +"method increment ``self.count`` and return it. However, for a moderately " +"complicated generator, writing a corresponding class can be much messier." +msgstr "" + +#: ../../howto/functional.rst:503 +msgid "" +"The test suite included with Python's library, :source:`Lib/test/" +"test_generators.py`, contains a number of more interesting examples. Here's " +"one generator that implements an in-order traversal of a tree using " +"generators recursively. ::" +msgstr "" + +#: ../../howto/functional.rst:508 +msgid "" +"# A recursive generator that generates Tree leaves in in-order.\n" +"def inorder(t):\n" +" if t:\n" +" for x in inorder(t.left):\n" +" yield x\n" +"\n" +" yield t.label\n" +"\n" +" for x in inorder(t.right):\n" +" yield x" +msgstr "" + +#: ../../howto/functional.rst:519 +msgid "" +"Two other examples in ``test_generators.py`` produce solutions for the N-" +"Queens problem (placing N queens on an NxN chess board so that no queen " +"threatens another) and the Knight's Tour (finding a route that takes a " +"knight to every square of an NxN chessboard without visiting any square " +"twice)." +msgstr "" + +#: ../../howto/functional.rst:527 +msgid "Passing values into a generator" +msgstr "" + +#: ../../howto/functional.rst:529 +msgid "" +"In Python 2.4 and earlier, generators only produced output. Once a " +"generator's code was invoked to create an iterator, there was no way to pass " +"any new information into the function when its execution is resumed. You " +"could hack together this ability by making the generator look at a global " +"variable or by passing in some mutable object that callers then modify, but " +"these approaches are messy." +msgstr "" + +#: ../../howto/functional.rst:536 +msgid "" +"In Python 2.5 there's a simple way to pass values into a generator. :keyword:" +"`yield` became an expression, returning a value that can be assigned to a " +"variable or otherwise operated on::" +msgstr "" + +#: ../../howto/functional.rst:540 +msgid "val = (yield i)" +msgstr "" + +#: ../../howto/functional.rst:542 +msgid "" +"I recommend that you **always** put parentheses around a ``yield`` " +"expression when you're doing something with the returned value, as in the " +"above example. The parentheses aren't always necessary, but it's easier to " +"always add them instead of having to remember when they're needed." +msgstr "" + +#: ../../howto/functional.rst:547 +msgid "" +"(:pep:`342` explains the exact rules, which are that a ``yield``-expression " +"must always be parenthesized except when it occurs at the top-level " +"expression on the right-hand side of an assignment. This means you can " +"write ``val = yield i`` but have to use parentheses when there's an " +"operation, as in ``val = (yield i) + 12``.)" +msgstr "" + +#: ../../howto/functional.rst:553 +msgid "" +"Values are sent into a generator by calling its :meth:`send(value) " +"` method. This method resumes the generator's code and the " +"``yield`` expression returns the specified value. If the regular :meth:" +"`~generator.__next__` method is called, the ``yield`` returns ``None``." +msgstr "" + +#: ../../howto/functional.rst:558 +msgid "" +"Here's a simple counter that increments by 1 and allows changing the value " +"of the internal counter." +msgstr "" + +#: ../../howto/functional.rst:561 +msgid "" +"def counter(maximum):\n" +" i = 0\n" +" while i < maximum:\n" +" val = (yield i)\n" +" # If value provided, change counter\n" +" if val is not None:\n" +" i = val\n" +" else:\n" +" i += 1" +msgstr "" + +#: ../../howto/functional.rst:573 +msgid "And here's an example of changing the counter:" +msgstr "" + +#: ../../howto/functional.rst:590 +msgid "" +"Because ``yield`` will often be returning ``None``, you should always check " +"for this case. Don't just use its value in expressions unless you're sure " +"that the :meth:`~generator.send` method will be the only method used to " +"resume your generator function." +msgstr "" + +#: ../../howto/functional.rst:595 +msgid "" +"In addition to :meth:`~generator.send`, there are two other methods on " +"generators:" +msgstr "" + +#: ../../howto/functional.rst:598 +msgid "" +":meth:`throw(value) ` is used to raise an exception inside " +"the generator; the exception is raised by the ``yield`` expression where the " +"generator's execution is paused." +msgstr "" + +#: ../../howto/functional.rst:602 +msgid "" +":meth:`~generator.close` sends a :exc:`GeneratorExit` exception to the " +"generator to terminate the iteration. On receiving this exception, the " +"generator's code must either raise :exc:`GeneratorExit` or :exc:" +"`StopIteration`; catching the exception and doing anything else is illegal " +"and will trigger a :exc:`RuntimeError`. :meth:`~generator.close` will also " +"be called by Python's garbage collector when the generator is garbage-" +"collected." +msgstr "" + +#: ../../howto/functional.rst:610 +msgid "" +"If you need to run cleanup code when a :exc:`GeneratorExit` occurs, I " +"suggest using a ``try: ... finally:`` suite instead of catching :exc:" +"`GeneratorExit`." +msgstr "" + +#: ../../howto/functional.rst:613 +msgid "" +"The cumulative effect of these changes is to turn generators from one-way " +"producers of information into both producers and consumers." +msgstr "" + +#: ../../howto/functional.rst:616 +msgid "" +"Generators also become **coroutines**, a more generalized form of " +"subroutines. Subroutines are entered at one point and exited at another " +"point (the top of the function, and a ``return`` statement), but coroutines " +"can be entered, exited, and resumed at many different points (the ``yield`` " +"statements)." +msgstr "" + +#: ../../howto/functional.rst:623 +msgid "Built-in functions" +msgstr "" + +#: ../../howto/functional.rst:625 +msgid "" +"Let's look in more detail at built-in functions often used with iterators." +msgstr "" + +#: ../../howto/functional.rst:627 +msgid "" +"Two of Python's built-in functions, :func:`map` and :func:`filter` duplicate " +"the features of generator expressions:" +msgstr "" + +#: ../../howto/functional.rst:630 +msgid "" +":func:`map(f, iterA, iterB, ...) ` returns an iterator over the sequence" +msgstr "" + +#: ../../howto/functional.rst:631 +msgid "" +"``f(iterA[0], iterB[0]), f(iterA[1], iterB[1]), f(iterA[2], iterB[2]), ...``." +msgstr "" + +#: ../../howto/functional.rst:641 +msgid "You can of course achieve the same effect with a list comprehension." +msgstr "" + +#: ../../howto/functional.rst:643 +msgid "" +":func:`filter(predicate, iter) ` returns an iterator over all the " +"sequence elements that meet a certain condition, and is similarly duplicated " +"by list comprehensions. A **predicate** is a function that returns the " +"truth value of some condition; for use with :func:`filter`, the predicate " +"must take a single value." +msgstr "" + +#: ../../howto/functional.rst:656 +msgid "This can also be written as a list comprehension:" +msgstr "" + +#: ../../howto/functional.rst:662 +msgid "" +":func:`enumerate(iter, start=0) ` counts off the elements in the " +"iterable returning 2-tuples containing the count (from *start*) and each " +"element. ::" +msgstr "" + +#: ../../howto/functional.rst:666 +msgid "" +">>> for item in enumerate(['subject', 'verb', 'object']):\n" +"... print(item)\n" +"(0, 'subject')\n" +"(1, 'verb')\n" +"(2, 'object')" +msgstr "" + +#: ../../howto/functional.rst:672 +msgid "" +":func:`enumerate` is often used when looping through a list and recording " +"the indexes at which certain conditions are met::" +msgstr "" + +#: ../../howto/functional.rst:675 +msgid "" +"f = open('data.txt', 'r')\n" +"for i, line in enumerate(f):\n" +" if line.strip() == '':\n" +" print('Blank line at line #%i' % i)" +msgstr "" + +#: ../../howto/functional.rst:680 +msgid "" +":func:`sorted(iterable, key=None, reverse=False) ` collects all the " +"elements of the iterable into a list, sorts the list, and returns the sorted " +"result. The *key* and *reverse* arguments are passed through to the " +"constructed list's :meth:`~list.sort` method. ::" +msgstr "" + +#: ../../howto/functional.rst:685 +msgid "" +">>> import random\n" +">>> # Generate 8 random numbers between [0, 10000)\n" +">>> rand_list = random.sample(range(10000), 8)\n" +">>> rand_list\n" +"[769, 7953, 9828, 6431, 8442, 9878, 6213, 2207]\n" +">>> sorted(rand_list)\n" +"[769, 2207, 6213, 6431, 7953, 8442, 9828, 9878]\n" +">>> sorted(rand_list, reverse=True)\n" +"[9878, 9828, 8442, 7953, 6431, 6213, 2207, 769]" +msgstr "" + +#: ../../howto/functional.rst:695 +msgid "" +"(For a more detailed discussion of sorting, see the :ref:`sortinghowto`.)" +msgstr "" + +#: ../../howto/functional.rst:698 +msgid "" +"The :func:`any(iter) ` and :func:`all(iter) ` built-ins look at " +"the truth values of an iterable's contents. :func:`any` returns ``True`` if " +"any element in the iterable is a true value, and :func:`all` returns " +"``True`` if all of the elements are true values:" +msgstr "" + +#: ../../howto/functional.rst:717 +msgid "" +":func:`zip(iterA, iterB, ...) ` takes one element from each iterable " +"and returns them in a tuple::" +msgstr "" + +#: ../../howto/functional.rst:720 +msgid "" +"zip(['a', 'b', 'c'], (1, 2, 3)) =>\n" +" ('a', 1), ('b', 2), ('c', 3)" +msgstr "" + +#: ../../howto/functional.rst:723 +msgid "" +"It doesn't construct an in-memory list and exhaust all the input iterators " +"before returning; instead tuples are constructed and returned only if " +"they're requested. (The technical term for this behaviour is `lazy " +"evaluation `__.)" +msgstr "" + +#: ../../howto/functional.rst:728 +msgid "" +"This iterator is intended to be used with iterables that are all of the same " +"length. If the iterables are of different lengths, the resulting stream " +"will be the same length as the shortest iterable. ::" +msgstr "" + +#: ../../howto/functional.rst:732 +msgid "" +"zip(['a', 'b'], (1, 2, 3)) =>\n" +" ('a', 1), ('b', 2)" +msgstr "" + +#: ../../howto/functional.rst:735 +msgid "" +"You should avoid doing this, though, because an element may be taken from " +"the longer iterators and discarded. This means you can't go on to use the " +"iterators further because you risk skipping a discarded element." +msgstr "" + +#: ../../howto/functional.rst:741 +msgid "The itertools module" +msgstr "" + +#: ../../howto/functional.rst:743 +msgid "" +"The :mod:`itertools` module contains a number of commonly used iterators as " +"well as functions for combining several iterators. This section will " +"introduce the module's contents by showing small examples." +msgstr "" + +#: ../../howto/functional.rst:747 +msgid "The module's functions fall into a few broad classes:" +msgstr "" + +#: ../../howto/functional.rst:749 +msgid "Functions that create a new iterator based on an existing iterator." +msgstr "" + +#: ../../howto/functional.rst:750 +msgid "Functions for treating an iterator's elements as function arguments." +msgstr "" + +#: ../../howto/functional.rst:751 +msgid "Functions for selecting portions of an iterator's output." +msgstr "" + +#: ../../howto/functional.rst:752 +msgid "A function for grouping an iterator's output." +msgstr "" + +#: ../../howto/functional.rst:755 +msgid "Creating new iterators" +msgstr "" + +#: ../../howto/functional.rst:757 +msgid "" +":func:`itertools.count(start, step) ` returns an infinite " +"stream of evenly spaced values. You can optionally supply the starting " +"number, which defaults to 0, and the interval between numbers, which " +"defaults to 1::" +msgstr "" + +#: ../../howto/functional.rst:761 +msgid "" +"itertools.count() =>\n" +" 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...\n" +"itertools.count(10) =>\n" +" 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ...\n" +"itertools.count(10, 5) =>\n" +" 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, ..." +msgstr "" + +#: ../../howto/functional.rst:768 +msgid "" +":func:`itertools.cycle(iter) ` saves a copy of the contents " +"of a provided iterable and returns a new iterator that returns its elements " +"from first to last. The new iterator will repeat these elements " +"infinitely. ::" +msgstr "" + +#: ../../howto/functional.rst:772 +msgid "" +"itertools.cycle([1, 2, 3, 4, 5]) =>\n" +" 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, ..." +msgstr "" + +#: ../../howto/functional.rst:775 +msgid "" +":func:`itertools.repeat(elem, [n]) ` returns the provided " +"element *n* times, or returns the element endlessly if *n* is not " +"provided. ::" +msgstr "" + +#: ../../howto/functional.rst:778 +msgid "" +"itertools.repeat('abc') =>\n" +" abc, abc, abc, abc, abc, abc, abc, abc, abc, abc, ...\n" +"itertools.repeat('abc', 5) =>\n" +" abc, abc, abc, abc, abc" +msgstr "" + +#: ../../howto/functional.rst:783 +msgid "" +":func:`itertools.chain(iterA, iterB, ...) ` takes an " +"arbitrary number of iterables as input, and returns all the elements of the " +"first iterator, then all the elements of the second, and so on, until all of " +"the iterables have been exhausted. ::" +msgstr "" + +#: ../../howto/functional.rst:788 +msgid "" +"itertools.chain(['a', 'b', 'c'], (1, 2, 3)) =>\n" +" a, b, c, 1, 2, 3" +msgstr "" + +#: ../../howto/functional.rst:791 +msgid "" +":func:`itertools.islice(iter, [start], stop, [step]) ` " +"returns a stream that's a slice of the iterator. With a single *stop* " +"argument, it will return the first *stop* elements. If you supply a " +"starting index, you'll get *stop-start* elements, and if you supply a value " +"for *step*, elements will be skipped accordingly. Unlike Python's string " +"and list slicing, you can't use negative values for *start*, *stop*, or " +"*step*. ::" +msgstr "" + +#: ../../howto/functional.rst:798 +msgid "" +"itertools.islice(range(10), 8) =>\n" +" 0, 1, 2, 3, 4, 5, 6, 7\n" +"itertools.islice(range(10), 2, 8) =>\n" +" 2, 3, 4, 5, 6, 7\n" +"itertools.islice(range(10), 2, 8, 2) =>\n" +" 2, 4, 6" +msgstr "" + +#: ../../howto/functional.rst:805 +msgid "" +":func:`itertools.tee(iter, [n]) ` replicates an iterator; it " +"returns *n* independent iterators that will all return the contents of the " +"source iterator. If you don't supply a value for *n*, the default is 2. " +"Replicating iterators requires saving some of the contents of the source " +"iterator, so this can consume significant memory if the iterator is large " +"and one of the new iterators is consumed more than the others. ::" +msgstr "" + +#: ../../howto/functional.rst:813 +msgid "" +"itertools.tee( itertools.count() ) =>\n" +" iterA, iterB\n" +"\n" +"where iterA ->\n" +" 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...\n" +"\n" +"and iterB ->\n" +" 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ..." +msgstr "" + +#: ../../howto/functional.rst:824 +msgid "Calling functions on elements" +msgstr "" + +#: ../../howto/functional.rst:826 +msgid "" +"The :mod:`operator` module contains a set of functions corresponding to " +"Python's operators. Some examples are :func:`operator.add(a, b) ` (adds two values), :func:`operator.ne(a, b) ` (same as " +"``a != b``), and :func:`operator.attrgetter('id') ` " +"(returns a callable that fetches the ``.id`` attribute)." +msgstr "" + +#: ../../howto/functional.rst:832 +msgid "" +":func:`itertools.starmap(func, iter) ` assumes that the " +"iterable will return a stream of tuples, and calls *func* using these tuples " +"as the arguments::" +msgstr "" + +#: ../../howto/functional.rst:836 +msgid "" +"itertools.starmap(os.path.join,\n" +" [('/bin', 'python'), ('/usr', 'bin', 'java'),\n" +" ('/usr', 'bin', 'perl'), ('/usr', 'bin', 'ruby')])\n" +"=>\n" +" /bin/python, /usr/bin/java, /usr/bin/perl, /usr/bin/ruby" +msgstr "" + +#: ../../howto/functional.rst:844 +msgid "Selecting elements" +msgstr "" + +#: ../../howto/functional.rst:846 +msgid "" +"Another group of functions chooses a subset of an iterator's elements based " +"on a predicate." +msgstr "" + +#: ../../howto/functional.rst:849 +msgid "" +":func:`itertools.filterfalse(predicate, iter) ` is " +"the opposite of :func:`filter`, returning all elements for which the " +"predicate returns false::" +msgstr "" + +#: ../../howto/functional.rst:853 +msgid "" +"itertools.filterfalse(is_even, itertools.count()) =>\n" +" 1, 3, 5, 7, 9, 11, 13, 15, ..." +msgstr "" + +#: ../../howto/functional.rst:856 +msgid "" +":func:`itertools.takewhile(predicate, iter) ` returns " +"elements for as long as the predicate returns true. Once the predicate " +"returns false, the iterator will signal the end of its results. ::" +msgstr "" + +#: ../../howto/functional.rst:860 +msgid "" +"def less_than_10(x):\n" +" return x < 10\n" +"\n" +"itertools.takewhile(less_than_10, itertools.count()) =>\n" +" 0, 1, 2, 3, 4, 5, 6, 7, 8, 9\n" +"\n" +"itertools.takewhile(is_even, itertools.count()) =>\n" +" 0" +msgstr "" + +#: ../../howto/functional.rst:869 +msgid "" +":func:`itertools.dropwhile(predicate, iter) ` discards " +"elements while the predicate returns true, and then returns the rest of the " +"iterable's results. ::" +msgstr "" + +#: ../../howto/functional.rst:873 +msgid "" +"itertools.dropwhile(less_than_10, itertools.count()) =>\n" +" 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, ...\n" +"\n" +"itertools.dropwhile(is_even, itertools.count()) =>\n" +" 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ..." +msgstr "" + +#: ../../howto/functional.rst:879 +msgid "" +":func:`itertools.compress(data, selectors) ` takes two " +"iterators and returns only those elements of *data* for which the " +"corresponding element of *selectors* is true, stopping whenever either one " +"is exhausted::" +msgstr "" + +#: ../../howto/functional.rst:883 +msgid "" +"itertools.compress([1, 2, 3, 4, 5], [True, True, False, False, True]) =>\n" +" 1, 2, 5" +msgstr "" + +#: ../../howto/functional.rst:888 +msgid "Combinatoric functions" +msgstr "" + +#: ../../howto/functional.rst:890 +msgid "" +"The :func:`itertools.combinations(iterable, r) ` " +"returns an iterator giving all possible *r*-tuple combinations of the " +"elements contained in *iterable*. ::" +msgstr "" + +#: ../../howto/functional.rst:894 +msgid "" +"itertools.combinations([1, 2, 3, 4, 5], 2) =>\n" +" (1, 2), (1, 3), (1, 4), (1, 5),\n" +" (2, 3), (2, 4), (2, 5),\n" +" (3, 4), (3, 5),\n" +" (4, 5)\n" +"\n" +"itertools.combinations([1, 2, 3, 4, 5], 3) =>\n" +" (1, 2, 3), (1, 2, 4), (1, 2, 5), (1, 3, 4), (1, 3, 5), (1, 4, 5),\n" +" (2, 3, 4), (2, 3, 5), (2, 4, 5),\n" +" (3, 4, 5)" +msgstr "" + +#: ../../howto/functional.rst:905 +msgid "" +"The elements within each tuple remain in the same order as *iterable* " +"returned them. For example, the number 1 is always before 2, 3, 4, or 5 in " +"the examples above. A similar function, :func:`itertools." +"permutations(iterable, r=None) `, removes this " +"constraint on the order, returning all possible arrangements of length *r*::" +msgstr "" + +#: ../../howto/functional.rst:912 +msgid "" +"itertools.permutations([1, 2, 3, 4, 5], 2) =>\n" +" (1, 2), (1, 3), (1, 4), (1, 5),\n" +" (2, 1), (2, 3), (2, 4), (2, 5),\n" +" (3, 1), (3, 2), (3, 4), (3, 5),\n" +" (4, 1), (4, 2), (4, 3), (4, 5),\n" +" (5, 1), (5, 2), (5, 3), (5, 4)\n" +"\n" +"itertools.permutations([1, 2, 3, 4, 5]) =>\n" +" (1, 2, 3, 4, 5), (1, 2, 3, 5, 4), (1, 2, 4, 3, 5),\n" +" ...\n" +" (5, 4, 3, 2, 1)" +msgstr "" + +#: ../../howto/functional.rst:924 +msgid "" +"If you don't supply a value for *r* the length of the iterable is used, " +"meaning that all the elements are permuted." +msgstr "" + +#: ../../howto/functional.rst:927 +msgid "" +"Note that these functions produce all of the possible combinations by " +"position and don't require that the contents of *iterable* are unique::" +msgstr "" + +#: ../../howto/functional.rst:930 +msgid "" +"itertools.permutations('aba', 3) =>\n" +" ('a', 'b', 'a'), ('a', 'a', 'b'), ('b', 'a', 'a'),\n" +" ('b', 'a', 'a'), ('a', 'a', 'b'), ('a', 'b', 'a')" +msgstr "" + +#: ../../howto/functional.rst:934 +msgid "" +"The identical tuple ``('a', 'a', 'b')`` occurs twice, but the two 'a' " +"strings came from different positions." +msgstr "" + +#: ../../howto/functional.rst:937 +msgid "" +"The :func:`itertools.combinations_with_replacement(iterable, r) ` function relaxes a different constraint: " +"elements can be repeated within a single tuple. Conceptually an element is " +"selected for the first position of each tuple and then is replaced before " +"the second element is selected. ::" +msgstr "" + +#: ../../howto/functional.rst:943 +msgid "" +"itertools.combinations_with_replacement([1, 2, 3, 4, 5], 2) =>\n" +" (1, 1), (1, 2), (1, 3), (1, 4), (1, 5),\n" +" (2, 2), (2, 3), (2, 4), (2, 5),\n" +" (3, 3), (3, 4), (3, 5),\n" +" (4, 4), (4, 5),\n" +" (5, 5)" +msgstr "" + +#: ../../howto/functional.rst:952 +msgid "Grouping elements" +msgstr "" + +#: ../../howto/functional.rst:954 +msgid "" +"The last function I'll discuss, :func:`itertools.groupby(iter, " +"key_func=None) `, is the most complicated. " +"``key_func(elem)`` is a function that can compute a key value for each " +"element returned by the iterable. If you don't supply a key function, the " +"key is simply each element itself." +msgstr "" + +#: ../../howto/functional.rst:959 +msgid "" +":func:`~itertools.groupby` collects all the consecutive elements from the " +"underlying iterable that have the same key value, and returns a stream of 2-" +"tuples containing a key value and an iterator for the elements with that key." +msgstr "" + +#: ../../howto/functional.rst:965 +msgid "" +"city_list = [('Decatur', 'AL'), ('Huntsville', 'AL'), ('Selma', 'AL'),\n" +" ('Anchorage', 'AK'), ('Nome', 'AK'),\n" +" ('Flagstaff', 'AZ'), ('Phoenix', 'AZ'), ('Tucson', 'AZ'),\n" +" ...\n" +" ]\n" +"\n" +"def get_state(city_state):\n" +" return city_state[1]\n" +"\n" +"itertools.groupby(city_list, get_state) =>\n" +" ('AL', iterator-1),\n" +" ('AK', iterator-2),\n" +" ('AZ', iterator-3), ...\n" +"\n" +"where\n" +"iterator-1 =>\n" +" ('Decatur', 'AL'), ('Huntsville', 'AL'), ('Selma', 'AL')\n" +"iterator-2 =>\n" +" ('Anchorage', 'AK'), ('Nome', 'AK')\n" +"iterator-3 =>\n" +" ('Flagstaff', 'AZ'), ('Phoenix', 'AZ'), ('Tucson', 'AZ')" +msgstr "" + +#: ../../howto/functional.rst:987 +msgid "" +":func:`~itertools.groupby` assumes that the underlying iterable's contents " +"will already be sorted based on the key. Note that the returned iterators " +"also use the underlying iterable, so you have to consume the results of " +"iterator-1 before requesting iterator-2 and its corresponding key." +msgstr "" + +#: ../../howto/functional.rst:994 +msgid "The functools module" +msgstr "" + +#: ../../howto/functional.rst:996 +msgid "" +"The :mod:`functools` module contains some higher-order functions. A **higher-" +"order function** takes one or more functions as input and returns a new " +"function. The most useful tool in this module is the :func:`functools." +"partial` function." +msgstr "" + +#: ../../howto/functional.rst:1001 +msgid "" +"For programs written in a functional style, you'll sometimes want to " +"construct variants of existing functions that have some of the parameters " +"filled in. Consider a Python function ``f(a, b, c)``; you may wish to create " +"a new function ``g(b, c)`` that's equivalent to ``f(1, b, c)``; you're " +"filling in a value for one of ``f()``'s parameters. This is called " +"\"partial function application\"." +msgstr "" + +#: ../../howto/functional.rst:1007 +msgid "" +"The constructor for :func:`~functools.partial` takes the arguments " +"``(function, arg1, arg2, ..., kwarg1=value1, kwarg2=value2)``. The " +"resulting object is callable, so you can just call it to invoke ``function`` " +"with the filled-in arguments." +msgstr "" + +#: ../../howto/functional.rst:1012 +msgid "Here's a small but realistic example::" +msgstr "" + +#: ../../howto/functional.rst:1014 +msgid "" +"import functools\n" +"\n" +"def log(message, subsystem):\n" +" \"\"\"Write the contents of 'message' to the specified subsystem.\"\"\"\n" +" print('%s: %s' % (subsystem, message))\n" +" ...\n" +"\n" +"server_log = functools.partial(log, subsystem='server')\n" +"server_log('Unable to open socket')" +msgstr "" + +#: ../../howto/functional.rst:1024 +msgid "" +":func:`functools.reduce(func, iter, [initial_value]) ` " +"cumulatively performs an operation on all the iterable's elements and, " +"therefore, can't be applied to infinite iterables. *func* must be a function " +"that takes two elements and returns a single value. :func:`functools." +"reduce` takes the first two elements A and B returned by the iterator and " +"calculates ``func(A, B)``. It then requests the third element, C, " +"calculates ``func(func(A, B), C)``, combines this result with the fourth " +"element returned, and continues until the iterable is exhausted. If the " +"iterable returns no values at all, a :exc:`TypeError` exception is raised. " +"If the initial value is supplied, it's used as a starting point and " +"``func(initial_value, A)`` is the first calculation. ::" +msgstr "" + +#: ../../howto/functional.rst:1036 +msgid "" +">>> import operator, functools\n" +">>> functools.reduce(operator.concat, ['A', 'BB', 'C'])\n" +"'ABBC'\n" +">>> functools.reduce(operator.concat, [])\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: reduce() of empty iterable with no initial value\n" +">>> functools.reduce(operator.mul, [1, 2, 3], 1)\n" +"6\n" +">>> functools.reduce(operator.mul, [], 1)\n" +"1" +msgstr "" + +#: ../../howto/functional.rst:1048 +msgid "" +"If you use :func:`operator.add` with :func:`functools.reduce`, you'll add up " +"all the elements of the iterable. This case is so common that there's a " +"special built-in called :func:`sum` to compute it:" +msgstr "" + +#: ../../howto/functional.rst:1060 +msgid "" +"For many uses of :func:`functools.reduce`, though, it can be clearer to just " +"write the obvious :keyword:`for` loop::" +msgstr "" + +#: ../../howto/functional.rst:1063 +msgid "" +"import functools\n" +"# Instead of:\n" +"product = functools.reduce(operator.mul, [1, 2, 3], 1)\n" +"\n" +"# You can write:\n" +"product = 1\n" +"for i in [1, 2, 3]:\n" +" product *= i" +msgstr "" + +#: ../../howto/functional.rst:1072 +msgid "" +"A related function is :func:`itertools.accumulate(iterable, func=operator." +"add) `. It performs the same calculation, but instead " +"of returning only the final result, :func:`~itertools.accumulate` returns an " +"iterator that also yields each partial result::" +msgstr "" + +#: ../../howto/functional.rst:1077 +msgid "" +"itertools.accumulate([1, 2, 3, 4, 5]) =>\n" +" 1, 3, 6, 10, 15\n" +"\n" +"itertools.accumulate([1, 2, 3, 4, 5], operator.mul) =>\n" +" 1, 2, 6, 24, 120" +msgstr "" + +#: ../../howto/functional.rst:1085 +msgid "The operator module" +msgstr "" + +#: ../../howto/functional.rst:1087 +msgid "" +"The :mod:`operator` module was mentioned earlier. It contains a set of " +"functions corresponding to Python's operators. These functions are often " +"useful in functional-style code because they save you from writing trivial " +"functions that perform a single operation." +msgstr "" + +#: ../../howto/functional.rst:1092 +msgid "Some of the functions in this module are:" +msgstr "" + +#: ../../howto/functional.rst:1094 +msgid "" +"Math operations: ``add()``, ``sub()``, ``mul()``, ``floordiv()``, " +"``abs()``, ..." +msgstr "" + +#: ../../howto/functional.rst:1095 +msgid "Logical operations: ``not_()``, ``truth()``." +msgstr "" + +#: ../../howto/functional.rst:1096 +msgid "Bitwise operations: ``and_()``, ``or_()``, ``invert()``." +msgstr "" + +#: ../../howto/functional.rst:1097 +msgid "" +"Comparisons: ``eq()``, ``ne()``, ``lt()``, ``le()``, ``gt()``, and ``ge()``." +msgstr "" + +#: ../../howto/functional.rst:1098 +msgid "Object identity: ``is_()``, ``is_not()``." +msgstr "" + +#: ../../howto/functional.rst:1100 +msgid "Consult the operator module's documentation for a complete list." +msgstr "" + +#: ../../howto/functional.rst:1104 +msgid "Small functions and the lambda expression" +msgstr "" + +#: ../../howto/functional.rst:1106 +msgid "" +"When writing functional-style programs, you'll often need little functions " +"that act as predicates or that combine elements in some way." +msgstr "" + +#: ../../howto/functional.rst:1109 +msgid "" +"If there's a Python built-in or a module function that's suitable, you don't " +"need to define a new function at all::" +msgstr "" + +#: ../../howto/functional.rst:1112 +msgid "" +"stripped_lines = [line.strip() for line in lines]\n" +"existing_files = filter(os.path.exists, file_list)" +msgstr "" + +#: ../../howto/functional.rst:1115 +msgid "" +"If the function you need doesn't exist, you need to write it. One way to " +"write small functions is to use the :keyword:`lambda` expression. " +"``lambda`` takes a number of parameters and an expression combining these " +"parameters, and creates an anonymous function that returns the value of the " +"expression::" +msgstr "" + +#: ../../howto/functional.rst:1120 +msgid "" +"adder = lambda x, y: x+y\n" +"\n" +"print_assign = lambda name, value: name + '=' + str(value)" +msgstr "" + +#: ../../howto/functional.rst:1124 +msgid "" +"An alternative is to just use the ``def`` statement and define a function in " +"the usual way::" +msgstr "" + +#: ../../howto/functional.rst:1127 +msgid "" +"def adder(x, y):\n" +" return x + y\n" +"\n" +"def print_assign(name, value):\n" +" return name + '=' + str(value)" +msgstr "" + +#: ../../howto/functional.rst:1133 +msgid "" +"Which alternative is preferable? That's a style question; my usual course " +"is to avoid using ``lambda``." +msgstr "" + +#: ../../howto/functional.rst:1136 +msgid "" +"One reason for my preference is that ``lambda`` is quite limited in the " +"functions it can define. The result has to be computable as a single " +"expression, which means you can't have multiway ``if... elif... else`` " +"comparisons or ``try... except`` statements. If you try to do too much in a " +"``lambda`` statement, you'll end up with an overly complicated expression " +"that's hard to read. Quick, what's the following code doing? ::" +msgstr "" + +#: ../../howto/functional.rst:1143 +msgid "" +"import functools\n" +"total = functools.reduce(lambda a, b: (0, a[1] + b[1]), items)[1]" +msgstr "" + +#: ../../howto/functional.rst:1146 +msgid "" +"You can figure it out, but it takes time to disentangle the expression to " +"figure out what's going on. Using a short nested ``def`` statements makes " +"things a little bit better::" +msgstr "" + +#: ../../howto/functional.rst:1150 +msgid "" +"import functools\n" +"def combine(a, b):\n" +" return 0, a[1] + b[1]\n" +"\n" +"total = functools.reduce(combine, items)[1]" +msgstr "" + +#: ../../howto/functional.rst:1156 +msgid "But it would be best of all if I had simply used a ``for`` loop::" +msgstr "" + +#: ../../howto/functional.rst:1158 +msgid "" +"total = 0\n" +"for a, b in items:\n" +" total += b" +msgstr "" + +#: ../../howto/functional.rst:1162 +msgid "Or the :func:`sum` built-in and a generator expression::" +msgstr "" + +#: ../../howto/functional.rst:1164 +msgid "total = sum(b for a, b in items)" +msgstr "" + +#: ../../howto/functional.rst:1166 +msgid "" +"Many uses of :func:`functools.reduce` are clearer when written as ``for`` " +"loops." +msgstr "" + +#: ../../howto/functional.rst:1168 +msgid "" +"Fredrik Lundh once suggested the following set of rules for refactoring uses " +"of ``lambda``:" +msgstr "" + +#: ../../howto/functional.rst:1171 +msgid "Write a lambda function." +msgstr "" + +#: ../../howto/functional.rst:1172 +msgid "Write a comment explaining what the heck that lambda does." +msgstr "" + +#: ../../howto/functional.rst:1173 +msgid "" +"Study the comment for a while, and think of a name that captures the essence " +"of the comment." +msgstr "" + +#: ../../howto/functional.rst:1175 +msgid "Convert the lambda to a def statement, using that name." +msgstr "" + +#: ../../howto/functional.rst:1176 +msgid "Remove the comment." +msgstr "" + +#: ../../howto/functional.rst:1178 +msgid "" +"I really like these rules, but you're free to disagree about whether this " +"lambda-free style is better." +msgstr "" + +#: ../../howto/functional.rst:1183 +msgid "Revision History and Acknowledgements" +msgstr "" + +#: ../../howto/functional.rst:1185 +msgid "" +"This HOWTO was originally written by A. M. Kuchling. The author would like " +"to thank the following people for offering suggestions, corrections and " +"assistance with various drafts of this article: Ian Bicking, Nick Coghlan, " +"Nick Efford, Raymond Hettinger, Jim Jewett, Mike Krell, Leandro Lameiro, " +"Jussi Salmela, Collin Winter, Blake Winton." +msgstr "" + +#: ../../howto/functional.rst:1191 +msgid "Version 0.1: posted June 30 2006." +msgstr "" + +#: ../../howto/functional.rst:1193 +msgid "Version 0.11: posted July 1 2006. Typo fixes." +msgstr "" + +#: ../../howto/functional.rst:1195 +msgid "" +"Version 0.2: posted July 10 2006. Merged genexp and listcomp sections into " +"one. Typo fixes." +msgstr "" + +#: ../../howto/functional.rst:1198 +msgid "" +"Version 0.21: Added more references suggested on the tutor mailing list." +msgstr "" + +#: ../../howto/functional.rst:1200 +msgid "" +"Version 0.30: Adds a section on the ``functional`` module written by Collin " +"Winter; adds short section on the operator module; a few other edits." +msgstr "" + +#: ../../howto/functional.rst:1205 +msgid "References" +msgstr "" + +#: ../../howto/functional.rst:1208 +msgid "General" +msgstr "" + +#: ../../howto/functional.rst:1210 +msgid "" +"**Structure and Interpretation of Computer Programs**, by Harold Abelson and " +"Gerald Jay Sussman with Julie Sussman. The book can be found at https://" +"mitpress.mit.edu/sicp. In this classic textbook of computer science, " +"chapters 2 and 3 discuss the use of sequences and streams to organize the " +"data flow inside a program. The book uses Scheme for its examples, but many " +"of the design approaches described in these chapters are applicable to " +"functional-style Python code." +msgstr "" + +#: ../../howto/functional.rst:1218 +msgid "" +"https://defmacro.org/2006/06/19/fp.html: A general introduction to " +"functional programming that uses Java examples and has a lengthy historical " +"introduction." +msgstr "" + +#: ../../howto/functional.rst:1221 +msgid "" +"https://en.wikipedia.org/wiki/Functional_programming: General Wikipedia " +"entry describing functional programming." +msgstr "" + +#: ../../howto/functional.rst:1224 +msgid "https://en.wikipedia.org/wiki/Coroutine: Entry for coroutines." +msgstr "" + +#: ../../howto/functional.rst:1226 +msgid "" +"https://en.wikipedia.org/wiki/Partial_application: Entry for the concept of " +"partial function application." +msgstr "" + +#: ../../howto/functional.rst:1228 +msgid "" +"https://en.wikipedia.org/wiki/Currying: Entry for the concept of currying." +msgstr "" + +#: ../../howto/functional.rst:1231 +msgid "Python-specific" +msgstr "" + +#: ../../howto/functional.rst:1233 +msgid "" +"https://gnosis.cx/TPiP/: The first chapter of David Mertz's book :title-" +"reference:`Text Processing in Python` discusses functional programming for " +"text processing, in the section titled \"Utilizing Higher-Order Functions in " +"Text Processing\"." +msgstr "" + +#: ../../howto/functional.rst:1238 +msgid "" +"Mertz also wrote a 3-part series of articles on functional programming for " +"IBM's DeveloperWorks site; see `part 1 `__, `part 2 " +"`__, and `part 3 `__." +msgstr "" + +#: ../../howto/functional.rst:1246 +msgid "Python documentation" +msgstr "" + +#: ../../howto/functional.rst:1248 +msgid "Documentation for the :mod:`itertools` module." +msgstr "" + +#: ../../howto/functional.rst:1250 +msgid "Documentation for the :mod:`functools` module." +msgstr "" + +#: ../../howto/functional.rst:1252 +msgid "Documentation for the :mod:`operator` module." +msgstr "" + +#: ../../howto/functional.rst:1254 +msgid ":pep:`289`: \"Generator Expressions\"" +msgstr "" + +#: ../../howto/functional.rst:1256 +msgid "" +":pep:`342`: \"Coroutines via Enhanced Generators\" describes the new " +"generator features in Python 2.5." +msgstr "" + +#~ msgid "Release" +#~ msgstr "Release" diff --git a/howto/ipaddress.po b/howto/ipaddress.po index 63192471..3a67b2d4 100644 --- a/howto/ipaddress.po +++ b/howto/ipaddress.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -21,7 +21,7 @@ msgstr "" msgid "An introduction to the ipaddress module" msgstr "" -#: ../../howto/ipaddress.rst:-1 +#: ../../howto/ipaddress.rst:11 msgid "Overview" msgstr "" diff --git a/howto/ipaddress.po~ b/howto/ipaddress.po~ new file mode 100644 index 00000000..63192471 --- /dev/null +++ b/howto/ipaddress.po~ @@ -0,0 +1,472 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../howto/ipaddress.rst:9 +msgid "An introduction to the ipaddress module" +msgstr "" + +#: ../../howto/ipaddress.rst:-1 +msgid "Overview" +msgstr "" + +#: ../../howto/ipaddress.rst:13 +msgid "" +"This document aims to provide a gentle introduction to the :mod:`ipaddress` " +"module. It is aimed primarily at users that aren't already familiar with IP " +"networking terminology, but may also be useful to network engineers wanting " +"an overview of how :mod:`ipaddress` represents IP network addressing " +"concepts." +msgstr "" + +#: ../../howto/ipaddress.rst:21 +msgid "Creating Address/Network/Interface objects" +msgstr "" + +#: ../../howto/ipaddress.rst:23 +msgid "" +"Since :mod:`ipaddress` is a module for inspecting and manipulating IP " +"addresses, the first thing you'll want to do is create some objects. You " +"can use :mod:`ipaddress` to create objects from strings and integers." +msgstr "" + +#: ../../howto/ipaddress.rst:29 +msgid "A Note on IP Versions" +msgstr "" + +#: ../../howto/ipaddress.rst:31 +msgid "" +"For readers that aren't particularly familiar with IP addressing, it's " +"important to know that the Internet Protocol (IP) is currently in the " +"process of moving from version 4 of the protocol to version 6. This " +"transition is occurring largely because version 4 of the protocol doesn't " +"provide enough addresses to handle the needs of the whole world, especially " +"given the increasing number of devices with direct connections to the " +"internet." +msgstr "" + +#: ../../howto/ipaddress.rst:38 +msgid "" +"Explaining the details of the differences between the two versions of the " +"protocol is beyond the scope of this introduction, but readers need to at " +"least be aware that these two versions exist, and it will sometimes be " +"necessary to force the use of one version or the other." +msgstr "" + +#: ../../howto/ipaddress.rst:45 +msgid "IP Host Addresses" +msgstr "" + +#: ../../howto/ipaddress.rst:47 +msgid "" +"Addresses, often referred to as \"host addresses\" are the most basic unit " +"when working with IP addressing. The simplest way to create addresses is to " +"use the :func:`ipaddress.ip_address` factory function, which automatically " +"determines whether to create an IPv4 or IPv6 address based on the passed in " +"value:" +msgstr "" + +#: ../../howto/ipaddress.rst:58 +msgid "" +"Addresses can also be created directly from integers. Values that will fit " +"within 32 bits are assumed to be IPv4 addresses::" +msgstr "" + +#: ../../howto/ipaddress.rst:61 +msgid "" +">>> ipaddress.ip_address(3221225985)\n" +"IPv4Address('192.0.2.1')\n" +">>> ipaddress.ip_address(42540766411282592856903984951653826561)\n" +"IPv6Address('2001:db8::1')" +msgstr "" + +#: ../../howto/ipaddress.rst:66 +msgid "" +"To force the use of IPv4 or IPv6 addresses, the relevant classes can be " +"invoked directly. This is particularly useful to force creation of IPv6 " +"addresses for small integers::" +msgstr "" + +#: ../../howto/ipaddress.rst:70 +msgid "" +">>> ipaddress.ip_address(1)\n" +"IPv4Address('0.0.0.1')\n" +">>> ipaddress.IPv4Address(1)\n" +"IPv4Address('0.0.0.1')\n" +">>> ipaddress.IPv6Address(1)\n" +"IPv6Address('::1')" +msgstr "" + +#: ../../howto/ipaddress.rst:79 +msgid "Defining Networks" +msgstr "" + +#: ../../howto/ipaddress.rst:81 +msgid "" +"Host addresses are usually grouped together into IP networks, so :mod:" +"`ipaddress` provides a way to create, inspect and manipulate network " +"definitions. IP network objects are constructed from strings that define the " +"range of host addresses that are part of that network. The simplest form for " +"that information is a \"network address/network prefix\" pair, where the " +"prefix defines the number of leading bits that are compared to determine " +"whether or not an address is part of the network and the network address " +"defines the expected value of those bits." +msgstr "" + +#: ../../howto/ipaddress.rst:90 +msgid "" +"As for addresses, a factory function is provided that determines the correct " +"IP version automatically::" +msgstr "" + +#: ../../howto/ipaddress.rst:93 +msgid "" +">>> ipaddress.ip_network('192.0.2.0/24')\n" +"IPv4Network('192.0.2.0/24')\n" +">>> ipaddress.ip_network('2001:db8::0/96')\n" +"IPv6Network('2001:db8::/96')" +msgstr "" + +#: ../../howto/ipaddress.rst:98 +msgid "" +"Network objects cannot have any host bits set. The practical effect of this " +"is that ``192.0.2.1/24`` does not describe a network. Such definitions are " +"referred to as interface objects since the ip-on-a-network notation is " +"commonly used to describe network interfaces of a computer on a given " +"network and are described further in the next section." +msgstr "" + +#: ../../howto/ipaddress.rst:104 +msgid "" +"By default, attempting to create a network object with host bits set will " +"result in :exc:`ValueError` being raised. To request that the additional " +"bits instead be coerced to zero, the flag ``strict=False`` can be passed to " +"the constructor::" +msgstr "" + +#: ../../howto/ipaddress.rst:109 +msgid "" +">>> ipaddress.ip_network('192.0.2.1/24')\n" +"Traceback (most recent call last):\n" +" ...\n" +"ValueError: 192.0.2.1/24 has host bits set\n" +">>> ipaddress.ip_network('192.0.2.1/24', strict=False)\n" +"IPv4Network('192.0.2.0/24')" +msgstr "" + +#: ../../howto/ipaddress.rst:116 +msgid "" +"While the string form offers significantly more flexibility, networks can " +"also be defined with integers, just like host addresses. In this case, the " +"network is considered to contain only the single address identified by the " +"integer, so the network prefix includes the entire network address::" +msgstr "" + +#: ../../howto/ipaddress.rst:121 +msgid "" +">>> ipaddress.ip_network(3221225984)\n" +"IPv4Network('192.0.2.0/32')\n" +">>> ipaddress.ip_network(42540766411282592856903984951653826560)\n" +"IPv6Network('2001:db8::/128')" +msgstr "" + +#: ../../howto/ipaddress.rst:126 +msgid "" +"As with addresses, creation of a particular kind of network can be forced by " +"calling the class constructor directly instead of using the factory function." +msgstr "" + +#: ../../howto/ipaddress.rst:132 +msgid "Host Interfaces" +msgstr "" + +#: ../../howto/ipaddress.rst:134 +msgid "" +"As mentioned just above, if you need to describe an address on a particular " +"network, neither the address nor the network classes are sufficient. " +"Notation like ``192.0.2.1/24`` is commonly used by network engineers and the " +"people who write tools for firewalls and routers as shorthand for \"the host " +"``192.0.2.1`` on the network ``192.0.2.0/24``\", Accordingly, :mod:" +"`ipaddress` provides a set of hybrid classes that associate an address with " +"a particular network. The interface for creation is identical to that for " +"defining network objects, except that the address portion isn't constrained " +"to being a network address." +msgstr "" + +#: ../../howto/ipaddress.rst:149 +msgid "" +"Integer inputs are accepted (as with networks), and use of a particular IP " +"version can be forced by calling the relevant constructor directly." +msgstr "" + +#: ../../howto/ipaddress.rst:154 +msgid "Inspecting Address/Network/Interface Objects" +msgstr "" + +#: ../../howto/ipaddress.rst:156 +msgid "" +"You've gone to the trouble of creating an IPv(4|6)(Address|Network|" +"Interface) object, so you probably want to get information about it. :mod:" +"`ipaddress` tries to make doing this easy and intuitive." +msgstr "" + +#: ../../howto/ipaddress.rst:160 +msgid "Extracting the IP version::" +msgstr "" + +#: ../../howto/ipaddress.rst:162 +msgid "" +">>> addr4 = ipaddress.ip_address('192.0.2.1')\n" +">>> addr6 = ipaddress.ip_address('2001:db8::1')\n" +">>> addr6.version\n" +"6\n" +">>> addr4.version\n" +"4" +msgstr "" + +#: ../../howto/ipaddress.rst:169 +msgid "Obtaining the network from an interface::" +msgstr "" + +#: ../../howto/ipaddress.rst:171 +msgid "" +">>> host4 = ipaddress.ip_interface('192.0.2.1/24')\n" +">>> host4.network\n" +"IPv4Network('192.0.2.0/24')\n" +">>> host6 = ipaddress.ip_interface('2001:db8::1/96')\n" +">>> host6.network\n" +"IPv6Network('2001:db8::/96')" +msgstr "" + +#: ../../howto/ipaddress.rst:178 +msgid "Finding out how many individual addresses are in a network::" +msgstr "" + +#: ../../howto/ipaddress.rst:180 +msgid "" +">>> net4 = ipaddress.ip_network('192.0.2.0/24')\n" +">>> net4.num_addresses\n" +"256\n" +">>> net6 = ipaddress.ip_network('2001:db8::0/96')\n" +">>> net6.num_addresses\n" +"4294967296" +msgstr "" + +#: ../../howto/ipaddress.rst:187 +msgid "Iterating through the \"usable\" addresses on a network::" +msgstr "" + +#: ../../howto/ipaddress.rst:189 +msgid "" +">>> net4 = ipaddress.ip_network('192.0.2.0/24')\n" +">>> for x in net4.hosts():\n" +"... print(x)\n" +"192.0.2.1\n" +"192.0.2.2\n" +"192.0.2.3\n" +"192.0.2.4\n" +"...\n" +"192.0.2.252\n" +"192.0.2.253\n" +"192.0.2.254" +msgstr "" + +#: ../../howto/ipaddress.rst:202 +msgid "" +"Obtaining the netmask (i.e. set bits corresponding to the network prefix) or " +"the hostmask (any bits that are not part of the netmask):" +msgstr "" + +#: ../../howto/ipaddress.rst:217 +msgid "Exploding or compressing the address::" +msgstr "" + +#: ../../howto/ipaddress.rst:219 +msgid "" +">>> addr6.exploded\n" +"'2001:0db8:0000:0000:0000:0000:0000:0001'\n" +">>> addr6.compressed\n" +"'2001:db8::1'\n" +">>> net6.exploded\n" +"'2001:0db8:0000:0000:0000:0000:0000:0000/96'\n" +">>> net6.compressed\n" +"'2001:db8::/96'" +msgstr "" + +#: ../../howto/ipaddress.rst:228 +msgid "" +"While IPv4 doesn't support explosion or compression, the associated objects " +"still provide the relevant properties so that version neutral code can " +"easily ensure the most concise or most verbose form is used for IPv6 " +"addresses while still correctly handling IPv4 addresses." +msgstr "" + +#: ../../howto/ipaddress.rst:235 +msgid "Networks as lists of Addresses" +msgstr "" + +#: ../../howto/ipaddress.rst:237 +msgid "" +"It's sometimes useful to treat networks as lists. This means it is possible " +"to index them like this::" +msgstr "" + +#: ../../howto/ipaddress.rst:240 +msgid "" +">>> net4[1]\n" +"IPv4Address('192.0.2.1')\n" +">>> net4[-1]\n" +"IPv4Address('192.0.2.255')\n" +">>> net6[1]\n" +"IPv6Address('2001:db8::1')\n" +">>> net6[-1]\n" +"IPv6Address('2001:db8::ffff:ffff')" +msgstr "" + +#: ../../howto/ipaddress.rst:250 +msgid "" +"It also means that network objects lend themselves to using the list " +"membership test syntax like this::" +msgstr "" + +#: ../../howto/ipaddress.rst:253 +msgid "" +"if address in network:\n" +" # do something" +msgstr "" + +#: ../../howto/ipaddress.rst:256 +msgid "Containment testing is done efficiently based on the network prefix::" +msgstr "" + +#: ../../howto/ipaddress.rst:258 +msgid "" +">>> addr4 = ipaddress.ip_address('192.0.2.1')\n" +">>> addr4 in ipaddress.ip_network('192.0.2.0/24')\n" +"True\n" +">>> addr4 in ipaddress.ip_network('192.0.3.0/24')\n" +"False" +msgstr "" + +#: ../../howto/ipaddress.rst:266 +msgid "Comparisons" +msgstr "" + +#: ../../howto/ipaddress.rst:268 +msgid "" +":mod:`ipaddress` provides some simple, hopefully intuitive ways to compare " +"objects, where it makes sense::" +msgstr "" + +#: ../../howto/ipaddress.rst:271 +msgid "" +">>> ipaddress.ip_address('192.0.2.1') < ipaddress.ip_address('192.0.2.2')\n" +"True" +msgstr "" + +#: ../../howto/ipaddress.rst:274 +msgid "" +"A :exc:`TypeError` exception is raised if you try to compare objects of " +"different versions or different types." +msgstr "" + +#: ../../howto/ipaddress.rst:279 +msgid "Using IP Addresses with other modules" +msgstr "" + +#: ../../howto/ipaddress.rst:281 +msgid "" +"Other modules that use IP addresses (such as :mod:`socket`) usually won't " +"accept objects from this module directly. Instead, they must be coerced to " +"an integer or string that the other module will accept::" +msgstr "" + +#: ../../howto/ipaddress.rst:285 +msgid "" +">>> addr4 = ipaddress.ip_address('192.0.2.1')\n" +">>> str(addr4)\n" +"'192.0.2.1'\n" +">>> int(addr4)\n" +"3221225985" +msgstr "" + +#: ../../howto/ipaddress.rst:293 +msgid "Getting more detail when instance creation fails" +msgstr "" + +#: ../../howto/ipaddress.rst:295 +msgid "" +"When creating address/network/interface objects using the version-agnostic " +"factory functions, any errors will be reported as :exc:`ValueError` with a " +"generic error message that simply says the passed in value was not " +"recognized as an object of that type. The lack of a specific error is " +"because it's necessary to know whether the value is *supposed* to be IPv4 or " +"IPv6 in order to provide more detail on why it has been rejected." +msgstr "" + +#: ../../howto/ipaddress.rst:302 +msgid "" +"To support use cases where it is useful to have access to this additional " +"detail, the individual class constructors actually raise the :exc:" +"`ValueError` subclasses :exc:`ipaddress.AddressValueError` and :exc:" +"`ipaddress.NetmaskValueError` to indicate exactly which part of the " +"definition failed to parse correctly." +msgstr "" + +#: ../../howto/ipaddress.rst:308 +msgid "" +"The error messages are significantly more detailed when using the class " +"constructors directly. For example::" +msgstr "" + +#: ../../howto/ipaddress.rst:311 +msgid "" +">>> ipaddress.ip_address(\"192.168.0.256\")\n" +"Traceback (most recent call last):\n" +" ...\n" +"ValueError: '192.168.0.256' does not appear to be an IPv4 or IPv6 address\n" +">>> ipaddress.IPv4Address(\"192.168.0.256\")\n" +"Traceback (most recent call last):\n" +" ...\n" +"ipaddress.AddressValueError: Octet 256 (> 255) not permitted in " +"'192.168.0.256'\n" +"\n" +">>> ipaddress.ip_network(\"192.168.0.1/64\")\n" +"Traceback (most recent call last):\n" +" ...\n" +"ValueError: '192.168.0.1/64' does not appear to be an IPv4 or IPv6 network\n" +">>> ipaddress.IPv4Network(\"192.168.0.1/64\")\n" +"Traceback (most recent call last):\n" +" ...\n" +"ipaddress.NetmaskValueError: '64' is not a valid netmask" +msgstr "" + +#: ../../howto/ipaddress.rst:329 +msgid "" +"However, both of the module specific exceptions have :exc:`ValueError` as " +"their parent class, so if you're not concerned with the particular type of " +"error, you can still write code like the following::" +msgstr "" + +#: ../../howto/ipaddress.rst:333 +msgid "" +"try:\n" +" network = ipaddress.IPv4Network(address)\n" +"except ValueError:\n" +" print('address/netmask is invalid for IPv4:', address)" +msgstr "" diff --git a/howto/isolating-extensions.po b/howto/isolating-extensions.po index eaeffa39..c6d65596 100644 --- a/howto/isolating-extensions.po +++ b/howto/isolating-extensions.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -25,7 +25,7 @@ msgstr "" msgid "Isolating Extension Modules" msgstr "" -#: ../../howto/isolating-extensions.rst:-1 +#: ../../howto/isolating-extensions.rst:9 msgid "Abstract" msgstr "" diff --git a/howto/isolating-extensions.po~ b/howto/isolating-extensions.po~ new file mode 100644 index 00000000..eaeffa39 --- /dev/null +++ b/howto/isolating-extensions.po~ @@ -0,0 +1,934 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../howto/isolating-extensions.rst:7 +msgid "Isolating Extension Modules" +msgstr "" + +#: ../../howto/isolating-extensions.rst:-1 +msgid "Abstract" +msgstr "" + +#: ../../howto/isolating-extensions.rst:11 +msgid "" +"Traditionally, state belonging to Python extension modules was kept in C " +"``static`` variables, which have process-wide scope. This document describes " +"problems of such per-process state and shows a safer way: per-module state." +msgstr "" + +#: ../../howto/isolating-extensions.rst:16 +msgid "" +"The document also describes how to switch to per-module state where " +"possible. This transition involves allocating space for that state, " +"potentially switching from static types to heap types, and—perhaps most " +"importantly—accessing per-module state from code." +msgstr "" + +#: ../../howto/isolating-extensions.rst:23 +msgid "Who should read this" +msgstr "" + +#: ../../howto/isolating-extensions.rst:25 +msgid "" +"This guide is written for maintainers of :ref:`C-API ` " +"extensions who would like to make that extension safer to use in " +"applications where Python itself is used as a library." +msgstr "" + +#: ../../howto/isolating-extensions.rst:31 +msgid "Background" +msgstr "" + +#: ../../howto/isolating-extensions.rst:33 +msgid "" +"An *interpreter* is the context in which Python code runs. It contains " +"configuration (e.g. the import path) and runtime state (e.g. the set of " +"imported modules)." +msgstr "" + +#: ../../howto/isolating-extensions.rst:37 +msgid "" +"Python supports running multiple interpreters in one process. There are two " +"cases to think about—users may run interpreters:" +msgstr "" + +#: ../../howto/isolating-extensions.rst:40 +msgid "" +"in sequence, with several :c:func:`Py_InitializeEx`/:c:func:`Py_FinalizeEx` " +"cycles, and" +msgstr "" + +#: ../../howto/isolating-extensions.rst:42 +msgid "" +"in parallel, managing \"sub-interpreters\" using :c:func:" +"`Py_NewInterpreter`/:c:func:`Py_EndInterpreter`." +msgstr "" + +#: ../../howto/isolating-extensions.rst:45 +msgid "" +"Both cases (and combinations of them) would be most useful when embedding " +"Python within a library. Libraries generally shouldn't make assumptions " +"about the application that uses them, which include assuming a process-wide " +"\"main Python interpreter\"." +msgstr "" + +#: ../../howto/isolating-extensions.rst:50 +msgid "" +"Historically, Python extension modules don't handle this use case well. Many " +"extension modules (and even some stdlib modules) use *per-process* global " +"state, because C ``static`` variables are extremely easy to use. Thus, data " +"that should be specific to an interpreter ends up being shared between " +"interpreters. Unless the extension developer is careful, it is very easy to " +"introduce edge cases that lead to crashes when a module is loaded in more " +"than one interpreter in the same process." +msgstr "" + +#: ../../howto/isolating-extensions.rst:58 +msgid "" +"Unfortunately, *per-interpreter* state is not easy to achieve. Extension " +"authors tend to not keep multiple interpreters in mind when developing, and " +"it is currently cumbersome to test the behavior." +msgstr "" + +#: ../../howto/isolating-extensions.rst:63 +msgid "Enter Per-Module State" +msgstr "" + +#: ../../howto/isolating-extensions.rst:65 +msgid "" +"Instead of focusing on per-interpreter state, Python's C API is evolving to " +"better support the more granular *per-module* state. This means that C-level " +"data should be attached to a *module object*. Each interpreter creates its " +"own module object, keeping the data separate. For testing the isolation, " +"multiple module objects corresponding to a single extension can even be " +"loaded in a single interpreter." +msgstr "" + +#: ../../howto/isolating-extensions.rst:72 +msgid "" +"Per-module state provides an easy way to think about lifetime and resource " +"ownership: the extension module will initialize when a module object is " +"created, and clean up when it's freed. In this regard, a module is just like " +"any other :c:expr:`PyObject *`; there are no \"on interpreter shutdown\" " +"hooks to think—or forget—about." +msgstr "" + +#: ../../howto/isolating-extensions.rst:78 +msgid "" +"Note that there are use cases for different kinds of \"globals\": per-" +"process, per-interpreter, per-thread or per-task state. With per-module " +"state as the default, these are still possible, but you should treat them as " +"exceptional cases: if you need them, you should give them additional care " +"and testing. (Note that this guide does not cover them.)" +msgstr "" + +#: ../../howto/isolating-extensions.rst:87 +msgid "Isolated Module Objects" +msgstr "" + +#: ../../howto/isolating-extensions.rst:89 +msgid "" +"The key point to keep in mind when developing an extension module is that " +"several module objects can be created from a single shared library. For " +"example:" +msgstr "" + +#: ../../howto/isolating-extensions.rst:93 +msgid "" +">>> import sys\n" +">>> import binascii\n" +">>> old_binascii = binascii\n" +">>> del sys.modules['binascii']\n" +">>> import binascii # create a new module object\n" +">>> old_binascii == binascii\n" +"False" +msgstr "" + +#: ../../howto/isolating-extensions.rst:103 +msgid "" +"As a rule of thumb, the two modules should be completely independent. All " +"objects and state specific to the module should be encapsulated within the " +"module object, not shared with other module objects, and cleaned up when the " +"module object is deallocated. Since this just is a rule of thumb, exceptions " +"are possible (see `Managing Global State`_), but they will need more thought " +"and attention to edge cases." +msgstr "" + +#: ../../howto/isolating-extensions.rst:111 +msgid "" +"While some modules could do with less stringent restrictions, isolated " +"modules make it easier to set clear expectations and guidelines that work " +"across a variety of use cases." +msgstr "" + +#: ../../howto/isolating-extensions.rst:117 +msgid "Surprising Edge Cases" +msgstr "" + +#: ../../howto/isolating-extensions.rst:119 +msgid "" +"Note that isolated modules do create some surprising edge cases. Most " +"notably, each module object will typically not share its classes and " +"exceptions with other similar modules. Continuing from the `example above " +"`__, note that ``old_binascii.Error`` and " +"``binascii.Error`` are separate objects. In the following code, the " +"exception is *not* caught:" +msgstr "" + +#: ../../howto/isolating-extensions.rst:126 +msgid "" +">>> old_binascii.Error == binascii.Error\n" +"False\n" +">>> try:\n" +"... old_binascii.unhexlify(b'qwertyuiop')\n" +"... except binascii.Error:\n" +"... print('boo')\n" +"...\n" +"Traceback (most recent call last):\n" +" File \"\", line 2, in \n" +"binascii.Error: Non-hexadecimal digit found" +msgstr "" + +#: ../../howto/isolating-extensions.rst:139 +msgid "" +"This is expected. Notice that pure-Python modules behave the same way: it is " +"a part of how Python works." +msgstr "" + +#: ../../howto/isolating-extensions.rst:142 +msgid "" +"The goal is to make extension modules safe at the C level, not to make hacks " +"behave intuitively. Mutating ``sys.modules`` \"manually\" counts as a hack." +msgstr "" + +#: ../../howto/isolating-extensions.rst:148 +msgid "Making Modules Safe with Multiple Interpreters" +msgstr "" + +#: ../../howto/isolating-extensions.rst:152 +msgid "Managing Global State" +msgstr "" + +#: ../../howto/isolating-extensions.rst:154 +msgid "" +"Sometimes, the state associated with a Python module is not specific to that " +"module, but to the entire process (or something else \"more global\" than a " +"module). For example:" +msgstr "" + +#: ../../howto/isolating-extensions.rst:158 +msgid "The ``readline`` module manages *the* terminal." +msgstr "" + +#: ../../howto/isolating-extensions.rst:159 +msgid "" +"A module running on a circuit board wants to control *the* on-board LED." +msgstr "" + +#: ../../howto/isolating-extensions.rst:162 +msgid "" +"In these cases, the Python module should provide *access* to the global " +"state, rather than *own* it. If possible, write the module so that multiple " +"copies of it can access the state independently (along with other libraries, " +"whether for Python or other languages). If that is not possible, consider " +"explicit locking." +msgstr "" + +#: ../../howto/isolating-extensions.rst:168 +msgid "" +"If it is necessary to use process-global state, the simplest way to avoid " +"issues with multiple interpreters is to explicitly prevent a module from " +"being loaded more than once per process—see :ref:`isolating-extensions-" +"optout`." +msgstr "" + +#: ../../howto/isolating-extensions.rst:175 +msgid "Managing Per-Module State" +msgstr "" + +#: ../../howto/isolating-extensions.rst:177 +msgid "" +"To use per-module state, use :ref:`multi-phase extension module " +"initialization `. This signals that your module " +"supports multiple interpreters correctly." +msgstr "" + +#: ../../howto/isolating-extensions.rst:181 +msgid "" +"Set ``PyModuleDef.m_size`` to a positive number to request that many bytes " +"of storage local to the module. Usually, this will be set to the size of " +"some module-specific ``struct``, which can store all of the module's C-level " +"state. In particular, it is where you should put pointers to classes " +"(including exceptions, but excluding static types) and settings (e.g. " +"``csv``'s :py:data:`~csv.field_size_limit`) which the C code needs to " +"function." +msgstr "" + +#: ../../howto/isolating-extensions.rst:190 +msgid "" +"Another option is to store state in the module's ``__dict__``, but you must " +"avoid crashing when users modify ``__dict__`` from Python code. This usually " +"means error- and type-checking at the C level, which is easy to get wrong " +"and hard to test sufficiently." +msgstr "" + +#: ../../howto/isolating-extensions.rst:195 +msgid "" +"However, if module state is not needed in C code, storing it in ``__dict__`` " +"only is a good idea." +msgstr "" + +#: ../../howto/isolating-extensions.rst:198 +msgid "" +"If the module state includes ``PyObject`` pointers, the module object must " +"hold references to those objects and implement the module-level hooks " +"``m_traverse``, ``m_clear`` and ``m_free``. These work like ``tp_traverse``, " +"``tp_clear`` and ``tp_free`` of a class. Adding them will require some work " +"and make the code longer; this is the price for modules which can be " +"unloaded cleanly." +msgstr "" + +#: ../../howto/isolating-extensions.rst:205 +msgid "" +"An example of a module with per-module state is currently available as " +"`xxlimited `__; example module initialization shown at the bottom of the file." +msgstr "" + +#: ../../howto/isolating-extensions.rst:213 +msgid "Opt-Out: Limiting to One Module Object per Process" +msgstr "" + +#: ../../howto/isolating-extensions.rst:215 +msgid "" +"A non-negative ``PyModuleDef.m_size`` signals that a module supports " +"multiple interpreters correctly. If this is not yet the case for your " +"module, you can explicitly make your module loadable only once per process. " +"For example::" +msgstr "" + +#: ../../howto/isolating-extensions.rst:220 +msgid "" +"// A process-wide flag\n" +"static int loaded = 0;\n" +"\n" +"// Mutex to provide thread safety (only needed for free-threaded Python)\n" +"static PyMutex modinit_mutex = {0};\n" +"\n" +"static int\n" +"exec_module(PyObject* module)\n" +"{\n" +" PyMutex_Lock(&modinit_mutex);\n" +" if (loaded) {\n" +" PyMutex_Unlock(&modinit_mutex);\n" +" PyErr_SetString(PyExc_ImportError,\n" +" \"cannot load module more than once per process\");\n" +" return -1;\n" +" }\n" +" loaded = 1;\n" +" PyMutex_Unlock(&modinit_mutex);\n" +" // ... rest of initialization\n" +"}" +msgstr "" + +#: ../../howto/isolating-extensions.rst:242 +msgid "" +"If your module's :c:member:`PyModuleDef.m_clear` function is able to prepare " +"for future re-initialization, it should clear the ``loaded`` flag. In this " +"case, your module won't support multiple instances existing *concurrently*, " +"but it will, for example, support being loaded after Python runtime shutdown " +"(:c:func:`Py_FinalizeEx`) and re-initialization (:c:func:`Py_Initialize`)." +msgstr "" + +#: ../../howto/isolating-extensions.rst:251 +msgid "Module State Access from Functions" +msgstr "" + +#: ../../howto/isolating-extensions.rst:253 +msgid "" +"Accessing the state from module-level functions is straightforward. " +"Functions get the module object as their first argument; for extracting the " +"state, you can use ``PyModule_GetState``::" +msgstr "" + +#: ../../howto/isolating-extensions.rst:257 +msgid "" +"static PyObject *\n" +"func(PyObject *module, PyObject *args)\n" +"{\n" +" my_struct *state = (my_struct*)PyModule_GetState(module);\n" +" if (state == NULL) {\n" +" return NULL;\n" +" }\n" +" // ... rest of logic\n" +"}" +msgstr "" + +#: ../../howto/isolating-extensions.rst:268 +msgid "" +"``PyModule_GetState`` may return ``NULL`` without setting an exception if " +"there is no module state, i.e. ``PyModuleDef.m_size`` was zero. In your own " +"module, you're in control of ``m_size``, so this is easy to prevent." +msgstr "" + +#: ../../howto/isolating-extensions.rst:275 +msgid "Heap Types" +msgstr "" + +#: ../../howto/isolating-extensions.rst:277 +msgid "" +"Traditionally, types defined in C code are *static*; that is, ``static " +"PyTypeObject`` structures defined directly in code and initialized using " +"``PyType_Ready()``." +msgstr "" + +#: ../../howto/isolating-extensions.rst:281 +msgid "" +"Such types are necessarily shared across the process. Sharing them between " +"module objects requires paying attention to any state they own or access. To " +"limit the possible issues, static types are immutable at the Python level: " +"for example, you can't set ``str.myattribute = 123``." +msgstr "" + +#: ../../howto/isolating-extensions.rst:287 +msgid "" +"Sharing truly immutable objects between interpreters is fine, as long as " +"they don't provide access to mutable objects. However, in CPython, every " +"Python object has a mutable implementation detail: the reference count. " +"Changes to the refcount are guarded by the GIL. Thus, code that shares any " +"Python objects across interpreters implicitly depends on CPython's current, " +"process-wide GIL." +msgstr "" + +#: ../../howto/isolating-extensions.rst:294 +msgid "" +"Because they are immutable and process-global, static types cannot access " +"\"their\" module state. If any method of such a type requires access to " +"module state, the type must be converted to a *heap-allocated type*, or " +"*heap type* for short. These correspond more closely to classes created by " +"Python's ``class`` statement." +msgstr "" + +#: ../../howto/isolating-extensions.rst:301 +msgid "For new modules, using heap types by default is a good rule of thumb." +msgstr "" + +#: ../../howto/isolating-extensions.rst:305 +msgid "Changing Static Types to Heap Types" +msgstr "" + +#: ../../howto/isolating-extensions.rst:307 +msgid "" +"Static types can be converted to heap types, but note that the heap type API " +"was not designed for \"lossless\" conversion from static types—that is, " +"creating a type that works exactly like a given static type. So, when " +"rewriting the class definition in a new API, you are likely to " +"unintentionally change a few details (e.g. pickleability or inherited " +"slots). Always test the details that are important to you." +msgstr "" + +#: ../../howto/isolating-extensions.rst:316 +msgid "" +"Watch out for the following two points in particular (but note that this is " +"not a comprehensive list):" +msgstr "" + +#: ../../howto/isolating-extensions.rst:319 +msgid "" +"Unlike static types, heap type objects are mutable by default. Use the :c:" +"macro:`Py_TPFLAGS_IMMUTABLETYPE` flag to prevent mutability." +msgstr "" + +#: ../../howto/isolating-extensions.rst:321 +msgid "" +"Heap types inherit :c:member:`~PyTypeObject.tp_new` by default, so it may " +"become possible to instantiate them from Python code. You can prevent this " +"with the :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag." +msgstr "" + +#: ../../howto/isolating-extensions.rst:327 +msgid "Defining Heap Types" +msgstr "" + +#: ../../howto/isolating-extensions.rst:329 +msgid "" +"Heap types can be created by filling a :c:struct:`PyType_Spec` structure, a " +"description or \"blueprint\" of a class, and calling :c:func:" +"`PyType_FromModuleAndSpec` to construct a new class object." +msgstr "" + +#: ../../howto/isolating-extensions.rst:334 +msgid "" +"Other functions, like :c:func:`PyType_FromSpec`, can also create heap types, " +"but :c:func:`PyType_FromModuleAndSpec` associates the module with the class, " +"allowing access to the module state from methods." +msgstr "" + +#: ../../howto/isolating-extensions.rst:338 +msgid "" +"The class should generally be stored in *both* the module state (for safe " +"access from C) and the module's ``__dict__`` (for access from Python code)." +msgstr "" + +#: ../../howto/isolating-extensions.rst:344 +msgid "Garbage-Collection Protocol" +msgstr "" + +#: ../../howto/isolating-extensions.rst:346 +msgid "" +"Instances of heap types hold a reference to their type. This ensures that " +"the type isn't destroyed before all its instances are, but may result in " +"reference cycles that need to be broken by the garbage collector." +msgstr "" + +#: ../../howto/isolating-extensions.rst:351 +msgid "" +"To avoid memory leaks, instances of heap types must implement the garbage " +"collection protocol. That is, heap types should:" +msgstr "" + +#: ../../howto/isolating-extensions.rst:355 +msgid "Have the :c:macro:`Py_TPFLAGS_HAVE_GC` flag." +msgstr "" + +#: ../../howto/isolating-extensions.rst:356 +msgid "" +"Define a traverse function using :c:data:`Py_tp_traverse`, which visits the " +"type (e.g. using ``Py_VISIT(Py_TYPE(self))``)." +msgstr "" + +#: ../../howto/isolating-extensions.rst:359 +msgid "" +"Please refer to the documentation of :c:macro:`Py_TPFLAGS_HAVE_GC` and :c:" +"member:`~PyTypeObject.tp_traverse` for additional considerations." +msgstr "" + +#: ../../howto/isolating-extensions.rst:363 +msgid "" +"The API for defining heap types grew organically, leaving it somewhat " +"awkward to use in its current state. The following sections will guide you " +"through common issues." +msgstr "" + +#: ../../howto/isolating-extensions.rst:369 +msgid "``tp_traverse`` in Python 3.8 and lower" +msgstr "" + +#: ../../howto/isolating-extensions.rst:371 +msgid "" +"The requirement to visit the type from ``tp_traverse`` was added in Python " +"3.9. If you support Python 3.8 and lower, the traverse function must *not* " +"visit the type, so it must be more complicated::" +msgstr "" + +#: ../../howto/isolating-extensions.rst:375 +msgid "" +"static int my_traverse(PyObject *self, visitproc visit, void *arg)\n" +"{\n" +" if (Py_Version >= 0x03090000) {\n" +" Py_VISIT(Py_TYPE(self));\n" +" }\n" +" return 0;\n" +"}" +msgstr "" + +#: ../../howto/isolating-extensions.rst:383 +msgid "" +"Unfortunately, :c:data:`Py_Version` was only added in Python 3.11. As a " +"replacement, use:" +msgstr "" + +#: ../../howto/isolating-extensions.rst:386 +msgid ":c:macro:`PY_VERSION_HEX`, if not using the stable ABI, or" +msgstr "" + +#: ../../howto/isolating-extensions.rst:387 +msgid "" +":py:data:`sys.version_info` (via :c:func:`PySys_GetObject` and :c:func:" +"`PyArg_ParseTuple`)." +msgstr "" + +#: ../../howto/isolating-extensions.rst:392 +msgid "Delegating ``tp_traverse``" +msgstr "" + +#: ../../howto/isolating-extensions.rst:394 +msgid "" +"If your traverse function delegates to the :c:member:`~PyTypeObject." +"tp_traverse` of its base class (or another type), ensure that " +"``Py_TYPE(self)`` is visited only once. Note that only heap type are " +"expected to visit the type in ``tp_traverse``." +msgstr "" + +#: ../../howto/isolating-extensions.rst:399 +msgid "For example, if your traverse function includes::" +msgstr "" + +#: ../../howto/isolating-extensions.rst:401 +msgid "base->tp_traverse(self, visit, arg)" +msgstr "" + +#: ../../howto/isolating-extensions.rst:403 +msgid "...and ``base`` may be a static type, then it should also include::" +msgstr "" + +#: ../../howto/isolating-extensions.rst:405 +msgid "" +"if (base->tp_flags & Py_TPFLAGS_HEAPTYPE) {\n" +" // a heap type's tp_traverse already visited Py_TYPE(self)\n" +"} else {\n" +" if (Py_Version >= 0x03090000) {\n" +" Py_VISIT(Py_TYPE(self));\n" +" }\n" +"}" +msgstr "" + +#: ../../howto/isolating-extensions.rst:413 +msgid "" +"It is not necessary to handle the type's reference count in :c:member:" +"`~PyTypeObject.tp_new` and :c:member:`~PyTypeObject.tp_clear`." +msgstr "" + +#: ../../howto/isolating-extensions.rst:418 +msgid "Defining ``tp_dealloc``" +msgstr "" + +#: ../../howto/isolating-extensions.rst:420 +msgid "" +"If your type has a custom :c:member:`~PyTypeObject.tp_dealloc` function, it " +"needs to:" +msgstr "" + +#: ../../howto/isolating-extensions.rst:423 +msgid "" +"call :c:func:`PyObject_GC_UnTrack` before any fields are invalidated, and" +msgstr "" + +#: ../../howto/isolating-extensions.rst:424 +msgid "decrement the reference count of the type." +msgstr "" + +#: ../../howto/isolating-extensions.rst:426 +msgid "" +"To keep the type valid while ``tp_free`` is called, the type's refcount " +"needs to be decremented *after* the instance is deallocated. For example::" +msgstr "" + +#: ../../howto/isolating-extensions.rst:429 +msgid "" +"static void my_dealloc(PyObject *self)\n" +"{\n" +" PyObject_GC_UnTrack(self);\n" +" ...\n" +" PyTypeObject *type = Py_TYPE(self);\n" +" type->tp_free(self);\n" +" Py_DECREF(type);\n" +"}" +msgstr "" + +#: ../../howto/isolating-extensions.rst:438 +msgid "" +"The default ``tp_dealloc`` function does this, so if your type does *not* " +"override ``tp_dealloc`` you don't need to add it." +msgstr "" + +#: ../../howto/isolating-extensions.rst:444 +msgid "Not overriding ``tp_free``" +msgstr "" + +#: ../../howto/isolating-extensions.rst:446 +msgid "" +"The :c:member:`~PyTypeObject.tp_free` slot of a heap type must be set to :c:" +"func:`PyObject_GC_Del`. This is the default; do not override it." +msgstr "" + +#: ../../howto/isolating-extensions.rst:452 +msgid "Avoiding ``PyObject_New``" +msgstr "" + +#: ../../howto/isolating-extensions.rst:454 +msgid "GC-tracked objects need to be allocated using GC-aware functions." +msgstr "" + +#: ../../howto/isolating-extensions.rst:456 +msgid "If you use :c:func:`PyObject_New` or :c:func:`PyObject_NewVar`:" +msgstr "" + +#: ../../howto/isolating-extensions.rst:458 +msgid "" +"Get and call type's :c:member:`~PyTypeObject.tp_alloc` slot, if possible. " +"That is, replace ``TYPE *o = PyObject_New(TYPE, typeobj)`` with::" +msgstr "" + +#: ../../howto/isolating-extensions.rst:461 +msgid "TYPE *o = typeobj->tp_alloc(typeobj, 0);" +msgstr "" + +#: ../../howto/isolating-extensions.rst:463 +msgid "" +"Replace ``o = PyObject_NewVar(TYPE, typeobj, size)`` with the same, but use " +"size instead of the 0." +msgstr "" + +#: ../../howto/isolating-extensions.rst:466 +msgid "" +"If the above is not possible (e.g. inside a custom ``tp_alloc``), call :c:" +"func:`PyObject_GC_New` or :c:func:`PyObject_GC_NewVar`::" +msgstr "" + +#: ../../howto/isolating-extensions.rst:469 +msgid "" +"TYPE *o = PyObject_GC_New(TYPE, typeobj);\n" +"\n" +"TYPE *o = PyObject_GC_NewVar(TYPE, typeobj, size);" +msgstr "" + +#: ../../howto/isolating-extensions.rst:475 +msgid "Module State Access from Classes" +msgstr "" + +#: ../../howto/isolating-extensions.rst:477 +msgid "" +"If you have a type object defined with :c:func:`PyType_FromModuleAndSpec`, " +"you can call :c:func:`PyType_GetModule` to get the associated module, and " +"then :c:func:`PyModule_GetState` to get the module's state." +msgstr "" + +#: ../../howto/isolating-extensions.rst:481 +msgid "" +"To save a some tedious error-handling boilerplate code, you can combine " +"these two steps with :c:func:`PyType_GetModuleState`, resulting in::" +msgstr "" + +#: ../../howto/isolating-extensions.rst:484 +msgid "" +"my_struct *state = (my_struct*)PyType_GetModuleState(type);\n" +"if (state == NULL) {\n" +" return NULL;\n" +"}" +msgstr "" + +#: ../../howto/isolating-extensions.rst:491 +msgid "Module State Access from Regular Methods" +msgstr "" + +#: ../../howto/isolating-extensions.rst:493 +msgid "" +"Accessing the module-level state from methods of a class is somewhat more " +"complicated, but is possible thanks to API introduced in Python 3.9. To get " +"the state, you need to first get the *defining class*, and then get the " +"module state from it." +msgstr "" + +#: ../../howto/isolating-extensions.rst:498 +msgid "" +"The largest roadblock is getting *the class a method was defined in*, or " +"that method's \"defining class\" for short. The defining class can have a " +"reference to the module it is part of." +msgstr "" + +#: ../../howto/isolating-extensions.rst:502 +msgid "" +"Do not confuse the defining class with ``Py_TYPE(self)``. If the method is " +"called on a *subclass* of your type, ``Py_TYPE(self)`` will refer to that " +"subclass, which may be defined in different module than yours." +msgstr "" + +#: ../../howto/isolating-extensions.rst:507 +msgid "" +"The following Python code can illustrate the concept. ``Base." +"get_defining_class`` returns ``Base`` even if ``type(self) == Sub``:" +msgstr "" + +#: ../../howto/isolating-extensions.rst:511 +msgid "" +"class Base:\n" +" def get_type_of_self(self):\n" +" return type(self)\n" +"\n" +" def get_defining_class(self):\n" +" return __class__\n" +"\n" +"class Sub(Base):\n" +" pass" +msgstr "" + +#: ../../howto/isolating-extensions.rst:523 +msgid "" +"For a method to get its \"defining class\", it must use the :ref:" +"`METH_METHOD | METH_FASTCALL | METH_KEYWORDS ` :c:type:`calling convention ` and the " +"corresponding :c:type:`PyCMethod` signature::" +msgstr "" + +#: ../../howto/isolating-extensions.rst:528 +msgid "" +"PyObject *PyCMethod(\n" +" PyObject *self, // object the method was called on\n" +" PyTypeObject *defining_class, // defining class\n" +" PyObject *const *args, // C array of arguments\n" +" Py_ssize_t nargs, // length of \"args\"\n" +" PyObject *kwnames) // NULL, or dict of keyword arguments" +msgstr "" + +#: ../../howto/isolating-extensions.rst:535 +msgid "" +"Once you have the defining class, call :c:func:`PyType_GetModuleState` to " +"get the state of its associated module." +msgstr "" + +#: ../../howto/isolating-extensions.rst:538 +msgid "For example::" +msgstr "Zum Beispiel::" + +#: ../../howto/isolating-extensions.rst:540 +msgid "" +"static PyObject *\n" +"example_method(PyObject *self,\n" +" PyTypeObject *defining_class,\n" +" PyObject *const *args,\n" +" Py_ssize_t nargs,\n" +" PyObject *kwnames)\n" +"{\n" +" my_struct *state = (my_struct*)PyType_GetModuleState(defining_class);\n" +" if (state == NULL) {\n" +" return NULL;\n" +" }\n" +" ... // rest of logic\n" +"}\n" +"\n" +"PyDoc_STRVAR(example_method_doc, \"...\");\n" +"\n" +"static PyMethodDef my_methods[] = {\n" +" {\"example_method\",\n" +" (PyCFunction)(void(*)(void))example_method,\n" +" METH_METHOD|METH_FASTCALL|METH_KEYWORDS,\n" +" example_method_doc}\n" +" {NULL},\n" +"}" +msgstr "" + +#: ../../howto/isolating-extensions.rst:566 +msgid "Module State Access from Slot Methods, Getters and Setters" +msgstr "" + +#: ../../howto/isolating-extensions.rst:570 +msgid "This is new in Python 3.11." +msgstr "" + +#: ../../howto/isolating-extensions.rst:578 +msgid "" +"Slot methods—the fast C equivalents for special methods, such as :c:member:" +"`~PyNumberMethods.nb_add` for :py:attr:`~object.__add__` or :c:member:" +"`~PyTypeObject.tp_new` for initialization—have a very simple API that " +"doesn't allow passing in the defining class, unlike with :c:type:" +"`PyCMethod`. The same goes for getters and setters defined with :c:type:" +"`PyGetSetDef`." +msgstr "" + +#: ../../howto/isolating-extensions.rst:585 +msgid "" +"To access the module state in these cases, use the :c:func:" +"`PyType_GetModuleByDef` function, and pass in the module definition. Once " +"you have the module, call :c:func:`PyModule_GetState` to get the state::" +msgstr "" + +#: ../../howto/isolating-extensions.rst:590 +msgid "" +"PyObject *module = PyType_GetModuleByDef(Py_TYPE(self), &module_def);\n" +"my_struct *state = (my_struct*)PyModule_GetState(module);\n" +"if (state == NULL) {\n" +" return NULL;\n" +"}" +msgstr "" + +#: ../../howto/isolating-extensions.rst:596 +msgid "" +":c:func:`!PyType_GetModuleByDef` works by searching the :term:`method " +"resolution order` (i.e. all superclasses) for the first superclass that has " +"a corresponding module." +msgstr "" + +#: ../../howto/isolating-extensions.rst:602 +msgid "" +"In very exotic cases (inheritance chains spanning multiple modules created " +"from the same definition), :c:func:`!PyType_GetModuleByDef` might not return " +"the module of the true defining class. However, it will always return a " +"module with the same definition, ensuring a compatible C memory layout." +msgstr "" + +#: ../../howto/isolating-extensions.rst:610 +msgid "Lifetime of the Module State" +msgstr "" + +#: ../../howto/isolating-extensions.rst:612 +msgid "" +"When a module object is garbage-collected, its module state is freed. For " +"each pointer to (a part of) the module state, you must hold a reference to " +"the module object." +msgstr "" + +#: ../../howto/isolating-extensions.rst:616 +msgid "" +"Usually this is not an issue, because types created with :c:func:" +"`PyType_FromModuleAndSpec`, and their instances, hold a reference to the " +"module. However, you must be careful in reference counting when you " +"reference module state from other places, such as callbacks for external " +"libraries." +msgstr "" + +#: ../../howto/isolating-extensions.rst:625 +msgid "Open Issues" +msgstr "" + +#: ../../howto/isolating-extensions.rst:627 +msgid "Several issues around per-module state and heap types are still open." +msgstr "" + +#: ../../howto/isolating-extensions.rst:629 +msgid "" +"Discussions about improving the situation are best held on the `discuss " +"forum under c-api tag `__." +msgstr "" + +#: ../../howto/isolating-extensions.rst:633 +msgid "Per-Class Scope" +msgstr "" + +#: ../../howto/isolating-extensions.rst:635 +msgid "" +"It is currently (as of Python 3.11) not possible to attach state to " +"individual *types* without relying on CPython implementation details (which " +"may change in the future—perhaps, ironically, to allow a proper solution for " +"per-class scope)." +msgstr "" + +#: ../../howto/isolating-extensions.rst:642 +msgid "Lossless Conversion to Heap Types" +msgstr "" + +#: ../../howto/isolating-extensions.rst:644 +msgid "" +"The heap type API was not designed for \"lossless\" conversion from static " +"types; that is, creating a type that works exactly like a given static type." +msgstr "" diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index e8dafa6c..3ec27ef0 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -4867,7 +4867,7 @@ msgid "" "You'll need to be familiar with RFC 5424 to fully understand the above code, " "and it may be that you have slightly different needs (e.g. for how you pass " "structural data to the log). Nevertheless, the above should be adaptable to " -"your speciric needs. With the above handler, you'd pass structured data " +"your specific needs. With the above handler, you'd pass structured data " "using something like this::" msgstr "" diff --git a/howto/logging-cookbook.po~ b/howto/logging-cookbook.po~ new file mode 100644 index 00000000..e8dafa6c --- /dev/null +++ b/howto/logging-cookbook.po~ @@ -0,0 +1,5345 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../howto/logging-cookbook.rst:5 +msgid "Logging Cookbook" +msgstr "" + +#: ../../howto/logging-cookbook.rst:7 +msgid "" +"This page contains a number of recipes related to logging, which have been " +"found useful in the past. For links to tutorial and reference information, " +"please see :ref:`cookbook-ref-links`." +msgstr "" + +#: ../../howto/logging-cookbook.rst:14 +msgid "Using logging in multiple modules" +msgstr "" + +#: ../../howto/logging-cookbook.rst:16 +msgid "" +"Multiple calls to ``logging.getLogger('someLogger')`` return a reference to " +"the same logger object. This is true not only within the same module, but " +"also across modules as long as it is in the same Python interpreter " +"process. It is true for references to the same object; additionally, " +"application code can define and configure a parent logger in one module and " +"create (but not configure) a child logger in a separate module, and all " +"logger calls to the child will pass up to the parent. Here is a main " +"module::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:24 +msgid "" +"import logging\n" +"import auxiliary_module\n" +"\n" +"# create logger with 'spam_application'\n" +"logger = logging.getLogger('spam_application')\n" +"logger.setLevel(logging.DEBUG)\n" +"# create file handler which logs even debug messages\n" +"fh = logging.FileHandler('spam.log')\n" +"fh.setLevel(logging.DEBUG)\n" +"# create console handler with a higher log level\n" +"ch = logging.StreamHandler()\n" +"ch.setLevel(logging.ERROR)\n" +"# create formatter and add it to the handlers\n" +"formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - " +"%(message)s')\n" +"fh.setFormatter(formatter)\n" +"ch.setFormatter(formatter)\n" +"# add the handlers to the logger\n" +"logger.addHandler(fh)\n" +"logger.addHandler(ch)\n" +"\n" +"logger.info('creating an instance of auxiliary_module.Auxiliary')\n" +"a = auxiliary_module.Auxiliary()\n" +"logger.info('created an instance of auxiliary_module.Auxiliary')\n" +"logger.info('calling auxiliary_module.Auxiliary.do_something')\n" +"a.do_something()\n" +"logger.info('finished auxiliary_module.Auxiliary.do_something')\n" +"logger.info('calling auxiliary_module.some_function()')\n" +"auxiliary_module.some_function()\n" +"logger.info('done with auxiliary_module.some_function()')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:54 +msgid "Here is the auxiliary module::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:56 +msgid "" +"import logging\n" +"\n" +"# create logger\n" +"module_logger = logging.getLogger('spam_application.auxiliary')\n" +"\n" +"class Auxiliary:\n" +" def __init__(self):\n" +" self.logger = logging.getLogger('spam_application.auxiliary." +"Auxiliary')\n" +" self.logger.info('creating an instance of Auxiliary')\n" +"\n" +" def do_something(self):\n" +" self.logger.info('doing something')\n" +" a = 1 + 1\n" +" self.logger.info('done doing something')\n" +"\n" +"def some_function():\n" +" module_logger.info('received a call to \"some_function\"')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:74 +msgid "The output looks like this:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:76 +msgid "" +"2005-03-23 23:47:11,663 - spam_application - INFO -\n" +" creating an instance of auxiliary_module.Auxiliary\n" +"2005-03-23 23:47:11,665 - spam_application.auxiliary.Auxiliary - INFO -\n" +" creating an instance of Auxiliary\n" +"2005-03-23 23:47:11,665 - spam_application - INFO -\n" +" created an instance of auxiliary_module.Auxiliary\n" +"2005-03-23 23:47:11,668 - spam_application - INFO -\n" +" calling auxiliary_module.Auxiliary.do_something\n" +"2005-03-23 23:47:11,668 - spam_application.auxiliary.Auxiliary - INFO -\n" +" doing something\n" +"2005-03-23 23:47:11,669 - spam_application.auxiliary.Auxiliary - INFO -\n" +" done doing something\n" +"2005-03-23 23:47:11,670 - spam_application - INFO -\n" +" finished auxiliary_module.Auxiliary.do_something\n" +"2005-03-23 23:47:11,671 - spam_application - INFO -\n" +" calling auxiliary_module.some_function()\n" +"2005-03-23 23:47:11,672 - spam_application.auxiliary - INFO -\n" +" received a call to 'some_function'\n" +"2005-03-23 23:47:11,673 - spam_application - INFO -\n" +" done with auxiliary_module.some_function()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:100 +msgid "Logging from multiple threads" +msgstr "" + +#: ../../howto/logging-cookbook.rst:102 +msgid "" +"Logging from multiple threads requires no special effort. The following " +"example shows logging from the main (initial) thread and another thread::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:105 +msgid "" +"import logging\n" +"import threading\n" +"import time\n" +"\n" +"def worker(arg):\n" +" while not arg['stop']:\n" +" logging.debug('Hi from myfunc')\n" +" time.sleep(0.5)\n" +"\n" +"def main():\n" +" logging.basicConfig(level=logging.DEBUG, format='%(relativeCreated)6d " +"%(threadName)s %(message)s')\n" +" info = {'stop': False}\n" +" thread = threading.Thread(target=worker, args=(info,))\n" +" thread.start()\n" +" while True:\n" +" try:\n" +" logging.debug('Hello from main')\n" +" time.sleep(0.75)\n" +" except KeyboardInterrupt:\n" +" info['stop'] = True\n" +" break\n" +" thread.join()\n" +"\n" +"if __name__ == '__main__':\n" +" main()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:131 +msgid "When run, the script should print something like the following:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:133 +msgid "" +" 0 Thread-1 Hi from myfunc\n" +" 3 MainThread Hello from main\n" +" 505 Thread-1 Hi from myfunc\n" +" 755 MainThread Hello from main\n" +"1007 Thread-1 Hi from myfunc\n" +"1507 MainThread Hello from main\n" +"1508 Thread-1 Hi from myfunc\n" +"2010 Thread-1 Hi from myfunc\n" +"2258 MainThread Hello from main\n" +"2512 Thread-1 Hi from myfunc\n" +"3009 MainThread Hello from main\n" +"3013 Thread-1 Hi from myfunc\n" +"3515 Thread-1 Hi from myfunc\n" +"3761 MainThread Hello from main\n" +"4017 Thread-1 Hi from myfunc\n" +"4513 MainThread Hello from main\n" +"4518 Thread-1 Hi from myfunc" +msgstr "" + +#: ../../howto/logging-cookbook.rst:153 +msgid "" +"This shows the logging output interspersed as one might expect. This " +"approach works for more threads than shown here, of course." +msgstr "" + +#: ../../howto/logging-cookbook.rst:157 +msgid "Multiple handlers and formatters" +msgstr "" + +#: ../../howto/logging-cookbook.rst:159 +msgid "" +"Loggers are plain Python objects. The :meth:`~Logger.addHandler` method has " +"no minimum or maximum quota for the number of handlers you may add. " +"Sometimes it will be beneficial for an application to log all messages of " +"all severities to a text file while simultaneously logging errors or above " +"to the console. To set this up, simply configure the appropriate handlers. " +"The logging calls in the application code will remain unchanged. Here is a " +"slight modification to the previous simple module-based configuration " +"example::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:167 +msgid "" +"import logging\n" +"\n" +"logger = logging.getLogger('simple_example')\n" +"logger.setLevel(logging.DEBUG)\n" +"# create file handler which logs even debug messages\n" +"fh = logging.FileHandler('spam.log')\n" +"fh.setLevel(logging.DEBUG)\n" +"# create console handler with a higher log level\n" +"ch = logging.StreamHandler()\n" +"ch.setLevel(logging.ERROR)\n" +"# create formatter and add it to the handlers\n" +"formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - " +"%(message)s')\n" +"ch.setFormatter(formatter)\n" +"fh.setFormatter(formatter)\n" +"# add the handlers to logger\n" +"logger.addHandler(ch)\n" +"logger.addHandler(fh)\n" +"\n" +"# 'application' code\n" +"logger.debug('debug message')\n" +"logger.info('info message')\n" +"logger.warning('warn message')\n" +"logger.error('error message')\n" +"logger.critical('critical message')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:192 +msgid "" +"Notice that the 'application' code does not care about multiple handlers. " +"All that changed was the addition and configuration of a new handler named " +"*fh*." +msgstr "" + +#: ../../howto/logging-cookbook.rst:195 +msgid "" +"The ability to create new handlers with higher- or lower-severity filters " +"can be very helpful when writing and testing an application. Instead of " +"using many ``print`` statements for debugging, use ``logger.debug``: Unlike " +"the print statements, which you will have to delete or comment out later, " +"the logger.debug statements can remain intact in the source code and remain " +"dormant until you need them again. At that time, the only change that needs " +"to happen is to modify the severity level of the logger and/or handler to " +"debug." +msgstr "" + +#: ../../howto/logging-cookbook.rst:206 +msgid "Logging to multiple destinations" +msgstr "" + +#: ../../howto/logging-cookbook.rst:208 +msgid "" +"Let's say you want to log to console and file with different message formats " +"and in differing circumstances. Say you want to log messages with levels of " +"DEBUG and higher to file, and those messages at level INFO and higher to the " +"console. Let's also assume that the file should contain timestamps, but the " +"console messages should not. Here's how you can achieve this::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:214 +msgid "" +"import logging\n" +"\n" +"# set up logging to file - see previous section for more details\n" +"logging.basicConfig(level=logging.DEBUG,\n" +" format='%(asctime)s %(name)-12s %(levelname)-8s " +"%(message)s',\n" +" datefmt='%m-%d %H:%M',\n" +" filename='/tmp/myapp.log',\n" +" filemode='w')\n" +"# define a Handler which writes INFO messages or higher to the sys.stderr\n" +"console = logging.StreamHandler()\n" +"console.setLevel(logging.INFO)\n" +"# set a format which is simpler for console use\n" +"formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s')\n" +"# tell the handler to use this format\n" +"console.setFormatter(formatter)\n" +"# add the handler to the root logger\n" +"logging.getLogger().addHandler(console)\n" +"\n" +"# Now, we can log to the root logger, or any other logger. First the " +"root...\n" +"logging.info('Jackdaws love my big sphinx of quartz.')\n" +"\n" +"# Now, define a couple of other loggers which might represent areas in your\n" +"# application:\n" +"\n" +"logger1 = logging.getLogger('myapp.area1')\n" +"logger2 = logging.getLogger('myapp.area2')\n" +"\n" +"logger1.debug('Quick zephyrs blow, vexing daft Jim.')\n" +"logger1.info('How quickly daft jumping zebras vex.')\n" +"logger2.warning('Jail zesty vixen who grabbed pay from quack.')\n" +"logger2.error('The five boxing wizards jump quickly.')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:246 +msgid "When you run this, on the console you will see" +msgstr "" + +#: ../../howto/logging-cookbook.rst:248 +msgid "" +"root : INFO Jackdaws love my big sphinx of quartz.\n" +"myapp.area1 : INFO How quickly daft jumping zebras vex.\n" +"myapp.area2 : WARNING Jail zesty vixen who grabbed pay from quack.\n" +"myapp.area2 : ERROR The five boxing wizards jump quickly." +msgstr "" + +#: ../../howto/logging-cookbook.rst:255 +msgid "and in the file you will see something like" +msgstr "" + +#: ../../howto/logging-cookbook.rst:257 +msgid "" +"10-22 22:19 root INFO Jackdaws love my big sphinx of quartz.\n" +"10-22 22:19 myapp.area1 DEBUG Quick zephyrs blow, vexing daft Jim.\n" +"10-22 22:19 myapp.area1 INFO How quickly daft jumping zebras vex.\n" +"10-22 22:19 myapp.area2 WARNING Jail zesty vixen who grabbed pay from " +"quack.\n" +"10-22 22:19 myapp.area2 ERROR The five boxing wizards jump quickly." +msgstr "" + +#: ../../howto/logging-cookbook.rst:265 +msgid "" +"As you can see, the DEBUG message only shows up in the file. The other " +"messages are sent to both destinations." +msgstr "" + +#: ../../howto/logging-cookbook.rst:268 +msgid "" +"This example uses console and file handlers, but you can use any number and " +"combination of handlers you choose." +msgstr "" + +#: ../../howto/logging-cookbook.rst:271 +msgid "" +"Note that the above choice of log filename ``/tmp/myapp.log`` implies use of " +"a standard location for temporary files on POSIX systems. On Windows, you " +"may need to choose a different directory name for the log - just ensure that " +"the directory exists and that you have the permissions to create and update " +"files in it." +msgstr "" + +#: ../../howto/logging-cookbook.rst:280 +msgid "Custom handling of levels" +msgstr "" + +#: ../../howto/logging-cookbook.rst:282 +msgid "" +"Sometimes, you might want to do something slightly different from the " +"standard handling of levels in handlers, where all levels above a threshold " +"get processed by a handler. To do this, you need to use filters. Let's look " +"at a scenario where you want to arrange things as follows:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:287 +msgid "Send messages of severity ``INFO`` and ``WARNING`` to ``sys.stdout``" +msgstr "" + +#: ../../howto/logging-cookbook.rst:288 +msgid "Send messages of severity ``ERROR`` and above to ``sys.stderr``" +msgstr "" + +#: ../../howto/logging-cookbook.rst:289 +msgid "Send messages of severity ``DEBUG`` and above to file ``app.log``" +msgstr "" + +#: ../../howto/logging-cookbook.rst:291 +msgid "Suppose you configure logging with the following JSON:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:293 +msgid "" +"{\n" +" \"version\": 1,\n" +" \"disable_existing_loggers\": false,\n" +" \"formatters\": {\n" +" \"simple\": {\n" +" \"format\": \"%(levelname)-8s - %(message)s\"\n" +" }\n" +" },\n" +" \"handlers\": {\n" +" \"stdout\": {\n" +" \"class\": \"logging.StreamHandler\",\n" +" \"level\": \"INFO\",\n" +" \"formatter\": \"simple\",\n" +" \"stream\": \"ext://sys.stdout\"\n" +" },\n" +" \"stderr\": {\n" +" \"class\": \"logging.StreamHandler\",\n" +" \"level\": \"ERROR\",\n" +" \"formatter\": \"simple\",\n" +" \"stream\": \"ext://sys.stderr\"\n" +" },\n" +" \"file\": {\n" +" \"class\": \"logging.FileHandler\",\n" +" \"formatter\": \"simple\",\n" +" \"filename\": \"app.log\",\n" +" \"mode\": \"w\"\n" +" }\n" +" },\n" +" \"root\": {\n" +" \"level\": \"DEBUG\",\n" +" \"handlers\": [\n" +" \"stderr\",\n" +" \"stdout\",\n" +" \"file\"\n" +" ]\n" +" }\n" +"}" +msgstr "" + +#: ../../howto/logging-cookbook.rst:333 +msgid "" +"This configuration does *almost* what we want, except that ``sys.stdout`` " +"would show messages of severity ``ERROR`` and only events of this severity " +"and higher will be tracked as well as ``INFO`` and ``WARNING`` messages. To " +"prevent this, we can set up a filter which excludes those messages and add " +"it to the relevant handler. This can be configured by adding a ``filters`` " +"section parallel to ``formatters`` and ``handlers``:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:339 +msgid "" +"{\n" +" \"filters\": {\n" +" \"warnings_and_below\": {\n" +" \"()\" : \"__main__.filter_maker\",\n" +" \"level\": \"WARNING\"\n" +" }\n" +" }\n" +"}" +msgstr "" + +#: ../../howto/logging-cookbook.rst:350 +msgid "and changing the section on the ``stdout`` handler to add it:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:352 +msgid "" +"{\n" +" \"stdout\": {\n" +" \"class\": \"logging.StreamHandler\",\n" +" \"level\": \"INFO\",\n" +" \"formatter\": \"simple\",\n" +" \"stream\": \"ext://sys.stdout\",\n" +" \"filters\": [\"warnings_and_below\"]\n" +" }\n" +"}" +msgstr "" + +#: ../../howto/logging-cookbook.rst:364 +msgid "" +"A filter is just a function, so we can define the ``filter_maker`` (a " +"factory function) as follows:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:367 +msgid "" +"def filter_maker(level):\n" +" level = getattr(logging, level)\n" +"\n" +" def filter(record):\n" +" return record.levelno <= level\n" +"\n" +" return filter" +msgstr "" + +#: ../../howto/logging-cookbook.rst:377 +msgid "" +"This converts the string argument passed in to a numeric level, and returns " +"a function which only returns ``True`` if the level of the passed in record " +"is at or below the specified level. Note that in this example I have defined " +"the ``filter_maker`` in a test script ``main.py`` that I run from the " +"command line, so its module will be ``__main__`` - hence the ``__main__." +"filter_maker`` in the filter configuration. You will need to change that if " +"you define it in a different module." +msgstr "" + +#: ../../howto/logging-cookbook.rst:385 +msgid "With the filter added, we can run ``main.py``, which in full is:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:387 +msgid "" +"import json\n" +"import logging\n" +"import logging.config\n" +"\n" +"CONFIG = '''\n" +"{\n" +" \"version\": 1,\n" +" \"disable_existing_loggers\": false,\n" +" \"formatters\": {\n" +" \"simple\": {\n" +" \"format\": \"%(levelname)-8s - %(message)s\"\n" +" }\n" +" },\n" +" \"filters\": {\n" +" \"warnings_and_below\": {\n" +" \"()\" : \"__main__.filter_maker\",\n" +" \"level\": \"WARNING\"\n" +" }\n" +" },\n" +" \"handlers\": {\n" +" \"stdout\": {\n" +" \"class\": \"logging.StreamHandler\",\n" +" \"level\": \"INFO\",\n" +" \"formatter\": \"simple\",\n" +" \"stream\": \"ext://sys.stdout\",\n" +" \"filters\": [\"warnings_and_below\"]\n" +" },\n" +" \"stderr\": {\n" +" \"class\": \"logging.StreamHandler\",\n" +" \"level\": \"ERROR\",\n" +" \"formatter\": \"simple\",\n" +" \"stream\": \"ext://sys.stderr\"\n" +" },\n" +" \"file\": {\n" +" \"class\": \"logging.FileHandler\",\n" +" \"formatter\": \"simple\",\n" +" \"filename\": \"app.log\",\n" +" \"mode\": \"w\"\n" +" }\n" +" },\n" +" \"root\": {\n" +" \"level\": \"DEBUG\",\n" +" \"handlers\": [\n" +" \"stderr\",\n" +" \"stdout\",\n" +" \"file\"\n" +" ]\n" +" }\n" +"}\n" +"'''\n" +"\n" +"def filter_maker(level):\n" +" level = getattr(logging, level)\n" +"\n" +" def filter(record):\n" +" return record.levelno <= level\n" +"\n" +" return filter\n" +"\n" +"logging.config.dictConfig(json.loads(CONFIG))\n" +"logging.debug('A DEBUG message')\n" +"logging.info('An INFO message')\n" +"logging.warning('A WARNING message')\n" +"logging.error('An ERROR message')\n" +"logging.critical('A CRITICAL message')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:455 +msgid "And after running it like this:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:457 +msgid "python main.py 2>stderr.log >stdout.log" +msgstr "" + +#: ../../howto/logging-cookbook.rst:461 +msgid "We can see the results are as expected:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:463 +msgid "" +"$ more *.log\n" +"::::::::::::::\n" +"app.log\n" +"::::::::::::::\n" +"DEBUG - A DEBUG message\n" +"INFO - An INFO message\n" +"WARNING - A WARNING message\n" +"ERROR - An ERROR message\n" +"CRITICAL - A CRITICAL message\n" +"::::::::::::::\n" +"stderr.log\n" +"::::::::::::::\n" +"ERROR - An ERROR message\n" +"CRITICAL - A CRITICAL message\n" +"::::::::::::::\n" +"stdout.log\n" +"::::::::::::::\n" +"INFO - An INFO message\n" +"WARNING - A WARNING message" +msgstr "" + +#: ../../howto/logging-cookbook.rst:487 +msgid "Configuration server example" +msgstr "" + +#: ../../howto/logging-cookbook.rst:489 +msgid "Here is an example of a module using the logging configuration server::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:491 +msgid "" +"import logging\n" +"import logging.config\n" +"import time\n" +"import os\n" +"\n" +"# read initial config file\n" +"logging.config.fileConfig('logging.conf')\n" +"\n" +"# create and start listener on port 9999\n" +"t = logging.config.listen(9999)\n" +"t.start()\n" +"\n" +"logger = logging.getLogger('simpleExample')\n" +"\n" +"try:\n" +" # loop through logging calls to see the difference\n" +" # new configurations make, until Ctrl+C is pressed\n" +" while True:\n" +" logger.debug('debug message')\n" +" logger.info('info message')\n" +" logger.warning('warn message')\n" +" logger.error('error message')\n" +" logger.critical('critical message')\n" +" time.sleep(5)\n" +"except KeyboardInterrupt:\n" +" # cleanup\n" +" logging.config.stopListening()\n" +" t.join()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:520 +msgid "" +"And here is a script that takes a filename and sends that file to the " +"server, properly preceded with the binary-encoded length, as the new logging " +"configuration::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:524 +msgid "" +"#!/usr/bin/env python\n" +"import socket, sys, struct\n" +"\n" +"with open(sys.argv[1], 'rb') as f:\n" +" data_to_send = f.read()\n" +"\n" +"HOST = 'localhost'\n" +"PORT = 9999\n" +"s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n" +"print('connecting...')\n" +"s.connect((HOST, PORT))\n" +"print('sending config...')\n" +"s.send(struct.pack('>L', len(data_to_send)))\n" +"s.send(data_to_send)\n" +"s.close()\n" +"print('complete')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:545 +msgid "Dealing with handlers that block" +msgstr "" + +#: ../../howto/logging-cookbook.rst:549 +msgid "" +"Sometimes you have to get your logging handlers to do their work without " +"blocking the thread you're logging from. This is common in web applications, " +"though of course it also occurs in other scenarios." +msgstr "" + +#: ../../howto/logging-cookbook.rst:553 +msgid "" +"A common culprit which demonstrates sluggish behaviour is the :class:" +"`SMTPHandler`: sending emails can take a long time, for a number of reasons " +"outside the developer's control (for example, a poorly performing mail or " +"network infrastructure). But almost any network-based handler can block: " +"Even a :class:`SocketHandler` operation may do a DNS query under the hood " +"which is too slow (and this query can be deep in the socket library code, " +"below the Python layer, and outside your control)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:561 +msgid "" +"One solution is to use a two-part approach. For the first part, attach only " +"a :class:`QueueHandler` to those loggers which are accessed from performance-" +"critical threads. They simply write to their queue, which can be sized to a " +"large enough capacity or initialized with no upper bound to their size. The " +"write to the queue will typically be accepted quickly, though you will " +"probably need to catch the :exc:`queue.Full` exception as a precaution in " +"your code. If you are a library developer who has performance-critical " +"threads in their code, be sure to document this (together with a suggestion " +"to attach only ``QueueHandlers`` to your loggers) for the benefit of other " +"developers who will use your code." +msgstr "" + +#: ../../howto/logging-cookbook.rst:572 +msgid "" +"The second part of the solution is :class:`QueueListener`, which has been " +"designed as the counterpart to :class:`QueueHandler`. A :class:" +"`QueueListener` is very simple: it's passed a queue and some handlers, and " +"it fires up an internal thread which listens to its queue for LogRecords " +"sent from ``QueueHandlers`` (or any other source of ``LogRecords``, for that " +"matter). The ``LogRecords`` are removed from the queue and passed to the " +"handlers for processing." +msgstr "" + +#: ../../howto/logging-cookbook.rst:580 +msgid "" +"The advantage of having a separate :class:`QueueListener` class is that you " +"can use the same instance to service multiple ``QueueHandlers``. This is " +"more resource-friendly than, say, having threaded versions of the existing " +"handler classes, which would eat up one thread per handler for no particular " +"benefit." +msgstr "" + +#: ../../howto/logging-cookbook.rst:585 +msgid "An example of using these two classes follows (imports omitted)::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:587 +msgid "" +"que = queue.Queue(-1) # no limit on size\n" +"queue_handler = QueueHandler(que)\n" +"handler = logging.StreamHandler()\n" +"listener = QueueListener(que, handler)\n" +"root = logging.getLogger()\n" +"root.addHandler(queue_handler)\n" +"formatter = logging.Formatter('%(threadName)s: %(message)s')\n" +"handler.setFormatter(formatter)\n" +"listener.start()\n" +"# The log output will display the thread which generated\n" +"# the event (the main thread) rather than the internal\n" +"# thread which monitors the internal queue. This is what\n" +"# you want to happen.\n" +"root.warning('Look out!')\n" +"listener.stop()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:603 +msgid "which, when run, will produce:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:605 +msgid "MainThread: Look out!" +msgstr "" + +#: ../../howto/logging-cookbook.rst:609 +msgid "" +"Although the earlier discussion wasn't specifically talking about async " +"code, but rather about slow logging handlers, it should be noted that when " +"logging from async code, network and even file handlers could lead to " +"problems (blocking the event loop) because some logging is done from :mod:" +"`asyncio` internals. It might be best, if any async code is used in an " +"application, to use the above approach for logging, so that any blocking " +"code runs only in the ``QueueListener`` thread." +msgstr "" + +#: ../../howto/logging-cookbook.rst:617 +msgid "" +"Prior to Python 3.5, the :class:`QueueListener` always passed every message " +"received from the queue to every handler it was initialized with. (This was " +"because it was assumed that level filtering was all done on the other side, " +"where the queue is filled.) From 3.5 onwards, this behaviour can be changed " +"by passing a keyword argument ``respect_handler_level=True`` to the " +"listener's constructor. When this is done, the listener compares the level " +"of each message with the handler's level, and only passes a message to a " +"handler if it's appropriate to do so." +msgstr "" + +#: ../../howto/logging-cookbook.rst:627 +msgid "" +"The :class:`QueueListener` can be started (and stopped) via the :keyword:" +"`with` statement. For example:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:631 +msgid "" +"with QueueListener(que, handler) as listener:\n" +" # The queue listener automatically starts\n" +" # when the 'with' block is entered.\n" +" pass\n" +"# The queue listener automatically stops once\n" +"# the 'with' block is exited." +msgstr "" + +#: ../../howto/logging-cookbook.rst:643 +msgid "Sending and receiving logging events across a network" +msgstr "" + +#: ../../howto/logging-cookbook.rst:645 +msgid "" +"Let's say you want to send logging events across a network, and handle them " +"at the receiving end. A simple way of doing this is attaching a :class:" +"`SocketHandler` instance to the root logger at the sending end::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:649 +msgid "" +"import logging, logging.handlers\n" +"\n" +"rootLogger = logging.getLogger()\n" +"rootLogger.setLevel(logging.DEBUG)\n" +"socketHandler = logging.handlers.SocketHandler('localhost',\n" +" logging.handlers.DEFAULT_TCP_LOGGING_PORT)\n" +"# don't bother with a formatter, since a socket handler sends the event as\n" +"# an unformatted pickle\n" +"rootLogger.addHandler(socketHandler)\n" +"\n" +"# Now, we can log to the root logger, or any other logger. First the " +"root...\n" +"logging.info('Jackdaws love my big sphinx of quartz.')\n" +"\n" +"# Now, define a couple of other loggers which might represent areas in your\n" +"# application:\n" +"\n" +"logger1 = logging.getLogger('myapp.area1')\n" +"logger2 = logging.getLogger('myapp.area2')\n" +"\n" +"logger1.debug('Quick zephyrs blow, vexing daft Jim.')\n" +"logger1.info('How quickly daft jumping zebras vex.')\n" +"logger2.warning('Jail zesty vixen who grabbed pay from quack.')\n" +"logger2.error('The five boxing wizards jump quickly.')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:673 +msgid "" +"At the receiving end, you can set up a receiver using the :mod:" +"`socketserver` module. Here is a basic working example::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:676 +msgid "" +"import pickle\n" +"import logging\n" +"import logging.handlers\n" +"import socketserver\n" +"import struct\n" +"\n" +"\n" +"class LogRecordStreamHandler(socketserver.StreamRequestHandler):\n" +" \"\"\"Handler for a streaming logging request.\n" +"\n" +" This basically logs the record using whatever logging policy is\n" +" configured locally.\n" +" \"\"\"\n" +"\n" +" def handle(self):\n" +" \"\"\"\n" +" Handle multiple requests - each expected to be a 4-byte length,\n" +" followed by the LogRecord in pickle format. Logs the record\n" +" according to whatever policy is configured locally.\n" +" \"\"\"\n" +" while True:\n" +" chunk = self.connection.recv(4)\n" +" if len(chunk) < 4:\n" +" break\n" +" slen = struct.unpack('>L', chunk)[0]\n" +" chunk = self.connection.recv(slen)\n" +" while len(chunk) < slen:\n" +" chunk = chunk + self.connection.recv(slen - len(chunk))\n" +" obj = self.unPickle(chunk)\n" +" record = logging.makeLogRecord(obj)\n" +" self.handleLogRecord(record)\n" +"\n" +" def unPickle(self, data):\n" +" return pickle.loads(data)\n" +"\n" +" def handleLogRecord(self, record):\n" +" # if a name is specified, we use the named logger rather than the " +"one\n" +" # implied by the record.\n" +" if self.server.logname is not None:\n" +" name = self.server.logname\n" +" else:\n" +" name = record.name\n" +" logger = logging.getLogger(name)\n" +" # N.B. EVERY record gets logged. This is because Logger.handle\n" +" # is normally called AFTER logger-level filtering. If you want\n" +" # to do filtering, do it at the client end to save wasting\n" +" # cycles and network bandwidth!\n" +" logger.handle(record)\n" +"\n" +"class LogRecordSocketReceiver(socketserver.ThreadingTCPServer):\n" +" \"\"\"\n" +" Simple TCP socket-based logging receiver suitable for testing.\n" +" \"\"\"\n" +"\n" +" allow_reuse_address = True\n" +"\n" +" def __init__(self, host='localhost',\n" +" port=logging.handlers.DEFAULT_TCP_LOGGING_PORT,\n" +" handler=LogRecordStreamHandler):\n" +" socketserver.ThreadingTCPServer.__init__(self, (host, port), " +"handler)\n" +" self.abort = 0\n" +" self.timeout = 1\n" +" self.logname = None\n" +"\n" +" def serve_until_stopped(self):\n" +" import select\n" +" abort = 0\n" +" while not abort:\n" +" rd, wr, ex = select.select([self.socket.fileno()],\n" +" [], [],\n" +" self.timeout)\n" +" if rd:\n" +" self.handle_request()\n" +" abort = self.abort\n" +"\n" +"def main():\n" +" logging.basicConfig(\n" +" format='%(relativeCreated)5d %(name)-15s %(levelname)-8s " +"%(message)s')\n" +" tcpserver = LogRecordSocketReceiver()\n" +" print('About to start TCP server...')\n" +" tcpserver.serve_until_stopped()\n" +"\n" +"if __name__ == '__main__':\n" +" main()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:761 +msgid "" +"First run the server, and then the client. On the client side, nothing is " +"printed on the console; on the server side, you should see something like:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:764 +msgid "" +"About to start TCP server...\n" +" 59 root INFO Jackdaws love my big sphinx of quartz.\n" +" 59 myapp.area1 DEBUG Quick zephyrs blow, vexing daft Jim.\n" +" 69 myapp.area1 INFO How quickly daft jumping zebras vex.\n" +" 69 myapp.area2 WARNING Jail zesty vixen who grabbed pay from quack.\n" +" 69 myapp.area2 ERROR The five boxing wizards jump quickly." +msgstr "" + +#: ../../howto/logging-cookbook.rst:773 +msgid "" +"Note that there are some security issues with pickle in some scenarios. If " +"these affect you, you can use an alternative serialization scheme by " +"overriding the :meth:`~SocketHandler.makePickle` method and implementing " +"your alternative there, as well as adapting the above script to use your " +"alternative serialization." +msgstr "" + +#: ../../howto/logging-cookbook.rst:781 +msgid "Running a logging socket listener in production" +msgstr "" + +#: ../../howto/logging-cookbook.rst:785 +msgid "" +"To run a logging listener in production, you may need to use a process-" +"management tool such as `Supervisor `_. `Here is a " +"Gist `__ which provides the bare-bones files to run " +"the above functionality using Supervisor. It consists of the following files:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:792 +msgid "File" +msgstr "" + +#: ../../howto/logging-cookbook.rst:792 +msgid "Purpose" +msgstr "" + +#: ../../howto/logging-cookbook.rst:794 +msgid ":file:`prepare.sh`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:794 +msgid "A Bash script to prepare the environment for testing" +msgstr "" + +#: ../../howto/logging-cookbook.rst:797 +msgid ":file:`supervisor.conf`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:797 +msgid "" +"The Supervisor configuration file, which has entries for the listener and a " +"multi-process web application" +msgstr "" + +#: ../../howto/logging-cookbook.rst:801 +msgid ":file:`ensure_app.sh`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:801 +msgid "" +"A Bash script to ensure that Supervisor is running with the above " +"configuration" +msgstr "" + +#: ../../howto/logging-cookbook.rst:804 +msgid ":file:`log_listener.py`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:804 +msgid "" +"The socket listener program which receives log events and records them to a " +"file" +msgstr "" + +#: ../../howto/logging-cookbook.rst:807 +msgid ":file:`main.py`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:807 +msgid "" +"A simple web application which performs logging via a socket connected to " +"the listener" +msgstr "" + +#: ../../howto/logging-cookbook.rst:810 +msgid ":file:`webapp.json`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:810 +msgid "A JSON configuration file for the web application" +msgstr "" + +#: ../../howto/logging-cookbook.rst:812 +msgid ":file:`client.py`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:812 +msgid "A Python script to exercise the web application" +msgstr "" + +#: ../../howto/logging-cookbook.rst:815 +msgid "" +"The web application uses `Gunicorn `_, which is a " +"popular web application server that starts multiple worker processes to " +"handle requests. This example setup shows how the workers can write to the " +"same log file without conflicting with one another --- they all go through " +"the socket listener." +msgstr "" + +#: ../../howto/logging-cookbook.rst:820 +msgid "To test these files, do the following in a POSIX environment:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:822 +msgid "" +"Download `the Gist `__ as a ZIP archive using the :" +"guilabel:`Download ZIP` button." +msgstr "" + +#: ../../howto/logging-cookbook.rst:825 +msgid "Unzip the above files from the archive into a scratch directory." +msgstr "" + +#: ../../howto/logging-cookbook.rst:827 +msgid "" +"In the scratch directory, run ``bash prepare.sh`` to get things ready. This " +"creates a :file:`run` subdirectory to contain Supervisor-related and log " +"files, and a :file:`venv` subdirectory to contain a virtual environment into " +"which ``bottle``, ``gunicorn`` and ``supervisor`` are installed." +msgstr "" + +#: ../../howto/logging-cookbook.rst:832 +msgid "" +"Run ``bash ensure_app.sh`` to ensure that Supervisor is running with the " +"above configuration." +msgstr "" + +#: ../../howto/logging-cookbook.rst:835 +msgid "" +"Run ``venv/bin/python client.py`` to exercise the web application, which " +"will lead to records being written to the log." +msgstr "" + +#: ../../howto/logging-cookbook.rst:838 +msgid "" +"Inspect the log files in the :file:`run` subdirectory. You should see the " +"most recent log lines in files matching the pattern :file:`app.log*`. They " +"won't be in any particular order, since they have been handled concurrently " +"by different worker processes in a non-deterministic way." +msgstr "" + +#: ../../howto/logging-cookbook.rst:843 +msgid "" +"You can shut down the listener and the web application by running ``venv/bin/" +"supervisorctl -c supervisor.conf shutdown``." +msgstr "" + +#: ../../howto/logging-cookbook.rst:846 +msgid "" +"You may need to tweak the configuration files in the unlikely event that the " +"configured ports clash with something else in your test environment." +msgstr "" + +#: ../../howto/logging-cookbook.rst:849 +msgid "" +"The default configuration uses a TCP socket on port 9020. You can use a Unix " +"Domain socket instead of a TCP socket by doing the following:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:852 +msgid "" +"In :file:`listener.json`, add a ``socket`` key with the path to the domain " +"socket you want to use. If this key is present, the listener listens on the " +"corresponding domain socket and not on a TCP socket (the ``port`` key is " +"ignored)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:857 +msgid "" +"In :file:`webapp.json`, change the socket handler configuration dictionary " +"so that the ``host`` value is the path to the domain socket, and set the " +"``port`` value to ``null``." +msgstr "" + +#: ../../howto/logging-cookbook.rst:867 +msgid "Adding contextual information to your logging output" +msgstr "" + +#: ../../howto/logging-cookbook.rst:869 +msgid "" +"Sometimes you want logging output to contain contextual information in " +"addition to the parameters passed to the logging call. For example, in a " +"networked application, it may be desirable to log client-specific " +"information in the log (e.g. remote client's username, or IP address). " +"Although you could use the *extra* parameter to achieve this, it's not " +"always convenient to pass the information in this way. While it might be " +"tempting to create :class:`Logger` instances on a per-connection basis, this " +"is not a good idea because these instances are not garbage collected. While " +"this is not a problem in practice, when the number of :class:`Logger` " +"instances is dependent on the level of granularity you want to use in " +"logging an application, it could be hard to manage if the number of :class:" +"`Logger` instances becomes effectively unbounded." +msgstr "" + +#: ../../howto/logging-cookbook.rst:884 +msgid "Using LoggerAdapters to impart contextual information" +msgstr "" + +#: ../../howto/logging-cookbook.rst:886 +msgid "" +"An easy way in which you can pass contextual information to be output along " +"with logging event information is to use the :class:`LoggerAdapter` class. " +"This class is designed to look like a :class:`Logger`, so that you can call :" +"meth:`debug`, :meth:`info`, :meth:`warning`, :meth:`error`, :meth:" +"`exception`, :meth:`critical` and :meth:`log`. These methods have the same " +"signatures as their counterparts in :class:`Logger`, so you can use the two " +"types of instances interchangeably." +msgstr "" + +#: ../../howto/logging-cookbook.rst:894 +msgid "" +"When you create an instance of :class:`LoggerAdapter`, you pass it a :class:" +"`Logger` instance and a dict-like object which contains your contextual " +"information. When you call one of the logging methods on an instance of :" +"class:`LoggerAdapter`, it delegates the call to the underlying instance of :" +"class:`Logger` passed to its constructor, and arranges to pass the " +"contextual information in the delegated call. Here's a snippet from the code " +"of :class:`LoggerAdapter`::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:902 +msgid "" +"def debug(self, msg, /, *args, **kwargs):\n" +" \"\"\"\n" +" Delegate a debug call to the underlying logger, after adding\n" +" contextual information from this adapter instance.\n" +" \"\"\"\n" +" msg, kwargs = self.process(msg, kwargs)\n" +" self.logger.debug(msg, *args, **kwargs)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:910 +msgid "" +"The :meth:`~LoggerAdapter.process` method of :class:`LoggerAdapter` is where " +"the contextual information is added to the logging output. It's passed the " +"message and keyword arguments of the logging call, and it passes back " +"(potentially) modified versions of these to use in the call to the " +"underlying logger. The default implementation of this method leaves the " +"message alone, but inserts an 'extra' key in the keyword argument whose " +"value is the dict-like object passed to the constructor. Of course, if you " +"had passed an 'extra' keyword argument in the call to the adapter, it will " +"be silently overwritten." +msgstr "" + +#: ../../howto/logging-cookbook.rst:919 +msgid "" +"The advantage of using 'extra' is that the values in the dict-like object " +"are merged into the :class:`LogRecord` instance's __dict__, allowing you to " +"use customized strings with your :class:`Formatter` instances which know " +"about the keys of the dict-like object. If you need a different method, e.g. " +"if you want to prepend or append the contextual information to the message " +"string, you just need to subclass :class:`LoggerAdapter` and override :meth:" +"`~LoggerAdapter.process` to do what you need. Here is a simple example::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:927 +msgid "" +"class CustomAdapter(logging.LoggerAdapter):\n" +" \"\"\"\n" +" This example adapter expects the passed in dict-like object to have a\n" +" 'connid' key, whose value in brackets is prepended to the log message.\n" +" \"\"\"\n" +" def process(self, msg, kwargs):\n" +" return '[%s] %s' % (self.extra['connid'], msg), kwargs" +msgstr "" + +#: ../../howto/logging-cookbook.rst:935 +msgid "which you can use like this::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:937 +msgid "" +"logger = logging.getLogger(__name__)\n" +"adapter = CustomAdapter(logger, {'connid': some_conn_id})" +msgstr "" + +#: ../../howto/logging-cookbook.rst:940 +msgid "" +"Then any events that you log to the adapter will have the value of " +"``some_conn_id`` prepended to the log messages." +msgstr "" + +#: ../../howto/logging-cookbook.rst:944 +msgid "Using objects other than dicts to pass contextual information" +msgstr "" + +#: ../../howto/logging-cookbook.rst:946 +msgid "" +"You don't need to pass an actual dict to a :class:`LoggerAdapter` - you " +"could pass an instance of a class which implements ``__getitem__`` and " +"``__iter__`` so that it looks like a dict to logging. This would be useful " +"if you want to generate values dynamically (whereas the values in a dict " +"would be constant)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:955 +msgid "Using Filters to impart contextual information" +msgstr "" + +#: ../../howto/logging-cookbook.rst:957 +msgid "" +"You can also add contextual information to log output using a user-defined :" +"class:`Filter`. ``Filter`` instances are allowed to modify the " +"``LogRecords`` passed to them, including adding additional attributes which " +"can then be output using a suitable format string, or if needed a custom :" +"class:`Formatter`." +msgstr "" + +#: ../../howto/logging-cookbook.rst:962 +msgid "" +"For example in a web application, the request being processed (or at least, " +"the interesting parts of it) can be stored in a threadlocal (:class:" +"`threading.local`) variable, and then accessed from a ``Filter`` to add, " +"say, information from the request - say, the remote IP address and remote " +"user's username - to the ``LogRecord``, using the attribute names 'ip' and " +"'user' as in the ``LoggerAdapter`` example above. In that case, the same " +"format string can be used to get similar output to that shown above. Here's " +"an example script::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:971 +msgid "" +"import logging\n" +"from random import choice\n" +"\n" +"class ContextFilter(logging.Filter):\n" +" \"\"\"\n" +" This is a filter which injects contextual information into the log.\n" +"\n" +" Rather than use actual contextual information, we just use random\n" +" data in this demo.\n" +" \"\"\"\n" +"\n" +" USERS = ['jim', 'fred', 'sheila']\n" +" IPS = ['123.231.231.123', '127.0.0.1', '192.168.0.1']\n" +"\n" +" def filter(self, record):\n" +"\n" +" record.ip = choice(ContextFilter.IPS)\n" +" record.user = choice(ContextFilter.USERS)\n" +" return True\n" +"\n" +"if __name__ == '__main__':\n" +" levels = (logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, " +"logging.CRITICAL)\n" +" logging.basicConfig(level=logging.DEBUG,\n" +" format='%(asctime)-15s %(name)-5s %(levelname)-8s " +"IP: %(ip)-15s User: %(user)-8s %(message)s')\n" +" a1 = logging.getLogger('a.b.c')\n" +" a2 = logging.getLogger('d.e.f')\n" +"\n" +" f = ContextFilter()\n" +" a1.addFilter(f)\n" +" a2.addFilter(f)\n" +" a1.debug('A debug message')\n" +" a1.info('An info message with %s', 'some parameters')\n" +" for x in range(10):\n" +" lvl = choice(levels)\n" +" lvlname = logging.getLevelName(lvl)\n" +" a2.log(lvl, 'A message at %s level with %d %s', lvlname, 2, " +"'parameters')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1008 +msgid "which, when run, produces something like:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1010 +msgid "" +"2010-09-06 22:38:15,292 a.b.c DEBUG IP: 123.231.231.123 User: fred A " +"debug message\n" +"2010-09-06 22:38:15,300 a.b.c INFO IP: 192.168.0.1 User: sheila An " +"info message with some parameters\n" +"2010-09-06 22:38:15,300 d.e.f CRITICAL IP: 127.0.0.1 User: sheila A " +"message at CRITICAL level with 2 parameters\n" +"2010-09-06 22:38:15,300 d.e.f ERROR IP: 127.0.0.1 User: jim A " +"message at ERROR level with 2 parameters\n" +"2010-09-06 22:38:15,300 d.e.f DEBUG IP: 127.0.0.1 User: sheila A " +"message at DEBUG level with 2 parameters\n" +"2010-09-06 22:38:15,300 d.e.f ERROR IP: 123.231.231.123 User: fred A " +"message at ERROR level with 2 parameters\n" +"2010-09-06 22:38:15,300 d.e.f CRITICAL IP: 192.168.0.1 User: jim A " +"message at CRITICAL level with 2 parameters\n" +"2010-09-06 22:38:15,300 d.e.f CRITICAL IP: 127.0.0.1 User: sheila A " +"message at CRITICAL level with 2 parameters\n" +"2010-09-06 22:38:15,300 d.e.f DEBUG IP: 192.168.0.1 User: jim A " +"message at DEBUG level with 2 parameters\n" +"2010-09-06 22:38:15,301 d.e.f ERROR IP: 127.0.0.1 User: sheila A " +"message at ERROR level with 2 parameters\n" +"2010-09-06 22:38:15,301 d.e.f DEBUG IP: 123.231.231.123 User: fred A " +"message at DEBUG level with 2 parameters\n" +"2010-09-06 22:38:15,301 d.e.f INFO IP: 123.231.231.123 User: fred A " +"message at INFO level with 2 parameters" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1026 +msgid "Use of ``contextvars``" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1028 +msgid "" +"Since Python 3.7, the :mod:`contextvars` module has provided context-local " +"storage which works for both :mod:`threading` and :mod:`asyncio` processing " +"needs. This type of storage may thus be generally preferable to thread-" +"locals. The following example shows how, in a multi-threaded environment, " +"logs can populated with contextual information such as, for example, request " +"attributes handled by web applications." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1034 +msgid "" +"For the purposes of illustration, say that you have different web " +"applications, each independent of the other but running in the same Python " +"process and using a library common to them. How can each of these " +"applications have their own log, where all logging messages from the library " +"(and other request processing code) are directed to the appropriate " +"application's log file, while including in the log additional contextual " +"information such as client IP, HTTP request method and client username?" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1041 +msgid "Let's assume that the library can be simulated by the following code:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1043 +msgid "" +"# webapplib.py\n" +"import logging\n" +"import time\n" +"\n" +"logger = logging.getLogger(__name__)\n" +"\n" +"def useful():\n" +" # Just a representative event logged from the library\n" +" logger.debug('Hello from webapplib!')\n" +" # Just sleep for a bit so other threads get to run\n" +" time.sleep(0.01)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1057 +msgid "" +"We can simulate the multiple web applications by means of two simple " +"classes, ``Request`` and ``WebApp``. These simulate how real threaded web " +"applications work - each request is handled by a thread:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1061 +msgid "" +"# main.py\n" +"import argparse\n" +"from contextvars import ContextVar\n" +"import logging\n" +"import os\n" +"from random import choice\n" +"import threading\n" +"import webapplib\n" +"\n" +"logger = logging.getLogger(__name__)\n" +"root = logging.getLogger()\n" +"root.setLevel(logging.DEBUG)\n" +"\n" +"class Request:\n" +" \"\"\"\n" +" A simple dummy request class which just holds dummy HTTP request " +"method,\n" +" client IP address and client username\n" +" \"\"\"\n" +" def __init__(self, method, ip, user):\n" +" self.method = method\n" +" self.ip = ip\n" +" self.user = user\n" +"\n" +"# A dummy set of requests which will be used in the simulation - we'll just " +"pick\n" +"# from this list randomly. Note that all GET requests are from 192.168.2." +"XXX\n" +"# addresses, whereas POST requests are from 192.16.3.XXX addresses. Three " +"users\n" +"# are represented in the sample requests.\n" +"\n" +"REQUESTS = [\n" +" Request('GET', '192.168.2.20', 'jim'),\n" +" Request('POST', '192.168.3.20', 'fred'),\n" +" Request('GET', '192.168.2.21', 'sheila'),\n" +" Request('POST', '192.168.3.21', 'jim'),\n" +" Request('GET', '192.168.2.22', 'fred'),\n" +" Request('POST', '192.168.3.22', 'sheila'),\n" +"]\n" +"\n" +"# Note that the format string includes references to request context " +"information\n" +"# such as HTTP method, client IP and username\n" +"\n" +"formatter = logging.Formatter('%(threadName)-11s %(appName)s %(name)-9s " +"%(user)-6s %(ip)s %(method)-4s %(message)s')\n" +"\n" +"# Create our context variables. These will be filled at the start of " +"request\n" +"# processing, and used in the logging that happens during that processing\n" +"\n" +"ctx_request = ContextVar('request')\n" +"ctx_appname = ContextVar('appname')\n" +"\n" +"class InjectingFilter(logging.Filter):\n" +" \"\"\"\n" +" A filter which injects context-specific information into logs and " +"ensures\n" +" that only information for a specific webapp is included in its log\n" +" \"\"\"\n" +" def __init__(self, app):\n" +" self.app = app\n" +"\n" +" def filter(self, record):\n" +" request = ctx_request.get()\n" +" record.method = request.method\n" +" record.ip = request.ip\n" +" record.user = request.user\n" +" record.appName = appName = ctx_appname.get()\n" +" return appName == self.app.name\n" +"\n" +"class WebApp:\n" +" \"\"\"\n" +" A dummy web application class which has its own handler and filter for " +"a\n" +" webapp-specific log.\n" +" \"\"\"\n" +" def __init__(self, name):\n" +" self.name = name\n" +" handler = logging.FileHandler(name + '.log', 'w')\n" +" f = InjectingFilter(self)\n" +" handler.setFormatter(formatter)\n" +" handler.addFilter(f)\n" +" root.addHandler(handler)\n" +" self.num_requests = 0\n" +"\n" +" def process_request(self, request):\n" +" \"\"\"\n" +" This is the dummy method for processing a request. It's called on a\n" +" different thread for every request. We store the context information " +"into\n" +" the context vars before doing anything else.\n" +" \"\"\"\n" +" ctx_request.set(request)\n" +" ctx_appname.set(self.name)\n" +" self.num_requests += 1\n" +" logger.debug('Request processing started')\n" +" webapplib.useful()\n" +" logger.debug('Request processing finished')\n" +"\n" +"def main():\n" +" fn = os.path.splitext(os.path.basename(__file__))[0]\n" +" adhf = argparse.ArgumentDefaultsHelpFormatter\n" +" ap = argparse.ArgumentParser(formatter_class=adhf, prog=fn,\n" +" description='Simulate a couple of web '\n" +" 'applications handling some '\n" +" 'requests, showing how request " +"'\n" +" 'context can be used to '\n" +" 'populate logs')\n" +" aa = ap.add_argument\n" +" aa('--count', '-c', type=int, default=100, help='How many requests to " +"simulate')\n" +" options = ap.parse_args()\n" +"\n" +" # Create the dummy webapps and put them in a list which we can use to " +"select\n" +" # from randomly\n" +" app1 = WebApp('app1')\n" +" app2 = WebApp('app2')\n" +" apps = [app1, app2]\n" +" threads = []\n" +" # Add a common handler which will capture all events\n" +" handler = logging.FileHandler('app.log', 'w')\n" +" handler.setFormatter(formatter)\n" +" root.addHandler(handler)\n" +"\n" +" # Generate calls to process requests\n" +" for i in range(options.count):\n" +" try:\n" +" # Pick an app at random and a request for it to process\n" +" app = choice(apps)\n" +" request = choice(REQUESTS)\n" +" # Process the request in its own thread\n" +" t = threading.Thread(target=app.process_request, " +"args=(request,))\n" +" threads.append(t)\n" +" t.start()\n" +" except KeyboardInterrupt:\n" +" break\n" +"\n" +" # Wait for the threads to terminate\n" +" for t in threads:\n" +" t.join()\n" +"\n" +" for app in apps:\n" +" print('%s processed %s requests' % (app.name, app.num_requests))\n" +"\n" +"if __name__ == '__main__':\n" +" main()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1201 +msgid "" +"If you run the above, you should find that roughly half the requests go " +"into :file:`app1.log` and the rest into :file:`app2.log`, and the all the " +"requests are logged to :file:`app.log`. Each webapp-specific log will " +"contain only log entries for only that webapp, and the request information " +"will be displayed consistently in the log (i.e. the information in each " +"dummy request will always appear together in a log line). This is " +"illustrated by the following shell output:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1208 +msgid "" +"~/logging-contextual-webapp$ python main.py\n" +"app1 processed 51 requests\n" +"app2 processed 49 requests\n" +"~/logging-contextual-webapp$ wc -l *.log\n" +" 153 app1.log\n" +" 147 app2.log\n" +" 300 app.log\n" +" 600 total\n" +"~/logging-contextual-webapp$ head -3 app1.log\n" +"Thread-3 (process_request) app1 __main__ jim 192.168.3.21 POST Request " +"processing started\n" +"Thread-3 (process_request) app1 webapplib jim 192.168.3.21 POST Hello " +"from webapplib!\n" +"Thread-5 (process_request) app1 __main__ jim 192.168.3.21 POST Request " +"processing started\n" +"~/logging-contextual-webapp$ head -3 app2.log\n" +"Thread-1 (process_request) app2 __main__ sheila 192.168.2.21 GET Request " +"processing started\n" +"Thread-1 (process_request) app2 webapplib sheila 192.168.2.21 GET Hello " +"from webapplib!\n" +"Thread-2 (process_request) app2 __main__ jim 192.168.2.20 GET Request " +"processing started\n" +"~/logging-contextual-webapp$ head app.log\n" +"Thread-1 (process_request) app2 __main__ sheila 192.168.2.21 GET Request " +"processing started\n" +"Thread-1 (process_request) app2 webapplib sheila 192.168.2.21 GET Hello " +"from webapplib!\n" +"Thread-2 (process_request) app2 __main__ jim 192.168.2.20 GET Request " +"processing started\n" +"Thread-3 (process_request) app1 __main__ jim 192.168.3.21 POST Request " +"processing started\n" +"Thread-2 (process_request) app2 webapplib jim 192.168.2.20 GET Hello " +"from webapplib!\n" +"Thread-3 (process_request) app1 webapplib jim 192.168.3.21 POST Hello " +"from webapplib!\n" +"Thread-4 (process_request) app2 __main__ fred 192.168.2.22 GET Request " +"processing started\n" +"Thread-5 (process_request) app1 __main__ jim 192.168.3.21 POST Request " +"processing started\n" +"Thread-4 (process_request) app2 webapplib fred 192.168.2.22 GET Hello " +"from webapplib!\n" +"Thread-6 (process_request) app1 __main__ jim 192.168.3.21 POST Request " +"processing started\n" +"~/logging-contextual-webapp$ grep app1 app1.log | wc -l\n" +"153\n" +"~/logging-contextual-webapp$ grep app2 app2.log | wc -l\n" +"147\n" +"~/logging-contextual-webapp$ grep app1 app.log | wc -l\n" +"153\n" +"~/logging-contextual-webapp$ grep app2 app.log | wc -l\n" +"147" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1248 +msgid "Imparting contextual information in handlers" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1250 +msgid "" +"Each :class:`~Handler` has its own chain of filters. If you want to add " +"contextual information to a :class:`LogRecord` without leaking it to other " +"handlers, you can use a filter that returns a new :class:`~LogRecord` " +"instead of modifying it in-place, as shown in the following script::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1255 +msgid "" +"import copy\n" +"import logging\n" +"\n" +"def filter(record: logging.LogRecord):\n" +" record = copy.copy(record)\n" +" record.user = 'jim'\n" +" return record\n" +"\n" +"if __name__ == '__main__':\n" +" logger = logging.getLogger()\n" +" logger.setLevel(logging.INFO)\n" +" handler = logging.StreamHandler()\n" +" formatter = logging.Formatter('%(message)s from %(user)-8s')\n" +" handler.setFormatter(formatter)\n" +" handler.addFilter(filter)\n" +" logger.addHandler(handler)\n" +"\n" +" logger.info('A log message')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1277 +msgid "Logging to a single file from multiple processes" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1279 +msgid "" +"Although logging is thread-safe, and logging to a single file from multiple " +"threads in a single process *is* supported, logging to a single file from " +"*multiple processes* is *not* supported, because there is no standard way to " +"serialize access to a single file across multiple processes in Python. If " +"you need to log to a single file from multiple processes, one way of doing " +"this is to have all the processes log to a :class:`~handlers.SocketHandler`, " +"and have a separate process which implements a socket server which reads " +"from the socket and logs to file. (If you prefer, you can dedicate one " +"thread in one of the existing processes to perform this function.) :ref:" +"`This section ` documents this approach in more detail and " +"includes a working socket receiver which can be used as a starting point for " +"you to adapt in your own applications." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1292 +msgid "" +"You could also write your own handler which uses the :class:" +"`~multiprocessing.Lock` class from the :mod:`multiprocessing` module to " +"serialize access to the file from your processes. The stdlib :class:" +"`FileHandler` and subclasses do not make use of :mod:`multiprocessing`." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1299 +msgid "" +"Alternatively, you can use a ``Queue`` and a :class:`QueueHandler` to send " +"all logging events to one of the processes in your multi-process " +"application. The following example script demonstrates how you can do this; " +"in the example a separate listener process listens for events sent by other " +"processes and logs them according to its own logging configuration. Although " +"the example only demonstrates one way of doing it (for example, you may want " +"to use a listener thread rather than a separate listener process -- the " +"implementation would be analogous) it does allow for completely different " +"logging configurations for the listener and the other processes in your " +"application, and can be used as the basis for code meeting your own specific " +"requirements::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1310 +msgid "" +"# You'll need these imports in your own code\n" +"import logging\n" +"import logging.handlers\n" +"import multiprocessing\n" +"\n" +"# Next two import lines for this demo only\n" +"from random import choice, random\n" +"import time\n" +"\n" +"#\n" +"# Because you'll want to define the logging configurations for listener and " +"workers, the\n" +"# listener and worker process functions take a configurer parameter which is " +"a callable\n" +"# for configuring logging for that process. These functions are also passed " +"the queue,\n" +"# which they use for communication.\n" +"#\n" +"# In practice, you can configure the listener however you want, but note " +"that in this\n" +"# simple example, the listener does not apply level or filter logic to " +"received records.\n" +"# In practice, you would probably want to do this logic in the worker " +"processes, to avoid\n" +"# sending events which would be filtered out between processes.\n" +"#\n" +"# The size of the rotated files is made small so you can see the results " +"easily.\n" +"def listener_configurer():\n" +" root = logging.getLogger()\n" +" h = logging.handlers.RotatingFileHandler('mptest.log', 'a', 300, 10)\n" +" f = logging.Formatter('%(asctime)s %(processName)-10s %(name)s " +"%(levelname)-8s %(message)s')\n" +" h.setFormatter(f)\n" +" root.addHandler(h)\n" +"\n" +"# This is the listener process top-level loop: wait for logging events\n" +"# (LogRecords)on the queue and handle them, quit when you get a None for a\n" +"# LogRecord.\n" +"def listener_process(queue, configurer):\n" +" configurer()\n" +" while True:\n" +" try:\n" +" record = queue.get()\n" +" if record is None: # We send this as a sentinel to tell the " +"listener to quit.\n" +" break\n" +" logger = logging.getLogger(record.name)\n" +" logger.handle(record) # No level or filter logic applied - just " +"do it!\n" +" except Exception:\n" +" import sys, traceback\n" +" print('Whoops! Problem:', file=sys.stderr)\n" +" traceback.print_exc(file=sys.stderr)\n" +"\n" +"# Arrays used for random selections in this demo\n" +"\n" +"LEVELS = [logging.DEBUG, logging.INFO, logging.WARNING,\n" +" logging.ERROR, logging.CRITICAL]\n" +"\n" +"LOGGERS = ['a.b.c', 'd.e.f']\n" +"\n" +"MESSAGES = [\n" +" 'Random message #1',\n" +" 'Random message #2',\n" +" 'Random message #3',\n" +"]\n" +"\n" +"# The worker configuration is done at the start of the worker process run.\n" +"# Note that on Windows you can't rely on fork semantics, so each process\n" +"# will run the logging configuration code when it starts.\n" +"def worker_configurer(queue):\n" +" h = logging.handlers.QueueHandler(queue) # Just the one handler needed\n" +" root = logging.getLogger()\n" +" root.addHandler(h)\n" +" # send all messages, for demo; no other level or filter logic applied.\n" +" root.setLevel(logging.DEBUG)\n" +"\n" +"# This is the worker process top-level loop, which just logs ten events " +"with\n" +"# random intervening delays before terminating.\n" +"# The print messages are just so you know it's doing something!\n" +"def worker_process(queue, configurer):\n" +" configurer(queue)\n" +" name = multiprocessing.current_process().name\n" +" print('Worker started: %s' % name)\n" +" for i in range(10):\n" +" time.sleep(random())\n" +" logger = logging.getLogger(choice(LOGGERS))\n" +" level = choice(LEVELS)\n" +" message = choice(MESSAGES)\n" +" logger.log(level, message)\n" +" print('Worker finished: %s' % name)\n" +"\n" +"# Here's where the demo gets orchestrated. Create the queue, create and " +"start\n" +"# the listener, create ten workers and start them, wait for them to finish,\n" +"# then send a None to the queue to tell the listener to finish.\n" +"def main():\n" +" queue = multiprocessing.Queue(-1)\n" +" listener = multiprocessing.Process(target=listener_process,\n" +" args=(queue, listener_configurer))\n" +" listener.start()\n" +" workers = []\n" +" for i in range(10):\n" +" worker = multiprocessing.Process(target=worker_process,\n" +" args=(queue, worker_configurer))\n" +" workers.append(worker)\n" +" worker.start()\n" +" for w in workers:\n" +" w.join()\n" +" queue.put_nowait(None)\n" +" listener.join()\n" +"\n" +"if __name__ == '__main__':\n" +" main()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1415 +msgid "" +"A variant of the above script keeps the logging in the main process, in a " +"separate thread::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1418 +msgid "" +"import logging\n" +"import logging.config\n" +"import logging.handlers\n" +"from multiprocessing import Process, Queue\n" +"import random\n" +"import threading\n" +"import time\n" +"\n" +"def logger_thread(q):\n" +" while True:\n" +" record = q.get()\n" +" if record is None:\n" +" break\n" +" logger = logging.getLogger(record.name)\n" +" logger.handle(record)\n" +"\n" +"\n" +"def worker_process(q):\n" +" qh = logging.handlers.QueueHandler(q)\n" +" root = logging.getLogger()\n" +" root.setLevel(logging.DEBUG)\n" +" root.addHandler(qh)\n" +" levels = [logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR,\n" +" logging.CRITICAL]\n" +" loggers = ['foo', 'foo.bar', 'foo.bar.baz',\n" +" 'spam', 'spam.ham', 'spam.ham.eggs']\n" +" for i in range(100):\n" +" lvl = random.choice(levels)\n" +" logger = logging.getLogger(random.choice(loggers))\n" +" logger.log(lvl, 'Message no. %d', i)\n" +"\n" +"if __name__ == '__main__':\n" +" q = Queue()\n" +" d = {\n" +" 'version': 1,\n" +" 'formatters': {\n" +" 'detailed': {\n" +" 'class': 'logging.Formatter',\n" +" 'format': '%(asctime)s %(name)-15s %(levelname)-8s " +"%(processName)-10s %(message)s'\n" +" }\n" +" },\n" +" 'handlers': {\n" +" 'console': {\n" +" 'class': 'logging.StreamHandler',\n" +" 'level': 'INFO',\n" +" },\n" +" 'file': {\n" +" 'class': 'logging.FileHandler',\n" +" 'filename': 'mplog.log',\n" +" 'mode': 'w',\n" +" 'formatter': 'detailed',\n" +" },\n" +" 'foofile': {\n" +" 'class': 'logging.FileHandler',\n" +" 'filename': 'mplog-foo.log',\n" +" 'mode': 'w',\n" +" 'formatter': 'detailed',\n" +" },\n" +" 'errors': {\n" +" 'class': 'logging.FileHandler',\n" +" 'filename': 'mplog-errors.log',\n" +" 'mode': 'w',\n" +" 'level': 'ERROR',\n" +" 'formatter': 'detailed',\n" +" },\n" +" },\n" +" 'loggers': {\n" +" 'foo': {\n" +" 'handlers': ['foofile']\n" +" }\n" +" },\n" +" 'root': {\n" +" 'level': 'DEBUG',\n" +" 'handlers': ['console', 'file', 'errors']\n" +" },\n" +" }\n" +" workers = []\n" +" for i in range(5):\n" +" wp = Process(target=worker_process, name='worker %d' % (i + 1), " +"args=(q,))\n" +" workers.append(wp)\n" +" wp.start()\n" +" logging.config.dictConfig(d)\n" +" lp = threading.Thread(target=logger_thread, args=(q,))\n" +" lp.start()\n" +" # At this point, the main process could do some useful work of its own\n" +" # Once it's done that, it can wait for the workers to terminate...\n" +" for wp in workers:\n" +" wp.join()\n" +" # And now tell the logging thread to finish up, too\n" +" q.put(None)\n" +" lp.join()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1510 +msgid "" +"This variant shows how you can e.g. apply configuration for particular " +"loggers - e.g. the ``foo`` logger has a special handler which stores all " +"events in the ``foo`` subsystem in a file ``mplog-foo.log``. This will be " +"used by the logging machinery in the main process (even though the logging " +"events are generated in the worker processes) to direct the messages to the " +"appropriate destinations." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1517 +msgid "Using concurrent.futures.ProcessPoolExecutor" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1519 +msgid "" +"If you want to use :class:`concurrent.futures.ProcessPoolExecutor` to start " +"your worker processes, you need to create the queue slightly differently. " +"Instead of" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1523 +msgid "queue = multiprocessing.Queue(-1)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1527 +msgid "you should use" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1529 +msgid "" +"queue = multiprocessing.Manager().Queue(-1) # also works with the examples " +"above" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1533 +msgid "and you can then replace the worker creation from this::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1535 +msgid "" +"workers = []\n" +"for i in range(10):\n" +" worker = multiprocessing.Process(target=worker_process,\n" +" args=(queue, worker_configurer))\n" +" workers.append(worker)\n" +" worker.start()\n" +"for w in workers:\n" +" w.join()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1544 +msgid "to this (remembering to first import :mod:`concurrent.futures`)::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1546 +msgid "" +"with concurrent.futures.ProcessPoolExecutor(max_workers=10) as executor:\n" +" for i in range(10):\n" +" executor.submit(worker_process, queue, worker_configurer)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1551 +msgid "Deploying web applications using Gunicorn and uWSGI" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1553 +msgid "" +"When deploying web applications using `Gunicorn `_ or " +"`uWSGI `_ (or similar), " +"multiple worker processes are created to handle client requests. In such " +"environments, avoid creating file-based handlers directly in your web " +"application. Instead, use a :class:`SocketHandler` to log from the web " +"application to a listener in a separate process. This can be set up using a " +"process management tool such as Supervisor - see `Running a logging socket " +"listener in production`_ for more details." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1563 +msgid "Using file rotation" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1565 +msgid "" +"Sometimes you want to let a log file grow to a certain size, then open a new " +"file and log to that. You may want to keep a certain number of these files, " +"and when that many files have been created, rotate the files so that the " +"number of files and the size of the files both remain bounded. For this " +"usage pattern, the logging package provides a :class:`RotatingFileHandler`::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1571 +msgid "" +"import glob\n" +"import logging\n" +"import logging.handlers\n" +"\n" +"LOG_FILENAME = 'logging_rotatingfile_example.out'\n" +"\n" +"# Set up a specific logger with our desired output level\n" +"my_logger = logging.getLogger('MyLogger')\n" +"my_logger.setLevel(logging.DEBUG)\n" +"\n" +"# Add the log message handler to the logger\n" +"handler = logging.handlers.RotatingFileHandler(\n" +" LOG_FILENAME, maxBytes=20, backupCount=5)\n" +"\n" +"my_logger.addHandler(handler)\n" +"\n" +"# Log some messages\n" +"for i in range(20):\n" +" my_logger.debug('i = %d' % i)\n" +"\n" +"# See what files are created\n" +"logfiles = glob.glob('%s*' % LOG_FILENAME)\n" +"\n" +"for filename in logfiles:\n" +" print(filename)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1597 +msgid "" +"The result should be 6 separate files, each with part of the log history for " +"the application:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1600 +msgid "" +"logging_rotatingfile_example.out\n" +"logging_rotatingfile_example.out.1\n" +"logging_rotatingfile_example.out.2\n" +"logging_rotatingfile_example.out.3\n" +"logging_rotatingfile_example.out.4\n" +"logging_rotatingfile_example.out.5" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1609 +msgid "" +"The most current file is always :file:`logging_rotatingfile_example.out`, " +"and each time it reaches the size limit it is renamed with the suffix " +"``.1``. Each of the existing backup files is renamed to increment the suffix " +"(``.1`` becomes ``.2``, etc.) and the ``.6`` file is erased." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1614 +msgid "" +"Obviously this example sets the log length much too small as an extreme " +"example. You would want to set *maxBytes* to an appropriate value." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1622 +msgid "Use of alternative formatting styles" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1624 +msgid "" +"When logging was added to the Python standard library, the only way of " +"formatting messages with variable content was to use the %-formatting " +"method. Since then, Python has gained two new formatting approaches: :class:" +"`string.Template` (added in Python 2.4) and :meth:`str.format` (added in " +"Python 2.6)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1630 +msgid "" +"Logging (as of 3.2) provides improved support for these two additional " +"formatting styles. The :class:`Formatter` class been enhanced to take an " +"additional, optional keyword parameter named ``style``. This defaults to " +"``'%'``, but other possible values are ``'{'`` and ``'$'``, which correspond " +"to the other two formatting styles. Backwards compatibility is maintained by " +"default (as you would expect), but by explicitly specifying a style " +"parameter, you get the ability to specify format strings which work with :" +"meth:`str.format` or :class:`string.Template`. Here's an example console " +"session to show the possibilities:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1640 +msgid "" +">>> import logging\n" +">>> root = logging.getLogger()\n" +">>> root.setLevel(logging.DEBUG)\n" +">>> handler = logging.StreamHandler()\n" +">>> bf = logging.Formatter('{asctime} {name} {levelname:8s} {message}',\n" +"... style='{')\n" +">>> handler.setFormatter(bf)\n" +">>> root.addHandler(handler)\n" +">>> logger = logging.getLogger('foo.bar')\n" +">>> logger.debug('This is a DEBUG message')\n" +"2010-10-28 15:11:55,341 foo.bar DEBUG This is a DEBUG message\n" +">>> logger.critical('This is a CRITICAL message')\n" +"2010-10-28 15:12:11,526 foo.bar CRITICAL This is a CRITICAL message\n" +">>> df = logging.Formatter('$asctime $name ${levelname} $message',\n" +"... style='$')\n" +">>> handler.setFormatter(df)\n" +">>> logger.debug('This is a DEBUG message')\n" +"2010-10-28 15:13:06,924 foo.bar DEBUG This is a DEBUG message\n" +">>> logger.critical('This is a CRITICAL message')\n" +"2010-10-28 15:13:11,494 foo.bar CRITICAL This is a CRITICAL message\n" +">>>" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1664 +msgid "" +"Note that the formatting of logging messages for final output to logs is " +"completely independent of how an individual logging message is constructed. " +"That can still use %-formatting, as shown here::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1668 +msgid "" +">>> logger.error('This is an%s %s %s', 'other,', 'ERROR,', 'message')\n" +"2010-10-28 15:19:29,833 foo.bar ERROR This is another, ERROR, message\n" +">>>" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1672 +msgid "" +"Logging calls (``logger.debug()``, ``logger.info()`` etc.) only take " +"positional parameters for the actual logging message itself, with keyword " +"parameters used only for determining options for how to handle the actual " +"logging call (e.g. the ``exc_info`` keyword parameter to indicate that " +"traceback information should be logged, or the ``extra`` keyword parameter " +"to indicate additional contextual information to be added to the log). So " +"you cannot directly make logging calls using :meth:`str.format` or :class:" +"`string.Template` syntax, because internally the logging package uses %-" +"formatting to merge the format string and the variable arguments. There " +"would be no changing this while preserving backward compatibility, since all " +"logging calls which are out there in existing code will be using %-format " +"strings." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1685 +msgid "" +"There is, however, a way that you can use {}- and $- formatting to construct " +"your individual log messages. Recall that for a message you can use an " +"arbitrary object as a message format string, and that the logging package " +"will call ``str()`` on that object to get the actual format string. Consider " +"the following two classes::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1691 ../../howto/logging-cookbook.rst:2779 +msgid "" +"class BraceMessage:\n" +" def __init__(self, fmt, /, *args, **kwargs):\n" +" self.fmt = fmt\n" +" self.args = args\n" +" self.kwargs = kwargs\n" +"\n" +" def __str__(self):\n" +" return self.fmt.format(*self.args, **self.kwargs)\n" +"\n" +"class DollarMessage:\n" +" def __init__(self, fmt, /, **kwargs):\n" +" self.fmt = fmt\n" +" self.kwargs = kwargs\n" +"\n" +" def __str__(self):\n" +" from string import Template\n" +" return Template(self.fmt).substitute(**self.kwargs)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1709 +msgid "" +"Either of these can be used in place of a format string, to allow {}- or $-" +"formatting to be used to build the actual \"message\" part which appears in " +"the formatted log output in place of \"%(message)s\" or \"{message}\" or " +"\"$message\". It's a little unwieldy to use the class names whenever you " +"want to log something, but it's quite palatable if you use an alias such as " +"__ (double underscore --- not to be confused with _, the single underscore " +"used as a synonym/alias for :func:`gettext.gettext` or its brethren)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1717 +msgid "" +"The above classes are not included in Python, though they're easy enough to " +"copy and paste into your own code. They can be used as follows (assuming " +"that they're declared in a module called ``wherever``):" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1721 +msgid "" +">>> from wherever import BraceMessage as __\n" +">>> print(__('Message with {0} {name}', 2, name='placeholders'))\n" +"Message with 2 placeholders\n" +">>> class Point: pass\n" +"...\n" +">>> p = Point()\n" +">>> p.x = 0.5\n" +">>> p.y = 0.5\n" +">>> print(__('Message with coordinates: ({point.x:.2f}, {point.y:.2f})',\n" +"... point=p))\n" +"Message with coordinates: (0.50, 0.50)\n" +">>> from wherever import DollarMessage as __\n" +">>> print(__('Message with $num $what', num=2, what='placeholders'))\n" +"Message with 2 placeholders\n" +">>>" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1739 +msgid "" +"While the above examples use ``print()`` to show how the formatting works, " +"you would of course use ``logger.debug()`` or similar to actually log using " +"this approach." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1743 +msgid "" +"One thing to note is that you pay no significant performance penalty with " +"this approach: the actual formatting happens not when you make the logging " +"call, but when (and if) the logged message is actually about to be output to " +"a log by a handler. So the only slightly unusual thing which might trip you " +"up is that the parentheses go around the format string and the arguments, " +"not just the format string. That's because the __ notation is just syntax " +"sugar for a constructor call to one of the :samp:`{XXX}Message` classes." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1751 +msgid "" +"If you prefer, you can use a :class:`LoggerAdapter` to achieve a similar " +"effect to the above, as in the following example::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1754 +msgid "" +"import logging\n" +"\n" +"class Message:\n" +" def __init__(self, fmt, args):\n" +" self.fmt = fmt\n" +" self.args = args\n" +"\n" +" def __str__(self):\n" +" return self.fmt.format(*self.args)\n" +"\n" +"class StyleAdapter(logging.LoggerAdapter):\n" +" def log(self, level, msg, /, *args, stacklevel=1, **kwargs):\n" +" if self.isEnabledFor(level):\n" +" msg, kwargs = self.process(msg, kwargs)\n" +" self.logger.log(level, Message(msg, args), **kwargs,\n" +" stacklevel=stacklevel+1)\n" +"\n" +"logger = StyleAdapter(logging.getLogger(__name__))\n" +"\n" +"def main():\n" +" logger.debug('Hello, {}', 'world!')\n" +"\n" +"if __name__ == '__main__':\n" +" logging.basicConfig(level=logging.DEBUG)\n" +" main()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1780 +msgid "" +"The above script should log the message ``Hello, world!`` when run with " +"Python 3.8 or later." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1789 +msgid "Customizing ``LogRecord``" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1791 +msgid "" +"Every logging event is represented by a :class:`LogRecord` instance. When an " +"event is logged and not filtered out by a logger's level, a :class:" +"`LogRecord` is created, populated with information about the event and then " +"passed to the handlers for that logger (and its ancestors, up to and " +"including the logger where further propagation up the hierarchy is " +"disabled). Before Python 3.2, there were only two places where this creation " +"was done:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1798 +msgid "" +":meth:`Logger.makeRecord`, which is called in the normal process of logging " +"an event. This invoked :class:`LogRecord` directly to create an instance." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1801 +msgid "" +":func:`makeLogRecord`, which is called with a dictionary containing " +"attributes to be added to the LogRecord. This is typically invoked when a " +"suitable dictionary has been received over the network (e.g. in pickle form " +"via a :class:`~handlers.SocketHandler`, or in JSON form via an :class:" +"`~handlers.HTTPHandler`)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1807 +msgid "" +"This has usually meant that if you need to do anything special with a :class:" +"`LogRecord`, you've had to do one of the following." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1810 +msgid "" +"Create your own :class:`Logger` subclass, which overrides :meth:`Logger." +"makeRecord`, and set it using :func:`~logging.setLoggerClass` before any " +"loggers that you care about are instantiated." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1813 +msgid "" +"Add a :class:`Filter` to a logger or handler, which does the necessary " +"special manipulation you need when its :meth:`~Filter.filter` method is " +"called." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1817 +msgid "" +"The first approach would be a little unwieldy in the scenario where (say) " +"several different libraries wanted to do different things. Each would " +"attempt to set its own :class:`Logger` subclass, and the one which did this " +"last would win." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1822 +msgid "" +"The second approach works reasonably well for many cases, but does not allow " +"you to e.g. use a specialized subclass of :class:`LogRecord`. Library " +"developers can set a suitable filter on their loggers, but they would have " +"to remember to do this every time they introduced a new logger (which they " +"would do simply by adding new packages or modules and doing ::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1828 +msgid "logger = logging.getLogger(__name__)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1830 +msgid "" +"at module level). It's probably one too many things to think about. " +"Developers could also add the filter to a :class:`~logging.NullHandler` " +"attached to their top-level logger, but this would not be invoked if an " +"application developer attached a handler to a lower-level library logger --- " +"so output from that handler would not reflect the intentions of the library " +"developer." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1836 +msgid "" +"In Python 3.2 and later, :class:`~logging.LogRecord` creation is done " +"through a factory, which you can specify. The factory is just a callable you " +"can set with :func:`~logging.setLogRecordFactory`, and interrogate with :" +"func:`~logging.getLogRecordFactory`. The factory is invoked with the same " +"signature as the :class:`~logging.LogRecord` constructor, as :class:" +"`LogRecord` is the default setting for the factory." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1843 +msgid "" +"This approach allows a custom factory to control all aspects of LogRecord " +"creation. For example, you could return a subclass, or just add some " +"additional attributes to the record once created, using a pattern similar to " +"this::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1847 +msgid "" +"old_factory = logging.getLogRecordFactory()\n" +"\n" +"def record_factory(*args, **kwargs):\n" +" record = old_factory(*args, **kwargs)\n" +" record.custom_attribute = 0xdecafbad\n" +" return record\n" +"\n" +"logging.setLogRecordFactory(record_factory)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1856 +msgid "" +"This pattern allows different libraries to chain factories together, and as " +"long as they don't overwrite each other's attributes or unintentionally " +"overwrite the attributes provided as standard, there should be no surprises. " +"However, it should be borne in mind that each link in the chain adds run-" +"time overhead to all logging operations, and the technique should only be " +"used when the use of a :class:`Filter` does not provide the desired result." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1868 +msgid "Subclassing QueueHandler and QueueListener- a ZeroMQ example" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1871 ../../howto/logging-cookbook.rst:2004 +msgid "Subclass ``QueueHandler``" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1873 +msgid "" +"You can use a :class:`QueueHandler` subclass to send messages to other kinds " +"of queues, for example a ZeroMQ 'publish' socket. In the example below,the " +"socket is created separately and passed to the handler (as its 'queue')::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1877 +msgid "" +"import zmq # using pyzmq, the Python binding for ZeroMQ\n" +"import json # for serializing records portably\n" +"\n" +"ctx = zmq.Context()\n" +"sock = zmq.Socket(ctx, zmq.PUB) # or zmq.PUSH, or other suitable value\n" +"sock.bind('tcp://*:5556') # or wherever\n" +"\n" +"class ZeroMQSocketHandler(QueueHandler):\n" +" def enqueue(self, record):\n" +" self.queue.send_json(record.__dict__)\n" +"\n" +"\n" +"handler = ZeroMQSocketHandler(sock)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1892 +msgid "" +"Of course there are other ways of organizing this, for example passing in " +"the data needed by the handler to create the socket::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1895 +msgid "" +"class ZeroMQSocketHandler(QueueHandler):\n" +" def __init__(self, uri, socktype=zmq.PUB, ctx=None):\n" +" self.ctx = ctx or zmq.Context()\n" +" socket = zmq.Socket(self.ctx, socktype)\n" +" socket.bind(uri)\n" +" super().__init__(socket)\n" +"\n" +" def enqueue(self, record):\n" +" self.queue.send_json(record.__dict__)\n" +"\n" +" def close(self):\n" +" self.queue.close()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1910 ../../howto/logging-cookbook.rst:1940 +msgid "Subclass ``QueueListener``" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1912 +msgid "" +"You can also subclass :class:`QueueListener` to get messages from other " +"kinds of queues, for example a ZeroMQ 'subscribe' socket. Here's an example::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1915 +msgid "" +"class ZeroMQSocketListener(QueueListener):\n" +" def __init__(self, uri, /, *handlers, **kwargs):\n" +" self.ctx = kwargs.get('ctx') or zmq.Context()\n" +" socket = zmq.Socket(self.ctx, zmq.SUB)\n" +" socket.setsockopt_string(zmq.SUBSCRIBE, '') # subscribe to " +"everything\n" +" socket.connect(uri)\n" +" super().__init__(socket, *handlers, **kwargs)\n" +"\n" +" def dequeue(self):\n" +" msg = self.queue.recv_json()\n" +" return logging.makeLogRecord(msg)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1930 +msgid "Subclassing QueueHandler and QueueListener- a ``pynng`` example" +msgstr "" + +#: ../../howto/logging-cookbook.rst:1932 +msgid "" +"In a similar way to the above section, we can implement a listener and " +"handler using :pypi:`pynng`, which is a Python binding to `NNG `_, billed as a spiritual successor to ZeroMQ. The following " +"snippets illustrate -- you can test them in an environment which has " +"``pynng`` installed. Just for variety, we present the listener first." +msgstr "" + +#: ../../howto/logging-cookbook.rst:1942 +msgid "" +"# listener.py\n" +"import json\n" +"import logging\n" +"import logging.handlers\n" +"\n" +"import pynng\n" +"\n" +"DEFAULT_ADDR = \"tcp://localhost:13232\"\n" +"\n" +"interrupted = False\n" +"\n" +"class NNGSocketListener(logging.handlers.QueueListener):\n" +"\n" +" def __init__(self, uri, /, *handlers, **kwargs):\n" +" # Have a timeout for interruptibility, and open a\n" +" # subscriber socket\n" +" socket = pynng.Sub0(listen=uri, recv_timeout=500)\n" +" # The b'' subscription matches all topics\n" +" topics = kwargs.pop('topics', None) or b''\n" +" socket.subscribe(topics)\n" +" # We treat the socket as a queue\n" +" super().__init__(socket, *handlers, **kwargs)\n" +"\n" +" def dequeue(self, block):\n" +" data = None\n" +" # Keep looping while not interrupted and no data received over the\n" +" # socket\n" +" while not interrupted:\n" +" try:\n" +" data = self.queue.recv(block=block)\n" +" break\n" +" except pynng.Timeout:\n" +" pass\n" +" except pynng.Closed: # sometimes happens when you hit Ctrl-C\n" +" break\n" +" if data is None:\n" +" return None\n" +" # Get the logging event sent from a publisher\n" +" event = json.loads(data.decode('utf-8'))\n" +" return logging.makeLogRecord(event)\n" +"\n" +" def enqueue_sentinel(self):\n" +" # Not used in this implementation, as the socket isn't really a\n" +" # queue\n" +" pass\n" +"\n" +"logging.getLogger('pynng').propagate = False\n" +"listener = NNGSocketListener(DEFAULT_ADDR, logging.StreamHandler(), " +"topics=b'')\n" +"listener.start()\n" +"print('Press Ctrl-C to stop.')\n" +"try:\n" +" while True:\n" +" pass\n" +"except KeyboardInterrupt:\n" +" interrupted = True\n" +"finally:\n" +" listener.stop()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2008 +msgid "" +"# sender.py\n" +"import json\n" +"import logging\n" +"import logging.handlers\n" +"import time\n" +"import random\n" +"\n" +"import pynng\n" +"\n" +"DEFAULT_ADDR = \"tcp://localhost:13232\"\n" +"\n" +"class NNGSocketHandler(logging.handlers.QueueHandler):\n" +"\n" +" def __init__(self, uri):\n" +" socket = pynng.Pub0(dial=uri, send_timeout=500)\n" +" super().__init__(socket)\n" +"\n" +" def enqueue(self, record):\n" +" # Send the record as UTF-8 encoded JSON\n" +" d = dict(record.__dict__)\n" +" data = json.dumps(d)\n" +" self.queue.send(data.encode('utf-8'))\n" +"\n" +" def close(self):\n" +" self.queue.close()\n" +"\n" +"logging.getLogger('pynng').propagate = False\n" +"handler = NNGSocketHandler(DEFAULT_ADDR)\n" +"# Make sure the process ID is in the output\n" +"logging.basicConfig(level=logging.DEBUG,\n" +" handlers=[logging.StreamHandler(), handler],\n" +" format='%(levelname)-8s %(name)10s %(process)6s " +"%(message)s')\n" +"levels = (logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR,\n" +" logging.CRITICAL)\n" +"logger_names = ('myapp', 'myapp.lib1', 'myapp.lib2')\n" +"msgno = 1\n" +"while True:\n" +" # Just randomly select some loggers and levels and log away\n" +" level = random.choice(levels)\n" +" logger = logging.getLogger(random.choice(logger_names))\n" +" logger.log(level, 'Message no. %5d' % msgno)\n" +" msgno += 1\n" +" delay = random.random() * 2 + 0.5\n" +" time.sleep(delay)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2055 +msgid "" +"You can run the above two snippets in separate command shells. If we run the " +"listener in one shell and run the sender in two separate shells, we should " +"see something like the following. In the first sender shell:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2059 +msgid "" +"$ python sender.py\n" +"DEBUG myapp 613 Message no. 1\n" +"WARNING myapp.lib2 613 Message no. 2\n" +"CRITICAL myapp.lib2 613 Message no. 3\n" +"WARNING myapp.lib2 613 Message no. 4\n" +"CRITICAL myapp.lib1 613 Message no. 5\n" +"DEBUG myapp 613 Message no. 6\n" +"CRITICAL myapp.lib1 613 Message no. 7\n" +"INFO myapp.lib1 613 Message no. 8\n" +"(and so on)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2072 +msgid "In the second sender shell:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2074 +msgid "" +"$ python sender.py\n" +"INFO myapp.lib2 657 Message no. 1\n" +"CRITICAL myapp.lib2 657 Message no. 2\n" +"CRITICAL myapp 657 Message no. 3\n" +"CRITICAL myapp.lib1 657 Message no. 4\n" +"INFO myapp.lib1 657 Message no. 5\n" +"WARNING myapp.lib2 657 Message no. 6\n" +"CRITICAL myapp 657 Message no. 7\n" +"DEBUG myapp.lib1 657 Message no. 8\n" +"(and so on)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2087 +msgid "In the listener shell:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2089 +msgid "" +"$ python listener.py\n" +"Press Ctrl-C to stop.\n" +"DEBUG myapp 613 Message no. 1\n" +"WARNING myapp.lib2 613 Message no. 2\n" +"INFO myapp.lib2 657 Message no. 1\n" +"CRITICAL myapp.lib2 613 Message no. 3\n" +"CRITICAL myapp.lib2 657 Message no. 2\n" +"CRITICAL myapp 657 Message no. 3\n" +"WARNING myapp.lib2 613 Message no. 4\n" +"CRITICAL myapp.lib1 613 Message no. 5\n" +"CRITICAL myapp.lib1 657 Message no. 4\n" +"INFO myapp.lib1 657 Message no. 5\n" +"DEBUG myapp 613 Message no. 6\n" +"WARNING myapp.lib2 657 Message no. 6\n" +"CRITICAL myapp 657 Message no. 7\n" +"CRITICAL myapp.lib1 613 Message no. 7\n" +"INFO myapp.lib1 613 Message no. 8\n" +"DEBUG myapp.lib1 657 Message no. 8\n" +"(and so on)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2111 +msgid "" +"As you can see, the logging from the two sender processes is interleaved in " +"the listener's output." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2116 +msgid "An example dictionary-based configuration" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2118 +msgid "" +"Below is an example of a logging configuration dictionary - it's taken from " +"the `documentation on the Django project `_. This dictionary is passed to :" +"func:`~config.dictConfig` to put the configuration into effect::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2122 +msgid "" +"LOGGING = {\n" +" 'version': 1,\n" +" 'disable_existing_loggers': False,\n" +" 'formatters': {\n" +" 'verbose': {\n" +" 'format': '{levelname} {asctime} {module} {process:d} {thread:d} " +"{message}',\n" +" 'style': '{',\n" +" },\n" +" 'simple': {\n" +" 'format': '{levelname} {message}',\n" +" 'style': '{',\n" +" },\n" +" },\n" +" 'filters': {\n" +" 'special': {\n" +" '()': 'project.logging.SpecialFilter',\n" +" 'foo': 'bar',\n" +" },\n" +" },\n" +" 'handlers': {\n" +" 'console': {\n" +" 'level': 'INFO',\n" +" 'class': 'logging.StreamHandler',\n" +" 'formatter': 'simple',\n" +" },\n" +" 'mail_admins': {\n" +" 'level': 'ERROR',\n" +" 'class': 'django.utils.log.AdminEmailHandler',\n" +" 'filters': ['special']\n" +" }\n" +" },\n" +" 'loggers': {\n" +" 'django': {\n" +" 'handlers': ['console'],\n" +" 'propagate': True,\n" +" },\n" +" 'django.request': {\n" +" 'handlers': ['mail_admins'],\n" +" 'level': 'ERROR',\n" +" 'propagate': False,\n" +" },\n" +" 'myproject.custom': {\n" +" 'handlers': ['console', 'mail_admins'],\n" +" 'level': 'INFO',\n" +" 'filters': ['special']\n" +" }\n" +" }\n" +"}" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2171 +msgid "" +"For more information about this configuration, you can see the `relevant " +"section `_ of the Django documentation." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2178 +msgid "Using a rotator and namer to customize log rotation processing" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2180 +msgid "" +"An example of how you can define a namer and rotator is given in the " +"following runnable script, which shows gzip compression of the log file::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2183 +msgid "" +"import gzip\n" +"import logging\n" +"import logging.handlers\n" +"import os\n" +"import shutil\n" +"\n" +"def namer(name):\n" +" return name + \".gz\"\n" +"\n" +"def rotator(source, dest):\n" +" with open(source, 'rb') as f_in:\n" +" with gzip.open(dest, 'wb') as f_out:\n" +" shutil.copyfileobj(f_in, f_out)\n" +" os.remove(source)\n" +"\n" +"\n" +"rh = logging.handlers.RotatingFileHandler('rotated.log', maxBytes=128, " +"backupCount=5)\n" +"rh.rotator = rotator\n" +"rh.namer = namer\n" +"\n" +"root = logging.getLogger()\n" +"root.setLevel(logging.INFO)\n" +"root.addHandler(rh)\n" +"f = logging.Formatter('%(asctime)s %(message)s')\n" +"rh.setFormatter(f)\n" +"for i in range(1000):\n" +" root.info(f'Message no. {i + 1}')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2211 +msgid "" +"After running this, you will see six new files, five of which are compressed:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2213 +msgid "" +"$ ls rotated.log*\n" +"rotated.log rotated.log.2.gz rotated.log.4.gz\n" +"rotated.log.1.gz rotated.log.3.gz rotated.log.5.gz\n" +"$ zcat rotated.log.1.gz\n" +"2023-01-20 02:28:17,767 Message no. 996\n" +"2023-01-20 02:28:17,767 Message no. 997\n" +"2023-01-20 02:28:17,767 Message no. 998" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2224 +msgid "A more elaborate multiprocessing example" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2226 +msgid "" +"The following working example shows how logging can be used with " +"multiprocessing using configuration files. The configurations are fairly " +"simple, but serve to illustrate how more complex ones could be implemented " +"in a real multiprocessing scenario." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2231 +msgid "" +"In the example, the main process spawns a listener process and some worker " +"processes. Each of the main process, the listener and the workers have three " +"separate configurations (the workers all share the same configuration). We " +"can see logging in the main process, how the workers log to a QueueHandler " +"and how the listener implements a QueueListener and a more complex logging " +"configuration, and arranges to dispatch events received via the queue to the " +"handlers specified in the configuration. Note that these configurations are " +"purely illustrative, but you should be able to adapt this example to your " +"own scenario." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2241 +msgid "" +"Here's the script - the docstrings and the comments hopefully explain how it " +"works::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2244 +msgid "" +"import logging\n" +"import logging.config\n" +"import logging.handlers\n" +"from multiprocessing import Process, Queue, Event, current_process\n" +"import os\n" +"import random\n" +"import time\n" +"\n" +"class MyHandler:\n" +" \"\"\"\n" +" A simple handler for logging events. It runs in the listener process " +"and\n" +" dispatches events to loggers based on the name in the received record,\n" +" which then get dispatched, by the logging system, to the handlers\n" +" configured for those loggers.\n" +" \"\"\"\n" +"\n" +" def handle(self, record):\n" +" if record.name == \"root\":\n" +" logger = logging.getLogger()\n" +" else:\n" +" logger = logging.getLogger(record.name)\n" +"\n" +" if logger.isEnabledFor(record.levelno):\n" +" # The process name is transformed just to show that it's the " +"listener\n" +" # doing the logging to files and console\n" +" record.processName = '%s (for %s)' % (current_process().name, " +"record.processName)\n" +" logger.handle(record)\n" +"\n" +"def listener_process(q, stop_event, config):\n" +" \"\"\"\n" +" This could be done in the main process, but is just done in a separate\n" +" process for illustrative purposes.\n" +"\n" +" This initialises logging according to the specified configuration,\n" +" starts the listener and waits for the main process to signal completion\n" +" via the event. The listener is then stopped, and the process exits.\n" +" \"\"\"\n" +" logging.config.dictConfig(config)\n" +" listener = logging.handlers.QueueListener(q, MyHandler())\n" +" listener.start()\n" +" if os.name == 'posix':\n" +" # On POSIX, the setup logger will have been configured in the\n" +" # parent process, but should have been disabled following the\n" +" # dictConfig call.\n" +" # On Windows, since fork isn't used, the setup logger won't\n" +" # exist in the child, so it would be created and the message\n" +" # would appear - hence the \"if posix\" clause.\n" +" logger = logging.getLogger('setup')\n" +" logger.critical('Should not appear, because of disabled " +"logger ...')\n" +" stop_event.wait()\n" +" listener.stop()\n" +"\n" +"def worker_process(config):\n" +" \"\"\"\n" +" A number of these are spawned for the purpose of illustration. In\n" +" practice, they could be a heterogeneous bunch of processes rather than\n" +" ones which are identical to each other.\n" +"\n" +" This initialises logging according to the specified configuration,\n" +" and logs a hundred messages with random levels to randomly selected\n" +" loggers.\n" +"\n" +" A small sleep is added to allow other processes a chance to run. This\n" +" is not strictly needed, but it mixes the output from the different\n" +" processes a bit more than if it's left out.\n" +" \"\"\"\n" +" logging.config.dictConfig(config)\n" +" levels = [logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR,\n" +" logging.CRITICAL]\n" +" loggers = ['foo', 'foo.bar', 'foo.bar.baz',\n" +" 'spam', 'spam.ham', 'spam.ham.eggs']\n" +" if os.name == 'posix':\n" +" # On POSIX, the setup logger will have been configured in the\n" +" # parent process, but should have been disabled following the\n" +" # dictConfig call.\n" +" # On Windows, since fork isn't used, the setup logger won't\n" +" # exist in the child, so it would be created and the message\n" +" # would appear - hence the \"if posix\" clause.\n" +" logger = logging.getLogger('setup')\n" +" logger.critical('Should not appear, because of disabled " +"logger ...')\n" +" for i in range(100):\n" +" lvl = random.choice(levels)\n" +" logger = logging.getLogger(random.choice(loggers))\n" +" logger.log(lvl, 'Message no. %d', i)\n" +" time.sleep(0.01)\n" +"\n" +"def main():\n" +" q = Queue()\n" +" # The main process gets a simple configuration which prints to the " +"console.\n" +" config_initial = {\n" +" 'version': 1,\n" +" 'handlers': {\n" +" 'console': {\n" +" 'class': 'logging.StreamHandler',\n" +" 'level': 'INFO'\n" +" }\n" +" },\n" +" 'root': {\n" +" 'handlers': ['console'],\n" +" 'level': 'DEBUG'\n" +" }\n" +" }\n" +" # The worker process configuration is just a QueueHandler attached to " +"the\n" +" # root logger, which allows all messages to be sent to the queue.\n" +" # We disable existing loggers to disable the \"setup\" logger used in " +"the\n" +" # parent process. This is needed on POSIX because the logger will\n" +" # be there in the child following a fork().\n" +" config_worker = {\n" +" 'version': 1,\n" +" 'disable_existing_loggers': True,\n" +" 'handlers': {\n" +" 'queue': {\n" +" 'class': 'logging.handlers.QueueHandler',\n" +" 'queue': q\n" +" }\n" +" },\n" +" 'root': {\n" +" 'handlers': ['queue'],\n" +" 'level': 'DEBUG'\n" +" }\n" +" }\n" +" # The listener process configuration shows that the full flexibility of\n" +" # logging configuration is available to dispatch events to handlers " +"however\n" +" # you want.\n" +" # We disable existing loggers to disable the \"setup\" logger used in " +"the\n" +" # parent process. This is needed on POSIX because the logger will\n" +" # be there in the child following a fork().\n" +" config_listener = {\n" +" 'version': 1,\n" +" 'disable_existing_loggers': True,\n" +" 'formatters': {\n" +" 'detailed': {\n" +" 'class': 'logging.Formatter',\n" +" 'format': '%(asctime)s %(name)-15s %(levelname)-8s " +"%(processName)-10s %(message)s'\n" +" },\n" +" 'simple': {\n" +" 'class': 'logging.Formatter',\n" +" 'format': '%(name)-15s %(levelname)-8s %(processName)-10s " +"%(message)s'\n" +" }\n" +" },\n" +" 'handlers': {\n" +" 'console': {\n" +" 'class': 'logging.StreamHandler',\n" +" 'formatter': 'simple',\n" +" 'level': 'INFO'\n" +" },\n" +" 'file': {\n" +" 'class': 'logging.FileHandler',\n" +" 'filename': 'mplog.log',\n" +" 'mode': 'w',\n" +" 'formatter': 'detailed'\n" +" },\n" +" 'foofile': {\n" +" 'class': 'logging.FileHandler',\n" +" 'filename': 'mplog-foo.log',\n" +" 'mode': 'w',\n" +" 'formatter': 'detailed'\n" +" },\n" +" 'errors': {\n" +" 'class': 'logging.FileHandler',\n" +" 'filename': 'mplog-errors.log',\n" +" 'mode': 'w',\n" +" 'formatter': 'detailed',\n" +" 'level': 'ERROR'\n" +" }\n" +" },\n" +" 'loggers': {\n" +" 'foo': {\n" +" 'handlers': ['foofile']\n" +" }\n" +" },\n" +" 'root': {\n" +" 'handlers': ['console', 'file', 'errors'],\n" +" 'level': 'DEBUG'\n" +" }\n" +" }\n" +" # Log some initial events, just to show that logging in the parent " +"works\n" +" # normally.\n" +" logging.config.dictConfig(config_initial)\n" +" logger = logging.getLogger('setup')\n" +" logger.info('About to create workers ...')\n" +" workers = []\n" +" for i in range(5):\n" +" wp = Process(target=worker_process, name='worker %d' % (i + 1),\n" +" args=(config_worker,))\n" +" workers.append(wp)\n" +" wp.start()\n" +" logger.info('Started worker: %s', wp.name)\n" +" logger.info('About to create listener ...')\n" +" stop_event = Event()\n" +" lp = Process(target=listener_process, name='listener',\n" +" args=(q, stop_event, config_listener))\n" +" lp.start()\n" +" logger.info('Started listener')\n" +" # We now hang around for the workers to finish their work.\n" +" for wp in workers:\n" +" wp.join()\n" +" # Workers all done, listening can now stop.\n" +" # Logging in the parent still works normally.\n" +" logger.info('Telling listener to stop ...')\n" +" stop_event.set()\n" +" lp.join()\n" +" logger.info('All done.')\n" +"\n" +"if __name__ == '__main__':\n" +" main()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2453 +msgid "Inserting a BOM into messages sent to a SysLogHandler" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2455 +msgid "" +":rfc:`5424` requires that a Unicode message be sent to a syslog daemon as a " +"set of bytes which have the following structure: an optional pure-ASCII " +"component, followed by a UTF-8 Byte Order Mark (BOM), followed by Unicode " +"encoded using UTF-8. (See the :rfc:`relevant section of the specification " +"<5424#section-6>`.)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2461 +msgid "" +"In Python 3.1, code was added to :class:`~logging.handlers.SysLogHandler` to " +"insert a BOM into the message, but unfortunately, it was implemented " +"incorrectly, with the BOM appearing at the beginning of the message and " +"hence not allowing any pure-ASCII component to appear before it." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2467 +msgid "" +"As this behaviour is broken, the incorrect BOM insertion code is being " +"removed from Python 3.2.4 and later. However, it is not being replaced, and " +"if you want to produce :rfc:`5424`-compliant messages which include a BOM, " +"an optional pure-ASCII sequence before it and arbitrary Unicode after it, " +"encoded using UTF-8, then you need to do the following:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2473 +msgid "" +"Attach a :class:`~logging.Formatter` instance to your :class:`~logging." +"handlers.SysLogHandler` instance, with a format string such as::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2477 +msgid "'ASCII section\\ufeffUnicode section'" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2479 +msgid "" +"The Unicode code point U+FEFF, when encoded using UTF-8, will be encoded as " +"a UTF-8 BOM -- the byte-string ``b'\\xef\\xbb\\xbf'``." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2482 +msgid "" +"Replace the ASCII section with whatever placeholders you like, but make sure " +"that the data that appears in there after substitution is always ASCII (that " +"way, it will remain unchanged after UTF-8 encoding)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2486 +msgid "" +"Replace the Unicode section with whatever placeholders you like; if the data " +"which appears there after substitution contains characters outside the ASCII " +"range, that's fine -- it will be encoded using UTF-8." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2490 +msgid "" +"The formatted message *will* be encoded using UTF-8 encoding by " +"``SysLogHandler``. If you follow the above rules, you should be able to " +"produce :rfc:`5424`-compliant messages. If you don't, logging may not " +"complain, but your messages will not be RFC 5424-compliant, and your syslog " +"daemon may complain." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2497 +msgid "Implementing structured logging" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2499 +msgid "" +"Although most logging messages are intended for reading by humans, and thus " +"not readily machine-parseable, there might be circumstances where you want " +"to output messages in a structured format which *is* capable of being parsed " +"by a program (without needing complex regular expressions to parse the log " +"message). This is straightforward to achieve using the logging package. " +"There are a number of ways in which this could be achieved, but the " +"following is a simple approach which uses JSON to serialise the event in a " +"machine-parseable manner::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2507 +msgid "" +"import json\n" +"import logging\n" +"\n" +"class StructuredMessage:\n" +" def __init__(self, message, /, **kwargs):\n" +" self.message = message\n" +" self.kwargs = kwargs\n" +"\n" +" def __str__(self):\n" +" return '%s >>> %s' % (self.message, json.dumps(self.kwargs))\n" +"\n" +"_ = StructuredMessage # optional, to improve readability\n" +"\n" +"logging.basicConfig(level=logging.INFO, format='%(message)s')\n" +"logging.info(_('message 1', foo='bar', bar='baz', num=123, fnum=123.456))" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2523 +msgid "If the above script is run, it prints:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2525 +msgid "" +"message 1 >>> {\"fnum\": 123.456, \"num\": 123, \"bar\": \"baz\", \"foo\": " +"\"bar\"}" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2529 ../../howto/logging-cookbook.rst:2571 +msgid "" +"Note that the order of items might be different according to the version of " +"Python used." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2532 +msgid "" +"If you need more specialised processing, you can use a custom JSON encoder, " +"as in the following complete example::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2535 +msgid "" +"import json\n" +"import logging\n" +"\n" +"\n" +"class Encoder(json.JSONEncoder):\n" +" def default(self, o):\n" +" if isinstance(o, set):\n" +" return tuple(o)\n" +" elif isinstance(o, str):\n" +" return o.encode('unicode_escape').decode('ascii')\n" +" return super().default(o)\n" +"\n" +"class StructuredMessage:\n" +" def __init__(self, message, /, **kwargs):\n" +" self.message = message\n" +" self.kwargs = kwargs\n" +"\n" +" def __str__(self):\n" +" s = Encoder().encode(self.kwargs)\n" +" return '%s >>> %s' % (self.message, s)\n" +"\n" +"_ = StructuredMessage # optional, to improve readability\n" +"\n" +"def main():\n" +" logging.basicConfig(level=logging.INFO, format='%(message)s')\n" +" logging.info(_('message 1', set_value={1, 2, 3}, snowman='\\u2603'))\n" +"\n" +"if __name__ == '__main__':\n" +" main()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2565 +msgid "When the above script is run, it prints:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2567 +msgid "message 1 >>> {\"snowman\": \"\\u2603\", \"set_value\": [1, 2, 3]}" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2580 +msgid "Customizing handlers with :func:`dictConfig`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2582 +msgid "" +"There are times when you want to customize logging handlers in particular " +"ways, and if you use :func:`dictConfig` you may be able to do this without " +"subclassing. As an example, consider that you may want to set the ownership " +"of a log file. On POSIX, this is easily done using :func:`shutil.chown`, but " +"the file handlers in the stdlib don't offer built-in support. You can " +"customize handler creation using a plain function such as::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2589 +msgid "" +"def owned_file_handler(filename, mode='a', encoding=None, owner=None):\n" +" if owner:\n" +" if not os.path.exists(filename):\n" +" open(filename, 'a').close()\n" +" shutil.chown(filename, *owner)\n" +" return logging.FileHandler(filename, mode, encoding)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2596 +msgid "" +"You can then specify, in a logging configuration passed to :func:" +"`dictConfig`, that a logging handler be created by calling this function::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2599 +msgid "" +"LOGGING = {\n" +" 'version': 1,\n" +" 'disable_existing_loggers': False,\n" +" 'formatters': {\n" +" 'default': {\n" +" 'format': '%(asctime)s %(levelname)s %(name)s %(message)s'\n" +" },\n" +" },\n" +" 'handlers': {\n" +" 'file':{\n" +" # The values below are popped from this dictionary and\n" +" # used to create the handler, set the handler's level and\n" +" # its formatter.\n" +" '()': owned_file_handler,\n" +" 'level':'DEBUG',\n" +" 'formatter': 'default',\n" +" # The values below are passed to the handler creator callable\n" +" # as keyword arguments.\n" +" 'owner': ['pulse', 'pulse'],\n" +" 'filename': 'chowntest.log',\n" +" 'mode': 'w',\n" +" 'encoding': 'utf-8',\n" +" },\n" +" },\n" +" 'root': {\n" +" 'handlers': ['file'],\n" +" 'level': 'DEBUG',\n" +" },\n" +"}" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2629 +msgid "" +"In this example I am setting the ownership using the ``pulse`` user and " +"group, just for the purposes of illustration. Putting it together into a " +"working script, ``chowntest.py``::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2633 +msgid "" +"import logging, logging.config, os, shutil\n" +"\n" +"def owned_file_handler(filename, mode='a', encoding=None, owner=None):\n" +" if owner:\n" +" if not os.path.exists(filename):\n" +" open(filename, 'a').close()\n" +" shutil.chown(filename, *owner)\n" +" return logging.FileHandler(filename, mode, encoding)\n" +"\n" +"LOGGING = {\n" +" 'version': 1,\n" +" 'disable_existing_loggers': False,\n" +" 'formatters': {\n" +" 'default': {\n" +" 'format': '%(asctime)s %(levelname)s %(name)s %(message)s'\n" +" },\n" +" },\n" +" 'handlers': {\n" +" 'file':{\n" +" # The values below are popped from this dictionary and\n" +" # used to create the handler, set the handler's level and\n" +" # its formatter.\n" +" '()': owned_file_handler,\n" +" 'level':'DEBUG',\n" +" 'formatter': 'default',\n" +" # The values below are passed to the handler creator callable\n" +" # as keyword arguments.\n" +" 'owner': ['pulse', 'pulse'],\n" +" 'filename': 'chowntest.log',\n" +" 'mode': 'w',\n" +" 'encoding': 'utf-8',\n" +" },\n" +" },\n" +" 'root': {\n" +" 'handlers': ['file'],\n" +" 'level': 'DEBUG',\n" +" },\n" +"}\n" +"\n" +"logging.config.dictConfig(LOGGING)\n" +"logger = logging.getLogger('mylogger')\n" +"logger.debug('A debug message')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2676 +msgid "To run this, you will probably need to run as ``root``:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2678 +msgid "" +"$ sudo python3.3 chowntest.py\n" +"$ cat chowntest.log\n" +"2013-11-05 09:34:51,128 DEBUG mylogger A debug message\n" +"$ ls -l chowntest.log\n" +"-rw-r--r-- 1 pulse pulse 55 2013-11-05 09:34 chowntest.log" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2686 +msgid "" +"Note that this example uses Python 3.3 because that's where :func:`shutil." +"chown` makes an appearance. This approach should work with any Python " +"version that supports :func:`dictConfig` - namely, Python 2.7, 3.2 or later. " +"With pre-3.3 versions, you would need to implement the actual ownership " +"change using e.g. :func:`os.chown`." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2692 +msgid "" +"In practice, the handler-creating function may be in a utility module " +"somewhere in your project. Instead of the line in the configuration::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2695 +msgid "'()': owned_file_handler," +msgstr "" + +#: ../../howto/logging-cookbook.rst:2697 +msgid "you could use e.g.::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2699 +msgid "'()': 'ext://project.util.owned_file_handler'," +msgstr "" + +#: ../../howto/logging-cookbook.rst:2701 +msgid "" +"where ``project.util`` can be replaced with the actual name of the package " +"where the function resides. In the above working script, using ``'ext://" +"__main__.owned_file_handler'`` should work. Here, the actual callable is " +"resolved by :func:`dictConfig` from the ``ext://`` specification." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2706 +msgid "" +"This example hopefully also points the way to how you could implement other " +"types of file change - e.g. setting specific POSIX permission bits - in the " +"same way, using :func:`os.chmod`." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2710 +msgid "" +"Of course, the approach could also be extended to types of handler other " +"than a :class:`~logging.FileHandler` - for example, one of the rotating file " +"handlers, or a different type of handler altogether." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2720 +msgid "Using particular formatting styles throughout your application" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2722 +msgid "" +"In Python 3.2, the :class:`~logging.Formatter` gained a ``style`` keyword " +"parameter which, while defaulting to ``%`` for backward compatibility, " +"allowed the specification of ``{`` or ``$`` to support the formatting " +"approaches supported by :meth:`str.format` and :class:`string.Template`. " +"Note that this governs the formatting of logging messages for final output " +"to logs, and is completely orthogonal to how an individual logging message " +"is constructed." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2729 +msgid "" +"Logging calls (:meth:`~Logger.debug`, :meth:`~Logger.info` etc.) only take " +"positional parameters for the actual logging message itself, with keyword " +"parameters used only for determining options for how to handle the logging " +"call (e.g. the ``exc_info`` keyword parameter to indicate that traceback " +"information should be logged, or the ``extra`` keyword parameter to indicate " +"additional contextual information to be added to the log). So you cannot " +"directly make logging calls using :meth:`str.format` or :class:`string." +"Template` syntax, because internally the logging package uses %-formatting " +"to merge the format string and the variable arguments. There would be no " +"changing this while preserving backward compatibility, since all logging " +"calls which are out there in existing code will be using %-format strings." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2741 +msgid "" +"There have been suggestions to associate format styles with specific " +"loggers, but that approach also runs into backward compatibility problems " +"because any existing code could be using a given logger name and using %-" +"formatting." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2745 +msgid "" +"For logging to work interoperably between any third-party libraries and your " +"code, decisions about formatting need to be made at the level of the " +"individual logging call. This opens up a couple of ways in which alternative " +"formatting styles can be accommodated." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2752 +msgid "Using LogRecord factories" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2754 +msgid "" +"In Python 3.2, along with the :class:`~logging.Formatter` changes mentioned " +"above, the logging package gained the ability to allow users to set their " +"own :class:`LogRecord` subclasses, using the :func:`setLogRecordFactory` " +"function. You can use this to set your own subclass of :class:`LogRecord`, " +"which does the Right Thing by overriding the :meth:`~LogRecord.getMessage` " +"method. The base class implementation of this method is where the ``msg % " +"args`` formatting happens, and where you can substitute your alternate " +"formatting; however, you should be careful to support all formatting styles " +"and allow %-formatting as the default, to ensure interoperability with other " +"code. Care should also be taken to call ``str(self.msg)``, just as the base " +"implementation does." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2765 +msgid "" +"Refer to the reference documentation on :func:`setLogRecordFactory` and :" +"class:`LogRecord` for more information." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2770 +msgid "Using custom message objects" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2772 +msgid "" +"There is another, perhaps simpler way that you can use {}- and $- formatting " +"to construct your individual log messages. You may recall (from :ref:" +"`arbitrary-object-messages`) that when logging you can use an arbitrary " +"object as a message format string, and that the logging package will call :" +"func:`str` on that object to get the actual format string. Consider the " +"following two classes::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2797 +msgid "" +"Either of these can be used in place of a format string, to allow {}- or $-" +"formatting to be used to build the actual \"message\" part which appears in " +"the formatted log output in place of “%(message)s” or “{message}” or " +"“$message”. If you find it a little unwieldy to use the class names whenever " +"you want to log something, you can make it more palatable if you use an " +"alias such as ``M`` or ``_`` for the message (or perhaps ``__``, if you are " +"using ``_`` for localization)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2805 +msgid "" +"Examples of this approach are given below. Firstly, formatting with :meth:" +"`str.format`::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2808 +msgid "" +">>> __ = BraceMessage\n" +">>> print(__('Message with {0} {1}', 2, 'placeholders'))\n" +"Message with 2 placeholders\n" +">>> class Point: pass\n" +"...\n" +">>> p = Point()\n" +">>> p.x = 0.5\n" +">>> p.y = 0.5\n" +">>> print(__('Message with coordinates: ({point.x:.2f}, {point.y:.2f})', " +"point=p))\n" +"Message with coordinates: (0.50, 0.50)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2819 +msgid "Secondly, formatting with :class:`string.Template`::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2821 +msgid "" +">>> __ = DollarMessage\n" +">>> print(__('Message with $num $what', num=2, what='placeholders'))\n" +"Message with 2 placeholders\n" +">>>" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2826 +msgid "" +"One thing to note is that you pay no significant performance penalty with " +"this approach: the actual formatting happens not when you make the logging " +"call, but when (and if) the logged message is actually about to be output to " +"a log by a handler. So the only slightly unusual thing which might trip you " +"up is that the parentheses go around the format string and the arguments, " +"not just the format string. That’s because the __ notation is just syntax " +"sugar for a constructor call to one of the :samp:`{XXX}Message` classes " +"shown above." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2840 +msgid "Configuring filters with :func:`dictConfig`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2842 +msgid "" +"You *can* configure filters using :func:`~logging.config.dictConfig`, though " +"it might not be obvious at first glance how to do it (hence this recipe). " +"Since :class:`~logging.Filter` is the only filter class included in the " +"standard library, and it is unlikely to cater to many requirements (it's " +"only there as a base class), you will typically need to define your own :" +"class:`~logging.Filter` subclass with an overridden :meth:`~logging.Filter." +"filter` method. To do this, specify the ``()`` key in the configuration " +"dictionary for the filter, specifying a callable which will be used to " +"create the filter (a class is the most obvious, but you can provide any " +"callable which returns a :class:`~logging.Filter` instance). Here is a " +"complete example::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2853 +msgid "" +"import logging\n" +"import logging.config\n" +"import sys\n" +"\n" +"class MyFilter(logging.Filter):\n" +" def __init__(self, param=None):\n" +" self.param = param\n" +"\n" +" def filter(self, record):\n" +" if self.param is None:\n" +" allow = True\n" +" else:\n" +" allow = self.param not in record.msg\n" +" if allow:\n" +" record.msg = 'changed: ' + record.msg\n" +" return allow\n" +"\n" +"LOGGING = {\n" +" 'version': 1,\n" +" 'filters': {\n" +" 'myfilter': {\n" +" '()': MyFilter,\n" +" 'param': 'noshow',\n" +" }\n" +" },\n" +" 'handlers': {\n" +" 'console': {\n" +" 'class': 'logging.StreamHandler',\n" +" 'filters': ['myfilter']\n" +" }\n" +" },\n" +" 'root': {\n" +" 'level': 'DEBUG',\n" +" 'handlers': ['console']\n" +" },\n" +"}\n" +"\n" +"if __name__ == '__main__':\n" +" logging.config.dictConfig(LOGGING)\n" +" logging.debug('hello')\n" +" logging.debug('hello - noshow')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2895 +msgid "" +"This example shows how you can pass configuration data to the callable which " +"constructs the instance, in the form of keyword parameters. When run, the " +"above script will print:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2899 +msgid "changed: hello" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2903 +msgid "which shows that the filter is working as configured." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2905 +msgid "A couple of extra points to note:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2907 +msgid "" +"If you can't refer to the callable directly in the configuration (e.g. if it " +"lives in a different module, and you can't import it directly where the " +"configuration dictionary is), you can use the form ``ext://...`` as " +"described in :ref:`logging-config-dict-externalobj`. For example, you could " +"have used the text ``'ext://__main__.MyFilter'`` instead of ``MyFilter`` in " +"the above example." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2914 +msgid "" +"As well as for filters, this technique can also be used to configure custom " +"handlers and formatters. See :ref:`logging-config-dict-userdef` for more " +"information on how logging supports using user-defined objects in its " +"configuration, and see the other cookbook recipe :ref:`custom-handlers` " +"above." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2923 +msgid "Customized exception formatting" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2925 +msgid "" +"There might be times when you want to do customized exception formatting - " +"for argument's sake, let's say you want exactly one line per logged event, " +"even when exception information is present. You can do this with a custom " +"formatter class, as shown in the following example::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2930 +msgid "" +"import logging\n" +"\n" +"class OneLineExceptionFormatter(logging.Formatter):\n" +" def formatException(self, exc_info):\n" +" \"\"\"\n" +" Format an exception so that it prints on a single line.\n" +" \"\"\"\n" +" result = super().formatException(exc_info)\n" +" return repr(result) # or format into one line however you want to\n" +"\n" +" def format(self, record):\n" +" s = super().format(record)\n" +" if record.exc_text:\n" +" s = s.replace('\\n', '') + '|'\n" +" return s\n" +"\n" +"def configure_logging():\n" +" fh = logging.FileHandler('output.txt', 'w')\n" +" f = OneLineExceptionFormatter('%(asctime)s|%(levelname)s|%(message)s|',\n" +" '%d/%m/%Y %H:%M:%S')\n" +" fh.setFormatter(f)\n" +" root = logging.getLogger()\n" +" root.setLevel(logging.DEBUG)\n" +" root.addHandler(fh)\n" +"\n" +"def main():\n" +" configure_logging()\n" +" logging.info('Sample message')\n" +" try:\n" +" x = 1 / 0\n" +" except ZeroDivisionError as e:\n" +" logging.exception('ZeroDivisionError: %s', e)\n" +"\n" +"if __name__ == '__main__':\n" +" main()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2966 +msgid "When run, this produces a file with exactly two lines:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2968 +msgid "" +"28/01/2015 07:21:23|INFO|Sample message|\n" +"28/01/2015 07:21:23|ERROR|ZeroDivisionError: division by zero|'Traceback " +"(most recent call last):\\n File \"logtest7.py\", line 30, in main\\n x " +"= 1 / 0\\nZeroDivisionError: division by zero'|" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2973 +msgid "" +"While the above treatment is simplistic, it points the way to how exception " +"information can be formatted to your liking. The :mod:`traceback` module may " +"be helpful for more specialized needs." +msgstr "" + +#: ../../howto/logging-cookbook.rst:2980 +msgid "Speaking logging messages" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2982 +msgid "" +"There might be situations when it is desirable to have logging messages " +"rendered in an audible rather than a visible format. This is easy to do if " +"you have text-to-speech (TTS) functionality available in your system, even " +"if it doesn't have a Python binding. Most TTS systems have a command line " +"program you can run, and this can be invoked from a handler using :mod:" +"`subprocess`. It's assumed here that TTS command line programs won't expect " +"to interact with users or take a long time to complete, and that the " +"frequency of logged messages will be not so high as to swamp the user with " +"messages, and that it's acceptable to have the messages spoken one at a time " +"rather than concurrently, The example implementation below waits for one " +"message to be spoken before the next is processed, and this might cause " +"other handlers to be kept waiting. Here is a short example showing the " +"approach, which assumes that the ``espeak`` TTS package is available::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:2995 +msgid "" +"import logging\n" +"import subprocess\n" +"import sys\n" +"\n" +"class TTSHandler(logging.Handler):\n" +" def emit(self, record):\n" +" msg = self.format(record)\n" +" # Speak slowly in a female English voice\n" +" cmd = ['espeak', '-s150', '-ven+f3', msg]\n" +" p = subprocess.Popen(cmd, stdout=subprocess.PIPE,\n" +" stderr=subprocess.STDOUT)\n" +" # wait for the program to finish\n" +" p.communicate()\n" +"\n" +"def configure_logging():\n" +" h = TTSHandler()\n" +" root = logging.getLogger()\n" +" root.addHandler(h)\n" +" # the default formatter just returns the message\n" +" root.setLevel(logging.DEBUG)\n" +"\n" +"def main():\n" +" logging.info('Hello')\n" +" logging.debug('Goodbye')\n" +"\n" +"if __name__ == '__main__':\n" +" configure_logging()\n" +" sys.exit(main())" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3024 +msgid "" +"When run, this script should say \"Hello\" and then \"Goodbye\" in a female " +"voice." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3026 +msgid "" +"The above approach can, of course, be adapted to other TTS systems and even " +"other systems altogether which can process messages via external programs " +"run from a command line." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3034 +msgid "Buffering logging messages and outputting them conditionally" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3036 +msgid "" +"There might be situations where you want to log messages in a temporary area " +"and only output them if a certain condition occurs. For example, you may " +"want to start logging debug events in a function, and if the function " +"completes without errors, you don't want to clutter the log with the " +"collected debug information, but if there is an error, you want all the " +"debug information to be output as well as the error." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3043 +msgid "" +"Here is an example which shows how you could do this using a decorator for " +"your functions where you want logging to behave this way. It makes use of " +"the :class:`logging.handlers.MemoryHandler`, which allows buffering of " +"logged events until some condition occurs, at which point the buffered " +"events are ``flushed`` - passed to another handler (the ``target`` handler) " +"for processing. By default, the ``MemoryHandler`` flushed when its buffer " +"gets filled up or an event whose level is greater than or equal to a " +"specified threshold is seen. You can use this recipe with a more specialised " +"subclass of ``MemoryHandler`` if you want custom flushing behavior." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3053 +msgid "" +"The example script has a simple function, ``foo``, which just cycles through " +"all the logging levels, writing to ``sys.stderr`` to say what level it's " +"about to log at, and then actually logging a message at that level. You can " +"pass a parameter to ``foo`` which, if true, will log at ERROR and CRITICAL " +"levels - otherwise, it only logs at DEBUG, INFO and WARNING levels." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3059 +msgid "" +"The script just arranges to decorate ``foo`` with a decorator which will do " +"the conditional logging that's required. The decorator takes a logger as a " +"parameter and attaches a memory handler for the duration of the call to the " +"decorated function. The decorator can be additionally parameterised using a " +"target handler, a level at which flushing should occur, and a capacity for " +"the buffer (number of records buffered). These default to a :class:`~logging." +"StreamHandler` which writes to ``sys.stderr``, ``logging.ERROR`` and ``100`` " +"respectively." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3067 +msgid "Here's the script::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3069 +msgid "" +"import logging\n" +"from logging.handlers import MemoryHandler\n" +"import sys\n" +"\n" +"logger = logging.getLogger(__name__)\n" +"logger.addHandler(logging.NullHandler())\n" +"\n" +"def log_if_errors(logger, target_handler=None, flush_level=None, " +"capacity=None):\n" +" if target_handler is None:\n" +" target_handler = logging.StreamHandler()\n" +" if flush_level is None:\n" +" flush_level = logging.ERROR\n" +" if capacity is None:\n" +" capacity = 100\n" +" handler = MemoryHandler(capacity, flushLevel=flush_level, " +"target=target_handler)\n" +"\n" +" def decorator(fn):\n" +" def wrapper(*args, **kwargs):\n" +" logger.addHandler(handler)\n" +" try:\n" +" return fn(*args, **kwargs)\n" +" except Exception:\n" +" logger.exception('call failed')\n" +" raise\n" +" finally:\n" +" super(MemoryHandler, handler).flush()\n" +" logger.removeHandler(handler)\n" +" return wrapper\n" +"\n" +" return decorator\n" +"\n" +"def write_line(s):\n" +" sys.stderr.write('%s\\n' % s)\n" +"\n" +"def foo(fail=False):\n" +" write_line('about to log at DEBUG ...')\n" +" logger.debug('Actually logged at DEBUG')\n" +" write_line('about to log at INFO ...')\n" +" logger.info('Actually logged at INFO')\n" +" write_line('about to log at WARNING ...')\n" +" logger.warning('Actually logged at WARNING')\n" +" if fail:\n" +" write_line('about to log at ERROR ...')\n" +" logger.error('Actually logged at ERROR')\n" +" write_line('about to log at CRITICAL ...')\n" +" logger.critical('Actually logged at CRITICAL')\n" +" return fail\n" +"\n" +"decorated_foo = log_if_errors(logger)(foo)\n" +"\n" +"if __name__ == '__main__':\n" +" logger.setLevel(logging.DEBUG)\n" +" write_line('Calling undecorated foo with False')\n" +" assert not foo(False)\n" +" write_line('Calling undecorated foo with True')\n" +" assert foo(True)\n" +" write_line('Calling decorated foo with False')\n" +" assert not decorated_foo(False)\n" +" write_line('Calling decorated foo with True')\n" +" assert decorated_foo(True)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3130 +msgid "When this script is run, the following output should be observed:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3132 +msgid "" +"Calling undecorated foo with False\n" +"about to log at DEBUG ...\n" +"about to log at INFO ...\n" +"about to log at WARNING ...\n" +"Calling undecorated foo with True\n" +"about to log at DEBUG ...\n" +"about to log at INFO ...\n" +"about to log at WARNING ...\n" +"about to log at ERROR ...\n" +"about to log at CRITICAL ...\n" +"Calling decorated foo with False\n" +"about to log at DEBUG ...\n" +"about to log at INFO ...\n" +"about to log at WARNING ...\n" +"Calling decorated foo with True\n" +"about to log at DEBUG ...\n" +"about to log at INFO ...\n" +"about to log at WARNING ...\n" +"about to log at ERROR ...\n" +"Actually logged at DEBUG\n" +"Actually logged at INFO\n" +"Actually logged at WARNING\n" +"Actually logged at ERROR\n" +"about to log at CRITICAL ...\n" +"Actually logged at CRITICAL" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3160 +msgid "" +"As you can see, actual logging output only occurs when an event is logged " +"whose severity is ERROR or greater, but in that case, any previous events at " +"lower severities are also logged." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3164 +msgid "You can of course use the conventional means of decoration::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3166 +msgid "" +"@log_if_errors(logger)\n" +"def foo(fail=False):\n" +" ..." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3174 +msgid "Sending logging messages to email, with buffering" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3176 +msgid "" +"To illustrate how you can send log messages via email, so that a set number " +"of messages are sent per email, you can subclass :class:`~logging.handlers." +"BufferingHandler`. In the following example, which you can adapt to suit " +"your specific needs, a simple test harness is provided which allows you to " +"run the script with command line arguments specifying what you typically " +"need to send things via SMTP. (Run the downloaded script with the ``-h`` " +"argument to see the required and optional arguments.)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3184 +msgid "" +"import logging\n" +"import logging.handlers\n" +"import smtplib\n" +"\n" +"class BufferingSMTPHandler(logging.handlers.BufferingHandler):\n" +" def __init__(self, mailhost, port, username, password, fromaddr, " +"toaddrs,\n" +" subject, capacity):\n" +" logging.handlers.BufferingHandler.__init__(self, capacity)\n" +" self.mailhost = mailhost\n" +" self.mailport = port\n" +" self.username = username\n" +" self.password = password\n" +" self.fromaddr = fromaddr\n" +" if isinstance(toaddrs, str):\n" +" toaddrs = [toaddrs]\n" +" self.toaddrs = toaddrs\n" +" self.subject = subject\n" +" self.setFormatter(logging.Formatter(\"%(asctime)s %(levelname)-5s " +"%(message)s\"))\n" +"\n" +" def flush(self):\n" +" if len(self.buffer) > 0:\n" +" try:\n" +" smtp = smtplib.SMTP(self.mailhost, self.mailport)\n" +" smtp.starttls()\n" +" smtp.login(self.username, self.password)\n" +" msg = \"From: %s\\r\\nTo: %s\\r\\nSubject: %s\\r\\n\\r\\n\" " +"% (self.fromaddr, ','.join(self.toaddrs), self.subject)\n" +" for record in self.buffer:\n" +" s = self.format(record)\n" +" msg = msg + s + \"\\r\\n\"\n" +" smtp.sendmail(self.fromaddr, self.toaddrs, msg)\n" +" smtp.quit()\n" +" except Exception:\n" +" if logging.raiseExceptions:\n" +" raise\n" +" self.buffer = []\n" +"\n" +"if __name__ == '__main__':\n" +" import argparse\n" +"\n" +" ap = argparse.ArgumentParser()\n" +" aa = ap.add_argument\n" +" aa('host', metavar='HOST', help='SMTP server')\n" +" aa('--port', '-p', type=int, default=587, help='SMTP port')\n" +" aa('user', metavar='USER', help='SMTP username')\n" +" aa('password', metavar='PASSWORD', help='SMTP password')\n" +" aa('to', metavar='TO', help='Addressee for emails')\n" +" aa('sender', metavar='SENDER', help='Sender email address')\n" +" aa('--subject', '-s',\n" +" default='Test Logging email from Python logging module (buffering)',\n" +" help='Subject of email')\n" +" options = ap.parse_args()\n" +" logger = logging.getLogger()\n" +" logger.setLevel(logging.DEBUG)\n" +" h = BufferingSMTPHandler(options.host, options.port, options.user,\n" +" options.password, options.sender,\n" +" options.to, options.subject, 10)\n" +" logger.addHandler(h)\n" +" for i in range(102):\n" +" logger.info(\"Info index = %d\", i)\n" +" h.flush()\n" +" h.close()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3248 +msgid "" +"If you run this script and your SMTP server is correctly set up, you should " +"find that it sends eleven emails to the addressee you specify. The first ten " +"emails will each have ten log messages, and the eleventh will have two " +"messages. That makes up 102 messages as specified in the script." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3256 +msgid "Formatting times using UTC (GMT) via configuration" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3258 +msgid "" +"Sometimes you want to format times using UTC, which can be done using a " +"class such as ``UTCFormatter``, shown below::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3261 +msgid "" +"import logging\n" +"import time\n" +"\n" +"class UTCFormatter(logging.Formatter):\n" +" converter = time.gmtime" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3267 +msgid "" +"and you can then use the ``UTCFormatter`` in your code instead of :class:" +"`~logging.Formatter`. If you want to do that via configuration, you can use " +"the :func:`~logging.config.dictConfig` API with an approach illustrated by " +"the following complete example::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3272 +msgid "" +"import logging\n" +"import logging.config\n" +"import time\n" +"\n" +"class UTCFormatter(logging.Formatter):\n" +" converter = time.gmtime\n" +"\n" +"LOGGING = {\n" +" 'version': 1,\n" +" 'disable_existing_loggers': False,\n" +" 'formatters': {\n" +" 'utc': {\n" +" '()': UTCFormatter,\n" +" 'format': '%(asctime)s %(message)s',\n" +" },\n" +" 'local': {\n" +" 'format': '%(asctime)s %(message)s',\n" +" }\n" +" },\n" +" 'handlers': {\n" +" 'console1': {\n" +" 'class': 'logging.StreamHandler',\n" +" 'formatter': 'utc',\n" +" },\n" +" 'console2': {\n" +" 'class': 'logging.StreamHandler',\n" +" 'formatter': 'local',\n" +" },\n" +" },\n" +" 'root': {\n" +" 'handlers': ['console1', 'console2'],\n" +" }\n" +"}\n" +"\n" +"if __name__ == '__main__':\n" +" logging.config.dictConfig(LOGGING)\n" +" logging.warning('The local time is %s', time.asctime())" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3310 +msgid "When this script is run, it should print something like:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3312 +msgid "" +"2015-10-17 12:53:29,501 The local time is Sat Oct 17 13:53:29 2015\n" +"2015-10-17 13:53:29,501 The local time is Sat Oct 17 13:53:29 2015" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3317 +msgid "" +"showing how the time is formatted both as local time and UTC, one for each " +"handler." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3324 +msgid "Using a context manager for selective logging" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3326 +msgid "" +"There are times when it would be useful to temporarily change the logging " +"configuration and revert it back after doing something. For this, a context " +"manager is the most obvious way of saving and restoring the logging context. " +"Here is a simple example of such a context manager, which allows you to " +"optionally change the logging level and add a logging handler purely in the " +"scope of the context manager::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3333 +msgid "" +"import logging\n" +"import sys\n" +"\n" +"class LoggingContext:\n" +" def __init__(self, logger, level=None, handler=None, close=True):\n" +" self.logger = logger\n" +" self.level = level\n" +" self.handler = handler\n" +" self.close = close\n" +"\n" +" def __enter__(self):\n" +" if self.level is not None:\n" +" self.old_level = self.logger.level\n" +" self.logger.setLevel(self.level)\n" +" if self.handler:\n" +" self.logger.addHandler(self.handler)\n" +"\n" +" def __exit__(self, et, ev, tb):\n" +" if self.level is not None:\n" +" self.logger.setLevel(self.old_level)\n" +" if self.handler:\n" +" self.logger.removeHandler(self.handler)\n" +" if self.handler and self.close:\n" +" self.handler.close()\n" +" # implicit return of None => don't swallow exceptions" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3359 +msgid "" +"If you specify a level value, the logger's level is set to that value in the " +"scope of the with block covered by the context manager. If you specify a " +"handler, it is added to the logger on entry to the block and removed on exit " +"from the block. You can also ask the manager to close the handler for you on " +"block exit - you could do this if you don't need the handler any more." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3365 +msgid "" +"To illustrate how it works, we can add the following block of code to the " +"above::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3368 +msgid "" +"if __name__ == '__main__':\n" +" logger = logging.getLogger('foo')\n" +" logger.addHandler(logging.StreamHandler())\n" +" logger.setLevel(logging.INFO)\n" +" logger.info('1. This should appear just once on stderr.')\n" +" logger.debug('2. This should not appear.')\n" +" with LoggingContext(logger, level=logging.DEBUG):\n" +" logger.debug('3. This should appear once on stderr.')\n" +" logger.debug('4. This should not appear.')\n" +" h = logging.StreamHandler(sys.stdout)\n" +" with LoggingContext(logger, level=logging.DEBUG, handler=h, " +"close=True):\n" +" logger.debug('5. This should appear twice - once on stderr and once " +"on stdout.')\n" +" logger.info('6. This should appear just once on stderr.')\n" +" logger.debug('7. This should not appear.')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3383 +msgid "" +"We initially set the logger's level to ``INFO``, so message #1 appears and " +"message #2 doesn't. We then change the level to ``DEBUG`` temporarily in the " +"following ``with`` block, and so message #3 appears. After the block exits, " +"the logger's level is restored to ``INFO`` and so message #4 doesn't appear. " +"In the next ``with`` block, we set the level to ``DEBUG`` again but also add " +"a handler writing to ``sys.stdout``. Thus, message #5 appears twice on the " +"console (once via ``stderr`` and once via ``stdout``). After the ``with`` " +"statement's completion, the status is as it was before so message #6 appears " +"(like message #1) whereas message #7 doesn't (just like message #2)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3393 +msgid "If we run the resulting script, the result is as follows:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3395 +msgid "" +"$ python logctx.py\n" +"1. This should appear just once on stderr.\n" +"3. This should appear once on stderr.\n" +"5. This should appear twice - once on stderr and once on stdout.\n" +"5. This should appear twice - once on stderr and once on stdout.\n" +"6. This should appear just once on stderr." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3404 +msgid "" +"If we run it again, but pipe ``stderr`` to ``/dev/null``, we see the " +"following, which is the only message written to ``stdout``:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3407 +msgid "" +"$ python logctx.py 2>/dev/null\n" +"5. This should appear twice - once on stderr and once on stdout." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3412 +msgid "Once again, but piping ``stdout`` to ``/dev/null``, we get:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3414 +msgid "" +"$ python logctx.py >/dev/null\n" +"1. This should appear just once on stderr.\n" +"3. This should appear once on stderr.\n" +"5. This should appear twice - once on stderr and once on stdout.\n" +"6. This should appear just once on stderr." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3422 +msgid "" +"In this case, the message #5 printed to ``stdout`` doesn't appear, as " +"expected." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3424 +msgid "" +"Of course, the approach described here can be generalised, for example to " +"attach logging filters temporarily. Note that the above code works in Python " +"2 as well as Python 3." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3432 +msgid "A CLI application starter template" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3434 +msgid "Here's an example which shows how you can:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3436 +msgid "Use a logging level based on command-line arguments" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3437 +msgid "" +"Dispatch to multiple subcommands in separate files, all logging at the same " +"level in a consistent way" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3439 +msgid "Make use of simple, minimal configuration" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3441 +msgid "" +"Suppose we have a command-line application whose job is to stop, start or " +"restart some services. This could be organised for the purposes of " +"illustration as a file ``app.py`` that is the main script for the " +"application, with individual commands implemented in ``start.py``, ``stop." +"py`` and ``restart.py``. Suppose further that we want to control the " +"verbosity of the application via a command-line argument, defaulting to " +"``logging.INFO``. Here's one way that ``app.py`` could be written::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3449 +msgid "" +"import argparse\n" +"import importlib\n" +"import logging\n" +"import os\n" +"import sys\n" +"\n" +"def main(args=None):\n" +" scriptname = os.path.basename(__file__)\n" +" parser = argparse.ArgumentParser(scriptname)\n" +" levels = ('DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL')\n" +" parser.add_argument('--log-level', default='INFO', choices=levels)\n" +" subparsers = parser.add_subparsers(dest='command',\n" +" help='Available commands:')\n" +" start_cmd = subparsers.add_parser('start', help='Start a service')\n" +" start_cmd.add_argument('name', metavar='NAME',\n" +" help='Name of service to start')\n" +" stop_cmd = subparsers.add_parser('stop',\n" +" help='Stop one or more services')\n" +" stop_cmd.add_argument('names', metavar='NAME', nargs='+',\n" +" help='Name of service to stop')\n" +" restart_cmd = subparsers.add_parser('restart',\n" +" help='Restart one or more " +"services')\n" +" restart_cmd.add_argument('names', metavar='NAME', nargs='+',\n" +" help='Name of service to restart')\n" +" options = parser.parse_args()\n" +" # the code to dispatch commands could all be in this file. For the " +"purposes\n" +" # of illustration only, we implement each command in a separate module.\n" +" try:\n" +" mod = importlib.import_module(options.command)\n" +" cmd = getattr(mod, 'command')\n" +" except (ImportError, AttributeError):\n" +" print('Unable to find the code for command \\'%s\\'' % options." +"command)\n" +" return 1\n" +" # Could get fancy here and load configuration from file or dictionary\n" +" logging.basicConfig(level=options.log_level,\n" +" format='%(levelname)s %(name)s %(message)s')\n" +" cmd(options)\n" +"\n" +"if __name__ == '__main__':\n" +" sys.exit(main())" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3490 +msgid "" +"And the ``start``, ``stop`` and ``restart`` commands can be implemented in " +"separate modules, like so for starting::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3493 +msgid "" +"# start.py\n" +"import logging\n" +"\n" +"logger = logging.getLogger(__name__)\n" +"\n" +"def command(options):\n" +" logger.debug('About to start %s', options.name)\n" +" # actually do the command processing here ...\n" +" logger.info('Started the \\'%s\\' service.', options.name)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3503 +msgid "and thus for stopping::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3505 +msgid "" +"# stop.py\n" +"import logging\n" +"\n" +"logger = logging.getLogger(__name__)\n" +"\n" +"def command(options):\n" +" n = len(options.names)\n" +" if n == 1:\n" +" plural = ''\n" +" services = '\\'%s\\'' % options.names[0]\n" +" else:\n" +" plural = 's'\n" +" services = ', '.join('\\'%s\\'' % name for name in options.names)\n" +" i = services.rfind(', ')\n" +" services = services[:i] + ' and ' + services[i + 2:]\n" +" logger.debug('About to stop %s', services)\n" +" # actually do the command processing here ...\n" +" logger.info('Stopped the %s service%s.', services, plural)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3524 +msgid "and similarly for restarting::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3526 +msgid "" +"# restart.py\n" +"import logging\n" +"\n" +"logger = logging.getLogger(__name__)\n" +"\n" +"def command(options):\n" +" n = len(options.names)\n" +" if n == 1:\n" +" plural = ''\n" +" services = '\\'%s\\'' % options.names[0]\n" +" else:\n" +" plural = 's'\n" +" services = ', '.join('\\'%s\\'' % name for name in options.names)\n" +" i = services.rfind(', ')\n" +" services = services[:i] + ' and ' + services[i + 2:]\n" +" logger.debug('About to restart %s', services)\n" +" # actually do the command processing here ...\n" +" logger.info('Restarted the %s service%s.', services, plural)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3545 +msgid "" +"If we run this application with the default log level, we get output like " +"this:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3547 +msgid "" +"$ python app.py start foo\n" +"INFO start Started the 'foo' service.\n" +"\n" +"$ python app.py stop foo bar\n" +"INFO stop Stopped the 'foo' and 'bar' services.\n" +"\n" +"$ python app.py restart foo bar baz\n" +"INFO restart Restarted the 'foo', 'bar' and 'baz' services." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3558 +msgid "" +"The first word is the logging level, and the second word is the module or " +"package name of the place where the event was logged." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3561 +msgid "" +"If we change the logging level, then we can change the information sent to " +"the log. For example, if we want more information:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3564 +msgid "" +"$ python app.py --log-level DEBUG start foo\n" +"DEBUG start About to start foo\n" +"INFO start Started the 'foo' service.\n" +"\n" +"$ python app.py --log-level DEBUG stop foo bar\n" +"DEBUG stop About to stop 'foo' and 'bar'\n" +"INFO stop Stopped the 'foo' and 'bar' services.\n" +"\n" +"$ python app.py --log-level DEBUG restart foo bar baz\n" +"DEBUG restart About to restart 'foo', 'bar' and 'baz'\n" +"INFO restart Restarted the 'foo', 'bar' and 'baz' services." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3578 +msgid "And if we want less:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3580 +msgid "" +"$ python app.py --log-level WARNING start foo\n" +"$ python app.py --log-level WARNING stop foo bar\n" +"$ python app.py --log-level WARNING restart foo bar baz" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3586 +msgid "" +"In this case, the commands don't print anything to the console, since " +"nothing at ``WARNING`` level or above is logged by them." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3592 +msgid "A Qt GUI for logging" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3594 +msgid "" +"A question that comes up from time to time is about how to log to a GUI " +"application. The `Qt `_ framework is a popular cross-" +"platform UI framework with Python bindings using :pypi:`PySide2` or :pypi:" +"`PyQt5` libraries." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3599 +msgid "" +"The following example shows how to log to a Qt GUI. This introduces a simple " +"``QtHandler`` class which takes a callable, which should be a slot in the " +"main thread that does GUI updates. A worker thread is also created to show " +"how you can log to the GUI from both the UI itself (via a button for manual " +"logging) as well as a worker thread doing work in the background (here, just " +"logging messages at random levels with random short delays in between)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3606 +msgid "" +"The worker thread is implemented using Qt's ``QThread`` class rather than " +"the :mod:`threading` module, as there are circumstances where one has to use " +"``QThread``, which offers better integration with other ``Qt`` components." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3610 +msgid "" +"The code should work with recent releases of any of ``PySide6``, ``PyQt6``, " +"``PySide2`` or ``PyQt5``. You should be able to adapt the approach to " +"earlier versions of Qt. Please refer to the comments in the code snippet for " +"more detailed information." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3615 +msgid "" +"import logging\n" +"import random\n" +"import sys\n" +"import time\n" +"\n" +"# Deal with minor differences between different Qt packages\n" +"try:\n" +" from PySide6 import QtCore, QtGui, QtWidgets\n" +" Signal = QtCore.Signal\n" +" Slot = QtCore.Slot\n" +"except ImportError:\n" +" try:\n" +" from PyQt6 import QtCore, QtGui, QtWidgets\n" +" Signal = QtCore.pyqtSignal\n" +" Slot = QtCore.pyqtSlot\n" +" except ImportError:\n" +" try:\n" +" from PySide2 import QtCore, QtGui, QtWidgets\n" +" Signal = QtCore.Signal\n" +" Slot = QtCore.Slot\n" +" except ImportError:\n" +" from PyQt5 import QtCore, QtGui, QtWidgets\n" +" Signal = QtCore.pyqtSignal\n" +" Slot = QtCore.pyqtSlot\n" +"\n" +"logger = logging.getLogger(__name__)\n" +"\n" +"\n" +"#\n" +"# Signals need to be contained in a QObject or subclass in order to be " +"correctly\n" +"# initialized.\n" +"#\n" +"class Signaller(QtCore.QObject):\n" +" signal = Signal(str, logging.LogRecord)\n" +"\n" +"#\n" +"# Output to a Qt GUI is only supposed to happen on the main thread. So, " +"this\n" +"# handler is designed to take a slot function which is set up to run in the " +"main\n" +"# thread. In this example, the function takes a string argument which is a\n" +"# formatted log message, and the log record which generated it. The " +"formatted\n" +"# string is just a convenience - you could format a string for output any " +"way\n" +"# you like in the slot function itself.\n" +"#\n" +"# You specify the slot function to do whatever GUI updates you want. The " +"handler\n" +"# doesn't know or care about specific UI elements.\n" +"#\n" +"class QtHandler(logging.Handler):\n" +" def __init__(self, slotfunc, *args, **kwargs):\n" +" super().__init__(*args, **kwargs)\n" +" self.signaller = Signaller()\n" +" self.signaller.signal.connect(slotfunc)\n" +"\n" +" def emit(self, record):\n" +" s = self.format(record)\n" +" self.signaller.signal.emit(s, record)\n" +"\n" +"#\n" +"# This example uses QThreads, which means that the threads at the Python " +"level\n" +"# are named something like \"Dummy-1\". The function below gets the Qt name " +"of the\n" +"# current thread.\n" +"#\n" +"def ctname():\n" +" return QtCore.QThread.currentThread().objectName()\n" +"\n" +"\n" +"#\n" +"# Used to generate random levels for logging.\n" +"#\n" +"LEVELS = (logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR,\n" +" logging.CRITICAL)\n" +"\n" +"#\n" +"# This worker class represents work that is done in a thread separate to " +"the\n" +"# main thread. The way the thread is kicked off to do work is via a button " +"press\n" +"# that connects to a slot in the worker.\n" +"#\n" +"# Because the default threadName value in the LogRecord isn't much use, we " +"add\n" +"# a qThreadName which contains the QThread name as computed above, and pass " +"that\n" +"# value in an \"extra\" dictionary which is used to update the LogRecord " +"with the\n" +"# QThread name.\n" +"#\n" +"# This example worker just outputs messages sequentially, interspersed with\n" +"# random delays of the order of a few seconds.\n" +"#\n" +"class Worker(QtCore.QObject):\n" +" @Slot()\n" +" def start(self):\n" +" extra = {'qThreadName': ctname() }\n" +" logger.debug('Started work', extra=extra)\n" +" i = 1\n" +" # Let the thread run until interrupted. This allows reasonably " +"clean\n" +" # thread termination.\n" +" while not QtCore.QThread.currentThread().isInterruptionRequested():\n" +" delay = 0.5 + random.random() * 2\n" +" time.sleep(delay)\n" +" try:\n" +" if random.random() < 0.1:\n" +" raise ValueError('Exception raised: %d' % i)\n" +" else:\n" +" level = random.choice(LEVELS)\n" +" logger.log(level, 'Message after delay of %3.1f: %d', " +"delay, i, extra=extra)\n" +" except ValueError as e:\n" +" logger.exception('Failed: %s', e, extra=extra)\n" +" i += 1\n" +"\n" +"#\n" +"# Implement a simple UI for this cookbook example. This contains:\n" +"#\n" +"# * A read-only text edit window which holds formatted log messages\n" +"# * A button to start work and log stuff in a separate thread\n" +"# * A button to log something from the main thread\n" +"# * A button to clear the log window\n" +"#\n" +"class Window(QtWidgets.QWidget):\n" +"\n" +" COLORS = {\n" +" logging.DEBUG: 'black',\n" +" logging.INFO: 'blue',\n" +" logging.WARNING: 'orange',\n" +" logging.ERROR: 'red',\n" +" logging.CRITICAL: 'purple',\n" +" }\n" +"\n" +" def __init__(self, app):\n" +" super().__init__()\n" +" self.app = app\n" +" self.textedit = te = QtWidgets.QPlainTextEdit(self)\n" +" # Set whatever the default monospace font is for the platform\n" +" f = QtGui.QFont('nosuchfont')\n" +" if hasattr(f, 'Monospace'):\n" +" f.setStyleHint(f.Monospace)\n" +" else:\n" +" f.setStyleHint(f.StyleHint.Monospace) # for Qt6\n" +" te.setFont(f)\n" +" te.setReadOnly(True)\n" +" PB = QtWidgets.QPushButton\n" +" self.work_button = PB('Start background work', self)\n" +" self.log_button = PB('Log a message at a random level', self)\n" +" self.clear_button = PB('Clear log window', self)\n" +" self.handler = h = QtHandler(self.update_status)\n" +" # Remember to use qThreadName rather than threadName in the format " +"string.\n" +" fs = '%(asctime)s %(qThreadName)-12s %(levelname)-8s %(message)s'\n" +" formatter = logging.Formatter(fs)\n" +" h.setFormatter(formatter)\n" +" logger.addHandler(h)\n" +" # Set up to terminate the QThread when we exit\n" +" app.aboutToQuit.connect(self.force_quit)\n" +"\n" +" # Lay out all the widgets\n" +" layout = QtWidgets.QVBoxLayout(self)\n" +" layout.addWidget(te)\n" +" layout.addWidget(self.work_button)\n" +" layout.addWidget(self.log_button)\n" +" layout.addWidget(self.clear_button)\n" +" self.setFixedSize(900, 400)\n" +"\n" +" # Connect the non-worker slots and signals\n" +" self.log_button.clicked.connect(self.manual_update)\n" +" self.clear_button.clicked.connect(self.clear_display)\n" +"\n" +" # Start a new worker thread and connect the slots for the worker\n" +" self.start_thread()\n" +" self.work_button.clicked.connect(self.worker.start)\n" +" # Once started, the button should be disabled\n" +" self.work_button.clicked.connect(lambda : self.work_button." +"setEnabled(False))\n" +"\n" +" def start_thread(self):\n" +" self.worker = Worker()\n" +" self.worker_thread = QtCore.QThread()\n" +" self.worker.setObjectName('Worker')\n" +" self.worker_thread.setObjectName('WorkerThread') # for qThreadName\n" +" self.worker.moveToThread(self.worker_thread)\n" +" # This will start an event loop in the worker thread\n" +" self.worker_thread.start()\n" +"\n" +" def kill_thread(self):\n" +" # Just tell the worker to stop, then tell it to quit and wait for " +"that\n" +" # to happen\n" +" self.worker_thread.requestInterruption()\n" +" if self.worker_thread.isRunning():\n" +" self.worker_thread.quit()\n" +" self.worker_thread.wait()\n" +" else:\n" +" print('worker has already exited.')\n" +"\n" +" def force_quit(self):\n" +" # For use when the window is closed\n" +" if self.worker_thread.isRunning():\n" +" self.kill_thread()\n" +"\n" +" # The functions below update the UI and run in the main thread because\n" +" # that's where the slots are set up\n" +"\n" +" @Slot(str, logging.LogRecord)\n" +" def update_status(self, status, record):\n" +" color = self.COLORS.get(record.levelno, 'black')\n" +" s = '
%s
' % (color, status)\n" +" self.textedit.appendHtml(s)\n" +"\n" +" @Slot()\n" +" def manual_update(self):\n" +" # This function uses the formatted message passed in, but also uses\n" +" # information from the record to format the message in an " +"appropriate\n" +" # color according to its severity (level).\n" +" level = random.choice(LEVELS)\n" +" extra = {'qThreadName': ctname() }\n" +" logger.log(level, 'Manually logged!', extra=extra)\n" +"\n" +" @Slot()\n" +" def clear_display(self):\n" +" self.textedit.clear()\n" +"\n" +"\n" +"def main():\n" +" QtCore.QThread.currentThread().setObjectName('MainThread')\n" +" logging.getLogger().setLevel(logging.DEBUG)\n" +" app = QtWidgets.QApplication(sys.argv)\n" +" example = Window(app)\n" +" example.show()\n" +" if hasattr(app, 'exec'):\n" +" rc = app.exec()\n" +" else:\n" +" rc = app.exec_()\n" +" sys.exit(rc)\n" +"\n" +"if __name__=='__main__':\n" +" main()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3846 +msgid "Logging to syslog with RFC5424 support" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3848 +msgid "" +"Although :rfc:`5424` dates from 2009, most syslog servers are configured by " +"default to use the older :rfc:`3164`, which hails from 2001. When " +"``logging`` was added to Python in 2003, it supported the earlier (and only " +"existing) protocol at the time. Since RFC 5424 came out, as there has not " +"been widespread deployment of it in syslog servers, the :class:`~logging." +"handlers.SysLogHandler` functionality has not been updated." +msgstr "" + +#: ../../howto/logging-cookbook.rst:3855 +msgid "" +"RFC 5424 contains some useful features such as support for structured data, " +"and if you need to be able to log to a syslog server with support for it, " +"you can do so with a subclassed handler which looks something like this::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3859 +msgid "" +"import datetime as dt\n" +"import logging.handlers\n" +"import re\n" +"import socket\n" +"import time\n" +"\n" +"class SysLogHandler5424(logging.handlers.SysLogHandler):\n" +"\n" +" tz_offset = re.compile(r'([+-]\\d{2})(\\d{2})$')\n" +" escaped = re.compile(r'([\\]\"\\\\])')\n" +"\n" +" def __init__(self, *args, **kwargs):\n" +" self.msgid = kwargs.pop('msgid', None)\n" +" self.appname = kwargs.pop('appname', None)\n" +" super().__init__(*args, **kwargs)\n" +"\n" +" def format(self, record):\n" +" version = 1\n" +" asctime = dt.datetime.fromtimestamp(record.created).isoformat()\n" +" m = self.tz_offset.prefixmatch(time.strftime('%z'))\n" +" has_offset = False\n" +" if m and time.timezone:\n" +" hrs, mins = m.groups()\n" +" if int(hrs) or int(mins):\n" +" has_offset = True\n" +" if not has_offset:\n" +" asctime += 'Z'\n" +" else:\n" +" asctime += f'{hrs}:{mins}'\n" +" try:\n" +" hostname = socket.gethostname()\n" +" except Exception:\n" +" hostname = '-'\n" +" appname = self.appname or '-'\n" +" procid = record.process\n" +" msgid = '-'\n" +" msg = super().format(record)\n" +" sdata = '-'\n" +" if hasattr(record, 'structured_data'):\n" +" sd = record.structured_data\n" +" # This should be a dict where the keys are SD-ID and the value " +"is a\n" +" # dict mapping PARAM-NAME to PARAM-VALUE (refer to the RFC for " +"what these\n" +" # mean)\n" +" # There's no error checking here - it's purely for illustration, " +"and you\n" +" # can adapt this code for use in production environments\n" +" parts = []\n" +"\n" +" def replacer(m):\n" +" g = m.groups()\n" +" return '\\\\' + g[0]\n" +"\n" +" for sdid, dv in sd.items():\n" +" part = f'[{sdid}'\n" +" for k, v in dv.items():\n" +" s = str(v)\n" +" s = self.escaped.sub(replacer, s)\n" +" part += f' {k}=\"{s}\"'\n" +" part += ']'\n" +" parts.append(part)\n" +" sdata = ''.join(parts)\n" +" return f'{version} {asctime} {hostname} {appname} {procid} {msgid} " +"{sdata} {msg}'" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3921 +msgid "" +"You'll need to be familiar with RFC 5424 to fully understand the above code, " +"and it may be that you have slightly different needs (e.g. for how you pass " +"structural data to the log). Nevertheless, the above should be adaptable to " +"your speciric needs. With the above handler, you'd pass structured data " +"using something like this::" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3926 +msgid "" +"sd = {\n" +" 'foo@12345': {'bar': 'baz', 'baz': 'bozz', 'fizz': r'buzz'},\n" +" 'foo@54321': {'rab': 'baz', 'zab': 'bozz', 'zzif': r'buzz'}\n" +"}\n" +"extra = {'structured_data': sd}\n" +"i = 1\n" +"logger.debug('Message %d', i, extra=extra)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3935 +msgid "How to treat a logger like an output stream" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3937 +msgid "" +"Sometimes, you need to interface to a third-party API which expects a file-" +"like object to write to, but you want to direct the API's output to a " +"logger. You can do this using a class which wraps a logger with a file-like " +"API. Here's a short script illustrating such a class:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3942 +msgid "" +"import logging\n" +"\n" +"class LoggerWriter:\n" +" def __init__(self, logger, level):\n" +" self.logger = logger\n" +" self.level = level\n" +"\n" +" def write(self, message):\n" +" if message != '\\n': # avoid printing bare newlines, if you like\n" +" self.logger.log(self.level, message)\n" +"\n" +" def flush(self):\n" +" # doesn't actually do anything, but might be expected of a file-" +"like\n" +" # object - so optional depending on your situation\n" +" pass\n" +"\n" +" def close(self):\n" +" # doesn't actually do anything, but might be expected of a file-" +"like\n" +" # object - so optional depending on your situation. You might want\n" +" # to set a flag so that later calls to write raise an exception\n" +" pass\n" +"\n" +"def main():\n" +" logging.basicConfig(level=logging.DEBUG)\n" +" logger = logging.getLogger('demo')\n" +" info_fp = LoggerWriter(logger, logging.INFO)\n" +" debug_fp = LoggerWriter(logger, logging.DEBUG)\n" +" print('An INFO message', file=info_fp)\n" +" print('A DEBUG message', file=debug_fp)\n" +"\n" +"if __name__ == \"__main__\":\n" +" main()" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3977 +msgid "When this script is run, it prints" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3979 +msgid "" +"INFO:demo:An INFO message\n" +"DEBUG:demo:A DEBUG message" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3984 +msgid "" +"You could also use ``LoggerWriter`` to redirect ``sys.stdout`` and ``sys." +"stderr`` by doing something like this:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3987 +msgid "" +"import sys\n" +"\n" +"sys.stdout = LoggerWriter(logger, logging.INFO)\n" +"sys.stderr = LoggerWriter(logger, logging.WARNING)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3994 +msgid "" +"You should do this *after* configuring logging for your needs. In the above " +"example, the :func:`~logging.basicConfig` call does this (using the ``sys." +"stderr`` value *before* it is overwritten by a ``LoggerWriter`` instance). " +"Then, you'd get this kind of result:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:3999 +msgid "" +">>> print('Foo')\n" +"INFO:demo:Foo\n" +">>> print('Bar', file=sys.stderr)\n" +"WARNING:demo:Bar\n" +">>>" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4007 +msgid "" +"Of course, the examples above show output according to the format used by :" +"func:`~logging.basicConfig`, but you can use a different formatter when you " +"configure logging." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4011 +msgid "" +"Note that with the above scheme, you are somewhat at the mercy of buffering " +"and the sequence of write calls which you are intercepting. For example, " +"with the definition of ``LoggerWriter`` above, if you have the snippet" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4015 +msgid "" +"sys.stderr = LoggerWriter(logger, logging.WARNING)\n" +"1 / 0" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4020 +msgid "then running the script results in" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4022 +msgid "" +"WARNING:demo:Traceback (most recent call last):\n" +"\n" +"WARNING:demo: File \"/home/runner/cookbook-loggerwriter/test.py\", line 53, " +"in \n" +"\n" +"WARNING:demo:\n" +"WARNING:demo:main()\n" +"WARNING:demo: File \"/home/runner/cookbook-loggerwriter/test.py\", line 49, " +"in main\n" +"\n" +"WARNING:demo:\n" +"WARNING:demo:1 / 0\n" +"WARNING:demo:ZeroDivisionError\n" +"WARNING:demo::\n" +"WARNING:demo:division by zero" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4038 +msgid "" +"As you can see, this output isn't ideal. That's because the underlying code " +"which writes to ``sys.stderr`` makes multiple writes, each of which results " +"in a separate logged line (for example, the last three lines above). To get " +"around this problem, you need to buffer things and only output log lines " +"when newlines are seen. Let's use a slightly better implementation of " +"``LoggerWriter``:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4044 +msgid "" +"class BufferingLoggerWriter(LoggerWriter):\n" +" def __init__(self, logger, level):\n" +" super().__init__(logger, level)\n" +" self.buffer = ''\n" +"\n" +" def write(self, message):\n" +" if '\\n' not in message:\n" +" self.buffer += message\n" +" else:\n" +" parts = message.split('\\n')\n" +" if self.buffer:\n" +" s = self.buffer + parts.pop(0)\n" +" self.logger.log(self.level, s)\n" +" self.buffer = parts.pop()\n" +" for part in parts:\n" +" self.logger.log(self.level, part)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4063 +msgid "" +"This just buffers up stuff until a newline is seen, and then logs complete " +"lines. With this approach, you get better output:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4066 +msgid "" +"WARNING:demo:Traceback (most recent call last):\n" +"WARNING:demo: File \"/home/runner/cookbook-loggerwriter/main.py\", line 55, " +"in \n" +"WARNING:demo: main()\n" +"WARNING:demo: File \"/home/runner/cookbook-loggerwriter/main.py\", line 52, " +"in main\n" +"WARNING:demo: 1/0\n" +"WARNING:demo:ZeroDivisionError: division by zero" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4076 +msgid "How to uniformly handle newlines in logging output" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4078 +msgid "" +"Usually, messages that are logged (say to console or file) consist of a " +"single line of text. However, sometimes there is a need to handle messages " +"with multiple lines - whether because a logging format string contains " +"newlines, or logged data contains newlines. If you want to handle such " +"messages uniformly, so that each line in the logged message appears " +"uniformly formatted as if it was logged separately, you can do this using a " +"handler mixin, as in the following snippet:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4086 +msgid "" +"# Assume this is in a module mymixins.py\n" +"import copy\n" +"\n" +"class MultilineMixin:\n" +" def emit(self, record):\n" +" s = record.getMessage()\n" +" if '\\n' not in s:\n" +" super().emit(record)\n" +" else:\n" +" lines = s.splitlines()\n" +" rec = copy.copy(record)\n" +" rec.args = None\n" +" for line in lines:\n" +" rec.msg = line\n" +" super().emit(rec)" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4104 +msgid "You can use the mixin as in the following script:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4106 +msgid "" +"import logging\n" +"\n" +"from mymixins import MultilineMixin\n" +"\n" +"logger = logging.getLogger(__name__)\n" +"\n" +"class StreamHandler(MultilineMixin, logging.StreamHandler):\n" +" pass\n" +"\n" +"if __name__ == '__main__':\n" +" logging.basicConfig(level=logging.DEBUG, format='%(asctime)s " +"%(levelname)-9s %(message)s',\n" +" handlers = [StreamHandler()])\n" +" logger.debug('Single line')\n" +" logger.debug('Multiple lines:\\nfool me once ...')\n" +" logger.debug('Another single line')\n" +" logger.debug('Multiple lines:\\n%s', 'fool me ...\\ncan\\'t get fooled " +"again')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4125 +msgid "The script, when run, prints something like:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4127 +msgid "" +"2025-07-02 13:54:47,234 DEBUG Single line\n" +"2025-07-02 13:54:47,234 DEBUG Multiple lines:\n" +"2025-07-02 13:54:47,234 DEBUG fool me once ...\n" +"2025-07-02 13:54:47,234 DEBUG Another single line\n" +"2025-07-02 13:54:47,234 DEBUG Multiple lines:\n" +"2025-07-02 13:54:47,234 DEBUG fool me ...\n" +"2025-07-02 13:54:47,234 DEBUG can't get fooled again" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4137 +msgid "" +"If, on the other hand, you are concerned about `log injection `_, you can use a formatter which " +"escapes newlines, as per the following example:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4141 +msgid "" +"import logging\n" +"\n" +"logger = logging.getLogger(__name__)\n" +"\n" +"class EscapingFormatter(logging.Formatter):\n" +" def format(self, record):\n" +" s = super().format(record)\n" +" return s.replace('\\n', r'\\n')\n" +"\n" +"if __name__ == '__main__':\n" +" h = logging.StreamHandler()\n" +" h.setFormatter(EscapingFormatter('%(asctime)s %(levelname)-9s " +"%(message)s'))\n" +" logging.basicConfig(level=logging.DEBUG, handlers = [h])\n" +" logger.debug('Single line')\n" +" logger.debug('Multiple lines:\\nfool me once ...')\n" +" logger.debug('Another single line')\n" +" logger.debug('Multiple lines:\\n%s', 'fool me ...\\ncan\\'t get fooled " +"again')" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4161 +msgid "" +"You can, of course, use whatever escaping scheme makes the most sense for " +"you. The script, when run, should produce output like this:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4164 +msgid "" +"2025-07-09 06:47:33,783 DEBUG Single line\n" +"2025-07-09 06:47:33,783 DEBUG Multiple lines:\\nfool me once ...\n" +"2025-07-09 06:47:33,783 DEBUG Another single line\n" +"2025-07-09 06:47:33,783 DEBUG Multiple lines:\\nfool me ...\\ncan't get " +"fooled again" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4171 +msgid "" +"Escaping behaviour can't be the stdlib default , as it would break backwards " +"compatibility." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4177 +msgid "Patterns to avoid" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4179 +msgid "" +"Although the preceding sections have described ways of doing things you " +"might need to do or deal with, it is worth mentioning some usage patterns " +"which are *unhelpful*, and which should therefore be avoided in most cases. " +"The following sections are in no particular order." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4185 +msgid "Opening the same log file multiple times" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4187 +msgid "" +"On Windows, you will generally not be able to open the same file multiple " +"times as this will lead to a \"file is in use by another process\" error. " +"However, on POSIX platforms you'll not get any errors if you open the same " +"file multiple times. This could be done accidentally, for example by:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4192 +msgid "" +"Adding a file handler more than once which references the same file (e.g. by " +"a copy/paste/forget-to-change error)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4195 +msgid "" +"Opening two files that look different, as they have different names, but are " +"the same because one is a symbolic link to the other." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4198 +msgid "" +"Forking a process, following which both parent and child have a reference to " +"the same file. This might be through use of the :mod:`multiprocessing` " +"module, for example." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4202 +msgid "" +"Opening a file multiple times might *appear* to work most of the time, but " +"can lead to a number of problems in practice:" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4205 +msgid "" +"Logging output can be garbled because multiple threads or processes try to " +"write to the same file. Although logging guards against concurrent use of " +"the same handler instance by multiple threads, there is no such protection " +"if concurrent writes are attempted by two different threads using two " +"different handler instances which happen to point to the same file." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4211 +msgid "" +"An attempt to delete a file (e.g. during file rotation) silently fails, " +"because there is another reference pointing to it. This can lead to " +"confusion and wasted debugging time - log entries end up in unexpected " +"places, or are lost altogether. Or a file that was supposed to be moved " +"remains in place, and grows in size unexpectedly despite size-based rotation " +"being supposedly in place." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4218 +msgid "" +"Use the techniques outlined in :ref:`multiple-processes` to circumvent such " +"issues." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4222 +msgid "Using loggers as attributes in a class or passing them as parameters" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4224 +msgid "" +"While there might be unusual cases where you'll need to do this, in general " +"there is no point because loggers are singletons. Code can always access a " +"given logger instance by name using ``logging.getLogger(name)``, so passing " +"instances around and holding them as instance attributes is pointless. Note " +"that in other languages such as Java and C#, loggers are often static class " +"attributes. However, this pattern doesn't make sense in Python, where the " +"module (and not the class) is the unit of software decomposition." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4233 +msgid "" +"Adding handlers other than :class:`~logging.NullHandler` to a logger in a " +"library" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4235 +msgid "" +"Configuring logging by adding handlers, formatters and filters is the " +"responsibility of the application developer, not the library developer. If " +"you are maintaining a library, ensure that you don't add handlers to any of " +"your loggers other than a :class:`~logging.NullHandler` instance." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4241 +msgid "Creating a lot of loggers" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4243 +msgid "" +"Loggers are singletons that are never freed during a script execution, and " +"so creating lots of loggers will use up memory which can't then be freed. " +"Rather than create a logger per e.g. file processed or network connection " +"made, use the :ref:`existing mechanisms ` for passing " +"contextual information into your logs and restrict the loggers created to " +"those describing areas within your application (generally modules, but " +"occasionally slightly more fine-grained than that)." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4254 +msgid "Other resources" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4258 +msgid "Module :mod:`logging`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4259 +msgid "API reference for the logging module." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4261 +msgid "Module :mod:`logging.config`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4262 +msgid "Configuration API for the logging module." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4264 +msgid "Module :mod:`logging.handlers`" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4265 +msgid "Useful handlers included with the logging module." +msgstr "" + +#: ../../howto/logging-cookbook.rst:4267 +msgid ":ref:`Basic Tutorial `" +msgstr "" + +#: ../../howto/logging-cookbook.rst:4269 +msgid ":ref:`Advanced Tutorial `" +msgstr "" diff --git a/howto/mro.po b/howto/mro.po index 031d089e..8775b8ed 100644 --- a/howto/mro.po +++ b/howto/mro.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -303,9 +303,9 @@ msgid "" "tail of any of the other lists, then add it to the linearization of C and " "remove it from the lists in the merge, otherwise look at the head of the " "next list and take it, if it is a good head. Then repeat the operation " -"until all the class are removed or it is impossible to find good heads. In " -"this case, it is impossible to construct the merge, Python 2.3 will refuse " -"to create the class C and will raise an exception.*" +"until all the classes are removed or it is impossible to find good heads. " +"In this case, it is impossible to construct the merge, Python 2.3 will " +"refuse to create the class C and will raise an exception.*" msgstr "" #: ../../howto/mro.rst:197 diff --git a/howto/mro.po~ b/howto/mro.po~ new file mode 100644 index 00000000..031d089e --- /dev/null +++ b/howto/mro.po~ @@ -0,0 +1,905 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../howto/mro.rst:4 +msgid "The Python 2.3 Method Resolution Order" +msgstr "" + +#: ../../howto/mro.rst:8 +msgid "" +"This is a historical document, provided as an appendix to the official " +"documentation. The Method Resolution Order discussed here was *introduced* " +"in Python 2.3, but it is still used in later versions -- including Python 3." +msgstr "" + +#: ../../howto/mro.rst:13 +msgid "By `Michele Simionato `__." +msgstr "" + +#: ../../howto/mro.rst:0 +msgid "Abstract" +msgstr "" + +#: ../../howto/mro.rst:17 +msgid "" +"*This document is intended for Python programmers who want to understand the " +"C3 Method Resolution Order used in Python 2.3. Although it is not intended " +"for newbies, it is quite pedagogical with many worked out examples. I am " +"not aware of other publicly available documents with the same scope, " +"therefore it should be useful.*" +msgstr "" + +#: ../../howto/mro.rst:23 +msgid "Disclaimer:" +msgstr "" + +#: ../../howto/mro.rst:25 +msgid "" +"*I donate this document to the Python Software Foundation, under the Python " +"2.3 license. As usual in these circumstances, I warn the reader that what " +"follows* should *be correct, but I don't give any warranty. Use it at your " +"own risk and peril!*" +msgstr "" + +#: ../../howto/mro.rst:30 +msgid "Acknowledgments:" +msgstr "" + +#: ../../howto/mro.rst:32 +msgid "" +"*All the people of the Python mailing list who sent me their support. Paul " +"Foley who pointed out various imprecisions and made me to add the part on " +"local precedence ordering. David Goodger for help with the formatting in " +"reStructuredText. David Mertz for help with the editing. Finally, Guido van " +"Rossum who enthusiastically added this document to the official Python 2.3 " +"home-page.*" +msgstr "" + +#: ../../howto/mro.rst:40 +msgid "The beginning" +msgstr "" + +#: ../../howto/mro.rst:42 +msgid "*Felix qui potuit rerum cognoscere causas* -- Virgilius" +msgstr "" + +#: ../../howto/mro.rst:44 +msgid "" +"Everything started with a post by Samuele Pedroni to the Python development " +"mailing list [#]_. In his post, Samuele showed that the Python 2.2 method " +"resolution order is not monotonic and he proposed to replace it with the C3 " +"method resolution order. Guido agreed with his arguments and therefore now " +"Python 2.3 uses C3. The C3 method itself has nothing to do with Python, " +"since it was invented by people working on Dylan and it is described in a " +"paper intended for lispers [#]_. The present paper gives a (hopefully) " +"readable discussion of the C3 algorithm for Pythonistas who want to " +"understand the reasons for the change." +msgstr "" + +#: ../../howto/mro.rst:55 +msgid "" +"First of all, let me point out that what I am going to say only applies to " +"the *new style classes* introduced in Python 2.2: *classic classes* " +"maintain their old method resolution order, depth first and then left to " +"right. Therefore, there is no breaking of old code for classic classes; and " +"even if in principle there could be breaking of code for Python 2.2 new " +"style classes, in practice the cases in which the C3 resolution order " +"differs from the Python 2.2 method resolution order are so rare that no real " +"breaking of code is expected. Therefore:" +msgstr "" + +#: ../../howto/mro.rst:64 +msgid "*Don't be scared!*" +msgstr "" + +#: ../../howto/mro.rst:66 +msgid "" +"Moreover, unless you make strong use of multiple inheritance and you have " +"non-trivial hierarchies, you don't need to understand the C3 algorithm, and " +"you can easily skip this paper. On the other hand, if you really want to " +"know how multiple inheritance works, then this paper is for you. The good " +"news is that things are not as complicated as you might expect." +msgstr "" + +#: ../../howto/mro.rst:73 +msgid "Let me begin with some basic definitions." +msgstr "" + +#: ../../howto/mro.rst:75 +msgid "" +"Given a class C in a complicated multiple inheritance hierarchy, it is a non-" +"trivial task to specify the order in which methods are overridden, i.e. to " +"specify the order of the ancestors of C." +msgstr "" + +#: ../../howto/mro.rst:79 +msgid "" +"The list of the ancestors of a class C, including the class itself, ordered " +"from the nearest ancestor to the furthest, is called the class precedence " +"list or the *linearization* of C." +msgstr "" + +#: ../../howto/mro.rst:83 +msgid "" +"The *Method Resolution Order* (MRO) is the set of rules that construct the " +"linearization. In the Python literature, the idiom \"the MRO of C\" is also " +"used as a synonymous for the linearization of the class C." +msgstr "" + +#: ../../howto/mro.rst:88 +msgid "" +"For instance, in the case of single inheritance hierarchy, if C is a " +"subclass of C1, and C1 is a subclass of C2, then the linearization of C is " +"simply the list [C, C1 , C2]. However, with multiple inheritance " +"hierarchies, the construction of the linearization is more cumbersome, since " +"it is more difficult to construct a linearization that respects *local " +"precedence ordering* and *monotonicity*." +msgstr "" + +#: ../../howto/mro.rst:96 +msgid "" +"I will discuss the local precedence ordering later, but I can give the " +"definition of monotonicity here. A MRO is monotonic when the following is " +"true: *if C1 precedes C2 in the linearization of C, then C1 precedes C2 in " +"the linearization of any subclass of C*. Otherwise, the innocuous operation " +"of deriving a new class could change the resolution order of methods, " +"potentially introducing very subtle bugs. Examples where this happens will " +"be shown later." +msgstr "" + +#: ../../howto/mro.rst:104 +msgid "" +"Not all classes admit a linearization. There are cases, in complicated " +"hierarchies, where it is not possible to derive a class such that its " +"linearization respects all the desired properties." +msgstr "" + +#: ../../howto/mro.rst:108 +msgid "Here I give an example of this situation. Consider the hierarchy" +msgstr "" + +#: ../../howto/mro.rst:116 +msgid "" +"which can be represented with the following inheritance graph, where I have " +"denoted with O the ``object`` class, which is the beginning of any hierarchy " +"for new style classes:" +msgstr "" + +#: ../../howto/mro.rst:120 +msgid "" +" -----------\n" +"| |\n" +"| O |\n" +"| / \\ |\n" +" - X Y /\n" +" | / | /\n" +" | / |/\n" +" A B\n" +" \\ /\n" +" ?" +msgstr "" + +#: ../../howto/mro.rst:133 +msgid "" +"In this case, it is not possible to derive a new class C from A and B, since " +"X precedes Y in A, but Y precedes X in B, therefore the method resolution " +"order would be ambiguous in C." +msgstr "" + +#: ../../howto/mro.rst:137 +msgid "" +"Python 2.3 raises an exception in this situation (TypeError: MRO conflict " +"among bases Y, X) forbidding the naive programmer from creating ambiguous " +"hierarchies. Python 2.2 instead does not raise an exception, but chooses an " +"*ad hoc* ordering (CABXYO in this case)." +msgstr "" + +#: ../../howto/mro.rst:143 +msgid "The C3 Method Resolution Order" +msgstr "" + +#: ../../howto/mro.rst:145 +msgid "" +"Let me introduce a few simple notations which will be useful for the " +"following discussion. I will use the shortcut notation::" +msgstr "" + +#: ../../howto/mro.rst:148 +msgid "C1 C2 ... CN" +msgstr "" + +#: ../../howto/mro.rst:150 +msgid "to indicate the list of classes [C1, C2, ... , CN]." +msgstr "" + +#: ../../howto/mro.rst:152 +msgid "The *head* of the list is its first element::" +msgstr "" + +#: ../../howto/mro.rst:154 +msgid "head = C1" +msgstr "" + +#: ../../howto/mro.rst:156 +msgid "whereas the *tail* is the rest of the list::" +msgstr "" + +#: ../../howto/mro.rst:158 +msgid "tail = C2 ... CN." +msgstr "" + +#: ../../howto/mro.rst:160 +msgid "I shall also use the notation::" +msgstr "" + +#: ../../howto/mro.rst:162 +msgid "C + (C1 C2 ... CN) = C C1 C2 ... CN" +msgstr "" + +#: ../../howto/mro.rst:164 +msgid "to denote the sum of the lists [C] + [C1, C2, ... ,CN]." +msgstr "" + +#: ../../howto/mro.rst:166 +msgid "Now I can explain how the MRO works in Python 2.3." +msgstr "" + +#: ../../howto/mro.rst:168 +msgid "" +"Consider a class C in a multiple inheritance hierarchy, with C inheriting " +"from the base classes B1, B2, ... , BN. We want to compute the " +"linearization L[C] of the class C. The rule is the following:" +msgstr "" + +#: ../../howto/mro.rst:173 +msgid "" +"*the linearization of C is the sum of C plus the merge of the linearizations " +"of the parents and the list of the parents.*" +msgstr "" + +#: ../../howto/mro.rst:176 +msgid "In symbolic notation::" +msgstr "" + +#: ../../howto/mro.rst:178 +msgid "L[C(B1 ... BN)] = C + merge(L[B1] ... L[BN], B1 ... BN)" +msgstr "" + +#: ../../howto/mro.rst:180 +msgid "" +"In particular, if C is the ``object`` class, which has no parents, the " +"linearization is trivial::" +msgstr "" + +#: ../../howto/mro.rst:183 +msgid "L[object] = object." +msgstr "" + +#: ../../howto/mro.rst:185 +msgid "" +"However, in general one has to compute the merge according to the following " +"prescription:" +msgstr "" + +#: ../../howto/mro.rst:188 +msgid "" +"*take the head of the first list, i.e L[B1][0]; if this head is not in the " +"tail of any of the other lists, then add it to the linearization of C and " +"remove it from the lists in the merge, otherwise look at the head of the " +"next list and take it, if it is a good head. Then repeat the operation " +"until all the class are removed or it is impossible to find good heads. In " +"this case, it is impossible to construct the merge, Python 2.3 will refuse " +"to create the class C and will raise an exception.*" +msgstr "" + +#: ../../howto/mro.rst:197 +msgid "" +"This prescription ensures that the merge operation *preserves* the ordering, " +"if the ordering can be preserved. On the other hand, if the order cannot be " +"preserved (as in the example of serious order disagreement discussed above) " +"then the merge cannot be computed." +msgstr "" + +#: ../../howto/mro.rst:202 +msgid "" +"The computation of the merge is trivial if C has only one parent (single " +"inheritance); in this case::" +msgstr "" + +#: ../../howto/mro.rst:205 +msgid "L[C(B)] = C + merge(L[B],B) = C + L[B]" +msgstr "" + +#: ../../howto/mro.rst:207 +msgid "" +"However, in the case of multiple inheritance things are more cumbersome and " +"I don't expect you can understand the rule without a couple of examples ;-)" +msgstr "" + +#: ../../howto/mro.rst:212 +msgid "Examples" +msgstr "" + +#: ../../howto/mro.rst:214 +msgid "First example. Consider the following hierarchy:" +msgstr "" + +#: ../../howto/mro.rst:224 +msgid "In this case the inheritance graph can be drawn as:" +msgstr "" + +#: ../../howto/mro.rst:226 +msgid "" +" 6\n" +" ---\n" +"Level 3 | O | (more general)\n" +" / --- \\\n" +" / | \\ |\n" +" / | \\ |\n" +" / | \\ |\n" +" --- --- --- |\n" +"Level 2 3 | D | 4| E | | F | 5 |\n" +" --- --- --- |\n" +" \\ \\ _ / | |\n" +" \\ / \\ _ | |\n" +" \\ / \\ | |\n" +" --- --- |\n" +"Level 1 1 | B | | C | 2 |\n" +" --- --- |\n" +" \\ / |\n" +" \\ / \\ /\n" +" ---\n" +"Level 0 0 | A | (more specialized)\n" +" ---" +msgstr "" + +#: ../../howto/mro.rst:251 +msgid "The linearizations of O,D,E and F are trivial::" +msgstr "" + +#: ../../howto/mro.rst:253 +msgid "" +"L[O] = O\n" +"L[D] = D O\n" +"L[E] = E O\n" +"L[F] = F O" +msgstr "" + +#: ../../howto/mro.rst:258 +msgid "The linearization of B can be computed as::" +msgstr "" + +#: ../../howto/mro.rst:260 +msgid "L[B] = B + merge(DO, EO, DE)" +msgstr "" + +#: ../../howto/mro.rst:262 +msgid "" +"We see that D is a good head, therefore we take it and we are reduced to " +"compute ``merge(O,EO,E)``. Now O is not a good head, since it is in the " +"tail of the sequence EO. In this case the rule says that we have to skip to " +"the next sequence. Then we see that E is a good head; we take it and we are " +"reduced to compute ``merge(O,O)`` which gives O. Therefore::" +msgstr "" + +#: ../../howto/mro.rst:268 +msgid "L[B] = B D E O" +msgstr "" + +#: ../../howto/mro.rst:270 +msgid "Using the same procedure one finds::" +msgstr "" + +#: ../../howto/mro.rst:272 +msgid "" +"L[C] = C + merge(DO,FO,DF)\n" +" = C + D + merge(O,FO,F)\n" +" = C + D + F + merge(O,O)\n" +" = C D F O" +msgstr "" + +#: ../../howto/mro.rst:277 +msgid "Now we can compute::" +msgstr "" + +#: ../../howto/mro.rst:279 +msgid "" +"L[A] = A + merge(BDEO,CDFO,BC)\n" +" = A + B + merge(DEO,CDFO,C)\n" +" = A + B + C + merge(DEO,DFO)\n" +" = A + B + C + D + merge(EO,FO)\n" +" = A + B + C + D + E + merge(O,FO)\n" +" = A + B + C + D + E + F + merge(O,O)\n" +" = A B C D E F O" +msgstr "" + +#: ../../howto/mro.rst:287 +msgid "" +"In this example, the linearization is ordered in a pretty nice way according " +"to the inheritance level, in the sense that lower levels (i.e. more " +"specialized classes) have higher precedence (see the inheritance graph). " +"However, this is not the general case." +msgstr "" + +#: ../../howto/mro.rst:292 +msgid "" +"I leave as an exercise for the reader to compute the linearization for my " +"second example:" +msgstr "" + +#: ../../howto/mro.rst:303 +msgid "" +"The only difference with the previous example is the change B(D,E) --> B(E," +"D); however even such a little modification completely changes the ordering " +"of the hierarchy:" +msgstr "" + +#: ../../howto/mro.rst:307 +msgid "" +" 6\n" +" ---\n" +"Level 3 | O |\n" +" / --- \\\n" +" / | \\\n" +" / | \\\n" +" / | \\\n" +" --- --- ---\n" +"Level 2 2 | E | 4 | D | | F | 5\n" +" --- --- ---\n" +" \\ / \\ /\n" +" \\ / \\ /\n" +" \\ / \\ /\n" +" --- ---\n" +"Level 1 1 | B | | C | 3\n" +" --- ---\n" +" \\ /\n" +" \\ /\n" +" ---\n" +"Level 0 0 | A |\n" +" ---" +msgstr "" + +#: ../../howto/mro.rst:332 +msgid "" +"Notice that the class E, which is in the second level of the hierarchy, " +"precedes the class C, which is in the first level of the hierarchy, i.e. E " +"is more specialized than C, even if it is in a higher level." +msgstr "" + +#: ../../howto/mro.rst:336 +msgid "" +"A lazy programmer can obtain the MRO directly from Python 2.2, since in this " +"case it coincides with the Python 2.3 linearization. It is enough to invoke " +"the :meth:`~type.mro` method of class A:" +msgstr "" + +#: ../../howto/mro.rst:345 +msgid "" +"Finally, let me consider the example discussed in the first section, " +"involving a serious order disagreement. In this case, it is straightforward " +"to compute the linearizations of O, X, Y, A and B:" +msgstr "" + +#: ../../howto/mro.rst:349 +msgid "" +"L[O] = 0\n" +"L[X] = X O\n" +"L[Y] = Y O\n" +"L[A] = A X Y O\n" +"L[B] = B Y X O" +msgstr "" + +#: ../../howto/mro.rst:357 +msgid "" +"However, it is impossible to compute the linearization for a class C that " +"inherits from A and B::" +msgstr "" + +#: ../../howto/mro.rst:360 +msgid "" +"L[C] = C + merge(AXYO, BYXO, AB)\n" +" = C + A + merge(XYO, BYXO, B)\n" +" = C + A + B + merge(XYO, YXO)" +msgstr "" + +#: ../../howto/mro.rst:364 +msgid "" +"At this point we cannot merge the lists XYO and YXO, since X is in the tail " +"of YXO whereas Y is in the tail of XYO: therefore there are no good heads " +"and the C3 algorithm stops. Python 2.3 raises an error and refuses to " +"create the class C." +msgstr "" + +#: ../../howto/mro.rst:370 +msgid "Bad Method Resolution Orders" +msgstr "" + +#: ../../howto/mro.rst:372 +msgid "" +"A MRO is *bad* when it breaks such fundamental properties as local " +"precedence ordering and monotonicity. In this section, I will show that " +"both the MRO for classic classes and the MRO for new style classes in Python " +"2.2 are bad." +msgstr "" + +#: ../../howto/mro.rst:377 +msgid "" +"It is easier to start with the local precedence ordering. Consider the " +"following example:" +msgstr "" + +#: ../../howto/mro.rst:384 +msgid "with inheritance diagram" +msgstr "" + +#: ../../howto/mro.rst:386 +msgid "" +" O\n" +" |\n" +"(buy spam) F\n" +" | \\\n" +" | E (buy eggs)\n" +" | /\n" +" G\n" +"\n" +" (buy eggs or spam ?)" +msgstr "" + +#: ../../howto/mro.rst:399 +msgid "" +"We see that class G inherits from F and E, with F *before* E: therefore we " +"would expect the attribute *G.remember2buy* to be inherited by *F." +"remember2buy* and not by *E.remember2buy*: nevertheless Python 2.2 gives" +msgstr "" + +#: ../../howto/mro.rst:407 +msgid "" +"This is a breaking of local precedence ordering since the order in the local " +"precedence list, i.e. the list of the parents of G, is not preserved in the " +"Python 2.2 linearization of G::" +msgstr "" + +#: ../../howto/mro.rst:411 +msgid "L[G,P22]= G E F object # F *follows* E" +msgstr "" + +#: ../../howto/mro.rst:413 +msgid "" +"One could argue that the reason why F follows E in the Python 2.2 " +"linearization is that F is less specialized than E, since F is the " +"superclass of E; nevertheless the breaking of local precedence ordering is " +"quite non-intuitive and error prone. This is particularly true since it is " +"a different from old style classes:" +msgstr "" + +#: ../../howto/mro.rst:425 +msgid "" +"In this case the MRO is GFEF and the local precedence ordering is preserved." +msgstr "" + +#: ../../howto/mro.rst:428 +msgid "" +"As a general rule, hierarchies such as the previous one should be avoided, " +"since it is unclear if F should override E or vice-versa. Python 2.3 solves " +"the ambiguity by raising an exception in the creation of class G, " +"effectively stopping the programmer from generating ambiguous hierarchies. " +"The reason for that is that the C3 algorithm fails when the merge::" +msgstr "" + +#: ../../howto/mro.rst:435 +msgid "merge(FO,EFO,FE)" +msgstr "" + +#: ../../howto/mro.rst:437 +msgid "" +"cannot be computed, because F is in the tail of EFO and E is in the tail of " +"FE." +msgstr "" + +#: ../../howto/mro.rst:440 +msgid "" +"The real solution is to design a non-ambiguous hierarchy, i.e. to derive G " +"from E and F (the more specific first) and not from F and E; in this case " +"the MRO is GEF without any doubt." +msgstr "" + +#: ../../howto/mro.rst:444 +msgid "" +" O\n" +" |\n" +" F (spam)\n" +" / |\n" +"(eggs) E |\n" +" \\ |\n" +" G\n" +" (eggs, no doubt)" +msgstr "" + +#: ../../howto/mro.rst:456 +msgid "" +"Python 2.3 forces the programmer to write good hierarchies (or, at least, " +"less error-prone ones)." +msgstr "" + +#: ../../howto/mro.rst:459 +msgid "" +"On a related note, let me point out that the Python 2.3 algorithm is smart " +"enough to recognize obvious mistakes, as the duplication of classes in the " +"list of parents:" +msgstr "" + +#: ../../howto/mro.rst:469 +msgid "" +"Python 2.2 (both for classic classes and new style classes) in this " +"situation, would not raise any exception." +msgstr "" + +#: ../../howto/mro.rst:472 +msgid "" +"Finally, I would like to point out two lessons we have learned from this " +"example:" +msgstr "" + +#: ../../howto/mro.rst:475 +msgid "" +"despite the name, the MRO determines the resolution order of attributes, not " +"only of methods;" +msgstr "" + +#: ../../howto/mro.rst:478 +msgid "" +"the default food for Pythonistas is spam ! (but you already knew that ;-)" +msgstr "" + +#: ../../howto/mro.rst:481 +msgid "" +"Having discussed the issue of local precedence ordering, let me now consider " +"the issue of monotonicity. My goal is to show that neither the MRO for " +"classic classes nor that for Python 2.2 new style classes is monotonic." +msgstr "" + +#: ../../howto/mro.rst:486 +msgid "" +"To prove that the MRO for classic classes is non-monotonic is rather " +"trivial, it is enough to look at the diamond diagram:" +msgstr "" + +#: ../../howto/mro.rst:489 +msgid "" +" C\n" +" / \\\n" +" / \\\n" +"A B\n" +" \\ /\n" +" \\ /\n" +" D" +msgstr "" + +#: ../../howto/mro.rst:500 +msgid "One easily discerns the inconsistency::" +msgstr "" + +#: ../../howto/mro.rst:502 +msgid "" +"L[B,P21] = B C # B precedes C : B's methods win\n" +"L[D,P21] = D A C B C # B follows C : C's methods win!" +msgstr "" + +#: ../../howto/mro.rst:505 +msgid "" +"On the other hand, there are no problems with the Python 2.2 and 2.3 MROs, " +"they give both::" +msgstr "" + +#: ../../howto/mro.rst:508 +msgid "L[D] = D A B C" +msgstr "" + +#: ../../howto/mro.rst:510 +msgid "" +"Guido points out in his essay [#]_ that the classic MRO is not so bad in " +"practice, since one can typically avoids diamonds for classic classes. But " +"all new style classes inherit from ``object``, therefore diamonds are " +"unavoidable and inconsistencies shows up in every multiple inheritance graph." +msgstr "" + +#: ../../howto/mro.rst:516 +msgid "" +"The MRO of Python 2.2 makes breaking monotonicity difficult, but not " +"impossible. The following example, originally provided by Samuele Pedroni, " +"shows that the MRO of Python 2.2 is non-monotonic:" +msgstr "" + +#: ../../howto/mro.rst:530 +msgid "" +"Here are the linearizations according to the C3 MRO (the reader should " +"verify these linearizations as an exercise and draw the inheritance " +"diagram ;-) ::" +msgstr "" + +#: ../../howto/mro.rst:534 +msgid "" +"L[A] = A O\n" +"L[B] = B O\n" +"L[C] = C O\n" +"L[D] = D O\n" +"L[E] = E O\n" +"L[K1]= K1 A B C O\n" +"L[K2]= K2 D B E O\n" +"L[K3]= K3 D A O\n" +"L[Z] = Z K1 K2 K3 D A B C E O" +msgstr "" + +#: ../../howto/mro.rst:544 +msgid "" +"Python 2.2 gives exactly the same linearizations for A, B, C, D, E, K1, K2 " +"and K3, but a different linearization for Z::" +msgstr "" + +#: ../../howto/mro.rst:547 +msgid "L[Z,P22] = Z K1 K3 A K2 D B C E O" +msgstr "" + +#: ../../howto/mro.rst:549 +msgid "" +"It is clear that this linearization is *wrong*, since A comes before D " +"whereas in the linearization of K3 A comes *after* D. In other words, in K3 " +"methods derived by D override methods derived by A, but in Z, which still is " +"a subclass of K3, methods derived by A override methods derived by D! This " +"is a violation of monotonicity. Moreover, the Python 2.2 linearization of Z " +"is also inconsistent with local precedence ordering, since the local " +"precedence list of the class Z is [K1, K2, K3] (K2 precedes K3), whereas in " +"the linearization of Z K2 *follows* K3. These problems explain why the 2.2 " +"rule has been dismissed in favor of the C3 rule." +msgstr "" + +#: ../../howto/mro.rst:561 +msgid "The end" +msgstr "" + +#: ../../howto/mro.rst:563 +msgid "" +"This section is for the impatient reader, who skipped all the previous " +"sections and jumped immediately to the end. This section is for the lazy " +"programmer too, who didn't want to exercise her/his brain. Finally, it is " +"for the programmer with some hubris, otherwise s/he would not be reading a " +"paper on the C3 method resolution order in multiple inheritance " +"hierarchies ;-) These three virtues taken all together (and *not* " +"separately) deserve a prize: the prize is a short Python 2.2 script that " +"allows you to compute the 2.3 MRO without risk to your brain. Simply change " +"the last line to play with the various examples I have discussed in this " +"paper.::" +msgstr "" + +#: ../../howto/mro.rst:574 +msgid "" +"#\n" +"\n" +"\"\"\"C3 algorithm by Samuele Pedroni (with readability enhanced by me)." +"\"\"\"\n" +"\n" +"class __metaclass__(type):\n" +" \"All classes are metamagically modified to be nicely printed\"\n" +" __repr__ = lambda cls: cls.__name__\n" +"\n" +"class ex_2:\n" +" \"Serious order disagreement\" #From Guido\n" +" class O: pass\n" +" class X(O): pass\n" +" class Y(O): pass\n" +" class A(X,Y): pass\n" +" class B(Y,X): pass\n" +" try:\n" +" class Z(A,B): pass #creates Z(A,B) in Python 2.2\n" +" except TypeError:\n" +" pass # Z(A,B) cannot be created in Python 2.3\n" +"\n" +"class ex_5:\n" +" \"My first example\"\n" +" class O: pass\n" +" class F(O): pass\n" +" class E(O): pass\n" +" class D(O): pass\n" +" class C(D,F): pass\n" +" class B(D,E): pass\n" +" class A(B,C): pass\n" +"\n" +"class ex_6:\n" +" \"My second example\"\n" +" class O: pass\n" +" class F(O): pass\n" +" class E(O): pass\n" +" class D(O): pass\n" +" class C(D,F): pass\n" +" class B(E,D): pass\n" +" class A(B,C): pass\n" +"\n" +"class ex_9:\n" +" \"Difference between Python 2.2 MRO and C3\" #From Samuele\n" +" class O: pass\n" +" class A(O): pass\n" +" class B(O): pass\n" +" class C(O): pass\n" +" class D(O): pass\n" +" class E(O): pass\n" +" class K1(A,B,C): pass\n" +" class K2(D,B,E): pass\n" +" class K3(D,A): pass\n" +" class Z(K1,K2,K3): pass\n" +"\n" +"def merge(seqs):\n" +" print '\\n\\nCPL[%s]=%s' % (seqs[0][0],seqs),\n" +" res = []; i=0\n" +" while 1:\n" +" nonemptyseqs=[seq for seq in seqs if seq]\n" +" if not nonemptyseqs: return res\n" +" i+=1; print '\\n',i,'round: candidates...',\n" +" for seq in nonemptyseqs: # find merge candidates among seq heads\n" +" cand = seq[0]; print ' ',cand,\n" +" nothead=[s for s in nonemptyseqs if cand in s[1:]]\n" +" if nothead: cand=None #reject candidate\n" +" else: break\n" +" if not cand: raise \"Inconsistent hierarchy\"\n" +" res.append(cand)\n" +" for seq in nonemptyseqs: # remove cand\n" +" if seq[0] == cand: del seq[0]\n" +"\n" +"def mro(C):\n" +" \"Compute the class precedence list (mro) according to C3\"\n" +" return merge([[C]]+map(mro,C.__bases__)+[list(C.__bases__)])\n" +"\n" +"def print_mro(C):\n" +" print '\\nMRO[%s]=%s' % (C,mro(C))\n" +" print '\\nP22 MRO[%s]=%s' % (C,C.mro())\n" +"\n" +"print_mro(ex_9.Z)\n" +"\n" +"#" +msgstr "" + +#: ../../howto/mro.rst:656 +msgid "That's all folks," +msgstr "" + +#: ../../howto/mro.rst:658 +msgid "enjoy !" +msgstr "" + +#: ../../howto/mro.rst:662 +msgid "Resources" +msgstr "" + +#: ../../howto/mro.rst:664 +msgid "" +"The thread on python-dev started by Samuele Pedroni: https://mail.python.org/" +"pipermail/python-dev/2002-October/029035.html" +msgstr "" + +#: ../../howto/mro.rst:667 +msgid "" +"The paper *A Monotonic Superclass Linearization for Dylan*: https://doi." +"org/10.1145/236337.236343" +msgstr "" + +#: ../../howto/mro.rst:670 +msgid "" +"Guido van Rossum's essay, *Unifying types and classes in Python 2.2*: " +"https://web.archive.org/web/20140210194412/http://www.python.org/download/" +"releases/2.2.2/descrintro" +msgstr "" diff --git a/howto/regex.po b/howto/regex.po index 92c537e1..7ddedf6d 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -25,7 +25,7 @@ msgstr "" msgid "Regular expression HOWTO" msgstr "" -#: ../../howto/regex.rst:-1 +#: ../../howto/regex.rst:14 msgid "Abstract" msgstr "" diff --git a/howto/regex.po~ b/howto/regex.po~ new file mode 100644 index 00000000..92c537e1 --- /dev/null +++ b/howto/regex.po~ @@ -0,0 +1,2276 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../howto/regex.rst:5 +msgid "Regular expression HOWTO" +msgstr "" + +#: ../../howto/regex.rst:-1 +msgid "Abstract" +msgstr "" + +#: ../../howto/regex.rst:16 +msgid "" +"This document is an introductory tutorial to using regular expressions in " +"Python with the :mod:`re` module. It provides a gentler introduction than " +"the corresponding section in the Library Reference." +msgstr "" + +#: ../../howto/regex.rst:22 +msgid "Introduction" +msgstr "Einführung" + +#: ../../howto/regex.rst:24 +msgid "" +"Regular expressions (called REs, or regexes, or regex patterns) are " +"essentially a tiny, highly specialized programming language embedded inside " +"Python and made available through the :mod:`re` module. Using this little " +"language, you specify the rules for the set of possible strings that you " +"want to match; this set might contain English sentences, or e-mail " +"addresses, or TeX commands, or anything you like. You can then ask " +"questions such as \"Does this string match the pattern?\", or \"Is there a " +"match for the pattern anywhere in this string?\". You can also use REs to " +"modify a string or to split it apart in various ways." +msgstr "" + +#: ../../howto/regex.rst:33 +msgid "" +"Regular expression patterns are compiled into a series of bytecodes which " +"are then executed by a matching engine written in C. For advanced use, it " +"may be necessary to pay careful attention to how the engine will execute a " +"given RE, and write the RE in a certain way in order to produce bytecode " +"that runs faster. Optimization isn't covered in this document, because it " +"requires that you have a good understanding of the matching engine's " +"internals." +msgstr "" + +#: ../../howto/regex.rst:40 +msgid "" +"The regular expression language is relatively small and restricted, so not " +"all possible string processing tasks can be done using regular expressions. " +"There are also tasks that *can* be done with regular expressions, but the " +"expressions turn out to be very complicated. In these cases, you may be " +"better off writing Python code to do the processing; while Python code will " +"be slower than an elaborate regular expression, it will also probably be " +"more understandable." +msgstr "" + +#: ../../howto/regex.rst:49 +msgid "Simple patterns" +msgstr "" + +#: ../../howto/regex.rst:51 +msgid "" +"We'll start by learning about the simplest possible regular expressions. " +"Since regular expressions are used to operate on strings, we'll begin with " +"the most common task: matching characters." +msgstr "" + +#: ../../howto/regex.rst:55 +msgid "" +"For a detailed explanation of the computer science underlying regular " +"expressions (deterministic and non-deterministic finite automata), you can " +"refer to almost any textbook on writing compilers." +msgstr "" + +#: ../../howto/regex.rst:61 +msgid "Matching characters" +msgstr "" + +#: ../../howto/regex.rst:63 +msgid "" +"Most letters and characters will simply match themselves. For example, the " +"regular expression ``test`` will match the string ``test`` exactly. (You " +"can enable a case-insensitive mode that would let this RE match ``Test`` or " +"``TEST`` as well; more about this later.)" +msgstr "" + +#: ../../howto/regex.rst:68 +msgid "" +"There are exceptions to this rule; some characters are special :dfn:" +"`metacharacters`, and don't match themselves. Instead, they signal that " +"some out-of-the-ordinary thing should be matched, or they affect other " +"portions of the RE by repeating them or changing their meaning. Much of " +"this document is devoted to discussing various metacharacters and what they " +"do." +msgstr "" + +#: ../../howto/regex.rst:74 +msgid "" +"Here's a complete list of the metacharacters; their meanings will be " +"discussed in the rest of this HOWTO." +msgstr "" + +#: ../../howto/regex.rst:77 +msgid ". ^ $ * + ? { } [ ] \\ | ( )" +msgstr "" + +#: ../../howto/regex.rst:81 +msgid "" +"The first metacharacters we'll look at are ``[`` and ``]``. They're used for " +"specifying a character class, which is a set of characters that you wish to " +"match. Characters can be listed individually, or a range of characters can " +"be indicated by giving two characters and separating them by a ``'-'``. For " +"example, ``[abc]`` will match any of the characters ``a``, ``b``, or ``c``; " +"this is the same as ``[a-c]``, which uses a range to express the same set of " +"characters. If you wanted to match only lowercase letters, your RE would be " +"``[a-z]``." +msgstr "" + +#: ../../howto/regex.rst:90 +msgid "" +"Metacharacters (except ``\\``) are not active inside classes. For example, " +"``[akm$]`` will match any of the characters ``'a'``, ``'k'``, ``'m'``, or " +"``'$'``; ``'$'`` is usually a metacharacter, but inside a character class " +"it's stripped of its special nature." +msgstr "" + +#: ../../howto/regex.rst:95 +msgid "" +"You can match the characters not listed within the class by :dfn:" +"`complementing` the set. This is indicated by including a ``'^'`` as the " +"first character of the class. For example, ``[^5]`` will match any character " +"except ``'5'``. If the caret appears elsewhere in a character class, it " +"does not have special meaning. For example: ``[5^]`` will match either a " +"``'5'`` or a ``'^'``." +msgstr "" + +#: ../../howto/regex.rst:101 +msgid "" +"Perhaps the most important metacharacter is the backslash, ``\\``. As in " +"Python string literals, the backslash can be followed by various characters " +"to signal various special sequences. It's also used to escape all the " +"metacharacters so you can still match them in patterns; for example, if you " +"need to match a ``[`` or ``\\``, you can precede them with a backslash to " +"remove their special meaning: ``\\[`` or ``\\\\``." +msgstr "" + +#: ../../howto/regex.rst:108 +msgid "" +"Some of the special sequences beginning with ``'\\'`` represent predefined " +"sets of characters that are often useful, such as the set of digits, the set " +"of letters, or the set of anything that isn't whitespace." +msgstr "" + +#: ../../howto/regex.rst:113 +msgid "" +"Let's take an example: ``\\w`` matches any alphanumeric character. If the " +"regex pattern is expressed in bytes, this is equivalent to the class ``[a-zA-" +"Z0-9_]``. If the regex pattern is a string, ``\\w`` will match all the " +"characters marked as letters in the Unicode database provided by the :mod:" +"`unicodedata` module. You can use the more restricted definition of ``\\w`` " +"in a string pattern by supplying the :const:`re.ASCII` flag when compiling " +"the regular expression." +msgstr "" + +#: ../../howto/regex.rst:121 +msgid "" +"The following list of special sequences isn't complete. For a complete list " +"of sequences and expanded class definitions for Unicode string patterns, see " +"the last part of :ref:`Regular Expression Syntax ` in the " +"Standard Library reference. In general, the Unicode versions match any " +"character that's in the appropriate category in the Unicode database." +msgstr "" + +#: ../../howto/regex.rst:128 +msgid "``\\d``" +msgstr "``\\d``" + +#: ../../howto/regex.rst:129 +msgid "Matches any decimal digit; this is equivalent to the class ``[0-9]``." +msgstr "" + +#: ../../howto/regex.rst:131 +msgid "``\\D``" +msgstr "``\\D``" + +#: ../../howto/regex.rst:132 +msgid "" +"Matches any non-digit character; this is equivalent to the class ``[^0-9]``." +msgstr "" + +#: ../../howto/regex.rst:134 +msgid "``\\s``" +msgstr "" + +#: ../../howto/regex.rst:135 +msgid "" +"Matches any whitespace character; this is equivalent to the class " +"``[ \\t\\n\\r\\f\\v]``." +msgstr "" + +#: ../../howto/regex.rst:138 +msgid "``\\S``" +msgstr "``\\S``" + +#: ../../howto/regex.rst:139 +msgid "" +"Matches any non-whitespace character; this is equivalent to the class ``[^ " +"\\t\\n\\r\\f\\v]``." +msgstr "" + +#: ../../howto/regex.rst:142 +msgid "``\\w``" +msgstr "``\\w``" + +#: ../../howto/regex.rst:143 +msgid "" +"Matches any alphanumeric character; this is equivalent to the class ``[a-zA-" +"Z0-9_]``." +msgstr "" + +#: ../../howto/regex.rst:146 +msgid "``\\W``" +msgstr "" + +#: ../../howto/regex.rst:147 +msgid "" +"Matches any non-alphanumeric character; this is equivalent to the class " +"``[^a-zA-Z0-9_]``." +msgstr "" + +#: ../../howto/regex.rst:150 +msgid "" +"These sequences can be included inside a character class. For example, " +"``[\\s,.]`` is a character class that will match any whitespace character, " +"or ``','`` or ``'.'``." +msgstr "" + +#: ../../howto/regex.rst:154 +msgid "" +"The final metacharacter in this section is ``.``. It matches anything " +"except a newline character, and there's an alternate mode (:const:`re." +"DOTALL`) where it will match even a newline. ``.`` is often used where you " +"want to match \"any character\"." +msgstr "" + +#: ../../howto/regex.rst:161 +msgid "Repeating things" +msgstr "" + +#: ../../howto/regex.rst:163 +msgid "" +"Being able to match varying sets of characters is the first thing regular " +"expressions can do that isn't already possible with the methods available on " +"strings. However, if that was the only additional capability of regexes, " +"they wouldn't be much of an advance. Another capability is that you can " +"specify that portions of the RE must be repeated a certain number of times." +msgstr "" + +#: ../../howto/regex.rst:169 +msgid "" +"The first metacharacter for repeating things that we'll look at is ``*``. " +"``*`` doesn't match the literal character ``'*'``; instead, it specifies " +"that the previous character can be matched zero or more times, instead of " +"exactly once." +msgstr "" + +#: ../../howto/regex.rst:173 +msgid "" +"For example, ``ca*t`` will match ``'ct'`` (0 ``'a'`` characters), ``'cat'`` " +"(1 ``'a'``), ``'caaat'`` (3 ``'a'`` characters), and so forth." +msgstr "" + +#: ../../howto/regex.rst:176 +msgid "" +"Repetitions such as ``*`` are :dfn:`greedy`; when repeating a RE, the " +"matching engine will try to repeat it as many times as possible. If later " +"portions of the pattern don't match, the matching engine will then back up " +"and try again with fewer repetitions." +msgstr "" + +#: ../../howto/regex.rst:181 +msgid "" +"A step-by-step example will make this more obvious. Let's consider the " +"expression ``a[bcd]*b``. This matches the letter ``'a'``, zero or more " +"letters from the class ``[bcd]``, and finally ends with a ``'b'``. Now " +"imagine matching this RE against the string ``'abcbd'``." +msgstr "" + +#: ../../howto/regex.rst:187 +msgid "Step" +msgstr "" + +#: ../../howto/regex.rst:187 +msgid "Matched" +msgstr "" + +#: ../../howto/regex.rst:187 +msgid "Explanation" +msgstr "" + +#: ../../howto/regex.rst:189 +msgid "1" +msgstr "" + +#: ../../howto/regex.rst:189 +msgid "``a``" +msgstr "``a``" + +#: ../../howto/regex.rst:189 +msgid "The ``a`` in the RE matches." +msgstr "" + +#: ../../howto/regex.rst:191 +msgid "2" +msgstr "" + +#: ../../howto/regex.rst:191 +msgid "``abcbd``" +msgstr "``abcbd``" + +#: ../../howto/regex.rst:191 +msgid "" +"The engine matches ``[bcd]*``, going as far as it can, which is to the end " +"of the string." +msgstr "" + +#: ../../howto/regex.rst:195 +msgid "3" +msgstr "" + +#: ../../howto/regex.rst:195 ../../howto/regex.rst:203 +msgid "*Failure*" +msgstr "" + +#: ../../howto/regex.rst:195 +msgid "" +"The engine tries to match ``b``, but the current position is at the end of " +"the string, so it fails." +msgstr "" + +#: ../../howto/regex.rst:200 +msgid "4" +msgstr "" + +#: ../../howto/regex.rst:200 ../../howto/regex.rst:211 +msgid "``abcb``" +msgstr "" + +#: ../../howto/regex.rst:200 +msgid "Back up, so that ``[bcd]*`` matches one less character." +msgstr "" + +#: ../../howto/regex.rst:203 +msgid "5" +msgstr "" + +#: ../../howto/regex.rst:203 +msgid "" +"Try ``b`` again, but the current position is at the last character, which is " +"a ``'d'``." +msgstr "" + +#: ../../howto/regex.rst:207 +msgid "6" +msgstr "" + +#: ../../howto/regex.rst:207 +msgid "``abc``" +msgstr "``abc``" + +#: ../../howto/regex.rst:207 +msgid "Back up again, so that ``[bcd]*`` is only matching ``bc``." +msgstr "" + +#: ../../howto/regex.rst:211 +msgid "7" +msgstr "" + +#: ../../howto/regex.rst:211 +msgid "" +"Try ``b`` again. This time the character at the current position is " +"``'b'``, so it succeeds." +msgstr "" + +#: ../../howto/regex.rst:217 +msgid "" +"The end of the RE has now been reached, and it has matched ``'abcb'``. This " +"demonstrates how the matching engine goes as far as it can at first, and if " +"no match is found it will then progressively back up and retry the rest of " +"the RE again and again. It will back up until it has tried zero matches for " +"``[bcd]*``, and if that subsequently fails, the engine will conclude that " +"the string doesn't match the RE at all." +msgstr "" + +#: ../../howto/regex.rst:224 +msgid "" +"Another repeating metacharacter is ``+``, which matches one or more times. " +"Pay careful attention to the difference between ``*`` and ``+``; ``*`` " +"matches *zero* or more times, so whatever's being repeated may not be " +"present at all, while ``+`` requires at least *one* occurrence. To use a " +"similar example, ``ca+t`` will match ``'cat'`` (1 ``'a'``), ``'caaat'`` (3 " +"``'a'``\\ s), but won't match ``'ct'``." +msgstr "" + +#: ../../howto/regex.rst:231 +msgid "" +"There are two more repeating operators or quantifiers. The question mark " +"character, ``?``, matches either once or zero times; you can think of it as " +"marking something as being optional. For example, ``home-?brew`` matches " +"either ``'homebrew'`` or ``'home-brew'``." +msgstr "" + +#: ../../howto/regex.rst:236 +msgid "" +"The most complicated quantifier is ``{m,n}``, where *m* and *n* are decimal " +"integers. This quantifier means there must be at least *m* repetitions, and " +"at most *n*. For example, ``a/{1,3}b`` will match ``'a/b'``, ``'a//b'``, " +"and ``'a///b'``. It won't match ``'ab'``, which has no slashes, or ``'a////" +"b'``, which has four." +msgstr "" + +#: ../../howto/regex.rst:242 +msgid "" +"You can omit either *m* or *n*; in that case, a reasonable value is assumed " +"for the missing value. Omitting *m* is interpreted as a lower limit of 0, " +"while omitting *n* results in an upper bound of infinity." +msgstr "" + +#: ../../howto/regex.rst:246 +msgid "" +"The simplest case ``{m}`` matches the preceding item exactly *m* times. For " +"example, ``a/{2}b`` will only match ``'a//b'``." +msgstr "" + +#: ../../howto/regex.rst:249 +msgid "" +"Readers of a reductionist bent may notice that the three other quantifiers " +"can all be expressed using this notation. ``{0,}`` is the same as ``*``, " +"``{1,}`` is equivalent to ``+``, and ``{0,1}`` is the same as ``?``. It's " +"better to use ``*``, ``+``, or ``?`` when you can, simply because they're " +"shorter and easier to read." +msgstr "" + +#: ../../howto/regex.rst:257 +msgid "Using regular expressions" +msgstr "" + +#: ../../howto/regex.rst:259 +msgid "" +"Now that we've looked at some simple regular expressions, how do we actually " +"use them in Python? The :mod:`re` module provides an interface to the " +"regular expression engine, allowing you to compile REs into objects and then " +"perform matches with them." +msgstr "" + +#: ../../howto/regex.rst:266 +msgid "Compiling regular expressions" +msgstr "" + +#: ../../howto/regex.rst:268 +msgid "" +"Regular expressions are compiled into pattern objects, which have methods " +"for various operations such as searching for pattern matches or performing " +"string substitutions. ::" +msgstr "" + +#: ../../howto/regex.rst:272 +msgid "" +">>> import re\n" +">>> p = re.compile('ab*')\n" +">>> p\n" +"re.compile('ab*')" +msgstr "" + +#: ../../howto/regex.rst:277 +msgid "" +":func:`re.compile` also accepts an optional *flags* argument, used to enable " +"various special features and syntax variations. We'll go over the available " +"settings later, but for now a single example will do::" +msgstr "" + +#: ../../howto/regex.rst:281 +msgid ">>> p = re.compile('ab*', re.IGNORECASE)" +msgstr "" + +#: ../../howto/regex.rst:283 +msgid "" +"The RE is passed to :func:`re.compile` as a string. REs are handled as " +"strings because regular expressions aren't part of the core Python language, " +"and no special syntax was created for expressing them. (There are " +"applications that don't need REs at all, so there's no need to bloat the " +"language specification by including them.) Instead, the :mod:`re` module is " +"simply a C extension module included with Python, just like the :mod:" +"`socket` or :mod:`zlib` modules." +msgstr "" + +#: ../../howto/regex.rst:290 +msgid "" +"Putting REs in strings keeps the Python language simpler, but has one " +"disadvantage which is the topic of the next section." +msgstr "" + +#: ../../howto/regex.rst:297 +msgid "The backslash plague" +msgstr "" + +#: ../../howto/regex.rst:299 +msgid "" +"As stated earlier, regular expressions use the backslash character " +"(``'\\'``) to indicate special forms or to allow special characters to be " +"used without invoking their special meaning. This conflicts with Python's " +"usage of the same character for the same purpose in string literals." +msgstr "" + +#: ../../howto/regex.rst:304 +msgid "" +"Let's say you want to write a RE that matches the string ``\\section``, " +"which might be found in a LaTeX file. To figure out what to write in the " +"program code, start with the desired string to be matched. Next, you must " +"escape any backslashes and other metacharacters by preceding them with a " +"backslash, resulting in the string ``\\\\section``. The resulting string " +"that must be passed to :func:`re.compile` must be ``\\\\section``. However, " +"to express this as a Python string literal, both backslashes must be escaped " +"*again*." +msgstr "" + +#: ../../howto/regex.rst:313 +msgid "Characters" +msgstr "" + +#: ../../howto/regex.rst:313 +msgid "Stage" +msgstr "" + +#: ../../howto/regex.rst:315 +msgid "``\\section``" +msgstr "" + +#: ../../howto/regex.rst:315 +msgid "Text string to be matched" +msgstr "" + +#: ../../howto/regex.rst:317 +msgid "``\\\\section``" +msgstr "" + +#: ../../howto/regex.rst:317 +msgid "Escaped backslash for :func:`re.compile`" +msgstr "" + +#: ../../howto/regex.rst:319 ../../howto/regex.rst:346 +msgid "``\"\\\\\\\\section\"``" +msgstr "" + +#: ../../howto/regex.rst:319 +msgid "Escaped backslashes for a string literal" +msgstr "" + +#: ../../howto/regex.rst:322 +msgid "" +"In short, to match a literal backslash, one has to write ``'\\\\\\\\'`` as " +"the RE string, because the regular expression must be ``\\\\``, and each " +"backslash must be expressed as ``\\\\`` inside a regular Python string " +"literal. In REs that feature backslashes repeatedly, this leads to lots of " +"repeated backslashes and makes the resulting strings difficult to understand." +msgstr "" + +#: ../../howto/regex.rst:328 +msgid "" +"The solution is to use Python's raw string notation for regular expressions; " +"backslashes are not handled in any special way in a string literal prefixed " +"with ``'r'``, so ``r\"\\n\"`` is a two-character string containing ``'\\'`` " +"and ``'n'``, while ``\"\\n\"`` is a one-character string containing a " +"newline. Regular expressions will often be written in Python code using this " +"raw string notation." +msgstr "" + +#: ../../howto/regex.rst:334 +msgid "" +"In addition, special escape sequences that are valid in regular expressions, " +"but not valid as Python string literals, now result in a :exc:" +"`SyntaxWarning` and will eventually become a :exc:`SyntaxError`, which means " +"the sequences will be invalid if raw string notation or escaping the " +"backslashes isn't used." +msgstr "" + +#: ../../howto/regex.rst:342 +msgid "Regular String" +msgstr "" + +#: ../../howto/regex.rst:342 +msgid "Raw string" +msgstr "" + +#: ../../howto/regex.rst:344 +msgid "``\"ab*\"``" +msgstr "``\"ab*\"``" + +#: ../../howto/regex.rst:344 +msgid "``r\"ab*\"``" +msgstr "" + +#: ../../howto/regex.rst:346 +msgid "``r\"\\\\section\"``" +msgstr "" + +#: ../../howto/regex.rst:348 +msgid "``\"\\\\w+\\\\s+\\\\1\"``" +msgstr "``\"\\\\w+\\\\s+\\\\1\"``" + +#: ../../howto/regex.rst:348 +msgid "``r\"\\w+\\s+\\1\"``" +msgstr "``r\"\\w+\\s+\\1\"``" + +#: ../../howto/regex.rst:353 +msgid "Performing matches" +msgstr "" + +#: ../../howto/regex.rst:355 +msgid "" +"Once you have an object representing a compiled regular expression, what do " +"you do with it? Pattern objects have several methods and attributes. Only " +"the most significant ones will be covered here; consult the :mod:`re` docs " +"for a complete listing." +msgstr "" + +#: ../../howto/regex.rst:361 ../../howto/regex.rst:416 +#: ../../howto/regex.rst:1072 +msgid "Method/Attribute" +msgstr "" + +#: ../../howto/regex.rst:361 ../../howto/regex.rst:416 +#: ../../howto/regex.rst:1072 +msgid "Purpose" +msgstr "" + +#: ../../howto/regex.rst:363 +msgid "``search()``" +msgstr "``search()``" + +#: ../../howto/regex.rst:363 +msgid "Scan through a string, looking for any location where this RE matches." +msgstr "" + +#: ../../howto/regex.rst:366 +#, fuzzy +msgid "``prefixmatch()``" +msgstr "``search()``" + +#: ../../howto/regex.rst:366 +msgid "" +"Determine if the RE matches at the beginning of the string. Previously " +"named :ref:`match() `." +msgstr "" + +#: ../../howto/regex.rst:370 +msgid "``findall()``" +msgstr "``findall()``" + +#: ../../howto/regex.rst:370 +msgid "Find all substrings where the RE matches, and return them as a list." +msgstr "" + +#: ../../howto/regex.rst:373 +msgid "``finditer()``" +msgstr "``finditer()``" + +#: ../../howto/regex.rst:373 +msgid "" +"Find all substrings where the RE matches, and return them as an :term:" +"`iterator`." +msgstr "" + +#: ../../howto/regex.rst:377 +msgid "" +":meth:`~re.Pattern.search` and :meth:`~re.Pattern.prefixmatch` return " +"``None`` if no match can be found. If they're successful, a :ref:`match " +"object ` instance is returned, containing information about " +"the match: where it starts and ends, the substring it matched, and more." +msgstr "" + +#: ../../howto/regex.rst:382 +msgid "" +"You can learn about this by interactively experimenting with the :mod:`re` " +"module." +msgstr "" + +#: ../../howto/regex.rst:385 +msgid "" +"This HOWTO uses the standard Python interpreter for its examples. First, run " +"the Python interpreter, import the :mod:`re` module, and compile a RE::" +msgstr "" + +#: ../../howto/regex.rst:388 +msgid "" +">>> import re\n" +">>> p = re.compile('[a-z]+')\n" +">>> p\n" +"re.compile('[a-z]+')" +msgstr "" + +#: ../../howto/regex.rst:393 +msgid "" +"Now, you can try matching various strings against the RE ``[a-z]+``. An " +"empty string shouldn't match at all, since ``+`` means 'one or more " +"repetitions'. :meth:`~re.Pattern.search` should return ``None`` in this " +"case, which will cause the interpreter to print no output. You can " +"explicitly print the result of :meth:`!search` to make this clear. ::" +msgstr "" + +#: ../../howto/regex.rst:399 +msgid "" +">>> p.search(\"\")\n" +">>> print(p.search(\"\"))\n" +"None" +msgstr "" + +#: ../../howto/regex.rst:403 +msgid "" +"Now, let's try it on a string that it should match, such as ``tempo``. In " +"this case, :meth:`~re.Pattern.search` will return a :ref:`match object " +"`, so you should store the result in a variable for later " +"use. ::" +msgstr "" + +#: ../../howto/regex.rst:407 +msgid "" +">>> m = p.search('tempo')\n" +">>> m\n" +"" +msgstr "" + +#: ../../howto/regex.rst:411 +msgid "" +"Now you can query the :ref:`match object ` for information " +"about the matching string. Match object instances also have several methods " +"and attributes; the most important ones are:" +msgstr "" + +#: ../../howto/regex.rst:418 +msgid "``group()``" +msgstr "``group()``" + +#: ../../howto/regex.rst:418 +msgid "Return the string matched by the RE" +msgstr "" + +#: ../../howto/regex.rst:420 +msgid "``start()``" +msgstr "" + +#: ../../howto/regex.rst:420 +msgid "Return the starting position of the match" +msgstr "" + +#: ../../howto/regex.rst:422 +msgid "``end()``" +msgstr "``end()``" + +#: ../../howto/regex.rst:422 +msgid "Return the ending position of the match" +msgstr "" + +#: ../../howto/regex.rst:424 +msgid "``span()``" +msgstr "" + +#: ../../howto/regex.rst:424 +msgid "Return a tuple containing the (start, end) positions of the match" +msgstr "" + +#: ../../howto/regex.rst:428 +msgid "Trying these methods will soon clarify their meaning::" +msgstr "" + +#: ../../howto/regex.rst:430 +msgid "" +">>> m.group()\n" +"'tempo'\n" +">>> m.start(), m.end()\n" +"(0, 5)\n" +">>> m.span()\n" +"(0, 5)" +msgstr "" + +#: ../../howto/regex.rst:437 +msgid "" +":meth:`~re.Match.group` returns the substring that was matched by the RE. :" +"meth:`~re.Match.start` and :meth:`~re.Match.end` return the starting and " +"ending index of the match. :meth:`~re.Match.span` returns both start and end " +"indexes in a single tuple. The :meth:`~re.Pattern.search` method of patterns " +"scans through the string, so the match may not start at zero. However, the :" +"meth:`~re.Pattern.prefixmatch` method only checks if the RE matches at the " +"start of a string, so :meth:`!start` will always be zero in that case. ::" +msgstr "" + +#: ../../howto/regex.rst:446 +msgid "" +">>> m = p.search('::: message'); print(m)\n" +"\n" +">>> m.group()\n" +"'message'\n" +">>> m.span()\n" +"(4, 11)\n" +">>> print(p.prefixmatch('::: message'))\n" +"None" +msgstr "" + +#: ../../howto/regex.rst:455 +msgid "" +"In actual programs, the most common style is to store the :ref:`match object " +"` in a variable, and then check if it was ``None``. This " +"usually looks like::" +msgstr "" + +#: ../../howto/regex.rst:459 +msgid "" +"p = re.compile( ... )\n" +"m = p.search( 'string goes here' )\n" +"if m:\n" +" print('Match found: ', m.group())\n" +"else:\n" +" print('No match')" +msgstr "" + +#: ../../howto/regex.rst:466 +msgid "" +"Two pattern methods return all of the matches for a pattern. :meth:`~re." +"Pattern.findall` returns a list of matching strings::" +msgstr "" + +#: ../../howto/regex.rst:469 +msgid "" +">>> p = re.compile(r'\\d+')\n" +">>> p.findall('12 drummers drumming, 11 pipers piping, 10 lords a-leaping')\n" +"['12', '11', '10']" +msgstr "" + +#: ../../howto/regex.rst:473 +msgid "" +"The ``r`` prefix, making the literal a raw string literal, is needed in this " +"example because escape sequences in a normal \"cooked\" string literal that " +"are not recognized by Python, as opposed to regular expressions, now result " +"in a :exc:`SyntaxWarning` and will eventually become a :exc:`SyntaxError`. " +"See :ref:`the-backslash-plague`." +msgstr "" + +#: ../../howto/regex.rst:479 +msgid "" +":meth:`~re.Pattern.findall` has to create the entire list before it can be " +"returned as the result. The :meth:`~re.Pattern.finditer` method returns a " +"sequence of :ref:`match object ` instances as an :term:" +"`iterator`::" +msgstr "" + +#: ../../howto/regex.rst:483 +msgid "" +">>> iterator = p.finditer('12 drummers drumming, 11 ... 10 ...')\n" +">>> iterator\n" +"\n" +">>> for match in iterator:\n" +"... print(match.span())\n" +"...\n" +"(0, 2)\n" +"(22, 24)\n" +"(29, 31)" +msgstr "" + +#: ../../howto/regex.rst:495 +msgid "Module-level functions" +msgstr "" + +#: ../../howto/regex.rst:497 +msgid "" +"You don't have to create a pattern object and call its methods; the :mod:" +"`re` module also provides top-level functions called :func:`~re.search`, :" +"func:`~re.prefixmatch`, :func:`~re.findall`, :func:`~re.sub`, and so forth. " +"These functions take the same arguments as the corresponding pattern method " +"with the RE string added as the first argument, and still return either " +"``None`` or a :ref:`match object ` instance. ::" +msgstr "" + +#: ../../howto/regex.rst:504 +msgid "" +">>> print(re.prefixmatch(r'From\\s+', 'Fromage amk'))\n" +"None\n" +">>> re.prefixmatch(r'From\\s+', 'From amk Thu May 14 19:12:10 1998')\n" +"" +msgstr "" + +#: ../../howto/regex.rst:509 +msgid "" +"Under the hood, these functions simply create a pattern object for you and " +"call the appropriate method on it. They also store the compiled object in a " +"cache, so future calls using the same RE won't need to parse the pattern " +"again and again." +msgstr "" + +#: ../../howto/regex.rst:514 +msgid "" +"Should you use these module-level functions, or should you get the pattern " +"and call its methods yourself? If you're accessing a regex within a loop, " +"pre-compiling it will save a few function calls. Outside of loops, there's " +"not much difference thanks to the internal cache." +msgstr "" + +#: ../../howto/regex.rst:522 +msgid "Compilation flags" +msgstr "" + +#: ../../howto/regex.rst:526 +msgid "" +"Compilation flags let you modify some aspects of how regular expressions " +"work. Flags are available in the :mod:`re` module under two names, a long " +"name such as :const:`IGNORECASE` and a short, one-letter form such as :const:" +"`I`. (If you're familiar with Perl's pattern modifiers, the one-letter " +"forms use the same letters; the short form of :const:`re.VERBOSE` is :const:" +"`re.X`, for example.) Multiple flags can be specified by bitwise OR-ing " +"them; ``re.I | re.M`` sets both the :const:`I` and :const:`M` flags, for " +"example." +msgstr "" + +#: ../../howto/regex.rst:534 +msgid "" +"Here's a table of the available flags, followed by a more detailed " +"explanation of each one." +msgstr "" + +#: ../../howto/regex.rst:538 +msgid "Flag" +msgstr "" + +#: ../../howto/regex.rst:538 +msgid "Meaning" +msgstr "" + +#: ../../howto/regex.rst:540 +msgid ":const:`ASCII`, :const:`A`" +msgstr "" + +#: ../../howto/regex.rst:540 +msgid "" +"Makes several escapes like ``\\w``, ``\\b``, ``\\s`` and ``\\d`` match only " +"on ASCII characters with the respective property." +msgstr "" + +#: ../../howto/regex.rst:544 +msgid ":const:`DOTALL`, :const:`S`" +msgstr "" + +#: ../../howto/regex.rst:544 +msgid "Make ``.`` match any character, including newlines." +msgstr "" + +#: ../../howto/regex.rst:547 +msgid ":const:`IGNORECASE`, :const:`I`" +msgstr "" + +#: ../../howto/regex.rst:547 +msgid "Do case-insensitive matches." +msgstr "" + +#: ../../howto/regex.rst:549 +msgid ":const:`LOCALE`, :const:`L`" +msgstr "" + +#: ../../howto/regex.rst:549 +msgid "Do a locale-aware match." +msgstr "" + +#: ../../howto/regex.rst:551 +msgid ":const:`MULTILINE`, :const:`M`" +msgstr "" + +#: ../../howto/regex.rst:551 +msgid "Multi-line matching, affecting ``^`` and ``$``." +msgstr "" + +#: ../../howto/regex.rst:554 +msgid ":const:`VERBOSE`, :const:`X` (for 'extended')" +msgstr "" + +#: ../../howto/regex.rst:554 +msgid "" +"Enable verbose REs, which can be organized more cleanly and understandably." +msgstr "" + +#: ../../howto/regex.rst:563 +msgid "" +"Perform case-insensitive matching; character class and literal strings will " +"match letters by ignoring case. For example, ``[A-Z]`` will match lowercase " +"letters, too. Full Unicode matching also works unless the :const:`ASCII` " +"flag is used to disable non-ASCII matches. When the Unicode patterns ``[a-" +"z]`` or ``[A-Z]`` are used in combination with the :const:`IGNORECASE` flag, " +"they will match the 52 ASCII letters and 4 additional non-ASCII letters: " +"'İ' (U+0130, Latin capital letter I with dot above), 'ı' (U+0131, Latin " +"small letter dotless i), 'ſ' (U+017F, Latin small letter long s) and " +"'K' (U+212A, Kelvin sign). ``Spam`` will match ``'Spam'``, ``'spam'``, " +"``'spAM'``, or ``'ſpam'`` (the latter is matched only in Unicode mode). This " +"lowercasing doesn't take the current locale into account; it will if you " +"also set the :const:`LOCALE` flag." +msgstr "" + +#: ../../howto/regex.rst:581 +msgid "" +"Make ``\\w``, ``\\W``, ``\\b``, ``\\B`` and case-insensitive matching " +"dependent on the current locale instead of the Unicode database." +msgstr "" + +#: ../../howto/regex.rst:584 +msgid "" +"Locales are a feature of the C library intended to help in writing programs " +"that take account of language differences. For example, if you're " +"processing encoded French text, you'd want to be able to write ``\\w+`` to " +"match words, but ``\\w`` only matches the character class ``[A-Za-z]`` in " +"bytes patterns; it won't match bytes corresponding to ``é`` or ``ç``. If " +"your system is configured properly and a French locale is selected, certain " +"C functions will tell the program that the byte corresponding to ``é`` " +"should also be considered a letter. Setting the :const:`LOCALE` flag when " +"compiling a regular expression will cause the resulting compiled object to " +"use these C functions for ``\\w``; this is slower, but also enables ``\\w+`` " +"to match French words as you'd expect. The use of this flag is discouraged " +"in Python 3 as the locale mechanism is very unreliable, it only handles one " +"\"culture\" at a time, and it only works with 8-bit locales. Unicode " +"matching is already enabled by default in Python 3 for Unicode (str) " +"patterns, and it is able to handle different locales/languages." +msgstr "" + +#: ../../howto/regex.rst:606 +msgid "" +"(``^`` and ``$`` haven't been explained yet; they'll be introduced in " +"section :ref:`more-metacharacters`.)" +msgstr "" + +#: ../../howto/regex.rst:609 +msgid "" +"Usually ``^`` matches only at the beginning of the string, and ``$`` matches " +"only at the end of the string and immediately before the newline (if any) at " +"the end of the string. When this flag is specified, ``^`` matches at the " +"beginning of the string and at the beginning of each line within the string, " +"immediately following each newline. Similarly, the ``$`` metacharacter " +"matches either at the end of the string and at the end of each line " +"(immediately preceding each newline)." +msgstr "" + +#: ../../howto/regex.rst:622 +msgid "" +"Makes the ``'.'`` special character match any character at all, including a " +"newline; without this flag, ``'.'`` will match anything *except* a newline." +msgstr "" + +#: ../../howto/regex.rst:630 +msgid "" +"Make ``\\w``, ``\\W``, ``\\b``, ``\\B``, ``\\s`` and ``\\S`` perform ASCII-" +"only matching instead of full Unicode matching. This is only meaningful for " +"Unicode patterns, and is ignored for byte patterns." +msgstr "" + +#: ../../howto/regex.rst:639 +msgid "" +"This flag allows you to write regular expressions that are more readable by " +"granting you more flexibility in how you can format them. When this flag " +"has been specified, whitespace within the RE string is ignored, except when " +"the whitespace is in a character class or preceded by an unescaped " +"backslash; this lets you organize and indent the RE more clearly. This flag " +"also lets you put comments within a RE that will be ignored by the engine; " +"comments are marked by a ``'#'`` that's neither in a character class nor " +"preceded by an unescaped backslash." +msgstr "" + +#: ../../howto/regex.rst:648 +msgid "" +"For example, here's a RE that uses :const:`re.VERBOSE`; see how much easier " +"it is to read? ::" +msgstr "" + +#: ../../howto/regex.rst:651 +msgid "" +"charref = re.compile(r\"\"\"\n" +" &[#] # Start of a numeric entity reference\n" +" (\n" +" 0[0-7]+ # Octal form\n" +" | [0-9]+ # Decimal form\n" +" | x[0-9a-fA-F]+ # Hexadecimal form\n" +" )\n" +" ; # Trailing semicolon\n" +"\"\"\", re.VERBOSE)" +msgstr "" + +#: ../../howto/regex.rst:661 +msgid "Without the verbose setting, the RE would look like this::" +msgstr "" + +#: ../../howto/regex.rst:663 +msgid "" +"charref = re.compile(\"&#(0[0-7]+\"\n" +" \"|[0-9]+\"\n" +" \"|x[0-9a-fA-F]+);\")" +msgstr "" + +#: ../../howto/regex.rst:667 +msgid "" +"In the above example, Python's automatic concatenation of string literals " +"has been used to break up the RE into smaller pieces, but it's still more " +"difficult to understand than the version using :const:`re.VERBOSE`." +msgstr "" + +#: ../../howto/regex.rst:673 +msgid "More pattern power" +msgstr "" + +#: ../../howto/regex.rst:675 +msgid "" +"So far we've only covered a part of the features of regular expressions. In " +"this section, we'll cover some new metacharacters, and how to use groups to " +"retrieve portions of the text that was matched." +msgstr "" + +#: ../../howto/regex.rst:683 +msgid "More metacharacters" +msgstr "" + +#: ../../howto/regex.rst:685 +msgid "" +"There are some metacharacters that we haven't covered yet. Most of them " +"will be covered in this section." +msgstr "" + +#: ../../howto/regex.rst:688 +msgid "" +"Some of the remaining metacharacters to be discussed are :dfn:`zero-width " +"assertions`. They don't cause the engine to advance through the string; " +"instead, they consume no characters at all, and simply succeed or fail. For " +"example, ``\\b`` is an assertion that the current position is located at a " +"word boundary; the position isn't changed by the ``\\b`` at all. This means " +"that zero-width assertions should never be repeated, because if they match " +"once at a given location, they can obviously be matched an infinite number " +"of times." +msgstr "" + +#: ../../howto/regex.rst:696 +msgid "``|``" +msgstr "``|``" + +#: ../../howto/regex.rst:697 +msgid "" +"Alternation, or the \"or\" operator. If *A* and *B* are regular " +"expressions, ``A|B`` will match any string that matches either *A* or *B*. " +"``|`` has very low precedence in order to make it work reasonably when " +"you're alternating multi-character strings. ``Crow|Servo`` will match either " +"``'Crow'`` or ``'Servo'``, not ``'Cro'``, a ``'w'`` or an ``'S'``, and " +"``'ervo'``." +msgstr "" + +#: ../../howto/regex.rst:703 +msgid "" +"To match a literal ``'|'``, use ``\\|``, or enclose it inside a character " +"class, as in ``[|]``." +msgstr "" + +#: ../../howto/regex.rst:706 +msgid "``^``" +msgstr "``^``" + +#: ../../howto/regex.rst:707 +msgid "" +"Matches at the beginning of lines. Unless the :const:`MULTILINE` flag has " +"been set, this will only match at the beginning of the string. In :const:" +"`MULTILINE` mode, this also matches immediately after each newline within " +"the string." +msgstr "" + +#: ../../howto/regex.rst:711 +msgid "" +"For example, if you wish to match the word ``From`` only at the beginning of " +"a line, the RE to use is ``^From``. ::" +msgstr "" + +#: ../../howto/regex.rst:714 +msgid "" +">>> print(re.search('^From', 'From Here to Eternity'))\n" +"\n" +">>> print(re.search('^From', 'Reciting From Memory'))\n" +"None" +msgstr "" + +#: ../../howto/regex.rst:719 +msgid "To match a literal ``'^'``, use ``\\^``." +msgstr "" + +#: ../../howto/regex.rst:721 +msgid "``$``" +msgstr "``$``" + +#: ../../howto/regex.rst:722 +msgid "" +"Matches at the end of a line, which is defined as either the end of the " +"string, or any location followed by a newline character. ::" +msgstr "" + +#: ../../howto/regex.rst:725 +msgid "" +">>> print(re.search('}$', '{block}'))\n" +"\n" +">>> print(re.search('}$', '{block} '))\n" +"None\n" +">>> print(re.search('}$', '{block}\\n'))\n" +"" +msgstr "" + +#: ../../howto/regex.rst:732 +msgid "" +"To match a literal ``'$'``, use ``\\$`` or enclose it inside a character " +"class, as in ``[$]``." +msgstr "" + +#: ../../howto/regex.rst:735 +msgid "``\\A``" +msgstr "``\\A``" + +#: ../../howto/regex.rst:736 +msgid "" +"Matches only at the start of the string. When not in :const:`MULTILINE` " +"mode, ``\\A`` and ``^`` are effectively the same. In :const:`MULTILINE` " +"mode, they're different: ``\\A`` still matches only at the beginning of the " +"string, but ``^`` may match at any location inside the string that follows a " +"newline character." +msgstr "" + +#: ../../howto/regex.rst:741 +msgid "``\\z``" +msgstr "" + +#: ../../howto/regex.rst:742 +msgid "Matches only at the end of the string." +msgstr "" + +#: ../../howto/regex.rst:744 +msgid "``\\Z``" +msgstr "" + +#: ../../howto/regex.rst:745 +msgid "The same as ``\\z``. For compatibility with old Python versions." +msgstr "" + +#: ../../howto/regex.rst:747 +msgid "``\\b``" +msgstr "``\\b``" + +#: ../../howto/regex.rst:748 +msgid "" +"Word boundary. This is a zero-width assertion that matches only at the " +"beginning or end of a word. A word is defined as a sequence of alphanumeric " +"characters, so the end of a word is indicated by whitespace or a non-" +"alphanumeric character." +msgstr "" + +#: ../../howto/regex.rst:753 +msgid "" +"The following example matches ``class`` only when it's a complete word; it " +"won't match when it's contained inside another word. ::" +msgstr "" + +#: ../../howto/regex.rst:756 +msgid "" +">>> p = re.compile(r'\\bclass\\b')\n" +">>> print(p.search('no class at all'))\n" +"\n" +">>> print(p.search('the declassified algorithm'))\n" +"None\n" +">>> print(p.search('one subclass is'))\n" +"None" +msgstr "" + +#: ../../howto/regex.rst:764 +msgid "" +"There are two subtleties you should remember when using this special " +"sequence. First, this is the worst collision between Python's string " +"literals and regular expression sequences. In Python's string literals, " +"``\\b`` is the backspace character, ASCII value 8. If you're not using raw " +"strings, then Python will convert the ``\\b`` to a backspace, and your RE " +"won't match as you expect it to. The following example looks the same as our " +"previous RE, but omits the ``'r'`` in front of the RE string. ::" +msgstr "" + +#: ../../howto/regex.rst:772 +msgid "" +">>> p = re.compile('\\bclass\\b')\n" +">>> print(p.search('no class at all'))\n" +"None\n" +">>> print(p.search('\\b' + 'class' + '\\b'))\n" +"" +msgstr "" + +#: ../../howto/regex.rst:778 +msgid "" +"Second, inside a character class, where there's no use for this assertion, " +"``\\b`` represents the backspace character, for compatibility with Python's " +"string literals." +msgstr "" + +#: ../../howto/regex.rst:782 +msgid "``\\B``" +msgstr "``\\B``" + +#: ../../howto/regex.rst:783 +msgid "" +"Another zero-width assertion, this is the opposite of ``\\b``, only matching " +"when the current position is not at a word boundary." +msgstr "" + +#: ../../howto/regex.rst:788 +msgid "Grouping" +msgstr "" + +#: ../../howto/regex.rst:790 +msgid "" +"Frequently you need to obtain more information than just whether the RE " +"matched or not. Regular expressions are often used to dissect strings by " +"writing a RE divided into several subgroups which match different components " +"of interest. For example, an RFC-822 header line is divided into a header " +"name and a value, separated by a ``':'``, like this:" +msgstr "" + +#: ../../howto/regex.rst:796 +msgid "" +"From: author@example.com\n" +"User-Agent: Thunderbird 1.5.0.9 (X11/20061227)\n" +"MIME-Version: 1.0\n" +"To: editor@example.com" +msgstr "" + +#: ../../howto/regex.rst:803 +msgid "" +"This can be handled by writing a regular expression which matches an entire " +"header line, and has one group which matches the header name, and another " +"group which matches the header's value." +msgstr "" + +#: ../../howto/regex.rst:807 +msgid "" +"Groups are marked by the ``'('``, ``')'`` metacharacters. ``'('`` and " +"``')'`` have much the same meaning as they do in mathematical expressions; " +"they group together the expressions contained inside them, and you can " +"repeat the contents of a group with a quantifier, such as ``*``, ``+``, ``?" +"``, or ``{m,n}``. For example, ``(ab)*`` will match zero or more " +"repetitions of ``ab``. ::" +msgstr "" + +#: ../../howto/regex.rst:814 +msgid "" +">>> p = re.compile('(ab)*')\n" +">>> print(p.search('ababababab').span())\n" +"(0, 10)" +msgstr "" + +#: ../../howto/regex.rst:818 +msgid "" +"Groups indicated with ``'('``, ``')'`` also capture the starting and ending " +"index of the text that they match; this can be retrieved by passing an " +"argument to :meth:`~re.Match.group`, :meth:`~re.Match.start`, :meth:`~re." +"Match.end`, and :meth:`~re.Match.span`. Groups are numbered starting with " +"0. Group 0 is always present; it's the whole RE, so :ref:`match object " +"` methods all have group 0 as their default argument. Later " +"we'll see how to express groups that don't capture the span of text that " +"they match. ::" +msgstr "" + +#: ../../howto/regex.rst:827 +msgid "" +">>> p = re.compile('(a)b')\n" +">>> m = p.search('ab')\n" +">>> m.group()\n" +"'ab'\n" +">>> m.group(0)\n" +"'ab'" +msgstr "" + +#: ../../howto/regex.rst:834 +msgid "" +"Subgroups are numbered from left to right, from 1 upward. Groups can be " +"nested; to determine the number, just count the opening parenthesis " +"characters, going from left to right. ::" +msgstr "" + +#: ../../howto/regex.rst:838 +msgid "" +">>> p = re.compile('(a(b)c)d')\n" +">>> m = p.search('abcd')\n" +">>> m.group(0)\n" +"'abcd'\n" +">>> m.group(1)\n" +"'abc'\n" +">>> m.group(2)\n" +"'b'" +msgstr "" + +#: ../../howto/regex.rst:847 +msgid "" +":meth:`~re.Match.group` can be passed multiple group numbers at a time, in " +"which case it will return a tuple containing the corresponding values for " +"those groups. ::" +msgstr "" + +#: ../../howto/regex.rst:850 +msgid "" +">>> m.group(2,1,2)\n" +"('b', 'abc', 'b')" +msgstr "" + +#: ../../howto/regex.rst:853 +msgid "" +"The :meth:`~re.Match.groups` method returns a tuple containing the strings " +"for all the subgroups, from 1 up to however many there are. ::" +msgstr "" + +#: ../../howto/regex.rst:856 +msgid "" +">>> m.groups()\n" +"('abc', 'b')" +msgstr "" + +#: ../../howto/regex.rst:859 +msgid "" +"Backreferences in a pattern allow you to specify that the contents of an " +"earlier capturing group must also be found at the current location in the " +"string. For example, ``\\1`` will succeed if the exact contents of group 1 " +"can be found at the current position, and fails otherwise. Remember that " +"Python's string literals also use a backslash followed by numbers to allow " +"including arbitrary characters in a string, so be sure to use a raw string " +"when incorporating backreferences in a RE." +msgstr "" + +#: ../../howto/regex.rst:867 +msgid "For example, the following RE detects doubled words in a string. ::" +msgstr "" + +#: ../../howto/regex.rst:869 +msgid "" +">>> p = re.compile(r'\\b(\\w+)\\s+\\1\\b')\n" +">>> p.search('Paris in the the spring').group()\n" +"'the the'" +msgstr "" + +#: ../../howto/regex.rst:873 +msgid "" +"Backreferences like this aren't often useful for just searching through a " +"string --- there are few text formats which repeat data in this way --- but " +"you'll soon find out that they're *very* useful when performing string " +"substitutions." +msgstr "" + +#: ../../howto/regex.rst:879 +msgid "Non-capturing and named groups" +msgstr "" + +#: ../../howto/regex.rst:881 +msgid "" +"Elaborate REs may use many groups, both to capture substrings of interest, " +"and to group and structure the RE itself. In complex REs, it becomes " +"difficult to keep track of the group numbers. There are two features which " +"help with this problem. Both of them use a common syntax for regular " +"expression extensions, so we'll look at that first." +msgstr "" + +#: ../../howto/regex.rst:887 +msgid "" +"Perl 5 is well known for its powerful additions to standard regular " +"expressions. For these new features the Perl developers couldn't choose new " +"single-keystroke metacharacters or new special sequences beginning with " +"``\\`` without making Perl's regular expressions confusingly different from " +"standard REs. If they chose ``&`` as a new metacharacter, for example, old " +"expressions would be assuming that ``&`` was a regular character and " +"wouldn't have escaped it by writing ``\\&`` or ``[&]``." +msgstr "" + +#: ../../howto/regex.rst:894 +msgid "" +"The solution chosen by the Perl developers was to use ``(?...)`` as the " +"extension syntax. ``?`` immediately after a parenthesis was a syntax error " +"because the ``?`` would have nothing to repeat, so this didn't introduce any " +"compatibility problems. The characters immediately after the ``?`` " +"indicate what extension is being used, so ``(?=foo)`` is one thing (a " +"positive lookahead assertion) and ``(?:foo)`` is something else (a non-" +"capturing group containing the subexpression ``foo``)." +msgstr "" + +#: ../../howto/regex.rst:902 +msgid "" +"Python supports several of Perl's extensions and adds an extension syntax to " +"Perl's extension syntax. If the first character after the question mark is " +"a ``P``, you know that it's an extension that's specific to Python." +msgstr "" + +#: ../../howto/regex.rst:907 +msgid "" +"Now that we've looked at the general extension syntax, we can return to the " +"features that simplify working with groups in complex REs." +msgstr "" + +#: ../../howto/regex.rst:910 +msgid "" +"Sometimes you'll want to use a group to denote a part of a regular " +"expression, but aren't interested in retrieving the group's contents. You " +"can make this fact explicit by using a non-capturing group: ``(?:...)``, " +"where you can replace the ``...`` with any other regular expression. ::" +msgstr "" + +#: ../../howto/regex.rst:915 +msgid "" +">>> m = re.search(\"([abc])+\", \"abc\")\n" +">>> m.groups()\n" +"('c',)\n" +">>> m = re.search(\"(?:[abc])+\", \"abc\")\n" +">>> m.groups()\n" +"()" +msgstr "" + +#: ../../howto/regex.rst:922 +msgid "" +"Except for the fact that you can't retrieve the contents of what the group " +"matched, a non-capturing group behaves exactly the same as a capturing " +"group; you can put anything inside it, repeat it with a repetition " +"metacharacter such as ``*``, and nest it within other groups (capturing or " +"non-capturing). ``(?:...)`` is particularly useful when modifying an " +"existing pattern, since you can add new groups without changing how all the " +"other groups are numbered. It should be mentioned that there's no " +"performance difference in searching between capturing and non-capturing " +"groups; neither form is any faster than the other." +msgstr "" + +#: ../../howto/regex.rst:931 +msgid "" +"A more significant feature is named groups: instead of referring to them by " +"numbers, groups can be referenced by a name." +msgstr "" + +#: ../../howto/regex.rst:934 +msgid "" +"The syntax for a named group is one of the Python-specific extensions: ``(?" +"P...)``. *name* is, obviously, the name of the group. Named groups " +"behave exactly like capturing groups, and additionally associate a name with " +"a group. The :ref:`match object ` methods that deal with " +"capturing groups all accept either integers that refer to the group by " +"number or strings that contain the desired group's name. Named groups are " +"still given numbers, so you can retrieve information about a group in two " +"ways::" +msgstr "" + +#: ../../howto/regex.rst:942 +msgid "" +">>> p = re.compile(r'(?P\\b\\w+\\b)')\n" +">>> m = p.search( '(((( Lots of punctuation )))' )\n" +">>> m.group('word')\n" +"'Lots'\n" +">>> m.group(1)\n" +"'Lots'" +msgstr "" + +#: ../../howto/regex.rst:949 +msgid "" +"Additionally, you can retrieve named groups as a dictionary with :meth:`~re." +"Match.groupdict`::" +msgstr "" + +#: ../../howto/regex.rst:952 +msgid "" +">>> m = re.search(r'(?P\\w+) (?P\\w+)', 'Jane Doe')\n" +">>> m.groupdict()\n" +"{'first': 'Jane', 'last': 'Doe'}" +msgstr "" + +#: ../../howto/regex.rst:956 +msgid "" +"Named groups are handy because they let you use easily remembered names, " +"instead of having to remember numbers. Here's an example RE from the :mod:" +"`imaplib` module::" +msgstr "" + +#: ../../howto/regex.rst:960 +msgid "" +"InternalDate = re.compile(r'INTERNALDATE \"'\n" +" r'(?P[ 123][0-9])-(?P[A-Z][a-z][a-z])-'\n" +" r'(?P[0-9][0-9][0-9][0-9])'\n" +" r' (?P[0-9][0-9]):(?P[0-9][0-9]):(?P[0-9][0-9])'\n" +" r' (?P[-+])(?P[0-9][0-9])(?P[0-9][0-9])'\n" +" r'\"')" +msgstr "" + +#: ../../howto/regex.rst:967 +msgid "" +"It's obviously much easier to retrieve ``m.group('zonem')``, instead of " +"having to remember to retrieve group 9." +msgstr "" + +#: ../../howto/regex.rst:970 +msgid "" +"The syntax for backreferences in an expression such as ``(...)\\1`` refers " +"to the number of the group. There's naturally a variant that uses the group " +"name instead of the number. This is another Python extension: ``(?P=name)`` " +"indicates that the contents of the group called *name* should again be " +"matched at the current point. The regular expression for finding doubled " +"words, ``\\b(\\w+)\\s+\\1\\b`` can also be written as ``\\b(?" +"P\\w+)\\s+(?P=word)\\b``::" +msgstr "" + +#: ../../howto/regex.rst:977 +msgid "" +">>> p = re.compile(r'\\b(?P\\w+)\\s+(?P=word)\\b')\n" +">>> p.search('Paris in the the spring').group()\n" +"'the the'" +msgstr "" + +#: ../../howto/regex.rst:983 +msgid "Lookahead assertions" +msgstr "" + +#: ../../howto/regex.rst:985 +msgid "" +"Another zero-width assertion is the lookahead assertion. Lookahead " +"assertions are available in both positive and negative form, and look like " +"this:" +msgstr "" + +#: ../../howto/regex.rst:988 +msgid "``(?=...)``" +msgstr "``(?=...)``" + +#: ../../howto/regex.rst:989 +msgid "" +"Positive lookahead assertion. This succeeds if the contained regular " +"expression, represented here by ``...``, successfully matches at the current " +"location, and fails otherwise. But, once the contained expression has been " +"tried, the matching engine doesn't advance at all; the rest of the pattern " +"is tried right where the assertion started." +msgstr "" + +#: ../../howto/regex.rst:995 +msgid "``(?!...)``" +msgstr "" + +#: ../../howto/regex.rst:996 +msgid "" +"Negative lookahead assertion. This is the opposite of the positive " +"assertion; it succeeds if the contained expression *doesn't* match at the " +"current position in the string." +msgstr "" + +#: ../../howto/regex.rst:1000 +msgid "" +"To make this concrete, let's look at a case where a lookahead is useful. " +"Consider a simple pattern to match a filename and split it apart into a base " +"name and an extension, separated by a ``.``. For example, in ``news.rc``, " +"``news`` is the base name, and ``rc`` is the filename's extension." +msgstr "" + +#: ../../howto/regex.rst:1005 +msgid "The pattern to match this is quite simple:" +msgstr "" + +#: ../../howto/regex.rst:1007 +msgid "``.*[.].*$``" +msgstr "" + +#: ../../howto/regex.rst:1009 +msgid "" +"Notice that the ``.`` needs to be treated specially because it's a " +"metacharacter, so it's inside a character class to only match that specific " +"character. Also notice the trailing ``$``; this is added to ensure that all " +"the rest of the string must be included in the extension. This regular " +"expression matches ``foo.bar`` and ``autoexec.bat`` and ``sendmail.cf`` and " +"``printers.conf``." +msgstr "" + +#: ../../howto/regex.rst:1016 +msgid "" +"Now, consider complicating the problem a bit; what if you want to match " +"filenames where the extension is not ``bat``? Some incorrect attempts:" +msgstr "" + +#: ../../howto/regex.rst:1019 +msgid "``.*[.][^b].*$``" +msgstr "" + +#: ../../howto/regex.rst:1021 +msgid "" +"The first attempt above tries to exclude ``bat`` by requiring that the first " +"character of the extension is not a ``b``. This is wrong, because the " +"pattern also doesn't match ``foo.bar``." +msgstr "" + +#: ../../howto/regex.rst:1025 +msgid "``.*[.]([^b]..|.[^a].|..[^t])$``" +msgstr "" + +#: ../../howto/regex.rst:1027 +msgid "" +"The expression gets messier when you try to patch up the first solution by " +"requiring one of the following cases to match: the first character of the " +"extension isn't ``b``; the second character isn't ``a``; or the third " +"character isn't ``t``. This accepts ``foo.bar`` and rejects ``autoexec." +"bat``, but it requires a three-letter extension and won't accept a filename " +"with a two-letter extension such as ``sendmail.cf``. We'll complicate the " +"pattern again in an effort to fix it." +msgstr "" + +#: ../../howto/regex.rst:1035 +msgid "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``" +msgstr "``.*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$``" + +#: ../../howto/regex.rst:1037 +msgid "" +"In the third attempt, the second and third letters are all made optional in " +"order to allow matching extensions shorter than three characters, such as " +"``sendmail.cf``." +msgstr "" + +#: ../../howto/regex.rst:1041 +msgid "" +"The pattern's getting really complicated now, which makes it hard to read " +"and understand. Worse, if the problem changes and you want to exclude both " +"``bat`` and ``exe`` as extensions, the pattern would get even more " +"complicated and confusing." +msgstr "" + +#: ../../howto/regex.rst:1046 +msgid "A negative lookahead cuts through all this confusion:" +msgstr "" + +#: ../../howto/regex.rst:1048 +msgid "``.*[.](?!bat$)[^.]*$``" +msgstr "" + +#: ../../howto/regex.rst:1050 +msgid "" +"The negative lookahead means: if the expression ``bat`` doesn't match at " +"this point, try the rest of the pattern; if ``bat$`` does match, the whole " +"pattern will fail. The trailing ``$`` is required to ensure that something " +"like ``sample.batch``, where the extension only starts with ``bat``, will be " +"allowed. The ``[^.]*`` makes sure that the pattern works when there are " +"multiple dots in the filename." +msgstr "" + +#: ../../howto/regex.rst:1057 +msgid "" +"Excluding another filename extension is now easy; simply add it as an " +"alternative inside the assertion. The following pattern excludes filenames " +"that end in either ``bat`` or ``exe``:" +msgstr "" + +#: ../../howto/regex.rst:1061 +msgid "``.*[.](?!bat$|exe$)[^.]*$``" +msgstr "``.*[.](?!bat$|exe$)[^.]*$``" + +#: ../../howto/regex.rst:1065 +msgid "Modifying strings" +msgstr "" + +#: ../../howto/regex.rst:1067 +msgid "" +"Up to this point, we've simply performed searches against a static string. " +"Regular expressions are also commonly used to modify strings in various " +"ways, using the following pattern methods:" +msgstr "" + +#: ../../howto/regex.rst:1074 +msgid "``split()``" +msgstr "``split()``" + +#: ../../howto/regex.rst:1074 +msgid "Split the string into a list, splitting it wherever the RE matches" +msgstr "" + +#: ../../howto/regex.rst:1077 +msgid "``sub()``" +msgstr "``sub()``" + +#: ../../howto/regex.rst:1077 +msgid "" +"Find all substrings where the RE matches, and replace them with a different " +"string" +msgstr "" + +#: ../../howto/regex.rst:1080 +msgid "``subn()``" +msgstr "``subn()``" + +#: ../../howto/regex.rst:1080 +msgid "" +"Does the same thing as :meth:`!sub`, but returns the new string and the " +"number of replacements" +msgstr "" + +#: ../../howto/regex.rst:1087 +msgid "Splitting strings" +msgstr "" + +#: ../../howto/regex.rst:1089 +msgid "" +"The :meth:`~re.Pattern.split` method of a pattern splits a string apart " +"wherever the RE matches, returning a list of the pieces. It's similar to " +"the :meth:`~str.split` method of strings but provides much more generality " +"in the delimiters that you can split by; string :meth:`!split` only supports " +"splitting by whitespace or by a fixed string. As you'd expect, there's a " +"module-level :func:`re.split` function, too." +msgstr "" + +#: ../../howto/regex.rst:1100 +msgid "" +"Split *string* by the matches of the regular expression. If capturing " +"parentheses are used in the RE, then their contents will also be returned as " +"part of the resulting list. If *maxsplit* is nonzero, at most *maxsplit* " +"splits are performed." +msgstr "" + +#: ../../howto/regex.rst:1105 +msgid "" +"You can limit the number of splits made, by passing a value for *maxsplit*. " +"When *maxsplit* is nonzero, at most *maxsplit* splits will be made, and the " +"remainder of the string is returned as the final element of the list. In " +"the following example, the delimiter is any sequence of non-alphanumeric " +"characters. ::" +msgstr "" + +#: ../../howto/regex.rst:1111 +msgid "" +">>> p = re.compile(r'\\W+')\n" +">>> p.split('This is a test, short and sweet, of split().')\n" +"['This', 'is', 'a', 'test', 'short', 'and', 'sweet', 'of', 'split', '']\n" +">>> p.split('This is a test, short and sweet, of split().', 3)\n" +"['This', 'is', 'a', 'test, short and sweet, of split().']" +msgstr "" + +#: ../../howto/regex.rst:1117 +msgid "" +"Sometimes you're not only interested in what the text between delimiters is, " +"but also need to know what the delimiter was. If capturing parentheses are " +"used in the RE, then their values are also returned as part of the list. " +"Compare the following calls::" +msgstr "" + +#: ../../howto/regex.rst:1122 +msgid "" +">>> p = re.compile(r'\\W+')\n" +">>> p2 = re.compile(r'(\\W+)')\n" +">>> p.split('This... is a test.')\n" +"['This', 'is', 'a', 'test', '']\n" +">>> p2.split('This... is a test.')\n" +"['This', '... ', 'is', ' ', 'a', ' ', 'test', '.', '']" +msgstr "" + +#: ../../howto/regex.rst:1129 +msgid "" +"The module-level function :func:`re.split` adds the RE to be used as the " +"first argument, but is otherwise the same. ::" +msgstr "" + +#: ../../howto/regex.rst:1132 +msgid "" +">>> re.split(r'[\\W]+', 'Words, words, words.')\n" +"['Words', 'words', 'words', '']\n" +">>> re.split(r'([\\W]+)', 'Words, words, words.')\n" +"['Words', ', ', 'words', ', ', 'words', '.', '']\n" +">>> re.split(r'[\\W]+', 'Words, words, words.', 1)\n" +"['Words', 'words, words.']" +msgstr "" + +#: ../../howto/regex.rst:1141 +msgid "Search and replace" +msgstr "" + +#: ../../howto/regex.rst:1143 +msgid "" +"Another common task is to find all the matches for a pattern, and replace " +"them with a different string. The :meth:`~re.Pattern.sub` method takes a " +"replacement value, which can be either a string or a function, and the " +"string to be processed." +msgstr "" + +#: ../../howto/regex.rst:1150 +msgid "" +"Returns the string obtained by replacing the leftmost non-overlapping " +"occurrences of the RE in *string* by the replacement *replacement*. If the " +"pattern isn't found, *string* is returned unchanged." +msgstr "" + +#: ../../howto/regex.rst:1154 +msgid "" +"The optional argument *count* is the maximum number of pattern occurrences " +"to be replaced; *count* must be a non-negative integer. The default value " +"of 0 means to replace all occurrences." +msgstr "" + +#: ../../howto/regex.rst:1158 +msgid "" +"Here's a simple example of using the :meth:`~re.Pattern.sub` method. It " +"replaces colour names with the word ``colour``::" +msgstr "" + +#: ../../howto/regex.rst:1161 +msgid "" +">>> p = re.compile('(blue|white|red)')\n" +">>> p.sub('colour', 'blue socks and red shoes')\n" +"'colour socks and colour shoes'\n" +">>> p.sub('colour', 'blue socks and red shoes', count=1)\n" +"'colour socks and red shoes'" +msgstr "" + +#: ../../howto/regex.rst:1167 +msgid "" +"The :meth:`~re.Pattern.subn` method does the same work, but returns a 2-" +"tuple containing the new string value and the number of replacements that " +"were performed::" +msgstr "" + +#: ../../howto/regex.rst:1170 +msgid "" +">>> p = re.compile('(blue|white|red)')\n" +">>> p.subn('colour', 'blue socks and red shoes')\n" +"('colour socks and colour shoes', 2)\n" +">>> p.subn('colour', 'no colours at all')\n" +"('no colours at all', 0)" +msgstr "" + +#: ../../howto/regex.rst:1176 +msgid "" +"Empty matches are replaced only when they're not adjacent to a previous " +"empty match. ::" +msgstr "" + +#: ../../howto/regex.rst:1179 +msgid "" +">>> p = re.compile('x*')\n" +">>> p.sub('-', 'abxd')\n" +"'-a-b--d-'" +msgstr "" + +#: ../../howto/regex.rst:1183 +msgid "" +"If *replacement* is a string, any backslash escapes in it are processed. " +"That is, ``\\n`` is converted to a single newline character, ``\\r`` is " +"converted to a carriage return, and so forth. Unknown escapes such as " +"``\\&`` are left alone. Backreferences, such as ``\\6``, are replaced with " +"the substring matched by the corresponding group in the RE. This lets you " +"incorporate portions of the original text in the resulting replacement " +"string." +msgstr "" + +#: ../../howto/regex.rst:1190 +msgid "" +"This example matches the word ``section`` followed by a string enclosed in " +"``{``, ``}``, and changes ``section`` to ``subsection``::" +msgstr "" + +#: ../../howto/regex.rst:1193 +msgid "" +">>> p = re.compile('section{ ( [^}]* ) }', re.VERBOSE)\n" +">>> p.sub(r'subsection{\\1}','section{First} section{second}')\n" +"'subsection{First} subsection{second}'" +msgstr "" + +#: ../../howto/regex.rst:1197 +msgid "" +"There's also a syntax for referring to named groups as defined by the ``(?" +"P...)`` syntax. ``\\g`` will use the substring matched by the " +"group named ``name``, and ``\\g`` uses the corresponding group " +"number. ``\\g<2>`` is therefore equivalent to ``\\2``, but isn't ambiguous " +"in a replacement string such as ``\\g<2>0``. (``\\20`` would be interpreted " +"as a reference to group 20, not a reference to group 2 followed by the " +"literal character ``'0'``.) The following substitutions are all equivalent, " +"but use all three variations of the replacement string. ::" +msgstr "" + +#: ../../howto/regex.rst:1206 +msgid "" +">>> p = re.compile('section{ (?P [^}]* ) }', re.VERBOSE)\n" +">>> p.sub(r'subsection{\\1}','section{First}')\n" +"'subsection{First}'\n" +">>> p.sub(r'subsection{\\g<1>}','section{First}')\n" +"'subsection{First}'\n" +">>> p.sub(r'subsection{\\g}','section{First}')\n" +"'subsection{First}'" +msgstr "" + +#: ../../howto/regex.rst:1214 +msgid "" +"*replacement* can also be a function, which gives you even more control. If " +"*replacement* is a function, the function is called for every non-" +"overlapping occurrence of *pattern*. On each call, the function is passed " +"a :ref:`match object ` argument for the match and can use " +"this information to compute the desired replacement string and return it." +msgstr "" + +#: ../../howto/regex.rst:1220 +msgid "" +"In the following example, the replacement function translates decimals into " +"hexadecimal::" +msgstr "" + +#: ../../howto/regex.rst:1223 +msgid "" +">>> def hexrepl(match):\n" +"... \"Return the hex string for a decimal number\"\n" +"... value = int(match.group())\n" +"... return hex(value)\n" +"...\n" +">>> p = re.compile(r'\\d+')\n" +">>> p.sub(hexrepl, 'Call 65490 for printing, 49152 for user code.')\n" +"'Call 0xffd2 for printing, 0xc000 for user code.'" +msgstr "" + +#: ../../howto/regex.rst:1232 +msgid "" +"When using the module-level :func:`re.sub` function, the pattern is passed " +"as the first argument. The pattern may be provided as an object or as a " +"string; if you need to specify regular expression flags, you must either use " +"a pattern object as the first parameter, or use embedded modifiers in the " +"pattern string, e.g. ``sub(\"(?i)b+\", \"x\", \"bbbb BBBB\")`` returns ``'x " +"x'``." +msgstr "" + +#: ../../howto/regex.rst:1240 +msgid "Common problems" +msgstr "" + +#: ../../howto/regex.rst:1242 +msgid "" +"Regular expressions are a powerful tool for some applications, but in some " +"ways their behaviour isn't intuitive and at times they don't behave the way " +"you may expect them to. This section will point out some of the most common " +"pitfalls." +msgstr "" + +#: ../../howto/regex.rst:1248 +msgid "Use string methods" +msgstr "" + +#: ../../howto/regex.rst:1250 +msgid "" +"Sometimes using the :mod:`re` module is a mistake. If you're matching a " +"fixed string, or a single character class, and you're not using any :mod:" +"`re` features such as the :const:`~re.IGNORECASE` flag, then the full power " +"of regular expressions may not be required. Strings have several methods for " +"performing operations with fixed strings and they're usually much faster, " +"because the implementation is a single small C loop that's been optimized " +"for the purpose, instead of the large, more generalized regular expression " +"engine." +msgstr "" + +#: ../../howto/regex.rst:1258 +msgid "" +"One example might be replacing a single fixed string with another one; for " +"example, you might replace ``word`` with ``deed``. :func:`re.sub` seems " +"like the function to use for this, but consider the :meth:`~str.replace` " +"method. Note that :meth:`!replace` will also replace ``word`` inside words, " +"turning ``swordfish`` into ``sdeedfish``, but the naive RE ``word`` would " +"have done that, too. (To avoid performing the substitution on parts of " +"words, the pattern would have to be ``\\bword\\b``, in order to require that " +"``word`` have a word boundary on either side. This takes the job beyond :" +"meth:`!replace`'s abilities.)" +msgstr "" + +#: ../../howto/regex.rst:1267 +msgid "" +"Another common task is deleting every occurrence of a single character from " +"a string or replacing it with another single character. You might do this " +"with something like ``re.sub('\\n', ' ', S)``, but :meth:`~str.translate` is " +"capable of doing both tasks and will be faster than any regular expression " +"operation can be." +msgstr "" + +#: ../../howto/regex.rst:1273 +msgid "" +"In short, before turning to the :mod:`re` module, consider whether your " +"problem can be solved with a faster and simpler string method." +msgstr "" + +#: ../../howto/regex.rst:1280 +msgid "prefixmatch() (aka match) versus search()" +msgstr "" + +#: ../../howto/regex.rst:1282 +msgid "" +":func:`~re.prefixmatch` was added in Python 3.15 as the :ref:`preferred name " +"` for :func:`~re.match`. Before this, it was only " +"known as :func:`!match` and the distinction with :func:`~re.search` was " +"often misunderstood." +msgstr "" + +#: ../../howto/regex.rst:1287 +msgid "" +":func:`!prefixmatch` aka :func:`!match` only checks if the RE matches at the " +"beginning of the string while :func:`!search` scans forward through the " +"string for a match. ::" +msgstr "" + +#: ../../howto/regex.rst:1291 +msgid "" +">>> print(re.prefixmatch('super', 'superstition').span())\n" +"(0, 5)\n" +">>> print(re.prefixmatch('super', 'insuperable'))\n" +"None" +msgstr "" + +#: ../../howto/regex.rst:1296 +msgid "" +"On the other hand, :func:`~re.search` scans forward through the string, " +"reporting the first match it finds. ::" +msgstr "" + +#: ../../howto/regex.rst:1299 +msgid "" +">>> print(re.search('super', 'superstition').span())\n" +"(0, 5)\n" +">>> print(re.search('super', 'insuperable').span())\n" +"(2, 7)" +msgstr "" + +#: ../../howto/regex.rst:1304 +msgid "" +"This distinction is important to remember when using the old :func:`~re." +"match` name in code requiring compatibility with older Python versions." +msgstr "" + +#: ../../howto/regex.rst:1309 +msgid "Greedy versus non-greedy" +msgstr "" + +#: ../../howto/regex.rst:1311 +msgid "" +"When repeating a regular expression, as in ``a*``, the resulting action is " +"to consume as much of the pattern as possible. This fact often bites you " +"when you're trying to match a pair of balanced delimiters, such as the angle " +"brackets surrounding an HTML tag. The naive pattern for matching a single " +"HTML tag doesn't work because of the greedy nature of ``.*``. ::" +msgstr "" + +#: ../../howto/regex.rst:1317 +msgid "" +">>> s = 'Title'\n" +">>> len(s)\n" +"32\n" +">>> print(re.prefixmatch('<.*>', s).span())\n" +"(0, 32)\n" +">>> print(re.prefixmatch('<.*>', s).group())\n" +"Title" +msgstr "" + +#: ../../howto/regex.rst:1325 +msgid "" +"The RE matches the ``'<'`` in ``''``, and the ``.*`` consumes the rest " +"of the string. There's still more left in the RE, though, and the ``>`` " +"can't match at the end of the string, so the regular expression engine has " +"to backtrack character by character until it finds a match for the ``>``. " +"The final match extends from the ``'<'`` in ``''`` to the ``'>'`` in " +"``''``, which isn't what you want." +msgstr "" + +#: ../../howto/regex.rst:1332 +msgid "" +"In this case, the solution is to use the non-greedy quantifiers ``*?``, ``+?" +"``, ``??``, or ``{m,n}?``, which match as *little* text as possible. In the " +"above example, the ``'>'`` is tried immediately after the first ``'<'`` " +"matches, and when it fails, the engine advances a character at a time, " +"retrying the ``'>'`` at every step. This produces just the right result::" +msgstr "" + +#: ../../howto/regex.rst:1338 +msgid "" +">>> print(re.prefixmatch('<.*?>', s).group())\n" +"" +msgstr "" + +#: ../../howto/regex.rst:1341 +msgid "" +"(Note that parsing HTML or XML with regular expressions is painful. Quick-" +"and-dirty patterns will handle common cases, but HTML and XML have special " +"cases that will break the obvious regular expression; by the time you've " +"written a regular expression that handles all of the possible cases, the " +"patterns will be *very* complicated. Use an HTML or XML parser module for " +"such tasks.)" +msgstr "" + +#: ../../howto/regex.rst:1349 +msgid "Using re.VERBOSE" +msgstr "" + +#: ../../howto/regex.rst:1351 +msgid "" +"By now you've probably noticed that regular expressions are a very compact " +"notation, but they're not terribly readable. REs of moderate complexity can " +"become lengthy collections of backslashes, parentheses, and metacharacters, " +"making them difficult to read and understand." +msgstr "" + +#: ../../howto/regex.rst:1356 +msgid "" +"For such REs, specifying the :const:`re.VERBOSE` flag when compiling the " +"regular expression can be helpful, because it allows you to format the " +"regular expression more clearly." +msgstr "" + +#: ../../howto/regex.rst:1360 +msgid "" +"The ``re.VERBOSE`` flag has several effects. Whitespace in the regular " +"expression that *isn't* inside a character class is ignored. This means " +"that an expression such as ``dog | cat`` is equivalent to the less readable " +"``dog|cat``, but ``[a b]`` will still match the characters ``'a'``, ``'b'``, " +"or a space. In addition, you can also put comments inside a RE; comments " +"extend from a ``#`` character to the next newline. When used with triple-" +"quoted strings, this enables REs to be formatted more neatly::" +msgstr "" + +#: ../../howto/regex.rst:1368 +msgid "" +"pat = re.compile(r\"\"\"\n" +" \\s* # Skip leading whitespace\n" +" (?P
[^:]+) # Header name\n" +" \\s* : # Whitespace, and a colon\n" +" (?P.*?) # The header's value -- *? used to\n" +" # lose the following trailing whitespace\n" +" \\s*$ # Trailing whitespace to end-of-line\n" +"\"\"\", re.VERBOSE)" +msgstr "" + +#: ../../howto/regex.rst:1377 +msgid "This is far more readable than::" +msgstr "" + +#: ../../howto/regex.rst:1379 +msgid "pat = re.compile(r\"\\s*(?P
[^:]+)\\s*:(?P.*?)\\s*$\")" +msgstr "" + +#: ../../howto/regex.rst:1383 +msgid "Feedback" +msgstr "" + +#: ../../howto/regex.rst:1385 +msgid "" +"Regular expressions are a complicated topic. Did this document help you " +"understand them? Were there parts that were unclear, or problems you " +"encountered that weren't covered here? If so, please send suggestions for " +"improvements to the :ref:`issue tracker `." +msgstr "" + +#: ../../howto/regex.rst:1390 +msgid "" +"The most complete book on regular expressions is almost certainly Jeffrey " +"Friedl's Mastering Regular Expressions, published by O'Reilly. " +"Unfortunately, it exclusively concentrates on Perl and Java's flavours of " +"regular expressions, and doesn't contain any Python material at all, so it " +"won't be useful as a reference for programming in Python. (The first " +"edition covered Python's now-removed :mod:`!regex` module, which won't help " +"you much.) Consider checking it out from your library." +msgstr "" diff --git a/howto/sockets.po b/howto/sockets.po index 258c8969..5b29640d 100644 --- a/howto/sockets.po +++ b/howto/sockets.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -21,7 +21,7 @@ msgstr "" msgid "Socket Programming HOWTO" msgstr "" -#: ../../howto/sockets.rst:-1 +#: ../../howto/sockets.rst:7 msgid "Abstract" msgstr "" diff --git a/howto/sockets.po~ b/howto/sockets.po~ new file mode 100644 index 00000000..258c8969 --- /dev/null +++ b/howto/sockets.po~ @@ -0,0 +1,558 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../howto/sockets.rst:5 +msgid "Socket Programming HOWTO" +msgstr "" + +#: ../../howto/sockets.rst:-1 +msgid "Abstract" +msgstr "" + +#: ../../howto/sockets.rst:9 +msgid "" +"Sockets are used nearly everywhere, but are one of the most severely " +"misunderstood technologies around. This is a 10,000 foot overview of " +"sockets. It's not really a tutorial - you'll still have work to do in " +"getting things operational. It doesn't cover the fine points (and there are " +"a lot of them), but I hope it will give you enough background to begin using " +"them decently." +msgstr "" + +#: ../../howto/sockets.rst:17 +msgid "Sockets" +msgstr "" + +#: ../../howto/sockets.rst:19 +msgid "" +"I'm only going to talk about INET (i.e. IPv4) sockets, but they account for " +"at least 99% of the sockets in use. And I'll only talk about STREAM (i.e. " +"TCP) sockets - unless you really know what you're doing (in which case this " +"HOWTO isn't for you!), you'll get better behavior and performance from a " +"STREAM socket than anything else. I will try to clear up the mystery of what " +"a socket is, as well as some hints on how to work with blocking and non-" +"blocking sockets. But I'll start by talking about blocking sockets. You'll " +"need to know how they work before dealing with non-blocking sockets." +msgstr "" + +#: ../../howto/sockets.rst:28 +msgid "" +"Part of the trouble with understanding these things is that \"socket\" can " +"mean a number of subtly different things, depending on context. So first, " +"let's make a distinction between a \"client\" socket - an endpoint of a " +"conversation, and a \"server\" socket, which is more like a switchboard " +"operator. The client application (your browser, for example) uses \"client\" " +"sockets exclusively; the web server it's talking to uses both \"server\" " +"sockets and \"client\" sockets." +msgstr "" + +#: ../../howto/sockets.rst:37 +msgid "History" +msgstr "" + +#: ../../howto/sockets.rst:39 +msgid "" +"Of the various forms of :abbr:`IPC (Inter Process Communication)`, sockets " +"are by far the most popular. On any given platform, there are likely to be " +"other forms of IPC that are faster, but for cross-platform communication, " +"sockets are about the only game in town." +msgstr "" + +#: ../../howto/sockets.rst:44 +msgid "" +"They were invented in Berkeley as part of the BSD flavor of Unix. They " +"spread like wildfire with the internet. With good reason --- the combination " +"of sockets with INET makes talking to arbitrary machines around the world " +"unbelievably easy (at least compared to other schemes)." +msgstr "" + +#: ../../howto/sockets.rst:51 +msgid "Creating a Socket" +msgstr "" + +#: ../../howto/sockets.rst:53 +msgid "" +"Roughly speaking, when you clicked on the link that brought you to this " +"page, your browser did something like the following::" +msgstr "" + +#: ../../howto/sockets.rst:56 +msgid "" +"# create an INET, STREAMing socket\n" +"s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n" +"# now connect to the web server on port 80 - the normal http port\n" +"s.connect((\"www.python.org\", 80))" +msgstr "" + +#: ../../howto/sockets.rst:61 +msgid "" +"When the ``connect`` completes, the socket ``s`` can be used to send in a " +"request for the text of the page. The same socket will read the reply, and " +"then be destroyed. That's right, destroyed. Client sockets are normally only " +"used for one exchange (or a small set of sequential exchanges)." +msgstr "" + +#: ../../howto/sockets.rst:67 +msgid "" +"What happens in the web server is a bit more complex. First, the web server " +"creates a \"server socket\"::" +msgstr "" + +#: ../../howto/sockets.rst:70 +msgid "" +"# create an INET, STREAMing socket\n" +"serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n" +"# bind the socket to a public host, and a well-known port\n" +"serversocket.bind((socket.gethostname(), 80))\n" +"# become a server socket\n" +"serversocket.listen(5)" +msgstr "" + +#: ../../howto/sockets.rst:77 +msgid "" +"A couple things to notice: we used ``socket.gethostname()`` so that the " +"socket would be visible to the outside world. If we had used ``s." +"bind(('localhost', 80))`` or ``s.bind(('127.0.0.1', 80))`` we would still " +"have a \"server\" socket, but one that was only visible within the same " +"machine. ``s.bind(('', 80))`` specifies that the socket is reachable by any " +"address the machine happens to have." +msgstr "" + +#: ../../howto/sockets.rst:84 +msgid "" +"A second thing to note: low number ports are usually reserved for \"well " +"known\" services (HTTP, SNMP etc). If you're playing around, use a nice high " +"number (4 digits)." +msgstr "" + +#: ../../howto/sockets.rst:88 +msgid "" +"Finally, the argument to ``listen`` tells the socket library that we want it " +"to queue up as many as 5 connect requests (the normal max) before refusing " +"outside connections. If the rest of the code is written properly, that " +"should be plenty." +msgstr "" + +#: ../../howto/sockets.rst:92 +msgid "" +"Now that we have a \"server\" socket, listening on port 80, we can enter the " +"mainloop of the web server::" +msgstr "" + +#: ../../howto/sockets.rst:95 +msgid "" +"while True:\n" +" # accept connections from outside\n" +" (clientsocket, address) = serversocket.accept()\n" +" # now do something with the clientsocket\n" +" # in this case, we'll pretend this is a threaded server\n" +" ct = make_client_thread(clientsocket)\n" +" ct.start()" +msgstr "" + +#: ../../howto/sockets.rst:103 +msgid "" +"There's actually 3 general ways in which this loop could work - dispatching " +"a thread to handle ``clientsocket``, create a new process to handle " +"``clientsocket``, or restructure this app to use non-blocking sockets, and " +"multiplex between our \"server\" socket and any active ``clientsocket``\\ s " +"using ``select``. More about that later. The important thing to understand " +"now is this: this is *all* a \"server\" socket does. It doesn't send any " +"data. It doesn't receive any data. It just produces \"client\" sockets. Each " +"``clientsocket`` is created in response to some *other* \"client\" socket " +"doing a ``connect()`` to the host and port we're bound to. As soon as we've " +"created that ``clientsocket``, we go back to listening for more connections. " +"The two \"clients\" are free to chat it up - they are using some dynamically " +"allocated port which will be recycled when the conversation ends." +msgstr "" + +#: ../../howto/sockets.rst:118 +msgid "IPC" +msgstr "" + +#: ../../howto/sockets.rst:120 +msgid "" +"If you need fast IPC between two processes on one machine, you should look " +"into pipes or shared memory. If you do decide to use AF_INET sockets, bind " +"the \"server\" socket to ``'localhost'``. On most platforms, this will take " +"a shortcut around a couple of layers of network code and be quite a bit " +"faster." +msgstr "" + +#: ../../howto/sockets.rst:126 +msgid "" +"The :mod:`multiprocessing` integrates cross-platform IPC into a higher-level " +"API." +msgstr "" + +#: ../../howto/sockets.rst:131 +msgid "Using a Socket" +msgstr "" + +#: ../../howto/sockets.rst:133 +msgid "" +"The first thing to note, is that the web browser's \"client\" socket and the " +"web server's \"client\" socket are identical beasts. That is, this is a " +"\"peer to peer\" conversation. Or to put it another way, *as the designer, " +"you will have to decide what the rules of etiquette are for a conversation*. " +"Normally, the ``connect``\\ ing socket starts the conversation, by sending " +"in a request, or perhaps a signon. But that's a design decision - it's not a " +"rule of sockets." +msgstr "" + +#: ../../howto/sockets.rst:140 +msgid "" +"Now there are two sets of verbs to use for communication. You can use " +"``send`` and ``recv``, or you can transform your client socket into a file-" +"like beast and use ``read`` and ``write``. The latter is the way Java " +"presents its sockets. I'm not going to talk about it here, except to warn " +"you that you need to use ``flush`` on sockets. These are buffered \"files\", " +"and a common mistake is to ``write`` something, and then ``read`` for a " +"reply. Without a ``flush`` in there, you may wait forever for the reply, " +"because the request may still be in your output buffer." +msgstr "" + +#: ../../howto/sockets.rst:149 +msgid "" +"Now we come to the major stumbling block of sockets - ``send`` and ``recv`` " +"operate on the network buffers. They do not necessarily handle all the bytes " +"you hand them (or expect from them), because their major focus is handling " +"the network buffers. In general, they return when the associated network " +"buffers have been filled (``send``) or emptied (``recv``). They then tell " +"you how many bytes they handled. It is *your* responsibility to call them " +"again until your message has been completely dealt with." +msgstr "" + +#: ../../howto/sockets.rst:157 +msgid "" +"When a ``recv`` returns 0 bytes, it means the other side has closed (or is " +"in the process of closing) the connection. You will not receive any more " +"data on this connection. Ever. You may be able to send data successfully; " +"I'll talk more about this later." +msgstr "" + +#: ../../howto/sockets.rst:162 +msgid "" +"A protocol like HTTP uses a socket for only one transfer. The client sends a " +"request, then reads a reply. That's it. The socket is discarded. This means " +"that a client can detect the end of the reply by receiving 0 bytes." +msgstr "" + +#: ../../howto/sockets.rst:166 +msgid "" +"But if you plan to reuse your socket for further transfers, you need to " +"realize that *there is no* :abbr:`EOT (End of Transfer)` *on a socket.* I " +"repeat: if a socket ``send`` or ``recv`` returns after handling 0 bytes, the " +"connection has been broken. If the connection has *not* been broken, you " +"may wait on a ``recv`` forever, because the socket will *not* tell you that " +"there's nothing more to read (for now). Now if you think about that a bit, " +"you'll come to realize a fundamental truth of sockets: *messages must either " +"be fixed length* (yuck), *or be delimited* (shrug), *or indicate how long " +"they are* (much better), *or end by shutting down the connection*. The " +"choice is entirely yours, (but some ways are righter than others)." +msgstr "" + +#: ../../howto/sockets.rst:177 +msgid "" +"Assuming you don't want to end the connection, the simplest solution is a " +"fixed length message::" +msgstr "" + +#: ../../howto/sockets.rst:180 +msgid "" +"class MySocket:\n" +" \"\"\"demonstration class only\n" +" - coded for clarity, not efficiency\n" +" \"\"\"\n" +"\n" +" def __init__(self, sock=None):\n" +" if sock is None:\n" +" self.sock = socket.socket(\n" +" socket.AF_INET, socket.SOCK_STREAM)\n" +" else:\n" +" self.sock = sock\n" +"\n" +" def connect(self, host, port):\n" +" self.sock.connect((host, port))\n" +"\n" +" def mysend(self, msg):\n" +" totalsent = 0\n" +" while totalsent < MSGLEN:\n" +" sent = self.sock.send(msg[totalsent:])\n" +" if sent == 0:\n" +" raise RuntimeError(\"socket connection broken\")\n" +" totalsent = totalsent + sent\n" +"\n" +" def myreceive(self):\n" +" chunks = []\n" +" bytes_recd = 0\n" +" while bytes_recd < MSGLEN:\n" +" chunk = self.sock.recv(min(MSGLEN - bytes_recd, 2048))\n" +" if chunk == b'':\n" +" raise RuntimeError(\"socket connection broken\")\n" +" chunks.append(chunk)\n" +" bytes_recd = bytes_recd + len(chunk)\n" +" return b''.join(chunks)" +msgstr "" + +#: ../../howto/sockets.rst:214 +msgid "" +"The sending code here is usable for almost any messaging scheme - in Python " +"you send strings, and you can use ``len()`` to determine its length (even if " +"it has embedded ``\\0`` characters). It's mostly the receiving code that " +"gets more complex. (And in C, it's not much worse, except you can't use " +"``strlen`` if the message has embedded ``\\0``\\ s.)" +msgstr "" + +#: ../../howto/sockets.rst:220 +msgid "" +"The easiest enhancement is to make the first character of the message an " +"indicator of message type, and have the type determine the length. Now you " +"have two ``recv``\\ s - the first to get (at least) that first character so " +"you can look up the length, and the second in a loop to get the rest. If you " +"decide to go the delimited route, you'll be receiving in some arbitrary " +"chunk size, (4096 or 8192 is frequently a good match for network buffer " +"sizes), and scanning what you've received for a delimiter." +msgstr "" + +#: ../../howto/sockets.rst:228 +msgid "" +"One complication to be aware of: if your conversational protocol allows " +"multiple messages to be sent back to back (without some kind of reply), and " +"you pass ``recv`` an arbitrary chunk size, you may end up reading the start " +"of a following message. You'll need to put that aside and hold onto it, " +"until it's needed." +msgstr "" + +#: ../../howto/sockets.rst:234 +msgid "" +"Prefixing the message with its length (say, as 5 numeric characters) gets " +"more complex, because (believe it or not), you may not get all 5 characters " +"in one ``recv``. In playing around, you'll get away with it; but in high " +"network loads, your code will very quickly break unless you use two ``recv`` " +"loops - the first to determine the length, the second to get the data part " +"of the message. Nasty. This is also when you'll discover that ``send`` does " +"not always manage to get rid of everything in one pass. And despite having " +"read this, you will eventually get bit by it!" +msgstr "" + +#: ../../howto/sockets.rst:243 +msgid "" +"In the interests of space, building your character, (and preserving my " +"competitive position), these enhancements are left as an exercise for the " +"reader. Lets move on to cleaning up." +msgstr "" + +#: ../../howto/sockets.rst:249 +msgid "Binary Data" +msgstr "" + +#: ../../howto/sockets.rst:251 +msgid "" +"It is perfectly possible to send binary data over a socket. The major " +"problem is that not all machines use the same formats for binary data. For " +"example, `network byte order `_ is big-endian, with the most significant byte " +"first, so a 16 bit integer with the value ``1`` would be the two hex bytes " +"``00 01``. However, most common processors (x86/AMD64, ARM, RISC-V), are " +"little-endian, with the least significant byte first - that same ``1`` would " +"be ``01 00``." +msgstr "" + +#: ../../howto/sockets.rst:259 +msgid "" +"Socket libraries have calls for converting 16 and 32 bit integers - ``ntohl, " +"htonl, ntohs, htons`` where \"n\" means *network* and \"h\" means *host*, " +"\"s\" means *short* and \"l\" means *long*. Where network order is host " +"order, these do nothing, but where the machine is byte-reversed, these swap " +"the bytes around appropriately." +msgstr "" + +#: ../../howto/sockets.rst:265 +msgid "" +"In these days of 64-bit machines, the ASCII representation of binary data is " +"frequently smaller than the binary representation. That's because a " +"surprising amount of the time, most integers have the value 0, or maybe 1. " +"The string ``\"0\"`` would be two bytes, while a full 64-bit integer would " +"be 8. Of course, this doesn't fit well with fixed-length messages. " +"Decisions, decisions." +msgstr "" + +#: ../../howto/sockets.rst:274 +msgid "Disconnecting" +msgstr "" + +#: ../../howto/sockets.rst:276 +msgid "" +"Strictly speaking, you're supposed to use ``shutdown`` on a socket before " +"you ``close`` it. The ``shutdown`` is an advisory to the socket at the " +"other end. Depending on the argument you pass it, it can mean \"I'm not " +"going to send anymore, but I'll still listen\", or \"I'm not listening, good " +"riddance!\". Most socket libraries, however, are so used to programmers " +"neglecting to use this piece of etiquette that normally a ``close`` is the " +"same as ``shutdown(); close()``. So in most situations, an explicit " +"``shutdown`` is not needed." +msgstr "" + +#: ../../howto/sockets.rst:284 +msgid "" +"One way to use ``shutdown`` effectively is in an HTTP-like exchange. The " +"client sends a request and then does a ``shutdown(1)``. This tells the " +"server \"This client is done sending, but can still receive.\" The server " +"can detect \"EOF\" by a receive of 0 bytes. It can assume it has the " +"complete request. The server sends a reply. If the ``send`` completes " +"successfully then, indeed, the client was still receiving." +msgstr "" + +#: ../../howto/sockets.rst:291 +msgid "" +"Python takes the automatic shutdown a step further, and says that when a " +"socket is garbage collected, it will automatically do a ``close`` if it's " +"needed. But relying on this is a very bad habit. If your socket just " +"disappears without doing a ``close``, the socket at the other end may hang " +"indefinitely, thinking you're just being slow. *Please* ``close`` your " +"sockets when you're done." +msgstr "" + +#: ../../howto/sockets.rst:299 +msgid "When Sockets Die" +msgstr "" + +#: ../../howto/sockets.rst:301 +msgid "" +"Probably the worst thing about using blocking sockets is what happens when " +"the other side comes down hard (without doing a ``close``). Your socket is " +"likely to hang. TCP is a reliable protocol, and it will wait a long, long " +"time before giving up on a connection. If you're using threads, the entire " +"thread is essentially dead. There's not much you can do about it. As long as " +"you aren't doing something dumb, like holding a lock while doing a blocking " +"read, the thread isn't really consuming much in the way of resources. Do " +"*not* try to kill the thread - part of the reason that threads are more " +"efficient than processes is that they avoid the overhead associated with the " +"automatic recycling of resources. In other words, if you do manage to kill " +"the thread, your whole process is likely to be screwed up." +msgstr "" + +#: ../../howto/sockets.rst:315 +msgid "Non-blocking Sockets" +msgstr "" + +#: ../../howto/sockets.rst:317 +msgid "" +"If you've understood the preceding, you already know most of what you need " +"to know about the mechanics of using sockets. You'll still use the same " +"calls, in much the same ways. It's just that, if you do it right, your app " +"will be almost inside-out." +msgstr "" + +#: ../../howto/sockets.rst:322 +msgid "" +"In Python, you use ``socket.setblocking(False)`` to make it non-blocking. In " +"C, it's more complex, (for one thing, you'll need to choose between the BSD " +"flavor ``O_NONBLOCK`` and the almost indistinguishable POSIX flavor " +"``O_NDELAY``, which is completely different from ``TCP_NODELAY``), but it's " +"the exact same idea. You do this after creating the socket, but before using " +"it. (Actually, if you're nuts, you can switch back and forth.)" +msgstr "" + +#: ../../howto/sockets.rst:329 +msgid "" +"The major mechanical difference is that ``send``, ``recv``, ``connect`` and " +"``accept`` can return without having done anything. You have (of course) a " +"number of choices. You can check return code and error codes and generally " +"drive yourself crazy. If you don't believe me, try it sometime. Your app " +"will grow large, buggy and suck CPU. So let's skip the brain-dead solutions " +"and do it right." +msgstr "" + +#: ../../howto/sockets.rst:336 +msgid "Use ``select``." +msgstr "" + +#: ../../howto/sockets.rst:338 +msgid "" +"In C, coding ``select`` is fairly complex. In Python, it's a piece of cake, " +"but it's close enough to the C version that if you understand ``select`` in " +"Python, you'll have little trouble with it in C::" +msgstr "" + +#: ../../howto/sockets.rst:342 +msgid "" +"ready_to_read, ready_to_write, in_error = \\\n" +" select.select(\n" +" potential_readers,\n" +" potential_writers,\n" +" potential_errs,\n" +" timeout)" +msgstr "" + +#: ../../howto/sockets.rst:349 +msgid "" +"You pass ``select`` three lists: the first contains all sockets that you " +"might want to try reading; the second all the sockets you might want to try " +"writing to, and the last (normally left empty) those that you want to check " +"for errors. You should note that a socket can go into more than one list. " +"The ``select`` call is blocking, but you can give it a timeout. This is " +"generally a sensible thing to do - give it a nice long timeout (say a " +"minute) unless you have good reason to do otherwise." +msgstr "" + +#: ../../howto/sockets.rst:357 +msgid "" +"In return, you will get three lists. They contain the sockets that are " +"actually readable, writable and in error. Each of these lists is a subset " +"(possibly empty) of the corresponding list you passed in." +msgstr "" + +#: ../../howto/sockets.rst:361 +msgid "" +"If a socket is in the output readable list, you can be as-close-to-certain-" +"as-we-ever-get-in-this-business that a ``recv`` on that socket will return " +"*something*. Same idea for the writable list. You'll be able to send " +"*something*. Maybe not all you want to, but *something* is better than " +"nothing. (Actually, any reasonably healthy socket will return as writable - " +"it just means outbound network buffer space is available.)" +msgstr "" + +#: ../../howto/sockets.rst:368 +msgid "" +"If you have a \"server\" socket, put it in the potential_readers list. If it " +"comes out in the readable list, your ``accept`` will (almost certainly) " +"work. If you have created a new socket to ``connect`` to someone else, put " +"it in the potential_writers list. If it shows up in the writable list, you " +"have a decent chance that it has connected." +msgstr "" + +#: ../../howto/sockets.rst:374 +msgid "" +"Actually, ``select`` can be handy even with blocking sockets. It's one way " +"of determining whether you will block - the socket returns as readable when " +"there's something in the buffers. However, this still doesn't help with the " +"problem of determining whether the other end is done, or just busy with " +"something else." +msgstr "" + +#: ../../howto/sockets.rst:379 +msgid "" +"**Portability alert**: On Unix, ``select`` works both with the sockets and " +"files. Don't try this on Windows. On Windows, ``select`` works with sockets " +"only. Also note that in C, many of the more advanced socket options are done " +"differently on Windows. In fact, on Windows I usually use threads (which " +"work very, very well) with my sockets." +msgstr "" diff --git a/howto/urllib2.po b/howto/urllib2.po index 2762c828..594dabc7 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -29,6 +29,10 @@ msgstr "" msgid "Introduction" msgstr "Einführung" +#: ../../howto/urllib2.rst:10 +msgid "Related Articles" +msgstr "" + #: ../../howto/urllib2.rst:12 msgid "" "You may also find useful the following article on fetching web resources " diff --git a/howto/urllib2.po~ b/howto/urllib2.po~ new file mode 100644 index 00000000..2762c828 --- /dev/null +++ b/howto/urllib2.po~ @@ -0,0 +1,799 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../howto/urllib2.rst:5 +msgid "HOWTO Fetch Internet Resources Using The urllib Package" +msgstr "" + +#: ../../howto/urllib2.rst:8 +msgid "Introduction" +msgstr "Einführung" + +#: ../../howto/urllib2.rst:12 +msgid "" +"You may also find useful the following article on fetching web resources " +"with Python:" +msgstr "" + +#: ../../howto/urllib2.rst:15 +msgid "" +"`Basic Authentication `__" +msgstr "" + +#: ../../howto/urllib2.rst:17 +msgid "A tutorial on *Basic Authentication*, with examples in Python." +msgstr "" + +#: ../../howto/urllib2.rst:19 +msgid "" +"**urllib.request** is a Python module for fetching URLs (Uniform Resource " +"Locators). It offers a very simple interface, in the form of the *urlopen* " +"function. This is capable of fetching URLs using a variety of different " +"protocols. It also offers a slightly more complex interface for handling " +"common situations - like basic authentication, cookies, proxies and so on. " +"These are provided by objects called handlers and openers." +msgstr "" + +#: ../../howto/urllib2.rst:26 +msgid "" +"urllib.request supports fetching URLs for many \"URL schemes\" (identified " +"by the string before the ``\":\"`` in URL - for example ``\"ftp\"`` is the " +"URL scheme of ``\"ftp://python.org/\"``) using their associated network " +"protocols (e.g. FTP, HTTP). This tutorial focuses on the most common case, " +"HTTP." +msgstr "" + +#: ../../howto/urllib2.rst:31 +msgid "" +"For straightforward situations *urlopen* is very easy to use. But as soon as " +"you encounter errors or non-trivial cases when opening HTTP URLs, you will " +"need some understanding of the HyperText Transfer Protocol. The most " +"comprehensive and authoritative reference to HTTP is :rfc:`2616`. This is a " +"technical document and not intended to be easy to read. This HOWTO aims to " +"illustrate using *urllib*, with enough detail about HTTP to help you " +"through. It is not intended to replace the :mod:`urllib.request` docs, but " +"is supplementary to them." +msgstr "" + +#: ../../howto/urllib2.rst:41 +msgid "Fetching URLs" +msgstr "" + +#: ../../howto/urllib2.rst:43 +msgid "The simplest way to use urllib.request is as follows::" +msgstr "" + +#: ../../howto/urllib2.rst:45 +msgid "" +"import urllib.request\n" +"with urllib.request.urlopen('http://python.org/') as response:\n" +" html = response.read()" +msgstr "" + +#: ../../howto/urllib2.rst:49 +msgid "" +"If you wish to retrieve a resource via URL and store it in a temporary " +"location, you can do so via the :func:`shutil.copyfileobj` and :func:" +"`tempfile.NamedTemporaryFile` functions::" +msgstr "" + +#: ../../howto/urllib2.rst:53 +msgid "" +"import shutil\n" +"import tempfile\n" +"import urllib.request\n" +"\n" +"with urllib.request.urlopen('http://python.org/') as response:\n" +" with tempfile.NamedTemporaryFile(delete=False) as tmp_file:\n" +" shutil.copyfileobj(response, tmp_file)\n" +"\n" +"with open(tmp_file.name) as html:\n" +" pass" +msgstr "" + +#: ../../howto/urllib2.rst:64 +msgid "" +"Many uses of urllib will be that simple (note that instead of an 'http:' URL " +"we could have used a URL starting with 'ftp:', 'file:', etc.). However, " +"it's the purpose of this tutorial to explain the more complicated cases, " +"concentrating on HTTP." +msgstr "" + +#: ../../howto/urllib2.rst:69 +msgid "" +"HTTP is based on requests and responses - the client makes requests and " +"servers send responses. urllib.request mirrors this with a ``Request`` " +"object which represents the HTTP request you are making. In its simplest " +"form you create a Request object that specifies the URL you want to fetch. " +"Calling ``urlopen`` with this Request object returns a response object for " +"the URL requested. This response is a file-like object, which means you can " +"for example call ``.read()`` on the response::" +msgstr "" + +#: ../../howto/urllib2.rst:77 +msgid "" +"import urllib.request\n" +"\n" +"req = urllib.request.Request('http://python.org/')\n" +"with urllib.request.urlopen(req) as response:\n" +" the_page = response.read()" +msgstr "" + +#: ../../howto/urllib2.rst:83 +msgid "" +"Note that urllib.request makes use of the same Request interface to handle " +"all URL schemes. For example, you can make an FTP request like so::" +msgstr "" + +#: ../../howto/urllib2.rst:86 +msgid "req = urllib.request.Request('ftp://example.com/')" +msgstr "" + +#: ../../howto/urllib2.rst:88 +msgid "" +"In the case of HTTP, there are two extra things that Request objects allow " +"you to do: First, you can pass data to be sent to the server. Second, you " +"can pass extra information (\"metadata\") *about* the data or about the " +"request itself, to the server - this information is sent as HTTP " +"\"headers\". Let's look at each of these in turn." +msgstr "" + +#: ../../howto/urllib2.rst:95 +msgid "Data" +msgstr "" + +#: ../../howto/urllib2.rst:97 +msgid "" +"Sometimes you want to send data to a URL (often the URL will refer to a CGI " +"(Common Gateway Interface) script or other web application). With HTTP, this " +"is often done using what's known as a **POST** request. This is often what " +"your browser does when you submit a HTML form that you filled in on the web. " +"Not all POSTs have to come from forms: you can use a POST to transmit " +"arbitrary data to your own application. In the common case of HTML forms, " +"the data needs to be encoded in a standard way, and then passed to the " +"Request object as the ``data`` argument. The encoding is done using a " +"function from the :mod:`urllib.parse` library. ::" +msgstr "" + +#: ../../howto/urllib2.rst:107 +msgid "" +"import urllib.parse\n" +"import urllib.request\n" +"\n" +"url = 'http://www.someserver.com/cgi-bin/register.cgi'\n" +"values = {'name' : 'Michael Foord',\n" +" 'location' : 'Northampton',\n" +" 'language' : 'Python' }\n" +"\n" +"data = urllib.parse.urlencode(values)\n" +"data = data.encode('ascii') # data should be bytes\n" +"req = urllib.request.Request(url, data)\n" +"with urllib.request.urlopen(req) as response:\n" +" the_page = response.read()" +msgstr "" + +#: ../../howto/urllib2.rst:121 +msgid "" +"Note that other encodings are sometimes required (e.g. for file upload from " +"HTML forms - see `HTML Specification, Form Submission `_ for more details)." +msgstr "" + +#: ../../howto/urllib2.rst:126 +msgid "" +"If you do not pass the ``data`` argument, urllib uses a **GET** request. One " +"way in which GET and POST requests differ is that POST requests often have " +"\"side-effects\": they change the state of the system in some way (for " +"example by placing an order with the website for a hundredweight of tinned " +"spam to be delivered to your door). Though the HTTP standard makes it clear " +"that POSTs are intended to *always* cause side-effects, and GET requests " +"*never* to cause side-effects, nothing prevents a GET request from having " +"side-effects, nor a POST requests from having no side-effects. Data can also " +"be passed in an HTTP GET request by encoding it in the URL itself." +msgstr "" + +#: ../../howto/urllib2.rst:136 +msgid "This is done as follows::" +msgstr "" + +#: ../../howto/urllib2.rst:138 +msgid "" +">>> import urllib.request\n" +">>> import urllib.parse\n" +">>> data = {}\n" +">>> data['name'] = 'Somebody Here'\n" +">>> data['location'] = 'Northampton'\n" +">>> data['language'] = 'Python'\n" +">>> url_values = urllib.parse.urlencode(data)\n" +">>> print(url_values) # The order may differ from below.\n" +"name=Somebody+Here&language=Python&location=Northampton\n" +">>> url = 'http://www.example.com/example.cgi'\n" +">>> full_url = url + '?' + url_values\n" +">>> data = urllib.request.urlopen(full_url)" +msgstr "" + +#: ../../howto/urllib2.rst:151 +msgid "" +"Notice that the full URL is created by adding a ``?`` to the URL, followed " +"by the encoded values." +msgstr "" + +#: ../../howto/urllib2.rst:155 +msgid "Headers" +msgstr "" + +#: ../../howto/urllib2.rst:157 +msgid "" +"We'll discuss here one particular HTTP header, to illustrate how to add " +"headers to your HTTP request." +msgstr "" + +#: ../../howto/urllib2.rst:160 +msgid "" +"Some websites [#]_ dislike being browsed by programs, or send different " +"versions to different browsers [#]_. By default urllib identifies itself as " +"``Python-urllib/x.y`` (where ``x`` and ``y`` are the major and minor version " +"numbers of the Python release, e.g. ``Python-urllib/2.5``), which may " +"confuse the site, or just plain not work. The way a browser identifies " +"itself is through the ``User-Agent`` header [#]_. When you create a Request " +"object you can pass a dictionary of headers in. The following example makes " +"the same request as above, but identifies itself as a version of Internet " +"Explorer [#]_. ::" +msgstr "" + +#: ../../howto/urllib2.rst:171 +msgid "" +"import urllib.parse\n" +"import urllib.request\n" +"\n" +"url = 'http://www.someserver.com/cgi-bin/register.cgi'\n" +"user_agent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'\n" +"values = {'name': 'Michael Foord',\n" +" 'location': 'Northampton',\n" +" 'language': 'Python' }\n" +"headers = {'User-Agent': user_agent}\n" +"\n" +"data = urllib.parse.urlencode(values)\n" +"data = data.encode('ascii')\n" +"req = urllib.request.Request(url, data, headers)\n" +"with urllib.request.urlopen(req) as response:\n" +" the_page = response.read()" +msgstr "" + +#: ../../howto/urllib2.rst:187 +msgid "" +"The response also has two useful methods. See the section on `info and " +"geturl`_ which comes after we have a look at what happens when things go " +"wrong." +msgstr "" + +#: ../../howto/urllib2.rst:192 +msgid "Handling Exceptions" +msgstr "Behandlung von Ausnahmen" + +#: ../../howto/urllib2.rst:194 +msgid "" +"*urlopen* raises :exc:`~urllib.error.URLError` when it cannot handle a " +"response (though as usual with Python APIs, built-in exceptions such as :exc:" +"`ValueError`, :exc:`TypeError` etc. may also be raised)." +msgstr "" + +#: ../../howto/urllib2.rst:198 +msgid "" +":exc:`~urllib.error.HTTPError` is the subclass of :exc:`~urllib.error." +"URLError` raised in the specific case of HTTP URLs." +msgstr "" + +#: ../../howto/urllib2.rst:201 +msgid "The exception classes are exported from the :mod:`urllib.error` module." +msgstr "" + +#: ../../howto/urllib2.rst:204 +msgid "URLError" +msgstr "" + +#: ../../howto/urllib2.rst:206 +msgid "" +"Often, URLError is raised because there is no network connection (no route " +"to the specified server), or the specified server doesn't exist. In this " +"case, the exception raised will have a 'reason' attribute, which is a tuple " +"containing an error code and a text error message." +msgstr "" + +#: ../../howto/urllib2.rst:211 +msgid "e.g. ::" +msgstr "" + +#: ../../howto/urllib2.rst:213 +msgid "" +">>> req = urllib.request.Request('http://www.pretend_server.org')\n" +">>> try: urllib.request.urlopen(req)\n" +"... except urllib.error.URLError as e:\n" +"... print(e.reason)\n" +"...\n" +"(4, 'getaddrinfo failed')" +msgstr "" + +#: ../../howto/urllib2.rst:222 +msgid "HTTPError" +msgstr "" + +#: ../../howto/urllib2.rst:224 +msgid "" +"Every HTTP response from the server contains a numeric \"status code\". " +"Sometimes the status code indicates that the server is unable to fulfil the " +"request. The default handlers will handle some of these responses for you " +"(for example, if the response is a \"redirection\" that requests the client " +"fetch the document from a different URL, urllib will handle that for you). " +"For those it can't handle, urlopen will raise an :exc:`~urllib.error." +"HTTPError`. Typical errors include '404' (page not found), '403' (request " +"forbidden), and '401' (authentication required)." +msgstr "" + +#: ../../howto/urllib2.rst:232 +msgid "" +"See section 10 of :rfc:`2616` for a reference on all the HTTP error codes." +msgstr "" + +#: ../../howto/urllib2.rst:234 +msgid "" +"The :exc:`~urllib.error.HTTPError` instance raised will have an integer " +"'code' attribute, which corresponds to the error sent by the server." +msgstr "" + +#: ../../howto/urllib2.rst:238 +msgid "Error Codes" +msgstr "" + +#: ../../howto/urllib2.rst:240 +msgid "" +"Because the default handlers handle redirects (codes in the 300 range), and " +"codes in the 100--299 range indicate success, you will usually only see " +"error codes in the 400--599 range." +msgstr "" + +#: ../../howto/urllib2.rst:244 +msgid "" +":attr:`http.server.BaseHTTPRequestHandler.responses` is a useful dictionary " +"of response codes that shows all the response codes used by :rfc:`2616`. An " +"excerpt from the dictionary is shown below ::" +msgstr "" + +#: ../../howto/urllib2.rst:248 +msgid "" +"responses = {\n" +" ...\n" +" : ('OK', 'Request fulfilled, document follows'),\n" +" ...\n" +" : ('Forbidden',\n" +" 'Request forbidden -- authorization will " +"'\n" +" 'not help'),\n" +" : ('Not Found',\n" +" 'Nothing matches the given URI'),\n" +" ...\n" +" : (\"I'm a Teapot\",\n" +" 'Server refuses to brew coffee because " +"'\n" +" 'it is a teapot'),\n" +" ...\n" +" : ('Service Unavailable',\n" +" 'The server cannot process the " +"'\n" +" 'request due to a high load'),\n" +" ...\n" +" }" +msgstr "" + +#: ../../howto/urllib2.rst:268 +msgid "" +"When an error is raised the server responds by returning an HTTP error code " +"*and* an error page. You can use the :exc:`~urllib.error.HTTPError` instance " +"as a response on the page returned. This means that as well as the code " +"attribute, it also has read, geturl, and info, methods as returned by the " +"``urllib.response`` module::" +msgstr "" + +#: ../../howto/urllib2.rst:273 +msgid "" +">>> req = urllib.request.Request('http://www.python.org/fish.html')\n" +">>> try:\n" +"... urllib.request.urlopen(req)\n" +"... except urllib.error.HTTPError as e:\n" +"... print(e.code)\n" +"... print(e.read())\n" +"...\n" +"404\n" +"b'\\n\\n\\nPage Not Found\\n\n" +" ..." +msgstr "" + +#: ../../howto/urllib2.rst:288 +msgid "Wrapping it Up" +msgstr "" + +#: ../../howto/urllib2.rst:290 +msgid "" +"So if you want to be prepared for :exc:`~urllib.error.HTTPError` *or* :exc:" +"`~urllib.error.URLError` there are two basic approaches. I prefer the second " +"approach." +msgstr "" + +#: ../../howto/urllib2.rst:294 +msgid "Number 1" +msgstr "" + +#: ../../howto/urllib2.rst:299 +msgid "" +"from urllib.request import Request, urlopen\n" +"from urllib.error import URLError, HTTPError\n" +"req = Request(someurl)\n" +"try:\n" +" response = urlopen(req)\n" +"except HTTPError as e:\n" +" print('The server couldn\\'t fulfill the request.')\n" +" print('Error code: ', e.code)\n" +"except URLError as e:\n" +" print('We failed to reach a server.')\n" +" print('Reason: ', e.reason)\n" +"else:\n" +" # everything is fine" +msgstr "" + +#: ../../howto/urllib2.rst:316 +msgid "" +"The ``except HTTPError`` *must* come first, otherwise ``except URLError`` " +"will *also* catch an :exc:`~urllib.error.HTTPError`." +msgstr "" + +#: ../../howto/urllib2.rst:320 +msgid "Number 2" +msgstr "" + +#: ../../howto/urllib2.rst:324 +msgid "" +"from urllib.request import Request, urlopen\n" +"from urllib.error import URLError\n" +"req = Request(someurl)\n" +"try:\n" +" response = urlopen(req)\n" +"except URLError as e:\n" +" if hasattr(e, 'reason'):\n" +" print('We failed to reach a server.')\n" +" print('Reason: ', e.reason)\n" +" elif hasattr(e, 'code'):\n" +" print('The server couldn\\'t fulfill the request.')\n" +" print('Error code: ', e.code)\n" +"else:\n" +" # everything is fine" +msgstr "" + +#: ../../howto/urllib2.rst:341 +msgid "info and geturl" +msgstr "" + +#: ../../howto/urllib2.rst:343 +msgid "" +"The response returned by urlopen (or the :exc:`~urllib.error.HTTPError` " +"instance) has two useful methods :meth:`!info` and :meth:`!geturl` and is " +"defined in the module :mod:`urllib.response`." +msgstr "" + +#: ../../howto/urllib2.rst:347 +msgid "" +"**geturl** - this returns the real URL of the page fetched. This is useful " +"because ``urlopen`` (or the opener object used) may have followed a " +"redirect. The URL of the page fetched may not be the same as the URL " +"requested." +msgstr "" + +#: ../../howto/urllib2.rst:351 +msgid "" +"**info** - this returns a dictionary-like object that describes the page " +"fetched, particularly the headers sent by the server. It is currently an :" +"class:`http.client.HTTPMessage` instance." +msgstr "" + +#: ../../howto/urllib2.rst:355 +msgid "" +"Typical headers include 'Content-length', 'Content-type', and so on. See the " +"`Quick Reference to HTTP Headers `_ for a " +"useful listing of HTTP headers with brief explanations of their meaning and " +"use." +msgstr "" + +#: ../../howto/urllib2.rst:362 +msgid "Openers and Handlers" +msgstr "" + +#: ../../howto/urllib2.rst:364 +msgid "" +"When you fetch a URL you use an opener (an instance of the perhaps " +"confusingly named :class:`urllib.request.OpenerDirector`). Normally we have " +"been using the default opener - via ``urlopen`` - but you can create custom " +"openers. Openers use handlers. All the \"heavy lifting\" is done by the " +"handlers. Each handler knows how to open URLs for a particular URL scheme " +"(http, ftp, etc.), or how to handle an aspect of URL opening, for example " +"HTTP redirections or HTTP cookies." +msgstr "" + +#: ../../howto/urllib2.rst:372 +msgid "" +"You will want to create openers if you want to fetch URLs with specific " +"handlers installed, for example to get an opener that handles cookies, or to " +"get an opener that does not handle redirections." +msgstr "" + +#: ../../howto/urllib2.rst:376 +msgid "" +"To create an opener, instantiate an ``OpenerDirector``, and then call ``." +"add_handler(some_handler_instance)`` repeatedly." +msgstr "" + +#: ../../howto/urllib2.rst:379 +msgid "" +"Alternatively, you can use ``build_opener``, which is a convenience function " +"for creating opener objects with a single function call. ``build_opener`` " +"adds several handlers by default, but provides a quick way to add more and/" +"or override the default handlers." +msgstr "" + +#: ../../howto/urllib2.rst:384 +msgid "" +"Other sorts of handlers you might want to can handle proxies, " +"authentication, and other common but slightly specialised situations." +msgstr "" + +#: ../../howto/urllib2.rst:387 +msgid "" +"``install_opener`` can be used to make an ``opener`` object the (global) " +"default opener. This means that calls to ``urlopen`` will use the opener you " +"have installed." +msgstr "" + +#: ../../howto/urllib2.rst:391 +msgid "" +"Opener objects have an ``open`` method, which can be called directly to " +"fetch urls in the same way as the ``urlopen`` function: there's no need to " +"call ``install_opener``, except as a convenience." +msgstr "" + +#: ../../howto/urllib2.rst:397 +msgid "Basic Authentication" +msgstr "" + +#: ../../howto/urllib2.rst:399 +msgid "" +"To illustrate creating and installing a handler we will use the " +"``HTTPBasicAuthHandler``. For a more detailed discussion of this subject -- " +"including an explanation of how Basic Authentication works - see the `Basic " +"Authentication Tutorial `__." +msgstr "" + +#: ../../howto/urllib2.rst:405 +msgid "" +"When authentication is required, the server sends a header (as well as the " +"401 error code) requesting authentication. This specifies the " +"authentication scheme and a 'realm'. The header looks like: ``WWW-" +"Authenticate: SCHEME realm=\"REALM\"``." +msgstr "" + +#: ../../howto/urllib2.rst:410 +msgid "e.g." +msgstr "" + +#: ../../howto/urllib2.rst:412 +msgid "WWW-Authenticate: Basic realm=\"cPanel Users\"" +msgstr "" + +#: ../../howto/urllib2.rst:417 +msgid "" +"The client should then retry the request with the appropriate name and " +"password for the realm included as a header in the request. This is 'basic " +"authentication'. In order to simplify this process we can create an instance " +"of ``HTTPBasicAuthHandler`` and an opener to use this handler." +msgstr "" + +#: ../../howto/urllib2.rst:422 +msgid "" +"The ``HTTPBasicAuthHandler`` uses an object called a password manager to " +"handle the mapping of URLs and realms to passwords and usernames. If you " +"know what the realm is (from the authentication header sent by the server), " +"then you can use a ``HTTPPasswordMgr``. Frequently one doesn't care what the " +"realm is. In that case, it is convenient to use " +"``HTTPPasswordMgrWithDefaultRealm``. This allows you to specify a default " +"username and password for a URL. This will be supplied in the absence of you " +"providing an alternative combination for a specific realm. We indicate this " +"by providing ``None`` as the realm argument to the ``add_password`` method." +msgstr "" + +#: ../../howto/urllib2.rst:432 +msgid "" +"The top-level URL is the first URL that requires authentication. URLs " +"\"deeper\" than the URL you pass to .add_password() will also match. ::" +msgstr "" + +#: ../../howto/urllib2.rst:435 +msgid "" +"# create a password manager\n" +"password_mgr = urllib.request.HTTPPasswordMgrWithDefaultRealm()\n" +"\n" +"# Add the username and password.\n" +"# If we knew the realm, we could use it instead of None.\n" +"top_level_url = \"http://example.com/foo/\"\n" +"password_mgr.add_password(None, top_level_url, username, password)\n" +"\n" +"handler = urllib.request.HTTPBasicAuthHandler(password_mgr)\n" +"\n" +"# create \"opener\" (OpenerDirector instance)\n" +"opener = urllib.request.build_opener(handler)\n" +"\n" +"# use the opener to fetch a URL\n" +"opener.open(a_url)\n" +"\n" +"# Install the opener.\n" +"# Now all calls to urllib.request.urlopen use our opener.\n" +"urllib.request.install_opener(opener)" +msgstr "" + +#: ../../howto/urllib2.rst:457 +msgid "" +"In the above example we only supplied our ``HTTPBasicAuthHandler`` to " +"``build_opener``. By default openers have the handlers for normal situations " +"-- ``ProxyHandler`` (if a proxy setting such as an :envvar:`!http_proxy` " +"environment variable is set), ``UnknownHandler``, ``HTTPHandler``, " +"``HTTPDefaultErrorHandler``, ``HTTPRedirectHandler``, ``FTPHandler``, " +"``FileHandler``, ``DataHandler``, ``HTTPErrorProcessor``." +msgstr "" + +#: ../../howto/urllib2.rst:464 +msgid "" +"``top_level_url`` is in fact *either* a full URL (including the 'http:' " +"scheme component and the hostname and optionally the port number) e.g. " +"``\"http://example.com/\"`` *or* an \"authority\" (i.e. the hostname, " +"optionally including the port number) e.g. ``\"example.com\"`` or " +"``\"example.com:8080\"`` (the latter example includes a port number). The " +"authority, if present, must NOT contain the \"userinfo\" component - for " +"example ``\"joe:password@example.com\"`` is not correct." +msgstr "" + +#: ../../howto/urllib2.rst:474 +msgid "Proxies" +msgstr "" + +#: ../../howto/urllib2.rst:476 +msgid "" +"**urllib** will auto-detect your proxy settings and use those. This is " +"through the ``ProxyHandler``, which is part of the normal handler chain when " +"a proxy setting is detected. Normally that's a good thing, but there are " +"occasions when it may not be helpful [#]_. One way to do this is to setup " +"our own ``ProxyHandler``, with no proxies defined. This is done using " +"similar steps to setting up a `Basic Authentication`_ handler: ::" +msgstr "" + +#: ../../howto/urllib2.rst:483 +msgid "" +">>> proxy_support = urllib.request.ProxyHandler({})\n" +">>> opener = urllib.request.build_opener(proxy_support)\n" +">>> urllib.request.install_opener(opener)" +msgstr "" + +#: ../../howto/urllib2.rst:489 +msgid "" +"Currently ``urllib.request`` *does not* support fetching of ``https`` " +"locations through a proxy. However, this can be enabled by extending urllib." +"request as shown in the recipe [#]_." +msgstr "" + +#: ../../howto/urllib2.rst:495 +msgid "" +"``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see " +"the documentation on :func:`~urllib.request.getproxies`." +msgstr "" + +#: ../../howto/urllib2.rst:500 +msgid "Sockets and Layers" +msgstr "" + +#: ../../howto/urllib2.rst:502 +msgid "" +"The Python support for fetching resources from the web is layered. urllib " +"uses the :mod:`http.client` library, which in turn uses the socket library." +msgstr "" + +#: ../../howto/urllib2.rst:505 +msgid "" +"As of Python 2.3 you can specify how long a socket should wait for a " +"response before timing out. This can be useful in applications which have to " +"fetch web pages. By default the socket module has *no timeout* and can hang. " +"Currently, the socket timeout is not exposed at the http.client or urllib." +"request levels. However, you can set the default timeout globally for all " +"sockets using ::" +msgstr "" + +#: ../../howto/urllib2.rst:511 +msgid "" +"import socket\n" +"import urllib.request\n" +"\n" +"# timeout in seconds\n" +"timeout = 10\n" +"socket.setdefaulttimeout(timeout)\n" +"\n" +"# this call to urllib.request.urlopen now uses the default timeout\n" +"# we have set in the socket module\n" +"req = urllib.request.Request('http://www.voidspace.org.uk')\n" +"response = urllib.request.urlopen(req)" +msgstr "" + +#: ../../howto/urllib2.rst:528 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../howto/urllib2.rst:530 +msgid "This document was reviewed and revised by John Lee." +msgstr "" + +#: ../../howto/urllib2.rst:532 +msgid "Google for example." +msgstr "" + +#: ../../howto/urllib2.rst:533 +msgid "" +"Browser sniffing is a very bad practice for website design - building sites " +"using web standards is much more sensible. Unfortunately a lot of sites " +"still send different versions to different browsers." +msgstr "" + +#: ../../howto/urllib2.rst:536 +msgid "" +"The user agent for MSIE 6 is *'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT " +"5.1; SV1; .NET CLR 1.1.4322)'*" +msgstr "" + +#: ../../howto/urllib2.rst:538 +msgid "" +"For details of more HTTP request headers, see `Quick Reference to HTTP " +"Headers`_." +msgstr "" + +#: ../../howto/urllib2.rst:540 +msgid "" +"In my case I have to use a proxy to access the internet at work. If you " +"attempt to fetch *localhost* URLs through this proxy it blocks them. IE is " +"set to use the proxy, which urllib picks up on. In order to test scripts " +"with a localhost server, I have to prevent urllib from using the proxy." +msgstr "" + +#: ../../howto/urllib2.rst:545 +msgid "" +"urllib opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe `_." +msgstr "" diff --git a/library/argparse.po b/library/argparse.po index 1fe50a41..fe9ebffe 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -44,7 +44,7 @@ msgid "" "another defined option)." msgstr "" -#: ../../library/argparse.rst:-1 +#: ../../library/argparse.rst:25 msgid "Tutorial" msgstr "" @@ -1213,10 +1213,13 @@ msgid "" msgstr "" #: ../../library/argparse.rst:838 -msgid "Note, the *default* will be ``None`` unless explicitly set to *0*." +msgid "" +"Unless explicitly set, the *default* will be ``None``. If the default value " +"is a non-zero number, the count starts from that number rather than from " +"zero." msgstr "" -#: ../../library/argparse.rst:840 +#: ../../library/argparse.rst:842 msgid "" "``'help'`` - This prints a complete help message for all the options in the " "current parser and then exits. By default a help action is automatically " @@ -1224,14 +1227,14 @@ msgid "" "output is created." msgstr "" -#: ../../library/argparse.rst:845 +#: ../../library/argparse.rst:847 msgid "" "``'version'`` - This expects a ``version=`` keyword argument in the :meth:" "`~ArgumentParser.add_argument` call, and prints version information and " "exits when invoked::" msgstr "" -#: ../../library/argparse.rst:849 +#: ../../library/argparse.rst:851 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" @@ -1241,7 +1244,7 @@ msgid "" "PROG 2.0" msgstr "" -#: ../../library/argparse.rst:855 +#: ../../library/argparse.rst:857 msgid "" "You may also specify an arbitrary action by passing an :class:`Action` " "subclass (e.g. :class:`BooleanOptionalAction`) or other object that " @@ -1250,7 +1253,7 @@ msgid "" "with non-zero ``nargs``) can be used with positional arguments." msgstr "" -#: ../../library/argparse.rst:861 +#: ../../library/argparse.rst:863 msgid "" "The recommended way to create a custom action is to extend :class:`Action`, " "overriding the :meth:`!__call__` method and optionally the :meth:`!__init__` " @@ -1259,11 +1262,11 @@ msgid "" "their registered name." msgstr "" -#: ../../library/argparse.rst:866 +#: ../../library/argparse.rst:868 msgid "An example of a custom action::" msgstr "" -#: ../../library/argparse.rst:868 +#: ../../library/argparse.rst:870 msgid "" ">>> class FooAction(argparse.Action):\n" "... def __init__(self, option_strings, dest, nargs=None, **kwargs):\n" @@ -1284,15 +1287,15 @@ msgid "" "Namespace(bar='1', foo='2')" msgstr "" -#: ../../library/argparse.rst:886 +#: ../../library/argparse.rst:888 msgid "For more details, see :class:`Action`." msgstr "" -#: ../../library/argparse.rst:892 +#: ../../library/argparse.rst:894 msgid "nargs" msgstr "" -#: ../../library/argparse.rst:894 +#: ../../library/argparse.rst:896 msgid "" ":class:`ArgumentParser` objects usually associate a single command-line " "argument with a single action to be taken. The ``nargs`` keyword argument " @@ -1301,13 +1304,13 @@ msgid "" "are:" msgstr "" -#: ../../library/argparse.rst:899 +#: ../../library/argparse.rst:901 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" msgstr "" -#: ../../library/argparse.rst:902 +#: ../../library/argparse.rst:904 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs=2)\n" @@ -1316,13 +1319,13 @@ msgid "" "Namespace(bar=['c'], foo=['a', 'b'])" msgstr "" -#: ../../library/argparse.rst:908 +#: ../../library/argparse.rst:910 msgid "" "Note that ``nargs=1`` produces a list of one item. This is different from " "the default, in which the item is produced by itself." msgstr "" -#: ../../library/argparse.rst:913 +#: ../../library/argparse.rst:915 msgid "" "``'?'``. One argument will be consumed from the command line if possible, " "and produced as a single item. If no command-line argument is present, the " @@ -1332,7 +1335,7 @@ msgid "" "produced. Some examples to illustrate this::" msgstr "" -#: ../../library/argparse.rst:920 +#: ../../library/argparse.rst:922 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs='?', const='c', default='d')\n" @@ -1345,13 +1348,13 @@ msgid "" "Namespace(bar='d', foo='d')" msgstr "" -#: ../../library/argparse.rst:930 +#: ../../library/argparse.rst:932 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" msgstr "" -#: ../../library/argparse.rst:933 +#: ../../library/argparse.rst:935 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('infile', nargs='?')\n" @@ -1364,7 +1367,7 @@ msgid "" "Namespace(infile=None, outfile=None)" msgstr "" -#: ../../library/argparse.rst:945 +#: ../../library/argparse.rst:947 msgid "" "``'*'``. All command-line arguments present are gathered into a list. Note " "that it generally doesn't make much sense to have more than one positional " @@ -1372,7 +1375,7 @@ msgid "" "``nargs='*'`` is possible. For example::" msgstr "" -#: ../../library/argparse.rst:950 +#: ../../library/argparse.rst:952 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', nargs='*')\n" @@ -1382,14 +1385,14 @@ msgid "" "Namespace(bar=['1', '2'], baz=['a', 'b'], foo=['x', 'y'])" msgstr "" -#: ../../library/argparse.rst:959 +#: ../../library/argparse.rst:961 msgid "" "``'+'``. Just like ``'*'``, all command-line arguments present are gathered " "into a list. Additionally, an error message will be generated if there " "wasn't at least one command-line argument present. For example::" msgstr "" -#: ../../library/argparse.rst:963 +#: ../../library/argparse.rst:965 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('foo', nargs='+')\n" @@ -1400,7 +1403,7 @@ msgid "" "PROG: error: the following arguments are required: foo" msgstr "" -#: ../../library/argparse.rst:971 +#: ../../library/argparse.rst:973 msgid "" "If the ``nargs`` keyword argument is not provided, the number of arguments " "consumed is determined by the action_. Generally this means a single " @@ -1409,11 +1412,11 @@ msgid "" "``'store_const'``) set ``nargs=0``." msgstr "" -#: ../../library/argparse.rst:981 +#: ../../library/argparse.rst:983 msgid "const" msgstr "" -#: ../../library/argparse.rst:983 +#: ../../library/argparse.rst:985 msgid "" "The ``const`` argument of :meth:`~ArgumentParser.add_argument` is used to " "hold constant values that are not read from the command line but are " @@ -1421,7 +1424,7 @@ msgid "" "common uses of it are:" msgstr "" -#: ../../library/argparse.rst:987 +#: ../../library/argparse.rst:989 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='store_const'`` or ``action='append_const'``. These actions add " @@ -1431,7 +1434,7 @@ msgid "" "receive a default value of ``None``." msgstr "" -#: ../../library/argparse.rst:995 +#: ../../library/argparse.rst:997 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with option strings " "(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " @@ -1441,17 +1444,17 @@ msgid "" "See the nargs_ description for examples." msgstr "" -#: ../../library/argparse.rst:1002 +#: ../../library/argparse.rst:1004 msgid "" "``const=None`` by default, including when ``action='append_const'`` or " "``action='store_const'``." msgstr "" -#: ../../library/argparse.rst:1009 +#: ../../library/argparse.rst:1011 msgid "default" msgstr "Standard" -#: ../../library/argparse.rst:1011 +#: ../../library/argparse.rst:1013 msgid "" "All optional arguments and some positional arguments may be omitted at the " "command line. The ``default`` keyword argument of :meth:`~ArgumentParser." @@ -1461,7 +1464,7 @@ msgid "" "command line::" msgstr "" -#: ../../library/argparse.rst:1018 +#: ../../library/argparse.rst:1020 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=42)\n" @@ -1471,13 +1474,13 @@ msgid "" "Namespace(foo=42)" msgstr "" -#: ../../library/argparse.rst:1025 +#: ../../library/argparse.rst:1027 msgid "" "If the target namespace already has an attribute set, the action *default* " "will not overwrite it::" msgstr "" -#: ../../library/argparse.rst:1028 +#: ../../library/argparse.rst:1030 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=42)\n" @@ -1485,7 +1488,7 @@ msgid "" "Namespace(foo=101)" msgstr "" -#: ../../library/argparse.rst:1033 +#: ../../library/argparse.rst:1035 msgid "" "If the ``default`` value is a string, the parser parses the value as if it " "were a command-line argument. In particular, the parser applies any type_ " @@ -1493,7 +1496,7 @@ msgid "" "`Namespace` return value. Otherwise, the parser uses the value as is::" msgstr "" -#: ../../library/argparse.rst:1038 +#: ../../library/argparse.rst:1040 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--length', default='10', type=int)\n" @@ -1502,13 +1505,13 @@ msgid "" "Namespace(length=10, width=10.5)" msgstr "" -#: ../../library/argparse.rst:1044 +#: ../../library/argparse.rst:1046 msgid "" "For positional arguments with nargs_ equal to ``?`` or ``*``, the " "``default`` value is used when no command-line argument was present::" msgstr "" -#: ../../library/argparse.rst:1047 +#: ../../library/argparse.rst:1049 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('foo', nargs='?', default=42)\n" @@ -1518,27 +1521,27 @@ msgid "" "Namespace(foo=42)" msgstr "" -#: ../../library/argparse.rst:1054 +#: ../../library/argparse.rst:1056 msgid "" "Because ``nargs='*'`` gathers any supplied values into a list, an absent " "positional argument yields an empty list (``[]``). Only a non-``None`` " "*default* overrides this (so ``default=None`` still gives ``[]``)." msgstr "" -#: ../../library/argparse.rst:1058 +#: ../../library/argparse.rst:1060 msgid "" "For required_ arguments, the ``default`` value is ignored. For example, this " "applies to positional arguments with nargs_ values other than ``?`` or " "``*``, or optional arguments marked as ``required=True``." msgstr "" -#: ../../library/argparse.rst:1062 +#: ../../library/argparse.rst:1064 msgid "" "Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " "the command-line argument was not present::" msgstr "" -#: ../../library/argparse.rst:1065 +#: ../../library/argparse.rst:1067 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default=argparse.SUPPRESS)\n" @@ -1548,11 +1551,11 @@ msgid "" "Namespace(foo='1')" msgstr "" -#: ../../library/argparse.rst:1076 +#: ../../library/argparse.rst:1078 msgid "type" msgstr "Typ" -#: ../../library/argparse.rst:1078 +#: ../../library/argparse.rst:1080 msgid "" "By default, the parser reads command-line arguments in as simple strings. " "However, quite often the command-line string should instead be interpreted " @@ -1561,13 +1564,13 @@ msgid "" "checking and type conversions to be performed." msgstr "" -#: ../../library/argparse.rst:1084 +#: ../../library/argparse.rst:1086 msgid "" "If the type_ keyword is used with the default_ keyword, the type converter " "is only applied if the default is a string." msgstr "" -#: ../../library/argparse.rst:1087 +#: ../../library/argparse.rst:1089 msgid "" "The argument to ``type`` can be a callable that accepts a single string or " "the name of a registered type (see :meth:`~ArgumentParser.register`) If the " @@ -1576,11 +1579,11 @@ msgid "" "is displayed. Other exception types are not handled." msgstr "" -#: ../../library/argparse.rst:1093 +#: ../../library/argparse.rst:1095 msgid "Common built-in types and functions can be used as type converters:" msgstr "" -#: ../../library/argparse.rst:1095 +#: ../../library/argparse.rst:1097 msgid "" "import argparse\n" "import pathlib\n" @@ -1593,11 +1596,11 @@ msgid "" "parser.add_argument('datapath', type=pathlib.Path)" msgstr "" -#: ../../library/argparse.rst:1107 +#: ../../library/argparse.rst:1109 msgid "User defined functions can be used as well:" msgstr "" -#: ../../library/argparse.rst:1109 +#: ../../library/argparse.rst:1111 msgid "" ">>> def hyphenated(string):\n" "... return '-'.join([word[:4] for word in string.casefold().split()])\n" @@ -1608,14 +1611,14 @@ msgid "" "Namespace(short_title='\"the-tale-of-two-citi')" msgstr "" -#: ../../library/argparse.rst:1119 +#: ../../library/argparse.rst:1121 msgid "" "The :func:`bool` function is not recommended as a type converter. All it " "does is convert empty strings to ``False`` and non-empty strings to " "``True``. This is usually not what is desired::" msgstr "" -#: ../../library/argparse.rst:1123 +#: ../../library/argparse.rst:1125 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> _ = parser.add_argument('--verbose', type=bool)\n" @@ -1623,13 +1626,13 @@ msgid "" "Namespace(verbose=True)" msgstr "" -#: ../../library/argparse.rst:1128 +#: ../../library/argparse.rst:1130 msgid "" "See :class:`BooleanOptionalAction` or ``action='store_true'`` for common " "alternatives." msgstr "" -#: ../../library/argparse.rst:1131 +#: ../../library/argparse.rst:1133 msgid "" "In general, the ``type`` keyword is a convenience that should only be used " "for simple conversions that can only raise one of the three supported " @@ -1637,7 +1640,7 @@ msgid "" "management should be done downstream after the arguments are parsed." msgstr "" -#: ../../library/argparse.rst:1136 +#: ../../library/argparse.rst:1138 msgid "" "For example, JSON or YAML conversions have complex error cases that require " "better reporting than can be given by the ``type`` keyword. A :exc:`~json." @@ -1645,7 +1648,7 @@ msgid "" "exception would not be handled at all." msgstr "" -#: ../../library/argparse.rst:1141 +#: ../../library/argparse.rst:1143 msgid "" "Even :class:`~argparse.FileType` has its limitations for use with the " "``type`` keyword. If one argument uses :class:`~argparse.FileType` and then " @@ -1655,17 +1658,17 @@ msgid "" "files." msgstr "" -#: ../../library/argparse.rst:1148 +#: ../../library/argparse.rst:1150 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." msgstr "" -#: ../../library/argparse.rst:1155 +#: ../../library/argparse.rst:1157 msgid "choices" msgstr "" -#: ../../library/argparse.rst:1157 +#: ../../library/argparse.rst:1159 msgid "" "Some command-line arguments should be selected from a restricted set of " "values. These can be handled by passing a sequence object as the *choices* " @@ -1674,7 +1677,7 @@ msgid "" "be displayed if the argument was not one of the acceptable values::" msgstr "" -#: ../../library/argparse.rst:1163 +#: ../../library/argparse.rst:1165 msgid "" ">>> parser = argparse.ArgumentParser(prog='game.py')\n" ">>> parser.add_argument('move', choices=['rock', 'paper', 'scissors'])\n" @@ -1686,33 +1689,33 @@ msgid "" "'paper', 'scissors')" msgstr "" -#: ../../library/argparse.rst:1172 +#: ../../library/argparse.rst:1174 msgid "" "Any sequence can be passed as the *choices* value, so :class:`list` " "objects, :class:`tuple` objects, and custom sequences are all supported." msgstr "" -#: ../../library/argparse.rst:1175 +#: ../../library/argparse.rst:1177 msgid "" "Use of :class:`enum.Enum` is not recommended because it is difficult to " "control its appearance in usage, help, and error messages." msgstr "" -#: ../../library/argparse.rst:1178 +#: ../../library/argparse.rst:1180 msgid "" "Note that *choices* are checked after any type_ conversions have been " "performed, so objects in *choices* should match the type_ specified. This " "can make *choices* appear unfamiliar in usage, help, or error messages." msgstr "" -#: ../../library/argparse.rst:1183 +#: ../../library/argparse.rst:1185 msgid "" "To keep *choices* user-friendly, consider a custom type wrapper that " "converts and formats values, or omit type_ and handle conversion in your " "application code." msgstr "" -#: ../../library/argparse.rst:1187 +#: ../../library/argparse.rst:1189 msgid "" "Formatted choices override the default *metavar* which is normally derived " "from *dest*. This is usually what you want because the user never sees the " @@ -1720,11 +1723,11 @@ msgid "" "are many choices), just specify an explicit metavar_." msgstr "" -#: ../../library/argparse.rst:1196 +#: ../../library/argparse.rst:1198 msgid "required" msgstr "" -#: ../../library/argparse.rst:1198 +#: ../../library/argparse.rst:1200 msgid "" "In general, the :mod:`!argparse` module assumes that flags like ``-f`` and " "``--bar`` indicate *optional* arguments, which can always be omitted at the " @@ -1732,7 +1735,7 @@ msgid "" "the ``required=`` keyword argument to :meth:`~ArgumentParser.add_argument`::" msgstr "" -#: ../../library/argparse.rst:1203 +#: ../../library/argparse.rst:1205 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', required=True)\n" @@ -1743,24 +1746,24 @@ msgid "" ": error: the following arguments are required: --foo" msgstr "" -#: ../../library/argparse.rst:1211 +#: ../../library/argparse.rst:1213 msgid "" "As the example shows, if an option is marked as ``required``, :meth:" "`~ArgumentParser.parse_args` will report an error if that option is not " "present at the command line." msgstr "" -#: ../../library/argparse.rst:1217 +#: ../../library/argparse.rst:1219 msgid "" "Required options are generally considered bad form because users expect " "*options* to be *optional*, and thus they should be avoided when possible." msgstr "" -#: ../../library/argparse.rst:1224 +#: ../../library/argparse.rst:1226 msgid "help" msgstr "" -#: ../../library/argparse.rst:1226 +#: ../../library/argparse.rst:1228 msgid "" "The ``help`` value is a string containing a brief description of the " "argument. When a user requests help (usually by using ``-h`` or ``--help`` " @@ -1768,7 +1771,7 @@ msgid "" "each argument." msgstr "" -#: ../../library/argparse.rst:1231 +#: ../../library/argparse.rst:1233 msgid "" "The ``help`` strings can include various format specifiers to avoid " "repetition of things like the program name or the argument default_. The " @@ -1777,7 +1780,7 @@ msgid "" "``%(type)s``, etc.::" msgstr "" -#: ../../library/argparse.rst:1236 +#: ../../library/argparse.rst:1238 msgid "" ">>> parser = argparse.ArgumentParser(prog='frobble')\n" ">>> parser.add_argument('bar', nargs='?', type=int, default=42,\n" @@ -1792,19 +1795,19 @@ msgid "" " -h, --help show this help message and exit" msgstr "" -#: ../../library/argparse.rst:1248 +#: ../../library/argparse.rst:1250 msgid "" "As the help string supports %-formatting, if you want a literal ``%`` to " "appear in the help string, you must escape it as ``%%``." msgstr "" -#: ../../library/argparse.rst:1251 +#: ../../library/argparse.rst:1253 msgid "" ":mod:`!argparse` supports silencing the help entry for certain options, by " "setting the ``help`` value to ``argparse.SUPPRESS``::" msgstr "" -#: ../../library/argparse.rst:1254 +#: ../../library/argparse.rst:1256 msgid "" ">>> parser = argparse.ArgumentParser(prog='frobble')\n" ">>> parser.add_argument('--foo', help=argparse.SUPPRESS)\n" @@ -1815,11 +1818,11 @@ msgid "" " -h, --help show this help message and exit" msgstr "" -#: ../../library/argparse.rst:1266 +#: ../../library/argparse.rst:1268 msgid "metavar" msgstr "" -#: ../../library/argparse.rst:1268 +#: ../../library/argparse.rst:1270 msgid "" "When :class:`ArgumentParser` generates help messages, it needs some way to " "refer to each expected argument. By default, :class:`!ArgumentParser` " @@ -1831,7 +1834,7 @@ msgid "" "command-line argument will be referred to as ``FOO``. An example::" msgstr "" -#: ../../library/argparse.rst:1277 +#: ../../library/argparse.rst:1279 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -1849,11 +1852,11 @@ msgid "" " --foo FOO" msgstr "" -#: ../../library/argparse.rst:1292 +#: ../../library/argparse.rst:1294 msgid "An alternative name can be specified with ``metavar``::" msgstr "" -#: ../../library/argparse.rst:1294 +#: ../../library/argparse.rst:1296 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', metavar='YYY')\n" @@ -1871,21 +1874,21 @@ msgid "" " --foo YYY" msgstr "" -#: ../../library/argparse.rst:1309 +#: ../../library/argparse.rst:1311 msgid "" "Note that ``metavar`` only changes the *displayed* name - the name of the " "attribute on the :meth:`~ArgumentParser.parse_args` object is still " "determined by the dest_ value." msgstr "" -#: ../../library/argparse.rst:1313 +#: ../../library/argparse.rst:1315 msgid "" "Different values of ``nargs`` may cause the metavar to be used multiple " "times. Providing a tuple to ``metavar`` specifies a different display for " "each of the arguments::" msgstr "" -#: ../../library/argparse.rst:1317 +#: ../../library/argparse.rst:1319 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x', nargs=2)\n" @@ -1899,11 +1902,11 @@ msgid "" " --foo bar baz" msgstr "" -#: ../../library/argparse.rst:1332 +#: ../../library/argparse.rst:1334 msgid "dest" msgstr "" -#: ../../library/argparse.rst:1334 +#: ../../library/argparse.rst:1336 msgid "" "Most :class:`ArgumentParser` actions add some value as an attribute of the " "object returned by :meth:`~ArgumentParser.parse_args`. The name of this " @@ -1913,7 +1916,7 @@ msgid "" "add_argument`::" msgstr "" -#: ../../library/argparse.rst:1341 +#: ../../library/argparse.rst:1343 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('bar')\n" @@ -1921,7 +1924,7 @@ msgid "" "Namespace(bar='XXX')" msgstr "" -#: ../../library/argparse.rst:1346 +#: ../../library/argparse.rst:1348 msgid "" "For optional argument actions, the value of ``dest`` is normally inferred " "from the option strings. :class:`ArgumentParser` generates the value of " @@ -1935,7 +1938,7 @@ msgid "" "a valid attribute name. The examples below illustrate this behavior::" msgstr "" -#: ../../library/argparse.rst:1359 +#: ../../library/argparse.rst:1361 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('-f', '--foo-bar', '--foo')\n" @@ -1947,11 +1950,11 @@ msgid "" "Namespace(foo_bar='1', quz='2', x='2')" msgstr "" -#: ../../library/argparse.rst:1368 +#: ../../library/argparse.rst:1370 msgid "``dest`` allows a custom attribute name to be provided::" msgstr "" -#: ../../library/argparse.rst:1370 +#: ../../library/argparse.rst:1372 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', dest='bar')\n" @@ -1959,7 +1962,7 @@ msgid "" "Namespace(bar='XXX')" msgstr "" -#: ../../library/argparse.rst:1375 +#: ../../library/argparse.rst:1377 msgid "" "Multiple arguments may share the same ``dest``. By default, the value from " "the last such argument given on the command line wins. Use " @@ -1968,15 +1971,15 @@ msgid "" "conflict_handler_." msgstr "" -#: ../../library/argparse.rst:1380 +#: ../../library/argparse.rst:1382 msgid "Single-dash long option now takes precedence over short options." msgstr "" -#: ../../library/argparse.rst:1387 +#: ../../library/argparse.rst:1389 msgid "deprecated" msgstr "" -#: ../../library/argparse.rst:1389 +#: ../../library/argparse.rst:1391 msgid "" "During a project's lifetime, some arguments may need to be removed from the " "command line. Before removing them, you should inform your users that the " @@ -1987,7 +1990,7 @@ msgid "" "will be printed to :data:`sys.stderr` when the argument is used::" msgstr "" -#: ../../library/argparse.rst:1399 +#: ../../library/argparse.rst:1401 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser(prog='snake.py')\n" @@ -1999,11 +2002,11 @@ msgid "" "Namespace(legs=4)" msgstr "" -#: ../../library/argparse.rst:1412 +#: ../../library/argparse.rst:1414 msgid "Action classes" msgstr "" -#: ../../library/argparse.rst:1414 +#: ../../library/argparse.rst:1416 msgid "" ":class:`!Action` classes implement the Action API, a callable which returns " "a callable which processes arguments from the command-line. Any object which " @@ -2011,7 +2014,7 @@ msgid "" "`~ArgumentParser.add_argument`." msgstr "" -#: ../../library/argparse.rst:1423 +#: ../../library/argparse.rst:1425 msgid "" ":class:`!Action` objects are used by an :class:`ArgumentParser` to represent " "the information needed to parse a single argument from one or more strings " @@ -2020,7 +2023,7 @@ msgid "" "`ArgumentParser.add_argument` except for the ``action`` itself." msgstr "" -#: ../../library/argparse.rst:1429 +#: ../../library/argparse.rst:1431 msgid "" "Instances of :class:`!Action` (or return value of any callable to the " "``action`` parameter) should have attributes :attr:`!dest`, :attr:`!" @@ -2029,46 +2032,46 @@ msgid "" "is to call :meth:`!Action.__init__`." msgstr "" -#: ../../library/argparse.rst:1437 +#: ../../library/argparse.rst:1439 msgid "" ":class:`!Action` instances should be callable, so subclasses must override " "the :meth:`!__call__` method, which should accept four parameters:" msgstr "" -#: ../../library/argparse.rst:1440 +#: ../../library/argparse.rst:1442 msgid "" "*parser* - The :class:`ArgumentParser` object which contains this action." msgstr "" -#: ../../library/argparse.rst:1442 +#: ../../library/argparse.rst:1444 msgid "" "*namespace* - The :class:`Namespace` object that will be returned by :meth:" "`~ArgumentParser.parse_args`. Most actions add an attribute to this object " "using :func:`setattr`." msgstr "" -#: ../../library/argparse.rst:1446 +#: ../../library/argparse.rst:1448 msgid "" "*values* - The associated command-line arguments, with any type conversions " "applied. Type conversions are specified with the type_ keyword argument to :" "meth:`~ArgumentParser.add_argument`." msgstr "" -#: ../../library/argparse.rst:1450 +#: ../../library/argparse.rst:1452 msgid "" "*option_string* - The option string that was used to invoke this action. The " "``option_string`` argument is optional, and will be absent if the action is " "associated with a positional argument." msgstr "" -#: ../../library/argparse.rst:1454 +#: ../../library/argparse.rst:1456 msgid "" "The :meth:`!__call__` method may perform arbitrary actions, but will " "typically set attributes on the ``namespace`` based on ``dest`` and " "``values``." msgstr "" -#: ../../library/argparse.rst:1459 +#: ../../library/argparse.rst:1461 msgid "" ":class:`!Action` subclasses can define a :meth:`!format_usage` method that " "takes no argument and return a string which will be used when printing the " @@ -2076,7 +2079,7 @@ msgid "" "will be used." msgstr "" -#: ../../library/argparse.rst:1465 +#: ../../library/argparse.rst:1467 msgid "" "A subclass of :class:`Action` for handling boolean flags with positive and " "negative options. Adding a single argument such as ``--foo`` automatically " @@ -2084,7 +2087,7 @@ msgid "" "``False`` respectively::" msgstr "" -#: ../../library/argparse.rst:1470 +#: ../../library/argparse.rst:1472 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser()\n" @@ -2093,62 +2096,62 @@ msgid "" "Namespace(foo=False)" msgstr "" -#: ../../library/argparse.rst:1476 +#: ../../library/argparse.rst:1478 msgid "" "Single-dash long options are also supported. For example, negative option ``-" "nofoo`` is automatically added for positive option ``-foo``. But no " "additional options are added for short options such as ``-f``." msgstr "" -#: ../../library/argparse.rst:1483 +#: ../../library/argparse.rst:1485 msgid "Added support for single-dash options." msgstr "" -#: ../../library/argparse.rst:1486 +#: ../../library/argparse.rst:1488 msgid "Added support for alternate prefix_chars_." msgstr "" -#: ../../library/argparse.rst:1490 +#: ../../library/argparse.rst:1492 msgid "The parse_args() method" msgstr "" -#: ../../library/argparse.rst:1494 +#: ../../library/argparse.rst:1496 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." msgstr "" -#: ../../library/argparse.rst:1497 +#: ../../library/argparse.rst:1499 msgid "" "Previous calls to :meth:`add_argument` determine exactly what objects are " "created and how they are assigned. See the documentation for :meth:`!" "add_argument` for details." msgstr "" -#: ../../library/argparse.rst:1501 +#: ../../library/argparse.rst:1503 msgid "" "args_ - List of strings to parse. The default is taken from :data:`sys." "argv`." msgstr "" -#: ../../library/argparse.rst:1504 +#: ../../library/argparse.rst:1506 msgid "" "namespace_ - An object to take the attributes. The default is a new empty :" "class:`Namespace` object." msgstr "" -#: ../../library/argparse.rst:1509 +#: ../../library/argparse.rst:1511 msgid "Option value syntax" msgstr "" -#: ../../library/argparse.rst:1511 +#: ../../library/argparse.rst:1513 msgid "" "The :meth:`~ArgumentParser.parse_args` method supports several ways of " "specifying the value of an option (if it takes one). In the simplest case, " "the option and its value are passed as two separate arguments::" msgstr "" -#: ../../library/argparse.rst:1515 +#: ../../library/argparse.rst:1517 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x')\n" @@ -2159,38 +2162,38 @@ msgid "" "Namespace(foo='FOO', x=None)" msgstr "" -#: ../../library/argparse.rst:1523 +#: ../../library/argparse.rst:1525 msgid "" "For long options (options with names longer than a single character), the " "option and value can also be passed as a single command-line argument, using " "``=`` to separate them::" msgstr "" -#: ../../library/argparse.rst:1527 +#: ../../library/argparse.rst:1529 msgid "" ">>> parser.parse_args(['--foo=FOO'])\n" "Namespace(foo='FOO', x=None)" msgstr "" -#: ../../library/argparse.rst:1530 +#: ../../library/argparse.rst:1532 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" msgstr "" -#: ../../library/argparse.rst:1533 +#: ../../library/argparse.rst:1535 msgid "" ">>> parser.parse_args(['-xX'])\n" "Namespace(foo=None, x='X')" msgstr "" -#: ../../library/argparse.rst:1536 +#: ../../library/argparse.rst:1538 msgid "" "Several short options can be joined together, using only a single ``-`` " "prefix, as long as only the last option (or none of them) requires a value::" msgstr "" -#: ../../library/argparse.rst:1539 +#: ../../library/argparse.rst:1541 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x', action='store_true')\n" @@ -2200,11 +2203,11 @@ msgid "" "Namespace(x=True, y=True, z='Z')" msgstr "" -#: ../../library/argparse.rst:1548 +#: ../../library/argparse.rst:1550 msgid "Invalid arguments" msgstr "" -#: ../../library/argparse.rst:1550 +#: ../../library/argparse.rst:1552 msgid "" "While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " "for a variety of errors, including ambiguous options, invalid types, invalid " @@ -2212,7 +2215,7 @@ msgid "" "an error, it exits and prints the error along with a usage message::" msgstr "" -#: ../../library/argparse.rst:1555 +#: ../../library/argparse.rst:1557 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('--foo', type=int)\n" @@ -2234,11 +2237,11 @@ msgid "" "PROG: error: unrecognized arguments: badger" msgstr "" -#: ../../library/argparse.rst:1576 +#: ../../library/argparse.rst:1578 msgid "Arguments containing ``-``" msgstr "" -#: ../../library/argparse.rst:1578 +#: ../../library/argparse.rst:1580 msgid "" "The :meth:`~ArgumentParser.parse_args` method attempts to give errors " "whenever the user has clearly made a mistake, but some situations are " @@ -2250,7 +2253,7 @@ msgid "" "negative numbers::" msgstr "" -#: ../../library/argparse.rst:1586 +#: ../../library/argparse.rst:1588 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-x')\n" @@ -2283,7 +2286,7 @@ msgid "" "PROG: error: argument -1: expected one argument" msgstr "" -#: ../../library/argparse.rst:1616 +#: ../../library/argparse.rst:1618 msgid "" "If you have positional arguments that must begin with ``-`` and don't look " "like negative numbers, you can insert the pseudo-argument ``'--'`` which " @@ -2291,37 +2294,37 @@ msgid "" "positional argument::" msgstr "" -#: ../../library/argparse.rst:1621 +#: ../../library/argparse.rst:1623 msgid "" ">>> parser.parse_args(['--', '-f'])\n" "Namespace(foo='-f', one=None)" msgstr "" -#: ../../library/argparse.rst:1624 +#: ../../library/argparse.rst:1626 msgid "" "See also :ref:`the argparse howto on ambiguous arguments ` for more details." msgstr "" -#: ../../library/argparse.rst:1627 +#: ../../library/argparse.rst:1629 msgid "" "Negative-number matching was expanded to include numbers in scientific " "notation (``-2.5e-6``), numbers containing underscores (``-1_234.5``), and " "complex numbers (``-1.2e-3j``)." msgstr "" -#: ../../library/argparse.rst:1635 +#: ../../library/argparse.rst:1637 msgid "Argument abbreviations (prefix matching)" msgstr "" -#: ../../library/argparse.rst:1637 +#: ../../library/argparse.rst:1639 msgid "" "The :meth:`~ArgumentParser.parse_args` method :ref:`by default " "` allows long options to be abbreviated to a prefix, if the " "abbreviation is unambiguous (the prefix matches a unique option)::" msgstr "" -#: ../../library/argparse.rst:1641 +#: ../../library/argparse.rst:1643 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> parser.add_argument('-bacon')\n" @@ -2335,17 +2338,17 @@ msgid "" "PROG: error: ambiguous option: -ba could match -badger, -bacon" msgstr "" -#: ../../library/argparse.rst:1652 +#: ../../library/argparse.rst:1654 msgid "" "An error is produced for arguments that could produce more than one options. " "This feature can be disabled by setting :ref:`allow_abbrev` to ``False``." msgstr "" -#: ../../library/argparse.rst:1658 +#: ../../library/argparse.rst:1660 msgid "Beyond ``sys.argv``" msgstr "" -#: ../../library/argparse.rst:1660 +#: ../../library/argparse.rst:1662 msgid "" "Sometimes it may be useful to have an :class:`ArgumentParser` parse " "arguments other than those of :data:`sys.argv`. This can be accomplished by " @@ -2353,7 +2356,7 @@ msgid "" "useful for testing at the interactive prompt::" msgstr "" -#: ../../library/argparse.rst:1665 +#: ../../library/argparse.rst:1667 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument(\n" @@ -2368,24 +2371,24 @@ msgid "" "Namespace(accumulate=, integers=[1, 2, 3, 4])" msgstr "" -#: ../../library/argparse.rst:1680 +#: ../../library/argparse.rst:1682 msgid "The Namespace object" msgstr "" -#: ../../library/argparse.rst:1684 +#: ../../library/argparse.rst:1686 msgid "" "Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " "an object holding attributes and return it." msgstr "" -#: ../../library/argparse.rst:1687 +#: ../../library/argparse.rst:1689 msgid "" "This class is deliberately simple, just an :class:`object` subclass with a " "readable string representation. If you prefer to have dict-like view of the " "attributes, you can use the standard Python idiom, :func:`vars`::" msgstr "" -#: ../../library/argparse.rst:1691 +#: ../../library/argparse.rst:1693 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -2394,14 +2397,14 @@ msgid "" "{'foo': 'BAR'}" msgstr "" -#: ../../library/argparse.rst:1697 +#: ../../library/argparse.rst:1699 msgid "" "It may also be useful to have an :class:`ArgumentParser` assign attributes " "to an already existing object, rather than a new :class:`Namespace` object. " "This can be achieved by specifying the ``namespace=`` keyword argument::" msgstr "" -#: ../../library/argparse.rst:1701 +#: ../../library/argparse.rst:1703 msgid "" ">>> class C:\n" "... pass\n" @@ -2414,15 +2417,15 @@ msgid "" "'BAR'" msgstr "" -#: ../../library/argparse.rst:1713 +#: ../../library/argparse.rst:1715 msgid "Other utilities" msgstr "" -#: ../../library/argparse.rst:1716 +#: ../../library/argparse.rst:1718 msgid "Subcommands" msgstr "" -#: ../../library/argparse.rst:1723 +#: ../../library/argparse.rst:1725 msgid "" "Many programs split up their functionality into a number of subcommands, for " "example, the ``svn`` program can invoke subcommands like ``svn checkout``, " @@ -2437,69 +2440,69 @@ msgid "" "returns an :class:`!ArgumentParser` object that can be modified as usual." msgstr "" -#: ../../library/argparse.rst:1735 +#: ../../library/argparse.rst:1737 msgid "Description of parameters:" msgstr "" -#: ../../library/argparse.rst:1737 +#: ../../library/argparse.rst:1739 msgid "" "*title* - title for the sub-parser group in help output; by default " "\"subcommands\" if description is provided, otherwise uses title for " "positional arguments" msgstr "" -#: ../../library/argparse.rst:1741 +#: ../../library/argparse.rst:1743 msgid "" "*description* - description for the sub-parser group in help output, by " "default ``None``" msgstr "" -#: ../../library/argparse.rst:1744 +#: ../../library/argparse.rst:1746 msgid "" "*prog* - usage information that will be displayed with subcommand help, by " "default the name of the program and any positional arguments before the " "subparser argument" msgstr "" -#: ../../library/argparse.rst:1748 +#: ../../library/argparse.rst:1750 msgid "" "*parser_class* - class which will be used to create sub-parser instances, by " "default the class of the current parser (e.g. :class:`ArgumentParser`)" msgstr "" -#: ../../library/argparse.rst:1751 +#: ../../library/argparse.rst:1753 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" msgstr "" -#: ../../library/argparse.rst:1754 +#: ../../library/argparse.rst:1756 msgid "" "dest_ - name of the attribute under which subcommand name will be stored; by " "default ``None`` and no value is stored" msgstr "" -#: ../../library/argparse.rst:1757 +#: ../../library/argparse.rst:1759 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" msgstr "" -#: ../../library/argparse.rst:1760 +#: ../../library/argparse.rst:1762 msgid "help_ - help for sub-parser group in help output, by default ``None``" msgstr "" -#: ../../library/argparse.rst:1762 +#: ../../library/argparse.rst:1764 msgid "" "metavar_ - string presenting available subcommands in help; by default it is " "``None`` and presents subcommands in form {cmd1, cmd2, ..}" msgstr "" -#: ../../library/argparse.rst:1765 +#: ../../library/argparse.rst:1767 msgid "Some example usage::" msgstr "" -#: ../../library/argparse.rst:1767 +#: ../../library/argparse.rst:1769 msgid "" ">>> # create the top-level parser\n" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" @@ -2522,7 +2525,7 @@ msgid "" "Namespace(baz='Z', foo=True)" msgstr "" -#: ../../library/argparse.rst:1786 +#: ../../library/argparse.rst:1788 msgid "" "Note that the object returned by :meth:`~ArgumentParser.parse_args` will " "only contain attributes for the main parser and the subparser that was " @@ -2532,7 +2535,7 @@ msgid "" "only the ``foo`` and ``baz`` attributes are present." msgstr "" -#: ../../library/argparse.rst:1793 +#: ../../library/argparse.rst:1795 msgid "" "If a subparser defines an argument with the same ``dest`` as the parent " "parser, the two share a single namespace attribute, so the parent's value " @@ -2540,7 +2543,7 @@ msgid "" "both." msgstr "" -#: ../../library/argparse.rst:1798 +#: ../../library/argparse.rst:1800 msgid "" "Similarly, when a help message is requested from a subparser, only the help " "for that particular parser will be printed. The help message will not " @@ -2549,7 +2552,7 @@ msgid "" "to :meth:`~_SubParsersAction.add_parser` as above.)" msgstr "" -#: ../../library/argparse.rst:1806 +#: ../../library/argparse.rst:1808 msgid "" ">>> parser.parse_args(['--help'])\n" "usage: PROG [-h] [--foo] {a,b} ...\n" @@ -2580,7 +2583,7 @@ msgid "" " --baz {X,Y,Z} baz help" msgstr "" -#: ../../library/argparse.rst:1834 +#: ../../library/argparse.rst:1836 msgid "" "The :meth:`~ArgumentParser.add_subparsers` method also supports ``title`` " "and ``description`` keyword arguments. When either is present, the " @@ -2588,7 +2591,7 @@ msgid "" "example::" msgstr "" -#: ../../library/argparse.rst:1838 +#: ../../library/argparse.rst:1840 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers(title='subcommands',\n" @@ -2608,7 +2611,7 @@ msgid "" " {foo,bar} additional help" msgstr "" -#: ../../library/argparse.rst:1855 +#: ../../library/argparse.rst:1857 msgid "" "One particularly effective way of handling subcommands is to combine the use " "of the :meth:`~ArgumentParser.add_subparsers` method with calls to :meth:" @@ -2616,7 +2619,7 @@ msgid "" "function it should execute. For example::" msgstr "" -#: ../../library/argparse.rst:1860 +#: ../../library/argparse.rst:1862 msgid "" ">>> # subcommand functions\n" ">>> def foo(args):\n" @@ -2651,7 +2654,7 @@ msgid "" "((XYZYX))" msgstr "" -#: ../../library/argparse.rst:1892 +#: ../../library/argparse.rst:1894 msgid "" "This way, you can let :meth:`~ArgumentParser.parse_args` do the job of " "calling the appropriate function after argument parsing is complete. " @@ -2662,7 +2665,7 @@ msgid "" "work::" msgstr "" -#: ../../library/argparse.rst:1899 +#: ../../library/argparse.rst:1901 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers(dest='subparser_name')\n" @@ -2674,37 +2677,37 @@ msgid "" "Namespace(subparser_name='2', y='frobble')" msgstr "" -#: ../../library/argparse.rst:1908 +#: ../../library/argparse.rst:1910 msgid "New *required* keyword-only parameter." msgstr "" -#: ../../library/argparse.rst:1911 +#: ../../library/argparse.rst:1913 msgid "" "Subparser's *prog* is no longer affected by a custom usage message in the " "main parser." msgstr "" -#: ../../library/argparse.rst:1919 +#: ../../library/argparse.rst:1921 msgid "" "Create and return a new :class:`ArgumentParser` object for the subcommand " "*name*." msgstr "" -#: ../../library/argparse.rst:1922 +#: ../../library/argparse.rst:1924 msgid "The *name* argument is the name of the sub-command." msgstr "" -#: ../../library/argparse.rst:1924 +#: ../../library/argparse.rst:1926 msgid "The *help* argument provides a short description for this sub-command." msgstr "" -#: ../../library/argparse.rst:1926 +#: ../../library/argparse.rst:1928 msgid "" "The *aliases* argument allows providing alternative names for this sub-" "command. For example::" msgstr "" -#: ../../library/argparse.rst:1929 +#: ../../library/argparse.rst:1931 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> subparsers = parser.add_subparsers()\n" @@ -2714,13 +2717,13 @@ msgid "" "Namespace(foo='bar')" msgstr "" -#: ../../library/argparse.rst:1936 +#: ../../library/argparse.rst:1938 msgid "" "The *deprecated* argument, if ``True``, marks the sub-command as deprecated " "and will issue a warning when used. For example::" msgstr "" -#: ../../library/argparse.rst:1939 +#: ../../library/argparse.rst:1941 msgid "" ">>> parser = argparse.ArgumentParser(prog='chicken.py')\n" ">>> subparsers = parser.add_subparsers()\n" @@ -2730,21 +2733,21 @@ msgid "" "Namespace()" msgstr "" -#: ../../library/argparse.rst:1946 +#: ../../library/argparse.rst:1948 msgid "" "All other keyword arguments are passed directly to the :class:`!" "ArgumentParser` constructor." msgstr "" -#: ../../library/argparse.rst:1949 +#: ../../library/argparse.rst:1951 msgid "Added the *deprecated* parameter." msgstr "" -#: ../../library/argparse.rst:1954 +#: ../../library/argparse.rst:1956 msgid "FileType objects" msgstr "" -#: ../../library/argparse.rst:1958 +#: ../../library/argparse.rst:1960 msgid "" "The :class:`FileType` factory creates objects that can be passed to the type " "argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" @@ -2753,7 +2756,7 @@ msgid "" "the :func:`open` function for more details)::" msgstr "" -#: ../../library/argparse.rst:1964 +#: ../../library/argparse.rst:1966 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--raw', type=argparse.FileType('wb', 0))\n" @@ -2764,14 +2767,14 @@ msgid "" "raw=<_io.FileIO name='raw.dat' mode='wb'>)" msgstr "" -#: ../../library/argparse.rst:1970 +#: ../../library/argparse.rst:1972 msgid "" "FileType objects understand the pseudo-argument ``'-'`` and automatically " "convert this into :data:`sys.stdin` for readable :class:`FileType` objects " "and :data:`sys.stdout` for writable :class:`FileType` objects::" msgstr "" -#: ../../library/argparse.rst:1974 +#: ../../library/argparse.rst:1976 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('infile', type=argparse.FileType('r'))\n" @@ -2779,7 +2782,7 @@ msgid "" "Namespace(infile=<_io.TextIOWrapper name='' encoding='UTF-8'>)" msgstr "" -#: ../../library/argparse.rst:1981 +#: ../../library/argparse.rst:1983 msgid "" "If one argument uses *FileType* and then a subsequent argument fails, an " "error is reported but the file is not automatically closed. This can also " @@ -2788,15 +2791,15 @@ msgid "" "manage the files." msgstr "" -#: ../../library/argparse.rst:1987 +#: ../../library/argparse.rst:1989 msgid "Added the *encoding* and *errors* parameters." msgstr "" -#: ../../library/argparse.rst:1994 +#: ../../library/argparse.rst:1996 msgid "Argument groups" msgstr "" -#: ../../library/argparse.rst:1999 +#: ../../library/argparse.rst:2001 msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " "\"positional arguments\" and \"options\" when displaying help messages. When " @@ -2805,7 +2808,7 @@ msgid "" "method::" msgstr "" -#: ../../library/argparse.rst:2005 +#: ../../library/argparse.rst:2007 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" ">>> group = parser.add_argument_group('group')\n" @@ -2819,7 +2822,7 @@ msgid "" " --foo FOO foo help" msgstr "" -#: ../../library/argparse.rst:2016 +#: ../../library/argparse.rst:2018 msgid "" "The :meth:`add_argument_group` method returns an argument group object which " "has an :meth:`~ArgumentParser.add_argument` method just like a regular :" @@ -2830,7 +2833,7 @@ msgid "" "this display::" msgstr "" -#: ../../library/argparse.rst:2024 +#: ../../library/argparse.rst:2026 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" ">>> group1 = parser.add_argument_group('group1', 'group1 description')\n" @@ -2851,7 +2854,7 @@ msgid "" " --bar BAR bar help" msgstr "" -#: ../../library/argparse.rst:2042 +#: ../../library/argparse.rst:2044 msgid "" "The optional, keyword-only parameters argument_default_ and " "conflict_handler_ allow for finer-grained control of the behavior of the " @@ -2860,41 +2863,41 @@ msgid "" "rather than the entire parser." msgstr "" -#: ../../library/argparse.rst:2047 +#: ../../library/argparse.rst:2049 msgid "" "Note that any arguments not in your user-defined groups will end up back in " "the usual \"positional arguments\" and \"optional arguments\" sections." msgstr "" -#: ../../library/argparse.rst:2050 +#: ../../library/argparse.rst:2052 msgid "" "Within each argument group, arguments are displayed in help output in the " "order in which they are added." msgstr "" -#: ../../library/argparse.rst:2053 +#: ../../library/argparse.rst:2055 msgid "" "Calling :meth:`add_argument_group` on an argument group now raises an " "exception. This nesting was never supported, often failed to work correctly, " "and was unintentionally exposed through inheritance." msgstr "" -#: ../../library/argparse.rst:2058 +#: ../../library/argparse.rst:2060 msgid "Passing prefix_chars_ to :meth:`add_argument_group` is now deprecated." msgstr "" -#: ../../library/argparse.rst:2064 +#: ../../library/argparse.rst:2066 msgid "Mutual exclusion" msgstr "" -#: ../../library/argparse.rst:2068 +#: ../../library/argparse.rst:2070 msgid "" "Create a mutually exclusive group. :mod:`!argparse` will make sure that only " "one of the arguments in the mutually exclusive group was present on the " "command line::" msgstr "" -#: ../../library/argparse.rst:2072 +#: ../../library/argparse.rst:2074 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_mutually_exclusive_group()\n" @@ -2909,14 +2912,14 @@ msgid "" "PROG: error: argument --bar: not allowed with argument --foo" msgstr "" -#: ../../library/argparse.rst:2084 +#: ../../library/argparse.rst:2086 msgid "" "The :meth:`add_mutually_exclusive_group` method also accepts a *required* " "argument, to indicate that at least one of the mutually exclusive arguments " "is required::" msgstr "" -#: ../../library/argparse.rst:2088 +#: ../../library/argparse.rst:2090 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_mutually_exclusive_group(required=True)\n" @@ -2927,7 +2930,7 @@ msgid "" "PROG: error: one of the arguments --foo --bar is required" msgstr "" -#: ../../library/argparse.rst:2096 +#: ../../library/argparse.rst:2098 msgid "" "Note that currently mutually exclusive argument groups do not support the " "*title* and *description* arguments of :meth:`~ArgumentParser." @@ -2935,7 +2938,7 @@ msgid "" "argument group that has a title and description. For example::" msgstr "" -#: ../../library/argparse.rst:2102 +#: ../../library/argparse.rst:2104 msgid "" ">>> parser = argparse.ArgumentParser(prog='PROG')\n" ">>> group = parser.add_argument_group('Group title', 'Group description')\n" @@ -2955,7 +2958,7 @@ msgid "" " --bar BAR bar help" msgstr "" -#: ../../library/argparse.rst:2119 +#: ../../library/argparse.rst:2121 msgid "" "Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group` " "on a mutually exclusive group now raises an exception. This nesting was " @@ -2963,11 +2966,11 @@ msgid "" "exposed through inheritance." msgstr "" -#: ../../library/argparse.rst:2127 +#: ../../library/argparse.rst:2129 msgid "Parser defaults" msgstr "" -#: ../../library/argparse.rst:2131 +#: ../../library/argparse.rst:2133 msgid "" "Most of the time, the attributes of the object returned by :meth:" "`parse_args` will be fully determined by inspecting the command-line " @@ -2976,7 +2979,7 @@ msgid "" "command line to be added::" msgstr "" -#: ../../library/argparse.rst:2137 +#: ../../library/argparse.rst:2139 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('foo', type=int)\n" @@ -2985,7 +2988,7 @@ msgid "" "Namespace(bar=42, baz='badger', foo=736)" msgstr "" -#: ../../library/argparse.rst:2143 +#: ../../library/argparse.rst:2145 msgid "" "Note that defaults can be set at both the parser level using :meth:" "`set_defaults` and at the argument level using :meth:`add_argument`. If both " @@ -2993,7 +2996,7 @@ msgid "" "used::" msgstr "" -#: ../../library/argparse.rst:2147 +#: ../../library/argparse.rst:2149 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default='bar')\n" @@ -3002,20 +3005,20 @@ msgid "" "Namespace(foo='spam')" msgstr "" -#: ../../library/argparse.rst:2153 +#: ../../library/argparse.rst:2155 msgid "" "Parser-level defaults can be particularly useful when working with multiple " "parsers. See the :meth:`~ArgumentParser.add_subparsers` method for an " "example of this type." msgstr "" -#: ../../library/argparse.rst:2159 +#: ../../library/argparse.rst:2161 msgid "" "Get the default value for a namespace attribute, as set by either :meth:" "`~ArgumentParser.add_argument` or by :meth:`~ArgumentParser.set_defaults`::" msgstr "" -#: ../../library/argparse.rst:2163 +#: ../../library/argparse.rst:2165 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', default='badger')\n" @@ -3023,54 +3026,54 @@ msgid "" "'badger'" msgstr "" -#: ../../library/argparse.rst:2170 +#: ../../library/argparse.rst:2172 msgid "Printing help" msgstr "" -#: ../../library/argparse.rst:2172 +#: ../../library/argparse.rst:2174 msgid "" "In most typical applications, :meth:`~ArgumentParser.parse_args` will take " "care of formatting and printing any usage or error messages. However, " "several formatting methods are available:" msgstr "" -#: ../../library/argparse.rst:2178 +#: ../../library/argparse.rst:2180 msgid "" "Print a brief description of how the :class:`ArgumentParser` should be " "invoked on the command line. If *file* is ``None``, :data:`sys.stdout` is " "assumed." msgstr "" -#: ../../library/argparse.rst:2184 +#: ../../library/argparse.rst:2186 msgid "" "Print a help message, including the program usage and information about the " "arguments registered with the :class:`ArgumentParser`. If *file* is " "``None``, :data:`sys.stdout` is assumed." msgstr "" -#: ../../library/argparse.rst:2188 +#: ../../library/argparse.rst:2190 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" msgstr "" -#: ../../library/argparse.rst:2193 +#: ../../library/argparse.rst:2195 msgid "" "Return a string containing a brief description of how the :class:" "`ArgumentParser` should be invoked on the command line." msgstr "" -#: ../../library/argparse.rst:2198 +#: ../../library/argparse.rst:2200 msgid "" "Return a string containing a help message, including the program usage and " "information about the arguments registered with the :class:`ArgumentParser`." msgstr "" -#: ../../library/argparse.rst:2203 +#: ../../library/argparse.rst:2205 msgid "Partial parsing" msgstr "" -#: ../../library/argparse.rst:2207 +#: ../../library/argparse.rst:2209 msgid "" "Sometimes a script only needs to handle a specific set of command-line " "arguments, leaving any unrecognized arguments for another script or program. " @@ -3078,7 +3081,7 @@ msgid "" "useful." msgstr "" -#: ../../library/argparse.rst:2212 +#: ../../library/argparse.rst:2214 msgid "" "This method works similarly to :meth:`~ArgumentParser.parse_args`, but it " "does not raise an error for extra, unrecognized arguments. Instead, it " @@ -3086,7 +3089,7 @@ msgid "" "populated namespace and the list of any unrecognized arguments." msgstr "" -#: ../../library/argparse.rst:2219 +#: ../../library/argparse.rst:2221 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo', action='store_true')\n" @@ -3095,7 +3098,7 @@ msgid "" "(Namespace(bar='BAR', foo=True), ['--badger', 'spam'])" msgstr "" -#: ../../library/argparse.rst:2226 +#: ../../library/argparse.rst:2228 msgid "" ":ref:`Prefix matching ` rules apply to :meth:" "`~ArgumentParser.parse_known_args`. The parser may consume an option even if " @@ -3103,11 +3106,11 @@ msgid "" "remaining arguments list." msgstr "" -#: ../../library/argparse.rst:2233 +#: ../../library/argparse.rst:2235 msgid "Customizing file parsing" msgstr "" -#: ../../library/argparse.rst:2237 +#: ../../library/argparse.rst:2239 msgid "" "Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " "argument to the :class:`ArgumentParser` constructor) are read one argument " @@ -3115,44 +3118,44 @@ msgid "" "reading." msgstr "" -#: ../../library/argparse.rst:2242 +#: ../../library/argparse.rst:2244 msgid "" "This method takes a single argument *arg_line* which is a string read from " "the argument file. It returns a list of arguments parsed from this string. " "The method is called once per line read from the argument file, in order." msgstr "" -#: ../../library/argparse.rst:2246 +#: ../../library/argparse.rst:2248 msgid "" "A useful override of this method is one that treats each space-separated " "word as an argument. The following example demonstrates how to do this::" msgstr "" -#: ../../library/argparse.rst:2249 +#: ../../library/argparse.rst:2251 msgid "" "class MyArgumentParser(argparse.ArgumentParser):\n" " def convert_arg_line_to_args(self, arg_line):\n" " return arg_line.split()" msgstr "" -#: ../../library/argparse.rst:2253 +#: ../../library/argparse.rst:2255 msgid "" "Note that with this override an argument can no longer contain spaces, since " "each space-separated word becomes a separate argument." msgstr "" -#: ../../library/argparse.rst:2258 +#: ../../library/argparse.rst:2260 msgid "Exiting methods" msgstr "" -#: ../../library/argparse.rst:2262 +#: ../../library/argparse.rst:2264 msgid "" "This method terminates the program, exiting with the specified *status* and, " "if given, it prints a *message* to :data:`sys.stderr` before that. The user " "can override this method to handle these steps differently::" msgstr "" -#: ../../library/argparse.rst:2266 +#: ../../library/argparse.rst:2268 msgid "" "class ErrorCatchingArgumentParser(argparse.ArgumentParser):\n" " def exit(self, status=0, message=None):\n" @@ -3161,17 +3164,17 @@ msgid "" " exit(status)" msgstr "" -#: ../../library/argparse.rst:2274 +#: ../../library/argparse.rst:2276 msgid "" "This method prints a usage message, including the *message*, to :data:`sys." "stderr` and terminates the program with a status code of 2." msgstr "" -#: ../../library/argparse.rst:2279 +#: ../../library/argparse.rst:2281 msgid "Intermixed parsing" msgstr "" -#: ../../library/argparse.rst:2284 +#: ../../library/argparse.rst:2286 msgid "" "A number of Unix commands allow the user to intermix optional arguments with " "positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " @@ -3179,7 +3182,7 @@ msgid "" "parsing style." msgstr "" -#: ../../library/argparse.rst:2289 +#: ../../library/argparse.rst:2291 msgid "" "These parsers do not support all the :mod:`!argparse` features, and will " "raise exceptions if unsupported features are used. In particular, " @@ -3187,7 +3190,7 @@ msgid "" "positionals are not supported." msgstr "" -#: ../../library/argparse.rst:2294 +#: ../../library/argparse.rst:2296 msgid "" "The following example shows the difference between :meth:`~ArgumentParser." "parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " @@ -3195,7 +3198,7 @@ msgid "" "collects all the positionals into ``rest``. ::" msgstr "" -#: ../../library/argparse.rst:2300 +#: ../../library/argparse.rst:2302 msgid "" ">>> parser = argparse.ArgumentParser()\n" ">>> parser.add_argument('--foo')\n" @@ -3207,7 +3210,7 @@ msgid "" "Namespace(cmd='doit', foo='bar', rest=[1, 2, 3])" msgstr "" -#: ../../library/argparse.rst:2309 +#: ../../library/argparse.rst:2311 msgid "" ":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " "containing the populated namespace and the list of remaining argument " @@ -3215,11 +3218,11 @@ msgid "" "there are any remaining unparsed argument strings." msgstr "" -#: ../../library/argparse.rst:2318 +#: ../../library/argparse.rst:2320 msgid "Registering custom types or actions" msgstr "" -#: ../../library/argparse.rst:2322 +#: ../../library/argparse.rst:2324 msgid "" "Sometimes it's desirable to use a custom string in error messages to provide " "more user-friendly output. In these cases, :meth:`!register` can be used to " @@ -3227,7 +3230,7 @@ msgid "" "the type by their registered name instead of their callable name." msgstr "" -#: ../../library/argparse.rst:2327 +#: ../../library/argparse.rst:2329 msgid "" "The :meth:`!register` method accepts three arguments - a *registry_name*, " "specifying the internal registry where the object will be stored (e.g., " @@ -3235,12 +3238,12 @@ msgid "" "be registered, and object, the callable to be registered." msgstr "" -#: ../../library/argparse.rst:2332 +#: ../../library/argparse.rst:2334 msgid "" "The following example shows how to register a custom type with a parser::" msgstr "" -#: ../../library/argparse.rst:2334 +#: ../../library/argparse.rst:2336 msgid "" ">>> import argparse\n" ">>> parser = argparse.ArgumentParser()\n" @@ -3256,42 +3259,42 @@ msgid "" "PROG: error: argument --foo: invalid 'hexadecimal integer' value: '1.2'" msgstr "" -#: ../../library/argparse.rst:2346 +#: ../../library/argparse.rst:2348 msgid "Exceptions" msgstr "Ausnahmen" -#: ../../library/argparse.rst:2350 +#: ../../library/argparse.rst:2352 msgid "An error from creating or using an argument (optional or positional)." msgstr "" -#: ../../library/argparse.rst:2352 +#: ../../library/argparse.rst:2354 msgid "" "The string value of this exception is the message, augmented with " "information about the argument that caused it." msgstr "" -#: ../../library/argparse.rst:2357 +#: ../../library/argparse.rst:2359 msgid "" "Raised when something goes wrong converting a command line string to a type." msgstr "" -#: ../../library/argparse.rst:2361 +#: ../../library/argparse.rst:2363 msgid "Guides and Tutorials" msgstr "" -#: ../../library/argparse.rst:911 +#: ../../library/argparse.rst:913 msgid "? (question mark)" msgstr "" -#: ../../library/argparse.rst:911 ../../library/argparse.rst:943 -#: ../../library/argparse.rst:957 +#: ../../library/argparse.rst:913 ../../library/argparse.rst:945 +#: ../../library/argparse.rst:959 msgid "in argparse module" msgstr "" -#: ../../library/argparse.rst:943 +#: ../../library/argparse.rst:945 msgid "* (asterisk)" msgstr "" -#: ../../library/argparse.rst:957 +#: ../../library/argparse.rst:959 msgid "+ (plus)" msgstr "" diff --git a/library/argparse.po~ b/library/argparse.po~ new file mode 100644 index 00000000..1fe50a41 --- /dev/null +++ b/library/argparse.po~ @@ -0,0 +1,3297 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/argparse.rst:2 +msgid "" +":mod:`!argparse` --- Parser for command-line options, arguments and " +"subcommands" +msgstr "" + +#: ../../library/argparse.rst:9 +msgid "**Source code:** :source:`Lib/argparse.py`" +msgstr "" + +#: ../../library/argparse.rst:13 +msgid "" +"While :mod:`!argparse` is the default recommended standard library module " +"for implementing basic command line applications, authors with more exacting " +"requirements for exactly how their command line applications behave may find " +"it doesn't provide the necessary level of control. Refer to :ref:`choosing-" +"an-argument-parser` for alternatives to consider when ``argparse`` doesn't " +"support behaviors that the application requires (such as entirely disabling " +"support for interspersed options and positional arguments, or accepting " +"option parameter values that start with ``-`` even when they correspond to " +"another defined option)." +msgstr "" + +#: ../../library/argparse.rst:-1 +msgid "Tutorial" +msgstr "" + +#: ../../library/argparse.rst:27 +msgid "" +"This page contains the API reference information. For a more gentle " +"introduction to Python command-line parsing, have a look at the :ref:" +"`argparse tutorial `." +msgstr "" + +#: ../../library/argparse.rst:31 +msgid "" +"The :mod:`!argparse` module makes it easy to write user-friendly command-" +"line interfaces. The program defines what arguments it requires, and :mod:`!" +"argparse` will figure out how to parse those out of :data:`sys.argv`. The :" +"mod:`!argparse` module also automatically generates help and usage " +"messages. The module will also issue errors when users give the program " +"invalid arguments." +msgstr "" + +#: ../../library/argparse.rst:37 +msgid "" +"The :mod:`!argparse` module's support for command-line interfaces is built " +"around an instance of :class:`argparse.ArgumentParser`. It is a container " +"for argument specifications and has options that apply to the parser as " +"whole::" +msgstr "" + +#: ../../library/argparse.rst:41 +msgid "" +"parser = argparse.ArgumentParser(\n" +" prog='ProgramName',\n" +" description='What the program does',\n" +" epilog='Text at the bottom of help')" +msgstr "" + +#: ../../library/argparse.rst:46 +msgid "" +"The :meth:`ArgumentParser.add_argument` method attaches individual argument " +"specifications to the parser. It supports positional arguments, options " +"that accept values, and on/off flags::" +msgstr "" + +#: ../../library/argparse.rst:50 +msgid "" +"parser.add_argument('filename') # positional argument\n" +"parser.add_argument('-c', '--count') # option that takes a value\n" +"parser.add_argument('-v', '--verbose',\n" +" action='store_true') # on/off flag" +msgstr "" + +#: ../../library/argparse.rst:55 +msgid "" +"The :meth:`ArgumentParser.parse_args` method runs the parser and places the " +"extracted data in a :class:`argparse.Namespace` object::" +msgstr "" + +#: ../../library/argparse.rst:58 +msgid "" +"args = parser.parse_args()\n" +"print(args.filename, args.count, args.verbose)" +msgstr "" + +#: ../../library/argparse.rst:62 +msgid "" +"If you're looking for a guide about how to upgrade :mod:`optparse` code to :" +"mod:`!argparse`, see :ref:`Upgrading Optparse Code `." +msgstr "" + +#: ../../library/argparse.rst:66 +msgid "ArgumentParser objects" +msgstr "" + +#: ../../library/argparse.rst:76 +msgid "" +"Create a new :class:`ArgumentParser` object. All parameters should be passed " +"as keyword arguments. Each parameter has its own more detailed description " +"below, but in short they are:" +msgstr "" + +#: ../../library/argparse.rst:80 +msgid "" +"prog_ - The name of the program (default: generated from the ``__main__`` " +"module attributes and ``sys.argv[0]``)" +msgstr "" + +#: ../../library/argparse.rst:83 +msgid "" +"usage_ - The string describing the program usage (default: generated from " +"arguments added to parser)" +msgstr "" + +#: ../../library/argparse.rst:86 +msgid "" +"description_ - Text to display before the argument help (by default, no text)" +msgstr "" + +#: ../../library/argparse.rst:89 +msgid "epilog_ - Text to display after the argument help (by default, no text)" +msgstr "" + +#: ../../library/argparse.rst:91 +msgid "" +"parents_ - A list of :class:`ArgumentParser` objects whose arguments should " +"also be included" +msgstr "" + +#: ../../library/argparse.rst:94 +msgid "formatter_class_ - A class for customizing the help output" +msgstr "" + +#: ../../library/argparse.rst:96 +msgid "" +"prefix_chars_ - The set of characters that prefix optional arguments " +"(default: '-')" +msgstr "" + +#: ../../library/argparse.rst:99 +msgid "" +"fromfile_prefix_chars_ - The set of characters that prefix files from which " +"additional arguments should be read (default: ``None``)" +msgstr "" + +#: ../../library/argparse.rst:102 +msgid "" +"argument_default_ - The global default value for arguments (default: " +"``None``)" +msgstr "" + +#: ../../library/argparse.rst:105 +msgid "" +"conflict_handler_ - The strategy for resolving conflicting optionals " +"(usually unnecessary)" +msgstr "" + +#: ../../library/argparse.rst:108 +msgid "" +"add_help_ - Add a ``-h/--help`` option to the parser (default: ``True``)" +msgstr "" + +#: ../../library/argparse.rst:110 +msgid "" +"allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is " +"unambiguous (default: ``True``)" +msgstr "" + +#: ../../library/argparse.rst:113 +msgid "" +"exit_on_error_ - Determines whether or not :class:`!ArgumentParser` exits " +"with error info when an error occurs. (default: ``True``)" +msgstr "" + +#: ../../library/argparse.rst:116 +msgid "" +"suggest_on_error_ - Enables suggestions for mistyped argument choices and " +"subparser names (default: ``True``)" +msgstr "" + +#: ../../library/argparse.rst:119 +msgid "color_ - Allow color output (default: ``True``)" +msgstr "" + +#: ../../library/argparse.rst:121 +msgid "*allow_abbrev* parameter was added." +msgstr "" + +#: ../../library/argparse.rst:124 +msgid "" +"In previous versions, *allow_abbrev* also disabled grouping of short flags " +"such as ``-vv`` to mean ``-v -v``." +msgstr "" + +#: ../../library/argparse.rst:128 +msgid "*exit_on_error* parameter was added." +msgstr "" + +#: ../../library/argparse.rst:131 +msgid "*suggest_on_error* and *color* parameters were added." +msgstr "" + +#: ../../library/argparse.rst:134 +msgid "*suggest_on_error* default changed to ``True``." +msgstr "" + +#: ../../library/argparse.rst:137 ../../library/argparse.rst:699 +msgid "The following sections describe how each of these are used." +msgstr "" + +#: ../../library/argparse.rst:143 +msgid "prog" +msgstr "" + +#: ../../library/argparse.rst:146 +msgid "" +"By default, :class:`ArgumentParser` calculates the name of the program to " +"display in help messages depending on the way the Python interpreter was run:" +msgstr "" + +#: ../../library/argparse.rst:149 +msgid "" +"The :func:`base name ` of ``sys.argv[0]`` if a file was " +"passed as argument." +msgstr "" + +#: ../../library/argparse.rst:151 +msgid "" +"The Python interpreter name followed by ``sys.argv[0]`` if a directory or a " +"zipfile was passed as argument." +msgstr "" + +#: ../../library/argparse.rst:153 +msgid "" +"The Python interpreter name followed by ``-m`` followed by the module or " +"package name if the :option:`-m` option was used." +msgstr "" + +#: ../../library/argparse.rst:156 +msgid "" +"This default is almost always desirable because it will make the help " +"messages match the string that was used to invoke the program on the command " +"line. However, to change this default behavior, another value can be " +"supplied using the ``prog=`` argument to :class:`ArgumentParser`::" +msgstr "" + +#: ../../library/argparse.rst:161 +msgid "" +">>> parser = argparse.ArgumentParser(prog='myprogram')\n" +">>> parser.print_help()\n" +"usage: myprogram [-h]\n" +"\n" +"options:\n" +" -h, --help show this help message and exit" +msgstr "" + +#: ../../library/argparse.rst:168 +msgid "" +"Note that the program name, whether determined from ``sys.argv[0]``, from " +"the ``__main__`` module attributes or from the ``prog=`` argument, is " +"available to help messages using the ``%(prog)s`` format specifier." +msgstr "" + +#: ../../library/argparse.rst:175 +msgid "" +">>> parser = argparse.ArgumentParser(prog='myprogram')\n" +">>> parser.add_argument('--foo', help='foo of the %(prog)s program')\n" +">>> parser.print_help()\n" +"usage: myprogram [-h] [--foo FOO]\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +" --foo FOO foo of the myprogram program" +msgstr "" + +#: ../../library/argparse.rst:184 +msgid "" +"The default ``prog`` value now reflects how ``__main__`` was actually " +"executed, rather than always being ``os.path.basename(sys.argv[0])``." +msgstr "" + +#: ../../library/argparse.rst:189 +msgid "usage" +msgstr "" + +#: ../../library/argparse.rst:191 +msgid "" +"By default, :class:`ArgumentParser` calculates the usage message from the " +"arguments it contains. The default message can be overridden with the " +"``usage=`` keyword argument::" +msgstr "" + +#: ../../library/argparse.rst:195 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG', usage='%(prog)s " +"[options]')\n" +">>> parser.add_argument('--foo', nargs='?', help='foo help')\n" +">>> parser.add_argument('bar', nargs='+', help='bar help')\n" +">>> parser.print_help()\n" +"usage: PROG [options]\n" +"\n" +"positional arguments:\n" +" bar bar help\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +" --foo [FOO] foo help" +msgstr "" + +#: ../../library/argparse.rst:208 +msgid "" +"The ``%(prog)s`` format specifier is available to fill in the program name " +"in your usage messages." +msgstr "" + +#: ../../library/argparse.rst:211 +msgid "" +"When a custom usage message is specified for the main parser, you may also " +"want to consider passing the ``prog`` argument to :meth:`~ArgumentParser." +"add_subparsers` or the ``prog`` and the ``usage`` arguments to :meth:" +"`~_SubParsersAction.add_parser`, to ensure consistent command prefixes and " +"usage information across subparsers." +msgstr "" + +#: ../../library/argparse.rst:221 +msgid "description" +msgstr "Beschreibung" + +#: ../../library/argparse.rst:223 +msgid "" +"Most calls to the :class:`ArgumentParser` constructor will use the " +"``description=`` keyword argument. This argument gives a brief description " +"of what the program does and how it works. In help messages, the " +"description is displayed between the command-line usage string and the help " +"messages for the various arguments." +msgstr "" + +#: ../../library/argparse.rst:229 +msgid "" +"By default, the description will be line-wrapped so that it fits within the " +"given space. To change this behavior, see the formatter_class_ argument." +msgstr "" + +#: ../../library/argparse.rst:234 +msgid "epilog" +msgstr "" + +#: ../../library/argparse.rst:236 +msgid "" +"Some programs like to display additional description of the program after " +"the description of the arguments. Such text can be specified using the " +"``epilog=`` argument to :class:`ArgumentParser`::" +msgstr "" + +#: ../../library/argparse.rst:240 +msgid "" +">>> parser = argparse.ArgumentParser(\n" +"... description='A foo that bars',\n" +"... epilog=\"And that's how you'd foo a bar\")\n" +">>> parser.print_help()\n" +"usage: argparse.py [-h]\n" +"\n" +"A foo that bars\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +"\n" +"And that's how you'd foo a bar" +msgstr "" + +#: ../../library/argparse.rst:253 +msgid "" +"As with the description_ argument, the ``epilog=`` text is by default line-" +"wrapped, but this behavior can be adjusted with the formatter_class_ " +"argument to :class:`ArgumentParser`." +msgstr "" + +#: ../../library/argparse.rst:259 +msgid "parents" +msgstr "" + +#: ../../library/argparse.rst:261 +msgid "" +"Sometimes, several parsers share a common set of arguments. Rather than " +"repeating the definitions of these arguments, a single parser with all the " +"shared arguments and passed to ``parents=`` argument to :class:" +"`ArgumentParser` can be used. The ``parents=`` argument takes a list of :" +"class:`ArgumentParser` objects, collects all the positional and optional " +"actions from them, and adds these actions to the :class:`ArgumentParser` " +"object being constructed::" +msgstr "" + +#: ../../library/argparse.rst:268 +msgid "" +">>> parent_parser = argparse.ArgumentParser(add_help=False)\n" +">>> parent_parser.add_argument('--parent', type=int)\n" +"\n" +">>> foo_parser = argparse.ArgumentParser(parents=[parent_parser])\n" +">>> foo_parser.add_argument('foo')\n" +">>> foo_parser.parse_args(['--parent', '2', 'XXX'])\n" +"Namespace(foo='XXX', parent=2)\n" +"\n" +">>> bar_parser = argparse.ArgumentParser(parents=[parent_parser])\n" +">>> bar_parser.add_argument('--bar')\n" +">>> bar_parser.parse_args(['--bar', 'YYY'])\n" +"Namespace(bar='YYY', parent=None)" +msgstr "" + +#: ../../library/argparse.rst:281 +msgid "" +"Note that most parent parsers will specify ``add_help=False``. Otherwise, " +"the :class:`ArgumentParser` will see two ``-h/--help`` options (one in the " +"parent and one in the child) and raise an error." +msgstr "" + +#: ../../library/argparse.rst:286 +msgid "" +"You must fully initialize the parsers before passing them via ``parents=``. " +"If you change the parent parsers after the child parser, those changes will " +"not be reflected in the child." +msgstr "" + +#: ../../library/argparse.rst:294 +msgid "formatter_class" +msgstr "" + +#: ../../library/argparse.rst:296 +msgid "" +":class:`ArgumentParser` objects allow the help formatting to be customized " +"by specifying an alternate formatting class. Currently, there are four such " +"classes:" +msgstr "" + +#: ../../library/argparse.rst:305 +msgid "" +":class:`RawDescriptionHelpFormatter` and :class:`RawTextHelpFormatter` give " +"more control over how textual descriptions are displayed. By default, :class:" +"`ArgumentParser` objects line-wrap the description_ and epilog_ texts in " +"command-line help messages::" +msgstr "" + +#: ../../library/argparse.rst:310 +msgid "" +">>> parser = argparse.ArgumentParser(\n" +"... prog='PROG',\n" +"... description='''this description\n" +"... was indented weird\n" +"... but that is okay''',\n" +"... epilog='''\n" +"... likewise for this epilog whose whitespace will\n" +"... be cleaned up and whose words will be wrapped\n" +"... across a couple lines''')\n" +">>> parser.print_help()\n" +"usage: PROG [-h]\n" +"\n" +"this description was indented weird but that is okay\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +"\n" +"likewise for this epilog whose whitespace will be cleaned up and whose " +"words\n" +"will be wrapped across a couple lines" +msgstr "" + +#: ../../library/argparse.rst:330 +msgid "" +"Passing :class:`RawDescriptionHelpFormatter` as ``formatter_class=`` " +"indicates that description_ and epilog_ are already correctly formatted and " +"should not be line-wrapped::" +msgstr "" + +#: ../../library/argparse.rst:334 +msgid "" +">>> parser = argparse.ArgumentParser(\n" +"... prog='PROG',\n" +"... formatter_class=argparse.RawDescriptionHelpFormatter,\n" +"... description=textwrap.dedent('''\\\n" +"... Please do not mess up this text!\n" +"... --------------------------------\n" +"... I have indented it\n" +"... exactly the way\n" +"... I want it\n" +"... '''))\n" +">>> parser.print_help()\n" +"usage: PROG [-h]\n" +"\n" +"Please do not mess up this text!\n" +"--------------------------------\n" +" I have indented it\n" +" exactly the way\n" +" I want it\n" +"\n" +"options:\n" +" -h, --help show this help message and exit" +msgstr "" + +#: ../../library/argparse.rst:356 +msgid "" +":class:`RawTextHelpFormatter` maintains whitespace for all sorts of help " +"text, including argument descriptions. However, multiple newlines are " +"replaced with one. If you wish to preserve multiple blank lines, add spaces " +"between the newlines." +msgstr "" + +#: ../../library/argparse.rst:361 +msgid "" +":class:`ArgumentDefaultsHelpFormatter` automatically adds information about " +"default values to each of the argument help messages::" +msgstr "" + +#: ../../library/argparse.rst:364 +msgid "" +">>> parser = argparse.ArgumentParser(\n" +"... prog='PROG',\n" +"... formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n" +">>> parser.add_argument('--foo', type=int, default=42, help='FOO!')\n" +">>> parser.add_argument('bar', nargs='*', default=[1, 2, 3], help='BAR!')\n" +">>> parser.print_help()\n" +"usage: PROG [-h] [--foo FOO] [bar ...]\n" +"\n" +"positional arguments:\n" +" bar BAR! (default: [1, 2, 3])\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +" --foo FOO FOO! (default: 42)" +msgstr "" + +#: ../../library/argparse.rst:379 +msgid "" +":class:`MetavarTypeHelpFormatter` uses the name of the type_ argument for " +"each argument as the display name for its values (rather than using the " +"dest_ as the regular formatter does)::" +msgstr "" + +#: ../../library/argparse.rst:383 +msgid "" +">>> parser = argparse.ArgumentParser(\n" +"... prog='PROG',\n" +"... formatter_class=argparse.MetavarTypeHelpFormatter)\n" +">>> parser.add_argument('--foo', type=int)\n" +">>> parser.add_argument('bar', type=float)\n" +">>> parser.print_help()\n" +"usage: PROG [-h] [--foo int] float\n" +"\n" +"positional arguments:\n" +" float\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +" --foo int" +msgstr "" + +#: ../../library/argparse.rst:400 +msgid "prefix_chars" +msgstr "" + +#: ../../library/argparse.rst:402 +msgid "" +"Most command-line options will use ``-`` as the prefix, e.g. ``-f/--foo``. " +"Parsers that need to support different or additional prefix characters, e.g. " +"for options like ``+f`` or ``/foo``, may specify them using the " +"``prefix_chars=`` argument to the :class:`ArgumentParser` constructor::" +msgstr "" + +#: ../../library/argparse.rst:408 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG', prefix_chars='-+')\n" +">>> parser.add_argument('+f')\n" +">>> parser.add_argument('++bar')\n" +">>> parser.parse_args('+f X ++bar Y'.split())\n" +"Namespace(bar='Y', f='X')" +msgstr "" + +#: ../../library/argparse.rst:414 +msgid "" +"The ``prefix_chars=`` argument defaults to ``'-'``. Supplying a set of " +"characters that does not include ``-`` will cause ``-f/--foo`` options to be " +"disallowed." +msgstr "" + +#: ../../library/argparse.rst:420 +msgid "fromfile_prefix_chars" +msgstr "" + +#: ../../library/argparse.rst:422 +msgid "" +"Sometimes, when dealing with a particularly long argument list, it may make " +"sense to keep the list of arguments in a file rather than typing it out at " +"the command line. If the ``fromfile_prefix_chars=`` argument is given to " +"the :class:`ArgumentParser` constructor, then arguments that start with any " +"of the specified characters will be treated as files, and will be replaced " +"by the arguments they contain. For example::" +msgstr "" + +#: ../../library/argparse.rst:429 +msgid "" +">>> with open('args.txt', 'w', encoding=sys.getfilesystemencoding()) as fp:\n" +"... fp.write('-f\\nbar')\n" +"...\n" +">>> parser = argparse.ArgumentParser(fromfile_prefix_chars='@')\n" +">>> parser.add_argument('-f')\n" +">>> parser.parse_args(['-f', 'foo', '@args.txt'])\n" +"Namespace(f='bar')" +msgstr "" + +#: ../../library/argparse.rst:437 +msgid "" +"Arguments read from a file must be one per line by default (but see also :" +"meth:`~ArgumentParser.convert_arg_line_to_args`) and are treated as if they " +"were in the same place as the original file referencing argument on the " +"command line. So in the example above, the expression ``['-f', 'foo', " +"'@args.txt']`` is considered equivalent to the expression ``['-f', 'foo', '-" +"f', 'bar']``." +msgstr "" + +#: ../../library/argparse.rst:445 +msgid "" +"Each line is treated as a single argument, so an empty line is read as an " +"empty string (``''``)." +msgstr "" + +#: ../../library/argparse.rst:448 +msgid "" +":class:`ArgumentParser` uses :term:`filesystem encoding and error handler` " +"to read the file containing arguments." +msgstr "" + +#: ../../library/argparse.rst:451 +msgid "" +"The ``fromfile_prefix_chars=`` argument defaults to ``None``, meaning that " +"arguments will never be treated as file references." +msgstr "" + +#: ../../library/argparse.rst:454 +msgid "" +":class:`ArgumentParser` changed encoding and errors to read arguments files " +"from default (e.g. :func:`locale.getpreferredencoding(False) ` and ``\"strict\"``) to the :term:`filesystem encoding " +"and error handler`. Arguments file should be encoded in UTF-8 instead of " +"ANSI Codepage on Windows." +msgstr "" + +#: ../../library/argparse.rst:462 +msgid "argument_default" +msgstr "" + +#: ../../library/argparse.rst:464 +msgid "" +"Generally, argument defaults are specified either by passing a default to :" +"meth:`~ArgumentParser.add_argument` or by calling the :meth:`~ArgumentParser." +"set_defaults` methods with a specific set of name-value pairs. Sometimes " +"however, it may be useful to specify a single parser-wide default for " +"arguments. This can be accomplished by passing the ``argument_default=`` " +"keyword argument to :class:`ArgumentParser`. For example, to globally " +"suppress attribute creation on :meth:`~ArgumentParser.parse_args` calls, we " +"supply ``argument_default=SUPPRESS``::" +msgstr "" + +#: ../../library/argparse.rst:473 +msgid "" +">>> parser = argparse.ArgumentParser(argument_default=argparse.SUPPRESS)\n" +">>> parser.add_argument('--foo')\n" +">>> parser.add_argument('bar', nargs='?')\n" +">>> parser.parse_args(['--foo', '1', 'BAR'])\n" +"Namespace(bar='BAR', foo='1')\n" +">>> parser.parse_args([])\n" +"Namespace()" +msgstr "" + +#: ../../library/argparse.rst:484 +msgid "allow_abbrev" +msgstr "" + +#: ../../library/argparse.rst:486 +msgid "" +"Normally, when you pass an argument list to the :meth:`~ArgumentParser." +"parse_args` method of an :class:`ArgumentParser`, it :ref:`recognizes " +"abbreviations ` of long options." +msgstr "" + +#: ../../library/argparse.rst:490 +msgid "This feature can be disabled by setting ``allow_abbrev`` to ``False``::" +msgstr "" + +#: ../../library/argparse.rst:492 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG', allow_abbrev=False)\n" +">>> parser.add_argument('--foobar', action='store_true')\n" +">>> parser.add_argument('--foonley', action='store_false')\n" +">>> parser.parse_args(['--foon'])\n" +"usage: PROG [-h] [--foobar] [--foonley]\n" +"PROG: error: unrecognized arguments: --foon" +msgstr "" + +#: ../../library/argparse.rst:503 +msgid "conflict_handler" +msgstr "" + +#: ../../library/argparse.rst:505 +msgid "" +":class:`ArgumentParser` objects do not allow two actions with the same " +"option string. By default, :class:`ArgumentParser` objects raise an " +"exception if an attempt is made to create an argument with an option string " +"that is already in use::" +msgstr "" + +#: ../../library/argparse.rst:510 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('-f', '--foo', help='old foo help')\n" +">>> parser.add_argument('--foo', help='new foo help')\n" +"Traceback (most recent call last):\n" +" ..\n" +"ArgumentError: argument --foo: conflicting option string(s): --foo" +msgstr "" + +#: ../../library/argparse.rst:517 +msgid "" +"Sometimes (e.g. when using parents_) it may be useful to simply override any " +"older arguments with the same option string. To get this behavior, the " +"value ``'resolve'`` can be supplied to the ``conflict_handler=`` argument " +"of :class:`ArgumentParser`::" +msgstr "" + +#: ../../library/argparse.rst:522 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG', " +"conflict_handler='resolve')\n" +">>> parser.add_argument('-f', '--foo', help='old foo help')\n" +">>> parser.add_argument('--foo', help='new foo help')\n" +">>> parser.print_help()\n" +"usage: PROG [-h] [-f FOO] [--foo FOO]\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +" -f FOO old foo help\n" +" --foo FOO new foo help" +msgstr "" + +#: ../../library/argparse.rst:533 +msgid "" +"Note that :class:`ArgumentParser` objects only remove an action if all of " +"its option strings are overridden. So, in the example above, the old ``-f/--" +"foo`` action is retained as the ``-f`` action, because only the ``--foo`` " +"option string was overridden." +msgstr "" + +#: ../../library/argparse.rst:540 +msgid "add_help" +msgstr "" + +#: ../../library/argparse.rst:542 +msgid "" +"By default, :class:`ArgumentParser` objects add an option which simply " +"displays the parser's help message. If ``-h`` or ``--help`` is supplied at " +"the command line, the :class:`!ArgumentParser` help will be printed." +msgstr "" + +#: ../../library/argparse.rst:546 +msgid "" +"Occasionally, it may be useful to disable the addition of this help option. " +"This can be achieved by passing ``False`` as the ``add_help=`` argument to :" +"class:`ArgumentParser`::" +msgstr "" + +#: ../../library/argparse.rst:550 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" +">>> parser.add_argument('--foo', help='foo help')\n" +">>> parser.print_help()\n" +"usage: PROG [--foo FOO]\n" +"\n" +"options:\n" +" --foo FOO foo help" +msgstr "" + +#: ../../library/argparse.rst:558 +msgid "" +"The help option is typically ``-h/--help``. The exception to this is if the " +"``prefix_chars=`` is specified and does not include ``-``, in which case ``-" +"h`` and ``--help`` are not valid options. In this case, the first character " +"in ``prefix_chars`` is used to prefix the help options::" +msgstr "" + +#: ../../library/argparse.rst:564 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG', prefix_chars='+/')\n" +">>> parser.print_help()\n" +"usage: PROG [+h]\n" +"\n" +"options:\n" +" +h, ++help show this help message and exit" +msgstr "" + +#: ../../library/argparse.rst:573 +msgid "exit_on_error" +msgstr "" + +#: ../../library/argparse.rst:575 +msgid "" +"Normally, when you pass an invalid argument list to the :meth:" +"`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`, it will " +"print a *message* to :data:`sys.stderr` and exit with a status code of 2." +msgstr "" + +#: ../../library/argparse.rst:579 +msgid "" +"If the user would like to catch errors manually, the feature can be enabled " +"by setting ``exit_on_error`` to ``False``::" +msgstr "" + +#: ../../library/argparse.rst:582 +msgid "" +">>> parser = argparse.ArgumentParser(exit_on_error=False)\n" +">>> parser.add_argument('--integers', type=int)\n" +"_StoreAction(option_strings=['--integers'], dest='integers', nargs=None, " +"const=None, default=None, type=, choices=None, help=None, " +"metavar=None)\n" +">>> try:\n" +"... parser.parse_args('--integers a'.split())\n" +"... except argparse.ArgumentError:\n" +"... print('Catching an argumentError')\n" +"...\n" +"Catching an argumentError" +msgstr "" + +#: ../../library/argparse.rst:595 +msgid "suggest_on_error" +msgstr "" + +#: ../../library/argparse.rst:597 +msgid "" +"By default, when a user passes an invalid argument choice or subparser " +"name, :class:`ArgumentParser` will exit with error info and provide " +"suggestions for mistyped arguments. The error message will list the " +"permissible argument choices (if specified) or subparser names, along with a " +"\"maybe you meant\" suggestion if a close match is found. Note that this " +"only applies for arguments when the choices specified are strings::" +msgstr "" + +#: ../../library/argparse.rst:604 +msgid "" +">>> parser = argparse.ArgumentParser(suggest_on_error=True)\n" +">>> parser.add_argument('--action', choices=['debug', 'dryrun'])\n" +">>> parser.parse_args(['--action', 'debugg'])\n" +"usage: tester.py [-h] [--action {debug,dryrun}]\n" +"tester.py: error: argument --action: invalid choice: 'debugg', maybe you " +"meant 'debug'? (choose from debug, dryrun)" +msgstr "" + +#: ../../library/argparse.rst:610 +msgid "" +"You can disable suggestions by setting ``suggest_on_error`` to ``False``." +msgstr "" + +#: ../../library/argparse.rst:613 +msgid "" +"Changed default value of ``suggest_on_error`` from ``False`` to ``True``." +msgstr "" + +#: ../../library/argparse.rst:617 +msgid "color" +msgstr "" + +#: ../../library/argparse.rst:619 +msgid "" +"By default, the help message is printed in color using `ANSI escape " +"sequences `__. If you want " +"plain text help messages, you can disable this :ref:`in your local " +"environment `, or in the argument parser itself " +"by setting ``color`` to ``False``::" +msgstr "" + +#: ../../library/argparse.rst:625 +msgid "" +">>> parser = argparse.ArgumentParser(description='Process some integers.',\n" +"... color=False)\n" +">>> parser.add_argument('--action', choices=['sum', 'max'])\n" +">>> parser.add_argument('integers', metavar='N', type=int, nargs='+',\n" +"... help='an integer for the accumulator')\n" +">>> parser.parse_args(['--help'])" +msgstr "" + +#: ../../library/argparse.rst:632 +msgid "" +"Note that when ``color=True``, colored output depends on both environment " +"variables and terminal capabilities. However, if ``color=False``, colored " +"output is always disabled, even if environment variables like " +"``FORCE_COLOR`` are set." +msgstr "" + +#: ../../library/argparse.rst:639 +msgid "" +"To highlight inline code in your description, epilog, or argument ``help`` " +"text, you can use single or double backticks::" +msgstr "" + +#: ../../library/argparse.rst:642 +msgid "" +">>> parser = argparse.ArgumentParser(\n" +"... formatter_class=argparse.RawDescriptionHelpFormatter,\n" +"... description='Run ``python -m myapp`` to start.',\n" +"... epilog='''Examples:\n" +"... `python -m myapp --verbose`\n" +"... ``python -m myapp --config settings.json``\n" +"... ''')\n" +">>> parser.add_argument('--foo', help='set the `foo` value')" +msgstr "" + +#: ../../library/argparse.rst:651 +msgid "" +"When colors are enabled, the text inside backticks will be displayed in a " +"distinct color to help examples stand out. When colors are disabled, " +"backticks are preserved as-is, which is readable in plain text." +msgstr "" + +#: ../../library/argparse.rst:659 +msgid "The add_argument() method" +msgstr "" + +#: ../../library/argparse.rst:665 +msgid "" +"Define how a single command-line argument should be parsed. Each parameter " +"has its own more detailed description below, but in short they are:" +msgstr "" + +#: ../../library/argparse.rst:668 +msgid "" +"`name or flags`_ - Either a name or a list of option strings, e.g. ``'foo'`` " +"or ``'-f', '--foo'``." +msgstr "" + +#: ../../library/argparse.rst:671 +msgid "" +"action_ - The basic type of action to be taken when this argument is " +"encountered at the command line." +msgstr "" + +#: ../../library/argparse.rst:674 +msgid "nargs_ - The number of command-line arguments that should be consumed." +msgstr "" + +#: ../../library/argparse.rst:676 +msgid "" +"const_ - A constant value required by some action_ and nargs_ selections." +msgstr "" + +#: ../../library/argparse.rst:678 +msgid "" +"default_ - The value produced if the argument is absent from the command " +"line and if it is absent from the namespace object." +msgstr "" + +#: ../../library/argparse.rst:681 +msgid "" +"type_ - The type to which the command-line argument should be converted." +msgstr "" + +#: ../../library/argparse.rst:683 +msgid "choices_ - A sequence of the allowable values for the argument." +msgstr "" + +#: ../../library/argparse.rst:685 +msgid "" +"required_ - Whether or not the command-line option may be omitted (optionals " +"only)." +msgstr "" + +#: ../../library/argparse.rst:688 +msgid "help_ - A brief description of what the argument does." +msgstr "" + +#: ../../library/argparse.rst:690 +msgid "metavar_ - A name for the argument in usage messages." +msgstr "" + +#: ../../library/argparse.rst:692 +msgid "" +"dest_ - The name of the attribute to be added to the object returned by :" +"meth:`parse_args`." +msgstr "" + +#: ../../library/argparse.rst:695 +msgid "deprecated_ - Whether or not use of the argument is deprecated." +msgstr "" + +#: ../../library/argparse.rst:697 +msgid "The method returns an :class:`Action` object representing the argument." +msgstr "" + +#: ../../library/argparse.rst:705 +msgid "name or flags" +msgstr "" + +#: ../../library/argparse.rst:707 +msgid "" +"The :meth:`~ArgumentParser.add_argument` method must know whether an " +"optional argument, like ``-f`` or ``--foo``, or a positional argument, like " +"a list of filenames, is expected. The first arguments passed to :meth:" +"`~ArgumentParser.add_argument` must therefore be either a series of flags, " +"or a simple argument name." +msgstr "" + +#: ../../library/argparse.rst:713 +msgid "For example, an optional argument could be created like::" +msgstr "" + +#: ../../library/argparse.rst:715 +msgid ">>> parser.add_argument('-f', '--foo')" +msgstr "" + +#: ../../library/argparse.rst:717 +msgid "while a positional argument could be created like::" +msgstr "" + +#: ../../library/argparse.rst:719 +msgid ">>> parser.add_argument('bar')" +msgstr "" + +#: ../../library/argparse.rst:721 +msgid "" +"When :meth:`~ArgumentParser.parse_args` is called, optional arguments will " +"be identified by the ``-`` prefix, and the remaining arguments will be " +"assumed to be positional::" +msgstr "" + +#: ../../library/argparse.rst:725 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('-f', '--foo')\n" +">>> parser.add_argument('bar')\n" +">>> parser.parse_args(['BAR'])\n" +"Namespace(bar='BAR', foo=None)\n" +">>> parser.parse_args(['BAR', '--foo', 'FOO'])\n" +"Namespace(bar='BAR', foo='FOO')\n" +">>> parser.parse_args(['--foo', 'FOO'])\n" +"usage: PROG [-h] [-f FOO] bar\n" +"PROG: error: the following arguments are required: bar" +msgstr "" + +#: ../../library/argparse.rst:736 +msgid "" +"By default, :mod:`!argparse` automatically handles the internal naming and " +"display names of arguments, simplifying the process without requiring " +"additional configuration. As such, you do not need to specify the dest_ and " +"metavar_ parameters. For optional arguments, the dest_ parameter defaults to " +"the argument name, with underscores ``_`` replacing hyphens ``-``. The " +"metavar_ parameter defaults to the upper-cased name. For example::" +msgstr "" + +#: ../../library/argparse.rst:744 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('--foo-bar')\n" +">>> parser.parse_args(['--foo-bar', 'FOO-BAR'])\n" +"Namespace(foo_bar='FOO-BAR')\n" +">>> parser.print_help()\n" +"usage: [-h] [--foo-bar FOO-BAR]\n" +"\n" +"optional arguments:\n" +" -h, --help show this help message and exit\n" +" --foo-bar FOO-BAR" +msgstr "" + +#: ../../library/argparse.rst:759 +msgid "action" +msgstr "" + +#: ../../library/argparse.rst:761 +msgid "" +":class:`ArgumentParser` objects associate command-line arguments with " +"actions. These actions can do just about anything with the command-line " +"arguments associated with them, though most actions simply add an attribute " +"to the object returned by :meth:`~ArgumentParser.parse_args`. The " +"``action`` keyword argument specifies how the command-line arguments should " +"be handled. The supplied actions are:" +msgstr "" + +#: ../../library/argparse.rst:767 +msgid "" +"``'store'`` - This just stores the argument's value. This is the default " +"action." +msgstr "" + +#: ../../library/argparse.rst:770 +msgid "" +"``'store_const'`` - This stores the value specified by the const_ keyword " +"argument; note that the const_ keyword argument defaults to ``None``. The " +"``'store_const'`` action is most commonly used with optional arguments that " +"specify some sort of flag. For example::" +msgstr "" + +#: ../../library/argparse.rst:775 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', action='store_const', const=42)\n" +">>> parser.parse_args(['--foo'])\n" +"Namespace(foo=42)" +msgstr "" + +#: ../../library/argparse.rst:780 +msgid "" +"``'store_true'`` and ``'store_false'`` - These are special cases of " +"``'store_const'`` that respectively store the values ``True`` and ``False`` " +"with default values of ``False`` and ``True``::" +msgstr "" + +#: ../../library/argparse.rst:785 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', action='store_true')\n" +">>> parser.add_argument('--bar', action='store_false')\n" +">>> parser.add_argument('--baz', action='store_false')\n" +">>> parser.parse_args('--foo --bar'.split())\n" +"Namespace(foo=True, bar=False, baz=True)" +msgstr "" + +#: ../../library/argparse.rst:792 +msgid "" +"``'append'`` - This appends each argument value to a list. It is useful for " +"allowing an option to be specified multiple times. If the default value is a " +"non-empty list, the parsed value will start with the default list's elements " +"and any values from the command line will be appended after those default " +"values. Example usage::" +msgstr "" + +#: ../../library/argparse.rst:798 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', action='append', default=['0'])\n" +">>> parser.parse_args('--foo 1 --foo 2'.split())\n" +"Namespace(foo=['0', '1', '2'])" +msgstr "" + +#: ../../library/argparse.rst:803 +msgid "" +"``'append_const'`` - This appends the value specified by the const_ keyword " +"argument to a list; note that the const_ keyword argument defaults to " +"``None``. The ``'append_const'`` action is typically useful when multiple " +"arguments need to store constants to the same list. For example::" +msgstr "" + +#: ../../library/argparse.rst:809 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--str', dest='types', action='append_const', " +"const=str)\n" +">>> parser.add_argument('--int', dest='types', action='append_const', " +"const=int)\n" +">>> parser.parse_args('--str --int'.split())\n" +"Namespace(types=[, ])" +msgstr "" + +#: ../../library/argparse.rst:815 +msgid "" +"``'extend'`` - This appends each item from a multi-value argument to a list. " +"The ``'extend'`` action is typically used with the nargs_ keyword argument " +"value ``'+'`` or ``'*'``. Note that when nargs_ is ``None`` (the default) or " +"``'?'``, each character of the argument string will be appended to the list. " +"Example usage::" +msgstr "" + +#: ../../library/argparse.rst:823 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument(\"--foo\", action=\"extend\", nargs=\"+\", " +"type=str)\n" +">>> parser.parse_args([\"--foo\", \"f1\", \"--foo\", \"f2\", \"f3\", " +"\"f4\"])\n" +"Namespace(foo=['f1', 'f2', 'f3', 'f4'])" +msgstr "" + +#: ../../library/argparse.rst:830 +msgid "" +"``'count'`` - This counts the number of times an argument occurs. For " +"example, this is useful for increasing verbosity levels::" +msgstr "" + +#: ../../library/argparse.rst:833 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--verbose', '-v', action='count', default=0)\n" +">>> parser.parse_args(['-vvv'])\n" +"Namespace(verbose=3)" +msgstr "" + +#: ../../library/argparse.rst:838 +msgid "Note, the *default* will be ``None`` unless explicitly set to *0*." +msgstr "" + +#: ../../library/argparse.rst:840 +msgid "" +"``'help'`` - This prints a complete help message for all the options in the " +"current parser and then exits. By default a help action is automatically " +"added to the parser. See :class:`ArgumentParser` for details of how the " +"output is created." +msgstr "" + +#: ../../library/argparse.rst:845 +msgid "" +"``'version'`` - This expects a ``version=`` keyword argument in the :meth:" +"`~ArgumentParser.add_argument` call, and prints version information and " +"exits when invoked::" +msgstr "" + +#: ../../library/argparse.rst:849 +msgid "" +">>> import argparse\n" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('--version', action='version', version='%(prog)s " +"2.0')\n" +">>> parser.parse_args(['--version'])\n" +"PROG 2.0" +msgstr "" + +#: ../../library/argparse.rst:855 +msgid "" +"You may also specify an arbitrary action by passing an :class:`Action` " +"subclass (e.g. :class:`BooleanOptionalAction`) or other object that " +"implements the same interface. Only actions that consume command-line " +"arguments (e.g. ``'store'``, ``'append'``, ``'extend'``, or custom actions " +"with non-zero ``nargs``) can be used with positional arguments." +msgstr "" + +#: ../../library/argparse.rst:861 +msgid "" +"The recommended way to create a custom action is to extend :class:`Action`, " +"overriding the :meth:`!__call__` method and optionally the :meth:`!__init__` " +"and :meth:`!format_usage` methods. You can also register custom actions " +"using the :meth:`~ArgumentParser.register` method and reference them by " +"their registered name." +msgstr "" + +#: ../../library/argparse.rst:866 +msgid "An example of a custom action::" +msgstr "" + +#: ../../library/argparse.rst:868 +msgid "" +">>> class FooAction(argparse.Action):\n" +"... def __init__(self, option_strings, dest, nargs=None, **kwargs):\n" +"... if nargs is not None:\n" +"... raise ValueError(\"nargs not allowed\")\n" +"... super().__init__(option_strings, dest, **kwargs)\n" +"... def __call__(self, parser, namespace, values, option_string=None):\n" +"... print('%r %r %r' % (namespace, values, option_string))\n" +"... setattr(namespace, self.dest, values)\n" +"...\n" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', action=FooAction)\n" +">>> parser.add_argument('bar', action=FooAction)\n" +">>> args = parser.parse_args('1 --foo 2'.split())\n" +"Namespace(bar=None, foo=None) '1' None\n" +"Namespace(bar='1', foo=None) '2' '--foo'\n" +">>> args\n" +"Namespace(bar='1', foo='2')" +msgstr "" + +#: ../../library/argparse.rst:886 +msgid "For more details, see :class:`Action`." +msgstr "" + +#: ../../library/argparse.rst:892 +msgid "nargs" +msgstr "" + +#: ../../library/argparse.rst:894 +msgid "" +":class:`ArgumentParser` objects usually associate a single command-line " +"argument with a single action to be taken. The ``nargs`` keyword argument " +"associates a different number of command-line arguments with a single " +"action. See also :ref:`specifying-ambiguous-arguments`. The supported values " +"are:" +msgstr "" + +#: ../../library/argparse.rst:899 +msgid "" +"``N`` (an integer). ``N`` arguments from the command line will be gathered " +"together into a list. For example::" +msgstr "" + +#: ../../library/argparse.rst:902 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', nargs=2)\n" +">>> parser.add_argument('bar', nargs=1)\n" +">>> parser.parse_args('c --foo a b'.split())\n" +"Namespace(bar=['c'], foo=['a', 'b'])" +msgstr "" + +#: ../../library/argparse.rst:908 +msgid "" +"Note that ``nargs=1`` produces a list of one item. This is different from " +"the default, in which the item is produced by itself." +msgstr "" + +#: ../../library/argparse.rst:913 +msgid "" +"``'?'``. One argument will be consumed from the command line if possible, " +"and produced as a single item. If no command-line argument is present, the " +"value from default_ will be produced. Note that for optional arguments, " +"there is an additional case - the option string is present but not followed " +"by a command-line argument. In this case the value from const_ will be " +"produced. Some examples to illustrate this::" +msgstr "" + +#: ../../library/argparse.rst:920 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', nargs='?', const='c', default='d')\n" +">>> parser.add_argument('bar', nargs='?', default='d')\n" +">>> parser.parse_args(['XX', '--foo', 'YY'])\n" +"Namespace(bar='XX', foo='YY')\n" +">>> parser.parse_args(['XX', '--foo'])\n" +"Namespace(bar='XX', foo='c')\n" +">>> parser.parse_args([])\n" +"Namespace(bar='d', foo='d')" +msgstr "" + +#: ../../library/argparse.rst:930 +msgid "" +"One of the more common uses of ``nargs='?'`` is to allow optional input and " +"output files::" +msgstr "" + +#: ../../library/argparse.rst:933 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('infile', nargs='?')\n" +">>> parser.add_argument('outfile', nargs='?')\n" +">>> parser.parse_args(['input.txt', 'output.txt'])\n" +"Namespace(infile='input.txt', outfile='output.txt')\n" +">>> parser.parse_args(['input.txt'])\n" +"Namespace(infile='input.txt', outfile=None)\n" +">>> parser.parse_args([])\n" +"Namespace(infile=None, outfile=None)" +msgstr "" + +#: ../../library/argparse.rst:945 +msgid "" +"``'*'``. All command-line arguments present are gathered into a list. Note " +"that it generally doesn't make much sense to have more than one positional " +"argument with ``nargs='*'``, but multiple optional arguments with " +"``nargs='*'`` is possible. For example::" +msgstr "" + +#: ../../library/argparse.rst:950 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', nargs='*')\n" +">>> parser.add_argument('--bar', nargs='*')\n" +">>> parser.add_argument('baz', nargs='*')\n" +">>> parser.parse_args('a b --foo x y --bar 1 2'.split())\n" +"Namespace(bar=['1', '2'], baz=['a', 'b'], foo=['x', 'y'])" +msgstr "" + +#: ../../library/argparse.rst:959 +msgid "" +"``'+'``. Just like ``'*'``, all command-line arguments present are gathered " +"into a list. Additionally, an error message will be generated if there " +"wasn't at least one command-line argument present. For example::" +msgstr "" + +#: ../../library/argparse.rst:963 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('foo', nargs='+')\n" +">>> parser.parse_args(['a', 'b'])\n" +"Namespace(foo=['a', 'b'])\n" +">>> parser.parse_args([])\n" +"usage: PROG [-h] foo [foo ...]\n" +"PROG: error: the following arguments are required: foo" +msgstr "" + +#: ../../library/argparse.rst:971 +msgid "" +"If the ``nargs`` keyword argument is not provided, the number of arguments " +"consumed is determined by the action_. Generally this means a single " +"command-line argument will be consumed and a single item (not a list) will " +"be produced. Actions that do not consume command-line arguments (e.g. " +"``'store_const'``) set ``nargs=0``." +msgstr "" + +#: ../../library/argparse.rst:981 +msgid "const" +msgstr "" + +#: ../../library/argparse.rst:983 +msgid "" +"The ``const`` argument of :meth:`~ArgumentParser.add_argument` is used to " +"hold constant values that are not read from the command line but are " +"required for the various :class:`ArgumentParser` actions. The two most " +"common uses of it are:" +msgstr "" + +#: ../../library/argparse.rst:987 +msgid "" +"When :meth:`~ArgumentParser.add_argument` is called with " +"``action='store_const'`` or ``action='append_const'``. These actions add " +"the ``const`` value to one of the attributes of the object returned by :meth:" +"`~ArgumentParser.parse_args`. See the action_ description for examples. If " +"``const`` is not provided to :meth:`~ArgumentParser.add_argument`, it will " +"receive a default value of ``None``." +msgstr "" + +#: ../../library/argparse.rst:995 +msgid "" +"When :meth:`~ArgumentParser.add_argument` is called with option strings " +"(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " +"argument that can be followed by zero or one command-line arguments. When " +"parsing the command line, if the option string is encountered with no " +"command-line argument following it, the value from ``const`` will be used. " +"See the nargs_ description for examples." +msgstr "" + +#: ../../library/argparse.rst:1002 +msgid "" +"``const=None`` by default, including when ``action='append_const'`` or " +"``action='store_const'``." +msgstr "" + +#: ../../library/argparse.rst:1009 +msgid "default" +msgstr "Standard" + +#: ../../library/argparse.rst:1011 +msgid "" +"All optional arguments and some positional arguments may be omitted at the " +"command line. The ``default`` keyword argument of :meth:`~ArgumentParser." +"add_argument`, whose value defaults to ``None``, specifies what value should " +"be used if the command-line argument is not present. For optional arguments, " +"the ``default`` value is used when the option string was not present at the " +"command line::" +msgstr "" + +#: ../../library/argparse.rst:1018 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', default=42)\n" +">>> parser.parse_args(['--foo', '2'])\n" +"Namespace(foo='2')\n" +">>> parser.parse_args([])\n" +"Namespace(foo=42)" +msgstr "" + +#: ../../library/argparse.rst:1025 +msgid "" +"If the target namespace already has an attribute set, the action *default* " +"will not overwrite it::" +msgstr "" + +#: ../../library/argparse.rst:1028 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', default=42)\n" +">>> parser.parse_args([], namespace=argparse.Namespace(foo=101))\n" +"Namespace(foo=101)" +msgstr "" + +#: ../../library/argparse.rst:1033 +msgid "" +"If the ``default`` value is a string, the parser parses the value as if it " +"were a command-line argument. In particular, the parser applies any type_ " +"conversion argument, if provided, before setting the attribute on the :class:" +"`Namespace` return value. Otherwise, the parser uses the value as is::" +msgstr "" + +#: ../../library/argparse.rst:1038 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--length', default='10', type=int)\n" +">>> parser.add_argument('--width', default=10.5, type=int)\n" +">>> parser.parse_args()\n" +"Namespace(length=10, width=10.5)" +msgstr "" + +#: ../../library/argparse.rst:1044 +msgid "" +"For positional arguments with nargs_ equal to ``?`` or ``*``, the " +"``default`` value is used when no command-line argument was present::" +msgstr "" + +#: ../../library/argparse.rst:1047 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('foo', nargs='?', default=42)\n" +">>> parser.parse_args(['a'])\n" +"Namespace(foo='a')\n" +">>> parser.parse_args([])\n" +"Namespace(foo=42)" +msgstr "" + +#: ../../library/argparse.rst:1054 +msgid "" +"Because ``nargs='*'`` gathers any supplied values into a list, an absent " +"positional argument yields an empty list (``[]``). Only a non-``None`` " +"*default* overrides this (so ``default=None`` still gives ``[]``)." +msgstr "" + +#: ../../library/argparse.rst:1058 +msgid "" +"For required_ arguments, the ``default`` value is ignored. For example, this " +"applies to positional arguments with nargs_ values other than ``?`` or " +"``*``, or optional arguments marked as ``required=True``." +msgstr "" + +#: ../../library/argparse.rst:1062 +msgid "" +"Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " +"the command-line argument was not present::" +msgstr "" + +#: ../../library/argparse.rst:1065 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', default=argparse.SUPPRESS)\n" +">>> parser.parse_args([])\n" +"Namespace()\n" +">>> parser.parse_args(['--foo', '1'])\n" +"Namespace(foo='1')" +msgstr "" + +#: ../../library/argparse.rst:1076 +msgid "type" +msgstr "Typ" + +#: ../../library/argparse.rst:1078 +msgid "" +"By default, the parser reads command-line arguments in as simple strings. " +"However, quite often the command-line string should instead be interpreted " +"as another type, such as a :class:`float` or :class:`int`. The ``type`` " +"keyword for :meth:`~ArgumentParser.add_argument` allows any necessary type-" +"checking and type conversions to be performed." +msgstr "" + +#: ../../library/argparse.rst:1084 +msgid "" +"If the type_ keyword is used with the default_ keyword, the type converter " +"is only applied if the default is a string." +msgstr "" + +#: ../../library/argparse.rst:1087 +msgid "" +"The argument to ``type`` can be a callable that accepts a single string or " +"the name of a registered type (see :meth:`~ArgumentParser.register`) If the " +"function raises :exc:`ArgumentTypeError`, :exc:`TypeError`, or :exc:" +"`ValueError`, the exception is caught and a nicely formatted error message " +"is displayed. Other exception types are not handled." +msgstr "" + +#: ../../library/argparse.rst:1093 +msgid "Common built-in types and functions can be used as type converters:" +msgstr "" + +#: ../../library/argparse.rst:1095 +msgid "" +"import argparse\n" +"import pathlib\n" +"\n" +"parser = argparse.ArgumentParser()\n" +"parser.add_argument('count', type=int)\n" +"parser.add_argument('distance', type=float)\n" +"parser.add_argument('street', type=ascii)\n" +"parser.add_argument('code_point', type=ord)\n" +"parser.add_argument('datapath', type=pathlib.Path)" +msgstr "" + +#: ../../library/argparse.rst:1107 +msgid "User defined functions can be used as well:" +msgstr "" + +#: ../../library/argparse.rst:1109 +msgid "" +">>> def hyphenated(string):\n" +"... return '-'.join([word[:4] for word in string.casefold().split()])\n" +"...\n" +">>> parser = argparse.ArgumentParser()\n" +">>> _ = parser.add_argument('short_title', type=hyphenated)\n" +">>> parser.parse_args(['\"The Tale of Two Cities\"'])\n" +"Namespace(short_title='\"the-tale-of-two-citi')" +msgstr "" + +#: ../../library/argparse.rst:1119 +msgid "" +"The :func:`bool` function is not recommended as a type converter. All it " +"does is convert empty strings to ``False`` and non-empty strings to " +"``True``. This is usually not what is desired::" +msgstr "" + +#: ../../library/argparse.rst:1123 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> _ = parser.add_argument('--verbose', type=bool)\n" +">>> parser.parse_args(['--verbose', 'False'])\n" +"Namespace(verbose=True)" +msgstr "" + +#: ../../library/argparse.rst:1128 +msgid "" +"See :class:`BooleanOptionalAction` or ``action='store_true'`` for common " +"alternatives." +msgstr "" + +#: ../../library/argparse.rst:1131 +msgid "" +"In general, the ``type`` keyword is a convenience that should only be used " +"for simple conversions that can only raise one of the three supported " +"exceptions. Anything with more interesting error-handling or resource " +"management should be done downstream after the arguments are parsed." +msgstr "" + +#: ../../library/argparse.rst:1136 +msgid "" +"For example, JSON or YAML conversions have complex error cases that require " +"better reporting than can be given by the ``type`` keyword. A :exc:`~json." +"JSONDecodeError` would not be well formatted and a :exc:`FileNotFoundError` " +"exception would not be handled at all." +msgstr "" + +#: ../../library/argparse.rst:1141 +msgid "" +"Even :class:`~argparse.FileType` has its limitations for use with the " +"``type`` keyword. If one argument uses :class:`~argparse.FileType` and then " +"a subsequent argument fails, an error is reported but the file is not " +"automatically closed. In this case, it would be better to wait until after " +"the parser has run and then use the :keyword:`with`-statement to manage the " +"files." +msgstr "" + +#: ../../library/argparse.rst:1148 +msgid "" +"For type checkers that simply check against a fixed set of values, consider " +"using the choices_ keyword instead." +msgstr "" + +#: ../../library/argparse.rst:1155 +msgid "choices" +msgstr "" + +#: ../../library/argparse.rst:1157 +msgid "" +"Some command-line arguments should be selected from a restricted set of " +"values. These can be handled by passing a sequence object as the *choices* " +"keyword argument to :meth:`~ArgumentParser.add_argument`. When the command " +"line is parsed, argument values will be checked, and an error message will " +"be displayed if the argument was not one of the acceptable values::" +msgstr "" + +#: ../../library/argparse.rst:1163 +msgid "" +">>> parser = argparse.ArgumentParser(prog='game.py')\n" +">>> parser.add_argument('move', choices=['rock', 'paper', 'scissors'])\n" +">>> parser.parse_args(['rock'])\n" +"Namespace(move='rock')\n" +">>> parser.parse_args(['fire'])\n" +"usage: game.py [-h] {rock,paper,scissors}\n" +"game.py: error: argument move: invalid choice: 'fire' (choose from 'rock',\n" +"'paper', 'scissors')" +msgstr "" + +#: ../../library/argparse.rst:1172 +msgid "" +"Any sequence can be passed as the *choices* value, so :class:`list` " +"objects, :class:`tuple` objects, and custom sequences are all supported." +msgstr "" + +#: ../../library/argparse.rst:1175 +msgid "" +"Use of :class:`enum.Enum` is not recommended because it is difficult to " +"control its appearance in usage, help, and error messages." +msgstr "" + +#: ../../library/argparse.rst:1178 +msgid "" +"Note that *choices* are checked after any type_ conversions have been " +"performed, so objects in *choices* should match the type_ specified. This " +"can make *choices* appear unfamiliar in usage, help, or error messages." +msgstr "" + +#: ../../library/argparse.rst:1183 +msgid "" +"To keep *choices* user-friendly, consider a custom type wrapper that " +"converts and formats values, or omit type_ and handle conversion in your " +"application code." +msgstr "" + +#: ../../library/argparse.rst:1187 +msgid "" +"Formatted choices override the default *metavar* which is normally derived " +"from *dest*. This is usually what you want because the user never sees the " +"*dest* parameter. If this display isn't desirable (perhaps because there " +"are many choices), just specify an explicit metavar_." +msgstr "" + +#: ../../library/argparse.rst:1196 +msgid "required" +msgstr "" + +#: ../../library/argparse.rst:1198 +msgid "" +"In general, the :mod:`!argparse` module assumes that flags like ``-f`` and " +"``--bar`` indicate *optional* arguments, which can always be omitted at the " +"command line. To make an option *required*, ``True`` can be specified for " +"the ``required=`` keyword argument to :meth:`~ArgumentParser.add_argument`::" +msgstr "" + +#: ../../library/argparse.rst:1203 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', required=True)\n" +">>> parser.parse_args(['--foo', 'BAR'])\n" +"Namespace(foo='BAR')\n" +">>> parser.parse_args([])\n" +"usage: [-h] --foo FOO\n" +": error: the following arguments are required: --foo" +msgstr "" + +#: ../../library/argparse.rst:1211 +msgid "" +"As the example shows, if an option is marked as ``required``, :meth:" +"`~ArgumentParser.parse_args` will report an error if that option is not " +"present at the command line." +msgstr "" + +#: ../../library/argparse.rst:1217 +msgid "" +"Required options are generally considered bad form because users expect " +"*options* to be *optional*, and thus they should be avoided when possible." +msgstr "" + +#: ../../library/argparse.rst:1224 +msgid "help" +msgstr "" + +#: ../../library/argparse.rst:1226 +msgid "" +"The ``help`` value is a string containing a brief description of the " +"argument. When a user requests help (usually by using ``-h`` or ``--help`` " +"at the command line), these ``help`` descriptions will be displayed with " +"each argument." +msgstr "" + +#: ../../library/argparse.rst:1231 +msgid "" +"The ``help`` strings can include various format specifiers to avoid " +"repetition of things like the program name or the argument default_. The " +"available specifiers include the program name, ``%(prog)s`` and most keyword " +"arguments to :meth:`~ArgumentParser.add_argument`, e.g. ``%(default)s``, " +"``%(type)s``, etc.::" +msgstr "" + +#: ../../library/argparse.rst:1236 +msgid "" +">>> parser = argparse.ArgumentParser(prog='frobble')\n" +">>> parser.add_argument('bar', nargs='?', type=int, default=42,\n" +"... help='the bar to %(prog)s (default: %(default)s)')\n" +">>> parser.print_help()\n" +"usage: frobble [-h] [bar]\n" +"\n" +"positional arguments:\n" +" bar the bar to frobble (default: 42)\n" +"\n" +"options:\n" +" -h, --help show this help message and exit" +msgstr "" + +#: ../../library/argparse.rst:1248 +msgid "" +"As the help string supports %-formatting, if you want a literal ``%`` to " +"appear in the help string, you must escape it as ``%%``." +msgstr "" + +#: ../../library/argparse.rst:1251 +msgid "" +":mod:`!argparse` supports silencing the help entry for certain options, by " +"setting the ``help`` value to ``argparse.SUPPRESS``::" +msgstr "" + +#: ../../library/argparse.rst:1254 +msgid "" +">>> parser = argparse.ArgumentParser(prog='frobble')\n" +">>> parser.add_argument('--foo', help=argparse.SUPPRESS)\n" +">>> parser.print_help()\n" +"usage: frobble [-h]\n" +"\n" +"options:\n" +" -h, --help show this help message and exit" +msgstr "" + +#: ../../library/argparse.rst:1266 +msgid "metavar" +msgstr "" + +#: ../../library/argparse.rst:1268 +msgid "" +"When :class:`ArgumentParser` generates help messages, it needs some way to " +"refer to each expected argument. By default, :class:`!ArgumentParser` " +"objects use the dest_ value as the \"name\" of each object. By default, for " +"positional argument actions, the dest_ value is used directly, and for " +"optional argument actions, the dest_ value is uppercased. So, a single " +"positional argument with ``dest='bar'`` will be referred to as ``bar``. A " +"single optional argument ``--foo`` that should be followed by a single " +"command-line argument will be referred to as ``FOO``. An example::" +msgstr "" + +#: ../../library/argparse.rst:1277 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo')\n" +">>> parser.add_argument('bar')\n" +">>> parser.parse_args('X --foo Y'.split())\n" +"Namespace(bar='X', foo='Y')\n" +">>> parser.print_help()\n" +"usage: [-h] [--foo FOO] bar\n" +"\n" +"positional arguments:\n" +" bar\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +" --foo FOO" +msgstr "" + +#: ../../library/argparse.rst:1292 +msgid "An alternative name can be specified with ``metavar``::" +msgstr "" + +#: ../../library/argparse.rst:1294 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', metavar='YYY')\n" +">>> parser.add_argument('bar', metavar='XXX')\n" +">>> parser.parse_args('X --foo Y'.split())\n" +"Namespace(bar='X', foo='Y')\n" +">>> parser.print_help()\n" +"usage: [-h] [--foo YYY] XXX\n" +"\n" +"positional arguments:\n" +" XXX\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +" --foo YYY" +msgstr "" + +#: ../../library/argparse.rst:1309 +msgid "" +"Note that ``metavar`` only changes the *displayed* name - the name of the " +"attribute on the :meth:`~ArgumentParser.parse_args` object is still " +"determined by the dest_ value." +msgstr "" + +#: ../../library/argparse.rst:1313 +msgid "" +"Different values of ``nargs`` may cause the metavar to be used multiple " +"times. Providing a tuple to ``metavar`` specifies a different display for " +"each of the arguments::" +msgstr "" + +#: ../../library/argparse.rst:1317 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('-x', nargs=2)\n" +">>> parser.add_argument('--foo', nargs=2, metavar=('bar', 'baz'))\n" +">>> parser.print_help()\n" +"usage: PROG [-h] [-x X X] [--foo bar baz]\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +" -x X X\n" +" --foo bar baz" +msgstr "" + +#: ../../library/argparse.rst:1332 +msgid "dest" +msgstr "" + +#: ../../library/argparse.rst:1334 +msgid "" +"Most :class:`ArgumentParser` actions add some value as an attribute of the " +"object returned by :meth:`~ArgumentParser.parse_args`. The name of this " +"attribute is determined by the ``dest`` keyword argument of :meth:" +"`~ArgumentParser.add_argument`. For positional argument actions, ``dest`` " +"is normally supplied as the first argument to :meth:`~ArgumentParser." +"add_argument`::" +msgstr "" + +#: ../../library/argparse.rst:1341 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('bar')\n" +">>> parser.parse_args(['XXX'])\n" +"Namespace(bar='XXX')" +msgstr "" + +#: ../../library/argparse.rst:1346 +msgid "" +"For optional argument actions, the value of ``dest`` is normally inferred " +"from the option strings. :class:`ArgumentParser` generates the value of " +"``dest`` by taking the first double-dash long option string and stripping " +"away the initial ``-`` characters. If no double-dash long option strings " +"were supplied, ``dest`` will be derived from the first single-dash long " +"option string by stripping the initial ``-`` character. If no long option " +"strings were supplied, ``dest`` will be derived from the first short option " +"string by stripping the initial ``-`` character. Any internal ``-`` " +"characters will be converted to ``_`` characters to make sure the string is " +"a valid attribute name. The examples below illustrate this behavior::" +msgstr "" + +#: ../../library/argparse.rst:1359 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('-f', '--foo-bar', '--foo')\n" +">>> parser.add_argument('-q', '-quz')\n" +">>> parser.add_argument('-x', '-y')\n" +">>> parser.parse_args('-f 1 -q 2 -x 3'.split())\n" +"Namespace(foo_bar='1', quz='2', x='3')\n" +">>> parser.parse_args('--foo 1 -quz 2 -y 3'.split())\n" +"Namespace(foo_bar='1', quz='2', x='2')" +msgstr "" + +#: ../../library/argparse.rst:1368 +msgid "``dest`` allows a custom attribute name to be provided::" +msgstr "" + +#: ../../library/argparse.rst:1370 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', dest='bar')\n" +">>> parser.parse_args('--foo XXX'.split())\n" +"Namespace(bar='XXX')" +msgstr "" + +#: ../../library/argparse.rst:1375 +msgid "" +"Multiple arguments may share the same ``dest``. By default, the value from " +"the last such argument given on the command line wins. Use " +"``action='append'`` to collect values from all of them into a list instead. " +"For conflicting *option strings* rather than ``dest`` names, see " +"conflict_handler_." +msgstr "" + +#: ../../library/argparse.rst:1380 +msgid "Single-dash long option now takes precedence over short options." +msgstr "" + +#: ../../library/argparse.rst:1387 +msgid "deprecated" +msgstr "" + +#: ../../library/argparse.rst:1389 +msgid "" +"During a project's lifetime, some arguments may need to be removed from the " +"command line. Before removing them, you should inform your users that the " +"arguments are deprecated and will be removed. The ``deprecated`` keyword " +"argument of :meth:`~ArgumentParser.add_argument`, which defaults to " +"``False``, specifies if the argument is deprecated and will be removed in " +"the future. For arguments, if ``deprecated`` is ``True``, then a warning " +"will be printed to :data:`sys.stderr` when the argument is used::" +msgstr "" + +#: ../../library/argparse.rst:1399 +msgid "" +">>> import argparse\n" +">>> parser = argparse.ArgumentParser(prog='snake.py')\n" +">>> parser.add_argument('--legs', default=0, type=int, deprecated=True)\n" +">>> parser.parse_args([])\n" +"Namespace(legs=0)\n" +">>> parser.parse_args(['--legs', '4'])\n" +"snake.py: warning: option '--legs' is deprecated\n" +"Namespace(legs=4)" +msgstr "" + +#: ../../library/argparse.rst:1412 +msgid "Action classes" +msgstr "" + +#: ../../library/argparse.rst:1414 +msgid "" +":class:`!Action` classes implement the Action API, a callable which returns " +"a callable which processes arguments from the command-line. Any object which " +"follows this API may be passed as the ``action`` parameter to :meth:" +"`~ArgumentParser.add_argument`." +msgstr "" + +#: ../../library/argparse.rst:1423 +msgid "" +":class:`!Action` objects are used by an :class:`ArgumentParser` to represent " +"the information needed to parse a single argument from one or more strings " +"from the command line. The :class:`!Action` class must accept the two " +"positional arguments plus any keyword arguments passed to :meth:" +"`ArgumentParser.add_argument` except for the ``action`` itself." +msgstr "" + +#: ../../library/argparse.rst:1429 +msgid "" +"Instances of :class:`!Action` (or return value of any callable to the " +"``action`` parameter) should have attributes :attr:`!dest`, :attr:`!" +"option_strings`, :attr:`!default`, :attr:`!type`, :attr:`!required`, :attr:`!" +"help`, etc. defined. The easiest way to ensure these attributes are defined " +"is to call :meth:`!Action.__init__`." +msgstr "" + +#: ../../library/argparse.rst:1437 +msgid "" +":class:`!Action` instances should be callable, so subclasses must override " +"the :meth:`!__call__` method, which should accept four parameters:" +msgstr "" + +#: ../../library/argparse.rst:1440 +msgid "" +"*parser* - The :class:`ArgumentParser` object which contains this action." +msgstr "" + +#: ../../library/argparse.rst:1442 +msgid "" +"*namespace* - The :class:`Namespace` object that will be returned by :meth:" +"`~ArgumentParser.parse_args`. Most actions add an attribute to this object " +"using :func:`setattr`." +msgstr "" + +#: ../../library/argparse.rst:1446 +msgid "" +"*values* - The associated command-line arguments, with any type conversions " +"applied. Type conversions are specified with the type_ keyword argument to :" +"meth:`~ArgumentParser.add_argument`." +msgstr "" + +#: ../../library/argparse.rst:1450 +msgid "" +"*option_string* - The option string that was used to invoke this action. The " +"``option_string`` argument is optional, and will be absent if the action is " +"associated with a positional argument." +msgstr "" + +#: ../../library/argparse.rst:1454 +msgid "" +"The :meth:`!__call__` method may perform arbitrary actions, but will " +"typically set attributes on the ``namespace`` based on ``dest`` and " +"``values``." +msgstr "" + +#: ../../library/argparse.rst:1459 +msgid "" +":class:`!Action` subclasses can define a :meth:`!format_usage` method that " +"takes no argument and return a string which will be used when printing the " +"usage of the program. If such method is not provided, a sensible default " +"will be used." +msgstr "" + +#: ../../library/argparse.rst:1465 +msgid "" +"A subclass of :class:`Action` for handling boolean flags with positive and " +"negative options. Adding a single argument such as ``--foo`` automatically " +"creates both ``--foo`` and ``--no-foo`` options, storing ``True`` and " +"``False`` respectively::" +msgstr "" + +#: ../../library/argparse.rst:1470 +msgid "" +">>> import argparse\n" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', action=argparse.BooleanOptionalAction)\n" +">>> parser.parse_args(['--no-foo'])\n" +"Namespace(foo=False)" +msgstr "" + +#: ../../library/argparse.rst:1476 +msgid "" +"Single-dash long options are also supported. For example, negative option ``-" +"nofoo`` is automatically added for positive option ``-foo``. But no " +"additional options are added for short options such as ``-f``." +msgstr "" + +#: ../../library/argparse.rst:1483 +msgid "Added support for single-dash options." +msgstr "" + +#: ../../library/argparse.rst:1486 +msgid "Added support for alternate prefix_chars_." +msgstr "" + +#: ../../library/argparse.rst:1490 +msgid "The parse_args() method" +msgstr "" + +#: ../../library/argparse.rst:1494 +msgid "" +"Convert argument strings to objects and assign them as attributes of the " +"namespace. Return the populated namespace." +msgstr "" + +#: ../../library/argparse.rst:1497 +msgid "" +"Previous calls to :meth:`add_argument` determine exactly what objects are " +"created and how they are assigned. See the documentation for :meth:`!" +"add_argument` for details." +msgstr "" + +#: ../../library/argparse.rst:1501 +msgid "" +"args_ - List of strings to parse. The default is taken from :data:`sys." +"argv`." +msgstr "" + +#: ../../library/argparse.rst:1504 +msgid "" +"namespace_ - An object to take the attributes. The default is a new empty :" +"class:`Namespace` object." +msgstr "" + +#: ../../library/argparse.rst:1509 +msgid "Option value syntax" +msgstr "" + +#: ../../library/argparse.rst:1511 +msgid "" +"The :meth:`~ArgumentParser.parse_args` method supports several ways of " +"specifying the value of an option (if it takes one). In the simplest case, " +"the option and its value are passed as two separate arguments::" +msgstr "" + +#: ../../library/argparse.rst:1515 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('-x')\n" +">>> parser.add_argument('--foo')\n" +">>> parser.parse_args(['-x', 'X'])\n" +"Namespace(foo=None, x='X')\n" +">>> parser.parse_args(['--foo', 'FOO'])\n" +"Namespace(foo='FOO', x=None)" +msgstr "" + +#: ../../library/argparse.rst:1523 +msgid "" +"For long options (options with names longer than a single character), the " +"option and value can also be passed as a single command-line argument, using " +"``=`` to separate them::" +msgstr "" + +#: ../../library/argparse.rst:1527 +msgid "" +">>> parser.parse_args(['--foo=FOO'])\n" +"Namespace(foo='FOO', x=None)" +msgstr "" + +#: ../../library/argparse.rst:1530 +msgid "" +"For short options (options only one character long), the option and its " +"value can be concatenated::" +msgstr "" + +#: ../../library/argparse.rst:1533 +msgid "" +">>> parser.parse_args(['-xX'])\n" +"Namespace(foo=None, x='X')" +msgstr "" + +#: ../../library/argparse.rst:1536 +msgid "" +"Several short options can be joined together, using only a single ``-`` " +"prefix, as long as only the last option (or none of them) requires a value::" +msgstr "" + +#: ../../library/argparse.rst:1539 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('-x', action='store_true')\n" +">>> parser.add_argument('-y', action='store_true')\n" +">>> parser.add_argument('-z')\n" +">>> parser.parse_args(['-xyzZ'])\n" +"Namespace(x=True, y=True, z='Z')" +msgstr "" + +#: ../../library/argparse.rst:1548 +msgid "Invalid arguments" +msgstr "" + +#: ../../library/argparse.rst:1550 +msgid "" +"While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " +"for a variety of errors, including ambiguous options, invalid types, invalid " +"options, wrong number of positional arguments, etc. When it encounters such " +"an error, it exits and prints the error along with a usage message::" +msgstr "" + +#: ../../library/argparse.rst:1555 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('--foo', type=int)\n" +">>> parser.add_argument('bar', nargs='?')\n" +"\n" +">>> # invalid type\n" +">>> parser.parse_args(['--foo', 'spam'])\n" +"usage: PROG [-h] [--foo FOO] [bar]\n" +"PROG: error: argument --foo: invalid int value: 'spam'\n" +"\n" +">>> # invalid option\n" +">>> parser.parse_args(['--bar'])\n" +"usage: PROG [-h] [--foo FOO] [bar]\n" +"PROG: error: unrecognized arguments: --bar\n" +"\n" +">>> # wrong number of arguments\n" +">>> parser.parse_args(['spam', 'badger'])\n" +"usage: PROG [-h] [--foo FOO] [bar]\n" +"PROG: error: unrecognized arguments: badger" +msgstr "" + +#: ../../library/argparse.rst:1576 +msgid "Arguments containing ``-``" +msgstr "" + +#: ../../library/argparse.rst:1578 +msgid "" +"The :meth:`~ArgumentParser.parse_args` method attempts to give errors " +"whenever the user has clearly made a mistake, but some situations are " +"inherently ambiguous. For example, the command-line argument ``-1`` could " +"either be an attempt to specify an option or an attempt to provide a " +"positional argument. The :meth:`~ArgumentParser.parse_args` method is " +"cautious here: positional arguments may only begin with ``-`` if they look " +"like negative numbers and there are no options in the parser that look like " +"negative numbers::" +msgstr "" + +#: ../../library/argparse.rst:1586 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('-x')\n" +">>> parser.add_argument('foo', nargs='?')\n" +"\n" +">>> # no negative number options, so -1 is a positional argument\n" +">>> parser.parse_args(['-x', '-1'])\n" +"Namespace(foo=None, x='-1')\n" +"\n" +">>> # no negative number options, so -1 and -5 are positional arguments\n" +">>> parser.parse_args(['-x', '-1', '-5'])\n" +"Namespace(foo='-5', x='-1')\n" +"\n" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('-1', dest='one')\n" +">>> parser.add_argument('foo', nargs='?')\n" +"\n" +">>> # negative number options present, so -1 is an option\n" +">>> parser.parse_args(['-1', 'X'])\n" +"Namespace(foo=None, one='X')\n" +"\n" +">>> # negative number options present, so -2 is an option\n" +">>> parser.parse_args(['-2'])\n" +"usage: PROG [-h] [-1 ONE] [foo]\n" +"PROG: error: unrecognized arguments: -2\n" +"\n" +">>> # negative number options present, so both -1s are options\n" +">>> parser.parse_args(['-1', '-1'])\n" +"usage: PROG [-h] [-1 ONE] [foo]\n" +"PROG: error: argument -1: expected one argument" +msgstr "" + +#: ../../library/argparse.rst:1616 +msgid "" +"If you have positional arguments that must begin with ``-`` and don't look " +"like negative numbers, you can insert the pseudo-argument ``'--'`` which " +"tells :meth:`~ArgumentParser.parse_args` that everything after that is a " +"positional argument::" +msgstr "" + +#: ../../library/argparse.rst:1621 +msgid "" +">>> parser.parse_args(['--', '-f'])\n" +"Namespace(foo='-f', one=None)" +msgstr "" + +#: ../../library/argparse.rst:1624 +msgid "" +"See also :ref:`the argparse howto on ambiguous arguments ` for more details." +msgstr "" + +#: ../../library/argparse.rst:1627 +msgid "" +"Negative-number matching was expanded to include numbers in scientific " +"notation (``-2.5e-6``), numbers containing underscores (``-1_234.5``), and " +"complex numbers (``-1.2e-3j``)." +msgstr "" + +#: ../../library/argparse.rst:1635 +msgid "Argument abbreviations (prefix matching)" +msgstr "" + +#: ../../library/argparse.rst:1637 +msgid "" +"The :meth:`~ArgumentParser.parse_args` method :ref:`by default " +"` allows long options to be abbreviated to a prefix, if the " +"abbreviation is unambiguous (the prefix matches a unique option)::" +msgstr "" + +#: ../../library/argparse.rst:1641 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('-bacon')\n" +">>> parser.add_argument('-badger')\n" +">>> parser.parse_args('-bac MMM'.split())\n" +"Namespace(bacon='MMM', badger=None)\n" +">>> parser.parse_args('-bad WOOD'.split())\n" +"Namespace(bacon=None, badger='WOOD')\n" +">>> parser.parse_args('-ba BA'.split())\n" +"usage: PROG [-h] [-bacon BACON] [-badger BADGER]\n" +"PROG: error: ambiguous option: -ba could match -badger, -bacon" +msgstr "" + +#: ../../library/argparse.rst:1652 +msgid "" +"An error is produced for arguments that could produce more than one options. " +"This feature can be disabled by setting :ref:`allow_abbrev` to ``False``." +msgstr "" + +#: ../../library/argparse.rst:1658 +msgid "Beyond ``sys.argv``" +msgstr "" + +#: ../../library/argparse.rst:1660 +msgid "" +"Sometimes it may be useful to have an :class:`ArgumentParser` parse " +"arguments other than those of :data:`sys.argv`. This can be accomplished by " +"passing a list of strings to :meth:`~ArgumentParser.parse_args`. This is " +"useful for testing at the interactive prompt::" +msgstr "" + +#: ../../library/argparse.rst:1665 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument(\n" +"... 'integers', metavar='int', type=int, choices=range(10),\n" +"... nargs='+', help='an integer in the range 0..9')\n" +">>> parser.add_argument(\n" +"... '--sum', dest='accumulate', action='store_const', const=sum,\n" +"... default=max, help='sum the integers (default: find the max)')\n" +">>> parser.parse_args(['1', '2', '3', '4'])\n" +"Namespace(accumulate=, integers=[1, 2, 3, 4])\n" +">>> parser.parse_args(['1', '2', '3', '4', '--sum'])\n" +"Namespace(accumulate=, integers=[1, 2, 3, 4])" +msgstr "" + +#: ../../library/argparse.rst:1680 +msgid "The Namespace object" +msgstr "" + +#: ../../library/argparse.rst:1684 +msgid "" +"Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " +"an object holding attributes and return it." +msgstr "" + +#: ../../library/argparse.rst:1687 +msgid "" +"This class is deliberately simple, just an :class:`object` subclass with a " +"readable string representation. If you prefer to have dict-like view of the " +"attributes, you can use the standard Python idiom, :func:`vars`::" +msgstr "" + +#: ../../library/argparse.rst:1691 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo')\n" +">>> args = parser.parse_args(['--foo', 'BAR'])\n" +">>> vars(args)\n" +"{'foo': 'BAR'}" +msgstr "" + +#: ../../library/argparse.rst:1697 +msgid "" +"It may also be useful to have an :class:`ArgumentParser` assign attributes " +"to an already existing object, rather than a new :class:`Namespace` object. " +"This can be achieved by specifying the ``namespace=`` keyword argument::" +msgstr "" + +#: ../../library/argparse.rst:1701 +msgid "" +">>> class C:\n" +"... pass\n" +"...\n" +">>> c = C()\n" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo')\n" +">>> parser.parse_args(args=['--foo', 'BAR'], namespace=c)\n" +">>> c.foo\n" +"'BAR'" +msgstr "" + +#: ../../library/argparse.rst:1713 +msgid "Other utilities" +msgstr "" + +#: ../../library/argparse.rst:1716 +msgid "Subcommands" +msgstr "" + +#: ../../library/argparse.rst:1723 +msgid "" +"Many programs split up their functionality into a number of subcommands, for " +"example, the ``svn`` program can invoke subcommands like ``svn checkout``, " +"``svn update``, and ``svn commit``. Splitting up functionality this way can " +"be a particularly good idea when a program performs several different " +"functions which require different kinds of command-line arguments. :class:" +"`ArgumentParser` supports the creation of such subcommands with the :meth:`!" +"add_subparsers` method. The :meth:`!add_subparsers` method is normally " +"called with no arguments and returns a special action object. This object " +"has a single method, :meth:`~_SubParsersAction.add_parser`, which takes a " +"command name and any :class:`!ArgumentParser` constructor arguments, and " +"returns an :class:`!ArgumentParser` object that can be modified as usual." +msgstr "" + +#: ../../library/argparse.rst:1735 +msgid "Description of parameters:" +msgstr "" + +#: ../../library/argparse.rst:1737 +msgid "" +"*title* - title for the sub-parser group in help output; by default " +"\"subcommands\" if description is provided, otherwise uses title for " +"positional arguments" +msgstr "" + +#: ../../library/argparse.rst:1741 +msgid "" +"*description* - description for the sub-parser group in help output, by " +"default ``None``" +msgstr "" + +#: ../../library/argparse.rst:1744 +msgid "" +"*prog* - usage information that will be displayed with subcommand help, by " +"default the name of the program and any positional arguments before the " +"subparser argument" +msgstr "" + +#: ../../library/argparse.rst:1748 +msgid "" +"*parser_class* - class which will be used to create sub-parser instances, by " +"default the class of the current parser (e.g. :class:`ArgumentParser`)" +msgstr "" + +#: ../../library/argparse.rst:1751 +msgid "" +"action_ - the basic type of action to be taken when this argument is " +"encountered at the command line" +msgstr "" + +#: ../../library/argparse.rst:1754 +msgid "" +"dest_ - name of the attribute under which subcommand name will be stored; by " +"default ``None`` and no value is stored" +msgstr "" + +#: ../../library/argparse.rst:1757 +msgid "" +"required_ - Whether or not a subcommand must be provided, by default " +"``False`` (added in 3.7)" +msgstr "" + +#: ../../library/argparse.rst:1760 +msgid "help_ - help for sub-parser group in help output, by default ``None``" +msgstr "" + +#: ../../library/argparse.rst:1762 +msgid "" +"metavar_ - string presenting available subcommands in help; by default it is " +"``None`` and presents subcommands in form {cmd1, cmd2, ..}" +msgstr "" + +#: ../../library/argparse.rst:1765 +msgid "Some example usage::" +msgstr "" + +#: ../../library/argparse.rst:1767 +msgid "" +">>> # create the top-level parser\n" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> parser.add_argument('--foo', action='store_true', help='foo help')\n" +">>> subparsers = parser.add_subparsers(help='subcommand help')\n" +">>>\n" +">>> # create the parser for the \"a\" command\n" +">>> parser_a = subparsers.add_parser('a', help='a help')\n" +">>> parser_a.add_argument('bar', type=int, help='bar help')\n" +">>>\n" +">>> # create the parser for the \"b\" command\n" +">>> parser_b = subparsers.add_parser('b', help='b help')\n" +">>> parser_b.add_argument('--baz', choices=('X', 'Y', 'Z'), help='baz " +"help')\n" +">>>\n" +">>> # parse some argument lists\n" +">>> parser.parse_args(['a', '12'])\n" +"Namespace(bar=12, foo=False)\n" +">>> parser.parse_args(['--foo', 'b', '--baz', 'Z'])\n" +"Namespace(baz='Z', foo=True)" +msgstr "" + +#: ../../library/argparse.rst:1786 +msgid "" +"Note that the object returned by :meth:`~ArgumentParser.parse_args` will " +"only contain attributes for the main parser and the subparser that was " +"selected by the command line (and not any other subparsers). So in the " +"example above, when the ``a`` command is specified, only the ``foo`` and " +"``bar`` attributes are present, and when the ``b`` command is specified, " +"only the ``foo`` and ``baz`` attributes are present." +msgstr "" + +#: ../../library/argparse.rst:1793 +msgid "" +"If a subparser defines an argument with the same ``dest`` as the parent " +"parser, the two share a single namespace attribute, so the parent's value " +"won't be retained. Users should give them distinct ``dest`` values to keep " +"both." +msgstr "" + +#: ../../library/argparse.rst:1798 +msgid "" +"Similarly, when a help message is requested from a subparser, only the help " +"for that particular parser will be printed. The help message will not " +"include parent parser or sibling parser messages. (A help message for each " +"subparser command, however, can be given by supplying the ``help=`` argument " +"to :meth:`~_SubParsersAction.add_parser` as above.)" +msgstr "" + +#: ../../library/argparse.rst:1806 +msgid "" +">>> parser.parse_args(['--help'])\n" +"usage: PROG [-h] [--foo] {a,b} ...\n" +"\n" +"positional arguments:\n" +" {a,b} subcommand help\n" +" a a help\n" +" b b help\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +" --foo foo help\n" +"\n" +">>> parser.parse_args(['a', '--help'])\n" +"usage: PROG a [-h] bar\n" +"\n" +"positional arguments:\n" +" bar bar help\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +"\n" +">>> parser.parse_args(['b', '--help'])\n" +"usage: PROG b [-h] [--baz {X,Y,Z}]\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +" --baz {X,Y,Z} baz help" +msgstr "" + +#: ../../library/argparse.rst:1834 +msgid "" +"The :meth:`~ArgumentParser.add_subparsers` method also supports ``title`` " +"and ``description`` keyword arguments. When either is present, the " +"subparser's commands will appear in their own group in the help output. For " +"example::" +msgstr "" + +#: ../../library/argparse.rst:1838 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> subparsers = parser.add_subparsers(title='subcommands',\n" +"... description='valid subcommands',\n" +"... help='additional help')\n" +">>> subparsers.add_parser('foo')\n" +">>> subparsers.add_parser('bar')\n" +">>> parser.parse_args(['-h'])\n" +"usage: [-h] {foo,bar} ...\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +"\n" +"subcommands:\n" +" valid subcommands\n" +"\n" +" {foo,bar} additional help" +msgstr "" + +#: ../../library/argparse.rst:1855 +msgid "" +"One particularly effective way of handling subcommands is to combine the use " +"of the :meth:`~ArgumentParser.add_subparsers` method with calls to :meth:" +"`~ArgumentParser.set_defaults` so that each subparser knows which Python " +"function it should execute. For example::" +msgstr "" + +#: ../../library/argparse.rst:1860 +msgid "" +">>> # subcommand functions\n" +">>> def foo(args):\n" +"... print(args.x * args.y)\n" +"...\n" +">>> def bar(args):\n" +"... print('((%s))' % args.z)\n" +"...\n" +">>> # create the top-level parser\n" +">>> parser = argparse.ArgumentParser()\n" +">>> subparsers = parser.add_subparsers(required=True)\n" +">>>\n" +">>> # create the parser for the \"foo\" command\n" +">>> parser_foo = subparsers.add_parser('foo')\n" +">>> parser_foo.add_argument('-x', type=int, default=1)\n" +">>> parser_foo.add_argument('y', type=float)\n" +">>> parser_foo.set_defaults(func=foo)\n" +">>>\n" +">>> # create the parser for the \"bar\" command\n" +">>> parser_bar = subparsers.add_parser('bar')\n" +">>> parser_bar.add_argument('z')\n" +">>> parser_bar.set_defaults(func=bar)\n" +">>>\n" +">>> # parse the args and call whatever function was selected\n" +">>> args = parser.parse_args('foo 1 -x 2'.split())\n" +">>> args.func(args)\n" +"2.0\n" +">>>\n" +">>> # parse the args and call whatever function was selected\n" +">>> args = parser.parse_args('bar XYZYX'.split())\n" +">>> args.func(args)\n" +"((XYZYX))" +msgstr "" + +#: ../../library/argparse.rst:1892 +msgid "" +"This way, you can let :meth:`~ArgumentParser.parse_args` do the job of " +"calling the appropriate function after argument parsing is complete. " +"Associating functions with actions like this is typically the easiest way to " +"handle the different actions for each of your subparsers. However, if it is " +"necessary to check the name of the subparser that was invoked, the ``dest`` " +"keyword argument to the :meth:`~ArgumentParser.add_subparsers` call will " +"work::" +msgstr "" + +#: ../../library/argparse.rst:1899 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> subparsers = parser.add_subparsers(dest='subparser_name')\n" +">>> subparser1 = subparsers.add_parser('1')\n" +">>> subparser1.add_argument('-x')\n" +">>> subparser2 = subparsers.add_parser('2')\n" +">>> subparser2.add_argument('y')\n" +">>> parser.parse_args(['2', 'frobble'])\n" +"Namespace(subparser_name='2', y='frobble')" +msgstr "" + +#: ../../library/argparse.rst:1908 +msgid "New *required* keyword-only parameter." +msgstr "" + +#: ../../library/argparse.rst:1911 +msgid "" +"Subparser's *prog* is no longer affected by a custom usage message in the " +"main parser." +msgstr "" + +#: ../../library/argparse.rst:1919 +msgid "" +"Create and return a new :class:`ArgumentParser` object for the subcommand " +"*name*." +msgstr "" + +#: ../../library/argparse.rst:1922 +msgid "The *name* argument is the name of the sub-command." +msgstr "" + +#: ../../library/argparse.rst:1924 +msgid "The *help* argument provides a short description for this sub-command." +msgstr "" + +#: ../../library/argparse.rst:1926 +msgid "" +"The *aliases* argument allows providing alternative names for this sub-" +"command. For example::" +msgstr "" + +#: ../../library/argparse.rst:1929 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> subparsers = parser.add_subparsers()\n" +">>> checkout = subparsers.add_parser('checkout', aliases=['co'])\n" +">>> checkout.add_argument('foo')\n" +">>> parser.parse_args(['co', 'bar'])\n" +"Namespace(foo='bar')" +msgstr "" + +#: ../../library/argparse.rst:1936 +msgid "" +"The *deprecated* argument, if ``True``, marks the sub-command as deprecated " +"and will issue a warning when used. For example::" +msgstr "" + +#: ../../library/argparse.rst:1939 +msgid "" +">>> parser = argparse.ArgumentParser(prog='chicken.py')\n" +">>> subparsers = parser.add_subparsers()\n" +">>> fly = subparsers.add_parser('fly', deprecated=True)\n" +">>> args = parser.parse_args(['fly'])\n" +"chicken.py: warning: command 'fly' is deprecated\n" +"Namespace()" +msgstr "" + +#: ../../library/argparse.rst:1946 +msgid "" +"All other keyword arguments are passed directly to the :class:`!" +"ArgumentParser` constructor." +msgstr "" + +#: ../../library/argparse.rst:1949 +msgid "Added the *deprecated* parameter." +msgstr "" + +#: ../../library/argparse.rst:1954 +msgid "FileType objects" +msgstr "" + +#: ../../library/argparse.rst:1958 +msgid "" +"The :class:`FileType` factory creates objects that can be passed to the type " +"argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" +"`FileType` objects as their type will open command-line arguments as files " +"with the requested modes, buffer sizes, encodings and error handling (see " +"the :func:`open` function for more details)::" +msgstr "" + +#: ../../library/argparse.rst:1964 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--raw', type=argparse.FileType('wb', 0))\n" +">>> parser.add_argument('out', type=argparse.FileType('w', " +"encoding='UTF-8'))\n" +">>> parser.parse_args(['--raw', 'raw.dat', 'file.txt'])\n" +"Namespace(out=<_io.TextIOWrapper name='file.txt' mode='w' encoding='UTF-8'>, " +"raw=<_io.FileIO name='raw.dat' mode='wb'>)" +msgstr "" + +#: ../../library/argparse.rst:1970 +msgid "" +"FileType objects understand the pseudo-argument ``'-'`` and automatically " +"convert this into :data:`sys.stdin` for readable :class:`FileType` objects " +"and :data:`sys.stdout` for writable :class:`FileType` objects::" +msgstr "" + +#: ../../library/argparse.rst:1974 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('infile', type=argparse.FileType('r'))\n" +">>> parser.parse_args(['-'])\n" +"Namespace(infile=<_io.TextIOWrapper name='' encoding='UTF-8'>)" +msgstr "" + +#: ../../library/argparse.rst:1981 +msgid "" +"If one argument uses *FileType* and then a subsequent argument fails, an " +"error is reported but the file is not automatically closed. This can also " +"clobber the output files. In this case, it would be better to wait until " +"after the parser has run and then use the :keyword:`with`-statement to " +"manage the files." +msgstr "" + +#: ../../library/argparse.rst:1987 +msgid "Added the *encoding* and *errors* parameters." +msgstr "" + +#: ../../library/argparse.rst:1994 +msgid "Argument groups" +msgstr "" + +#: ../../library/argparse.rst:1999 +msgid "" +"By default, :class:`ArgumentParser` groups command-line arguments into " +"\"positional arguments\" and \"options\" when displaying help messages. When " +"there is a better conceptual grouping of arguments than this default one, " +"appropriate groups can be created using the :meth:`!add_argument_group` " +"method::" +msgstr "" + +#: ../../library/argparse.rst:2005 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" +">>> group = parser.add_argument_group('group')\n" +">>> group.add_argument('--foo', help='foo help')\n" +">>> group.add_argument('bar', help='bar help')\n" +">>> parser.print_help()\n" +"usage: PROG [--foo FOO] bar\n" +"\n" +"group:\n" +" bar bar help\n" +" --foo FOO foo help" +msgstr "" + +#: ../../library/argparse.rst:2016 +msgid "" +"The :meth:`add_argument_group` method returns an argument group object which " +"has an :meth:`~ArgumentParser.add_argument` method just like a regular :" +"class:`ArgumentParser`. When an argument is added to the group, the parser " +"treats it just like a normal argument, but displays the argument in a " +"separate group for help messages. The :meth:`!add_argument_group` method " +"accepts *title* and *description* arguments which can be used to customize " +"this display::" +msgstr "" + +#: ../../library/argparse.rst:2024 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)\n" +">>> group1 = parser.add_argument_group('group1', 'group1 description')\n" +">>> group1.add_argument('foo', help='foo help')\n" +">>> group2 = parser.add_argument_group('group2', 'group2 description')\n" +">>> group2.add_argument('--bar', help='bar help')\n" +">>> parser.print_help()\n" +"usage: PROG [--bar BAR] foo\n" +"\n" +"group1:\n" +" group1 description\n" +"\n" +" foo foo help\n" +"\n" +"group2:\n" +" group2 description\n" +"\n" +" --bar BAR bar help" +msgstr "" + +#: ../../library/argparse.rst:2042 +msgid "" +"The optional, keyword-only parameters argument_default_ and " +"conflict_handler_ allow for finer-grained control of the behavior of the " +"argument group. These parameters have the same meaning as in the :class:" +"`ArgumentParser` constructor, but apply specifically to the argument group " +"rather than the entire parser." +msgstr "" + +#: ../../library/argparse.rst:2047 +msgid "" +"Note that any arguments not in your user-defined groups will end up back in " +"the usual \"positional arguments\" and \"optional arguments\" sections." +msgstr "" + +#: ../../library/argparse.rst:2050 +msgid "" +"Within each argument group, arguments are displayed in help output in the " +"order in which they are added." +msgstr "" + +#: ../../library/argparse.rst:2053 +msgid "" +"Calling :meth:`add_argument_group` on an argument group now raises an " +"exception. This nesting was never supported, often failed to work correctly, " +"and was unintentionally exposed through inheritance." +msgstr "" + +#: ../../library/argparse.rst:2058 +msgid "Passing prefix_chars_ to :meth:`add_argument_group` is now deprecated." +msgstr "" + +#: ../../library/argparse.rst:2064 +msgid "Mutual exclusion" +msgstr "" + +#: ../../library/argparse.rst:2068 +msgid "" +"Create a mutually exclusive group. :mod:`!argparse` will make sure that only " +"one of the arguments in the mutually exclusive group was present on the " +"command line::" +msgstr "" + +#: ../../library/argparse.rst:2072 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> group = parser.add_mutually_exclusive_group()\n" +">>> group.add_argument('--foo', action='store_true')\n" +">>> group.add_argument('--bar', action='store_false')\n" +">>> parser.parse_args(['--foo'])\n" +"Namespace(bar=True, foo=True)\n" +">>> parser.parse_args(['--bar'])\n" +"Namespace(bar=False, foo=False)\n" +">>> parser.parse_args(['--foo', '--bar'])\n" +"usage: PROG [-h] [--foo | --bar]\n" +"PROG: error: argument --bar: not allowed with argument --foo" +msgstr "" + +#: ../../library/argparse.rst:2084 +msgid "" +"The :meth:`add_mutually_exclusive_group` method also accepts a *required* " +"argument, to indicate that at least one of the mutually exclusive arguments " +"is required::" +msgstr "" + +#: ../../library/argparse.rst:2088 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> group = parser.add_mutually_exclusive_group(required=True)\n" +">>> group.add_argument('--foo', action='store_true')\n" +">>> group.add_argument('--bar', action='store_false')\n" +">>> parser.parse_args([])\n" +"usage: PROG [-h] (--foo | --bar)\n" +"PROG: error: one of the arguments --foo --bar is required" +msgstr "" + +#: ../../library/argparse.rst:2096 +msgid "" +"Note that currently mutually exclusive argument groups do not support the " +"*title* and *description* arguments of :meth:`~ArgumentParser." +"add_argument_group`. However, a mutually exclusive group can be added to an " +"argument group that has a title and description. For example::" +msgstr "" + +#: ../../library/argparse.rst:2102 +msgid "" +">>> parser = argparse.ArgumentParser(prog='PROG')\n" +">>> group = parser.add_argument_group('Group title', 'Group description')\n" +">>> exclusive_group = group.add_mutually_exclusive_group(required=True)\n" +">>> exclusive_group.add_argument('--foo', help='foo help')\n" +">>> exclusive_group.add_argument('--bar', help='bar help')\n" +">>> parser.print_help()\n" +"usage: PROG [-h] (--foo FOO | --bar BAR)\n" +"\n" +"options:\n" +" -h, --help show this help message and exit\n" +"\n" +"Group title:\n" +" Group description\n" +"\n" +" --foo FOO foo help\n" +" --bar BAR bar help" +msgstr "" + +#: ../../library/argparse.rst:2119 +msgid "" +"Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group` " +"on a mutually exclusive group now raises an exception. This nesting was " +"never supported, often failed to work correctly, and was unintentionally " +"exposed through inheritance." +msgstr "" + +#: ../../library/argparse.rst:2127 +msgid "Parser defaults" +msgstr "" + +#: ../../library/argparse.rst:2131 +msgid "" +"Most of the time, the attributes of the object returned by :meth:" +"`parse_args` will be fully determined by inspecting the command-line " +"arguments and the argument actions. :meth:`set_defaults` allows some " +"additional attributes that are determined without any inspection of the " +"command line to be added::" +msgstr "" + +#: ../../library/argparse.rst:2137 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('foo', type=int)\n" +">>> parser.set_defaults(bar=42, baz='badger')\n" +">>> parser.parse_args(['736'])\n" +"Namespace(bar=42, baz='badger', foo=736)" +msgstr "" + +#: ../../library/argparse.rst:2143 +msgid "" +"Note that defaults can be set at both the parser level using :meth:" +"`set_defaults` and at the argument level using :meth:`add_argument`. If both " +"are called for the same argument, the last default set for an argument is " +"used::" +msgstr "" + +#: ../../library/argparse.rst:2147 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', default='bar')\n" +">>> parser.set_defaults(foo='spam')\n" +">>> parser.parse_args([])\n" +"Namespace(foo='spam')" +msgstr "" + +#: ../../library/argparse.rst:2153 +msgid "" +"Parser-level defaults can be particularly useful when working with multiple " +"parsers. See the :meth:`~ArgumentParser.add_subparsers` method for an " +"example of this type." +msgstr "" + +#: ../../library/argparse.rst:2159 +msgid "" +"Get the default value for a namespace attribute, as set by either :meth:" +"`~ArgumentParser.add_argument` or by :meth:`~ArgumentParser.set_defaults`::" +msgstr "" + +#: ../../library/argparse.rst:2163 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', default='badger')\n" +">>> parser.get_default('foo')\n" +"'badger'" +msgstr "" + +#: ../../library/argparse.rst:2170 +msgid "Printing help" +msgstr "" + +#: ../../library/argparse.rst:2172 +msgid "" +"In most typical applications, :meth:`~ArgumentParser.parse_args` will take " +"care of formatting and printing any usage or error messages. However, " +"several formatting methods are available:" +msgstr "" + +#: ../../library/argparse.rst:2178 +msgid "" +"Print a brief description of how the :class:`ArgumentParser` should be " +"invoked on the command line. If *file* is ``None``, :data:`sys.stdout` is " +"assumed." +msgstr "" + +#: ../../library/argparse.rst:2184 +msgid "" +"Print a help message, including the program usage and information about the " +"arguments registered with the :class:`ArgumentParser`. If *file* is " +"``None``, :data:`sys.stdout` is assumed." +msgstr "" + +#: ../../library/argparse.rst:2188 +msgid "" +"There are also variants of these methods that simply return a string instead " +"of printing it:" +msgstr "" + +#: ../../library/argparse.rst:2193 +msgid "" +"Return a string containing a brief description of how the :class:" +"`ArgumentParser` should be invoked on the command line." +msgstr "" + +#: ../../library/argparse.rst:2198 +msgid "" +"Return a string containing a help message, including the program usage and " +"information about the arguments registered with the :class:`ArgumentParser`." +msgstr "" + +#: ../../library/argparse.rst:2203 +msgid "Partial parsing" +msgstr "" + +#: ../../library/argparse.rst:2207 +msgid "" +"Sometimes a script only needs to handle a specific set of command-line " +"arguments, leaving any unrecognized arguments for another script or program. " +"In these cases, the :meth:`~ArgumentParser.parse_known_args` method can be " +"useful." +msgstr "" + +#: ../../library/argparse.rst:2212 +msgid "" +"This method works similarly to :meth:`~ArgumentParser.parse_args`, but it " +"does not raise an error for extra, unrecognized arguments. Instead, it " +"parses the known arguments and returns a two item tuple that contains the " +"populated namespace and the list of any unrecognized arguments." +msgstr "" + +#: ../../library/argparse.rst:2219 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo', action='store_true')\n" +">>> parser.add_argument('bar')\n" +">>> parser.parse_known_args(['--foo', '--badger', 'BAR', 'spam'])\n" +"(Namespace(bar='BAR', foo=True), ['--badger', 'spam'])" +msgstr "" + +#: ../../library/argparse.rst:2226 +msgid "" +":ref:`Prefix matching ` rules apply to :meth:" +"`~ArgumentParser.parse_known_args`. The parser may consume an option even if " +"it's just a prefix of one of its known options, instead of leaving it in the " +"remaining arguments list." +msgstr "" + +#: ../../library/argparse.rst:2233 +msgid "Customizing file parsing" +msgstr "" + +#: ../../library/argparse.rst:2237 +msgid "" +"Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " +"argument to the :class:`ArgumentParser` constructor) are read one argument " +"per line. :meth:`convert_arg_line_to_args` can be overridden for fancier " +"reading." +msgstr "" + +#: ../../library/argparse.rst:2242 +msgid "" +"This method takes a single argument *arg_line* which is a string read from " +"the argument file. It returns a list of arguments parsed from this string. " +"The method is called once per line read from the argument file, in order." +msgstr "" + +#: ../../library/argparse.rst:2246 +msgid "" +"A useful override of this method is one that treats each space-separated " +"word as an argument. The following example demonstrates how to do this::" +msgstr "" + +#: ../../library/argparse.rst:2249 +msgid "" +"class MyArgumentParser(argparse.ArgumentParser):\n" +" def convert_arg_line_to_args(self, arg_line):\n" +" return arg_line.split()" +msgstr "" + +#: ../../library/argparse.rst:2253 +msgid "" +"Note that with this override an argument can no longer contain spaces, since " +"each space-separated word becomes a separate argument." +msgstr "" + +#: ../../library/argparse.rst:2258 +msgid "Exiting methods" +msgstr "" + +#: ../../library/argparse.rst:2262 +msgid "" +"This method terminates the program, exiting with the specified *status* and, " +"if given, it prints a *message* to :data:`sys.stderr` before that. The user " +"can override this method to handle these steps differently::" +msgstr "" + +#: ../../library/argparse.rst:2266 +msgid "" +"class ErrorCatchingArgumentParser(argparse.ArgumentParser):\n" +" def exit(self, status=0, message=None):\n" +" if status:\n" +" raise Exception(f'Exiting because of an error: {message}')\n" +" exit(status)" +msgstr "" + +#: ../../library/argparse.rst:2274 +msgid "" +"This method prints a usage message, including the *message*, to :data:`sys." +"stderr` and terminates the program with a status code of 2." +msgstr "" + +#: ../../library/argparse.rst:2279 +msgid "Intermixed parsing" +msgstr "" + +#: ../../library/argparse.rst:2284 +msgid "" +"A number of Unix commands allow the user to intermix optional arguments with " +"positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " +"and :meth:`~ArgumentParser.parse_known_intermixed_args` methods support this " +"parsing style." +msgstr "" + +#: ../../library/argparse.rst:2289 +msgid "" +"These parsers do not support all the :mod:`!argparse` features, and will " +"raise exceptions if unsupported features are used. In particular, " +"subparsers, and mutually exclusive groups that include both optionals and " +"positionals are not supported." +msgstr "" + +#: ../../library/argparse.rst:2294 +msgid "" +"The following example shows the difference between :meth:`~ArgumentParser." +"parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " +"former returns ``['2', '3']`` as unparsed arguments, while the latter " +"collects all the positionals into ``rest``. ::" +msgstr "" + +#: ../../library/argparse.rst:2300 +msgid "" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.add_argument('--foo')\n" +">>> parser.add_argument('cmd')\n" +">>> parser.add_argument('rest', nargs='*', type=int)\n" +">>> parser.parse_known_args('doit 1 --foo bar 2 3'.split())\n" +"(Namespace(cmd='doit', foo='bar', rest=[1]), ['2', '3'])\n" +">>> parser.parse_intermixed_args('doit 1 --foo bar 2 3'.split())\n" +"Namespace(cmd='doit', foo='bar', rest=[1, 2, 3])" +msgstr "" + +#: ../../library/argparse.rst:2309 +msgid "" +":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " +"containing the populated namespace and the list of remaining argument " +"strings. :meth:`~ArgumentParser.parse_intermixed_args` raises an error if " +"there are any remaining unparsed argument strings." +msgstr "" + +#: ../../library/argparse.rst:2318 +msgid "Registering custom types or actions" +msgstr "" + +#: ../../library/argparse.rst:2322 +msgid "" +"Sometimes it's desirable to use a custom string in error messages to provide " +"more user-friendly output. In these cases, :meth:`!register` can be used to " +"register custom actions or types with a parser and allow you to reference " +"the type by their registered name instead of their callable name." +msgstr "" + +#: ../../library/argparse.rst:2327 +msgid "" +"The :meth:`!register` method accepts three arguments - a *registry_name*, " +"specifying the internal registry where the object will be stored (e.g., " +"``action``, ``type``), *value*, which is the key under which the object will " +"be registered, and object, the callable to be registered." +msgstr "" + +#: ../../library/argparse.rst:2332 +msgid "" +"The following example shows how to register a custom type with a parser::" +msgstr "" + +#: ../../library/argparse.rst:2334 +msgid "" +">>> import argparse\n" +">>> parser = argparse.ArgumentParser()\n" +">>> parser.register('type', 'hexadecimal integer', lambda s: int(s, 16))\n" +">>> parser.add_argument('--foo', type='hexadecimal integer')\n" +"_StoreAction(option_strings=['--foo'], dest='foo', nargs=None, const=None, " +"default=None, type='hexadecimal integer', choices=None, required=False, " +"help=None, metavar=None, deprecated=False)\n" +">>> parser.parse_args(['--foo', '0xFA'])\n" +"Namespace(foo=250)\n" +">>> parser.parse_args(['--foo', '1.2'])\n" +"usage: PROG [-h] [--foo FOO]\n" +"PROG: error: argument --foo: invalid 'hexadecimal integer' value: '1.2'" +msgstr "" + +#: ../../library/argparse.rst:2346 +msgid "Exceptions" +msgstr "Ausnahmen" + +#: ../../library/argparse.rst:2350 +msgid "An error from creating or using an argument (optional or positional)." +msgstr "" + +#: ../../library/argparse.rst:2352 +msgid "" +"The string value of this exception is the message, augmented with " +"information about the argument that caused it." +msgstr "" + +#: ../../library/argparse.rst:2357 +msgid "" +"Raised when something goes wrong converting a command line string to a type." +msgstr "" + +#: ../../library/argparse.rst:2361 +msgid "Guides and Tutorials" +msgstr "" + +#: ../../library/argparse.rst:911 +msgid "? (question mark)" +msgstr "" + +#: ../../library/argparse.rst:911 ../../library/argparse.rst:943 +#: ../../library/argparse.rst:957 +msgid "in argparse module" +msgstr "" + +#: ../../library/argparse.rst:943 +msgid "* (asterisk)" +msgstr "" + +#: ../../library/argparse.rst:957 +msgid "+ (plus)" +msgstr "" diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 7167c5c6..21af2afb 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -492,7 +492,7 @@ msgid "" "Create a task in this task group. The signature matches that of :func:" "`asyncio.create_task`. If the task group is inactive (e.g. not yet entered, " "already finished, or in the process of shutting down), we will close the " -"given ``coro``." +"given ``coro`` and raise :exc:`RuntimeError`." msgstr "" #: ../../library/asyncio-task.rst:363 @@ -554,7 +554,7 @@ msgstr "" #: ../../library/asyncio-task.rst:397 ../../library/asyncio-task.rst:565 #: ../../library/asyncio-task.rst:738 ../../library/asyncio-task.rst:799 -#: ../../library/asyncio-task.rst:825 ../../library/asyncio-task.rst:866 +#: ../../library/asyncio-task.rst:825 ../../library/asyncio-task.rst:862 msgid "Example::" msgstr "" @@ -707,7 +707,7 @@ msgid "" msgstr "" #: ../../library/asyncio-task.rst:516 ../../library/asyncio-task.rst:614 -#: ../../library/asyncio-task.rst:713 ../../library/asyncio-task.rst:891 +#: ../../library/asyncio-task.rst:713 ../../library/asyncio-task.rst:887 #: ../../library/asyncio-task.rst:949 ../../library/asyncio-task.rst:1010 msgid "Removed the *loop* parameter." msgstr "" @@ -902,7 +902,7 @@ msgid "" "`cancelled `." msgstr "" -#: ../../library/asyncio-task.rst:676 ../../library/asyncio-task.rst:846 +#: ../../library/asyncio-task.rst:676 msgid "If *aw* is a coroutine it is automatically scheduled as a Task." msgstr "" @@ -1125,35 +1125,32 @@ msgid "" "timeout." msgstr "" -#: ../../library/asyncio-task.rst:848 +#: ../../library/asyncio-task.rst:846 msgid "" "*timeout* can either be ``None`` or a float or int number of seconds to wait " "for. If *timeout* is ``None``, block until the future completes." msgstr "" -#: ../../library/asyncio-task.rst:852 -msgid "" -"If a timeout occurs, it cancels the task and raises :exc:`TimeoutError`." +#: ../../library/asyncio-task.rst:850 +msgid "If a timeout occurs, it cancels *aw* and raises :exc:`TimeoutError`." msgstr "" -#: ../../library/asyncio-task.rst:855 -msgid "" -"To avoid the task :meth:`cancellation `, wrap it in :func:" -"`shield`." +#: ../../library/asyncio-task.rst:852 +msgid "To prevent *aw* from being cancelled, wrap it in :func:`shield`." msgstr "" -#: ../../library/asyncio-task.rst:858 +#: ../../library/asyncio-task.rst:854 msgid "" "The function will wait until the future is actually cancelled, so the total " "wait time may exceed the *timeout*. If an exception happens during " "cancellation, it is propagated." msgstr "" -#: ../../library/asyncio-task.rst:862 +#: ../../library/asyncio-task.rst:858 msgid "If the wait is cancelled, the future *aw* is also cancelled." msgstr "" -#: ../../library/asyncio-task.rst:868 +#: ../../library/asyncio-task.rst:864 msgid "" "async def eternity():\n" " # Sleep for one hour\n" @@ -1174,16 +1171,22 @@ msgid "" "# timeout!" msgstr "" -#: ../../library/asyncio-task.rst:886 +#: ../../library/asyncio-task.rst:882 msgid "" "When *aw* is cancelled due to a timeout, ``wait_for`` waits for *aw* to be " "cancelled. Previously, it raised :exc:`TimeoutError` immediately." msgstr "" -#: ../../library/asyncio-task.rst:894 +#: ../../library/asyncio-task.rst:890 msgid "Raises :exc:`TimeoutError` instead of :exc:`asyncio.TimeoutError`." msgstr "" +#: ../../library/asyncio-task.rst:893 +msgid "" +"Implemented using :func:`asyncio.timeout`, a coroutine passed as *aw* is no " +"longer wrapped in a :class:`Task` when *timeout* is positive." +msgstr "" + #: ../../library/asyncio-task.rst:899 msgid "Waiting primitives" msgstr "" diff --git a/library/asyncio-task.po~ b/library/asyncio-task.po~ new file mode 100644 index 00000000..7167c5c6 --- /dev/null +++ b/library/asyncio-task.po~ @@ -0,0 +1,2016 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/asyncio-task.rst:6 +msgid "Coroutines and tasks" +msgstr "" + +#: ../../library/asyncio-task.rst:8 +msgid "" +"This section outlines high-level asyncio APIs to work with coroutines and " +"Tasks." +msgstr "" + +#: ../../library/asyncio-task.rst:19 ../../library/asyncio-task.rst:148 +msgid "Coroutines" +msgstr "" + +#: ../../library/asyncio-task.rst:21 +msgid "**Source code:** :source:`Lib/asyncio/coroutines.py`" +msgstr "" + +#: ../../library/asyncio-task.rst:25 +msgid "" +":term:`Coroutines ` declared with the async/await syntax is the " +"preferred way of writing asyncio applications. For example, the following " +"snippet of code prints \"hello\", waits 1 second, and then prints \"world\"::" +msgstr "" + +#: ../../library/asyncio-task.rst:30 +msgid "" +">>> import asyncio\n" +"\n" +">>> async def main():\n" +"... print('hello')\n" +"... await asyncio.sleep(1)\n" +"... print('world')\n" +"\n" +">>> asyncio.run(main())\n" +"hello\n" +"world" +msgstr "" + +#: ../../library/asyncio-task.rst:41 +msgid "" +"Note that simply calling a coroutine will not schedule it to be executed::" +msgstr "" + +#: ../../library/asyncio-task.rst:44 +msgid "" +">>> main()\n" +"" +msgstr "" + +#: ../../library/asyncio-task.rst:47 +msgid "To actually run a coroutine, asyncio provides the following mechanisms:" +msgstr "" + +#: ../../library/asyncio-task.rst:49 +msgid "" +"The :func:`asyncio.run` function to run the top-level entry point \"main()\" " +"function (see the above example.)" +msgstr "" + +#: ../../library/asyncio-task.rst:52 +msgid "" +"Awaiting on a coroutine. The following snippet of code will print \"hello\" " +"after waiting for 1 second, and then print \"world\" after waiting for " +"*another* 2 seconds::" +msgstr "" + +#: ../../library/asyncio-task.rst:56 +msgid "" +"import asyncio\n" +"import time\n" +"\n" +"async def say_after(delay, what):\n" +" await asyncio.sleep(delay)\n" +" print(what)\n" +"\n" +"async def main():\n" +" print(f\"started at {time.strftime('%X')}\")\n" +"\n" +" await say_after(1, 'hello')\n" +" await say_after(2, 'world')\n" +"\n" +" print(f\"finished at {time.strftime('%X')}\")\n" +"\n" +"asyncio.run(main())" +msgstr "" + +#: ../../library/asyncio-task.rst:73 +msgid "Expected output::" +msgstr "" + +#: ../../library/asyncio-task.rst:75 +msgid "" +"started at 17:13:52\n" +"hello\n" +"world\n" +"finished at 17:13:55" +msgstr "" + +#: ../../library/asyncio-task.rst:80 +msgid "" +"The :func:`asyncio.create_task` function to run coroutines concurrently as " +"asyncio :class:`Tasks `." +msgstr "" + +#: ../../library/asyncio-task.rst:83 +msgid "" +"Let's modify the above example and run two ``say_after`` coroutines " +"*concurrently*::" +msgstr "" + +#: ../../library/asyncio-task.rst:86 +msgid "" +"async def main():\n" +" task1 = asyncio.create_task(\n" +" say_after(1, 'hello'))\n" +"\n" +" task2 = asyncio.create_task(\n" +" say_after(2, 'world'))\n" +"\n" +" print(f\"started at {time.strftime('%X')}\")\n" +"\n" +" # Wait until both tasks are completed (should take\n" +" # around 2 seconds.)\n" +" await task1\n" +" await task2\n" +"\n" +" print(f\"finished at {time.strftime('%X')}\")" +msgstr "" + +#: ../../library/asyncio-task.rst:102 +msgid "" +"Note that expected output now shows that the snippet runs 1 second faster " +"than before::" +msgstr "" + +#: ../../library/asyncio-task.rst:105 +msgid "" +"started at 17:14:32\n" +"hello\n" +"world\n" +"finished at 17:14:34" +msgstr "" + +#: ../../library/asyncio-task.rst:110 +msgid "" +"The :class:`asyncio.TaskGroup` class provides a more modern alternative to :" +"func:`create_task`. Using this API, the last example becomes::" +msgstr "" + +#: ../../library/asyncio-task.rst:114 +msgid "" +"async def main():\n" +" async with asyncio.TaskGroup() as tg:\n" +" task1 = tg.create_task(\n" +" say_after(1, 'hello'))\n" +"\n" +" task2 = tg.create_task(\n" +" say_after(2, 'world'))\n" +"\n" +" print(f\"started at {time.strftime('%X')}\")\n" +"\n" +" # The await is implicit when the context manager exits.\n" +"\n" +" print(f\"finished at {time.strftime('%X')}\")" +msgstr "" + +#: ../../library/asyncio-task.rst:128 +msgid "The timing and output should be the same as for the previous version." +msgstr "" + +#: ../../library/asyncio-task.rst:130 +msgid ":class:`asyncio.TaskGroup`." +msgstr "" + +#: ../../library/asyncio-task.rst:137 +msgid "Awaitables" +msgstr "" + +#: ../../library/asyncio-task.rst:139 +msgid "" +"We say that an object is an **awaitable** object if it can be used in an :" +"keyword:`await` expression. Many asyncio APIs are designed to accept " +"awaitables." +msgstr "" + +#: ../../library/asyncio-task.rst:143 +msgid "" +"There are three main types of *awaitable* objects: **coroutines**, " +"**Tasks**, and **Futures**." +msgstr "" + +#: ../../library/asyncio-task.rst:149 +msgid "" +"Python coroutines are *awaitables* and therefore can be awaited from other " +"coroutines::" +msgstr "" + +#: ../../library/asyncio-task.rst:152 +msgid "" +"import asyncio\n" +"\n" +"async def nested():\n" +" return 42\n" +"\n" +"async def main():\n" +" # Nothing happens if we just call \"nested()\".\n" +" # A coroutine object is created but not awaited,\n" +" # so it *won't run at all*.\n" +" nested() # will raise a \"RuntimeWarning\".\n" +"\n" +" # Let's do it differently now and await it:\n" +" print(await nested()) # will print \"42\".\n" +"\n" +"asyncio.run(main())" +msgstr "" + +#: ../../library/asyncio-task.rst:170 +msgid "" +"In this documentation the term \"coroutine\" can be used for two closely " +"related concepts:" +msgstr "" + +#: ../../library/asyncio-task.rst:173 +msgid "a *coroutine function*: an :keyword:`async def` function;" +msgstr "" + +#: ../../library/asyncio-task.rst:175 +msgid "" +"a *coroutine object*: an object returned by calling a *coroutine function*." +msgstr "" + +#: ../../library/asyncio-task.rst:180 +msgid "Tasks" +msgstr "" + +#: ../../library/asyncio-task.rst:181 +msgid "*Tasks* are used to schedule coroutines *concurrently*." +msgstr "" + +#: ../../library/asyncio-task.rst:183 +msgid "" +"When a coroutine is wrapped into a *Task* with functions like :func:`asyncio." +"create_task` the coroutine is automatically scheduled to run soon::" +msgstr "" + +#: ../../library/asyncio-task.rst:187 +msgid "" +"import asyncio\n" +"\n" +"async def nested():\n" +" return 42\n" +"\n" +"async def main():\n" +" # Schedule nested() to run soon concurrently\n" +" # with \"main()\".\n" +" task = asyncio.create_task(nested())\n" +"\n" +" # \"task\" can now be used to cancel \"nested()\", or\n" +" # can simply be awaited to wait until it is complete:\n" +" await task\n" +"\n" +"asyncio.run(main())" +msgstr "" + +#: ../../library/asyncio-task.rst:205 +msgid "Futures" +msgstr "" + +#: ../../library/asyncio-task.rst:206 +msgid "" +"A :class:`Future` is a special **low-level** awaitable object that " +"represents an **eventual result** of an asynchronous operation." +msgstr "" + +#: ../../library/asyncio-task.rst:209 +msgid "" +"When a Future object is *awaited* it means that the coroutine will wait " +"until the Future is resolved in some other place." +msgstr "" + +#: ../../library/asyncio-task.rst:212 +msgid "" +"Future objects in asyncio are needed to allow callback-based code to be used " +"with async/await." +msgstr "" + +#: ../../library/asyncio-task.rst:215 +msgid "" +"Normally **there is no need** to create Future objects at the application " +"level code." +msgstr "" + +#: ../../library/asyncio-task.rst:218 +msgid "" +"Future objects, sometimes exposed by libraries and some asyncio APIs, can be " +"awaited::" +msgstr "" + +#: ../../library/asyncio-task.rst:221 +msgid "" +"async def main():\n" +" await function_that_returns_a_future_object()\n" +"\n" +" # this is also valid:\n" +" await asyncio.gather(\n" +" function_that_returns_a_future_object(),\n" +" some_python_coroutine()\n" +" )" +msgstr "" + +#: ../../library/asyncio-task.rst:230 +msgid "" +"A good example of a low-level function that returns a Future object is :meth:" +"`loop.run_in_executor`." +msgstr "" + +#: ../../library/asyncio-task.rst:235 +msgid "Creating tasks" +msgstr "" + +#: ../../library/asyncio-task.rst:237 +msgid "**Source code:** :source:`Lib/asyncio/tasks.py`" +msgstr "" + +#: ../../library/asyncio-task.rst:243 +msgid "" +"Wrap the *coro* :ref:`coroutine ` into a :class:`Task` and " +"schedule its execution. Return the Task object." +msgstr "" + +#: ../../library/asyncio-task.rst:246 +msgid "" +"The full function signature is largely the same as that of the :class:`Task` " +"constructor (or factory) - all of the keyword arguments to this function are " +"passed through to that interface." +msgstr "" + +#: ../../library/asyncio-task.rst:250 +msgid "" +"An optional keyword-only *context* argument allows specifying a custom :" +"class:`contextvars.Context` for the *coro* to run in. The current context " +"copy is created when no *context* is provided." +msgstr "" + +#: ../../library/asyncio-task.rst:254 +msgid "" +"An optional keyword-only *eager_start* argument allows specifying if the " +"task should execute eagerly during the call to create_task, or be scheduled " +"later. If *eager_start* is not passed the mode set by :meth:`loop." +"set_task_factory` will be used." +msgstr "" + +#: ../../library/asyncio-task.rst:259 +msgid "" +"The task is executed in the loop returned by :func:`get_running_loop`, :exc:" +"`RuntimeError` is raised if there is no running loop in current thread." +msgstr "" + +#: ../../library/asyncio-task.rst:265 +msgid "" +":meth:`asyncio.TaskGroup.create_task` is a new alternative leveraging " +"structural concurrency; it allows for waiting for a group of related tasks " +"with strong safety guarantees." +msgstr "" + +#: ../../library/asyncio-task.rst:271 +msgid "" +"Save a reference to the result of this function, to avoid a task " +"disappearing mid-execution. The event loop only keeps weak references to " +"tasks. A task that isn't referenced elsewhere may get garbage collected at " +"any time, even before it's done. For reliable \"fire-and-forget\" background " +"tasks, gather them in a collection::" +msgstr "" + +#: ../../library/asyncio-task.rst:278 +msgid "" +"background_tasks = set()\n" +"\n" +"for i in range(10):\n" +" task = asyncio.create_task(some_coro(param=i))\n" +"\n" +" # Add task to the set. This creates a strong reference.\n" +" background_tasks.add(task)\n" +"\n" +" # To prevent keeping references to finished tasks forever,\n" +" # make each task remove its own reference from the set after\n" +" # completion:\n" +" task.add_done_callback(background_tasks.discard)" +msgstr "" + +#: ../../library/asyncio-task.rst:291 +msgid "" +"Note that this approach never awaits the tasks, so if a task fails, its " +"exception is never retrieved and asyncio logs a \"Task exception was never " +"retrieved\" message when the task is garbage collected. To avoid this, use :" +"class:`asyncio.TaskGroup` which keeps a strong reference to each task, " +"awaits them and propagates their exceptions::" +msgstr "" + +#: ../../library/asyncio-task.rst:298 +msgid "" +"async with asyncio.TaskGroup() as tg:\n" +" for i in range(10):\n" +" tg.create_task(some_coro(param=i))" +msgstr "" + +#: ../../library/asyncio-task.rst:304 ../../library/asyncio-task.rst:1265 +msgid "Added the *name* parameter." +msgstr "" + +#: ../../library/asyncio-task.rst:307 ../../library/asyncio-task.rst:1272 +msgid "Added the *context* parameter." +msgstr "" + +#: ../../library/asyncio-task.rst:310 +msgid "Added the *eager_start* parameter by passing on all *kwargs*." +msgstr "" + +#: ../../library/asyncio-task.rst:315 +msgid "Task cancellation" +msgstr "" + +#: ../../library/asyncio-task.rst:317 +msgid "" +"Tasks can easily and safely be cancelled. When a task is cancelled, :exc:" +"`asyncio.CancelledError` will be raised in the task at the next opportunity." +msgstr "" + +#: ../../library/asyncio-task.rst:321 +msgid "" +"It is recommended that coroutines use ``try/finally`` blocks to robustly " +"perform clean-up logic. In case :exc:`asyncio.CancelledError` is explicitly " +"caught, it should generally be propagated when clean-up is complete. :exc:" +"`asyncio.CancelledError` directly subclasses :exc:`BaseException` so most " +"code will not need to be aware of it." +msgstr "" + +#: ../../library/asyncio-task.rst:327 +msgid "" +"The asyncio components that enable structured concurrency, like :class:" +"`asyncio.TaskGroup` and :func:`asyncio.timeout`, are implemented using " +"cancellation internally and might misbehave if a coroutine swallows :exc:" +"`asyncio.CancelledError`. Similarly, user code should not generally call :" +"meth:`uncancel `. However, in cases when suppressing :" +"exc:`asyncio.CancelledError` is truly desired, it is necessary to also call " +"``uncancel()`` to completely remove the cancellation state." +msgstr "" + +#: ../../library/asyncio-task.rst:339 +msgid "Task groups" +msgstr "" + +#: ../../library/asyncio-task.rst:341 +msgid "" +"Task groups combine a task creation API with a convenient and reliable way " +"to wait for all tasks in the group to finish." +msgstr "" + +#: ../../library/asyncio-task.rst:346 +msgid "" +"An :ref:`asynchronous context manager ` holding a " +"group of tasks. Tasks can be added to the group using :meth:`create_task`. " +"All tasks are awaited when the context manager exits." +msgstr "" + +#: ../../library/asyncio-task.rst:355 +msgid "" +"Create a task in this task group. The signature matches that of :func:" +"`asyncio.create_task`. If the task group is inactive (e.g. not yet entered, " +"already finished, or in the process of shutting down), we will close the " +"given ``coro``." +msgstr "" + +#: ../../library/asyncio-task.rst:363 +msgid "Close the given coroutine if the task group is not active." +msgstr "" + +#: ../../library/asyncio-task.rst:367 +msgid "Passes on all *kwargs* to :meth:`loop.create_task`" +msgstr "" + +#: ../../library/asyncio-task.rst:371 +msgid "" +"Cancel the task group. This is a non-exceptional, early exit of the task " +"group's lifetime -- useful once the group's goal has been met or its " +"services no longer needed." +msgstr "" + +#: ../../library/asyncio-task.rst:375 +msgid "" +":meth:`~asyncio.Task.cancel` will be called on any tasks in the group that " +"aren't yet done, as well as the parent (body) of the group. The task group " +"context manager will exit *without* :exc:`asyncio.CancelledError` being " +"raised." +msgstr "" + +#: ../../library/asyncio-task.rst:379 +msgid "" +"If :meth:`cancel` is called before entering the task group, the group will " +"be cancelled upon entry. This is useful for patterns where one piece of " +"code passes an unused :class:`asyncio.TaskGroup` instance to another in " +"order to have the ability to cancel anything run within the group." +msgstr "" + +#: ../../library/asyncio-task.rst:384 +msgid "" +":meth:`cancel` is idempotent and may be called after the task group has " +"already exited." +msgstr "" + +#: ../../library/asyncio-task.rst:387 +msgid "Some ways to use :meth:`cancel`:" +msgstr "" + +#: ../../library/asyncio-task.rst:389 +msgid "call it from the task group body based on some condition or event" +msgstr "" + +#: ../../library/asyncio-task.rst:390 +msgid "" +"pass the task group instance to child tasks via :meth:`create_task`, " +"allowing a child task to conditionally cancel the entire group" +msgstr "" + +#: ../../library/asyncio-task.rst:392 +msgid "" +"pass the task group instance or bound :meth:`cancel` method to some other " +"task *before* opening the task group, allowing remote cancellation" +msgstr "" + +#: ../../library/asyncio-task.rst:397 ../../library/asyncio-task.rst:565 +#: ../../library/asyncio-task.rst:738 ../../library/asyncio-task.rst:799 +#: ../../library/asyncio-task.rst:825 ../../library/asyncio-task.rst:866 +msgid "Example::" +msgstr "" + +#: ../../library/asyncio-task.rst:399 +msgid "" +"async def main():\n" +" async with asyncio.TaskGroup() as tg:\n" +" task1 = tg.create_task(some_coro(...))\n" +" task2 = tg.create_task(another_coro(...))\n" +" print(f\"Both tasks have completed now: {task1.result()}, {task2." +"result()}\")" +msgstr "" + +#: ../../library/asyncio-task.rst:405 +msgid "" +"The ``async with`` statement will wait for all tasks in the group to finish. " +"While waiting, new tasks may still be added to the group (for example, by " +"passing ``tg`` into one of the coroutines and calling ``tg.create_task()`` " +"in that coroutine). There is also opportunity to request termination of the " +"entire task group with ``tg.cancel()``, based on some condition. Once the " +"last task has finished and the ``async with`` block is exited, no new tasks " +"may be added to the group." +msgstr "" + +#: ../../library/asyncio-task.rst:413 +msgid "" +"The first time any of the tasks belonging to the group fails with an " +"exception other than :exc:`asyncio.CancelledError`, the remaining tasks in " +"the group are cancelled. No further tasks can then be added to the group. At " +"this point, if the body of the ``async with`` statement is still active (i." +"e., :meth:`~object.__aexit__` hasn't been called yet), the task directly " +"containing the ``async with`` statement is also cancelled. The resulting :" +"exc:`asyncio.CancelledError` will interrupt an ``await``, but it will not " +"bubble out of the containing ``async with`` statement." +msgstr "" + +#: ../../library/asyncio-task.rst:423 +msgid "" +"Once all tasks have finished, if any tasks have failed with an exception " +"other than :exc:`asyncio.CancelledError`, those exceptions are combined in " +"an :exc:`ExceptionGroup` or :exc:`BaseExceptionGroup` (as appropriate; see " +"their documentation) which is then raised." +msgstr "" + +#: ../../library/asyncio-task.rst:430 +msgid "" +"Two base exceptions are treated specially: If any task fails with :exc:" +"`KeyboardInterrupt` or :exc:`SystemExit`, the task group still cancels the " +"remaining tasks and waits for them, but then the initial :exc:" +"`KeyboardInterrupt` or :exc:`SystemExit` is re-raised instead of :exc:" +"`ExceptionGroup` or :exc:`BaseExceptionGroup`." +msgstr "" + +#: ../../library/asyncio-task.rst:436 +msgid "" +"If the body of the ``async with`` statement exits with an exception (so :" +"meth:`~object.__aexit__` is called with an exception set), this is treated " +"the same as if one of the tasks failed: the remaining tasks are cancelled " +"and then waited for, and non-cancellation exceptions are grouped into an " +"exception group and raised. The exception passed into :meth:`~object." +"__aexit__`, unless it is :exc:`asyncio.CancelledError`, is also included in " +"the exception group. The same special case is made for :exc:" +"`KeyboardInterrupt` and :exc:`SystemExit` as in the previous paragraph. " +"There is an additional special case made only for the body of the ``async " +"with``: if it raises :exc:`GeneratorExit` and none of the other tasks raise " +"exceptions that would be reported, then the :exc:`GeneratorExit` is reraised." +msgstr "" + +#: ../../library/asyncio-task.rst:452 +msgid "" +"Task groups are careful not to mix up the internal cancellation used to " +"\"wake up\" their :meth:`~object.__aexit__` with cancellation requests for " +"the task in which they are running made by other parties. In particular, " +"when one task group is syntactically nested in another, and both experience " +"an exception in one of their child tasks simultaneously, the inner task " +"group will process its exceptions, and then the outer task group will " +"receive another cancellation and process its own exceptions." +msgstr "" + +#: ../../library/asyncio-task.rst:460 +msgid "" +"In the case where a task group is cancelled externally and also must raise " +"an :exc:`ExceptionGroup`, it will call the parent task's :meth:`~asyncio." +"Task.cancel` method. This ensures that a :exc:`asyncio.CancelledError` will " +"be raised at the next :keyword:`await`, so the cancellation is not lost." +msgstr "" + +#: ../../library/asyncio-task.rst:466 +msgid "" +"Task groups preserve the cancellation count reported by :meth:`asyncio.Task." +"cancelling`." +msgstr "" + +#: ../../library/asyncio-task.rst:471 +msgid "" +"Improved handling of simultaneous internal and external cancellations and " +"correct preservation of cancellation counts." +msgstr "" + +#: ../../library/asyncio-task.rst:476 +msgid "Addition of the special case for :exc:`GeneratorExit`." +msgstr "" + +#: ../../library/asyncio-task.rst:479 +msgid "Sleeping" +msgstr "" + +#: ../../library/asyncio-task.rst:484 +msgid "Block for *delay* seconds." +msgstr "" + +#: ../../library/asyncio-task.rst:486 +msgid "" +"If *result* is provided, it is returned to the caller when the coroutine " +"completes." +msgstr "" + +#: ../../library/asyncio-task.rst:489 +msgid "" +"``sleep()`` always suspends the current task, allowing other tasks to run." +msgstr "" + +#: ../../library/asyncio-task.rst:492 +msgid "" +"Setting the delay to 0 provides an optimized path to allow other tasks to " +"run. This can be used by long-running functions to avoid blocking the event " +"loop for the full duration of the function call." +msgstr "" + +#: ../../library/asyncio-task.rst:498 +msgid "" +"Example of coroutine displaying the current date every second for 5 seconds::" +msgstr "" + +#: ../../library/asyncio-task.rst:501 +msgid "" +"import asyncio\n" +"import datetime as dt\n" +"\n" +"async def display_date():\n" +" loop = asyncio.get_running_loop()\n" +" end_time = loop.time() + 5.0\n" +" while True:\n" +" print(dt.datetime.now())\n" +" if (loop.time() + 1.0) >= end_time:\n" +" break\n" +" await asyncio.sleep(1)\n" +"\n" +"asyncio.run(display_date())" +msgstr "" + +#: ../../library/asyncio-task.rst:516 ../../library/asyncio-task.rst:614 +#: ../../library/asyncio-task.rst:713 ../../library/asyncio-task.rst:891 +#: ../../library/asyncio-task.rst:949 ../../library/asyncio-task.rst:1010 +msgid "Removed the *loop* parameter." +msgstr "" + +#: ../../library/asyncio-task.rst:519 +msgid "Raises :exc:`ValueError` if *delay* is :data:`~math.nan`." +msgstr "" + +#: ../../library/asyncio-task.rst:524 +msgid "Running tasks concurrently" +msgstr "" + +#: ../../library/asyncio-task.rst:528 +msgid "" +"Run :ref:`awaitable objects ` in the *aws* sequence " +"*concurrently*." +msgstr "" + +#: ../../library/asyncio-task.rst:531 +msgid "" +"If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " +"Task." +msgstr "" + +#: ../../library/asyncio-task.rst:534 +msgid "" +"If all awaitables are completed successfully, the result is an aggregate " +"list of returned values. The order of result values corresponds to the " +"order of awaitables in *aws*." +msgstr "" + +#: ../../library/asyncio-task.rst:538 +msgid "" +"If *return_exceptions* is ``False`` (default), the first raised exception is " +"immediately propagated to the task that awaits on ``gather()``. Other " +"awaitables in the *aws* sequence **won't be cancelled** and will continue to " +"run." +msgstr "" + +#: ../../library/asyncio-task.rst:543 +msgid "" +"If *return_exceptions* is ``True``, exceptions are treated the same as " +"successful results, and aggregated in the result list." +msgstr "" + +#: ../../library/asyncio-task.rst:546 +msgid "" +"If ``gather()`` is *cancelled*, all submitted awaitables (that have not " +"completed yet) are also *cancelled*." +msgstr "" + +#: ../../library/asyncio-task.rst:549 +msgid "" +"If any Task or Future from the *aws* sequence is *cancelled*, it is treated " +"as if it raised :exc:`CancelledError` -- the ``gather()`` call is **not** " +"cancelled in this case. This is to prevent the cancellation of one " +"submitted Task/Future to cause other Tasks/Futures to be cancelled." +msgstr "" + +#: ../../library/asyncio-task.rst:556 +msgid "" +"A new alternative to create and run tasks concurrently and wait for their " +"completion is :class:`asyncio.TaskGroup`. *TaskGroup* provides stronger " +"safety guarantees than *gather* for scheduling a nesting of subtasks: if a " +"task (or a subtask, a task scheduled by a task) raises an exception, " +"*TaskGroup* will, while *gather* will not, cancel the remaining scheduled " +"tasks." +msgstr "" + +#: ../../library/asyncio-task.rst:567 +msgid "" +"import asyncio\n" +"\n" +"async def factorial(name, number):\n" +" f = 1\n" +" for i in range(2, number + 1):\n" +" print(f\"Task {name}: Compute factorial({number}), currently i={i}..." +"\")\n" +" await asyncio.sleep(1)\n" +" f *= i\n" +" print(f\"Task {name}: factorial({number}) = {f}\")\n" +" return f\n" +"\n" +"async def main():\n" +" # Schedule three calls *concurrently*:\n" +" L = await asyncio.gather(\n" +" factorial(\"A\", 2),\n" +" factorial(\"B\", 3),\n" +" factorial(\"C\", 4),\n" +" )\n" +" print(L)\n" +"\n" +"asyncio.run(main())\n" +"\n" +"# Expected output:\n" +"#\n" +"# Task A: Compute factorial(2), currently i=2...\n" +"# Task B: Compute factorial(3), currently i=2...\n" +"# Task C: Compute factorial(4), currently i=2...\n" +"# Task A: factorial(2) = 2\n" +"# Task B: Compute factorial(3), currently i=3...\n" +"# Task C: Compute factorial(4), currently i=3...\n" +"# Task B: factorial(3) = 6\n" +"# Task C: Compute factorial(4), currently i=4...\n" +"# Task C: factorial(4) = 24\n" +"# [2, 6, 24]" +msgstr "" + +#: ../../library/asyncio-task.rst:603 +msgid "" +"If *return_exceptions* is false, cancelling gather() after it has been " +"marked done won't cancel any submitted awaitables. For instance, gather can " +"be marked done after propagating an exception to the caller, therefore, " +"calling ``gather.cancel()`` after catching an exception (raised by one of " +"the awaitables) from gather won't cancel any other awaitables." +msgstr "" + +#: ../../library/asyncio-task.rst:610 +msgid "" +"If the *gather* itself is cancelled, the cancellation is propagated " +"regardless of *return_exceptions*." +msgstr "" + +#: ../../library/asyncio-task.rst:617 +msgid "" +"Deprecation warning is emitted if no positional arguments are provided or " +"not all positional arguments are Future-like objects and there is no running " +"event loop." +msgstr "" + +#: ../../library/asyncio-task.rst:626 +msgid "Eager task factory" +msgstr "" + +#: ../../library/asyncio-task.rst:630 +msgid "A task factory for eager task execution." +msgstr "" + +#: ../../library/asyncio-task.rst:632 +msgid "" +"When using this factory (via :meth:`loop.set_task_factory(asyncio." +"eager_task_factory) `), coroutines begin execution " +"synchronously during :class:`Task` construction. Tasks are only scheduled on " +"the event loop if they block. This can be a performance improvement as the " +"overhead of loop scheduling is avoided for coroutines that complete " +"synchronously." +msgstr "" + +#: ../../library/asyncio-task.rst:638 +msgid "" +"A common example where this is beneficial is coroutines which employ caching " +"or memoization to avoid actual I/O when possible." +msgstr "" + +#: ../../library/asyncio-task.rst:643 +msgid "" +"Immediate execution of the coroutine is a semantic change. If the coroutine " +"returns or raises, the task is never scheduled to the event loop. If the " +"coroutine execution blocks, the task is scheduled to the event loop. This " +"change may introduce behavior changes to existing applications. For example, " +"the application's task execution order is likely to change." +msgstr "" + +#: ../../library/asyncio-task.rst:654 +msgid "" +"Create an eager task factory, similar to :func:`eager_task_factory`, using " +"the provided *custom_task_constructor* when creating a new task instead of " +"the default :class:`Task`." +msgstr "" + +#: ../../library/asyncio-task.rst:658 +msgid "" +"*custom_task_constructor* must be a *callable* with the signature matching " +"the signature of :class:`Task.__init__ `. The callable must return a :" +"class:`asyncio.Task`-compatible object." +msgstr "" + +#: ../../library/asyncio-task.rst:662 +msgid "" +"This function returns a *callable* intended to be used as a task factory of " +"an event loop via :meth:`loop.set_task_factory(factory) `)." +msgstr "" + +#: ../../library/asyncio-task.rst:669 +msgid "Shielding from cancellation" +msgstr "" + +#: ../../library/asyncio-task.rst:673 +msgid "" +"Protect an :ref:`awaitable object ` from being :meth:" +"`cancelled `." +msgstr "" + +#: ../../library/asyncio-task.rst:676 ../../library/asyncio-task.rst:846 +msgid "If *aw* is a coroutine it is automatically scheduled as a Task." +msgstr "" + +#: ../../library/asyncio-task.rst:678 +msgid "The statement::" +msgstr "" + +#: ../../library/asyncio-task.rst:680 +msgid "" +"task = asyncio.create_task(something())\n" +"res = await shield(task)" +msgstr "" + +#: ../../library/asyncio-task.rst:683 +msgid "is equivalent to::" +msgstr "" + +#: ../../library/asyncio-task.rst:685 +msgid "res = await something()" +msgstr "" + +#: ../../library/asyncio-task.rst:687 +msgid "" +"*except* that if the coroutine containing it is cancelled, the Task running " +"in ``something()`` is not cancelled. From the point of view of " +"``something()``, the cancellation did not happen. Although its caller is " +"still cancelled, so the \"await\" expression still raises a :exc:" +"`CancelledError`." +msgstr "" + +#: ../../library/asyncio-task.rst:693 +msgid "" +"If ``something()`` is cancelled by other means (i.e. from within itself) " +"that would also cancel ``shield()``." +msgstr "" + +#: ../../library/asyncio-task.rst:696 +msgid "" +"If it is desired to completely ignore cancellation (not recommended) the " +"``shield()`` function should be combined with a try/except clause, as " +"follows::" +msgstr "" + +#: ../../library/asyncio-task.rst:700 +msgid "" +"task = asyncio.create_task(something())\n" +"try:\n" +" res = await shield(task)\n" +"except CancelledError:\n" +" res = None" +msgstr "" + +#: ../../library/asyncio-task.rst:708 +msgid "" +"Save a reference to tasks passed to this function, to avoid a task " +"disappearing mid-execution. The event loop only keeps weak references to " +"tasks. A task that isn't referenced elsewhere may get garbage collected at " +"any time, even before it's done." +msgstr "" + +#: ../../library/asyncio-task.rst:716 +msgid "" +"Deprecation warning is emitted if *aw* is not Future-like object and there " +"is no running event loop." +msgstr "" + +#: ../../library/asyncio-task.rst:722 +msgid "Timeouts" +msgstr "" + +#: ../../library/asyncio-task.rst:726 +msgid "" +"Return an :ref:`asynchronous context manager ` that " +"can be used to limit the amount of time spent waiting on something." +msgstr "" + +#: ../../library/asyncio-task.rst:730 +msgid "" +"*delay* can either be ``None``, or a float/int number of seconds to wait. If " +"*delay* is ``None``, no time limit will be applied; this can be useful if " +"the delay is unknown when the context manager is created." +msgstr "" + +#: ../../library/asyncio-task.rst:735 +msgid "" +"In either case, the context manager can be rescheduled after creation using :" +"meth:`Timeout.reschedule`." +msgstr "" + +#: ../../library/asyncio-task.rst:740 +msgid "" +"async def main():\n" +" async with asyncio.timeout(10):\n" +" await long_running_task()" +msgstr "" + +#: ../../library/asyncio-task.rst:744 +msgid "" +"If ``long_running_task`` takes more than 10 seconds to complete, the context " +"manager will cancel the current task and handle the resulting :exc:`asyncio." +"CancelledError` internally, transforming it into a :exc:`TimeoutError` which " +"can be caught and handled." +msgstr "" + +#: ../../library/asyncio-task.rst:751 +msgid "" +"The :func:`asyncio.timeout` context manager is what transforms the :exc:" +"`asyncio.CancelledError` into a :exc:`TimeoutError`, which means the :exc:" +"`TimeoutError` can only be caught *outside* of the context manager." +msgstr "" + +#: ../../library/asyncio-task.rst:756 +msgid "Example of catching :exc:`TimeoutError`::" +msgstr "" + +#: ../../library/asyncio-task.rst:758 +msgid "" +"async def main():\n" +" try:\n" +" async with asyncio.timeout(10):\n" +" await long_running_task()\n" +" except TimeoutError:\n" +" print(\"The long operation timed out, but we've handled it.\")\n" +"\n" +" print(\"This statement will run regardless.\")" +msgstr "" + +#: ../../library/asyncio-task.rst:767 +msgid "" +"The context manager produced by :func:`asyncio.timeout` can be rescheduled " +"to a different deadline and inspected." +msgstr "" + +#: ../../library/asyncio-task.rst:772 +msgid "" +"An :ref:`asynchronous context manager ` for " +"cancelling overdue coroutines." +msgstr "" + +#: ../../library/asyncio-task.rst:775 +msgid "" +"Prefer using :func:`asyncio.timeout` or :func:`asyncio.timeout_at` rather " +"than instantiating :class:`!Timeout` directly." +msgstr "" + +#: ../../library/asyncio-task.rst:778 +msgid "" +"``when`` should be an absolute time at which the context should time out, as " +"measured by the event loop's clock:" +msgstr "" + +#: ../../library/asyncio-task.rst:781 +msgid "If ``when`` is ``None``, the timeout will never trigger." +msgstr "" + +#: ../../library/asyncio-task.rst:782 +msgid "" +"If ``when < loop.time()``, the timeout will trigger on the next iteration of " +"the event loop." +msgstr "" + +#: ../../library/asyncio-task.rst:787 +msgid "" +"Return the current deadline, or ``None`` if the current deadline is not set." +msgstr "" + +#: ../../library/asyncio-task.rst:792 +msgid "Reschedule the timeout." +msgstr "" + +#: ../../library/asyncio-task.rst:796 +msgid "Return whether the context manager has exceeded its deadline (expired)." +msgstr "" + +#: ../../library/asyncio-task.rst:801 +msgid "" +"async def main():\n" +" try:\n" +" # We do not know the timeout when starting, so we pass ``None``.\n" +" async with asyncio.timeout(None) as cm:\n" +" # We know the timeout now, so we reschedule it.\n" +" new_deadline = get_running_loop().time() + 10\n" +" cm.reschedule(new_deadline)\n" +"\n" +" await long_running_task()\n" +" except TimeoutError:\n" +" pass\n" +"\n" +" if cm.expired():\n" +" print(\"Looks like we haven't finished on time.\")" +msgstr "" + +#: ../../library/asyncio-task.rst:816 +msgid "Timeout context managers can be safely nested." +msgstr "" + +#: ../../library/asyncio-task.rst:822 +msgid "" +"Similar to :func:`asyncio.timeout`, except *when* is the absolute time to " +"stop waiting, or ``None``." +msgstr "" + +#: ../../library/asyncio-task.rst:827 +msgid "" +"async def main():\n" +" loop = get_running_loop()\n" +" deadline = loop.time() + 20\n" +" try:\n" +" async with asyncio.timeout_at(deadline):\n" +" await long_running_task()\n" +" except TimeoutError:\n" +" print(\"The long operation timed out, but we've handled it.\")\n" +"\n" +" print(\"This statement will run regardless.\")" +msgstr "" + +#: ../../library/asyncio-task.rst:843 +msgid "" +"Wait for the *aw* :ref:`awaitable ` to complete with a " +"timeout." +msgstr "" + +#: ../../library/asyncio-task.rst:848 +msgid "" +"*timeout* can either be ``None`` or a float or int number of seconds to wait " +"for. If *timeout* is ``None``, block until the future completes." +msgstr "" + +#: ../../library/asyncio-task.rst:852 +msgid "" +"If a timeout occurs, it cancels the task and raises :exc:`TimeoutError`." +msgstr "" + +#: ../../library/asyncio-task.rst:855 +msgid "" +"To avoid the task :meth:`cancellation `, wrap it in :func:" +"`shield`." +msgstr "" + +#: ../../library/asyncio-task.rst:858 +msgid "" +"The function will wait until the future is actually cancelled, so the total " +"wait time may exceed the *timeout*. If an exception happens during " +"cancellation, it is propagated." +msgstr "" + +#: ../../library/asyncio-task.rst:862 +msgid "If the wait is cancelled, the future *aw* is also cancelled." +msgstr "" + +#: ../../library/asyncio-task.rst:868 +msgid "" +"async def eternity():\n" +" # Sleep for one hour\n" +" await asyncio.sleep(3600)\n" +" print('yay!')\n" +"\n" +"async def main():\n" +" # Wait for at most 1 second\n" +" try:\n" +" await asyncio.wait_for(eternity(), timeout=1.0)\n" +" except TimeoutError:\n" +" print('timeout!')\n" +"\n" +"asyncio.run(main())\n" +"\n" +"# Expected output:\n" +"#\n" +"# timeout!" +msgstr "" + +#: ../../library/asyncio-task.rst:886 +msgid "" +"When *aw* is cancelled due to a timeout, ``wait_for`` waits for *aw* to be " +"cancelled. Previously, it raised :exc:`TimeoutError` immediately." +msgstr "" + +#: ../../library/asyncio-task.rst:894 +msgid "Raises :exc:`TimeoutError` instead of :exc:`asyncio.TimeoutError`." +msgstr "" + +#: ../../library/asyncio-task.rst:899 +msgid "Waiting primitives" +msgstr "" + +#: ../../library/asyncio-task.rst:904 +msgid "" +"Run :class:`~asyncio.Future` and :class:`~asyncio.Task` instances in the " +"*aws* iterable concurrently and block until the condition specified by " +"*return_when*." +msgstr "" + +#: ../../library/asyncio-task.rst:908 +msgid "The *aws* iterable must not be empty." +msgstr "" + +#: ../../library/asyncio-task.rst:910 +msgid "Returns two sets of Tasks/Futures: ``(done, pending)``." +msgstr "" + +#: ../../library/asyncio-task.rst:912 +msgid "Usage::" +msgstr "" + +#: ../../library/asyncio-task.rst:914 +msgid "done, pending = await asyncio.wait(aws)" +msgstr "" + +#: ../../library/asyncio-task.rst:916 +msgid "" +"*timeout* (a float or int), if specified, can be used to control the maximum " +"number of seconds to wait before returning." +msgstr "" + +#: ../../library/asyncio-task.rst:919 +msgid "" +"Note that this function does not raise :exc:`TimeoutError`. Futures or Tasks " +"that aren't done when the timeout occurs are simply returned in the second " +"set." +msgstr "" + +#: ../../library/asyncio-task.rst:923 +msgid "" +"*return_when* indicates when this function should return. It must be one of " +"the following constants:" +msgstr "" + +#: ../../library/asyncio-task.rst:929 +msgid "Constant" +msgstr "" + +#: ../../library/asyncio-task.rst:930 +msgid "Description" +msgstr "Beschreibung" + +#: ../../library/asyncio-task.rst:933 +msgid "The function will return when any future finishes or is cancelled." +msgstr "" + +#: ../../library/asyncio-task.rst:936 +msgid "" +"The function will return when any future finishes by raising an exception. " +"If no future raises an exception then it is equivalent to :const:" +"`ALL_COMPLETED`." +msgstr "" + +#: ../../library/asyncio-task.rst:941 +msgid "The function will return when all futures finish or are cancelled." +msgstr "" + +#: ../../library/asyncio-task.rst:943 +msgid "" +"Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures " +"when a timeout occurs." +msgstr "" + +#: ../../library/asyncio-task.rst:946 +msgid "" +"If ``wait()`` is cancelled, the futures in *aws* are not cancelled and " +"continue to run." +msgstr "" + +#: ../../library/asyncio-task.rst:952 +msgid "Passing coroutine objects to ``wait()`` directly is forbidden." +msgstr "" + +#: ../../library/asyncio-task.rst:955 ../../library/asyncio-task.rst:1017 +msgid "Added support for generators yielding tasks." +msgstr "" + +#: ../../library/asyncio-task.rst:961 +msgid "" +"Run :ref:`awaitable objects ` in the *aws* iterable " +"concurrently. The returned object can be iterated to obtain the results of " +"the awaitables as they finish." +msgstr "" + +#: ../../library/asyncio-task.rst:965 +msgid "" +"The object returned by ``as_completed()`` can be iterated as an :term:" +"`asynchronous iterator` or a plain :term:`iterator`. When asynchronous " +"iteration is used, the originally-supplied awaitables are yielded if they " +"are tasks or futures. This makes it easy to correlate previously-scheduled " +"tasks with their results. Example::" +msgstr "" + +#: ../../library/asyncio-task.rst:971 +msgid "" +"ipv4_connect = create_task(open_connection(\"127.0.0.1\", 80))\n" +"ipv6_connect = create_task(open_connection(\"::1\", 80))\n" +"tasks = [ipv4_connect, ipv6_connect]\n" +"\n" +"async for earliest_connect in as_completed(tasks):\n" +" # earliest_connect is done. The result can be obtained by\n" +" # awaiting it or calling earliest_connect.result()\n" +" reader, writer = await earliest_connect\n" +"\n" +" if earliest_connect is ipv6_connect:\n" +" print(\"IPv6 connection established.\")\n" +" else:\n" +" print(\"IPv4 connection established.\")" +msgstr "" + +#: ../../library/asyncio-task.rst:985 +msgid "" +"During asynchronous iteration, implicitly-created tasks will be yielded for " +"supplied awaitables that aren't tasks or futures." +msgstr "" + +#: ../../library/asyncio-task.rst:988 +msgid "" +"When used as a plain iterator, each iteration yields a new coroutine that " +"returns the result or raises the exception of the next completed awaitable. " +"This pattern is compatible with Python versions older than 3.13::" +msgstr "" + +#: ../../library/asyncio-task.rst:992 +msgid "" +"ipv4_connect = create_task(open_connection(\"127.0.0.1\", 80))\n" +"ipv6_connect = create_task(open_connection(\"::1\", 80))\n" +"tasks = [ipv4_connect, ipv6_connect]\n" +"\n" +"for next_connect in as_completed(tasks):\n" +" # next_connect is not one of the original task objects. It must be\n" +" # awaited to obtain the result value or raise the exception of the\n" +" # awaitable that finishes next.\n" +" reader, writer = await next_connect" +msgstr "" + +#: ../../library/asyncio-task.rst:1002 +msgid "" +"A :exc:`TimeoutError` is raised if the timeout occurs before all awaitables " +"are done. This is raised by the ``async for`` loop during asynchronous " +"iteration or by the coroutines yielded during plain iteration." +msgstr "" + +#: ../../library/asyncio-task.rst:1006 +msgid "" +"``as_completed()`` does not cancel the tasks running the supplied " +"awaitables: if a timeout occurs or the iteration is cancelled, the remaining " +"tasks continue to run." +msgstr "" + +#: ../../library/asyncio-task.rst:1013 +msgid "" +"Deprecation warning is emitted if not all awaitable objects in the *aws* " +"iterable are Future-like objects and there is no running event loop." +msgstr "" + +#: ../../library/asyncio-task.rst:1020 +msgid "" +"The result can now be used as either an :term:`asynchronous iterator` or as " +"a plain :term:`iterator` (previously it was only a plain iterator)." +msgstr "" + +#: ../../library/asyncio-task.rst:1026 +msgid "Running in threads" +msgstr "" + +#: ../../library/asyncio-task.rst:1031 +msgid "Asynchronously run function *func* in a separate thread." +msgstr "" + +#: ../../library/asyncio-task.rst:1033 +msgid "" +"Any \\*args and \\*\\*kwargs supplied for this function are directly passed " +"to *func*. Also, the current :class:`contextvars.Context` is propagated, " +"allowing context variables from the event loop thread to be accessed in the " +"separate thread." +msgstr "" + +#: ../../library/asyncio-task.rst:1038 +msgid "" +"Return a coroutine that can be awaited to get the eventual result of *func*." +msgstr "" + +#: ../../library/asyncio-task.rst:1040 +msgid "" +"This coroutine function is primarily intended to be used for executing IO-" +"bound functions/methods that would otherwise block the event loop if they " +"were run in the main thread. For example::" +msgstr "" + +#: ../../library/asyncio-task.rst:1044 +msgid "" +"def blocking_io():\n" +" print(f\"start blocking_io at {time.strftime('%X')}\")\n" +" # Note that time.sleep() can be replaced with any blocking\n" +" # IO-bound operation, such as file operations.\n" +" time.sleep(1)\n" +" print(f\"blocking_io complete at {time.strftime('%X')}\")\n" +"\n" +"async def main():\n" +" print(f\"started main at {time.strftime('%X')}\")\n" +"\n" +" await asyncio.gather(\n" +" asyncio.to_thread(blocking_io),\n" +" asyncio.sleep(1))\n" +"\n" +" print(f\"finished main at {time.strftime('%X')}\")\n" +"\n" +"\n" +"asyncio.run(main())\n" +"\n" +"# Expected output:\n" +"#\n" +"# started main at 19:50:53\n" +"# start blocking_io at 19:50:53\n" +"# blocking_io complete at 19:50:54\n" +"# finished main at 19:50:54" +msgstr "" + +#: ../../library/asyncio-task.rst:1070 +msgid "" +"Directly calling ``blocking_io()`` in any coroutine would block the event " +"loop for its duration, resulting in an additional 1 second of run time. " +"Instead, by using ``asyncio.to_thread()``, we can run it in a separate " +"thread without blocking the event loop." +msgstr "" + +#: ../../library/asyncio-task.rst:1077 +msgid "" +"Due to the :term:`GIL`, ``asyncio.to_thread()`` can typically only be used " +"to make IO-bound functions non-blocking. However, for extension modules that " +"release the GIL or alternative Python implementations that don't have one, " +"``asyncio.to_thread()`` can also be used for CPU-bound functions." +msgstr "" + +#: ../../library/asyncio-task.rst:1086 +msgid "Scheduling from other threads" +msgstr "" + +#: ../../library/asyncio-task.rst:1090 +msgid "Submit a coroutine to the given event loop. Thread-safe." +msgstr "" + +#: ../../library/asyncio-task.rst:1092 +msgid "" +"Return a :class:`concurrent.futures.Future` to wait for the result from " +"another OS thread." +msgstr "" + +#: ../../library/asyncio-task.rst:1095 +msgid "" +"This function is meant to be called from a different OS thread than the one " +"where the event loop is running. Example::" +msgstr "" + +#: ../../library/asyncio-task.rst:1098 +msgid "" +"def in_thread(loop: asyncio.AbstractEventLoop) -> None:\n" +" # Run some blocking IO\n" +" pathlib.Path(\"example.txt\").write_text(\"hello world\", " +"encoding=\"utf8\")\n" +"\n" +" # Create a coroutine\n" +" coro = asyncio.sleep(1, result=3)\n" +"\n" +" # Submit the coroutine to a given loop\n" +" future = asyncio.run_coroutine_threadsafe(coro, loop)\n" +"\n" +" # Wait for the result with an optional timeout argument\n" +" assert future.result(timeout=2) == 3\n" +"\n" +"async def amain() -> None:\n" +" # Get the running loop\n" +" loop = asyncio.get_running_loop()\n" +"\n" +" # Run something in a thread\n" +" await asyncio.to_thread(in_thread, loop)" +msgstr "" + +#: ../../library/asyncio-task.rst:1118 +msgid "It's also possible to run the other way around. Example::" +msgstr "" + +#: ../../library/asyncio-task.rst:1120 +msgid "" +"@contextlib.contextmanager\n" +"def loop_in_thread() -> Generator[asyncio.AbstractEventLoop]:\n" +" loop_fut = concurrent.futures.Future[asyncio.AbstractEventLoop]()\n" +" stop_event = asyncio.Event()\n" +"\n" +" async def main() -> None:\n" +" loop_fut.set_result(asyncio.get_running_loop())\n" +" await stop_event.wait()\n" +"\n" +" with concurrent.futures.ThreadPoolExecutor(1) as tpe:\n" +" complete_fut = tpe.submit(asyncio.run, main())\n" +" for fut in concurrent.futures.as_completed((loop_fut, " +"complete_fut)):\n" +" if fut is loop_fut:\n" +" loop = loop_fut.result()\n" +" try:\n" +" yield loop\n" +" finally:\n" +" loop.call_soon_threadsafe(stop_event.set)\n" +" else:\n" +" fut.result()\n" +"\n" +"# Create a loop in another thread\n" +"with loop_in_thread() as loop:\n" +" # Create a coroutine\n" +" coro = asyncio.sleep(1, result=3)\n" +"\n" +" # Submit the coroutine to a given loop\n" +" future = asyncio.run_coroutine_threadsafe(coro, loop)\n" +"\n" +" # Wait for the result with an optional timeout argument\n" +" assert future.result(timeout=2) == 3" +msgstr "" + +#: ../../library/asyncio-task.rst:1152 +msgid "" +"If an exception is raised in the coroutine, the returned Future will be " +"notified. It can also be used to cancel the task in the event loop::" +msgstr "" + +#: ../../library/asyncio-task.rst:1156 +msgid "" +"try:\n" +" result = future.result(timeout)\n" +"except TimeoutError:\n" +" print('The coroutine took too long, cancelling the task...')\n" +" future.cancel()\n" +"except Exception as exc:\n" +" print(f'The coroutine raised an exception: {exc!r}')\n" +"else:\n" +" print(f'The coroutine returned: {result!r}')" +msgstr "" + +#: ../../library/asyncio-task.rst:1166 +msgid "" +"See the :ref:`concurrency and multithreading ` " +"section of the documentation." +msgstr "" + +#: ../../library/asyncio-task.rst:1169 +msgid "" +"Unlike other asyncio functions this function requires the *loop* argument to " +"be passed explicitly." +msgstr "" + +#: ../../library/asyncio-task.rst:1176 +msgid "Introspection" +msgstr "" + +#: ../../library/asyncio-task.rst:1181 +msgid "" +"Return the currently running :class:`Task` instance, or ``None`` if no task " +"is running." +msgstr "" + +#: ../../library/asyncio-task.rst:1184 +msgid "" +"If *loop* is ``None`` :func:`get_running_loop` is used to get the current " +"loop." +msgstr "" + +#: ../../library/asyncio-task.rst:1192 +msgid "Return a set of not yet finished :class:`Task` objects run by the loop." +msgstr "" + +#: ../../library/asyncio-task.rst:1195 +msgid "" +"If *loop* is ``None``, :func:`get_running_loop` is used for getting current " +"loop." +msgstr "" + +#: ../../library/asyncio-task.rst:1203 +msgid "Return ``True`` if *obj* is a coroutine object." +msgstr "" + +#: ../../library/asyncio-task.rst:1210 +msgid "Task object" +msgstr "" + +#: ../../library/asyncio-task.rst:1214 +msgid "" +"A :class:`Future-like ` object that runs a Python :ref:`coroutine " +"`. Not thread-safe." +msgstr "" + +#: ../../library/asyncio-task.rst:1217 +msgid "" +"Tasks are used to run coroutines in event loops. If a coroutine awaits on a " +"Future, the Task suspends the execution of the coroutine and waits for the " +"completion of the Future. When the Future is *done*, the execution of the " +"wrapped coroutine resumes." +msgstr "" + +#: ../../library/asyncio-task.rst:1223 +msgid "" +"Event loops use cooperative scheduling: an event loop runs one Task at a " +"time. While a Task awaits for the completion of a Future, the event loop " +"runs other Tasks, callbacks, or performs IO operations." +msgstr "" + +#: ../../library/asyncio-task.rst:1228 +msgid "" +"Use the high-level :func:`asyncio.create_task` function to create Tasks, or " +"the low-level :meth:`loop.create_task` or :func:`ensure_future` functions. " +"Manual instantiation of Tasks is discouraged." +msgstr "" + +#: ../../library/asyncio-task.rst:1233 +msgid "" +"To cancel a running Task use the :meth:`cancel` method. Calling it will " +"cause the Task to throw a :exc:`CancelledError` exception into the wrapped " +"coroutine. If a coroutine is awaiting on a future-like object during " +"cancellation, the awaited object will be cancelled." +msgstr "" + +#: ../../library/asyncio-task.rst:1238 +msgid "" +":meth:`cancelled` can be used to check if the Task was cancelled. The method " +"returns ``True`` if the wrapped coroutine did not suppress the :exc:" +"`CancelledError` exception and was actually cancelled." +msgstr "" + +#: ../../library/asyncio-task.rst:1243 +msgid "" +":class:`asyncio.Task` inherits from :class:`Future` all of its APIs except :" +"meth:`Future.set_result` and :meth:`Future.set_exception`." +msgstr "" + +#: ../../library/asyncio-task.rst:1247 +msgid "" +"An optional keyword-only *context* argument allows specifying a custom :" +"class:`contextvars.Context` for the *coro* to run in. If no *context* is " +"provided, the Task copies the current context and later runs its coroutine " +"in the copied context." +msgstr "" + +#: ../../library/asyncio-task.rst:1252 +msgid "" +"An optional keyword-only *eager_start* argument allows eagerly starting the " +"execution of the :class:`asyncio.Task` at task creation time. If set to " +"``True`` and the event loop is running, the task will start executing the " +"coroutine immediately, until the first time the coroutine blocks. If the " +"coroutine returns or raises without blocking, the task will be finished " +"eagerly and will skip scheduling to the event loop." +msgstr "" + +#: ../../library/asyncio-task.rst:1259 +msgid "" +"Tasks are :ref:`generic ` over the return type of their wrapped " +"coroutines." +msgstr "" + +#: ../../library/asyncio-task.rst:1262 +msgid "Added support for the :mod:`contextvars` module." +msgstr "" + +#: ../../library/asyncio-task.rst:1268 +msgid "" +"Deprecation warning is emitted if *loop* is not specified and there is no " +"running event loop." +msgstr "" + +#: ../../library/asyncio-task.rst:1275 +msgid "Added the *eager_start* parameter." +msgstr "" + +#: ../../library/asyncio-task.rst:1280 +msgid "Return ``True`` if the Task is *done*." +msgstr "" + +#: ../../library/asyncio-task.rst:1282 +msgid "" +"A Task is *done* when the wrapped coroutine either returned a value, raised " +"an exception, or the Task was cancelled." +msgstr "" + +#: ../../library/asyncio-task.rst:1287 +msgid "Return the result of the Task." +msgstr "" + +#: ../../library/asyncio-task.rst:1289 +msgid "" +"If the Task is *done*, the result of the wrapped coroutine is returned (or " +"if the coroutine raised an exception, that exception is re-raised.)" +msgstr "" + +#: ../../library/asyncio-task.rst:1293 ../../library/asyncio-task.rst:1307 +msgid "" +"If the Task has been *cancelled*, this method raises a :exc:`CancelledError` " +"exception." +msgstr "" + +#: ../../library/asyncio-task.rst:1296 +msgid "" +"If the Task's result isn't yet available, this method raises an :exc:" +"`InvalidStateError` exception." +msgstr "" + +#: ../../library/asyncio-task.rst:1301 +msgid "Return the exception of the Task." +msgstr "" + +#: ../../library/asyncio-task.rst:1303 +msgid "" +"If the wrapped coroutine raised an exception that exception is returned. If " +"the wrapped coroutine returned normally this method returns ``None``." +msgstr "" + +#: ../../library/asyncio-task.rst:1310 +msgid "" +"If the Task isn't *done* yet, this method raises an :exc:`InvalidStateError` " +"exception." +msgstr "" + +#: ../../library/asyncio-task.rst:1315 +msgid "Add a callback to be run when the Task is *done*." +msgstr "" + +#: ../../library/asyncio-task.rst:1317 ../../library/asyncio-task.rst:1326 +msgid "This method should only be used in low-level callback-based code." +msgstr "" + +#: ../../library/asyncio-task.rst:1319 +msgid "" +"See the documentation of :meth:`Future.add_done_callback` for more details." +msgstr "" + +#: ../../library/asyncio-task.rst:1324 +msgid "Remove *callback* from the callbacks list." +msgstr "" + +#: ../../library/asyncio-task.rst:1328 +msgid "" +"See the documentation of :meth:`Future.remove_done_callback` for more " +"details." +msgstr "" + +#: ../../library/asyncio-task.rst:1333 +msgid "Return the list of stack frames for this Task." +msgstr "" + +#: ../../library/asyncio-task.rst:1335 +msgid "" +"If the wrapped coroutine is not done, this returns the stack where it is " +"suspended. If the coroutine has completed successfully or was cancelled, " +"this returns an empty list. If the coroutine was terminated by an exception, " +"this returns the list of traceback frames." +msgstr "" + +#: ../../library/asyncio-task.rst:1341 +msgid "The frames are always ordered from oldest to newest." +msgstr "" + +#: ../../library/asyncio-task.rst:1343 +msgid "Only one stack frame is returned for a suspended coroutine." +msgstr "" + +#: ../../library/asyncio-task.rst:1345 +msgid "" +"The optional *limit* argument sets the maximum number of frames to return; " +"by default all available frames are returned. The ordering of the returned " +"list differs depending on whether a stack or a traceback is returned: the " +"newest frames of a stack are returned, but the oldest frames of a traceback " +"are returned. (This matches the behavior of the traceback module.)" +msgstr "" + +#: ../../library/asyncio-task.rst:1354 +msgid "Print the stack or traceback for this Task." +msgstr "" + +#: ../../library/asyncio-task.rst:1356 +msgid "" +"This produces output similar to that of the traceback module for the frames " +"retrieved by :meth:`get_stack`." +msgstr "" + +#: ../../library/asyncio-task.rst:1359 +msgid "The *limit* argument is passed to :meth:`get_stack` directly." +msgstr "" + +#: ../../library/asyncio-task.rst:1361 +msgid "" +"The *file* argument is an I/O stream to which the output is written; by " +"default output is written to :data:`sys.stdout`." +msgstr "" + +#: ../../library/asyncio-task.rst:1366 +msgid "Return the coroutine object wrapped by the :class:`Task`." +msgstr "" + +#: ../../library/asyncio-task.rst:1370 +msgid "" +"This will return ``None`` for Tasks which have already completed eagerly. " +"See the :ref:`Eager Task Factory `." +msgstr "" + +#: ../../library/asyncio-task.rst:1377 +msgid "Newly added eager task execution means result may be ``None``." +msgstr "" + +#: ../../library/asyncio-task.rst:1381 +msgid "" +"Return the :class:`contextvars.Context` object associated with the task." +msgstr "" + +#: ../../library/asyncio-task.rst:1388 +msgid "Return the name of the Task." +msgstr "" + +#: ../../library/asyncio-task.rst:1390 +msgid "" +"If no name has been explicitly assigned to the Task, the default asyncio " +"Task implementation generates a default name during instantiation." +msgstr "" + +#: ../../library/asyncio-task.rst:1398 +msgid "Set the name of the Task." +msgstr "" + +#: ../../library/asyncio-task.rst:1400 +msgid "" +"The *value* argument can be any object, which is then converted to a string." +msgstr "" + +#: ../../library/asyncio-task.rst:1403 +msgid "" +"In the default Task implementation, the name will be visible in the :func:" +"`repr` output of a task object." +msgstr "" + +#: ../../library/asyncio-task.rst:1410 +msgid "Request the Task to be cancelled." +msgstr "" + +#: ../../library/asyncio-task.rst:1412 +msgid "" +"If the Task is already *done* or *cancelled*, return ``False``, otherwise, " +"return ``True``." +msgstr "" + +#: ../../library/asyncio-task.rst:1415 +msgid "" +"The method arranges for a :exc:`CancelledError` exception to be thrown into " +"the wrapped coroutine on the next cycle of the event loop." +msgstr "" + +#: ../../library/asyncio-task.rst:1418 +msgid "" +"The coroutine then has a chance to clean up or even deny the request by " +"suppressing the exception with a :keyword:`try` ... ... ``except " +"CancelledError`` ... :keyword:`finally` block. Therefore, unlike :meth:" +"`Future.cancel`, :meth:`Task.cancel` does not guarantee that the Task will " +"be cancelled, although suppressing cancellation completely is not common and " +"is actively discouraged. Should the coroutine nevertheless decide to " +"suppress the cancellation, it needs to call :meth:`Task.uncancel` in " +"addition to catching the exception." +msgstr "" + +#: ../../library/asyncio-task.rst:1428 +msgid "" +"If the Task being cancelled is currently awaiting on a future-like object, " +"that awaited object will also be cancelled. This cancellation propagates " +"down the entire chain of awaited objects." +msgstr "" + +#: ../../library/asyncio-task.rst:1432 +msgid "Added the *msg* parameter." +msgstr "" + +#: ../../library/asyncio-task.rst:1435 +msgid "The ``msg`` parameter is propagated from cancelled task to its awaiter." +msgstr "" + +#: ../../library/asyncio-task.rst:1440 +msgid "" +"The following example illustrates how coroutines can intercept the " +"cancellation request::" +msgstr "" + +#: ../../library/asyncio-task.rst:1443 +msgid "" +"async def cancel_me():\n" +" print('cancel_me(): before sleep')\n" +"\n" +" try:\n" +" # Wait for 1 hour\n" +" await asyncio.sleep(3600)\n" +" except asyncio.CancelledError:\n" +" print('cancel_me(): cancel sleep')\n" +" raise\n" +" finally:\n" +" print('cancel_me(): after sleep')\n" +"\n" +"async def main():\n" +" # Create a \"cancel_me\" Task\n" +" task = asyncio.create_task(cancel_me())\n" +"\n" +" # Wait for 1 second\n" +" await asyncio.sleep(1)\n" +"\n" +" task.cancel()\n" +" try:\n" +" await task\n" +" except asyncio.CancelledError:\n" +" print(\"main(): cancel_me is cancelled now\")\n" +"\n" +"asyncio.run(main())\n" +"\n" +"# Expected output:\n" +"#\n" +"# cancel_me(): before sleep\n" +"# cancel_me(): cancel sleep\n" +"# cancel_me(): after sleep\n" +"# main(): cancel_me is cancelled now" +msgstr "" + +#: ../../library/asyncio-task.rst:1479 +msgid "Return ``True`` if the Task is *cancelled*." +msgstr "" + +#: ../../library/asyncio-task.rst:1481 +msgid "" +"The Task is *cancelled* when the cancellation was requested with :meth:" +"`cancel` and the wrapped coroutine propagated the :exc:`CancelledError` " +"exception thrown into it." +msgstr "" + +#: ../../library/asyncio-task.rst:1487 +msgid "Decrement the count of cancellation requests to this Task." +msgstr "" + +#: ../../library/asyncio-task.rst:1489 +msgid "Returns the remaining number of cancellation requests." +msgstr "" + +#: ../../library/asyncio-task.rst:1491 +msgid "" +"Note that once execution of a cancelled task completed, further calls to :" +"meth:`uncancel` are ineffective." +msgstr "" + +#: ../../library/asyncio-task.rst:1496 +msgid "" +"This method is used by asyncio's internals and isn't expected to be used by " +"end-user code. In particular, if a Task gets successfully uncancelled, this " +"allows for elements of structured concurrency like :ref:`taskgroups` and :" +"func:`asyncio.timeout` to continue running, isolating cancellation to the " +"respective structured block. For example::" +msgstr "" + +#: ../../library/asyncio-task.rst:1503 +msgid "" +"async def make_request_with_timeout():\n" +" try:\n" +" async with asyncio.timeout(1):\n" +" # Structured block affected by the timeout:\n" +" await make_request()\n" +" await make_another_request()\n" +" except TimeoutError:\n" +" log(\"There was a timeout\")\n" +" # Outer code not affected by the timeout:\n" +" await unrelated_code()" +msgstr "" + +#: ../../library/asyncio-task.rst:1514 +msgid "" +"While the block with ``make_request()`` and ``make_another_request()`` might " +"get cancelled due to the timeout, ``unrelated_code()`` should continue " +"running even in case of the timeout. This is implemented with :meth:" +"`uncancel`. :class:`TaskGroup` context managers use :func:`uncancel` in a " +"similar fashion." +msgstr "" + +#: ../../library/asyncio-task.rst:1520 +msgid "" +"If end-user code is, for some reason, suppressing cancellation by catching :" +"exc:`CancelledError`, it needs to call this method to remove the " +"cancellation state." +msgstr "" + +#: ../../library/asyncio-task.rst:1524 +msgid "" +"When this method decrements the cancellation count to zero, the method " +"checks if a previous :meth:`cancel` call had arranged for :exc:" +"`CancelledError` to be thrown into the task. If it hasn't been thrown yet, " +"that arrangement will be rescinded (by resetting the internal " +"``_must_cancel`` flag)." +msgstr "" + +#: ../../library/asyncio-task.rst:1530 +msgid "Changed to rescind pending cancellation requests upon reaching zero." +msgstr "" + +#: ../../library/asyncio-task.rst:1535 +msgid "" +"Return the number of pending cancellation requests to this Task, i.e., the " +"number of calls to :meth:`cancel` less the number of :meth:`uncancel` calls." +msgstr "" + +#: ../../library/asyncio-task.rst:1539 +msgid "" +"Note that if this number is greater than zero but the Task is still " +"executing, :meth:`cancelled` will still return ``False``. This is because " +"this number can be lowered by calling :meth:`uncancel`, which can lead to " +"the task not being cancelled after all if the cancellation requests go down " +"to zero." +msgstr "" + +#: ../../library/asyncio-task.rst:1545 +msgid "" +"This method is used by asyncio's internals and isn't expected to be used by " +"end-user code. See :meth:`uncancel` for more details." +msgstr "" diff --git a/library/asyncio.po b/library/asyncio.po index c74ac7b3..4716d68f 100644 --- a/library/asyncio.po +++ b/library/asyncio.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -37,7 +37,7 @@ msgstr "" msgid ":mod:`!asyncio` --- Asynchronous I/O" msgstr "" -#: ../../library/asyncio.rst:-1 +#: ../../library/asyncio.rst:9 msgid "Hello World!" msgstr "" diff --git a/library/asyncio.po~ b/library/asyncio.po~ new file mode 100644 index 00000000..c74ac7b3 --- /dev/null +++ b/library/asyncio.po~ @@ -0,0 +1,211 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/asyncio.rst:107 +msgid "High-level APIs" +msgstr "" + +#: ../../library/asyncio.rst:119 +msgid "Introspection APIs" +msgstr "" + +#: ../../library/asyncio.rst:126 +msgid "Low-level APIs" +msgstr "" + +#: ../../library/asyncio.rst:137 +msgid "Guides and Tutorials" +msgstr "" + +#: ../../library/asyncio.rst:2 +msgid ":mod:`!asyncio` --- Asynchronous I/O" +msgstr "" + +#: ../../library/asyncio.rst:-1 +msgid "Hello World!" +msgstr "" + +#: ../../library/asyncio.rst:13 +msgid "" +"import asyncio\n" +"\n" +"async def main():\n" +" print('Hello ...')\n" +" await asyncio.sleep(1)\n" +" print('... World!')\n" +"\n" +"asyncio.run(main())" +msgstr "" + +#: ../../library/asyncio.rst:22 +msgid "" +"asyncio is a library to write **concurrent** code using the **async/await** " +"syntax." +msgstr "" + +#: ../../library/asyncio.rst:25 +msgid "" +"asyncio is used as a foundation for multiple Python asynchronous frameworks " +"that provide high-performance network and web-servers, database connection " +"libraries, distributed task queues, etc." +msgstr "" + +#: ../../library/asyncio.rst:29 +msgid "" +"asyncio is often a perfect fit for IO-bound and high-level **structured** " +"network code." +msgstr "" + +#: ../../library/asyncio.rst:34 +msgid ":ref:`a-conceptual-overview-of-asyncio`" +msgstr "" + +#: ../../library/asyncio.rst:35 +msgid "Explanation of the fundamentals of asyncio." +msgstr "" + +#: ../../library/asyncio.rst:37 +msgid "asyncio provides a set of **high-level** APIs to:" +msgstr "" + +#: ../../library/asyncio.rst:39 +msgid "" +":ref:`run Python coroutines ` concurrently and have full control " +"over their execution;" +msgstr "" + +#: ../../library/asyncio.rst:42 +msgid "perform :ref:`network IO and IPC `;" +msgstr "" + +#: ../../library/asyncio.rst:44 +msgid "control :ref:`subprocesses `;" +msgstr "" + +#: ../../library/asyncio.rst:46 +msgid "distribute tasks via :ref:`queues `;" +msgstr "" + +#: ../../library/asyncio.rst:48 +msgid ":ref:`synchronize ` concurrent code;" +msgstr "" + +#: ../../library/asyncio.rst:50 +msgid "For **introspection**, asyncio provides APIs and tools for:" +msgstr "" + +#: ../../library/asyncio.rst:52 +msgid "" +"inspecting the :ref:`async call graph ` of tasks and futures;" +msgstr "" + +#: ../../library/asyncio.rst:54 +msgid "" +"inspecting tasks in another running Python process with :ref:`command-line " +"tools `;" +msgstr "" + +#: ../../library/asyncio.rst:57 +msgid "" +"Additionally, there are **low-level** APIs for *library and framework " +"developers* to:" +msgstr "" + +#: ../../library/asyncio.rst:60 +msgid "" +"create and manage :ref:`event loops `, which provide " +"asynchronous APIs for :ref:`networking `, running :ref:" +"`subprocesses `, handling :ref:`OS signals " +"`, etc;" +msgstr "" + +#: ../../library/asyncio.rst:65 +msgid "" +"implement efficient protocols using :ref:`transports `;" +msgstr "" + +#: ../../library/asyncio.rst:68 +msgid "" +":ref:`bridge ` callback-based libraries and code with async/" +"await syntax." +msgstr "" + +#: ../../includes/wasm-notavail.rst:3 +msgid "Availability" +msgstr "" + +#: ../../includes/wasm-notavail.rst:5 +msgid "" +"This module does not work or is not available on WebAssembly. See :ref:`wasm-" +"availability` for more information." +msgstr "" + +#: ../../library/asyncio.rst:76 +msgid "asyncio REPL" +msgstr "" + +#: ../../library/asyncio.rst:77 +msgid "" +"You can experiment with an ``asyncio`` concurrent context in the :term:" +"`REPL`:" +msgstr "" + +#: ../../library/asyncio.rst:79 +msgid "" +"$ python -m asyncio\n" +"asyncio REPL ...\n" +"Use \"await\" directly instead of \"asyncio.run()\".\n" +"Type \"help\", \"copyright\", \"credits\" or \"license\" for more " +"information.\n" +">>> import asyncio\n" +">>> await asyncio.sleep(10, result='hello')\n" +"'hello'" +msgstr "" + +#: ../../library/asyncio.rst:89 +msgid "" +"This REPL provides limited compatibility with :envvar:`PYTHON_BASIC_REPL`. " +"It is recommended that the default REPL is used for full functionality and " +"the latest features." +msgstr "" + +#: ../../library/asyncio.rst:93 +msgid "" +"Raises an :ref:`auditing event ` ``cpython.run_stdin`` with no " +"arguments." +msgstr "" + +#: ../../library/asyncio.rst:95 +msgid "(also 3.11.10, 3.10.15, 3.9.20, and 3.8.20) Emits audit events." +msgstr "" + +#: ../../library/asyncio.rst:98 +msgid "" +"Uses PyREPL if possible, in which case :envvar:`PYTHONSTARTUP` is also " +"executed. Emits audit events." +msgstr "" + +#: ../../library/asyncio.rst:106 +msgid "Reference" +msgstr "" + +#: ../../library/asyncio.rst:147 +msgid "The source code for asyncio can be found in :source:`Lib/asyncio/`." +msgstr "" diff --git a/library/atexit.po b/library/atexit.po index 502fc020..02d79a46 100644 --- a/library/atexit.po +++ b/library/atexit.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -23,103 +23,112 @@ msgstr "" #: ../../library/atexit.rst:9 msgid "" -"The :mod:`!atexit` module defines functions to register and unregister " -"cleanup functions. Functions thus registered are automatically executed " -"upon normal interpreter termination. :mod:`!atexit` runs these functions in " -"the *reverse* order in which they were registered; if you register ``A``, " -"``B``, and ``C``, at interpreter termination time they will be run in the " -"order ``C``, ``B``, ``A``." +"The :mod:`!atexit` module defines functions to register and unregister :dfn:" +"`exit handlers`: functions that are automatically executed \"at exit\", that " +"is, upon normal program termination (for instance, if :func:`sys.exit` is " +"called or the main module's execution completes) or, more generally, upon :" +"term:`interpreter shutdown`." msgstr "" -#: ../../library/atexit.rst:16 +#: ../../library/atexit.rst:15 msgid "" -"**Note:** The functions registered via this module are not called when the " -"program is killed by a signal not handled by Python, when a Python fatal " -"internal error is detected, or when :func:`os._exit` is called." +"At exit, all registered exit handlers are called in the *reverse* order in " +"which they were registered. If you register ``A``, ``B``, and ``C``, at " +"interpreter shutdown time they will be run in the order ``C``, ``B``, ``A``. " +"The assumption is that lower level modules will normally be imported before " +"higher level modules and thus must be cleaned up later." msgstr "" -#: ../../library/atexit.rst:20 +#: ../../library/atexit.rst:22 msgid "" -"**Note:** The effect of registering or unregistering functions from within a " -"cleanup function is undefined." -msgstr "" - -#: ../../library/atexit.rst:23 -msgid "" -"When used with C-API subinterpreters, registered functions are local to the " -"interpreter they were registered in." +"If an exception is raised during execution of an exit handler, a traceback " +"is printed (unless :exc:`SystemExit` is raised) and the exception " +"information is saved. After all exit handlers have had a chance to run, the " +"last exception to be raised is re-raised." msgstr "" -#: ../../library/atexit.rst:29 +#: ../../library/atexit.rst:27 msgid "" -"Register *func* as a function to be executed at termination. Any optional " -"arguments that are to be passed to *func* must be passed as arguments to :" -"func:`register`. It is possible to register the same function and arguments " -"more than once." +"In programs that use multiple interpreters, each interpreter has its own " +"stack of exit handlers, which are executed when the interpreter shuts down " +"(for example, with :meth:`concurrent.interpreters.Interpreter.close` or the " +"C API :c:func:`Py_EndInterpreter`). Registration functions in this module " +"only affect the interpreter they are called from." msgstr "" #: ../../library/atexit.rst:34 msgid "" -"At normal program termination (for instance, if :func:`sys.exit` is called " -"or the main module's execution completes), all functions registered are " -"called in last in, first out order. The assumption is that lower level " -"modules will normally be imported before higher level modules and thus must " -"be cleaned up later." +"**Note:** Exit handlers are not called when the program is killed by a " +"signal not handled by Python, when a Python fatal internal error is " +"detected, or when :func:`os._exit` is called." msgstr "" -#: ../../library/atexit.rst:40 +#: ../../library/atexit.rst:38 msgid "" -"If an exception is raised during execution of the exit handlers, a traceback " -"is printed (unless :exc:`SystemExit` is raised) and the exception " -"information is saved. After all exit handlers have had a chance to run, the " -"last exception to be raised is re-raised." +"**Note:** The effect of registering or unregistering functions from within a " +"cleanup function is undefined." msgstr "" -#: ../../library/atexit.rst:45 +#: ../../library/atexit.rst:42 msgid "" -"This function returns *func*, which makes it possible to use it as a " -"decorator." +"When writing exit handlers, especially in C API extensions, keep in mind " +"that other exit handlers may still run arbitrary Python code after you clean " +"up. Such code should succeed or fail with an exception, rather than crash." msgstr "" -#: ../../library/atexit.rst:49 +#: ../../library/atexit.rst:47 msgid "" -"Starting new threads or calling :func:`os.fork` from a registered function " -"can lead to race condition between the main Python runtime thread freeing " -"thread states while internal :mod:`threading` routines or the new process " -"try to use that state. This can lead to crashes rather than clean shutdown." +"Attempts to start a new thread or :func:`os.fork` a new process in an exit " +"handler now leads to :exc:`RuntimeError`. Previously, this could cause race " +"conditions between the main Python runtime thread freeing thread states " +"while internal :mod:`threading` routines or the new process try to use that " +"state, which could lead to crashes rather than clean shutdown." msgstr "" #: ../../library/atexit.rst:55 msgid "" -"Attempts to start a new thread or :func:`os.fork` a new process in a " -"registered function now leads to :exc:`RuntimeError`." +"When used with subinterpreters, registered functions are local to the " +"interpreter they were registered in." msgstr "" #: ../../library/atexit.rst:61 msgid "" -"Remove *func* from the list of functions to be run at interpreter shutdown. :" -"func:`unregister` silently does nothing if *func* was not previously " -"registered. If *func* has been registered more than once, every occurrence " -"of that function in the :mod:`!atexit` call stack will be removed. Equality " -"comparisons (``==``) are used internally during unregistration, so function " -"references do not need to have matching identities." +"Register *func* as an exit handler. Any optional arguments that are to be " +"passed to *func* must be passed as arguments to :func:`register`. It is " +"possible to register the same function and arguments more than once." +msgstr "" + +#: ../../library/atexit.rst:66 +msgid "" +"This function returns *func*, which makes it possible to use it as a " +"decorator." msgstr "" #: ../../library/atexit.rst:71 +msgid "" +"Remove *func* from the list of exit handlers. :func:`unregister` silently " +"does nothing if *func* was not previously registered. If *func* has been " +"registered more than once, every occurrence of that function in the :mod:`!" +"atexit` call stack will be removed. Equality comparisons (``==``) are used " +"internally during unregistration, so function references do not need to have " +"matching identities." +msgstr "" + +#: ../../library/atexit.rst:81 msgid "Module :mod:`readline`" msgstr "" -#: ../../library/atexit.rst:72 +#: ../../library/atexit.rst:82 msgid "" "Useful example of :mod:`!atexit` to read and write :mod:`readline` history " "files." msgstr "" -#: ../../library/atexit.rst:79 +#: ../../library/atexit.rst:89 msgid ":mod:`!atexit` Example" msgstr "" -#: ../../library/atexit.rst:81 +#: ../../library/atexit.rst:91 msgid "" "The following simple example demonstrates how a module can initialize a " "counter from a file when it is imported and save the counter's updated value " @@ -127,7 +136,7 @@ msgid "" "making an explicit call into this module at termination. ::" msgstr "" -#: ../../library/atexit.rst:86 +#: ../../library/atexit.rst:96 msgid "" "try:\n" " with open('counterfile') as infile:\n" @@ -148,13 +157,13 @@ msgid "" "atexit.register(savecounter)" msgstr "" -#: ../../library/atexit.rst:104 +#: ../../library/atexit.rst:114 msgid "" "Positional and keyword arguments may also be passed to :func:`register` to " "be passed along to the registered function when it is called::" msgstr "" -#: ../../library/atexit.rst:107 +#: ../../library/atexit.rst:117 msgid "" "def goodbye(name, adjective):\n" " print('Goodbye %s, it was %s to meet you.' % (name, adjective))\n" @@ -166,11 +175,11 @@ msgid "" "atexit.register(goodbye, adjective='nice', name='Donny')" msgstr "" -#: ../../library/atexit.rst:116 +#: ../../library/atexit.rst:126 msgid "Usage as a :term:`decorator`::" msgstr "" -#: ../../library/atexit.rst:118 +#: ../../library/atexit.rst:128 msgid "" "import atexit\n" "\n" @@ -179,6 +188,6 @@ msgid "" " print('You are now leaving the Python sector.')" msgstr "" -#: ../../library/atexit.rst:124 +#: ../../library/atexit.rst:134 msgid "This only works with functions that can be called without arguments." msgstr "" diff --git a/library/atexit.po~ b/library/atexit.po~ new file mode 100644 index 00000000..502fc020 --- /dev/null +++ b/library/atexit.po~ @@ -0,0 +1,184 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/atexit.rst:2 +msgid ":mod:`!atexit` --- Exit handlers" +msgstr "" + +#: ../../library/atexit.rst:9 +msgid "" +"The :mod:`!atexit` module defines functions to register and unregister " +"cleanup functions. Functions thus registered are automatically executed " +"upon normal interpreter termination. :mod:`!atexit` runs these functions in " +"the *reverse* order in which they were registered; if you register ``A``, " +"``B``, and ``C``, at interpreter termination time they will be run in the " +"order ``C``, ``B``, ``A``." +msgstr "" + +#: ../../library/atexit.rst:16 +msgid "" +"**Note:** The functions registered via this module are not called when the " +"program is killed by a signal not handled by Python, when a Python fatal " +"internal error is detected, or when :func:`os._exit` is called." +msgstr "" + +#: ../../library/atexit.rst:20 +msgid "" +"**Note:** The effect of registering or unregistering functions from within a " +"cleanup function is undefined." +msgstr "" + +#: ../../library/atexit.rst:23 +msgid "" +"When used with C-API subinterpreters, registered functions are local to the " +"interpreter they were registered in." +msgstr "" + +#: ../../library/atexit.rst:29 +msgid "" +"Register *func* as a function to be executed at termination. Any optional " +"arguments that are to be passed to *func* must be passed as arguments to :" +"func:`register`. It is possible to register the same function and arguments " +"more than once." +msgstr "" + +#: ../../library/atexit.rst:34 +msgid "" +"At normal program termination (for instance, if :func:`sys.exit` is called " +"or the main module's execution completes), all functions registered are " +"called in last in, first out order. The assumption is that lower level " +"modules will normally be imported before higher level modules and thus must " +"be cleaned up later." +msgstr "" + +#: ../../library/atexit.rst:40 +msgid "" +"If an exception is raised during execution of the exit handlers, a traceback " +"is printed (unless :exc:`SystemExit` is raised) and the exception " +"information is saved. After all exit handlers have had a chance to run, the " +"last exception to be raised is re-raised." +msgstr "" + +#: ../../library/atexit.rst:45 +msgid "" +"This function returns *func*, which makes it possible to use it as a " +"decorator." +msgstr "" + +#: ../../library/atexit.rst:49 +msgid "" +"Starting new threads or calling :func:`os.fork` from a registered function " +"can lead to race condition between the main Python runtime thread freeing " +"thread states while internal :mod:`threading` routines or the new process " +"try to use that state. This can lead to crashes rather than clean shutdown." +msgstr "" + +#: ../../library/atexit.rst:55 +msgid "" +"Attempts to start a new thread or :func:`os.fork` a new process in a " +"registered function now leads to :exc:`RuntimeError`." +msgstr "" + +#: ../../library/atexit.rst:61 +msgid "" +"Remove *func* from the list of functions to be run at interpreter shutdown. :" +"func:`unregister` silently does nothing if *func* was not previously " +"registered. If *func* has been registered more than once, every occurrence " +"of that function in the :mod:`!atexit` call stack will be removed. Equality " +"comparisons (``==``) are used internally during unregistration, so function " +"references do not need to have matching identities." +msgstr "" + +#: ../../library/atexit.rst:71 +msgid "Module :mod:`readline`" +msgstr "" + +#: ../../library/atexit.rst:72 +msgid "" +"Useful example of :mod:`!atexit` to read and write :mod:`readline` history " +"files." +msgstr "" + +#: ../../library/atexit.rst:79 +msgid ":mod:`!atexit` Example" +msgstr "" + +#: ../../library/atexit.rst:81 +msgid "" +"The following simple example demonstrates how a module can initialize a " +"counter from a file when it is imported and save the counter's updated value " +"automatically when the program terminates without relying on the application " +"making an explicit call into this module at termination. ::" +msgstr "" + +#: ../../library/atexit.rst:86 +msgid "" +"try:\n" +" with open('counterfile') as infile:\n" +" _count = int(infile.read())\n" +"except FileNotFoundError:\n" +" _count = 0\n" +"\n" +"def incrcounter(n):\n" +" global _count\n" +" _count = _count + n\n" +"\n" +"def savecounter():\n" +" with open('counterfile', 'w') as outfile:\n" +" outfile.write('%d' % _count)\n" +"\n" +"import atexit\n" +"\n" +"atexit.register(savecounter)" +msgstr "" + +#: ../../library/atexit.rst:104 +msgid "" +"Positional and keyword arguments may also be passed to :func:`register` to " +"be passed along to the registered function when it is called::" +msgstr "" + +#: ../../library/atexit.rst:107 +msgid "" +"def goodbye(name, adjective):\n" +" print('Goodbye %s, it was %s to meet you.' % (name, adjective))\n" +"\n" +"import atexit\n" +"\n" +"atexit.register(goodbye, 'Donny', 'nice')\n" +"# or:\n" +"atexit.register(goodbye, adjective='nice', name='Donny')" +msgstr "" + +#: ../../library/atexit.rst:116 +msgid "Usage as a :term:`decorator`::" +msgstr "" + +#: ../../library/atexit.rst:118 +msgid "" +"import atexit\n" +"\n" +"@atexit.register\n" +"def goodbye():\n" +" print('You are now leaving the Python sector.')" +msgstr "" + +#: ../../library/atexit.rst:124 +msgid "This only works with functions that can be called without arguments." +msgstr "" diff --git a/library/codecs.po b/library/codecs.po index ab893913..88f99132 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -1335,15 +1335,15 @@ msgid "" "charmap encoded file starts with these byte values (which would e.g. map to" msgstr "" -#: ../../library/codecs.rst:0 +#: ../../library/codecs.rst:1052 msgid "LATIN SMALL LETTER I WITH DIAERESIS" msgstr "" -#: ../../library/codecs.rst:0 +#: ../../library/codecs.rst:1053 msgid "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK" msgstr "" -#: ../../library/codecs.rst:0 +#: ../../library/codecs.rst:1054 msgid "INVERTED QUESTION MARK" msgstr "" diff --git a/library/codecs.po~ b/library/codecs.po~ new file mode 100644 index 00000000..ab893913 --- /dev/null +++ b/library/codecs.po~ @@ -0,0 +1,2955 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:00+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/codecs.rst:2 +msgid ":mod:`!codecs` --- Codec registry and base classes" +msgstr "" + +#: ../../library/codecs.rst:7 +msgid "**Source code:** :source:`Lib/codecs.py`" +msgstr "" + +#: ../../library/codecs.rst:19 +msgid "" +"This module defines base classes for standard Python codecs (encoders and " +"decoders) and provides access to the internal Python codec registry, which " +"manages the codec and error handling lookup process. Most standard codecs " +"are :term:`text encodings `, which encode text to bytes (and " +"decode bytes to text), but there are also codecs provided that encode text " +"to text, and bytes to bytes. Custom codecs may encode and decode between " +"arbitrary types, but some module features are restricted to be used " +"specifically with :term:`text encodings ` or with codecs that " +"encode to :class:`bytes`." +msgstr "" + +#: ../../library/codecs.rst:29 +msgid "" +"The module defines the following functions for encoding and decoding with " +"any codec:" +msgstr "" + +#: ../../library/codecs.rst:34 +msgid "Encodes *obj* using the codec registered for *encoding*." +msgstr "" + +#: ../../library/codecs.rst:36 +msgid "" +"*Errors* may be given to set the desired error handling scheme. The default " +"error handler is ``'strict'`` meaning that encoding errors raise :exc:" +"`ValueError` (or a more codec specific subclass, such as :exc:" +"`UnicodeEncodeError`). Refer to :ref:`codec-base-classes` for more " +"information on codec error handling." +msgstr "" + +#: ../../library/codecs.rst:44 +msgid "Decodes *obj* using the codec registered for *encoding*." +msgstr "" + +#: ../../library/codecs.rst:46 +msgid "" +"*Errors* may be given to set the desired error handling scheme. The default " +"error handler is ``'strict'`` meaning that decoding errors raise :exc:" +"`ValueError` (or a more codec specific subclass, such as :exc:" +"`UnicodeDecodeError`). Refer to :ref:`codec-base-classes` for more " +"information on codec error handling." +msgstr "" + +#: ../../library/codecs.rst:54 +msgid "" +"Return a mapping suitable for encoding with a custom single-byte encoding. " +"Given a :class:`str` *string* of up to 256 characters representing a " +"decoding table, returns either a compact internal mapping object " +"``EncodingMap`` or a :class:`dictionary ` mapping character ordinals " +"to byte values. Raises a :exc:`TypeError` on invalid input." +msgstr "" + +#: ../../library/codecs.rst:60 +msgid "The full details for each codec can also be looked up directly:" +msgstr "" + +#: ../../library/codecs.rst:64 +msgid "" +"Looks up the codec info in the Python codec registry and returns a :class:" +"`CodecInfo` object as defined below." +msgstr "" + +#: ../../library/codecs.rst:67 +msgid "" +"This function first normalizes the *encoding*: all ASCII letters are " +"converted to lower case, spaces are replaced with hyphens. Then encoding is " +"looked up in the registry's cache. If not found, the list of registered " +"search functions is scanned. If no :class:`CodecInfo` object is found, a :" +"exc:`LookupError` is raised. Otherwise, the :class:`CodecInfo` object is " +"stored in the cache and returned to the caller." +msgstr "" + +#: ../../library/codecs.rst:74 +msgid "" +"Any characters except ASCII letters and digits and a dot are converted to " +"underscore." +msgstr "" + +#: ../../library/codecs.rst:77 +msgid "" +"No characters are converted to underscore anymore. Spaces are converted to " +"hyphens." +msgstr "" + +#: ../../library/codecs.rst:84 +msgid "" +"Codec details when looking up the codec registry. The constructor arguments " +"are stored in attributes of the same name:" +msgstr "" + +#: ../../library/codecs.rst:90 +msgid "The name of the encoding." +msgstr "" + +#: ../../library/codecs.rst:96 +msgid "" +"The stateless encoding and decoding functions. These must be functions or " +"methods which have the same interface as the :meth:`~Codec.encode` and :meth:" +"`~Codec.decode` methods of Codec instances (see :ref:`Codec Interface `). The functions or methods are expected to work in a stateless " +"mode." +msgstr "" + +#: ../../library/codecs.rst:106 +msgid "" +"Incremental encoder and decoder classes or factory functions. These have to " +"provide the interface defined by the base classes :class:" +"`IncrementalEncoder` and :class:`IncrementalDecoder`, respectively. " +"Incremental codecs can maintain state." +msgstr "" + +#: ../../library/codecs.rst:115 +msgid "" +"Stream writer and reader classes or factory functions. These have to provide " +"the interface defined by the base classes :class:`StreamWriter` and :class:" +"`StreamReader`, respectively. Stream codecs can maintain state." +msgstr "" + +#: ../../library/codecs.rst:120 +msgid "" +"To simplify access to the various codec components, the module provides " +"these additional functions which use :func:`lookup` for the codec lookup:" +msgstr "" + +#: ../../library/codecs.rst:125 +msgid "" +"Look up the codec for the given encoding and return its encoder function." +msgstr "" + +#: ../../library/codecs.rst:127 ../../library/codecs.rst:134 +#: ../../library/codecs.rst:160 ../../library/codecs.rst:168 +msgid "Raises a :exc:`LookupError` in case the encoding cannot be found." +msgstr "" + +#: ../../library/codecs.rst:132 +msgid "" +"Look up the codec for the given encoding and return its decoder function." +msgstr "" + +#: ../../library/codecs.rst:139 +msgid "" +"Look up the codec for the given encoding and return its incremental encoder " +"class or factory function." +msgstr "" + +#: ../../library/codecs.rst:142 +msgid "" +"Raises a :exc:`LookupError` in case the encoding cannot be found or the " +"codec doesn't support an incremental encoder." +msgstr "" + +#: ../../library/codecs.rst:148 +msgid "" +"Look up the codec for the given encoding and return its incremental decoder " +"class or factory function." +msgstr "" + +#: ../../library/codecs.rst:151 +msgid "" +"Raises a :exc:`LookupError` in case the encoding cannot be found or the " +"codec doesn't support an incremental decoder." +msgstr "" + +#: ../../library/codecs.rst:157 +msgid "" +"Look up the codec for the given encoding and return its :class:" +"`StreamReader` class or factory function." +msgstr "" + +#: ../../library/codecs.rst:165 +msgid "" +"Look up the codec for the given encoding and return its :class:" +"`StreamWriter` class or factory function." +msgstr "" + +#: ../../library/codecs.rst:170 +msgid "" +"Custom codecs are made available by registering a suitable codec search " +"function:" +msgstr "" + +#: ../../library/codecs.rst:175 +msgid "" +"Register a codec search function. Search functions are expected to take one " +"argument, being the encoding name in all lower case letters with spaces " +"converted to hyphens, and return a :class:`CodecInfo` object. In case a " +"search function cannot find a given encoding, it should return ``None``." +msgstr "" + +#: ../../library/codecs.rst:184 +msgid "" +"Unregister a codec search function and clear the registry's cache. If the " +"search function is not registered, do nothing." +msgstr "" + +#: ../../library/codecs.rst:190 +msgid "" +"While the builtin :func:`open` and the associated :mod:`io` module are the " +"recommended approach for working with encoded text files, this module " +"provides additional utility functions and classes that allow the use of a " +"wider range of codecs when working with binary files:" +msgstr "" + +#: ../../library/codecs.rst:197 +msgid "" +"Open an encoded file using the given *mode* and return an instance of :class:" +"`StreamReaderWriter`, providing transparent encoding/decoding. The default " +"file mode is ``'r'``, meaning to open the file in read mode." +msgstr "" + +#: ../../library/codecs.rst:203 +msgid "" +"If *encoding* is not ``None``, then the underlying encoded files are always " +"opened in binary mode. No automatic conversion of ``'\\n'`` is done on " +"reading and writing. The *mode* argument may be any binary mode acceptable " +"to the built-in :func:`open` function; the ``'b'`` is automatically added." +msgstr "" + +#: ../../library/codecs.rst:209 +msgid "" +"*encoding* specifies the encoding which is to be used for the file. Any " +"encoding that encodes to and decodes from bytes is allowed, and the data " +"types supported by the file methods depend on the codec used." +msgstr "" + +#: ../../library/codecs.rst:213 +msgid "" +"*errors* may be given to define the error handling. It defaults to " +"``'strict'`` which causes a :exc:`ValueError` to be raised in case an " +"encoding error occurs." +msgstr "" + +#: ../../library/codecs.rst:216 +msgid "" +"*buffering* has the same meaning as for the built-in :func:`open` function. " +"It defaults to -1 which means that the default buffer size will be used." +msgstr "" + +#: ../../library/codecs.rst:219 +msgid "The ``'U'`` mode has been removed." +msgstr "" + +#: ../../library/codecs.rst:224 +msgid ":func:`codecs.open` has been superseded by :func:`open`." +msgstr "" + +#: ../../library/codecs.rst:229 +msgid "" +"Return a :class:`StreamRecoder` instance, a wrapped version of *file* which " +"provides transparent transcoding. The original file is closed when the " +"wrapped version is closed." +msgstr "" + +#: ../../library/codecs.rst:233 +msgid "" +"Data written to the wrapped file is decoded according to the given " +"*data_encoding* and then written to the original file as bytes using " +"*file_encoding*. Bytes read from the original file are decoded according to " +"*file_encoding*, and the result is encoded using *data_encoding*." +msgstr "" + +#: ../../library/codecs.rst:239 +msgid "If *file_encoding* is not given, it defaults to *data_encoding*." +msgstr "" + +#: ../../library/codecs.rst:241 +msgid "" +"*errors* may be given to define the error handling. It defaults to " +"``'strict'``, which causes :exc:`ValueError` to be raised in case an " +"encoding error occurs." +msgstr "" + +#: ../../library/codecs.rst:248 +msgid "" +"Uses an incremental encoder to iteratively encode the input provided by " +"*iterator*. *iterator* must yield :class:`str` objects. This function is a :" +"term:`generator`. The *errors* argument (as well as any other keyword " +"argument) is passed through to the incremental encoder." +msgstr "" + +#: ../../library/codecs.rst:253 +msgid "" +"This function requires that the codec accept text :class:`str` objects to " +"encode. Therefore it does not support bytes-to-bytes encoders such as " +"``base64_codec``." +msgstr "" + +#: ../../library/codecs.rst:260 +msgid "" +"Uses an incremental decoder to iteratively decode the input provided by " +"*iterator*. *iterator* must yield :class:`bytes` objects. This function is " +"a :term:`generator`. The *errors* argument (as well as any other keyword " +"argument) is passed through to the incremental decoder." +msgstr "" + +#: ../../library/codecs.rst:265 +msgid "" +"This function requires that the codec accept :class:`bytes` objects to " +"decode. Therefore it does not support text-to-text encoders such as " +"``rot_13``, although ``rot_13`` may be used equivalently with :func:" +"`iterencode`." +msgstr "" + +#: ../../library/codecs.rst:273 +msgid "" +"Return a :class:`tuple` containing the raw bytes of *buffer*, a :ref:`buffer-" +"compatible object ` or :class:`str` (encoded to UTF-8 before " +"processing), and their length in bytes." +msgstr "" + +#: ../../library/codecs.rst:277 +msgid "The *errors* argument is ignored." +msgstr "" + +#: ../../library/codecs.rst:279 +msgid "" +">>> codecs.readbuffer_encode(b\"Zito\")\n" +"(b'Zito', 4)" +msgstr "" + +#: ../../library/codecs.rst:285 +msgid "" +"The module also provides the following constants which are useful for " +"reading and writing to platform dependent files:" +msgstr "" + +#: ../../library/codecs.rst:300 +msgid "" +"These constants define various byte sequences, being Unicode byte order " +"marks (BOMs) for several encodings. They are used in UTF-16 and UTF-32 data " +"streams to indicate the byte order used, and in UTF-8 as a Unicode " +"signature. :const:`BOM_UTF16` is either :const:`BOM_UTF16_BE` or :const:" +"`BOM_UTF16_LE` depending on the platform's native byte order, :const:`BOM` " +"is an alias for :const:`BOM_UTF16`, :const:`BOM_LE` for :const:" +"`BOM_UTF16_LE` and :const:`BOM_BE` for :const:`BOM_UTF16_BE`. The others " +"represent the BOM in UTF-8 and UTF-32 encodings." +msgstr "" + +#: ../../library/codecs.rst:314 +msgid "Codec Base Classes" +msgstr "" + +#: ../../library/codecs.rst:316 +msgid "" +"The :mod:`!codecs` module defines a set of base classes which define the " +"interfaces for working with codec objects, and can also be used as the basis " +"for custom codec implementations." +msgstr "" + +#: ../../library/codecs.rst:320 +msgid "" +"Each codec has to define four interfaces to make it usable as codec in " +"Python: stateless encoder, stateless decoder, stream reader and stream " +"writer. The stream reader and writers typically reuse the stateless encoder/" +"decoder to implement the file protocols. Codec authors also need to define " +"how the codec will handle encoding and decoding errors." +msgstr "" + +#: ../../library/codecs.rst:331 +msgid "Error Handlers" +msgstr "" + +#: ../../library/codecs.rst:333 +msgid "" +"To simplify and standardize error handling, codecs may implement different " +"error handling schemes by accepting the *errors* string argument:" +msgstr "" + +#: ../../library/codecs.rst:353 +msgid "" +"The following error handlers can be used with all Python :ref:`standard-" +"encodings` codecs:" +msgstr "" + +#: ../../library/codecs.rst:359 ../../library/codecs.rst:402 +#: ../../library/codecs.rst:422 +msgid "Value" +msgstr "" + +#: ../../library/codecs.rst:359 ../../library/codecs.rst:402 +#: ../../library/codecs.rst:422 ../../library/codecs.rst:1379 +#: ../../library/codecs.rst:1459 ../../library/codecs.rst:1544 +msgid "Meaning" +msgstr "" + +#: ../../library/codecs.rst:361 +msgid "``'strict'``" +msgstr "" + +#: ../../library/codecs.rst:361 +msgid "" +"Raise :exc:`UnicodeError` (or a subclass), this is the default. Implemented " +"in :func:`strict_errors`." +msgstr "" + +#: ../../library/codecs.rst:365 +msgid "``'ignore'``" +msgstr "" + +#: ../../library/codecs.rst:365 +msgid "" +"Ignore the malformed data and continue without further notice. Implemented " +"in :func:`ignore_errors`." +msgstr "" + +#: ../../library/codecs.rst:369 +msgid "``'replace'``" +msgstr "" + +#: ../../library/codecs.rst:369 +msgid "" +"Replace with a replacement marker. On encoding, use ``?`` (ASCII character). " +"On decoding, use ``�`` (U+FFFD, the official REPLACEMENT CHARACTER). " +"Implemented in :func:`replace_errors`." +msgstr "" + +#: ../../library/codecs.rst:375 +msgid "``'backslashreplace'``" +msgstr "" + +#: ../../library/codecs.rst:375 +msgid "" +"Replace with backslashed escape sequences. On encoding, use hexadecimal form " +"of Unicode code point with formats :samp:`\\\\x{hh}` :samp:`\\\\u{xxxx}` :" +"samp:`\\\\U{xxxxxxxx}`. On decoding, use hexadecimal form of byte value with " +"format :samp:`\\\\x{hh}`. Implemented in :func:`backslashreplace_errors`." +msgstr "" + +#: ../../library/codecs.rst:384 +msgid "``'surrogateescape'``" +msgstr "" + +#: ../../library/codecs.rst:384 +msgid "" +"On decoding, replace byte with individual surrogate code ranging from " +"``U+DC80`` to ``U+DCFF``. This code will then be turned back into the same " +"byte when the ``'surrogateescape'`` error handler is used when encoding the " +"data. (See :pep:`383` for more.)" +msgstr "" + +#: ../../library/codecs.rst:398 +msgid "" +"The following error handlers are only applicable to encoding (within :term:" +"`text encodings `):" +msgstr "" + +#: ../../library/codecs.rst:404 +msgid "``'xmlcharrefreplace'``" +msgstr "" + +#: ../../library/codecs.rst:404 +msgid "" +"Replace with XML/HTML numeric character reference, which is a decimal form " +"of Unicode code point with format :samp:`&#{num};`. Implemented in :func:" +"`xmlcharrefreplace_errors`." +msgstr "" + +#: ../../library/codecs.rst:410 +msgid "``'namereplace'``" +msgstr "" + +#: ../../library/codecs.rst:410 +msgid "" +"Replace with ``\\N{...}`` escape sequences, what appears in the braces is " +"the Name property from Unicode Character Database. Implemented in :func:" +"`namereplace_errors`." +msgstr "" + +#: ../../library/codecs.rst:419 +msgid "" +"In addition, the following error handler is specific to the given codecs:" +msgstr "" + +#: ../../library/codecs.rst:9 ../../library/codecs.rst:422 +msgid "Codecs" +msgstr "" + +#: ../../library/codecs.rst:424 +msgid "``'surrogatepass'``" +msgstr "" + +#: ../../library/codecs.rst:424 +msgid "utf-8, utf-16, utf-32, utf-16-be, utf-16-le, utf-32-be, utf-32-le" +msgstr "" + +#: ../../library/codecs.rst:424 +msgid "" +"Allow encoding and decoding surrogate code point (``U+D800`` - ``U+DFFF``) " +"as normal code point. Otherwise these codecs treat the presence of surrogate " +"code point in :class:`str` as an error." +msgstr "" + +#: ../../library/codecs.rst:431 +msgid "The ``'surrogateescape'`` and ``'surrogatepass'`` error handlers." +msgstr "" + +#: ../../library/codecs.rst:434 +msgid "" +"The ``'surrogatepass'`` error handler now works with utf-16\\* and utf-32\\* " +"codecs." +msgstr "" + +#: ../../library/codecs.rst:438 +msgid "The ``'namereplace'`` error handler." +msgstr "" + +#: ../../library/codecs.rst:441 +msgid "" +"The ``'backslashreplace'`` error handler now works with decoding and " +"translating." +msgstr "" + +#: ../../library/codecs.rst:445 +msgid "" +"The set of allowed values can be extended by registering a new named error " +"handler:" +msgstr "" + +#: ../../library/codecs.rst:450 +msgid "" +"Register the error handling function *error_handler* under the name *name*. " +"The *error_handler* argument will be called during encoding and decoding in " +"case of an error, when *name* is specified as the errors parameter." +msgstr "" + +#: ../../library/codecs.rst:454 +msgid "" +"For encoding, *error_handler* will be called with a :exc:" +"`UnicodeEncodeError` instance, which contains information about the location " +"of the error. The error handler must either raise this or a different " +"exception, or return a tuple with a replacement for the unencodable part of " +"the input and a position where encoding should continue. The replacement may " +"be either :class:`str` or :class:`bytes`. If the replacement is bytes, the " +"encoder will simply copy them into the output buffer. If the replacement is " +"a string, the encoder will encode the replacement. Encoding continues on " +"original input at the specified position. Negative position values will be " +"treated as being relative to the end of the input string. If the resulting " +"position is out of bound an :exc:`IndexError` will be raised." +msgstr "" + +#: ../../library/codecs.rst:466 +msgid "" +"Decoding and translating works similarly, except :exc:`UnicodeDecodeError` " +"or :exc:`UnicodeTranslateError` will be passed to the handler and that the " +"replacement from the error handler will be put into the output directly." +msgstr "" + +#: ../../library/codecs.rst:471 +msgid "" +"Previously registered error handlers (including the standard error handlers) " +"can be looked up by name:" +msgstr "" + +#: ../../library/codecs.rst:476 +msgid "Return the error handler previously registered under the name *name*." +msgstr "" + +#: ../../library/codecs.rst:478 +msgid "Raises a :exc:`LookupError` in case the handler cannot be found." +msgstr "" + +#: ../../library/codecs.rst:480 +msgid "" +"The following standard error handlers are also made available as module " +"level functions:" +msgstr "" + +#: ../../library/codecs.rst:485 +msgid "Implements the ``'strict'`` error handling." +msgstr "" + +#: ../../library/codecs.rst:487 +msgid "Each encoding or decoding error raises a :exc:`UnicodeError`." +msgstr "" + +#: ../../library/codecs.rst:492 +msgid "Implements the ``'ignore'`` error handling." +msgstr "" + +#: ../../library/codecs.rst:494 +msgid "" +"Malformed data is ignored; encoding or decoding is continued without further " +"notice." +msgstr "" + +#: ../../library/codecs.rst:500 +msgid "Implements the ``'replace'`` error handling." +msgstr "" + +#: ../../library/codecs.rst:502 +msgid "" +"Substitutes ``?`` (ASCII character) for encoding errors or ``�`` (U+FFFD, " +"the official REPLACEMENT CHARACTER) for decoding errors." +msgstr "" + +#: ../../library/codecs.rst:508 +msgid "Implements the ``'backslashreplace'`` error handling." +msgstr "" + +#: ../../library/codecs.rst:510 +msgid "" +"Malformed data is replaced by a backslashed escape sequence. On encoding, " +"use the hexadecimal form of Unicode code point with formats :samp:`\\\\x{hh}" +"` :samp:`\\\\u{xxxx}` :samp:`\\\\U{xxxxxxxx}`. On decoding, use the " +"hexadecimal form of byte value with format :samp:`\\\\x{hh}`." +msgstr "" + +#: ../../library/codecs.rst:516 +msgid "Works with decoding and translating." +msgstr "" + +#: ../../library/codecs.rst:522 +msgid "" +"Implements the ``'xmlcharrefreplace'`` error handling (for encoding within :" +"term:`text encoding` only)." +msgstr "" + +#: ../../library/codecs.rst:525 +msgid "" +"The unencodable character is replaced by an appropriate XML/HTML numeric " +"character reference, which is a decimal form of Unicode code point with " +"format :samp:`&#{num};` ." +msgstr "" + +#: ../../library/codecs.rst:532 +msgid "" +"Implements the ``'namereplace'`` error handling (for encoding within :term:" +"`text encoding` only)." +msgstr "" + +#: ../../library/codecs.rst:535 +msgid "" +"The unencodable character is replaced by a ``\\N{...}`` escape sequence. The " +"set of characters that appear in the braces is the Name property from " +"Unicode Character Database. For example, the German lowercase letter ``'ß'`` " +"will be converted to byte sequence ``\\N{LATIN SMALL LETTER SHARP S}`` ." +msgstr "" + +#: ../../library/codecs.rst:546 +msgid "Stateless Encoding and Decoding" +msgstr "" + +#: ../../library/codecs.rst:548 +msgid "" +"The base :class:`Codec` class defines these methods which also define the " +"function interfaces of the stateless encoder and decoder:" +msgstr "" + +#: ../../library/codecs.rst:556 +msgid "" +"Encodes the object *input* and returns a tuple (output object, length " +"consumed). For instance, :term:`text encoding` converts a string object to a " +"bytes object using a particular character set encoding (e.g., ``cp1252`` or " +"``iso-8859-1``)." +msgstr "" + +#: ../../library/codecs.rst:561 ../../library/codecs.rst:583 +msgid "" +"The *errors* argument defines the error handling to apply. It defaults to " +"``'strict'`` handling." +msgstr "" + +#: ../../library/codecs.rst:564 +msgid "" +"The method may not store state in the :class:`Codec` instance. Use :class:" +"`StreamWriter` for codecs which have to keep state in order to make encoding " +"efficient." +msgstr "" + +#: ../../library/codecs.rst:568 +msgid "" +"The encoder must be able to handle zero length input and return an empty " +"object of the output object type in this situation." +msgstr "" + +#: ../../library/codecs.rst:574 +msgid "" +"Decodes the object *input* and returns a tuple (output object, length " +"consumed). For instance, for a :term:`text encoding`, decoding converts a " +"bytes object encoded using a particular character set encoding to a string " +"object." +msgstr "" + +#: ../../library/codecs.rst:579 +msgid "" +"For text encodings and bytes-to-bytes codecs, *input* must be a bytes object " +"or one which provides the read-only buffer interface -- for example, buffer " +"objects and memory mapped files." +msgstr "" + +#: ../../library/codecs.rst:586 +msgid "" +"The method may not store state in the :class:`Codec` instance. Use :class:" +"`StreamReader` for codecs which have to keep state in order to make decoding " +"efficient." +msgstr "" + +#: ../../library/codecs.rst:590 +msgid "" +"The decoder must be able to handle zero length input and return an empty " +"object of the output object type in this situation." +msgstr "" + +#: ../../library/codecs.rst:595 +msgid "Incremental Encoding and Decoding" +msgstr "" + +#: ../../library/codecs.rst:597 +msgid "" +"The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes " +"provide the basic interface for incremental encoding and decoding. Encoding/" +"decoding the input isn't done with one call to the stateless encoder/decoder " +"function, but with multiple calls to the :meth:`~IncrementalEncoder.encode`/:" +"meth:`~IncrementalDecoder.decode` method of the incremental encoder/decoder. " +"The incremental encoder/decoder keeps track of the encoding/decoding process " +"during method calls." +msgstr "" + +#: ../../library/codecs.rst:605 +msgid "" +"The joined output of calls to the :meth:`~IncrementalEncoder.encode`/:meth:" +"`~IncrementalDecoder.decode` method is the same as if all the single inputs " +"were joined into one, and this input was encoded/decoded with the stateless " +"encoder/decoder." +msgstr "" + +#: ../../library/codecs.rst:614 +msgid "IncrementalEncoder Objects" +msgstr "" + +#: ../../library/codecs.rst:616 +msgid "" +"The :class:`IncrementalEncoder` class is used for encoding an input in " +"multiple steps. It defines the following methods which every incremental " +"encoder must define in order to be compatible with the Python codec registry." +msgstr "" + +#: ../../library/codecs.rst:623 +msgid "Constructor for an :class:`IncrementalEncoder` instance." +msgstr "" + +#: ../../library/codecs.rst:625 +msgid "" +"All incremental encoders must provide this constructor interface. They are " +"free to add additional keyword arguments, but only the ones defined here are " +"used by the Python codec registry." +msgstr "" + +#: ../../library/codecs.rst:629 +msgid "" +"The :class:`IncrementalEncoder` may implement different error handling " +"schemes by providing the *errors* keyword argument. See :ref:`error-" +"handlers` for possible values." +msgstr "" + +#: ../../library/codecs.rst:633 +msgid "" +"The *errors* argument will be assigned to an attribute of the same name. " +"Assigning to this attribute makes it possible to switch between different " +"error handling strategies during the lifetime of the :class:" +"`IncrementalEncoder` object." +msgstr "" + +#: ../../library/codecs.rst:641 +msgid "" +"Encodes *object* (taking the current state of the encoder into account) and " +"returns the resulting encoded object. If this is the last call to :meth:" +"`encode` *final* must be true (the default is false)." +msgstr "" + +#: ../../library/codecs.rst:648 +msgid "" +"Reset the encoder to the initial state. The output is discarded: call ``." +"encode(object, final=True)``, passing an empty byte or text string if " +"necessary, to reset the encoder and to get the output." +msgstr "" + +#: ../../library/codecs.rst:655 +msgid "" +"Return the current state of the encoder which must be an integer. The " +"implementation should make sure that ``0`` is the most common state. (States " +"that are more complicated than integers can be converted into an integer by " +"marshaling/pickling the state and encoding the bytes of the resulting string " +"into an integer.)" +msgstr "" + +#: ../../library/codecs.rst:664 +msgid "" +"Set the state of the encoder to *state*. *state* must be an encoder state " +"returned by :meth:`getstate`." +msgstr "" + +#: ../../library/codecs.rst:671 +msgid "IncrementalDecoder Objects" +msgstr "" + +#: ../../library/codecs.rst:673 +msgid "" +"The :class:`IncrementalDecoder` class is used for decoding an input in " +"multiple steps. It defines the following methods which every incremental " +"decoder must define in order to be compatible with the Python codec registry." +msgstr "" + +#: ../../library/codecs.rst:680 +msgid "Constructor for an :class:`IncrementalDecoder` instance." +msgstr "" + +#: ../../library/codecs.rst:682 +msgid "" +"All incremental decoders must provide this constructor interface. They are " +"free to add additional keyword arguments, but only the ones defined here are " +"used by the Python codec registry." +msgstr "" + +#: ../../library/codecs.rst:686 +msgid "" +"The :class:`IncrementalDecoder` may implement different error handling " +"schemes by providing the *errors* keyword argument. See :ref:`error-" +"handlers` for possible values." +msgstr "" + +#: ../../library/codecs.rst:690 +msgid "" +"The *errors* argument will be assigned to an attribute of the same name. " +"Assigning to this attribute makes it possible to switch between different " +"error handling strategies during the lifetime of the :class:" +"`IncrementalDecoder` object." +msgstr "" + +#: ../../library/codecs.rst:698 +msgid "" +"Decodes *object* (taking the current state of the decoder into account) and " +"returns the resulting decoded object. If this is the last call to :meth:" +"`decode` *final* must be true (the default is false). If *final* is true the " +"decoder must decode the input completely and must flush all buffers. If this " +"isn't possible (e.g. because of incomplete byte sequences at the end of the " +"input) it must initiate error handling just like in the stateless case " +"(which might raise an exception)." +msgstr "" + +#: ../../library/codecs.rst:709 +msgid "Reset the decoder to the initial state." +msgstr "" + +#: ../../library/codecs.rst:714 +msgid "" +"Return the current state of the decoder. This must be a tuple with two " +"items, the first must be the buffer containing the still undecoded input. " +"The second must be an integer and can be additional state info. (The " +"implementation should make sure that ``0`` is the most common additional " +"state info.) If this additional state info is ``0`` it must be possible to " +"set the decoder to the state which has no input buffered and ``0`` as the " +"additional state info, so that feeding the previously buffered input to the " +"decoder returns it to the previous state without producing any output. " +"(Additional state info that is more complicated than integers can be " +"converted into an integer by marshaling/pickling the info and encoding the " +"bytes of the resulting string into an integer.)" +msgstr "" + +#: ../../library/codecs.rst:729 +msgid "" +"Set the state of the decoder to *state*. *state* must be a decoder state " +"returned by :meth:`getstate`." +msgstr "" + +#: ../../library/codecs.rst:734 +msgid "Stream Encoding and Decoding" +msgstr "" + +#: ../../library/codecs.rst:737 +msgid "" +"The :class:`StreamWriter` and :class:`StreamReader` classes provide generic " +"working interfaces which can be used to implement new encoding submodules " +"very easily. See :mod:`!encodings.utf_8` for an example of how this is done." +msgstr "" + +#: ../../library/codecs.rst:745 +msgid "StreamWriter Objects" +msgstr "" + +#: ../../library/codecs.rst:747 +msgid "" +"The :class:`StreamWriter` class is a subclass of :class:`Codec` and defines " +"the following methods which every stream writer must define in order to be " +"compatible with the Python codec registry." +msgstr "" + +#: ../../library/codecs.rst:754 +msgid "Constructor for a :class:`StreamWriter` instance." +msgstr "" + +#: ../../library/codecs.rst:756 +msgid "" +"All stream writers must provide this constructor interface. They are free to " +"add additional keyword arguments, but only the ones defined here are used by " +"the Python codec registry." +msgstr "" + +#: ../../library/codecs.rst:760 +msgid "" +"The *stream* argument must be a file-like object open for writing text or " +"binary data, as appropriate for the specific codec." +msgstr "" + +#: ../../library/codecs.rst:763 +msgid "" +"The :class:`StreamWriter` may implement different error handling schemes by " +"providing the *errors* keyword argument. See :ref:`error-handlers` for the " +"standard error handlers the underlying stream codec may support." +msgstr "" + +#: ../../library/codecs.rst:767 +msgid "" +"The *errors* argument will be assigned to an attribute of the same name. " +"Assigning to this attribute makes it possible to switch between different " +"error handling strategies during the lifetime of the :class:`StreamWriter` " +"object." +msgstr "" + +#: ../../library/codecs.rst:773 +msgid "Writes the object's contents encoded to the stream." +msgstr "" + +#: ../../library/codecs.rst:778 +msgid "" +"Writes the concatenated iterable of strings to the stream (possibly by " +"reusing the :meth:`write` method). Infinite or very large iterables are not " +"supported. The standard bytes-to-bytes codecs do not support this method." +msgstr "" + +#: ../../library/codecs.rst:786 ../../library/codecs.rst:881 +msgid "Resets the codec buffers used for keeping internal state." +msgstr "" + +#: ../../library/codecs.rst:788 +msgid "" +"Calling this method should ensure that the data on the output is put into a " +"clean state that allows appending of new fresh data without having to rescan " +"the whole stream to recover state." +msgstr "" + +#: ../../library/codecs.rst:793 +msgid "" +"In addition to the above methods, the :class:`StreamWriter` must also " +"inherit all other methods and attributes from the underlying stream." +msgstr "" + +#: ../../library/codecs.rst:800 +msgid "StreamReader Objects" +msgstr "" + +#: ../../library/codecs.rst:802 +msgid "" +"The :class:`StreamReader` class is a subclass of :class:`Codec` and defines " +"the following methods which every stream reader must define in order to be " +"compatible with the Python codec registry." +msgstr "" + +#: ../../library/codecs.rst:809 +msgid "Constructor for a :class:`StreamReader` instance." +msgstr "" + +#: ../../library/codecs.rst:811 +msgid "" +"All stream readers must provide this constructor interface. They are free to " +"add additional keyword arguments, but only the ones defined here are used by " +"the Python codec registry." +msgstr "" + +#: ../../library/codecs.rst:815 +msgid "" +"The *stream* argument must be a file-like object open for reading text or " +"binary data, as appropriate for the specific codec." +msgstr "" + +#: ../../library/codecs.rst:818 +msgid "" +"The :class:`StreamReader` may implement different error handling schemes by " +"providing the *errors* keyword argument. See :ref:`error-handlers` for the " +"standard error handlers the underlying stream codec may support." +msgstr "" + +#: ../../library/codecs.rst:822 +msgid "" +"The *errors* argument will be assigned to an attribute of the same name. " +"Assigning to this attribute makes it possible to switch between different " +"error handling strategies during the lifetime of the :class:`StreamReader` " +"object." +msgstr "" + +#: ../../library/codecs.rst:826 +msgid "" +"The set of allowed values for the *errors* argument can be extended with :" +"func:`register_error`." +msgstr "" + +#: ../../library/codecs.rst:832 +msgid "Decodes data from the stream and returns the resulting object." +msgstr "" + +#: ../../library/codecs.rst:834 +msgid "" +"The *chars* argument indicates the number of decoded code points or bytes to " +"return. The :func:`read` method will never return more data than requested, " +"but it might return less, if there is not enough available." +msgstr "" + +#: ../../library/codecs.rst:839 +msgid "" +"The *size* argument indicates the approximate maximum number of encoded " +"bytes or code points to read for decoding. The decoder can modify this " +"setting as appropriate. The default value -1 indicates to read and decode as " +"much as possible. This parameter is intended to prevent having to decode " +"huge files in one step." +msgstr "" + +#: ../../library/codecs.rst:846 +msgid "" +"The *firstline* flag indicates that it would be sufficient to only return " +"the first line, if there are decoding errors on later lines." +msgstr "" + +#: ../../library/codecs.rst:850 +msgid "" +"The method should use a greedy read strategy meaning that it should read as " +"much data as is allowed within the definition of the encoding and the given " +"size, e.g. if optional encoding endings or state markers are available on " +"the stream, these should be read too." +msgstr "" + +#: ../../library/codecs.rst:858 +msgid "Read one line from the input stream and return the decoded data." +msgstr "" + +#: ../../library/codecs.rst:860 +msgid "" +"*size*, if given, is passed as size argument to the stream's :meth:`read` " +"method." +msgstr "" + +#: ../../library/codecs.rst:863 +msgid "" +"If *keepends* is false line-endings will be stripped from the lines returned." +msgstr "" + +#: ../../library/codecs.rst:869 +msgid "" +"Read all lines available on the input stream and return them as a list of " +"lines." +msgstr "" + +#: ../../library/codecs.rst:872 +msgid "" +"Line-endings are implemented using the codec's :meth:`decode` method and are " +"included in the list entries if *keepends* is true." +msgstr "" + +#: ../../library/codecs.rst:875 +msgid "" +"*sizehint*, if given, is passed as the *size* argument to the stream's :meth:" +"`read` method." +msgstr "" + +#: ../../library/codecs.rst:883 +msgid "" +"Note that no stream repositioning should take place. This method is " +"primarily intended to be able to recover from decoding errors." +msgstr "" + +#: ../../library/codecs.rst:887 +msgid "" +"In addition to the above methods, the :class:`StreamReader` must also " +"inherit all other methods and attributes from the underlying stream." +msgstr "" + +#: ../../library/codecs.rst:893 +msgid "StreamReaderWriter Objects" +msgstr "" + +#: ../../library/codecs.rst:895 +msgid "" +"The :class:`StreamReaderWriter` is a convenience class that allows wrapping " +"streams which work in both read and write modes." +msgstr "" + +#: ../../library/codecs.rst:898 ../../library/codecs.rst:922 +msgid "" +"The design is such that one can use the factory functions returned by the :" +"func:`lookup` function to construct the instance." +msgstr "" + +#: ../../library/codecs.rst:904 +msgid "" +"Creates a :class:`StreamReaderWriter` instance. *stream* must be a file-like " +"object. *Reader* and *Writer* must be factory functions or classes providing " +"the :class:`StreamReader` and :class:`StreamWriter` interface resp. Error " +"handling is done in the same way as defined for the stream readers and " +"writers." +msgstr "" + +#: ../../library/codecs.rst:909 +msgid "" +":class:`StreamReaderWriter` instances define the combined interfaces of :" +"class:`StreamReader` and :class:`StreamWriter` classes. They inherit all " +"other methods and attributes from the underlying stream." +msgstr "" + +#: ../../library/codecs.rst:917 +msgid "StreamRecoder Objects" +msgstr "" + +#: ../../library/codecs.rst:919 +msgid "" +"The :class:`StreamRecoder` translates data from one encoding to another, " +"which is sometimes useful when dealing with different encoding environments." +msgstr "" + +#: ../../library/codecs.rst:928 +msgid "" +"Creates a :class:`StreamRecoder` instance which implements a two-way " +"conversion: *encode* and *decode* work on the frontend — the data visible to " +"code calling :meth:`~StreamReader.read` and :meth:`~StreamWriter.write`, " +"while *Reader* and *Writer* work on the backend — the data in *stream*." +msgstr "" + +#: ../../library/codecs.rst:934 +msgid "" +"You can use these objects to do transparent transcodings, e.g., from Latin-1 " +"to UTF-8 and back." +msgstr "" + +#: ../../library/codecs.rst:937 +msgid "The *stream* argument must be a file-like object." +msgstr "" + +#: ../../library/codecs.rst:939 +msgid "" +"The *encode* and *decode* arguments must adhere to the :class:`Codec` " +"interface. *Reader* and *Writer* must be factory functions or classes " +"providing objects of the :class:`StreamReader` and :class:`StreamWriter` " +"interface respectively." +msgstr "" + +#: ../../library/codecs.rst:944 +msgid "" +"Error handling is done in the same way as defined for the stream readers and " +"writers." +msgstr "" + +#: ../../library/codecs.rst:948 +msgid "" +":class:`StreamRecoder` instances define the combined interfaces of :class:" +"`StreamReader` and :class:`StreamWriter` classes. They inherit all other " +"methods and attributes from the underlying stream." +msgstr "" + +#: ../../library/codecs.rst:956 +msgid "Encodings and Unicode" +msgstr "" + +#: ../../library/codecs.rst:958 +msgid "" +"Strings are stored internally as sequences of code points in range " +"``U+0000``--``U+10FFFF``. (See :pep:`393` for more details about the " +"implementation.) Once a string object is used outside of CPU and memory, " +"endianness and how these arrays are stored as bytes become an issue. As with " +"other codecs, serialising a string into a sequence of bytes is known as " +"*encoding*, and recreating the string from the sequence of bytes is known as " +"*decoding*. There are a variety of different text serialisation codecs, " +"which are collectivity referred to as :term:`text encodings `." +msgstr "" + +#: ../../library/codecs.rst:968 +msgid "" +"The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps " +"the code points 0--255 to the bytes ``0x0``--``0xff``, which means that a " +"string object that contains code points above ``U+00FF`` can't be encoded " +"with this codec. Doing so will raise a :exc:`UnicodeEncodeError` that looks " +"like the following (although the details of the error message may differ): " +"``UnicodeEncodeError: 'latin-1' codec can't encode character '\\u1234' in " +"position 3: ordinal not in range(256)``." +msgstr "" + +#: ../../library/codecs.rst:976 +msgid "" +"There's another group of encodings (the so called charmap encodings) that " +"choose a different subset of all Unicode code points and how these code " +"points are mapped to the bytes ``0x0``--``0xff``. To see how this is done " +"simply open e.g. :file:`encodings/cp1252.py` (which is an encoding that is " +"used primarily on Windows). There's a string constant with 256 characters " +"that shows you which character is mapped to which byte value." +msgstr "" + +#: ../../library/codecs.rst:983 +msgid "" +"All of these encodings can only encode 256 of the 1114112 code points " +"defined in Unicode. A simple and straightforward way that can store each " +"Unicode code point, is to store each code point as four consecutive bytes. " +"There are two possibilities: store the bytes in big endian or in little " +"endian order. These two encodings are called ``UTF-32-BE`` and ``UTF-32-LE`` " +"respectively. Their disadvantage is that if, for example, you use ``UTF-32-" +"BE`` on a little endian machine you will always have to swap bytes on " +"encoding and decoding. Python's ``UTF-16`` and ``UTF-32`` codecs avoid this " +"problem by using the platform's native byte order when no BOM is present. " +"Python follows prevailing platform practice, so native-endian data round-" +"trips without redundant byte swapping, even though the Unicode Standard " +"defaults to big-endian when the byte order is unspecified. When these bytes " +"are read by a CPU with a different endianness, the bytes have to be swapped. " +"To be able to detect the endianness of a ``UTF-16`` or ``UTF-32`` byte " +"sequence, a BOM (\"Byte Order Mark\") is used. This is the Unicode character " +"``U+FEFF``. This character can be prepended to every ``UTF-16`` or " +"``UTF-32`` byte sequence. The byte swapped version of this character " +"(``0xFFFE``) is an illegal character that may not appear in a Unicode text. " +"When the first character of a ``UTF-16`` or ``UTF-32`` byte sequence is " +"``U+FFFE``, the bytes have to be swapped on decoding." +msgstr "" + +#: ../../library/codecs.rst:1004 +msgid "" +"Unfortunately the character ``U+FEFF`` had a second purpose as a ``ZERO " +"WIDTH NO-BREAK SPACE``: a character that has no width and doesn't allow a " +"word to be split. It can e.g. be used to give hints to a ligature algorithm. " +"With Unicode 4.0 using ``U+FEFF`` as a ``ZERO WIDTH NO-BREAK SPACE`` has " +"been deprecated (with ``U+2060`` (``WORD JOINER``) assuming this role). " +"Nevertheless Unicode software still must be able to handle ``U+FEFF`` in " +"both roles: as a BOM it's a device to determine the storage layout of the " +"encoded bytes, and vanishes once the byte sequence has been decoded into a " +"string; as a ``ZERO WIDTH NO-BREAK SPACE`` it's a normal character that will " +"be decoded like any other." +msgstr "" + +#: ../../library/codecs.rst:1014 +msgid "" +"There's another encoding that is able to encode the full range of Unicode " +"characters: UTF-8. UTF-8 is an 8-bit encoding, which means there are no " +"issues with byte order in UTF-8. Each byte in a UTF-8 byte sequence consists " +"of two parts: marker bits (the most significant bits) and payload bits. The " +"marker bits are a sequence of zero to four ``1`` bits followed by a ``0`` " +"bit. Unicode characters are encoded like this (with x being payload bits, " +"which when concatenated give the Unicode character):" +msgstr "" + +#: ../../library/codecs.rst:1023 +msgid "Range" +msgstr "" + +#: ../../library/codecs.rst:1023 +msgid "Encoding" +msgstr "" + +#: ../../library/codecs.rst:1025 +msgid "``U-00000000`` ... ``U-0000007F``" +msgstr "" + +#: ../../library/codecs.rst:1025 +msgid "0xxxxxxx" +msgstr "" + +#: ../../library/codecs.rst:1027 +msgid "``U-00000080`` ... ``U-000007FF``" +msgstr "" + +#: ../../library/codecs.rst:1027 +msgid "110xxxxx 10xxxxxx" +msgstr "" + +#: ../../library/codecs.rst:1029 +msgid "``U-00000800`` ... ``U-0000FFFF``" +msgstr "" + +#: ../../library/codecs.rst:1029 +msgid "1110xxxx 10xxxxxx 10xxxxxx" +msgstr "" + +#: ../../library/codecs.rst:1031 +msgid "``U-00010000`` ... ``U-0010FFFF``" +msgstr "" + +#: ../../library/codecs.rst:1031 +msgid "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" +msgstr "" + +#: ../../library/codecs.rst:1034 +msgid "" +"The least significant bit of the Unicode character is the rightmost x bit." +msgstr "" + +#: ../../library/codecs.rst:1036 +msgid "" +"As UTF-8 is an 8-bit encoding no BOM is required and any ``U+FEFF`` " +"character in the decoded string (even if it's the first character) is " +"treated as a ``ZERO WIDTH NO-BREAK SPACE``." +msgstr "" + +#: ../../library/codecs.rst:1040 +msgid "" +"Without external information it's impossible to reliably determine which " +"encoding was used for encoding a string. Each charmap encoding can decode " +"any random byte sequence. However that's not possible with UTF-8, as UTF-8 " +"byte sequences have a structure that doesn't allow arbitrary byte sequences. " +"To increase the reliability with which a UTF-8 encoding can be detected, " +"Microsoft invented a variant of UTF-8 (that Python calls ``\"utf-8-sig\"``) " +"for its Notepad program: Before any of the Unicode characters is written to " +"the file, a UTF-8 encoded BOM (which looks like this as a byte sequence: " +"``0xef``, ``0xbb``, ``0xbf``) is written. As it's rather improbable that any " +"charmap encoded file starts with these byte values (which would e.g. map to" +msgstr "" + +#: ../../library/codecs.rst:0 +msgid "LATIN SMALL LETTER I WITH DIAERESIS" +msgstr "" + +#: ../../library/codecs.rst:0 +msgid "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK" +msgstr "" + +#: ../../library/codecs.rst:0 +msgid "INVERTED QUESTION MARK" +msgstr "" + +#: ../../library/codecs.rst:1056 +msgid "" +"in iso-8859-1), this increases the probability that a ``utf-8-sig`` encoding " +"can be correctly guessed from the byte sequence. So here the BOM is not used " +"to be able to determine the byte order used for generating the byte " +"sequence, but as a signature that helps in guessing the encoding. On " +"encoding the utf-8-sig codec will write ``0xef``, ``0xbb``, ``0xbf`` as the " +"first three bytes to the file. On decoding ``utf-8-sig`` will skip those " +"three bytes if they appear as the first three bytes in the file. In UTF-8, " +"the use of the BOM is discouraged and should generally be avoided." +msgstr "" + +#: ../../library/codecs.rst:1069 +msgid "Standard Encodings" +msgstr "" + +#: ../../library/codecs.rst:1071 +msgid "" +"Python comes with a number of codecs built-in, either implemented as C " +"functions or with dictionaries as mapping tables. The following table lists " +"the codecs by name, together with a few common aliases, and the languages " +"for which the encoding is likely used. Neither the list of aliases nor the " +"list of languages is meant to be exhaustive. Notice that spelling " +"alternatives that only differ in case or use a space or a hyphen instead of " +"an underscore are also valid aliases because they are equivalent when " +"normalized by :func:`~encodings.normalize_encoding`. For example, " +"``'utf-8'`` is a valid alias for the ``'utf_8'`` codec." +msgstr "" + +#: ../../library/codecs.rst:1083 +msgid "" +"The below table lists the most common aliases, for a complete list refer to " +"the source :source:`aliases.py ` file." +msgstr "" + +#: ../../library/codecs.rst:1086 +msgid "" +"On Windows, ``cpXXX`` codecs are available for all code pages. But only " +"codecs listed in the following table are guaranteed to exist on other " +"platforms." +msgstr "" + +#: ../../library/codecs.rst:1092 +msgid "" +"Some common encodings can bypass the codecs lookup machinery to improve " +"performance. These optimization opportunities are only recognized by CPython " +"for a limited set of (case insensitive) aliases: utf-8, utf8, latin-1, " +"latin1, iso-8859-1, iso8859-1, mbcs (Windows only), ascii, us-ascii, utf-16, " +"utf16, utf-32, utf32, and the same using underscores instead of dashes. " +"Using alternative aliases for these encodings may result in slower execution." +msgstr "" + +#: ../../library/codecs.rst:1100 +msgid "Optimization opportunity recognized for us-ascii." +msgstr "" + +#: ../../library/codecs.rst:1103 +msgid "" +"Many of the character sets support the same languages. They vary in " +"individual characters (e.g. whether the EURO SIGN is supported or not), and " +"in the assignment of characters to code positions. For the European " +"languages in particular, the following variants typically exist:" +msgstr "" + +#: ../../library/codecs.rst:1108 +msgid "an ISO 8859 codeset" +msgstr "" + +#: ../../library/codecs.rst:1110 +msgid "" +"a Microsoft Windows code page, which is typically derived from an 8859 " +"codeset, but replaces control characters with additional graphic characters" +msgstr "" + +#: ../../library/codecs.rst:1113 +msgid "an IBM EBCDIC code page" +msgstr "" + +#: ../../library/codecs.rst:1115 +msgid "an IBM PC code page, which is ASCII compatible" +msgstr "" + +#: ../../library/codecs.rst:1120 ../../library/codecs.rst:1379 +#: ../../library/codecs.rst:1459 ../../library/codecs.rst:1544 +msgid "Codec" +msgstr "" + +#: ../../library/codecs.rst:1120 ../../library/codecs.rst:1379 +#: ../../library/codecs.rst:1459 ../../library/codecs.rst:1544 +msgid "Aliases" +msgstr "" + +#: ../../library/codecs.rst:1120 +msgid "Languages" +msgstr "" + +#: ../../library/codecs.rst:1122 +msgid "ascii" +msgstr "" + +#: ../../library/codecs.rst:1122 +msgid "646, us-ascii" +msgstr "" + +#: ../../library/codecs.rst:1122 ../../library/codecs.rst:1128 +#: ../../library/codecs.rst:1136 +msgid "English" +msgstr "" + +#: ../../library/codecs.rst:1124 +msgid "big5" +msgstr "" + +#: ../../library/codecs.rst:1124 +msgid "big5-tw, csbig5" +msgstr "" + +#: ../../library/codecs.rst:1124 ../../library/codecs.rst:1126 +#: ../../library/codecs.rst:1185 +msgid "Traditional Chinese" +msgstr "" + +#: ../../library/codecs.rst:1126 +msgid "big5hkscs" +msgstr "" + +#: ../../library/codecs.rst:1126 +msgid "big5-hkscs, hkscs" +msgstr "" + +#: ../../library/codecs.rst:1128 +msgid "cp037" +msgstr "" + +#: ../../library/codecs.rst:1128 +msgid "IBM037, IBM039" +msgstr "" + +#: ../../library/codecs.rst:1130 +msgid "cp273" +msgstr "" + +#: ../../library/codecs.rst:1130 +msgid "273, IBM273, csIBM273" +msgstr "" + +#: ../../library/codecs.rst:1130 +msgid "German" +msgstr "" + +#: ../../library/codecs.rst:1134 +msgid "cp424" +msgstr "" + +#: ../../library/codecs.rst:1134 +msgid "EBCDIC-CP-HE, IBM424" +msgstr "" + +#: ../../library/codecs.rst:1134 ../../library/codecs.rst:1154 +#: ../../library/codecs.rst:1164 ../../library/codecs.rst:1208 +#: ../../library/codecs.rst:1271 +msgid "Hebrew" +msgstr "" + +#: ../../library/codecs.rst:1136 +msgid "cp437" +msgstr "" + +#: ../../library/codecs.rst:1136 +msgid "437, IBM437" +msgstr "" + +#: ../../library/codecs.rst:1138 +msgid "cp500" +msgstr "" + +#: ../../library/codecs.rst:1138 +msgid "EBCDIC-CP-BE, EBCDIC-CP-CH, IBM500" +msgstr "" + +#: ../../library/codecs.rst:1138 ../../library/codecs.rst:1147 +#: ../../library/codecs.rst:1158 ../../library/codecs.rst:1195 +#: ../../library/codecs.rst:1202 ../../library/codecs.rst:1255 +#: ../../library/codecs.rst:1283 ../../library/codecs.rst:1311 +msgid "Western Europe" +msgstr "" + +#: ../../library/codecs.rst:1141 +msgid "cp720" +msgstr "" + +#: ../../library/codecs.rst:1141 ../../library/codecs.rst:1168 +#: ../../library/codecs.rst:1210 ../../library/codecs.rst:1267 +msgid "Arabic" +msgstr "" + +#: ../../library/codecs.rst:1143 +msgid "cp737" +msgstr "" + +#: ../../library/codecs.rst:1143 ../../library/codecs.rst:1174 +#: ../../library/codecs.rst:1178 ../../library/codecs.rst:1204 +#: ../../library/codecs.rst:1269 ../../library/codecs.rst:1304 +msgid "Greek" +msgstr "" + +#: ../../library/codecs.rst:1145 +msgid "cp775" +msgstr "" + +#: ../../library/codecs.rst:1145 +msgid "IBM775" +msgstr "" + +#: ../../library/codecs.rst:1145 ../../library/codecs.rst:1212 +#: ../../library/codecs.rst:1279 +msgid "Baltic languages" +msgstr "" + +#: ../../library/codecs.rst:1147 +msgid "cp850" +msgstr "" + +#: ../../library/codecs.rst:1147 +msgid "850, IBM850" +msgstr "" + +#: ../../library/codecs.rst:1149 +msgid "cp852" +msgstr "" + +#: ../../library/codecs.rst:1149 +msgid "852, IBM852" +msgstr "" + +#: ../../library/codecs.rst:1149 ../../library/codecs.rst:1197 +#: ../../library/codecs.rst:1258 ../../library/codecs.rst:1308 +msgid "Central and Eastern Europe" +msgstr "" + +#: ../../library/codecs.rst:1151 +msgid "cp855" +msgstr "" + +#: ../../library/codecs.rst:1151 +msgid "855, IBM855" +msgstr "" + +#: ../../library/codecs.rst:1151 ../../library/codecs.rst:1199 +#: ../../library/codecs.rst:1264 ../../library/codecs.rst:1301 +msgid "Belarusian, Bulgarian, Macedonian, Russian, Serbian" +msgstr "" + +#: ../../library/codecs.rst:1154 +msgid "cp856" +msgstr "" + +#: ../../library/codecs.rst:1156 +msgid "cp857" +msgstr "" + +#: ../../library/codecs.rst:1156 +msgid "857, IBM857" +msgstr "" + +#: ../../library/codecs.rst:1156 ../../library/codecs.rst:1189 +#: ../../library/codecs.rst:1206 ../../library/codecs.rst:1273 +#: ../../library/codecs.rst:1313 +msgid "Turkish" +msgstr "" + +#: ../../library/codecs.rst:1158 +msgid "cp858" +msgstr "" + +#: ../../library/codecs.rst:1158 +msgid "858, IBM00858" +msgstr "" + +#: ../../library/codecs.rst:1160 +msgid "cp860" +msgstr "" + +#: ../../library/codecs.rst:1160 +msgid "860, IBM860" +msgstr "" + +#: ../../library/codecs.rst:1160 +msgid "Portuguese" +msgstr "" + +#: ../../library/codecs.rst:1162 +msgid "cp861" +msgstr "" + +#: ../../library/codecs.rst:1162 +msgid "861, CP-IS, IBM861" +msgstr "" + +#: ../../library/codecs.rst:1162 ../../library/codecs.rst:1306 +msgid "Icelandic" +msgstr "" + +#: ../../library/codecs.rst:1164 +msgid "cp862" +msgstr "" + +#: ../../library/codecs.rst:1164 +msgid "862, IBM862" +msgstr "" + +#: ../../library/codecs.rst:1166 +msgid "cp863" +msgstr "" + +#: ../../library/codecs.rst:1166 +msgid "863, IBM863" +msgstr "" + +#: ../../library/codecs.rst:1166 +msgid "Canadian" +msgstr "" + +#: ../../library/codecs.rst:1168 +msgid "cp864" +msgstr "" + +#: ../../library/codecs.rst:1168 +msgid "IBM864" +msgstr "" + +#: ../../library/codecs.rst:1170 +msgid "cp865" +msgstr "" + +#: ../../library/codecs.rst:1170 +msgid "865, IBM865" +msgstr "" + +#: ../../library/codecs.rst:1170 +msgid "Danish, Norwegian" +msgstr "" + +#: ../../library/codecs.rst:1172 +msgid "cp866" +msgstr "" + +#: ../../library/codecs.rst:1172 +msgid "866, IBM866" +msgstr "" + +#: ../../library/codecs.rst:1172 ../../library/codecs.rst:1289 +msgid "Russian" +msgstr "" + +#: ../../library/codecs.rst:1174 +msgid "cp869" +msgstr "" + +#: ../../library/codecs.rst:1174 +msgid "869, CP-GR, IBM869" +msgstr "" + +#: ../../library/codecs.rst:1176 +msgid "cp874" +msgstr "" + +#: ../../library/codecs.rst:1176 +msgid "Thai" +msgstr "" + +#: ../../library/codecs.rst:1178 +msgid "cp875" +msgstr "" + +#: ../../library/codecs.rst:1180 +msgid "cp932" +msgstr "" + +#: ../../library/codecs.rst:1180 +msgid "932, ms932, mskanji, ms-kanji, windows-31j" +msgstr "" + +#: ../../library/codecs.rst:1180 ../../library/codecs.rst:1216 +#: ../../library/codecs.rst:1218 ../../library/codecs.rst:1220 +#: ../../library/codecs.rst:1237 ../../library/codecs.rst:1240 +#: ../../library/codecs.rst:1245 ../../library/codecs.rst:1248 +#: ../../library/codecs.rst:1250 ../../library/codecs.rst:1318 +#: ../../library/codecs.rst:1321 ../../library/codecs.rst:1324 +msgid "Japanese" +msgstr "" + +#: ../../library/codecs.rst:1183 +msgid "cp949" +msgstr "" + +#: ../../library/codecs.rst:1183 +msgid "949, ms949, uhc" +msgstr "" + +#: ../../library/codecs.rst:1183 ../../library/codecs.rst:1222 +#: ../../library/codecs.rst:1252 ../../library/codecs.rst:1287 +msgid "Korean" +msgstr "" + +#: ../../library/codecs.rst:1185 +msgid "cp950" +msgstr "" + +#: ../../library/codecs.rst:1185 +msgid "950, ms950" +msgstr "" + +#: ../../library/codecs.rst:1187 +msgid "cp1006" +msgstr "" + +#: ../../library/codecs.rst:1187 +msgid "Urdu" +msgstr "" + +#: ../../library/codecs.rst:1189 +msgid "cp1026" +msgstr "" + +#: ../../library/codecs.rst:1189 +msgid "ibm1026" +msgstr "" + +#: ../../library/codecs.rst:1191 +msgid "cp1125" +msgstr "" + +#: ../../library/codecs.rst:1191 +msgid "1125, ibm1125, cp866u, ruscii" +msgstr "" + +#: ../../library/codecs.rst:1191 ../../library/codecs.rst:1295 +msgid "Ukrainian" +msgstr "" + +#: ../../library/codecs.rst:1195 +msgid "cp1140" +msgstr "" + +#: ../../library/codecs.rst:1195 +msgid "IBM01140" +msgstr "" + +#: ../../library/codecs.rst:1197 +msgid "cp1250" +msgstr "" + +#: ../../library/codecs.rst:1197 +msgid "windows-1250" +msgstr "" + +#: ../../library/codecs.rst:1199 +msgid "cp1251" +msgstr "" + +#: ../../library/codecs.rst:1199 +msgid "windows-1251" +msgstr "" + +#: ../../library/codecs.rst:1202 +msgid "cp1252" +msgstr "" + +#: ../../library/codecs.rst:1202 +msgid "windows-1252" +msgstr "" + +#: ../../library/codecs.rst:1204 +msgid "cp1253" +msgstr "" + +#: ../../library/codecs.rst:1204 +msgid "windows-1253" +msgstr "" + +#: ../../library/codecs.rst:1206 +msgid "cp1254" +msgstr "" + +#: ../../library/codecs.rst:1206 +msgid "windows-1254" +msgstr "" + +#: ../../library/codecs.rst:1208 +msgid "cp1255" +msgstr "" + +#: ../../library/codecs.rst:1208 +msgid "windows-1255" +msgstr "" + +#: ../../library/codecs.rst:1210 +msgid "cp1256" +msgstr "" + +#: ../../library/codecs.rst:1210 +msgid "windows-1256" +msgstr "" + +#: ../../library/codecs.rst:1212 +msgid "cp1257" +msgstr "" + +#: ../../library/codecs.rst:1212 +msgid "windows-1257" +msgstr "" + +#: ../../library/codecs.rst:1214 +msgid "cp1258" +msgstr "" + +#: ../../library/codecs.rst:1214 +msgid "windows-1258" +msgstr "" + +#: ../../library/codecs.rst:1214 +msgid "Vietnamese" +msgstr "" + +#: ../../library/codecs.rst:1216 +msgid "euc_jp" +msgstr "" + +#: ../../library/codecs.rst:1216 +msgid "eucjp, ujis, u-jis" +msgstr "" + +#: ../../library/codecs.rst:1218 +msgid "euc_jis_2004" +msgstr "" + +#: ../../library/codecs.rst:1218 +msgid "jisx0213, eucjis2004" +msgstr "" + +#: ../../library/codecs.rst:1220 +msgid "euc_jisx0213" +msgstr "" + +#: ../../library/codecs.rst:1220 +msgid "eucjisx0213" +msgstr "" + +#: ../../library/codecs.rst:1222 +msgid "euc_kr" +msgstr "" + +#: ../../library/codecs.rst:1222 +msgid "euckr, korean, ksc5601, ks_c-5601, ks_c-5601-1987, ksx1001, ks_x-1001" +msgstr "" + +#: ../../library/codecs.rst:1226 +msgid "gb2312" +msgstr "" + +#: ../../library/codecs.rst:1226 +msgid "" +"chinese, csiso58gb231280, euc-cn, euccn, eucgb2312-cn, gb2312-1980, " +"gb2312-80, iso-ir-58" +msgstr "" + +#: ../../library/codecs.rst:1226 ../../library/codecs.rst:1235 +msgid "Simplified Chinese" +msgstr "" + +#: ../../library/codecs.rst:1231 +msgid "gbk" +msgstr "" + +#: ../../library/codecs.rst:1231 +msgid "936, cp936, ms936" +msgstr "" + +#: ../../library/codecs.rst:1231 ../../library/codecs.rst:1233 +msgid "Unified Chinese" +msgstr "" + +#: ../../library/codecs.rst:1233 +msgid "gb18030" +msgstr "" + +#: ../../library/codecs.rst:1233 +msgid "gb18030-2000" +msgstr "" + +#: ../../library/codecs.rst:1235 +msgid "hz" +msgstr "" + +#: ../../library/codecs.rst:1235 +msgid "hzgb, hz-gb, hz-gb-2312" +msgstr "" + +#: ../../library/codecs.rst:1237 +msgid "iso2022_jp" +msgstr "" + +#: ../../library/codecs.rst:1237 +msgid "csiso2022jp, iso2022jp, iso-2022-jp" +msgstr "" + +#: ../../library/codecs.rst:1240 +msgid "iso2022_jp_1" +msgstr "" + +#: ../../library/codecs.rst:1240 +msgid "iso2022jp-1, iso-2022-jp-1" +msgstr "" + +#: ../../library/codecs.rst:1242 +msgid "iso2022_jp_2" +msgstr "" + +#: ../../library/codecs.rst:1242 +msgid "iso2022jp-2, iso-2022-jp-2" +msgstr "" + +#: ../../library/codecs.rst:1242 +msgid "Japanese, Korean, Simplified Chinese, Western Europe, Greek" +msgstr "" + +#: ../../library/codecs.rst:1245 +msgid "iso2022_jp_2004" +msgstr "" + +#: ../../library/codecs.rst:1245 +msgid "iso2022jp-2004, iso-2022-jp-2004" +msgstr "" + +#: ../../library/codecs.rst:1248 +msgid "iso2022_jp_3" +msgstr "" + +#: ../../library/codecs.rst:1248 +msgid "iso2022jp-3, iso-2022-jp-3" +msgstr "" + +#: ../../library/codecs.rst:1250 +msgid "iso2022_jp_ext" +msgstr "" + +#: ../../library/codecs.rst:1250 +msgid "iso2022jp-ext, iso-2022-jp-ext" +msgstr "" + +#: ../../library/codecs.rst:1252 +msgid "iso2022_kr" +msgstr "" + +#: ../../library/codecs.rst:1252 +msgid "csiso2022kr, iso2022kr, iso-2022-kr" +msgstr "" + +#: ../../library/codecs.rst:1255 +msgid "latin_1" +msgstr "" + +#: ../../library/codecs.rst:1255 +msgid "iso-8859-1, iso8859-1, 8859, cp819, latin, latin1, L1" +msgstr "" + +#: ../../library/codecs.rst:1258 +msgid "iso8859_2" +msgstr "" + +#: ../../library/codecs.rst:1258 +msgid "iso-8859-2, latin2, L2" +msgstr "" + +#: ../../library/codecs.rst:1260 +msgid "iso8859_3" +msgstr "" + +#: ../../library/codecs.rst:1260 +msgid "iso-8859-3, latin3, L3" +msgstr "" + +#: ../../library/codecs.rst:1260 +msgid "Esperanto, Maltese" +msgstr "" + +#: ../../library/codecs.rst:1262 +msgid "iso8859_4" +msgstr "" + +#: ../../library/codecs.rst:1262 +msgid "iso-8859-4, latin4, L4" +msgstr "" + +#: ../../library/codecs.rst:1262 +msgid "Northern Europe" +msgstr "" + +#: ../../library/codecs.rst:1264 +msgid "iso8859_5" +msgstr "" + +#: ../../library/codecs.rst:1264 +msgid "iso-8859-5, cyrillic" +msgstr "" + +#: ../../library/codecs.rst:1267 +msgid "iso8859_6" +msgstr "" + +#: ../../library/codecs.rst:1267 +msgid "iso-8859-6, arabic" +msgstr "" + +#: ../../library/codecs.rst:1269 +msgid "iso8859_7" +msgstr "" + +#: ../../library/codecs.rst:1269 +msgid "iso-8859-7, greek, greek8" +msgstr "" + +#: ../../library/codecs.rst:1271 +msgid "iso8859_8" +msgstr "" + +#: ../../library/codecs.rst:1271 +msgid "iso-8859-8, hebrew" +msgstr "" + +#: ../../library/codecs.rst:1273 +msgid "iso8859_9" +msgstr "" + +#: ../../library/codecs.rst:1273 +msgid "iso-8859-9, latin5, L5" +msgstr "" + +#: ../../library/codecs.rst:1275 +msgid "iso8859_10" +msgstr "" + +#: ../../library/codecs.rst:1275 +msgid "iso-8859-10, latin6, L6" +msgstr "" + +#: ../../library/codecs.rst:1275 +msgid "Nordic languages" +msgstr "" + +#: ../../library/codecs.rst:1277 +msgid "iso8859_11" +msgstr "" + +#: ../../library/codecs.rst:1277 +msgid "iso-8859-11, thai" +msgstr "" + +#: ../../library/codecs.rst:1277 +msgid "Thai languages" +msgstr "" + +#: ../../library/codecs.rst:1279 +msgid "iso8859_13" +msgstr "" + +#: ../../library/codecs.rst:1279 +msgid "iso-8859-13, latin7, L7" +msgstr "" + +#: ../../library/codecs.rst:1281 +msgid "iso8859_14" +msgstr "" + +#: ../../library/codecs.rst:1281 +msgid "iso-8859-14, latin8, L8" +msgstr "" + +#: ../../library/codecs.rst:1281 +msgid "Celtic languages" +msgstr "" + +#: ../../library/codecs.rst:1283 +msgid "iso8859_15" +msgstr "" + +#: ../../library/codecs.rst:1283 +msgid "iso-8859-15, latin9, L9" +msgstr "" + +#: ../../library/codecs.rst:1285 +msgid "iso8859_16" +msgstr "" + +#: ../../library/codecs.rst:1285 +msgid "iso-8859-16, latin10, L10" +msgstr "" + +#: ../../library/codecs.rst:1285 +msgid "South-Eastern Europe" +msgstr "" + +#: ../../library/codecs.rst:1287 +msgid "johab" +msgstr "" + +#: ../../library/codecs.rst:1287 +msgid "cp1361, ms1361" +msgstr "" + +#: ../../library/codecs.rst:1289 +msgid "koi8_r" +msgstr "" + +#: ../../library/codecs.rst:1291 +msgid "koi8_t" +msgstr "" + +#: ../../library/codecs.rst:1291 +msgid "Tajik" +msgstr "" + +#: ../../library/codecs.rst:1295 +msgid "koi8_u" +msgstr "" + +#: ../../library/codecs.rst:1297 +msgid "kz1048" +msgstr "" + +#: ../../library/codecs.rst:1297 +msgid "kz_1048, strk1048_2002, rk1048" +msgstr "" + +#: ../../library/codecs.rst:1297 ../../library/codecs.rst:1315 +msgid "Kazakh" +msgstr "" + +#: ../../library/codecs.rst:1301 +msgid "mac_cyrillic" +msgstr "" + +#: ../../library/codecs.rst:1301 +msgid "maccyrillic" +msgstr "" + +#: ../../library/codecs.rst:1304 +msgid "mac_greek" +msgstr "" + +#: ../../library/codecs.rst:1304 +msgid "macgreek" +msgstr "" + +#: ../../library/codecs.rst:1306 +msgid "mac_iceland" +msgstr "" + +#: ../../library/codecs.rst:1306 +msgid "maciceland" +msgstr "" + +#: ../../library/codecs.rst:1308 +msgid "mac_latin2" +msgstr "" + +#: ../../library/codecs.rst:1308 +msgid "maclatin2, maccentraleurope, mac_centeuro" +msgstr "" + +#: ../../library/codecs.rst:1311 +msgid "mac_roman" +msgstr "" + +#: ../../library/codecs.rst:1311 +msgid "macroman, macintosh" +msgstr "" + +#: ../../library/codecs.rst:1313 +msgid "mac_turkish" +msgstr "" + +#: ../../library/codecs.rst:1313 +msgid "macturkish" +msgstr "" + +#: ../../library/codecs.rst:1315 +msgid "ptcp154" +msgstr "" + +#: ../../library/codecs.rst:1315 +msgid "csptcp154, pt154, cp154, cyrillic-asian" +msgstr "" + +#: ../../library/codecs.rst:1318 +msgid "shift_jis" +msgstr "" + +#: ../../library/codecs.rst:1318 +msgid "csshiftjis, shiftjis, sjis, s_jis" +msgstr "" + +#: ../../library/codecs.rst:1321 +msgid "shift_jis_2004" +msgstr "" + +#: ../../library/codecs.rst:1321 +msgid "shiftjis2004, sjis_2004, sjis2004" +msgstr "" + +#: ../../library/codecs.rst:1324 +msgid "shift_jisx0213" +msgstr "" + +#: ../../library/codecs.rst:1324 +msgid "shiftjisx0213, sjisx0213, s_jisx0213" +msgstr "" + +#: ../../library/codecs.rst:1327 +msgid "utf_32" +msgstr "" + +#: ../../library/codecs.rst:1327 +msgid "U32, utf32" +msgstr "" + +#: ../../library/codecs.rst:1327 ../../library/codecs.rst:1329 +#: ../../library/codecs.rst:1331 ../../library/codecs.rst:1333 +#: ../../library/codecs.rst:1335 ../../library/codecs.rst:1337 +#: ../../library/codecs.rst:1339 ../../library/codecs.rst:1341 +#: ../../library/codecs.rst:1343 +msgid "all languages" +msgstr "" + +#: ../../library/codecs.rst:1329 +msgid "utf_32_be" +msgstr "" + +#: ../../library/codecs.rst:1329 +msgid "UTF-32BE" +msgstr "" + +#: ../../library/codecs.rst:1331 +msgid "utf_32_le" +msgstr "" + +#: ../../library/codecs.rst:1331 +msgid "UTF-32LE" +msgstr "" + +#: ../../library/codecs.rst:1333 +msgid "utf_16" +msgstr "" + +#: ../../library/codecs.rst:1333 +msgid "U16, utf16" +msgstr "" + +#: ../../library/codecs.rst:1335 +msgid "utf_16_be" +msgstr "" + +#: ../../library/codecs.rst:1335 +msgid "UTF-16BE" +msgstr "" + +#: ../../library/codecs.rst:1337 +msgid "utf_16_le" +msgstr "" + +#: ../../library/codecs.rst:1337 +msgid "UTF-16LE" +msgstr "" + +#: ../../library/codecs.rst:1339 +msgid "utf_7" +msgstr "" + +#: ../../library/codecs.rst:1339 +msgid "U7, unicode-1-1-utf-7" +msgstr "" + +#: ../../library/codecs.rst:1341 +msgid "utf_8" +msgstr "" + +#: ../../library/codecs.rst:1341 +msgid "U8, UTF, utf8, cp65001" +msgstr "" + +#: ../../library/codecs.rst:1343 +msgid "utf_8_sig" +msgstr "" + +#: ../../library/codecs.rst:1343 +msgid "utf8-sig" +msgstr "" + +#: ../../library/codecs.rst:1346 +msgid "" +"The utf-16\\* and utf-32\\* encoders no longer allow surrogate code points " +"(``U+D800``--``U+DFFF``) to be encoded. The utf-32\\* decoders no longer " +"decode byte sequences that correspond to surrogate code points." +msgstr "" + +#: ../../library/codecs.rst:1352 +msgid "``cp65001`` is now an alias to ``utf_8``." +msgstr "" + +#: ../../library/codecs.rst:1355 +msgid "On Windows, ``cpXXX`` codecs are now available for all code pages." +msgstr "" + +#: ../../library/codecs.rst:1360 +msgid "Python Specific Encodings" +msgstr "" + +#: ../../library/codecs.rst:1362 +msgid "" +"A number of predefined codecs are specific to Python, so their codec names " +"have no meaning outside Python. These are listed in the tables below based " +"on the expected input and output types (note that while text encodings are " +"the most common use case for codecs, the underlying codec infrastructure " +"supports arbitrary data transforms rather than just text encodings). For " +"asymmetric codecs, the stated meaning describes the encoding direction." +msgstr "" + +#: ../../library/codecs.rst:1370 +msgid "Text Encodings" +msgstr "" + +#: ../../library/codecs.rst:1372 +msgid "" +"The following codecs provide :class:`str` to :class:`bytes` encoding and :" +"term:`bytes-like object` to :class:`str` decoding, similar to the Unicode " +"text encodings." +msgstr "" + +#: ../../library/codecs.rst:1381 +msgid "idna" +msgstr "" + +#: ../../library/codecs.rst:1381 +msgid "" +"Implement :rfc:`3490`, see also :mod:`encodings.idna`. Only " +"``errors='strict'`` is supported." +msgstr "" + +#: ../../library/codecs.rst:1387 +msgid "mbcs" +msgstr "" + +#: ../../library/codecs.rst:1387 +msgid "ansi, dbcs" +msgstr "" + +#: ../../library/codecs.rst:1387 +msgid "" +"Windows only: Encode the operand according to the ANSI codepage (CP_ACP)." +msgstr "" + +#: ../../library/codecs.rst:1391 +msgid "oem" +msgstr "" + +#: ../../library/codecs.rst:1391 +msgid "" +"Windows only: Encode the operand according to the OEM codepage (CP_OEMCP)." +msgstr "" + +#: ../../library/codecs.rst:1397 +msgid "palmos" +msgstr "" + +#: ../../library/codecs.rst:1397 +msgid "Encoding of PalmOS 3.5." +msgstr "" + +#: ../../library/codecs.rst:1399 +msgid "punycode" +msgstr "" + +#: ../../library/codecs.rst:1399 +msgid "Implement :rfc:`3492`. Stateful codecs are not supported." +msgstr "" + +#: ../../library/codecs.rst:1405 +msgid "" +"The decoding and encoding algorithms scale poorly, so limit the length of " +"untrusted input." +msgstr "" + +#: ../../library/codecs.rst:1411 +msgid "raw_unicode_escape" +msgstr "" + +#: ../../library/codecs.rst:1411 +msgid "" +"Latin-1 encoding with :samp:`\\\\u{XXXX}` and :samp:`\\\\U{XXXXXXXX}` for " +"other code points. Existing backslashes are not escaped in any way. It is " +"used in the Python pickle protocol." +msgstr "" + +#: ../../library/codecs.rst:1421 +msgid "undefined" +msgstr "" + +#: ../../library/codecs.rst:1421 +msgid "This Codec should only be used for testing purposes." +msgstr "" + +#: ../../library/codecs.rst:1425 +msgid "" +"Raise an exception for all conversions, even empty strings. The error " +"handler is ignored." +msgstr "" + +#: ../../library/codecs.rst:1430 +msgid "unicode_escape" +msgstr "" + +#: ../../library/codecs.rst:1430 +msgid "" +"Encoding suitable as the contents of a Unicode literal in ASCII-encoded " +"Python source code, except that quotes are not escaped. Decode from Latin-1 " +"source code. Beware that Python source code actually uses UTF-8 by default." +msgstr "" + +#: ../../library/codecs.rst:1442 +msgid "\"unicode_internal\" codec is removed." +msgstr "" + +#: ../../library/codecs.rst:1449 +msgid "Binary Transforms" +msgstr "" + +#: ../../library/codecs.rst:1451 +msgid "" +"The following codecs provide binary transforms: :term:`bytes-like object` " +"to :class:`bytes` mappings. They are not supported by :meth:`bytes.decode` " +"(which only produces :class:`str` output)." +msgstr "" + +#: ../../library/codecs.rst:1459 +msgid "Encoder / decoder" +msgstr "" + +#: ../../library/codecs.rst:1461 +msgid "base64_codec [#b64]_" +msgstr "" + +#: ../../library/codecs.rst:1461 +msgid "base64, base_64" +msgstr "" + +#: ../../library/codecs.rst:1461 +msgid "" +"Convert the operand to multiline MIME base64 (the result always includes a " +"trailing ``'\\n'``)." +msgstr "" + +#: ../../library/codecs.rst:1466 +msgid "" +"accepts any :term:`bytes-like object` as input for encoding and decoding" +msgstr "" + +#: ../../library/codecs.rst:1461 +msgid ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" +msgstr "" + +#: ../../library/codecs.rst:1472 +msgid "bz2_codec" +msgstr "" + +#: ../../library/codecs.rst:1472 +msgid "bz2" +msgstr "" + +#: ../../library/codecs.rst:1472 +msgid "Compress the operand using bz2." +msgstr "" + +#: ../../library/codecs.rst:1472 +msgid ":meth:`bz2.compress` / :meth:`bz2.decompress`" +msgstr "" + +#: ../../library/codecs.rst:1475 +msgid "hex_codec" +msgstr "" + +#: ../../library/codecs.rst:1475 +msgid "hex" +msgstr "" + +#: ../../library/codecs.rst:1475 +msgid "" +"Convert the operand to hexadecimal representation, with two digits per byte." +msgstr "" + +#: ../../library/codecs.rst:1475 +msgid ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" +msgstr "" + +#: ../../library/codecs.rst:1480 +msgid "quopri_codec" +msgstr "" + +#: ../../library/codecs.rst:1480 +msgid "quopri, quotedprintable, quoted_printable" +msgstr "" + +#: ../../library/codecs.rst:1480 +msgid "Convert the operand to MIME quoted printable." +msgstr "" + +#: ../../library/codecs.rst:1480 +msgid ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" +msgstr "" + +#: ../../library/codecs.rst:1484 +msgid "uu_codec" +msgstr "" + +#: ../../library/codecs.rst:1484 +msgid "uu" +msgstr "" + +#: ../../library/codecs.rst:1484 +msgid "Convert the operand using uuencode." +msgstr "" + +#: ../../library/codecs.rst:1487 +msgid "zlib_codec" +msgstr "" + +#: ../../library/codecs.rst:1487 +msgid "zip, zlib" +msgstr "" + +#: ../../library/codecs.rst:1487 +msgid "Compress the operand using gzip." +msgstr "" + +#: ../../library/codecs.rst:1487 +msgid ":meth:`zlib.compress` / :meth:`zlib.decompress`" +msgstr "" + +#: ../../library/codecs.rst:1491 +msgid "" +"In addition to :term:`bytes-like objects `, " +"``'base64_codec'`` also accepts ASCII-only instances of :class:`str` for " +"decoding" +msgstr "" + +#: ../../library/codecs.rst:1495 +msgid "Restoration of the binary transforms." +msgstr "" + +#: ../../library/codecs.rst:1498 +msgid "Restoration of the aliases for the binary transforms." +msgstr "" + +#: ../../library/codecs.rst:1505 +msgid "Standalone Codec Functions" +msgstr "" + +#: ../../library/codecs.rst:1507 +msgid "" +"The following functions provide encoding and decoding functionality similar " +"to codecs, but are not available as named codecs through :func:`codecs." +"encode` or :func:`codecs.decode`. They are used internally (for example, by :" +"mod:`pickle`) and behave similarly to the ``string_escape`` codec that was " +"removed in Python 3." +msgstr "" + +#: ../../library/codecs.rst:1514 +msgid "" +"Encode *input* using escape sequences. Similar to how :func:`repr` on bytes " +"produces escaped byte values." +msgstr "" + +#: ../../library/codecs.rst:1517 +msgid "*input* must be a :class:`bytes` object." +msgstr "" + +#: ../../library/codecs.rst:1519 ../../library/codecs.rst:1528 +msgid "" +"Returns a tuple ``(output, length)`` where *output* is a :class:`bytes` " +"object and *length* is the number of bytes consumed." +msgstr "" + +#: ../../library/codecs.rst:1524 +msgid "Decode *input* from escape sequences back to the original bytes." +msgstr "" + +#: ../../library/codecs.rst:1526 +msgid "*input* must be a :term:`bytes-like object`." +msgstr "" + +#: ../../library/codecs.rst:1535 +msgid "Text Transforms" +msgstr "" + +#: ../../library/codecs.rst:1537 +msgid "" +"The following codec provides a text transform: a :class:`str` to :class:" +"`str` mapping. It is not supported by :meth:`str.encode` (which only " +"produces :class:`bytes` output)." +msgstr "" + +#: ../../library/codecs.rst:1546 +msgid "rot_13" +msgstr "" + +#: ../../library/codecs.rst:1546 +msgid "rot13" +msgstr "" + +#: ../../library/codecs.rst:1546 +msgid "Return the Caesar-cypher encryption of the operand." +msgstr "" + +#: ../../library/codecs.rst:1551 +msgid "Restoration of the ``rot_13`` text transform." +msgstr "" + +#: ../../library/codecs.rst:1554 +msgid "Restoration of the ``rot13`` alias." +msgstr "" + +#: ../../library/codecs.rst:1559 +msgid ":mod:`!encodings` --- Encodings package" +msgstr "" + +#: ../../library/codecs.rst:1564 +msgid "This module implements the following functions:" +msgstr "" + +#: ../../library/codecs.rst:1568 +msgid "Normalize encoding name *encoding*." +msgstr "" + +#: ../../library/codecs.rst:1570 +msgid "" +"Normalization works as follows: all non-alphanumeric characters except the " +"dot used for Python package names are collapsed and replaced with a single " +"underscore, leading and trailing underscores are removed. For example, ``' " +"-;#'`` becomes ``'_'``." +msgstr "" + +#: ../../library/codecs.rst:1575 +msgid "Note that *encoding* should be ASCII only." +msgstr "" + +#: ../../library/codecs.rst:1579 +msgid "" +"The following functions should not be used directly, except for testing " +"purposes; :func:`codecs.lookup` should be used instead." +msgstr "" + +#: ../../library/codecs.rst:1585 +msgid "" +"Search for the codec module corresponding to the given encoding name " +"*encoding*." +msgstr "" + +#: ../../library/codecs.rst:1588 +msgid "" +"This function first normalizes the *encoding* using :func:" +"`normalize_encoding`, then looks for a corresponding alias. It attempts to " +"import a codec module from the encodings package using either the alias or " +"the normalized name. If the module is found and defines a valid " +"``getregentry()`` function that returns a :class:`codecs.CodecInfo` object, " +"the codec is cached and returned." +msgstr "" + +#: ../../library/codecs.rst:1595 +msgid "" +"If the codec module defines a ``getaliases()`` function any returned aliases " +"are registered for future use." +msgstr "" + +#: ../../library/codecs.rst:1601 +msgid "" +"Search for a Windows code page encoding *encoding* of the form ``cpXXXX``." +msgstr "" + +#: ../../library/codecs.rst:1603 +msgid "" +"If the code page is valid and supported, return a :class:`codecs.CodecInfo` " +"object for it." +msgstr "" + +#: ../../library/codecs.rst:1606 ../../library/codecs.rst:1691 +msgid "Availability" +msgstr "" + +#: ../../library/codecs.rst:1611 +msgid "This module implements the following exception:" +msgstr "" + +#: ../../library/codecs.rst:1615 +msgid "Raised when a codec is invalid or incompatible." +msgstr "" + +#: ../../library/codecs.rst:1619 +msgid "" +":mod:`!encodings.idna` --- Internationalized Domain Names in Applications" +msgstr "" + +#: ../../library/codecs.rst:1624 +msgid "" +"This module implements :rfc:`3490` (Internationalized Domain Names in " +"Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for " +"Internationalized Domain Names (IDN)). It builds upon the ``punycode`` " +"encoding and :mod:`stringprep`." +msgstr "" + +#: ../../library/codecs.rst:1629 +msgid "" +"If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " +"third-party :pypi:`idna` module." +msgstr "" + +#: ../../library/codecs.rst:1632 +msgid "" +"These RFCs together define a protocol to support non-ASCII characters in " +"domain names. A domain name containing non-ASCII characters (such as ``www." +"Alliancefrançaise.nu``) is converted into an ASCII-compatible encoding (ACE, " +"such as ``www.xn--alliancefranaise-npb.nu``). The ACE form of the domain " +"name is then used in all places where arbitrary characters are not allowed " +"by the protocol, such as DNS queries, HTTP :mailheader:`Host` fields, and so " +"on. This conversion is carried out in the application; if possible invisible " +"to the user: The application should transparently convert Unicode domain " +"labels to IDNA on the wire, and convert back ACE labels to Unicode before " +"presenting them to the user." +msgstr "" + +#: ../../library/codecs.rst:1643 +msgid "" +"Python supports this conversion in several ways: the ``idna`` codec " +"performs conversion between Unicode and ACE, separating an input string into " +"labels based on the separator characters defined in :rfc:`section 3.1 of RFC " +"3490 <3490#section-3.1>` and converting each label to ACE as required, and " +"conversely separating an input byte string into labels based on the ``.`` " +"separator and converting any ACE labels found into unicode. Furthermore, " +"the :mod:`socket` module transparently converts Unicode host names to ACE, " +"so that applications need not be concerned about converting host names " +"themselves when they pass them to the socket module. On top of that, modules " +"that have host names as function parameters, such as :mod:`http.client` and :" +"mod:`ftplib`, accept Unicode host names (:mod:`http.client` then also " +"transparently sends an IDNA hostname in the :mailheader:`Host` field if it " +"sends that field at all)." +msgstr "" + +#: ../../library/codecs.rst:1656 +msgid "" +"When receiving host names from the wire (such as in reverse name lookup), no " +"automatic conversion to Unicode is performed: applications wishing to " +"present such host names to the user should decode them to Unicode." +msgstr "" + +#: ../../library/codecs.rst:1660 +msgid "" +"The module :mod:`!encodings.idna` also implements the nameprep procedure, " +"which performs certain normalizations on host names, to achieve case-" +"insensitivity of international domain names, and to unify similar " +"characters. The nameprep functions can be used directly if desired." +msgstr "" + +#: ../../library/codecs.rst:1668 +msgid "" +"Return the nameprepped version of *label*. The implementation currently " +"assumes query strings, so ``AllowUnassigned`` is true." +msgstr "" + +#: ../../library/codecs.rst:1674 +msgid "" +"Convert a label to ASCII, as specified in :rfc:`3490`. ``UseSTD3ASCIIRules`` " +"is assumed to be false." +msgstr "" + +#: ../../library/codecs.rst:1680 +msgid "Convert a label to Unicode, as specified in :rfc:`3490`." +msgstr "" + +#: ../../library/codecs.rst:1684 +msgid ":mod:`!encodings.mbcs` --- Windows ANSI codepage" +msgstr "" + +#: ../../library/codecs.rst:1689 +msgid "This module implements the ANSI codepage (CP_ACP)." +msgstr "" + +#: ../../library/codecs.rst:1693 +msgid "" +"Before 3.2, the *errors* argument was ignored; ``'replace'`` was always used " +"to encode, and ``'ignore'`` to decode." +msgstr "" + +#: ../../library/codecs.rst:1697 +msgid "Support any error handler." +msgstr "" + +#: ../../library/codecs.rst:1702 +msgid ":mod:`!encodings.utf_8_sig` --- UTF-8 codec with BOM signature" +msgstr "" + +#: ../../library/codecs.rst:1707 +msgid "" +"This module implements a variant of the UTF-8 codec. On encoding, a UTF-8 " +"encoded BOM will be prepended to the UTF-8 encoded bytes. For the stateful " +"encoder this is only done once (on the first write to the byte stream). On " +"decoding, an optional UTF-8 encoded BOM at the start of the data will be " +"skipped." +msgstr "" + +#: ../../library/codecs.rst:9 +msgid "Unicode" +msgstr "" + +#: ../../library/codecs.rst:9 +msgid "encode" +msgstr "" + +#: ../../library/codecs.rst:9 +msgid "decode" +msgstr "" + +#: ../../library/codecs.rst:9 +msgid "streams" +msgstr "" + +#: ../../library/codecs.rst:9 +msgid "stackable" +msgstr "" + +#: ../../library/codecs.rst:341 +msgid "strict" +msgstr "" + +#: ../../library/codecs.rst:341 ../../library/codecs.rst:393 +#: ../../library/codecs.rst:416 +msgid "error handler's name" +msgstr "" + +#: ../../library/codecs.rst:341 +msgid "ignore" +msgstr "" + +#: ../../library/codecs.rst:341 +msgid "replace" +msgstr "" + +#: ../../library/codecs.rst:341 +msgid "backslashreplace" +msgstr "" + +#: ../../library/codecs.rst:341 +msgid "surrogateescape" +msgstr "" + +#: ../../library/codecs.rst:341 +msgid "? (question mark)" +msgstr "" + +#: ../../library/codecs.rst:341 +msgid "replacement character" +msgstr "" + +#: ../../library/codecs.rst:341 +msgid "\\ (backslash)" +msgstr "" + +#: ../../library/codecs.rst:341 ../../library/codecs.rst:393 +msgid "escape sequence" +msgstr "" + +#: ../../library/codecs.rst:341 +msgid "\\x" +msgstr "" + +#: ../../library/codecs.rst:341 +msgid "\\u" +msgstr "" + +#: ../../library/codecs.rst:341 +msgid "\\U" +msgstr "" + +#: ../../library/codecs.rst:393 +msgid "xmlcharrefreplace" +msgstr "" + +#: ../../library/codecs.rst:393 +msgid "namereplace" +msgstr "" + +#: ../../library/codecs.rst:393 +msgid "\\N" +msgstr "" + +#: ../../library/codecs.rst:416 +msgid "surrogatepass" +msgstr "" diff --git a/library/collections.po b/library/collections.po index b89e229a..0fd60f31 100644 --- a/library/collections.po +++ b/library/collections.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -902,9 +902,9 @@ msgid "" "A `round-robin scheduler `_ can be implemented with input iterators stored in a :" "class:`deque`. Values are yielded from the active iterator in position " -"zero. If that iterator is exhausted, it can be removed with :meth:`~deque." -"popleft`; otherwise, it can be cycled back to the end with the :meth:`~deque." -"rotate` method::" +"zero. If that iterator is :term:`exhausted`, it can be removed with :meth:" +"`~deque.popleft`; otherwise, it can be cycled back to the end with the :meth:" +"`~deque.rotate` method::" msgstr "" #: ../../library/collections.rst:697 diff --git a/library/collections.po~ b/library/collections.po~ new file mode 100644 index 00000000..b89e229a --- /dev/null +++ b/library/collections.po~ @@ -0,0 +1,1799 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:01+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/collections.rst:2 +msgid ":mod:`!collections` --- Container datatypes" +msgstr "" + +#: ../../library/collections.rst:7 +msgid "**Source code:** :source:`Lib/collections/__init__.py`" +msgstr "" + +#: ../../library/collections.rst:17 +msgid "" +"This module implements specialized container datatypes providing " +"alternatives to Python's general purpose built-in containers, :class:" +"`dict`, :class:`list`, :class:`set`, and :class:`tuple`." +msgstr "" + +#: ../../library/collections.rst:22 +msgid ":func:`namedtuple`" +msgstr "" + +#: ../../library/collections.rst:22 +msgid "factory function for creating tuple subclasses with named fields" +msgstr "" + +#: ../../library/collections.rst:23 +msgid ":class:`deque`" +msgstr "" + +#: ../../library/collections.rst:23 +msgid "list-like container with fast appends and pops on either end" +msgstr "" + +#: ../../library/collections.rst:24 +msgid ":class:`ChainMap`" +msgstr "" + +#: ../../library/collections.rst:24 +msgid "dict-like class for creating a single view of multiple mappings" +msgstr "" + +#: ../../library/collections.rst:25 +msgid ":class:`Counter`" +msgstr "" + +#: ../../library/collections.rst:25 +msgid "dict subclass for counting :term:`hashable` objects" +msgstr "" + +#: ../../library/collections.rst:26 +msgid ":class:`OrderedDict`" +msgstr "" + +#: ../../library/collections.rst:26 +msgid "dict subclass that remembers the order entries were added" +msgstr "" + +#: ../../library/collections.rst:27 +msgid ":class:`defaultdict`" +msgstr "" + +#: ../../library/collections.rst:27 +msgid "dict subclass that calls a factory function to supply missing values" +msgstr "" + +#: ../../library/collections.rst:28 +msgid ":class:`UserDict`" +msgstr "" + +#: ../../library/collections.rst:28 +msgid "wrapper around dictionary objects for easier dict subclassing" +msgstr "" + +#: ../../library/collections.rst:29 +msgid ":class:`UserList`" +msgstr "" + +#: ../../library/collections.rst:29 +msgid "wrapper around list objects for easier list subclassing" +msgstr "" + +#: ../../library/collections.rst:30 +msgid ":class:`UserString`" +msgstr "" + +#: ../../library/collections.rst:30 +msgid "wrapper around string objects for easier string subclassing" +msgstr "" + +#: ../../library/collections.rst:35 +msgid ":class:`ChainMap` objects" +msgstr "" + +#: ../../library/collections.rst:39 +msgid "" +"A :class:`ChainMap` class is provided for quickly linking a number of " +"mappings so they can be treated as a single unit. It is often much faster " +"than creating a new dictionary and running multiple :meth:`~dict.update` " +"calls." +msgstr "" + +#: ../../library/collections.rst:43 +msgid "" +"The class can be used to simulate nested scopes and is useful in templating." +msgstr "" + +#: ../../library/collections.rst:47 +msgid "" +"A :class:`ChainMap` groups multiple dicts or other mappings together to " +"create a single, updateable view. If no *maps* are specified, a single " +"empty dictionary is provided so that a new chain always has at least one " +"mapping." +msgstr "" + +#: ../../library/collections.rst:51 +msgid "" +"The underlying mappings are stored in a list. That list is public and can " +"be accessed or updated using the *maps* attribute. There is no other state." +msgstr "" + +#: ../../library/collections.rst:54 +msgid "" +"Lookups search the underlying mappings successively until a key is found. " +"In contrast, writes, updates, and deletions only operate on the first " +"mapping." +msgstr "" + +#: ../../library/collections.rst:57 +msgid "" +"A :class:`ChainMap` incorporates the underlying mappings by reference. So, " +"if one of the underlying mappings gets updated, those changes will be " +"reflected in :class:`ChainMap`." +msgstr "" + +#: ../../library/collections.rst:61 +msgid "" +"All of the usual dictionary methods are supported. In addition, there is a " +"*maps* attribute, a method for creating new subcontexts, and a property for " +"accessing all but the first mapping:" +msgstr "" + +#: ../../library/collections.rst:67 +msgid "" +"A user updateable list of mappings. The list is ordered from first-searched " +"to last-searched. It is the only stored state and can be modified to change " +"which mappings are searched. The list should always contain at least one " +"mapping." +msgstr "" + +#: ../../library/collections.rst:74 +msgid "" +"Returns a new :class:`ChainMap` containing a new map followed by all of the " +"maps in the current instance. If ``m`` is specified, it becomes the new map " +"at the front of the list of mappings; if not specified, an empty dict is " +"used, so that a call to ``d.new_child()`` is equivalent to: ``ChainMap({}, " +"*d.maps)``. If any keyword arguments are specified, they update passed map " +"or new empty dict. This method is used for creating subcontexts that can be " +"updated without altering values in any of the parent mappings." +msgstr "" + +#: ../../library/collections.rst:83 +msgid "The optional ``m`` parameter was added." +msgstr "" + +#: ../../library/collections.rst:86 +msgid "Keyword arguments support was added." +msgstr "" + +#: ../../library/collections.rst:91 +msgid "" +"Property returning a new :class:`ChainMap` containing all of the maps in the " +"current instance except the first one. This is useful for skipping the " +"first map in the search. Use cases are similar to those for the :keyword:" +"`nonlocal` keyword used in :term:`nested scopes `. The use " +"cases also parallel those for the built-in :func:`super` function. A " +"reference to ``d.parents`` is equivalent to: ``ChainMap(*d.maps[1:])``." +msgstr "" + +#: ../../library/collections.rst:99 +msgid "" +"Note, the iteration order of a :class:`ChainMap` is determined by scanning " +"the mappings last to first::" +msgstr "" + +#: ../../library/collections.rst:102 +msgid "" +">>> baseline = {'music': 'bach', 'art': 'rembrandt'}\n" +">>> adjustments = {'art': 'van gogh', 'opera': 'carmen'}\n" +">>> list(ChainMap(adjustments, baseline))\n" +"['music', 'art', 'opera']" +msgstr "" + +#: ../../library/collections.rst:107 +msgid "" +"This gives the same ordering as a series of :meth:`dict.update` calls " +"starting with the last mapping::" +msgstr "" + +#: ../../library/collections.rst:110 +msgid "" +">>> combined = baseline.copy()\n" +">>> combined.update(adjustments)\n" +">>> list(combined)\n" +"['music', 'art', 'opera']" +msgstr "" + +#: ../../library/collections.rst:115 +msgid "Added support for ``|`` and ``|=`` operators, specified in :pep:`584`." +msgstr "" + +#: ../../library/collections.rst:120 +msgid "" +"The `MultiContext class `_ in the Enthought `CodeTools package " +"`_ has options to support writing to " +"any mapping in the chain." +msgstr "" + +#: ../../library/collections.rst:126 +msgid "" +"Django's `Context class `_ for templating is a read-only chain of mappings. It " +"also features pushing and popping of contexts similar to the :meth:" +"`~collections.ChainMap.new_child` method and the :attr:`~collections." +"ChainMap.parents` property." +msgstr "" + +#: ../../library/collections.rst:133 +msgid "" +"The `Nested Contexts recipe `_ has options to control " +"whether writes and other mutations apply only to the first mapping or to any " +"mapping in the chain." +msgstr "" + +#: ../../library/collections.rst:138 +msgid "" +"A `greatly simplified read-only version of Chainmap `_." +msgstr "" + +#: ../../library/collections.rst:143 +msgid ":class:`ChainMap` Examples and Recipes" +msgstr "" + +#: ../../library/collections.rst:145 +msgid "This section shows various approaches to working with chained maps." +msgstr "" + +#: ../../library/collections.rst:148 +msgid "Example of simulating Python's internal lookup chain::" +msgstr "" + +#: ../../library/collections.rst:150 +msgid "" +"import builtins\n" +"pylookup = ChainMap(locals(), globals(), vars(builtins))" +msgstr "" + +#: ../../library/collections.rst:153 +msgid "" +"Example of letting user specified command-line arguments take precedence " +"over environment variables which in turn take precedence over default " +"values::" +msgstr "" + +#: ../../library/collections.rst:156 +msgid "" +"import os, argparse\n" +"\n" +"defaults = {'color': 'red', 'user': 'guest'}\n" +"\n" +"parser = argparse.ArgumentParser()\n" +"parser.add_argument('-u', '--user')\n" +"parser.add_argument('-c', '--color')\n" +"namespace = parser.parse_args()\n" +"command_line_args = {k: v for k, v in vars(namespace).items() if v is not " +"None}\n" +"\n" +"combined = ChainMap(command_line_args, os.environ, defaults)\n" +"print(combined['color'])\n" +"print(combined['user'])" +msgstr "" + +#: ../../library/collections.rst:170 +msgid "" +"Example patterns for using the :class:`ChainMap` class to simulate nested " +"contexts::" +msgstr "" + +#: ../../library/collections.rst:173 +msgid "" +"c = ChainMap() # Create root context\n" +"d = c.new_child() # Create nested child context\n" +"e = c.new_child() # Child of c, independent from d\n" +"e.maps[0] # Current context dictionary -- like Python's " +"locals()\n" +"e.maps[-1] # Root context -- like Python's globals()\n" +"e.parents # Enclosing context chain -- like Python's nonlocals\n" +"\n" +"d['x'] = 1 # Set value in current context\n" +"d['x'] # Get first key in the chain of contexts\n" +"del d['x'] # Delete from current context\n" +"list(d) # All nested values\n" +"k in d # Check all nested values\n" +"len(d) # Number of nested values\n" +"d.items() # All nested items\n" +"dict(d) # Flatten into a regular dictionary" +msgstr "" + +#: ../../library/collections.rst:189 +msgid "" +"The :class:`ChainMap` class only makes updates (writes and deletions) to the " +"first mapping in the chain while lookups will search the full chain. " +"However, if deep writes and deletions are desired, it is easy to make a " +"subclass that updates keys found deeper in the chain::" +msgstr "" + +#: ../../library/collections.rst:194 +msgid "" +"class DeepChainMap(ChainMap):\n" +" 'Variant of ChainMap that allows direct updates to inner scopes'\n" +"\n" +" def __setitem__(self, key, value):\n" +" for mapping in self.maps:\n" +" if key in mapping:\n" +" mapping[key] = value\n" +" return\n" +" self.maps[0][key] = value\n" +"\n" +" def __delitem__(self, key):\n" +" for mapping in self.maps:\n" +" if key in mapping:\n" +" del mapping[key]\n" +" return\n" +" raise KeyError(key)\n" +"\n" +">>> d = DeepChainMap({'zebra': 'black'}, {'elephant': 'blue'}, {'lion': " +"'yellow'})\n" +">>> d['lion'] = 'orange' # update an existing key two levels down\n" +">>> d['snake'] = 'red' # new keys get added to the topmost dict\n" +">>> del d['elephant'] # remove an existing key one level down\n" +">>> d # display result\n" +"DeepChainMap({'zebra': 'black', 'snake': 'red'}, {}, {'lion': 'orange'})" +msgstr "" + +#: ../../library/collections.rst:220 +msgid ":class:`Counter` objects" +msgstr "" + +#: ../../library/collections.rst:222 +msgid "" +"A counter tool is provided to support convenient and rapid tallies. For " +"example::" +msgstr "" + +#: ../../library/collections.rst:225 +msgid "" +">>> # Tally occurrences of words in a list\n" +">>> cnt = Counter()\n" +">>> for word in ['red', 'blue', 'red', 'green', 'blue', 'blue']:\n" +"... cnt[word] += 1\n" +"...\n" +">>> cnt\n" +"Counter({'blue': 3, 'red': 2, 'green': 1})\n" +"\n" +">>> # Find the ten most common words in Hamlet\n" +">>> import re\n" +">>> words = re.findall(r'\\w+', open('hamlet.txt').read().lower())\n" +">>> Counter(words).most_common(10)\n" +"[('the', 1143), ('and', 966), ('to', 762), ('of', 669), ('i', 631),\n" +" ('you', 554), ('a', 546), ('my', 514), ('hamlet', 471), ('in', 451)]" +msgstr "" + +#: ../../library/collections.rst:244 +msgid "" +"A :class:`Counter` is a :class:`dict` subclass for counting :term:`hashable` " +"objects. It is a collection where elements are stored as dictionary keys and " +"their counts are stored as dictionary values. Counts are allowed to be any " +"integer value including zero or negative counts. The :class:`Counter` class " +"is similar to bags or multisets in other languages." +msgstr "" + +#: ../../library/collections.rst:250 +msgid "" +"Elements are counted from an *iterable* or initialized from another " +"*mapping* (or counter):" +msgstr "" + +#: ../../library/collections.rst:258 +msgid "" +"Counter objects have a dictionary interface except that they return a zero " +"count for missing items instead of raising a :exc:`KeyError`:" +msgstr "" + +#: ../../library/collections.rst:265 +msgid "" +"Setting a count to zero does not remove an element from a counter. Use " +"``del`` to remove it entirely:" +msgstr "" + +#: ../../library/collections.rst:273 +msgid "" +"As a :class:`dict` subclass, :class:`Counter` inherited the capability to " +"remember insertion order. Math operations on *Counter* objects also " +"preserve order. Results are ordered according to when an element is first " +"encountered in the left operand and then by the order encountered in the " +"right operand." +msgstr "" + +#: ../../library/collections.rst:279 +msgid "" +"Counter objects support additional methods beyond those available for all " +"dictionaries:" +msgstr "" + +#: ../../library/collections.rst:284 +msgid "" +"Return an iterator over elements repeating each as many times as its count. " +"Elements are returned in the order first encountered. If an element's count " +"is less than one, :meth:`elements` will ignore it." +msgstr "" + +#: ../../library/collections.rst:294 +msgid "" +"Return a list of the *n* most common elements and their counts from the most " +"common to the least. If *n* is omitted or ``None``, :meth:`most_common` " +"returns *all* elements in the counter. Elements with equal counts are " +"ordered in the order first encountered:" +msgstr "" + +#: ../../library/collections.rst:306 +msgid "" +"Elements are subtracted from an *iterable* or from another *mapping* (or " +"counter). Like :meth:`dict.update` but subtracts counts instead of " +"replacing them. Both inputs and outputs may be zero or negative." +msgstr "" + +#: ../../library/collections.rst:320 +msgid "Compute the sum of the counts." +msgstr "" + +#: ../../library/collections.rst:328 +msgid "" +"The usual dictionary methods are available for :class:`Counter` objects " +"except for these two which work differently for counters:" +msgstr "" + +#: ../../library/collections.rst:333 +msgid "This class method is not implemented for :class:`Counter` objects." +msgstr "" + +#: ../../library/collections.rst:339 +msgid "" +"Elements are counted from an *iterable* or added-in from another *mapping* " +"(or counter). Like :meth:`dict.update` but adds counts instead of replacing " +"them. Also, the *iterable* is expected to be a sequence of elements, not a " +"sequence of ``(key, value)`` pairs." +msgstr "" + +#: ../../library/collections.rst:344 +msgid "" +"Counters support rich comparison operators for equality, subset, and " +"superset relationships: ``==``, ``!=``, ``<``, ``<=``, ``>``, ``>=``. All of " +"those tests treat missing elements as having zero counts so that " +"``Counter(a=1) == Counter(a=1, b=0)`` returns true." +msgstr "" + +#: ../../library/collections.rst:349 +msgid "Rich comparison operations were added." +msgstr "" + +#: ../../library/collections.rst:352 +msgid "" +"In equality tests, missing elements are treated as having zero counts. " +"Formerly, ``Counter(a=3)`` and ``Counter(a=3, b=0)`` were considered " +"distinct." +msgstr "" + +#: ../../library/collections.rst:357 +msgid "Common patterns for working with :class:`Counter` objects::" +msgstr "" + +#: ../../library/collections.rst:359 +msgid "" +"c.total() # total of all counts\n" +"c.clear() # reset all counts\n" +"list(c) # list unique elements\n" +"set(c) # convert to a set\n" +"dict(c) # convert to a regular dictionary\n" +"c.items() # access the (elem, cnt) pairs\n" +"Counter(dict(list_of_pairs)) # convert from a list of (elem, cnt) pairs\n" +"c.most_common()[:-n-1:-1] # n least common elements\n" +"+c # remove zero and negative counts" +msgstr "" + +#: ../../library/collections.rst:369 +msgid "" +"Several mathematical operations are provided for combining :class:`Counter` " +"objects to produce multisets (counters that have counts greater than zero). " +"Addition and subtraction combine counters by adding or subtracting the " +"counts of corresponding elements. Intersection and union return the minimum " +"and maximum of corresponding counts. Symmetric difference returns the " +"difference between the maximum and minimum of the corresponding counts. " +"Equality and inclusion compare corresponding counts. Each operation can " +"accept inputs with signed counts, but the output will exclude results with " +"counts of zero or below." +msgstr "" + +#: ../../library/collections.rst:379 +msgid "" +">>> c = Counter(a=3, b=1)\n" +">>> d = Counter(a=1, b=2)\n" +">>> c + d # add two counters together: c[x] + d[x]\n" +"Counter({'a': 4, 'b': 3})\n" +">>> c - d # subtract (keeping only positive counts)\n" +"Counter({'a': 2})\n" +">>> c & d # intersection: min(c[x], d[x])\n" +"Counter({'a': 1, 'b': 1})\n" +">>> c | d # union: max(c[x], d[x])\n" +"Counter({'a': 3, 'b': 2})\n" +">>> c ^ d # max(c[x], d[x]) - min(c[x], d[x])\n" +"Counter({'a': 2, 'b': 1})\n" +">>> c == d # equality: c[x] == d[x]\n" +"False\n" +">>> c <= d # inclusion: c[x] <= d[x]\n" +"False" +msgstr "" + +#: ../../library/collections.rst:398 +msgid "" +"Unary addition and subtraction are shortcuts for adding an empty counter or " +"subtracting from an empty counter." +msgstr "" + +#: ../../library/collections.rst:407 +msgid "" +"Added support for unary plus, unary minus, and in-place multiset operations." +msgstr "" + +#: ../../library/collections.rst:410 +msgid "" +"Added support for the symmetric difference multiset operation, ``c ^ d``." +msgstr "" + +#: ../../library/collections.rst:415 +msgid "" +"Counters were primarily designed to work with positive integers to represent " +"running counts; however, care was taken to not unnecessarily preclude use " +"cases needing other types or negative values. To help with those use cases, " +"this section documents the minimum range and type restrictions." +msgstr "" + +#: ../../library/collections.rst:420 +msgid "" +"The :class:`Counter` class itself is a dictionary subclass with no " +"restrictions on its keys and values. The values are intended to be numbers " +"representing counts, but you *could* store anything in the value field." +msgstr "" + +#: ../../library/collections.rst:424 +msgid "" +"The :meth:`~Counter.most_common` method requires only that the values be " +"orderable." +msgstr "" + +#: ../../library/collections.rst:426 +msgid "" +"For in-place operations such as ``c[key] += 1``, the value type need only " +"support addition and subtraction. So fractions, floats, and decimals would " +"work and negative values are supported. The same is also true for :meth:" +"`~Counter.update` and :meth:`~Counter.subtract` which allow negative and " +"zero values for both inputs and outputs." +msgstr "" + +#: ../../library/collections.rst:432 +msgid "" +"The multiset methods are designed only for use cases with positive values. " +"The inputs may be negative or zero, but only outputs with positive values " +"are created. There are no type restrictions, but the value type needs to " +"support addition, subtraction, and comparison." +msgstr "" + +#: ../../library/collections.rst:437 +msgid "" +"The :meth:`~Counter.elements` method requires integer counts. It ignores " +"zero and negative counts." +msgstr "" + +#: ../../library/collections.rst:442 +msgid "" +"`Bag class `_ in Smalltalk." +msgstr "" + +#: ../../library/collections.rst:445 +msgid "" +"Wikipedia entry for `Multisets `_." +msgstr "" + +#: ../../library/collections.rst:447 +msgid "" +"`C++ multisets `_ tutorial with examples." +msgstr "" + +#: ../../library/collections.rst:450 +msgid "" +"For mathematical operations on multisets and their use cases, see *Knuth, " +"Donald. The Art of Computer Programming Volume II, Section 4.6.3, Exercise " +"19*." +msgstr "" + +#: ../../library/collections.rst:454 +msgid "" +"To enumerate all distinct multisets of a given size over a given set of " +"elements, see :func:`itertools.combinations_with_replacement`::" +msgstr "" + +#: ../../library/collections.rst:457 +msgid "" +"map(Counter, combinations_with_replacement('ABC', 2)) # --> AA AB AC BB BC CC" +msgstr "" + +#: ../../library/collections.rst:461 +msgid ":class:`deque` objects" +msgstr "" + +#: ../../library/collections.rst:465 +msgid "" +"Returns a new deque object initialized left-to-right (using :meth:`append`) " +"with data from *iterable*. If *iterable* is not specified, the new deque is " +"empty." +msgstr "" + +#: ../../library/collections.rst:468 +msgid "" +"Deques are a generalization of stacks and queues (the name is pronounced " +"\"deck\" and is short for \"double-ended queue\"). Deques support thread-" +"safe, memory efficient appends and pops from either side of the deque with " +"approximately the same *O*\\ (1) performance in either direction." +msgstr "" + +#: ../../library/collections.rst:473 +msgid "" +"Though :class:`list` objects support similar operations, they are optimized " +"for fast fixed-length operations and incur *O*\\ (*n*) memory movement costs " +"for ``pop(0)`` and ``insert(0, v)`` operations which change both the size " +"and position of the underlying data representation." +msgstr "" + +#: ../../library/collections.rst:479 +msgid "" +"If *maxlen* is not specified or is ``None``, deques may grow to an arbitrary " +"length. Otherwise, the deque is bounded to the specified maximum length. " +"Once a bounded length deque is full, when new items are added, a " +"corresponding number of items are discarded from the opposite end. Bounded " +"length deques provide functionality similar to the ``tail`` filter in Unix. " +"They are also useful for tracking transactions and other pools of data where " +"only the most recent activity is of interest." +msgstr "" + +#: ../../library/collections.rst:487 +msgid "Deques are :ref:`generic ` over the type of their contents." +msgstr "" + +#: ../../library/collections.rst:490 +msgid "Deque objects support the following methods:" +msgstr "" + +#: ../../library/collections.rst:494 +msgid "Add *item* to the right side of the deque." +msgstr "" + +#: ../../library/collections.rst:499 +msgid "Add *item* to the left side of the deque." +msgstr "" + +#: ../../library/collections.rst:504 +msgid "Remove all elements from the deque leaving it with length 0." +msgstr "" + +#: ../../library/collections.rst:509 +msgid "Create a shallow copy of the deque." +msgstr "" + +#: ../../library/collections.rst:516 +msgid "Count the number of deque elements equal to *value*." +msgstr "" + +#: ../../library/collections.rst:523 +msgid "" +"Extend the right side of the deque by appending elements from the iterable " +"argument." +msgstr "" + +#: ../../library/collections.rst:529 +msgid "" +"Extend the left side of the deque by appending elements from *iterable*. " +"Note, the series of left appends results in reversing the order of elements " +"in the iterable argument." +msgstr "" + +#: ../../library/collections.rst:536 +msgid "" +"Return the position of *value* in the deque (at or after index *start* and " +"before index *stop*). Returns the first match or raises :exc:`ValueError` " +"if not found." +msgstr "" + +#: ../../library/collections.rst:545 +msgid "Insert *value* into the deque at position *index*." +msgstr "" + +#: ../../library/collections.rst:547 +msgid "" +"If the insertion would cause a bounded deque to grow beyond *maxlen*, an :" +"exc:`IndexError` is raised." +msgstr "" + +#: ../../library/collections.rst:555 +msgid "" +"Remove and return an element from the right side of the deque. If no " +"elements are present, raises an :exc:`IndexError`." +msgstr "" + +#: ../../library/collections.rst:561 +msgid "" +"Remove and return an element from the left side of the deque. If no elements " +"are present, raises an :exc:`IndexError`." +msgstr "" + +#: ../../library/collections.rst:567 +msgid "" +"Remove the first occurrence of *value*. If not found, raises a :exc:" +"`ValueError`." +msgstr "" + +#: ../../library/collections.rst:573 +msgid "Reverse the elements of the deque in-place and then return ``None``." +msgstr "" + +#: ../../library/collections.rst:580 +msgid "" +"Rotate the deque *n* steps to the right. If *n* is negative, rotate to the " +"left." +msgstr "" + +#: ../../library/collections.rst:583 +msgid "" +"When the deque is not empty, rotating one step to the right is equivalent to " +"``d.appendleft(d.pop())``, and rotating one step to the left is equivalent " +"to ``d.append(d.popleft())``." +msgstr "" + +#: ../../library/collections.rst:588 +msgid "Deque objects also provide one read-only attribute:" +msgstr "" + +#: ../../library/collections.rst:592 +msgid "Maximum size of a deque or ``None`` if unbounded." +msgstr "" + +#: ../../library/collections.rst:597 +msgid "" +"In addition to the above, deques support iteration, pickling, ``len(d)``, " +"``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, membership testing " +"with the :keyword:`in` operator, and subscript references such as ``d[0]`` " +"to access the first element. Indexed access is *O*\\ (1) at both ends but " +"slows to *O*\\ (*n*) in the middle. For fast random access, use lists " +"instead." +msgstr "" + +#: ../../library/collections.rst:603 +msgid "" +"Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and " +"``__imul__()``." +msgstr "" + +#: ../../library/collections.rst:606 +msgid "Example:" +msgstr "" + +#: ../../library/collections.rst:608 +msgid "" +">>> from collections import deque\n" +">>> d = deque('ghi') # make a new deque with three items\n" +">>> for elem in d: # iterate over the deque's elements\n" +"... print(elem.upper())\n" +"G\n" +"H\n" +"I\n" +"\n" +">>> d.append('j') # add a new entry to the right side\n" +">>> d.appendleft('f') # add a new entry to the left side\n" +">>> d # show the representation of the deque\n" +"deque(['f', 'g', 'h', 'i', 'j'])\n" +"\n" +">>> d.pop() # return and remove the rightmost item\n" +"'j'\n" +">>> d.popleft() # return and remove the leftmost item\n" +"'f'\n" +">>> list(d) # list the contents of the deque\n" +"['g', 'h', 'i']\n" +">>> d[0] # peek at leftmost item\n" +"'g'\n" +">>> d[-1] # peek at rightmost item\n" +"'i'\n" +"\n" +">>> list(reversed(d)) # list the contents of a deque in " +"reverse\n" +"['i', 'h', 'g']\n" +">>> 'h' in d # search the deque\n" +"True\n" +">>> d.extend('jkl') # add multiple elements at once\n" +">>> d\n" +"deque(['g', 'h', 'i', 'j', 'k', 'l'])\n" +">>> d.rotate(1) # right rotation\n" +">>> d\n" +"deque(['l', 'g', 'h', 'i', 'j', 'k'])\n" +">>> d.rotate(-1) # left rotation\n" +">>> d\n" +"deque(['g', 'h', 'i', 'j', 'k', 'l'])\n" +"\n" +">>> deque(reversed(d)) # make a new deque in reverse order\n" +"deque(['l', 'k', 'j', 'i', 'h', 'g'])\n" +">>> d.clear() # empty the deque\n" +">>> d.pop() # cannot pop from an empty deque\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in -toplevel-\n" +" d.pop()\n" +"IndexError: pop from an empty deque\n" +"\n" +">>> d.extendleft('abc') # extendleft() reverses the input " +"order\n" +">>> d\n" +"deque(['c', 'b', 'a'])" +msgstr "" + +#: ../../library/collections.rst:663 +msgid ":class:`deque` Recipes" +msgstr "" + +#: ../../library/collections.rst:665 +msgid "This section shows various approaches to working with deques." +msgstr "" + +#: ../../library/collections.rst:667 +msgid "" +"Bounded length deques provide functionality similar to the ``tail`` filter " +"in Unix::" +msgstr "" + +#: ../../library/collections.rst:670 +msgid "" +"def tail(filename, n=10):\n" +" 'Return the last n lines of a file'\n" +" with open(filename) as f:\n" +" return deque(f, n)" +msgstr "" + +#: ../../library/collections.rst:675 +msgid "" +"Another approach to using deques is to maintain a sequence of recently added " +"elements by appending to the right and popping to the left::" +msgstr "" + +#: ../../library/collections.rst:678 +msgid "" +"def moving_average(iterable, n=3):\n" +" # moving_average([40, 30, 50, 46, 39, 44]) --> 40.0 42.0 45.0 43.0\n" +" # https://en.wikipedia.org/wiki/Moving_average\n" +" it = iter(iterable)\n" +" d = deque(itertools.islice(it, n-1))\n" +" d.appendleft(0)\n" +" s = sum(d)\n" +" for elem in it:\n" +" s += elem - d.popleft()\n" +" d.append(elem)\n" +" yield s / n" +msgstr "" + +#: ../../library/collections.rst:690 +msgid "" +"A `round-robin scheduler `_ can be implemented with input iterators stored in a :" +"class:`deque`. Values are yielded from the active iterator in position " +"zero. If that iterator is exhausted, it can be removed with :meth:`~deque." +"popleft`; otherwise, it can be cycled back to the end with the :meth:`~deque." +"rotate` method::" +msgstr "" + +#: ../../library/collections.rst:697 +msgid "" +"def roundrobin(*iterables):\n" +" \"roundrobin('ABC', 'D', 'EF') --> A D E B F C\"\n" +" iterators = deque(map(iter, iterables))\n" +" while iterators:\n" +" try:\n" +" while True:\n" +" yield next(iterators[0])\n" +" iterators.rotate(-1)\n" +" except StopIteration:\n" +" # Remove an exhausted iterator.\n" +" iterators.popleft()" +msgstr "" + +#: ../../library/collections.rst:709 +msgid "" +"The :meth:`~deque.rotate` method provides a way to implement :class:`deque` " +"slicing and deletion. For example, a pure Python implementation of ``del " +"d[n]`` relies on the ``rotate()`` method to position elements to be popped::" +msgstr "" + +#: ../../library/collections.rst:713 +msgid "" +"def delete_nth(d, n):\n" +" d.rotate(-n)\n" +" d.popleft()\n" +" d.rotate(n)" +msgstr "" + +#: ../../library/collections.rst:718 +msgid "" +"To implement :class:`deque` slicing, use a similar approach applying :meth:" +"`~deque.rotate` to bring a target element to the left side of the deque. " +"Remove old entries with :meth:`~deque.popleft`, add new entries with :meth:" +"`~deque.extend`, and then reverse the rotation. With minor variations on " +"that approach, it is easy to implement Forth style stack manipulations such " +"as ``dup``, ``drop``, ``swap``, ``over``, ``pick``, ``rot``, and ``roll``." +msgstr "" + +#: ../../library/collections.rst:728 +msgid ":class:`defaultdict` objects" +msgstr "" + +#: ../../library/collections.rst:734 +msgid "" +"Return a new dictionary-like object. :class:`defaultdict` is a subclass of " +"the built-in :class:`dict` class. It overrides one method and adds one " +"writable instance variable. The remaining functionality is the same as for " +"the :class:`dict` class and is not documented here." +msgstr "" + +#: ../../library/collections.rst:739 +msgid "" +"The first argument provides the initial value for the :attr:" +"`default_factory` attribute; it defaults to ``None``. All remaining " +"arguments are treated the same as if they were passed to the :class:`dict` " +"constructor, including keyword arguments." +msgstr "" + +#: ../../library/collections.rst:744 +msgid "" +":class:`!defaultdict`\\s are :ref:`generic ` over two types, " +"signifying (respectively) the types of the dictionary's keys and values." +msgstr "" + +#: ../../library/collections.rst:748 +msgid "" +":class:`defaultdict` objects support the following method in addition to the " +"standard :class:`dict` operations:" +msgstr "" + +#: ../../library/collections.rst:753 +msgid "" +"If the :attr:`default_factory` attribute is ``None``, this raises a :exc:" +"`KeyError` exception with the *key* as argument." +msgstr "" + +#: ../../library/collections.rst:756 +msgid "" +"If :attr:`default_factory` is not ``None``, it is called without arguments " +"to provide a default value for the given *key*, this value is inserted in " +"the dictionary for the *key*, and returned." +msgstr "" + +#: ../../library/collections.rst:760 +msgid "" +"If calling :attr:`default_factory` raises an exception this exception is " +"propagated unchanged." +msgstr "" + +#: ../../library/collections.rst:763 +msgid "" +"This method is called by the :meth:`~object.__getitem__` method of the :" +"class:`dict` class when the requested key is not found; whatever it returns " +"or raises is then returned or raised by :meth:`~object.__getitem__`." +msgstr "" + +#: ../../library/collections.rst:767 +msgid "" +"Note that :meth:`__missing__` is *not* called for any operations besides :" +"meth:`~object.__getitem__`. This means that :meth:`~dict.get` will, like " +"normal dictionaries, return ``None`` as a default rather than using :attr:" +"`default_factory`." +msgstr "" + +#: ../../library/collections.rst:773 +msgid ":class:`defaultdict` objects support the following instance variable:" +msgstr "" + +#: ../../library/collections.rst:778 +msgid "" +"This attribute is used by the :meth:`~defaultdict.__missing__` method; it is " +"initialized from the first argument to the constructor, if present, or to " +"``None``, if absent." +msgstr "" + +#: ../../library/collections.rst:782 ../../library/collections.rst:1211 +msgid "" +"Added merge (``|``) and update (``|=``) operators, specified in :pep:`584`." +msgstr "" + +#: ../../library/collections.rst:788 +msgid ":class:`defaultdict` Examples" +msgstr "" + +#: ../../library/collections.rst:790 +msgid "" +"Using :class:`list` as the :attr:`~defaultdict.default_factory`, it is easy " +"to group a sequence of key-value pairs into a dictionary of lists:" +msgstr "" + +#: ../../library/collections.rst:801 +msgid "" +"When each key is encountered for the first time, it is not already in the " +"mapping; so an entry is automatically created using the :attr:`~defaultdict." +"default_factory` function which returns an empty :class:`list`. The :meth:" +"`list.append` operation then attaches the value to the new list. When keys " +"are encountered again, the look-up proceeds normally (returning the list for " +"that key) and the :meth:`list.append` operation adds another value to the " +"list. This technique is simpler and faster than an equivalent technique " +"using :meth:`dict.setdefault`:" +msgstr "" + +#: ../../library/collections.rst:816 +msgid "" +"Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes the :" +"class:`defaultdict` useful for counting (like a bag or multiset in other " +"languages):" +msgstr "" + +#: ../../library/collections.rst:828 +msgid "" +"When a letter is first encountered, it is missing from the mapping, so the :" +"attr:`~defaultdict.default_factory` function calls :func:`int` to supply a " +"default count of zero. The increment operation then builds up the count for " +"each letter." +msgstr "" + +#: ../../library/collections.rst:832 +msgid "" +"The function :func:`int` which always returns zero is just a special case of " +"constant functions. A faster and more flexible way to create constant " +"functions is to use a lambda function which can supply any constant value " +"(not just zero):" +msgstr "" + +#: ../../library/collections.rst:845 +msgid "" +"Setting the :attr:`~defaultdict.default_factory` to :class:`set` makes the :" +"class:`defaultdict` useful for building a dictionary of sets:" +msgstr "" + +#: ../../library/collections.rst:858 +msgid ":func:`namedtuple` Factory Function for Tuples with Named Fields" +msgstr "" + +#: ../../library/collections.rst:860 +msgid "" +"Named tuples assign meaning to each position in a tuple and allow for more " +"readable, self-documenting code. They can be used wherever regular tuples " +"are used, and they add the ability to access fields by name instead of " +"position index." +msgstr "" + +#: ../../library/collections.rst:866 +msgid "" +"Returns a new tuple subclass named *typename*. The new subclass is used to " +"create tuple-like objects that have fields accessible by attribute lookup as " +"well as being indexable and iterable. Instances of the subclass also have a " +"helpful docstring (with *typename* and *field_names*) and a helpful :meth:" +"`~object.__repr__` method which lists the tuple contents in a ``name=value`` " +"format." +msgstr "" + +#: ../../library/collections.rst:873 +msgid "" +"The *field_names* are a sequence of strings such as ``['x', 'y']``. " +"Alternatively, *field_names* can be a single string with each fieldname " +"separated by whitespace and/or commas, for example ``'x y'`` or ``'x, y'``." +msgstr "" + +#: ../../library/collections.rst:877 +msgid "" +"Any valid Python identifier may be used for a fieldname except for names " +"starting with an underscore. Valid identifiers consist of letters, digits, " +"and underscores but do not start with a digit or underscore and cannot be a :" +"mod:`keyword` such as *class*, *for*, *return*, *global*, *pass*, or *raise*." +msgstr "" + +#: ../../library/collections.rst:883 +msgid "" +"If *rename* is true, invalid fieldnames are automatically replaced with " +"positional names. For example, ``['abc', 'def', 'ghi', 'abc']`` is " +"converted to ``['abc', '_1', 'ghi', '_3']``, eliminating the keyword ``def`` " +"and the duplicate fieldname ``abc``." +msgstr "" + +#: ../../library/collections.rst:888 +msgid "" +"*defaults* can be ``None`` or an :term:`iterable` of default values. Since " +"fields with a default value must come after any fields without a default, " +"the *defaults* are applied to the rightmost parameters. For example, if the " +"fieldnames are ``['x', 'y', 'z']`` and the defaults are ``(1, 2)``, then " +"``x`` will be a required argument, ``y`` will default to ``1``, and ``z`` " +"will default to ``2``." +msgstr "" + +#: ../../library/collections.rst:895 +msgid "" +"If *module* is defined, the :attr:`~type.__module__` attribute of the named " +"tuple is set to that value." +msgstr "" + +#: ../../library/collections.rst:898 +msgid "" +"Named tuple instances do not have per-instance dictionaries, so they are " +"lightweight and require no more memory than regular tuples." +msgstr "" + +#: ../../library/collections.rst:901 +msgid "" +"To support pickling, the named tuple class should be assigned to a variable " +"that matches *typename*." +msgstr "" + +#: ../../library/collections.rst:904 +msgid "Added support for *rename*." +msgstr "" + +#: ../../library/collections.rst:907 +msgid "" +"The *verbose* and *rename* parameters became :ref:`keyword-only arguments " +"`." +msgstr "" + +#: ../../library/collections.rst:911 +msgid "Added the *module* parameter." +msgstr "" + +#: ../../library/collections.rst:914 +msgid "Removed the *verbose* parameter and the :attr:`!_source` attribute." +msgstr "" + +#: ../../library/collections.rst:917 +msgid "" +"Added the *defaults* parameter and the :attr:`~somenamedtuple." +"_field_defaults` attribute." +msgstr "" + +#: ../../library/collections.rst:921 +msgid "" +">>> # Basic example\n" +">>> Point = namedtuple('Point', ['x', 'y'])\n" +">>> p = Point(11, y=22) # instantiate with positional or keyword " +"arguments\n" +">>> p[0] + p[1] # indexable like the plain tuple (11, 22)\n" +"33\n" +">>> x, y = p # unpack like a regular tuple\n" +">>> x, y\n" +"(11, 22)\n" +">>> p.x + p.y # fields also accessible by name\n" +"33\n" +">>> p # readable __repr__ with a name=value style\n" +"Point(x=11, y=22)" +msgstr "" + +#: ../../library/collections.rst:937 +msgid "" +"Named tuples are especially useful for assigning field names to result " +"tuples returned by the :mod:`csv` or :mod:`sqlite3` modules::" +msgstr "" + +#: ../../library/collections.rst:940 +msgid "" +"EmployeeRecord = namedtuple('EmployeeRecord', 'name, age, title, department, " +"paygrade')\n" +"\n" +"import csv\n" +"for emp in map(EmployeeRecord._make, csv.reader(open(\"employees.csv\", " +"\"rb\"))):\n" +" print(emp.name, emp.title)\n" +"\n" +"import sqlite3\n" +"conn = sqlite3.connect('/companydata')\n" +"cursor = conn.cursor()\n" +"cursor.execute('SELECT name, age, title, department, paygrade FROM " +"employees')\n" +"for emp in map(EmployeeRecord._make, cursor.fetchall()):\n" +" print(emp.name, emp.title)" +msgstr "" + +#: ../../library/collections.rst:953 +msgid "" +"In addition to the methods inherited from tuples, named tuples support three " +"additional methods and two attributes. To prevent conflicts with field " +"names, the method and attribute names start with an underscore." +msgstr "" + +#: ../../library/collections.rst:959 +msgid "" +"Class method that makes a new instance from an existing sequence or iterable." +msgstr "" + +#: ../../library/collections.rst:961 +msgid "" +">>> t = [11, 22]\n" +">>> Point._make(t)\n" +"Point(x=11, y=22)" +msgstr "" + +#: ../../library/collections.rst:969 +msgid "" +"Return a new :class:`dict` which maps field names to their corresponding " +"values:" +msgstr "" + +#: ../../library/collections.rst:972 +msgid "" +">>> p = Point(x=11, y=22)\n" +">>> p._asdict()\n" +"{'x': 11, 'y': 22}" +msgstr "" + +#: ../../library/collections.rst:978 +msgid "Returns an :class:`OrderedDict` instead of a regular :class:`dict`." +msgstr "" + +#: ../../library/collections.rst:981 +msgid "" +"Returns a regular :class:`dict` instead of an :class:`OrderedDict`. As of " +"Python 3.7, regular dicts are guaranteed to be ordered. If the extra " +"features of :class:`OrderedDict` are required, the suggested remediation is " +"to cast the result to the desired type: ``OrderedDict(nt._asdict())``." +msgstr "" + +#: ../../library/collections.rst:990 +msgid "" +"Return a new instance of the named tuple replacing specified fields with new " +"values::" +msgstr "" + +#: ../../library/collections.rst:993 +msgid "" +">>> p = Point(x=11, y=22)\n" +">>> p._replace(x=33)\n" +"Point(x=33, y=22)\n" +"\n" +">>> for partnum, record in inventory.items():\n" +"... inventory[partnum] = record._replace(price=newprices[partnum], " +"timestamp=time.now())" +msgstr "" + +#: ../../library/collections.rst:1000 +msgid "" +"Named tuples are also supported by generic function :func:`copy.replace`." +msgstr "" + +#: ../../library/collections.rst:1002 +msgid "" +"Raise :exc:`TypeError` instead of :exc:`ValueError` for invalid keyword " +"arguments." +msgstr "" + +#: ../../library/collections.rst:1008 +msgid "" +"Tuple of strings listing the field names. Useful for introspection and for " +"creating new named tuple types from existing named tuples." +msgstr "" + +#: ../../library/collections.rst:1011 +msgid "" +">>> p._fields # view the field names\n" +"('x', 'y')\n" +"\n" +">>> Color = namedtuple('Color', 'red green blue')\n" +">>> Pixel = namedtuple('Pixel', Point._fields + Color._fields)\n" +">>> Pixel(11, 22, 128, 255, 0)\n" +"Pixel(x=11, y=22, red=128, green=255, blue=0)" +msgstr "" + +#: ../../library/collections.rst:1023 +msgid "Dictionary mapping field names to default values." +msgstr "" + +#: ../../library/collections.rst:1025 +msgid "" +">>> Account = namedtuple('Account', ['type', 'balance'], defaults=[0])\n" +">>> Account._field_defaults\n" +"{'balance': 0}\n" +">>> Account('premium')\n" +"Account(type='premium', balance=0)" +msgstr "" + +#: ../../library/collections.rst:1033 +msgid "" +"To retrieve a field whose name is stored in a string, use the :func:" +"`getattr` function:" +msgstr "" + +#: ../../library/collections.rst:1039 +msgid "" +"To convert a dictionary to a named tuple, use the double-star-operator (as " +"described in :ref:`tut-unpacking-arguments`):" +msgstr "" + +#: ../../library/collections.rst:1046 +msgid "" +"Since a named tuple is a regular Python class, it is easy to add or change " +"functionality with a subclass. Here is how to add a calculated field and a " +"fixed-width print format:" +msgstr "" + +#: ../../library/collections.rst:1050 +msgid "" +">>> class Point(namedtuple('Point', ['x', 'y'])):\n" +"... __slots__ = ()\n" +"... @property\n" +"... def hypot(self):\n" +"... return (self.x ** 2 + self.y ** 2) ** 0.5\n" +"... def __str__(self):\n" +"... return 'Point: x=%6.3f y=%6.3f hypot=%6.3f' % (self.x, self.y, " +"self.hypot)\n" +"\n" +">>> for p in Point(3, 4), Point(14, 5/7):\n" +"... print(p)\n" +"Point: x= 3.000 y= 4.000 hypot= 5.000\n" +"Point: x=14.000 y= 0.714 hypot=14.018" +msgstr "" + +#: ../../library/collections.rst:1065 +msgid "" +"The subclass shown above sets ``__slots__`` to an empty tuple. This helps " +"keep memory requirements low by preventing the creation of instance " +"dictionaries." +msgstr "" + +#: ../../library/collections.rst:1068 +msgid "" +"Subclassing is not useful for adding new, stored fields. Instead, simply " +"create a new named tuple type from the :attr:`~somenamedtuple._fields` " +"attribute:" +msgstr "" + +#: ../../library/collections.rst:1073 +msgid "" +"Docstrings can be customized by making direct assignments to the ``__doc__`` " +"fields:" +msgstr "" + +#: ../../library/collections.rst:1082 +msgid "Property docstrings became writeable." +msgstr "" + +#: ../../library/collections.rst:1087 +msgid "" +"See :class:`typing.NamedTuple` for a way to add type hints for named " +"tuples. It also provides an elegant notation using the :keyword:`class` " +"keyword::" +msgstr "" + +#: ../../library/collections.rst:1091 +msgid "" +"class Component(NamedTuple):\n" +" part_number: int\n" +" weight: float\n" +" description: Optional[str] = None" +msgstr "" + +#: ../../library/collections.rst:1096 +msgid "" +"See :meth:`types.SimpleNamespace` for a mutable namespace based on an " +"underlying dictionary instead of a tuple." +msgstr "" + +#: ../../library/collections.rst:1099 +msgid "" +"The :mod:`dataclasses` module provides a decorator and functions for " +"automatically adding generated special methods to user-defined classes." +msgstr "" + +#: ../../library/collections.rst:1104 +msgid ":class:`OrderedDict` objects" +msgstr "" + +#: ../../library/collections.rst:1106 +msgid "" +"Ordered dictionaries are just like regular dictionaries but have some extra " +"capabilities relating to ordering operations. They have become less " +"important now that the built-in :class:`dict` class gained the ability to " +"remember insertion order (this new behavior became guaranteed in Python 3.7)." +msgstr "" + +#: ../../library/collections.rst:1112 +msgid "Some differences from :class:`dict` still remain:" +msgstr "" + +#: ../../library/collections.rst:1114 +msgid "" +"The regular :class:`dict` was designed to be very good at mapping " +"operations. Tracking insertion order was secondary." +msgstr "" + +#: ../../library/collections.rst:1117 +msgid "" +"The :class:`OrderedDict` was designed to be good at reordering operations. " +"Space efficiency, iteration speed, and the performance of update operations " +"were secondary." +msgstr "" + +#: ../../library/collections.rst:1121 +msgid "" +"The :class:`OrderedDict` algorithm can handle frequent reordering operations " +"better than :class:`dict`. As shown in the recipes below, this makes it " +"suitable for implementing various kinds of LRU caches." +msgstr "" + +#: ../../library/collections.rst:1125 +msgid "" +"The equality operation for :class:`OrderedDict` checks for matching order." +msgstr "" + +#: ../../library/collections.rst:1127 +msgid "" +"A regular :class:`dict` can emulate the order sensitive equality test with " +"``p == q and all(k1 == k2 for k1, k2 in zip(p, q))``." +msgstr "" + +#: ../../library/collections.rst:1130 +msgid "" +"The :meth:`~OrderedDict.popitem` method of :class:`OrderedDict` has a " +"different signature. It accepts an optional argument to specify which item " +"is popped." +msgstr "" + +#: ../../library/collections.rst:1133 +msgid "" +"A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=True)`` " +"with ``d.popitem()`` which is guaranteed to pop the rightmost (last) item." +msgstr "" + +#: ../../library/collections.rst:1136 +msgid "" +"A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=False)`` " +"with ``(k := next(iter(d)), d.pop(k))`` which will return and remove the " +"leftmost (first) item if it exists." +msgstr "" + +#: ../../library/collections.rst:1140 +msgid "" +":class:`OrderedDict` has a :meth:`~OrderedDict.move_to_end` method to " +"efficiently reposition an element to an endpoint." +msgstr "" + +#: ../../library/collections.rst:1143 +msgid "" +"A regular :class:`dict` can emulate OrderedDict's ``od.move_to_end(k, " +"last=True)`` with ``d[k] = d.pop(k)`` which will move the key and its " +"associated value to the rightmost (last) position." +msgstr "" + +#: ../../library/collections.rst:1147 +msgid "" +"A regular :class:`dict` does not have an efficient equivalent for " +"OrderedDict's ``od.move_to_end(k, last=False)`` which moves the key and its " +"associated value to the leftmost (first) position." +msgstr "" + +#: ../../library/collections.rst:1151 +msgid "" +"Until Python 3.8, :class:`dict` lacked a :meth:`~object.__reversed__` method." +msgstr "" + +#: ../../library/collections.rst:1158 +msgid "" +"Return an instance of a :class:`dict` subclass that has methods specialized " +"for rearranging dictionary order." +msgstr "" + +#: ../../library/collections.rst:1165 +msgid "" +"The :meth:`popitem` method for ordered dictionaries returns and removes a " +"(key, value) pair. The pairs are returned in :abbr:`LIFO (last-in, first-" +"out)` order if *last* is true or :abbr:`FIFO (first-in, first-out)` order if " +"false." +msgstr "" + +#: ../../library/collections.rst:1172 +msgid "" +"Move an existing *key* to either end of an ordered dictionary. The item is " +"moved to the right end if *last* is true (the default) or to the beginning " +"if *last* is false. Raises :exc:`KeyError` if the *key* does not exist:" +msgstr "" + +#: ../../library/collections.rst:1177 +msgid "" +">>> d = OrderedDict.fromkeys('abcde')\n" +">>> d.move_to_end('b')\n" +">>> ''.join(d)\n" +"'acdeb'\n" +">>> d.move_to_end('b', last=False)\n" +">>> ''.join(d)\n" +"'bacde'" +msgstr "" + +#: ../../library/collections.rst:1189 +msgid "" +"In addition to the usual mapping methods, ordered dictionaries also support " +"reverse iteration using :func:`reversed`." +msgstr "" + +#: ../../library/collections.rst:1194 +msgid "" +"Equality tests between :class:`OrderedDict` objects are order-sensitive and " +"are roughly equivalent to ``list(od1.items())==list(od2.items())``." +msgstr "" + +#: ../../library/collections.rst:1197 +msgid "" +"Equality tests between :class:`OrderedDict` objects and other :class:" +"`~collections.abc.Mapping` objects are order-insensitive like regular " +"dictionaries. This allows :class:`OrderedDict` objects to be substituted " +"anywhere a regular dictionary is used." +msgstr "" + +#: ../../library/collections.rst:1202 +msgid "" +"The items, keys, and values :term:`views ` of :class:" +"`OrderedDict` now support reverse iteration using :func:`reversed`." +msgstr "" + +#: ../../library/collections.rst:1206 +msgid "" +"With the acceptance of :pep:`468`, order is retained for keyword arguments " +"passed to the :class:`OrderedDict` constructor and its :meth:`~dict.update` " +"method." +msgstr "" + +#: ../../library/collections.rst:1216 +msgid ":class:`OrderedDict` Examples and Recipes" +msgstr "" + +#: ../../library/collections.rst:1218 +msgid "" +"It is straightforward to create an ordered dictionary variant that remembers " +"the order the keys were *last* inserted. If a new entry overwrites an " +"existing entry, the original insertion position is changed and moved to the " +"end::" +msgstr "" + +#: ../../library/collections.rst:1223 +msgid "" +"class LastUpdatedOrderedDict(OrderedDict):\n" +" 'Store items in the order that the keys were last updated.'\n" +"\n" +" def __setitem__(self, key, value):\n" +" super().__setitem__(key, value)\n" +" self.move_to_end(key)" +msgstr "" + +#: ../../library/collections.rst:1230 +msgid "" +"An :class:`OrderedDict` would also be useful for implementing variants of :" +"deco:`functools.lru_cache`:" +msgstr "" + +#: ../../library/collections.rst:1233 +msgid "" +"from collections import OrderedDict\n" +"from time import monotonic\n" +"\n" +"class TimeBoundedLRU:\n" +" \"LRU Cache that invalidates and refreshes old entries.\"\n" +"\n" +" def __init__(self, func, maxsize=128, maxage=30):\n" +" self.cache = OrderedDict() # { args : (timestamp, result)}\n" +" self.func = func\n" +" self.maxsize = maxsize\n" +" self.maxage = maxage\n" +"\n" +" def __call__(self, *args):\n" +" if args in self.cache:\n" +" self.cache.move_to_end(args)\n" +" timestamp, result = self.cache[args]\n" +" if monotonic() - timestamp <= self.maxage:\n" +" return result\n" +" result = self.func(*args)\n" +" self.cache[args] = monotonic(), result\n" +" if len(self.cache) > self.maxsize:\n" +" self.cache.popitem(last=False)\n" +" return result" +msgstr "" + +#: ../../library/collections.rst:1260 +msgid "" +"class MultiHitLRUCache:\n" +" \"\"\" LRU cache that defers caching a result until\n" +" it has been requested multiple times.\n" +"\n" +" To avoid flushing the LRU cache with one-time requests,\n" +" we don't cache until a request has been made more than once.\n" +"\n" +" \"\"\"\n" +"\n" +" def __init__(self, func, maxsize=128, maxrequests=4096, cache_after=1):\n" +" self.requests = OrderedDict() # { uncached_key : request_count }\n" +" self.cache = OrderedDict() # { cached_key : function_result }\n" +" self.func = func\n" +" self.maxrequests = maxrequests # max number of uncached requests\n" +" self.maxsize = maxsize # max number of stored return " +"values\n" +" self.cache_after = cache_after\n" +"\n" +" def __call__(self, *args):\n" +" if args in self.cache:\n" +" self.cache.move_to_end(args)\n" +" return self.cache[args]\n" +" result = self.func(*args)\n" +" self.requests[args] = self.requests.get(args, 0) + 1\n" +" if self.requests[args] <= self.cache_after:\n" +" self.requests.move_to_end(args)\n" +" if len(self.requests) > self.maxrequests:\n" +" self.requests.popitem(last=False)\n" +" else:\n" +" self.requests.pop(args, None)\n" +" self.cache[args] = result\n" +" if len(self.cache) > self.maxsize:\n" +" self.cache.popitem(last=False)\n" +" return result" +msgstr "" + +#: ../../library/collections.rst:1329 +msgid ":class:`UserDict` objects" +msgstr "" + +#: ../../library/collections.rst:1331 +msgid "" +"The class, :class:`UserDict` acts as a wrapper around dictionary objects. " +"The need for this class has been partially supplanted by the ability to " +"subclass directly from :class:`dict`; however, this class can be easier to " +"work with because the underlying dictionary is accessible as an attribute." +msgstr "" + +#: ../../library/collections.rst:1341 +msgid "" +"Class that simulates a dictionary. The instance's contents are kept in a " +"regular dictionary, which is accessible via the :attr:`data` attribute of :" +"class:`!UserDict` instances. If arguments are provided, they are used to " +"initialize :attr:`data`, like a regular dictionary." +msgstr "" + +#: ../../library/collections.rst:1346 +msgid "" +"In addition to supporting the methods and operations of mappings, :class:`!" +"UserDict` instances provide the following attribute:" +msgstr "" + +#: ../../library/collections.rst:1351 +msgid "" +"A real dictionary used to store the contents of the :class:`UserDict` class." +msgstr "" + +#: ../../library/collections.rst:1354 +msgid ":class:`!UserDict` instances also override the following method:" +msgstr "" + +#: ../../library/collections.rst:1358 +msgid "" +"Remove and return a ``(key, value)`` pair from the wrapped dictionary. Pairs " +"are returned in the same order as ``data.popitem()``. (For the default :meth:" +"`dict.popitem`, this order is :abbr:`LIFO (last-in, first-out)`.) If the " +"dictionary is empty, raises a :exc:`KeyError`." +msgstr "" + +#: ../../library/collections.rst:1364 +msgid ":class:`UserList` objects" +msgstr "" + +#: ../../library/collections.rst:1366 +msgid "" +"This class acts as a wrapper around list objects. It is a useful base class " +"for your own list-like classes which can inherit from them and override " +"existing methods or add new ones. In this way, one can add new behaviors to " +"lists." +msgstr "" + +#: ../../library/collections.rst:1371 +msgid "" +"The need for this class has been partially supplanted by the ability to " +"subclass directly from :class:`list`; however, this class can be easier to " +"work with because the underlying list is accessible as an attribute." +msgstr "" + +#: ../../library/collections.rst:1377 +msgid "" +"Class that simulates a list. The instance's contents are kept in a regular " +"list, which is accessible via the :attr:`data` attribute of :class:" +"`UserList` instances. The instance's contents are initially set to a copy " +"of *list*, defaulting to the empty list ``[]``. *list* can be any iterable, " +"for example a real Python list or a :class:`UserList` object." +msgstr "" + +#: ../../library/collections.rst:1383 +msgid "" +"In addition to supporting the methods and operations of mutable sequences, :" +"class:`UserList` instances provide the following attribute:" +msgstr "" + +#: ../../library/collections.rst:1388 +msgid "" +"A real :class:`list` object used to store the contents of the :class:" +"`UserList` class." +msgstr "" + +#: ../../library/collections.rst:1391 +msgid "" +"**Subclassing requirements:** Subclasses of :class:`UserList` are expected " +"to offer a constructor which can be called with either no arguments or one " +"argument. List operations which return a new sequence attempt to create an " +"instance of the actual implementation class. To do so, it assumes that the " +"constructor can be called with a single parameter, which is a sequence " +"object used as a data source." +msgstr "" + +#: ../../library/collections.rst:1398 +msgid "" +"If a derived class does not wish to comply with this requirement, all of the " +"special methods supported by this class will need to be overridden; please " +"consult the sources for information about the methods which need to be " +"provided in that case." +msgstr "" + +#: ../../library/collections.rst:1404 +msgid ":class:`UserString` objects" +msgstr "" + +#: ../../library/collections.rst:1406 +msgid "" +"The class, :class:`UserString` acts as a wrapper around string objects. The " +"need for this class has been partially supplanted by the ability to subclass " +"directly from :class:`str`; however, this class can be easier to work with " +"because the underlying string is accessible as an attribute." +msgstr "" + +#: ../../library/collections.rst:1414 +msgid "" +"Class that simulates a string object. The instance's content is kept in a " +"regular string object, which is accessible via the :attr:`data` attribute " +"of :class:`UserString` instances. The instance's contents are initially set " +"to a copy of *seq*. The *seq* argument can be any object which can be " +"converted into a string using the built-in :func:`str` function." +msgstr "" + +#: ../../library/collections.rst:1421 +msgid "" +"In addition to supporting the methods and operations of strings, :class:" +"`UserString` instances provide the following attribute:" +msgstr "" + +#: ../../library/collections.rst:1426 +msgid "" +"A real :class:`str` object used to store the contents of the :class:" +"`UserString` class." +msgstr "" + +#: ../../library/collections.rst:1429 +msgid "" +"New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, " +"``isprintable``, and ``maketrans``." +msgstr "" diff --git a/library/colorsys.po b/library/colorsys.po index b44ac1cf..86cec88f 100644 --- a/library/colorsys.po +++ b/library/colorsys.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -38,9 +38,9 @@ msgstr "" #: ../../library/colorsys.rst:21 msgid "" -"More information about color spaces can be found at https://poynton.ca/" -"ColorFAQ.html and https://www.cambridgeincolour.com/tutorials/color-spaces." -"htm." +"More information about color spaces can be found at https://www.poynton.ca/" +"pdf/ColourFAQ.pdf and https://www.cambridgeincolour.com/tutorials/color-" +"spaces.htm." msgstr "" #: ../../library/colorsys.rst:25 diff --git a/library/colorsys.po~ b/library/colorsys.po~ new file mode 100644 index 00000000..b44ac1cf --- /dev/null +++ b/library/colorsys.po~ @@ -0,0 +1,85 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:01+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/colorsys.rst:2 +msgid ":mod:`!colorsys` --- Conversions between color systems" +msgstr "" + +#: ../../library/colorsys.rst:7 +msgid "**Source code:** :source:`Lib/colorsys.py`" +msgstr "" + +#: ../../library/colorsys.rst:11 +msgid "" +"The :mod:`!colorsys` module defines bidirectional conversions of color " +"values between colors expressed in the RGB (Red Green Blue) color space used " +"in computer monitors and three other coordinate systems: YIQ, HLS (Hue " +"Lightness Saturation) and HSV (Hue Saturation Value). Coordinates in all of " +"these color spaces are floating-point values. In the YIQ space, the Y " +"coordinate is between 0 and 1, but the I and Q coordinates can be positive " +"or negative. In all other spaces, the coordinates are all between 0 and 1." +msgstr "" + +#: ../../library/colorsys.rst:21 +msgid "" +"More information about color spaces can be found at https://poynton.ca/" +"ColorFAQ.html and https://www.cambridgeincolour.com/tutorials/color-spaces." +"htm." +msgstr "" + +#: ../../library/colorsys.rst:25 +msgid "The :mod:`!colorsys` module defines the following functions:" +msgstr "" + +#: ../../library/colorsys.rst:30 +msgid "Convert the color from RGB coordinates to YIQ coordinates." +msgstr "" + +#: ../../library/colorsys.rst:35 +msgid "Convert the color from YIQ coordinates to RGB coordinates." +msgstr "" + +#: ../../library/colorsys.rst:40 +msgid "Convert the color from RGB coordinates to HLS coordinates." +msgstr "" + +#: ../../library/colorsys.rst:45 +msgid "Convert the color from HLS coordinates to RGB coordinates." +msgstr "" + +#: ../../library/colorsys.rst:50 +msgid "Convert the color from RGB coordinates to HSV coordinates." +msgstr "" + +#: ../../library/colorsys.rst:55 +msgid "Convert the color from HSV coordinates to RGB coordinates." +msgstr "" + +#: ../../library/colorsys.rst:57 +msgid "Example::" +msgstr "" + +#: ../../library/colorsys.rst:59 +msgid "" +">>> import colorsys\n" +">>> colorsys.rgb_to_hsv(0.2, 0.4, 0.4)\n" +"(0.5, 0.5, 0.4)\n" +">>> colorsys.hsv_to_rgb(0.5, 0.5, 0.4)\n" +"(0.2, 0.4, 0.4)" +msgstr "" diff --git a/library/concurrent.interpreters.po b/library/concurrent.interpreters.po index 0a1f4cd4..4dd298ee 100644 --- a/library/concurrent.interpreters.po +++ b/library/concurrent.interpreters.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -311,7 +311,7 @@ msgstr "" #: ../../library/concurrent.interpreters.rst:194 msgid "" -"There is a small number of Python types that actually share mutable data " +"There are a small number of Python types that actually share mutable data " "between interpreters:" msgstr "" @@ -416,8 +416,8 @@ msgstr "" #: ../../library/concurrent.interpreters.rst:277 msgid "" -"Return the result of calling running the given function in the interpreter " -"(in the current thread)." +"Return the result of running the given function in the interpreter (in the " +"current thread)." msgstr "" #: ../../library/concurrent.interpreters.rst:284 diff --git a/library/concurrent.interpreters.po~ b/library/concurrent.interpreters.po~ new file mode 100644 index 00000000..0a1f4cd4 --- /dev/null +++ b/library/concurrent.interpreters.po~ @@ -0,0 +1,528 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:01+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/concurrent.interpreters.rst:2 +msgid "" +":mod:`!concurrent.interpreters` --- Multiple interpreters in the same process" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:9 +msgid "**Source code:** :source:`Lib/concurrent/interpreters`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:13 +msgid "" +"The :mod:`!concurrent.interpreters` module constructs higher-level " +"interfaces on top of the lower level :mod:`!_interpreters` module." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:16 +msgid "" +"The module is primarily meant to provide a basic API for managing " +"interpreters (AKA \"subinterpreters\") and running things in them. Running " +"mostly involves switching to an interpreter (in the current thread) and " +"calling a function in that execution context." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:21 +msgid "" +"For concurrency, interpreters themselves (and this module) don't provide " +"much more than isolation, which on its own isn't useful. Actual concurrency " +"is available separately through :mod:`threads ` -- see `below " +"`_." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:28 +msgid ":class:`~concurrent.futures.InterpreterPoolExecutor`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:29 +msgid "Combines threads with interpreters in a familiar interface." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:33 +msgid ":ref:`isolating-extensions-howto`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:34 +msgid "How to update an extension module to support multiple interpreters." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:36 +msgid ":pep:`554`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:38 +msgid ":pep:`734`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:40 +msgid ":pep:`684`" +msgstr "" + +#: ../../includes/wasm-notavail.rst:3 +msgid "Availability" +msgstr "" + +#: ../../includes/wasm-notavail.rst:5 +msgid "" +"This module does not work or is not available on WebAssembly. See :ref:`wasm-" +"availability` for more information." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:48 +msgid "Key details" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:50 +msgid "" +"Before we dive in further, there are a small number of details to keep in " +"mind about using multiple interpreters:" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:53 +msgid "`isolated `_, by default" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:54 +msgid "no implicit threads" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:55 +msgid "not all PyPI packages support use in multiple interpreters yet" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:63 +msgid "Introduction" +msgstr "Einführung" + +#: ../../library/concurrent.interpreters.rst:65 +msgid "" +"An \"interpreter\" is effectively the execution context of the Python " +"runtime. It contains all of the state the runtime needs to execute a " +"program. This includes things like the import state and builtins. (Each " +"thread, even if there's only the main thread, has some extra runtime state, " +"in addition to the current interpreter, related to the current exception and " +"the bytecode eval loop.)" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:72 +msgid "" +"The concept and functionality of the interpreter have been a part of Python " +"since version 2.2, but the feature was only available through the C-API and " +"not well known, and the `isolation `_ was relatively " +"incomplete until version 3.12." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:80 +msgid "Multiple Interpreters and Isolation" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:82 +msgid "" +"A Python implementation may support using multiple interpreters in the same " +"process. CPython has this support. Each interpreter is effectively " +"isolated from the others (with a limited number of carefully managed process-" +"global exceptions to the rule)." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:87 +msgid "" +"That isolation is primarily useful as a strong separation between distinct " +"logical components of a program, where you want to have careful control of " +"how those components interact." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:93 +msgid "" +"Interpreters in the same process can technically never be strictly isolated " +"from one another since there are few restrictions on memory access within " +"the same process. The Python runtime makes a best effort at isolation but " +"extension modules may easily violate that. Therefore, do not use multiple " +"interpreters in security-sensitive situations, where they shouldn't have " +"access to each other's data." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:101 +msgid "Running in an Interpreter" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:103 +msgid "" +"Running in a different interpreter involves switching to it in the current " +"thread and then calling some function. The runtime will execute the " +"function using the current interpreter's state. The :mod:`!concurrent." +"interpreters` module provides a basic API for creating and managing " +"interpreters, as well as the switch-and-call operation." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:110 +msgid "" +"No other threads are automatically started for the operation. There is `a " +"helper `_ for that though. There is another " +"dedicated helper for calling the builtin :func:`exec` in an interpreter." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:115 +msgid "" +"When :func:`exec` (or :func:`eval`) are called in an interpreter, they run " +"using the interpreter's :mod:`!__main__` module as the \"globals\" " +"namespace. The same is true for functions that aren't associated with any " +"module. This is the same as how scripts invoked from the command-line run " +"in the :mod:`!__main__` module." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:125 +msgid "Concurrency and Parallelism" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:127 +msgid "" +"As noted earlier, interpreters do not provide any concurrency on their own. " +"They strictly represent the isolated execution context the runtime will use " +"*in the current thread*. That isolation makes them similar to processes, " +"but they still enjoy in-process efficiency, like threads." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:133 +msgid "" +"All that said, interpreters do naturally support certain flavors of " +"concurrency. There's a powerful side effect of that isolation. It enables a " +"different approach to concurrency than you can take with async or threads. " +"It's a similar concurrency model to CSP or the actor model, a model which is " +"relatively easy to reason about." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:140 +msgid "" +"You can take advantage of that concurrency model in a single thread, " +"switching back and forth between interpreters, Stackless-style. However, " +"this model is more useful when you combine interpreters with multiple " +"threads. This mostly involves starting a new thread, where you switch to " +"another interpreter and run what you want there." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:146 +msgid "" +"Each actual thread in Python, even if you're only running in the main " +"thread, has its own *current* execution context. Multiple threads can use " +"the same interpreter or different ones." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:150 +msgid "" +"At a high level, you can think of the combination of threads and " +"interpreters as threads with opt-in sharing." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:153 +msgid "" +"As a significant bonus, interpreters are sufficiently isolated that they do " +"not share the :term:`GIL`, which means combining threads with multiple " +"interpreters enables full multi-core parallelism. (This has been the case " +"since Python 3.12.)" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:159 +msgid "Communication Between Interpreters" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:161 +msgid "" +"In practice, multiple interpreters are useful only if we have a way to " +"communicate between them. This usually involves some form of message " +"passing, but can even mean sharing data in some carefully managed way." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:166 +msgid "" +"With this in mind, the :mod:`!concurrent.interpreters` module provides a :" +"class:`queue.Queue` implementation, available through :func:`create_queue`." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:173 +msgid "\"Sharing\" Objects" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:175 +msgid "" +"Any data actually shared between interpreters loses the thread-safety " +"provided by the :term:`GIL`. There are various options for dealing with " +"this in extension modules. However, from Python code the lack of thread-" +"safety means objects can't actually be shared, with a few exceptions. " +"Instead, a copy must be created, which means mutable objects won't stay in " +"sync." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:182 +msgid "" +"By default, most objects are copied with :mod:`pickle` when they are passed " +"to another interpreter. Nearly all of the immutable builtin objects are " +"either directly shared or copied efficiently. For example:" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:186 +msgid ":const:`None`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:187 +msgid ":class:`bool` (:const:`True` and :const:`False`)" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:188 +msgid ":class:`bytes`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:189 +msgid ":class:`str`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:190 +msgid ":class:`int`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:191 +msgid ":class:`float`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:192 +msgid ":class:`tuple` (of similarly supported objects)" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:194 +msgid "" +"There is a small number of Python types that actually share mutable data " +"between interpreters:" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:197 +msgid ":class:`memoryview`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:198 +msgid ":class:`Queue`" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:202 +msgid "Reference" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:204 +msgid "This module defines the following functions:" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:208 +msgid "" +"Return a :class:`list` of :class:`Interpreter` objects, one for each " +"existing interpreter." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:213 +msgid "" +"Return an :class:`Interpreter` object for the currently running interpreter." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:218 +msgid "" +"Return an :class:`Interpreter` object for the main interpreter. This is the " +"interpreter the runtime created to run the :term:`REPL` or the script given " +"at the command-line. It is usually the only one." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:224 +msgid "" +"Initialize a new (idle) Python interpreter and return a :class:`Interpreter` " +"object for it." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:229 +msgid "" +"Initialize a new cross-interpreter queue and return a :class:`Queue` object " +"for it." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:234 +msgid "Interpreter objects" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:238 +msgid "A single interpreter in the current process." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:240 +msgid "" +"Generally, :class:`Interpreter` shouldn't be called directly. Instead, use :" +"func:`create` or one of the other module functions." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:245 +#: ../../library/concurrent.interpreters.rst:251 +#: ../../library/concurrent.interpreters.rst:330 +msgid "(read-only)" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:247 +msgid "The underlying interpreter's ID." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:253 +msgid "A string describing where the interpreter came from." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:257 +msgid "" +"Return ``True`` if the interpreter is currently executing code in its :mod:`!" +"__main__` module and ``False`` otherwise." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:262 +msgid "Finalize and destroy the interpreter." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:266 +msgid "Bind objects in the interpreter's :mod:`!__main__` module." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:268 +#: ../../library/concurrent.interpreters.rst:325 +msgid "" +"Some objects are actually shared and some are copied efficiently, but most " +"are copied via :mod:`pickle`. See :ref:`interp-object-sharing`." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:273 +msgid "Run the given source code in the interpreter (in the current thread)." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:277 +msgid "" +"Return the result of calling running the given function in the interpreter " +"(in the current thread)." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:284 +msgid "Run the given function in the interpreter (in a new thread)." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:287 +msgid "Exceptions" +msgstr "Ausnahmen" + +#: ../../library/concurrent.interpreters.rst:291 +msgid "" +"This exception, a subclass of :exc:`Exception`, is raised when an " +"interpreter-related error happens." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:296 +msgid "" +"This exception, a subclass of :exc:`InterpreterError`, is raised when the " +"targeted interpreter no longer exists." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:301 +msgid "" +"This exception, a subclass of :exc:`InterpreterError`, is raised when the " +"running code raised an uncaught exception." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:306 +msgid "A basic snapshot of the exception raised in the other interpreter." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:312 +msgid "" +"This exception, a subclass of :exc:`TypeError`, is raised when an object " +"cannot be sent to another interpreter." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:317 +msgid "Communicating Between Interpreters" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:321 +msgid "" +"A wrapper around a low-level, cross-interpreter queue, which implements the :" +"class:`queue.Queue` interface. The underlying queue can only be created " +"through :func:`create_queue`." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:332 +msgid "The queue's ID." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:337 +msgid "" +"This exception, a subclass of :exc:`queue.Empty`, is raised from :meth:`!" +"Queue.get` and :meth:`!Queue.get_nowait` when the queue is empty." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:343 +msgid "" +"This exception, a subclass of :exc:`queue.Full`, is raised from :meth:`!" +"Queue.put` and :meth:`!Queue.put_nowait` when the queue is full." +msgstr "" + +#: ../../library/concurrent.interpreters.rst:349 +msgid "Basic usage" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:351 +msgid "Creating an interpreter and running code in it::" +msgstr "" + +#: ../../library/concurrent.interpreters.rst:353 +msgid "" +"from concurrent import interpreters\n" +"\n" +"interp = interpreters.create()\n" +"\n" +"# Run in the current OS thread.\n" +"\n" +"interp.exec('print(\"spam!\")')\n" +"\n" +"interp.exec(\"\"\"if True:\n" +" print('spam!')\n" +" \"\"\")\n" +"\n" +"from textwrap import dedent\n" +"interp.exec(dedent(\"\"\"\n" +" print('spam!')\n" +" \"\"\"))\n" +"\n" +"def run(arg):\n" +" return arg\n" +"\n" +"res = interp.call(run, 'spam!')\n" +"print(res)\n" +"\n" +"def run():\n" +" print('spam!')\n" +"\n" +"interp.call(run)\n" +"\n" +"# Run in new OS thread.\n" +"\n" +"t = interp.call_in_thread(run)\n" +"t.join()" +msgstr "" diff --git a/library/csv.po b/library/csv.po index 6ecfdb65..f66e12fe 100644 --- a/library/csv.po +++ b/library/csv.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -448,20 +448,22 @@ msgstr "" msgid "" "Instructs :class:`writer` objects to only quote those fields which contain " "special characters such as *delimiter*, *quotechar*, ``'\\r'``, ``'\\n'`` or " -"any of the characters in *lineterminator*." +"any of the characters in *lineterminator*. If *doublequote* is :const:" +"`False` and *escapechar* is set, the *quotechar* is escaped instead of " +"causing the field to be quoted." msgstr "" -#: ../../library/csv.rst:376 +#: ../../library/csv.rst:378 msgid "Instructs :class:`writer` objects to quote all non-numeric fields." msgstr "" -#: ../../library/csv.rst:378 +#: ../../library/csv.rst:380 msgid "" "Instructs :class:`reader` objects to convert all non-quoted fields to type :" "class:`float`." msgstr "" -#: ../../library/csv.rst:381 +#: ../../library/csv.rst:383 msgid "" "Some numeric types, such as :class:`bool`, :class:`~fractions.Fraction`, or :" "class:`~enum.IntEnum`, have a string representation that cannot be converted " @@ -469,7 +471,7 @@ msgid "" "data:`QUOTE_STRINGS` modes." msgstr "" -#: ../../library/csv.rst:389 +#: ../../library/csv.rst:391 msgid "" "Instructs :class:`writer` objects to never quote fields. When the current " "*delimiter*, *quotechar*, *escapechar*, ``'\\r'``, ``'\\n'`` or any of the " @@ -479,51 +481,51 @@ msgid "" "Set *quotechar* to ``None`` to prevent its escaping." msgstr "" -#: ../../library/csv.rst:397 +#: ../../library/csv.rst:399 msgid "" "Instructs :class:`reader` objects to perform no special processing of quote " "characters." msgstr "" -#: ../../library/csv.rst:401 +#: ../../library/csv.rst:403 msgid "" "Instructs :class:`writer` objects to quote all fields which are not " "``None``. This is similar to :data:`QUOTE_ALL`, except that if a field " "value is ``None`` an empty (unquoted) string is written." msgstr "" -#: ../../library/csv.rst:405 +#: ../../library/csv.rst:407 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) field as " "``None`` and to otherwise behave as :data:`QUOTE_ALL`." msgstr "" -#: ../../library/csv.rst:412 +#: ../../library/csv.rst:414 msgid "" "Instructs :class:`writer` objects to always place quotes around fields which " "are strings. This is similar to :data:`QUOTE_NONNUMERIC`, except that if a " "field value is ``None`` an empty (unquoted) string is written." msgstr "" -#: ../../library/csv.rst:416 +#: ../../library/csv.rst:418 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) string as " "``None`` and to otherwise behave as :data:`QUOTE_NONNUMERIC`." msgstr "" -#: ../../library/csv.rst:421 +#: ../../library/csv.rst:423 msgid "The :mod:`!csv` module defines the following exception:" msgstr "" -#: ../../library/csv.rst:426 +#: ../../library/csv.rst:428 msgid "Raised by any of the functions when an error is detected." msgstr "" -#: ../../library/csv.rst:431 +#: ../../library/csv.rst:433 msgid "Dialects and Formatting Parameters" msgstr "" -#: ../../library/csv.rst:433 +#: ../../library/csv.rst:435 msgid "" "To make it easier to specify the format of input and output records, " "specific formatting parameters are grouped together into dialects. A " @@ -536,16 +538,16 @@ msgid "" "attributes defined below for the :class:`Dialect` class." msgstr "" -#: ../../library/csv.rst:443 +#: ../../library/csv.rst:445 msgid "Dialects support the following attributes:" msgstr "" -#: ../../library/csv.rst:448 +#: ../../library/csv.rst:450 msgid "" "A one-character string used to separate fields. It defaults to ``','``." msgstr "" -#: ../../library/csv.rst:453 +#: ../../library/csv.rst:455 msgid "" "Controls how instances of *quotechar* appearing inside a field should " "themselves be quoted. When :const:`True`, the character is doubled. When :" @@ -553,57 +555,62 @@ msgid "" "defaults to :const:`True`." msgstr "" -#: ../../library/csv.rst:458 +#: ../../library/csv.rst:460 msgid "" "On output, if *doublequote* is :const:`False` and no *escapechar* is set, :" "exc:`Error` is raised if a *quotechar* is found in a field." msgstr "" -#: ../../library/csv.rst:464 +#: ../../library/csv.rst:466 msgid "" "A one-character string used by the writer to escape characters that require " "escaping:" msgstr "" -#: ../../library/csv.rst:467 +#: ../../library/csv.rst:469 msgid "" "the *delimiter*, the *quotechar*, ``'\\r'``, ``'\\n'`` and any of the " "characters in *lineterminator* are escaped if *quoting* is set to :const:" "`QUOTE_NONE`;" msgstr "" -#: ../../library/csv.rst:470 +#: ../../library/csv.rst:472 msgid "the *quotechar* is escaped if *doublequote* is :const:`False`;" msgstr "" -#: ../../library/csv.rst:471 +#: ../../library/csv.rst:473 msgid "the *escapechar* itself." msgstr "" -#: ../../library/csv.rst:473 +#: ../../library/csv.rst:475 msgid "" "On reading, the *escapechar* removes any special meaning from the following " "character. It defaults to :const:`None`, which disables escaping." msgstr "" -#: ../../library/csv.rst:476 +#: ../../library/csv.rst:478 +msgid "" +"Previously the *escapechar* itself was not escaped, which lost it on reading." +msgstr "" + +#: ../../library/csv.rst:482 msgid "An empty *escapechar* is not allowed." msgstr "" -#: ../../library/csv.rst:481 +#: ../../library/csv.rst:487 msgid "" "The string used to terminate lines produced by the :class:`writer`. It " "defaults to ``'\\r\\n'``." msgstr "" -#: ../../library/csv.rst:486 +#: ../../library/csv.rst:492 msgid "" "The :class:`reader` is hard-coded to recognise either ``'\\r'`` or ``'\\n'`` " "as end-of-line, and ignores *lineterminator*. This behavior may change in " "the future." msgstr "" -#: ../../library/csv.rst:493 +#: ../../library/csv.rst:499 msgid "" "A one-character string used to quote fields containing special characters, " "such as the *delimiter* or the *quotechar*, or which contain new-line " @@ -612,11 +619,11 @@ msgid "" "prevent escaping ``'\"'`` if *quoting* is set to :const:`QUOTE_NONE`." msgstr "" -#: ../../library/csv.rst:500 +#: ../../library/csv.rst:506 msgid "An empty *quotechar* is not allowed." msgstr "" -#: ../../library/csv.rst:505 +#: ../../library/csv.rst:511 msgid "" "Controls when quotes should be generated by the writer and recognised by the " "reader. It can take on any of the :ref:`QUOTE_\\* constants , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:01+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/csv.rst:2 +msgid ":mod:`!csv` --- CSV File Reading and Writing" +msgstr "" + +#: ../../library/csv.rst:7 +msgid "**Source code:** :source:`Lib/csv.py`" +msgstr "" + +#: ../../library/csv.rst:15 +msgid "" +"The so-called CSV (Comma Separated Values) format is the most common import " +"and export format for spreadsheets and databases. CSV format was used for " +"many years prior to attempts to describe the format in a standardized way " +"in :rfc:`4180`. The lack of a well-defined standard means that subtle " +"differences often exist in the data produced and consumed by different " +"applications. These differences can make it annoying to process CSV files " +"from multiple sources. Still, while the delimiters and quoting characters " +"vary, the overall format is similar enough that it is possible to write a " +"single module which can efficiently manipulate such data, hiding the details " +"of reading and writing the data from the programmer." +msgstr "" + +#: ../../library/csv.rst:26 +msgid "" +"The :mod:`!csv` module implements classes to read and write tabular data in " +"CSV format. It allows programmers to say, \"write this data in the format " +"preferred by Excel,\" or \"read data from this file which was generated by " +"Excel,\" without knowing the precise details of the CSV format used by " +"Excel. Programmers can also describe the CSV formats understood by other " +"applications or define their own special-purpose CSV formats." +msgstr "" + +#: ../../library/csv.rst:33 +msgid "" +"The :mod:`!csv` module's :class:`reader` and :class:`writer` objects read " +"and write sequences. Programmers can also read and write data in dictionary " +"form using the :class:`DictReader` and :class:`DictWriter` classes." +msgstr "" + +#: ../../library/csv.rst:39 +msgid ":pep:`305` - CSV File API" +msgstr "" + +#: ../../library/csv.rst:40 +msgid "The Python Enhancement Proposal which proposed this addition to Python." +msgstr "" + +#: ../../library/csv.rst:46 +msgid "Module Contents" +msgstr "" + +#: ../../library/csv.rst:48 +msgid "The :mod:`!csv` module defines the following functions:" +msgstr "" + +#: ../../library/csv.rst:56 +msgid "" +"Return a :ref:`reader object ` that will process lines from " +"the given *csvfile*. A csvfile must be an iterable of strings, each in the " +"reader's defined csv format. A csvfile is most commonly a file-like object " +"or list. If *csvfile* is a file object, it should be opened with " +"``newline=''``. [1]_ An optional *dialect* parameter can be given which is " +"used to define a set of parameters specific to a particular CSV dialect. It " +"may be an instance of a subclass of the :class:`Dialect` class or one of the " +"strings returned by the :func:`list_dialects` function. The other optional " +"*fmtparams* keyword arguments can be given to override individual formatting " +"parameters in the current dialect. For full details about the dialect and " +"formatting parameters, see section :ref:`csv-fmt-params`." +msgstr "" + +#: ../../library/csv.rst:70 +msgid "" +"Each row read from the csv file is returned as a list of strings. No " +"automatic data type conversion is performed unless the :data:" +"`QUOTE_NONNUMERIC` format option is specified (in which case unquoted fields " +"are transformed into floats)." +msgstr "" + +#: ../../library/csv.rst:74 ../../library/csv.rst:111 ../../library/csv.rst:194 +#: ../../library/csv.rst:240 +msgid "A short usage example::" +msgstr "" + +#: ../../library/csv.rst:76 +msgid "" +">>> import csv\n" +">>> with open('eggs.csv', newline='') as csvfile:\n" +"... spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')\n" +"... for row in spamreader:\n" +"... print(', '.join(row))\n" +"Spam, Spam, Spam, Spam, Spam, Baked Beans\n" +"Spam, Lovely Spam, Wonderful Spam" +msgstr "" + +#: ../../library/csv.rst:84 +msgid "where :file:`eggs.csv` contains:" +msgstr "" + +#: ../../library/csv.rst:86 ../../library/csv.rst:122 +msgid "" +"Spam Spam Spam Spam Spam |Baked Beans|\n" +"Spam |Lovely Spam| |Wonderful Spam|" +msgstr "" + +#: ../../library/csv.rst:94 +msgid "" +"Return a writer object responsible for converting the user's data into " +"delimited strings on the given file-like object. *csvfile* can be any " +"object with a :meth:`~io.TextIOBase.write` method. If *csvfile* is a file " +"object, it should be opened with ``newline=''`` [1]_. An optional *dialect* " +"parameter can be given which is used to define a set of parameters specific " +"to a particular CSV dialect. It may be an instance of a subclass of the :" +"class:`Dialect` class or one of the strings returned by the :func:" +"`list_dialects` function. The other optional *fmtparams* keyword arguments " +"can be given to override individual formatting parameters in the current " +"dialect. For full details about dialects and formatting parameters, see " +"the :ref:`csv-fmt-params` section. To make it as easy as possible to " +"interface with modules which implement the DB API, the value :const:`None` " +"is written as the empty string. While this isn't a reversible " +"transformation, it makes it easier to dump SQL NULL data values to CSV files " +"without preprocessing the data returned from a ``cursor.fetch*`` call. All " +"other non-string data are stringified with :func:`str` before being written." +msgstr "" + +#: ../../library/csv.rst:113 +msgid "" +"import csv\n" +"with open('eggs.csv', 'w', newline='') as csvfile:\n" +" spamwriter = csv.writer(csvfile, delimiter=' ',\n" +" quotechar='|', quoting=csv.QUOTE_MINIMAL)\n" +" spamwriter.writerow(['Spam'] * 5 + ['Baked Beans'])\n" +" spamwriter.writerow(['Spam', 'Lovely Spam', 'Wonderful Spam'])" +msgstr "" + +#: ../../library/csv.rst:120 +msgid "which writes :file:`eggs.csv` containing:" +msgstr "" + +#: ../../library/csv.rst:130 +msgid "" +"Associate *dialect* with *name*. *name* must be a string. The dialect can " +"be specified either by passing a sub-class of :class:`Dialect`, or by " +"*fmtparams* keyword arguments, or both, with keyword arguments overriding " +"parameters of the dialect. For full details about dialects and formatting " +"parameters, see section :ref:`csv-fmt-params`." +msgstr "" + +#: ../../library/csv.rst:139 +msgid "" +"Delete the dialect associated with *name* from the dialect registry. An :" +"exc:`Error` is raised if *name* is not a registered dialect name." +msgstr "" + +#: ../../library/csv.rst:145 +msgid "" +"Return the dialect associated with *name*. An :exc:`Error` is raised if " +"*name* is not a registered dialect name. This function returns an " +"immutable :class:`Dialect`." +msgstr "" + +#: ../../library/csv.rst:151 +msgid "Return the names of all registered dialects." +msgstr "" + +#: ../../library/csv.rst:157 +msgid "" +"Returns the current maximum field size allowed by the parser. If *new_limit* " +"is given, this becomes the new limit." +msgstr "" + +#: ../../library/csv.rst:161 +msgid "The :mod:`!csv` module defines the following classes:" +msgstr "" + +#: ../../library/csv.rst:166 +msgid "" +"Create an object that operates like a regular reader but maps the " +"information in each row to a :class:`dict` whose keys are given by the " +"optional *fieldnames* parameter." +msgstr "" + +#: ../../library/csv.rst:170 +msgid "" +"The *fieldnames* parameter is a :term:`sequence`. If *fieldnames* is " +"omitted, the values in the first row of file *f* will be used as the " +"fieldnames and will be omitted from the results. If *fieldnames* is " +"provided, they will be used and the first row will be included in the " +"results. Regardless of how the fieldnames are determined, the dictionary " +"preserves their original ordering." +msgstr "" + +#: ../../library/csv.rst:177 +msgid "" +"If a row has more fields than fieldnames, the remaining data is put in a " +"list and stored with the fieldname specified by *restkey* (which defaults to " +"``None``). If a non-blank row has fewer fields than fieldnames, the missing " +"values are filled-in with the value of *restval* (which defaults to " +"``None``)." +msgstr "" + +#: ../../library/csv.rst:183 +msgid "" +"All other optional or keyword arguments are passed to the underlying :class:" +"`reader` instance." +msgstr "" + +#: ../../library/csv.rst:186 ../../library/csv.rst:238 +msgid "" +"If the argument passed to *fieldnames* is an iterator, it will be coerced to " +"a :class:`list`." +msgstr "" + +#: ../../library/csv.rst:188 +msgid "Returned rows are now of type :class:`OrderedDict`." +msgstr "" + +#: ../../library/csv.rst:191 +msgid "Returned rows are now of type :class:`dict`." +msgstr "" + +#: ../../library/csv.rst:196 +msgid "" +">>> import csv\n" +">>> with open('names.csv', newline='') as csvfile:\n" +"... reader = csv.DictReader(csvfile)\n" +"... for row in reader:\n" +"... print(row['first_name'], row['last_name'])\n" +"...\n" +"Eric Idle\n" +"John Cleese\n" +"\n" +">>> print(row)\n" +"{'first_name': 'John', 'last_name': 'Cleese'}" +msgstr "" + +#: ../../library/csv.rst:208 +msgid "where :file:`names.csv` contains:" +msgstr "" + +#: ../../library/csv.rst:210 +msgid "" +"first_name,last_name\n" +"Eric,Idle\n" +"John,Cleese" +msgstr "" + +#: ../../library/csv.rst:220 +msgid "" +"Create an object which operates like a regular writer but maps dictionaries " +"onto output rows. The *fieldnames* parameter is a :mod:`sequence " +"` of keys that identify the order in which values in the " +"dictionary passed to the :meth:`~csvwriter.writerow` method are written to " +"file *f*. The optional *restval* parameter specifies the value to be " +"written if the dictionary is missing a key in *fieldnames*. If the " +"dictionary passed to the :meth:`~csvwriter.writerow` method contains a key " +"not found in *fieldnames*, the optional *extrasaction* parameter indicates " +"what action to take. If it is set to ``'raise'``, the default value, a :exc:" +"`ValueError` is raised. If it is set to ``'ignore'``, extra values in the " +"dictionary are ignored. Any other optional or keyword arguments are passed " +"to the underlying :class:`writer` instance." +msgstr "" + +#: ../../library/csv.rst:235 +msgid "" +"Note that unlike the :class:`DictReader` class, the *fieldnames* parameter " +"of the :class:`DictWriter` class is not optional." +msgstr "" + +#: ../../library/csv.rst:242 +msgid "" +"import csv\n" +"\n" +"with open('names.csv', 'w', newline='') as csvfile:\n" +" fieldnames = ['first_name', 'last_name']\n" +" writer = csv.DictWriter(csvfile, fieldnames=fieldnames)\n" +"\n" +" writer.writeheader()\n" +" writer.writerow({'first_name': 'Baked', 'last_name': 'Beans'})\n" +" writer.writerow({'first_name': 'Lovely', 'last_name': 'Spam'})\n" +" writer.writerow({'first_name': 'Wonderful', 'last_name': 'Spam'})" +msgstr "" + +#: ../../library/csv.rst:253 +msgid "which writes :file:`names.csv` containing:" +msgstr "" + +#: ../../library/csv.rst:255 +msgid "" +"first_name,last_name\n" +"Baked,Beans\n" +"Lovely,Spam\n" +"Wonderful,Spam" +msgstr "" + +#: ../../library/csv.rst:265 +msgid "" +"The :class:`Dialect` class is a container class whose attributes contain " +"information for how to handle doublequotes, whitespace, delimiters, etc. Due " +"to the lack of a strict CSV specification, different applications produce " +"subtly different CSV data. :class:`Dialect` instances define how :class:" +"`reader` and :class:`writer` instances behave." +msgstr "" + +#: ../../library/csv.rst:271 +msgid "" +"All available :class:`Dialect` names are returned by :func:`list_dialects`, " +"and they can be registered with specific :class:`reader` and :class:`writer` " +"classes through their initializer (``__init__``) functions like this::" +msgstr "" + +#: ../../library/csv.rst:275 +msgid "" +"import csv\n" +"\n" +"with open('students.csv', 'w', newline='') as csvfile:\n" +" writer = csv.writer(csvfile, dialect='unix')" +msgstr "" + +#: ../../library/csv.rst:283 +msgid "" +"The :class:`excel` class defines the usual properties of an Excel-generated " +"CSV file. It is registered with the dialect name ``'excel'``." +msgstr "" + +#: ../../library/csv.rst:289 +msgid "" +"The :class:`excel_tab` class defines the usual properties of an Excel-" +"generated TAB-delimited file. It is registered with the dialect name " +"``'excel-tab'``." +msgstr "" + +#: ../../library/csv.rst:295 +msgid "" +"The :class:`unix_dialect` class defines the usual properties of a CSV file " +"generated on UNIX systems, i.e. using ``'\\n'`` as line terminator and " +"quoting all fields. It is registered with the dialect name ``'unix'``." +msgstr "" + +#: ../../library/csv.rst:304 +msgid "The :class:`Sniffer` class is used to deduce the format of a CSV file." +msgstr "" + +#: ../../library/csv.rst:306 +msgid "The :class:`Sniffer` class provides two methods:" +msgstr "" + +#: ../../library/csv.rst:310 +msgid "" +"Analyze the given *sample* and return a :class:`Dialect` subclass reflecting " +"the parameters found. If the optional *delimiters* parameter is given, it " +"is interpreted as a string containing possible valid delimiter characters." +msgstr "" + +#: ../../library/csv.rst:315 +msgid "" +"If several delimiters fit the sample equally well --- for example if both " +"``','`` and ``';'`` split every row consistently --- the delimiters listed " +"in the :attr:`~Sniffer.preferred` attribute are preferred, in that order, no " +"matter how many times each of them occurs." +msgstr "" + +#: ../../library/csv.rst:323 +msgid "" +"Analyze the sample text (presumed to be in CSV format) and return :const:" +"`True` if the first row appears to be a series of column headers. Inspecting " +"each column, one of two key criteria will be considered to estimate if the " +"sample contains a header:" +msgstr "" + +#: ../../library/csv.rst:328 +msgid "the second through n-th rows contain numeric values" +msgstr "" + +#: ../../library/csv.rst:329 +msgid "" +"the second through n-th rows contain strings where at least one value's " +"length differs from that of the putative header of that column." +msgstr "" + +#: ../../library/csv.rst:332 +msgid "" +"Twenty-one rows after the header are sampled; if more than half of the " +"columns + rows meet the criteria, :const:`True` is returned." +msgstr "" + +#: ../../library/csv.rst:337 +msgid "" +"This method is a rough heuristic and may produce both false positives and " +"negatives." +msgstr "" + +#: ../../library/csv.rst:340 +msgid "The :class:`Sniffer` class has the following attribute:" +msgstr "" + +#: ../../library/csv.rst:344 +msgid "" +"The list of the delimiters preferred for breaking ties, in the order of " +"preference. It can be modified. Its initial value is ``[',', '\\t', ';', ' " +"', ':']``." +msgstr "" + +#: ../../library/csv.rst:349 +msgid "An example for :class:`Sniffer` use::" +msgstr "" + +#: ../../library/csv.rst:351 +msgid "" +"with open('example.csv', newline='') as csvfile:\n" +" dialect = csv.Sniffer().sniff(csvfile.read(1024))\n" +" csvfile.seek(0)\n" +" reader = csv.reader(csvfile, dialect)\n" +" # ... process CSV file contents here ..." +msgstr "" + +#: ../../library/csv.rst:360 +msgid "The :mod:`!csv` module defines the following constants:" +msgstr "" + +#: ../../library/csv.rst:364 +msgid "Instructs :class:`writer` objects to quote all fields." +msgstr "" + +#: ../../library/csv.rst:369 +msgid "" +"Instructs :class:`writer` objects to only quote those fields which contain " +"special characters such as *delimiter*, *quotechar*, ``'\\r'``, ``'\\n'`` or " +"any of the characters in *lineterminator*." +msgstr "" + +#: ../../library/csv.rst:376 +msgid "Instructs :class:`writer` objects to quote all non-numeric fields." +msgstr "" + +#: ../../library/csv.rst:378 +msgid "" +"Instructs :class:`reader` objects to convert all non-quoted fields to type :" +"class:`float`." +msgstr "" + +#: ../../library/csv.rst:381 +msgid "" +"Some numeric types, such as :class:`bool`, :class:`~fractions.Fraction`, or :" +"class:`~enum.IntEnum`, have a string representation that cannot be converted " +"to :class:`float`. They cannot be read in the :data:`QUOTE_NONNUMERIC` and :" +"data:`QUOTE_STRINGS` modes." +msgstr "" + +#: ../../library/csv.rst:389 +msgid "" +"Instructs :class:`writer` objects to never quote fields. When the current " +"*delimiter*, *quotechar*, *escapechar*, ``'\\r'``, ``'\\n'`` or any of the " +"characters in *lineterminator* occurs in output data it is preceded by the " +"current *escapechar* character. If *escapechar* is not set, the writer will " +"raise :exc:`Error` if any characters that require escaping are encountered. " +"Set *quotechar* to ``None`` to prevent its escaping." +msgstr "" + +#: ../../library/csv.rst:397 +msgid "" +"Instructs :class:`reader` objects to perform no special processing of quote " +"characters." +msgstr "" + +#: ../../library/csv.rst:401 +msgid "" +"Instructs :class:`writer` objects to quote all fields which are not " +"``None``. This is similar to :data:`QUOTE_ALL`, except that if a field " +"value is ``None`` an empty (unquoted) string is written." +msgstr "" + +#: ../../library/csv.rst:405 +msgid "" +"Instructs :class:`reader` objects to interpret an empty (unquoted) field as " +"``None`` and to otherwise behave as :data:`QUOTE_ALL`." +msgstr "" + +#: ../../library/csv.rst:412 +msgid "" +"Instructs :class:`writer` objects to always place quotes around fields which " +"are strings. This is similar to :data:`QUOTE_NONNUMERIC`, except that if a " +"field value is ``None`` an empty (unquoted) string is written." +msgstr "" + +#: ../../library/csv.rst:416 +msgid "" +"Instructs :class:`reader` objects to interpret an empty (unquoted) string as " +"``None`` and to otherwise behave as :data:`QUOTE_NONNUMERIC`." +msgstr "" + +#: ../../library/csv.rst:421 +msgid "The :mod:`!csv` module defines the following exception:" +msgstr "" + +#: ../../library/csv.rst:426 +msgid "Raised by any of the functions when an error is detected." +msgstr "" + +#: ../../library/csv.rst:431 +msgid "Dialects and Formatting Parameters" +msgstr "" + +#: ../../library/csv.rst:433 +msgid "" +"To make it easier to specify the format of input and output records, " +"specific formatting parameters are grouped together into dialects. A " +"dialect is a subclass of the :class:`Dialect` class containing various " +"attributes describing the format of the CSV file. When creating :class:" +"`reader` or :class:`writer` objects, the programmer can specify a string or " +"a subclass of the :class:`Dialect` class as the dialect parameter. In " +"addition to, or instead of, the *dialect* parameter, the programmer can also " +"specify individual formatting parameters, which have the same names as the " +"attributes defined below for the :class:`Dialect` class." +msgstr "" + +#: ../../library/csv.rst:443 +msgid "Dialects support the following attributes:" +msgstr "" + +#: ../../library/csv.rst:448 +msgid "" +"A one-character string used to separate fields. It defaults to ``','``." +msgstr "" + +#: ../../library/csv.rst:453 +msgid "" +"Controls how instances of *quotechar* appearing inside a field should " +"themselves be quoted. When :const:`True`, the character is doubled. When :" +"const:`False`, the *escapechar* is used as a prefix to the *quotechar*. It " +"defaults to :const:`True`." +msgstr "" + +#: ../../library/csv.rst:458 +msgid "" +"On output, if *doublequote* is :const:`False` and no *escapechar* is set, :" +"exc:`Error` is raised if a *quotechar* is found in a field." +msgstr "" + +#: ../../library/csv.rst:464 +msgid "" +"A one-character string used by the writer to escape characters that require " +"escaping:" +msgstr "" + +#: ../../library/csv.rst:467 +msgid "" +"the *delimiter*, the *quotechar*, ``'\\r'``, ``'\\n'`` and any of the " +"characters in *lineterminator* are escaped if *quoting* is set to :const:" +"`QUOTE_NONE`;" +msgstr "" + +#: ../../library/csv.rst:470 +msgid "the *quotechar* is escaped if *doublequote* is :const:`False`;" +msgstr "" + +#: ../../library/csv.rst:471 +msgid "the *escapechar* itself." +msgstr "" + +#: ../../library/csv.rst:473 +msgid "" +"On reading, the *escapechar* removes any special meaning from the following " +"character. It defaults to :const:`None`, which disables escaping." +msgstr "" + +#: ../../library/csv.rst:476 +msgid "An empty *escapechar* is not allowed." +msgstr "" + +#: ../../library/csv.rst:481 +msgid "" +"The string used to terminate lines produced by the :class:`writer`. It " +"defaults to ``'\\r\\n'``." +msgstr "" + +#: ../../library/csv.rst:486 +msgid "" +"The :class:`reader` is hard-coded to recognise either ``'\\r'`` or ``'\\n'`` " +"as end-of-line, and ignores *lineterminator*. This behavior may change in " +"the future." +msgstr "" + +#: ../../library/csv.rst:493 +msgid "" +"A one-character string used to quote fields containing special characters, " +"such as the *delimiter* or the *quotechar*, or which contain new-line " +"characters (``'\\r'``, ``'\\n'`` or any of the characters in " +"*lineterminator*). It defaults to ``'\"'``. Can be set to ``None`` to " +"prevent escaping ``'\"'`` if *quoting* is set to :const:`QUOTE_NONE`." +msgstr "" + +#: ../../library/csv.rst:500 +msgid "An empty *quotechar* is not allowed." +msgstr "" + +#: ../../library/csv.rst:505 +msgid "" +"Controls when quotes should be generated by the writer and recognised by the " +"reader. It can take on any of the :ref:`QUOTE_\\* constants ` and defaults to :const:`QUOTE_MINIMAL` if *quotechar* is not " +"``None``, and :const:`QUOTE_NONE` otherwise." +msgstr "" + +#: ../../library/csv.rst:513 +msgid "" +"When :const:`True`, spaces immediately following the *delimiter* are " +"ignored. The default is :const:`False`. When combining ``delimiter=' '`` " +"with ``skipinitialspace=True``, unquoted empty fields are not allowed." +msgstr "" + +#: ../../library/csv.rst:520 +msgid "" +"When ``True``, raise exception :exc:`Error` on bad CSV input. The default is " +"``False``." +msgstr "" + +#: ../../library/csv.rst:526 +msgid "Reader Objects" +msgstr "" + +#: ../../library/csv.rst:528 +msgid "" +"Reader objects (:class:`DictReader` instances and objects returned by the :" +"func:`reader` function) have the following public methods:" +msgstr "" + +#: ../../library/csv.rst:533 +msgid "" +"Return the next row of the reader's iterable object as a list (if the object " +"was returned from :func:`reader`) or a dict (if it is a :class:`DictReader` " +"instance), parsed according to the current :class:`Dialect`. Usually you " +"should call this as ``next(reader)``." +msgstr "" + +#: ../../library/csv.rst:539 +msgid "Reader objects have the following public attributes:" +msgstr "" + +#: ../../library/csv.rst:543 +msgid "A read-only description of the dialect in use by the parser." +msgstr "" + +#: ../../library/csv.rst:548 +msgid "" +"The number of lines read from the source iterator. This is not the same as " +"the number of records returned, as records can span multiple lines." +msgstr "" + +#: ../../library/csv.rst:552 +msgid "DictReader objects have the following public attribute:" +msgstr "" + +#: ../../library/csv.rst:556 +msgid "" +"If not passed as a parameter when creating the object, this attribute is " +"initialized upon first access or when the first record is read from the file." +msgstr "" + +#: ../../library/csv.rst:563 +msgid "Writer Objects" +msgstr "" + +#: ../../library/csv.rst:565 +msgid "" +":class:`writer` objects (:class:`DictWriter` instances and objects returned " +"by the :func:`writer` function) have the following public methods. A *row* " +"must be an iterable of strings or numbers for :class:`writer` objects and a " +"dictionary mapping fieldnames to strings or numbers (by passing them " +"through :func:`str` first) for :class:`DictWriter` objects. Note that " +"complex numbers are written out surrounded by parens. This may cause some " +"problems for other programs which read CSV files (assuming they support " +"complex numbers at all)." +msgstr "" + +#: ../../library/csv.rst:576 +msgid "" +"Write the *row* parameter to the writer's file object, formatted according " +"to the current :class:`Dialect`. Return the return value of the call to the " +"*write* method of the underlying file object." +msgstr "" + +#: ../../library/csv.rst:580 +msgid "Added support of arbitrary iterables." +msgstr "" + +#: ../../library/csv.rst:585 +msgid "" +"Write all elements in *rows* (an iterable of *row* objects as described " +"above) to the writer's file object, formatted according to the current " +"dialect." +msgstr "" + +#: ../../library/csv.rst:589 +msgid "Writer objects have the following public attribute:" +msgstr "" + +#: ../../library/csv.rst:594 +msgid "A read-only description of the dialect in use by the writer." +msgstr "" + +#: ../../library/csv.rst:597 +msgid "DictWriter objects have the following public method:" +msgstr "" + +#: ../../library/csv.rst:602 +msgid "" +"Write a row with the field names (as specified in the constructor) to the " +"writer's file object, formatted according to the current dialect. Return the " +"return value of the :meth:`csvwriter.writerow` call used internally." +msgstr "" + +#: ../../library/csv.rst:607 +msgid "" +":meth:`writeheader` now also returns the value returned by the :meth:" +"`csvwriter.writerow` method it uses internally." +msgstr "" + +#: ../../library/csv.rst:615 +msgid "Examples" +msgstr "" + +#: ../../library/csv.rst:617 +msgid "The simplest example of reading a CSV file::" +msgstr "" + +#: ../../library/csv.rst:619 +msgid "" +"import csv\n" +"with open('some.csv', newline='') as f:\n" +" reader = csv.reader(f)\n" +" for row in reader:\n" +" print(row)" +msgstr "" + +#: ../../library/csv.rst:625 +msgid "Reading a file with an alternate format::" +msgstr "" + +#: ../../library/csv.rst:627 +msgid "" +"import csv\n" +"with open('passwd', newline='') as f:\n" +" reader = csv.reader(f, delimiter=':', quoting=csv.QUOTE_NONE)\n" +" for row in reader:\n" +" print(row)" +msgstr "" + +#: ../../library/csv.rst:633 +msgid "The corresponding simplest possible writing example is::" +msgstr "" + +#: ../../library/csv.rst:635 +msgid "" +"import csv\n" +"with open('some.csv', 'w', newline='') as f:\n" +" writer = csv.writer(f)\n" +" writer.writerows(someiterable)" +msgstr "" + +#: ../../library/csv.rst:640 +msgid "" +"Since :func:`open` is used to open a CSV file for reading, the file will by " +"default be decoded into unicode using the system default encoding (see :func:" +"`locale.getencoding`). To decode a file using a different encoding, use the " +"``encoding`` argument of open::" +msgstr "" + +#: ../../library/csv.rst:645 +msgid "" +"import csv\n" +"with open('some.csv', newline='', encoding='utf-8') as f:\n" +" reader = csv.reader(f)\n" +" for row in reader:\n" +" print(row)" +msgstr "" + +#: ../../library/csv.rst:651 +msgid "" +"The same applies to writing in something other than the system default " +"encoding: specify the encoding argument when opening the output file." +msgstr "" + +#: ../../library/csv.rst:654 +msgid "Registering a new dialect::" +msgstr "" + +#: ../../library/csv.rst:656 +msgid "" +"import csv\n" +"csv.register_dialect('unixpwd', delimiter=':', quoting=csv.QUOTE_NONE)\n" +"with open('passwd', newline='') as f:\n" +" reader = csv.reader(f, 'unixpwd')" +msgstr "" + +#: ../../library/csv.rst:661 +msgid "" +"A slightly more advanced use of the reader --- catching and reporting " +"errors::" +msgstr "" + +#: ../../library/csv.rst:663 +msgid "" +"import csv, sys\n" +"filename = 'some.csv'\n" +"with open(filename, newline='') as f:\n" +" reader = csv.reader(f)\n" +" try:\n" +" for row in reader:\n" +" print(row)\n" +" except csv.Error as e:\n" +" sys.exit(f'file {filename}, line {reader.line_num}: {e}')" +msgstr "" + +#: ../../library/csv.rst:673 +msgid "" +"And while the module doesn't directly support parsing strings, it can easily " +"be done::" +msgstr "" + +#: ../../library/csv.rst:676 +msgid "" +"import csv\n" +"for row in csv.reader(['one,two,three']):\n" +" print(row)" +msgstr "" + +#: ../../library/csv.rst:682 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../library/csv.rst:683 +msgid "" +"If ``newline=''`` is not specified, newlines embedded inside quoted fields " +"will not be interpreted correctly, and on platforms that use ``\\r\\n`` line " +"endings on write an extra ``\\r`` will be added. It should always be safe " +"to specify ``newline=''``, since the csv module does its own (:term:" +"`universal `) newline handling." +msgstr "" + +#: ../../library/csv.rst:9 +msgid "csv" +msgstr "csv" + +#: ../../library/csv.rst:9 +msgid "data" +msgstr "" + +#: ../../library/csv.rst:9 +msgid "tabular" +msgstr "" + +#: ../../library/csv.rst:51 +msgid "universal newlines" +msgstr "" + +#: ../../library/csv.rst:51 +msgid "csv.reader function" +msgstr "" diff --git a/library/curses.po b/library/curses.po index 6311cec3..5eafb97e 100644 --- a/library/curses.po +++ b/library/curses.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -64,83 +64,95 @@ msgstr "" #: ../../library/curses.rst:28 msgid "" "Whenever the documentation mentions a *character* it can be specified as an " -"integer, a one-character Unicode string or a one-byte byte string." +"integer, a one-character Unicode string or a one-byte byte string. An " +"integer is the code of a single encoded byte, optionally combined with " +"attributes and a color pair, as returned by :meth:`window.inch`." msgstr "" -#: ../../library/curses.rst:31 +#: ../../library/curses.rst:33 msgid "" "Whenever the documentation mentions a *character string* it can be specified " "as a Unicode string or a byte string." msgstr "" -#: ../../library/curses.rst:36 +#: ../../library/curses.rst:38 +msgid "" +"Whether curses may be used from several threads depends on the underlying " +"library and how it was built. In many implementations, including the default " +"build of ncurses, the screen state is shared and not thread-safe; since the " +"blocking and refresh methods (such as :meth:`~window.getch` and :meth:" +"`~window.refresh`) release the :term:`GIL`, unsynchronized use from several " +"threads can then crash the interpreter. Serialize the calls." +msgstr "" + +#: ../../library/curses.rst:50 msgid "Module :mod:`curses.ascii`" msgstr "" -#: ../../library/curses.rst:37 +#: ../../library/curses.rst:51 msgid "" "Utilities for working with ASCII characters, regardless of your locale " "settings." msgstr "" -#: ../../library/curses.rst:39 +#: ../../library/curses.rst:53 msgid "Module :mod:`curses.panel`" msgstr "" -#: ../../library/curses.rst:40 +#: ../../library/curses.rst:54 msgid "A panel stack extension that adds depth to curses windows." msgstr "" -#: ../../library/curses.rst:42 +#: ../../library/curses.rst:56 msgid "Module :mod:`curses.textpad`" msgstr "" -#: ../../library/curses.rst:43 +#: ../../library/curses.rst:57 msgid "" "Editable text widget for curses supporting :program:`Emacs`\\ -like " "bindings." msgstr "" -#: ../../library/curses.rst:45 +#: ../../library/curses.rst:59 msgid ":ref:`curses-howto`" msgstr "" -#: ../../library/curses.rst:46 +#: ../../library/curses.rst:60 msgid "" "Tutorial material on using curses with Python, by Andrew Kuchling and Eric " "Raymond." msgstr "" -#: ../../library/curses.rst:53 +#: ../../library/curses.rst:67 msgid "Functions" msgstr "" -#: ../../library/curses.rst:55 +#: ../../library/curses.rst:69 msgid "The module :mod:`!curses` defines the following exception:" msgstr "" -#: ../../library/curses.rst:60 +#: ../../library/curses.rst:74 msgid "Exception raised when a curses library function returns an error." msgstr "" -#: ../../library/curses.rst:64 +#: ../../library/curses.rst:78 msgid "" "Whenever *x* or *y* arguments to a function or a method are optional, they " "default to the current cursor location. Whenever *attr* is optional, it " "defaults to :const:`A_NORMAL`." msgstr "" -#: ../../library/curses.rst:68 +#: ../../library/curses.rst:82 msgid "The module :mod:`!curses` defines the following functions:" msgstr "" -#: ../../library/curses.rst:73 +#: ../../library/curses.rst:87 msgid "" "Allow use of default values for colors on terminals supporting this feature. " "Use this to support transparency in your application." msgstr "" -#: ../../library/curses.rst:76 +#: ../../library/curses.rst:90 msgid "" "Assign terminal default foreground/background colors to color number ``-1``. " "So ``init_pair(x, COLOR_RED, -1)`` will initialize pair *x* as red on " @@ -148,15 +160,15 @@ msgid "" "*x* as default foreground on blue." msgstr "" -#: ../../library/curses.rst:81 +#: ../../library/curses.rst:95 msgid "Change the definition of the color-pair ``0`` to ``(fg, bg)``." msgstr "" -#: ../../library/curses.rst:83 +#: ../../library/curses.rst:97 msgid "This is an ncurses extension." msgstr "" -#: ../../library/curses.rst:90 +#: ../../library/curses.rst:104 msgid "" "Return the output speed of the terminal in bits per second. On software " "terminal emulators it will have a fixed high value. Included for historical " @@ -164,17 +176,17 @@ msgid "" "and occasionally to change interfaces depending on the line speed." msgstr "" -#: ../../library/curses.rst:98 +#: ../../library/curses.rst:112 msgid "Emit a short attention sound." msgstr "" -#: ../../library/curses.rst:103 +#: ../../library/curses.rst:117 msgid "" "Return ``True`` or ``False``, depending on whether the programmer can change " "the colors displayed by the terminal." msgstr "" -#: ../../library/curses.rst:109 +#: ../../library/curses.rst:123 msgid "" "Enter cbreak mode. In cbreak mode (sometimes called \"rare\" mode) normal " "tty line buffering is turned off and characters are available to be read one " @@ -184,7 +196,7 @@ msgid "" "terminal in cbreak mode." msgstr "" -#: ../../library/curses.rst:118 +#: ../../library/curses.rst:132 msgid "" "Return the intensity of the red, green, and blue (RGB) components in the " "color *color_number*, which must be between ``0`` and ``COLORS - 1``. " @@ -193,7 +205,7 @@ msgid "" "component). Raise an exception if the color is not supported." msgstr "" -#: ../../library/curses.rst:127 +#: ../../library/curses.rst:141 msgid "" "Return the attribute value for displaying text in the specified color pair. " "Only the first 256 color pairs are supported. This attribute value can be " @@ -202,7 +214,7 @@ msgid "" "function." msgstr "" -#: ../../library/curses.rst:136 +#: ../../library/curses.rst:150 msgid "" "Set the cursor state. *visibility* can be set to ``0``, ``1``, or ``2``, " "for invisible, normal, or very visible. If the terminal supports the " @@ -211,7 +223,7 @@ msgid "" "and the \"very visible\" mode is a block cursor." msgstr "" -#: ../../library/curses.rst:145 +#: ../../library/curses.rst:159 msgid "" "Save the current terminal mode as the \"program\" mode, the mode when the " "running program is using curses. (Its counterpart is the \"shell\" mode, " @@ -219,7 +231,7 @@ msgid "" "`reset_prog_mode` will restore this mode." msgstr "" -#: ../../library/curses.rst:153 +#: ../../library/curses.rst:167 msgid "" "Save the current terminal mode as the \"shell\" mode, the mode when the " "running program is not using curses. (Its counterpart is the \"program\" " @@ -227,11 +239,11 @@ msgid "" "func:`reset_shell_mode` will restore this mode." msgstr "" -#: ../../library/curses.rst:161 +#: ../../library/curses.rst:175 msgid "Insert an *ms* millisecond pause in output." msgstr "" -#: ../../library/curses.rst:166 +#: ../../library/curses.rst:180 msgid "" "Update the physical screen. The curses library keeps two data structures, " "one representing the current physical screen contents and a virtual screen " @@ -239,7 +251,7 @@ msgid "" "the physical screen to match the virtual screen." msgstr "" -#: ../../library/curses.rst:171 +#: ../../library/curses.rst:185 msgid "" "The virtual screen may be updated by a :meth:`~window.noutrefresh` call " "after write operations such as :meth:`~window.addstr` have been performed on " @@ -250,24 +262,24 @@ msgid "" "func:`!doupdate`." msgstr "" -#: ../../library/curses.rst:181 +#: ../../library/curses.rst:195 msgid "" "Enter echo mode. In echo mode, each character input is echoed to the screen " "as it is entered." msgstr "" -#: ../../library/curses.rst:187 +#: ../../library/curses.rst:201 msgid "De-initialize the library, and return terminal to normal status." msgstr "" -#: ../../library/curses.rst:192 +#: ../../library/curses.rst:206 msgid "" "Return the user's current erase character as a one-byte bytes object. Under " "Unix operating systems this is a property of the controlling tty of the " "curses program, and is not set by the curses library itself." msgstr "" -#: ../../library/curses.rst:199 +#: ../../library/curses.rst:213 msgid "" "The :func:`.filter` routine, if used, must be called before :func:`initscr` " "is called. The effect is that, during the initialization, :envvar:`LINES` " @@ -278,20 +290,20 @@ msgid "" "character-at-a-time line editing without touching the rest of the screen." msgstr "" -#: ../../library/curses.rst:209 +#: ../../library/curses.rst:223 msgid "" "Flash the screen. That is, change it to reverse-video and then change it " "back in a short interval. Some people prefer such as 'visible bell' to the " "audible attention signal produced by :func:`beep`." msgstr "" -#: ../../library/curses.rst:216 +#: ../../library/curses.rst:230 msgid "" "Flush all input buffers. This throws away any typeahead that has been " "typed by the user and has not yet been processed by the program." msgstr "" -#: ../../library/curses.rst:222 +#: ../../library/curses.rst:236 msgid "" "After :meth:`~window.getch` returns :const:`KEY_MOUSE` to signal a mouse " "event, this method should be called to retrieve the queued mouse event, " @@ -306,20 +318,20 @@ msgid "" "const:`BUTTON_ALT`." msgstr "" -#: ../../library/curses.rst:233 ../../library/curses.rst:1861 +#: ../../library/curses.rst:247 ../../library/curses.rst:1920 msgid "" "The ``BUTTON5_*`` constants are now exposed if they are provided by the " "underlying curses library." msgstr "" -#: ../../library/curses.rst:240 +#: ../../library/curses.rst:254 msgid "" "Return the current coordinates of the virtual screen cursor as a tuple ``(y, " "x)``. If :meth:`leaveok ` is currently ``True``, then " "return ``(-1, -1)``." msgstr "" -#: ../../library/curses.rst:246 +#: ../../library/curses.rst:260 msgid "" "Read window-related data stored in the file by an earlier :meth:`window." "putwin` call. The routine then creates and initializes a new window using " @@ -327,31 +339,31 @@ msgid "" "file object opened for reading in binary mode." msgstr "" -#: ../../library/curses.rst:254 +#: ../../library/curses.rst:268 msgid "" "Return ``True`` if the terminal can display colors; otherwise, return " "``False``." msgstr "" -#: ../../library/curses.rst:258 +#: ../../library/curses.rst:272 msgid "" "Return ``True`` if the module supports extended colors; otherwise, return " "``False``. Extended color support allows more than 256 color pairs for " "terminals that support more than 16 colors (for example, xterm-256color)." msgstr "" -#: ../../library/curses.rst:262 +#: ../../library/curses.rst:276 msgid "Extended color support requires ncurses version 6.1 or later." msgstr "" -#: ../../library/curses.rst:268 +#: ../../library/curses.rst:282 msgid "" "Return ``True`` if the terminal has insert- and delete-character " "capabilities. This function is included for historical reasons only, as all " "modern software terminal emulators have such capabilities." msgstr "" -#: ../../library/curses.rst:275 +#: ../../library/curses.rst:289 msgid "" "Return ``True`` if the terminal has insert- and delete-line capabilities, or " "can simulate them using scrolling regions. This function is included for " @@ -359,13 +371,13 @@ msgid "" "capabilities." msgstr "" -#: ../../library/curses.rst:283 +#: ../../library/curses.rst:297 msgid "" "Take a key value *ch*, and return ``True`` if the current terminal type " "recognizes a key with that value." msgstr "" -#: ../../library/curses.rst:289 +#: ../../library/curses.rst:303 msgid "" "Used for half-delay mode, which is similar to cbreak mode in that characters " "typed by the user are immediately available to the program. However, after " @@ -374,7 +386,7 @@ msgid "" "``255``. Use :func:`nocbreak` to leave half-delay mode." msgstr "" -#: ../../library/curses.rst:298 +#: ../../library/curses.rst:312 msgid "" "Change the definition of a color, taking the number of the color to be " "changed followed by three RGB values (for the amounts of red, green, and " @@ -386,7 +398,7 @@ msgid "" "``True``." msgstr "" -#: ../../library/curses.rst:309 +#: ../../library/curses.rst:323 msgid "" "Change the definition of a color-pair. It takes three arguments: the number " "of the color-pair to be changed, the foreground color number, and the " @@ -400,43 +412,43 @@ msgid "" "definition." msgstr "" -#: ../../library/curses.rst:324 +#: ../../library/curses.rst:338 msgid "" "Initialize the library. Return a :ref:`window ` " "object which represents the whole screen." msgstr "" -#: ../../library/curses.rst:327 +#: ../../library/curses.rst:341 msgid "" "See :func:`setupterm` for a caveat about calling it before this function." msgstr "" -#: ../../library/curses.rst:331 +#: ../../library/curses.rst:345 msgid "" "If there is an error opening the terminal, the underlying curses library may " "cause the interpreter to exit." msgstr "" -#: ../../library/curses.rst:337 +#: ../../library/curses.rst:351 msgid "" "If *flag* is ``True``, pressing an interrupt key (interrupt, break, or quit) " "will flush all output in the terminal driver queue. If *flag* is ``False``, " "no flushing is done." msgstr "" -#: ../../library/curses.rst:344 +#: ../../library/curses.rst:358 msgid "" "Return ``True`` if :func:`resize_term` would modify the window structure, " "``False`` otherwise." msgstr "" -#: ../../library/curses.rst:350 +#: ../../library/curses.rst:364 msgid "" "Return ``True`` if :func:`endwin` has been called (that is, the curses " "library has been deinitialized)." msgstr "" -#: ../../library/curses.rst:356 +#: ../../library/curses.rst:370 msgid "" "Return the name of the key numbered *k* as a bytes object. The name of a " "key generating printable ASCII character is the key's character. The name " @@ -447,31 +459,31 @@ msgid "" "character." msgstr "" -#: ../../library/curses.rst:363 +#: ../../library/curses.rst:377 msgid "Raise a :exc:`ValueError` if *k* is negative." msgstr "" -#: ../../library/curses.rst:368 +#: ../../library/curses.rst:382 msgid "" "Return the user's current line kill character as a one-byte bytes object. " "Under Unix operating systems this is a property of the controlling tty of " "the curses program, and is not set by the curses library itself." msgstr "" -#: ../../library/curses.rst:375 +#: ../../library/curses.rst:389 msgid "" "Return a bytes object containing the terminfo long name field describing the " "current terminal. The maximum length of a verbose description is 128 " "characters. It is defined only after the call to :func:`initscr`." msgstr "" -#: ../../library/curses.rst:382 +#: ../../library/curses.rst:396 msgid "" "If *flag* is ``True``, allow 8-bit characters to be input. If *flag* is " "``False``, allow only 7-bit chars." msgstr "" -#: ../../library/curses.rst:388 +#: ../../library/curses.rst:402 msgid "" "Set the maximum time in milliseconds that can elapse between press and " "release events in order for them to be recognized as a click, and return the " @@ -480,7 +492,7 @@ msgid "" "without changing it." msgstr "" -#: ../../library/curses.rst:396 +#: ../../library/curses.rst:410 msgid "" "Set the mouse events to be reported, and return a tuple ``(availmask, " "oldmask)``. *availmask* indicates which of the specified mouse events can " @@ -489,17 +501,17 @@ msgid "" "no mouse events are ever reported." msgstr "" -#: ../../library/curses.rst:405 +#: ../../library/curses.rst:419 msgid "Sleep for *ms* milliseconds." msgstr "" -#: ../../library/curses.rst:410 +#: ../../library/curses.rst:424 msgid "" "Create and return a pointer to a new pad data structure with the given " "number of lines and columns. Return a pad as a window object." msgstr "" -#: ../../library/curses.rst:413 +#: ../../library/curses.rst:427 msgid "" "A pad is like a window, except that it is not restricted by the screen size, " "and is not necessarily associated with a particular part of the screen. " @@ -515,39 +527,39 @@ msgid "" "to be displayed." msgstr "" -#: ../../library/curses.rst:429 +#: ../../library/curses.rst:443 msgid "" "Return a new :ref:`window `, whose left-upper corner " "is at ``(begin_y, begin_x)``, and whose height/width is *nlines*/*ncols*." msgstr "" -#: ../../library/curses.rst:432 +#: ../../library/curses.rst:446 msgid "" "By default, the window will extend from the specified position to the lower " "right corner of the screen." msgstr "" -#: ../../library/curses.rst:438 +#: ../../library/curses.rst:452 msgid "" "Enter newline mode. This mode translates the return key into newline on " "input, and translates newline into return and line-feed on output. Newline " "mode is initially on." msgstr "" -#: ../../library/curses.rst:442 +#: ../../library/curses.rst:456 msgid "If *flag* is ``False``, the effect is the same as calling :func:`nonl`." msgstr "" -#: ../../library/curses.rst:447 +#: ../../library/curses.rst:461 msgid "" "Leave cbreak mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: ../../library/curses.rst:452 +#: ../../library/curses.rst:466 msgid "Leave echo mode. Echoing of input characters is turned off." msgstr "" -#: ../../library/curses.rst:457 +#: ../../library/curses.rst:471 msgid "" "Leave newline mode. Disable translation of return into newline on input, " "and disable low-level translation of newline into newline/return on output " @@ -557,7 +569,7 @@ msgid "" "also, it will be able to detect the return key on input." msgstr "" -#: ../../library/curses.rst:467 +#: ../../library/curses.rst:481 msgid "" "When the :func:`!noqiflush` routine is used, normal flush of input and " "output queues associated with the ``INTR``, ``QUIT`` and ``SUSP`` characters " @@ -566,69 +578,69 @@ msgid "" "occurred, after the handler exits." msgstr "" -#: ../../library/curses.rst:475 +#: ../../library/curses.rst:489 msgid "Leave raw mode. Return to normal \"cooked\" mode with line buffering." msgstr "" -#: ../../library/curses.rst:480 +#: ../../library/curses.rst:494 msgid "" "Return a tuple ``(fg, bg)`` containing the colors for the requested color " "pair. The value of *pair_number* must be between ``0`` and ``COLOR_PAIRS - " "1``." msgstr "" -#: ../../library/curses.rst:486 +#: ../../library/curses.rst:500 msgid "" "Return the number of the color-pair set by the attribute value *attr*. :func:" "`color_pair` is the counterpart to this function." msgstr "" -#: ../../library/curses.rst:492 +#: ../../library/curses.rst:506 msgid "" "Equivalent to ``tputs(str, 1, putchar)``; emit the value of a specified " -"terminfo capability for the current terminal. Note that the output of :func:" -"`putp` always goes to standard output." +"terminfo capability, a bytes object, for the current terminal. Note that the " +"output of :func:`putp` always goes to standard output." msgstr "" -#: ../../library/curses.rst:496 ../../library/curses.rst:639 -#: ../../library/curses.rst:649 ../../library/curses.rst:659 -#: ../../library/curses.rst:669 +#: ../../library/curses.rst:510 ../../library/curses.rst:653 +#: ../../library/curses.rst:663 ../../library/curses.rst:673 +#: ../../library/curses.rst:683 msgid ":func:`setupterm` (or :func:`initscr`) must be called first." msgstr "" -#: ../../library/curses.rst:501 +#: ../../library/curses.rst:515 msgid "" "If *flag* is ``False``, the effect is the same as calling :func:`noqiflush`. " "If *flag* is ``True``, or no argument is provided, the queues will be " "flushed when these control characters are read." msgstr "" -#: ../../library/curses.rst:508 +#: ../../library/curses.rst:522 msgid "" "Enter raw mode. In raw mode, normal line buffering and processing of " "interrupt, quit, suspend, and flow control keys are turned off; characters " "are presented to curses input functions one by one." msgstr "" -#: ../../library/curses.rst:515 +#: ../../library/curses.rst:529 msgid "" "Restore the terminal to \"program\" mode, as previously saved by :func:" "`def_prog_mode`." msgstr "" -#: ../../library/curses.rst:521 +#: ../../library/curses.rst:535 msgid "" "Restore the terminal to \"shell\" mode, as previously saved by :func:" "`def_shell_mode`." msgstr "" -#: ../../library/curses.rst:527 +#: ../../library/curses.rst:541 msgid "" "Restore the state of the terminal modes to what it was at the last call to :" "func:`savetty`." msgstr "" -#: ../../library/curses.rst:533 +#: ../../library/curses.rst:547 msgid "" "Backend function used by :func:`resizeterm`, performing most of the work; " "when resizing the windows, :func:`resize_term` blank-fills the areas that " @@ -638,47 +650,47 @@ msgid "" "to resize these without additional interaction with the application." msgstr "" -#: ../../library/curses.rst:543 +#: ../../library/curses.rst:557 msgid "" "Resize the standard and current windows to the specified dimensions, and " "adjusts other bookkeeping data used by the curses library that record the " "window dimensions (in particular the SIGWINCH handler)." msgstr "" -#: ../../library/curses.rst:550 +#: ../../library/curses.rst:564 msgid "" "Save the current state of the terminal modes in a buffer, usable by :func:" "`resetty`." msgstr "" -#: ../../library/curses.rst:555 +#: ../../library/curses.rst:569 msgid "Retrieves the value set by :func:`set_escdelay`." msgstr "" -#: ../../library/curses.rst:561 +#: ../../library/curses.rst:575 msgid "" "Sets the number of milliseconds to wait after reading an escape character, " "to distinguish between an individual escape character entered on the " "keyboard from escape sequences sent by cursor and function keys." msgstr "" -#: ../../library/curses.rst:569 +#: ../../library/curses.rst:583 msgid "Retrieves the value set by :func:`set_tabsize`." msgstr "" -#: ../../library/curses.rst:575 +#: ../../library/curses.rst:589 msgid "" "Sets the number of columns used by the curses library when converting a tab " "character to spaces as it adds the tab to a window." msgstr "" -#: ../../library/curses.rst:582 +#: ../../library/curses.rst:596 msgid "" "Set the virtual screen cursor to *y*, *x*. If *y* and *x* are both ``-1``, " "then :meth:`leaveok ` is set ``True``." msgstr "" -#: ../../library/curses.rst:588 +#: ../../library/curses.rst:602 msgid "" "Initialize the terminal. *term* is a string giving the terminal name, or " "``None``; if omitted or ``None``, the value of the :envvar:`TERM` " @@ -687,28 +699,28 @@ msgid "" "descriptor for ``sys.stdout`` will be used." msgstr "" -#: ../../library/curses.rst:594 +#: ../../library/curses.rst:608 msgid "" "Raise a :exc:`curses.error` if the terminal could not be found or its " "terminfo database entry could not be read. If the terminal has already been " "initialized, this function has no effect." msgstr "" -#: ../../library/curses.rst:600 +#: ../../library/curses.rst:614 msgid "" "Calling :func:`initscr` after :func:`setupterm` leaks the terminal that :" "func:`setupterm` allocated: the curses library keeps only a single current " "terminal and does not free the previously allocated one." msgstr "" -#: ../../library/curses.rst:608 +#: ../../library/curses.rst:622 msgid "" "Must be called if the programmer wants to use colors, and before any other " "color manipulation routine is called. It is good practice to call this " "routine right after :func:`initscr`." msgstr "" -#: ../../library/curses.rst:612 +#: ../../library/curses.rst:626 msgid "" ":func:`start_color` initializes eight basic colors (black, red, green, " "yellow, blue, magenta, cyan, and white), and two global variables in the :" @@ -718,20 +730,20 @@ msgid "" "terminal was just turned on." msgstr "" -#: ../../library/curses.rst:621 +#: ../../library/curses.rst:635 msgid "" "Return a logical OR of all video attributes supported by the terminal. This " "information is useful when a curses program needs complete control over the " "appearance of the screen." msgstr "" -#: ../../library/curses.rst:628 +#: ../../library/curses.rst:642 msgid "" "Return the value of the environment variable :envvar:`TERM`, as a bytes " "object, truncated to 14 characters." msgstr "" -#: ../../library/curses.rst:634 +#: ../../library/curses.rst:648 msgid "" "Return the value of the Boolean capability corresponding to the terminfo " "capability name *capname* as an integer. Return the value ``-1`` if " @@ -739,7 +751,7 @@ msgid "" "from the terminal description." msgstr "" -#: ../../library/curses.rst:644 +#: ../../library/curses.rst:658 msgid "" "Return the value of the numeric capability corresponding to the terminfo " "capability name *capname* as an integer. Return the value ``-2`` if " @@ -747,7 +759,7 @@ msgid "" "from the terminal description." msgstr "" -#: ../../library/curses.rst:654 +#: ../../library/curses.rst:668 msgid "" "Return the value of the string capability corresponding to the terminfo " "capability name *capname* as a bytes object. Return ``None`` if *capname* " @@ -755,22 +767,22 @@ msgid "" "terminal description." msgstr "" -#: ../../library/curses.rst:664 +#: ../../library/curses.rst:678 msgid "" "Instantiate the bytes object *str* with the supplied parameters, where *str* " -"should be a parameterized string obtained from the terminfo database. For " -"example, ``tparm(tigetstr(\"cup\"), 5, 3)`` could result in " +"should be a parameterized byte string obtained from the terminfo database. " +"For example, ``tparm(tigetstr(\"cup\"), 5, 3)`` could result in " "``b'\\033[6;4H'``, the exact result depending on terminal type. Up to nine " "integer parameters may be supplied." msgstr "" -#: ../../library/curses.rst:674 +#: ../../library/curses.rst:688 msgid "" "Specify that the file descriptor *fd* be used for typeahead checking. If " "*fd* is ``-1``, then no typeahead checking is done." msgstr "" -#: ../../library/curses.rst:677 +#: ../../library/curses.rst:691 msgid "" "The curses library does \"line-breakout optimization\" by looking for " "typeahead periodically while updating the screen. If input is found, and it " @@ -780,43 +792,55 @@ msgid "" "typeahead checking." msgstr "" -#: ../../library/curses.rst:686 +#: ../../library/curses.rst:700 msgid "" "Return a bytes object which is a printable representation of the character " -"*ch*. Control characters are represented as a caret followed by the " -"character, for example as ``b'^C'``. Printing characters are left as they " -"are." +"*ch*; any attributes and color pair are ignored. Control characters are " +"represented as a caret followed by the character, for example as ``b'^C'``. " +"Printing characters are left as they are." msgstr "" -#: ../../library/curses.rst:693 +#: ../../library/curses.rst:708 msgid "Push *ch* so the next :meth:`~window.getch` will return it." msgstr "" -#: ../../library/curses.rst:697 +#: ../../library/curses.rst:710 +msgid "" +"*ch* may be an integer (a key code or the code of an encoded byte), a byte, " +"or a string of length 1 which encodes to a single byte." +msgstr "" + +#: ../../library/curses.rst:715 msgid "Only one *ch* can be pushed before :meth:`!getch` is called." msgstr "" -#: ../../library/curses.rst:702 +#: ../../library/curses.rst:720 msgid "" "Update the :const:`LINES` and :const:`COLS` module variables. Useful for " "detecting manual screen resize." msgstr "" -#: ../../library/curses.rst:710 +#: ../../library/curses.rst:728 msgid "Push *ch* so the next :meth:`~window.get_wch` will return it." msgstr "" -#: ../../library/curses.rst:714 +#: ../../library/curses.rst:730 +msgid "" +"*ch* may be an integer (a character code, not a key code) or a string of " +"length 1." +msgstr "" + +#: ../../library/curses.rst:735 msgid "Only one *ch* can be pushed before :meth:`!get_wch` is called." msgstr "" -#: ../../library/curses.rst:721 +#: ../../library/curses.rst:742 msgid "" "Push a :const:`KEY_MOUSE` event onto the input queue, associating the given " "state data with it." msgstr "" -#: ../../library/curses.rst:727 +#: ../../library/curses.rst:748 msgid "" "If used, this function should be called before :func:`initscr` or newterm " "are called. When *flag* is ``False``, the values of lines and columns " @@ -826,11 +850,11 @@ msgid "" "to use the window size if :envvar:`LINES` and :envvar:`COLUMNS` are not set)." msgstr "" -#: ../../library/curses.rst:737 +#: ../../library/curses.rst:758 msgid "Equivalent to ``assume_default_colors(-1, -1)``." msgstr "" -#: ../../library/curses.rst:742 +#: ../../library/curses.rst:763 msgid "" "Initialize curses and call another callable object, *func*, which should be " "the rest of your curses-using application. If the application raises an " @@ -844,50 +868,50 @@ msgid "" "echo, and disables the terminal keypad." msgstr "" -#: ../../library/curses.rst:756 +#: ../../library/curses.rst:777 msgid "Window objects" msgstr "" -#: ../../library/curses.rst:760 +#: ../../library/curses.rst:781 msgid "" "Window objects, as returned by :func:`initscr` and :func:`newwin` above, " "have the following methods and attributes:" msgstr "" -#: ../../library/curses.rst:767 +#: ../../library/curses.rst:788 msgid "" "Paint character *ch* at ``(y, x)`` with attributes *attr*, overwriting any " "character previously painted at that location. By default, the character " "position and attributes are the current settings for the window object." msgstr "" -#: ../../library/curses.rst:773 +#: ../../library/curses.rst:794 msgid "" "Writing outside the window, subwindow, or pad raises a :exc:`curses.error`. " "Attempting to write to the lower-right corner of a window, subwindow, or pad " "will cause an exception to be raised after the character is printed." msgstr "" -#: ../../library/curses.rst:781 +#: ../../library/curses.rst:802 msgid "" "Paint at most *n* characters of the character string *str* at ``(y, x)`` " "with attributes *attr*, overwriting anything previously on the display." msgstr "" -#: ../../library/curses.rst:789 +#: ../../library/curses.rst:810 msgid "" "Paint the character string *str* at ``(y, x)`` with attributes *attr*, " "overwriting anything previously on the display." msgstr "" -#: ../../library/curses.rst:794 +#: ../../library/curses.rst:815 msgid "" "Writing outside the window, subwindow, or pad raises :exc:`curses.error`. " "Attempting to write to the lower-right corner of a window, subwindow, or pad " "will cause an exception to be raised after the string is printed." msgstr "" -#: ../../library/curses.rst:798 +#: ../../library/curses.rst:819 msgid "" "A bug in ncurses, the backend for this Python module, could cause segfaults " "when resizing windows. This was fixed in ncurses-6.1-20190511. If you are " @@ -896,44 +920,44 @@ msgid "" "`!addstr` separately for each line." msgstr "" -#: ../../library/curses.rst:807 +#: ../../library/curses.rst:828 msgid "" "Remove attribute *attr* from the \"background\" set applied to all writes to " "the current window." msgstr "" -#: ../../library/curses.rst:813 +#: ../../library/curses.rst:834 msgid "" "Add attribute *attr* to the \"background\" set applied to all writes to the " "current window." msgstr "" -#: ../../library/curses.rst:819 +#: ../../library/curses.rst:840 msgid "" "Set the \"background\" set of attributes to *attr*. This set is initially " "``0`` (no attributes)." msgstr "" -#: ../../library/curses.rst:825 +#: ../../library/curses.rst:846 msgid "" "Set the background property of the window to the character *ch*, with " "attributes *attr*. The change is then applied to every character position " "in that window:" msgstr "" -#: ../../library/curses.rst:829 +#: ../../library/curses.rst:850 msgid "" "The attribute of every character in the window is changed to the new " "background attribute." msgstr "" -#: ../../library/curses.rst:832 +#: ../../library/curses.rst:853 msgid "" "Wherever the former background character appears, it is changed to the new " "background character." msgstr "" -#: ../../library/curses.rst:838 +#: ../../library/curses.rst:859 msgid "" "Set the window's background. A window's background consists of a character " "and any combination of attributes. The attribute part of the background is " @@ -944,128 +968,128 @@ msgid "" "delete line/character operations." msgstr "" -#: ../../library/curses.rst:848 +#: ../../library/curses.rst:869 msgid "" "Draw a border around the edges of the window. Each parameter specifies the " "character to use for a specific part of the border; see the table below for " "more details." msgstr "" -#: ../../library/curses.rst:854 +#: ../../library/curses.rst:875 msgid "" "A ``0`` value for any parameter will cause the default character to be used " "for that parameter. Keyword parameters can *not* be used. The defaults are " "listed in this table:" msgstr "" -#: ../../library/curses.rst:859 +#: ../../library/curses.rst:880 msgid "Parameter" msgstr "" -#: ../../library/curses.rst:859 +#: ../../library/curses.rst:880 msgid "Description" msgstr "Beschreibung" -#: ../../library/curses.rst:859 +#: ../../library/curses.rst:880 msgid "Default value" msgstr "" -#: ../../library/curses.rst:861 +#: ../../library/curses.rst:882 msgid "*ls*" msgstr "" -#: ../../library/curses.rst:861 +#: ../../library/curses.rst:882 msgid "Left side" msgstr "" -#: ../../library/curses.rst:861 ../../library/curses.rst:863 +#: ../../library/curses.rst:882 ../../library/curses.rst:884 msgid ":const:`ACS_VLINE`" msgstr "" -#: ../../library/curses.rst:863 +#: ../../library/curses.rst:884 msgid "*rs*" msgstr "" -#: ../../library/curses.rst:863 +#: ../../library/curses.rst:884 msgid "Right side" msgstr "" -#: ../../library/curses.rst:865 +#: ../../library/curses.rst:886 msgid "*ts*" msgstr "" -#: ../../library/curses.rst:865 +#: ../../library/curses.rst:886 msgid "Top" msgstr "" -#: ../../library/curses.rst:865 ../../library/curses.rst:867 +#: ../../library/curses.rst:886 ../../library/curses.rst:888 msgid ":const:`ACS_HLINE`" msgstr "" -#: ../../library/curses.rst:867 +#: ../../library/curses.rst:888 msgid "*bs*" msgstr "" -#: ../../library/curses.rst:867 +#: ../../library/curses.rst:888 msgid "Bottom" msgstr "" -#: ../../library/curses.rst:869 +#: ../../library/curses.rst:890 msgid "*tl*" msgstr "" -#: ../../library/curses.rst:869 +#: ../../library/curses.rst:890 msgid "Upper-left corner" msgstr "" -#: ../../library/curses.rst:869 +#: ../../library/curses.rst:890 msgid ":const:`ACS_ULCORNER`" msgstr "" -#: ../../library/curses.rst:871 +#: ../../library/curses.rst:892 msgid "*tr*" msgstr "" -#: ../../library/curses.rst:871 +#: ../../library/curses.rst:892 msgid "Upper-right corner" msgstr "" -#: ../../library/curses.rst:871 +#: ../../library/curses.rst:892 msgid ":const:`ACS_URCORNER`" msgstr "" -#: ../../library/curses.rst:873 +#: ../../library/curses.rst:894 msgid "*bl*" msgstr "" -#: ../../library/curses.rst:873 +#: ../../library/curses.rst:894 msgid "Bottom-left corner" msgstr "" -#: ../../library/curses.rst:873 +#: ../../library/curses.rst:894 msgid ":const:`ACS_LLCORNER`" msgstr "" -#: ../../library/curses.rst:875 +#: ../../library/curses.rst:896 msgid "*br*" msgstr "" -#: ../../library/curses.rst:875 +#: ../../library/curses.rst:896 msgid "Bottom-right corner" msgstr "" -#: ../../library/curses.rst:875 +#: ../../library/curses.rst:896 msgid ":const:`ACS_LRCORNER`" msgstr "" -#: ../../library/curses.rst:881 +#: ../../library/curses.rst:902 msgid "" "Similar to :meth:`border`, but both *ls* and *rs* are *vertch* and both *ts* " "and *bs* are *horch*. The default corner characters are always used by this " "function." msgstr "" -#: ../../library/curses.rst:890 +#: ../../library/curses.rst:911 msgid "" "Set the attributes of *num* characters at the current cursor position, or at " "position ``(y, x)`` if supplied. If *num* is not given or is ``-1``, the " @@ -1075,47 +1099,47 @@ msgid "" "be redisplayed by the next window refresh." msgstr "" -#: ../../library/curses.rst:900 +#: ../../library/curses.rst:921 msgid "" "Like :meth:`erase`, but also cause the whole window to be repainted upon " "next call to :meth:`refresh`." msgstr "" -#: ../../library/curses.rst:906 +#: ../../library/curses.rst:927 msgid "" "If *flag* is ``True``, the next call to :meth:`refresh` will clear the " "window completely." msgstr "" -#: ../../library/curses.rst:912 +#: ../../library/curses.rst:933 msgid "" "Erase from cursor to the end of the window: all lines below the cursor are " "deleted, and then the equivalent of :meth:`clrtoeol` is performed." msgstr "" -#: ../../library/curses.rst:918 +#: ../../library/curses.rst:939 msgid "Erase from cursor to the end of the line." msgstr "" -#: ../../library/curses.rst:923 +#: ../../library/curses.rst:944 msgid "" "Update the current cursor position of all the ancestors of the window to " "reflect the current cursor position of the window." msgstr "" -#: ../../library/curses.rst:929 +#: ../../library/curses.rst:950 msgid "" "Delete the character under the cursor, or at ``(y, x)`` if specified. All " "characters to the right on the same line are shifted one position left." msgstr "" -#: ../../library/curses.rst:935 +#: ../../library/curses.rst:956 msgid "" "Delete the line under the cursor. All following lines are moved up by one " "line." msgstr "" -#: ../../library/curses.rst:941 +#: ../../library/curses.rst:962 msgid "" "An abbreviation for \"derive window\", :meth:`derwin` is the same as " "calling :meth:`subwin`, except that *begin_y* and *begin_x* are relative to " @@ -1123,13 +1147,13 @@ msgid "" "a window object for the derived window." msgstr "" -#: ../../library/curses.rst:949 +#: ../../library/curses.rst:970 msgid "" "Add character *ch* with attribute *attr*, and immediately call :meth:" "`refresh` on the window." msgstr "" -#: ../../library/curses.rst:955 +#: ../../library/curses.rst:976 msgid "" "Test whether the given pair of screen-relative character-cell coordinates " "are enclosed by the given window, returning ``True`` or ``False``. It is " @@ -1137,90 +1161,128 @@ msgid "" "location of a mouse event." msgstr "" -#: ../../library/curses.rst:960 +#: ../../library/curses.rst:981 msgid "Previously it returned ``1`` or ``0`` instead of ``True`` or ``False``." msgstr "" -#: ../../library/curses.rst:966 +#: ../../library/curses.rst:987 msgid "" -"Encoding used to encode method arguments (Unicode strings and characters). " -"The encoding attribute is inherited from the parent window when a subwindow " -"is created, for example with :meth:`window.subwin`. By default, current " -"locale encoding is used (see :func:`locale.getencoding`)." +"Encoding used to encode the string arguments of the methods and to decode " +"their results on a build without wide-character support. The encoding " +"attribute is inherited from the parent window when a subwindow is created, " +"for example with :meth:`window.subwin`. By default, current locale encoding " +"is used (see :func:`locale.getencoding`)." msgstr "" -#: ../../library/curses.rst:976 +#: ../../library/curses.rst:998 msgid "Clear the window." msgstr "" -#: ../../library/curses.rst:981 +#: ../../library/curses.rst:1003 msgid "Return a tuple ``(y, x)`` of coordinates of upper-left corner." msgstr "" -#: ../../library/curses.rst:986 +#: ../../library/curses.rst:1008 msgid "" "Return the given window's current background character/attribute pair. Its " "components can be extracted like those of :meth:`inch`." msgstr "" -#: ../../library/curses.rst:992 +#: ../../library/curses.rst:1014 +msgid "" +"Read a key press, after moving the cursor to *y*, *x* if specified, and " +"return it as an integer. The window is refreshed first if it is not a pad " +"and was modified since the last refresh. Wait until a key is pressed, or " +"return ``-1`` if the read is non-blocking or times out (see :meth:`nodelay` " +"and :meth:`timeout`)." +msgstr "" + +#: ../../library/curses.rst:1021 +msgid "" +"An ordinary key is returned as the code of a single byte of its encoding in " +"the current locale, so a character encoded with several bytes takes several " +"calls. For example, in a UTF-8 locale ``'é'`` is read as ``195``, then " +"``169``. Use :meth:`get_wch` to read it as a single character." +msgstr "" + +#: ../../library/curses.rst:1027 msgid "" -"Get a character. Note that the integer returned does *not* have to be in " -"ASCII range: function keys, keypad keys and so on are represented by numbers " -"higher than 255. In no-delay mode, return ``-1`` if there is no input, " -"otherwise wait until a key is pressed." +"In keypad mode (see :meth:`keypad`) function keys and other special keys are " +"returned as one of the :ref:`KEY_* constants `, which " +"cannot be mistaken for an ordinary key. Otherwise, or if their escape " +"sequence does not arrive in time (see :meth:`notimeout` and :func:" +"`set_escdelay`), their bytes are returned one at a time." msgstr "" -#: ../../library/curses.rst:1000 +#: ../../library/curses.rst:1034 ../../library/curses.rst:1054 msgid "" -"Get a wide character. Return a character for most keys, or an integer for " -"function keys, keypad keys, and other special keys. In no-delay mode, raise " -"an exception if there is no input." +"In echo mode (see :func:`echo`) the key is added to the window as by :meth:" +"`addch`; special keys are not echoed." msgstr "" -#: ../../library/curses.rst:1009 +#: ../../library/curses.rst:1040 msgid "" -"Get a character, returning a string instead of an integer, as :meth:`getch` " -"does. Function keys, keypad keys and other special keys return a multibyte " -"string containing the key name. In no-delay mode, raise an exception if " -"there is no input." +"Read a key press, after moving the cursor to *y*, *x* if specified, and " +"return it as a one-character :class:`str`. The window is refreshed first if " +"it is not a pad and was modified since the last refresh. Wait until a key is " +"pressed, or raise :exc:`error` if the read is non-blocking or times out " +"(see :meth:`nodelay` and :meth:`timeout`)." msgstr "" -#: ../../library/curses.rst:1017 +#: ../../library/curses.rst:1047 +msgid "" +"In keypad mode (see :meth:`keypad`) function keys and other special keys are " +"returned as one of the :ref:`KEY_* constants `, an " +"integer. Otherwise, or if their escape sequence does not arrive in time " +"(see :meth:`notimeout` and :func:`set_escdelay`), their characters are " +"returned one at a time." +msgstr "" + +#: ../../library/curses.rst:1062 +msgid "" +"Read a key press as :meth:`getch` does, but return it as a :class:`str`: an " +"ordinary key as a one-character string, the byte decoded as Latin-1, and a " +"special key as its name, such as ``'KEY_UP'`` (see :func:`keyname`). Raise :" +"exc:`error` instead of returning ``-1`` if there is no input." +msgstr "" + +#: ../../library/curses.rst:1070 msgid "Return a tuple ``(y, x)`` of the height and width of the window." msgstr "" -#: ../../library/curses.rst:1022 +#: ../../library/curses.rst:1075 msgid "" "Return the beginning coordinates of this window relative to its parent " "window as a tuple ``(y, x)``. Return ``(-1, -1)`` if this window has no " "parent." msgstr "" -#: ../../library/curses.rst:1032 +#: ../../library/curses.rst:1085 msgid "" -"Read a bytes object from the user, with primitive line editing capacity. At " -"most *n* characters are read; *n* defaults to and cannot exceed 2047." +"Read a line of input from the user, with primitive line editing capacity, " +"after moving the cursor to *y*, *x* if specified. Return it as a bytes " +"object, in the encoding of the current locale and without the terminating " +"newline. At most *n* bytes are read; *n* defaults to and cannot exceed 2047." msgstr "" -#: ../../library/curses.rst:1036 ../../library/curses.rst:1142 +#: ../../library/curses.rst:1092 ../../library/curses.rst:1197 msgid "The maximum value for *n* was increased from 1023 to 2047." msgstr "" -#: ../../library/curses.rst:1042 +#: ../../library/curses.rst:1098 msgid "" "Return a tuple ``(y, x)`` of current cursor position relative to the " "window's upper-left corner." msgstr "" -#: ../../library/curses.rst:1049 +#: ../../library/curses.rst:1105 msgid "" "Display a horizontal line starting at ``(y, x)`` with length *n* consisting " "of the character *ch* with attributes *attr*. The line stops at the right " "edge of the window if fewer than *n* cells are available." msgstr "" -#: ../../library/curses.rst:1056 +#: ../../library/curses.rst:1112 msgid "" "If *flag* is ``False``, curses no longer considers using the hardware insert/" "delete character feature of the terminal; if *flag* is ``True``, use of " @@ -1228,13 +1290,13 @@ msgid "" "initialized, use of character insert/delete is enabled by default." msgstr "" -#: ../../library/curses.rst:1064 +#: ../../library/curses.rst:1120 msgid "" "If *flag* is ``True``, :mod:`!curses` will try to use hardware line editing " "facilities. Otherwise, curses will not use them." msgstr "" -#: ../../library/curses.rst:1070 +#: ../../library/curses.rst:1126 msgid "" "If *flag* is ``True``, any change in the window image automatically causes " "the window to be refreshed; you no longer have to call :meth:`refresh` " @@ -1242,7 +1304,7 @@ msgid "" "calls to wrefresh. This option is disabled by default." msgstr "" -#: ../../library/curses.rst:1078 +#: ../../library/curses.rst:1134 msgid "" "Return the character at the given position in the window. The bottom 8 bits " "are the character proper and the upper bits are the attributes; extract them " @@ -1254,7 +1316,7 @@ msgid "" "characters." msgstr "" -#: ../../library/curses.rst:1092 +#: ../../library/curses.rst:1148 msgid "" "Insert character *ch* with attributes *attr* before the character under the " "cursor, or at ``(y, x)`` if specified. All characters to the right of the " @@ -1262,7 +1324,7 @@ msgid "" "line being lost. The cursor position does not change." msgstr "" -#: ../../library/curses.rst:1100 +#: ../../library/curses.rst:1156 msgid "" "Insert *nlines* lines into the specified window above the current line. The " "*nlines* bottom lines are lost. For negative *nlines*, delete *nlines* " @@ -1271,13 +1333,13 @@ msgid "" "remains the same." msgstr "" -#: ../../library/curses.rst:1109 +#: ../../library/curses.rst:1165 msgid "" "Insert a blank line under the cursor. All following lines are moved down by " "one line." msgstr "" -#: ../../library/curses.rst:1116 +#: ../../library/curses.rst:1172 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor, up to *n* characters. If *n* is " @@ -1287,7 +1349,7 @@ msgid "" "if specified)." msgstr "" -#: ../../library/curses.rst:1126 +#: ../../library/curses.rst:1182 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor. All characters to the right of the " @@ -1296,98 +1358,98 @@ msgid "" "specified)." msgstr "" -#: ../../library/curses.rst:1135 +#: ../../library/curses.rst:1191 msgid "" -"Return a bytes object of characters, extracted from the window starting at " -"the current cursor position, or at *y*, *x* if specified, and stopping at " -"the end of the line. Attributes and color information are stripped from the " -"characters. If *n* is specified, :meth:`instr` returns a string at most *n* " -"characters long (exclusive of the trailing NUL). The maximum value for *n* " -"is 2047." +"Read the text of the window from the current cursor position, or from *y*, " +"*x* if specified, to the end of the line, and return it as a bytes object, " +"in the encoding of the current locale. Attributes and color pairs are " +"stripped. At most *n* bytes are read; *n* defaults to and cannot exceed 2047." msgstr "" -#: ../../library/curses.rst:1148 +#: ../../library/curses.rst:1203 msgid "" "Return ``True`` if the specified line was modified since the last call to :" "meth:`refresh`; otherwise return ``False``. Raise a :exc:`curses.error` " "exception if *line* is not valid for the given window." msgstr "" -#: ../../library/curses.rst:1155 +#: ../../library/curses.rst:1210 msgid "" "Return ``True`` if the specified window was modified since the last call to :" "meth:`refresh`; otherwise return ``False``." msgstr "" -#: ../../library/curses.rst:1161 +#: ../../library/curses.rst:1216 msgid "" "If *flag* is ``True``, escape sequences generated by some keys (keypad, " "function keys) will be interpreted by :mod:`!curses`. If *flag* is " -"``False``, escape sequences will be left as is in the input stream." +"``False``, escape sequences will be left as is in the input stream. Keypad " +"mode is disabled by default, but :func:`wrapper` enables it for the main " +"window." msgstr "" -#: ../../library/curses.rst:1168 +#: ../../library/curses.rst:1225 msgid "" "If *flag* is ``True``, cursor is left where it is on update, instead of " "being at \"cursor position.\" This reduces cursor movement where possible." msgstr "" -#: ../../library/curses.rst:1171 +#: ../../library/curses.rst:1228 msgid "" "If *flag* is ``False``, cursor will always be at \"cursor position\" after " "an update." msgstr "" -#: ../../library/curses.rst:1176 +#: ../../library/curses.rst:1233 msgid "Move cursor to ``(new_y, new_x)``." msgstr "" -#: ../../library/curses.rst:1181 +#: ../../library/curses.rst:1238 msgid "" "Move the window inside its parent window. The screen-relative parameters of " "the window are not changed. This routine is used to display different parts " "of the parent window at the same physical position on the screen." msgstr "" -#: ../../library/curses.rst:1188 +#: ../../library/curses.rst:1245 msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." msgstr "" -#: ../../library/curses.rst:1190 +#: ../../library/curses.rst:1247 msgid "" "Moving the window so that any part of it would be off the screen is an " "error: the window is not moved and :exc:`curses.error` is raised." msgstr "" -#: ../../library/curses.rst:1196 +#: ../../library/curses.rst:1253 msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." msgstr "" -#: ../../library/curses.rst:1201 +#: ../../library/curses.rst:1258 msgid "If *flag* is ``True``, escape sequences will not be timed out." msgstr "" -#: ../../library/curses.rst:1203 +#: ../../library/curses.rst:1260 msgid "" "If *flag* is ``False``, after a few milliseconds, an escape sequence will " "not be interpreted, and will be left in the input stream as is." msgstr "" -#: ../../library/curses.rst:1210 +#: ../../library/curses.rst:1267 msgid "" "Mark for refresh but wait. This function updates the data structure " "representing the desired state of the window, but does not force an update " "of the physical screen. To accomplish that, call :func:`doupdate`." msgstr "" -#: ../../library/curses.rst:1214 +#: ../../library/curses.rst:1271 msgid "" "The 6 arguments can only be specified, and are then required, when the " "window is a pad created with :func:`newpad`; they have the same meaning as " "for :meth:`refresh`." msgstr "" -#: ../../library/curses.rst:1221 +#: ../../library/curses.rst:1278 msgid "" "Overlay the window on top of *destwin*. The windows need not be the same " "size, only the overlapping region is copied. This copy is non-destructive, " @@ -1395,7 +1457,7 @@ msgid "" "contents of *destwin*." msgstr "" -#: ../../library/curses.rst:1226 +#: ../../library/curses.rst:1283 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overlay` can be used. *sminrow* and *smincol* are the upper-left " @@ -1403,7 +1465,7 @@ msgid "" "in the destination window." msgstr "" -#: ../../library/curses.rst:1234 +#: ../../library/curses.rst:1291 msgid "" "Overwrite the window on top of *destwin*. The windows need not be the same " "size, in which case only the overlapping region is copied. This copy is " @@ -1411,7 +1473,7 @@ msgid "" "the old contents of *destwin*." msgstr "" -#: ../../library/curses.rst:1239 +#: ../../library/curses.rst:1296 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overwrite` can be used. *sminrow* and *smincol* are the upper-left " @@ -1419,31 +1481,31 @@ msgid "" "the destination window." msgstr "" -#: ../../library/curses.rst:1247 +#: ../../library/curses.rst:1304 msgid "" "Write all data associated with the window into the provided file object. " "This information can be later retrieved using the :func:`getwin` function." msgstr "" -#: ../../library/curses.rst:1253 +#: ../../library/curses.rst:1310 msgid "" "Indicate that the *num* screen lines, starting at line *beg*, are corrupted " "and should be completely redrawn on the next :meth:`refresh` call." msgstr "" -#: ../../library/curses.rst:1259 +#: ../../library/curses.rst:1316 msgid "" "Touch the entire window, causing it to be completely redrawn on the next :" "meth:`refresh` call." msgstr "" -#: ../../library/curses.rst:1265 +#: ../../library/curses.rst:1322 msgid "" "Update the display immediately (sync actual screen with previous drawing/" "deleting methods)." msgstr "" -#: ../../library/curses.rst:1268 +#: ../../library/curses.rst:1325 msgid "" "The 6 arguments can only be specified, and are then required, when the " "window is a pad created with :func:`newpad`. The additional parameters are " @@ -1458,7 +1520,7 @@ msgid "" "as if they were zero." msgstr "" -#: ../../library/curses.rst:1282 +#: ../../library/curses.rst:1339 msgid "" "Reallocate storage for a curses window to adjust its dimensions to the " "specified values. If either dimension is larger than the current values, " @@ -1466,14 +1528,14 @@ msgid "" "rendition (as set by :meth:`bkgdset`) merged into them." msgstr "" -#: ../../library/curses.rst:1290 +#: ../../library/curses.rst:1347 msgid "" "Scroll the screen or scrolling region. Scroll upward by *lines* lines if " "*lines* is positive, or downward if it is negative. Scrolling has no effect " "unless it has been enabled for the window with :meth:`scrollok`." msgstr "" -#: ../../library/curses.rst:1297 +#: ../../library/curses.rst:1354 msgid "" "Control what happens when the cursor of a window is moved off the edge of " "the window or scrolling region, either as a result of a newline action on " @@ -1483,23 +1545,23 @@ msgid "" "scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." msgstr "" -#: ../../library/curses.rst:1307 +#: ../../library/curses.rst:1364 msgid "" "Set the scrolling region from line *top* to line *bottom*. All scrolling " "actions will take place in this region." msgstr "" -#: ../../library/curses.rst:1313 +#: ../../library/curses.rst:1370 msgid "" "Turn off the standout attribute. On some terminals this has the side effect " "of turning off all attributes." msgstr "" -#: ../../library/curses.rst:1319 +#: ../../library/curses.rst:1376 msgid "Turn on attribute *A_STANDOUT*." msgstr "" -#: ../../library/curses.rst:1325 +#: ../../library/curses.rst:1382 msgid "" "Return a sub-pad, whose upper-left corner is at ``(begin_y, begin_x)``, and " "whose width/height is *ncols*/*nlines*. The coordinates are relative to the " @@ -1507,39 +1569,39 @@ msgid "" "method is only available for pads created with :func:`newpad`." msgstr "" -#: ../../library/curses.rst:1334 +#: ../../library/curses.rst:1391 msgid "" "Return a sub-window, whose upper-left corner is at the screen-relative " "coordinates ``(begin_y, begin_x)``, and whose width/height is *ncols*/" "*nlines*." msgstr "" -#: ../../library/curses.rst:1337 +#: ../../library/curses.rst:1394 msgid "" "By default, the sub-window will extend from the specified position to the " "lower right corner of the window." msgstr "" -#: ../../library/curses.rst:1343 +#: ../../library/curses.rst:1400 msgid "" "Touch each location in the window that has been touched in any of its " "ancestor windows. This routine is called by :meth:`refresh`, so it should " "almost never be necessary to call it manually." msgstr "" -#: ../../library/curses.rst:1350 +#: ../../library/curses.rst:1407 msgid "" "If *flag* is ``True``, then :meth:`syncup` is called automatically whenever " "there is a change in the window." msgstr "" -#: ../../library/curses.rst:1356 +#: ../../library/curses.rst:1413 msgid "" "Touch all locations in ancestors of the window that have been changed in " "the window." msgstr "" -#: ../../library/curses.rst:1362 +#: ../../library/curses.rst:1419 msgid "" "Set blocking or non-blocking read behavior for the window. If *delay* is " "negative, blocking read is used (which will wait indefinitely for input). " @@ -1549,7 +1611,7 @@ msgid "" "still no input at the end of that time." msgstr "" -#: ../../library/curses.rst:1372 +#: ../../library/curses.rst:1429 msgid "" "Pretend *count* lines have been changed, starting with line *start*. If " "*changed* is supplied, it specifies whether the affected lines are marked as " @@ -1557,49 +1619,49 @@ msgid "" "``=False``)." msgstr "" -#: ../../library/curses.rst:1379 +#: ../../library/curses.rst:1436 msgid "" "Pretend the whole window has been changed, for purposes of drawing " "optimizations." msgstr "" -#: ../../library/curses.rst:1385 +#: ../../library/curses.rst:1442 msgid "" "Mark all lines in the window as unchanged since the last call to :meth:" "`refresh`." msgstr "" -#: ../../library/curses.rst:1392 +#: ../../library/curses.rst:1449 msgid "" "Display a vertical line starting at ``(y, x)`` with length *n* consisting of " "the character *ch* with attributes *attr*." msgstr "" -#: ../../library/curses.rst:1397 +#: ../../library/curses.rst:1454 msgid "Constants" msgstr "" -#: ../../library/curses.rst:1399 +#: ../../library/curses.rst:1456 msgid "The :mod:`!curses` module defines the following data members:" msgstr "" -#: ../../library/curses.rst:1404 +#: ../../library/curses.rst:1461 msgid "" "Some curses routines that return an integer, such as :meth:`~window." "getch`, return :const:`ERR` upon failure." msgstr "" -#: ../../library/curses.rst:1410 +#: ../../library/curses.rst:1467 msgid "" "Some curses routines that return an integer, such as :func:`napms`, " "return :const:`OK` upon success." msgstr "" -#: ../../library/curses.rst:1416 +#: ../../library/curses.rst:1473 msgid "A bytes object representing the current version of the module." msgstr "" -#: ../../library/curses.rst:1421 +#: ../../library/curses.rst:1478 msgid "" "A named tuple containing the three components of the ncurses library " "version: *major*, *minor*, and *patch*. All values are integers. The " @@ -1607,536 +1669,536 @@ msgid "" "is equivalent to ``curses.ncurses_version.major`` and so on." msgstr "" -#: ../../library/curses.rst:1426 +#: ../../library/curses.rst:1483 msgid "Availability: if the ncurses library is used." msgstr "" -#: ../../library/curses.rst:1432 +#: ../../library/curses.rst:1489 msgid "" "The maximum number of colors the terminal can support. It is defined only " "after the call to :func:`start_color`." msgstr "" -#: ../../library/curses.rst:1437 +#: ../../library/curses.rst:1494 msgid "" "The maximum number of color pairs the terminal can support. It is defined " "only after the call to :func:`start_color`." msgstr "" -#: ../../library/curses.rst:1442 +#: ../../library/curses.rst:1499 msgid "" "The width of the screen, that is, the number of columns. It is defined only " "after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" "func:`resizeterm` and :func:`resize_term`." msgstr "" -#: ../../library/curses.rst:1449 +#: ../../library/curses.rst:1506 msgid "" "The height of the screen, that is, the number of lines. It is defined only " "after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" "func:`resizeterm` and :func:`resize_term`." msgstr "" -#: ../../library/curses.rst:1455 +#: ../../library/curses.rst:1512 msgid "" "Some constants are available to specify character cell attributes. The exact " "constants available are system dependent." msgstr "" -#: ../../library/curses.rst:1459 +#: ../../library/curses.rst:1516 msgid "Attribute" msgstr "" -#: ../../library/curses.rst:1459 ../../library/curses.rst:1504 -#: ../../library/curses.rst:1750 ../../library/curses.rst:1842 +#: ../../library/curses.rst:1516 ../../library/curses.rst:1561 +#: ../../library/curses.rst:1809 ../../library/curses.rst:1901 msgid "Meaning" msgstr "" -#: ../../library/curses.rst:1461 +#: ../../library/curses.rst:1518 msgid "Alternate character set mode" msgstr "" -#: ../../library/curses.rst:1463 +#: ../../library/curses.rst:1520 msgid "Blink mode" msgstr "" -#: ../../library/curses.rst:1465 +#: ../../library/curses.rst:1522 msgid "Bold mode" msgstr "" -#: ../../library/curses.rst:1467 +#: ../../library/curses.rst:1524 msgid "Dim mode" msgstr "" -#: ../../library/curses.rst:1469 +#: ../../library/curses.rst:1526 msgid "Invisible or blank mode" msgstr "" -#: ../../library/curses.rst:1471 +#: ../../library/curses.rst:1528 msgid "Italic mode" msgstr "" -#: ../../library/curses.rst:1473 +#: ../../library/curses.rst:1530 msgid "Normal attribute" msgstr "" -#: ../../library/curses.rst:1475 +#: ../../library/curses.rst:1532 msgid "Protected mode" msgstr "" -#: ../../library/curses.rst:1477 +#: ../../library/curses.rst:1534 msgid "Reverse background and foreground colors" msgstr "" -#: ../../library/curses.rst:1480 +#: ../../library/curses.rst:1537 msgid "Standout mode" msgstr "" -#: ../../library/curses.rst:1482 +#: ../../library/curses.rst:1539 msgid "Underline mode" msgstr "" -#: ../../library/curses.rst:1484 +#: ../../library/curses.rst:1541 msgid "Horizontal highlight" msgstr "" -#: ../../library/curses.rst:1486 +#: ../../library/curses.rst:1543 msgid "Left highlight" msgstr "" -#: ../../library/curses.rst:1488 +#: ../../library/curses.rst:1545 msgid "Low highlight" msgstr "" -#: ../../library/curses.rst:1490 +#: ../../library/curses.rst:1547 msgid "Right highlight" msgstr "" -#: ../../library/curses.rst:1492 +#: ../../library/curses.rst:1549 msgid "Top highlight" msgstr "" -#: ../../library/curses.rst:1494 +#: ../../library/curses.rst:1551 msgid "Vertical highlight" msgstr "" -#: ../../library/curses.rst:1497 +#: ../../library/curses.rst:1554 msgid "``A_ITALIC`` was added." msgstr "" -#: ../../library/curses.rst:1500 +#: ../../library/curses.rst:1557 msgid "" "Several constants are available to extract corresponding attributes returned " "by some methods." msgstr "" -#: ../../library/curses.rst:1504 +#: ../../library/curses.rst:1561 msgid "Bit-mask" msgstr "" -#: ../../library/curses.rst:1506 +#: ../../library/curses.rst:1563 msgid "Bit-mask to extract attributes" msgstr "" -#: ../../library/curses.rst:1509 +#: ../../library/curses.rst:1566 msgid "Bit-mask to extract a character" msgstr "" -#: ../../library/curses.rst:1512 +#: ../../library/curses.rst:1569 msgid "Bit-mask to extract color-pair field information" msgstr "" -#: ../../library/curses.rst:1516 +#: ../../library/curses.rst:1575 msgid "" "Keys are referred to by integer constants with names starting with " "``KEY_``. The exact keycaps available are system dependent." msgstr "" -#: ../../library/curses.rst:1522 +#: ../../library/curses.rst:1581 msgid "Key constant" msgstr "" -#: ../../library/curses.rst:1522 +#: ../../library/curses.rst:1581 msgid "Key" msgstr "" -#: ../../library/curses.rst:1524 +#: ../../library/curses.rst:1583 msgid "Minimum key value" msgstr "" -#: ../../library/curses.rst:1526 +#: ../../library/curses.rst:1585 msgid "Break key (unreliable)" msgstr "" -#: ../../library/curses.rst:1528 +#: ../../library/curses.rst:1587 msgid "Down-arrow" msgstr "" -#: ../../library/curses.rst:1530 +#: ../../library/curses.rst:1589 msgid "Up-arrow" msgstr "" -#: ../../library/curses.rst:1532 +#: ../../library/curses.rst:1591 msgid "Left-arrow" msgstr "" -#: ../../library/curses.rst:1534 +#: ../../library/curses.rst:1593 msgid "Right-arrow" msgstr "" -#: ../../library/curses.rst:1536 +#: ../../library/curses.rst:1595 msgid "Home key (upward+left arrow)" msgstr "" -#: ../../library/curses.rst:1538 +#: ../../library/curses.rst:1597 msgid "Backspace (unreliable)" msgstr "" -#: ../../library/curses.rst:1540 +#: ../../library/curses.rst:1599 msgid "Function keys. Up to 64 function keys are supported." msgstr "" -#: ../../library/curses.rst:1543 +#: ../../library/curses.rst:1602 msgid "Value of function key *n*" msgstr "" -#: ../../library/curses.rst:1545 +#: ../../library/curses.rst:1604 msgid "Delete line" msgstr "" -#: ../../library/curses.rst:1547 +#: ../../library/curses.rst:1606 msgid "Insert line" msgstr "" -#: ../../library/curses.rst:1549 +#: ../../library/curses.rst:1608 msgid "Delete character" msgstr "" -#: ../../library/curses.rst:1551 +#: ../../library/curses.rst:1610 msgid "Insert char or enter insert mode" msgstr "" -#: ../../library/curses.rst:1553 +#: ../../library/curses.rst:1612 msgid "Exit insert char mode" msgstr "" -#: ../../library/curses.rst:1555 +#: ../../library/curses.rst:1614 msgid "Clear screen" msgstr "" -#: ../../library/curses.rst:1557 +#: ../../library/curses.rst:1616 msgid "Clear to end of screen" msgstr "" -#: ../../library/curses.rst:1559 +#: ../../library/curses.rst:1618 msgid "Clear to end of line" msgstr "" -#: ../../library/curses.rst:1561 +#: ../../library/curses.rst:1620 msgid "Scroll 1 line forward" msgstr "" -#: ../../library/curses.rst:1563 +#: ../../library/curses.rst:1622 msgid "Scroll 1 line backward (reverse)" msgstr "" -#: ../../library/curses.rst:1565 +#: ../../library/curses.rst:1624 msgid "Next page" msgstr "" -#: ../../library/curses.rst:1567 +#: ../../library/curses.rst:1626 msgid "Previous page" msgstr "" -#: ../../library/curses.rst:1569 +#: ../../library/curses.rst:1628 msgid "Set tab" msgstr "" -#: ../../library/curses.rst:1571 +#: ../../library/curses.rst:1630 msgid "Clear tab" msgstr "" -#: ../../library/curses.rst:1573 +#: ../../library/curses.rst:1632 msgid "Clear all tabs" msgstr "" -#: ../../library/curses.rst:1575 +#: ../../library/curses.rst:1634 msgid "Enter or send (unreliable)" msgstr "" -#: ../../library/curses.rst:1577 +#: ../../library/curses.rst:1636 msgid "Soft (partial) reset (unreliable)" msgstr "" -#: ../../library/curses.rst:1579 +#: ../../library/curses.rst:1638 msgid "Reset or hard reset (unreliable)" msgstr "" -#: ../../library/curses.rst:1581 +#: ../../library/curses.rst:1640 msgid "Print" msgstr "" -#: ../../library/curses.rst:1583 +#: ../../library/curses.rst:1642 msgid "Home down or bottom (lower left)" msgstr "" -#: ../../library/curses.rst:1585 +#: ../../library/curses.rst:1644 msgid "Upper left of keypad" msgstr "" -#: ../../library/curses.rst:1587 +#: ../../library/curses.rst:1646 msgid "Upper right of keypad" msgstr "" -#: ../../library/curses.rst:1589 +#: ../../library/curses.rst:1648 msgid "Center of keypad" msgstr "" -#: ../../library/curses.rst:1591 +#: ../../library/curses.rst:1650 msgid "Lower left of keypad" msgstr "" -#: ../../library/curses.rst:1593 +#: ../../library/curses.rst:1652 msgid "Lower right of keypad" msgstr "" -#: ../../library/curses.rst:1595 +#: ../../library/curses.rst:1654 msgid "Back tab" msgstr "" -#: ../../library/curses.rst:1597 +#: ../../library/curses.rst:1656 msgid "Beg (beginning)" msgstr "" -#: ../../library/curses.rst:1599 +#: ../../library/curses.rst:1658 msgid "Cancel" msgstr "" -#: ../../library/curses.rst:1601 +#: ../../library/curses.rst:1660 msgid "Close" msgstr "" -#: ../../library/curses.rst:1603 +#: ../../library/curses.rst:1662 msgid "Cmd (command)" msgstr "" -#: ../../library/curses.rst:1605 +#: ../../library/curses.rst:1664 msgid "Copy" msgstr "" -#: ../../library/curses.rst:1607 +#: ../../library/curses.rst:1666 msgid "Create" msgstr "" -#: ../../library/curses.rst:1609 +#: ../../library/curses.rst:1668 msgid "End" msgstr "" -#: ../../library/curses.rst:1611 +#: ../../library/curses.rst:1670 msgid "Exit" msgstr "" -#: ../../library/curses.rst:1613 +#: ../../library/curses.rst:1672 msgid "Find" msgstr "" -#: ../../library/curses.rst:1615 +#: ../../library/curses.rst:1674 msgid "Help" msgstr "" -#: ../../library/curses.rst:1617 +#: ../../library/curses.rst:1676 msgid "Mark" msgstr "" -#: ../../library/curses.rst:1619 +#: ../../library/curses.rst:1678 msgid "Message" msgstr "" -#: ../../library/curses.rst:1621 +#: ../../library/curses.rst:1680 msgid "Move" msgstr "" -#: ../../library/curses.rst:1623 +#: ../../library/curses.rst:1682 msgid "Next" msgstr "" -#: ../../library/curses.rst:1625 +#: ../../library/curses.rst:1684 msgid "Open" msgstr "" -#: ../../library/curses.rst:1627 +#: ../../library/curses.rst:1686 msgid "Options" msgstr "" -#: ../../library/curses.rst:1629 +#: ../../library/curses.rst:1688 msgid "Prev (previous)" msgstr "" -#: ../../library/curses.rst:1631 +#: ../../library/curses.rst:1690 msgid "Redo" msgstr "" -#: ../../library/curses.rst:1633 +#: ../../library/curses.rst:1692 msgid "Ref (reference)" msgstr "" -#: ../../library/curses.rst:1635 +#: ../../library/curses.rst:1694 msgid "Refresh" msgstr "" -#: ../../library/curses.rst:1637 +#: ../../library/curses.rst:1696 msgid "Replace" msgstr "" -#: ../../library/curses.rst:1639 +#: ../../library/curses.rst:1698 msgid "Restart" msgstr "" -#: ../../library/curses.rst:1641 +#: ../../library/curses.rst:1700 msgid "Resume" msgstr "" -#: ../../library/curses.rst:1643 +#: ../../library/curses.rst:1702 msgid "Save" msgstr "" -#: ../../library/curses.rst:1645 +#: ../../library/curses.rst:1704 msgid "Shifted Beg (beginning)" msgstr "" -#: ../../library/curses.rst:1647 +#: ../../library/curses.rst:1706 msgid "Shifted Cancel" msgstr "" -#: ../../library/curses.rst:1649 +#: ../../library/curses.rst:1708 msgid "Shifted Command" msgstr "" -#: ../../library/curses.rst:1651 +#: ../../library/curses.rst:1710 msgid "Shifted Copy" msgstr "" -#: ../../library/curses.rst:1653 +#: ../../library/curses.rst:1712 msgid "Shifted Create" msgstr "" -#: ../../library/curses.rst:1655 +#: ../../library/curses.rst:1714 msgid "Shifted Delete char" msgstr "" -#: ../../library/curses.rst:1657 +#: ../../library/curses.rst:1716 msgid "Shifted Delete line" msgstr "" -#: ../../library/curses.rst:1659 +#: ../../library/curses.rst:1718 msgid "Select" msgstr "" -#: ../../library/curses.rst:1661 +#: ../../library/curses.rst:1720 msgid "Shifted End" msgstr "" -#: ../../library/curses.rst:1663 +#: ../../library/curses.rst:1722 msgid "Shifted Clear line" msgstr "" -#: ../../library/curses.rst:1665 +#: ../../library/curses.rst:1724 msgid "Shifted Exit" msgstr "" -#: ../../library/curses.rst:1667 +#: ../../library/curses.rst:1726 msgid "Shifted Find" msgstr "" -#: ../../library/curses.rst:1669 +#: ../../library/curses.rst:1728 msgid "Shifted Help" msgstr "" -#: ../../library/curses.rst:1671 +#: ../../library/curses.rst:1730 msgid "Shifted Home" msgstr "" -#: ../../library/curses.rst:1673 +#: ../../library/curses.rst:1732 msgid "Shifted Input" msgstr "" -#: ../../library/curses.rst:1675 +#: ../../library/curses.rst:1734 msgid "Shifted Left arrow" msgstr "" -#: ../../library/curses.rst:1677 +#: ../../library/curses.rst:1736 msgid "Shifted Message" msgstr "" -#: ../../library/curses.rst:1679 +#: ../../library/curses.rst:1738 msgid "Shifted Move" msgstr "" -#: ../../library/curses.rst:1681 +#: ../../library/curses.rst:1740 msgid "Shifted Next" msgstr "" -#: ../../library/curses.rst:1683 +#: ../../library/curses.rst:1742 msgid "Shifted Options" msgstr "" -#: ../../library/curses.rst:1685 +#: ../../library/curses.rst:1744 msgid "Shifted Prev" msgstr "" -#: ../../library/curses.rst:1687 +#: ../../library/curses.rst:1746 msgid "Shifted Print" msgstr "" -#: ../../library/curses.rst:1689 +#: ../../library/curses.rst:1748 msgid "Shifted Redo" msgstr "" -#: ../../library/curses.rst:1691 +#: ../../library/curses.rst:1750 msgid "Shifted Replace" msgstr "" -#: ../../library/curses.rst:1693 +#: ../../library/curses.rst:1752 msgid "Shifted Right arrow" msgstr "" -#: ../../library/curses.rst:1695 +#: ../../library/curses.rst:1754 msgid "Shifted Resume" msgstr "" -#: ../../library/curses.rst:1697 +#: ../../library/curses.rst:1756 msgid "Shifted Save" msgstr "" -#: ../../library/curses.rst:1699 +#: ../../library/curses.rst:1758 msgid "Shifted Suspend" msgstr "" -#: ../../library/curses.rst:1701 +#: ../../library/curses.rst:1760 msgid "Shifted Undo" msgstr "" -#: ../../library/curses.rst:1703 +#: ../../library/curses.rst:1762 msgid "Suspend" msgstr "" -#: ../../library/curses.rst:1705 +#: ../../library/curses.rst:1764 msgid "Undo" msgstr "" -#: ../../library/curses.rst:1707 +#: ../../library/curses.rst:1766 msgid "Mouse event has occurred" msgstr "" -#: ../../library/curses.rst:1709 +#: ../../library/curses.rst:1768 msgid "Terminal resize event" msgstr "" -#: ../../library/curses.rst:1711 +#: ../../library/curses.rst:1770 msgid "Maximum key value" msgstr "" -#: ../../library/curses.rst:1714 +#: ../../library/curses.rst:1773 msgid "" "On VT100s and their software emulations, such as X terminal emulators, there " "are normally at least four function keys (:const:`KEY_F1 `, :const:" @@ -2148,64 +2210,64 @@ msgid "" "keypad mappings are standard:" msgstr "" -#: ../../library/curses.rst:1723 +#: ../../library/curses.rst:1782 msgid "Keycap" msgstr "" -#: ../../library/curses.rst:1723 ../../library/curses.rst:1868 -#: ../../library/curses.rst:1994 +#: ../../library/curses.rst:1782 ../../library/curses.rst:1927 +#: ../../library/curses.rst:2053 msgid "Constant" msgstr "" -#: ../../library/curses.rst:1725 +#: ../../library/curses.rst:1784 msgid ":kbd:`Insert`" msgstr "" -#: ../../library/curses.rst:1725 +#: ../../library/curses.rst:1784 msgid "KEY_IC" msgstr "" -#: ../../library/curses.rst:1727 +#: ../../library/curses.rst:1786 msgid ":kbd:`Delete`" msgstr "" -#: ../../library/curses.rst:1727 +#: ../../library/curses.rst:1786 msgid "KEY_DC" msgstr "" -#: ../../library/curses.rst:1729 +#: ../../library/curses.rst:1788 msgid ":kbd:`Home`" msgstr "" -#: ../../library/curses.rst:1729 +#: ../../library/curses.rst:1788 msgid "KEY_HOME" msgstr "" -#: ../../library/curses.rst:1731 +#: ../../library/curses.rst:1790 msgid ":kbd:`End`" msgstr "" -#: ../../library/curses.rst:1731 +#: ../../library/curses.rst:1790 msgid "KEY_END" msgstr "" -#: ../../library/curses.rst:1733 +#: ../../library/curses.rst:1792 msgid ":kbd:`Page Up`" msgstr "" -#: ../../library/curses.rst:1733 +#: ../../library/curses.rst:1792 msgid "KEY_PPAGE" msgstr "" -#: ../../library/curses.rst:1735 +#: ../../library/curses.rst:1794 msgid ":kbd:`Page Down`" msgstr "" -#: ../../library/curses.rst:1735 +#: ../../library/curses.rst:1794 msgid "KEY_NPAGE" msgstr "" -#: ../../library/curses.rst:1740 +#: ../../library/curses.rst:1799 msgid "" "The following table lists characters from the alternate character set. These " "are inherited from the VT100 terminal, and will generally be available on " @@ -2213,272 +2275,272 @@ msgid "" "available, curses falls back on a crude printable ASCII approximation." msgstr "" -#: ../../library/curses.rst:1747 +#: ../../library/curses.rst:1806 msgid "These are available only after :func:`initscr` has been called." msgstr "" -#: ../../library/curses.rst:1750 +#: ../../library/curses.rst:1809 msgid "ACS code" msgstr "" -#: ../../library/curses.rst:1752 +#: ../../library/curses.rst:1811 msgid "alternate name for upper-right corner" msgstr "" -#: ../../library/curses.rst:1754 +#: ../../library/curses.rst:1813 msgid "solid square block" msgstr "" -#: ../../library/curses.rst:1756 +#: ../../library/curses.rst:1815 msgid "board of squares" msgstr "" -#: ../../library/curses.rst:1758 +#: ../../library/curses.rst:1817 msgid "alternate name for horizontal line" msgstr "" -#: ../../library/curses.rst:1760 +#: ../../library/curses.rst:1819 msgid "alternate name for upper-left corner" msgstr "" -#: ../../library/curses.rst:1762 +#: ../../library/curses.rst:1821 msgid "alternate name for top tee" msgstr "" -#: ../../library/curses.rst:1764 +#: ../../library/curses.rst:1823 msgid "bottom tee" msgstr "" -#: ../../library/curses.rst:1766 +#: ../../library/curses.rst:1825 msgid "bullet" msgstr "" -#: ../../library/curses.rst:1768 +#: ../../library/curses.rst:1827 msgid "checker board (stipple)" msgstr "" -#: ../../library/curses.rst:1770 +#: ../../library/curses.rst:1829 msgid "arrow pointing down" msgstr "" -#: ../../library/curses.rst:1772 +#: ../../library/curses.rst:1831 msgid "degree symbol" msgstr "" -#: ../../library/curses.rst:1774 +#: ../../library/curses.rst:1833 msgid "diamond" msgstr "" -#: ../../library/curses.rst:1776 +#: ../../library/curses.rst:1835 msgid "greater-than-or-equal-to" msgstr "" -#: ../../library/curses.rst:1778 +#: ../../library/curses.rst:1837 msgid "horizontal line" msgstr "" -#: ../../library/curses.rst:1780 +#: ../../library/curses.rst:1839 msgid "lantern symbol" msgstr "" -#: ../../library/curses.rst:1782 +#: ../../library/curses.rst:1841 msgid "left arrow" msgstr "" -#: ../../library/curses.rst:1784 +#: ../../library/curses.rst:1843 msgid "less-than-or-equal-to" msgstr "" -#: ../../library/curses.rst:1786 +#: ../../library/curses.rst:1845 msgid "lower-left corner" msgstr "" -#: ../../library/curses.rst:1788 +#: ../../library/curses.rst:1847 msgid "lower-right corner" msgstr "" -#: ../../library/curses.rst:1790 +#: ../../library/curses.rst:1849 msgid "left tee" msgstr "" -#: ../../library/curses.rst:1792 +#: ../../library/curses.rst:1851 msgid "not-equal sign" msgstr "" -#: ../../library/curses.rst:1794 +#: ../../library/curses.rst:1853 msgid "letter pi" msgstr "" -#: ../../library/curses.rst:1796 +#: ../../library/curses.rst:1855 msgid "plus-or-minus sign" msgstr "" -#: ../../library/curses.rst:1798 +#: ../../library/curses.rst:1857 msgid "big plus sign" msgstr "" -#: ../../library/curses.rst:1800 +#: ../../library/curses.rst:1859 msgid "right arrow" msgstr "" -#: ../../library/curses.rst:1802 +#: ../../library/curses.rst:1861 msgid "right tee" msgstr "" -#: ../../library/curses.rst:1804 +#: ../../library/curses.rst:1863 msgid "scan line 1" msgstr "" -#: ../../library/curses.rst:1806 +#: ../../library/curses.rst:1865 msgid "scan line 3" msgstr "" -#: ../../library/curses.rst:1808 +#: ../../library/curses.rst:1867 msgid "scan line 7" msgstr "" -#: ../../library/curses.rst:1810 +#: ../../library/curses.rst:1869 msgid "scan line 9" msgstr "" -#: ../../library/curses.rst:1812 +#: ../../library/curses.rst:1871 msgid "alternate name for lower-right corner" msgstr "" -#: ../../library/curses.rst:1814 +#: ../../library/curses.rst:1873 msgid "alternate name for vertical line" msgstr "" -#: ../../library/curses.rst:1816 +#: ../../library/curses.rst:1875 msgid "alternate name for right tee" msgstr "" -#: ../../library/curses.rst:1818 +#: ../../library/curses.rst:1877 msgid "alternate name for lower-left corner" msgstr "" -#: ../../library/curses.rst:1820 +#: ../../library/curses.rst:1879 msgid "alternate name for bottom tee" msgstr "" -#: ../../library/curses.rst:1822 +#: ../../library/curses.rst:1881 msgid "alternate name for left tee" msgstr "" -#: ../../library/curses.rst:1824 +#: ../../library/curses.rst:1883 msgid "alternate name for crossover or big plus" msgstr "" -#: ../../library/curses.rst:1826 +#: ../../library/curses.rst:1885 msgid "pound sterling" msgstr "" -#: ../../library/curses.rst:1828 +#: ../../library/curses.rst:1887 msgid "top tee" msgstr "" -#: ../../library/curses.rst:1830 +#: ../../library/curses.rst:1889 msgid "up arrow" msgstr "" -#: ../../library/curses.rst:1832 +#: ../../library/curses.rst:1891 msgid "upper-left corner" msgstr "" -#: ../../library/curses.rst:1834 +#: ../../library/curses.rst:1893 msgid "upper-right corner" msgstr "" -#: ../../library/curses.rst:1836 +#: ../../library/curses.rst:1895 msgid "vertical line" msgstr "" -#: ../../library/curses.rst:1839 +#: ../../library/curses.rst:1898 msgid "" "The following table lists mouse button constants used by :meth:`getmouse`:" msgstr "" -#: ../../library/curses.rst:1842 +#: ../../library/curses.rst:1901 msgid "Mouse button constant" msgstr "" -#: ../../library/curses.rst:1844 +#: ../../library/curses.rst:1903 msgid "Mouse button *n* pressed" msgstr "" -#: ../../library/curses.rst:1846 +#: ../../library/curses.rst:1905 msgid "Mouse button *n* released" msgstr "" -#: ../../library/curses.rst:1848 +#: ../../library/curses.rst:1907 msgid "Mouse button *n* clicked" msgstr "" -#: ../../library/curses.rst:1850 +#: ../../library/curses.rst:1909 msgid "Mouse button *n* double clicked" msgstr "" -#: ../../library/curses.rst:1852 +#: ../../library/curses.rst:1911 msgid "Mouse button *n* triple clicked" msgstr "" -#: ../../library/curses.rst:1854 +#: ../../library/curses.rst:1913 msgid "Shift was down during button state change" msgstr "" -#: ../../library/curses.rst:1856 +#: ../../library/curses.rst:1915 msgid "Control was down during button state change" msgstr "" -#: ../../library/curses.rst:1858 +#: ../../library/curses.rst:1917 msgid "Alt was down during button state change" msgstr "" -#: ../../library/curses.rst:1865 +#: ../../library/curses.rst:1924 msgid "The following table lists the predefined colors:" msgstr "" -#: ../../library/curses.rst:1868 +#: ../../library/curses.rst:1927 msgid "Color" msgstr "" -#: ../../library/curses.rst:1870 +#: ../../library/curses.rst:1929 msgid "Black" msgstr "" -#: ../../library/curses.rst:1872 +#: ../../library/curses.rst:1931 msgid "Blue" msgstr "" -#: ../../library/curses.rst:1874 +#: ../../library/curses.rst:1933 msgid "Cyan (light greenish blue)" msgstr "" -#: ../../library/curses.rst:1876 +#: ../../library/curses.rst:1935 msgid "Green" msgstr "" -#: ../../library/curses.rst:1878 +#: ../../library/curses.rst:1937 msgid "Magenta (purplish red)" msgstr "" -#: ../../library/curses.rst:1880 +#: ../../library/curses.rst:1939 msgid "Red" msgstr "" -#: ../../library/curses.rst:1882 +#: ../../library/curses.rst:1941 msgid "White" msgstr "" -#: ../../library/curses.rst:1884 +#: ../../library/curses.rst:1943 msgid "Yellow" msgstr "" -#: ../../library/curses.rst:1889 +#: ../../library/curses.rst:1948 msgid ":mod:`!curses.textpad` --- Text input widget for curses programs" msgstr "" -#: ../../library/curses.rst:1894 +#: ../../library/curses.rst:1953 msgid "" "The :mod:`!curses.textpad` module provides a :class:`Textbox` class that " "handles elementary text editing in a curses window, supporting a set of " @@ -2488,11 +2550,11 @@ msgid "" "purposes." msgstr "" -#: ../../library/curses.rst:1900 +#: ../../library/curses.rst:1959 msgid "The module :mod:`!curses.textpad` defines the following function:" msgstr "" -#: ../../library/curses.rst:1905 +#: ../../library/curses.rst:1964 msgid "" "Draw a rectangle. The first argument must be a window object; the remaining " "arguments are coordinates relative to that window. The second and third " @@ -2504,15 +2566,15 @@ msgid "" "will be drawn with ASCII dashes, vertical bars, and plus signs." msgstr "" -#: ../../library/curses.rst:1918 +#: ../../library/curses.rst:1977 msgid "Textbox objects" msgstr "" -#: ../../library/curses.rst:1920 +#: ../../library/curses.rst:1979 msgid "You can instantiate a :class:`Textbox` object as follows:" msgstr "" -#: ../../library/curses.rst:1925 +#: ../../library/curses.rst:1984 msgid "" "Return a textbox widget object. The *win* argument should be a curses :ref:" "`window ` object in which the textbox is to be " @@ -2523,11 +2585,11 @@ msgid "" "`stripspaces` flag is initially on." msgstr "" -#: ../../library/curses.rst:1933 +#: ../../library/curses.rst:1992 msgid ":class:`Textbox` objects have the following methods:" msgstr "" -#: ../../library/curses.rst:1938 +#: ../../library/curses.rst:1997 msgid "" "This is the entry point you will normally use. It accepts editing " "keystrokes until one of the termination keystrokes is entered. If " @@ -2538,170 +2600,170 @@ msgid "" "window are included is affected by the :attr:`stripspaces` attribute." msgstr "" -#: ../../library/curses.rst:1950 +#: ../../library/curses.rst:2009 msgid "" "Process a single command keystroke. Returns ``1`` to continue editing, or " "``0`` if a termination keystroke was processed. Here are the supported " "special keystrokes:" msgstr "" -#: ../../library/curses.rst:1955 ../../library/curses.rst:1994 +#: ../../library/curses.rst:2014 ../../library/curses.rst:2053 msgid "Keystroke" msgstr "" -#: ../../library/curses.rst:1955 +#: ../../library/curses.rst:2014 msgid "Action" msgstr "" -#: ../../library/curses.rst:1957 +#: ../../library/curses.rst:2016 msgid ":kbd:`Control-A`" msgstr "" -#: ../../library/curses.rst:1957 +#: ../../library/curses.rst:2016 msgid "Go to left edge of window." msgstr "" -#: ../../library/curses.rst:1959 ../../library/curses.rst:1996 +#: ../../library/curses.rst:2018 ../../library/curses.rst:2055 msgid ":kbd:`Control-B`" msgstr "" -#: ../../library/curses.rst:1959 +#: ../../library/curses.rst:2018 msgid "Cursor left, wrapping to previous line if appropriate." msgstr "" -#: ../../library/curses.rst:1962 +#: ../../library/curses.rst:2021 msgid ":kbd:`Control-D`" msgstr "" -#: ../../library/curses.rst:1962 +#: ../../library/curses.rst:2021 msgid "Delete character under cursor." msgstr "" -#: ../../library/curses.rst:1964 +#: ../../library/curses.rst:2023 msgid ":kbd:`Control-E`" msgstr "" -#: ../../library/curses.rst:1964 +#: ../../library/curses.rst:2023 msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." msgstr "" -#: ../../library/curses.rst:1967 ../../library/curses.rst:1998 +#: ../../library/curses.rst:2026 ../../library/curses.rst:2057 msgid ":kbd:`Control-F`" msgstr "" -#: ../../library/curses.rst:1967 +#: ../../library/curses.rst:2026 msgid "Cursor right, wrapping to next line when appropriate." msgstr "" -#: ../../library/curses.rst:1970 +#: ../../library/curses.rst:2029 msgid ":kbd:`Control-G`" msgstr "" -#: ../../library/curses.rst:1970 +#: ../../library/curses.rst:2029 msgid "Terminate, returning the window contents." msgstr "" -#: ../../library/curses.rst:1972 +#: ../../library/curses.rst:2031 msgid ":kbd:`Control-H`" msgstr "" -#: ../../library/curses.rst:1972 +#: ../../library/curses.rst:2031 msgid "Delete character backward." msgstr "" -#: ../../library/curses.rst:1974 +#: ../../library/curses.rst:2033 msgid ":kbd:`Control-J`" msgstr "" -#: ../../library/curses.rst:1974 +#: ../../library/curses.rst:2033 msgid "" "Terminate if the window is 1 line, otherwise move to the start of the next " "line." msgstr "" -#: ../../library/curses.rst:1978 +#: ../../library/curses.rst:2037 msgid ":kbd:`Control-K`" msgstr "" -#: ../../library/curses.rst:1978 +#: ../../library/curses.rst:2037 msgid "If line is blank, delete it, otherwise clear to end of line." msgstr "" -#: ../../library/curses.rst:1981 +#: ../../library/curses.rst:2040 msgid ":kbd:`Control-L`" msgstr "" -#: ../../library/curses.rst:1981 +#: ../../library/curses.rst:2040 msgid "Refresh screen." msgstr "" -#: ../../library/curses.rst:1983 ../../library/curses.rst:2002 +#: ../../library/curses.rst:2042 ../../library/curses.rst:2061 msgid ":kbd:`Control-N`" msgstr "" -#: ../../library/curses.rst:1983 +#: ../../library/curses.rst:2042 msgid "Cursor down; move down one line." msgstr "" -#: ../../library/curses.rst:1985 +#: ../../library/curses.rst:2044 msgid ":kbd:`Control-O`" msgstr "" -#: ../../library/curses.rst:1985 +#: ../../library/curses.rst:2044 msgid "Insert a blank line at cursor location." msgstr "" -#: ../../library/curses.rst:1987 ../../library/curses.rst:2000 +#: ../../library/curses.rst:2046 ../../library/curses.rst:2059 msgid ":kbd:`Control-P`" msgstr "" -#: ../../library/curses.rst:1987 +#: ../../library/curses.rst:2046 msgid "Cursor up; move up one line." msgstr "" -#: ../../library/curses.rst:1990 +#: ../../library/curses.rst:2049 msgid "" "Move operations do nothing if the cursor is at an edge where the movement is " "not possible. The following synonyms are supported where possible:" msgstr "" -#: ../../library/curses.rst:1996 +#: ../../library/curses.rst:2055 msgid ":const:`~curses.KEY_LEFT`" msgstr "" -#: ../../library/curses.rst:1998 +#: ../../library/curses.rst:2057 msgid ":const:`~curses.KEY_RIGHT`" msgstr "" -#: ../../library/curses.rst:2000 +#: ../../library/curses.rst:2059 msgid ":const:`~curses.KEY_UP`" msgstr "" -#: ../../library/curses.rst:2002 +#: ../../library/curses.rst:2061 msgid ":const:`~curses.KEY_DOWN`" msgstr "" -#: ../../library/curses.rst:2004 +#: ../../library/curses.rst:2063 msgid ":const:`~curses.KEY_BACKSPACE`" msgstr "" -#: ../../library/curses.rst:2004 +#: ../../library/curses.rst:2063 msgid ":kbd:`Control-h`" msgstr "" -#: ../../library/curses.rst:2007 +#: ../../library/curses.rst:2066 msgid "" "All other keystrokes are treated as a command to insert the given character " "and move right (with line wrapping)." msgstr "" -#: ../../library/curses.rst:2013 +#: ../../library/curses.rst:2072 msgid "" "Return the window contents as a string; whether blanks in the window are " "included is affected by the :attr:`stripspaces` member." msgstr "" -#: ../../library/curses.rst:2019 +#: ../../library/curses.rst:2078 msgid "" "This attribute is a flag which controls the interpretation of blanks in the " "window. When it is on, trailing blanks on each line are ignored; any cursor " diff --git a/library/curses.po~ b/library/curses.po~ new file mode 100644 index 00000000..6311cec3 --- /dev/null +++ b/library/curses.po~ @@ -0,0 +1,2711 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:01+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/curses.rst:2 +msgid ":mod:`!curses` --- Terminal handling for character-cell displays" +msgstr "" + +#: ../../library/curses.rst:8 +msgid "**Source code:** :source:`Lib/curses`" +msgstr "" + +#: ../../library/curses.rst:12 +msgid "" +"The :mod:`!curses` module provides an interface to the curses library, the " +"de-facto standard for portable advanced terminal handling." +msgstr "" + +#: ../../library/curses.rst:15 +msgid "" +"While curses is most widely used in the Unix environment, versions are " +"available for Windows, DOS, and possibly other systems as well. This " +"extension module is designed to match the API of ncurses, an open-source " +"curses library hosted on Linux and the BSD variants of Unix." +msgstr "" + +#: ../../library/curses.rst:24 ../../includes/wasm-mobile-notavail.rst:3 +msgid "Availability" +msgstr "" + +#: ../../includes/wasm-mobile-notavail.rst:5 +msgid "" +"This module is not supported on :ref:`mobile platforms ` or :ref:`WebAssembly platforms `." +msgstr "" + +#: ../../includes/optional-module.rst:1 +msgid "" +"This is an :term:`optional module`. If it is missing from your copy of " +"CPython, look for documentation from your distributor (that is, whoever " +"provided Python to you). If you are the distributor, see :ref:`optional-" +"module-requirements`." +msgstr "" + +#: ../../library/curses.rst:28 +msgid "" +"Whenever the documentation mentions a *character* it can be specified as an " +"integer, a one-character Unicode string or a one-byte byte string." +msgstr "" + +#: ../../library/curses.rst:31 +msgid "" +"Whenever the documentation mentions a *character string* it can be specified " +"as a Unicode string or a byte string." +msgstr "" + +#: ../../library/curses.rst:36 +msgid "Module :mod:`curses.ascii`" +msgstr "" + +#: ../../library/curses.rst:37 +msgid "" +"Utilities for working with ASCII characters, regardless of your locale " +"settings." +msgstr "" + +#: ../../library/curses.rst:39 +msgid "Module :mod:`curses.panel`" +msgstr "" + +#: ../../library/curses.rst:40 +msgid "A panel stack extension that adds depth to curses windows." +msgstr "" + +#: ../../library/curses.rst:42 +msgid "Module :mod:`curses.textpad`" +msgstr "" + +#: ../../library/curses.rst:43 +msgid "" +"Editable text widget for curses supporting :program:`Emacs`\\ -like " +"bindings." +msgstr "" + +#: ../../library/curses.rst:45 +msgid ":ref:`curses-howto`" +msgstr "" + +#: ../../library/curses.rst:46 +msgid "" +"Tutorial material on using curses with Python, by Andrew Kuchling and Eric " +"Raymond." +msgstr "" + +#: ../../library/curses.rst:53 +msgid "Functions" +msgstr "" + +#: ../../library/curses.rst:55 +msgid "The module :mod:`!curses` defines the following exception:" +msgstr "" + +#: ../../library/curses.rst:60 +msgid "Exception raised when a curses library function returns an error." +msgstr "" + +#: ../../library/curses.rst:64 +msgid "" +"Whenever *x* or *y* arguments to a function or a method are optional, they " +"default to the current cursor location. Whenever *attr* is optional, it " +"defaults to :const:`A_NORMAL`." +msgstr "" + +#: ../../library/curses.rst:68 +msgid "The module :mod:`!curses` defines the following functions:" +msgstr "" + +#: ../../library/curses.rst:73 +msgid "" +"Allow use of default values for colors on terminals supporting this feature. " +"Use this to support transparency in your application." +msgstr "" + +#: ../../library/curses.rst:76 +msgid "" +"Assign terminal default foreground/background colors to color number ``-1``. " +"So ``init_pair(x, COLOR_RED, -1)`` will initialize pair *x* as red on " +"default background and ``init_pair(x, -1, COLOR_BLUE)`` will initialize pair " +"*x* as default foreground on blue." +msgstr "" + +#: ../../library/curses.rst:81 +msgid "Change the definition of the color-pair ``0`` to ``(fg, bg)``." +msgstr "" + +#: ../../library/curses.rst:83 +msgid "This is an ncurses extension." +msgstr "" + +#: ../../library/curses.rst:90 +msgid "" +"Return the output speed of the terminal in bits per second. On software " +"terminal emulators it will have a fixed high value. Included for historical " +"reasons; in former times, it was used to write output loops for time delays " +"and occasionally to change interfaces depending on the line speed." +msgstr "" + +#: ../../library/curses.rst:98 +msgid "Emit a short attention sound." +msgstr "" + +#: ../../library/curses.rst:103 +msgid "" +"Return ``True`` or ``False``, depending on whether the programmer can change " +"the colors displayed by the terminal." +msgstr "" + +#: ../../library/curses.rst:109 +msgid "" +"Enter cbreak mode. In cbreak mode (sometimes called \"rare\" mode) normal " +"tty line buffering is turned off and characters are available to be read one " +"by one. However, unlike raw mode, special characters (interrupt, quit, " +"suspend, and flow control) retain their effects on the tty driver and " +"calling program. Calling first :func:`raw` then :func:`cbreak` leaves the " +"terminal in cbreak mode." +msgstr "" + +#: ../../library/curses.rst:118 +msgid "" +"Return the intensity of the red, green, and blue (RGB) components in the " +"color *color_number*, which must be between ``0`` and ``COLORS - 1``. " +"Return a 3-tuple, containing the R,G,B values for the given color, which " +"will be between ``0`` (no component) and ``1000`` (maximum amount of " +"component). Raise an exception if the color is not supported." +msgstr "" + +#: ../../library/curses.rst:127 +msgid "" +"Return the attribute value for displaying text in the specified color pair. " +"Only the first 256 color pairs are supported. This attribute value can be " +"combined with :const:`A_STANDOUT`, :const:`A_REVERSE`, and the other :const:" +"`!A_\\*` attributes. :func:`pair_number` is the counterpart to this " +"function." +msgstr "" + +#: ../../library/curses.rst:136 +msgid "" +"Set the cursor state. *visibility* can be set to ``0``, ``1``, or ``2``, " +"for invisible, normal, or very visible. If the terminal supports the " +"visibility requested, return the previous cursor state; otherwise raise an " +"exception. On many terminals, the \"visible\" mode is an underline cursor " +"and the \"very visible\" mode is a block cursor." +msgstr "" + +#: ../../library/curses.rst:145 +msgid "" +"Save the current terminal mode as the \"program\" mode, the mode when the " +"running program is using curses. (Its counterpart is the \"shell\" mode, " +"for when the program is not in curses.) Subsequent calls to :func:" +"`reset_prog_mode` will restore this mode." +msgstr "" + +#: ../../library/curses.rst:153 +msgid "" +"Save the current terminal mode as the \"shell\" mode, the mode when the " +"running program is not using curses. (Its counterpart is the \"program\" " +"mode, when the program is using curses capabilities.) Subsequent calls to :" +"func:`reset_shell_mode` will restore this mode." +msgstr "" + +#: ../../library/curses.rst:161 +msgid "Insert an *ms* millisecond pause in output." +msgstr "" + +#: ../../library/curses.rst:166 +msgid "" +"Update the physical screen. The curses library keeps two data structures, " +"one representing the current physical screen contents and a virtual screen " +"representing the desired next state. The :func:`doupdate` function updates " +"the physical screen to match the virtual screen." +msgstr "" + +#: ../../library/curses.rst:171 +msgid "" +"The virtual screen may be updated by a :meth:`~window.noutrefresh` call " +"after write operations such as :meth:`~window.addstr` have been performed on " +"a window. The normal :meth:`~window.refresh` call is simply :meth:`!" +"noutrefresh` followed by :func:`!doupdate`; if you have to update multiple " +"windows, you can speed performance and perhaps reduce screen flicker by " +"issuing :meth:`!noutrefresh` calls on all windows, followed by a single :" +"func:`!doupdate`." +msgstr "" + +#: ../../library/curses.rst:181 +msgid "" +"Enter echo mode. In echo mode, each character input is echoed to the screen " +"as it is entered." +msgstr "" + +#: ../../library/curses.rst:187 +msgid "De-initialize the library, and return terminal to normal status." +msgstr "" + +#: ../../library/curses.rst:192 +msgid "" +"Return the user's current erase character as a one-byte bytes object. Under " +"Unix operating systems this is a property of the controlling tty of the " +"curses program, and is not set by the curses library itself." +msgstr "" + +#: ../../library/curses.rst:199 +msgid "" +"The :func:`.filter` routine, if used, must be called before :func:`initscr` " +"is called. The effect is that, during the initialization, :envvar:`LINES` " +"is set to ``1``; the capabilities ``clear``, ``cup``, ``cud``, ``cud1``, " +"``cuu1``, ``cuu``, ``vpa`` are disabled; and the ``home`` string is set to " +"the value of ``cr``. The effect is that the cursor is confined to the " +"current line, and so are screen updates. This may be used for enabling " +"character-at-a-time line editing without touching the rest of the screen." +msgstr "" + +#: ../../library/curses.rst:209 +msgid "" +"Flash the screen. That is, change it to reverse-video and then change it " +"back in a short interval. Some people prefer such as 'visible bell' to the " +"audible attention signal produced by :func:`beep`." +msgstr "" + +#: ../../library/curses.rst:216 +msgid "" +"Flush all input buffers. This throws away any typeahead that has been " +"typed by the user and has not yet been processed by the program." +msgstr "" + +#: ../../library/curses.rst:222 +msgid "" +"After :meth:`~window.getch` returns :const:`KEY_MOUSE` to signal a mouse " +"event, this method should be called to retrieve the queued mouse event, " +"represented as a 5-tuple ``(id, x, y, z, bstate)``. *id* is an ID value used " +"to distinguish multiple devices, and *x*, *y*, *z* are the event's " +"coordinates. (*z* is currently unused.) *bstate* is an integer value whose " +"bits will be set to indicate the type of event, and will be the bitwise OR " +"of one or more of the following constants, where *n* is the button number " +"from 1 to 5: :const:`BUTTONn_PRESSED`, :const:`BUTTONn_RELEASED`, :const:" +"`BUTTONn_CLICKED`, :const:`BUTTONn_DOUBLE_CLICKED`, :const:" +"`BUTTONn_TRIPLE_CLICKED`, :const:`BUTTON_SHIFT`, :const:`BUTTON_CTRL`, :" +"const:`BUTTON_ALT`." +msgstr "" + +#: ../../library/curses.rst:233 ../../library/curses.rst:1861 +msgid "" +"The ``BUTTON5_*`` constants are now exposed if they are provided by the " +"underlying curses library." +msgstr "" + +#: ../../library/curses.rst:240 +msgid "" +"Return the current coordinates of the virtual screen cursor as a tuple ``(y, " +"x)``. If :meth:`leaveok ` is currently ``True``, then " +"return ``(-1, -1)``." +msgstr "" + +#: ../../library/curses.rst:246 +msgid "" +"Read window-related data stored in the file by an earlier :meth:`window." +"putwin` call. The routine then creates and initializes a new window using " +"that data, returning the new window object. The *file* argument must be a " +"file object opened for reading in binary mode." +msgstr "" + +#: ../../library/curses.rst:254 +msgid "" +"Return ``True`` if the terminal can display colors; otherwise, return " +"``False``." +msgstr "" + +#: ../../library/curses.rst:258 +msgid "" +"Return ``True`` if the module supports extended colors; otherwise, return " +"``False``. Extended color support allows more than 256 color pairs for " +"terminals that support more than 16 colors (for example, xterm-256color)." +msgstr "" + +#: ../../library/curses.rst:262 +msgid "Extended color support requires ncurses version 6.1 or later." +msgstr "" + +#: ../../library/curses.rst:268 +msgid "" +"Return ``True`` if the terminal has insert- and delete-character " +"capabilities. This function is included for historical reasons only, as all " +"modern software terminal emulators have such capabilities." +msgstr "" + +#: ../../library/curses.rst:275 +msgid "" +"Return ``True`` if the terminal has insert- and delete-line capabilities, or " +"can simulate them using scrolling regions. This function is included for " +"historical reasons only, as all modern software terminal emulators have such " +"capabilities." +msgstr "" + +#: ../../library/curses.rst:283 +msgid "" +"Take a key value *ch*, and return ``True`` if the current terminal type " +"recognizes a key with that value." +msgstr "" + +#: ../../library/curses.rst:289 +msgid "" +"Used for half-delay mode, which is similar to cbreak mode in that characters " +"typed by the user are immediately available to the program. However, after " +"blocking for *tenths* tenths of seconds, raise an exception if nothing has " +"been typed. The value of *tenths* must be a number between ``1`` and " +"``255``. Use :func:`nocbreak` to leave half-delay mode." +msgstr "" + +#: ../../library/curses.rst:298 +msgid "" +"Change the definition of a color, taking the number of the color to be " +"changed followed by three RGB values (for the amounts of red, green, and " +"blue components). The value of *color_number* must be between ``0`` and " +"``COLORS - 1``. Each of *r*, *g*, *b*, must be a value between ``0`` and " +"``1000``. When :func:`init_color` is used, all occurrences of that color on " +"the screen immediately change to the new definition. This function is a no-" +"op on most terminals; it is active only if :func:`can_change_color` returns " +"``True``." +msgstr "" + +#: ../../library/curses.rst:309 +msgid "" +"Change the definition of a color-pair. It takes three arguments: the number " +"of the color-pair to be changed, the foreground color number, and the " +"background color number. The value of *pair_number* must be between ``1`` " +"and ``COLOR_PAIRS - 1`` (the ``0`` color pair can only be changed by :func:" +"`use_default_colors` and :func:`assume_default_colors`). The value of *fg* " +"and *bg* arguments must be between ``0`` and ``COLORS - 1``, or, after " +"calling :func:`!use_default_colors` or :func:`!assume_default_colors`, " +"``-1``. If the color-pair was previously initialized, the screen is " +"refreshed and all occurrences of that color-pair are changed to the new " +"definition." +msgstr "" + +#: ../../library/curses.rst:324 +msgid "" +"Initialize the library. Return a :ref:`window ` " +"object which represents the whole screen." +msgstr "" + +#: ../../library/curses.rst:327 +msgid "" +"See :func:`setupterm` for a caveat about calling it before this function." +msgstr "" + +#: ../../library/curses.rst:331 +msgid "" +"If there is an error opening the terminal, the underlying curses library may " +"cause the interpreter to exit." +msgstr "" + +#: ../../library/curses.rst:337 +msgid "" +"If *flag* is ``True``, pressing an interrupt key (interrupt, break, or quit) " +"will flush all output in the terminal driver queue. If *flag* is ``False``, " +"no flushing is done." +msgstr "" + +#: ../../library/curses.rst:344 +msgid "" +"Return ``True`` if :func:`resize_term` would modify the window structure, " +"``False`` otherwise." +msgstr "" + +#: ../../library/curses.rst:350 +msgid "" +"Return ``True`` if :func:`endwin` has been called (that is, the curses " +"library has been deinitialized)." +msgstr "" + +#: ../../library/curses.rst:356 +msgid "" +"Return the name of the key numbered *k* as a bytes object. The name of a " +"key generating printable ASCII character is the key's character. The name " +"of a control-key combination is a two-byte bytes object consisting of a " +"caret (``b'^'``) followed by the corresponding printable ASCII character. " +"The name of an alt-key combination (128--255) is a bytes object consisting " +"of the prefix ``b'M-'`` followed by the name of the corresponding ASCII " +"character." +msgstr "" + +#: ../../library/curses.rst:363 +msgid "Raise a :exc:`ValueError` if *k* is negative." +msgstr "" + +#: ../../library/curses.rst:368 +msgid "" +"Return the user's current line kill character as a one-byte bytes object. " +"Under Unix operating systems this is a property of the controlling tty of " +"the curses program, and is not set by the curses library itself." +msgstr "" + +#: ../../library/curses.rst:375 +msgid "" +"Return a bytes object containing the terminfo long name field describing the " +"current terminal. The maximum length of a verbose description is 128 " +"characters. It is defined only after the call to :func:`initscr`." +msgstr "" + +#: ../../library/curses.rst:382 +msgid "" +"If *flag* is ``True``, allow 8-bit characters to be input. If *flag* is " +"``False``, allow only 7-bit chars." +msgstr "" + +#: ../../library/curses.rst:388 +msgid "" +"Set the maximum time in milliseconds that can elapse between press and " +"release events in order for them to be recognized as a click, and return the " +"previous interval value. The default value is 166 milliseconds, or one " +"sixth of a second. Use a negative *interval* to obtain the interval value " +"without changing it." +msgstr "" + +#: ../../library/curses.rst:396 +msgid "" +"Set the mouse events to be reported, and return a tuple ``(availmask, " +"oldmask)``. *availmask* indicates which of the specified mouse events can " +"be reported; on complete failure it returns ``0``. *oldmask* is the " +"previous value of the mouse event mask. If this function is never called, " +"no mouse events are ever reported." +msgstr "" + +#: ../../library/curses.rst:405 +msgid "Sleep for *ms* milliseconds." +msgstr "" + +#: ../../library/curses.rst:410 +msgid "" +"Create and return a pointer to a new pad data structure with the given " +"number of lines and columns. Return a pad as a window object." +msgstr "" + +#: ../../library/curses.rst:413 +msgid "" +"A pad is like a window, except that it is not restricted by the screen size, " +"and is not necessarily associated with a particular part of the screen. " +"Pads can be used when a large window is needed, and only a part of the " +"window will be on the screen at one time. Automatic refreshes of pads (such " +"as from scrolling or echoing of input) do not occur. The :meth:`~window." +"refresh` and :meth:`~window.noutrefresh` methods of a pad require 6 " +"arguments to specify the part of the pad to be displayed and the location on " +"the screen to be used for the display. The arguments are *pminrow*, " +"*pmincol*, *sminrow*, *smincol*, *smaxrow*, *smaxcol*; the *p* arguments " +"refer to the upper-left corner of the pad region to be displayed and the *s* " +"arguments define a clipping box on the screen within which the pad region is " +"to be displayed." +msgstr "" + +#: ../../library/curses.rst:429 +msgid "" +"Return a new :ref:`window `, whose left-upper corner " +"is at ``(begin_y, begin_x)``, and whose height/width is *nlines*/*ncols*." +msgstr "" + +#: ../../library/curses.rst:432 +msgid "" +"By default, the window will extend from the specified position to the lower " +"right corner of the screen." +msgstr "" + +#: ../../library/curses.rst:438 +msgid "" +"Enter newline mode. This mode translates the return key into newline on " +"input, and translates newline into return and line-feed on output. Newline " +"mode is initially on." +msgstr "" + +#: ../../library/curses.rst:442 +msgid "If *flag* is ``False``, the effect is the same as calling :func:`nonl`." +msgstr "" + +#: ../../library/curses.rst:447 +msgid "" +"Leave cbreak mode. Return to normal \"cooked\" mode with line buffering." +msgstr "" + +#: ../../library/curses.rst:452 +msgid "Leave echo mode. Echoing of input characters is turned off." +msgstr "" + +#: ../../library/curses.rst:457 +msgid "" +"Leave newline mode. Disable translation of return into newline on input, " +"and disable low-level translation of newline into newline/return on output " +"(but this does not change the behavior of ``addch('\\n')``, which always " +"does the equivalent of return and line feed on the virtual screen). With " +"translation off, curses can sometimes speed up vertical motion a little; " +"also, it will be able to detect the return key on input." +msgstr "" + +#: ../../library/curses.rst:467 +msgid "" +"When the :func:`!noqiflush` routine is used, normal flush of input and " +"output queues associated with the ``INTR``, ``QUIT`` and ``SUSP`` characters " +"will not be done. You may want to call :func:`!noqiflush` in a signal " +"handler if you want output to continue as though the interrupt had not " +"occurred, after the handler exits." +msgstr "" + +#: ../../library/curses.rst:475 +msgid "Leave raw mode. Return to normal \"cooked\" mode with line buffering." +msgstr "" + +#: ../../library/curses.rst:480 +msgid "" +"Return a tuple ``(fg, bg)`` containing the colors for the requested color " +"pair. The value of *pair_number* must be between ``0`` and ``COLOR_PAIRS - " +"1``." +msgstr "" + +#: ../../library/curses.rst:486 +msgid "" +"Return the number of the color-pair set by the attribute value *attr*. :func:" +"`color_pair` is the counterpart to this function." +msgstr "" + +#: ../../library/curses.rst:492 +msgid "" +"Equivalent to ``tputs(str, 1, putchar)``; emit the value of a specified " +"terminfo capability for the current terminal. Note that the output of :func:" +"`putp` always goes to standard output." +msgstr "" + +#: ../../library/curses.rst:496 ../../library/curses.rst:639 +#: ../../library/curses.rst:649 ../../library/curses.rst:659 +#: ../../library/curses.rst:669 +msgid ":func:`setupterm` (or :func:`initscr`) must be called first." +msgstr "" + +#: ../../library/curses.rst:501 +msgid "" +"If *flag* is ``False``, the effect is the same as calling :func:`noqiflush`. " +"If *flag* is ``True``, or no argument is provided, the queues will be " +"flushed when these control characters are read." +msgstr "" + +#: ../../library/curses.rst:508 +msgid "" +"Enter raw mode. In raw mode, normal line buffering and processing of " +"interrupt, quit, suspend, and flow control keys are turned off; characters " +"are presented to curses input functions one by one." +msgstr "" + +#: ../../library/curses.rst:515 +msgid "" +"Restore the terminal to \"program\" mode, as previously saved by :func:" +"`def_prog_mode`." +msgstr "" + +#: ../../library/curses.rst:521 +msgid "" +"Restore the terminal to \"shell\" mode, as previously saved by :func:" +"`def_shell_mode`." +msgstr "" + +#: ../../library/curses.rst:527 +msgid "" +"Restore the state of the terminal modes to what it was at the last call to :" +"func:`savetty`." +msgstr "" + +#: ../../library/curses.rst:533 +msgid "" +"Backend function used by :func:`resizeterm`, performing most of the work; " +"when resizing the windows, :func:`resize_term` blank-fills the areas that " +"are extended. The calling application should fill in these areas with " +"appropriate data. The :func:`!resize_term` function attempts to resize all " +"windows. However, due to the calling convention of pads, it is not possible " +"to resize these without additional interaction with the application." +msgstr "" + +#: ../../library/curses.rst:543 +msgid "" +"Resize the standard and current windows to the specified dimensions, and " +"adjusts other bookkeeping data used by the curses library that record the " +"window dimensions (in particular the SIGWINCH handler)." +msgstr "" + +#: ../../library/curses.rst:550 +msgid "" +"Save the current state of the terminal modes in a buffer, usable by :func:" +"`resetty`." +msgstr "" + +#: ../../library/curses.rst:555 +msgid "Retrieves the value set by :func:`set_escdelay`." +msgstr "" + +#: ../../library/curses.rst:561 +msgid "" +"Sets the number of milliseconds to wait after reading an escape character, " +"to distinguish between an individual escape character entered on the " +"keyboard from escape sequences sent by cursor and function keys." +msgstr "" + +#: ../../library/curses.rst:569 +msgid "Retrieves the value set by :func:`set_tabsize`." +msgstr "" + +#: ../../library/curses.rst:575 +msgid "" +"Sets the number of columns used by the curses library when converting a tab " +"character to spaces as it adds the tab to a window." +msgstr "" + +#: ../../library/curses.rst:582 +msgid "" +"Set the virtual screen cursor to *y*, *x*. If *y* and *x* are both ``-1``, " +"then :meth:`leaveok ` is set ``True``." +msgstr "" + +#: ../../library/curses.rst:588 +msgid "" +"Initialize the terminal. *term* is a string giving the terminal name, or " +"``None``; if omitted or ``None``, the value of the :envvar:`TERM` " +"environment variable will be used. *fd* is the file descriptor to which any " +"initialization sequences will be sent; if not supplied or ``-1``, the file " +"descriptor for ``sys.stdout`` will be used." +msgstr "" + +#: ../../library/curses.rst:594 +msgid "" +"Raise a :exc:`curses.error` if the terminal could not be found or its " +"terminfo database entry could not be read. If the terminal has already been " +"initialized, this function has no effect." +msgstr "" + +#: ../../library/curses.rst:600 +msgid "" +"Calling :func:`initscr` after :func:`setupterm` leaks the terminal that :" +"func:`setupterm` allocated: the curses library keeps only a single current " +"terminal and does not free the previously allocated one." +msgstr "" + +#: ../../library/curses.rst:608 +msgid "" +"Must be called if the programmer wants to use colors, and before any other " +"color manipulation routine is called. It is good practice to call this " +"routine right after :func:`initscr`." +msgstr "" + +#: ../../library/curses.rst:612 +msgid "" +":func:`start_color` initializes eight basic colors (black, red, green, " +"yellow, blue, magenta, cyan, and white), and two global variables in the :" +"mod:`!curses` module, :const:`COLORS` and :const:`COLOR_PAIRS`, containing " +"the maximum number of colors and color-pairs the terminal can support. It " +"also restores the colors on the terminal to the values they had when the " +"terminal was just turned on." +msgstr "" + +#: ../../library/curses.rst:621 +msgid "" +"Return a logical OR of all video attributes supported by the terminal. This " +"information is useful when a curses program needs complete control over the " +"appearance of the screen." +msgstr "" + +#: ../../library/curses.rst:628 +msgid "" +"Return the value of the environment variable :envvar:`TERM`, as a bytes " +"object, truncated to 14 characters." +msgstr "" + +#: ../../library/curses.rst:634 +msgid "" +"Return the value of the Boolean capability corresponding to the terminfo " +"capability name *capname* as an integer. Return the value ``-1`` if " +"*capname* is not a Boolean capability, or ``0`` if it is canceled or absent " +"from the terminal description." +msgstr "" + +#: ../../library/curses.rst:644 +msgid "" +"Return the value of the numeric capability corresponding to the terminfo " +"capability name *capname* as an integer. Return the value ``-2`` if " +"*capname* is not a numeric capability, or ``-1`` if it is canceled or absent " +"from the terminal description." +msgstr "" + +#: ../../library/curses.rst:654 +msgid "" +"Return the value of the string capability corresponding to the terminfo " +"capability name *capname* as a bytes object. Return ``None`` if *capname* " +"is not a terminfo \"string capability\", or is canceled or absent from the " +"terminal description." +msgstr "" + +#: ../../library/curses.rst:664 +msgid "" +"Instantiate the bytes object *str* with the supplied parameters, where *str* " +"should be a parameterized string obtained from the terminfo database. For " +"example, ``tparm(tigetstr(\"cup\"), 5, 3)`` could result in " +"``b'\\033[6;4H'``, the exact result depending on terminal type. Up to nine " +"integer parameters may be supplied." +msgstr "" + +#: ../../library/curses.rst:674 +msgid "" +"Specify that the file descriptor *fd* be used for typeahead checking. If " +"*fd* is ``-1``, then no typeahead checking is done." +msgstr "" + +#: ../../library/curses.rst:677 +msgid "" +"The curses library does \"line-breakout optimization\" by looking for " +"typeahead periodically while updating the screen. If input is found, and it " +"is coming from a tty, the current update is postponed until refresh or " +"doupdate is called again, allowing faster response to commands typed in " +"advance. This function allows specifying a different file descriptor for " +"typeahead checking." +msgstr "" + +#: ../../library/curses.rst:686 +msgid "" +"Return a bytes object which is a printable representation of the character " +"*ch*. Control characters are represented as a caret followed by the " +"character, for example as ``b'^C'``. Printing characters are left as they " +"are." +msgstr "" + +#: ../../library/curses.rst:693 +msgid "Push *ch* so the next :meth:`~window.getch` will return it." +msgstr "" + +#: ../../library/curses.rst:697 +msgid "Only one *ch* can be pushed before :meth:`!getch` is called." +msgstr "" + +#: ../../library/curses.rst:702 +msgid "" +"Update the :const:`LINES` and :const:`COLS` module variables. Useful for " +"detecting manual screen resize." +msgstr "" + +#: ../../library/curses.rst:710 +msgid "Push *ch* so the next :meth:`~window.get_wch` will return it." +msgstr "" + +#: ../../library/curses.rst:714 +msgid "Only one *ch* can be pushed before :meth:`!get_wch` is called." +msgstr "" + +#: ../../library/curses.rst:721 +msgid "" +"Push a :const:`KEY_MOUSE` event onto the input queue, associating the given " +"state data with it." +msgstr "" + +#: ../../library/curses.rst:727 +msgid "" +"If used, this function should be called before :func:`initscr` or newterm " +"are called. When *flag* is ``False``, the values of lines and columns " +"specified in the terminfo database will be used, even if environment " +"variables :envvar:`LINES` and :envvar:`COLUMNS` (used by default) are set, " +"or if curses is running in a window (in which case default behavior would be " +"to use the window size if :envvar:`LINES` and :envvar:`COLUMNS` are not set)." +msgstr "" + +#: ../../library/curses.rst:737 +msgid "Equivalent to ``assume_default_colors(-1, -1)``." +msgstr "" + +#: ../../library/curses.rst:742 +msgid "" +"Initialize curses and call another callable object, *func*, which should be " +"the rest of your curses-using application. If the application raises an " +"exception, this function will restore the terminal to a sane state before re-" +"raising the exception and generating a traceback. The callable object " +"*func* is then passed the main window 'stdscr' as its first argument, " +"followed by any other arguments passed to :func:`!wrapper`. Before calling " +"*func*, :func:`!wrapper` turns on cbreak mode, turns off echo, enables the " +"terminal keypad, and initializes colors if the terminal has color support. " +"On exit (whether normally or by exception) it restores cooked mode, turns on " +"echo, and disables the terminal keypad." +msgstr "" + +#: ../../library/curses.rst:756 +msgid "Window objects" +msgstr "" + +#: ../../library/curses.rst:760 +msgid "" +"Window objects, as returned by :func:`initscr` and :func:`newwin` above, " +"have the following methods and attributes:" +msgstr "" + +#: ../../library/curses.rst:767 +msgid "" +"Paint character *ch* at ``(y, x)`` with attributes *attr*, overwriting any " +"character previously painted at that location. By default, the character " +"position and attributes are the current settings for the window object." +msgstr "" + +#: ../../library/curses.rst:773 +msgid "" +"Writing outside the window, subwindow, or pad raises a :exc:`curses.error`. " +"Attempting to write to the lower-right corner of a window, subwindow, or pad " +"will cause an exception to be raised after the character is printed." +msgstr "" + +#: ../../library/curses.rst:781 +msgid "" +"Paint at most *n* characters of the character string *str* at ``(y, x)`` " +"with attributes *attr*, overwriting anything previously on the display." +msgstr "" + +#: ../../library/curses.rst:789 +msgid "" +"Paint the character string *str* at ``(y, x)`` with attributes *attr*, " +"overwriting anything previously on the display." +msgstr "" + +#: ../../library/curses.rst:794 +msgid "" +"Writing outside the window, subwindow, or pad raises :exc:`curses.error`. " +"Attempting to write to the lower-right corner of a window, subwindow, or pad " +"will cause an exception to be raised after the string is printed." +msgstr "" + +#: ../../library/curses.rst:798 +msgid "" +"A bug in ncurses, the backend for this Python module, could cause segfaults " +"when resizing windows. This was fixed in ncurses-6.1-20190511. If you are " +"stuck with an earlier ncurses, you can avoid triggering it by not calling :" +"meth:`!addstr` with a *str* that has embedded newlines; instead, call :meth:" +"`!addstr` separately for each line." +msgstr "" + +#: ../../library/curses.rst:807 +msgid "" +"Remove attribute *attr* from the \"background\" set applied to all writes to " +"the current window." +msgstr "" + +#: ../../library/curses.rst:813 +msgid "" +"Add attribute *attr* to the \"background\" set applied to all writes to the " +"current window." +msgstr "" + +#: ../../library/curses.rst:819 +msgid "" +"Set the \"background\" set of attributes to *attr*. This set is initially " +"``0`` (no attributes)." +msgstr "" + +#: ../../library/curses.rst:825 +msgid "" +"Set the background property of the window to the character *ch*, with " +"attributes *attr*. The change is then applied to every character position " +"in that window:" +msgstr "" + +#: ../../library/curses.rst:829 +msgid "" +"The attribute of every character in the window is changed to the new " +"background attribute." +msgstr "" + +#: ../../library/curses.rst:832 +msgid "" +"Wherever the former background character appears, it is changed to the new " +"background character." +msgstr "" + +#: ../../library/curses.rst:838 +msgid "" +"Set the window's background. A window's background consists of a character " +"and any combination of attributes. The attribute part of the background is " +"combined (OR'ed) with all non-blank characters that are written into the " +"window. Both the character and attribute parts of the background are " +"combined with the blank characters. The background becomes a property of " +"the character and moves with the character through any scrolling and insert/" +"delete line/character operations." +msgstr "" + +#: ../../library/curses.rst:848 +msgid "" +"Draw a border around the edges of the window. Each parameter specifies the " +"character to use for a specific part of the border; see the table below for " +"more details." +msgstr "" + +#: ../../library/curses.rst:854 +msgid "" +"A ``0`` value for any parameter will cause the default character to be used " +"for that parameter. Keyword parameters can *not* be used. The defaults are " +"listed in this table:" +msgstr "" + +#: ../../library/curses.rst:859 +msgid "Parameter" +msgstr "" + +#: ../../library/curses.rst:859 +msgid "Description" +msgstr "Beschreibung" + +#: ../../library/curses.rst:859 +msgid "Default value" +msgstr "" + +#: ../../library/curses.rst:861 +msgid "*ls*" +msgstr "" + +#: ../../library/curses.rst:861 +msgid "Left side" +msgstr "" + +#: ../../library/curses.rst:861 ../../library/curses.rst:863 +msgid ":const:`ACS_VLINE`" +msgstr "" + +#: ../../library/curses.rst:863 +msgid "*rs*" +msgstr "" + +#: ../../library/curses.rst:863 +msgid "Right side" +msgstr "" + +#: ../../library/curses.rst:865 +msgid "*ts*" +msgstr "" + +#: ../../library/curses.rst:865 +msgid "Top" +msgstr "" + +#: ../../library/curses.rst:865 ../../library/curses.rst:867 +msgid ":const:`ACS_HLINE`" +msgstr "" + +#: ../../library/curses.rst:867 +msgid "*bs*" +msgstr "" + +#: ../../library/curses.rst:867 +msgid "Bottom" +msgstr "" + +#: ../../library/curses.rst:869 +msgid "*tl*" +msgstr "" + +#: ../../library/curses.rst:869 +msgid "Upper-left corner" +msgstr "" + +#: ../../library/curses.rst:869 +msgid ":const:`ACS_ULCORNER`" +msgstr "" + +#: ../../library/curses.rst:871 +msgid "*tr*" +msgstr "" + +#: ../../library/curses.rst:871 +msgid "Upper-right corner" +msgstr "" + +#: ../../library/curses.rst:871 +msgid ":const:`ACS_URCORNER`" +msgstr "" + +#: ../../library/curses.rst:873 +msgid "*bl*" +msgstr "" + +#: ../../library/curses.rst:873 +msgid "Bottom-left corner" +msgstr "" + +#: ../../library/curses.rst:873 +msgid ":const:`ACS_LLCORNER`" +msgstr "" + +#: ../../library/curses.rst:875 +msgid "*br*" +msgstr "" + +#: ../../library/curses.rst:875 +msgid "Bottom-right corner" +msgstr "" + +#: ../../library/curses.rst:875 +msgid ":const:`ACS_LRCORNER`" +msgstr "" + +#: ../../library/curses.rst:881 +msgid "" +"Similar to :meth:`border`, but both *ls* and *rs* are *vertch* and both *ts* " +"and *bs* are *horch*. The default corner characters are always used by this " +"function." +msgstr "" + +#: ../../library/curses.rst:890 +msgid "" +"Set the attributes of *num* characters at the current cursor position, or at " +"position ``(y, x)`` if supplied. If *num* is not given or is ``-1``, the " +"attribute will be set on all the characters to the end of the line. This " +"function moves cursor to position ``(y, x)`` if supplied. The changed line " +"will be touched using the :meth:`touchline` method so that the contents will " +"be redisplayed by the next window refresh." +msgstr "" + +#: ../../library/curses.rst:900 +msgid "" +"Like :meth:`erase`, but also cause the whole window to be repainted upon " +"next call to :meth:`refresh`." +msgstr "" + +#: ../../library/curses.rst:906 +msgid "" +"If *flag* is ``True``, the next call to :meth:`refresh` will clear the " +"window completely." +msgstr "" + +#: ../../library/curses.rst:912 +msgid "" +"Erase from cursor to the end of the window: all lines below the cursor are " +"deleted, and then the equivalent of :meth:`clrtoeol` is performed." +msgstr "" + +#: ../../library/curses.rst:918 +msgid "Erase from cursor to the end of the line." +msgstr "" + +#: ../../library/curses.rst:923 +msgid "" +"Update the current cursor position of all the ancestors of the window to " +"reflect the current cursor position of the window." +msgstr "" + +#: ../../library/curses.rst:929 +msgid "" +"Delete the character under the cursor, or at ``(y, x)`` if specified. All " +"characters to the right on the same line are shifted one position left." +msgstr "" + +#: ../../library/curses.rst:935 +msgid "" +"Delete the line under the cursor. All following lines are moved up by one " +"line." +msgstr "" + +#: ../../library/curses.rst:941 +msgid "" +"An abbreviation for \"derive window\", :meth:`derwin` is the same as " +"calling :meth:`subwin`, except that *begin_y* and *begin_x* are relative to " +"the origin of the window, rather than relative to the entire screen. Return " +"a window object for the derived window." +msgstr "" + +#: ../../library/curses.rst:949 +msgid "" +"Add character *ch* with attribute *attr*, and immediately call :meth:" +"`refresh` on the window." +msgstr "" + +#: ../../library/curses.rst:955 +msgid "" +"Test whether the given pair of screen-relative character-cell coordinates " +"are enclosed by the given window, returning ``True`` or ``False``. It is " +"useful for determining what subset of the screen windows enclose the " +"location of a mouse event." +msgstr "" + +#: ../../library/curses.rst:960 +msgid "Previously it returned ``1`` or ``0`` instead of ``True`` or ``False``." +msgstr "" + +#: ../../library/curses.rst:966 +msgid "" +"Encoding used to encode method arguments (Unicode strings and characters). " +"The encoding attribute is inherited from the parent window when a subwindow " +"is created, for example with :meth:`window.subwin`. By default, current " +"locale encoding is used (see :func:`locale.getencoding`)." +msgstr "" + +#: ../../library/curses.rst:976 +msgid "Clear the window." +msgstr "" + +#: ../../library/curses.rst:981 +msgid "Return a tuple ``(y, x)`` of coordinates of upper-left corner." +msgstr "" + +#: ../../library/curses.rst:986 +msgid "" +"Return the given window's current background character/attribute pair. Its " +"components can be extracted like those of :meth:`inch`." +msgstr "" + +#: ../../library/curses.rst:992 +msgid "" +"Get a character. Note that the integer returned does *not* have to be in " +"ASCII range: function keys, keypad keys and so on are represented by numbers " +"higher than 255. In no-delay mode, return ``-1`` if there is no input, " +"otherwise wait until a key is pressed." +msgstr "" + +#: ../../library/curses.rst:1000 +msgid "" +"Get a wide character. Return a character for most keys, or an integer for " +"function keys, keypad keys, and other special keys. In no-delay mode, raise " +"an exception if there is no input." +msgstr "" + +#: ../../library/curses.rst:1009 +msgid "" +"Get a character, returning a string instead of an integer, as :meth:`getch` " +"does. Function keys, keypad keys and other special keys return a multibyte " +"string containing the key name. In no-delay mode, raise an exception if " +"there is no input." +msgstr "" + +#: ../../library/curses.rst:1017 +msgid "Return a tuple ``(y, x)`` of the height and width of the window." +msgstr "" + +#: ../../library/curses.rst:1022 +msgid "" +"Return the beginning coordinates of this window relative to its parent " +"window as a tuple ``(y, x)``. Return ``(-1, -1)`` if this window has no " +"parent." +msgstr "" + +#: ../../library/curses.rst:1032 +msgid "" +"Read a bytes object from the user, with primitive line editing capacity. At " +"most *n* characters are read; *n* defaults to and cannot exceed 2047." +msgstr "" + +#: ../../library/curses.rst:1036 ../../library/curses.rst:1142 +msgid "The maximum value for *n* was increased from 1023 to 2047." +msgstr "" + +#: ../../library/curses.rst:1042 +msgid "" +"Return a tuple ``(y, x)`` of current cursor position relative to the " +"window's upper-left corner." +msgstr "" + +#: ../../library/curses.rst:1049 +msgid "" +"Display a horizontal line starting at ``(y, x)`` with length *n* consisting " +"of the character *ch* with attributes *attr*. The line stops at the right " +"edge of the window if fewer than *n* cells are available." +msgstr "" + +#: ../../library/curses.rst:1056 +msgid "" +"If *flag* is ``False``, curses no longer considers using the hardware insert/" +"delete character feature of the terminal; if *flag* is ``True``, use of " +"character insertion and deletion is enabled. When curses is first " +"initialized, use of character insert/delete is enabled by default." +msgstr "" + +#: ../../library/curses.rst:1064 +msgid "" +"If *flag* is ``True``, :mod:`!curses` will try to use hardware line editing " +"facilities. Otherwise, curses will not use them." +msgstr "" + +#: ../../library/curses.rst:1070 +msgid "" +"If *flag* is ``True``, any change in the window image automatically causes " +"the window to be refreshed; you no longer have to call :meth:`refresh` " +"yourself. However, it may degrade performance considerably, due to repeated " +"calls to wrefresh. This option is disabled by default." +msgstr "" + +#: ../../library/curses.rst:1078 +msgid "" +"Return the character at the given position in the window. The bottom 8 bits " +"are the character proper and the upper bits are the attributes; extract them " +"with the :data:`A_CHARTEXT` and :data:`A_ATTRIBUTES` bit-masks, and the " +"color pair with :func:`pair_number`. The character byte is the locale-" +"encoded byte of the cell's character, consistent with :meth:`instr`. On a " +"wide-character build, a character that does not fit in a single byte in the " +"current locale has a character byte of ``0``; use :meth:`instr` to read such " +"characters." +msgstr "" + +#: ../../library/curses.rst:1092 +msgid "" +"Insert character *ch* with attributes *attr* before the character under the " +"cursor, or at ``(y, x)`` if specified. All characters to the right of the " +"cursor are shifted one position right, with the rightmost character on the " +"line being lost. The cursor position does not change." +msgstr "" + +#: ../../library/curses.rst:1100 +msgid "" +"Insert *nlines* lines into the specified window above the current line. The " +"*nlines* bottom lines are lost. For negative *nlines*, delete *nlines* " +"lines starting with the one under the cursor, and move the remaining lines " +"up. The bottom *nlines* lines are cleared. The current cursor position " +"remains the same." +msgstr "" + +#: ../../library/curses.rst:1109 +msgid "" +"Insert a blank line under the cursor. All following lines are moved down by " +"one line." +msgstr "" + +#: ../../library/curses.rst:1116 +msgid "" +"Insert a character string (as many characters as will fit on the line) " +"before the character under the cursor, up to *n* characters. If *n* is " +"zero or negative, the entire string is inserted. All characters to the right " +"of the cursor are shifted right, with the rightmost characters on the line " +"being lost. The cursor position does not change (after moving to *y*, *x*, " +"if specified)." +msgstr "" + +#: ../../library/curses.rst:1126 +msgid "" +"Insert a character string (as many characters as will fit on the line) " +"before the character under the cursor. All characters to the right of the " +"cursor are shifted right, with the rightmost characters on the line being " +"lost. The cursor position does not change (after moving to *y*, *x*, if " +"specified)." +msgstr "" + +#: ../../library/curses.rst:1135 +msgid "" +"Return a bytes object of characters, extracted from the window starting at " +"the current cursor position, or at *y*, *x* if specified, and stopping at " +"the end of the line. Attributes and color information are stripped from the " +"characters. If *n* is specified, :meth:`instr` returns a string at most *n* " +"characters long (exclusive of the trailing NUL). The maximum value for *n* " +"is 2047." +msgstr "" + +#: ../../library/curses.rst:1148 +msgid "" +"Return ``True`` if the specified line was modified since the last call to :" +"meth:`refresh`; otherwise return ``False``. Raise a :exc:`curses.error` " +"exception if *line* is not valid for the given window." +msgstr "" + +#: ../../library/curses.rst:1155 +msgid "" +"Return ``True`` if the specified window was modified since the last call to :" +"meth:`refresh`; otherwise return ``False``." +msgstr "" + +#: ../../library/curses.rst:1161 +msgid "" +"If *flag* is ``True``, escape sequences generated by some keys (keypad, " +"function keys) will be interpreted by :mod:`!curses`. If *flag* is " +"``False``, escape sequences will be left as is in the input stream." +msgstr "" + +#: ../../library/curses.rst:1168 +msgid "" +"If *flag* is ``True``, cursor is left where it is on update, instead of " +"being at \"cursor position.\" This reduces cursor movement where possible." +msgstr "" + +#: ../../library/curses.rst:1171 +msgid "" +"If *flag* is ``False``, cursor will always be at \"cursor position\" after " +"an update." +msgstr "" + +#: ../../library/curses.rst:1176 +msgid "Move cursor to ``(new_y, new_x)``." +msgstr "" + +#: ../../library/curses.rst:1181 +msgid "" +"Move the window inside its parent window. The screen-relative parameters of " +"the window are not changed. This routine is used to display different parts " +"of the parent window at the same physical position on the screen." +msgstr "" + +#: ../../library/curses.rst:1188 +msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." +msgstr "" + +#: ../../library/curses.rst:1190 +msgid "" +"Moving the window so that any part of it would be off the screen is an " +"error: the window is not moved and :exc:`curses.error` is raised." +msgstr "" + +#: ../../library/curses.rst:1196 +msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." +msgstr "" + +#: ../../library/curses.rst:1201 +msgid "If *flag* is ``True``, escape sequences will not be timed out." +msgstr "" + +#: ../../library/curses.rst:1203 +msgid "" +"If *flag* is ``False``, after a few milliseconds, an escape sequence will " +"not be interpreted, and will be left in the input stream as is." +msgstr "" + +#: ../../library/curses.rst:1210 +msgid "" +"Mark for refresh but wait. This function updates the data structure " +"representing the desired state of the window, but does not force an update " +"of the physical screen. To accomplish that, call :func:`doupdate`." +msgstr "" + +#: ../../library/curses.rst:1214 +msgid "" +"The 6 arguments can only be specified, and are then required, when the " +"window is a pad created with :func:`newpad`; they have the same meaning as " +"for :meth:`refresh`." +msgstr "" + +#: ../../library/curses.rst:1221 +msgid "" +"Overlay the window on top of *destwin*. The windows need not be the same " +"size, only the overlapping region is copied. This copy is non-destructive, " +"which means that the current background character does not overwrite the old " +"contents of *destwin*." +msgstr "" + +#: ../../library/curses.rst:1226 +msgid "" +"To get fine-grained control over the copied region, the second form of :meth:" +"`overlay` can be used. *sminrow* and *smincol* are the upper-left " +"coordinates of the source window, and the other variables mark a rectangle " +"in the destination window." +msgstr "" + +#: ../../library/curses.rst:1234 +msgid "" +"Overwrite the window on top of *destwin*. The windows need not be the same " +"size, in which case only the overlapping region is copied. This copy is " +"destructive, which means that the current background character overwrites " +"the old contents of *destwin*." +msgstr "" + +#: ../../library/curses.rst:1239 +msgid "" +"To get fine-grained control over the copied region, the second form of :meth:" +"`overwrite` can be used. *sminrow* and *smincol* are the upper-left " +"coordinates of the source window, the other variables mark a rectangle in " +"the destination window." +msgstr "" + +#: ../../library/curses.rst:1247 +msgid "" +"Write all data associated with the window into the provided file object. " +"This information can be later retrieved using the :func:`getwin` function." +msgstr "" + +#: ../../library/curses.rst:1253 +msgid "" +"Indicate that the *num* screen lines, starting at line *beg*, are corrupted " +"and should be completely redrawn on the next :meth:`refresh` call." +msgstr "" + +#: ../../library/curses.rst:1259 +msgid "" +"Touch the entire window, causing it to be completely redrawn on the next :" +"meth:`refresh` call." +msgstr "" + +#: ../../library/curses.rst:1265 +msgid "" +"Update the display immediately (sync actual screen with previous drawing/" +"deleting methods)." +msgstr "" + +#: ../../library/curses.rst:1268 +msgid "" +"The 6 arguments can only be specified, and are then required, when the " +"window is a pad created with :func:`newpad`. The additional parameters are " +"needed to indicate what part of the pad and screen are involved. *pminrow* " +"and *pmincol* specify the upper-left corner of the rectangle to be displayed " +"in the pad. *sminrow*, *smincol*, *smaxrow*, and *smaxcol* specify the " +"edges of the rectangle to be displayed on the screen. The lower-right " +"corner of the rectangle to be displayed in the pad is calculated from the " +"screen coordinates, since the rectangles must be the same size. Both " +"rectangles must be entirely contained within their respective structures. " +"Negative values of *pminrow*, *pmincol*, *sminrow*, or *smincol* are treated " +"as if they were zero." +msgstr "" + +#: ../../library/curses.rst:1282 +msgid "" +"Reallocate storage for a curses window to adjust its dimensions to the " +"specified values. If either dimension is larger than the current values, " +"the window's data is filled with blanks that have the current background " +"rendition (as set by :meth:`bkgdset`) merged into them." +msgstr "" + +#: ../../library/curses.rst:1290 +msgid "" +"Scroll the screen or scrolling region. Scroll upward by *lines* lines if " +"*lines* is positive, or downward if it is negative. Scrolling has no effect " +"unless it has been enabled for the window with :meth:`scrollok`." +msgstr "" + +#: ../../library/curses.rst:1297 +msgid "" +"Control what happens when the cursor of a window is moved off the edge of " +"the window or scrolling region, either as a result of a newline action on " +"the bottom line, or typing the last character of the last line. If *flag* " +"is ``False``, the cursor is left on the bottom line. If *flag* is ``True``, " +"the window is scrolled up one line. Note that in order to get the physical " +"scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." +msgstr "" + +#: ../../library/curses.rst:1307 +msgid "" +"Set the scrolling region from line *top* to line *bottom*. All scrolling " +"actions will take place in this region." +msgstr "" + +#: ../../library/curses.rst:1313 +msgid "" +"Turn off the standout attribute. On some terminals this has the side effect " +"of turning off all attributes." +msgstr "" + +#: ../../library/curses.rst:1319 +msgid "Turn on attribute *A_STANDOUT*." +msgstr "" + +#: ../../library/curses.rst:1325 +msgid "" +"Return a sub-pad, whose upper-left corner is at ``(begin_y, begin_x)``, and " +"whose width/height is *ncols*/*nlines*. The coordinates are relative to the " +"parent pad (unlike :meth:`subwin`, which uses screen coordinates). This " +"method is only available for pads created with :func:`newpad`." +msgstr "" + +#: ../../library/curses.rst:1334 +msgid "" +"Return a sub-window, whose upper-left corner is at the screen-relative " +"coordinates ``(begin_y, begin_x)``, and whose width/height is *ncols*/" +"*nlines*." +msgstr "" + +#: ../../library/curses.rst:1337 +msgid "" +"By default, the sub-window will extend from the specified position to the " +"lower right corner of the window." +msgstr "" + +#: ../../library/curses.rst:1343 +msgid "" +"Touch each location in the window that has been touched in any of its " +"ancestor windows. This routine is called by :meth:`refresh`, so it should " +"almost never be necessary to call it manually." +msgstr "" + +#: ../../library/curses.rst:1350 +msgid "" +"If *flag* is ``True``, then :meth:`syncup` is called automatically whenever " +"there is a change in the window." +msgstr "" + +#: ../../library/curses.rst:1356 +msgid "" +"Touch all locations in ancestors of the window that have been changed in " +"the window." +msgstr "" + +#: ../../library/curses.rst:1362 +msgid "" +"Set blocking or non-blocking read behavior for the window. If *delay* is " +"negative, blocking read is used (which will wait indefinitely for input). " +"If *delay* is zero, then non-blocking read is used, and :meth:`getch` will " +"return ``-1`` if no input is waiting. If *delay* is positive, then :meth:" +"`getch` will block for *delay* milliseconds, and return ``-1`` if there is " +"still no input at the end of that time." +msgstr "" + +#: ../../library/curses.rst:1372 +msgid "" +"Pretend *count* lines have been changed, starting with line *start*. If " +"*changed* is supplied, it specifies whether the affected lines are marked as " +"having been changed (*changed*\\ ``=True``) or unchanged (*changed*\\ " +"``=False``)." +msgstr "" + +#: ../../library/curses.rst:1379 +msgid "" +"Pretend the whole window has been changed, for purposes of drawing " +"optimizations." +msgstr "" + +#: ../../library/curses.rst:1385 +msgid "" +"Mark all lines in the window as unchanged since the last call to :meth:" +"`refresh`." +msgstr "" + +#: ../../library/curses.rst:1392 +msgid "" +"Display a vertical line starting at ``(y, x)`` with length *n* consisting of " +"the character *ch* with attributes *attr*." +msgstr "" + +#: ../../library/curses.rst:1397 +msgid "Constants" +msgstr "" + +#: ../../library/curses.rst:1399 +msgid "The :mod:`!curses` module defines the following data members:" +msgstr "" + +#: ../../library/curses.rst:1404 +msgid "" +"Some curses routines that return an integer, such as :meth:`~window." +"getch`, return :const:`ERR` upon failure." +msgstr "" + +#: ../../library/curses.rst:1410 +msgid "" +"Some curses routines that return an integer, such as :func:`napms`, " +"return :const:`OK` upon success." +msgstr "" + +#: ../../library/curses.rst:1416 +msgid "A bytes object representing the current version of the module." +msgstr "" + +#: ../../library/curses.rst:1421 +msgid "" +"A named tuple containing the three components of the ncurses library " +"version: *major*, *minor*, and *patch*. All values are integers. The " +"components can also be accessed by name, so ``curses.ncurses_version[0]`` " +"is equivalent to ``curses.ncurses_version.major`` and so on." +msgstr "" + +#: ../../library/curses.rst:1426 +msgid "Availability: if the ncurses library is used." +msgstr "" + +#: ../../library/curses.rst:1432 +msgid "" +"The maximum number of colors the terminal can support. It is defined only " +"after the call to :func:`start_color`." +msgstr "" + +#: ../../library/curses.rst:1437 +msgid "" +"The maximum number of color pairs the terminal can support. It is defined " +"only after the call to :func:`start_color`." +msgstr "" + +#: ../../library/curses.rst:1442 +msgid "" +"The width of the screen, that is, the number of columns. It is defined only " +"after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" +"func:`resizeterm` and :func:`resize_term`." +msgstr "" + +#: ../../library/curses.rst:1449 +msgid "" +"The height of the screen, that is, the number of lines. It is defined only " +"after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" +"func:`resizeterm` and :func:`resize_term`." +msgstr "" + +#: ../../library/curses.rst:1455 +msgid "" +"Some constants are available to specify character cell attributes. The exact " +"constants available are system dependent." +msgstr "" + +#: ../../library/curses.rst:1459 +msgid "Attribute" +msgstr "" + +#: ../../library/curses.rst:1459 ../../library/curses.rst:1504 +#: ../../library/curses.rst:1750 ../../library/curses.rst:1842 +msgid "Meaning" +msgstr "" + +#: ../../library/curses.rst:1461 +msgid "Alternate character set mode" +msgstr "" + +#: ../../library/curses.rst:1463 +msgid "Blink mode" +msgstr "" + +#: ../../library/curses.rst:1465 +msgid "Bold mode" +msgstr "" + +#: ../../library/curses.rst:1467 +msgid "Dim mode" +msgstr "" + +#: ../../library/curses.rst:1469 +msgid "Invisible or blank mode" +msgstr "" + +#: ../../library/curses.rst:1471 +msgid "Italic mode" +msgstr "" + +#: ../../library/curses.rst:1473 +msgid "Normal attribute" +msgstr "" + +#: ../../library/curses.rst:1475 +msgid "Protected mode" +msgstr "" + +#: ../../library/curses.rst:1477 +msgid "Reverse background and foreground colors" +msgstr "" + +#: ../../library/curses.rst:1480 +msgid "Standout mode" +msgstr "" + +#: ../../library/curses.rst:1482 +msgid "Underline mode" +msgstr "" + +#: ../../library/curses.rst:1484 +msgid "Horizontal highlight" +msgstr "" + +#: ../../library/curses.rst:1486 +msgid "Left highlight" +msgstr "" + +#: ../../library/curses.rst:1488 +msgid "Low highlight" +msgstr "" + +#: ../../library/curses.rst:1490 +msgid "Right highlight" +msgstr "" + +#: ../../library/curses.rst:1492 +msgid "Top highlight" +msgstr "" + +#: ../../library/curses.rst:1494 +msgid "Vertical highlight" +msgstr "" + +#: ../../library/curses.rst:1497 +msgid "``A_ITALIC`` was added." +msgstr "" + +#: ../../library/curses.rst:1500 +msgid "" +"Several constants are available to extract corresponding attributes returned " +"by some methods." +msgstr "" + +#: ../../library/curses.rst:1504 +msgid "Bit-mask" +msgstr "" + +#: ../../library/curses.rst:1506 +msgid "Bit-mask to extract attributes" +msgstr "" + +#: ../../library/curses.rst:1509 +msgid "Bit-mask to extract a character" +msgstr "" + +#: ../../library/curses.rst:1512 +msgid "Bit-mask to extract color-pair field information" +msgstr "" + +#: ../../library/curses.rst:1516 +msgid "" +"Keys are referred to by integer constants with names starting with " +"``KEY_``. The exact keycaps available are system dependent." +msgstr "" + +#: ../../library/curses.rst:1522 +msgid "Key constant" +msgstr "" + +#: ../../library/curses.rst:1522 +msgid "Key" +msgstr "" + +#: ../../library/curses.rst:1524 +msgid "Minimum key value" +msgstr "" + +#: ../../library/curses.rst:1526 +msgid "Break key (unreliable)" +msgstr "" + +#: ../../library/curses.rst:1528 +msgid "Down-arrow" +msgstr "" + +#: ../../library/curses.rst:1530 +msgid "Up-arrow" +msgstr "" + +#: ../../library/curses.rst:1532 +msgid "Left-arrow" +msgstr "" + +#: ../../library/curses.rst:1534 +msgid "Right-arrow" +msgstr "" + +#: ../../library/curses.rst:1536 +msgid "Home key (upward+left arrow)" +msgstr "" + +#: ../../library/curses.rst:1538 +msgid "Backspace (unreliable)" +msgstr "" + +#: ../../library/curses.rst:1540 +msgid "Function keys. Up to 64 function keys are supported." +msgstr "" + +#: ../../library/curses.rst:1543 +msgid "Value of function key *n*" +msgstr "" + +#: ../../library/curses.rst:1545 +msgid "Delete line" +msgstr "" + +#: ../../library/curses.rst:1547 +msgid "Insert line" +msgstr "" + +#: ../../library/curses.rst:1549 +msgid "Delete character" +msgstr "" + +#: ../../library/curses.rst:1551 +msgid "Insert char or enter insert mode" +msgstr "" + +#: ../../library/curses.rst:1553 +msgid "Exit insert char mode" +msgstr "" + +#: ../../library/curses.rst:1555 +msgid "Clear screen" +msgstr "" + +#: ../../library/curses.rst:1557 +msgid "Clear to end of screen" +msgstr "" + +#: ../../library/curses.rst:1559 +msgid "Clear to end of line" +msgstr "" + +#: ../../library/curses.rst:1561 +msgid "Scroll 1 line forward" +msgstr "" + +#: ../../library/curses.rst:1563 +msgid "Scroll 1 line backward (reverse)" +msgstr "" + +#: ../../library/curses.rst:1565 +msgid "Next page" +msgstr "" + +#: ../../library/curses.rst:1567 +msgid "Previous page" +msgstr "" + +#: ../../library/curses.rst:1569 +msgid "Set tab" +msgstr "" + +#: ../../library/curses.rst:1571 +msgid "Clear tab" +msgstr "" + +#: ../../library/curses.rst:1573 +msgid "Clear all tabs" +msgstr "" + +#: ../../library/curses.rst:1575 +msgid "Enter or send (unreliable)" +msgstr "" + +#: ../../library/curses.rst:1577 +msgid "Soft (partial) reset (unreliable)" +msgstr "" + +#: ../../library/curses.rst:1579 +msgid "Reset or hard reset (unreliable)" +msgstr "" + +#: ../../library/curses.rst:1581 +msgid "Print" +msgstr "" + +#: ../../library/curses.rst:1583 +msgid "Home down or bottom (lower left)" +msgstr "" + +#: ../../library/curses.rst:1585 +msgid "Upper left of keypad" +msgstr "" + +#: ../../library/curses.rst:1587 +msgid "Upper right of keypad" +msgstr "" + +#: ../../library/curses.rst:1589 +msgid "Center of keypad" +msgstr "" + +#: ../../library/curses.rst:1591 +msgid "Lower left of keypad" +msgstr "" + +#: ../../library/curses.rst:1593 +msgid "Lower right of keypad" +msgstr "" + +#: ../../library/curses.rst:1595 +msgid "Back tab" +msgstr "" + +#: ../../library/curses.rst:1597 +msgid "Beg (beginning)" +msgstr "" + +#: ../../library/curses.rst:1599 +msgid "Cancel" +msgstr "" + +#: ../../library/curses.rst:1601 +msgid "Close" +msgstr "" + +#: ../../library/curses.rst:1603 +msgid "Cmd (command)" +msgstr "" + +#: ../../library/curses.rst:1605 +msgid "Copy" +msgstr "" + +#: ../../library/curses.rst:1607 +msgid "Create" +msgstr "" + +#: ../../library/curses.rst:1609 +msgid "End" +msgstr "" + +#: ../../library/curses.rst:1611 +msgid "Exit" +msgstr "" + +#: ../../library/curses.rst:1613 +msgid "Find" +msgstr "" + +#: ../../library/curses.rst:1615 +msgid "Help" +msgstr "" + +#: ../../library/curses.rst:1617 +msgid "Mark" +msgstr "" + +#: ../../library/curses.rst:1619 +msgid "Message" +msgstr "" + +#: ../../library/curses.rst:1621 +msgid "Move" +msgstr "" + +#: ../../library/curses.rst:1623 +msgid "Next" +msgstr "" + +#: ../../library/curses.rst:1625 +msgid "Open" +msgstr "" + +#: ../../library/curses.rst:1627 +msgid "Options" +msgstr "" + +#: ../../library/curses.rst:1629 +msgid "Prev (previous)" +msgstr "" + +#: ../../library/curses.rst:1631 +msgid "Redo" +msgstr "" + +#: ../../library/curses.rst:1633 +msgid "Ref (reference)" +msgstr "" + +#: ../../library/curses.rst:1635 +msgid "Refresh" +msgstr "" + +#: ../../library/curses.rst:1637 +msgid "Replace" +msgstr "" + +#: ../../library/curses.rst:1639 +msgid "Restart" +msgstr "" + +#: ../../library/curses.rst:1641 +msgid "Resume" +msgstr "" + +#: ../../library/curses.rst:1643 +msgid "Save" +msgstr "" + +#: ../../library/curses.rst:1645 +msgid "Shifted Beg (beginning)" +msgstr "" + +#: ../../library/curses.rst:1647 +msgid "Shifted Cancel" +msgstr "" + +#: ../../library/curses.rst:1649 +msgid "Shifted Command" +msgstr "" + +#: ../../library/curses.rst:1651 +msgid "Shifted Copy" +msgstr "" + +#: ../../library/curses.rst:1653 +msgid "Shifted Create" +msgstr "" + +#: ../../library/curses.rst:1655 +msgid "Shifted Delete char" +msgstr "" + +#: ../../library/curses.rst:1657 +msgid "Shifted Delete line" +msgstr "" + +#: ../../library/curses.rst:1659 +msgid "Select" +msgstr "" + +#: ../../library/curses.rst:1661 +msgid "Shifted End" +msgstr "" + +#: ../../library/curses.rst:1663 +msgid "Shifted Clear line" +msgstr "" + +#: ../../library/curses.rst:1665 +msgid "Shifted Exit" +msgstr "" + +#: ../../library/curses.rst:1667 +msgid "Shifted Find" +msgstr "" + +#: ../../library/curses.rst:1669 +msgid "Shifted Help" +msgstr "" + +#: ../../library/curses.rst:1671 +msgid "Shifted Home" +msgstr "" + +#: ../../library/curses.rst:1673 +msgid "Shifted Input" +msgstr "" + +#: ../../library/curses.rst:1675 +msgid "Shifted Left arrow" +msgstr "" + +#: ../../library/curses.rst:1677 +msgid "Shifted Message" +msgstr "" + +#: ../../library/curses.rst:1679 +msgid "Shifted Move" +msgstr "" + +#: ../../library/curses.rst:1681 +msgid "Shifted Next" +msgstr "" + +#: ../../library/curses.rst:1683 +msgid "Shifted Options" +msgstr "" + +#: ../../library/curses.rst:1685 +msgid "Shifted Prev" +msgstr "" + +#: ../../library/curses.rst:1687 +msgid "Shifted Print" +msgstr "" + +#: ../../library/curses.rst:1689 +msgid "Shifted Redo" +msgstr "" + +#: ../../library/curses.rst:1691 +msgid "Shifted Replace" +msgstr "" + +#: ../../library/curses.rst:1693 +msgid "Shifted Right arrow" +msgstr "" + +#: ../../library/curses.rst:1695 +msgid "Shifted Resume" +msgstr "" + +#: ../../library/curses.rst:1697 +msgid "Shifted Save" +msgstr "" + +#: ../../library/curses.rst:1699 +msgid "Shifted Suspend" +msgstr "" + +#: ../../library/curses.rst:1701 +msgid "Shifted Undo" +msgstr "" + +#: ../../library/curses.rst:1703 +msgid "Suspend" +msgstr "" + +#: ../../library/curses.rst:1705 +msgid "Undo" +msgstr "" + +#: ../../library/curses.rst:1707 +msgid "Mouse event has occurred" +msgstr "" + +#: ../../library/curses.rst:1709 +msgid "Terminal resize event" +msgstr "" + +#: ../../library/curses.rst:1711 +msgid "Maximum key value" +msgstr "" + +#: ../../library/curses.rst:1714 +msgid "" +"On VT100s and their software emulations, such as X terminal emulators, there " +"are normally at least four function keys (:const:`KEY_F1 `, :const:" +"`KEY_F2 `, :const:`KEY_F3 `, :const:`KEY_F4 `) " +"available, and the arrow keys mapped to :const:`KEY_UP`, :const:`KEY_DOWN`, :" +"const:`KEY_LEFT` and :const:`KEY_RIGHT` in the obvious way. If your machine " +"has a PC keyboard, it is safe to expect arrow keys and twelve function keys " +"(older PC keyboards may have only ten function keys); also, the following " +"keypad mappings are standard:" +msgstr "" + +#: ../../library/curses.rst:1723 +msgid "Keycap" +msgstr "" + +#: ../../library/curses.rst:1723 ../../library/curses.rst:1868 +#: ../../library/curses.rst:1994 +msgid "Constant" +msgstr "" + +#: ../../library/curses.rst:1725 +msgid ":kbd:`Insert`" +msgstr "" + +#: ../../library/curses.rst:1725 +msgid "KEY_IC" +msgstr "" + +#: ../../library/curses.rst:1727 +msgid ":kbd:`Delete`" +msgstr "" + +#: ../../library/curses.rst:1727 +msgid "KEY_DC" +msgstr "" + +#: ../../library/curses.rst:1729 +msgid ":kbd:`Home`" +msgstr "" + +#: ../../library/curses.rst:1729 +msgid "KEY_HOME" +msgstr "" + +#: ../../library/curses.rst:1731 +msgid ":kbd:`End`" +msgstr "" + +#: ../../library/curses.rst:1731 +msgid "KEY_END" +msgstr "" + +#: ../../library/curses.rst:1733 +msgid ":kbd:`Page Up`" +msgstr "" + +#: ../../library/curses.rst:1733 +msgid "KEY_PPAGE" +msgstr "" + +#: ../../library/curses.rst:1735 +msgid ":kbd:`Page Down`" +msgstr "" + +#: ../../library/curses.rst:1735 +msgid "KEY_NPAGE" +msgstr "" + +#: ../../library/curses.rst:1740 +msgid "" +"The following table lists characters from the alternate character set. These " +"are inherited from the VT100 terminal, and will generally be available on " +"software emulations such as X terminals. When there is no graphic " +"available, curses falls back on a crude printable ASCII approximation." +msgstr "" + +#: ../../library/curses.rst:1747 +msgid "These are available only after :func:`initscr` has been called." +msgstr "" + +#: ../../library/curses.rst:1750 +msgid "ACS code" +msgstr "" + +#: ../../library/curses.rst:1752 +msgid "alternate name for upper-right corner" +msgstr "" + +#: ../../library/curses.rst:1754 +msgid "solid square block" +msgstr "" + +#: ../../library/curses.rst:1756 +msgid "board of squares" +msgstr "" + +#: ../../library/curses.rst:1758 +msgid "alternate name for horizontal line" +msgstr "" + +#: ../../library/curses.rst:1760 +msgid "alternate name for upper-left corner" +msgstr "" + +#: ../../library/curses.rst:1762 +msgid "alternate name for top tee" +msgstr "" + +#: ../../library/curses.rst:1764 +msgid "bottom tee" +msgstr "" + +#: ../../library/curses.rst:1766 +msgid "bullet" +msgstr "" + +#: ../../library/curses.rst:1768 +msgid "checker board (stipple)" +msgstr "" + +#: ../../library/curses.rst:1770 +msgid "arrow pointing down" +msgstr "" + +#: ../../library/curses.rst:1772 +msgid "degree symbol" +msgstr "" + +#: ../../library/curses.rst:1774 +msgid "diamond" +msgstr "" + +#: ../../library/curses.rst:1776 +msgid "greater-than-or-equal-to" +msgstr "" + +#: ../../library/curses.rst:1778 +msgid "horizontal line" +msgstr "" + +#: ../../library/curses.rst:1780 +msgid "lantern symbol" +msgstr "" + +#: ../../library/curses.rst:1782 +msgid "left arrow" +msgstr "" + +#: ../../library/curses.rst:1784 +msgid "less-than-or-equal-to" +msgstr "" + +#: ../../library/curses.rst:1786 +msgid "lower-left corner" +msgstr "" + +#: ../../library/curses.rst:1788 +msgid "lower-right corner" +msgstr "" + +#: ../../library/curses.rst:1790 +msgid "left tee" +msgstr "" + +#: ../../library/curses.rst:1792 +msgid "not-equal sign" +msgstr "" + +#: ../../library/curses.rst:1794 +msgid "letter pi" +msgstr "" + +#: ../../library/curses.rst:1796 +msgid "plus-or-minus sign" +msgstr "" + +#: ../../library/curses.rst:1798 +msgid "big plus sign" +msgstr "" + +#: ../../library/curses.rst:1800 +msgid "right arrow" +msgstr "" + +#: ../../library/curses.rst:1802 +msgid "right tee" +msgstr "" + +#: ../../library/curses.rst:1804 +msgid "scan line 1" +msgstr "" + +#: ../../library/curses.rst:1806 +msgid "scan line 3" +msgstr "" + +#: ../../library/curses.rst:1808 +msgid "scan line 7" +msgstr "" + +#: ../../library/curses.rst:1810 +msgid "scan line 9" +msgstr "" + +#: ../../library/curses.rst:1812 +msgid "alternate name for lower-right corner" +msgstr "" + +#: ../../library/curses.rst:1814 +msgid "alternate name for vertical line" +msgstr "" + +#: ../../library/curses.rst:1816 +msgid "alternate name for right tee" +msgstr "" + +#: ../../library/curses.rst:1818 +msgid "alternate name for lower-left corner" +msgstr "" + +#: ../../library/curses.rst:1820 +msgid "alternate name for bottom tee" +msgstr "" + +#: ../../library/curses.rst:1822 +msgid "alternate name for left tee" +msgstr "" + +#: ../../library/curses.rst:1824 +msgid "alternate name for crossover or big plus" +msgstr "" + +#: ../../library/curses.rst:1826 +msgid "pound sterling" +msgstr "" + +#: ../../library/curses.rst:1828 +msgid "top tee" +msgstr "" + +#: ../../library/curses.rst:1830 +msgid "up arrow" +msgstr "" + +#: ../../library/curses.rst:1832 +msgid "upper-left corner" +msgstr "" + +#: ../../library/curses.rst:1834 +msgid "upper-right corner" +msgstr "" + +#: ../../library/curses.rst:1836 +msgid "vertical line" +msgstr "" + +#: ../../library/curses.rst:1839 +msgid "" +"The following table lists mouse button constants used by :meth:`getmouse`:" +msgstr "" + +#: ../../library/curses.rst:1842 +msgid "Mouse button constant" +msgstr "" + +#: ../../library/curses.rst:1844 +msgid "Mouse button *n* pressed" +msgstr "" + +#: ../../library/curses.rst:1846 +msgid "Mouse button *n* released" +msgstr "" + +#: ../../library/curses.rst:1848 +msgid "Mouse button *n* clicked" +msgstr "" + +#: ../../library/curses.rst:1850 +msgid "Mouse button *n* double clicked" +msgstr "" + +#: ../../library/curses.rst:1852 +msgid "Mouse button *n* triple clicked" +msgstr "" + +#: ../../library/curses.rst:1854 +msgid "Shift was down during button state change" +msgstr "" + +#: ../../library/curses.rst:1856 +msgid "Control was down during button state change" +msgstr "" + +#: ../../library/curses.rst:1858 +msgid "Alt was down during button state change" +msgstr "" + +#: ../../library/curses.rst:1865 +msgid "The following table lists the predefined colors:" +msgstr "" + +#: ../../library/curses.rst:1868 +msgid "Color" +msgstr "" + +#: ../../library/curses.rst:1870 +msgid "Black" +msgstr "" + +#: ../../library/curses.rst:1872 +msgid "Blue" +msgstr "" + +#: ../../library/curses.rst:1874 +msgid "Cyan (light greenish blue)" +msgstr "" + +#: ../../library/curses.rst:1876 +msgid "Green" +msgstr "" + +#: ../../library/curses.rst:1878 +msgid "Magenta (purplish red)" +msgstr "" + +#: ../../library/curses.rst:1880 +msgid "Red" +msgstr "" + +#: ../../library/curses.rst:1882 +msgid "White" +msgstr "" + +#: ../../library/curses.rst:1884 +msgid "Yellow" +msgstr "" + +#: ../../library/curses.rst:1889 +msgid ":mod:`!curses.textpad` --- Text input widget for curses programs" +msgstr "" + +#: ../../library/curses.rst:1894 +msgid "" +"The :mod:`!curses.textpad` module provides a :class:`Textbox` class that " +"handles elementary text editing in a curses window, supporting a set of " +"keybindings resembling those of Emacs (thus, also of Netscape Navigator, " +"BBedit 6.x, FrameMaker, and many other programs). The module also provides " +"a rectangle-drawing function useful for framing text boxes or for other " +"purposes." +msgstr "" + +#: ../../library/curses.rst:1900 +msgid "The module :mod:`!curses.textpad` defines the following function:" +msgstr "" + +#: ../../library/curses.rst:1905 +msgid "" +"Draw a rectangle. The first argument must be a window object; the remaining " +"arguments are coordinates relative to that window. The second and third " +"arguments are the y and x coordinates of the upper-left corner of the " +"rectangle to be drawn; the fourth and fifth arguments are the y and x " +"coordinates of the lower-right corner. The rectangle will be drawn using " +"VT100/IBM PC forms characters on terminals that make this possible " +"(including xterm and most other software terminal emulators). Otherwise it " +"will be drawn with ASCII dashes, vertical bars, and plus signs." +msgstr "" + +#: ../../library/curses.rst:1918 +msgid "Textbox objects" +msgstr "" + +#: ../../library/curses.rst:1920 +msgid "You can instantiate a :class:`Textbox` object as follows:" +msgstr "" + +#: ../../library/curses.rst:1925 +msgid "" +"Return a textbox widget object. The *win* argument should be a curses :ref:" +"`window ` object in which the textbox is to be " +"contained. If *insert_mode* is true, the textbox inserts typed characters, " +"shifting existing text to the right, rather than overwriting it. The edit " +"cursor of the textbox is initially located at the upper-left corner of the " +"containing window, with coordinates ``(0, 0)``. The instance's :attr:" +"`stripspaces` flag is initially on." +msgstr "" + +#: ../../library/curses.rst:1933 +msgid ":class:`Textbox` objects have the following methods:" +msgstr "" + +#: ../../library/curses.rst:1938 +msgid "" +"This is the entry point you will normally use. It accepts editing " +"keystrokes until one of the termination keystrokes is entered. If " +"*validate* is supplied, it must be a function. It will be called for each " +"keystroke entered with the keystroke as a parameter; command dispatch is " +"done on the result. If it returns a false value, the keystroke is ignored. " +"This method returns the window contents as a string; whether blanks in the " +"window are included is affected by the :attr:`stripspaces` attribute." +msgstr "" + +#: ../../library/curses.rst:1950 +msgid "" +"Process a single command keystroke. Returns ``1`` to continue editing, or " +"``0`` if a termination keystroke was processed. Here are the supported " +"special keystrokes:" +msgstr "" + +#: ../../library/curses.rst:1955 ../../library/curses.rst:1994 +msgid "Keystroke" +msgstr "" + +#: ../../library/curses.rst:1955 +msgid "Action" +msgstr "" + +#: ../../library/curses.rst:1957 +msgid ":kbd:`Control-A`" +msgstr "" + +#: ../../library/curses.rst:1957 +msgid "Go to left edge of window." +msgstr "" + +#: ../../library/curses.rst:1959 ../../library/curses.rst:1996 +msgid ":kbd:`Control-B`" +msgstr "" + +#: ../../library/curses.rst:1959 +msgid "Cursor left, wrapping to previous line if appropriate." +msgstr "" + +#: ../../library/curses.rst:1962 +msgid ":kbd:`Control-D`" +msgstr "" + +#: ../../library/curses.rst:1962 +msgid "Delete character under cursor." +msgstr "" + +#: ../../library/curses.rst:1964 +msgid ":kbd:`Control-E`" +msgstr "" + +#: ../../library/curses.rst:1964 +msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." +msgstr "" + +#: ../../library/curses.rst:1967 ../../library/curses.rst:1998 +msgid ":kbd:`Control-F`" +msgstr "" + +#: ../../library/curses.rst:1967 +msgid "Cursor right, wrapping to next line when appropriate." +msgstr "" + +#: ../../library/curses.rst:1970 +msgid ":kbd:`Control-G`" +msgstr "" + +#: ../../library/curses.rst:1970 +msgid "Terminate, returning the window contents." +msgstr "" + +#: ../../library/curses.rst:1972 +msgid ":kbd:`Control-H`" +msgstr "" + +#: ../../library/curses.rst:1972 +msgid "Delete character backward." +msgstr "" + +#: ../../library/curses.rst:1974 +msgid ":kbd:`Control-J`" +msgstr "" + +#: ../../library/curses.rst:1974 +msgid "" +"Terminate if the window is 1 line, otherwise move to the start of the next " +"line." +msgstr "" + +#: ../../library/curses.rst:1978 +msgid ":kbd:`Control-K`" +msgstr "" + +#: ../../library/curses.rst:1978 +msgid "If line is blank, delete it, otherwise clear to end of line." +msgstr "" + +#: ../../library/curses.rst:1981 +msgid ":kbd:`Control-L`" +msgstr "" + +#: ../../library/curses.rst:1981 +msgid "Refresh screen." +msgstr "" + +#: ../../library/curses.rst:1983 ../../library/curses.rst:2002 +msgid ":kbd:`Control-N`" +msgstr "" + +#: ../../library/curses.rst:1983 +msgid "Cursor down; move down one line." +msgstr "" + +#: ../../library/curses.rst:1985 +msgid ":kbd:`Control-O`" +msgstr "" + +#: ../../library/curses.rst:1985 +msgid "Insert a blank line at cursor location." +msgstr "" + +#: ../../library/curses.rst:1987 ../../library/curses.rst:2000 +msgid ":kbd:`Control-P`" +msgstr "" + +#: ../../library/curses.rst:1987 +msgid "Cursor up; move up one line." +msgstr "" + +#: ../../library/curses.rst:1990 +msgid "" +"Move operations do nothing if the cursor is at an edge where the movement is " +"not possible. The following synonyms are supported where possible:" +msgstr "" + +#: ../../library/curses.rst:1996 +msgid ":const:`~curses.KEY_LEFT`" +msgstr "" + +#: ../../library/curses.rst:1998 +msgid ":const:`~curses.KEY_RIGHT`" +msgstr "" + +#: ../../library/curses.rst:2000 +msgid ":const:`~curses.KEY_UP`" +msgstr "" + +#: ../../library/curses.rst:2002 +msgid ":const:`~curses.KEY_DOWN`" +msgstr "" + +#: ../../library/curses.rst:2004 +msgid ":const:`~curses.KEY_BACKSPACE`" +msgstr "" + +#: ../../library/curses.rst:2004 +msgid ":kbd:`Control-h`" +msgstr "" + +#: ../../library/curses.rst:2007 +msgid "" +"All other keystrokes are treated as a command to insert the given character " +"and move right (with line wrapping)." +msgstr "" + +#: ../../library/curses.rst:2013 +msgid "" +"Return the window contents as a string; whether blanks in the window are " +"included is affected by the :attr:`stripspaces` member." +msgstr "" + +#: ../../library/curses.rst:2019 +msgid "" +"This attribute is a flag which controls the interpretation of blanks in the " +"window. When it is on, trailing blanks on each line are ignored; any cursor " +"motion that would land the cursor on a trailing blank goes to the end of " +"that line instead, and trailing blanks are stripped when the window contents " +"are gathered." +msgstr "" diff --git a/library/datetime.po b/library/datetime.po index a2ae8572..c2e6bfef 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -1008,11 +1008,11 @@ msgstr "" msgid "\\(3)" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:676 msgid "``date1 == date2``" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:677 msgid "``date1 != date2``" msgstr "" @@ -1020,19 +1020,19 @@ msgstr "" msgid "Equality comparison. (4)" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:679 msgid "``date1 < date2``" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:680 msgid "``date1 > date2``" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:681 msgid "``date1 <= date2``" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:682 msgid "``date1 >= date2``" msgstr "" @@ -1769,27 +1769,27 @@ msgstr "" msgid "``timedelta = datetime1 - datetime2``" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:1286 msgid "``datetime1 == datetime2``" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:1287 msgid "``datetime1 != datetime2``" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:1289 msgid "``datetime1 < datetime2``" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:1290 msgid "``datetime1 > datetime2``" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:1291 msgid "``datetime1 <= datetime2``" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:1292 msgid "``datetime1 >= datetime2``" msgstr "" @@ -3515,11 +3515,11 @@ msgstr "" msgid "Weekday as locale's abbreviated name." msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2544 msgid "Sun, Mon, ..., Sat (en_US);" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2546 msgid "So, Mo, ..., Sa (de_DE)" msgstr "" @@ -3531,11 +3531,11 @@ msgstr "" msgid "Weekday as locale's full name." msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2549 msgid "Sunday, Monday, ..., Saturday (en_US);" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2551 msgid "Sonntag, Montag, ..., Samstag (de_DE)" msgstr "" @@ -3547,11 +3547,11 @@ msgstr "" msgid "Month as locale's abbreviated name." msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2554 msgid "Jan, Feb, ..., Dec (en_US);" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2556 msgid "Jan, Feb, ..., Dez (de_DE)" msgstr "" @@ -3563,11 +3563,11 @@ msgstr "" msgid "Month as locale's full name." msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2559 msgid "January, February, ..., December (en_US);" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2561 msgid "Januar, Februar, ..., Dezember (de_DE)" msgstr "" @@ -3579,11 +3579,11 @@ msgstr "" msgid "Locale's appropriate date and time representation." msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2564 msgid "Tue Aug 16 21:30:00 1988 (en_US);" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2566 msgid "Di 16 Aug 21:30:00 1988 (de_DE)" msgstr "" @@ -3791,11 +3791,11 @@ msgstr "" msgid "Locale's equivalent of either AM or PM." msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2617 msgid "AM, PM (en_US);" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2618 msgid "am, pm (de_DE)" msgstr "" @@ -3949,15 +3949,15 @@ msgstr "" msgid "Locale's appropriate date representation." msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2664 msgid "08/16/88 (None);" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2665 msgid "08/16/1988 (en_US);" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2666 msgid "16.08.1988 (de_DE)" msgstr "" @@ -3969,11 +3969,11 @@ msgstr "" msgid "Locale's appropriate time representation." msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2668 msgid "21:30:00 (en_US);" msgstr "" -#: ../../library/datetime.rst:0 +#: ../../library/datetime.rst:2669 msgid "21:30:00 (de_DE)" msgstr "" diff --git a/library/datetime.po~ b/library/datetime.po~ new file mode 100644 index 00000000..a2ae8572 --- /dev/null +++ b/library/datetime.po~ @@ -0,0 +1,4399 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:01+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/datetime.rst:2 +msgid ":mod:`!datetime` --- Basic date and time types" +msgstr "" + +#: ../../library/datetime.rst:7 +msgid "**Source code:** :source:`Lib/datetime.py`" +msgstr "" + +#: ../../library/datetime.rst:11 +msgid "" +"The :mod:`!datetime` module supplies classes for manipulating dates and " +"times." +msgstr "" + +#: ../../library/datetime.rst:13 +msgid "" +"While date and time arithmetic is supported, the focus of the implementation " +"is on efficient attribute extraction for output formatting and manipulation." +msgstr "" + +#: ../../library/datetime.rst:18 +msgid "Skip to :ref:`the format codes `." +msgstr "" + +#: ../../library/datetime.rst:22 +msgid "Module :mod:`calendar`" +msgstr "" + +#: ../../library/datetime.rst:23 +msgid "General calendar related functions." +msgstr "" + +#: ../../library/datetime.rst:25 +msgid "Module :mod:`time`" +msgstr "" + +#: ../../library/datetime.rst:26 +msgid "Time access and conversions." +msgstr "" + +#: ../../library/datetime.rst:28 +msgid "Module :mod:`zoneinfo`" +msgstr "" + +#: ../../library/datetime.rst:29 +msgid "Concrete time zones representing the IANA time zone database." +msgstr "" + +#: ../../library/datetime.rst:31 +msgid "Package `dateutil `_" +msgstr "" + +#: ../../library/datetime.rst:32 +msgid "Third-party library with expanded time zone and parsing support." +msgstr "" + +#: ../../library/datetime.rst:34 +msgid "Package :pypi:`DateType`" +msgstr "" + +#: ../../library/datetime.rst:35 +msgid "" +"Third-party library that introduces distinct static types to for example, " +"allow :term:`static type checkers ` to differentiate " +"between naive and aware datetimes." +msgstr "" + +#: ../../library/datetime.rst:43 +msgid "Aware and naive objects" +msgstr "" + +#: ../../library/datetime.rst:45 +msgid "" +"Date and time objects may be categorized as \"aware\" or \"naive\" depending " +"on whether or not they include time zone information." +msgstr "" + +#: ../../library/datetime.rst:48 +msgid "" +"With sufficient knowledge of applicable algorithmic and political time " +"adjustments, such as time zone and daylight saving time information, an " +"**aware** object can locate itself relative to other aware objects. An aware " +"object represents a specific moment in time that is not open to " +"interpretation. [#]_" +msgstr "" + +#: ../../library/datetime.rst:54 +msgid "" +"A **naive** object does not contain enough information to unambiguously " +"locate itself relative to other date/time objects. Whether a naive object " +"represents Coordinated Universal Time (UTC), local time, or time in some " +"other time zone is purely up to the program, just like it is up to the " +"program whether a particular number represents metres, miles, or mass. Naive " +"objects are easy to understand and to work with, at the cost of ignoring " +"some aspects of reality." +msgstr "" + +#: ../../library/datetime.rst:61 +msgid "" +"For applications requiring aware objects, :class:`.datetime` and :class:`." +"time` objects have an optional time zone information attribute, :attr:`!" +"tzinfo`, that can be set to an instance of a subclass of the abstract :class:" +"`!tzinfo` class. These :class:`tzinfo` objects capture information about the " +"offset from UTC time, the time zone name, and whether daylight saving time " +"is in effect." +msgstr "" + +#: ../../library/datetime.rst:67 +msgid "" +"Only one concrete :class:`tzinfo` class, the :class:`timezone` class, is " +"supplied by the :mod:`!datetime` module. The :class:`!timezone` class can " +"represent simple time zones with fixed offsets from UTC, such as UTC itself " +"or North American EST and EDT time zones. Supporting time zones at deeper " +"levels of detail is up to the application. The rules for time adjustment " +"across the world are more political than rational, change frequently, and " +"there is no standard suitable for every application aside from UTC." +msgstr "" + +#: ../../library/datetime.rst:77 +msgid "Constants" +msgstr "" + +#: ../../library/datetime.rst:79 +msgid "The :mod:`!datetime` module exports the following constants:" +msgstr "" + +#: ../../library/datetime.rst:83 +msgid "" +"The smallest year number allowed in a :class:`date` or :class:`.datetime` " +"object. :const:`MINYEAR` is 1." +msgstr "" + +#: ../../library/datetime.rst:89 +msgid "" +"The largest year number allowed in a :class:`date` or :class:`.datetime` " +"object. :const:`MAXYEAR` is 9999." +msgstr "" + +#: ../../library/datetime.rst:95 +msgid "Alias for the UTC time zone singleton :attr:`datetime.timezone.utc`." +msgstr "" + +#: ../../library/datetime.rst:101 +msgid "Available types" +msgstr "" + +#: ../../library/datetime.rst:106 +msgid "" +"An idealized naive date, assuming the current Gregorian calendar always was, " +"and always will be, in effect. Attributes: :attr:`year`, :attr:`month`, and :" +"attr:`day`." +msgstr "" + +#: ../../library/datetime.rst:114 +msgid "" +"An idealized time, independent of any particular day, assuming that every " +"day has exactly 24\\*60\\*60 seconds. (There is no notion of \"leap " +"seconds\" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :" +"attr:`microsecond`, and :attr:`.tzinfo`." +msgstr "" + +#: ../../library/datetime.rst:123 +msgid "" +"A combination of a date and a time. Attributes: :attr:`year`, :attr:" +"`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" +"`microsecond`, and :attr:`.tzinfo`." +msgstr "" + +#: ../../library/datetime.rst:131 +msgid "" +"A duration expressing the difference between two :class:`.datetime` or :" +"class:`date` instances to microsecond resolution." +msgstr "" + +#: ../../library/datetime.rst:138 +msgid "" +"An abstract base class for time zone information objects. These are used by " +"the :class:`.datetime` and :class:`.time` classes to provide a customizable " +"notion of time adjustment (for example, to account for time zone and/or " +"daylight saving time)." +msgstr "" + +#: ../../library/datetime.rst:147 +msgid "" +"A class that implements the :class:`tzinfo` abstract base class as a fixed " +"offset from the UTC." +msgstr "" + +#: ../../library/datetime.rst:153 ../../library/datetime.rst:170 +msgid "Objects of these types are immutable." +msgstr "" + +#: ../../library/datetime.rst:155 +msgid "Subclass relationships:" +msgstr "" + +#: ../../library/datetime.rst:157 +msgid "" +"timedelta, tzinfo, time, and date inherit from object; timezone inherits\n" +"from tzinfo; and datetime inherits from date." +msgstr "" + +#: ../../library/datetime.rst:165 +msgid "Common properties" +msgstr "" + +#: ../../library/datetime.rst:167 +msgid "" +"The :class:`date`, :class:`.datetime`, :class:`.time`, and :class:`timezone` " +"types share these common features:" +msgstr "" + +#: ../../library/datetime.rst:171 +msgid "" +"Objects of these types are :term:`hashable`, meaning that they can be used " +"as dictionary keys." +msgstr "" + +#: ../../library/datetime.rst:173 +msgid "" +"Objects of these types support efficient pickling via the :mod:`pickle` " +"module." +msgstr "" + +#: ../../library/datetime.rst:177 +msgid "Determining if an object is aware or naive" +msgstr "" + +#: ../../library/datetime.rst:179 +msgid "Objects of the :class:`date` type are always naive." +msgstr "" + +#: ../../library/datetime.rst:181 +msgid "" +"An object of type :class:`.time` or :class:`.datetime` may be aware or naive." +msgstr "" + +#: ../../library/datetime.rst:183 +msgid "" +"A :class:`.datetime` object ``d`` is aware if both of the following hold:" +msgstr "" + +#: ../../library/datetime.rst:185 +msgid "``d.tzinfo`` is not ``None``" +msgstr "" + +#: ../../library/datetime.rst:186 +msgid "``d.tzinfo.utcoffset(d)`` does not return ``None``" +msgstr "" + +#: ../../library/datetime.rst:188 +msgid "Otherwise, ``d`` is naive." +msgstr "" + +#: ../../library/datetime.rst:190 +msgid "A :class:`.time` object ``t`` is aware if both of the following hold:" +msgstr "" + +#: ../../library/datetime.rst:192 +msgid "``t.tzinfo`` is not ``None``" +msgstr "" + +#: ../../library/datetime.rst:193 +msgid "``t.tzinfo.utcoffset(None)`` does not return ``None``." +msgstr "" + +#: ../../library/datetime.rst:195 +msgid "Otherwise, ``t`` is naive." +msgstr "" + +#: ../../library/datetime.rst:197 +msgid "" +"The distinction between aware and naive doesn't apply to :class:`timedelta` " +"objects." +msgstr "" + +#: ../../library/datetime.rst:204 +msgid ":class:`!timedelta` objects" +msgstr "" + +#: ../../library/datetime.rst:206 +msgid "" +"A :class:`timedelta` object represents a duration, the difference between " +"two :class:`.datetime` or :class:`date` instances." +msgstr "" + +#: ../../library/datetime.rst:211 +msgid "" +"All arguments are optional and default to 0. Arguments may be integers or " +"floats, and may be positive or negative." +msgstr "" + +#: ../../library/datetime.rst:214 +msgid "" +"Only *days*, *seconds* and *microseconds* are stored internally. Arguments " +"are converted to those units:" +msgstr "" + +#: ../../library/datetime.rst:217 +msgid "A millisecond is converted to 1000 microseconds." +msgstr "" + +#: ../../library/datetime.rst:218 +msgid "A minute is converted to 60 seconds." +msgstr "" + +#: ../../library/datetime.rst:219 +msgid "An hour is converted to 3600 seconds." +msgstr "" + +#: ../../library/datetime.rst:220 +msgid "A week is converted to 7 days." +msgstr "" + +#: ../../library/datetime.rst:222 +msgid "" +"and days, seconds and microseconds are then normalized so that the " +"representation is unique, with" +msgstr "" + +#: ../../library/datetime.rst:225 +msgid "``0 <= microseconds < 1000000``" +msgstr "" + +#: ../../library/datetime.rst:226 +msgid "``0 <= seconds < 3600*24`` (the number of seconds in one day)" +msgstr "" + +#: ../../library/datetime.rst:227 +msgid "``-999999999 <= days <= 999999999``" +msgstr "" + +#: ../../library/datetime.rst:229 +msgid "" +"The following example illustrates how any arguments besides *days*, " +"*seconds* and *microseconds* are \"merged\" and normalized into those three " +"resulting attributes::" +msgstr "" + +#: ../../library/datetime.rst:233 +msgid "" +">>> import datetime as dt\n" +">>> delta = dt.timedelta(\n" +"... days=50,\n" +"... seconds=27,\n" +"... microseconds=10,\n" +"... milliseconds=29000,\n" +"... minutes=5,\n" +"... hours=8,\n" +"... weeks=2\n" +"... )\n" +">>> # Only days, seconds, and microseconds remain\n" +">>> delta\n" +"datetime.timedelta(days=64, seconds=29156, microseconds=10)" +msgstr "" + +#: ../../library/datetime.rst:248 +msgid "" +"``import datetime as dt`` instead of ``import datetime`` or ``from datetime " +"import datetime`` to avoid confusion between the module and the class. See " +"`How I Import Python’s datetime Module `__." +msgstr "" + +#: ../../library/datetime.rst:253 +msgid "" +"If any argument is a float and there are fractional microseconds, the " +"fractional microseconds left over from all arguments are combined and their " +"sum is rounded to the nearest microsecond using round-half-to-even " +"tiebreaker. If no argument is a float, the conversion and normalization " +"processes are exact (no information is lost)." +msgstr "" + +#: ../../library/datetime.rst:260 +msgid "" +"If the normalized value of days lies outside the indicated range, :exc:" +"`OverflowError` is raised." +msgstr "" + +#: ../../library/datetime.rst:263 +msgid "" +"Note that normalization of negative values may be surprising at first. For " +"example::" +msgstr "" + +#: ../../library/datetime.rst:266 +msgid "" +">>> import datetime as dt\n" +">>> d = dt.timedelta(microseconds=-1)\n" +">>> (d.days, d.seconds, d.microseconds)\n" +"(-1, 86399, 999999)" +msgstr "" + +#: ../../library/datetime.rst:271 +msgid "" +"Since the string representation of :class:`!timedelta` objects can be " +"confusing, use the following recipe to produce a more readable format:" +msgstr "" + +#: ../../library/datetime.rst:274 +msgid "" +">>> def pretty_timedelta(td):\n" +"... if td.days >= 0:\n" +"... return str(td)\n" +"... return f'-({-td!s})'\n" +"...\n" +">>> d = timedelta(hours=-1)\n" +">>> str(d) # not human-friendly\n" +"'-1 day, 23:00:00'\n" +">>> pretty_timedelta(d)\n" +"'-(1:00:00)'" +msgstr "" + +#: ../../library/datetime.rst:288 ../../library/datetime.rst:628 +#: ../../library/datetime.rst:1201 ../../library/datetime.rst:1850 +#: ../../library/datetime.rst:2486 +msgid "Class attributes:" +msgstr "" + +#: ../../library/datetime.rst:292 +msgid "The most negative :class:`timedelta` object, ``timedelta(-999999999)``." +msgstr "" + +#: ../../library/datetime.rst:297 +msgid "" +"The most positive :class:`timedelta` object, ``timedelta(days=999999999, " +"hours=23, minutes=59, seconds=59, microseconds=999999)``." +msgstr "" + +#: ../../library/datetime.rst:303 +msgid "" +"The smallest possible difference between non-equal :class:`timedelta` " +"objects, ``timedelta(microseconds=1)``." +msgstr "" + +#: ../../library/datetime.rst:307 +msgid "" +"Note that, because of normalization, ``timedelta.max`` is greater than ``-" +"timedelta.min``. ``-timedelta.max`` is not representable as a :class:" +"`timedelta` object." +msgstr "" + +#: ../../library/datetime.rst:311 ../../library/datetime.rst:646 +#: ../../library/datetime.rst:1221 ../../library/datetime.rst:1870 +msgid "Instance attributes (read-only):" +msgstr "" + +#: ../../library/datetime.rst:315 +msgid "Between -999,999,999 and 999,999,999 inclusive." +msgstr "" + +#: ../../library/datetime.rst:320 +msgid "Between 0 and 86,399 inclusive." +msgstr "" + +#: ../../library/datetime.rst:324 +msgid "" +"It is a somewhat common bug for code to unintentionally use this attribute " +"when it is actually intended to get a :meth:`~timedelta.total_seconds` value " +"instead:" +msgstr "" + +#: ../../library/datetime.rst:328 +msgid "" +">>> import datetime as dt\n" +">>> duration = dt.timedelta(seconds=11235813)\n" +">>> duration.days, duration.seconds\n" +"(130, 3813)\n" +">>> duration.total_seconds()\n" +"11235813.0" +msgstr "" + +#: ../../library/datetime.rst:340 +msgid "Between 0 and 999,999 inclusive." +msgstr "" + +#: ../../library/datetime.rst:343 ../../library/datetime.rst:663 +#: ../../library/datetime.rst:1275 +msgid "Supported operations:" +msgstr "" + +#: ../../library/datetime.rst:346 ../../library/datetime.rst:666 +#: ../../library/datetime.rst:1278 +msgid "Operation" +msgstr "" + +#: ../../library/datetime.rst:346 ../../library/datetime.rst:666 +#: ../../library/datetime.rst:1278 +msgid "Result" +msgstr "" + +#: ../../library/datetime.rst:348 +msgid "``t1 = t2 + t3``" +msgstr "" + +#: ../../library/datetime.rst:348 +msgid "" +"Sum of ``t2`` and ``t3``. Afterwards ``t1 - t2 == t3`` and ``t1 - t3 == t2`` " +"are true. (1)" +msgstr "" + +#: ../../library/datetime.rst:352 +msgid "``t1 = t2 - t3``" +msgstr "" + +#: ../../library/datetime.rst:352 +msgid "" +"Difference of ``t2`` and ``t3``. Afterwards ``t1 == t2 - t3`` and ``t2 == " +"t1 + t3`` are true. (1)(6)" +msgstr "" + +#: ../../library/datetime.rst:356 +msgid "``t1 = t2 * i or t1 = i * t2``" +msgstr "" + +#: ../../library/datetime.rst:356 +msgid "" +"Delta multiplied by an integer. Afterwards ``t1 // i == t2`` is true, " +"provided ``i != 0``." +msgstr "" + +#: ../../library/datetime.rst:360 +msgid "In general, ``t1 * i == t1 * (i-1) + t1`` is true. (1)" +msgstr "" + +#: ../../library/datetime.rst:363 +msgid "``t1 = t2 * f or t1 = f * t2``" +msgstr "" + +#: ../../library/datetime.rst:363 +msgid "" +"Delta multiplied by a float. The result is rounded to the nearest multiple " +"of timedelta.resolution using round-half-to-even." +msgstr "" + +#: ../../library/datetime.rst:367 +msgid "``f = t2 / t3``" +msgstr "" + +#: ../../library/datetime.rst:367 +msgid "" +"Division (3) of overall duration ``t2`` by interval unit ``t3``. Returns a :" +"class:`float` object." +msgstr "" + +#: ../../library/datetime.rst:371 +msgid "``t1 = t2 / f or t1 = t2 / i``" +msgstr "" + +#: ../../library/datetime.rst:371 +msgid "" +"Delta divided by a float or an int. The result is rounded to the nearest " +"multiple of timedelta.resolution using round-half-to-even." +msgstr "" + +#: ../../library/datetime.rst:375 +msgid "``t1 = t2 // i`` or ``t1 = t2 // t3``" +msgstr "" + +#: ../../library/datetime.rst:375 +msgid "" +"The floor is computed and the remainder (if any) is thrown away. In the " +"second case, an integer is returned. (3)" +msgstr "" + +#: ../../library/datetime.rst:379 +msgid "``t1 = t2 % t3``" +msgstr "" + +#: ../../library/datetime.rst:379 +msgid "The remainder is computed as a :class:`timedelta` object. (3)" +msgstr "" + +#: ../../library/datetime.rst:382 +msgid "``q, r = divmod(t1, t2)``" +msgstr "" + +#: ../../library/datetime.rst:382 +msgid "" +"Computes the quotient and the remainder: ``q = t1 // t2`` (3) and ``r = t1 % " +"t2``. ``q`` is an integer and ``r`` is a :class:`timedelta` object." +msgstr "" + +#: ../../library/datetime.rst:387 +msgid "``+t1``" +msgstr "" + +#: ../../library/datetime.rst:387 +msgid "Returns a :class:`timedelta` object with the same value. (2)" +msgstr "" + +#: ../../library/datetime.rst:390 +msgid "``-t1``" +msgstr "" + +#: ../../library/datetime.rst:390 +msgid "" +"Equivalent to ``timedelta(-t1.days, -t1.seconds, -t1.microseconds)``, and to " +"``t1 * -1``. (1)(4)" +msgstr "" + +#: ../../library/datetime.rst:394 +msgid "``abs(t)``" +msgstr "" + +#: ../../library/datetime.rst:394 +msgid "" +"Equivalent to ``+t`` when ``t.days >= 0``, and to ``-t`` when ``t.days < " +"0``. (2)" +msgstr "" + +#: ../../library/datetime.rst:397 +msgid "``str(t)``" +msgstr "" + +#: ../../library/datetime.rst:397 +msgid "" +"Returns a string in the form ``[D day[s], ][H]H:MM:SS[.UUUUUU]``, where D is " +"negative for negative ``t``. (5)" +msgstr "" + +#: ../../library/datetime.rst:401 +msgid "``repr(t)``" +msgstr "" + +#: ../../library/datetime.rst:401 +msgid "" +"Returns a string representation of the :class:`timedelta` object as a " +"constructor call with canonical attribute values." +msgstr "" + +#: ../../library/datetime.rst:406 ../../library/datetime.rst:685 +#: ../../library/datetime.rst:2796 +msgid "Notes:" +msgstr "" + +#: ../../library/datetime.rst:409 +msgid "This is exact but may overflow." +msgstr "" + +#: ../../library/datetime.rst:412 +msgid "This is exact and cannot overflow." +msgstr "" + +#: ../../library/datetime.rst:415 +msgid "Division by zero raises :exc:`ZeroDivisionError`." +msgstr "" + +#: ../../library/datetime.rst:418 +msgid "``-timedelta.max`` is not representable as a :class:`timedelta` object." +msgstr "" + +#: ../../library/datetime.rst:421 +msgid "" +"String representations of :class:`timedelta` objects are normalized " +"similarly to their internal representation. This leads to somewhat unusual " +"results for negative timedeltas. For example::" +msgstr "" + +#: ../../library/datetime.rst:425 +msgid "" +">>> timedelta(hours=-5)\n" +"datetime.timedelta(days=-1, seconds=68400)\n" +">>> print(_)\n" +"-1 day, 19:00:00" +msgstr "" + +#: ../../library/datetime.rst:431 +msgid "" +"The expression ``t2 - t3`` will always be equal to the expression ``t2 + (-" +"t3)`` except when t3 is equal to ``timedelta.max``; in that case the former " +"will produce a result while the latter will overflow." +msgstr "" + +#: ../../library/datetime.rst:435 +msgid "" +"In addition to the operations listed above, :class:`timedelta` objects " +"support certain additions and subtractions with :class:`date` and :class:`." +"datetime` objects (see below)." +msgstr "" + +#: ../../library/datetime.rst:439 +msgid "" +"Floor division and true division of a :class:`timedelta` object by another :" +"class:`!timedelta` object are now supported, as are remainder operations and " +"the :func:`divmod` function. True division and multiplication of a :class:`!" +"timedelta` object by a :class:`float` object are now supported." +msgstr "" + +#: ../../library/datetime.rst:445 +msgid ":class:`timedelta` objects support equality and order comparisons." +msgstr "" + +#: ../../library/datetime.rst:447 +msgid "" +"In Boolean contexts, a :class:`timedelta` object is considered to be true if " +"and only if it isn't equal to ``timedelta(0)``." +msgstr "" + +#: ../../library/datetime.rst:450 ../../library/datetime.rst:727 +#: ../../library/datetime.rst:1366 ../../library/datetime.rst:1995 +msgid "Instance methods:" +msgstr "" + +#: ../../library/datetime.rst:454 +msgid "" +"Return the total number of seconds contained in the duration. Equivalent to " +"``td / timedelta(seconds=1)``. For interval units other than seconds, use " +"the division form directly (for example, ``td / timedelta(microseconds=1)``)." +msgstr "" + +#: ../../library/datetime.rst:458 +msgid "" +"Note that for very large time intervals (greater than 270 years on most " +"platforms) this method will lose microsecond accuracy." +msgstr "" + +#: ../../library/datetime.rst:465 +msgid "Examples of usage: :class:`!timedelta`" +msgstr "" + +#: ../../library/datetime.rst:467 +msgid "An additional example of normalization::" +msgstr "" + +#: ../../library/datetime.rst:469 +msgid "" +">>> # Components of another_year add up to exactly 365 days\n" +">>> import datetime as dt\n" +">>> year = dt.timedelta(days=365)\n" +">>> another_year = dt.timedelta(weeks=40, days=84, hours=23,\n" +"... minutes=50, seconds=600)\n" +">>> year == another_year\n" +"True\n" +">>> year.total_seconds()\n" +"31536000.0" +msgstr "" + +#: ../../library/datetime.rst:479 +msgid "Examples of :class:`timedelta` arithmetic::" +msgstr "" + +#: ../../library/datetime.rst:481 +msgid "" +">>> import datetime as dt\n" +">>> year = dt.timedelta(days=365)\n" +">>> ten_years = 10 * year\n" +">>> ten_years\n" +"datetime.timedelta(days=3650)\n" +">>> ten_years.days // 365\n" +"10\n" +">>> nine_years = ten_years - year\n" +">>> nine_years\n" +"datetime.timedelta(days=3285)\n" +">>> three_years = nine_years // 3\n" +">>> three_years, three_years.days // 365\n" +"(datetime.timedelta(days=1095), 3)" +msgstr "" + +#: ../../library/datetime.rst:499 +msgid ":class:`!date` objects" +msgstr "" + +#: ../../library/datetime.rst:501 +msgid "" +"A :class:`date` object represents a date (year, month and day) in an " +"idealized calendar, the current Gregorian calendar indefinitely extended in " +"both directions." +msgstr "" + +#: ../../library/datetime.rst:505 +msgid "" +"January 1 of year 1 is called day number 1, January 2 of year 1 is called " +"day number 2, and so on. [#]_" +msgstr "" + +#: ../../library/datetime.rst:510 +msgid "" +"All arguments are required. Arguments must be integers, in the following " +"ranges:" +msgstr "" + +#: ../../library/datetime.rst:513 +msgid "``MINYEAR <= year <= MAXYEAR``" +msgstr "" + +#: ../../library/datetime.rst:514 +msgid "``1 <= month <= 12``" +msgstr "" + +#: ../../library/datetime.rst:515 +msgid "``1 <= day <= number of days in the given month and year``" +msgstr "" + +#: ../../library/datetime.rst:517 ../../library/datetime.rst:948 +msgid "" +"If an argument outside those ranges is given, :exc:`ValueError` is raised." +msgstr "" + +#: ../../library/datetime.rst:520 ../../library/datetime.rst:954 +msgid "Other constructors, all class methods:" +msgstr "" + +#: ../../library/datetime.rst:524 +msgid "Return the current local date." +msgstr "" + +#: ../../library/datetime.rst:526 +msgid "This is equivalent to ``date.fromtimestamp(time.time())``." +msgstr "" + +#: ../../library/datetime.rst:531 +msgid "" +"Return the local date corresponding to the POSIX *timestamp*, such as is " +"returned by :func:`time.time`." +msgstr "" + +#: ../../library/datetime.rst:534 +msgid "" +"This may raise :exc:`OverflowError`, if the timestamp is out of the range of " +"values supported by the platform C :c:func:`localtime` function, and :exc:" +"`OSError` on :c:func:`localtime` failure. It's common for this to be " +"restricted to years from 1970 through 2038. Note that on non-POSIX systems " +"that include leap seconds in their notion of a timestamp, leap seconds are " +"ignored by :meth:`fromtimestamp`." +msgstr "" + +#: ../../library/datetime.rst:541 +msgid "" +"Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " +"out of the range of values supported by the platform C :c:func:`localtime` " +"function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:" +"`localtime` failure." +msgstr "" + +#: ../../library/datetime.rst:547 ../../library/datetime.rst:1042 +#: ../../library/datetime.rst:1082 +msgid "Accepts any real number as *timestamp*, not only integer or float." +msgstr "" + +#: ../../library/datetime.rst:553 +msgid "" +"Return the date corresponding to the proleptic Gregorian *ordinal*, where " +"January 1 of year 1 has ordinal 1." +msgstr "" + +#: ../../library/datetime.rst:556 +msgid "" +":exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. " +"For any date ``d``, ``date.fromordinal(d.toordinal()) == d``." +msgstr "" + +#: ../../library/datetime.rst:563 +msgid "" +"Return a :class:`date` corresponding to a *date_string* given in any valid " +"ISO 8601 format, with the following exceptions:" +msgstr "" + +#: ../../library/datetime.rst:566 ../../library/datetime.rst:1123 +msgid "" +"Reduced precision dates are not currently supported (``YYYY-MM``, ``YYYY``)." +msgstr "" + +#: ../../library/datetime.rst:568 ../../library/datetime.rst:1125 +msgid "" +"Extended date representations are not currently supported (``±YYYYYY-MM-" +"DD``)." +msgstr "" + +#: ../../library/datetime.rst:570 ../../library/datetime.rst:1127 +msgid "Ordinal dates are not currently supported (``YYYY-OOO``)." +msgstr "" + +#: ../../library/datetime.rst:572 ../../library/datetime.rst:1129 +#: ../../library/datetime.rst:1604 +msgid "Examples::" +msgstr "" + +#: ../../library/datetime.rst:574 +msgid "" +">>> import datetime as dt\n" +">>> dt.date.fromisoformat('2019-12-04')\n" +"datetime.date(2019, 12, 4)\n" +">>> dt.date.fromisoformat('20191204')\n" +"datetime.date(2019, 12, 4)\n" +">>> dt.date.fromisoformat('2021-W01-1')\n" +"datetime.date(2021, 1, 4)" +msgstr "" + +#: ../../library/datetime.rst:583 +msgid "Previously, this method only supported the format ``YYYY-MM-DD``." +msgstr "" + +#: ../../library/datetime.rst:589 +msgid "" +"Return a :class:`date` corresponding to the ISO calendar date specified by " +"*year*, *week* and *day*. This is the inverse of the function :meth:`date." +"isocalendar`." +msgstr "" + +#: ../../library/datetime.rst:597 +msgid "" +"Return a :class:`.date` corresponding to *date_string*, parsed according to " +"*format*. This is equivalent to::" +msgstr "" + +#: ../../library/datetime.rst:600 +msgid "date(*(time.strptime(date_string, format)[0:3]))" +msgstr "" + +#: ../../library/datetime.rst:602 +msgid "" +":exc:`ValueError` is raised if the date_string and format can't be parsed " +"by :func:`time.strptime` or if it returns a value which isn't a time tuple. " +"See also :ref:`strftime-strptime-behavior` and :meth:`date.fromisoformat`." +msgstr "" + +#: ../../library/datetime.rst:609 ../../library/datetime.rst:1184 +msgid "" +"If *format* specifies a day of month (``%d``) without a year, :exc:" +"`ValueError` is raised. This is to avoid a quadrennial leap year bug in " +"code seeking to parse only a month and day as the default year used in " +"absence of one in the format is not a leap year. The workaround is to always " +"include a year in your *format*. If parsing *date_string* values that do " +"not have a year, explicitly add a year that is a leap year before parsing:" +msgstr "" + +#: ../../library/datetime.rst:617 +msgid "" +">>> import datetime as dt\n" +">>> date_string = \"02/29\"\n" +">>> when = dt.date.strptime(f\"{date_string};1984\", \"%m/%d;%Y\") # Avoids " +"leap year bug.\n" +">>> when.strftime(\"%B %d\")\n" +"'February 29'" +msgstr "" + +#: ../../library/datetime.rst:632 +msgid "The earliest representable date, ``date(MINYEAR, 1, 1)``." +msgstr "" + +#: ../../library/datetime.rst:637 +msgid "The latest representable date, ``date(MAXYEAR, 12, 31)``." +msgstr "" + +#: ../../library/datetime.rst:642 +msgid "" +"The smallest possible difference between non-equal date objects, " +"``timedelta(days=1)``." +msgstr "" + +#: ../../library/datetime.rst:650 ../../library/datetime.rst:1225 +msgid "Between :const:`MINYEAR` and :const:`MAXYEAR` inclusive." +msgstr "" + +#: ../../library/datetime.rst:655 ../../library/datetime.rst:1230 +msgid "Between 1 and 12 inclusive." +msgstr "" + +#: ../../library/datetime.rst:660 ../../library/datetime.rst:1235 +msgid "Between 1 and the number of days in the given month of the given year." +msgstr "" + +#: ../../library/datetime.rst:668 +msgid "``date2 = date1 + timedelta``" +msgstr "" + +#: ../../library/datetime.rst:668 +msgid "``date2`` will be ``timedelta.days`` days after ``date1``. (1)" +msgstr "" + +#: ../../library/datetime.rst:671 +msgid "``date2 = date1 - timedelta``" +msgstr "" + +#: ../../library/datetime.rst:671 +msgid "Computes ``date2`` such that ``date2 + timedelta == date1``. (2)" +msgstr "" + +#: ../../library/datetime.rst:674 +msgid "``timedelta = date1 - date2``" +msgstr "" + +#: ../../library/datetime.rst:674 ../../library/datetime.rst:1284 +msgid "\\(3)" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``date1 == date2``" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``date1 != date2``" +msgstr "" + +#: ../../library/datetime.rst:676 ../../library/datetime.rst:1286 +msgid "Equality comparison. (4)" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``date1 < date2``" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``date1 > date2``" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``date1 <= date2``" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``date1 >= date2``" +msgstr "" + +#: ../../library/datetime.rst:679 ../../library/datetime.rst:1289 +msgid "Order comparison. (5)" +msgstr "" + +#: ../../library/datetime.rst:688 +msgid "" +"*date2* is moved forward in time if ``timedelta.days > 0``, or backward if " +"``timedelta.days < 0``. Afterward ``date2 - date1 == timedelta.days``. " +"``timedelta.seconds`` and ``timedelta.microseconds`` are ignored. :exc:" +"`OverflowError` is raised if ``date2.year`` would be smaller than :const:" +"`MINYEAR` or larger than :const:`MAXYEAR`." +msgstr "" + +#: ../../library/datetime.rst:695 +msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored." +msgstr "" + +#: ../../library/datetime.rst:698 +msgid "" +"This is exact, and cannot overflow. ``timedelta.seconds`` and ``timedelta." +"microseconds`` are 0, and ``date2 + timedelta == date1`` after." +msgstr "" + +#: ../../library/datetime.rst:702 +msgid ":class:`date` objects are equal if they represent the same date." +msgstr "" + +#: ../../library/datetime.rst:704 +msgid "" +":class:`!date` objects that are not also :class:`.datetime` instances are " +"never equal to :class:`!datetime` objects, even if they represent the same " +"date." +msgstr "" + +#: ../../library/datetime.rst:709 +msgid "" +"*date1* is considered less than *date2* when *date1* precedes *date2* in " +"time. In other words, ``date1 < date2`` if and only if ``date1.toordinal() < " +"date2.toordinal()``." +msgstr "" + +#: ../../library/datetime.rst:713 +msgid "" +"Order comparison between a :class:`date` object that is not also a :class:`." +"datetime` instance and a :class:`!datetime` object raises :exc:`TypeError`." +msgstr "" + +#: ../../library/datetime.rst:717 ../../library/datetime.rst:1357 +msgid "" +"Comparison between :class:`.datetime` object and an instance of the :class:" +"`date` subclass that is not a :class:`!datetime` subclass no longer converts " +"the latter to :class:`!date`, ignoring the time part and the time zone. The " +"default behavior can be changed by overriding the special comparison methods " +"in subclasses." +msgstr "" + +#: ../../library/datetime.rst:725 +msgid "" +"In Boolean contexts, all :class:`date` objects are considered to be true." +msgstr "" + +#: ../../library/datetime.rst:731 +msgid "" +"Return a new :class:`date` object with the same values, but with specified " +"parameters updated." +msgstr "" + +#: ../../library/datetime.rst:734 ../../library/datetime.rst:2041 +msgid "Example::" +msgstr "" + +#: ../../library/datetime.rst:736 +msgid "" +">>> import datetime as dt\n" +">>> d = dt.date(2002, 12, 31)\n" +">>> d.replace(day=26)\n" +"datetime.date(2002, 12, 26)" +msgstr "" + +#: ../../library/datetime.rst:741 +msgid "" +"The generic function :func:`copy.replace` also supports :class:`date` " +"objects." +msgstr "" + +#: ../../library/datetime.rst:747 ../../library/datetime.rst:1482 +msgid "" +"Return a :class:`time.struct_time` such as returned by :func:`time." +"localtime`." +msgstr "" + +#: ../../library/datetime.rst:749 +msgid "The hours, minutes and seconds are 0, and the DST flag is -1." +msgstr "" + +#: ../../library/datetime.rst:751 ../../library/datetime.rst:1484 +msgid "``d.timetuple()`` is equivalent to::" +msgstr "" + +#: ../../library/datetime.rst:753 +msgid "" +"time.struct_time((d.year, d.month, d.day, 0, 0, 0, d.weekday(), yday, -1))" +msgstr "" + +#: ../../library/datetime.rst:755 +msgid "" +"where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " +"day number within the current year starting with 1 for January 1st." +msgstr "" + +#: ../../library/datetime.rst:761 +msgid "" +"Return the proleptic Gregorian ordinal of the date, where January 1 of year " +"1 has ordinal 1. For any :class:`date` object ``d``, ``date.fromordinal(d." +"toordinal()) == d``." +msgstr "" + +#: ../../library/datetime.rst:768 +msgid "" +"Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " +"For example, ``date(2002, 12, 4).weekday() == 2``, a Wednesday. See also :" +"meth:`isoweekday`." +msgstr "" + +#: ../../library/datetime.rst:775 +msgid "" +"Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " +"For example, ``date(2002, 12, 4).isoweekday() == 3``, a Wednesday. See also :" +"meth:`weekday`, :meth:`isocalendar`." +msgstr "" + +#: ../../library/datetime.rst:782 +msgid "" +"Return a :term:`named tuple` object with three components: ``year``, " +"``week`` and ``weekday``." +msgstr "" + +#: ../../library/datetime.rst:785 +msgid "" +"The ISO calendar is a widely used variant of the Gregorian calendar. [#]_" +msgstr "" + +#: ../../library/datetime.rst:787 +msgid "" +"The ISO year consists of 52 or 53 full weeks, and where a week starts on a " +"Monday and ends on a Sunday. The first week of an ISO year is the first " +"(Gregorian) calendar week of a year containing a Thursday. This is called " +"week number 1, and the ISO year of that Thursday is the same as its " +"Gregorian year." +msgstr "" + +#: ../../library/datetime.rst:792 +msgid "" +"For example, 2004 begins on a Thursday, so the first week of ISO year 2004 " +"begins on Monday, 29 Dec 2003 and ends on Sunday, 4 Jan 2004::" +msgstr "" + +#: ../../library/datetime.rst:795 +msgid "" +">>> import datetime as dt\n" +">>> dt.date(2003, 12, 29).isocalendar()\n" +"datetime.IsoCalendarDate(year=2004, week=1, weekday=1)\n" +">>> dt.date(2004, 1, 4).isocalendar()\n" +"datetime.IsoCalendarDate(year=2004, week=1, weekday=7)" +msgstr "" + +#: ../../library/datetime.rst:801 +msgid "Result changed from a tuple to a :term:`named tuple`." +msgstr "" + +#: ../../library/datetime.rst:807 +msgid "" +"Return a string representing the date in ISO 8601 format, ``YYYY-MM-DD``::" +msgstr "" + +#: ../../library/datetime.rst:809 +msgid "" +">>> import datetime as dt\n" +">>> dt.date(2002, 12, 4).isoformat()\n" +"'2002-12-04'" +msgstr "" + +#: ../../library/datetime.rst:816 +msgid "For a date ``d``, ``str(d)`` is equivalent to ``d.isoformat()``." +msgstr "" + +#: ../../library/datetime.rst:821 +msgid "Return a string representing the date::" +msgstr "" + +#: ../../library/datetime.rst:823 +msgid "" +">>> import datetime as dt\n" +">>> dt.date(2002, 12, 4).ctime()\n" +"'Wed Dec 4 00:00:00 2002'" +msgstr "" + +#: ../../library/datetime.rst:827 ../../library/datetime.rst:1675 +msgid "``d.ctime()`` is equivalent to::" +msgstr "" + +#: ../../library/datetime.rst:829 ../../library/datetime.rst:1677 +msgid "time.ctime(time.mktime(d.timetuple()))" +msgstr "" + +#: ../../library/datetime.rst:831 +msgid "" +"on platforms where the native C :c:func:`ctime` function (which :func:`time." +"ctime` invokes, but which :meth:`date.ctime` does not invoke) conforms to " +"the C standard." +msgstr "" + +#: ../../library/datetime.rst:838 +msgid "" +"Return a string representing the date, controlled by an explicit format " +"string. Format codes referring to hours, minutes or seconds will see 0 " +"values. See also :ref:`strftime-strptime-behavior` and :meth:`date." +"isoformat`." +msgstr "" + +#: ../../library/datetime.rst:845 +msgid "" +"Same as :meth:`.date.strftime`. This makes it possible to specify a format " +"string for a :class:`.date` object in :ref:`formatted string literals ` and when using :meth:`str.format`. See also :ref:`strftime-" +"strptime-behavior` and :meth:`date.isoformat`." +msgstr "" + +#: ../../library/datetime.rst:852 +msgid "Examples of usage: :class:`!date`" +msgstr "" + +#: ../../library/datetime.rst:854 +msgid "Example of counting days to an event::" +msgstr "" + +#: ../../library/datetime.rst:856 +msgid "" +">>> import time\n" +">>> import datetime as dt\n" +">>> today = dt.date.today()\n" +">>> today\n" +"datetime.date(2007, 12, 5)\n" +">>> today == dt.date.fromtimestamp(time.time())\n" +"True\n" +">>> my_birthday = dt.date(today.year, 6, 24)\n" +">>> if my_birthday < today:\n" +"... my_birthday = my_birthday.replace(year=today.year + 1)\n" +"...\n" +">>> my_birthday\n" +"datetime.date(2008, 6, 24)\n" +">>> time_to_birthday = abs(my_birthday - today)\n" +">>> time_to_birthday.days\n" +"202" +msgstr "" + +#: ../../library/datetime.rst:873 +msgid "More examples of working with :class:`date`:" +msgstr "" + +#: ../../library/datetime.rst:875 +msgid "" +">>> import datetime as dt\n" +">>> d = dt.date.fromordinal(730920) # 730920th day after 1. 1. 0001\n" +">>> d\n" +"datetime.date(2002, 3, 11)\n" +"\n" +">>> # Methods related to formatting string output\n" +">>> d.isoformat()\n" +"'2002-03-11'\n" +">>> d.strftime(\"%d/%m/%y\")\n" +"'11/03/02'\n" +">>> d.strftime(\"%A %d. %B %Y\")\n" +"'Monday 11. March 2002'\n" +">>> d.ctime()\n" +"'Mon Mar 11 00:00:00 2002'\n" +">>> 'The {1} is {0:%d}, the {2} is {0:%B}.'.format(d, \"day\", \"month\")\n" +"'The day is 11, the month is March.'\n" +"\n" +">>> # Methods for extracting 'components' under different calendars\n" +">>> t = d.timetuple()\n" +">>> for i in t:\n" +"... print(i)\n" +"2002 # year\n" +"3 # month\n" +"11 # day\n" +"0\n" +"0\n" +"0\n" +"0 # weekday (0 = Monday)\n" +"70 # 70th day in the year\n" +"-1\n" +">>> ic = d.isocalendar()\n" +">>> for i in ic:\n" +"... print(i)\n" +"2002 # ISO year\n" +"11 # ISO week number\n" +"1 # ISO day number ( 1 = Monday )\n" +"\n" +">>> # A date object is immutable; all operations produce a new object\n" +">>> d.replace(year=2005)\n" +"datetime.date(2005, 3, 11)" +msgstr "" + +#: ../../library/datetime.rst:922 +msgid ":class:`!datetime` objects" +msgstr "" + +#: ../../library/datetime.rst:924 +msgid "" +"A :class:`.datetime` object is a single object containing all the " +"information from a :class:`date` object and a :class:`.time` object." +msgstr "" + +#: ../../library/datetime.rst:927 +msgid "" +"Like a :class:`date` object, :class:`.datetime` assumes the current " +"Gregorian calendar extended in both directions; like a :class:`.time` " +"object, :class:`!datetime` assumes there are exactly 3600\\*24 seconds in " +"every day." +msgstr "" + +#: ../../library/datetime.rst:931 +msgid "Constructor:" +msgstr "" + +#: ../../library/datetime.rst:935 +msgid "" +"The *year*, *month* and *day* arguments are required. *tzinfo* may be " +"``None``, or an instance of a :class:`tzinfo` subclass. The remaining " +"arguments must be integers in the following ranges:" +msgstr "" + +#: ../../library/datetime.rst:939 +msgid "``MINYEAR <= year <= MAXYEAR``," +msgstr "" + +#: ../../library/datetime.rst:940 +msgid "``1 <= month <= 12``," +msgstr "" + +#: ../../library/datetime.rst:941 +msgid "``1 <= day <= number of days in the given month and year``," +msgstr "" + +#: ../../library/datetime.rst:942 ../../library/datetime.rst:1840 +msgid "``0 <= hour < 24``," +msgstr "" + +#: ../../library/datetime.rst:943 ../../library/datetime.rst:1841 +msgid "``0 <= minute < 60``," +msgstr "" + +#: ../../library/datetime.rst:944 ../../library/datetime.rst:1842 +msgid "``0 <= second < 60``," +msgstr "" + +#: ../../library/datetime.rst:945 ../../library/datetime.rst:1843 +msgid "``0 <= microsecond < 1000000``," +msgstr "" + +#: ../../library/datetime.rst:946 ../../library/datetime.rst:1844 +msgid "``fold in [0, 1]``." +msgstr "" + +#: ../../library/datetime.rst:950 ../../library/datetime.rst:1403 +#: ../../library/datetime.rst:2008 +msgid "Added the *fold* parameter." +msgstr "" + +#: ../../library/datetime.rst:958 +msgid "Return the current local date and time, with :attr:`.tzinfo` ``None``." +msgstr "" + +#: ../../library/datetime.rst:960 +msgid "Equivalent to::" +msgstr "" + +#: ../../library/datetime.rst:962 +msgid "datetime.fromtimestamp(time.time())" +msgstr "" + +#: ../../library/datetime.rst:964 +msgid "See also :meth:`now`, :meth:`fromtimestamp`." +msgstr "" + +#: ../../library/datetime.rst:966 +msgid "" +"This method is functionally equivalent to :meth:`now`, but without a ``tz`` " +"parameter." +msgstr "" + +#: ../../library/datetime.rst:972 +msgid "Return the current local date and time." +msgstr "" + +#: ../../library/datetime.rst:974 +msgid "" +"If optional argument *tz* is ``None`` or not specified, this is like :meth:" +"`today`, but, if possible, supplies more precision than can be gotten from " +"going through a :func:`time.time` timestamp (for example, this may be " +"possible on platforms supplying the C :c:func:`gettimeofday` function)." +msgstr "" + +#: ../../library/datetime.rst:980 +msgid "" +"If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` " +"subclass, and the current date and time are converted to *tz*’s time zone." +msgstr "" + +#: ../../library/datetime.rst:983 +msgid "This function is preferred over :meth:`today` and :meth:`utcnow`." +msgstr "" + +#: ../../library/datetime.rst:987 +msgid "" +"Subsequent calls to :meth:`!datetime.now` may return the same instant " +"depending on the precision of the underlying clock." +msgstr "" + +#: ../../library/datetime.rst:993 +msgid "Return the current UTC date and time, with :attr:`.tzinfo` ``None``." +msgstr "" + +#: ../../library/datetime.rst:995 +msgid "" +"This is like :meth:`now`, but returns the current UTC date and time, as a " +"naive :class:`.datetime` object. An aware current UTC datetime can be " +"obtained by calling ``datetime.now(timezone.utc)``. See also :meth:`now`." +msgstr "" + +#: ../../library/datetime.rst:1001 +msgid "" +"Because naive ``datetime`` objects are treated by many ``datetime`` methods " +"as local times, it is preferred to use aware datetimes to represent times in " +"UTC. As such, the recommended way to create an object representing the " +"current time in UTC is by calling ``datetime.now(timezone.utc)``." +msgstr "" + +#: ../../library/datetime.rst:1008 +msgid "Use :meth:`datetime.now` with :const:`UTC` instead." +msgstr "" + +#: ../../library/datetime.rst:1013 +msgid "" +"Return the local date and time corresponding to the POSIX timestamp, such as " +"is returned by :func:`time.time`. If optional argument *tz* is ``None`` or " +"not specified, the timestamp is converted to the platform's local date and " +"time, and the returned :class:`.datetime` object is naive." +msgstr "" + +#: ../../library/datetime.rst:1018 +msgid "" +"If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` " +"subclass, and the timestamp is converted to *tz*’s time zone." +msgstr "" + +#: ../../library/datetime.rst:1021 +msgid "" +":meth:`fromtimestamp` may raise :exc:`OverflowError`, if the timestamp is " +"out of the range of values supported by the platform C :c:func:`localtime` " +"or :c:func:`gmtime` functions, and :exc:`OSError` on :c:func:`localtime` or :" +"c:func:`gmtime` failure. It's common for this to be restricted to years in " +"1970 through 2038. Note that on non-POSIX systems that include leap seconds " +"in their notion of a timestamp, leap seconds are ignored by :meth:" +"`fromtimestamp`, and then it's possible to have two timestamps differing by " +"a second that yield identical :class:`.datetime` objects. This method is " +"preferred over :meth:`utcfromtimestamp`." +msgstr "" + +#: ../../library/datetime.rst:1032 +msgid "" +"Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " +"out of the range of values supported by the platform C :c:func:`localtime` " +"or :c:func:`gmtime` functions. Raise :exc:`OSError` instead of :exc:" +"`ValueError` on :c:func:`localtime` or :c:func:`gmtime` failure." +msgstr "" + +#: ../../library/datetime.rst:1039 +msgid ":meth:`fromtimestamp` may return instances with :attr:`.fold` set to 1." +msgstr "" + +#: ../../library/datetime.rst:1048 +msgid "" +"Return the UTC :class:`.datetime` corresponding to the POSIX timestamp, " +"with :attr:`.tzinfo` ``None``. (The resulting object is naive.)" +msgstr "" + +#: ../../library/datetime.rst:1051 +msgid "" +"This may raise :exc:`OverflowError`, if the timestamp is out of the range of " +"values supported by the platform C :c:func:`gmtime` function, and :exc:" +"`OSError` on :c:func:`gmtime` failure. It's common for this to be restricted " +"to years in 1970 through 2038." +msgstr "" + +#: ../../library/datetime.rst:1056 +msgid "To get an aware :class:`.datetime` object, call :meth:`fromtimestamp`::" +msgstr "" + +#: ../../library/datetime.rst:1058 +msgid "datetime.fromtimestamp(timestamp, timezone.utc)" +msgstr "" + +#: ../../library/datetime.rst:1060 +msgid "" +"On the POSIX compliant platforms, it is equivalent to the following " +"expression::" +msgstr "" + +#: ../../library/datetime.rst:1063 +msgid "" +"datetime(1970, 1, 1, tzinfo=timezone.utc) + timedelta(seconds=timestamp)" +msgstr "" + +#: ../../library/datetime.rst:1065 +msgid "" +"except the latter formula always supports the full years range: between :" +"const:`MINYEAR` and :const:`MAXYEAR` inclusive." +msgstr "" + +#: ../../library/datetime.rst:1070 +msgid "" +"Because naive ``datetime`` objects are treated by many ``datetime`` methods " +"as local times, it is preferred to use aware datetimes to represent times in " +"UTC. As such, the recommended way to create an object representing a " +"specific timestamp in UTC is by calling ``datetime.fromtimestamp(timestamp, " +"tz=timezone.utc)``." +msgstr "" + +#: ../../library/datetime.rst:1076 +msgid "" +"Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " +"out of the range of values supported by the platform C :c:func:`gmtime` " +"function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:" +"`gmtime` failure." +msgstr "" + +#: ../../library/datetime.rst:1087 +msgid "Use :meth:`datetime.fromtimestamp` with :const:`UTC` instead." +msgstr "" + +#: ../../library/datetime.rst:1092 +msgid "" +"Return the :class:`.datetime` corresponding to the proleptic Gregorian " +"ordinal, where January 1 of year 1 has ordinal 1. :exc:`ValueError` is " +"raised unless ``1 <= ordinal <= datetime.max.toordinal()``. The hour, " +"minute, second and microsecond of the result are all 0, and :attr:`.tzinfo` " +"is ``None``." +msgstr "" + +#: ../../library/datetime.rst:1100 +msgid "" +"Return a new :class:`.datetime` object whose date components are equal to " +"the given :class:`date` object's, and whose time components are equal to the " +"given :class:`.time` object's. If the *tzinfo* argument is provided, its " +"value is used to set the :attr:`.tzinfo` attribute of the result, otherwise " +"the :attr:`~.time.tzinfo` attribute of the *time* argument is used. If the " +"*date* argument is a :class:`!datetime` object, its time components and :" +"attr:`.tzinfo` attributes are ignored." +msgstr "" + +#: ../../library/datetime.rst:1108 +msgid "" +"For any :class:`.datetime` object ``d``, ``d == datetime.combine(d.date(), d." +"time(), d.tzinfo)``." +msgstr "" + +#: ../../library/datetime.rst:1111 +msgid "Added the *tzinfo* argument." +msgstr "" + +#: ../../library/datetime.rst:1117 +msgid "" +"Return a :class:`.datetime` corresponding to a *date_string* in any valid " +"ISO 8601 format, with the following exceptions:" +msgstr "" + +#: ../../library/datetime.rst:1120 ../../library/datetime.rst:1942 +msgid "Time zone offsets may have fractional seconds." +msgstr "" + +#: ../../library/datetime.rst:1121 +msgid "The ``T`` separator may be replaced by any single unicode character." +msgstr "" + +#: ../../library/datetime.rst:1122 ../../library/datetime.rst:1947 +msgid "Fractional hours and minutes are not supported." +msgstr "" + +#: ../../library/datetime.rst:1131 +msgid "" +">>> import datetime as dt\n" +">>> dt.datetime.fromisoformat('2011-11-04')\n" +"datetime.datetime(2011, 11, 4, 0, 0)\n" +">>> dt.datetime.fromisoformat('20111104')\n" +"datetime.datetime(2011, 11, 4, 0, 0)\n" +">>> dt.datetime.fromisoformat('2011-11-04T00:05:23')\n" +"datetime.datetime(2011, 11, 4, 0, 5, 23)\n" +">>> dt.datetime.fromisoformat('2011-11-04T00:05:23Z')\n" +"datetime.datetime(2011, 11, 4, 0, 5, 23, tzinfo=datetime.timezone.utc)\n" +">>> dt.datetime.fromisoformat('20111104T000523')\n" +"datetime.datetime(2011, 11, 4, 0, 5, 23)\n" +">>> dt.datetime.fromisoformat('2011-W01-2T00:05:23.283')\n" +"datetime.datetime(2011, 1, 4, 0, 5, 23, 283000)\n" +">>> dt.datetime.fromisoformat('2011-11-04 00:05:23.283')\n" +"datetime.datetime(2011, 11, 4, 0, 5, 23, 283000)\n" +">>> dt.datetime.fromisoformat('2011-11-04 00:05:23.283+00:00')\n" +"datetime.datetime(2011, 11, 4, 0, 5, 23, 283000, tzinfo=datetime.timezone." +"utc)\n" +">>> dt.datetime.fromisoformat('2011-11-04T00:05:23+04:00')\n" +"datetime.datetime(2011, 11, 4, 0, 5, 23,\n" +" tzinfo=datetime.timezone(datetime.timedelta(seconds=14400)))" +msgstr "" + +#: ../../library/datetime.rst:1153 +msgid "" +"Previously, this method only supported formats that could be emitted by :" +"meth:`date.isoformat` or :meth:`datetime.isoformat`." +msgstr "" + +#: ../../library/datetime.rst:1160 +msgid "" +"Return a :class:`.datetime` corresponding to the ISO calendar date specified " +"by *year*, *week* and *day*. The non-date components of the datetime are " +"populated with their normal default values. This is the inverse of the " +"function :meth:`datetime.isocalendar`." +msgstr "" + +#: ../../library/datetime.rst:1170 +msgid "" +"Return a :class:`.datetime` corresponding to *date_string*, parsed according " +"to *format*." +msgstr "" + +#: ../../library/datetime.rst:1173 +msgid "" +"If *format* does not contain microseconds or time zone information, this is " +"equivalent to::" +msgstr "" + +#: ../../library/datetime.rst:1175 ../../library/datetime.rst:2776 +msgid "datetime(*(time.strptime(date_string, format)[0:6]))" +msgstr "" + +#: ../../library/datetime.rst:1177 +msgid "" +":exc:`ValueError` is raised if the date_string and format can't be parsed " +"by :func:`time.strptime` or if it returns a value which isn't a time tuple. " +"See also :ref:`strftime-strptime-behavior` and :meth:`datetime." +"fromisoformat`." +msgstr "" + +#: ../../library/datetime.rst:1192 +msgid "" +">>> import datetime as dt\n" +">>> date_string = \"02/29\"\n" +">>> when = dt.datetime.strptime(f\"{date_string};1984\", \"%m/%d;%Y\") # " +"Avoids leap year bug.\n" +">>> when.strftime(\"%B %d\")\n" +"'February 29'" +msgstr "" + +#: ../../library/datetime.rst:1205 +msgid "" +"The earliest representable :class:`.datetime`, ``datetime(MINYEAR, 1, 1, " +"tzinfo=None)``." +msgstr "" + +#: ../../library/datetime.rst:1211 +msgid "" +"The latest representable :class:`.datetime`, ``datetime(MAXYEAR, 12, 31, 23, " +"59, 59, 999999, tzinfo=None)``." +msgstr "" + +#: ../../library/datetime.rst:1217 +msgid "" +"The smallest possible difference between non-equal :class:`.datetime` " +"objects, ``timedelta(microseconds=1)``." +msgstr "" + +#: ../../library/datetime.rst:1240 ../../library/datetime.rst:1874 +msgid "In ``range(24)``." +msgstr "" + +#: ../../library/datetime.rst:1245 ../../library/datetime.rst:1250 +#: ../../library/datetime.rst:1879 ../../library/datetime.rst:1884 +msgid "In ``range(60)``." +msgstr "" + +#: ../../library/datetime.rst:1255 ../../library/datetime.rst:1889 +msgid "In ``range(1000000)``." +msgstr "" + +#: ../../library/datetime.rst:1260 +msgid "" +"The object passed as the *tzinfo* argument to the :class:`.datetime` " +"constructor, or ``None`` if none was passed." +msgstr "" + +#: ../../library/datetime.rst:1266 ../../library/datetime.rst:1900 +msgid "" +"In ``[0, 1]``. Used to disambiguate wall times during a repeated interval. " +"(A repeated interval occurs when clocks are rolled back at the end of " +"daylight saving time or when the UTC offset for the current zone is " +"decreased for political reasons.) The values 0 and 1 represent, " +"respectively, the earlier and later of the two moments with the same wall " +"time representation." +msgstr "" + +#: ../../library/datetime.rst:1280 +msgid "``datetime2 = datetime1 + timedelta``" +msgstr "" + +#: ../../library/datetime.rst:1280 ../../library/datetime.rst:2544 +#: ../../library/datetime.rst:2549 ../../library/datetime.rst:2554 +#: ../../library/datetime.rst:2559 ../../library/datetime.rst:2564 +#: ../../library/datetime.rst:2664 ../../library/datetime.rst:2668 +msgid "\\(1)" +msgstr "" + +#: ../../library/datetime.rst:1282 +msgid "``datetime2 = datetime1 - timedelta``" +msgstr "" + +#: ../../library/datetime.rst:1282 ../../library/datetime.rst:2674 +msgid "\\(2)" +msgstr "" + +#: ../../library/datetime.rst:1284 +msgid "``timedelta = datetime1 - datetime2``" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``datetime1 == datetime2``" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``datetime1 != datetime2``" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``datetime1 < datetime2``" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``datetime1 > datetime2``" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``datetime1 <= datetime2``" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "``datetime1 >= datetime2``" +msgstr "" + +#: ../../library/datetime.rst:1296 +msgid "" +"``datetime2`` is a duration of ``timedelta`` removed from ``datetime1``, " +"moving forward in time if ``timedelta.days > 0``, or backward if ``timedelta." +"days < 0``. The result has the same :attr:`~.datetime.tzinfo` attribute as " +"the input datetime, and ``datetime2 - datetime1 == timedelta`` after. :exc:" +"`OverflowError` is raised if ``datetime2.year`` would be smaller than :const:" +"`MINYEAR` or larger than :const:`MAXYEAR`. Note that no time zone " +"adjustments are done even if the input is an aware object." +msgstr "" + +#: ../../library/datetime.rst:1305 +msgid "" +"Computes the ``datetime2`` such that ``datetime2 + timedelta == datetime1``. " +"As for addition, the result has the same :attr:`~.datetime.tzinfo` attribute " +"as the input datetime, and no time zone adjustments are done even if the " +"input is aware." +msgstr "" + +#: ../../library/datetime.rst:1310 +msgid "" +"Subtraction of a :class:`.datetime` from a :class:`!datetime` is defined " +"only if both operands are naive, or if both are aware. If one is aware and " +"the other is naive, :exc:`TypeError` is raised." +msgstr "" + +#: ../../library/datetime.rst:1314 +msgid "" +"If both are naive, or both are aware and have the same :attr:`~.datetime." +"tzinfo` attribute, the :attr:`~.datetime.tzinfo` attributes are ignored, and " +"the result is a :class:`timedelta` object ``t`` such that ``datetime2 + t == " +"datetime1``. No time zone adjustments are done in this case." +msgstr "" + +#: ../../library/datetime.rst:1319 +msgid "" +"If both are aware and have different :attr:`~.datetime.tzinfo` attributes, " +"``a-b`` acts as if ``a`` and ``b`` were first converted to naive UTC " +"datetimes. The result is ``(a.replace(tzinfo=None) - a.utcoffset()) - (b." +"replace(tzinfo=None) - b.utcoffset())`` except that the implementation never " +"overflows." +msgstr "" + +#: ../../library/datetime.rst:1325 +msgid "" +":class:`.datetime` objects are equal if they represent the same date and " +"time, taking into account the time zone." +msgstr "" + +#: ../../library/datetime.rst:1328 +msgid "Naive and aware :class:`.datetime` objects are never equal." +msgstr "" + +#: ../../library/datetime.rst:1330 +msgid "" +"If both comparands are aware, and have the same :attr:`!tzinfo` attribute, " +"the :attr:`!tzinfo` and :attr:`~.datetime.fold` attributes are ignored and " +"the base datetimes are compared. If both comparands are aware and have " +"different :attr:`~.datetime.tzinfo` attributes, the comparison acts as " +"comparands were first converted to UTC datetimes except that the " +"implementation never overflows. :class:`.datetime` instances in a repeated " +"interval are never equal to :class:`!datetime` instances in other time zone." +msgstr "" + +#: ../../library/datetime.rst:1340 +msgid "" +"*datetime1* is considered less than *datetime2* when *datetime1* precedes " +"*datetime2* in time, taking into account the time zone." +msgstr "" + +#: ../../library/datetime.rst:1343 +msgid "" +"Order comparison between naive and aware :class:`.datetime` objects raises :" +"exc:`TypeError`." +msgstr "" + +#: ../../library/datetime.rst:1346 +msgid "" +"If both comparands are aware, and have the same :attr:`!tzinfo` attribute, " +"the :attr:`!tzinfo` and :attr:`~.datetime.fold` attributes are ignored and " +"the base datetimes are compared. If both comparands are aware and have " +"different :attr:`~.datetime.tzinfo` attributes, the comparison acts as " +"comparands were first converted to UTC datetimes except that the " +"implementation never overflows." +msgstr "" + +#: ../../library/datetime.rst:1353 +msgid "" +"Equality comparisons between aware and naive :class:`.datetime` instances " +"don't raise :exc:`TypeError`." +msgstr "" + +#: ../../library/datetime.rst:1370 +msgid "Return :class:`date` object with same year, month and day." +msgstr "" + +#: ../../library/datetime.rst:1375 +msgid "" +"Return :class:`.time` object with same hour, minute, second, microsecond and " +"fold. :attr:`.tzinfo` is ``None``. See also method :meth:`timetz`." +msgstr "" + +#: ../../library/datetime.rst:1378 ../../library/datetime.rst:1387 +msgid "The fold value is copied to the returned :class:`.time` object." +msgstr "" + +#: ../../library/datetime.rst:1384 +msgid "" +"Return :class:`.time` object with same hour, minute, second, microsecond, " +"fold, and tzinfo attributes. See also method :meth:`time`." +msgstr "" + +#: ../../library/datetime.rst:1395 +msgid "" +"Return a new :class:`datetime` object with the same attributes, but with " +"specified parameters updated. Note that ``tzinfo=None`` can be specified to " +"create a naive datetime from an aware datetime with no conversion of date " +"and time data." +msgstr "" + +#: ../../library/datetime.rst:1400 +msgid "" +":class:`.datetime` objects are also supported by generic function :func:" +"`copy.replace`." +msgstr "" + +#: ../../library/datetime.rst:1409 +msgid "" +"Return a :class:`.datetime` object with new :attr:`.tzinfo` attribute *tz*, " +"adjusting the date and time data so the result is the same UTC time as " +"*self*, but in *tz*'s local time." +msgstr "" + +#: ../../library/datetime.rst:1413 +msgid "" +"If provided, *tz* must be an instance of a :class:`tzinfo` subclass, and " +"its :meth:`utcoffset` and :meth:`dst` methods must not return ``None``. If " +"*self* is naive, it is presumed to represent time in the system time zone." +msgstr "" + +#: ../../library/datetime.rst:1417 +msgid "" +"If called without arguments (or with ``tz=None``) the system local time zone " +"is assumed for the target time zone. The ``.tzinfo`` attribute of the " +"converted datetime instance will be set to an instance of :class:`timezone` " +"with the zone name and offset obtained from the OS." +msgstr "" + +#: ../../library/datetime.rst:1422 +msgid "" +"If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no " +"adjustment of date or time data is performed. Else the result is local time " +"in the time zone *tz*, representing the same UTC time as *self*: after " +"``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` will have the same " +"date and time data as ``dt - dt.utcoffset()``." +msgstr "" + +#: ../../library/datetime.rst:1428 +msgid "" +"If you merely want to attach a :class:`timezone` object *tz* to a datetime " +"*dt* without adjustment of date and time data, use ``dt." +"replace(tzinfo=tz)``. If you merely want to remove the :class:`!timezone` " +"object from an aware datetime *dt* without conversion of date and time data, " +"use ``dt.replace(tzinfo=None)``." +msgstr "" + +#: ../../library/datetime.rst:1433 +msgid "" +"Note that the default :meth:`tzinfo.fromutc` method can be overridden in a :" +"class:`tzinfo` subclass to affect the result returned by :meth:`astimezone`. " +"Ignoring error cases, :meth:`astimezone` acts like::" +msgstr "" + +#: ../../library/datetime.rst:1437 +msgid "" +"def astimezone(self, tz):\n" +" if self.tzinfo is tz:\n" +" return self\n" +" # Convert self to UTC, and attach the new timezone object.\n" +" utc = (self - self.utcoffset()).replace(tzinfo=tz)\n" +" # Convert from UTC to tz's local time.\n" +" return tz.fromutc(utc)" +msgstr "" + +#: ../../library/datetime.rst:1445 +msgid "*tz* now can be omitted." +msgstr "" + +#: ../../library/datetime.rst:1448 +msgid "" +"The :meth:`astimezone` method can now be called on naive instances that are " +"presumed to represent system local time." +msgstr "" + +#: ../../library/datetime.rst:1455 +msgid "" +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." +"utcoffset(self)``, and raises an exception if the latter doesn't return " +"``None`` or a :class:`timedelta` object with magnitude less than one day." +msgstr "" + +#: ../../library/datetime.rst:1459 ../../library/datetime.rst:2081 +#: ../../library/datetime.rst:2190 ../../library/datetime.rst:2443 +#: ../../library/datetime.rst:2455 ../../library/datetime.rst:2852 +msgid "The UTC offset is not restricted to a whole number of minutes." +msgstr "" + +#: ../../library/datetime.rst:1465 +msgid "" +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." +"dst(self)``, and raises an exception if the latter doesn't return ``None`` " +"or a :class:`timedelta` object with magnitude less than one day." +msgstr "" + +#: ../../library/datetime.rst:1469 ../../library/datetime.rst:2091 +#: ../../library/datetime.rst:2248 +msgid "The DST offset is not restricted to a whole number of minutes." +msgstr "" + +#: ../../library/datetime.rst:1475 +msgid "" +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." +"tzname(self)``, raises an exception if the latter doesn't return ``None`` or " +"a string object," +msgstr "" + +#: ../../library/datetime.rst:1486 +msgid "" +"time.struct_time((d.year, d.month, d.day,\n" +" d.hour, d.minute, d.second,\n" +" d.weekday(), yday, dst))" +msgstr "" + +#: ../../library/datetime.rst:1490 +msgid "" +"where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " +"day number within the current year starting with 1 for January 1st. The :" +"attr:`~time.struct_time.tm_isdst` flag of the result is set according to " +"the :meth:`dst` method: :attr:`.tzinfo` is ``None`` or :meth:`dst` returns " +"``None``, :attr:`!tm_isdst` is set to ``-1``; else if :meth:`dst` returns a " +"non-zero value, :attr:`!tm_isdst` is set to 1; else :attr:`!tm_isdst` is set " +"to 0." +msgstr "" + +#: ../../library/datetime.rst:1501 +msgid "" +"If :class:`.datetime` instance ``d`` is naive, this is the same as ``d." +"timetuple()`` except that :attr:`~.time.struct_time.tm_isdst` is forced to 0 " +"regardless of what ``d.dst()`` returns. DST is never in effect for a UTC " +"time." +msgstr "" + +#: ../../library/datetime.rst:1505 +msgid "" +"If ``d`` is aware, ``d`` is normalized to UTC time, by subtracting ``d." +"utcoffset()``, and a :class:`time.struct_time` for the normalized time is " +"returned. :attr:`!tm_isdst` is forced to 0. Note that an :exc:" +"`OverflowError` may be raised if ``d.year`` was ``MINYEAR`` or ``MAXYEAR`` " +"and UTC adjustment spills over a year boundary." +msgstr "" + +#: ../../library/datetime.rst:1514 +msgid "" +"Because naive ``datetime`` objects are treated by many ``datetime`` methods " +"as local times, it is preferred to use aware datetimes to represent times in " +"UTC; as a result, using :meth:`datetime.utctimetuple` may give misleading " +"results. If you have a naive ``datetime`` representing UTC, use ``datetime." +"replace(tzinfo=timezone.utc)`` to make it aware, at which point you can use :" +"meth:`.datetime.timetuple`." +msgstr "" + +#: ../../library/datetime.rst:1524 +msgid "" +"Return the proleptic Gregorian ordinal of the date. The same as ``self." +"date().toordinal()``." +msgstr "" + +#: ../../library/datetime.rst:1530 +msgid "" +"Return POSIX timestamp corresponding to the :class:`.datetime` instance. The " +"return value is a :class:`float` similar to that returned by :func:`time." +"time`." +msgstr "" + +#: ../../library/datetime.rst:1534 +msgid "" +"Naive :class:`.datetime` instances are assumed to represent local time and " +"this method relies on platform C functions to perform the conversion. Since :" +"class:`!datetime` supports a wider range of values than the platform C " +"functions on many platforms, this method may raise :exc:`OverflowError` or :" +"exc:`OSError` for times far in the past or far in the future." +msgstr "" + +#: ../../library/datetime.rst:1541 +msgid "" +"For aware :class:`.datetime` instances, the return value is computed as::" +msgstr "" + +#: ../../library/datetime.rst:1544 +msgid "(dt - datetime(1970, 1, 1, tzinfo=timezone.utc)).total_seconds()" +msgstr "" + +#: ../../library/datetime.rst:1548 +msgid "" +"There is no method to obtain the POSIX timestamp directly from a naive :" +"class:`.datetime` instance representing UTC time. If your application uses " +"this convention and your system time zone is not set to UTC, you can obtain " +"the POSIX timestamp by supplying ``tzinfo=timezone.utc``::" +msgstr "" + +#: ../../library/datetime.rst:1554 +msgid "timestamp = dt.replace(tzinfo=timezone.utc).timestamp()" +msgstr "" + +#: ../../library/datetime.rst:1556 +msgid "or by calculating the timestamp directly::" +msgstr "" + +#: ../../library/datetime.rst:1558 +msgid "timestamp = (dt - datetime(1970, 1, 1)) / timedelta(seconds=1)" +msgstr "" + +#: ../../library/datetime.rst:1562 +msgid "" +"The :meth:`timestamp` method uses the :attr:`.fold` attribute to " +"disambiguate the times during a repeated interval." +msgstr "" + +#: ../../library/datetime.rst:1566 +msgid "" +"This method no longer relies on the platform C :c:func:`mktime` function to " +"perform conversions." +msgstr "" + +#: ../../library/datetime.rst:1573 +msgid "" +"Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " +"The same as ``self.date().weekday()``. See also :meth:`isoweekday`." +msgstr "" + +#: ../../library/datetime.rst:1579 +msgid "" +"Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " +"The same as ``self.date().isoweekday()``. See also :meth:`weekday`, :meth:" +"`isocalendar`." +msgstr "" + +#: ../../library/datetime.rst:1586 +msgid "" +"Return a :term:`named tuple` with three components: ``year``, ``week`` and " +"``weekday``. The same as ``self.date().isocalendar()``." +msgstr "" + +#: ../../library/datetime.rst:1592 +msgid "Return a string representing the date and time in ISO 8601 format:" +msgstr "" + +#: ../../library/datetime.rst:1594 +msgid "``YYYY-MM-DDTHH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" +msgstr "" + +#: ../../library/datetime.rst:1595 +msgid "``YYYY-MM-DDTHH:MM:SS``, if :attr:`microsecond` is 0" +msgstr "" + +#: ../../library/datetime.rst:1597 +msgid "" +"If :meth:`utcoffset` does not return ``None``, a string is appended, giving " +"the UTC offset:" +msgstr "" + +#: ../../library/datetime.rst:1600 +msgid "" +"``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` " +"is not 0" +msgstr "" + +#: ../../library/datetime.rst:1602 +msgid "" +"``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0" +msgstr "" + +#: ../../library/datetime.rst:1606 +msgid "" +">>> import datetime as dt\n" +">>> dt.datetime(2019, 5, 18, 15, 17, 8, 132263).isoformat()\n" +"'2019-05-18T15:17:08.132263'\n" +">>> dt.datetime(2019, 5, 18, 15, 17, tzinfo=dt.timezone.utc).isoformat()\n" +"'2019-05-18T15:17:00+00:00'" +msgstr "" + +#: ../../library/datetime.rst:1612 +msgid "" +"The optional argument *sep* (default ``'T'``) is a one-character separator, " +"placed between the date and time portions of the result. For example::" +msgstr "" + +#: ../../library/datetime.rst:1615 +msgid "" +">>> import datetime as dt\n" +">>> class TZ(dt.tzinfo):\n" +"... \"\"\"A time zone with an arbitrary, constant -06:39 offset.\"\"\"\n" +"... def utcoffset(self, when):\n" +"... return dt.timedelta(hours=-6, minutes=-39)\n" +"...\n" +">>> dt.datetime(2002, 12, 25, tzinfo=TZ()).isoformat(' ')\n" +"'2002-12-25 00:00:00-06:39'\n" +">>> dt.datetime(2009, 11, 27, microsecond=100, tzinfo=TZ()).isoformat()\n" +"'2009-11-27T00:00:00.000100-06:39'" +msgstr "" + +#: ../../library/datetime.rst:1626 ../../library/datetime.rst:2021 +msgid "" +"The optional argument *timespec* specifies the number of additional " +"components of the time to include (the default is ``'auto'``). It can be one " +"of the following:" +msgstr "" + +#: ../../library/datetime.rst:1630 ../../library/datetime.rst:2025 +msgid "" +"``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as " +"``'microseconds'`` otherwise." +msgstr "" + +#: ../../library/datetime.rst:1632 ../../library/datetime.rst:2027 +msgid "``'hours'``: Include the :attr:`hour` in the two-digit ``HH`` format." +msgstr "" + +#: ../../library/datetime.rst:1633 ../../library/datetime.rst:2028 +msgid "" +"``'minutes'``: Include :attr:`hour` and :attr:`minute` in ``HH:MM`` format." +msgstr "" + +#: ../../library/datetime.rst:1634 ../../library/datetime.rst:2029 +msgid "" +"``'seconds'``: Include :attr:`hour`, :attr:`minute`, and :attr:`second` in " +"``HH:MM:SS`` format." +msgstr "" + +#: ../../library/datetime.rst:1636 ../../library/datetime.rst:2031 +msgid "" +"``'milliseconds'``: Include full time, but truncate fractional second part " +"to milliseconds. ``HH:MM:SS.sss`` format." +msgstr "" + +#: ../../library/datetime.rst:1638 ../../library/datetime.rst:2033 +msgid "``'microseconds'``: Include full time in ``HH:MM:SS.ffffff`` format." +msgstr "" + +#: ../../library/datetime.rst:1642 ../../library/datetime.rst:2037 +msgid "Excluded time components are truncated, not rounded." +msgstr "" + +#: ../../library/datetime.rst:1644 +msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument::" +msgstr "" + +#: ../../library/datetime.rst:1647 +msgid "" +">>> import datetime as dt\n" +">>> dt.datetime.now().isoformat(timespec='minutes')\n" +"'2002-12-25T00:00'\n" +">>> my_datetime = dt.datetime(2015, 1, 1, 12, 30, 59, 0)\n" +">>> my_datetime.isoformat(timespec='microseconds')\n" +"'2015-01-01T12:30:59.000000'" +msgstr "" + +#: ../../library/datetime.rst:1654 ../../library/datetime.rst:2052 +msgid "Added the *timespec* parameter." +msgstr "" + +#: ../../library/datetime.rst:1660 +msgid "" +"For a :class:`.datetime` instance ``d``, ``str(d)`` is equivalent to ``d." +"isoformat(' ')``." +msgstr "" + +#: ../../library/datetime.rst:1666 +msgid "Return a string representing the date and time::" +msgstr "" + +#: ../../library/datetime.rst:1668 +msgid "" +">>> import datetime as dt\n" +">>> dt.datetime(2002, 12, 4, 20, 30, 40).ctime()\n" +"'Wed Dec 4 20:30:40 2002'" +msgstr "" + +#: ../../library/datetime.rst:1672 +msgid "" +"The output string will *not* include time zone information, regardless of " +"whether the input is aware or naive." +msgstr "" + +#: ../../library/datetime.rst:1679 +msgid "" +"on platforms where the native C :c:func:`ctime` function (which :func:`time." +"ctime` invokes, but which :meth:`datetime.ctime` does not invoke) conforms " +"to the C standard." +msgstr "" + +#: ../../library/datetime.rst:1686 +msgid "" +"Return a string representing the date and time, controlled by an explicit " +"format string. See also :ref:`strftime-strptime-behavior` and :meth:" +"`datetime.isoformat`." +msgstr "" + +#: ../../library/datetime.rst:1693 +msgid "" +"Same as :meth:`.datetime.strftime`. This makes it possible to specify a " +"format string for a :class:`.datetime` object in :ref:`formatted string " +"literals ` and when using :meth:`str.format`. See also :ref:" +"`strftime-strptime-behavior` and :meth:`datetime.isoformat`." +msgstr "" + +#: ../../library/datetime.rst:1700 +msgid "Examples of usage: :class:`!datetime`" +msgstr "" + +#: ../../library/datetime.rst:1702 +msgid "Examples of working with :class:`.datetime` objects:" +msgstr "" + +#: ../../library/datetime.rst:1704 +msgid "" +">>> import datetime as dt\n" +"\n" +">>> # Using datetime.combine()\n" +">>> d = dt.date(2005, 7, 14)\n" +">>> t = dt.time(12, 30)\n" +">>> dt.datetime.combine(d, t)\n" +"datetime.datetime(2005, 7, 14, 12, 30)\n" +"\n" +">>> # Using datetime.now()\n" +">>> dt.datetime.now()\n" +"datetime.datetime(2007, 12, 6, 16, 29, 43, 79043) # GMT +1\n" +">>> dt.datetime.now(dt.timezone.utc)\n" +"datetime.datetime(2007, 12, 6, 15, 29, 43, 79060, tzinfo=datetime.timezone." +"utc)\n" +"\n" +">>> # Using datetime.strptime()\n" +">>> my_datetime = dt.datetime.strptime(\"21/11/06 16:30\", \"%d/%m/%y %H:" +"%M\")\n" +">>> my_datetime\n" +"datetime.datetime(2006, 11, 21, 16, 30)\n" +"\n" +">>> # Using datetime.timetuple() to get tuple of all attributes\n" +">>> tt = my_datetime.timetuple()\n" +">>> for it in tt:\n" +"... print(it)\n" +"...\n" +"2006 # year\n" +"11 # month\n" +"21 # day\n" +"16 # hour\n" +"30 # minute\n" +"0 # second\n" +"1 # weekday (0 = Monday)\n" +"325 # number of days since 1st January\n" +"-1 # dst - method tzinfo.dst() returned None\n" +"\n" +">>> # Date in ISO format\n" +">>> ic = my_datetime.isocalendar()\n" +">>> for it in ic:\n" +"... print(it)\n" +"...\n" +"2006 # ISO year\n" +"47 # ISO week\n" +"2 # ISO weekday\n" +"\n" +">>> # Formatting a datetime\n" +">>> my_datetime.strftime(\"%A, %d. %B %Y %I:%M%p\")\n" +"'Tuesday, 21. November 2006 04:30PM'\n" +">>> 'The {1} is {0:%d}, the {2} is {0:%B}, the {3} is {0:%I:%M%p}.'." +"format(my_datetime, \"day\", \"month\", \"time\")\n" +"'The day is 21, the month is November, the time is 04:30PM.'" +msgstr "" + +#: ../../library/datetime.rst:1755 +msgid "" +"The example below defines a :class:`tzinfo` subclass capturing time zone " +"information for Kabul, Afghanistan, which used +4 UTC until 1945 and then " +"+4:30 UTC thereafter::" +msgstr "" + +#: ../../library/datetime.rst:1759 +msgid "" +"import datetime as dt\n" +"\n" +"class KabulTz(dt.tzinfo):\n" +" # Kabul used +4 until 1945, when they moved to +4:30\n" +" UTC_MOVE_DATE = dt.datetime(1944, 12, 31, 20, tzinfo=dt.timezone.utc)\n" +"\n" +" def utcoffset(self, when):\n" +" if when.year < 1945:\n" +" return dt.timedelta(hours=4)\n" +" elif (1945, 1, 1, 0, 0) <= when.timetuple()[:5] < (1945, 1, 1, 0, " +"30):\n" +" # An ambiguous (\"imaginary\") half-hour range representing\n" +" # a 'fold' in time due to the shift from +4 to +4:30.\n" +" # If when falls in the imaginary range, use fold to decide how\n" +" # to resolve. See PEP 495.\n" +" return dt.timedelta(hours=4, minutes=(30 if when.fold else 0))\n" +" else:\n" +" return dt.timedelta(hours=4, minutes=30)\n" +"\n" +" def fromutc(self, when):\n" +" # Follow same validations as in datetime.tzinfo\n" +" if not isinstance(when, dt.datetime):\n" +" raise TypeError(\"fromutc() requires a datetime argument\")\n" +" if when.tzinfo is not self:\n" +" raise ValueError(\"when.tzinfo is not self\")\n" +"\n" +" # A custom implementation is required for fromutc as\n" +" # the input to this function is a datetime with utc values\n" +" # but with a tzinfo set to self.\n" +" # See datetime.astimezone or fromtimestamp.\n" +" if when.replace(tzinfo=dt.timezone.utc) >= self.UTC_MOVE_DATE:\n" +" return when + dt.timedelta(hours=4, minutes=30)\n" +" else:\n" +" return when + dt.timedelta(hours=4)\n" +"\n" +" def dst(self, when):\n" +" # Kabul does not observe daylight saving time.\n" +" return dt.timedelta(0)\n" +"\n" +" def tzname(self, when):\n" +" if when >= self.UTC_MOVE_DATE:\n" +" return \"+04:30\"\n" +" return \"+04\"" +msgstr "" + +#: ../../library/datetime.rst:1802 +msgid "Usage of ``KabulTz`` from above::" +msgstr "" + +#: ../../library/datetime.rst:1804 +msgid "" +">>> tz1 = KabulTz()\n" +"\n" +">>> # Datetime before the change\n" +">>> dt1 = dt.datetime(1900, 11, 21, 16, 30, tzinfo=tz1)\n" +">>> print(dt1.utcoffset())\n" +"4:00:00\n" +"\n" +">>> # Datetime after the change\n" +">>> dt2 = dt.datetime(2006, 6, 14, 13, 0, tzinfo=tz1)\n" +">>> print(dt2.utcoffset())\n" +"4:30:00\n" +"\n" +">>> # Convert datetime to another time zone\n" +">>> dt3 = dt2.astimezone(dt.timezone.utc)\n" +">>> dt3\n" +"datetime.datetime(2006, 6, 14, 8, 30, tzinfo=datetime.timezone.utc)\n" +">>> dt2\n" +"datetime.datetime(2006, 6, 14, 13, 0, tzinfo=KabulTz())\n" +">>> dt2 == dt3\n" +"True" +msgstr "" + +#: ../../library/datetime.rst:1829 +msgid ":class:`!time` objects" +msgstr "" + +#: ../../library/datetime.rst:1831 +msgid "" +"A :class:`.time` object represents a (local) time of day, independent of any " +"particular day, and subject to adjustment via a :class:`tzinfo` object." +msgstr "" + +#: ../../library/datetime.rst:1836 +msgid "" +"All arguments are optional. *tzinfo* may be ``None``, or an instance of a :" +"class:`tzinfo` subclass. The remaining arguments must be integers in the " +"following ranges:" +msgstr "" + +#: ../../library/datetime.rst:1846 +msgid "" +"If an argument outside those ranges is given, :exc:`ValueError` is raised. " +"All default to 0 except *tzinfo*, which defaults to ``None``." +msgstr "" + +#: ../../library/datetime.rst:1855 +msgid "The earliest representable :class:`.time`, ``time(0, 0, 0, 0)``." +msgstr "" + +#: ../../library/datetime.rst:1860 +msgid "The latest representable :class:`.time`, ``time(23, 59, 59, 999999)``." +msgstr "" + +#: ../../library/datetime.rst:1865 +msgid "" +"The smallest possible difference between non-equal :class:`.time` objects, " +"``timedelta(microseconds=1)``, although note that arithmetic on :class:`." +"time` objects is not supported." +msgstr "" + +#: ../../library/datetime.rst:1894 +msgid "" +"The object passed as the tzinfo argument to the :class:`.time` constructor, " +"or ``None`` if none was passed." +msgstr "" + +#: ../../library/datetime.rst:1909 +msgid "" +":class:`.time` objects support equality and order comparisons, where ``a`` " +"is considered less than ``b`` when ``a`` precedes ``b`` in time." +msgstr "" + +#: ../../library/datetime.rst:1912 +msgid "" +"Naive and aware :class:`!time` objects are never equal. Order comparison " +"between naive and aware :class:`!time` objects raises :exc:`TypeError`." +msgstr "" + +#: ../../library/datetime.rst:1916 +msgid "" +"If both comparands are aware, and have the same :attr:`~.time.tzinfo` " +"attribute, the :attr:`!tzinfo` and :attr:`!fold` attributes are ignored and " +"the base times are compared. If both comparands are aware and have " +"different :attr:`!tzinfo` attributes, the comparands are first adjusted by " +"subtracting their UTC offsets (obtained from ``self.utcoffset()``)." +msgstr "" + +#: ../../library/datetime.rst:1922 +msgid "" +"Equality comparisons between aware and naive :class:`.time` instances don't " +"raise :exc:`TypeError`." +msgstr "" + +#: ../../library/datetime.rst:1926 +msgid "" +"In Boolean contexts, a :class:`.time` object is always considered to be true." +msgstr "" + +#: ../../library/datetime.rst:1928 +msgid "" +"Before Python 3.5, a :class:`.time` object was considered to be false if it " +"represented midnight in UTC. This behavior was considered obscure and error-" +"prone and has been removed in Python 3.5. See :issue:`13936` for more " +"information." +msgstr "" + +#: ../../library/datetime.rst:1935 +msgid "Other constructors:" +msgstr "" + +#: ../../library/datetime.rst:1939 +msgid "" +"Return a :class:`.time` corresponding to a *time_string* in any valid ISO " +"8601 format, with the following exceptions:" +msgstr "" + +#: ../../library/datetime.rst:1943 +msgid "" +"The leading ``T``, normally required in cases where there may be ambiguity " +"between a date and a time, is not required." +msgstr "" + +#: ../../library/datetime.rst:1945 +msgid "" +"Fractional seconds may have any number of digits (anything beyond 6 will be " +"truncated)." +msgstr "" + +#: ../../library/datetime.rst:1949 +msgid "Examples:" +msgstr "Beispiele:" + +#: ../../library/datetime.rst:1951 +msgid "" +">>> import datetime as dt\n" +">>> dt.time.fromisoformat('04:23:01')\n" +"datetime.time(4, 23, 1)\n" +">>> dt.time.fromisoformat('T04:23:01')\n" +"datetime.time(4, 23, 1)\n" +">>> dt.time.fromisoformat('T042301')\n" +"datetime.time(4, 23, 1)\n" +">>> dt.time.fromisoformat('04:23:01.000384')\n" +"datetime.time(4, 23, 1, 384)\n" +">>> dt.time.fromisoformat('04:23:01,000384')\n" +"datetime.time(4, 23, 1, 384)\n" +">>> dt.time.fromisoformat('04:23:01+04:00')\n" +"datetime.time(4, 23, 1, tzinfo=datetime.timezone(datetime." +"timedelta(seconds=14400)))\n" +">>> dt.time.fromisoformat('04:23:01Z')\n" +"datetime.time(4, 23, 1, tzinfo=datetime.timezone.utc)\n" +">>> dt.time.fromisoformat('04:23:01+00:00')\n" +"datetime.time(4, 23, 1, tzinfo=datetime.timezone.utc)" +msgstr "" + +#: ../../library/datetime.rst:1973 +msgid "" +"Previously, this method only supported formats that could be emitted by :" +"meth:`time.isoformat`." +msgstr "" + +#: ../../library/datetime.rst:1980 +msgid "" +"Return a :class:`.time` corresponding to *date_string*, parsed according to " +"*format*." +msgstr "" + +#: ../../library/datetime.rst:1983 +msgid "" +"If *format* does not contain microseconds or timezone information, this is " +"equivalent to::" +msgstr "" + +#: ../../library/datetime.rst:1985 +msgid "time(*(time.strptime(date_string, format)[3:6]))" +msgstr "" + +#: ../../library/datetime.rst:1987 +msgid "" +":exc:`ValueError` is raised if the *date_string* and *format* cannot be " +"parsed by :func:`time.strptime` or if it returns a value which is not a time " +"tuple. See also :ref:`strftime-strptime-behavior` and :meth:`time." +"fromisoformat`." +msgstr "" + +#: ../../library/datetime.rst:2000 +msgid "" +"Return a new :class:`.time` with the same values, but with specified " +"parameters updated. Note that ``tzinfo=None`` can be specified to create a " +"naive :class:`!time` from an aware :class:`!time`, without conversion of the " +"time data." +msgstr "" + +#: ../../library/datetime.rst:2005 +msgid "" +":class:`.time` objects are also supported by generic function :func:`copy." +"replace`." +msgstr "" + +#: ../../library/datetime.rst:2014 +msgid "Return a string representing the time in ISO 8601 format, one of:" +msgstr "" + +#: ../../library/datetime.rst:2016 +msgid "``HH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" +msgstr "" + +#: ../../library/datetime.rst:2017 +msgid "``HH:MM:SS``, if :attr:`microsecond` is 0" +msgstr "" + +#: ../../library/datetime.rst:2018 +msgid "" +"``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :meth:`utcoffset` does not " +"return ``None``" +msgstr "" + +#: ../../library/datetime.rst:2019 +msgid "" +"``HH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0 and :meth:" +"`utcoffset` does not return ``None``" +msgstr "" + +#: ../../library/datetime.rst:2039 +msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument." +msgstr "" + +#: ../../library/datetime.rst:2043 +msgid "" +">>> import datetime as dt\n" +">>> dt.time(hour=12, minute=34, second=56, microsecond=123456)." +"isoformat(timespec='minutes')\n" +"'12:34'\n" +">>> my_time = dt.time(hour=12, minute=34, second=56, microsecond=0)\n" +">>> my_time.isoformat(timespec='microseconds')\n" +"'12:34:56.000000'\n" +">>> my_time.isoformat(timespec='auto')\n" +"'12:34:56'" +msgstr "" + +#: ../../library/datetime.rst:2058 +msgid "For a time ``t``, ``str(t)`` is equivalent to ``t.isoformat()``." +msgstr "" + +#: ../../library/datetime.rst:2063 +msgid "" +"Return a string representing the time, controlled by an explicit format " +"string. See also :ref:`strftime-strptime-behavior` and :meth:`time." +"isoformat`." +msgstr "" + +#: ../../library/datetime.rst:2069 +msgid "" +"Same as :meth:`.time.strftime`. This makes it possible to specify a format " +"string for a :class:`.time` object in :ref:`formatted string literals ` and when using :meth:`str.format`. See also :ref:`strftime-" +"strptime-behavior` and :meth:`time.isoformat`." +msgstr "" + +#: ../../library/datetime.rst:2077 +msgid "" +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." +"utcoffset(None)``, and raises an exception if the latter doesn't return " +"``None`` or a :class:`timedelta` object with magnitude less than one day." +msgstr "" + +#: ../../library/datetime.rst:2087 +msgid "" +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." +"dst(None)``, and raises an exception if the latter doesn't return ``None``, " +"or a :class:`timedelta` object with magnitude less than one day." +msgstr "" + +#: ../../library/datetime.rst:2097 +msgid "" +"If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." +"tzname(None)``, or raises an exception if the latter doesn't return ``None`` " +"or a string object." +msgstr "" + +#: ../../library/datetime.rst:2103 +msgid "Examples of usage: :class:`!time`" +msgstr "" + +#: ../../library/datetime.rst:2105 +msgid "Examples of working with a :class:`.time` object::" +msgstr "" + +#: ../../library/datetime.rst:2107 +msgid "" +">>> import datetime as dt\n" +">>> class TZ1(dt.tzinfo):\n" +"... def utcoffset(self, when):\n" +"... return dt.timedelta(hours=1)\n" +"... def dst(self, when):\n" +"... return dt.timedelta(0)\n" +"... def tzname(self, when):\n" +"... return \"+01:00\"\n" +"... def __repr__(self):\n" +"... return f\"{self.__class__.__name__}()\"\n" +"...\n" +">>> t = dt.time(12, 10, 30, tzinfo=TZ1())\n" +">>> t\n" +"datetime.time(12, 10, 30, tzinfo=TZ1())\n" +">>> t.isoformat()\n" +"'12:10:30+01:00'\n" +">>> t.dst()\n" +"datetime.timedelta(0)\n" +">>> t.tzname()\n" +"'+01:00'\n" +">>> t.strftime(\"%H:%M:%S %Z\")\n" +"'12:10:30 +01:00'\n" +">>> 'The {} is {:%H:%M}.'.format(\"time\", t)\n" +"'The time is 12:10.'" +msgstr "" + +#: ../../library/datetime.rst:2136 +msgid ":class:`!tzinfo` objects" +msgstr "" + +#: ../../library/datetime.rst:2140 +msgid "" +"This is an :term:`abstract base class`, meaning that this class should not " +"be instantiated directly. Define a subclass of :class:`tzinfo` to capture " +"information about a particular time zone." +msgstr "" + +#: ../../library/datetime.rst:2144 +msgid "" +"An instance of (a concrete subclass of) :class:`tzinfo` can be passed to the " +"constructors for :class:`.datetime` and :class:`.time` objects. The latter " +"objects view their attributes as being in local time, and the :class:`!" +"tzinfo` object supports methods revealing offset of local time from UTC, the " +"name of the time zone, and DST offset, all relative to a date or time object " +"passed to them." +msgstr "" + +#: ../../library/datetime.rst:2150 +msgid "" +"You need to derive a concrete subclass, and (at least) supply " +"implementations of the standard :class:`tzinfo` methods needed by the :class:" +"`.datetime` methods you use. The :mod:`!datetime` module provides :class:" +"`timezone`, a simple concrete subclass of :class:`!tzinfo` which can " +"represent time zones with fixed offset from UTC such as UTC itself or North " +"American EST and EDT." +msgstr "" + +#: ../../library/datetime.rst:2157 +msgid "" +"Special requirement for pickling: A :class:`tzinfo` subclass must have an :" +"meth:`~object.__init__` method that can be called with no arguments, " +"otherwise it can be pickled but possibly not unpickled again. This is a " +"technical requirement that may be relaxed in the future." +msgstr "" + +#: ../../library/datetime.rst:2163 +msgid "" +"A concrete subclass of :class:`tzinfo` may need to implement the following " +"methods. Exactly which methods are needed depends on the uses made of aware :" +"mod:`!datetime` objects. If in doubt, simply implement all of them." +msgstr "" + +#: ../../library/datetime.rst:2170 +msgid "" +"Return offset of local time from UTC, as a :class:`timedelta` object that is " +"positive east of UTC. If local time is west of UTC, this should be negative." +msgstr "" + +#: ../../library/datetime.rst:2173 +msgid "" +"This represents the *total* offset from UTC; for example, if a :class:" +"`tzinfo` object represents both time zone and DST adjustments, :meth:" +"`utcoffset` should return their sum. If the UTC offset isn't known, return " +"``None``. Else the value returned must be a :class:`timedelta` object " +"strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)`` (the " +"magnitude of the offset must be less than one day). Most implementations of :" +"meth:`utcoffset` will probably look like one of these two::" +msgstr "" + +#: ../../library/datetime.rst:2181 +msgid "" +"return CONSTANT # fixed-offset class\n" +"return CONSTANT + self.dst(dt) # daylight-aware class" +msgstr "" + +#: ../../library/datetime.rst:2184 +msgid "" +"If :meth:`utcoffset` does not return ``None``, :meth:`dst` should not return " +"``None`` either." +msgstr "" + +#: ../../library/datetime.rst:2187 +msgid "" +"The default implementation of :meth:`utcoffset` raises :exc:" +"`NotImplementedError`." +msgstr "" + +#: ../../library/datetime.rst:2196 +msgid "" +"Return the daylight saving time (DST) adjustment, as a :class:`timedelta` " +"object or ``None`` if DST information isn't known." +msgstr "" + +#: ../../library/datetime.rst:2200 +msgid "" +"Return ``timedelta(0)`` if DST is not in effect. If DST is in effect, return " +"the offset as a :class:`timedelta` object (see :meth:`utcoffset` for " +"details). Note that DST offset, if applicable, has already been added to the " +"UTC offset returned by :meth:`utcoffset`, so there's no need to consult :" +"meth:`dst` unless you're interested in obtaining DST info separately. For " +"example, :meth:`datetime.timetuple` calls its :attr:`~.datetime.tzinfo` " +"attribute's :meth:`dst` method to determine how the :attr:`~time.struct_time." +"tm_isdst` flag should be set, and :meth:`tzinfo.fromutc` calls :meth:`dst` " +"to account for DST changes when crossing time zones." +msgstr "" + +#: ../../library/datetime.rst:2210 +msgid "" +"An instance *tz* of a :class:`tzinfo` subclass that models both standard and " +"daylight times must be consistent in this sense:" +msgstr "" + +#: ../../library/datetime.rst:2213 +msgid "``tz.utcoffset(dt) - tz.dst(dt)``" +msgstr "" + +#: ../../library/datetime.rst:2215 +msgid "" +"must return the same result for every :class:`.datetime` *dt* with ``dt." +"tzinfo == tz``. For sane :class:`!tzinfo` subclasses, this expression yields " +"the time zone's \"standard offset\", which should not depend on the date or " +"the time, but only on geographic location. The implementation of :meth:" +"`datetime.astimezone` relies on this, but cannot detect violations; it's the " +"programmer's responsibility to ensure it. If a :class:`!tzinfo` subclass " +"cannot guarantee this, it may be able to override the default implementation " +"of :meth:`tzinfo.fromutc` to work correctly with :meth:`~.datetime." +"astimezone` regardless." +msgstr "" + +#: ../../library/datetime.rst:2224 +msgid "" +"Most implementations of :meth:`dst` will probably look like one of these " +"two::" +msgstr "" + +#: ../../library/datetime.rst:2226 +msgid "" +"import datetime as dt\n" +"\n" +"def dst(self, when):\n" +" # a fixed-offset class: doesn't account for DST\n" +" return dt.timedelta(0)" +msgstr "" + +#: ../../library/datetime.rst:2232 +msgid "or::" +msgstr "" + +#: ../../library/datetime.rst:2234 +msgid "" +"import datetime as dt\n" +"\n" +"def dst(self, when):\n" +" # Code to set dston and dstoff to the time zone's DST\n" +" # transition times based on the input when.year, and expressed\n" +" # in standard local time.\n" +"\n" +" if dston <= when.replace(tzinfo=None) < dstoff:\n" +" return dt.timedelta(hours=1)\n" +" else:\n" +" return dt.timedelta(0)" +msgstr "" + +#: ../../library/datetime.rst:2246 +msgid "" +"The default implementation of :meth:`dst` raises :exc:`NotImplementedError`." +msgstr "" + +#: ../../library/datetime.rst:2254 +msgid "" +"Return the time zone name corresponding to the :class:`.datetime` object " +"*dt*, as a string. Nothing about string names is defined by the :mod:`!" +"datetime` module, and there's no requirement that it mean anything in " +"particular. For example, ``\"GMT\"``, ``\"UTC\"``, ``\"-500\"``, " +"``\"-5:00\"``, ``\"EDT\"``, ``\"US/Eastern\"``, ``\"America/New York\"`` are " +"all valid replies. Return ``None`` if a string name isn't known. Note that " +"this is a method rather than a fixed string primarily because some :class:" +"`tzinfo` subclasses will wish to return different names depending on the " +"specific value of *dt* passed, especially if the :class:`!tzinfo` class is " +"accounting for daylight time." +msgstr "" + +#: ../../library/datetime.rst:2264 +msgid "" +"The default implementation of :meth:`tzname` raises :exc:" +"`NotImplementedError`." +msgstr "" + +#: ../../library/datetime.rst:2267 +msgid "" +"These methods are called by a :class:`.datetime` or :class:`.time` object, " +"in response to their methods of the same names. A :class:`!datetime` object " +"passes itself as the argument, and a :class:`!time` object passes ``None`` " +"as the argument. A :class:`tzinfo` subclass's methods should therefore be " +"prepared to accept a *dt* argument of ``None``, or of class :class:`!" +"datetime`." +msgstr "" + +#: ../../library/datetime.rst:2273 +msgid "" +"When ``None`` is passed, it's up to the class designer to decide the best " +"response. For example, returning ``None`` is appropriate if the class wishes " +"to say that time objects don't participate in the :class:`tzinfo` protocols. " +"It may be more useful for ``utcoffset(None)`` to return the standard UTC " +"offset, as there is no other convention for discovering the standard offset." +msgstr "" + +#: ../../library/datetime.rst:2279 +msgid "" +"When a :class:`.datetime` object is passed in response to a :class:`!" +"datetime` method, ``dt.tzinfo`` is the same object as *self*. :class:" +"`tzinfo` methods can rely on this, unless user code calls :class:`!tzinfo` " +"methods directly. The intent is that the :class:`!tzinfo` methods interpret " +"*dt* as being in local time, and not need worry about objects in other time " +"zones." +msgstr "" + +#: ../../library/datetime.rst:2285 +msgid "" +"There is one more :class:`tzinfo` method that a subclass may wish to " +"override:" +msgstr "" + +#: ../../library/datetime.rst:2290 +msgid "" +"This is called from the default :meth:`datetime.astimezone` implementation. " +"When called from that, ``dt.tzinfo`` is *self*, and *dt*'s date and time " +"data are to be viewed as expressing a UTC time. The purpose of :meth:" +"`fromutc` is to adjust the date and time data, returning an equivalent " +"datetime in *self*'s local time." +msgstr "" + +#: ../../library/datetime.rst:2296 +msgid "" +"Most :class:`tzinfo` subclasses should be able to inherit the default :meth:" +"`fromutc` implementation without problems. It's strong enough to handle " +"fixed-offset time zones, and time zones accounting for both standard and " +"daylight time, and the latter even if the DST transition times differ in " +"different years. An example of a time zone the default :meth:`fromutc` " +"implementation may not handle correctly in all cases is one where the " +"standard offset (from UTC) depends on the specific date and time passed, " +"which can happen for political reasons. The default implementations of :meth:" +"`~.datetime.astimezone` and :meth:`fromutc` may not produce the result you " +"want if the result is one of the hours straddling the moment the standard " +"offset changes." +msgstr "" + +#: ../../library/datetime.rst:2307 +msgid "" +"Skipping code for error cases, the default :meth:`fromutc` implementation " +"acts like::" +msgstr "" + +#: ../../library/datetime.rst:2310 +msgid "" +"import datetime as dt\n" +"\n" +"def fromutc(self, when):\n" +" # raise ValueError error if when.tzinfo is not self\n" +" dtoff = when.utcoffset()\n" +" dtdst = when.dst()\n" +" # raise ValueError if dtoff is None or dtdst is None\n" +" delta = dtoff - dtdst # this is self's standard offset\n" +" if delta:\n" +" when += delta # convert to standard local time\n" +" dtdst = when.dst()\n" +" # raise ValueError if dtdst is None\n" +" if dtdst:\n" +" return when + dtdst\n" +" else:\n" +" return when" +msgstr "" + +#: ../../library/datetime.rst:2327 +msgid "" +"In the following :download:`tzinfo_examples.py <../includes/tzinfo_examples." +"py>` file there are some examples of :class:`tzinfo` classes:" +msgstr "" + +#: ../../library/datetime.rst:2331 +msgid "" +"import datetime as dt\n" +"\n" +"# A class capturing the platform's idea of local time.\n" +"# (May result in wrong values on historical times in\n" +"# timezones where UTC offset and/or the DST rules had\n" +"# changed in the past.)\n" +"import time\n" +"\n" +"ZERO = dt.timedelta(0)\n" +"HOUR = dt.timedelta(hours=1)\n" +"SECOND = dt.timedelta(seconds=1)\n" +"\n" +"STDOFFSET = dt.timedelta(seconds=-time.timezone)\n" +"if time.daylight:\n" +" DSTOFFSET = dt.timedelta(seconds=-time.altzone)\n" +"else:\n" +" DSTOFFSET = STDOFFSET\n" +"\n" +"DSTDIFF = DSTOFFSET - STDOFFSET\n" +"\n" +"\n" +"class LocalTimezone(dt.tzinfo):\n" +"\n" +" def fromutc(self, when):\n" +" assert when.tzinfo is self\n" +" stamp = (when - dt.datetime(1970, 1, 1, tzinfo=self)) // SECOND\n" +" args = time.localtime(stamp)[:6]\n" +" dst_diff = DSTDIFF // SECOND\n" +" # Detect fold\n" +" fold = (args == time.localtime(stamp - dst_diff))\n" +" return dt.datetime(*args, microsecond=when.microsecond,\n" +" tzinfo=self, fold=fold)\n" +"\n" +" def utcoffset(self, when):\n" +" if self._isdst(when):\n" +" return DSTOFFSET\n" +" else:\n" +" return STDOFFSET\n" +"\n" +" def dst(self, when):\n" +" if self._isdst(when):\n" +" return DSTDIFF\n" +" else:\n" +" return ZERO\n" +"\n" +" def tzname(self, when):\n" +" return time.tzname[self._isdst(when)]\n" +"\n" +" def _isdst(self, when):\n" +" tt = (when.year, when.month, when.day,\n" +" when.hour, when.minute, when.second,\n" +" when.weekday(), 0, 0)\n" +" stamp = time.mktime(tt)\n" +" tt = time.localtime(stamp)\n" +" return tt.tm_isdst > 0\n" +"\n" +"\n" +"Local = LocalTimezone()\n" +"\n" +"\n" +"# A complete implementation of current DST rules for major US time zones.\n" +"\n" +"def first_sunday_on_or_after(when):\n" +" days_to_go = 6 - when.weekday()\n" +" if days_to_go:\n" +" when += dt.timedelta(days_to_go)\n" +" return when\n" +"\n" +"\n" +"# US DST Rules\n" +"#\n" +"# This is a simplified (i.e., wrong for a few cases) set of rules for US\n" +"# DST start and end times. For a complete and up-to-date set of DST rules\n" +"# and timezone definitions, visit the Olson Database (or try pytz):\n" +"# http://www.twinsun.com/tz/tz-link.htm\n" +"# https://sourceforge.net/projects/pytz/ (might not be up-to-date)\n" +"#\n" +"# In the US, since 2007, DST starts at 2am (standard time) on the second\n" +"# Sunday in March, which is the first Sunday on or after Mar 8.\n" +"DSTSTART_2007 = dt.datetime(1, 3, 8, 2)\n" +"# and ends at 2am (DST time) on the first Sunday of Nov.\n" +"DSTEND_2007 = dt.datetime(1, 11, 1, 2)\n" +"# From 1987 to 2006, DST used to start at 2am (standard time) on the first\n" +"# Sunday in April and to end at 2am (DST time) on the last\n" +"# Sunday of October, which is the first Sunday on or after Oct 25.\n" +"DSTSTART_1987_2006 = dt.datetime(1, 4, 1, 2)\n" +"DSTEND_1987_2006 = dt.datetime(1, 10, 25, 2)\n" +"# From 1967 to 1986, DST used to start at 2am (standard time) on the last\n" +"# Sunday in April (the one on or after April 24) and to end at 2am (DST " +"time)\n" +"# on the last Sunday of October, which is the first Sunday\n" +"# on or after Oct 25.\n" +"DSTSTART_1967_1986 = dt.datetime(1, 4, 24, 2)\n" +"DSTEND_1967_1986 = DSTEND_1987_2006\n" +"\n" +"\n" +"def us_dst_range(year):\n" +" # Find start and end times for US DST. For years before 1967, return\n" +" # start = end for no DST.\n" +" if 2006 < year:\n" +" dststart, dstend = DSTSTART_2007, DSTEND_2007\n" +" elif 1986 < year < 2007:\n" +" dststart, dstend = DSTSTART_1987_2006, DSTEND_1987_2006\n" +" elif 1966 < year < 1987:\n" +" dststart, dstend = DSTSTART_1967_1986, DSTEND_1967_1986\n" +" else:\n" +" return (dt.datetime(year, 1, 1), ) * 2\n" +"\n" +" start = first_sunday_on_or_after(dststart.replace(year=year))\n" +" end = first_sunday_on_or_after(dstend.replace(year=year))\n" +" return start, end\n" +"\n" +"\n" +"class USTimeZone(dt.tzinfo):\n" +"\n" +" def __init__(self, hours, reprname, stdname, dstname):\n" +" self.stdoffset = dt.timedelta(hours=hours)\n" +" self.reprname = reprname\n" +" self.stdname = stdname\n" +" self.dstname = dstname\n" +"\n" +" def __repr__(self):\n" +" return self.reprname\n" +"\n" +" def tzname(self, when):\n" +" if self.dst(when):\n" +" return self.dstname\n" +" else:\n" +" return self.stdname\n" +"\n" +" def utcoffset(self, when):\n" +" return self.stdoffset + self.dst(when)\n" +"\n" +" def dst(self, when):\n" +" if when is None or when.tzinfo is None:\n" +" # An exception may be sensible here, in one or both cases.\n" +" # It depends on how you want to treat them. The default\n" +" # fromutc() implementation (called by the default astimezone()\n" +" # implementation) passes a datetime with when.tzinfo is self.\n" +" return ZERO\n" +" assert when.tzinfo is self\n" +" start, end = us_dst_range(when.year)\n" +" # Can't compare naive to aware objects, so strip the timezone from\n" +" # when first.\n" +" when = when.replace(tzinfo=None)\n" +" if start + HOUR <= when < end - HOUR:\n" +" # DST is in effect.\n" +" return HOUR\n" +" if end - HOUR <= when < end:\n" +" # Fold (an ambiguous hour): use when.fold to disambiguate.\n" +" return ZERO if when.fold else HOUR\n" +" if start <= when < start + HOUR:\n" +" # Gap (a non-existent hour): reverse the fold rule.\n" +" return HOUR if when.fold else ZERO\n" +" # DST is off.\n" +" return ZERO\n" +"\n" +" def fromutc(self, when):\n" +" assert when.tzinfo is self\n" +" start, end = us_dst_range(when.year)\n" +" start = start.replace(tzinfo=self)\n" +" end = end.replace(tzinfo=self)\n" +" std_time = when + self.stdoffset\n" +" dst_time = std_time + HOUR\n" +" if end <= dst_time < end + HOUR:\n" +" # Repeated hour\n" +" return std_time.replace(fold=1)\n" +" if std_time < start or dst_time >= end:\n" +" # Standard time\n" +" return std_time\n" +" if start <= std_time < end - HOUR:\n" +" # Daylight saving time\n" +" return dst_time\n" +"\n" +"\n" +"Eastern = USTimeZone(-5, \"Eastern\", \"EST\", \"EDT\")\n" +"Central = USTimeZone(-6, \"Central\", \"CST\", \"CDT\")\n" +"Mountain = USTimeZone(-7, \"Mountain\", \"MST\", \"MDT\")\n" +"Pacific = USTimeZone(-8, \"Pacific\", \"PST\", \"PDT\")\n" +msgstr "" + +#: ../../library/datetime.rst:2333 +msgid "" +"Note that there are unavoidable subtleties twice per year in a :class:" +"`tzinfo` subclass accounting for both standard and daylight time, at the DST " +"transition points. For concreteness, consider US Eastern (UTC -0500), where " +"EDT begins the minute after 1:59 (EST) on the second Sunday in March, and " +"ends the minute after 1:59 (EDT) on the first Sunday in November::" +msgstr "" + +#: ../../library/datetime.rst:2339 +msgid "" +" UTC 3:MM 4:MM 5:MM 6:MM 7:MM 8:MM\n" +" EST 22:MM 23:MM 0:MM 1:MM 2:MM 3:MM\n" +" EDT 23:MM 0:MM 1:MM 2:MM 3:MM 4:MM\n" +"\n" +"start 22:MM 23:MM 0:MM 1:MM 3:MM 4:MM\n" +"\n" +" end 23:MM 0:MM 1:MM 1:MM 2:MM 3:MM" +msgstr "" + +#: ../../library/datetime.rst:2347 +msgid "" +"When DST starts (the \"start\" line), the local wall clock leaps from 1:59 " +"to 3:00. A wall time of the form 2:MM doesn't really make sense on that day, " +"so ``astimezone(Eastern)`` won't deliver a result with ``hour == 2`` on the " +"day DST begins. For example, at the Spring forward transition of 2016, we " +"get::" +msgstr "" + +#: ../../library/datetime.rst:2352 +msgid "" +">>> import datetime as dt\n" +">>> from tzinfo_examples import HOUR, Eastern\n" +">>> u0 = dt.datetime(2016, 3, 13, 5, tzinfo=dt.timezone.utc)\n" +">>> for i in range(4):\n" +"... u = u0 + i*HOUR\n" +"... t = u.astimezone(Eastern)\n" +"... print(u.time(), 'UTC =', t.time(), t.tzname())\n" +"...\n" +"05:00:00 UTC = 00:00:00 EST\n" +"06:00:00 UTC = 01:00:00 EST\n" +"07:00:00 UTC = 03:00:00 EDT\n" +"08:00:00 UTC = 04:00:00 EDT" +msgstr "" + +#: ../../library/datetime.rst:2366 +msgid "" +"When DST ends (the \"end\" line), there's a potentially worse problem: " +"there's an hour that can't be spelled unambiguously in local wall time: the " +"last hour of daylight time. In Eastern, that's times of the form 5:MM UTC on " +"the day daylight time ends. The local wall clock leaps from 1:59 (daylight " +"time) back to 1:00 (standard time) again. Local times of the form 1:MM are " +"ambiguous. :meth:`~.datetime.astimezone` mimics the local clock's behavior " +"by mapping two adjacent UTC hours into the same local hour then. In the " +"Eastern example, UTC times of the form 5:MM and 6:MM both map to 1:MM when " +"converted to Eastern, but earlier times have the :attr:`~.datetime.fold` " +"attribute set to 0 and the later times have it set to 1. For example, at the " +"Fall back transition of 2016, we get::" +msgstr "" + +#: ../../library/datetime.rst:2377 +msgid "" +">>> import datetime as dt\n" +">>> from tzinfo_examples import HOUR, Eastern\n" +">>> u0 = dt.datetime(2016, 11, 6, 4, tzinfo=dt.timezone.utc)\n" +">>> for i in range(4):\n" +"... u = u0 + i*HOUR\n" +"... t = u.astimezone(Eastern)\n" +"... print(u.time(), 'UTC =', t.time(), t.tzname(), t.fold)\n" +"...\n" +"04:00:00 UTC = 00:00:00 EDT 0\n" +"05:00:00 UTC = 01:00:00 EDT 0\n" +"06:00:00 UTC = 01:00:00 EST 1\n" +"07:00:00 UTC = 02:00:00 EST 0" +msgstr "" + +#: ../../library/datetime.rst:2390 +msgid "" +"Note that the :class:`.datetime` instances that differ only by the value of " +"the :attr:`~.datetime.fold` attribute are considered equal in comparisons." +msgstr "" + +#: ../../library/datetime.rst:2393 +msgid "" +"Applications that can't bear wall-time ambiguities should explicitly check " +"the value of the :attr:`~.datetime.fold` attribute or avoid using hybrid :" +"class:`tzinfo` subclasses; there are no ambiguities when using :class:" +"`timezone`, or any other fixed-offset :class:`!tzinfo` subclass (such as a " +"class representing only EST (fixed offset -5 hours), or only EDT (fixed " +"offset -4 hours))." +msgstr "" + +#: ../../library/datetime.rst:2401 +msgid ":mod:`zoneinfo`" +msgstr "" + +#: ../../library/datetime.rst:2402 +msgid "" +"The :mod:`!datetime` module has a basic :class:`timezone` class (for " +"handling arbitrary fixed offsets from UTC) and its :attr:`timezone.utc` " +"attribute (a UTC :class:`!timezone` instance)." +msgstr "" + +#: ../../library/datetime.rst:2406 +msgid "" +"``zoneinfo`` brings the *IANA time zone database* (also known as the Olson " +"database) to Python, and its usage is recommended." +msgstr "" + +#: ../../library/datetime.rst:2409 +msgid "`IANA time zone database `_" +msgstr "" + +#: ../../library/datetime.rst:2410 +msgid "" +"The Time Zone Database (often called tz, tzdata or zoneinfo) contains code " +"and data that represent the history of local time for many representative " +"locations around the globe. It is updated periodically to reflect changes " +"made by political bodies to time zone boundaries, UTC offsets, and daylight-" +"saving rules." +msgstr "" + +#: ../../library/datetime.rst:2420 +msgid ":class:`!timezone` objects" +msgstr "" + +#: ../../library/datetime.rst:2422 +msgid "" +"The :class:`timezone` class is a subclass of :class:`tzinfo`, each instance " +"of which represents a time zone defined by a fixed offset from UTC." +msgstr "" + +#: ../../library/datetime.rst:2426 +msgid "" +"Objects of this class cannot be used to represent time zone information in " +"the locations where different offsets are used in different days of the year " +"or where historical changes have been made to civil time." +msgstr "" + +#: ../../library/datetime.rst:2433 +msgid "" +"The *offset* argument must be specified as a :class:`timedelta` object " +"representing the difference between the local time and UTC. It must be " +"strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)``, " +"otherwise :exc:`ValueError` is raised." +msgstr "" + +#: ../../library/datetime.rst:2438 +msgid "" +"The *name* argument is optional. If specified it must be a string that will " +"be used as the value returned by the :meth:`datetime.tzname` method." +msgstr "" + +#: ../../library/datetime.rst:2449 ../../library/datetime.rst:2461 +msgid "" +"Return the fixed value specified when the :class:`timezone` instance is " +"constructed." +msgstr "" + +#: ../../library/datetime.rst:2452 +msgid "" +"The *dt* argument is ignored. The return value is a :class:`timedelta` " +"instance equal to the difference between the local time and UTC." +msgstr "" + +#: ../../library/datetime.rst:2464 +msgid "" +"If *name* is not provided in the constructor, the name returned by " +"``tzname(dt)`` is generated from the value of the ``offset`` as follows. If " +"*offset* is ``timedelta(0)``, the name is \"UTC\", otherwise it is a string " +"in the format ``UTC±HH:MM``, where ± is the sign of ``offset``, HH and MM " +"are two digits of ``offset.hours`` and ``offset.minutes`` respectively." +msgstr "" + +#: ../../library/datetime.rst:2470 +msgid "" +"Name generated from ``offset=timedelta(0)`` is now plain ``'UTC'``, not " +"``'UTC+00:00'``." +msgstr "" + +#: ../../library/datetime.rst:2477 +msgid "Always returns ``None``." +msgstr "" + +#: ../../library/datetime.rst:2482 +msgid "" +"Return ``dt + offset``. The *dt* argument must be an aware :class:`." +"datetime` instance, with ``tzinfo`` set to ``self``." +msgstr "" + +#: ../../library/datetime.rst:2490 +msgid "The UTC time zone, ``timezone(timedelta(0))``." +msgstr "" + +#: ../../library/datetime.rst:2499 +msgid ":meth:`!strftime` and :meth:`!strptime` behavior" +msgstr "" + +#: ../../library/datetime.rst:2501 +msgid "" +":class:`date`, :class:`.datetime`, and :class:`.time` objects all support a " +"``strftime(format)`` method, to create a string representing the time under " +"the control of an explicit format string." +msgstr "" + +#: ../../library/datetime.rst:2505 +msgid "" +"Conversely, the :meth:`date.strptime`, :meth:`datetime.strptime` and :meth:" +"`time.strptime` class methods create an object from a string representing " +"the time and a corresponding format string." +msgstr "" + +#: ../../library/datetime.rst:2509 +msgid "" +"The table below provides a high-level comparison of :meth:`~.datetime." +"strftime` versus :meth:`~.datetime.strptime`:" +msgstr "" + +#: ../../library/datetime.rst:2513 +msgid "``strftime``" +msgstr "" + +#: ../../library/datetime.rst:2513 +msgid "``strptime``" +msgstr "" + +#: ../../library/datetime.rst:2515 +msgid "Usage" +msgstr "" + +#: ../../library/datetime.rst:2515 +msgid "Convert object to a string according to a given format" +msgstr "" + +#: ../../library/datetime.rst:2515 +msgid "Parse a string into an object given a corresponding format" +msgstr "" + +#: ../../library/datetime.rst:2517 +msgid "Type of method" +msgstr "" + +#: ../../library/datetime.rst:2517 +msgid "Instance method" +msgstr "" + +#: ../../library/datetime.rst:2517 +msgid "Class method" +msgstr "" + +#: ../../library/datetime.rst:2519 +msgid "Signature" +msgstr "" + +#: ../../library/datetime.rst:2519 +msgid "``strftime(format)``" +msgstr "" + +#: ../../library/datetime.rst:2519 +msgid "``strptime(date_string, format)``" +msgstr "" + +#: ../../library/datetime.rst:2526 +msgid ":meth:`!strftime` and :meth:`!strptime` format codes" +msgstr "" + +#: ../../library/datetime.rst:2528 +msgid "" +"These methods accept format codes that can be used to parse and format " +"dates::" +msgstr "" + +#: ../../library/datetime.rst:2530 +msgid "" +">>> import datetime as dt\n" +">>> dt.datetime.strptime('31/01/22 23:59:59.999999',\n" +"... '%d/%m/%y %H:%M:%S.%f')\n" +"datetime.datetime(2022, 1, 31, 23, 59, 59, 999999)\n" +">>> _.strftime('%a %d %b %Y, %I:%M%p')\n" +"'Mon 31 Jan 2022, 11:59PM'" +msgstr "" + +#: ../../library/datetime.rst:2537 +msgid "" +"The following is a list of all the format codes that the 2011 C standard " +"requires, and these work on all supported platforms." +msgstr "" + +#: ../../library/datetime.rst:2541 ../../library/datetime.rst:2696 +msgid "Directive" +msgstr "" + +#: ../../library/datetime.rst:2541 ../../library/datetime.rst:2696 +msgid "Meaning" +msgstr "" + +#: ../../library/datetime.rst:2541 ../../library/datetime.rst:2696 +msgid "Example" +msgstr "" + +#: ../../library/datetime.rst:2541 ../../library/datetime.rst:2696 +msgid "Notes" +msgstr "" + +#: ../../library/datetime.rst:2544 +msgid "``%a``" +msgstr "" + +#: ../../library/datetime.rst:2544 +msgid "Weekday as locale's abbreviated name." +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "Sun, Mon, ..., Sat (en_US);" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "So, Mo, ..., Sa (de_DE)" +msgstr "" + +#: ../../library/datetime.rst:2549 +msgid "``%A``" +msgstr "" + +#: ../../library/datetime.rst:2549 +msgid "Weekday as locale's full name." +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "Sunday, Monday, ..., Saturday (en_US);" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "Sonntag, Montag, ..., Samstag (de_DE)" +msgstr "" + +#: ../../library/datetime.rst:2554 +msgid "``%b``" +msgstr "" + +#: ../../library/datetime.rst:2554 +msgid "Month as locale's abbreviated name." +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "Jan, Feb, ..., Dec (en_US);" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "Jan, Feb, ..., Dez (de_DE)" +msgstr "" + +#: ../../library/datetime.rst:2559 +msgid "``%B``" +msgstr "" + +#: ../../library/datetime.rst:2559 +msgid "Month as locale's full name." +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "January, February, ..., December (en_US);" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "Januar, Februar, ..., Dezember (de_DE)" +msgstr "" + +#: ../../library/datetime.rst:2564 +msgid "``%c``" +msgstr "" + +#: ../../library/datetime.rst:2564 +msgid "Locale's appropriate date and time representation." +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "Tue Aug 16 21:30:00 1988 (en_US);" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "Di 16 Aug 21:30:00 1988 (de_DE)" +msgstr "" + +#: ../../library/datetime.rst:2569 +msgid "``%C``" +msgstr "" + +#: ../../library/datetime.rst:2569 +msgid "" +"The year divided by 100 and truncated to an integer as a zero-padded decimal " +"number." +msgstr "" + +#: ../../library/datetime.rst:2569 +msgid "01, 02, ..., 99" +msgstr "" + +#: ../../library/datetime.rst:2569 ../../library/datetime.rst:2585 +#: ../../library/datetime.rst:2595 +msgid "\\(0)" +msgstr "" + +#: ../../library/datetime.rst:2573 +msgid "``%d``" +msgstr "" + +#: ../../library/datetime.rst:2573 +msgid "Day of the month as a zero-padded decimal number." +msgstr "" + +#: ../../library/datetime.rst:2573 +msgid "01, 02, ..., 31" +msgstr "" + +#: ../../library/datetime.rst:2573 +msgid "\\(9), \\(10)" +msgstr "" + +#: ../../library/datetime.rst:2576 +msgid "``%D``" +msgstr "" + +#: ../../library/datetime.rst:2576 +msgid "Equivalent to ``%m/%d/%y``." +msgstr "" + +#: ../../library/datetime.rst:2576 +msgid "11/28/25" +msgstr "" + +#: ../../library/datetime.rst:2576 ../../library/datetime.rst:2597 +#: ../../library/datetime.rst:2600 ../../library/datetime.rst:2603 +#: ../../library/datetime.rst:2606 ../../library/datetime.rst:2609 +#: ../../library/datetime.rst:2671 +msgid "\\(9)" +msgstr "" + +#: ../../library/datetime.rst:2579 +msgid "``%e``" +msgstr "" + +#: ../../library/datetime.rst:2579 +msgid "The day of the month as a space-padded decimal number." +msgstr "" + +#: ../../library/datetime.rst:2579 +msgid "␣1, ␣2, ..., 31" +msgstr "" + +#: ../../library/datetime.rst:2579 +msgid "\\(10)" +msgstr "" + +#: ../../library/datetime.rst:2582 +msgid "``%F``" +msgstr "" + +#: ../../library/datetime.rst:2582 +msgid "Equivalent to ``%Y-%m-%d``, the ISO 8601 format." +msgstr "" + +#: ../../library/datetime.rst:2582 +msgid "2025-10-11, 1001-12-30" +msgstr "" + +#: ../../library/datetime.rst:2585 +msgid "``%g``" +msgstr "" + +#: ../../library/datetime.rst:2585 +msgid "" +"Last 2 digits of ISO 8601 year representing the year that contains the " +"greater part of the ISO week (``%V``)." +msgstr "" + +#: ../../library/datetime.rst:2585 ../../library/datetime.rst:2671 +msgid "00, 01, ..., 99" +msgstr "" + +#: ../../library/datetime.rst:2590 +msgid "``%G``" +msgstr "" + +#: ../../library/datetime.rst:2590 +msgid "" +"ISO 8601 year with century representing the year that contains the greater " +"part of the ISO week (``%V``)." +msgstr "" + +#: ../../library/datetime.rst:2590 ../../library/datetime.rst:2674 +msgid "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" +msgstr "" + +#: ../../library/datetime.rst:2590 +msgid "\\(8)" +msgstr "" + +#: ../../library/datetime.rst:2595 +msgid "``%h``" +msgstr "" + +#: ../../library/datetime.rst:2595 +msgid "Equivalent to ``%b``." +msgstr "" + +#: ../../library/datetime.rst:2595 +msgid "See ``%b``." +msgstr "" + +#: ../../library/datetime.rst:2597 +msgid "``%H``" +msgstr "" + +#: ../../library/datetime.rst:2597 +msgid "Hour (24-hour clock) as a zero-padded decimal number." +msgstr "" + +#: ../../library/datetime.rst:2597 +msgid "00, 01, ..., 23" +msgstr "" + +#: ../../library/datetime.rst:2600 +msgid "``%I``" +msgstr "" + +#: ../../library/datetime.rst:2600 +msgid "Hour (12-hour clock) as a zero-padded decimal number." +msgstr "" + +#: ../../library/datetime.rst:2600 ../../library/datetime.rst:2606 +msgid "01, 02, ..., 12" +msgstr "" + +#: ../../library/datetime.rst:2603 +msgid "``%j``" +msgstr "" + +#: ../../library/datetime.rst:2603 +msgid "Day of the year as a zero-padded decimal number." +msgstr "" + +#: ../../library/datetime.rst:2603 +msgid "001, 002, ..., 366" +msgstr "" + +#: ../../library/datetime.rst:2606 +msgid "``%m``" +msgstr "" + +#: ../../library/datetime.rst:2606 +msgid "Month as a zero-padded decimal number." +msgstr "" + +#: ../../library/datetime.rst:2609 +msgid "``%M``" +msgstr "" + +#: ../../library/datetime.rst:2609 +msgid "Minute as a zero-padded decimal number." +msgstr "" + +#: ../../library/datetime.rst:2609 ../../library/datetime.rst:2625 +msgid "00, 01, ..., 59" +msgstr "" + +#: ../../library/datetime.rst:2612 +msgid "``%n``" +msgstr "" + +#: ../../library/datetime.rst:2612 +msgid "" +"The newline character (``'\\n'``). For :meth:`!strptime`, zero or more " +"whitespace." +msgstr "" + +#: ../../library/datetime.rst:2612 +msgid "``\\n``" +msgstr "" + +#: ../../library/datetime.rst:2617 +msgid "``%p``" +msgstr "" + +#: ../../library/datetime.rst:2617 +msgid "Locale's equivalent of either AM or PM." +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "AM, PM (en_US);" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "am, pm (de_DE)" +msgstr "" + +#: ../../library/datetime.rst:2617 +msgid "\\(1), \\(3)" +msgstr "" + +#: ../../library/datetime.rst:2620 +msgid "``%r``" +msgstr "" + +#: ../../library/datetime.rst:2620 +msgid "Locale's 12-hour clock time." +msgstr "" + +#: ../../library/datetime.rst:2620 +msgid "12:00:00 AM" +msgstr "" + +#: ../../library/datetime.rst:2620 +msgid "\\(1), \\(0)" +msgstr "" + +#: ../../library/datetime.rst:2623 +msgid "``%R``" +msgstr "" + +#: ../../library/datetime.rst:2623 +msgid "Equivalent to ``%H:%M``." +msgstr "" + +#: ../../library/datetime.rst:2623 +msgid "10:01" +msgstr "" + +#: ../../library/datetime.rst:2625 +msgid "``%S``" +msgstr "" + +#: ../../library/datetime.rst:2625 +msgid "Second as a zero-padded decimal number." +msgstr "" + +#: ../../library/datetime.rst:2625 +msgid "\\(4), \\(9)" +msgstr "" + +#: ../../library/datetime.rst:2628 +msgid "``%t``" +msgstr "" + +#: ../../library/datetime.rst:2628 +msgid "" +"The tab character (``'\\t'``). For :meth:`!strptime`, zero or more " +"whitespace." +msgstr "" + +#: ../../library/datetime.rst:2628 +msgid "``\\t``" +msgstr "" + +#: ../../library/datetime.rst:2632 +msgid "``%T``" +msgstr "" + +#: ../../library/datetime.rst:2632 +msgid "ISO 8601 time format, equivalent to ``%H:%M:%S``." +msgstr "" + +#: ../../library/datetime.rst:2632 +msgid "10:01:59" +msgstr "" + +#: ../../library/datetime.rst:2635 +msgid "``%u``" +msgstr "" + +#: ../../library/datetime.rst:2635 +msgid "ISO 8601 weekday as a decimal number where 1 is Monday." +msgstr "" + +#: ../../library/datetime.rst:2635 +msgid "1, 2, ..., 7" +msgstr "" + +#: ../../library/datetime.rst:2638 +msgid "``%U``" +msgstr "" + +#: ../../library/datetime.rst:2638 +msgid "" +"Week number of the year (Sunday as the first day of the week) as a zero-" +"padded decimal number. All days in a new year preceding the first Sunday are " +"considered to be in week 0." +msgstr "" + +#: ../../library/datetime.rst:2638 ../../library/datetime.rst:2656 +msgid "00, 01, ..., 53" +msgstr "" + +#: ../../library/datetime.rst:2638 ../../library/datetime.rst:2656 +msgid "\\(7), \\(9)" +msgstr "" + +#: ../../library/datetime.rst:2646 +msgid "``%V``" +msgstr "" + +#: ../../library/datetime.rst:2646 +msgid "" +"ISO 8601 week as a decimal number with Monday as the first day of the week. " +"Week 01 is the week containing Jan 4." +msgstr "" + +#: ../../library/datetime.rst:2646 +msgid "01, 02, ..., 53" +msgstr "" + +#: ../../library/datetime.rst:2646 +msgid "\\(8), \\(9)" +msgstr "" + +#: ../../library/datetime.rst:2652 +msgid "``%w``" +msgstr "" + +#: ../../library/datetime.rst:2652 +msgid "Weekday as a decimal number, where 0 is Sunday and 6 is Saturday." +msgstr "" + +#: ../../library/datetime.rst:2652 +msgid "0, 1, ..., 6" +msgstr "" + +#: ../../library/datetime.rst:2656 +msgid "``%W``" +msgstr "" + +#: ../../library/datetime.rst:2656 +msgid "" +"Week number of the year (Monday as the first day of the week) as a zero-" +"padded decimal number. All days in a new year preceding the first Monday are " +"considered to be in week 0." +msgstr "" + +#: ../../library/datetime.rst:2664 +msgid "``%x``" +msgstr "" + +#: ../../library/datetime.rst:2664 +msgid "Locale's appropriate date representation." +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "08/16/88 (None);" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "08/16/1988 (en_US);" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "16.08.1988 (de_DE)" +msgstr "" + +#: ../../library/datetime.rst:2668 +msgid "``%X``" +msgstr "" + +#: ../../library/datetime.rst:2668 +msgid "Locale's appropriate time representation." +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "21:30:00 (en_US);" +msgstr "" + +#: ../../library/datetime.rst:0 +msgid "21:30:00 (de_DE)" +msgstr "" + +#: ../../library/datetime.rst:2671 +msgid "``%y``" +msgstr "" + +#: ../../library/datetime.rst:2671 +msgid "Year without century as a zero-padded decimal number." +msgstr "" + +#: ../../library/datetime.rst:2674 +msgid "``%Y``" +msgstr "" + +#: ../../library/datetime.rst:2674 +msgid "Year with century as a decimal number." +msgstr "" + +#: ../../library/datetime.rst:2677 ../../library/datetime.rst:2840 +msgid "``%z``" +msgstr "" + +#: ../../library/datetime.rst:2677 +msgid "" +"UTC offset in the form ``±HHMM[SS[.ffffff]]`` (empty string if the object is " +"naive)." +msgstr "" + +#: ../../library/datetime.rst:2677 +msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" +msgstr "" + +#: ../../library/datetime.rst:2677 ../../library/datetime.rst:2682 +#: ../../library/datetime.rst:2702 +msgid "\\(6)" +msgstr "" + +#: ../../library/datetime.rst:2682 ../../library/datetime.rst:2872 +msgid "``%Z``" +msgstr "" + +#: ../../library/datetime.rst:2682 +msgid "Time zone name (empty string if the object is naive)." +msgstr "" + +#: ../../library/datetime.rst:2682 +msgid "(empty), UTC, GMT" +msgstr "" + +#: ../../library/datetime.rst:2685 +msgid "``%%``" +msgstr "" + +#: ../../library/datetime.rst:2685 +msgid "A literal ``'%'`` character." +msgstr "" + +#: ../../library/datetime.rst:2685 +msgid "%" +msgstr "" + +#: ../../library/datetime.rst:2688 +msgid "" +"The ISO 8601 year and ISO 8601 week directives are not interchangeable with " +"the year and week number directives above. Calling :meth:`~.datetime." +"strptime` with incomplete or ambiguous ISO 8601 directives will raise a :exc:" +"`ValueError`." +msgstr "" + +#: ../../library/datetime.rst:2692 +msgid "" +"Several additional directives not required by the C11 standard are included " +"for convenience." +msgstr "" + +#: ../../library/datetime.rst:2698 +msgid "``%f``" +msgstr "" + +#: ../../library/datetime.rst:2698 +msgid "Microsecond as a decimal number, zero-padded to 6 digits." +msgstr "" + +#: ../../library/datetime.rst:2698 +msgid "000000, 000001, ..., 999999" +msgstr "" + +#: ../../library/datetime.rst:2698 +msgid "\\(5)" +msgstr "" + +#: ../../library/datetime.rst:2702 ../../library/datetime.rst:2862 +msgid "``%:z``" +msgstr "" + +#: ../../library/datetime.rst:2702 +msgid "" +"UTC offset in the form ``±HH:MM[:SS[.ffffff]]`` (empty string if the object " +"is naive)." +msgstr "" + +#: ../../library/datetime.rst:2702 +msgid "(empty), +00:00, -04:00, +10:30, +06:34:15, -03:07:12.345216" +msgstr "" + +#: ../../library/datetime.rst:2708 +msgid "" +"The full set of format codes supported varies across platforms, because " +"Python calls the platform C library's :c:func:`strftime` function, and " +"platform variations are common. To see the full set of format codes " +"supported on your platform, consult the :manpage:`strftime(3)` " +"documentation. There are also differences between platforms in handling of " +"unsupported format specifiers." +msgstr "" + +#: ../../library/datetime.rst:2714 +msgid "``%G``, ``%u`` and ``%V`` were added." +msgstr "" + +#: ../../library/datetime.rst:2717 +msgid "``%:z`` was added for :meth:`~.datetime.strftime`." +msgstr "" + +#: ../../library/datetime.rst:2720 +msgid "" +"``%D``, ``%F``, ``%n``, ``%t``, and ``%:z`` were added for :meth:`~.datetime." +"strptime`." +msgstr "" + +#: ../../library/datetime.rst:2726 +msgid "Technical detail" +msgstr "" + +#: ../../library/datetime.rst:2728 +msgid "" +"Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's " +"``time.strftime(fmt, d.timetuple())`` although not all objects support a :" +"meth:`~date.timetuple` method." +msgstr "" + +#: ../../library/datetime.rst:2732 +msgid "" +"For the :meth:`.datetime.strptime` and :meth:`.date.strptime` class methods, " +"the default value is ``1900-01-01T00:00:00.000``: any components not " +"specified in the format string will be pulled from the default value." +msgstr "" + +#: ../../library/datetime.rst:2737 +msgid "" +"Format strings without separators can be ambiguous for parsing. For example, " +"with ``%Y%m%d``, the string ``2026111`` may be parsed either as " +"``2026-11-01`` or as ``2026-01-11``. Use separators to ensure the input is " +"parsed as intended." +msgstr "" + +#: ../../library/datetime.rst:2743 +msgid "" +"When used to parse partial dates lacking a year, :meth:`.datetime.strptime` " +"and :meth:`.date.strptime` will raise when encountering February 29 because " +"the default year of 1900 is *not* a leap year. Always add a default leap " +"year to partial date strings before parsing." +msgstr "" + +#: ../../library/datetime.rst:2763 +msgid "" +">>> import datetime as dt\n" +">>> value = \"2/29\"\n" +">>> dt.datetime.strptime(value, \"%m/%d\")\n" +"Traceback (most recent call last):\n" +"...\n" +"ValueError: day 29 must be in range 1..28 for month 2 in year 1900\n" +">>> dt.datetime.strptime(f\"1904 {value}\", \"%Y %m/%d\")\n" +"datetime.datetime(1904, 2, 29, 0, 0)" +msgstr "" + +#: ../../library/datetime.rst:2774 +msgid "Using ``datetime.strptime(date_string, format)`` is equivalent to::" +msgstr "" + +#: ../../library/datetime.rst:2778 +msgid "" +"except when the format includes sub-second components or time zone offset " +"information, which are supported in ``datetime.strptime`` but are discarded " +"by ``time.strptime``." +msgstr "" + +#: ../../library/datetime.rst:2782 +msgid "" +"For :class:`.time` objects, the format codes for year, month, and day should " +"not be used, as :class:`!time` objects have no such values. If they're used " +"anyway, 1900 is substituted for the year, and 1 for the month and day." +msgstr "" + +#: ../../library/datetime.rst:2786 +msgid "" +"For :class:`date` objects, the format codes for hours, minutes, seconds, and " +"microseconds should not be used, as :class:`date` objects have no such " +"values. If they're used anyway, 0 is substituted for them." +msgstr "" + +#: ../../library/datetime.rst:2790 +msgid "" +"For the same reason, handling of format strings containing Unicode code " +"points that can't be represented in the charset of the current locale is " +"also platform-dependent. On some platforms such code points are preserved " +"intact in the output, while on others ``strftime`` may raise :exc:" +"`UnicodeError` or return an empty string instead." +msgstr "" + +#: ../../library/datetime.rst:2799 +msgid "" +"This format code is currently unsupported by :meth:`~.datetime.strptime`." +msgstr "" + +#: ../../library/datetime.rst:2802 +msgid "" +"Because the format depends on the current locale, care should be taken when " +"making assumptions about the output value. Field orderings will vary (for " +"example, \"month/day/year\" versus \"day/month/year\"), and the output may " +"contain non-ASCII characters." +msgstr "" + +#: ../../library/datetime.rst:2808 +msgid "" +"The :meth:`~.datetime.strptime` method can parse years in the full [1, 9999] " +"range, but years < 1000 must be zero-filled to 4-digit width." +msgstr "" + +#: ../../library/datetime.rst:2811 +msgid "" +"In previous versions, :meth:`~.datetime.strftime` method was restricted to " +"years >= 1900." +msgstr "" + +#: ../../library/datetime.rst:2815 +msgid "" +"In version 3.2, :meth:`~.datetime.strftime` method was restricted to years " +">= 1000." +msgstr "" + +#: ../../library/datetime.rst:2820 +msgid "" +"When used with the :meth:`~.datetime.strptime` method, the ``%p`` directive " +"only affects the output hour field if the ``%I`` directive is used to parse " +"the hour." +msgstr "" + +#: ../../library/datetime.rst:2824 +msgid "" +"Unlike the :mod:`time` module, the :mod:`!datetime` module does not support " +"leap seconds." +msgstr "" + +#: ../../library/datetime.rst:2828 +msgid "" +"When used with the :meth:`~.datetime.strptime` method, the ``%f`` directive " +"accepts from one to six digits and zero pads on the right. ``%f`` is an " +"extension to the set of format characters in the C standard (but implemented " +"separately in datetime objects, and therefore always available)." +msgstr "" + +#: ../../library/datetime.rst:2835 +msgid "" +"For a naive object, the ``%z``, ``%:z`` and ``%Z`` format codes are replaced " +"by empty strings." +msgstr "" + +#: ../../library/datetime.rst:2838 +msgid "For an aware object:" +msgstr "" + +#: ../../library/datetime.rst:2841 +msgid "" +":meth:`~.datetime.utcoffset` is transformed into a string of the form " +"``±HHMM[SS[.ffffff]]``, where ``HH`` is a 2-digit string giving the number " +"of UTC offset hours, ``MM`` is a 2-digit string giving the number of UTC " +"offset minutes, ``SS`` is a 2-digit string giving the number of UTC offset " +"seconds and ``ffffff`` is a 6-digit string giving the number of UTC offset " +"microseconds. The ``ffffff`` part is omitted when the offset is a whole " +"number of seconds and both the ``ffffff`` and the ``SS`` part is omitted " +"when the offset is a whole number of minutes. For example, if :meth:`~." +"datetime.utcoffset` returns ``timedelta(hours=-3, minutes=-30)``, ``%z`` is " +"replaced with the string ``'-0330'``." +msgstr "" + +#: ../../library/datetime.rst:2855 +msgid "" +"When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` " +"method, the UTC offsets can have a colon as a separator between hours, " +"minutes and seconds. For example, both ``'+010000'`` and ``'+01:00:00'`` " +"will be parsed as an offset of one hour. In addition, providing ``'Z'`` is " +"identical to ``'+00:00'``." +msgstr "" + +#: ../../library/datetime.rst:2863 +msgid "" +"When used with :meth:`~.datetime.strftime`, behaves exactly as ``%z``, " +"except that a colon separator is added between hours, minutes and seconds." +msgstr "" + +#: ../../library/datetime.rst:2866 +msgid "" +"When used with :meth:`~.datetime.strptime`, the UTC offset is *required* to " +"have a colon as a separator between hours, minutes and seconds. For example, " +"``'+01:00:00'`` (but *not* ``'+010000'``) will be parsed as an offset of one " +"hour. In addition, providing ``'Z'`` is identical to ``'+00:00'``." +msgstr "" + +#: ../../library/datetime.rst:2873 +msgid "" +"In :meth:`~.datetime.strftime`, ``%Z`` is replaced by an empty string if :" +"meth:`~.datetime.tzname` returns ``None``; otherwise ``%Z`` is replaced by " +"the returned value, which must be a string." +msgstr "" + +#: ../../library/datetime.rst:2877 +msgid ":meth:`~.datetime.strptime` only accepts certain values for ``%Z``:" +msgstr "" + +#: ../../library/datetime.rst:2879 +msgid "any value in ``time.tzname`` for your machine's locale" +msgstr "" + +#: ../../library/datetime.rst:2880 +msgid "the hard-coded values ``UTC`` and ``GMT``" +msgstr "" + +#: ../../library/datetime.rst:2882 +msgid "" +"So someone living in Japan may have ``JST``, ``UTC``, and ``GMT`` as valid " +"values, but probably not ``EST``. It will raise ``ValueError`` for invalid " +"values." +msgstr "" + +#: ../../library/datetime.rst:2886 +msgid "" +"When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` " +"method, an aware :class:`.datetime` object will be produced. The ``tzinfo`` " +"of the result will be set to a :class:`timezone` instance." +msgstr "" + +#: ../../library/datetime.rst:2892 +msgid "" +"When used with the :meth:`~.datetime.strptime` method, ``%U`` and ``%W`` are " +"only used in calculations when the day of the week and the calendar year " +"(``%Y``) are specified." +msgstr "" + +#: ../../library/datetime.rst:2897 +msgid "" +"Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the " +"day of the week and the ISO year (``%G``) are specified in a :meth:`~." +"datetime.strptime` format string. Also note that ``%G`` and ``%Y`` are not " +"interchangeable." +msgstr "" + +#: ../../library/datetime.rst:2903 +msgid "" +"When used with the :meth:`~.datetime.strptime` method, the leading zero is " +"optional for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, " +"``%j``, ``%U``, ``%W``, and ``%V``. Format ``%y`` does require a leading " +"zero." +msgstr "" + +#: ../../library/datetime.rst:2908 +msgid "" +"When parsing a month and day using :meth:`~.datetime.strptime`, always " +"include a year in the format. If the value you need to parse lacks a year, " +"append an explicit dummy leap year. Otherwise your code will raise an " +"exception when it encounters leap day because the default year used by the " +"parser (1900) is not a leap year. Users run into that bug every leap year." +msgstr "" + +#: ../../library/datetime.rst:2914 +msgid "" +">>> month_day = \"02/29\"\n" +">>> dt.datetime.strptime(f\"{month_day};1984\", \"%m/%d;%Y\") # No leap " +"year bug.\n" +"datetime.datetime(1984, 2, 29, 0, 0)" +msgstr "" + +#: ../../library/datetime.rst:2920 +msgid "Using ``%d`` without a year now raises :exc:`ValueError`." +msgstr "" + +#: ../../library/datetime.rst:2923 +msgid "" +":meth:`~.datetime.strptime` calls using a format string containing ``%e`` " +"without a year now emit a :exc:`DeprecationWarning`." +msgstr "" + +#: ../../library/datetime.rst:2928 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../library/datetime.rst:2929 +msgid "If, that is, we ignore the effects of relativity." +msgstr "" + +#: ../../library/datetime.rst:2931 +msgid "" +"This matches the definition of the \"proleptic Gregorian\" calendar in " +"Dershowitz and Reingold's book *Calendrical Calculations*, where it's the " +"base calendar for all computations. See the book for algorithms for " +"converting between proleptic Gregorian ordinals and many other calendar " +"systems." +msgstr "" + +#: ../../library/datetime.rst:2937 +msgid "" +"See R. H. van Gent's `guide to the mathematics of the ISO 8601 calendar " +"`_ for a good explanation." +msgstr "" + +#: ../../library/datetime.rst:2493 +msgid "% (percent)" +msgstr "" + +#: ../../library/datetime.rst:2493 +msgid "datetime format" +msgstr "" diff --git a/library/dialog.po b/library/dialog.po index 92c9ca83..2a613a65 100644 --- a/library/dialog.po +++ b/library/dialog.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -139,32 +139,32 @@ msgid "" "listed below:" msgstr "" -#: ../../library/dialog.rst:0 +#: ../../library/dialog.rst:114 msgid "*parent* - the window to place the dialog on top of" msgstr "" -#: ../../library/dialog.rst:0 +#: ../../library/dialog.rst:116 msgid "*title* - the title of the window" msgstr "" -#: ../../library/dialog.rst:0 +#: ../../library/dialog.rst:118 msgid "*initialdir* - the directory that the dialog starts in" msgstr "" -#: ../../library/dialog.rst:0 +#: ../../library/dialog.rst:120 msgid "*initialfile* - the file selected upon opening of the dialog" msgstr "" -#: ../../library/dialog.rst:0 +#: ../../library/dialog.rst:122 msgid "" "*filetypes* - a sequence of (label, pattern) tuples, '*' wildcard is allowed" msgstr "" -#: ../../library/dialog.rst:0 +#: ../../library/dialog.rst:124 msgid "*defaultextension* - default extension to append to file (save dialogs)" msgstr "" -#: ../../library/dialog.rst:0 +#: ../../library/dialog.rst:126 msgid "*multiple* - when true, selection of multiple items is allowed" msgstr "" diff --git a/library/dialog.po~ b/library/dialog.po~ new file mode 100644 index 00000000..92c9ca83 --- /dev/null +++ b/library/dialog.po~ @@ -0,0 +1,388 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:01+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/dialog.rst:2 +msgid "Tkinter dialogs" +msgstr "" + +#: ../../library/dialog.rst:5 +msgid ":mod:`!tkinter.simpledialog` --- Standard Tkinter input dialogs" +msgstr "" + +#: ../../library/dialog.rst:10 +msgid "**Source code:** :source:`Lib/tkinter/simpledialog.py`" +msgstr "" + +#: ../../library/dialog.rst:14 +msgid "" +"The :mod:`!tkinter.simpledialog` module contains convenience classes and " +"functions for creating simple modal dialogs to get a value from the user." +msgstr "" + +#: ../../library/dialog.rst:22 +msgid "" +"Prompt the user to enter a value of the desired type and return it, or " +"``None`` if the dialog is cancelled." +msgstr "" + +#: ../../library/dialog.rst:25 +msgid "" +"*title* is the dialog title and *prompt* the message shown above the entry. " +"*initialvalue* is the value initially placed in the entry. *parent* is the " +"window over which the dialog is shown. :func:`askinteger` and :func:" +"`askfloat` also accept *minvalue* and *maxvalue*, which bound the accepted " +"value. :func:`askstring` also accepts *show*, a character used to mask the " +"entered text, for example ``'*'`` to hide a password." +msgstr "" + +#: ../../library/dialog.rst:35 +msgid "" +"The base class for custom dialogs. Instantiating it shows the dialog modally " +"and returns once the user closes it; the entered value is then available in " +"the :attr:`!result` attribute." +msgstr "" + +#: ../../library/dialog.rst:41 +msgid "" +"The value produced by :meth:`apply`, or ``None`` if the dialog was cancelled." +msgstr "" + +#: ../../library/dialog.rst:46 +msgid "" +"Override to construct the dialog's interface and return the widget that " +"should have initial focus." +msgstr "" + +#: ../../library/dialog.rst:51 +msgid "" +"Default behaviour adds OK and Cancel buttons. Override for custom button " +"layouts." +msgstr "" + +#: ../../library/dialog.rst:56 +msgid "" +"Validate the data entered by the user. Return true if it is valid, in which " +"case the dialog proceeds to :meth:`apply`; return false to keep the dialog " +"open. The default implementation always returns true; override it to check " +"the input." +msgstr "" + +#: ../../library/dialog.rst:64 +msgid "" +"Process the data entered by the user, for example by storing it in the :attr:" +"`!result` attribute. Called after :meth:`validate` succeeds and just before " +"the dialog is destroyed. The default implementation does nothing; override " +"it to act on or store the result." +msgstr "" + +#: ../../library/dialog.rst:73 +msgid "" +"Destroy the dialog window, clearing the reference to the widget that had the " +"initial focus." +msgstr "" + +#: ../../library/dialog.rst:79 +msgid "" +"A simple modal dialog that displays the message *text* above a row of push " +"buttons whose labels are given by *buttons*, and returns the index of the " +"button the user presses. *default* is the index of the button activated by " +"the Return key, *cancel* the index returned when the window is closed " +"through the window manager, *title* the window title, and *class_* the Tk " +"class name of the window." +msgstr "" + +#: ../../library/dialog.rst:88 +msgid "" +"Display the dialog, wait until the user presses a button or closes the " +"window, and return the index of the chosen button." +msgstr "" + +#: ../../library/dialog.rst:94 +msgid ":mod:`!tkinter.filedialog` --- File selection dialogs" +msgstr "" + +#: ../../library/dialog.rst:99 +msgid "**Source code:** :source:`Lib/tkinter/filedialog.py`" +msgstr "" + +#: ../../library/dialog.rst:103 +msgid "" +"The :mod:`!tkinter.filedialog` module provides classes and factory functions " +"for creating file/directory selection windows." +msgstr "" + +#: ../../library/dialog.rst:107 +msgid "Native load/save dialogs" +msgstr "" + +#: ../../library/dialog.rst:109 +msgid "" +"The following classes and functions provide file dialog windows that combine " +"a native look-and-feel with configuration options to customize behaviour. " +"The following keyword arguments are applicable to the classes and functions " +"listed below:" +msgstr "" + +#: ../../library/dialog.rst:0 +msgid "*parent* - the window to place the dialog on top of" +msgstr "" + +#: ../../library/dialog.rst:0 +msgid "*title* - the title of the window" +msgstr "" + +#: ../../library/dialog.rst:0 +msgid "*initialdir* - the directory that the dialog starts in" +msgstr "" + +#: ../../library/dialog.rst:0 +msgid "*initialfile* - the file selected upon opening of the dialog" +msgstr "" + +#: ../../library/dialog.rst:0 +msgid "" +"*filetypes* - a sequence of (label, pattern) tuples, '*' wildcard is allowed" +msgstr "" + +#: ../../library/dialog.rst:0 +msgid "*defaultextension* - default extension to append to file (save dialogs)" +msgstr "" + +#: ../../library/dialog.rst:0 +msgid "*multiple* - when true, selection of multiple items is allowed" +msgstr "" + +#: ../../library/dialog.rst:129 +msgid "**Static factory functions**" +msgstr "" + +#: ../../library/dialog.rst:131 +msgid "" +"The below functions when called create a modal, native look-and-feel dialog, " +"wait for the user's selection, and return it. The exact return value depends " +"on the function (see below); when the dialog is cancelled it is an empty " +"string, an empty tuple or ``None``. The precise type of this empty value may " +"vary between platforms and Tk versions, so test the result for truth rather " +"than comparing it with a specific value." +msgstr "" + +#: ../../library/dialog.rst:142 +msgid "" +"Create an :class:`Open` dialog. :func:`askopenfile` returns the opened file " +"object, or ``None`` if the dialog is cancelled. :func:`askopenfiles` returns " +"a list of the opened file objects, or an empty tuple if cancelled. The files " +"are opened in mode *mode* (read-only ``'r'`` by default)." +msgstr "" + +#: ../../library/dialog.rst:151 +msgid "" +"Create a :class:`SaveAs` dialog and return the opened file object, or " +"``None`` if the dialog is cancelled. The file is opened in mode *mode* " +"(``'w'`` by default)." +msgstr "" + +#: ../../library/dialog.rst:158 +msgid "" +"Create an :class:`Open` dialog. :func:`askopenfilename` returns the selected " +"filename as a string, or an empty string if the dialog is cancelled. :func:" +"`askopenfilenames` returns a tuple of the selected filenames, or an empty " +"tuple if cancelled." +msgstr "" + +#: ../../library/dialog.rst:166 +msgid "" +"Create a :class:`SaveAs` dialog and return the selected filename as a " +"string, or an empty string if the dialog is cancelled." +msgstr "" + +#: ../../library/dialog.rst:171 +msgid "" +"Prompt the user to select a directory, and return its path as a string, or " +"an empty string if the dialog is cancelled. Additional keyword option: " +"*mustexist* - if true, the user may only select an existing directory (false " +"by default)." +msgstr "" + +#: ../../library/dialog.rst:180 +msgid "" +"The above three classes provide native dialog windows for loading and saving " +"files and for selecting a directory." +msgstr "" + +#: ../../library/dialog.rst:183 +msgid "**Convenience classes**" +msgstr "" + +#: ../../library/dialog.rst:185 +msgid "" +"The below classes are used for creating file/directory windows from scratch. " +"These do not emulate the native look-and-feel of the platform." +msgstr "" + +#: ../../library/dialog.rst:188 +msgid "" +"The *FileDialog* class should be subclassed for custom event handling and " +"behaviour." +msgstr "" + +#: ../../library/dialog.rst:193 +msgid "Create a basic file selection dialog." +msgstr "" + +#: ../../library/dialog.rst:197 +msgid "Trigger the termination of the dialog window." +msgstr "" + +#: ../../library/dialog.rst:201 +msgid "Event handler for double-click event on directory." +msgstr "" + +#: ../../library/dialog.rst:205 +msgid "Event handler for click event on directory." +msgstr "" + +#: ../../library/dialog.rst:209 +msgid "Event handler for double-click event on file." +msgstr "" + +#: ../../library/dialog.rst:213 +msgid "Event handler for single-click event on file." +msgstr "" + +#: ../../library/dialog.rst:217 +msgid "Filter the files by directory." +msgstr "" + +#: ../../library/dialog.rst:221 +msgid "Retrieve the file filter currently in use." +msgstr "" + +#: ../../library/dialog.rst:225 +msgid "Retrieve the currently selected item." +msgstr "" + +#: ../../library/dialog.rst:229 +msgid "Render dialog and start event loop." +msgstr "" + +#: ../../library/dialog.rst:233 +msgid "Exit dialog returning current selection." +msgstr "" + +#: ../../library/dialog.rst:237 +msgid "" +"Called when the user confirms the current selection. The base implementation " +"accepts the selection and closes the dialog; :class:`LoadFileDialog` and :" +"class:`SaveFileDialog` override it to check the selection first." +msgstr "" + +#: ../../library/dialog.rst:244 +msgid "Exit dialog returning filename, if any." +msgstr "" + +#: ../../library/dialog.rst:248 +msgid "Set the file filter." +msgstr "" + +#: ../../library/dialog.rst:252 +msgid "Update the current file selection to *file*." +msgstr "" + +#: ../../library/dialog.rst:257 +msgid "" +"A subclass of FileDialog that creates a dialog window for selecting an " +"existing file." +msgstr "" + +#: ../../library/dialog.rst:262 +msgid "" +"Test that a file is provided and that the selection indicates an already " +"existing file." +msgstr "" + +#: ../../library/dialog.rst:267 +msgid "" +"A subclass of FileDialog that creates a dialog window for selecting a " +"destination file." +msgstr "" + +#: ../../library/dialog.rst:272 +msgid "" +"Test whether or not the selection points to a valid file that is not a " +"directory. Confirmation is required if an already existing file is selected." +msgstr "" + +#: ../../library/dialog.rst:277 +msgid ":mod:`!tkinter.commondialog` --- Dialog window templates" +msgstr "" + +#: ../../library/dialog.rst:282 +msgid "**Source code:** :source:`Lib/tkinter/commondialog.py`" +msgstr "" + +#: ../../library/dialog.rst:286 +msgid "" +"The :mod:`!tkinter.commondialog` module provides the :class:`Dialog` class " +"that is the base class for dialogs defined in other supporting modules." +msgstr "" + +#: ../../library/dialog.rst:293 +msgid "Render the Dialog window." +msgstr "" + +#: ../../library/dialog.rst:297 +msgid ":mod:`!tkinter.dialog` --- Classic Tk dialog boxes" +msgstr "" + +#: ../../library/dialog.rst:302 +msgid "**Source code:** :source:`Lib/tkinter/dialog.py`" +msgstr "" + +#: ../../library/dialog.rst:306 +msgid "" +"The :mod:`!tkinter.dialog` module provides a simple modal dialog box built " +"on the classic (non-themed) Tk widgets." +msgstr "" + +#: ../../library/dialog.rst:311 +msgid "" +"The name of a bitmap (``'questhead'``) suitable for use as the *bitmap* of " +"a :class:`Dialog`." +msgstr "" + +#: ../../library/dialog.rst:316 +msgid "" +"Display a modal dialog box built from the classic (non-themed) Tk widgets " +"and wait for the user to press one of its buttons. The options, given " +"through *cnf* or as keyword arguments, are all required: *title* (the window " +"title), *text* (the message), *bitmap* (the name of a bitmap icon, such as :" +"data:`DIALOG_ICON`), *default* (the index of the default button) and " +"*strings* (the sequence of button labels). After construction, the :attr:`!" +"num` attribute holds the index of the button the user pressed." +msgstr "" + +#: ../../library/dialog.rst:327 +msgid "" +"Do nothing. The dialog window is destroyed automatically before the " +"constructor returns, so there is nothing left for this method to do." +msgstr "" + +#: ../../library/dialog.rst:334 +msgid "Modules :mod:`tkinter.messagebox`, :ref:`tut-files`" +msgstr "" diff --git a/library/difflib.po b/library/difflib.po index d5b818d9..8eef6c2c 100644 --- a/library/difflib.po +++ b/library/difflib.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -34,7 +34,7 @@ msgid "" "This module provides classes and functions for comparing sequences. Most of " "them compare sequences of text lines (for example lists of strings, or :term:" "`file objects `) and produce :dfn:`diffs` -- reports on the " -"differences. Diffs can be produced in in various formats, including HTML and " +"differences. Diffs can be produced in various formats, including HTML and " "context and unified diffs -- formats produced by tools like :manpage:`diff " "` and :manpage:`git diff `." msgstr "" @@ -88,7 +88,7 @@ msgstr "" #: ../../library/difflib.rst:54 msgid "" "Depending on your data, you should consider turning this heuristic off " -"(setting :class:`~difflib.SequenceMatcher`'s *autojunk* argument to to " +"(setting :class:`~difflib.SequenceMatcher`'s *autojunk* argument to " "``False``) or tuning it (using the *isjunk* argument, perhaps to one of the :" "ref:`predefined functions `)." msgstr "" diff --git a/library/difflib.po~ b/library/difflib.po~ new file mode 100644 index 00000000..d5b818d9 --- /dev/null +++ b/library/difflib.po~ @@ -0,0 +1,1112 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:01+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/difflib.rst:2 +msgid ":mod:`!difflib` --- Helpers for computing deltas" +msgstr "" + +#: ../../library/difflib.rst:7 +msgid "**Source code:** :source:`Lib/difflib.py`" +msgstr "" + +#: ../../library/difflib.rst:16 +msgid "" +"This module provides classes and functions for comparing sequences. Most of " +"them compare sequences of text lines (for example lists of strings, or :term:" +"`file objects `) and produce :dfn:`diffs` -- reports on the " +"differences. Diffs can be produced in in various formats, including HTML and " +"context and unified diffs -- formats produced by tools like :manpage:`diff " +"` and :manpage:`git diff `." +msgstr "" + +#: ../../library/difflib.rst:24 +msgid "" +"Comparisons are done using a matching algorithm implemented in :class:" +"`SequenceMatcher` -- a flexible class for comparing pairs of sequences of " +"any type, not just text, so long as the sequence elements are :term:" +"`hashable`." +msgstr "" + +#: ../../library/difflib.rst:33 +msgid "Junk heuristic" +msgstr "" + +#: ../../library/difflib.rst:35 +msgid "" +":mod:`!difflib` uses a :dfn:`junk` heuristic: some items are deemed to be :" +"dfn:`junk`, and ignored when searching for similarities. Ideally, these are " +"uninteresting or common items, such as blank lines or whitespace." +msgstr "" + +#: ../../library/difflib.rst:40 +msgid "" +"This heuristic can speed the algorithm up (because it reduces the number of " +"possible combinations) and it can produce results that are more " +"understandable for humans (typically breaking on whitespace). But it can " +"also cause pathological cases:" +msgstr "" + +#: ../../library/difflib.rst:45 +msgid "" +"Inappropriately chosen junk items can cause an unexpectedly **large** (but " +"still correct) result." +msgstr "" + +#: ../../library/difflib.rst:47 +msgid "" +"The default heuristic is **asymmetric**: only the second sequence is " +"inspected when determining what is considered junk, so comparing A to B can " +"give different results than comparing B to A and reversing the result." +msgstr "" + +#: ../../library/difflib.rst:51 +msgid "" +"By default, if the second input sequence is at least 200 items long, items " +"that account for more than 1% it are considered *junk*." +msgstr "" + +#: ../../library/difflib.rst:54 +msgid "" +"Depending on your data, you should consider turning this heuristic off " +"(setting :class:`~difflib.SequenceMatcher`'s *autojunk* argument to to " +"``False``) or tuning it (using the *isjunk* argument, perhaps to one of the :" +"ref:`predefined functions `)." +msgstr "" + +#: ../../library/difflib.rst:61 +msgid "The :mod:`!difflib` algorithm" +msgstr "" + +#: ../../library/difflib.rst:63 +msgid "" +"The algorithm used in :class:`SequenceMatcher` predates, and is a little " +"fancier than, an algorithm published in the late 1980s by Ratcliff and " +"Obershelp under the hyperbolic name \"gestalt pattern matching.\" The idea " +"is to find the longest contiguous subsequence common to both inputs, then " +"recursively handle the pieces of the sequences to the left and to the right " +"of the matching subsequence." +msgstr "" + +#: ../../library/difflib.rst:72 +msgid "" +"`Pattern Matching: The Gestalt Approach `_" +msgstr "" + +#: ../../library/difflib.rst:73 +msgid "" +"Discussion of a similar algorithm by John W. Ratcliff and D. E. Metzener. " +"This was published in Dr. Dobb's Journal in July, 1988." +msgstr "" + +#: ../../library/difflib.rst:76 +msgid "" +"As an extension to the Ratcliff and Obershelp algorithm, :mod:`!difflib` " +"searches for the longest *junk-free* contiguous subsequence. See the :ref:" +"`difflib-junk` section for details." +msgstr "" + +#: ../../library/difflib.rst:80 +msgid "Timing" +msgstr "" + +#: ../../library/difflib.rst:82 +msgid "" +"The basic Ratcliff-Obershelp algorithm is cubic time in the worst case and " +"quadratic time in the expected case. :mod:`difflib`'s algorithm is quadratic " +"time for the worst case and has expected-case behavior dependent in a " +"complicated way on how many elements the sequences have in common; best case " +"time is linear." +msgstr "" + +#: ../../library/difflib.rst:93 +msgid "Diff generation" +msgstr "" + +#: ../../library/difflib.rst:99 +msgid "" +"This is a class for comparing sequences of lines of text, and producing " +"human-readable differences or deltas. Differ uses :class:`SequenceMatcher` " +"both to compare sequences of lines, and to compare sequences of characters " +"within similar (near-matching) lines." +msgstr "" + +#: ../../library/difflib.rst:104 +msgid "Each line of a :class:`Differ` delta begins with a two-letter code:" +msgstr "" + +#: ../../library/difflib.rst:107 +msgid "Code" +msgstr "" + +#: ../../library/difflib.rst:107 ../../library/difflib.rst:584 +msgid "Meaning" +msgstr "" + +#: ../../library/difflib.rst:109 +msgid "``'- '``" +msgstr "" + +#: ../../library/difflib.rst:109 +msgid "line unique to sequence 1" +msgstr "" + +#: ../../library/difflib.rst:111 +msgid "``'+ '``" +msgstr "" + +#: ../../library/difflib.rst:111 +msgid "line unique to sequence 2" +msgstr "" + +#: ../../library/difflib.rst:113 +msgid "``' '``" +msgstr "" + +#: ../../library/difflib.rst:113 +msgid "line common to both sequences" +msgstr "" + +#: ../../library/difflib.rst:115 +msgid "``'? '``" +msgstr "" + +#: ../../library/difflib.rst:115 +msgid "line not present in either input sequence" +msgstr "" + +#: ../../library/difflib.rst:118 +msgid "" +"Lines beginning with '``?``' attempt to guide the eye to intraline " +"differences, and were not present in either input sequence. These lines can " +"be confusing if the sequences contain whitespace characters, such as spaces, " +"tabs or line breaks." +msgstr "" + +#: ../../library/difflib.rst:122 +msgid "" +"Note that :class:`Differ`\\ -generated deltas make no claim to be " +"**minimal** diffs. To the contrary, minimal diffs are often counter-" +"intuitive for humans, because they synch up anywhere possible, sometimes at " +"accidental matches 100 pages apart. Restricting synch points to contiguous " +"matches preserves some notion of locality, at the occasional cost of " +"producing a longer diff." +msgstr "" + +#: ../../library/difflib.rst:129 +msgid "The :class:`Differ` class has this constructor:" +msgstr "" + +#: ../../library/difflib.rst:133 +msgid "" +"Optional keyword parameters *linejunk* and *charjunk* are for filter " +"functions (or ``None``):" +msgstr "" + +#: ../../library/difflib.rst:136 +msgid "" +"*linejunk*: A function that accepts a single string argument, and returns " +"true if the string is junk. The default is ``None``, meaning that no line " +"is considered junk." +msgstr "" + +#: ../../library/difflib.rst:140 +msgid "" +"*charjunk*: A function that accepts a single character argument (a string of " +"length 1), and returns true if the character is junk. The default is " +"``None``, meaning that no character is considered junk." +msgstr "" + +#: ../../library/difflib.rst:144 +msgid "" +"These junk-filtering functions speed up matching to find differences and do " +"not cause any differing lines or characters to be ignored. Read the " +"description of the :meth:`~SequenceMatcher.find_longest_match` method's " +"*isjunk* parameter for an explanation." +msgstr "" + +#: ../../library/difflib.rst:150 +msgid "" +":class:`Differ` objects are used (deltas generated) via a single method:" +msgstr "" + +#: ../../library/difflib.rst:155 +msgid "" +"Compare two sequences of lines, and generate the delta (a sequence of lines)." +msgstr "" + +#: ../../library/difflib.rst:157 +msgid "" +"Each sequence must contain individual single-line strings ending with " +"newlines. Such sequences can be obtained from the :meth:`~io.IOBase." +"readlines` method of file-like objects. The generated delta also consists " +"of newline-terminated strings, ready to be printed as-is via the :meth:`~io." +"IOBase.writelines` method of a file-like object." +msgstr "" + +#: ../../library/difflib.rst:166 +msgid "" +"This class can be used to create an HTML table (or a complete HTML file " +"containing the table) showing a side by side, line by line comparison of " +"text with inter-line and intra-line change highlights. The table can be " +"generated in either full or contextual difference mode." +msgstr "" + +#: ../../library/difflib.rst:173 +msgid "" +"The trailing newlines get stripped before the diff, so the result can be " +"incomplete. See :gh:`71896` for details." +msgstr "" + +#: ../../library/difflib.rst:176 +msgid "The constructor for this class is:" +msgstr "" + +#: ../../library/difflib.rst:181 +msgid "Initializes instance of :class:`HtmlDiff`." +msgstr "" + +#: ../../library/difflib.rst:183 +msgid "" +"*tabsize* is an optional keyword argument to specify tab stop spacing and " +"defaults to ``8``." +msgstr "" + +#: ../../library/difflib.rst:186 +msgid "" +"*wrapcolumn* is an optional keyword to specify column number where lines are " +"broken and wrapped, defaults to ``None`` where lines are not wrapped." +msgstr "" + +#: ../../library/difflib.rst:189 +msgid "" +"*linejunk* and *charjunk* are optional keyword arguments passed into :func:" +"`ndiff` (used by :class:`HtmlDiff` to generate the side by side HTML " +"differences). See :func:`ndiff` documentation for argument default values " +"and descriptions." +msgstr "" + +#: ../../library/difflib.rst:193 +msgid "The following methods are public:" +msgstr "" + +#: ../../library/difflib.rst:198 +msgid "" +"Compares *fromlines* and *tolines* (lists of strings) and returns a string " +"which is a complete HTML file containing a table showing line by line " +"differences with inter-line and intra-line changes highlighted." +msgstr "" + +#: ../../library/difflib.rst:202 +msgid "" +"*fromdesc* and *todesc* are optional keyword arguments to specify from/to " +"file column header strings (both default to an empty string)." +msgstr "" + +#: ../../library/difflib.rst:205 +msgid "" +"*context* and *numlines* are both optional keyword arguments. Set *context* " +"to ``True`` when contextual differences are to be shown, else the default is " +"``False`` to show the full files. *numlines* defaults to ``5``. When " +"*context* is ``True`` *numlines* controls the number of context lines which " +"surround the difference highlights. When *context* is ``False`` *numlines* " +"controls the number of lines which are shown before a difference highlight " +"when using the \"next\" hyperlinks (setting to zero would cause the \"next\" " +"hyperlinks to place the next difference highlight at the top of the browser " +"without any leading context)." +msgstr "" + +#: ../../library/difflib.rst:216 +msgid "" +"*fromdesc* and *todesc* are interpreted as unescaped HTML and should be " +"properly escaped while receiving input from untrusted sources." +msgstr "" + +#: ../../library/difflib.rst:219 +msgid "" +"*charset* keyword-only argument was added. The default charset of HTML " +"document changed from ``'ISO-8859-1'`` to ``'utf-8'``." +msgstr "" + +#: ../../library/difflib.rst:225 +msgid "" +"Compares *fromlines* and *tolines* (lists of strings) and returns a string " +"which is a complete HTML table showing line by line differences with inter-" +"line and intra-line changes highlighted." +msgstr "" + +#: ../../library/difflib.rst:229 +msgid "" +"The arguments for this method are the same as those for the :meth:" +"`make_file` method." +msgstr "" + +#: ../../library/difflib.rst:236 +msgid "" +"Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` " +"generating the delta lines) in context diff format." +msgstr "" + +#: ../../library/difflib.rst:239 +msgid "" +"Context diffs are a compact way of showing just the lines that have changed " +"plus a few lines of context. The changes are shown in a before/after " +"style. The number of context lines is set by *n* which defaults to three." +msgstr "" + +#: ../../library/difflib.rst:243 +msgid "" +"By default, the diff control lines (those with ``***`` or ``---``) are " +"created with a trailing newline. This is helpful so that inputs created " +"from :func:`io.IOBase.readlines` result in diffs that are suitable for use " +"with :func:`io.IOBase.writelines` since both the inputs and outputs have " +"trailing newlines." +msgstr "" + +#: ../../library/difflib.rst:249 ../../library/difflib.rst:381 +msgid "" +"For inputs that do not have trailing newlines, set the *lineterm* argument " +"to ``\"\"`` so that the output will be uniformly newline free." +msgstr "" + +#: ../../library/difflib.rst:252 +msgid "" +"The context diff format normally has a header for filenames and modification " +"times. Any or all of these may be specified using strings for *fromfile*, " +"*tofile*, *fromfiledate*, and *tofiledate*. The modification times are " +"normally expressed in the ISO 8601 format. If not specified, the strings " +"default to blanks." +msgstr "" + +#: ../../library/difflib.rst:278 ../../library/difflib.rst:408 +msgid "See :ref:`difflib-interface` for a more detailed example." +msgstr "" + +#: ../../library/difflib.rst:283 +msgid "" +"Return a list of the best \"good enough\" matches. *word* is a sequence for " +"which close matches are desired (typically a string), and *possibilities* is " +"a list of sequences against which to match *word* (typically a list of " +"strings)." +msgstr "" + +#: ../../library/difflib.rst:287 +msgid "" +"Optional argument *n* (default ``3``) is the maximum number of close matches " +"to return; *n* must be greater than ``0``." +msgstr "" + +#: ../../library/difflib.rst:290 +msgid "" +"Optional argument *cutoff* (default ``0.6``) is a float in the range [0, 1]. " +"Possibilities that don't score at least that similar to *word* are ignored." +msgstr "" + +#: ../../library/difflib.rst:293 +msgid "" +"The best (no more than *n*) matches among the possibilities are returned in " +"a list, sorted by similarity score, most similar first." +msgstr "" + +#: ../../library/difflib.rst:309 +msgid "" +"Compare *a* and *b* (lists of strings); return a :class:`Differ`\\ -style " +"delta (a :term:`generator` generating the delta lines)." +msgstr "" + +#: ../../library/difflib.rst:312 +msgid "" +"Optional keyword parameters *linejunk* and *charjunk* are filtering " +"functions (or ``None``):" +msgstr "" + +#: ../../library/difflib.rst:315 +msgid "" +"*linejunk*: A function that accepts a single string argument, and returns " +"true if the string is junk, or false if not. The default is ``None``. There " +"is also a module-level function :func:`IS_LINE_JUNK`, which filters out " +"lines without visible characters, except for at most one hash character " +"(``'#'``) -- however the underlying :class:`SequenceMatcher` class does a " +"dynamic analysis of which lines are so frequent as to constitute noise, and " +"this usually works better than using this function." +msgstr "" + +#: ../../library/difflib.rst:323 +msgid "" +"*charjunk*: A function that accepts a character (a string of length 1), and " +"returns if the character is junk, or false if not. The default is module-" +"level function :func:`IS_CHARACTER_JUNK`, which filters out whitespace " +"characters (a blank or tab; it's a bad idea to include newline in this!)." +msgstr "" + +#: ../../library/difflib.rst:344 +msgid "Return one of the two sequences that generated a delta." +msgstr "" + +#: ../../library/difflib.rst:346 +msgid "" +"Given a *sequence* produced by :meth:`Differ.compare` or :func:`ndiff`, " +"extract lines originating from file 1 or 2 (parameter *which*), stripping " +"off line prefixes." +msgstr "" + +#: ../../library/difflib.rst:350 +msgid "Example:" +msgstr "" + +#: ../../library/difflib.rst:367 +msgid "" +"Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` " +"generating the delta lines) in unified diff format." +msgstr "" + +#: ../../library/difflib.rst:370 +msgid "" +"Unified diffs are a compact way of showing just the lines that have changed " +"plus a few lines of context. The changes are shown in an inline style " +"(instead of separate before/after blocks). The number of context lines is " +"set by *n* which defaults to three." +msgstr "" + +#: ../../library/difflib.rst:375 +msgid "" +"By default, the diff control lines (those with ``---``, ``+++``, or ``@@``) " +"are created with a trailing newline. This is helpful so that inputs created " +"from :func:`io.IOBase.readlines` result in diffs that are suitable for use " +"with :func:`io.IOBase.writelines` since both the inputs and outputs have " +"trailing newlines." +msgstr "" + +#: ../../library/difflib.rst:384 +msgid "" +"Set *color* to ``True`` to enable output in color, similar to :program:`git " +"diff --color`. Even if enabled, it can be :ref:`controlled using environment " +"variables `." +msgstr "" + +#: ../../library/difflib.rst:388 +msgid "" +"The unified diff format normally has a header for filenames and modification " +"times. Any or all of these may be specified using strings for *fromfile*, " +"*tofile*, *fromfiledate*, and *tofiledate*. The modification times are " +"normally expressed in the ISO 8601 format. If not specified, the strings " +"default to blanks." +msgstr "" + +#: ../../library/difflib.rst:410 +msgid "Added the *color* parameter." +msgstr "" + +#: ../../library/difflib.rst:416 +msgid "" +"Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a sequence " +"of delta lines (also bytes) in the format returned by *dfunc*. *dfunc* must " +"be a callable, typically either :func:`unified_diff` or :func:`context_diff`." +msgstr "" + +#: ../../library/difflib.rst:421 +msgid "" +"Allows you to compare data with unknown or inconsistent encoding. All inputs " +"except *n* must be bytes objects, not str. Works by losslessly converting " +"all inputs (except *n*) to str, and calling ``dfunc(a, b, fromfile, tofile, " +"fromfiledate, tofiledate, n, lineterm)``. The output of *dfunc* is then " +"converted back to bytes, so the delta lines that you receive have the same " +"unknown/inconsistent encodings as *a* and *b*." +msgstr "" + +#: ../../library/difflib.rst:434 +msgid "Junk definition functions" +msgstr "" + +#: ../../library/difflib.rst:438 +msgid "" +"Return ``True`` for ignorable lines. The line *line* is ignorable if *line* " +"is blank or contains a single ``'#'``, otherwise it is not ignorable. Used " +"as a default for parameter *linejunk* in :func:`ndiff` in older versions." +msgstr "" + +#: ../../library/difflib.rst:445 +msgid "" +"Return ``True`` for ignorable characters. The character *ch* is ignorable " +"if *ch* is a space or tab, otherwise it is not ignorable. Used as a default " +"for parameter *charjunk* in :func:`ndiff`." +msgstr "" + +#: ../../library/difflib.rst:453 +msgid "SequenceMatcher objects" +msgstr "" + +#: ../../library/difflib.rst:457 +msgid "" +"Optional argument *isjunk* must be ``None`` (the default) or a one-argument " +"function that takes a sequence element and returns true if and only if the " +"element is \"junk\" and should be ignored. Passing ``None`` for *isjunk* is " +"equivalent to passing ``lambda x: False``; in other words, no elements are " +"ignored. For example, pass::" +msgstr "" + +#: ../../library/difflib.rst:463 +msgid "lambda x: x in \" \\t\"" +msgstr "" + +#: ../../library/difflib.rst:465 +msgid "" +"if you're comparing lines as sequences of characters, and don't want to " +"synch up on blanks or hard tabs." +msgstr "" + +#: ../../library/difflib.rst:468 +msgid "" +"The optional arguments *a* and *b* are sequences to be compared; both " +"default to empty strings. The elements of both sequences must be :term:" +"`hashable`." +msgstr "" + +#: ../../library/difflib.rst:471 +msgid "" +"The optional argument *autojunk* can be used to disable the automatic junk " +"heuristic." +msgstr "" + +#: ../../library/difflib.rst:474 +msgid "Added the *autojunk* parameter." +msgstr "" + +#: ../../library/difflib.rst:477 +msgid "" +"SequenceMatcher objects get three data attributes: *bjunk* is the set of " +"elements of *b* for which *isjunk* is ``True``; *bpopular* is the set of non-" +"junk elements considered popular by the heuristic (if it is not disabled); " +"*b2j* is a dict mapping the remaining elements of *b* to a list of positions " +"where they occur. All three are reset whenever *b* is reset with :meth:" +"`set_seqs` or :meth:`set_seq2`." +msgstr "" + +#: ../../library/difflib.rst:484 +msgid "The *bjunk* and *bpopular* attributes." +msgstr "" + +#: ../../library/difflib.rst:487 +msgid ":class:`SequenceMatcher` objects have the following methods:" +msgstr "" + +#: ../../library/difflib.rst:491 +msgid "Set the two sequences to be compared." +msgstr "" + +#: ../../library/difflib.rst:493 +msgid "" +":class:`SequenceMatcher` computes and caches detailed information about the " +"second sequence, so if you want to compare one sequence against many " +"sequences, use :meth:`set_seq2` to set the commonly used sequence once and " +"call :meth:`set_seq1` repeatedly, once for each of the other sequences." +msgstr "" + +#: ../../library/difflib.rst:501 +msgid "" +"Set the first sequence to be compared. The second sequence to be compared " +"is not changed." +msgstr "" + +#: ../../library/difflib.rst:507 +msgid "" +"Set the second sequence to be compared. The first sequence to be compared " +"is not changed." +msgstr "" + +#: ../../library/difflib.rst:513 +msgid "Find longest matching block in ``a[alo:ahi]`` and ``b[blo:bhi]``." +msgstr "" + +#: ../../library/difflib.rst:515 +msgid "" +"If *isjunk* was omitted or ``None``, :meth:`find_longest_match` returns " +"``(i, j, k)`` such that ``a[i:i+k]`` is equal to ``b[j:j+k]``, where ``alo " +"<= i <= i+k <= ahi`` and ``blo <= j <= j+k <= bhi``. For all ``(i', j', " +"k')`` meeting those conditions, the additional conditions ``k >= k'``, ``i " +"<= i'``, and if ``i == i'``, ``j <= j'`` are also met. In other words, of " +"all maximal matching blocks, return one that starts earliest in *a*, and of " +"all those maximal matching blocks that start earliest in *a*, return the one " +"that starts earliest in *b*." +msgstr "" + +#: ../../library/difflib.rst:528 +msgid "" +"If *isjunk* was provided, first the longest matching block is determined as " +"above, but with the additional restriction that no junk element appears in " +"the block. Then that block is extended as far as possible by matching " +"(only) junk elements on both sides. So the resulting block never matches on " +"junk except as identical junk happens to be adjacent to an interesting match." +msgstr "" + +#: ../../library/difflib.rst:535 +msgid "" +"Here's the same example as before, but considering blanks to be junk. That " +"prevents ``' abcd'`` from matching the ``' abcd'`` at the tail end of the " +"second sequence directly. Instead only the ``'abcd'`` can match, and " +"matches the leftmost ``'abcd'`` in the second sequence:" +msgstr "" + +#: ../../library/difflib.rst:544 +msgid "If no blocks match, this returns ``(alo, blo, 0)``." +msgstr "" + +#: ../../library/difflib.rst:546 +msgid "This method returns a :term:`named tuple` ``Match(a, b, size)``." +msgstr "" + +#: ../../library/difflib.rst:548 +msgid "Added default arguments." +msgstr "" + +#: ../../library/difflib.rst:554 +msgid "" +"Return list of triples describing non-overlapping matching subsequences. " +"Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:" +"j+n]``. The triples are monotonically increasing in *i* and *j*." +msgstr "" + +#: ../../library/difflib.rst:559 +msgid "" +"The last triple is a dummy, and has the value ``(len(a), len(b), 0)``. It " +"is the only triple with ``n == 0``. If ``(i, j, n)`` and ``(i', j', n')`` " +"are adjacent triples in the list, and the second is not the last triple in " +"the list, then ``i+n < i'`` or ``j+n < j'``; in other words, adjacent " +"triples always describe non-adjacent equal blocks." +msgstr "" + +#: ../../library/difflib.rst:567 +msgid "" +">>> s = SequenceMatcher(None, \"abxcd\", \"abcd\")\n" +">>> s.get_matching_blocks()\n" +"[Match(a=0, b=0, size=2), Match(a=3, b=2, size=2), Match(a=5, b=4, size=0)]" +msgstr "" + +#: ../../library/difflib.rst:576 +msgid "" +"Return list of 5-tuples describing how to turn *a* into *b*. Each tuple is " +"of the form ``(tag, i1, i2, j1, j2)``. The first tuple has ``i1 == j1 == " +"0``, and remaining tuples have *i1* equal to the *i2* from the preceding " +"tuple, and, likewise, *j1* equal to the previous *j2*." +msgstr "" + +#: ../../library/difflib.rst:581 +msgid "The *tag* values are strings, with these meanings:" +msgstr "" + +#: ../../library/difflib.rst:584 +msgid "Value" +msgstr "" + +#: ../../library/difflib.rst:586 +msgid "``'replace'``" +msgstr "" + +#: ../../library/difflib.rst:586 +msgid "``a[i1:i2]`` should be replaced by ``b[j1:j2]``." +msgstr "" + +#: ../../library/difflib.rst:589 +msgid "``'delete'``" +msgstr "" + +#: ../../library/difflib.rst:589 +msgid "``a[i1:i2]`` should be deleted. Note that ``j1 == j2`` in this case." +msgstr "" + +#: ../../library/difflib.rst:592 +msgid "``'insert'``" +msgstr "" + +#: ../../library/difflib.rst:592 +msgid "" +"``b[j1:j2]`` should be inserted at ``a[i1:i1]``. Note that ``i1 == i2`` in " +"this case." +msgstr "" + +#: ../../library/difflib.rst:596 +msgid "``'equal'``" +msgstr "" + +#: ../../library/difflib.rst:596 +msgid "``a[i1:i2] == b[j1:j2]`` (the sub-sequences are equal)." +msgstr "" + +#: ../../library/difflib.rst:600 +msgid "For example::" +msgstr "Zum Beispiel::" + +#: ../../library/difflib.rst:602 +msgid "" +">>> a = \"qabxcd\"\n" +">>> b = \"abycdf\"\n" +">>> s = SequenceMatcher(None, a, b)\n" +">>> for tag, i1, i2, j1, j2 in s.get_opcodes():\n" +"... print('{:7} a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format(\n" +"... tag, i1, i2, j1, j2, a[i1:i2], b[j1:j2]))\n" +"delete a[0:1] --> b[0:0] 'q' --> ''\n" +"equal a[1:3] --> b[0:2] 'ab' --> 'ab'\n" +"replace a[3:4] --> b[2:3] 'x' --> 'y'\n" +"equal a[4:6] --> b[3:5] 'cd' --> 'cd'\n" +"insert a[6:6] --> b[5:6] '' --> 'f'" +msgstr "" + +#: ../../library/difflib.rst:617 +msgid "Return a :term:`generator` of groups with up to *n* lines of context." +msgstr "" + +#: ../../library/difflib.rst:619 +msgid "" +"Starting with the groups returned by :meth:`get_opcodes`, this method splits " +"out smaller change clusters and eliminates intervening ranges which have no " +"changes." +msgstr "" + +#: ../../library/difflib.rst:623 +msgid "The groups are returned in the same format as :meth:`get_opcodes`." +msgstr "" + +#: ../../library/difflib.rst:628 +msgid "" +"Return a measure of the sequences' similarity as a float in the range [0, 1]." +msgstr "" + +#: ../../library/difflib.rst:631 +msgid "" +"Where T is the total number of elements in both sequences, and M is the " +"number of matches, this is 2.0\\*M / T. Note that this is ``1.0`` if the " +"sequences are identical, and ``0.0`` if they have nothing in common." +msgstr "" + +#: ../../library/difflib.rst:635 +msgid "" +"This is expensive to compute if :meth:`get_matching_blocks` or :meth:" +"`get_opcodes` hasn't already been called, in which case you may want to try :" +"meth:`quick_ratio` or :meth:`real_quick_ratio` first to get an upper bound." +msgstr "" + +#: ../../library/difflib.rst:643 +msgid "Return an upper bound on :meth:`ratio` relatively quickly." +msgstr "" + +#: ../../library/difflib.rst:648 +msgid "Return an upper bound on :meth:`ratio` very quickly." +msgstr "" + +#: ../../library/difflib.rst:651 +msgid "" +"The three methods that return the ratio of matching to total characters can " +"give different results due to differing levels of approximation, although :" +"meth:`~SequenceMatcher.quick_ratio` and :meth:`~SequenceMatcher." +"real_quick_ratio` are always at least as large as :meth:`~SequenceMatcher." +"ratio`:" +msgstr "" + +#: ../../library/difflib.rst:666 +msgid "Examples" +msgstr "" + +#: ../../library/difflib.rst:671 +msgid "SequenceMatcher examples" +msgstr "" + +#: ../../library/difflib.rst:673 +msgid "This example compares two strings, considering blanks to be \"junk\":" +msgstr "" + +#: ../../library/difflib.rst:679 +msgid "" +":meth:`~SequenceMatcher.ratio` returns a float in [0, 1], measuring the " +"similarity of the sequences. As a rule of thumb, a :meth:`~SequenceMatcher." +"ratio` value over 0.6 means the sequences are close matches:" +msgstr "" + +#: ../../library/difflib.rst:686 +msgid "" +"If you're only interested in where the sequences match, :meth:" +"`~SequenceMatcher.get_matching_blocks` is handy:" +msgstr "" + +#: ../../library/difflib.rst:695 +msgid "" +"Note that the last tuple returned by :meth:`~SequenceMatcher." +"get_matching_blocks` is always a dummy, ``(len(a), len(b), 0)``, and this is " +"the only case in which the last tuple element (number of elements matched) " +"is ``0``." +msgstr "" + +#: ../../library/difflib.rst:699 +msgid "" +"If you want to know how to change the first sequence into the second, use :" +"meth:`~SequenceMatcher.get_opcodes`:" +msgstr "" + +#: ../../library/difflib.rst:710 +msgid "" +"The :func:`get_close_matches` function in this module which shows how simple " +"code building on :class:`SequenceMatcher` can be used to do useful work." +msgstr "" + +#: ../../library/difflib.rst:714 +msgid "" +"`Simple version control recipe `_ for a small application built with :class:" +"`SequenceMatcher`." +msgstr "" + +#: ../../library/difflib.rst:722 +#, fuzzy +msgid "Differ example" +msgstr "Zum Beispiel::" + +#: ../../library/difflib.rst:724 +msgid "" +"This example compares two texts. First we set up the texts, sequences of " +"individual single-line strings ending with newlines (such sequences can also " +"be obtained from the :meth:`~io.IOBase.readlines` method of file-like " +"objects):" +msgstr "" + +#: ../../library/difflib.rst:743 +msgid "Next we instantiate a Differ object:" +msgstr "" + +#: ../../library/difflib.rst:747 +msgid "" +"Note that when instantiating a :class:`Differ` object we may pass functions " +"to filter out line and character \"junk.\" See the :meth:`Differ` " +"constructor for details." +msgstr "" + +#: ../../library/difflib.rst:751 +msgid "Finally, we compare the two:" +msgstr "" + +#: ../../library/difflib.rst:755 +msgid "``result`` is a list of strings, so let's pretty-print it:" +msgstr "" + +#: ../../library/difflib.rst:770 +msgid "As a single multi-line string it looks like this:" +msgstr "" + +#: ../../library/difflib.rst:789 +msgid "A command-line interface to difflib" +msgstr "" + +#: ../../library/difflib.rst:791 +msgid "" +"This example shows how to use difflib to create a ``diff``-like utility." +msgstr "" + +#: ../../library/difflib.rst:793 +msgid "" +"\"\"\" Command-line interface to difflib.py providing diffs in four " +"formats:\n" +"\n" +"* ndiff: lists every line and highlights interline changes.\n" +"* context: highlights clusters of changes in a before/after format.\n" +"* unified: highlights clusters of changes in an inline format.\n" +"* html: generates side by side comparison with change highlights.\n" +"\n" +"\"\"\"\n" +"\n" +"import sys, os, difflib, argparse\n" +"import datetime as dt\n" +"\n" +"def file_mtime(path):\n" +" t = dt.datetime.fromtimestamp(os.stat(path).st_mtime,\n" +" dt.timezone.utc)\n" +" return t.astimezone().isoformat()\n" +"\n" +"def main():\n" +"\n" +" parser = argparse.ArgumentParser()\n" +" parser.add_argument('-c', action='store_true', default=False,\n" +" help='Produce a context format diff (default)')\n" +" parser.add_argument('-u', action='store_true', default=False,\n" +" help='Produce a unified format diff')\n" +" parser.add_argument('-m', action='store_true', default=False,\n" +" help='Produce HTML side by side diff '\n" +" '(can use -c and -l in conjunction)')\n" +" parser.add_argument('-n', action='store_true', default=False,\n" +" help='Produce a ndiff format diff')\n" +" parser.add_argument('-l', '--lines', type=int, default=3,\n" +" help='Set number of context lines (default 3)')\n" +" parser.add_argument('fromfile')\n" +" parser.add_argument('tofile')\n" +" options = parser.parse_args()\n" +"\n" +" n = options.lines\n" +" fromfile = options.fromfile\n" +" tofile = options.tofile\n" +"\n" +" fromdate = file_mtime(fromfile)\n" +" todate = file_mtime(tofile)\n" +" with open(fromfile) as ff:\n" +" fromlines = ff.readlines()\n" +" with open(tofile) as tf:\n" +" tolines = tf.readlines()\n" +"\n" +" if options.u:\n" +" diff = difflib.unified_diff(fromlines, tolines, fromfile, tofile, " +"fromdate, todate, n=n)\n" +" elif options.n:\n" +" diff = difflib.ndiff(fromlines, tolines)\n" +" elif options.m:\n" +" diff = difflib.HtmlDiff().make_file(fromlines,tolines,fromfile," +"tofile,context=options.c,numlines=n)\n" +" else:\n" +" diff = difflib.context_diff(fromlines, tolines, fromfile, tofile, " +"fromdate, todate, n=n)\n" +"\n" +" sys.stdout.writelines(diff)\n" +"\n" +"if __name__ == '__main__':\n" +" main()\n" +msgstr "" + +#: ../../library/difflib.rst:796 +msgid "ndiff example" +msgstr "" + +#: ../../library/difflib.rst:798 +msgid "This example shows how to use :func:`difflib.ndiff`." +msgstr "" + +#: ../../library/difflib.rst:800 +msgid "" +"\"\"\"ndiff [-q] file1 file2\n" +" or\n" +"ndiff (-r1 | -r2) < ndiff_output > file1_or_file2\n" +"\n" +"Print a human-friendly file difference report to stdout. Both inter-\n" +"and intra-line differences are noted. In the second form, recreate file1\n" +"(-r1) or file2 (-r2) on stdout, from an ndiff report on stdin.\n" +"\n" +"In the first form, if -q (\"quiet\") is not specified, the first two lines\n" +"of output are\n" +"\n" +"-: file1\n" +"+: file2\n" +"\n" +"Each remaining line begins with a two-letter code:\n" +"\n" +" \"- \" line unique to file1\n" +" \"+ \" line unique to file2\n" +" \" \" line common to both files\n" +" \"? \" line not present in either input file\n" +"\n" +"Lines beginning with \"? \" attempt to guide the eye to intraline\n" +"differences, and were not present in either input file. These lines can be\n" +"confusing if the source files contain tab characters.\n" +"\n" +"The first file can be recovered by retaining only lines that begin with\n" +"\" \" or \"- \", and deleting those 2-character prefixes; use ndiff with -" +"r1.\n" +"\n" +"The second file can be recovered similarly, but by retaining only \" \" " +"and\n" +"\"+ \" lines; use ndiff with -r2; or, on Unix, the second file can be\n" +"recovered by piping the output through\n" +"\n" +" sed -n '/^[+ ] /s/^..//p'\n" +"\"\"\"\n" +"\n" +"__version__ = 1, 7, 0\n" +"\n" +"import difflib, sys\n" +"\n" +"def fail(msg):\n" +" out = sys.stderr.write\n" +" out(msg + \"\\n\\n\")\n" +" out(__doc__)\n" +" return 0\n" +"\n" +"# open a file & return the file object; gripe and return 0 if it\n" +"# couldn't be opened\n" +"def fopen(fname):\n" +" try:\n" +" return open(fname)\n" +" except IOError as detail:\n" +" return fail(\"couldn't open \" + fname + \": \" + str(detail))\n" +"\n" +"# open two files & spray the diff to stdout; return false iff a problem\n" +"def fcompare(f1name, f2name):\n" +" f1 = fopen(f1name)\n" +" f2 = fopen(f2name)\n" +" if not f1 or not f2:\n" +" return 0\n" +"\n" +" a = f1.readlines(); f1.close()\n" +" b = f2.readlines(); f2.close()\n" +" for line in difflib.ndiff(a, b):\n" +" print(line, end=' ')\n" +"\n" +" return 1\n" +"\n" +"# crack args (sys.argv[1:] is normal) & compare;\n" +"# return false iff a problem\n" +"\n" +"def main(args):\n" +" import getopt\n" +" try:\n" +" opts, args = getopt.getopt(args, \"qr:\")\n" +" except getopt.error as detail:\n" +" return fail(str(detail))\n" +" noisy = 1\n" +" qseen = rseen = 0\n" +" for opt, val in opts:\n" +" if opt == \"-q\":\n" +" qseen = 1\n" +" noisy = 0\n" +" elif opt == \"-r\":\n" +" rseen = 1\n" +" whichfile = val\n" +" if qseen and rseen:\n" +" return fail(\"can't specify both -q and -r\")\n" +" if rseen:\n" +" if args:\n" +" return fail(\"no args allowed with -r option\")\n" +" if whichfile in (\"1\", \"2\"):\n" +" restore(whichfile)\n" +" return 1\n" +" return fail(\"-r value must be 1 or 2\")\n" +" if len(args) != 2:\n" +" return fail(\"need 2 filename args\")\n" +" f1name, f2name = args\n" +" if noisy:\n" +" print('-:', f1name)\n" +" print('+:', f2name)\n" +" return fcompare(f1name, f2name)\n" +"\n" +"# read ndiff output from stdin, and print file1 (which=='1') or\n" +"# file2 (which=='2') to stdout\n" +"\n" +"def restore(which):\n" +" restored = difflib.restore(sys.stdin.readlines(), which)\n" +" sys.stdout.writelines(restored)\n" +"\n" +"if __name__ == '__main__':\n" +" main(sys.argv[1:])\n" +msgstr "" diff --git a/library/dis.po b/library/dis.po index 8ef1d060..ba8870fc 100644 --- a/library/dis.po +++ b/library/dis.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -1512,8 +1512,8 @@ msgstr "" msgid "" "``STACK[-1]`` is an :term:`iterator`. Call its :meth:`~iterator.__next__` " "method. If this yields a new value, push it on the stack (leaving the " -"iterator below it). If the iterator indicates it is exhausted then the byte " -"code counter is incremented by *delta*." +"iterator below it). If the iterator indicates it is :term:`exhausted` then " +"the byte code counter is incremented by *delta*." msgstr "" #: ../../library/dis.rst:1430 diff --git a/library/dis.po~ b/library/dis.po~ new file mode 100644 index 00000000..8ef1d060 --- /dev/null +++ b/library/dis.po~ @@ -0,0 +1,2333 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:01+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/dis.rst:2 +msgid ":mod:`!dis` --- Disassembler for Python bytecode" +msgstr "" + +#: ../../library/dis.rst:7 +msgid "**Source code:** :source:`Lib/dis.py`" +msgstr "" + +#: ../../library/dis.rst:17 +msgid "" +"The :mod:`!dis` module supports the analysis of CPython :term:`bytecode` by " +"disassembling it. The CPython bytecode which this module takes as an input " +"is defined in the file :file:`Include/opcode.h` and used by the compiler and " +"the interpreter." +msgstr "" + +#: ../../library/dis.rst:24 +msgid "" +"Bytecode is an implementation detail of the CPython interpreter. No " +"guarantees are made that bytecode will not be added, removed, or changed " +"between versions of Python. Use of this module should not be considered to " +"work across Python VMs or Python releases." +msgstr "" + +#: ../../library/dis.rst:29 +msgid "" +"Use 2 bytes for each instruction. Previously the number of bytes varied by " +"instruction." +msgstr "" + +#: ../../library/dis.rst:33 +msgid "" +"The argument of jump, exception handling and loop instructions is now the " +"instruction offset rather than the byte offset." +msgstr "" + +#: ../../library/dis.rst:37 +msgid "" +"Some instructions are accompanied by one or more inline cache entries, which " +"take the form of :opcode:`CACHE` instructions. These instructions are hidden " +"by default, but can be shown by passing ``show_caches=True`` to any :mod:`!" +"dis` utility. Furthermore, the interpreter now adapts the bytecode to " +"specialize it for different runtime conditions. The adaptive bytecode can be " +"shown by passing ``adaptive=True``." +msgstr "" + +#: ../../library/dis.rst:45 +msgid "" +"The argument of a jump is the offset of the target instruction relative to " +"the instruction that appears immediately after the jump instruction's :" +"opcode:`CACHE` entries." +msgstr "" + +#: ../../library/dis.rst:50 +msgid "" +"As a consequence, the presence of the :opcode:`CACHE` instructions is " +"transparent for forward jumps but needs to be taken into account when " +"reasoning about backward jumps." +msgstr "" + +#: ../../library/dis.rst:54 +msgid "" +"The output shows logical labels rather than instruction offsets for jump " +"targets and exception handlers. The ``-O`` command line option and the " +"``show_offsets`` argument were added." +msgstr "" + +#: ../../library/dis.rst:59 +msgid "" +"The :option:`-P ` command-line option and the " +"``show_positions`` argument were added." +msgstr "" + +#: ../../library/dis.rst:63 +msgid "The :option:`-S ` command-line option is added." +msgstr "" + +#: ../../library/dis.rst:65 +msgid "Example: Given the function :func:`!myfunc`::" +msgstr "" + +#: ../../library/dis.rst:67 +msgid "" +"def myfunc(alist):\n" +" return len(alist)" +msgstr "" + +#: ../../library/dis.rst:70 +msgid "" +"the following command can be used to display the disassembly of :func:`!" +"myfunc`:" +msgstr "" + +#: ../../library/dis.rst:73 +msgid "" +">>> dis.dis(myfunc)\n" +" 2 RESUME 0\n" +"\n" +" 3 LOAD_GLOBAL 1 (len + NULL)\n" +" LOAD_FAST_BORROW 0 (alist)\n" +" CALL 1\n" +" RETURN_VALUE" +msgstr "" + +#: ../../library/dis.rst:83 +msgid "(The \"2\" is a line number)." +msgstr "" + +#: ../../library/dis.rst:88 +msgid "Command-line interface" +msgstr "" + +#: ../../library/dis.rst:90 +msgid "" +"The :mod:`!dis` module can be invoked as a script from the command line:" +msgstr "" + +#: ../../library/dis.rst:92 +msgid "python -m dis [-h] [-C] [-O] [-P] [-S] [infile]" +msgstr "" + +#: ../../library/dis.rst:96 +msgid "The following options are accepted:" +msgstr "" + +#: ../../library/dis.rst:102 +msgid "Display usage and exit." +msgstr "" + +#: ../../library/dis.rst:106 +msgid "Show inline caches." +msgstr "" + +#: ../../library/dis.rst:112 +msgid "Show offsets of instructions." +msgstr "" + +#: ../../library/dis.rst:118 +msgid "Show positions of instructions in the source code." +msgstr "" + +#: ../../library/dis.rst:124 +msgid "Show specialized bytecode." +msgstr "" + +#: ../../library/dis.rst:128 +msgid "" +"If :file:`infile` is specified, its disassembled code will be written to " +"stdout. Otherwise, disassembly is performed on compiled source code received " +"from stdin." +msgstr "" + +#: ../../library/dis.rst:132 +msgid "Bytecode analysis" +msgstr "" + +#: ../../library/dis.rst:136 +msgid "" +"The bytecode analysis API allows pieces of Python code to be wrapped in a :" +"class:`Bytecode` object that provides easy access to details of the compiled " +"code." +msgstr "" + +#: ../../library/dis.rst:144 +msgid "" +"Analyse the bytecode corresponding to a function, generator, asynchronous " +"generator, coroutine, method, string of source code, or a code object (as " +"returned by :func:`compile`)." +msgstr "" + +#: ../../library/dis.rst:148 +msgid "" +"This is a convenience wrapper around many of the functions listed below, " +"most notably :func:`get_instructions`, as iterating over a :class:`Bytecode` " +"instance yields the bytecode operations as :class:`Instruction` instances." +msgstr "" + +#: ../../library/dis.rst:152 ../../library/dis.rst:373 +msgid "" +"If *first_line* is not ``None``, it indicates the line number that should be " +"reported for the first source line in the disassembled code. Otherwise, the " +"source line information (if any) is taken directly from the disassembled " +"code object." +msgstr "" + +#: ../../library/dis.rst:157 +msgid "" +"If *current_offset* is not ``None``, it refers to an instruction offset in " +"the disassembled code. Setting this means :meth:`.dis` will display a " +"\"current instruction\" marker against the specified opcode." +msgstr "" + +#: ../../library/dis.rst:161 +msgid "" +"If *show_caches* is ``True``, :meth:`.dis` will display inline cache entries " +"used by the interpreter to specialize the bytecode." +msgstr "" + +#: ../../library/dis.rst:164 +msgid "" +"If *adaptive* is ``True``, :meth:`.dis` will display specialized bytecode " +"that may be different from the original bytecode." +msgstr "" + +#: ../../library/dis.rst:167 +msgid "" +"If *show_offsets* is ``True``, :meth:`.dis` will include instruction offsets " +"in the output." +msgstr "" + +#: ../../library/dis.rst:170 +msgid "" +"If *show_positions* is ``True``, :meth:`.dis` will include instruction " +"source code positions in the output." +msgstr "" + +#: ../../library/dis.rst:175 +msgid "" +"Construct a :class:`Bytecode` instance from the given traceback, setting " +"*current_offset* to the instruction responsible for the exception." +msgstr "" + +#: ../../library/dis.rst:180 +msgid "The compiled code object." +msgstr "" + +#: ../../library/dis.rst:184 +msgid "The first source line of the code object (if available)" +msgstr "" + +#: ../../library/dis.rst:188 +msgid "" +"Return a formatted view of the bytecode operations (the same as printed by :" +"func:`dis.dis`, but returned as a multi-line string)." +msgstr "" + +#: ../../library/dis.rst:193 +msgid "" +"Return a formatted multi-line string with detailed information about the " +"code object, like :func:`code_info`." +msgstr "" + +#: ../../library/dis.rst:196 ../../library/dis.rst:242 +#: ../../library/dis.rst:295 +msgid "This can now handle coroutine and asynchronous generator objects." +msgstr "" + +#: ../../library/dis.rst:199 ../../library/dis.rst:298 +#: ../../library/dis.rst:320 ../../library/dis.rst:356 +#: ../../library/dis.rst:382 +msgid "Added the *show_caches* and *adaptive* parameters." +msgstr "" + +#: ../../library/dis.rst:202 +msgid "Added the *show_offsets* parameter" +msgstr "" + +#: ../../library/dis.rst:205 ../../library/dis.rst:304 +#: ../../library/dis.rst:326 ../../library/dis.rst:362 +msgid "Added the *show_positions* parameter." +msgstr "" + +#: ../../library/dis.rst:208 +msgid "Example:" +msgstr "" + +#: ../../library/dis.rst:210 +msgid "" +">>> bytecode = dis.Bytecode(myfunc)\n" +">>> for instr in bytecode:\n" +"... print(instr.opname)\n" +"...\n" +"RESUME\n" +"LOAD_GLOBAL\n" +"LOAD_FAST_BORROW\n" +"CALL\n" +"RETURN_VALUE" +msgstr "" + +#: ../../library/dis.rst:224 +msgid "Analysis functions" +msgstr "" + +#: ../../library/dis.rst:226 +msgid "" +"The :mod:`!dis` module also defines the following analysis functions that " +"convert the input directly to the desired output. They can be useful if only " +"a single operation is being performed, so the intermediate analysis object " +"isn't useful:" +msgstr "" + +#: ../../library/dis.rst:232 +msgid "" +"Return a formatted multi-line string with detailed code object information " +"for the supplied function, generator, asynchronous generator, coroutine, " +"method, source code string or code object." +msgstr "" + +#: ../../library/dis.rst:236 +msgid "" +"Note that the exact contents of code info strings are highly implementation " +"dependent and they may change arbitrarily across Python VMs or Python " +"releases." +msgstr "" + +#: ../../library/dis.rst:248 +msgid "" +"Print detailed code object information for the supplied function, method, " +"source code string or code object to *file* (or ``sys.stdout`` if *file* is " +"not specified)." +msgstr "" + +#: ../../library/dis.rst:252 +msgid "" +"This is a convenient shorthand for ``print(code_info(x), file=file)``, " +"intended for interactive exploration at the interpreter prompt." +msgstr "" + +#: ../../library/dis.rst:257 ../../library/dis.rst:289 +#: ../../library/dis.rst:317 ../../library/dis.rst:353 +msgid "Added *file* parameter." +msgstr "" + +#: ../../library/dis.rst:264 +msgid "" +"Disassemble the *x* object. *x* can denote either a module, a class, a " +"method, a function, a generator, an asynchronous generator, a coroutine, a " +"code object, a string of source code or a byte sequence of raw bytecode. For " +"a module, it disassembles all functions. For a class, it disassembles all " +"methods (including class and static methods). For a code object or sequence " +"of raw bytecode, it prints one line per bytecode instruction. It also " +"recursively disassembles nested code objects. These can include generator " +"expressions, nested functions, the bodies of nested classes, and the code " +"objects used for :ref:`annotation scopes `. Strings are " +"first compiled to code objects with the :func:`compile` built-in function " +"before being disassembled. If no object is provided, this function " +"disassembles the last traceback." +msgstr "" + +#: ../../library/dis.rst:277 ../../library/dis.rst:314 +#: ../../library/dis.rst:350 +msgid "" +"The disassembly is written as text to the supplied *file* argument if " +"provided and to ``sys.stdout`` otherwise." +msgstr "" + +#: ../../library/dis.rst:280 +msgid "" +"The maximal depth of recursion is limited by *depth* unless it is ``None``. " +"``depth=0`` means no recursion." +msgstr "" + +#: ../../library/dis.rst:283 +msgid "" +"If *show_caches* is ``True``, this function will display inline cache " +"entries used by the interpreter to specialize the bytecode." +msgstr "" + +#: ../../library/dis.rst:286 +msgid "" +"If *adaptive* is ``True``, this function will display specialized bytecode " +"that may be different from the original bytecode." +msgstr "" + +#: ../../library/dis.rst:292 +msgid "Implemented recursive disassembling and added *depth* parameter." +msgstr "" + +#: ../../library/dis.rst:301 ../../library/dis.rst:323 +#: ../../library/dis.rst:359 +msgid "Added the *show_offsets* parameter." +msgstr "" + +#: ../../library/dis.rst:310 +msgid "" +"Disassemble the top-of-stack function of a traceback, using the last " +"traceback if none was passed. The instruction causing the exception is " +"indicated." +msgstr "" + +#: ../../library/dis.rst:334 +msgid "" +"Disassemble a code object, indicating the last instruction if *lasti* was " +"provided. The output is divided in the following columns:" +msgstr "" + +#: ../../library/dis.rst:337 +msgid "" +"the source code location of the instruction. Complete location information " +"is shown if *show_positions* is true. Otherwise (the default) only the line " +"number is displayed." +msgstr "" + +#: ../../library/dis.rst:340 +msgid "the current instruction, indicated as ``-->``," +msgstr "" + +#: ../../library/dis.rst:341 +msgid "a labelled instruction, indicated with ``>>``," +msgstr "" + +#: ../../library/dis.rst:342 +msgid "the address of the instruction," +msgstr "" + +#: ../../library/dis.rst:343 +msgid "the operation code name," +msgstr "" + +#: ../../library/dis.rst:344 +msgid "operation parameters, and" +msgstr "" + +#: ../../library/dis.rst:345 +msgid "interpretation of the parameters in parentheses." +msgstr "" + +#: ../../library/dis.rst:347 +msgid "" +"The parameter interpretation recognizes local and global variable names, " +"constant values, branch targets, and compare operators." +msgstr "" + +#: ../../library/dis.rst:367 +msgid "" +"Return an iterator over the instructions in the supplied function, method, " +"source code string or code object." +msgstr "" + +#: ../../library/dis.rst:370 +msgid "" +"The iterator generates a series of :class:`Instruction` named tuples giving " +"the details of each operation in the supplied code." +msgstr "" + +#: ../../library/dis.rst:378 +msgid "The *adaptive* parameter works as it does in :func:`dis`." +msgstr "" + +#: ../../library/dis.rst:385 +msgid "" +"The *show_caches* parameter is deprecated and has no effect. The iterator " +"generates the :class:`Instruction` instances with the *cache_info* field " +"populated (regardless of the value of *show_caches*) and it no longer " +"generates separate items for the cache entries." +msgstr "" + +#: ../../library/dis.rst:393 +msgid "" +"This generator function uses the :meth:`~codeobject.co_lines` method of the :" +"ref:`code object ` *code* to find the offsets which are starts " +"of lines in the source code. They are generated as ``(offset, lineno)`` " +"pairs." +msgstr "" + +#: ../../library/dis.rst:398 +msgid "Line numbers can be decreasing. Before, they were always increasing." +msgstr "" + +#: ../../library/dis.rst:401 +msgid "" +"The :pep:`626` :meth:`~codeobject.co_lines` method is used instead of the :" +"attr:`~codeobject.co_firstlineno` and :attr:`!codeobject.co_lnotab` " +"attributes of the :ref:`code object `." +msgstr "" + +#: ../../library/dis.rst:406 +msgid "" +"Line numbers can be ``None`` for bytecode that does not map to source lines." +msgstr "" + +#: ../../library/dis.rst:412 +msgid "" +"Detect all offsets in the raw compiled bytecode string *code* which are jump " +"targets, and return a list of these offsets." +msgstr "" + +#: ../../library/dis.rst:418 +msgid "Compute the stack effect of *opcode* with argument *oparg*." +msgstr "" + +#: ../../library/dis.rst:420 +msgid "" +"If the code has a jump target and *jump* is ``True``, :func:`~stack_effect` " +"will return the stack effect of jumping. If *jump* is ``False``, it will " +"return the stack effect of not jumping. And if *jump* is ``None`` (default), " +"it will return the maximal stack effect of both cases." +msgstr "" + +#: ../../library/dis.rst:427 +msgid "Added *jump* parameter." +msgstr "" + +#: ../../library/dis.rst:430 +msgid "" +"If ``oparg`` is omitted (or ``None``), the stack effect is now returned for " +"``oparg=0``. Previously this was an error for opcodes that use their arg. It " +"is also no longer an error to pass an integer ``oparg`` when the ``opcode`` " +"does not use it; the ``oparg`` in this case is ignored." +msgstr "" + +#: ../../library/dis.rst:440 +msgid "Python Bytecode Instructions" +msgstr "" + +#: ../../library/dis.rst:442 +msgid "" +"The :func:`get_instructions` function and :class:`Bytecode` class provide " +"details of bytecode instructions as :class:`Instruction` instances:" +msgstr "" + +#: ../../library/dis.rst:447 +msgid "Details for a bytecode operation" +msgstr "" + +#: ../../library/dis.rst:451 +msgid "" +"numeric code for operation, corresponding to the opcode values listed below " +"and the bytecode values in the :ref:`opcode_collections`." +msgstr "" + +#: ../../library/dis.rst:457 +msgid "human readable name for operation" +msgstr "" + +#: ../../library/dis.rst:462 +msgid "" +"numeric code for the base operation if operation is specialized; otherwise " +"equal to :data:`opcode`" +msgstr "" + +#: ../../library/dis.rst:468 +msgid "" +"human readable name for the base operation if operation is specialized; " +"otherwise equal to :data:`opname`" +msgstr "" + +#: ../../library/dis.rst:474 +msgid "numeric argument to operation (if any), otherwise ``None``" +msgstr "" + +#: ../../library/dis.rst:478 +msgid "alias for :data:`arg`" +msgstr "" + +#: ../../library/dis.rst:482 +msgid "resolved arg value (if any), otherwise ``None``" +msgstr "" + +#: ../../library/dis.rst:487 +msgid "" +"human readable description of operation argument (if any), otherwise an " +"empty string." +msgstr "" + +#: ../../library/dis.rst:493 +msgid "start index of operation within bytecode sequence" +msgstr "" + +#: ../../library/dis.rst:498 +msgid "" +"start index of operation within bytecode sequence, including prefixed " +"``EXTENDED_ARG`` operations if present; otherwise equal to :data:`offset`" +msgstr "" + +#: ../../library/dis.rst:504 +msgid "start index of the cache entries following the operation" +msgstr "" + +#: ../../library/dis.rst:509 +msgid "end index of the cache entries following the operation" +msgstr "" + +#: ../../library/dis.rst:514 +msgid "``True`` if this opcode starts a source line, otherwise ``False``" +msgstr "" + +#: ../../library/dis.rst:519 +msgid "" +"source line number associated with this opcode (if any), otherwise ``None``" +msgstr "" + +#: ../../library/dis.rst:524 +msgid "``True`` if other code jumps to here, otherwise ``False``" +msgstr "" + +#: ../../library/dis.rst:529 +msgid "" +"bytecode index of the jump target if this is a jump operation, otherwise " +"``None``" +msgstr "" + +#: ../../library/dis.rst:535 +msgid "" +":class:`dis.Positions` object holding the start and end locations that are " +"covered by this instruction." +msgstr "" + +#: ../../library/dis.rst:540 +msgid "" +"Information about the cache entries of this instruction, as triplets of the " +"form ``(name, size, data)``, where the ``name`` and ``size`` describe the " +"cache format and data is the contents of the cache. ``cache_info`` is " +"``None`` if the instruction does not have caches." +msgstr "" + +#: ../../library/dis.rst:550 +msgid "Field ``positions`` is added." +msgstr "" + +#: ../../library/dis.rst:554 +msgid "Changed field ``starts_line``." +msgstr "" + +#: ../../library/dis.rst:556 +msgid "" +"Added fields ``start_offset``, ``cache_offset``, ``end_offset``, " +"``baseopname``, ``baseopcode``, ``jump_target``, ``oparg``, ``line_number`` " +"and ``cache_info``." +msgstr "" + +#: ../../library/dis.rst:563 +msgid "" +"In case the information is not available, some fields might be ``None``." +msgstr "" + +#: ../../library/dis.rst:573 +msgid "" +"The Python compiler currently generates the following bytecode instructions." +msgstr "" + +#: ../../library/dis.rst:576 +msgid "**General instructions**" +msgstr "" + +#: ../../library/dis.rst:578 +msgid "" +"In the following, We will refer to the interpreter stack as ``STACK`` and " +"describe operations on it as if it was a Python list. The top of the stack " +"corresponds to ``STACK[-1]`` in this language." +msgstr "" + +#: ../../library/dis.rst:584 +msgid "" +"Do nothing code. Used as a placeholder by the bytecode optimizer, and to " +"generate line tracing events." +msgstr "" + +#: ../../library/dis.rst:590 +msgid "" +"Do nothing code. Used by the interpreter to record :monitoring-event:" +"`BRANCH_LEFT` and :monitoring-event:`BRANCH_RIGHT` events for :mod:`sys." +"monitoring`." +msgstr "" + +#: ../../library/dis.rst:599 +msgid "Removes the iterator from the top of the stack." +msgstr "" + +#: ../../library/dis.rst:606 +msgid "Removes the top-of-stack item::" +msgstr "" + +#: ../../library/dis.rst:608 +msgid "STACK.pop()" +msgstr "" + +#: ../../library/dis.rst:613 +msgid "" +"Removes the top-of-stack item. Equivalent to ``POP_TOP``. Used to clean up " +"at the end of loops, hence the name." +msgstr "" + +#: ../../library/dis.rst:622 +msgid "Implements ``del STACK[-2]``. Used to clean up when a generator exits." +msgstr "" + +#: ../../library/dis.rst:630 +msgid "" +"Push the i-th item to the top of the stack without removing it from its " +"original location::" +msgstr "" + +#: ../../library/dis.rst:633 +msgid "" +"assert i > 0\n" +"STACK.append(STACK[-i])" +msgstr "" + +#: ../../library/dis.rst:641 +msgid "Swap the top of the stack with the i-th element::" +msgstr "" + +#: ../../library/dis.rst:643 +msgid "STACK[-i], STACK[-1] = STACK[-1], STACK[-i]" +msgstr "" + +#: ../../library/dis.rst:650 +msgid "" +"Rather than being an actual instruction, this opcode is used to mark extra " +"space for the interpreter to cache useful data directly in the bytecode " +"itself. It is automatically hidden by all ``dis`` utilities, but can be " +"viewed with ``show_caches=True``." +msgstr "" + +#: ../../library/dis.rst:655 +msgid "" +"Logically, this space is part of the preceding instruction. Many opcodes " +"expect to be followed by an exact number of caches, and will instruct the " +"interpreter to skip over them at runtime." +msgstr "" + +#: ../../library/dis.rst:659 +msgid "" +"Populated caches can look like arbitrary instructions, so great care should " +"be taken when reading or modifying raw, adaptive bytecode containing " +"quickened data." +msgstr "" + +#: ../../library/dis.rst:666 +msgid "**Unary operations**" +msgstr "" + +#: ../../library/dis.rst:668 +msgid "" +"Unary operations take the top of the stack, apply the operation, and push " +"the result back on the stack." +msgstr "" + +#: ../../library/dis.rst:674 +msgid "Implements ``STACK[-1] = -STACK[-1]``." +msgstr "" + +#: ../../library/dis.rst:679 +msgid "Implements ``STACK[-1] = not STACK[-1]``." +msgstr "" + +#: ../../library/dis.rst:681 ../../library/dis.rst:1383 +#: ../../library/dis.rst:1399 +msgid "This instruction now requires an exact :class:`bool` operand." +msgstr "" + +#: ../../library/dis.rst:687 +msgid "Implements ``STACK[-1] = ~STACK[-1]``." +msgstr "" + +#: ../../library/dis.rst:692 +msgid "Implements ``STACK[-1] = iter(STACK[-1])``." +msgstr "" + +#: ../../library/dis.rst:697 +msgid "" +"If ``STACK[-1]`` is a :term:`generator iterator` or :term:`coroutine` object " +"it is left as is. Otherwise, implements ``STACK[-1] = iter(STACK[-1])``." +msgstr "" + +#: ../../library/dis.rst:705 +msgid "Implements ``STACK[-1] = bool(STACK[-1])``." +msgstr "" + +#: ../../library/dis.rst:710 +msgid "**Binary and in-place operations**" +msgstr "" + +#: ../../library/dis.rst:712 +msgid "" +"Binary operations remove the top two items from the stack (``STACK[-1]`` and " +"``STACK[-2]``). They perform the operation, then put the result back on the " +"stack." +msgstr "" + +#: ../../library/dis.rst:715 +msgid "" +"In-place operations are like binary operations, but the operation is done in-" +"place when ``STACK[-2]`` supports it, and the resulting ``STACK[-1]`` may be " +"(but does not have to be) the original ``STACK[-2]``." +msgstr "" + +#: ../../library/dis.rst:722 +msgid "" +"Implements the binary and in-place operators (depending on the value of " +"*op*)::" +msgstr "" + +#: ../../library/dis.rst:725 +msgid "" +"rhs = STACK.pop()\n" +"lhs = STACK.pop()\n" +"STACK.append(lhs op rhs)" +msgstr "" + +#: ../../library/dis.rst:730 +msgid "" +"With oparg :``NB_SUBSCR``, implements binary subscript (replaces opcode " +"``BINARY_SUBSCR``)" +msgstr "" + +#: ../../library/dis.rst:736 ../../library/dis.rst:746 +#: ../../library/dis.rst:754 ../../library/dis.rst:766 +#: ../../library/dis.rst:844 ../../library/dis.rst:854 +#: ../../library/dis.rst:864 ../../library/dis.rst:1070 +#: ../../library/dis.rst:1081 ../../library/dis.rst:1226 +#: ../../library/dis.rst:1238 ../../library/dis.rst:1250 +msgid "Implements::" +msgstr "" + +#: ../../library/dis.rst:738 +msgid "" +"key = STACK.pop()\n" +"container = STACK.pop()\n" +"value = STACK.pop()\n" +"container[key] = value" +msgstr "" + +#: ../../library/dis.rst:748 +msgid "" +"key = STACK.pop()\n" +"container = STACK.pop()\n" +"del container[key]" +msgstr "" + +#: ../../library/dis.rst:756 +msgid "" +"end = STACK.pop()\n" +"start = STACK.pop()\n" +"container = STACK.pop()\n" +"STACK.append(container[start:end])" +msgstr "" + +#: ../../library/dis.rst:768 +msgid "" +"end = STACK.pop()\n" +"start = STACK.pop()\n" +"container = STACK.pop()\n" +"value = STACK.pop()\n" +"container[start:end] = value" +msgstr "" + +#: ../../library/dis.rst:777 +msgid "**Coroutine opcodes**" +msgstr "" + +#: ../../library/dis.rst:781 +msgid "" +"Implements ``STACK[-1] = get_awaitable(STACK[-1])``, where " +"``get_awaitable(o)`` returns ``o`` if ``o`` is a coroutine object or a " +"generator object with the :data:`~inspect.CO_ITERABLE_COROUTINE` flag, or " +"resolves ``o.__await__``." +msgstr "" + +#: ../../library/dis.rst:786 +msgid "" +"If the ``where`` operand is nonzero, it indicates where the instruction " +"occurs:" +msgstr "" + +#: ../../library/dis.rst:789 +msgid "``1``: After a call to ``__aenter__``" +msgstr "" + +#: ../../library/dis.rst:790 +msgid "``2``: After a call to ``__aexit__``" +msgstr "" + +#: ../../library/dis.rst:794 +msgid "Previously, this instruction did not have an oparg." +msgstr "" + +#: ../../library/dis.rst:800 +msgid "Implements ``STACK[-1] = STACK[-1].__aiter__()``." +msgstr "" + +#: ../../library/dis.rst:803 +msgid "Returning awaitable objects from ``__aiter__`` is no longer supported." +msgstr "" + +#: ../../library/dis.rst:810 +msgid "" +"Implement ``STACK.append(get_awaitable(STACK[-1].__anext__()))`` to the " +"stack. See ``GET_AWAITABLE`` for details about ``get_awaitable``." +msgstr "" + +#: ../../library/dis.rst:818 +msgid "" +"Terminates an :keyword:`async for` loop. Handles an exception raised when " +"awaiting a next item. The stack contains the async iterable in ``STACK[-2]`` " +"and the raised exception in ``STACK[-1]``. Both are popped. If the exception " +"is not :exc:`StopAsyncIteration`, it is re-raised." +msgstr "" + +#: ../../library/dis.rst:825 ../../library/dis.rst:916 +#: ../../library/dis.rst:927 +msgid "" +"Exception representation on the stack now consist of one, not three, items." +msgstr "" + +#: ../../library/dis.rst:831 +msgid "" +"Handles an exception raised during a :meth:`~generator.throw` or :meth:" +"`~generator.close` call through the current frame. If ``STACK[-1]`` is an " +"instance of :exc:`StopIteration`, pop three values from the stack and push " +"its ``value`` member. Otherwise, re-raise ``STACK[-1]``." +msgstr "" + +#: ../../library/dis.rst:840 +msgid "**Miscellaneous opcodes**" +msgstr "" + +#: ../../library/dis.rst:846 +msgid "" +"item = STACK.pop()\n" +"set.add(STACK[-i], item)" +msgstr "" + +#: ../../library/dis.rst:849 +msgid "Used to implement set comprehensions." +msgstr "" + +#: ../../library/dis.rst:856 +msgid "" +"item = STACK.pop()\n" +"list.append(STACK[-i], item)" +msgstr "" + +#: ../../library/dis.rst:859 +msgid "Used to implement list comprehensions." +msgstr "" + +#: ../../library/dis.rst:866 +msgid "" +"value = STACK.pop()\n" +"key = STACK.pop()\n" +"dict.__setitem__(STACK[-i], key, value)" +msgstr "" + +#: ../../library/dis.rst:870 +msgid "Used to implement dict comprehensions." +msgstr "" + +#: ../../library/dis.rst:873 +msgid "" +"Map value is ``STACK[-1]`` and map key is ``STACK[-2]``. Before, those were " +"reversed." +msgstr "" + +#: ../../library/dis.rst:877 +msgid "" +"For all of the :opcode:`SET_ADD`, :opcode:`LIST_APPEND` and :opcode:" +"`MAP_ADD` instructions, while the added value or key/value pair is popped " +"off, the container object remains on the stack so that it is available for " +"further iterations of the loop." +msgstr "" + +#: ../../library/dis.rst:885 +msgid "Returns with ``STACK[-1]`` to the caller of the function." +msgstr "" + +#: ../../library/dis.rst:890 +msgid "Yields ``STACK.pop()`` from a :term:`generator`." +msgstr "" + +#: ../../library/dis.rst:892 +msgid "oparg set to be the stack depth." +msgstr "" + +#: ../../library/dis.rst:895 +msgid "" +"oparg set to be the exception block depth, for efficient closing of " +"generators." +msgstr "" + +#: ../../library/dis.rst:898 +msgid "" +"oparg is ``1`` if this instruction is part of a yield-from or await, and " +"``0`` otherwise." +msgstr "" + +#: ../../library/dis.rst:904 +msgid "" +"Checks whether ``__annotations__`` is defined in ``locals()``, if not it is " +"set up to an empty ``dict``. This opcode is only emitted if a class or " +"module body contains :term:`variable annotations ` " +"statically." +msgstr "" + +#: ../../library/dis.rst:914 +msgid "" +"Pops a value from the stack, which is used to restore the exception state." +msgstr "" + +#: ../../library/dis.rst:921 +msgid "" +"Re-raises the exception currently on top of the stack. If oparg is non-zero, " +"pops an additional value from the stack which is used to set :attr:`~frame." +"f_lasti` of the current frame." +msgstr "" + +#: ../../library/dis.rst:932 +msgid "" +"Pops a value from the stack. Pushes the current exception to the top of the " +"stack. Pushes the value originally popped back to the stack. Used in " +"exception handlers." +msgstr "" + +#: ../../library/dis.rst:940 +msgid "" +"Performs exception matching for ``except``. Tests whether the ``STACK[-2]`` " +"is an exception matching ``STACK[-1]``. Pops ``STACK[-1]`` and pushes the " +"boolean result of the test." +msgstr "" + +#: ../../library/dis.rst:948 +msgid "" +"Performs exception matching for ``except*``. Applies ``split(STACK[-1])`` on " +"the exception group representing ``STACK[-2]``." +msgstr "" + +#: ../../library/dis.rst:951 +msgid "" +"In case of a match, pops two items from the stack and pushes the non-" +"matching subgroup (``None`` in case of full match) followed by the matching " +"subgroup. When there is no match, pops one item (the match type) and pushes " +"``None``." +msgstr "" + +#: ../../library/dis.rst:960 +msgid "" +"Calls the function in position 4 on the stack with arguments (type, val, tb) " +"representing the exception at the top of the stack. Used to implement the " +"call ``context_manager.__exit__(*exc_info())`` when an exception has " +"occurred in a :keyword:`with` statement." +msgstr "" + +#: ../../library/dis.rst:967 +msgid "" +"The ``__exit__`` function is in position 4 of the stack rather than 7. " +"Exception representation on the stack now consist of one, not three, items." +msgstr "" + +#: ../../library/dis.rst:974 +msgid "" +"Pushes a common constant onto the stack. The interpreter contains a " +"hardcoded list of constants supported by this instruction. Used by the :" +"keyword:`assert` statement to load :exc:`AssertionError`." +msgstr "" + +#: ../../library/dis.rst:983 +msgid "" +"Pushes :func:`!builtins.__build_class__` onto the stack. It is later called " +"to construct a class." +msgstr "" + +#: ../../library/dis.rst:988 +msgid "" +"Perform ``STACK.append(len(STACK[-1]))``. Used in :keyword:`match` " +"statements where comparison with structure of pattern is needed." +msgstr "" + +#: ../../library/dis.rst:996 +msgid "" +"If ``STACK[-1]`` is an instance of :class:`collections.abc.Mapping` (or, " +"more technically: if it has the :c:macro:`Py_TPFLAGS_MAPPING` flag set in " +"its :c:member:`~PyTypeObject.tp_flags`), push ``True`` onto the stack. " +"Otherwise, push ``False``." +msgstr "" + +#: ../../library/dis.rst:1006 +msgid "" +"If ``STACK[-1]`` is an instance of :class:`collections.abc.Sequence` and is " +"*not* an instance of :class:`str`/:class:`bytes`/:class:`bytearray` (or, " +"more technically: if it has the :c:macro:`Py_TPFLAGS_SEQUENCE` flag set in " +"its :c:member:`~PyTypeObject.tp_flags`), push ``True`` onto the stack. " +"Otherwise, push ``False``." +msgstr "" + +#: ../../library/dis.rst:1016 +msgid "" +"``STACK[-1]`` is a tuple of mapping keys, and ``STACK[-2]`` is the match " +"subject. If ``STACK[-2]`` contains all of the keys in ``STACK[-1]``, push a :" +"class:`tuple` containing the corresponding values. Otherwise, push ``None``." +msgstr "" + +#: ../../library/dis.rst:1022 ../../library/dis.rst:1768 +msgid "" +"Previously, this instruction also pushed a boolean value indicating success " +"(``True``) or failure (``False``)." +msgstr "" + +#: ../../library/dis.rst:1029 +msgid "" +"Implements ``name = STACK.pop()``. *namei* is the index of *name* in the " +"attribute :attr:`~codeobject.co_names` of the :ref:`code object `. The compiler tries to use :opcode:`STORE_FAST` or :opcode:" +"`STORE_GLOBAL` if possible." +msgstr "" + +#: ../../library/dis.rst:1036 +msgid "" +"Implements ``del name``, where *namei* is the index into :attr:`~codeobject." +"co_names` attribute of the :ref:`code object `." +msgstr "" + +#: ../../library/dis.rst:1042 +msgid "" +"Unpacks ``STACK[-1]`` into *count* individual values, which are put onto the " +"stack right-to-left. Require there to be exactly *count* values.::" +msgstr "" + +#: ../../library/dis.rst:1045 +msgid "" +"assert(len(STACK[-1]) == count)\n" +"STACK.extend(STACK.pop()[:-count-1:-1])" +msgstr "" + +#: ../../library/dis.rst:1051 +msgid "" +"Implements assignment with a starred target: Unpacks an iterable in " +"``STACK[-1]`` into individual values, where the total number of values can " +"be smaller than the number of items in the iterable: one of the new values " +"will be a list of all leftover items." +msgstr "" + +#: ../../library/dis.rst:1056 +msgid "The number of values before and after the list value is limited to 255." +msgstr "" + +#: ../../library/dis.rst:1058 +msgid "" +"The number of values before the list value is encoded in the argument of the " +"opcode. The number of values after the list if any is encoded using an " +"``EXTENDED_ARG``. As a consequence, the argument can be seen as a two bytes " +"values where the low byte of *counts* is the number of values before the " +"list value, the high byte of *counts* the number of values after it." +msgstr "" + +#: ../../library/dis.rst:1064 +msgid "" +"The extracted values are put onto the stack right-to-left, i.e. ``a, *b, c = " +"d`` will be stored after execution as ``STACK.extend((a, b, c))``." +msgstr "" + +#: ../../library/dis.rst:1072 +msgid "" +"obj = STACK.pop()\n" +"value = STACK.pop()\n" +"obj.name = value" +msgstr "" + +#: ../../library/dis.rst:1076 +msgid "" +"where *namei* is the index of name in :attr:`~codeobject.co_names` of the :" +"ref:`code object `." +msgstr "" + +#: ../../library/dis.rst:1083 +msgid "" +"obj = STACK.pop()\n" +"del obj.name" +msgstr "" + +#: ../../library/dis.rst:1086 +msgid "" +"where *namei* is the index of name into :attr:`~codeobject.co_names` of the :" +"ref:`code object `." +msgstr "" + +#: ../../library/dis.rst:1092 +msgid "Works as :opcode:`STORE_NAME`, but stores the name as a global." +msgstr "" + +#: ../../library/dis.rst:1097 +msgid "Works as :opcode:`DELETE_NAME`, but deletes a global name." +msgstr "" + +#: ../../library/dis.rst:1102 +msgid "Pushes ``co_consts[consti]`` onto the stack." +msgstr "" + +#: ../../library/dis.rst:1107 +msgid "" +"Pushes the integer ``i`` onto the stack. ``i`` must be in ``range(256)``" +msgstr "" + +#: ../../library/dis.rst:1115 +msgid "" +"Pushes the value associated with ``co_names[namei]`` onto the stack. The " +"name is looked up within the locals, then the globals, then the builtins." +msgstr "" + +#: ../../library/dis.rst:1121 +msgid "" +"Pushes a reference to the locals dictionary onto the stack. This is used to " +"prepare namespace dictionaries for :opcode:`LOAD_FROM_DICT_OR_DEREF` and :" +"opcode:`LOAD_FROM_DICT_OR_GLOBALS`." +msgstr "" + +#: ../../library/dis.rst:1130 +msgid "" +"Pops a mapping off the stack and looks up the value for ``co_names[namei]``. " +"If the name is not found there, looks it up in the globals and then the " +"builtins, similar to :opcode:`LOAD_GLOBAL`. This is used for loading global " +"variables in :ref:`annotation scopes ` within class " +"bodies." +msgstr "" + +#: ../../library/dis.rst:1141 +msgid "" +"Constructs a new :class:`~string.templatelib.Template` instance from a tuple " +"of strings and a tuple of interpolations and pushes the resulting object " +"onto the stack::" +msgstr "" + +#: ../../library/dis.rst:1145 +msgid "" +"interpolations = STACK.pop()\n" +"strings = STACK.pop()\n" +"STACK.append(_build_template(strings, interpolations))" +msgstr "" + +#: ../../library/dis.rst:1154 +msgid "" +"Constructs a new :class:`~string.templatelib.Interpolation` instance from a " +"value and its source expression and pushes the resulting object onto the " +"stack." +msgstr "" + +#: ../../library/dis.rst:1158 +msgid "" +"If no conversion or format specification is present, ``format`` is set to " +"``2``." +msgstr "" + +#: ../../library/dis.rst:1161 +msgid "" +"If the low bit of ``format`` is set, it indicates that the interpolation " +"contains a format specification." +msgstr "" + +#: ../../library/dis.rst:1164 +msgid "" +"If ``format >> 2`` is non-zero, it indicates that the interpolation contains " +"a conversion. The value of ``format >> 2`` is the conversion type (``0`` for " +"no conversion, ``1`` for ``!s``, ``2`` for ``!r``, and ``3`` for ``!a``)::" +msgstr "" + +#: ../../library/dis.rst:1169 +msgid "" +"conversion = format >> 2\n" +"if format & 1:\n" +" format_spec = STACK.pop()\n" +"else:\n" +" format_spec = None\n" +"expression = STACK.pop()\n" +"value = STACK.pop()\n" +"STACK.append(_build_interpolation(value, expression, conversion, " +"format_spec))" +msgstr "" + +#: ../../library/dis.rst:1183 +msgid "" +"Creates a tuple consuming *count* items from the stack, and pushes the " +"resulting tuple onto the stack::" +msgstr "" + +#: ../../library/dis.rst:1186 +msgid "" +"if count == 0:\n" +" value = ()\n" +"else:\n" +" value = tuple(STACK[-count:])\n" +" STACK = STACK[:-count]\n" +"\n" +"STACK.append(value)" +msgstr "" + +#: ../../library/dis.rst:1197 +msgid "Works as :opcode:`BUILD_TUPLE`, but creates a list." +msgstr "" + +#: ../../library/dis.rst:1202 +msgid "Works as :opcode:`BUILD_TUPLE`, but creates a set." +msgstr "" + +#: ../../library/dis.rst:1207 +msgid "" +"Pushes a new dictionary object onto the stack. Pops ``2 * count`` items so " +"that the dictionary holds *count* entries: ``{..., STACK[-4]: STACK[-3], " +"STACK[-2]: STACK[-1]}``." +msgstr "" + +#: ../../library/dis.rst:1211 +msgid "" +"The dictionary is created from stack items instead of creating an empty " +"dictionary pre-sized to hold *count* items." +msgstr "" + +#: ../../library/dis.rst:1218 +msgid "" +"Concatenates *count* strings from the stack and pushes the resulting string " +"onto the stack." +msgstr "" + +#: ../../library/dis.rst:1228 +msgid "" +"seq = STACK.pop()\n" +"list.extend(STACK[-i], seq)" +msgstr "" + +#: ../../library/dis.rst:1231 +msgid "Used to build lists." +msgstr "" + +#: ../../library/dis.rst:1240 +msgid "" +"seq = STACK.pop()\n" +"set.update(STACK[-i], seq)" +msgstr "" + +#: ../../library/dis.rst:1243 +msgid "Used to build sets." +msgstr "" + +#: ../../library/dis.rst:1252 +msgid "" +"map = STACK.pop()\n" +"dict.update(STACK[-i], map)" +msgstr "" + +#: ../../library/dis.rst:1255 +msgid "Used to build dicts." +msgstr "" + +#: ../../library/dis.rst:1262 +msgid "Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys." +msgstr "" + +#: ../../library/dis.rst:1269 +msgid "" +"If the low bit of ``namei`` is not set, this replaces ``STACK[-1]`` with " +"``getattr(STACK[-1], co_names[namei>>1])``." +msgstr "" + +#: ../../library/dis.rst:1272 +msgid "" +"If the low bit of ``namei`` is set, this will attempt to load a method named " +"``co_names[namei>>1]`` from the ``STACK[-1]`` object. ``STACK[-1]`` is " +"popped. This bytecode distinguishes two cases: if ``STACK[-1]`` has a method " +"with the correct name, the bytecode pushes the unbound method and " +"``STACK[-1]``. ``STACK[-1]`` will be used as the first argument (``self``) " +"by :opcode:`CALL` or :opcode:`CALL_KW` when calling the unbound method. " +"Otherwise, ``NULL`` and the object returned by the attribute lookup are " +"pushed." +msgstr "" + +#: ../../library/dis.rst:1281 +msgid "" +"If the low bit of ``namei`` is set, then a ``NULL`` or ``self`` is pushed to " +"the stack before the attribute or unbound method respectively." +msgstr "" + +#: ../../library/dis.rst:1288 +msgid "" +"This opcode implements :func:`super`, both in its zero-argument and two-" +"argument forms (e.g. ``super().method()``, ``super().attr`` and ``super(cls, " +"self).method()``, ``super(cls, self).attr``)." +msgstr "" + +#: ../../library/dis.rst:1292 +msgid "It pops three values from the stack (from top of stack down):" +msgstr "" + +#: ../../library/dis.rst:1294 +msgid "``self``: the first argument to the current method" +msgstr "" + +#: ../../library/dis.rst:1295 +msgid "``cls``: the class within which the current method was defined" +msgstr "" + +#: ../../library/dis.rst:1296 +msgid "the global ``super``" +msgstr "" + +#: ../../library/dis.rst:1298 +msgid "" +"With respect to its argument, it works similarly to :opcode:`LOAD_ATTR`, " +"except that ``namei`` is shifted left by 2 bits instead of 1." +msgstr "" + +#: ../../library/dis.rst:1301 +msgid "" +"The low bit of ``namei`` signals to attempt a method load, as with :opcode:" +"`LOAD_ATTR`, which results in pushing ``NULL`` and the loaded method. When " +"it is unset a single value is pushed to the stack." +msgstr "" + +#: ../../library/dis.rst:1305 +msgid "" +"The second-low bit of ``namei``, if set, means that this was a two-argument " +"call to :func:`super` (unset means zero-argument)." +msgstr "" + +#: ../../library/dis.rst:1313 +msgid "" +"Performs a Boolean operation. The operation name can be found in " +"``cmp_op[opname >> 5]``. If the fifth-lowest bit of ``opname`` is set " +"(``opname & 16``), the result should be coerced to ``bool``." +msgstr "" + +#: ../../library/dis.rst:1317 +msgid "" +"The fifth-lowest bit of the oparg now indicates a forced conversion to :" +"class:`bool`." +msgstr "" + +#: ../../library/dis.rst:1324 +msgid "Performs ``is`` comparison, or ``is not`` if ``invert`` is 1." +msgstr "" + +#: ../../library/dis.rst:1331 +msgid "Performs ``in`` comparison, or ``not in`` if ``invert`` is 1." +msgstr "" + +#: ../../library/dis.rst:1338 +msgid "" +"Imports the module ``co_names[namei]``. ``STACK[-1]`` and ``STACK[-2]`` are " +"popped and provide the *fromlist* and *level* arguments of :func:" +"`__import__`. The module object is pushed onto the stack. The current " +"namespace is not affected: for a proper import statement, a subsequent :" +"opcode:`STORE_FAST` instruction modifies the namespace." +msgstr "" + +#: ../../library/dis.rst:1346 +msgid "" +"Loads the attribute ``co_names[namei]`` from the module found in " +"``STACK[-1]``. The resulting object is pushed onto the stack, to be " +"subsequently stored by a :opcode:`STORE_FAST` instruction." +msgstr "" + +#: ../../library/dis.rst:1353 +msgid "Increments bytecode counter by *delta*." +msgstr "" + +#: ../../library/dis.rst:1358 +msgid "Decrements bytecode counter by *delta*. Checks for interrupts." +msgstr "" + +#: ../../library/dis.rst:1365 +msgid "Decrements bytecode counter by *delta*. Does not check for interrupts." +msgstr "" + +#: ../../library/dis.rst:1372 +msgid "" +"If ``STACK[-1]`` is true, increments the bytecode counter by *delta*. " +"``STACK[-1]`` is popped." +msgstr "" + +#: ../../library/dis.rst:1375 ../../library/dis.rst:1391 +msgid "" +"The oparg is now a relative delta rather than an absolute target. This " +"opcode is a pseudo-instruction, replaced in final bytecode by the directed " +"versions (forward/backward)." +msgstr "" + +#: ../../library/dis.rst:1380 ../../library/dis.rst:1396 +#: ../../library/dis.rst:1409 ../../library/dis.rst:1420 +msgid "This is no longer a pseudo-instruction." +msgstr "" + +#: ../../library/dis.rst:1388 +msgid "" +"If ``STACK[-1]`` is false, increments the bytecode counter by *delta*. " +"``STACK[-1]`` is popped." +msgstr "" + +#: ../../library/dis.rst:1404 +msgid "" +"If ``STACK[-1]`` is not ``None``, increments the bytecode counter by " +"*delta*. ``STACK[-1]`` is popped." +msgstr "" + +#: ../../library/dis.rst:1415 +msgid "" +"If ``STACK[-1]`` is ``None``, increments the bytecode counter by *delta*. " +"``STACK[-1]`` is popped." +msgstr "" + +#: ../../library/dis.rst:1425 +msgid "" +"``STACK[-1]`` is an :term:`iterator`. Call its :meth:`~iterator.__next__` " +"method. If this yields a new value, push it on the stack (leaving the " +"iterator below it). If the iterator indicates it is exhausted then the byte " +"code counter is incremented by *delta*." +msgstr "" + +#: ../../library/dis.rst:1430 +msgid "Up until 3.11 the iterator was popped when it was exhausted." +msgstr "" + +#: ../../library/dis.rst:1435 +msgid "Loads the global named ``co_names[namei>>1]`` onto the stack." +msgstr "" + +#: ../../library/dis.rst:1437 +msgid "" +"If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the stack " +"before the global variable." +msgstr "" + +#: ../../library/dis.rst:1443 +msgid "" +"Pushes a reference to the local ``co_varnames[var_num]`` onto the stack." +msgstr "" + +#: ../../library/dis.rst:1445 +msgid "" +"This opcode is now only used in situations where the local variable is " +"guaranteed to be initialized. It cannot raise :exc:`UnboundLocalError`." +msgstr "" + +#: ../../library/dis.rst:1451 +msgid "" +"Pushes a borrowed reference to the local ``co_varnames[var_num]`` onto the " +"stack." +msgstr "" + +#: ../../library/dis.rst:1458 +msgid "" +"Pushes references to ``co_varnames[var_nums >> 4]`` and " +"``co_varnames[var_nums & 15]`` onto the stack." +msgstr "" + +#: ../../library/dis.rst:1466 +msgid "" +"Pushes borrowed references to ``co_varnames[var_nums >> 4]`` and " +"``co_varnames[var_nums & 15]`` onto the stack." +msgstr "" + +#: ../../library/dis.rst:1473 +msgid "" +"Pushes a reference to the local ``co_varnames[var_num]`` onto the stack, " +"raising an :exc:`UnboundLocalError` if the local variable has not been " +"initialized." +msgstr "" + +#: ../../library/dis.rst:1481 +msgid "" +"Pushes a reference to the local ``co_varnames[var_num]`` onto the stack (or " +"pushes ``NULL`` onto the stack if the local variable has not been " +"initialized) and sets ``co_varnames[var_num]`` to ``NULL``." +msgstr "" + +#: ../../library/dis.rst:1489 +msgid "Stores ``STACK.pop()`` into the local ``co_varnames[var_num]``." +msgstr "" + +#: ../../library/dis.rst:1493 +msgid "" +"Stores ``STACK[-1]`` into ``co_varnames[var_nums >> 4]`` and ``STACK[-2]`` " +"into ``co_varnames[var_nums & 15]``." +msgstr "" + +#: ../../library/dis.rst:1500 +msgid "" +"Stores ``STACK.pop()`` into the local ``co_varnames[var_nums >> 4]`` and " +"pushes a reference to the local ``co_varnames[var_nums & 15]`` onto the " +"stack." +msgstr "" + +#: ../../library/dis.rst:1508 +msgid "Deletes local ``co_varnames[var_num]``." +msgstr "" + +#: ../../library/dis.rst:1513 +msgid "" +"Creates a new cell in slot ``i``. If that slot is nonempty then that value " +"is stored into the new cell." +msgstr "" + +#: ../../library/dis.rst:1521 +msgid "" +"Loads the cell contained in slot ``i`` of the \"fast locals\" storage. " +"Pushes a reference to the object the cell contains on the stack." +msgstr "" + +#: ../../library/dis.rst:1524 ../../library/dis.rst:1546 +#: ../../library/dis.rst:1557 +msgid "" +"``i`` is no longer offset by the length of :attr:`~codeobject.co_varnames`." +msgstr "" + +#: ../../library/dis.rst:1530 +msgid "" +"Pops a mapping off the stack and looks up the name associated with slot " +"``i`` of the \"fast locals\" storage in this mapping. If the name is not " +"found there, loads it from the cell contained in slot ``i``, similar to :" +"opcode:`LOAD_DEREF`. This is used for loading :term:`closure variables " +"` in class bodies (which previously used :opcode:`!" +"LOAD_CLASSDEREF`) and in :ref:`annotation scopes ` within " +"class bodies." +msgstr "" + +#: ../../library/dis.rst:1543 +msgid "" +"Stores ``STACK.pop()`` into the cell contained in slot ``i`` of the \"fast " +"locals\" storage." +msgstr "" + +#: ../../library/dis.rst:1552 +msgid "" +"Empties the cell contained in slot ``i`` of the \"fast locals\" storage. " +"Used by the :keyword:`del` statement." +msgstr "" + +#: ../../library/dis.rst:1563 +msgid "" +"Copies the ``n`` :term:`free (closure) variables ` from " +"the closure into the frame. Removes the need for special code on the " +"caller's side when calling closures." +msgstr "" + +#: ../../library/dis.rst:1572 +msgid "" +"Raises an exception using one of the 3 forms of the ``raise`` statement, " +"depending on the value of *argc*:" +msgstr "" + +#: ../../library/dis.rst:1575 +msgid "0: ``raise`` (re-raise previous exception)" +msgstr "" + +#: ../../library/dis.rst:1576 +msgid "" +"1: ``raise STACK[-1]`` (raise exception instance or type at ``STACK[-1]``)" +msgstr "" + +#: ../../library/dis.rst:1577 +msgid "" +"2: ``raise STACK[-2] from STACK[-1]`` (raise exception instance or type at " +"``STACK[-2]`` with ``__cause__`` set to ``STACK[-1]``)" +msgstr "" + +#: ../../library/dis.rst:1583 +msgid "" +"Calls a callable object with the number of arguments specified by ``argc``. " +"On the stack are (in ascending order):" +msgstr "" + +#: ../../library/dis.rst:1586 ../../library/dis.rst:1610 +msgid "The callable" +msgstr "" + +#: ../../library/dis.rst:1587 ../../library/dis.rst:1611 +msgid "``self`` or ``NULL``" +msgstr "" + +#: ../../library/dis.rst:1588 ../../library/dis.rst:1612 +msgid "The remaining positional arguments" +msgstr "" + +#: ../../library/dis.rst:1590 +msgid "``argc`` is the total of the positional arguments, excluding ``self``." +msgstr "" + +#: ../../library/dis.rst:1592 +msgid "" +"``CALL`` pops all arguments and the callable object off the stack, calls the " +"callable object with those arguments, and pushes the return value returned " +"by the callable object." +msgstr "" + +#: ../../library/dis.rst:1598 +msgid "The callable now always appears at the same position on the stack." +msgstr "" + +#: ../../library/dis.rst:1601 +msgid "Calls with keyword arguments are now handled by :opcode:`CALL_KW`." +msgstr "" + +#: ../../library/dis.rst:1607 +msgid "" +"Calls a callable object with the number of arguments specified by ``argc``, " +"including one or more named arguments. On the stack are (in ascending order):" +msgstr "" + +#: ../../library/dis.rst:1613 +msgid "The named arguments" +msgstr "" + +#: ../../library/dis.rst:1614 +msgid "A :class:`tuple` of keyword argument names" +msgstr "" + +#: ../../library/dis.rst:1616 +msgid "" +"``argc`` is the total of the positional and named arguments, excluding " +"``self``. The length of the tuple of keyword argument names is the number of " +"named arguments." +msgstr "" + +#: ../../library/dis.rst:1619 +msgid "" +"``CALL_KW`` pops all arguments, the keyword names, and the callable object " +"off the stack, calls the callable object with those arguments, and pushes " +"the return value returned by the callable object." +msgstr "" + +#: ../../library/dis.rst:1628 +msgid "" +"Calls a callable object with variable set of positional and keyword " +"arguments. If the lowest bit of *flags* is set, the top of the stack " +"contains a mapping object containing additional keyword arguments. Before " +"the callable is called, the mapping object and iterable object are each " +"\"unpacked\" and their contents passed in as keyword and positional " +"arguments respectively. ``CALL_FUNCTION_EX`` pops all arguments and the " +"callable object off the stack, calls the callable object with those " +"arguments, and pushes the return value returned by the callable object." +msgstr "" + +#: ../../library/dis.rst:1643 +msgid "" +"Pushes a ``NULL`` to the stack. Used in the call sequence to match the " +"``NULL`` pushed by :opcode:`LOAD_ATTR` for non-method calls." +msgstr "" + +#: ../../library/dis.rst:1652 +msgid "" +"Pushes a new function object on the stack built from the code object at " +"``STACK[-1]``." +msgstr "" + +#: ../../library/dis.rst:1654 +msgid "Flag value ``0x04`` is a tuple of strings instead of dictionary" +msgstr "" + +#: ../../library/dis.rst:1657 +msgid "Qualified name at ``STACK[-1]`` was removed." +msgstr "" + +#: ../../library/dis.rst:1660 +msgid "" +"Extra function attributes on the stack, signaled by oparg flags, were " +"removed. They now use :opcode:`SET_FUNCTION_ATTRIBUTE`." +msgstr "" + +#: ../../library/dis.rst:1667 +msgid "" +"Sets an attribute on a function object. Expects the function at " +"``STACK[-1]`` and the attribute value to set at ``STACK[-2]``; consumes both " +"and leaves the function at ``STACK[-1]``. The flag determines which " +"attribute to set:" +msgstr "" + +#: ../../library/dis.rst:1671 +msgid "" +"``0x01`` a tuple of default values for positional-only and positional-or-" +"keyword parameters in positional order" +msgstr "" + +#: ../../library/dis.rst:1673 +msgid "``0x02`` a dictionary of keyword-only parameters' default values" +msgstr "" + +#: ../../library/dis.rst:1674 +msgid "``0x04`` a tuple of strings containing parameters' annotations" +msgstr "" + +#: ../../library/dis.rst:1675 +msgid "``0x08`` a tuple containing cells for free variables, making a closure" +msgstr "" + +#: ../../library/dis.rst:1676 +msgid "``0x10`` the :term:`annotate function` for the function object" +msgstr "" + +#: ../../library/dis.rst:1680 +msgid "" +"Added ``0x10`` to indicate the annotate function for the function object." +msgstr "" + +#: ../../library/dis.rst:1688 +msgid "" +"Pushes a slice object on the stack. *argc* must be 2 or 3. If it is 2, " +"implements::" +msgstr "" + +#: ../../library/dis.rst:1690 +msgid "" +"end = STACK.pop()\n" +"start = STACK.pop()\n" +"STACK.append(slice(start, end))" +msgstr "" + +#: ../../library/dis.rst:1694 +msgid "if it is 3, implements::" +msgstr "" + +#: ../../library/dis.rst:1696 +msgid "" +"step = STACK.pop()\n" +"end = STACK.pop()\n" +"start = STACK.pop()\n" +"STACK.append(slice(start, end, step))" +msgstr "" + +#: ../../library/dis.rst:1701 +msgid "See the :func:`slice` built-in function for more information." +msgstr "" + +#: ../../library/dis.rst:1706 +msgid "" +"Prefixes any opcode which has an argument too big to fit into the default " +"one byte. *ext* holds an additional byte which act as higher bits in the " +"argument. For each opcode, at most three prefixal ``EXTENDED_ARG`` are " +"allowed, forming an argument from two-byte to four-byte." +msgstr "" + +#: ../../library/dis.rst:1714 +msgid "Convert value to a string, depending on ``oparg``::" +msgstr "" + +#: ../../library/dis.rst:1716 +msgid "" +"value = STACK.pop()\n" +"result = func(value)\n" +"STACK.append(result)" +msgstr "" + +#: ../../library/dis.rst:1720 +msgid "``oparg == 1``: call :func:`str` on *value*" +msgstr "" + +#: ../../library/dis.rst:1721 +msgid "``oparg == 2``: call :func:`repr` on *value*" +msgstr "" + +#: ../../library/dis.rst:1722 +msgid "``oparg == 3``: call :func:`ascii` on *value*" +msgstr "" + +#: ../../library/dis.rst:1724 ../../library/dis.rst:1737 +#: ../../library/dis.rst:1750 +msgid "Used for implementing formatted string literals (f-strings)." +msgstr "" + +#: ../../library/dis.rst:1731 +msgid "Formats the value on top of stack::" +msgstr "" + +#: ../../library/dis.rst:1733 +msgid "" +"value = STACK.pop()\n" +"result = value.__format__(\"\")\n" +"STACK.append(result)" +msgstr "" + +#: ../../library/dis.rst:1743 +msgid "Formats the given value with the given format spec::" +msgstr "" + +#: ../../library/dis.rst:1745 +msgid "" +"spec = STACK.pop()\n" +"value = STACK.pop()\n" +"result = value.__format__(spec)\n" +"STACK.append(result)" +msgstr "" + +#: ../../library/dis.rst:1757 +msgid "" +"``STACK[-1]`` is a tuple of keyword attribute names, ``STACK[-2]`` is the " +"class being matched against, and ``STACK[-3]`` is the match subject. " +"*count* is the number of positional sub-patterns." +msgstr "" + +#: ../../library/dis.rst:1761 +msgid "" +"Pop ``STACK[-1]``, ``STACK[-2]``, and ``STACK[-3]``. If ``STACK[-3]`` is an " +"instance of ``STACK[-2]`` and has the positional and keyword attributes " +"required by *count* and ``STACK[-1]``, push a tuple of extracted attributes. " +"Otherwise, push ``None``." +msgstr "" + +#: ../../library/dis.rst:1775 +msgid "A no-op. Performs internal tracing, debugging and optimization checks." +msgstr "" + +#: ../../library/dis.rst:1777 +msgid "" +"The ``context`` operand consists of two parts. The lowest two bits indicate " +"where the ``RESUME`` occurs:" +msgstr "" + +#: ../../library/dis.rst:1780 +msgid "" +"``0`` The start of a function, which is neither a generator, coroutine nor " +"an async generator" +msgstr "" + +#: ../../library/dis.rst:1782 +msgid "``1`` After a ``yield`` expression" +msgstr "" + +#: ../../library/dis.rst:1783 +msgid "``2`` After a ``yield from`` expression" +msgstr "" + +#: ../../library/dis.rst:1784 +msgid "``3`` After an ``await`` expression" +msgstr "" + +#: ../../library/dis.rst:1786 +msgid "" +"The next bit is ``1`` if the RESUME is at except-depth ``1``, and ``0`` " +"otherwise." +msgstr "" + +#: ../../library/dis.rst:1791 +msgid "The oparg value changed to include information about except-depth" +msgstr "" + +#: ../../library/dis.rst:1797 +msgid "" +"Create a generator, coroutine, or async generator from the current frame. " +"Used as first opcode of in code object for the above mentioned callables. " +"Clear the current frame and return the newly created generator." +msgstr "" + +#: ../../library/dis.rst:1806 +msgid "" +"Equivalent to ``STACK[-1] = STACK[-2].send(STACK[-1])``. Used in ``yield " +"from`` and ``await`` statements." +msgstr "" + +#: ../../library/dis.rst:1809 +msgid "" +"If the call raises :exc:`StopIteration`, pop the top value from the stack, " +"push the exception's ``value`` attribute, and increment the bytecode counter " +"by *delta*." +msgstr "" + +#: ../../library/dis.rst:1818 +msgid "" +"This is not really an opcode. It identifies the dividing line between " +"opcodes in the range [0,255] which don't use their argument and those that " +"do (``< HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively)." +msgstr "" + +#: ../../library/dis.rst:1822 +msgid "" +"If your application uses pseudo instructions or specialized instructions, " +"use the :data:`hasarg` collection instead." +msgstr "" + +#: ../../library/dis.rst:1825 +msgid "" +"Now every instruction has an argument, but opcodes ``< HAVE_ARGUMENT`` " +"ignore it. Before, only opcodes ``>= HAVE_ARGUMENT`` had an argument." +msgstr "" + +#: ../../library/dis.rst:1829 +msgid "" +"Pseudo instructions were added to the :mod:`!dis` module, and for them it is " +"not true that comparison with ``HAVE_ARGUMENT`` indicates whether they use " +"their arg." +msgstr "" + +#: ../../library/dis.rst:1834 +msgid "Use :data:`hasarg` instead." +msgstr "" + +#: ../../library/dis.rst:1839 +msgid "" +"Calls an intrinsic function with one argument. Passes ``STACK[-1]`` as the " +"argument and sets ``STACK[-1]`` to the result. Used to implement " +"functionality that is not performance critical." +msgstr "" + +#: ../../library/dis.rst:1843 ../../library/dis.rst:1897 +msgid "The operand determines which intrinsic function is called:" +msgstr "" + +#: ../../library/dis.rst:1846 ../../library/dis.rst:1900 +msgid "Operand" +msgstr "" + +#: ../../library/dis.rst:1846 ../../library/dis.rst:1900 +msgid "Description" +msgstr "Beschreibung" + +#: ../../library/dis.rst:1848 +msgid "``INTRINSIC_1_INVALID``" +msgstr "" + +#: ../../library/dis.rst:1848 ../../library/dis.rst:1902 +msgid "Not valid" +msgstr "" + +#: ../../library/dis.rst:1850 +msgid "``INTRINSIC_PRINT``" +msgstr "" + +#: ../../library/dis.rst:1850 +msgid "Prints the argument to standard out. Used in the REPL." +msgstr "" + +#: ../../library/dis.rst:1853 +msgid "``INTRINSIC_IMPORT_STAR``" +msgstr "" + +#: ../../library/dis.rst:1853 +msgid "Performs ``import *`` for the named module." +msgstr "" + +#: ../../library/dis.rst:1856 +msgid "``INTRINSIC_STOPITERATION_ERROR``" +msgstr "" + +#: ../../library/dis.rst:1856 +msgid "Extracts the return value from a ``StopIteration`` exception." +msgstr "" + +#: ../../library/dis.rst:1859 +msgid "``INTRINSIC_ASYNC_GEN_WRAP``" +msgstr "" + +#: ../../library/dis.rst:1859 +msgid "Wraps an async generator value" +msgstr "" + +#: ../../library/dis.rst:1861 +msgid "``INTRINSIC_UNARY_POSITIVE``" +msgstr "" + +#: ../../library/dis.rst:1861 +msgid "Performs the unary ``+`` operation" +msgstr "" + +#: ../../library/dis.rst:1864 +msgid "``INTRINSIC_LIST_TO_TUPLE``" +msgstr "" + +#: ../../library/dis.rst:1864 +msgid "Converts a list to a tuple" +msgstr "" + +#: ../../library/dis.rst:1866 +msgid "``INTRINSIC_TYPEVAR``" +msgstr "" + +#: ../../library/dis.rst:1866 +msgid "Creates a :class:`typing.TypeVar`" +msgstr "" + +#: ../../library/dis.rst:1868 +msgid "``INTRINSIC_PARAMSPEC``" +msgstr "" + +#: ../../library/dis.rst:1868 +msgid "Creates a :class:`typing.ParamSpec`" +msgstr "" + +#: ../../library/dis.rst:1871 +msgid "``INTRINSIC_TYPEVARTUPLE``" +msgstr "" + +#: ../../library/dis.rst:1871 +msgid "Creates a :class:`typing.TypeVarTuple`" +msgstr "" + +#: ../../library/dis.rst:1874 +msgid "``INTRINSIC_SUBSCRIPT_GENERIC``" +msgstr "" + +#: ../../library/dis.rst:1874 +msgid "Returns :class:`typing.Generic` subscripted with the argument" +msgstr "" + +#: ../../library/dis.rst:1877 +msgid "``INTRINSIC_TYPEALIAS``" +msgstr "" + +#: ../../library/dis.rst:1877 +msgid "" +"Creates a :class:`typing.TypeAliasType`; used in the :keyword:`type` " +"statement. The argument is a tuple of the type alias's name, type " +"parameters, and value." +msgstr "" + +#: ../../library/dis.rst:1889 +msgid "" +"Calls an intrinsic function with two arguments. Used to implement " +"functionality that is not performance critical::" +msgstr "" + +#: ../../library/dis.rst:1892 +msgid "" +"arg2 = STACK.pop()\n" +"arg1 = STACK.pop()\n" +"result = intrinsic2(arg1, arg2)\n" +"STACK.append(result)" +msgstr "" + +#: ../../library/dis.rst:1902 +msgid "``INTRINSIC_2_INVALID``" +msgstr "" + +#: ../../library/dis.rst:1904 +msgid "``INTRINSIC_PREP_RERAISE_STAR``" +msgstr "" + +#: ../../library/dis.rst:1904 +msgid "Calculates the :exc:`ExceptionGroup` to raise from a ``try-except*``." +msgstr "" + +#: ../../library/dis.rst:1908 +msgid "``INTRINSIC_TYPEVAR_WITH_BOUND``" +msgstr "" + +#: ../../library/dis.rst:1908 +msgid "Creates a :class:`typing.TypeVar` with a bound." +msgstr "" + +#: ../../library/dis.rst:1911 +msgid "``INTRINSIC_TYPEVAR_WITH_CONSTRAINTS``" +msgstr "" + +#: ../../library/dis.rst:1911 +msgid "Creates a :class:`typing.TypeVar` with constraints." +msgstr "" + +#: ../../library/dis.rst:1915 +msgid "``INTRINSIC_SET_FUNCTION_TYPE_PARAMS``" +msgstr "" + +#: ../../library/dis.rst:1915 +msgid "Sets the ``__type_params__`` attribute of a function." +msgstr "" + +#: ../../library/dis.rst:1924 +msgid "" +"Performs special method lookup on ``STACK[-1]``. If ``type(STACK[-1])." +"__xxx__`` is a method, leave ``type(STACK[-1]).__xxx__; STACK[-1]`` on the " +"stack. If ``type(STACK[-1]).__xxx__`` is not a method, leave ``STACK[-1]." +"__xxx__; NULL`` on the stack." +msgstr "" + +#: ../../library/dis.rst:1933 +msgid "**Pseudo-instructions**" +msgstr "" + +#: ../../library/dis.rst:1935 +msgid "" +"These opcodes do not appear in Python bytecode. They are used by the " +"compiler but are replaced by real opcodes or removed before bytecode is " +"generated." +msgstr "" + +#: ../../library/dis.rst:1940 +msgid "" +"Set up an exception handler for the following code block. If an exception " +"occurs, the value stack level is restored to its current state and control " +"is transferred to the exception handler at ``target``." +msgstr "" + +#: ../../library/dis.rst:1947 +msgid "" +"Like ``SETUP_FINALLY``, but in case of an exception also pushes the last " +"instruction (``lasti``) to the stack so that ``RERAISE`` can restore it. If " +"an exception occurs, the value stack level and the last instruction on the " +"frame are restored to their current state, and control is transferred to the " +"exception handler at ``target``." +msgstr "" + +#: ../../library/dis.rst:1956 +msgid "" +"Like ``SETUP_CLEANUP``, but in case of an exception one more item is popped " +"from the stack before control is transferred to the exception handler at " +"``target``." +msgstr "" + +#: ../../library/dis.rst:1960 +msgid "" +"This variant is used in :keyword:`with` and :keyword:`async with` " +"constructs, which push the return value of the context manager's :meth:" +"`~object.__enter__` or :meth:`~object.__aenter__` to the stack." +msgstr "" + +#: ../../library/dis.rst:1967 +msgid "" +"Marks the end of the code block associated with the last ``SETUP_FINALLY``, " +"``SETUP_CLEANUP`` or ``SETUP_WITH``." +msgstr "" + +#: ../../library/dis.rst:1974 +msgid "" +"Undirected relative jump instructions which are replaced by their directed " +"(forward/backward) counterparts by the assembler." +msgstr "" + +#: ../../library/dis.rst:1980 +msgid "" +"Conditional jumps which do not impact the stack. Replaced by the sequence " +"``COPY 1``, ``TO_BOOL``, ``POP_JUMP_IF_TRUE/FALSE``." +msgstr "" + +#: ../../library/dis.rst:1985 +msgid "" +"Pushes a reference to the cell contained in slot ``i`` of the \"fast " +"locals\" storage." +msgstr "" + +#: ../../library/dis.rst:1988 +msgid "" +"Note that ``LOAD_CLOSURE`` is replaced with ``LOAD_FAST`` in the assembler." +msgstr "" + +#: ../../library/dis.rst:1990 +msgid "This opcode is now a pseudo-instruction." +msgstr "" + +#: ../../library/dis.rst:1997 +msgid "Opcode collections" +msgstr "" + +#: ../../library/dis.rst:1999 +msgid "" +"These collections are provided for automatic introspection of bytecode " +"instructions:" +msgstr "" + +#: ../../library/dis.rst:2002 +msgid "" +"The collections now contain pseudo instructions and instrumented " +"instructions as well. These are opcodes with values ``>= MIN_PSEUDO_OPCODE`` " +"and ``>= MIN_INSTRUMENTED_OPCODE``." +msgstr "" + +#: ../../library/dis.rst:2009 +msgid "Sequence of operation names, indexable using the bytecode." +msgstr "" + +#: ../../library/dis.rst:2014 +msgid "Dictionary mapping operation names to bytecodes." +msgstr "" + +#: ../../library/dis.rst:2019 +msgid "Sequence of all compare operation names." +msgstr "" + +#: ../../library/dis.rst:2024 +msgid "Sequence of bytecodes that use their argument." +msgstr "" + +#: ../../library/dis.rst:2031 +msgid "Sequence of bytecodes that access a constant." +msgstr "" + +#: ../../library/dis.rst:2036 +msgid "" +"Sequence of bytecodes that access a :term:`free (closure) variable `. 'free' in this context refers to names in the current scope that " +"are referenced by inner scopes or names in outer scopes that are referenced " +"from this scope. It does *not* include references to global or builtin " +"scopes." +msgstr "" + +#: ../../library/dis.rst:2044 +msgid "Sequence of bytecodes that access an attribute by name." +msgstr "" + +#: ../../library/dis.rst:2049 +msgid "Sequence of bytecodes that have a jump target. All jumps are relative." +msgstr "" + +#: ../../library/dis.rst:2056 +msgid "Sequence of bytecodes that access a local variable." +msgstr "" + +#: ../../library/dis.rst:2061 +msgid "Sequence of bytecodes of Boolean operations." +msgstr "" + +#: ../../library/dis.rst:2065 +msgid "Sequence of bytecodes that set an exception handler." +msgstr "" + +#: ../../library/dis.rst:2072 +msgid "Sequence of bytecodes that have a relative jump target." +msgstr "" + +#: ../../library/dis.rst:2074 +msgid "All jumps are now relative. Use :data:`hasjump`." +msgstr "" + +#: ../../library/dis.rst:2080 +msgid "Sequence of bytecodes that have an absolute jump target." +msgstr "" + +#: ../../library/dis.rst:2082 +msgid "All jumps are now relative. This list is empty." +msgstr "" + +#: ../../library/dis.rst:1686 +msgid "built-in function" +msgstr "" + +#: ../../library/dis.rst:1686 +msgid "slice" +msgstr "" diff --git a/library/enum.po b/library/enum.po index 0571fd04..ec9c5ccb 100644 --- a/library/enum.po +++ b/library/enum.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Last-Translator: Transifex Bot <>, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -30,6 +30,10 @@ msgstr "" msgid "**Source code:** :source:`Lib/enum.py`" msgstr "" +#: ../../library/enum.rst:11 +msgid "Important" +msgstr "" + #: ../../library/enum.rst:13 msgid "" "This page contains the API reference information. For tutorial information " diff --git a/library/enum.po~ b/library/enum.po~ new file mode 100644 index 00000000..0571fd04 --- /dev/null +++ b/library/enum.po~ @@ -0,0 +1,1563 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# Transifex Bot <>, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:01+0000\n" +"Last-Translator: Transifex Bot <>, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/enum.rst:2 +msgid ":mod:`!enum` --- Support for enumerations" +msgstr "" + +#: ../../library/enum.rst:9 +msgid "**Source code:** :source:`Lib/enum.py`" +msgstr "" + +#: ../../library/enum.rst:13 +msgid "" +"This page contains the API reference information. For tutorial information " +"and discussion of more advanced topics, see" +msgstr "" + +#: ../../library/enum.rst:16 +msgid ":ref:`Basic Tutorial `" +msgstr "" + +#: ../../library/enum.rst:17 +msgid ":ref:`Advanced Tutorial `" +msgstr "" + +#: ../../library/enum.rst:18 +msgid ":ref:`Enum Cookbook `" +msgstr "" + +#: ../../library/enum.rst:22 +msgid "An enumeration:" +msgstr "" + +#: ../../library/enum.rst:24 +msgid "is a set of symbolic names (members) bound to unique values" +msgstr "" + +#: ../../library/enum.rst:25 +msgid "" +"can be iterated over to return its canonical (i.e. non-alias) members in " +"definition order" +msgstr "" + +#: ../../library/enum.rst:27 +msgid "uses *call* syntax to return members by value" +msgstr "" + +#: ../../library/enum.rst:28 +msgid "uses *index* syntax to return members by name" +msgstr "" + +#: ../../library/enum.rst:30 +msgid "" +"Enumerations are created either by using :keyword:`class` syntax, or by " +"using function-call syntax::" +msgstr "" + +#: ../../library/enum.rst:33 +msgid "" +">>> from enum import Enum\n" +"\n" +">>> # class syntax\n" +">>> class Color(Enum):\n" +"... RED = 1\n" +"... GREEN = 2\n" +"... BLUE = 3\n" +"\n" +">>> # functional syntax\n" +">>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)])" +msgstr "" + +#: ../../library/enum.rst:44 +msgid "" +"Even though we can use :keyword:`class` syntax to create Enums, Enums are " +"not normal Python classes. See :ref:`How are Enums different? ` for more details." +msgstr "" + +#: ../../library/enum.rst:48 +msgid "Nomenclature" +msgstr "" + +#: ../../library/enum.rst:50 +msgid "The class :class:`!Color` is an *enumeration* (or *enum*)" +msgstr "" + +#: ../../library/enum.rst:51 +msgid "" +"The attributes :attr:`!Color.RED`, :attr:`!Color.GREEN`, etc., are " +"*enumeration members* (or *members*) and are functionally constants." +msgstr "" + +#: ../../library/enum.rst:53 +msgid "" +"The enum members have *names* and *values* (the name of :attr:`!Color.RED` " +"is ``RED``, the value of :attr:`!Color.BLUE` is ``3``, etc.)" +msgstr "" + +#: ../../library/enum.rst:60 +msgid "Module contents" +msgstr "" + +#: ../../library/enum.rst:62 +msgid ":class:`EnumType`" +msgstr "" + +#: ../../library/enum.rst:64 +msgid "The ``type`` for Enum and its subclasses." +msgstr "" + +#: ../../library/enum.rst:66 +msgid ":class:`Enum`" +msgstr "" + +#: ../../library/enum.rst:68 +msgid "Base class for creating enumerated constants." +msgstr "" + +#: ../../library/enum.rst:70 +msgid ":class:`IntEnum`" +msgstr "" + +#: ../../library/enum.rst:72 +msgid "" +"Base class for creating enumerated constants that are also subclasses of :" +"class:`int`. (`Notes`_)" +msgstr "" + +#: ../../library/enum.rst:75 +msgid ":class:`StrEnum`" +msgstr "" + +#: ../../library/enum.rst:77 +msgid "" +"Base class for creating enumerated constants that are also subclasses of :" +"class:`str`. (`Notes`_)" +msgstr "" + +#: ../../library/enum.rst:80 +msgid ":class:`Flag`" +msgstr "" + +#: ../../library/enum.rst:82 +msgid "" +"Base class for creating enumerated constants that can be combined using the " +"bitwise operations without losing their :class:`Flag` membership." +msgstr "" + +#: ../../library/enum.rst:85 +msgid ":class:`IntFlag`" +msgstr "" + +#: ../../library/enum.rst:87 +msgid "" +"Base class for creating enumerated constants that can be combined using the " +"bitwise operators without losing their :class:`IntFlag` membership. :class:" +"`IntFlag` members are also subclasses of :class:`int`. (`Notes`_)" +msgstr "" + +#: ../../library/enum.rst:91 +msgid ":class:`ReprEnum`" +msgstr "" + +#: ../../library/enum.rst:93 +msgid "" +"Used by :class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag` to keep " +"the :class:`str() ` of the mixed-in type." +msgstr "" + +#: ../../library/enum.rst:96 +msgid ":class:`EnumCheck`" +msgstr "" + +#: ../../library/enum.rst:98 +msgid "" +"An enumeration with the values ``CONTINUOUS``, ``NAMED_FLAGS``, and " +"``UNIQUE``, for use with :func:`verify` to ensure various constraints are " +"met by a given enumeration." +msgstr "" + +#: ../../library/enum.rst:102 +msgid ":class:`FlagBoundary`" +msgstr "" + +#: ../../library/enum.rst:104 +msgid "" +"An enumeration with the values ``STRICT``, ``CONFORM``, ``EJECT``, and " +"``KEEP`` which allows for more fine-grained control over how invalid values " +"are dealt with in an enumeration." +msgstr "" + +#: ../../library/enum.rst:108 +msgid ":class:`EnumDict`" +msgstr "" + +#: ../../library/enum.rst:110 +msgid "A subclass of :class:`dict` for use when subclassing :class:`EnumType`." +msgstr "" + +#: ../../library/enum.rst:112 +msgid ":class:`auto`" +msgstr "" + +#: ../../library/enum.rst:114 +msgid "" +"Instances are replaced with an appropriate value for Enum members. :class:" +"`StrEnum` defaults to the lower-cased version of the member name, while " +"other Enums default to 1 and increase from there." +msgstr "" + +#: ../../library/enum.rst:118 +msgid ":deco:`~enum.property`" +msgstr "" + +#: ../../library/enum.rst:120 +msgid "" +"Allows :class:`Enum` members to have attributes without conflicting with " +"member names. The ``value`` and ``name`` attributes are implemented this " +"way." +msgstr "" + +#: ../../library/enum.rst:124 +msgid ":deco:`unique`" +msgstr "" + +#: ../../library/enum.rst:126 +msgid "" +"Enum class decorator that ensures only one name is bound to any one value." +msgstr "" + +#: ../../library/enum.rst:128 +msgid ":deco:`verify`" +msgstr "" + +#: ../../library/enum.rst:130 +msgid "" +"Enum class decorator that checks user-selectable constraints on an " +"enumeration." +msgstr "" + +#: ../../library/enum.rst:133 +msgid ":deco:`member`" +msgstr "" + +#: ../../library/enum.rst:135 +msgid "Make ``obj`` a member. Can be used as a decorator." +msgstr "" + +#: ../../library/enum.rst:137 +msgid ":deco:`nonmember`" +msgstr "" + +#: ../../library/enum.rst:139 +msgid "Do not make ``obj`` a member. Can be used as a decorator." +msgstr "" + +#: ../../library/enum.rst:141 +msgid ":deco:`global_enum`" +msgstr "" + +#: ../../library/enum.rst:143 +msgid "" +"Modify the :class:`str() ` and :func:`repr` of an enum to show its " +"members as belonging to the module instead of its class, and export the enum " +"members to the global namespace." +msgstr "" + +#: ../../library/enum.rst:147 +msgid ":func:`show_flag_values`" +msgstr "" + +#: ../../library/enum.rst:149 +msgid "Return a list of all power-of-two integers contained in a flag." +msgstr "" + +#: ../../library/enum.rst:151 +msgid ":func:`enum.bin`" +msgstr "" + +#: ../../library/enum.rst:153 ../../library/enum.rst:1076 +msgid "" +"Like built-in :func:`bin`, except negative values are represented in two's " +"complement, and the leading bit always indicates sign (``0`` implies " +"positive, ``1`` implies negative)." +msgstr "" + +#: ../../library/enum.rst:158 +msgid "``Flag``, ``IntFlag``, ``auto``" +msgstr "" + +#: ../../library/enum.rst:159 +msgid "" +"``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, " +"``member``, ``nonmember``, ``global_enum``, ``show_flag_values``" +msgstr "" + +#: ../../library/enum.rst:160 +msgid "``EnumDict``" +msgstr "" + +#: ../../library/enum.rst:165 +msgid "Data types" +msgstr "" + +#: ../../library/enum.rst:170 +msgid "" +"*EnumType* is the :term:`metaclass` for *enum* enumerations. It is possible " +"to subclass *EnumType* -- see :ref:`Subclassing EnumType ` for details." +msgstr "" + +#: ../../library/enum.rst:174 +msgid "" +"``EnumType`` is responsible for setting the correct :meth:`!__repr__`, :meth:" +"`!__str__`, :meth:`!__format__`, and :meth:`!__reduce__` methods on the " +"final *enum*, as well as creating the enum members, properly handling " +"duplicates, providing iteration over the enum class, etc." +msgstr "" + +#: ../../library/enum.rst:181 +msgid "" +"Before 3.11 ``EnumType`` was called ``EnumMeta``, which is still available " +"as an alias." +msgstr "" + +#: ../../library/enum.rst:185 +msgid "This method is called in two different ways:" +msgstr "" + +#: ../../library/enum.rst:187 +msgid "to look up an existing member:" +msgstr "" + +#: ../../library/enum.rst:0 +msgid "cls" +msgstr "" + +#: ../../library/enum.rst:189 ../../library/enum.rst:195 +msgid "The enum class being called." +msgstr "" + +#: ../../library/enum.rst:0 +msgid "value" +msgstr "Wert" + +#: ../../library/enum.rst:190 +msgid "The value to lookup." +msgstr "" + +#: ../../library/enum.rst:192 +msgid "" +"to use the ``cls`` enum to create a new enum (only if the existing enum does " +"not have any members):" +msgstr "" + +#: ../../library/enum.rst:196 +msgid "The name of the new Enum to create." +msgstr "" + +#: ../../library/enum.rst:0 +msgid "names" +msgstr "" + +#: ../../library/enum.rst:197 +msgid "The names/values of the members for the new Enum." +msgstr "" + +#: ../../library/enum.rst:0 +msgid "module" +msgstr "" + +#: ../../library/enum.rst:198 +msgid "The name of the module the new Enum is created in." +msgstr "" + +#: ../../library/enum.rst:0 +msgid "qualname" +msgstr "" + +#: ../../library/enum.rst:199 +msgid "The actual location in the module where this Enum can be found." +msgstr "" + +#: ../../library/enum.rst:0 +msgid "type" +msgstr "Typ" + +#: ../../library/enum.rst:200 +msgid "A mix-in type for the new Enum." +msgstr "" + +#: ../../library/enum.rst:0 +msgid "start" +msgstr "" + +#: ../../library/enum.rst:201 +msgid "The first integer value for the Enum (used by :class:`auto`)." +msgstr "" + +#: ../../library/enum.rst:0 +msgid "boundary" +msgstr "" + +#: ../../library/enum.rst:202 +msgid "" +"How to handle out-of-range values from bit operations (:class:`Flag` only)." +msgstr "" + +#: ../../library/enum.rst:206 +msgid "Returns ``True`` if member belongs to the ``cls``::" +msgstr "" + +#: ../../library/enum.rst:208 +msgid "" +">>> some_var = Color.RED\n" +">>> some_var in Color\n" +"True\n" +">>> Color.RED.value in Color\n" +"True" +msgstr "" + +#: ../../library/enum.rst:216 +msgid "" +"Before Python 3.12, a ``TypeError`` is raised if a non-Enum-member is used " +"in a containment check." +msgstr "" + +#: ../../library/enum.rst:221 +msgid "" +"Returns ``['__class__', '__doc__', '__members__', '__module__']`` and the " +"names of the members in *cls*::" +msgstr "" + +#: ../../library/enum.rst:224 +msgid "" +">>> dir(Color)\n" +"['BLUE', 'GREEN', 'RED', '__class__', '__contains__', '__doc__', " +"'__getitem__', '__init_subclass__', '__iter__', '__len__', '__members__', " +"'__module__', '__name__', '__qualname__']" +msgstr "" + +#: ../../library/enum.rst:229 +msgid "" +"Returns the Enum member in *cls* matching *name*, or raises a :exc:" +"`KeyError`::" +msgstr "" + +#: ../../library/enum.rst:231 +msgid "" +">>> Color['BLUE']\n" +"" +msgstr "" + +#: ../../library/enum.rst:236 +msgid "Returns each member in *cls* in definition order::" +msgstr "" + +#: ../../library/enum.rst:238 +msgid "" +">>> list(Color)\n" +"[, , ]" +msgstr "" + +#: ../../library/enum.rst:243 +msgid "Returns the number of members in *cls*::" +msgstr "" + +#: ../../library/enum.rst:245 +msgid "" +">>> len(Color)\n" +"3" +msgstr "" + +#: ../../library/enum.rst:250 +msgid "Returns a mapping of every enum name to its member, including aliases" +msgstr "" + +#: ../../library/enum.rst:254 +msgid "Returns each member in *cls* in reverse definition order::" +msgstr "" + +#: ../../library/enum.rst:256 +msgid "" +">>> list(reversed(Color))\n" +"[, , ]" +msgstr "" + +#: ../../library/enum.rst:262 +msgid "*Enum* is the base class for all *enum* enumerations." +msgstr "" + +#: ../../library/enum.rst:266 +msgid "The name used to define the ``Enum`` member::" +msgstr "" + +#: ../../library/enum.rst:268 +msgid "" +">>> Color.BLUE.name\n" +"'BLUE'" +msgstr "" + +#: ../../library/enum.rst:273 +msgid "The value given to the ``Enum`` member::" +msgstr "" + +#: ../../library/enum.rst:275 +msgid "" +">>> Color.RED.value\n" +"1" +msgstr "" + +#: ../../library/enum.rst:278 ../../library/enum.rst:298 +msgid "Value of the member, can be set in :meth:`~Enum.__new__`." +msgstr "" + +#: ../../library/enum.rst:280 +msgid "Enum member values" +msgstr "" + +#: ../../library/enum.rst:282 +msgid "" +"Member values can be anything: :class:`int`, :class:`str`, etc. If the " +"exact value is unimportant you may use :class:`auto` instances and an " +"appropriate value will be chosen for you. See :class:`auto` for the details." +msgstr "" + +#: ../../library/enum.rst:287 +msgid "" +"While mutable/unhashable values, such as :class:`dict`, :class:`list` or a " +"mutable :class:`~dataclasses.dataclass`, can be used, they will have a " +"quadratic performance impact during creation relative to the total number of " +"mutable/unhashable values in the enum." +msgstr "" + +#: ../../library/enum.rst:294 +msgid "Name of the member." +msgstr "" + +#: ../../library/enum.rst:302 +msgid "" +"No longer used, kept for backward compatibility. (class attribute, removed " +"during class creation)." +msgstr "" + +#: ../../library/enum.rst:305 +msgid "" +"The :attr:`~Enum._order_` attribute can be provided to help keep Python 2 / " +"Python 3 code in sync. It will be checked against the actual order of the " +"enumeration and raise an error if the two do not match::" +msgstr "" + +#: ../../library/enum.rst:308 +msgid "" +">>> class Color(Enum):\n" +"... _order_ = 'RED GREEN BLUE'\n" +"... RED = 1\n" +"... BLUE = 3\n" +"... GREEN = 2\n" +"...\n" +"Traceback (most recent call last):\n" +"...\n" +"TypeError: member order does not match _order_:\n" +" ['RED', 'BLUE', 'GREEN']\n" +" ['RED', 'GREEN', 'BLUE']" +msgstr "" + +#: ../../library/enum.rst:322 +msgid "" +"In Python 2 code the :attr:`~Enum._order_` attribute is necessary as " +"definition order is lost before it can be recorded." +msgstr "" + +#: ../../library/enum.rst:329 +msgid "" +"``_ignore_`` is only used during creation and is removed from the " +"enumeration once creation is complete." +msgstr "" + +#: ../../library/enum.rst:332 +msgid "" +"``_ignore_`` is a list of names that will not become members, and whose " +"names will also be removed from the completed enumeration. See :ref:" +"`TimePeriod ` for an example." +msgstr "" + +#: ../../library/enum.rst:340 +msgid "" +"Returns ``['__class__', '__doc__', '__module__', 'name', 'value']`` and any " +"public methods defined on *self.__class__*::" +msgstr "" + +#: ../../library/enum.rst:343 +msgid "" +">>> from enum import Enum\n" +">>> import datetime as dt\n" +">>> class Weekday(Enum):\n" +"... MONDAY = 1\n" +"... TUESDAY = 2\n" +"... WEDNESDAY = 3\n" +"... THURSDAY = 4\n" +"... FRIDAY = 5\n" +"... SATURDAY = 6\n" +"... SUNDAY = 7\n" +"... @classmethod\n" +"... def today(cls):\n" +"... print(f'today is {cls(dt.date.today().isoweekday()).name}')\n" +"...\n" +">>> dir(Weekday.SATURDAY)\n" +"['__class__', '__doc__', '__eq__', '__hash__', '__module__', 'name', " +"'today', 'value']" +msgstr "" + +#: ../../library/enum.rst:0 +msgid "name" +msgstr "" + +#: ../../library/enum.rst:362 +msgid "The name of the member being defined (e.g. 'RED')." +msgstr "" + +#: ../../library/enum.rst:363 +msgid "The start value for the Enum; the default is 1." +msgstr "" + +#: ../../library/enum.rst:0 +msgid "count" +msgstr "" + +#: ../../library/enum.rst:364 +msgid "The number of members currently defined, not including this one." +msgstr "" + +#: ../../library/enum.rst:0 +msgid "last_values" +msgstr "" + +#: ../../library/enum.rst:365 +msgid "A list of the previous values." +msgstr "" + +#: ../../library/enum.rst:367 +msgid "" +"A *staticmethod* that is used to determine the next value returned by :class:" +"`auto`." +msgstr "" + +#: ../../library/enum.rst:371 +msgid "" +"For standard :class:`Enum` classes the next value chosen is the highest " +"value seen incremented by one." +msgstr "" + +#: ../../library/enum.rst:374 +msgid "" +"For :class:`Flag` classes the next value chosen will be the next highest " +"power-of-two." +msgstr "" + +#: ../../library/enum.rst:377 +msgid "This method may be overridden, e.g.::" +msgstr "" + +#: ../../library/enum.rst:379 +msgid "" +">>> from enum import auto, Enum\n" +">>> class PowersOfThree(Enum):\n" +"... @staticmethod\n" +"... def _generate_next_value_(name, start, count, last_values):\n" +"... return 3 ** (count + 1)\n" +"... FIRST = auto()\n" +"... SECOND = auto()\n" +"...\n" +">>> PowersOfThree.SECOND.value\n" +"9" +msgstr "" + +#: ../../library/enum.rst:391 +msgid "" +"Prior versions would use the last seen value instead of the highest value." +msgstr "" + +#: ../../library/enum.rst:396 +msgid "" +"By default, does nothing. If multiple values are given in the member " +"assignment, those values become separate arguments to ``__init__``; e.g." +msgstr "" + +#: ../../library/enum.rst:403 +msgid "" +"``Weekday.__init__()`` would be called as ``Weekday.__init__(self, 1, " +"'Mon')``" +msgstr "" + +#: ../../library/enum.rst:407 +msgid "" +"A *classmethod* that is used to further configure subsequent subclasses. By " +"default, does nothing." +msgstr "" + +#: ../../library/enum.rst:412 +msgid "" +"A *classmethod* for looking up values not found in *cls*. By default it " +"does nothing, but can be overridden to implement custom search behavior::" +msgstr "" + +#: ../../library/enum.rst:415 +msgid "" +">>> from enum import auto, StrEnum\n" +">>> class Build(StrEnum):\n" +"... DEBUG = auto()\n" +"... OPTIMIZED = auto()\n" +"... @classmethod\n" +"... def _missing_(cls, value):\n" +"... value = value.lower()\n" +"... for member in cls:\n" +"... if member.value == value:\n" +"... return member\n" +"... return None\n" +"...\n" +">>> Build.DEBUG.value\n" +"'debug'\n" +">>> Build('deBUG')\n" +"" +msgstr "" + +#: ../../library/enum.rst:436 +msgid "" +"By default, doesn't exist. If specified, either in the enum class " +"definition or in a mixin class (such as ``int``), all values given in the " +"member assignment will be passed; e.g." +msgstr "" + +#: ../../library/enum.rst:444 +msgid "" +"results in the call ``int('1a', 16)`` and a value of ``26`` for the member." +msgstr "" + +#: ../../library/enum.rst:448 +msgid "" +"When writing a custom ``__new__``, do not use ``super().__new__`` -- call " +"the appropriate ``__new__`` instead." +msgstr "" + +#: ../../library/enum.rst:453 +msgid "" +"Returns the string used for *repr()* calls. By default, returns the *Enum* " +"name, member name, and value, but can be overridden::" +msgstr "" + +#: ../../library/enum.rst:456 +msgid "" +">>> from enum import auto, Enum\n" +">>> class OtherStyle(Enum):\n" +"... ALTERNATE = auto()\n" +"... OTHER = auto()\n" +"... SOMETHING_ELSE = auto()\n" +"... def __repr__(self):\n" +"... cls_name = self.__class__.__name__\n" +"... return f'{cls_name}.{self.name}'\n" +"...\n" +">>> OtherStyle.ALTERNATE, str(OtherStyle.ALTERNATE), f\"{OtherStyle." +"ALTERNATE}\"\n" +"(OtherStyle.ALTERNATE, 'OtherStyle.ALTERNATE', 'OtherStyle.ALTERNATE')" +msgstr "" + +#: ../../library/enum.rst:470 +msgid "" +"Returns the string used for *str()* calls. By default, returns the *Enum* " +"name and member name, but can be overridden::" +msgstr "" + +#: ../../library/enum.rst:473 +msgid "" +">>> from enum import auto, Enum\n" +">>> class OtherStyle(Enum):\n" +"... ALTERNATE = auto()\n" +"... OTHER = auto()\n" +"... SOMETHING_ELSE = auto()\n" +"... def __str__(self):\n" +"... return f'{self.name}'\n" +"...\n" +">>> OtherStyle.ALTERNATE, str(OtherStyle.ALTERNATE), f\"{OtherStyle." +"ALTERNATE}\"\n" +"(, 'ALTERNATE', 'ALTERNATE')" +msgstr "" + +#: ../../library/enum.rst:486 +msgid "" +"Returns the string used for *format()* and *f-string* calls. By default, " +"returns :meth:`__str__` return value, but can be overridden::" +msgstr "" + +#: ../../library/enum.rst:489 +msgid "" +">>> from enum import auto, Enum\n" +">>> class OtherStyle(Enum):\n" +"... ALTERNATE = auto()\n" +"... OTHER = auto()\n" +"... SOMETHING_ELSE = auto()\n" +"... def __format__(self, spec):\n" +"... return f'{self.name}'\n" +"...\n" +">>> OtherStyle.ALTERNATE, str(OtherStyle.ALTERNATE), f\"{OtherStyle." +"ALTERNATE}\"\n" +"(, 'OtherStyle.ALTERNATE', 'ALTERNATE')" +msgstr "" + +#: ../../library/enum.rst:502 +msgid "" +"Using :class:`auto` with :class:`Enum` results in integers of increasing " +"value, starting with ``1``." +msgstr "" + +#: ../../library/enum.rst:505 +msgid "Added :ref:`enum-dataclass-support`." +msgstr "" + +#: ../../library/enum.rst:509 +msgid "Adds a new name as an alias to an existing member::" +msgstr "" + +#: ../../library/enum.rst:511 +msgid "" +">>> Color.RED._add_alias_(\"ERROR\")\n" +">>> Color.ERROR\n" +"" +msgstr "" + +#: ../../library/enum.rst:515 +msgid "" +"Raises a :exc:`NameError` if the name is already assigned to a different " +"member." +msgstr "" + +#: ../../library/enum.rst:521 +msgid "Adds a new value as an alias to an existing member::" +msgstr "" + +#: ../../library/enum.rst:523 +msgid "" +">>> Color.RED._add_value_alias_(42)\n" +">>> Color(42)\n" +"" +msgstr "" + +#: ../../library/enum.rst:527 +msgid "" +"Raises a :exc:`ValueError` if the value is already linked with a different " +"member." +msgstr "" + +#: ../../library/enum.rst:528 +msgid "See :ref:`multi-value-enum` for an example." +msgstr "" + +#: ../../library/enum.rst:535 +msgid "" +"*IntEnum* is the same as :class:`Enum`, but its members are also integers " +"and can be used anywhere that an integer can be used. If any integer " +"operation is performed with an *IntEnum* member, the resulting value loses " +"its enumeration status." +msgstr "" + +#: ../../library/enum.rst:556 +msgid "" +"Using :class:`auto` with :class:`IntEnum` results in integers of increasing " +"value, starting with ``1``." +msgstr "" + +#: ../../library/enum.rst:559 +msgid "" +":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the " +"*replacement of existing constants* use-case. :meth:`~object.__format__` was " +"already :meth:`!int.__format__` for that same reason." +msgstr "" + +#: ../../library/enum.rst:566 +msgid "" +"*StrEnum* is the same as :class:`Enum`, but its members are also strings and " +"can be used in most of the same places that a string can be used. The result " +"of any string operation performed on or with a *StrEnum* member is not part " +"of the enumeration." +msgstr "" + +#: ../../library/enum.rst:587 +msgid "" +"There are places in the stdlib that check for an exact :class:`str` instead " +"of a :class:`str` subclass (i.e. ``type(unknown) == str`` instead of " +"``isinstance(unknown, str)``), and in those locations you will need to use " +"``str(MyStrEnum.MY_MEMBER)``." +msgstr "" + +#: ../../library/enum.rst:594 +msgid "" +"Using :class:`auto` with :class:`StrEnum` results in the lower-cased member " +"name as the value." +msgstr "" + +#: ../../library/enum.rst:599 +msgid "" +":meth:`~object.__str__` is :meth:`!str.__str__` to better support the " +"*replacement of existing constants* use-case. :meth:`~object.__format__` is " +"likewise :meth:`!str.__format__` for that same reason." +msgstr "" + +#: ../../library/enum.rst:607 +msgid "" +"``Flag`` is the same as :class:`Enum`, but its members support the bitwise " +"operators ``&`` (*AND*), ``|`` (*OR*), ``^`` (*XOR*), and ``~`` (*INVERT*); " +"the results of those operations are (aliases of) members of the enumeration." +msgstr "" + +#: ../../library/enum.rst:613 +msgid "Returns *True* if value is in self::" +msgstr "" + +#: ../../library/enum.rst:615 +msgid "" +">>> from enum import Flag, auto\n" +">>> class Color(Flag):\n" +"... RED = auto()\n" +"... GREEN = auto()\n" +"... BLUE = auto()\n" +"...\n" +">>> purple = Color.RED | Color.BLUE\n" +">>> white = Color.RED | Color.GREEN | Color.BLUE\n" +">>> Color.GREEN in purple\n" +"False\n" +">>> Color.GREEN in white\n" +"True\n" +">>> purple in white\n" +"True\n" +">>> white in purple\n" +"False" +msgstr "" + +#: ../../library/enum.rst:634 +msgid "Returns all contained non-alias members::" +msgstr "" + +#: ../../library/enum.rst:636 +msgid "" +">>> list(Color.RED)\n" +"[]\n" +">>> list(purple)\n" +"[, ]" +msgstr "" + +#: ../../library/enum.rst:645 +msgid "Returns number of members in flag::" +msgstr "" + +#: ../../library/enum.rst:647 +msgid "" +">>> len(Color.GREEN)\n" +"1\n" +">>> len(white)\n" +"3" +msgstr "" + +#: ../../library/enum.rst:656 +msgid "Returns *True* if any members in flag, *False* otherwise::" +msgstr "" + +#: ../../library/enum.rst:658 +msgid "" +">>> bool(Color.GREEN)\n" +"True\n" +">>> bool(white)\n" +"True\n" +">>> black = Color(0)\n" +">>> bool(black)\n" +"False" +msgstr "" + +#: ../../library/enum.rst:668 +msgid "Returns current flag binary or'ed with other::" +msgstr "" + +#: ../../library/enum.rst:670 +msgid "" +">>> Color.RED | Color.GREEN\n" +"" +msgstr "" + +#: ../../library/enum.rst:675 +msgid "Returns current flag binary and'ed with other::" +msgstr "" + +#: ../../library/enum.rst:677 +msgid "" +">>> purple & white\n" +"\n" +">>> purple & Color.GREEN\n" +"" +msgstr "" + +#: ../../library/enum.rst:684 +msgid "Returns current flag binary xor'ed with other::" +msgstr "" + +#: ../../library/enum.rst:686 +msgid "" +">>> purple ^ white\n" +"\n" +">>> purple ^ Color.GREEN\n" +"" +msgstr "" + +#: ../../library/enum.rst:693 +msgid "Returns all the flags in *type(self)* that are not in *self*::" +msgstr "" + +#: ../../library/enum.rst:695 +msgid "" +">>> ~white\n" +"\n" +">>> ~purple\n" +"\n" +">>> ~Color.RED\n" +"" +msgstr "" + +#: ../../library/enum.rst:704 +msgid "" +"Function used to format any remaining unnamed numeric values. Default is " +"the value's repr; common choices are :func:`hex` and :func:`oct`." +msgstr "" + +#: ../../library/enum.rst:709 +msgid "" +"Using :class:`auto` with :class:`Flag` results in integers that are powers " +"of two, starting with ``1``." +msgstr "" + +#: ../../library/enum.rst:712 +msgid "The *repr()* of zero-valued flags has changed. It is now:" +msgstr "" + +#: ../../library/enum.rst:720 +msgid "" +"``IntFlag`` is the same as :class:`Flag`, but its members are also integers " +"and can be used anywhere that an integer can be used." +msgstr "" + +#: ../../library/enum.rst:734 +msgid "" +"If any integer operation is performed with an *IntFlag* member, the result " +"is not an *IntFlag*::" +msgstr "" + +#: ../../library/enum.rst:737 +msgid "" +">>> Color.RED + 2\n" +"3" +msgstr "" + +#: ../../library/enum.rst:740 +msgid "If a :class:`Flag` operation is performed with an *IntFlag* member and:" +msgstr "" + +#: ../../library/enum.rst:742 +msgid "the result is a valid *IntFlag*: an *IntFlag* is returned" +msgstr "" + +#: ../../library/enum.rst:743 +msgid "" +"the result is not a valid *IntFlag*: the result depends on the :class:" +"`FlagBoundary` setting" +msgstr "" + +#: ../../library/enum.rst:745 +msgid "The :func:`repr` of unnamed zero-valued flags has changed. It is now::" +msgstr "" + +#: ../../library/enum.rst:747 +msgid "" +">>> Color(0)\n" +"" +msgstr "" + +#: ../../library/enum.rst:752 +msgid "" +"Using :class:`auto` with :class:`IntFlag` results in integers that are " +"powers of two, starting with ``1``." +msgstr "" + +#: ../../library/enum.rst:757 +msgid "" +":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the " +"*replacement of existing constants* use-case. :meth:`~object.__format__` " +"was already :meth:`!int.__format__` for that same reason." +msgstr "" + +#: ../../library/enum.rst:761 +msgid "" +"Inversion of an :class:`!IntFlag` now returns a positive value that is the " +"union of all flags not in the given flag, rather than a negative value. This " +"matches the existing :class:`Flag` behavior." +msgstr "" + +#: ../../library/enum.rst:767 +msgid "" +":class:`!ReprEnum` uses the :meth:`repr() ` of :class:`Enum`, " +"but the :class:`str() ` of the mixed-in data type:" +msgstr "" + +#: ../../library/enum.rst:770 +msgid ":meth:`!int.__str__` for :class:`IntEnum` and :class:`IntFlag`" +msgstr "" + +#: ../../library/enum.rst:771 +msgid ":meth:`!str.__str__` for :class:`StrEnum`" +msgstr "" + +#: ../../library/enum.rst:773 +msgid "" +"Inherit from :class:`!ReprEnum` to keep the :class:`str() ` / :func:" +"`format` of the mixed-in data type instead of using the :class:`Enum`-" +"default :meth:`str() `." +msgstr "" + +#: ../../library/enum.rst:782 +msgid "" +"*EnumCheck* contains the options used by the :func:`verify` decorator to " +"ensure various constraints; failed constraints result in a :exc:`ValueError`." +msgstr "" + +#: ../../library/enum.rst:787 +msgid "Ensure that each value has only one name::" +msgstr "" + +#: ../../library/enum.rst:789 +msgid "" +">>> from enum import Enum, verify, UNIQUE\n" +">>> @verify(UNIQUE)\n" +"... class Color(Enum):\n" +"... RED = 1\n" +"... GREEN = 2\n" +"... BLUE = 3\n" +"... CRIMSON = 1\n" +"Traceback (most recent call last):\n" +"...\n" +"ValueError: aliases found in : CRIMSON -> RED" +msgstr "" + +#: ../../library/enum.rst:803 +msgid "" +"Ensure that there are no missing values between the lowest-valued member and " +"the highest-valued member::" +msgstr "" + +#: ../../library/enum.rst:806 +msgid "" +">>> from enum import Enum, verify, CONTINUOUS\n" +">>> @verify(CONTINUOUS)\n" +"... class Color(Enum):\n" +"... RED = 1\n" +"... GREEN = 2\n" +"... BLUE = 5\n" +"Traceback (most recent call last):\n" +"...\n" +"ValueError: invalid enum 'Color': missing values 3, 4" +msgstr "" + +#: ../../library/enum.rst:818 +msgid "" +"Ensure that any flag groups/masks contain only named flags -- useful when " +"values are specified instead of being generated by :func:`auto`::" +msgstr "" + +#: ../../library/enum.rst:821 +msgid "" +">>> from enum import Flag, verify, NAMED_FLAGS\n" +">>> @verify(NAMED_FLAGS)\n" +"... class Color(Flag):\n" +"... RED = 1\n" +"... GREEN = 2\n" +"... BLUE = 4\n" +"... WHITE = 15\n" +"... NEON = 31\n" +"Traceback (most recent call last):\n" +"...\n" +"ValueError: invalid Flag 'Color': aliases WHITE and NEON are missing " +"combined values of 0x18 [use enum.show_flag_values(value) for details]" +msgstr "" + +#: ../../library/enum.rst:835 +msgid "" +"CONTINUOUS and NAMED_FLAGS are designed to work with integer-valued members." +msgstr "" + +#: ../../library/enum.rst:841 +msgid "" +"``FlagBoundary`` controls how out-of-range values are handled in :class:" +"`Flag` and its subclasses." +msgstr "" + +#: ../../library/enum.rst:846 +msgid "" +"Out-of-range values cause a :exc:`ValueError` to be raised. This is the " +"default for :class:`Flag`::" +msgstr "" + +#: ../../library/enum.rst:849 +msgid "" +">>> from enum import Flag, STRICT, auto\n" +">>> class StrictFlag(Flag, boundary=STRICT):\n" +"... RED = auto()\n" +"... GREEN = auto()\n" +"... BLUE = auto()\n" +"...\n" +">>> StrictFlag(2**2 + 2**4)\n" +"Traceback (most recent call last):\n" +"...\n" +"ValueError: invalid value 20\n" +" given 0b0 10100\n" +" allowed 0b0 00111" +msgstr "" + +#: ../../library/enum.rst:864 +msgid "" +"Out-of-range values have invalid values removed, leaving a valid :class:" +"`Flag` value::" +msgstr "" + +#: ../../library/enum.rst:867 +msgid "" +">>> from enum import Flag, CONFORM, auto\n" +">>> class ConformFlag(Flag, boundary=CONFORM):\n" +"... RED = auto()\n" +"... GREEN = auto()\n" +"... BLUE = auto()\n" +"...\n" +">>> ConformFlag(2**2 + 2**4)\n" +"" +msgstr "" + +#: ../../library/enum.rst:878 +msgid "" +"Out-of-range values lose their :class:`Flag` membership and revert to :class:" +"`int`." +msgstr "" + +#: ../../library/enum.rst:891 +msgid "" +"Out-of-range values are kept, and the :class:`Flag` membership is kept. This " +"is the default for :class:`IntFlag`::" +msgstr "" + +#: ../../library/enum.rst:894 +msgid "" +">>> from enum import Flag, KEEP, auto\n" +">>> class KeepFlag(Flag, boundary=KEEP):\n" +"... RED = auto()\n" +"... GREEN = auto()\n" +"... BLUE = auto()\n" +"...\n" +">>> KeepFlag(2**2 + 2**4)\n" +"" +msgstr "" + +#: ../../library/enum.rst:907 +msgid "" +"*EnumDict* is a subclass of :class:`dict` that is used as the namespace for " +"defining enum classes (see :ref:`prepare`). It is exposed to allow " +"subclasses of :class:`EnumType` with advanced behavior like having multiple " +"values per member. It should be called with the name of the enum class being " +"created, otherwise private names and internal classes will not be handled " +"correctly." +msgstr "" + +#: ../../library/enum.rst:914 +msgid "" +"Note that only the :class:`~collections.abc.MutableMapping` interface (:meth:" +"`~object.__setitem__` and :meth:`~dict.update`) is overridden. It may be " +"possible to bypass the checks using other :class:`!dict` operations like :" +"meth:`|= `." +msgstr "" + +#: ../../library/enum.rst:921 +msgid "A list of member names." +msgstr "" + +#: ../../library/enum.rst:930 +msgid "Supported ``__dunder__`` names" +msgstr "" + +#: ../../library/enum.rst:932 +msgid "" +":attr:`~EnumType.__members__` is a read-only ordered mapping of " +"``member_name``:``member`` items. It is only available on the class." +msgstr "" + +#: ../../library/enum.rst:935 +msgid "" +":meth:`~Enum.__new__`, if specified, must create and return the enum " +"members; it is also a very good idea to set the member's :attr:`~Enum." +"_value_` appropriately. Once all the members are created it is no longer " +"used." +msgstr "" + +#: ../../library/enum.rst:941 +msgid "Supported ``_sunder_`` names" +msgstr "" + +#: ../../library/enum.rst:943 +msgid ":attr:`~Enum._name_` -- name of the member" +msgstr "" + +#: ../../library/enum.rst:944 +msgid ":attr:`~Enum._value_` -- value of the member; can be set in ``__new__``" +msgstr "" + +#: ../../library/enum.rst:945 +msgid "" +":meth:`~Enum._missing_` -- a lookup function used when a value is not found; " +"may be overridden" +msgstr "" + +#: ../../library/enum.rst:947 +msgid "" +":attr:`~Enum._ignore_` -- a list of names, either as a :class:`list` or a :" +"class:`str`, that will not be transformed into members, and will be removed " +"from the final class" +msgstr "" + +#: ../../library/enum.rst:950 +msgid "" +":attr:`~Enum._order_` -- no longer used, kept for backward compatibility " +"(class attribute, removed during class creation)" +msgstr "" + +#: ../../library/enum.rst:953 +msgid "" +":meth:`~Enum._generate_next_value_` -- used to get an appropriate value for " +"an enum member; may be overridden" +msgstr "" + +#: ../../library/enum.rst:956 +msgid "" +":meth:`~Enum._add_alias_` -- adds a new name as an alias to an existing " +"member." +msgstr "" + +#: ../../library/enum.rst:958 +msgid "" +":meth:`~Enum._add_value_alias_` -- adds a new value as an alias to an " +"existing member." +msgstr "" + +#: ../../library/enum.rst:961 +msgid "" +"While ``_sunder_`` names are generally reserved for the further development " +"of the :class:`Enum` class and can not be used, some are explicitly allowed:" +msgstr "" + +#: ../../library/enum.rst:964 +msgid "" +"``_repr_*`` (e.g. ``_repr_html_``), as used in `IPython's rich display`_" +msgstr "" + +#: ../../library/enum.rst:966 +msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" +msgstr "" + +#: ../../library/enum.rst:967 +msgid "``_ignore_``" +msgstr "``_ignore_``" + +#: ../../library/enum.rst:968 +msgid "``_add_alias_``, ``_add_value_alias_``, ``_repr_*``" +msgstr "" + +#: ../../library/enum.rst:974 +msgid "Utilities and decorators" +msgstr "" + +#: ../../library/enum.rst:978 +msgid "" +"*auto* can be used in place of a value. If used, the *Enum* machinery will " +"call an :class:`Enum`'s :meth:`~Enum._generate_next_value_` to get an " +"appropriate value. For :class:`Enum` and :class:`IntEnum` that appropriate " +"value will be the highest value seen plus one; for :class:`Flag` and :class:" +"`IntFlag` it will be the first power-of-two greater than the highest value " +"seen; for :class:`StrEnum` it will be the lower-cased version of the " +"member's name. Care must be taken if mixing *auto()* with manually " +"specified values." +msgstr "" + +#: ../../library/enum.rst:986 +msgid "" +"*auto* instances are only resolved when at the top level of an assignment, " +"either by itself or as part of a tuple:" +msgstr "" + +#: ../../library/enum.rst:989 +msgid "``FIRST = auto()`` will work (auto() is replaced with ``1``);" +msgstr "" + +#: ../../library/enum.rst:990 +msgid "" +"``SECOND = auto(), -2`` will work (auto is replaced with ``2``, so ``2, -2`` " +"is used to create the ``SECOND`` enum member;" +msgstr "" + +#: ../../library/enum.rst:992 +msgid "" +"``THIRD = [auto(), -3]`` will *not* work (``[, -3]`` is used " +"to create the ``THIRD`` enum member)" +msgstr "" + +#: ../../library/enum.rst:997 +msgid "" +"In prior versions, ``auto()`` had to be the only thing on the assignment " +"line to work properly." +msgstr "" + +#: ../../library/enum.rst:1000 +msgid "" +"``_generate_next_value_`` can be overridden to customize the values used by " +"*auto*." +msgstr "" + +#: ../../library/enum.rst:1003 +msgid "" +"In version 3.13 the default ``_generate_next_value_`` will always return the " +"highest member value incremented by 1, and will fail if any member is an " +"incompatible type." +msgstr "" + +#: ../../library/enum.rst:1009 +msgid "" +"A decorator similar to the built-in :deco:`property`, but specifically for " +"enumerations. It allows member attributes to have the same names as members " +"themselves." +msgstr "" + +#: ../../library/enum.rst:1013 +msgid "" +"The *property* and the member must be defined in separate classes; for " +"example, the *value* and *name* attributes are defined in the *Enum* class, " +"and *Enum* subclasses can define members with the names ``value`` and " +"``name``." +msgstr "" + +#: ../../library/enum.rst:1022 +msgid "" +"A :keyword:`class` decorator specifically for enumerations. It searches an " +"enumeration's :attr:`~EnumType.__members__`, gathering any aliases it finds; " +"if any are found :exc:`ValueError` is raised with the details::" +msgstr "" + +#: ../../library/enum.rst:1026 +msgid "" +">>> from enum import Enum, unique\n" +">>> @unique\n" +"... class Mistake(Enum):\n" +"... ONE = 1\n" +"... TWO = 2\n" +"... THREE = 3\n" +"... FOUR = 3\n" +"...\n" +"Traceback (most recent call last):\n" +"...\n" +"ValueError: duplicate values found in : FOUR -> THREE" +msgstr "" + +#: ../../library/enum.rst:1040 +msgid "" +"A :keyword:`class` decorator specifically for enumerations. Members from :" +"class:`EnumCheck` are used to specify which constraints should be checked on " +"the decorated enumeration." +msgstr "" + +#: ../../library/enum.rst:1048 +msgid "A decorator for use in enums: its target will become a member." +msgstr "" + +#: ../../library/enum.rst:1054 +msgid "A decorator for use in enums: its target will not become a member." +msgstr "" + +#: ../../library/enum.rst:1060 +msgid "" +"A decorator to change the :class:`str() ` and :func:`repr` of an enum " +"to show its members as belonging to the module instead of its class. Should " +"only be used when the enum members are exported to the module global " +"namespace (see :class:`re.RegexFlag` for an example)." +msgstr "" + +#: ../../library/enum.rst:1070 +msgid "Return a list of all power-of-two integers contained in a flag *value*." +msgstr "" + +#: ../../library/enum.rst:1091 +msgid "Notes" +msgstr "" + +#: ../../library/enum.rst:1093 +msgid ":class:`IntEnum`, :class:`StrEnum`, and :class:`IntFlag`" +msgstr "" + +#: ../../library/enum.rst:1095 +msgid "" +"These three enum types are designed to be drop-in replacements for existing " +"integer- and string-based values; as such, they have extra limitations:" +msgstr "" + +#: ../../library/enum.rst:1098 +msgid "``__str__`` uses the value and not the name of the enum member" +msgstr "" + +#: ../../library/enum.rst:1100 +msgid "" +"``__format__``, because it uses ``__str__``, will also use the value of the " +"enum member instead of its name" +msgstr "" + +#: ../../library/enum.rst:1103 +msgid "" +"If you do not need/want those limitations, you can either create your own " +"base class by mixing in the ``int`` or ``str`` type yourself::" +msgstr "" + +#: ../../library/enum.rst:1106 +msgid "" +">>> from enum import Enum\n" +">>> class MyIntEnum(int, Enum):\n" +"... pass" +msgstr "" + +#: ../../library/enum.rst:1110 +msgid "or you can reassign the appropriate :meth:`str`, etc., in your enum::" +msgstr "" + +#: ../../library/enum.rst:1112 +msgid "" +">>> from enum import Enum, IntEnum\n" +">>> class MyIntEnum(IntEnum):\n" +"... __str__ = Enum.__str__" +msgstr "" diff --git a/library/http.client.po b/library/http.client.po index 5522ecc8..87b6e04b 100644 --- a/library/http.client.po +++ b/library/http.client.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:01+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -308,7 +308,7 @@ msgid "" "TextIOBase`, the data returned by the ``read()`` method will be encoded as " "ISO-8859-1, otherwise the data returned by ``read()`` is sent as is. If " "*body* is an iterable, the elements of the iterable are sent as is until the " -"iterable is exhausted." +"iterable is :term:`exhausted`." msgstr "" #: ../../library/http.client.rst:282 diff --git a/library/http.client.po~ b/library/http.client.po~ new file mode 100644 index 00000000..5522ecc8 --- /dev/null +++ b/library/http.client.po~ @@ -0,0 +1,803 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:01+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/http.client.rst:2 +msgid ":mod:`!http.client` --- HTTP protocol client" +msgstr "" + +#: ../../library/http.client.rst:7 +msgid "**Source code:** :source:`Lib/http/client.py`" +msgstr "" + +#: ../../library/http.client.rst:17 +msgid "" +"This module defines classes that implement the client side of the HTTP and " +"HTTPS protocols. It is normally not used directly --- the module :mod:" +"`urllib.request` uses it to handle URLs that use HTTP and HTTPS." +msgstr "" + +#: ../../library/http.client.rst:23 +msgid "" +"The `Requests package `_ is " +"recommended for a higher-level HTTP client interface." +msgstr "" + +#: ../../library/http.client.rst:28 +msgid "" +"HTTPS support is only available if Python was compiled with SSL support " +"(through the :mod:`ssl` module)." +msgstr "" + +#: ../../includes/wasm-notavail.rst:3 +msgid "Availability" +msgstr "" + +#: ../../includes/wasm-notavail.rst:5 +msgid "" +"This module does not work or is not available on WebAssembly. See :ref:`wasm-" +"availability` for more information." +msgstr "" + +#: ../../library/http.client.rst:33 +msgid "The module provides the following classes:" +msgstr "" + +#: ../../library/http.client.rst:39 +msgid "" +"An :class:`HTTPConnection` instance represents one transaction with an HTTP " +"server. It should be instantiated by passing it a host and optional port " +"number. If no port number is passed, the port is extracted from the host " +"string if it has the form ``host:port``, else the default HTTP port (80) is " +"used. If the optional *timeout* parameter is given, blocking operations " +"(like connection attempts) will timeout after that many seconds (if it is " +"not given, the global default timeout setting is used). The optional " +"*source_address* parameter may be a tuple of a (host, port) to use as the " +"source address the HTTP connection is made from. The optional *blocksize* " +"parameter sets the buffer size in bytes for sending a file-like message " +"body. The optional *max_response_headers* parameter sets the maximum number " +"of allowed response headers to help prevent denial-of-service attacks, " +"otherwise the default value (100) is used." +msgstr "" + +#: ../../library/http.client.rst:53 +msgid "" +"For example, the following calls all create instances that connect to the " +"server at the same host and port::" +msgstr "" + +#: ../../library/http.client.rst:56 +msgid "" +">>> h1 = http.client.HTTPConnection('www.python.org')\n" +">>> h2 = http.client.HTTPConnection('www.python.org:80')\n" +">>> h3 = http.client.HTTPConnection('www.python.org', 80)\n" +">>> h4 = http.client.HTTPConnection('www.python.org', 80, timeout=10)" +msgstr "" + +#: ../../library/http.client.rst:61 +msgid "*source_address* was added." +msgstr "" + +#: ../../library/http.client.rst:64 +msgid "" +"The *strict* parameter was removed. HTTP 0.9-style \"Simple Responses\" are " +"no longer supported." +msgstr "" + +#: ../../library/http.client.rst:68 +msgid "*blocksize* parameter was added." +msgstr "" + +#: ../../library/http.client.rst:71 ../../library/http.client.rst:117 +msgid "*max_response_headers* parameter was added." +msgstr "" + +#: ../../library/http.client.rst:79 +msgid "" +"A subclass of :class:`HTTPConnection` that uses SSL for communication with " +"secure servers. Default port is ``443``. If *context* is specified, it " +"must be a :class:`ssl.SSLContext` instance describing the various SSL " +"options." +msgstr "" + +#: ../../library/http.client.rst:84 +msgid "Please read :ref:`ssl-security` for more information on best practices." +msgstr "" + +#: ../../library/http.client.rst:86 +msgid "*source_address*, *context* and *check_hostname* were added." +msgstr "" + +#: ../../library/http.client.rst:89 +msgid "" +"This class now supports HTTPS virtual hosts if possible (that is, if :const:" +"`ssl.HAS_SNI` is true)." +msgstr "" + +#: ../../library/http.client.rst:93 +msgid "" +"The *strict* parameter was removed. HTTP 0.9-style \"Simple Responses\" are " +"no longer supported." +msgstr "" + +#: ../../library/http.client.rst:97 +msgid "" +"This class now performs all the necessary certificate and hostname checks by " +"default. To revert to the previous, unverified, behavior :func:`!ssl." +"_create_unverified_context` can be passed to the *context* parameter." +msgstr "" + +#: ../../library/http.client.rst:103 +msgid "" +"This class now enables TLS 1.3 :attr:`ssl.SSLContext.post_handshake_auth` " +"for the default *context* or when *cert_file* is passed with a custom " +"*context*." +msgstr "" + +#: ../../library/http.client.rst:108 +msgid "" +"This class now sends an ALPN extension with protocol indicator ``http/1.1`` " +"when no *context* is given. Custom *context* should set ALPN protocols with :" +"meth:`~ssl.SSLContext.set_alpn_protocols`." +msgstr "" + +#: ../../library/http.client.rst:113 +msgid "" +"The deprecated *key_file*, *cert_file* and *check_hostname* parameters have " +"been removed." +msgstr "" + +#: ../../library/http.client.rst:123 +msgid "" +"Class whose instances are returned upon successful connection. Not " +"instantiated directly by user." +msgstr "" + +#: ../../library/http.client.rst:126 +msgid "" +"The *strict* parameter was removed. HTTP 0.9 style \"Simple Responses\" are " +"no longer supported." +msgstr "" + +#: ../../library/http.client.rst:130 +msgid "This module provides the following function:" +msgstr "" + +#: ../../library/http.client.rst:134 +msgid "" +"Parse the headers from a file pointer *fp* representing a HTTP request/" +"response. The file has to be a :class:`~io.BufferedIOBase` reader (i.e. not " +"text) and must provide a valid :rfc:`5322` style header." +msgstr "" + +#: ../../library/http.client.rst:138 +msgid "" +"This function returns an instance of :class:`http.client.HTTPMessage` that " +"holds the header fields, but no payload (the same as :attr:`HTTPResponse." +"msg` and :attr:`http.server.BaseHTTPRequestHandler.headers`). After " +"returning, the file pointer *fp* is ready to read the HTTP body." +msgstr "" + +#: ../../library/http.client.rst:145 +msgid "" +":meth:`parse_headers` does not parse the start-line of a HTTP message; it " +"only parses the ``Name: value`` lines. The file has to be ready to read " +"these field lines, so the first line should already be consumed before " +"calling the function." +msgstr "" + +#: ../../library/http.client.rst:150 +msgid "The following exceptions are raised as appropriate:" +msgstr "" + +#: ../../library/http.client.rst:155 +msgid "" +"The base class of the other exceptions in this module. It is a subclass of :" +"exc:`Exception`." +msgstr "" + +#: ../../library/http.client.rst:161 ../../library/http.client.rst:172 +#: ../../library/http.client.rst:177 ../../library/http.client.rst:182 +#: ../../library/http.client.rst:187 ../../library/http.client.rst:192 +msgid "A subclass of :exc:`HTTPException`." +msgstr "" + +#: ../../library/http.client.rst:166 +msgid "" +"A subclass of :exc:`HTTPException`, raised if a port is given and is either " +"non-numeric or empty." +msgstr "" + +#: ../../library/http.client.rst:197 ../../library/http.client.rst:202 +#: ../../library/http.client.rst:207 +msgid "A subclass of :exc:`ImproperConnectionState`." +msgstr "" + +#: ../../library/http.client.rst:212 +msgid "" +"A subclass of :exc:`HTTPException`. Raised if a server responds with a HTTP " +"status code that we don't understand." +msgstr "" + +#: ../../library/http.client.rst:218 +msgid "" +"A subclass of :exc:`HTTPException`. Raised if an excessively long line is " +"received in the HTTP protocol from the server." +msgstr "" + +#: ../../library/http.client.rst:224 +msgid "" +"A subclass of :exc:`ConnectionResetError` and :exc:`BadStatusLine`. Raised " +"by :meth:`HTTPConnection.getresponse` when the attempt to read the response " +"results in no data read from the connection, indicating that the remote end " +"has closed the connection." +msgstr "" + +#: ../../library/http.client.rst:229 +msgid "Previously, :exc:`BadStatusLine`\\ ``('')`` was raised." +msgstr "" + +#: ../../library/http.client.rst:233 +msgid "The constants defined in this module are:" +msgstr "" + +#: ../../library/http.client.rst:237 +msgid "The default port for the HTTP protocol (always ``80``)." +msgstr "" + +#: ../../library/http.client.rst:241 +msgid "The default port for the HTTPS protocol (always ``443``)." +msgstr "" + +#: ../../library/http.client.rst:245 +msgid "This dictionary maps the HTTP 1.1 status codes to the W3C names." +msgstr "" + +#: ../../library/http.client.rst:247 +msgid "" +"Example: ``http.client.responses[http.client.NOT_FOUND]`` is ``'Not Found'``." +msgstr "" + +#: ../../library/http.client.rst:249 +msgid "" +"See :ref:`http-status-codes` for a list of HTTP status codes that are " +"available in this module as constants." +msgstr "" + +#: ../../library/http.client.rst:256 +msgid "HTTPConnection Objects" +msgstr "" + +#: ../../library/http.client.rst:258 +msgid ":class:`HTTPConnection` instances have the following methods:" +msgstr "" + +#: ../../library/http.client.rst:264 +msgid "" +"This will send a request to the server using the HTTP request method " +"*method* and the request URI *url*. The provided *url* must be an absolute " +"path to conform with :rfc:`RFC 2616 §5.1.2 <2616#section-5.1.2>` (unless " +"connecting to an HTTP proxy server or using the ``OPTIONS`` or ``CONNECT`` " +"methods)." +msgstr "" + +#: ../../library/http.client.rst:270 +msgid "" +"If *body* is specified, the specified data is sent after the headers are " +"finished. It may be a :class:`str`, a :term:`bytes-like object`, an open :" +"term:`file object`, or an iterable of :class:`bytes`. If *body* is a " +"string, it is encoded as ISO-8859-1, the default for HTTP. If it is a bytes-" +"like object, the bytes are sent as is. If it is a :term:`file object`, the " +"contents of the file is sent; this file object should support at least the " +"``read()`` method. If the file object is an instance of :class:`io." +"TextIOBase`, the data returned by the ``read()`` method will be encoded as " +"ISO-8859-1, otherwise the data returned by ``read()`` is sent as is. If " +"*body* is an iterable, the elements of the iterable are sent as is until the " +"iterable is exhausted." +msgstr "" + +#: ../../library/http.client.rst:282 +msgid "" +"The *headers* argument should be a mapping of extra HTTP headers to send " +"with the request. A :rfc:`Host header <2616#section-14.23>` must be provided " +"to conform with :rfc:`RFC 2616 §5.1.2 <2616#section-5.1.2>` (unless " +"connecting to an HTTP proxy server or using the ``OPTIONS`` or ``CONNECT`` " +"methods)." +msgstr "" + +#: ../../library/http.client.rst:288 +msgid "" +"If *headers* contains neither Content-Length nor Transfer-Encoding, but " +"there is a request body, one of those header fields will be added " +"automatically. If *body* is ``None``, the Content-Length header is set to " +"``0`` for methods that expect a body (``PUT``, ``POST``, and ``PATCH``). If " +"*body* is a string or a bytes-like object that is not also a :term:`file " +"`, the Content-Length header is set to its length. Any other " +"type of *body* (files and iterables in general) will be chunk-encoded, and " +"the Transfer-Encoding header will automatically be set instead of Content-" +"Length." +msgstr "" + +#: ../../library/http.client.rst:300 +msgid "" +"The *encode_chunked* argument is only relevant if Transfer-Encoding is " +"specified in *headers*. If *encode_chunked* is ``False``, the " +"HTTPConnection object assumes that all encoding is handled by the calling " +"code. If it is ``True``, the body will be chunk-encoded." +msgstr "" + +#: ../../library/http.client.rst:305 +msgid "" +"For example, to perform a ``GET`` request to ``https://docs.python.org/3/``::" +msgstr "" + +#: ../../library/http.client.rst:307 +msgid "" +">>> import http.client\n" +">>> host = \"docs.python.org\"\n" +">>> conn = http.client.HTTPSConnection(host)\n" +">>> conn.request(\"GET\", \"/3/\", headers={\"Host\": host})\n" +">>> response = conn.getresponse()\n" +">>> print(response.status, response.reason)\n" +"200 OK" +msgstr "" + +#: ../../library/http.client.rst:316 +msgid "" +"Chunked transfer encoding has been added to the HTTP protocol version 1.1. " +"Unless the HTTP server is known to handle HTTP 1.1, the caller must either " +"specify the Content-Length, or must pass a :class:`str` or bytes-like object " +"that is not also a file as the body representation." +msgstr "" + +#: ../../library/http.client.rst:324 +msgid "" +"Note that you must have read the whole response or call :meth:`close` if :" +"meth:`getresponse` raised an non-:exc:`ConnectionError` exception before you " +"can send a new request to the server." +msgstr "" + +#: ../../library/http.client.rst:328 +msgid "*body* can now be an iterable." +msgstr "" + +#: ../../library/http.client.rst:331 +msgid "" +"If neither Content-Length nor Transfer-Encoding are set in *headers*, file " +"and iterable *body* objects are now chunk-encoded. The *encode_chunked* " +"argument was added. No attempt is made to determine the Content-Length for " +"file objects." +msgstr "" + +#: ../../library/http.client.rst:340 +msgid "" +"Should be called after a request is sent to get the response from the " +"server. Returns an :class:`HTTPResponse` instance." +msgstr "" + +#: ../../library/http.client.rst:343 +msgid "" +"If a :exc:`ConnectionError` or subclass is raised, the :class:" +"`HTTPConnection` object will be ready to reconnect when a new request is " +"sent." +msgstr "" + +#: ../../library/http.client.rst:348 +msgid "" +"Note that this does not apply to :exc:`OSError`\\s raised by the underlying " +"socket. Instead the caller is responsible to call :meth:`close` on the " +"existing connection." +msgstr "" + +#: ../../library/http.client.rst:355 +msgid "" +"Set the debugging level. The default debug level is ``0``, meaning no " +"debugging output is printed. Any value greater than ``0`` will cause all " +"currently defined debug output to be printed to stdout. The ``debuglevel`` " +"is passed to any new :class:`HTTPResponse` objects that are created." +msgstr "" + +#: ../../library/http.client.rst:365 +msgid "" +"Set the host and the port for HTTP Connect Tunnelling. This allows running " +"the connection through a proxy server." +msgstr "" + +#: ../../library/http.client.rst:368 +msgid "" +"The *host* and *port* arguments specify the endpoint of the tunneled " +"connection (i.e. the address included in the CONNECT request, *not* the " +"address of the proxy server)." +msgstr "" + +#: ../../library/http.client.rst:372 +msgid "" +"The *headers* argument should be a mapping of extra HTTP headers to send " +"with the CONNECT request." +msgstr "" + +#: ../../library/http.client.rst:375 +msgid "" +"As HTTP/1.1 is used for HTTP CONNECT tunnelling request, `as per the RFC " +"`_, a HTTP " +"``Host:`` header must be provided, matching the authority-form of the " +"request target provided as the destination for the CONNECT request. If a " +"HTTP ``Host:`` header is not provided via the headers argument, one is " +"generated and transmitted automatically." +msgstr "" + +#: ../../library/http.client.rst:382 +msgid "" +"For example, to tunnel through a HTTPS proxy server running locally on port " +"8080, we would pass the address of the proxy to the :class:`HTTPSConnection` " +"constructor, and the address of the host that we eventually want to reach to " +"the :meth:`~HTTPConnection.set_tunnel` method::" +msgstr "" + +#: ../../library/http.client.rst:387 +msgid "" +">>> import http.client\n" +">>> conn = http.client.HTTPSConnection(\"localhost\", 8080)\n" +">>> conn.set_tunnel(\"www.python.org\")\n" +">>> conn.request(\"HEAD\",\"/index.html\")" +msgstr "" + +#: ../../library/http.client.rst:394 +msgid "" +"HTTP CONNECT tunnelling requests use protocol HTTP/1.1, upgraded from " +"protocol HTTP/1.0. ``Host:`` HTTP headers are mandatory for HTTP/1.1, so one " +"will be automatically generated and transmitted if not provided in the " +"headers argument." +msgstr "" + +#: ../../library/http.client.rst:403 +msgid "" +"Returns a dictionary with the headers of the response received from the " +"proxy server to the CONNECT request." +msgstr "" + +#: ../../library/http.client.rst:406 +msgid "If the CONNECT request was not sent, the method returns ``None``." +msgstr "" + +#: ../../library/http.client.rst:413 +msgid "" +"Connect to the server specified when the object was created. By default, " +"this is called automatically when making a request if the client does not " +"already have a connection." +msgstr "" + +#: ../../library/http.client.rst:417 +msgid "" +"Raises an :ref:`auditing event ` ``http.client.connect`` with " +"arguments ``self``, ``host``, ``port``." +msgstr "" + +#: ../../library/http.client.rst:422 +msgid "Close the connection to the server." +msgstr "" + +#: ../../library/http.client.rst:427 +msgid "Buffer size in bytes for sending a file-like message body." +msgstr "" + +#: ../../library/http.client.rst:434 +msgid "" +"The maximum number of allowed response headers to help prevent denial-of-" +"service attacks. By default, the maximum number of allowed headers is set to " +"100. The same limit applies to the trailer section of a chunked response." +msgstr "" + +#: ../../library/http.client.rst:441 +msgid "" +"As an alternative to using the :meth:`~HTTPConnection.request` method " +"described above, you can also send your request step by step, by using the " +"four functions below." +msgstr "" + +#: ../../library/http.client.rst:448 +msgid "" +"This should be the first call after the connection to the server has been " +"made. It sends a line to the server consisting of the *method* string, the " +"*url* string, and the HTTP version (``HTTP/1.1``). To disable automatic " +"sending of ``Host:`` or ``Accept-Encoding:`` headers (for example to accept " +"additional content encodings), specify *skip_host* or *skip_accept_encoding* " +"with non-False values." +msgstr "" + +#: ../../library/http.client.rst:458 +msgid "" +"Send an :rfc:`822`\\ -style header to the server. It sends a line to the " +"server consisting of the header, a colon and a space, and the first " +"argument. If more arguments are given, continuation lines are sent, each " +"consisting of a tab and an argument." +msgstr "" + +#: ../../library/http.client.rst:466 +msgid "" +"Send a blank line to the server, signalling the end of the headers. The " +"optional *message_body* argument can be used to pass a message body " +"associated with the request." +msgstr "" + +#: ../../library/http.client.rst:470 +msgid "" +"If *encode_chunked* is ``True``, the result of each iteration of " +"*message_body* will be chunk-encoded as specified in :rfc:`7230`, Section " +"3.3.1. How the data is encoded is dependent on the type of *message_body*. " +"If *message_body* implements the :ref:`buffer interface ` the " +"encoding will result in a single chunk. If *message_body* is a :class:" +"`collections.abc.Iterable`, each iteration of *message_body* will result in " +"a chunk. If *message_body* is a :term:`file object`, each call to ``." +"read()`` will result in a chunk. The method automatically signals the end of " +"the chunk-encoded data immediately after *message_body*." +msgstr "" + +#: ../../library/http.client.rst:481 +msgid "" +"Due to the chunked encoding specification, empty chunks yielded by an " +"iterator body will be ignored by the chunk-encoder. This is to avoid " +"premature termination of the read of the request by the target server due to " +"malformed encoding." +msgstr "" + +#: ../../library/http.client.rst:486 +msgid "Added chunked encoding support and the *encode_chunked* parameter." +msgstr "" + +#: ../../library/http.client.rst:492 +msgid "" +"Send data to the server. This should be used directly only after the :meth:" +"`endheaders` method has been called and before :meth:`getresponse` is called." +msgstr "" + +#: ../../library/http.client.rst:496 +msgid "" +"Raises an :ref:`auditing event ` ``http.client.send`` with " +"arguments ``self``, ``data``." +msgstr "" + +#: ../../library/http.client.rst:502 +msgid "HTTPResponse Objects" +msgstr "" + +#: ../../library/http.client.rst:504 +msgid "" +"An :class:`HTTPResponse` instance wraps the HTTP response from the server. " +"It provides access to the request headers and the entity body. The response " +"is an iterable object and can be used in a with statement." +msgstr "" + +#: ../../library/http.client.rst:509 +msgid "" +"The :class:`io.BufferedIOBase` interface is now implemented and all of its " +"reader operations are supported." +msgstr "" + +#: ../../library/http.client.rst:516 +msgid "Reads and returns the response body, or up to the next *amt* bytes." +msgstr "" + +#: ../../library/http.client.rst:520 +msgid "" +"Reads up to the next len(b) bytes of the response body into the buffer *b*. " +"Returns the number of bytes read." +msgstr "" + +#: ../../library/http.client.rst:527 +msgid "" +"Return the value of the header *name*, or *default* if there is no header " +"matching *name*. If there is more than one header with the name *name*, " +"return all of the values joined by ', '. If *default* is any iterable other " +"than a single string, its elements are similarly returned joined by commas." +msgstr "" + +#: ../../library/http.client.rst:534 +msgid "Return a list of (header, value) tuples." +msgstr "" + +#: ../../library/http.client.rst:538 +msgid "Return the ``fileno`` of the underlying socket." +msgstr "" + +#: ../../library/http.client.rst:542 +msgid "" +"A :class:`http.client.HTTPMessage` instance containing the response " +"headers. :class:`http.client.HTTPMessage` is a subclass of :class:`email." +"message.Message`." +msgstr "" + +#: ../../library/http.client.rst:548 +msgid "" +"HTTP protocol version used by server. 10 for HTTP/1.0, 11 for HTTP/1.1." +msgstr "" + +#: ../../library/http.client.rst:552 +msgid "" +"URL of the resource retrieved, commonly used to determine if a redirect was " +"followed." +msgstr "" + +#: ../../library/http.client.rst:556 +msgid "" +"Headers of the response in the form of an :class:`email.message." +"EmailMessage` instance." +msgstr "" + +#: ../../library/http.client.rst:560 +msgid "Status code returned by server." +msgstr "" + +#: ../../library/http.client.rst:564 +msgid "Reason phrase returned by server." +msgstr "" + +#: ../../library/http.client.rst:568 +msgid "" +"A debugging hook. If :attr:`debuglevel` is greater than zero, messages will " +"be printed to stdout as the response is read and parsed." +msgstr "" + +#: ../../library/http.client.rst:573 +msgid "Is ``True`` if the stream is closed." +msgstr "" + +#: ../../library/http.client.rst:577 +msgid "Deprecated in favor of :attr:`~HTTPResponse.url`." +msgstr "" + +#: ../../library/http.client.rst:582 +msgid "Deprecated in favor of :attr:`~HTTPResponse.headers`." +msgstr "" + +#: ../../library/http.client.rst:587 +msgid "Deprecated in favor of :attr:`~HTTPResponse.status`." +msgstr "" + +#: ../../library/http.client.rst:591 +msgid "Examples" +msgstr "" + +#: ../../library/http.client.rst:593 +msgid "Here is an example session that uses the ``GET`` method::" +msgstr "" + +#: ../../library/http.client.rst:595 +msgid "" +">>> import http.client\n" +">>> conn = http.client.HTTPSConnection(\"www.python.org\")\n" +">>> conn.request(\"GET\", \"/\")\n" +">>> r1 = conn.getresponse()\n" +">>> print(r1.status, r1.reason)\n" +"200 OK\n" +">>> data1 = r1.read() # This will return entire content.\n" +">>> # The following example demonstrates reading data in chunks.\n" +">>> conn.request(\"GET\", \"/\")\n" +">>> r1 = conn.getresponse()\n" +">>> while chunk := r1.read(200):\n" +"... print(repr(chunk))\n" +"b'\\n', char.text)" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:346 +msgid "" +"A better way to search the namespaced XML example is to create a dictionary " +"with your own prefixes and use those in the search functions::" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:349 +msgid "" +"ns = {'real_person': 'http://people.example.com',\n" +" 'role': 'http://characters.example.com'}\n" +"\n" +"for actor in root.findall('real_person:actor', ns):\n" +" name = actor.find('real_person:name', ns)\n" +" print(name.text)\n" +" for char in actor.findall('role:character', ns):\n" +" print(' |-->', char.text)" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:358 +msgid "These two approaches both output::" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:360 +msgid "" +"John Cleese\n" +" |--> Lancelot\n" +" |--> Archie Leach\n" +"Eric Idle\n" +" |--> Sir Robin\n" +" |--> Gunther\n" +" |--> Commander Clement" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:372 +msgid "XPath support" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:374 +msgid "" +"This module provides limited support for `XPath expressions `_ for locating elements in a tree. The goal is to support a " +"small subset of the abbreviated syntax; a full XPath engine is outside the " +"scope of the module." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:380 +#: ../../library/xml.etree.elementtree.rst:789 +msgid "Example" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:382 +msgid "" +"Here's an example that demonstrates some of the XPath capabilities of the " +"module. We'll be using the ``countrydata`` XML document from the :ref:" +"`Parsing XML ` section::" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:386 +msgid "" +"import xml.etree.ElementTree as ET\n" +"\n" +"root = ET.fromstring(countrydata)\n" +"\n" +"# Top-level elements\n" +"root.findall(\".\")\n" +"\n" +"# All 'neighbor' grand-children of 'country' children of the top-level\n" +"# elements\n" +"root.findall(\"./country/neighbor\")\n" +"\n" +"# Nodes with name='Singapore' that have a 'year' child\n" +"root.findall(\".//year/..[@name='Singapore']\")\n" +"\n" +"# 'year' nodes that are children of nodes with name='Singapore'\n" +"root.findall(\".//*[@name='Singapore']/year\")\n" +"\n" +"# All 'neighbor' nodes that are the second child of their parent\n" +"root.findall(\".//neighbor[2]\")" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:406 +msgid "" +"For XML with namespaces, use the usual qualified ``{namespace}tag`` " +"notation::" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:408 +msgid "" +"# All dublin-core \"title\" tags in the document\n" +"root.findall(\".//{http://purl.org/dc/elements/1.1/}title\")" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:413 +msgid "Supported XPath syntax" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:418 +msgid "Syntax" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:418 +msgid "Meaning" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:420 +msgid "``tag``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:420 +msgid "" +"Selects all child elements with the given tag. For example, ``spam`` selects " +"all child elements named ``spam``, and ``spam/egg`` selects all " +"grandchildren named ``egg`` in all children named ``spam``. ``{namespace}" +"*`` selects all tags in the given namespace, ``{*}spam`` selects tags named " +"``spam`` in any (or no) namespace, and ``{}*`` only selects tags that are " +"not in a namespace." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:429 +msgid "Support for star-wildcards was added." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:432 +msgid "``*``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:432 +msgid "" +"Selects all child elements, including comments and processing instructions. " +"For example, ``*/egg`` selects all grandchildren named ``egg``." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:436 +msgid "``.``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:436 +msgid "" +"Selects the current node. This is mostly useful at the beginning of the " +"path, to indicate that it's a relative path." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:440 +msgid "``//``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:440 +msgid "" +"Selects all subelements, on all levels beneath the current element. For " +"example, ``.//egg`` selects all ``egg`` elements in the entire tree." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:444 +msgid "``..``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:444 +msgid "" +"Selects the parent element. Returns ``None`` if the path attempts to reach " +"the ancestors of the start element (the element ``find`` was called on)." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:448 +msgid "``[@attrib]``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:448 +msgid "Selects all elements that have the given attribute." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:450 +msgid "``[@attrib='value']``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:450 +msgid "" +"Selects all elements for which the given attribute has the given value. The " +"value cannot contain quotes." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:454 +msgid "``[@attrib!='value']``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:454 +msgid "" +"Selects all elements for which the given attribute does not have the given " +"value. The value cannot contain quotes." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:460 +msgid "``[tag]``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:460 +msgid "" +"Selects all elements that have a child named ``tag``. Only immediate " +"children are supported." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:463 +msgid "``[.='text']``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:463 +msgid "" +"Selects all elements whose complete text content, including descendants, " +"equals the given ``text``." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:468 +msgid "``[.!='text']``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:468 +msgid "" +"Selects all elements whose complete text content, including descendants, " +"does not equal the given ``text``." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:474 +msgid "``[tag='text']``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:474 +msgid "" +"Selects all elements that have a child named ``tag`` whose complete text " +"content, including descendants, equals the given ``text``." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:478 +msgid "``[tag!='text']``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:478 +msgid "" +"Selects all elements that have a child named ``tag`` whose complete text " +"content, including descendants, does not equal the given ``text``." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:484 +msgid "``[position]``" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:484 +msgid "" +"Selects all elements that are located at the given position. The position " +"can be either an integer (1 is the first position), the expression " +"``last()`` (for the last position), or a position relative to the last " +"position (e.g. ``last()-1``)." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:491 +msgid "" +"Predicates (expressions within square brackets) must be preceded by a tag " +"name, an asterisk, or another predicate. ``position`` predicates must be " +"preceded by a tag name." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:496 +#: ../../library/xml.etree.elementtree.rst:841 +msgid "Reference" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:501 +#: ../../library/xml.etree.elementtree.rst:846 +msgid "Functions" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:505 +msgid "`C14N 2.0 `_ transformation function." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:507 +msgid "" +"Canonicalization is a way to normalise XML output in a way that allows byte-" +"by-byte comparisons and digital signatures. It reduces the freedom that XML " +"serializers have and instead generates a more constrained XML " +"representation. The main restrictions regard the placement of namespace " +"declarations, the ordering of attributes, and ignorable whitespace." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:513 +msgid "" +"This function takes an XML data string (*xml_data*) or a file path or file-" +"like object (*from_file*) as input, converts it to the canonical form, and " +"writes it out using the *out* file(-like) object, if provided, or returns it " +"as a text string if not. The output file receives text, not bytes. It " +"should therefore be opened in text mode with ``utf-8`` encoding." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:520 +msgid "Typical uses::" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:522 +msgid "" +"xml_data = \"...\"\n" +"print(canonicalize(xml_data))\n" +"\n" +"with open(\"c14n_output.xml\", mode='w', encoding='utf-8') as out_file:\n" +" canonicalize(xml_data, out=out_file)\n" +"\n" +"with open(\"c14n_output.xml\", mode='w', encoding='utf-8') as out_file:\n" +" canonicalize(from_file=\"inputfile.xml\", out=out_file)" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:531 +msgid "The configuration *options* are as follows:" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:533 +msgid "*with_comments*: set to true to include comments (default: false)" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:534 +msgid "" +"*strip_text*: set to true to strip whitespace before and after text content" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:535 +#: ../../library/xml.etree.elementtree.rst:537 +msgid "(default: false)" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:536 +msgid "" +"*rewrite_prefixes*: set to true to replace namespace prefixes by " +"\"n{number}\"" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:538 +msgid "*qname_aware_tags*: a set of qname aware tag names in which prefixes" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:539 +#: ../../library/xml.etree.elementtree.rst:541 +msgid "should be replaced in text content (default: empty)" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:540 +msgid "" +"*qname_aware_attrs*: a set of qname aware attribute names in which prefixes" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:542 +msgid "*exclude_attrs*: a set of attribute names that should not be serialised" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:543 +msgid "*exclude_tags*: a set of tag names that should not be serialised" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:545 +msgid "" +"In the option list above, \"a set\" refers to any collection or iterable of " +"strings, no ordering is expected." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:553 +msgid "" +"Comment element factory. This factory function creates a special element " +"that will be serialized as an XML comment by the standard serializer. The " +"comment string can be either a bytestring or a Unicode string. *text* is a " +"string containing the comment string. Returns an element instance " +"representing a comment." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:559 +msgid "" +"Note that :class:`XMLParser` skips over comments in the input instead of " +"creating comment objects for them. An :class:`ElementTree` will only contain " +"comment nodes if they have been inserted into to the tree using one of the :" +"class:`Element` methods." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:566 +msgid "" +"Writes an element tree or element structure to sys.stdout. This function " +"should be used for debugging only." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:569 +msgid "" +"The exact output format is implementation dependent. In this version, it's " +"written as an ordinary XML file." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:572 +msgid "*elem* is an element tree or an individual element." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:574 +msgid "" +"The :func:`dump` function now preserves the attribute order specified by the " +"user." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:581 +msgid "" +"Parses an XML section from a string constant. Same as :func:`XML`. *text* " +"is a string containing XML data. *parser* is an optional parser instance. " +"If not given, the standard :class:`XMLParser` parser is used. Returns an :" +"class:`Element` instance." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:589 +msgid "" +"Parses an XML document from a sequence of string fragments. *sequence* is a " +"list or other sequence containing XML data fragments. *parser* is an " +"optional parser instance. If not given, the standard :class:`XMLParser` " +"parser is used. Returns an :class:`Element` instance." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:599 +msgid "" +"Appends whitespace to the subtree to indent the tree visually. This can be " +"used to generate pretty-printed XML output. *tree* can be an Element or " +"ElementTree. *space* is the whitespace string that will be inserted for " +"each indentation level, two space characters by default. For indenting " +"partial subtrees inside of an already indented tree, pass the initial " +"indentation level as *level*." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:611 +msgid "" +"Check if an object appears to be a valid element object. *element* is an " +"element instance. Return ``True`` if this is an element object." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:617 +msgid "" +"Parses an XML section into an element tree incrementally, and reports what's " +"going on to the user. *source* is a filename or :term:`file object` " +"containing XML data. *events* is a sequence of events to report back. The " +"supported events are the strings ``\"start\"``, ``\"end\"``, " +"``\"comment\"``, ``\"pi\"``, ``\"start-ns\"`` and ``\"end-ns\"`` (the \"ns\" " +"events are used to get detailed namespace information). If *events* is " +"omitted, only ``\"end\"`` events are reported. *parser* is an optional " +"parser instance. If not given, the standard :class:`XMLParser` parser is " +"used. *parser* must be a subclass of :class:`XMLParser` and can only use " +"the default :class:`TreeBuilder` as a target. Returns an :term:`iterator` " +"providing ``(event, elem)`` pairs; it has a ``root`` attribute that " +"references the root element of the resulting XML tree once *source* is fully " +"read. The iterator has the :meth:`!close` method that closes the internal " +"file object if *source* is a filename." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:633 +msgid "" +"Note that while :func:`iterparse` builds the tree incrementally, it issues " +"blocking reads on *source* (or the file it names). As such, it's unsuitable " +"for applications where blocking reads can't be made. For fully non-blocking " +"parsing, see :class:`XMLPullParser`." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:640 +msgid "" +":func:`iterparse` only guarantees that it has seen the \">\" character of a " +"starting tag when it emits a \"start\" event, so the attributes are defined, " +"but the contents of the text and tail attributes are undefined at that " +"point. The same applies to the element children; they may or may not be " +"present." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:646 +#: ../../library/xml.etree.elementtree.rst:1535 +msgid "If you need a fully populated element, look for \"end\" events instead." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:648 +msgid "The *parser* argument." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:651 +#: ../../library/xml.etree.elementtree.rst:1539 +msgid "The ``comment`` and ``pi`` events were added." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:654 +msgid "Added the :meth:`!close` method." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:657 +msgid "" +"A :exc:`ResourceWarning` is now emitted if the iterator opened a file and is " +"not explicitly closed." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:664 +msgid "" +"Parses an XML section into an element tree. *source* is a filename or file " +"object containing XML data. *parser* is an optional parser instance. If " +"not given, the standard :class:`XMLParser` parser is used. Returns an :" +"class:`ElementTree` instance." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:672 +msgid "" +"PI element factory. This factory function creates a special element that " +"will be serialized as an XML processing instruction. *target* is a string " +"containing the PI target. *text* is a string containing the PI contents, if " +"given. Returns an element instance, representing a processing instruction." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:677 +msgid "" +"Note that :class:`XMLParser` skips over processing instructions in the input " +"instead of creating PI objects for them. An :class:`ElementTree` will only " +"contain processing instruction nodes if they have been inserted into to the " +"tree using one of the :class:`Element` methods." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:685 +msgid "" +"Registers a namespace prefix. The registry is global, and any existing " +"mapping for either the given prefix or the namespace URI will be removed. " +"*prefix* is a namespace prefix. *uri* is a namespace uri. Tags and " +"attributes in this namespace will be serialized with the given prefix, if at " +"all possible." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:696 +msgid "" +"Subelement factory. This function creates an element instance, and appends " +"it to an existing element." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:699 +msgid "" +"The element name, attribute names, and attribute values can be either " +"bytestrings or Unicode strings. *parent* is the parent element. *tag* is " +"the subelement name. *attrib* is an optional dictionary, containing element " +"attributes. *extra* contains additional attributes, given as keyword " +"arguments. Returns an element instance." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:705 +#: ../../library/xml.etree.elementtree.rst:896 +msgid "*attrib* can now be a :class:`frozendict`." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:708 +msgid "*parent* and *tag* are now positional-only parameters." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:716 +msgid "" +"Generates a string representation of an XML element, including all " +"subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is " +"the output encoding (default is US-ASCII). Use ``encoding=\"unicode\"`` to " +"generate a Unicode string (otherwise, a bytestring is generated). *method* " +"is either ``\"xml\"``, ``\"html\"`` or ``\"text\"`` (default is " +"``\"xml\"``). *xml_declaration*, *default_namespace* and " +"*short_empty_elements* has the same meaning as in :meth:`ElementTree.write`. " +"Returns an (optionally) encoded string containing the XML data." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:725 +#: ../../library/xml.etree.elementtree.rst:752 +#: ../../library/xml.etree.elementtree.rst:1212 +msgid "Added the *short_empty_elements* parameter." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:728 +#: ../../library/xml.etree.elementtree.rst:755 +msgid "Added the *xml_declaration* and *default_namespace* parameters." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:731 +msgid "" +"The :func:`tostring` function now preserves the attribute order specified by " +"the user." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:740 +msgid "" +"Generates a string representation of an XML element, including all " +"subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is " +"the output encoding (default is US-ASCII). Use ``encoding=\"unicode\"`` to " +"generate a Unicode string (otherwise, a bytestring is generated). *method* " +"is either ``\"xml\"``, ``\"html\"`` or ``\"text\"`` (default is " +"``\"xml\"``). *xml_declaration*, *default_namespace* and " +"*short_empty_elements* has the same meaning as in :meth:`ElementTree.write`. " +"Returns a list of (optionally) encoded strings containing the XML data. It " +"does not guarantee any specific sequence, except that ``b\"\"." +"join(tostringlist(element)) == tostring(element)``." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:758 +msgid "" +"The :func:`tostringlist` function now preserves the attribute order " +"specified by the user." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:765 +msgid "" +"Parses an XML section from a string constant. This function can be used to " +"embed \"XML literals\" in Python code. *text* is a string containing XML " +"data. *parser* is an optional parser instance. If not given, the standard :" +"class:`XMLParser` parser is used. Returns an :class:`Element` instance." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:773 +msgid "" +"Parses an XML section from a string constant, and also returns a dictionary " +"which maps from element id:s to elements. *text* is a string containing XML " +"data. *parser* is an optional parser instance. If not given, the standard :" +"class:`XMLParser` parser is used. Returns a tuple containing an :class:" +"`Element` instance and a dictionary." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:783 +msgid "XInclude support" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:785 +msgid "" +"This module provides limited support for `XInclude directives `_, via the :mod:`xml.etree.ElementInclude` helper " +"module. This module can be used to insert subtrees and text strings into " +"element trees, based on information in the tree." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:791 +msgid "" +"Here's an example that demonstrates use of the XInclude module. To include " +"an XML document in the current document, use the ``{http://www.w3.org/2001/" +"XInclude}include`` element and set the **parse** attribute to ``\"xml\"``, " +"and use the **href** attribute to specify the document to include." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:793 +msgid "" +"\n" +"\n" +" \n" +"" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:800 +msgid "" +"By default, the **href** attribute is treated as a file name. You can use " +"custom loaders to override this behaviour. Also note that the standard " +"helper does not support XPointer syntax." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:802 +msgid "" +"To process this file, load it as usual, and pass the root element to the :" +"mod:`!xml.etree.ElementTree` module:" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:804 +msgid "" +"from xml.etree import ElementTree, ElementInclude\n" +"\n" +"tree = ElementTree.parse(\"document.xml\")\n" +"root = tree.getroot()\n" +"\n" +"ElementInclude.include(root)" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:813 +msgid "" +"The ElementInclude module replaces the ``{http://www.w3.org/2001/XInclude}" +"include`` element with the root element from the **source.xml** document. " +"The result might look something like this:" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:815 +msgid "" +"\n" +" This is a paragraph.\n" +"" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:821 +msgid "" +"If the **parse** attribute is omitted, it defaults to \"xml\". The href " +"attribute is required." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:823 +msgid "" +"To include a text document, use the ``{http://www.w3.org/2001/XInclude}" +"include`` element, and set the **parse** attribute to \"text\":" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:825 +msgid "" +"\n" +"\n" +" Copyright (c) .\n" +"" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:832 +msgid "The result might look something like:" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:834 +msgid "" +"\n" +" Copyright (c) 2003.\n" +"" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:852 +msgid "" +"Default loader. This default loader reads an included resource from disk. " +"*href* is a URL. *parse* is for parse mode either \"xml\" or \"text\". " +"*encoding* is an optional text encoding. If not given, encoding is " +"``utf-8``. Returns the expanded resource. If the parse mode is ``\"xml\"``, " +"this is an :class:`~xml.etree.ElementTree.Element` instance. If the parse " +"mode is ``\"text\"``, this is a string. If the loader fails, it can return " +"``None`` or raise an exception." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:863 +msgid "" +"This function expands XInclude directives in-place in tree pointed by " +"*elem*. *elem* is either the root :class:`~xml.etree.ElementTree.Element` or " +"an :class:`~xml.etree.ElementTree.ElementTree` instance to find such " +"element. *loader* is an optional resource loader. If omitted, it defaults " +"to :func:`default_loader`. If given, it should be a callable that implements " +"the same interface as :func:`default_loader`. *base_url* is base URL of the " +"original file, to resolve relative include file references. *max_depth* is " +"the maximum number of recursive inclusions. Limited to reduce the risk of " +"malicious content explosion. Pass ``None`` to disable the limitation." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:873 +msgid "Added the *base_url* and *max_depth* parameters." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:880 +msgid "Element Objects" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:888 +msgid "" +"Element class. This class defines the Element interface, and provides a " +"reference implementation of this interface." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:891 +msgid "" +"The element name, attribute names, and attribute values can be either " +"bytestrings or Unicode strings. *tag* is the element name. *attrib* is an " +"optional dictionary, containing element attributes. *extra* contains " +"additional attributes, given as keyword arguments." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:899 +msgid "*tag* is now a positional-only parameter." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:905 +msgid "" +"A string identifying what kind of data this element represents (the element " +"type, in other words)." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:912 +msgid "" +"These attributes can be used to hold additional data associated with the " +"element. Their values are usually strings but may be any application-" +"specific object. If the element is created from an XML file, the *text* " +"attribute holds either the text between the element's start tag and its " +"first child or end tag, or ``None``, and the *tail* attribute holds either " +"the text between the element's end tag and the next tag, or ``None``. For " +"the XML data" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:920 +msgid "1234" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:924 +msgid "" +"the *a* element has ``None`` for both *text* and *tail* attributes, the *b* " +"element has *text* ``\"1\"`` and *tail* ``\"4\"``, the *c* element has " +"*text* ``\"2\"`` and *tail* ``None``, and the *d* element has *text* " +"``None`` and *tail* ``\"3\"``." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:929 +msgid "" +"To collect the inner text of an element, see :meth:`itertext`, for example " +"``\"\".join(element.itertext())``." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:932 +msgid "Applications may store arbitrary objects in these attributes." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:937 +msgid "" +"A dictionary containing the element's attributes. Note that while the " +"*attrib* value is always a real mutable Python dictionary, an ElementTree " +"implementation may choose to use another internal representation, and create " +"the dictionary only if someone asks for it. To take advantage of such " +"implementations, use the dictionary methods below whenever possible." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:943 +msgid "The following dictionary-like methods work on the element attributes." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:948 +msgid "" +"Resets an element. This function removes all subelements, clears all " +"attributes, and sets the text and tail attributes to ``None``." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:954 +msgid "Gets the element attribute named *key*." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:956 +msgid "" +"Returns the attribute value, or *default* if the attribute was not found." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:961 +msgid "" +"Returns the element attributes as a sequence of (name, value) pairs. The " +"attributes are returned in an arbitrary order." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:967 +msgid "" +"Returns the elements attribute names as a list. The names are returned in " +"an arbitrary order." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:973 +msgid "Set the attribute *key* on the element to *value*." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:975 +msgid "The following methods work on the element's children (subelements)." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:980 +msgid "" +"Adds the element *subelement* to the end of this element's internal list of " +"subelements. Raises :exc:`TypeError` if *subelement* is not an :class:" +"`Element`." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:987 +msgid "" +"Appends *subelements* from an iterable of elements. Raises :exc:`TypeError` " +"if a subelement is not an :class:`Element`." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:995 +msgid "" +"Finds the first subelement matching *match*. *match* may be a tag name or " +"a :ref:`path `. Returns an element instance or " +"``None``. *namespaces* is an optional mapping from namespace prefix to full " +"name. Pass ``''`` as prefix to move all unprefixed tag names in the " +"expression into the given namespace." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1004 +msgid "" +"Finds all matching subelements, by tag name or :ref:`path `. Returns a list containing all matching elements in document " +"order. *namespaces* is an optional mapping from namespace prefix to full " +"name. Pass ``''`` as prefix to move all unprefixed tag names in the " +"expression into the given namespace." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1013 +msgid "" +"Finds text for the first subelement matching *match*. *match* may be a tag " +"name or a :ref:`path `. Returns the text content of the " +"first matching element, or *default* if no element was found. Note that if " +"the matching element has no text content an empty string is returned. " +"*namespaces* is an optional mapping from namespace prefix to full name. " +"Pass ``''`` as prefix to move all unprefixed tag names in the expression " +"into the given namespace." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1024 +msgid "" +"Inserts *subelement* at the given position in this element. Raises :exc:" +"`TypeError` if *subelement* is not an :class:`Element`." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1030 +msgid "" +"Creates a tree :term:`iterator` with the current element as the root. The " +"iterator iterates over this element and all elements below it, in document " +"(depth first) order. If *tag* is not ``None`` or ``'*'``, only elements " +"whose tag equals *tag* are returned from the iterator. If the tree " +"structure is modified during iteration, the result is undefined." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1041 +msgid "" +"Finds all matching subelements, by tag name or :ref:`path `. Returns an iterable yielding all matching elements in document " +"order. *namespaces* is an optional mapping from namespace prefix to full " +"name." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1052 +msgid "" +"Creates a text iterator. The iterator loops over this element and all " +"subelements, in document order, and returns all inner text." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1060 +msgid "" +"Creates a new element object of the same type as this element. Do not call " +"this method, use the :func:`SubElement` factory function instead." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1066 +msgid "" +"Removes *subelement* from the element. Unlike the find\\* methods this " +"method compares elements based on the instance identity, not on tag value or " +"contents." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1070 +msgid "" +":class:`Element` objects also support the following sequence type methods " +"for working with subelements: :meth:`~object.__delitem__`, :meth:`~object." +"__getitem__`, :meth:`~object.__setitem__`, :meth:`~object.__len__`." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1075 +msgid "" +"Caution: Elements with no subelements will test as ``False``. In a future " +"release of Python, all elements will test as ``True`` regardless of whether " +"subelements exist. Instead, prefer explicit ``len(elem)`` or ``elem is not " +"None`` tests.::" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1080 +msgid "" +"element = root.find('foo')\n" +"\n" +"if not element: # careful!\n" +" print(\"element not found, or element has no subelements\")\n" +"\n" +"if element is None:\n" +" print(\"element not found\")" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1088 +msgid "Testing the truth value of an Element emits :exc:`DeprecationWarning`." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1091 +msgid "" +"Prior to Python 3.8, the serialisation order of the XML attributes of " +"elements was artificially made predictable by sorting the attributes by " +"their name. Based on the now guaranteed ordering of dicts, this arbitrary " +"reordering was removed in Python 3.8 to preserve the order in which " +"attributes were originally parsed or created by user code." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1097 +msgid "" +"In general, user code should try not to depend on a specific ordering of " +"attributes, given that the `XML Information Set `_ explicitly excludes the attribute order from conveying " +"information. Code should be prepared to deal with any ordering on input. In " +"cases where deterministic XML output is required, e.g. for cryptographic " +"signing or test data sets, canonical serialisation is available with the :" +"func:`canonicalize` function." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1105 +msgid "" +"In cases where canonical output is not applicable but a specific attribute " +"order is still desirable on output, code should aim for creating the " +"attributes directly in the desired order, to avoid perceptual mismatches for " +"readers of the code. In cases where this is difficult to achieve, a recipe " +"like the following can be applied prior to serialisation to enforce an order " +"independently from the Element creation::" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1112 +msgid "" +"def reorder_attributes(root):\n" +" for el in root.iter():\n" +" attrib = el.attrib\n" +" if len(attrib) > 1:\n" +" # adjust attribute order, e.g. by sorting\n" +" attribs = sorted(attrib.items())\n" +" attrib.clear()\n" +" attrib.update(attribs)" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1125 +msgid "ElementTree Objects" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1130 +msgid "" +"ElementTree wrapper class. This class represents an entire element " +"hierarchy, and adds some extra support for serialization to and from " +"standard XML." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1134 +msgid "" +"*element* is the root element. The tree is initialized with the contents of " +"the XML *file* if given." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1140 +msgid "" +"Replaces the root element for this tree. This discards the current contents " +"of the tree, and replaces it with the given element. Use with care. " +"*element* is an element instance." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1147 +msgid "Same as :meth:`Element.find`, starting at the root of the tree." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1152 +msgid "Same as :meth:`Element.findall`, starting at the root of the tree." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1157 +msgid "Same as :meth:`Element.findtext`, starting at the root of the tree." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1162 +msgid "Returns the root element for this tree." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1167 +msgid "" +"Creates and returns a tree iterator for the root element. The iterator " +"loops over all elements in this tree, in section order. *tag* is the tag to " +"look for (default is to return all elements)." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1174 +msgid "Same as :meth:`Element.iterfind`, starting at the root of the tree." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1181 +msgid "" +"Loads an external XML section into this element tree. *source* is a file " +"name or :term:`file object`. *parser* is an optional parser instance. If " +"not given, the standard :class:`XMLParser` parser is used. Returns the " +"section root element." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1191 +msgid "" +"Writes the element tree to a file, as XML. *file* is a file name, or a :" +"term:`file object` opened for writing. *encoding* [1]_ is the output " +"encoding (default is US-ASCII). *xml_declaration* controls if an XML " +"declaration should be added to the file. Use ``False`` for never, ``True`` " +"for always, ``None`` for only if not US-ASCII or UTF-8 or Unicode (default " +"is ``None``). *default_namespace* sets the default XML namespace (for " +"\"xmlns\"). *method* is either ``\"xml\"``, ``\"html\"`` or ``\"text\"`` " +"(default is ``\"xml\"``). The keyword-only *short_empty_elements* parameter " +"controls the formatting of elements that contain no content. If ``True`` " +"(the default), they are emitted as a single self-closed tag, otherwise they " +"are emitted as a pair of start/end tags." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1205 +msgid "" +"The output is either a string (:class:`str`) or binary (:class:`bytes`). " +"This is controlled by the *encoding* argument. If *encoding* is " +"``\"unicode\"``, the output is a string; otherwise, it's binary. Note that " +"this may conflict with the type of *file* if it's an open :term:`file " +"object`; make sure you do not try to write a string to a binary stream and " +"vice versa." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1215 +msgid "" +"The :meth:`write` method now preserves the attribute order specified by the " +"user." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1220 +msgid "This is the XML file that is going to be manipulated::" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1222 +msgid "" +"\n" +" \n" +" Example page\n" +" \n" +" \n" +"

Moved to example.org\n" +" or example.com.

\n" +" \n" +"" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1232 +msgid "" +"Example of changing the attribute \"target\" of every link in first " +"paragraph::" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1234 +msgid "" +">>> from xml.etree.ElementTree import ElementTree\n" +">>> tree = ElementTree()\n" +">>> tree.parse(\"index.xhtml\")\n" +"\n" +">>> p = tree.find(\"body/p\") # Finds first occurrence of tag p in body\n" +">>> p\n" +"\n" +">>> links = list(p.iter(\"a\")) # Returns list of all links\n" +">>> links\n" +"[, ]\n" +">>> for i in links: # Iterates through all found links\n" +"... i.attrib[\"target\"] = \"blank\"\n" +"...\n" +">>> tree.write(\"output.xhtml\")" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1252 +msgid "QName Objects" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1257 +msgid "" +"QName wrapper. This can be used to wrap a QName attribute value, in order " +"to get proper namespace handling on output. *text_or_uri* is a string " +"containing the QName value, in the form {uri}local, or, if the tag argument " +"is given, the URI part of a QName. If *tag* is given, the first argument is " +"interpreted as a URI, and this argument is interpreted as a local name. :" +"class:`QName` instances are opaque." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1269 +msgid "TreeBuilder Objects" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1275 +msgid "" +"Generic element structure builder. This builder converts a sequence of " +"start, data, end, comment and pi method calls to a well-formed element " +"structure. You can use this class to build an element structure using a " +"custom XML parser, or a parser for some other XML-like format." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1280 +msgid "" +"*element_factory*, when given, must be a callable accepting two positional " +"arguments: a tag and a dict of attributes. It is expected to return a new " +"element instance." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1284 +msgid "" +"The *comment_factory* and *pi_factory* functions, when given, should behave " +"like the :func:`Comment` and :func:`ProcessingInstruction` functions to " +"create comments and processing instructions. When not given, the default " +"factories will be used. When *insert_comments* and/or *insert_pis* is true, " +"comments/pis will be inserted into the tree if they appear within the root " +"element (but not outside of it)." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1293 +msgid "" +"Flushes the builder buffers, and returns the toplevel document element. " +"Returns an :class:`Element` instance." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1299 +msgid "" +"Adds text to the current element. *data* is a string. This should be " +"either a bytestring, or a Unicode string." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1305 +msgid "" +"Closes the current element. *tag* is the element name. Returns the closed " +"element." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1311 +msgid "" +"Opens a new element. *tag* is the element name. *attrs* is a dictionary " +"containing element attributes. Returns the opened element." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1317 +msgid "" +"Creates a comment with the given *text*. If ``insert_comments`` is true, " +"this will also add it to the tree." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1325 +msgid "" +"Creates a process instruction with the given *target* name and *text*. If " +"``insert_pis`` is true, this will also add it to the tree." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1331 +msgid "" +"In addition, a custom :class:`TreeBuilder` object can provide the following " +"methods:" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1336 +msgid "" +"Handles a doctype declaration. *name* is the doctype name. *pubid* is the " +"public identifier. *system* is the system identifier. This method does not " +"exist on the default :class:`TreeBuilder` class." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1344 +msgid "" +"Is called whenever the parser encounters a new namespace declaration, before " +"the ``start()`` callback for the opening element that defines it. *prefix* " +"is ``''`` for the default namespace and the declared namespace prefix name " +"otherwise. *uri* is the namespace URI." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1353 +msgid "" +"Is called after the ``end()`` callback of an element that declared a " +"namespace prefix mapping, with the name of the *prefix* that went out of " +"scope." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1365 +msgid "" +"A `C14N 2.0 `_ writer. Arguments are the " +"same as for the :func:`canonicalize` function. This class does not build a " +"tree but translates the callback events directly into a serialised form " +"using the *write* function." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1376 +msgid "XMLParser Objects" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1381 +msgid "" +"This class is the low-level building block of the module. It uses :mod:`xml." +"parsers.expat` for efficient, event-based parsing of XML. It can be fed XML " +"data incrementally with the :meth:`feed` method, and parsing events are " +"translated to a push API - by invoking callbacks on the *target* object. If " +"*target* is omitted, the standard :class:`TreeBuilder` is used. If " +"*encoding* [1]_ is given, the value overrides the encoding specified in the " +"XML file." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1389 +msgid "" +"Parameters are now :ref:`keyword-only `. The *html* " +"argument is no longer supported." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1396 +msgid "" +"Finishes feeding data to the parser. Returns the result of calling the " +"``close()`` method of the *target* passed during construction; by default, " +"this is the toplevel document element." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1403 +msgid "Feeds data to the parser. *data* is encoded data." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1408 +#: ../../library/xml.etree.elementtree.rst:1486 +msgid "" +"Triggers parsing of any previously fed unparsed data, which can be used to " +"ensure more immediate feedback, in particular with Expat >=2.6.0. The " +"implementation of :meth:`flush` temporarily disables reparse deferral with " +"Expat (if currently enabled) and triggers a reparse. Disabling reparse " +"deferral has security consequences; please see :meth:`xml.parsers.expat." +"xmlparser.SetReparseDeferralEnabled` for details." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1415 +#: ../../library/xml.etree.elementtree.rst:1493 +msgid "" +":meth:`!flush` has been backported to some prior releases of CPython as a " +"security fix. Check for availability using :func:`hasattr` if used in code " +"running across a variety of Python versions." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1423 +msgid "" +":meth:`XMLParser.feed` calls *target*\\'s ``start(tag, attrs_dict)`` method " +"for each opening tag, its ``end(tag)`` method for each closing tag, and data " +"is processed by method ``data(data)``. For further supported callback " +"methods, see the :class:`TreeBuilder` class. :meth:`XMLParser.close` calls " +"*target*\\'s method ``close()``. :class:`XMLParser` can be used not only for " +"building a tree structure. This is an example of counting the maximum depth " +"of an XML file::" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1431 +msgid "" +">>> from xml.etree.ElementTree import XMLParser\n" +">>> class MaxDepth: # The target object of the parser\n" +"... maxDepth = 0\n" +"... depth = 0\n" +"... def start(self, tag, attrib): # Called for each opening tag.\n" +"... self.depth += 1\n" +"... if self.depth > self.maxDepth:\n" +"... self.maxDepth = self.depth\n" +"... def end(self, tag): # Called for each closing tag.\n" +"... self.depth -= 1\n" +"... def data(self, data):\n" +"... pass # We do not need to do anything with data.\n" +"... def close(self): # Called when all data has been parsed.\n" +"... return self.maxDepth\n" +"...\n" +">>> target = MaxDepth()\n" +">>> parser = XMLParser(target=target)\n" +">>> exampleXml = \"\"\"\n" +"... \n" +"... \n" +"... \n" +"... \n" +"... \n" +"... \n" +"... \n" +"... \n" +"... \n" +"... \"\"\"\n" +">>> parser.feed(exampleXml)\n" +">>> parser.close()\n" +"4" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1467 +msgid "XMLPullParser Objects" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1471 +msgid "" +"A pull parser suitable for non-blocking applications. Its input-side API is " +"similar to that of :class:`XMLParser`, but instead of pushing calls to a " +"callback target, :class:`XMLPullParser` collects an internal list of parsing " +"events and lets the user read from it. *events* is a sequence of events to " +"report back. The supported events are the strings ``\"start\"``, " +"``\"end\"``, ``\"comment\"``, ``\"pi\"``, ``\"start-ns\"`` and ``\"end-" +"ns\"`` (the \"ns\" events are used to get detailed namespace information). " +"If *events* is omitted, only ``\"end\"`` events are reported." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1482 +msgid "Feed the given bytes data to the parser." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1502 +msgid "" +"Signal the parser that the data stream is terminated. Unlike :meth:" +"`XMLParser.close`, this method always returns :const:`None`. Any events not " +"yet retrieved when the parser is closed can still be read with :meth:" +"`read_events`." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1509 +msgid "" +"Return an iterator over the events which have been encountered in the data " +"fed to the parser. The iterator yields ``(event, elem)`` pairs, where " +"*event* is a string representing the type of event (e.g. ``\"end\"``) and " +"*elem* is the encountered :class:`Element` object, or other context value as " +"follows." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1515 +msgid "``start``, ``end``: the current Element." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1516 +msgid "``comment``, ``pi``: the current comment / processing instruction" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1517 +msgid "" +"``start-ns``: a tuple ``(prefix, uri)`` naming the declared namespace " +"mapping." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1519 +msgid "``end-ns``: :const:`None` (this may change in a future version)" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1521 +msgid "" +"Events provided in a previous call to :meth:`read_events` will not be " +"yielded again. Events are consumed from the internal queue only when they " +"are retrieved from the iterator, so multiple readers iterating in parallel " +"over iterators obtained from :meth:`read_events` will have unpredictable " +"results." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1529 +msgid "" +":class:`XMLPullParser` only guarantees that it has seen the \">\" character " +"of a starting tag when it emits a \"start\" event, so the attributes are " +"defined, but the contents of the text and tail attributes are undefined at " +"that point. The same applies to the element children; they may or may not " +"be present." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1544 +msgid "Exceptions" +msgstr "Ausnahmen" + +#: ../../library/xml.etree.elementtree.rst:1548 +msgid "" +"XML parse error, raised by the various parsing methods in this module when " +"parsing fails. The string representation of an instance of this exception " +"will contain a user-friendly error message. In addition, it will have the " +"following attributes available:" +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1555 +msgid "" +"A numeric error code from the expat parser. See the documentation of :mod:" +"`xml.parsers.expat` for the list of error codes and their meanings." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1560 +msgid "" +"A tuple of *line*, *column* numbers, specifying where the error occurred." +msgstr "" + +#: ../../library/xml.etree.elementtree.rst:1563 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../library/xml.etree.elementtree.rst:1564 +msgid "" +"The encoding string included in XML output should conform to the appropriate " +"standards. For example, \"UTF-8\" is valid, but \"UTF8\" is not. See " +"https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl and https://" +"www.iana.org/assignments/character-sets/character-sets.xhtml." +msgstr "" diff --git a/library/xml.sax.handler.po b/library/xml.sax.handler.po index 56e37c64..f2247169 100644 --- a/library/xml.sax.handler.po +++ b/library/xml.sax.handler.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" "Language: de\n" @@ -87,7 +87,7 @@ msgstr "" msgid "true: Perform Namespace processing." msgstr "" -#: ../../library/xml.sax.handler.rst:62 +#: ../../library/xml.sax.handler.rst:61 msgid "" "false: Optionally do not perform Namespace processing (implies namespace-" "prefixes; default)." @@ -104,13 +104,13 @@ msgstr "" msgid "value: ``\"http://xml.org/sax/features/namespace-prefixes\"``" msgstr "" -#: ../../library/xml.sax.handler.rst:70 +#: ../../library/xml.sax.handler.rst:69 msgid "" "true: Report the original prefixed names and attributes used for Namespace " "declarations." msgstr "" -#: ../../library/xml.sax.handler.rst:72 +#: ../../library/xml.sax.handler.rst:71 msgid "" "false: Do not report attributes used for Namespace declarations, and " "optionally do not report original prefixed names (default)." @@ -120,7 +120,7 @@ msgstr "" msgid "value: ``\"http://xml.org/sax/features/string-interning\"``" msgstr "" -#: ../../library/xml.sax.handler.rst:80 +#: ../../library/xml.sax.handler.rst:79 msgid "" "true: All element names, prefixes, attribute names, Namespace URIs, and " "local names are interned using the built-in intern function." @@ -135,7 +135,7 @@ msgstr "" msgid "value: ``\"http://xml.org/sax/features/validation\"``" msgstr "" -#: ../../library/xml.sax.handler.rst:89 +#: ../../library/xml.sax.handler.rst:88 msgid "" "true: Report all validation errors (implies external-general-entities and " "external-parameter-entities)." @@ -169,13 +169,13 @@ msgstr "" msgid "value: ``\"http://xml.org/sax/features/external-parameter-entities\"``" msgstr "" -#: ../../library/xml.sax.handler.rst:114 +#: ../../library/xml.sax.handler.rst:113 msgid "" "true: Include all external parameter entities, including the external DTD " "subset." msgstr "" -#: ../../library/xml.sax.handler.rst:116 +#: ../../library/xml.sax.handler.rst:115 msgid "" "false: Do not include any external parameter entities, even the external DTD " "subset." @@ -193,7 +193,7 @@ msgstr "" msgid "data type: xml.sax.handler.LexicalHandler (not supported in Python 2)" msgstr "" -#: ../../library/xml.sax.handler.rst:130 +#: ../../library/xml.sax.handler.rst:129 msgid "" "description: An optional extension handler for lexical events like comments." msgstr "" @@ -210,7 +210,7 @@ msgstr "" msgid "data type: xml.sax.sax2lib.DeclHandler (not supported in Python 2)" msgstr "" -#: ../../library/xml.sax.handler.rst:139 +#: ../../library/xml.sax.handler.rst:138 msgid "" "description: An optional extension handler for DTD-related events other than " "notations and unparsed entities." @@ -224,7 +224,7 @@ msgstr "" msgid "data type: org.w3c.dom.Node (not supported in Python 2)" msgstr "" -#: ../../library/xml.sax.handler.rst:148 +#: ../../library/xml.sax.handler.rst:147 msgid "" "description: When parsing, the current DOM node being visited if this is a " "DOM iterator; when not parsing, the root DOM node for iteration." @@ -238,7 +238,7 @@ msgstr "" msgid "data type: Bytes" msgstr "" -#: ../../library/xml.sax.handler.rst:157 +#: ../../library/xml.sax.handler.rst:156 msgid "" "description: The literal string of characters that was the source for the " "current event." diff --git a/library/xml.sax.handler.po~ b/library/xml.sax.handler.po~ new file mode 100644 index 00000000..56e37c64 --- /dev/null +++ b/library/xml.sax.handler.po~ @@ -0,0 +1,617 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../library/xml.sax.handler.rst:2 +msgid ":mod:`!xml.sax.handler` --- Base classes for SAX handlers" +msgstr "" + +#: ../../library/xml.sax.handler.rst:7 +msgid "**Source code:** :source:`Lib/xml/sax/handler.py`" +msgstr "" + +#: ../../library/xml.sax.handler.rst:11 +msgid "" +"The SAX API defines five kinds of handlers: content handlers, DTD handlers, " +"error handlers, entity resolvers and lexical handlers. Applications normally " +"only need to implement those interfaces whose events they are interested in; " +"they can implement the interfaces in a single object or in multiple objects. " +"Handler implementations should inherit from the base classes provided in the " +"module :mod:`!xml.sax.handler`, so that all methods get default " +"implementations." +msgstr "" + +#: ../../library/xml.sax.handler.rst:21 +msgid "" +"This is the main callback interface in SAX, and the one most important to " +"applications. The order of events in this interface mirrors the order of the " +"information in the document." +msgstr "" + +#: ../../library/xml.sax.handler.rst:28 +msgid "Handle DTD events." +msgstr "" + +#: ../../library/xml.sax.handler.rst:30 +msgid "" +"This interface specifies only those DTD events required for basic parsing " +"(unparsed entities and attributes)." +msgstr "" + +#: ../../library/xml.sax.handler.rst:36 +msgid "" +"Basic interface for resolving entities. If you create an object implementing " +"this interface, then register the object with your Parser, the parser will " +"call the method in your object to resolve all external entities." +msgstr "" + +#: ../../library/xml.sax.handler.rst:43 +msgid "" +"Interface used by the parser to present error and warning messages to the " +"application. The methods of this object control whether errors are " +"immediately converted to exceptions or are handled in some other way." +msgstr "" + +#: ../../library/xml.sax.handler.rst:50 +msgid "" +"Interface used by the parser to represent low frequency events which may not " +"be of interest to many applications." +msgstr "" + +#: ../../library/xml.sax.handler.rst:53 +msgid "" +"In addition to these classes, :mod:`!xml.sax.handler` provides symbolic " +"constants for the feature and property names." +msgstr "" + +#: ../../library/xml.sax.handler.rst:59 +msgid "value: ``\"http://xml.org/sax/features/namespaces\"``" +msgstr "" + +#: ../../library/xml.sax.handler.rst:60 +msgid "true: Perform Namespace processing." +msgstr "" + +#: ../../library/xml.sax.handler.rst:62 +msgid "" +"false: Optionally do not perform Namespace processing (implies namespace-" +"prefixes; default)." +msgstr "" + +#: ../../library/xml.sax.handler.rst:63 ../../library/xml.sax.handler.rst:73 +#: ../../library/xml.sax.handler.rst:82 ../../library/xml.sax.handler.rst:91 +#: ../../library/xml.sax.handler.rst:107 ../../library/xml.sax.handler.rst:117 +#: ../../library/xml.sax.handler.rst:149 +msgid "access: (parsing) read-only; (not parsing) read/write" +msgstr "" + +#: ../../library/xml.sax.handler.rst:68 +msgid "value: ``\"http://xml.org/sax/features/namespace-prefixes\"``" +msgstr "" + +#: ../../library/xml.sax.handler.rst:70 +msgid "" +"true: Report the original prefixed names and attributes used for Namespace " +"declarations." +msgstr "" + +#: ../../library/xml.sax.handler.rst:72 +msgid "" +"false: Do not report attributes used for Namespace declarations, and " +"optionally do not report original prefixed names (default)." +msgstr "" + +#: ../../library/xml.sax.handler.rst:78 +msgid "value: ``\"http://xml.org/sax/features/string-interning\"``" +msgstr "" + +#: ../../library/xml.sax.handler.rst:80 +msgid "" +"true: All element names, prefixes, attribute names, Namespace URIs, and " +"local names are interned using the built-in intern function." +msgstr "" + +#: ../../library/xml.sax.handler.rst:81 +msgid "" +"false: Names are not necessarily interned, although they may be (default)." +msgstr "" + +#: ../../library/xml.sax.handler.rst:87 +msgid "value: ``\"http://xml.org/sax/features/validation\"``" +msgstr "" + +#: ../../library/xml.sax.handler.rst:89 +msgid "" +"true: Report all validation errors (implies external-general-entities and " +"external-parameter-entities)." +msgstr "" + +#: ../../library/xml.sax.handler.rst:90 +msgid "false: Do not report validation errors." +msgstr "" + +#: ../../library/xml.sax.handler.rst:98 +msgid "" +"Enabling opens a vulnerability to `external entity attacks `_ if the parser is used with " +"user-provided XML content. Please reflect on your `threat model `_ before enabling this feature." +msgstr "" + +#: ../../library/xml.sax.handler.rst:104 +msgid "value: ``\"http://xml.org/sax/features/external-general-entities\"``" +msgstr "" + +#: ../../library/xml.sax.handler.rst:105 +msgid "true: Include all external general (text) entities." +msgstr "" + +#: ../../library/xml.sax.handler.rst:106 +msgid "false: Do not include external general entities." +msgstr "" + +#: ../../library/xml.sax.handler.rst:112 +msgid "value: ``\"http://xml.org/sax/features/external-parameter-entities\"``" +msgstr "" + +#: ../../library/xml.sax.handler.rst:114 +msgid "" +"true: Include all external parameter entities, including the external DTD " +"subset." +msgstr "" + +#: ../../library/xml.sax.handler.rst:116 +msgid "" +"false: Do not include any external parameter entities, even the external DTD " +"subset." +msgstr "" + +#: ../../library/xml.sax.handler.rst:122 +msgid "List of all features." +msgstr "" + +#: ../../library/xml.sax.handler.rst:127 +msgid "value: ``\"http://xml.org/sax/properties/lexical-handler\"``" +msgstr "" + +#: ../../library/xml.sax.handler.rst:128 +msgid "data type: xml.sax.handler.LexicalHandler (not supported in Python 2)" +msgstr "" + +#: ../../library/xml.sax.handler.rst:130 +msgid "" +"description: An optional extension handler for lexical events like comments." +msgstr "" + +#: ../../library/xml.sax.handler.rst:131 ../../library/xml.sax.handler.rst:140 +msgid "access: read/write" +msgstr "" + +#: ../../library/xml.sax.handler.rst:136 +msgid "value: ``\"http://xml.org/sax/properties/declaration-handler\"``" +msgstr "" + +#: ../../library/xml.sax.handler.rst:137 +msgid "data type: xml.sax.sax2lib.DeclHandler (not supported in Python 2)" +msgstr "" + +#: ../../library/xml.sax.handler.rst:139 +msgid "" +"description: An optional extension handler for DTD-related events other than " +"notations and unparsed entities." +msgstr "" + +#: ../../library/xml.sax.handler.rst:145 +msgid "value: ``\"http://xml.org/sax/properties/dom-node\"``" +msgstr "" + +#: ../../library/xml.sax.handler.rst:146 +msgid "data type: org.w3c.dom.Node (not supported in Python 2)" +msgstr "" + +#: ../../library/xml.sax.handler.rst:148 +msgid "" +"description: When parsing, the current DOM node being visited if this is a " +"DOM iterator; when not parsing, the root DOM node for iteration." +msgstr "" + +#: ../../library/xml.sax.handler.rst:154 +msgid "value: ``\"http://xml.org/sax/properties/xml-string\"``" +msgstr "" + +#: ../../library/xml.sax.handler.rst:155 +msgid "data type: Bytes" +msgstr "" + +#: ../../library/xml.sax.handler.rst:157 +msgid "" +"description: The literal string of characters that was the source for the " +"current event." +msgstr "" + +#: ../../library/xml.sax.handler.rst:158 +msgid "access: read-only" +msgstr "" + +#: ../../library/xml.sax.handler.rst:163 +msgid "List of all known property names." +msgstr "" + +#: ../../library/xml.sax.handler.rst:169 +msgid "ContentHandler Objects" +msgstr "" + +#: ../../library/xml.sax.handler.rst:171 +msgid "" +"Users are expected to subclass :class:`ContentHandler` to support their " +"application. The following methods are called by the parser on the " +"appropriate events in the input document:" +msgstr "" + +#: ../../library/xml.sax.handler.rst:178 +msgid "" +"Called by the parser to give the application a locator for locating the " +"origin of document events." +msgstr "" + +#: ../../library/xml.sax.handler.rst:181 +msgid "" +"SAX parsers are strongly encouraged (though not absolutely required) to " +"supply a locator: if it does so, it must supply the locator to the " +"application by invoking this method before invoking any of the other methods " +"in the DocumentHandler interface." +msgstr "" + +#: ../../library/xml.sax.handler.rst:186 +msgid "" +"The locator allows the application to determine the end position of any " +"document-related event, even if the parser is not reporting an error. " +"Typically, the application will use this information for reporting its own " +"errors (such as character content that does not match an application's " +"business rules). The information returned by the locator is probably not " +"sufficient for use with a search engine." +msgstr "" + +#: ../../library/xml.sax.handler.rst:193 +msgid "" +"Note that the locator will return correct information only during the " +"invocation of the events in this interface. The application should not " +"attempt to use it at any other time." +msgstr "" + +#: ../../library/xml.sax.handler.rst:200 +msgid "Receive notification of the beginning of a document." +msgstr "" + +#: ../../library/xml.sax.handler.rst:202 +msgid "" +"The SAX parser will invoke this method only once, before any other methods " +"in this interface or in DTDHandler (except for :meth:`setDocumentLocator`)." +msgstr "" + +#: ../../library/xml.sax.handler.rst:208 +msgid "Receive notification of the end of a document." +msgstr "" + +#: ../../library/xml.sax.handler.rst:210 +msgid "" +"The SAX parser will invoke this method only once, and it will be the last " +"method invoked during the parse. The parser shall not invoke this method " +"until it has either abandoned parsing (because of an unrecoverable error) or " +"reached the end of input." +msgstr "" + +#: ../../library/xml.sax.handler.rst:218 +msgid "Begin the scope of a prefix-URI Namespace mapping." +msgstr "" + +#: ../../library/xml.sax.handler.rst:220 +msgid "" +"The information from this event is not necessary for normal Namespace " +"processing: the SAX XML reader will automatically replace prefixes for " +"element and attribute names when the ``feature_namespaces`` feature is " +"enabled (the default)." +msgstr "" + +#: ../../library/xml.sax.handler.rst:225 +msgid "" +"There are cases, however, when applications need to use prefixes in " +"character data or in attribute values, where they cannot safely be expanded " +"automatically; the :meth:`startPrefixMapping` and :meth:`endPrefixMapping` " +"events supply the information to the application to expand prefixes in those " +"contexts itself, if necessary." +msgstr "" + +#: ../../library/xml.sax.handler.rst:233 +msgid "" +"Note that :meth:`startPrefixMapping` and :meth:`endPrefixMapping` events are " +"not guaranteed to be properly nested relative to each-other: all :meth:" +"`startPrefixMapping` events will occur before the corresponding :meth:" +"`startElement` event, and all :meth:`endPrefixMapping` events will occur " +"after the corresponding :meth:`endElement` event, but their order is not " +"guaranteed." +msgstr "" + +#: ../../library/xml.sax.handler.rst:243 +msgid "End the scope of a prefix-URI mapping." +msgstr "" + +#: ../../library/xml.sax.handler.rst:245 +msgid "" +"See :meth:`startPrefixMapping` for details. This event will always occur " +"after the corresponding :meth:`endElement` event, but the order of :meth:" +"`endPrefixMapping` events is not otherwise guaranteed." +msgstr "" + +#: ../../library/xml.sax.handler.rst:252 +msgid "Signals the start of an element in non-namespace mode." +msgstr "" + +#: ../../library/xml.sax.handler.rst:254 +msgid "" +"The *name* parameter contains the raw XML 1.0 name of the element type as a " +"string and the *attrs* parameter holds an object of the :ref:`Attributes " +"` interface containing the attributes of the element. " +"The object passed as *attrs* may be re-used by the parser; holding on to a " +"reference to it is not a reliable way to keep a copy of the attributes. To " +"keep a copy of the attributes, use the :meth:`copy` method of the *attrs* " +"object." +msgstr "" + +#: ../../library/xml.sax.handler.rst:265 +msgid "Signals the end of an element in non-namespace mode." +msgstr "" + +#: ../../library/xml.sax.handler.rst:267 +msgid "" +"The *name* parameter contains the name of the element type, just as with " +"the :meth:`startElement` event." +msgstr "" + +#: ../../library/xml.sax.handler.rst:273 +msgid "Signals the start of an element in namespace mode." +msgstr "" + +#: ../../library/xml.sax.handler.rst:275 +msgid "" +"The *name* parameter contains the name of the element type as a ``(uri, " +"localname)`` tuple, the *qname* parameter contains the raw XML 1.0 name used " +"in the source document, and the *attrs* parameter holds an instance of the :" +"ref:`AttributesNS ` interface containing the " +"attributes of the element. If no namespace is associated with the element, " +"the *uri* component of *name* will be ``None``. The object passed as " +"*attrs* may be re-used by the parser; holding on to a reference to it is not " +"a reliable way to keep a copy of the attributes. To keep a copy of the " +"attributes, use the :meth:`copy` method of the *attrs* object." +msgstr "" + +#: ../../library/xml.sax.handler.rst:285 +msgid "" +"Parsers may set the *qname* parameter to ``None``, unless the " +"``feature_namespace_prefixes`` feature is activated." +msgstr "" + +#: ../../library/xml.sax.handler.rst:291 +msgid "Signals the end of an element in namespace mode." +msgstr "" + +#: ../../library/xml.sax.handler.rst:293 +msgid "" +"The *name* parameter contains the name of the element type, just as with " +"the :meth:`startElementNS` method, likewise the *qname* parameter." +msgstr "" + +#: ../../library/xml.sax.handler.rst:299 +msgid "Receive notification of character data." +msgstr "" + +#: ../../library/xml.sax.handler.rst:301 +msgid "" +"The Parser will call this method to report each chunk of character data. SAX " +"parsers may return all contiguous character data in a single chunk, or they " +"may split it into several chunks; however, all of the characters in any " +"single event must come from the same external entity so that the Locator " +"provides useful information." +msgstr "" + +#: ../../library/xml.sax.handler.rst:307 +msgid "" +"*content* may be a string or bytes instance; the ``expat`` reader module " +"always produces strings." +msgstr "" + +#: ../../library/xml.sax.handler.rst:312 +msgid "" +"The earlier SAX 1 interface provided by the Python XML Special Interest " +"Group used a more Java-like interface for this method. Since most parsers " +"used from Python did not take advantage of the older interface, the simpler " +"signature was chosen to replace it. To convert old code to the new " +"interface, use *content* instead of slicing content with the old *offset* " +"and *length* parameters." +msgstr "" + +#: ../../library/xml.sax.handler.rst:321 +msgid "Receive notification of ignorable whitespace in element content." +msgstr "" + +#: ../../library/xml.sax.handler.rst:323 +msgid "" +"Validating Parsers must use this method to report each chunk of ignorable " +"whitespace (see the W3C XML 1.0 recommendation, section 2.10): non-" +"validating parsers may also use this method if they are capable of parsing " +"and using content models." +msgstr "" + +#: ../../library/xml.sax.handler.rst:328 +msgid "" +"SAX parsers may return all contiguous whitespace in a single chunk, or they " +"may split it into several chunks; however, all of the characters in any " +"single event must come from the same external entity, so that the Locator " +"provides useful information." +msgstr "" + +#: ../../library/xml.sax.handler.rst:336 +msgid "Receive notification of a processing instruction." +msgstr "" + +#: ../../library/xml.sax.handler.rst:338 +msgid "" +"The Parser will invoke this method once for each processing instruction " +"found: note that processing instructions may occur before or after the main " +"document element." +msgstr "" + +#: ../../library/xml.sax.handler.rst:342 +msgid "" +"A SAX parser should never report an XML declaration (XML 1.0, section 2.8) " +"or a text declaration (XML 1.0, section 4.3.1) using this method." +msgstr "" + +#: ../../library/xml.sax.handler.rst:348 +msgid "Receive notification of a skipped entity." +msgstr "" + +#: ../../library/xml.sax.handler.rst:350 +msgid "" +"The Parser will invoke this method once for each entity skipped. Non-" +"validating processors may skip entities if they have not seen the " +"declarations (because, for example, the entity was declared in an external " +"DTD subset). All processors may skip external entities, depending on the " +"values of the ``feature_external_ges`` and the ``feature_external_pes`` " +"properties." +msgstr "" + +#: ../../library/xml.sax.handler.rst:360 +msgid "DTDHandler Objects" +msgstr "" + +#: ../../library/xml.sax.handler.rst:362 +msgid ":class:`DTDHandler` instances provide the following methods:" +msgstr "" + +#: ../../library/xml.sax.handler.rst:367 +msgid "Handle a notation declaration event." +msgstr "" + +#: ../../library/xml.sax.handler.rst:372 +msgid "Handle an unparsed entity declaration event." +msgstr "" + +#: ../../library/xml.sax.handler.rst:378 +msgid "EntityResolver Objects" +msgstr "" + +#: ../../library/xml.sax.handler.rst:383 +msgid "" +"Resolve the system identifier of an entity and return either the system " +"identifier to read from as a string, or an InputSource to read from. The " +"default implementation returns *systemId*." +msgstr "" + +#: ../../library/xml.sax.handler.rst:391 +msgid "ErrorHandler Objects" +msgstr "" + +#: ../../library/xml.sax.handler.rst:393 +msgid "" +"Objects with this interface are used to receive error and warning " +"information from the :class:`~xml.sax.xmlreader.XMLReader`. If you create " +"an object that implements this interface, then register the object with " +"your :class:`~xml.sax.xmlreader.XMLReader`, the parser will call the methods " +"in your object to report all warnings and errors. There are three levels of " +"errors available: warnings, (possibly) recoverable errors, and unrecoverable " +"errors. All methods take a :exc:`~xml.sax.SAXParseException` as the only " +"parameter. Errors and warnings may be converted to an exception by raising " +"the passed-in exception object." +msgstr "" + +#: ../../library/xml.sax.handler.rst:406 +msgid "" +"Called when the parser encounters a recoverable error. If this method does " +"not raise an exception, parsing may continue, but further document " +"information should not be expected by the application. Allowing the parser " +"to continue may allow additional errors to be discovered in the input " +"document." +msgstr "" + +#: ../../library/xml.sax.handler.rst:414 +msgid "" +"Called when the parser encounters an error it cannot recover from; parsing " +"is expected to terminate when this method returns." +msgstr "" + +#: ../../library/xml.sax.handler.rst:420 +msgid "" +"Called when the parser presents minor warning information to the " +"application. Parsing is expected to continue when this method returns, and " +"document information will continue to be passed to the application. Raising " +"an exception in this method will cause parsing to end." +msgstr "" + +#: ../../library/xml.sax.handler.rst:429 +msgid "LexicalHandler Objects" +msgstr "" + +#: ../../library/xml.sax.handler.rst:430 +msgid "Optional SAX2 handler for lexical events." +msgstr "" + +#: ../../library/xml.sax.handler.rst:432 +msgid "" +"This handler is used to obtain lexical information about an XML document. " +"Lexical information includes information describing the document encoding " +"used and XML comments embedded in the document, as well as section " +"boundaries for the DTD and for any CDATA sections. The lexical handlers are " +"used in the same manner as content handlers." +msgstr "" + +#: ../../library/xml.sax.handler.rst:438 +msgid "" +"Set the LexicalHandler of an XMLReader by using the setProperty method with " +"the property identifier ``'http://xml.org/sax/properties/lexical-handler'``." +msgstr "" + +#: ../../library/xml.sax.handler.rst:445 +msgid "" +"Reports a comment anywhere in the document (including the DTD and outside " +"the document element)." +msgstr "" + +#: ../../library/xml.sax.handler.rst:450 +msgid "" +"Reports the start of the DTD declarations if the document has an associated " +"DTD." +msgstr "" + +#: ../../library/xml.sax.handler.rst:455 +msgid "Reports the end of DTD declaration." +msgstr "" + +#: ../../library/xml.sax.handler.rst:459 +msgid "Reports the start of a CDATA marked section." +msgstr "" + +#: ../../library/xml.sax.handler.rst:461 +msgid "" +"The contents of the CDATA marked section will be reported through the " +"characters handler." +msgstr "" + +#: ../../library/xml.sax.handler.rst:466 +msgid "Reports the end of a CDATA marked section." +msgstr "" diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index e3ab1eea..0e68083a 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -153,8 +153,9 @@ msgid "" "created for that iterable. The first item provided by the iterator is then " "assigned to the target list using the standard rules for assignments (see :" "ref:`assignment`), and the suite is executed. This repeats for each item " -"provided by the iterator. When the iterator is exhausted, the suite in the :" -"keyword:`!else` clause, if present, is executed, and the loop terminates." +"provided by the iterator. When the iterator is :term:`exhausted`, the suite " +"in the :keyword:`!else` clause, if present, is executed, and the loop " +"terminates." msgstr "" #: ../../reference/compound_stmts.rst:173 diff --git a/reference/compound_stmts.po~ b/reference/compound_stmts.po~ new file mode 100644 index 00000000..e3ab1eea --- /dev/null +++ b/reference/compound_stmts.po~ @@ -0,0 +1,3140 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../reference/compound_stmts.rst:5 +msgid "Compound statements" +msgstr "" + +#: ../../reference/compound_stmts.rst:9 +msgid "" +"Compound statements contain (groups of) other statements; they affect or " +"control the execution of those other statements in some way. In general, " +"compound statements span multiple lines, although in simple incarnations a " +"whole compound statement may be contained in one line." +msgstr "" + +#: ../../reference/compound_stmts.rst:14 +msgid "" +"The :keyword:`if`, :keyword:`while` and :keyword:`for` statements implement " +"traditional control flow constructs. :keyword:`try` specifies exception " +"handlers and/or cleanup code for a group of statements, while the :keyword:" +"`with` statement allows the execution of initialization and finalization " +"code around a block of code. Function and class definitions are also " +"syntactically compound statements." +msgstr "" + +#: ../../reference/compound_stmts.rst:26 +msgid "" +"A compound statement consists of one or more 'clauses.' A clause consists " +"of a header and a 'suite.' The clause headers of a particular compound " +"statement are all at the same indentation level. Each clause header begins " +"with a uniquely identifying keyword and ends with a colon. A suite is a " +"group of statements controlled by a clause. A suite can be one or more " +"semicolon-separated simple statements on the same line as the header, " +"following the header's colon, or it can be one or more indented statements " +"on subsequent lines. Only the latter form of a suite can contain nested " +"compound statements; the following is illegal, mostly because it wouldn't be " +"clear to which :keyword:`if` clause a following :keyword:`else` clause would " +"belong::" +msgstr "" + +#: ../../reference/compound_stmts.rst:37 +msgid "if test1: if test2: print(x)" +msgstr "" + +#: ../../reference/compound_stmts.rst:39 +msgid "" +"Also note that the semicolon binds tighter than the colon in this context, " +"so that in the following example, either all or none of the :func:`print` " +"calls are executed::" +msgstr "" + +#: ../../reference/compound_stmts.rst:43 +msgid "if x < y < z: print(x); print(y); print(z)" +msgstr "" + +#: ../../reference/compound_stmts.rst:45 +msgid "Summarizing:" +msgstr "" + +#: ../../reference/compound_stmts.rst:69 +msgid "" +"Note that statements always end in a ``NEWLINE`` possibly followed by a " +"``DEDENT``. Also note that optional continuation clauses always begin with " +"a keyword that cannot start a statement, thus there are no ambiguities (the " +"'dangling :keyword:`else`' problem is solved in Python by requiring nested :" +"keyword:`if` statements to be indented)." +msgstr "" + +#: ../../reference/compound_stmts.rst:75 +msgid "" +"The formatting of the grammar rules in the following sections places each " +"clause on a separate line for clarity." +msgstr "" + +#: ../../reference/compound_stmts.rst:84 +msgid "The :keyword:`!if` statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:92 +msgid "The :keyword:`if` statement is used for conditional execution:" +msgstr "" + +#: ../../reference/compound_stmts.rst:99 +msgid "" +"It selects exactly one of the suites by evaluating the expressions one by " +"one until one is found to be true (see section :ref:`booleans` for the " +"definition of true and false); then that suite is executed (and no other " +"part of the :keyword:`if` statement is executed or evaluated). If all " +"expressions are false, the suite of the :keyword:`else` clause, if present, " +"is executed." +msgstr "" + +#: ../../reference/compound_stmts.rst:109 +msgid "The :keyword:`!while` statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:117 +msgid "" +"The :keyword:`while` statement is used for repeated execution as long as an " +"expression is true:" +msgstr "" + +#: ../../reference/compound_stmts.rst:124 +msgid "" +"This repeatedly tests the expression and, if it is true, executes the first " +"suite; if the expression is false (which may be the first time it is tested) " +"the suite of the :keyword:`!else` clause, if present, is executed and the " +"loop terminates." +msgstr "" + +#: ../../reference/compound_stmts.rst:133 +msgid "" +"A :keyword:`break` statement executed in the first suite terminates the loop " +"without executing the :keyword:`!else` clause's suite. A :keyword:" +"`continue` statement executed in the first suite skips the rest of the suite " +"and goes back to testing the expression." +msgstr "" + +#: ../../reference/compound_stmts.rst:142 +msgid "The :keyword:`!for` statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:153 +msgid "" +"The :keyword:`for` statement is used to iterate over the elements of a " +"sequence (such as a string, tuple or list) or other iterable object:" +msgstr "" + +#: ../../reference/compound_stmts.rst:160 +msgid "" +"The :token:`~python-grammar:starred_expression_list` expression is evaluated " +"once; it should yield an :term:`iterable` object. An :term:`iterator` is " +"created for that iterable. The first item provided by the iterator is then " +"assigned to the target list using the standard rules for assignments (see :" +"ref:`assignment`), and the suite is executed. This repeats for each item " +"provided by the iterator. When the iterator is exhausted, the suite in the :" +"keyword:`!else` clause, if present, is executed, and the loop terminates." +msgstr "" + +#: ../../reference/compound_stmts.rst:173 +msgid "" +"A :keyword:`break` statement executed in the first suite terminates the loop " +"without executing the :keyword:`!else` clause's suite. A :keyword:" +"`continue` statement executed in the first suite skips the rest of the suite " +"and continues with the next item, or with the :keyword:`!else` clause if " +"there is no next item." +msgstr "" + +#: ../../reference/compound_stmts.rst:179 +msgid "" +"The for-loop makes assignments to the variables in the target list. This " +"overwrites all previous assignments to those variables including those made " +"in the suite of the for-loop::" +msgstr "" + +#: ../../reference/compound_stmts.rst:183 +msgid "" +"for i in range(10):\n" +" print(i)\n" +" i = 5 # this will not affect the for-loop\n" +" # because i will be overwritten with the next\n" +" # index in the range" +msgstr "" + +#: ../../reference/compound_stmts.rst:193 +msgid "" +"Names in the target list are not deleted when the loop is finished, but if " +"the sequence is empty, they will not have been assigned to at all by the " +"loop. Hint: the built-in type :func:`range` represents immutable arithmetic " +"sequences of integers. For instance, iterating ``range(3)`` successively " +"yields 0, 1, and then 2." +msgstr "" + +#: ../../reference/compound_stmts.rst:198 +msgid "Starred elements are now allowed in the expression list." +msgstr "" + +#: ../../reference/compound_stmts.rst:205 +msgid "The :keyword:`!try` statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:215 +msgid "" +"The :keyword:`!try` statement specifies exception handlers and/or cleanup " +"code for a group of statements:" +msgstr "" + +#: ../../reference/compound_stmts.rst:231 +msgid "" +"Additional information on exceptions can be found in section :ref:" +"`exceptions`, and information on using the :keyword:`raise` statement to " +"generate exceptions may be found in section :ref:`raise`." +msgstr "" + +#: ../../reference/compound_stmts.rst:235 +msgid "" +"Support for optionally dropping grouping parentheses when using multiple " +"exception types. See :pep:`758`." +msgstr "" + +#: ../../reference/compound_stmts.rst:241 +msgid ":keyword:`!except` clause" +msgstr "" + +#: ../../reference/compound_stmts.rst:243 +msgid "" +"The :keyword:`!except` clause(s) specify one or more exception handlers. " +"When no exception occurs in the :keyword:`try` clause, no exception handler " +"is executed. When an exception occurs in the :keyword:`!try` suite, a search " +"for an exception handler is started. This search inspects the :keyword:`!" +"except` clauses in turn until one is found that matches the exception. An " +"expression-less :keyword:`!except` clause, if present, must be last; it " +"matches any exception." +msgstr "" + +#: ../../reference/compound_stmts.rst:251 +msgid "" +"For an :keyword:`!except` clause with an expression, the expression must " +"evaluate to an exception type or a tuple of exception types. Parentheses can " +"be dropped if multiple exception types are provided and the ``as`` clause is " +"not used. The raised exception matches an :keyword:`!except` clause whose " +"expression evaluates to the class or a :term:`non-virtual base class " +"` of the exception object, or to a tuple that contains " +"such a class." +msgstr "" + +#: ../../reference/compound_stmts.rst:258 +msgid "" +"If no :keyword:`!except` clause matches the exception, the search for an " +"exception handler continues in the surrounding code and on the invocation " +"stack. [#]_" +msgstr "" + +#: ../../reference/compound_stmts.rst:262 +msgid "" +"If the evaluation of an expression in the header of an :keyword:`!except` " +"clause raises an exception, the original search for a handler is canceled " +"and a search starts for the new exception in the surrounding code and on the " +"call stack (it is treated as if the entire :keyword:`try` statement raised " +"the exception)." +msgstr "" + +#: ../../reference/compound_stmts.rst:270 +msgid "" +"When a matching :keyword:`!except` clause is found, the exception is " +"assigned to the target specified after the :keyword:`!as` keyword in that :" +"keyword:`!except` clause, if present, and the :keyword:`!except` clause's " +"suite is executed. All :keyword:`!except` clauses must have an executable " +"block. When the end of this block is reached, execution continues normally " +"after the entire :keyword:`try` statement. (This means that if two nested " +"handlers exist for the same exception, and the exception occurs in the :" +"keyword:`!try` clause of the inner handler, the outer handler will not " +"handle the exception.)" +msgstr "" + +#: ../../reference/compound_stmts.rst:281 +msgid "" +"When an exception has been assigned using ``as target``, it is cleared at " +"the end of the :keyword:`!except` clause. This is as if::" +msgstr "" + +#: ../../reference/compound_stmts.rst:284 +msgid "" +"except E as N:\n" +" foo" +msgstr "" + +#: ../../reference/compound_stmts.rst:287 +msgid "was translated to::" +msgstr "" + +#: ../../reference/compound_stmts.rst:289 +msgid "" +"except E as N:\n" +" try:\n" +" foo\n" +" finally:\n" +" del N" +msgstr "" + +#: ../../reference/compound_stmts.rst:295 +msgid "" +"This means the exception must be assigned to a different name to be able to " +"refer to it after the :keyword:`!except` clause. Exceptions are cleared " +"because with the traceback attached to them, they form a reference cycle " +"with the stack frame, keeping all locals in that frame alive until the next " +"garbage collection occurs." +msgstr "" + +#: ../../reference/compound_stmts.rst:305 +msgid "" +"Before an :keyword:`!except` clause's suite is executed, the exception is " +"stored in the :mod:`sys` module, where it can be accessed from within the " +"body of the :keyword:`!except` clause by calling :func:`sys.exception`. When " +"leaving an exception handler, the exception stored in the :mod:`sys` module " +"is reset to its previous value::" +msgstr "" + +#: ../../reference/compound_stmts.rst:311 +msgid "" +">>> print(sys.exception())\n" +"None\n" +">>> try:\n" +"... raise TypeError\n" +"... except:\n" +"... print(repr(sys.exception()))\n" +"... try:\n" +"... raise ValueError\n" +"... except:\n" +"... print(repr(sys.exception()))\n" +"... print(repr(sys.exception()))\n" +"...\n" +"TypeError()\n" +"ValueError()\n" +"TypeError()\n" +">>> print(sys.exception())\n" +"None" +msgstr "" + +#: ../../reference/compound_stmts.rst:336 +msgid ":keyword:`!except*` clause" +msgstr "" + +#: ../../reference/compound_stmts.rst:338 +msgid "" +"The :keyword:`!except*` clause(s) specify one or more handlers for groups of " +"exceptions (:exc:`BaseExceptionGroup` instances). A :keyword:`try` statement " +"can have either :keyword:`except` or :keyword:`!except*` clauses, but not " +"both. The exception type for matching is mandatory in the case of :keyword:`!" +"except*`, so ``except*:`` is a syntax error. The type is interpreted as in " +"the case of :keyword:`!except`, but matching is performed on the exceptions " +"contained in the group that is being handled. A :exc:`TypeError` is raised " +"if a matching type is a subclass of :exc:`!BaseExceptionGroup`, because that " +"would have ambiguous semantics." +msgstr "" + +#: ../../reference/compound_stmts.rst:348 +msgid "" +"When an exception group is raised in the try block, each :keyword:`!except*` " +"clause splits (see :meth:`~BaseExceptionGroup.split`) it into the subgroups " +"of matching and non-matching exceptions. If the matching subgroup is not " +"empty, it becomes the handled exception (the value returned from :func:`sys." +"exception`) and assigned to the target of the :keyword:`!except*` clause (if " +"there is one). Then, the body of the :keyword:`!except*` clause executes. If " +"the non-matching subgroup is not empty, it is processed by the next :keyword:" +"`!except*` in the same manner. This continues until all exceptions in the " +"group have been matched, or the last :keyword:`!except*` clause has run." +msgstr "" + +#: ../../reference/compound_stmts.rst:358 +msgid "" +"After all :keyword:`!except*` clauses execute, the group of unhandled " +"exceptions is merged with any exceptions that were raised or re-raised from " +"within :keyword:`!except*` clauses. This merged exception group propagates " +"on::" +msgstr "" + +#: ../../reference/compound_stmts.rst:362 +msgid "" +">>> try:\n" +"... raise ExceptionGroup(\"eg\",\n" +"... [ValueError(1), TypeError(2), OSError(3), OSError(4)])\n" +"... except* TypeError as e:\n" +"... print(f'caught {type(e)} with nested {e.exceptions}')\n" +"... except* OSError as e:\n" +"... print(f'caught {type(e)} with nested {e.exceptions}')\n" +"...\n" +"caught with nested (TypeError(2),)\n" +"caught with nested (OSError(3), OSError(4))\n" +" + Exception Group Traceback (most recent call last):\n" +" | File \"\", line 2, in \n" +" | raise ExceptionGroup(\"eg\",\n" +" | [ValueError(1), TypeError(2), OSError(3), OSError(4)])\n" +" | ExceptionGroup: eg (1 sub-exception)\n" +" +-+---------------- 1 ----------------\n" +" | ValueError: 1\n" +" +------------------------------------" +msgstr "" + +#: ../../reference/compound_stmts.rst:381 +msgid "" +"If the exception raised from the :keyword:`try` block is not an exception " +"group and its type matches one of the :keyword:`!except*` clauses, it is " +"caught and wrapped by an exception group with an empty message string. This " +"ensures that the type of the target ``e`` is consistently :exc:" +"`BaseExceptionGroup`::" +msgstr "" + +#: ../../reference/compound_stmts.rst:386 +msgid "" +">>> try:\n" +"... raise BlockingIOError\n" +"... except* BlockingIOError as e:\n" +"... print(repr(e))\n" +"...\n" +"ExceptionGroup('', (BlockingIOError(),))" +msgstr "" + +#: ../../reference/compound_stmts.rst:393 +msgid "" +":keyword:`break`, :keyword:`continue` and :keyword:`return` cannot appear in " +"an :keyword:`!except*` clause." +msgstr "" + +#: ../../reference/compound_stmts.rst:406 +msgid ":keyword:`!else` clause" +msgstr "" + +#: ../../reference/compound_stmts.rst:408 +msgid "" +"The optional :keyword:`!else` clause is executed if the control flow leaves " +"the :keyword:`try` suite, no exception was raised, and no :keyword:" +"`return`, :keyword:`continue`, or :keyword:`break` statement was executed. " +"Exceptions in the :keyword:`!else` clause are not handled by the preceding :" +"keyword:`except` clauses." +msgstr "" + +#: ../../reference/compound_stmts.rst:420 +msgid ":keyword:`!finally` clause" +msgstr "" + +#: ../../reference/compound_stmts.rst:422 +msgid "" +"If :keyword:`!finally` is present, it specifies a 'cleanup' handler. The :" +"keyword:`try` clause is executed, including any :keyword:`except` and :" +"keyword:`else ` clauses. If an exception occurs in any of the " +"clauses and is not handled, the exception is temporarily saved. The :keyword:" +"`!finally` clause is executed. If there is a saved exception it is re-" +"raised at the end of the :keyword:`!finally` clause. If the :keyword:`!" +"finally` clause raises another exception, the saved exception is set as the " +"context of the new exception. If the :keyword:`!finally` clause executes a :" +"keyword:`return`, :keyword:`break` or :keyword:`continue` statement, the " +"saved exception is discarded. For example, this function returns 42." +msgstr "" + +#: ../../reference/compound_stmts.rst:435 +msgid "" +"def f():\n" +" try:\n" +" 1/0\n" +" finally:\n" +" return 42" +msgstr "" + +#: ../../reference/compound_stmts.rst:443 +msgid "" +"The exception information is not available to the program during execution " +"of the :keyword:`!finally` clause." +msgstr "" + +#: ../../reference/compound_stmts.rst:451 +msgid "" +"When a :keyword:`return`, :keyword:`break` or :keyword:`continue` statement " +"is executed in the :keyword:`try` suite of a :keyword:`!try`...\\ :keyword:`!" +"finally` statement, the :keyword:`!finally` clause is also executed 'on the " +"way out.'" +msgstr "" + +#: ../../reference/compound_stmts.rst:455 +msgid "" +"The return value of a function is determined by the last :keyword:`return` " +"statement executed. Since the :keyword:`!finally` clause always executes, " +"a :keyword:`!return` statement executed in the :keyword:`!finally` clause " +"will always be the last one executed. The following function returns " +"'finally'." +msgstr "" + +#: ../../reference/compound_stmts.rst:460 +msgid "" +"def foo():\n" +" try:\n" +" return 'try'\n" +" finally:\n" +" return 'finally'" +msgstr "" + +#: ../../reference/compound_stmts.rst:468 +msgid "" +"Prior to Python 3.8, a :keyword:`continue` statement was illegal in the :" +"keyword:`!finally` clause due to a problem with the implementation." +msgstr "" + +#: ../../reference/compound_stmts.rst:472 +msgid "" +"The compiler emits a :exc:`SyntaxWarning` when a :keyword:`return`, :keyword:" +"`break` or :keyword:`continue` appears in a :keyword:`!finally` block (see :" +"pep:`765`)." +msgstr "" + +#: ../../reference/compound_stmts.rst:482 +msgid "The :keyword:`!with` statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:491 +msgid "" +"The :keyword:`with` statement is used to wrap the execution of a block with " +"methods defined by a context manager (see section :ref:`context-managers`). " +"This allows common :keyword:`try`...\\ :keyword:`except`...\\ :keyword:" +"`finally` usage patterns to be encapsulated for convenient reuse." +msgstr "" + +#: ../../reference/compound_stmts.rst:501 +msgid "" +"The execution of the :keyword:`with` statement with one \"item\" proceeds as " +"follows:" +msgstr "" + +#: ../../reference/compound_stmts.rst:503 +msgid "" +"The context expression (the expression given in the :token:`~python-grammar:" +"with_item`) is evaluated to obtain a context manager." +msgstr "" + +#: ../../reference/compound_stmts.rst:506 +msgid "" +"The context manager's :meth:`~object.__enter__` is loaded for later use." +msgstr "" + +#: ../../reference/compound_stmts.rst:508 +msgid "The context manager's :meth:`~object.__exit__` is loaded for later use." +msgstr "" + +#: ../../reference/compound_stmts.rst:510 +msgid "The context manager's :meth:`~object.__enter__` method is invoked." +msgstr "" + +#: ../../reference/compound_stmts.rst:512 +msgid "" +"If a target was included in the :keyword:`with` statement, the return value " +"from :meth:`~object.__enter__` is assigned to it." +msgstr "" + +#: ../../reference/compound_stmts.rst:517 +msgid "" +"The :keyword:`with` statement guarantees that if the :meth:`~object." +"__enter__` method returns without an error, then :meth:`~object.__exit__` " +"will always be called. Thus, if an error occurs during the assignment to the " +"target list, it will be treated the same as an error occurring within the " +"suite would be. See step 7 below." +msgstr "" + +#: ../../reference/compound_stmts.rst:523 +msgid "The suite is executed." +msgstr "" + +#: ../../reference/compound_stmts.rst:525 +msgid "" +"The context manager's :meth:`~object.__exit__` method is invoked. If an " +"exception caused the suite to be exited, its type, value, and traceback are " +"passed as arguments to :meth:`~object.__exit__`. Otherwise, three :const:" +"`None` arguments are supplied." +msgstr "" + +#: ../../reference/compound_stmts.rst:530 +msgid "" +"If the suite was exited due to an exception, and the return value from the :" +"meth:`~object.__exit__` method was false, the exception is reraised. If the " +"return value was true, the exception is suppressed, and execution continues " +"with the statement following the :keyword:`with` statement." +msgstr "" + +#: ../../reference/compound_stmts.rst:535 +msgid "" +"If the suite was exited for any reason other than an exception, the return " +"value from :meth:`~object.__exit__` is ignored, and execution proceeds at " +"the normal location for the kind of exit that was taken." +msgstr "" + +#: ../../reference/compound_stmts.rst:539 +#: ../../reference/compound_stmts.rst:1677 +#: ../../reference/compound_stmts.rst:1718 +msgid "The following code::" +msgstr "" + +#: ../../reference/compound_stmts.rst:541 +msgid "" +"with EXPRESSION as TARGET:\n" +" SUITE" +msgstr "" + +#: ../../reference/compound_stmts.rst:544 +#: ../../reference/compound_stmts.rst:572 +#: ../../reference/compound_stmts.rst:1723 +msgid "is semantically equivalent to::" +msgstr "" + +#: ../../reference/compound_stmts.rst:546 +msgid "" +"manager = (EXPRESSION)\n" +"enter = manager.__enter__\n" +"exit = manager.__exit__\n" +"value = enter()\n" +"hit_except = False\n" +"\n" +"try:\n" +" TARGET = value\n" +" SUITE\n" +"except:\n" +" hit_except = True\n" +" if not exit(*sys.exc_info()):\n" +" raise\n" +"finally:\n" +" if not hit_except:\n" +" exit(None, None, None)" +msgstr "" + +#: ../../reference/compound_stmts.rst:563 +msgid "" +"except that implicit :ref:`special method lookup ` is used " +"for :meth:`~object.__enter__` and :meth:`~object.__exit__`." +msgstr "" + +#: ../../reference/compound_stmts.rst:566 +msgid "" +"With more than one item, the context managers are processed as if multiple :" +"keyword:`with` statements were nested::" +msgstr "" + +#: ../../reference/compound_stmts.rst:569 +msgid "" +"with A() as a, B() as b:\n" +" SUITE" +msgstr "" + +#: ../../reference/compound_stmts.rst:574 +msgid "" +"with A() as a:\n" +" with B() as b:\n" +" SUITE" +msgstr "" + +#: ../../reference/compound_stmts.rst:578 +msgid "" +"You can also write multi-item context managers in multiple lines if the " +"items are surrounded by parentheses. For example::" +msgstr "" + +#: ../../reference/compound_stmts.rst:581 +msgid "" +"with (\n" +" A() as a,\n" +" B() as b,\n" +"):\n" +" SUITE" +msgstr "" + +#: ../../reference/compound_stmts.rst:587 +msgid "Support for multiple context expressions." +msgstr "" + +#: ../../reference/compound_stmts.rst:590 +msgid "" +"Support for using grouping parentheses to break the statement in multiple " +"lines." +msgstr "" + +#: ../../reference/compound_stmts.rst:595 +msgid ":pep:`343` - The \"with\" statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:596 +msgid "" +"The specification, background, and examples for the Python :keyword:`with` " +"statement." +msgstr "" + +#: ../../reference/compound_stmts.rst:603 +msgid "The :keyword:`!match` statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:617 +msgid "The match statement is used for pattern matching. Syntax:" +msgstr "" + +#: ../../reference/compound_stmts.rst:626 +msgid "" +"This section uses single quotes to denote :ref:`soft keywords `." +msgstr "" + +#: ../../reference/compound_stmts.rst:629 +msgid "" +"Pattern matching takes a pattern as input (following ``case``) and a subject " +"value (following ``match``). The pattern (which may contain subpatterns) is " +"matched against the subject value. The outcomes are:" +msgstr "" + +#: ../../reference/compound_stmts.rst:633 +msgid "A match success or failure (also termed a pattern success or failure)." +msgstr "" + +#: ../../reference/compound_stmts.rst:635 +msgid "" +"Possible binding of matched values to a name. The prerequisites for this " +"are further discussed below." +msgstr "" + +#: ../../reference/compound_stmts.rst:638 +msgid "" +"The ``match`` and ``case`` keywords are :ref:`soft keywords `." +msgstr "" + +#: ../../reference/compound_stmts.rst:642 +#: ../../reference/compound_stmts.rst:1200 +msgid ":pep:`634` -- Structural Pattern Matching: Specification" +msgstr "" + +#: ../../reference/compound_stmts.rst:643 +#: ../../reference/compound_stmts.rst:1201 +msgid ":pep:`636` -- Structural Pattern Matching: Tutorial" +msgstr "" + +#: ../../reference/compound_stmts.rst:647 +msgid "Overview" +msgstr "" + +#: ../../reference/compound_stmts.rst:649 +msgid "Here's an overview of the logical flow of a match statement:" +msgstr "" + +#: ../../reference/compound_stmts.rst:652 +msgid "" +"The subject expression ``subject_expr`` is evaluated and a resulting subject " +"value obtained. If the subject expression contains a comma, a tuple is " +"constructed using :ref:`the standard rules `." +msgstr "" + +#: ../../reference/compound_stmts.rst:656 +msgid "" +"Each pattern in a ``case_block`` is attempted to match with the subject " +"value. The specific rules for success or failure are described below. The " +"match attempt can also bind some or all of the standalone names within the " +"pattern. The precise pattern binding rules vary per pattern type and are " +"specified below. **Name bindings made during a successful pattern match " +"outlive the executed block and can be used after the match statement**." +msgstr "" + +#: ../../reference/compound_stmts.rst:665 +msgid "" +"During failed pattern matches, some subpatterns may succeed. Do not rely on " +"bindings being made for a failed match. Conversely, do not rely on " +"variables remaining unchanged after a failed match. The exact behavior is " +"dependent on implementation and may vary. This is an intentional decision " +"made to allow different implementations to add optimizations." +msgstr "" + +#: ../../reference/compound_stmts.rst:672 +msgid "" +"If the pattern succeeds, the corresponding guard (if present) is evaluated. " +"In this case all name bindings are guaranteed to have happened." +msgstr "" + +#: ../../reference/compound_stmts.rst:675 +msgid "" +"If the guard evaluates as true or is missing, the ``block`` inside " +"``case_block`` is executed." +msgstr "" + +#: ../../reference/compound_stmts.rst:678 +msgid "Otherwise, the next ``case_block`` is attempted as described above." +msgstr "" + +#: ../../reference/compound_stmts.rst:680 +msgid "If there are no further case blocks, the match statement is completed." +msgstr "" + +#: ../../reference/compound_stmts.rst:684 +msgid "" +"Users should generally never rely on a pattern being evaluated. Depending " +"on implementation, the interpreter may cache values or use other " +"optimizations which skip repeated evaluations." +msgstr "" + +#: ../../reference/compound_stmts.rst:688 +msgid "A sample match statement::" +msgstr "" + +#: ../../reference/compound_stmts.rst:690 +msgid "" +">>> flag = False\n" +">>> match (100, 200):\n" +"... case (100, 300): # Mismatch: 200 != 300\n" +"... print('Case 1')\n" +"... case (100, 200) if flag: # Successful match, but guard fails\n" +"... print('Case 2')\n" +"... case (100, y): # Matches and binds y to 200\n" +"... print(f'Case 3, y: {y}')\n" +"... case _: # Pattern not attempted\n" +"... print('Case 4, I match anything!')\n" +"...\n" +"Case 3, y: 200" +msgstr "" + +#: ../../reference/compound_stmts.rst:704 +msgid "" +"In this case, ``if flag`` is a guard. Read more about that in the next " +"section." +msgstr "" + +#: ../../reference/compound_stmts.rst:707 +msgid "Guards" +msgstr "" + +#: ../../reference/compound_stmts.rst:714 +msgid "" +"A ``guard`` (which is part of the ``case``) must succeed for code inside the " +"``case`` block to execute. It takes the form: :keyword:`if` followed by an " +"expression." +msgstr "" + +#: ../../reference/compound_stmts.rst:719 +msgid "The logical flow of a ``case`` block with a ``guard`` follows:" +msgstr "" + +#: ../../reference/compound_stmts.rst:721 +msgid "" +"Check that the pattern in the ``case`` block succeeded. If the pattern " +"failed, the ``guard`` is not evaluated and the next ``case`` block is " +"checked." +msgstr "" + +#: ../../reference/compound_stmts.rst:725 +msgid "If the pattern succeeded, evaluate the ``guard``." +msgstr "" + +#: ../../reference/compound_stmts.rst:727 +msgid "" +"If the ``guard`` condition evaluates as true, the case block is selected." +msgstr "" + +#: ../../reference/compound_stmts.rst:730 +msgid "" +"If the ``guard`` condition evaluates as false, the case block is not " +"selected." +msgstr "" + +#: ../../reference/compound_stmts.rst:733 +msgid "" +"If the ``guard`` raises an exception during evaluation, the exception " +"bubbles up." +msgstr "" + +#: ../../reference/compound_stmts.rst:736 +msgid "" +"Guards are allowed to have side effects as they are expressions. Guard " +"evaluation must proceed from the first to the last case block, one at a " +"time, skipping case blocks whose pattern(s) don't all succeed. (I.e., guard " +"evaluation must happen in order.) Guard evaluation must stop once a case " +"block is selected." +msgstr "" + +#: ../../reference/compound_stmts.rst:746 +msgid "Irrefutable Case Blocks" +msgstr "" + +#: ../../reference/compound_stmts.rst:750 +msgid "" +"An irrefutable case block is a match-all case block. A match statement may " +"have at most one irrefutable case block, and it must be last." +msgstr "" + +#: ../../reference/compound_stmts.rst:753 +msgid "" +"A case block is considered irrefutable if it has no guard and its pattern is " +"irrefutable. A pattern is considered irrefutable if we can prove from its " +"syntax alone that it will always succeed. Only the following patterns are " +"irrefutable:" +msgstr "" + +#: ../../reference/compound_stmts.rst:758 +msgid ":ref:`as-patterns` whose left-hand side is irrefutable" +msgstr "" + +#: ../../reference/compound_stmts.rst:760 +msgid ":ref:`or-patterns` containing at least one irrefutable pattern" +msgstr "" + +#: ../../reference/compound_stmts.rst:762 +msgid ":ref:`capture-patterns`" +msgstr "" + +#: ../../reference/compound_stmts.rst:764 +msgid ":ref:`wildcard-patterns`" +msgstr "" + +#: ../../reference/compound_stmts.rst:766 +msgid "parenthesized irrefutable patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:770 +msgid "Patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:777 +msgid "This section uses grammar notations beyond standard EBNF:" +msgstr "" + +#: ../../reference/compound_stmts.rst:779 +msgid "the notation ``SEP.RULE+`` is shorthand for ``RULE (SEP RULE)*``" +msgstr "" + +#: ../../reference/compound_stmts.rst:781 +msgid "the notation ``!RULE`` is shorthand for a negative lookahead assertion" +msgstr "" + +#: ../../reference/compound_stmts.rst:784 +msgid "The top-level syntax for ``patterns`` is:" +msgstr "" + +#: ../../reference/compound_stmts.rst:798 +msgid "" +"The descriptions below will include a description \"in simple terms\" of " +"what a pattern does for illustration purposes (credits to Raymond Hettinger " +"for a document that inspired most of the descriptions). Note that these " +"descriptions are purely for illustration purposes and **may not** reflect " +"the underlying implementation. Furthermore, they do not cover all valid " +"forms." +msgstr "" + +#: ../../reference/compound_stmts.rst:808 +msgid "OR Patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:810 +msgid "" +"An OR pattern is two or more patterns separated by vertical bars ``|``. " +"Syntax:" +msgstr "" + +#: ../../reference/compound_stmts.rst:816 +msgid "" +"Only the final subpattern may be :ref:`irrefutable `, and " +"each subpattern must bind the same set of names to avoid ambiguity." +msgstr "" + +#: ../../reference/compound_stmts.rst:819 +msgid "" +"An OR pattern matches each of its subpatterns in turn to the subject value, " +"until one succeeds. The OR pattern is then considered successful. " +"Otherwise, if none of the subpatterns succeed, the OR pattern fails." +msgstr "" + +#: ../../reference/compound_stmts.rst:823 +msgid "" +"In simple terms, ``P1 | P2 | ...`` will try to match ``P1``, if it fails it " +"will try to match ``P2``, succeeding immediately if any succeeds, failing " +"otherwise." +msgstr "" + +#: ../../reference/compound_stmts.rst:829 +msgid "AS Patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:831 +msgid "" +"An AS pattern matches an OR pattern on the left of the :keyword:`as` keyword " +"against a subject. Syntax:" +msgstr "" + +#: ../../reference/compound_stmts.rst:837 +msgid "" +"If the OR pattern fails, the AS pattern fails. Otherwise, the AS pattern " +"binds the subject to the name on the right of the as keyword and succeeds. " +"``capture_pattern`` cannot be a ``_``." +msgstr "" + +#: ../../reference/compound_stmts.rst:841 +msgid "" +"In simple terms ``P as NAME`` will match with ``P``, and on success it will " +"set ``NAME = ``." +msgstr "" + +#: ../../reference/compound_stmts.rst:848 +msgid "Literal Patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:850 +msgid "" +"A literal pattern corresponds to most :ref:`literals ` in Python. " +"Syntax:" +msgstr "" + +#: ../../reference/compound_stmts.rst:863 +msgid "" +"The rule ``strings`` and the token ``NUMBER`` are defined in the :doc:" +"`standard Python grammar <./grammar>`. Triple-quoted strings are " +"supported. Raw strings and byte strings are supported. :ref:`f-strings` " +"and :ref:`t-strings` are not supported." +msgstr "" + +#: ../../reference/compound_stmts.rst:868 +msgid "" +"The forms ``signed_number '+' NUMBER`` and ``signed_number '-' NUMBER`` are " +"for expressing :ref:`complex numbers `; they require a real " +"number on the left and an imaginary number on the right. E.g. ``3 + 4j``." +msgstr "" + +#: ../../reference/compound_stmts.rst:872 +msgid "" +"In simple terms, ``LITERAL`` will succeed only if `` == LITERAL``. " +"For the singletons ``None``, ``True`` and ``False``, the :keyword:`is` " +"operator is used." +msgstr "" + +#: ../../reference/compound_stmts.rst:878 +msgid "Capture Patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:880 +msgid "A capture pattern binds the subject value to a name. Syntax:" +msgstr "" + +#: ../../reference/compound_stmts.rst:886 +msgid "" +"A single underscore ``_`` is not a capture pattern (this is what ``!'_'`` " +"expresses). It is instead treated as a :token:`~python-grammar:" +"wildcard_pattern`." +msgstr "" + +#: ../../reference/compound_stmts.rst:890 +msgid "" +"In a given pattern, a given name can only be bound once. E.g. ``case x, " +"x: ...`` is invalid while ``case [x] | x: ...`` is allowed." +msgstr "" + +#: ../../reference/compound_stmts.rst:893 +msgid "" +"Capture patterns always succeed. The binding follows scoping rules " +"established by the assignment expression operator in :pep:`572`; the name " +"becomes a local variable in the closest containing function scope unless " +"there's an applicable :keyword:`global` or :keyword:`nonlocal` statement." +msgstr "" + +#: ../../reference/compound_stmts.rst:898 +msgid "" +"In simple terms ``NAME`` will always succeed and it will set ``NAME = " +"``." +msgstr "" + +#: ../../reference/compound_stmts.rst:903 +msgid "Wildcard Patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:905 +msgid "" +"A wildcard pattern always succeeds (matches anything) and binds no name. " +"Syntax:" +msgstr "" + +#: ../../reference/compound_stmts.rst:911 +msgid "" +"``_`` is a :ref:`soft keyword ` within any pattern, but only " +"within patterns. It is an identifier, as usual, even within ``match`` " +"subject expressions, ``guard``\\ s, and ``case`` blocks." +msgstr "" + +#: ../../reference/compound_stmts.rst:915 +msgid "In simple terms, ``_`` will always succeed." +msgstr "" + +#: ../../reference/compound_stmts.rst:920 +msgid "Value Patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:922 +msgid "A value pattern represents a named value in Python. Syntax:" +msgstr "" + +#: ../../reference/compound_stmts.rst:930 +msgid "" +"The dotted name in the pattern is looked up using standard Python :ref:`name " +"resolution rules `. The pattern succeeds if the value found " +"compares equal to the subject value (using the ``==`` equality operator)." +msgstr "" + +#: ../../reference/compound_stmts.rst:935 +msgid "" +"In simple terms ``NAME1.NAME2`` will succeed only if `` == NAME1." +"NAME2``" +msgstr "" + +#: ../../reference/compound_stmts.rst:939 +msgid "" +"If the same value occurs multiple times in the same match statement, the " +"interpreter may cache the first value found and reuse it rather than repeat " +"the same lookup. This cache is strictly tied to a given execution of a " +"given match statement." +msgstr "" + +#: ../../reference/compound_stmts.rst:947 +msgid "Group Patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:949 +msgid "" +"A group pattern allows users to add parentheses around patterns to emphasize " +"the intended grouping. Otherwise, it has no additional syntax. Syntax:" +msgstr "" + +#: ../../reference/compound_stmts.rst:956 +msgid "In simple terms ``(P)`` has the same effect as ``P``." +msgstr "" + +#: ../../reference/compound_stmts.rst:961 +msgid "Sequence Patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:963 +msgid "" +"A sequence pattern contains several subpatterns to be matched against " +"sequence elements. The syntax is similar to the unpacking of a list or tuple." +msgstr "" + +#: ../../reference/compound_stmts.rst:974 +msgid "" +"There is no difference if parentheses or square brackets are used for " +"sequence patterns (i.e. ``(...)`` vs ``[...]`` )." +msgstr "" + +#: ../../reference/compound_stmts.rst:978 +msgid "" +"A single pattern enclosed in parentheses without a trailing comma (e.g. ``(3 " +"| 4)``) is a :ref:`group pattern `. While a single pattern " +"enclosed in square brackets (e.g. ``[3 | 4]``) is still a sequence pattern." +msgstr "" + +#: ../../reference/compound_stmts.rst:983 +msgid "" +"At most one star subpattern may be in a sequence pattern. The star " +"subpattern may occur in any position. If no star subpattern is present, the " +"sequence pattern is a fixed-length sequence pattern; otherwise it is a " +"variable-length sequence pattern." +msgstr "" + +#: ../../reference/compound_stmts.rst:988 +msgid "" +"The following is the logical flow for matching a sequence pattern against a " +"subject value:" +msgstr "" + +#: ../../reference/compound_stmts.rst:991 +msgid "" +"If the subject value is not a sequence [#]_, the sequence pattern fails." +msgstr "" + +#: ../../reference/compound_stmts.rst:994 +msgid "" +"If the subject value is an instance of ``str``, ``bytes`` or ``bytearray`` " +"the sequence pattern fails." +msgstr "" + +#: ../../reference/compound_stmts.rst:997 +msgid "" +"The subsequent steps depend on whether the sequence pattern is fixed or " +"variable-length." +msgstr "" + +#: ../../reference/compound_stmts.rst:1000 +msgid "If the sequence pattern is fixed-length:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1002 +msgid "" +"If the length of the subject sequence is not equal to the number of " +"subpatterns, the sequence pattern fails" +msgstr "" + +#: ../../reference/compound_stmts.rst:1005 +msgid "" +"Subpatterns in the sequence pattern are matched to their corresponding items " +"in the subject sequence from left to right. Matching stops as soon as a " +"subpattern fails. If all subpatterns succeed in matching their " +"corresponding item, the sequence pattern succeeds." +msgstr "" + +#: ../../reference/compound_stmts.rst:1010 +msgid "Otherwise, if the sequence pattern is variable-length:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1012 +msgid "" +"If the length of the subject sequence is less than the number of non-star " +"subpatterns, the sequence pattern fails." +msgstr "" + +#: ../../reference/compound_stmts.rst:1015 +msgid "" +"The leading non-star subpatterns are matched to their corresponding items as " +"for fixed-length sequences." +msgstr "" + +#: ../../reference/compound_stmts.rst:1018 +msgid "" +"If the previous step succeeds, the star subpattern matches a list formed of " +"the remaining subject items, excluding the remaining items corresponding to " +"non-star subpatterns following the star subpattern." +msgstr "" + +#: ../../reference/compound_stmts.rst:1022 +msgid "" +"Remaining non-star subpatterns are matched to their corresponding subject " +"items, as for a fixed-length sequence." +msgstr "" + +#: ../../reference/compound_stmts.rst:1025 +msgid "" +"The length of the subject sequence is obtained via :func:`len` (i.e. via " +"the :meth:`~object.__len__` protocol). This length may be cached by the " +"interpreter in a similar manner as :ref:`value patterns `." +msgstr "" + +#: ../../reference/compound_stmts.rst:1031 +msgid "" +"In simple terms ``[P1, P2, P3,`` ... ``, P]`` matches only if all the " +"following happens:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1034 +msgid "check ```` is a sequence" +msgstr "" + +#: ../../reference/compound_stmts.rst:1035 +msgid "``len(subject) == ``" +msgstr "" + +#: ../../reference/compound_stmts.rst:1036 +msgid "" +"``P1`` matches ``[0]`` (note that this match can also bind names)" +msgstr "" + +#: ../../reference/compound_stmts.rst:1037 +msgid "" +"``P2`` matches ``[1]`` (note that this match can also bind names)" +msgstr "" + +#: ../../reference/compound_stmts.rst:1038 +msgid "... and so on for the corresponding pattern/element." +msgstr "" + +#: ../../reference/compound_stmts.rst:1043 +msgid "Mapping Patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:1045 +msgid "" +"A mapping pattern contains one or more key-value patterns. The syntax is " +"similar to the construction of a dictionary. Syntax:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1056 +msgid "" +"At most one double star pattern may be in a mapping pattern. The double " +"star pattern must be the last subpattern in the mapping pattern." +msgstr "" + +#: ../../reference/compound_stmts.rst:1059 +msgid "" +"Duplicate keys in mapping patterns are disallowed. Duplicate literal keys " +"will raise a :exc:`SyntaxError`. Two keys that otherwise have the same value " +"will raise a :exc:`ValueError` at runtime." +msgstr "" + +#: ../../reference/compound_stmts.rst:1063 +msgid "" +"The following is the logical flow for matching a mapping pattern against a " +"subject value:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1066 +msgid "If the subject value is not a mapping [#]_,the mapping pattern fails." +msgstr "" + +#: ../../reference/compound_stmts.rst:1068 +msgid "" +"If every key given in the mapping pattern is present in the subject mapping, " +"and the pattern for each key matches the corresponding item of the subject " +"mapping, the mapping pattern succeeds." +msgstr "" + +#: ../../reference/compound_stmts.rst:1072 +msgid "" +"If duplicate keys are detected in the mapping pattern, the pattern is " +"considered invalid. A :exc:`SyntaxError` is raised for duplicate literal " +"values; or a :exc:`ValueError` for named keys of the same value." +msgstr "" + +#: ../../reference/compound_stmts.rst:1076 +msgid "" +"Key-value pairs are matched using the two-argument form of the mapping " +"subject's ``get()`` method. Matched key-value pairs must already be present " +"in the mapping, and not created on-the-fly via :meth:`~object.__missing__` " +"or :meth:`~object.__getitem__`." +msgstr "" + +#: ../../reference/compound_stmts.rst:1081 +msgid "" +"In simple terms ``{KEY1: P1, KEY2: P2, ... }`` matches only if all the " +"following happens:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1084 +msgid "check ```` is a mapping" +msgstr "" + +#: ../../reference/compound_stmts.rst:1085 +msgid "``KEY1 in ``" +msgstr "" + +#: ../../reference/compound_stmts.rst:1086 +msgid "``P1`` matches ``[KEY1]``" +msgstr "" + +#: ../../reference/compound_stmts.rst:1087 +msgid "... and so on for the corresponding KEY/pattern pair." +msgstr "" + +#: ../../reference/compound_stmts.rst:1093 +msgid "Class Patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:1095 +msgid "" +"A class pattern represents a class and its positional and keyword arguments " +"(if any). Syntax:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1106 +msgid "The same keyword should not be repeated in class patterns." +msgstr "" + +#: ../../reference/compound_stmts.rst:1108 +msgid "" +"The following is the logical flow for matching a class pattern against a " +"subject value:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1111 +msgid "" +"If ``name_or_attr`` is not an instance of the builtin :class:`type` , raise :" +"exc:`TypeError`." +msgstr "" + +#: ../../reference/compound_stmts.rst:1114 +msgid "" +"If the subject value is not an instance of ``name_or_attr`` (tested via :" +"func:`isinstance`), the class pattern fails." +msgstr "" + +#: ../../reference/compound_stmts.rst:1117 +msgid "" +"If no pattern arguments are present, the pattern succeeds. Otherwise, the " +"subsequent steps depend on whether keyword or positional argument patterns " +"are present." +msgstr "" + +#: ../../reference/compound_stmts.rst:1121 +msgid "" +"For a number of built-in types (specified below), a single positional " +"subpattern is accepted which will match the entire subject; for these types " +"keyword patterns also work as for other types." +msgstr "" + +#: ../../reference/compound_stmts.rst:1125 +msgid "" +"If only keyword patterns are present, they are processed as follows, one by " +"one:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1128 +msgid "The keyword is looked up as an attribute on the subject." +msgstr "" + +#: ../../reference/compound_stmts.rst:1130 +msgid "" +"If this raises an exception other than :exc:`AttributeError`, the exception " +"bubbles up." +msgstr "" + +#: ../../reference/compound_stmts.rst:1133 +msgid "If this raises :exc:`AttributeError`, the class pattern has failed." +msgstr "" + +#: ../../reference/compound_stmts.rst:1135 +msgid "" +"Else, the subpattern associated with the keyword pattern is matched against " +"the subject's attribute value. If this fails, the class pattern fails; if " +"this succeeds, the match proceeds to the next keyword." +msgstr "" + +#: ../../reference/compound_stmts.rst:1140 +msgid "If all keyword patterns succeed, the class pattern succeeds." +msgstr "" + +#: ../../reference/compound_stmts.rst:1142 +msgid "" +"If any positional patterns are present, they are converted to keyword " +"patterns using the :data:`~object.__match_args__` attribute on the class " +"``name_or_attr`` before matching:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1146 +msgid "The equivalent of ``getattr(cls, \"__match_args__\", ())`` is called." +msgstr "" + +#: ../../reference/compound_stmts.rst:1148 +msgid "If this raises an exception, the exception bubbles up." +msgstr "" + +#: ../../reference/compound_stmts.rst:1150 +msgid "" +"If the returned value is not a tuple, the conversion fails and :exc:" +"`TypeError` is raised." +msgstr "" + +#: ../../reference/compound_stmts.rst:1153 +msgid "" +"If there are more positional patterns than ``len(cls.__match_args__)``, :exc:" +"`TypeError` is raised." +msgstr "" + +#: ../../reference/compound_stmts.rst:1156 +msgid "" +"Otherwise, positional pattern ``i`` is converted to a keyword pattern using " +"``__match_args__[i]`` as the keyword. ``__match_args__[i]`` must be a " +"string; if not :exc:`TypeError` is raised." +msgstr "" + +#: ../../reference/compound_stmts.rst:1160 +msgid "If there are duplicate keywords, :exc:`TypeError` is raised." +msgstr "" + +#: ../../reference/compound_stmts.rst:1162 +msgid ":ref:`class-pattern-matching`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1164 +msgid "" +"Once all positional patterns have been converted to keyword patterns, the " +"match proceeds as if there were only keyword patterns." +msgstr "" + +#: ../../reference/compound_stmts.rst:1167 +msgid "" +"For the following built-in types the handling of positional subpatterns is " +"different:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1170 +msgid ":class:`bool`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1171 +msgid ":class:`bytearray`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1172 +msgid ":class:`bytes`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1173 +msgid ":class:`dict`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1174 +msgid ":class:`float`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1175 +msgid ":class:`frozendict`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1176 +msgid ":class:`frozenset`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1177 +msgid ":class:`int`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1178 +#: ../../reference/compound_stmts.rst:2053 +msgid ":class:`list`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1179 +msgid ":class:`set`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1180 +msgid ":class:`str`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1181 +#: ../../reference/compound_stmts.rst:2056 +msgid ":class:`tuple`" +msgstr "" + +#: ../../reference/compound_stmts.rst:1183 +msgid "" +"These classes accept a single positional argument, and the pattern there is " +"matched against the whole object rather than an attribute. For example " +"``int(0|1)`` matches the value ``0``, but not the value ``0.0``." +msgstr "" + +#: ../../reference/compound_stmts.rst:1187 +msgid "" +"In simple terms ``CLS(P1, attr=P2)`` matches only if the following happens:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1189 +msgid "``isinstance(, CLS)``" +msgstr "" + +#: ../../reference/compound_stmts.rst:1190 +msgid "convert ``P1`` to a keyword pattern using ``CLS.__match_args__``" +msgstr "" + +#: ../../reference/compound_stmts.rst:1191 +msgid "For each keyword argument ``attr=P2``:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1193 +msgid "``hasattr(, \"attr\")``" +msgstr "" + +#: ../../reference/compound_stmts.rst:1194 +msgid "``P2`` matches ``.attr``" +msgstr "" + +#: ../../reference/compound_stmts.rst:1196 +msgid "... and so on for the corresponding keyword argument/pattern pair." +msgstr "" + +#: ../../reference/compound_stmts.rst:1211 +msgid "Function definitions" +msgstr "" + +#: ../../reference/compound_stmts.rst:1226 +msgid "" +"A function definition defines a user-defined function object (see section :" +"ref:`types`):" +msgstr "" + +#: ../../reference/compound_stmts.rst:1248 +msgid "" +"A function definition is an executable statement. Its execution binds the " +"function name in the current local namespace to a function object (a wrapper " +"around the executable code for the function). This function object contains " +"a reference to the current global namespace as the global namespace to be " +"used when the function is called." +msgstr "" + +#: ../../reference/compound_stmts.rst:1254 +msgid "" +"The function definition does not execute the function body; this gets " +"executed only when the function is called. [#]_" +msgstr "" + +#: ../../reference/compound_stmts.rst:1260 +msgid "" +"A function definition may be wrapped by one or more :term:`decorator` " +"expressions. Decorator expressions are evaluated when the function is " +"defined, in the scope that contains the function definition. The result " +"must be a callable, which is invoked with the function object as the only " +"argument. The returned value is bound to the function name instead of the " +"function object. Multiple decorators are applied in nested fashion. For " +"example, the following code ::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1267 +msgid "" +"@f1(arg)\n" +"@f2\n" +"def func(): pass" +msgstr "" + +#: ../../reference/compound_stmts.rst:1271 +#: ../../reference/compound_stmts.rst:1463 +msgid "is roughly equivalent to ::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1273 +msgid "" +"def func(): pass\n" +"func = f1(arg)(f2(func))" +msgstr "" + +#: ../../reference/compound_stmts.rst:1276 +msgid "" +"except that the original function is not temporarily bound to the name " +"``func``." +msgstr "" + +#: ../../reference/compound_stmts.rst:1278 +msgid "" +"Functions may be decorated with any valid :token:`~python-grammar:" +"assignment_expression`. Previously, the grammar was much more restrictive; " +"see :pep:`614` for details." +msgstr "" + +#: ../../reference/compound_stmts.rst:1283 +msgid "" +"A list of :ref:`type parameters ` may be given in square " +"brackets between the function's name and the opening parenthesis for its " +"parameter list. This indicates to static type checkers that the function is " +"generic. At runtime, the type parameters can be retrieved from the " +"function's :attr:`~function.__type_params__` attribute. See :ref:`generic-" +"functions` for more." +msgstr "" + +#: ../../reference/compound_stmts.rst:1290 +#: ../../reference/compound_stmts.rst:1482 +msgid "Type parameter lists are new in Python 3.12." +msgstr "" + +#: ../../reference/compound_stmts.rst:1298 +msgid "" +"When one or more :term:`parameters ` have the form *parameter* " +"``=`` *expression*, the function is said to have \"default parameter values." +"\" For a parameter with a default value, the corresponding :term:`argument` " +"may be omitted from a call, in which case the parameter's default value is " +"substituted. If a parameter has a default value, all following parameters " +"up until the \"``*``\" must also have a default value --- this is a " +"syntactic restriction that is not expressed by the grammar." +msgstr "" + +#: ../../reference/compound_stmts.rst:1306 +msgid "" +"**Default parameter values are evaluated from left to right when the " +"function definition is executed.** This means that the expression is " +"evaluated once, when the function is defined, and that the same \"pre-" +"computed\" value is used for each call. This is especially important to " +"understand when a default parameter value is a mutable object, such as a " +"list or a dictionary: if the function modifies the object (e.g. by appending " +"an item to a list), the default parameter value is in effect modified. This " +"is generally not what was intended. A way around this is to use ``None`` as " +"the default, and explicitly test for it in the body of the function, for " +"example::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1316 +msgid "" +"def whats_on_the_telly(penguin=None):\n" +" if penguin is None:\n" +" penguin = []\n" +" penguin.append(\"property of the zoo\")\n" +" return penguin" +msgstr "" + +#: ../../reference/compound_stmts.rst:1327 +msgid "" +"Function call semantics are described in more detail in section :ref:" +"`calls`. A function call always assigns values to all parameters mentioned " +"in the parameter list, either from positional arguments, from keyword " +"arguments, or from default values. If the form \"``*identifier``\" is " +"present, it is initialized to a tuple receiving any excess positional " +"parameters, defaulting to the empty tuple. If the form \"``**identifier``\" " +"is present, it is initialized to a new ordered mapping receiving any excess " +"keyword arguments, defaulting to a new empty mapping of the same type. " +"Parameters after \"``*``\" or \"``*identifier``\" are keyword-only " +"parameters and may only be passed by keyword arguments. Parameters before " +"\"``/``\" are positional-only parameters and may only be passed by " +"positional arguments." +msgstr "" + +#: ../../reference/compound_stmts.rst:1339 +msgid "" +"The ``/`` function parameter syntax may be used to indicate positional-only " +"parameters. See :pep:`570` for details." +msgstr "" + +#: ../../reference/compound_stmts.rst:1348 +msgid "" +"Parameters may have an :term:`annotation ` of the form " +"\"``: expression``\" following the parameter name. Any parameter may have " +"an annotation, even those of the form ``*identifier`` or ``**identifier``. " +"(As a special case, parameters of the form ``*identifier`` may have an " +"annotation \"``: *expression``\".) Functions may have \"return\" annotation " +"of the form \"``-> expression``\" after the parameter list. These " +"annotations can be any valid Python expression. The presence of annotations " +"does not change the semantics of a function. See :ref:`annotations` for more " +"information on annotations." +msgstr "" + +#: ../../reference/compound_stmts.rst:1356 +msgid "" +"Parameters of the form \"``*identifier``\" may have an annotation \"``: " +"*expression``\". See :pep:`646`." +msgstr "" + +#: ../../reference/compound_stmts.rst:1362 +msgid "" +"It is also possible to create anonymous functions (functions not bound to a " +"name), for immediate use in expressions. This uses lambda expressions, " +"described in section :ref:`lambda`. Note that the lambda expression is " +"merely a shorthand for a simplified function definition; a function defined " +"in a \":keyword:`def`\" statement can be passed around or assigned to " +"another name just like a function defined by a lambda expression. The \":" +"keyword:`!def`\" form is actually more powerful since it allows the " +"execution of multiple statements and annotations." +msgstr "" + +#: ../../reference/compound_stmts.rst:1370 +msgid "" +"**Programmer's note:** Functions are first-class objects. A \"``def``\" " +"statement executed inside a function definition defines a local function " +"that can be returned or passed around. Free variables used in the nested " +"function can access the local variables of the function containing the def. " +"See section :ref:`naming` for details." +msgstr "" + +#: ../../reference/compound_stmts.rst:1378 +msgid ":pep:`3107` - Function Annotations" +msgstr "" + +#: ../../reference/compound_stmts.rst:1379 +msgid "The original specification for function annotations." +msgstr "" + +#: ../../reference/compound_stmts.rst:1381 +msgid ":pep:`484` - Type Hints" +msgstr "" + +#: ../../reference/compound_stmts.rst:1382 +msgid "Definition of a standard meaning for annotations: type hints." +msgstr "" + +#: ../../reference/compound_stmts.rst:1384 +msgid ":pep:`526` - Syntax for Variable Annotations" +msgstr "" + +#: ../../reference/compound_stmts.rst:1385 +msgid "" +"Ability to type hint variable declarations, including class variables and " +"instance variables." +msgstr "" + +#: ../../reference/compound_stmts.rst:1388 +msgid ":pep:`563` - Postponed Evaluation of Annotations" +msgstr "" + +#: ../../reference/compound_stmts.rst:1389 +msgid "" +"Support for forward references within annotations by preserving annotations " +"in a string form at runtime instead of eager evaluation." +msgstr "" + +#: ../../reference/compound_stmts.rst:1392 +msgid ":pep:`318` - Decorators for Functions and Methods" +msgstr "" + +#: ../../reference/compound_stmts.rst:1393 +msgid "" +"Function and method decorators were introduced. Class decorators were " +"introduced in :pep:`3129`." +msgstr "" + +#: ../../reference/compound_stmts.rst:1399 +msgid "Class definitions" +msgstr "" + +#: ../../reference/compound_stmts.rst:1414 +msgid "A class definition defines a class object (see section :ref:`types`):" +msgstr "" + +#: ../../reference/compound_stmts.rst:1421 +msgid "" +"A class definition is an executable statement. The inheritance list usually " +"gives a list of base classes (see :ref:`metaclasses` for more advanced " +"uses), so each item in the list should evaluate to a class object which " +"allows subclassing. Classes without an inheritance list inherit, by " +"default, from the base class :class:`object`; hence, ::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1427 +msgid "" +"class Foo:\n" +" pass" +msgstr "" + +#: ../../reference/compound_stmts.rst:1430 +msgid "is equivalent to ::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1432 +msgid "" +"class Foo(object):\n" +" pass" +msgstr "" + +#: ../../reference/compound_stmts.rst:1435 +msgid "" +"There may be one or more base classes; see :ref:`multiple-inheritance` below " +"for more information." +msgstr "" + +#: ../../reference/compound_stmts.rst:1438 +msgid "" +"The class's suite is then executed in a new execution frame (see :ref:" +"`naming`), using a newly created local namespace and the original global " +"namespace. (Usually, the suite contains mostly function definitions.) When " +"the class's suite finishes execution, its execution frame is discarded but " +"its local namespace is saved. [#]_ A class object is then created using the " +"inheritance list for the base classes and the saved local namespace for the " +"attribute dictionary. The class name is bound to this class object in the " +"original local namespace." +msgstr "" + +#: ../../reference/compound_stmts.rst:1447 +msgid "" +"The order in which attributes are defined in the class body is preserved in " +"the new class's :attr:`~type.__dict__`. Note that this is reliable only " +"right after the class is created and only for classes that were defined " +"using the definition syntax." +msgstr "" + +#: ../../reference/compound_stmts.rst:1452 +msgid "" +"Class creation can be customized heavily using :ref:`metaclasses " +"`." +msgstr "" + +#: ../../reference/compound_stmts.rst:1457 +msgid "Classes can also be decorated: just like when decorating functions, ::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1459 +msgid "" +"@f1(arg)\n" +"@f2\n" +"class Foo: pass" +msgstr "" + +#: ../../reference/compound_stmts.rst:1465 +msgid "" +"class Foo: pass\n" +"Foo = f1(arg)(f2(Foo))" +msgstr "" + +#: ../../reference/compound_stmts.rst:1468 +msgid "" +"The evaluation rules for the decorator expressions are the same as for " +"function decorators. The result is then bound to the class name." +msgstr "" + +#: ../../reference/compound_stmts.rst:1471 +msgid "" +"Classes may be decorated with any valid :token:`~python-grammar:" +"assignment_expression`. Previously, the grammar was much more restrictive; " +"see :pep:`614` for details." +msgstr "" + +#: ../../reference/compound_stmts.rst:1476 +msgid "" +"A list of :ref:`type parameters ` may be given in square " +"brackets immediately after the class's name. This indicates to static type " +"checkers that the class is generic. At runtime, the type parameters can be " +"retrieved from the class's :attr:`~type.__type_params__` attribute. See :ref:" +"`generic-classes` for more." +msgstr "" + +#: ../../reference/compound_stmts.rst:1485 +msgid "" +"**Programmer's note:** Variables defined in the class definition are class " +"attributes; they are shared by instances. Instance attributes can be set in " +"a method with ``self.name = value``. Both class and instance attributes are " +"accessible through the notation \"``self.name``\", and an instance attribute " +"hides a class attribute with the same name when accessed in this way. Class " +"attributes can be used as defaults for instance attributes, but using " +"mutable values there can lead to unexpected results. :ref:`Descriptors " +"` can be used to create instance variables with different " +"implementation details." +msgstr "" + +#: ../../reference/compound_stmts.rst:1497 +msgid ":pep:`3115` - Metaclasses in Python 3000" +msgstr "" + +#: ../../reference/compound_stmts.rst:1498 +msgid "" +"The proposal that changed the declaration of metaclasses to the current " +"syntax, and the semantics for how classes with metaclasses are constructed." +msgstr "" + +#: ../../reference/compound_stmts.rst:1502 +msgid ":pep:`3129` - Class Decorators" +msgstr "" + +#: ../../reference/compound_stmts.rst:1503 +msgid "" +"The proposal that added class decorators. Function and method decorators " +"were introduced in :pep:`318`." +msgstr "" + +#: ../../reference/compound_stmts.rst:1510 +msgid "Multiple inheritance" +msgstr "" + +#: ../../reference/compound_stmts.rst:1512 +msgid "" +"Python classes may have multiple base classes, a technique known as " +"*multiple inheritance*. The base classes are specified in the class " +"definition by listing them in parentheses after the class name, separated by " +"commas. For example, the following class definition:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1517 +msgid "" +">>> class A: pass\n" +">>> class B: pass\n" +">>> class C(A, B): pass" +msgstr "" + +#: ../../reference/compound_stmts.rst:1523 +msgid "defines a class ``C`` that inherits from classes ``A`` and ``B``." +msgstr "" + +#: ../../reference/compound_stmts.rst:1525 +msgid "" +"The :term:`method resolution order` (MRO) is the order in which base classes " +"are searched when looking up an attribute on a class. See :ref:" +"`python_2.3_mro` for a description of how Python determines the MRO for a " +"class." +msgstr "" + +#: ../../reference/compound_stmts.rst:1529 +msgid "" +"Multiple inheritance is not always allowed. Attempting to define a class " +"with multiple inheritance will raise an error if one of the bases does not " +"allow subclassing, if a consistent MRO cannot be created, if no valid " +"metaclass can be determined, or if there is an instance layout conflict. " +"We'll discuss each of these in turn." +msgstr "" + +#: ../../reference/compound_stmts.rst:1534 +msgid "" +"First, all base classes must allow subclassing. While most classes allow " +"subclassing, some built-in classes do not, such as :class:`bool`:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1537 +msgid "" +">>> class SubBool(bool): # TypeError\n" +"... pass\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: type 'bool' is not an acceptable base type" +msgstr "" + +#: ../../reference/compound_stmts.rst:1545 +msgid "" +"In the resolved MRO of a class, the class's bases appear in the order they " +"were specified in the class's bases list. Additionally, the MRO always lists " +"a child class before any of its bases. A class definition will fail if it is " +"impossible to resolve a consistent MRO that satisfies these rules from the " +"list of bases provided:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1550 +msgid "" +">>> class Base: pass\n" +">>> class Child(Base): pass\n" +">>> class Grandchild(Base, Child): pass # TypeError\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: Cannot create a consistent method resolution order (MRO) for " +"bases Base, Child" +msgstr "" + +#: ../../reference/compound_stmts.rst:1559 +msgid "" +"In the MRO of ``Grandchild``, ``Base`` must appear before ``Child`` because " +"it is first in the base class list, but it must also appear after ``Child`` " +"because it is a parent of ``Child``. This is a contradiction, so the class " +"cannot be defined." +msgstr "" + +#: ../../reference/compound_stmts.rst:1563 +msgid "" +"If some of the bases have a custom :term:`metaclass`, the metaclass of the " +"resulting class is chosen among the metaclasses of the bases and the " +"explicitly specified metaclass of the child class. It must be a metaclass " +"that is a subclass of all other candidate metaclasses. If no such metaclass " +"exists among the candidates, the class cannot be created, as explained in :" +"ref:`metaclass-determination`." +msgstr "" + +#: ../../reference/compound_stmts.rst:1569 +msgid "" +"Finally, the instance layouts of the bases must be compatible. This means " +"that it must be possible to compute a *solid base* for the class. Exactly " +"which classes are solid bases depends on the Python implementation." +msgstr "" + +#: ../../reference/compound_stmts.rst:1575 +msgid "" +"In CPython, a class is a solid base if it has a nonempty :attr:`~object." +"__slots__` definition. Many but not all classes defined in C are also solid " +"bases, including most builtins (such as :class:`int` or :class:" +"`BaseException`) but excluding most concrete :class:`Exception` classes. " +"Generally, a C class is a solid base if its underlying struct is different " +"in size from its base class." +msgstr "" + +#: ../../reference/compound_stmts.rst:1582 +msgid "" +"Every class has a solid base. :class:`object`, the base class, has itself as " +"its solid base. If there is a single base, the child class's solid base is " +"that class if it is a solid base, or else the base class's solid base. If " +"there are multiple bases, we first find the solid base for each base class " +"to produce a list of candidate solid bases. If there is a unique solid base " +"that is a subclass of all others, then that class is the solid base. " +"Otherwise, class creation fails." +msgstr "" + +#: ../../reference/compound_stmts.rst:1589 +msgid "Example:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1591 +msgid "" +">>> class Solid1:\n" +"... __slots__ = (\"solid1\",)\n" +">>>\n" +">>> class Solid2:\n" +"... __slots__ = (\"solid2\",)\n" +">>>\n" +">>> class SolidChild(Solid1):\n" +"... __slots__ = (\"solid_child\",)\n" +">>>\n" +">>> class C1: # solid base is `object`\n" +"... pass\n" +">>>\n" +">>> # OK: solid bases are `Solid1` and `object`, and `Solid1` is a subclass " +"of `object`.\n" +">>> class C2(Solid1, C1): # solid base is `Solid1`\n" +"... pass\n" +">>>\n" +">>> # OK: solid bases are `SolidChild` and `Solid1`, and `SolidChild` is a " +"subclass of `Solid1`.\n" +">>> class C3(SolidChild, Solid1): # solid base is `SolidChild`\n" +"... pass\n" +">>>\n" +">>> # Error: solid bases are `Solid1` and `Solid2`, but neither is a " +"subclass of the other.\n" +">>> class C4(Solid1, Solid2): # error: no single solid base\n" +"... pass\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: multiple bases have instance lay-out conflict" +msgstr "" + +#: ../../reference/compound_stmts.rst:1623 +msgid "Coroutines" +msgstr "" + +#: ../../reference/compound_stmts.rst:1631 +msgid "Coroutine function definition" +msgstr "" + +#: ../../reference/compound_stmts.rst:1641 +msgid "" +"Execution of Python coroutines can be suspended and resumed at many points " +"(see :term:`coroutine`). :keyword:`await` expressions, :keyword:`async for` " +"and :keyword:`async with` can only be used in the body of a coroutine " +"function." +msgstr "" + +#: ../../reference/compound_stmts.rst:1645 +msgid "" +"Functions defined with ``async def`` syntax are always coroutine functions, " +"even if they do not contain ``await`` or ``async`` keywords." +msgstr "" + +#: ../../reference/compound_stmts.rst:1648 +msgid "" +"It is a :exc:`SyntaxError` to use a ``yield from`` expression inside the " +"body of a coroutine function." +msgstr "" + +#: ../../reference/compound_stmts.rst:1651 +msgid "An example of a coroutine function::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1653 +msgid "" +"async def func(param1, param2):\n" +" do_stuff()\n" +" await some_coroutine()" +msgstr "" + +#: ../../reference/compound_stmts.rst:1657 +msgid "" +"``await`` and ``async`` are now keywords; previously they were only treated " +"as such inside the body of a coroutine function." +msgstr "" + +#: ../../reference/compound_stmts.rst:1665 +msgid "The :keyword:`!async for` statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:1670 +msgid "" +"An :term:`asynchronous iterable` provides an ``__aiter__`` method that " +"directly returns an :term:`asynchronous iterator`, which can call " +"asynchronous code in its ``__anext__`` method." +msgstr "" + +#: ../../reference/compound_stmts.rst:1674 +msgid "" +"The ``async for`` statement allows convenient iteration over asynchronous " +"iterables." +msgstr "" + +#: ../../reference/compound_stmts.rst:1679 +msgid "" +"async for TARGET in ITER:\n" +" SUITE\n" +"else:\n" +" SUITE2" +msgstr "" + +#: ../../reference/compound_stmts.rst:1684 +msgid "Is semantically equivalent to::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1686 +msgid "" +"iter = (ITER).__aiter__()\n" +"running = True\n" +"\n" +"while running:\n" +" try:\n" +" TARGET = await iter.__anext__()\n" +" except StopAsyncIteration:\n" +" running = False\n" +" else:\n" +" SUITE\n" +"else:\n" +" SUITE2" +msgstr "" + +#: ../../reference/compound_stmts.rst:1699 +msgid "" +"except that implicit :ref:`special method lookup ` is used " +"for :meth:`~object.__aiter__` and :meth:`~object.__anext__`." +msgstr "" + +#: ../../reference/compound_stmts.rst:1702 +msgid "" +"It is a :exc:`SyntaxError` to use an ``async for`` statement outside the " +"body of a coroutine function." +msgstr "" + +#: ../../reference/compound_stmts.rst:1710 +msgid "The :keyword:`!async with` statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:1715 +msgid "" +"An :term:`asynchronous context manager` is a :term:`context manager` that is " +"able to suspend execution in its *enter* and *exit* methods." +msgstr "" + +#: ../../reference/compound_stmts.rst:1720 +msgid "" +"async with EXPRESSION as TARGET:\n" +" SUITE" +msgstr "" + +#: ../../reference/compound_stmts.rst:1725 +msgid "" +"manager = (EXPRESSION)\n" +"aenter = manager.__aenter__\n" +"aexit = manager.__aexit__\n" +"value = await aenter()\n" +"hit_except = False\n" +"\n" +"try:\n" +" TARGET = value\n" +" SUITE\n" +"except:\n" +" hit_except = True\n" +" if not await aexit(*sys.exc_info()):\n" +" raise\n" +"finally:\n" +" if not hit_except:\n" +" await aexit(None, None, None)" +msgstr "" + +#: ../../reference/compound_stmts.rst:1742 +msgid "" +"except that implicit :ref:`special method lookup ` is used " +"for :meth:`~object.__aenter__` and :meth:`~object.__aexit__`." +msgstr "" + +#: ../../reference/compound_stmts.rst:1745 +msgid "" +"It is a :exc:`SyntaxError` to use an ``async with`` statement outside the " +"body of a coroutine function." +msgstr "" + +#: ../../reference/compound_stmts.rst:1750 +msgid ":pep:`492` - Coroutines with async and await syntax" +msgstr "" + +#: ../../reference/compound_stmts.rst:1751 +msgid "" +"The proposal that made coroutines a proper standalone concept in Python, and " +"added supporting syntax." +msgstr "" + +#: ../../reference/compound_stmts.rst:1757 +msgid "Type parameter lists" +msgstr "" + +#: ../../reference/compound_stmts.rst:1761 +msgid "Support for default values was added (see :pep:`696`)." +msgstr "" + +#: ../../reference/compound_stmts.rst:1774 +msgid "" +":ref:`Functions ` (including :ref:`coroutines `), :ref:" +"`classes ` and :ref:`type aliases ` may contain a type " +"parameter list::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1778 +msgid "" +"def max[T](args: list[T]) -> T:\n" +" ...\n" +"\n" +"async def amax[T](args: list[T]) -> T:\n" +" ...\n" +"\n" +"class Bag[T]:\n" +" def __iter__(self) -> Iterator[T]:\n" +" ...\n" +"\n" +" def add(self, arg: T) -> None:\n" +" ...\n" +"\n" +"type ListOrSet[T] = list[T] | set[T]" +msgstr "" + +#: ../../reference/compound_stmts.rst:1793 +msgid "" +"Semantically, this indicates that the function, class, or type alias is " +"generic over a type variable. This information is primarily used by static " +"type checkers, and at runtime, generic objects behave much like their non-" +"generic counterparts." +msgstr "" + +#: ../../reference/compound_stmts.rst:1798 +msgid "" +"Type parameters are declared in square brackets (``[]``) immediately after " +"the name of the function, class, or type alias. The type parameters are " +"accessible within the scope of the generic object, but not elsewhere. Thus, " +"after a declaration ``def func[T](): pass``, the name ``T`` is not available " +"in the module scope. Below, the semantics of generic objects are described " +"with more precision. The scope of type parameters is modeled with a special " +"function (technically, an :ref:`annotation scope `) that " +"wraps the creation of the generic object." +msgstr "" + +#: ../../reference/compound_stmts.rst:1807 +msgid "" +"Generic functions, classes, and type aliases have a :attr:`~definition." +"__type_params__` attribute listing their type parameters." +msgstr "" + +#: ../../reference/compound_stmts.rst:1810 +msgid "Type parameters come in three kinds:" +msgstr "" + +#: ../../reference/compound_stmts.rst:1812 +msgid "" +":data:`typing.TypeVar`, introduced by a plain name (e.g., ``T``). " +"Semantically, this represents a single type to a type checker." +msgstr "" + +#: ../../reference/compound_stmts.rst:1814 +msgid "" +":data:`typing.TypeVarTuple`, introduced by a name prefixed with a single " +"asterisk (e.g., ``*Ts``). Semantically, this stands for a tuple of any " +"number of types." +msgstr "" + +#: ../../reference/compound_stmts.rst:1817 +msgid "" +":data:`typing.ParamSpec`, introduced by a name prefixed with two asterisks " +"(e.g., ``**P``). Semantically, this stands for the parameters of a callable." +msgstr "" + +#: ../../reference/compound_stmts.rst:1820 +msgid "" +":data:`typing.TypeVar` declarations can define *bounds* and *constraints* " +"with a colon (``:``) followed by an expression. A single expression after " +"the colon indicates a bound (e.g. ``T: int``). Semantically, this means that " +"the :data:`!typing.TypeVar` can only represent types that are a subtype of " +"this bound. A parenthesized tuple of expressions after the colon indicates a " +"set of constraints (e.g. ``T: (str, bytes)``). Each member of the tuple " +"should be a type (again, this is not enforced at runtime). Constrained type " +"variables can only take on one of the types in the list of constraints." +msgstr "" + +#: ../../reference/compound_stmts.rst:1829 +msgid "" +"For :data:`!typing.TypeVar`\\ s declared using the type parameter list " +"syntax, the bound and constraints are not evaluated when the generic object " +"is created, but only when the value is explicitly accessed through the " +"attributes ``__bound__`` and ``__constraints__``. To accomplish this, the " +"bounds or constraints are evaluated in a separate :ref:`annotation scope " +"`." +msgstr "" + +#: ../../reference/compound_stmts.rst:1835 +msgid "" +":data:`typing.TypeVarTuple`\\ s and :data:`typing.ParamSpec`\\ s cannot have " +"bounds or constraints." +msgstr "" + +#: ../../reference/compound_stmts.rst:1838 +msgid "" +"All three flavors of type parameters can also have a *default value*, which " +"is used when the type parameter is not explicitly provided. This is added by " +"appending a single equals sign (``=``) followed by an expression. Like the " +"bounds and constraints of type variables, the default value is not evaluated " +"when the object is created, but only when the type parameter's " +"``__default__`` attribute is accessed. To this end, the default value is " +"evaluated in a separate :ref:`annotation scope `. If no " +"default value is specified for a type parameter, the ``__default__`` " +"attribute is set to the special sentinel object :data:`typing.NoDefault`." +msgstr "" + +#: ../../reference/compound_stmts.rst:1848 +msgid "" +"The following example indicates the full set of allowed type parameter " +"declarations::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1850 +msgid "" +"def overly_generic[\n" +" SimpleTypeVar,\n" +" TypeVarWithDefault = int,\n" +" TypeVarWithBound: int,\n" +" TypeVarWithConstraints: (str, bytes),\n" +" *SimpleTypeVarTuple = (int, float),\n" +" **SimpleParamSpec = (str, bytearray),\n" +"](\n" +" a: SimpleTypeVar,\n" +" b: TypeVarWithDefault,\n" +" c: TypeVarWithBound,\n" +" d: Callable[SimpleParamSpec, TypeVarWithConstraints],\n" +" *e: SimpleTypeVarTuple,\n" +"): ..." +msgstr "" + +#: ../../reference/compound_stmts.rst:1868 +msgid "Generic functions" +msgstr "" + +#: ../../reference/compound_stmts.rst:1870 +msgid "Generic functions are declared as follows::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1872 +msgid "def func[T](arg: T): ..." +msgstr "" + +#: ../../reference/compound_stmts.rst:1874 +#: ../../reference/compound_stmts.rst:1934 +msgid "This syntax is equivalent to::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1876 +msgid "" +"annotation-def TYPE_PARAMS_OF_func():\n" +" T = typing.TypeVar(\"T\")\n" +" def func(arg: T): ...\n" +" func.__type_params__ = (T,)\n" +" return func\n" +"func = TYPE_PARAMS_OF_func()" +msgstr "" + +#: ../../reference/compound_stmts.rst:1883 +msgid "" +"Here ``annotation-def`` indicates an :ref:`annotation scope `, which is not actually bound to any name at runtime. (One other " +"liberty is taken in the translation: the syntax does not go through " +"attribute access on the :mod:`typing` module, but creates an instance of :" +"data:`typing.TypeVar` directly.)" +msgstr "" + +#: ../../reference/compound_stmts.rst:1889 +msgid "" +"The annotations of generic functions are evaluated within the annotation " +"scope used for declaring the type parameters, but the function's defaults " +"and decorators are not." +msgstr "" + +#: ../../reference/compound_stmts.rst:1893 +msgid "" +"The following example illustrates the scoping rules for these cases, as well " +"as for additional flavors of type parameters::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1896 +msgid "" +"@decorator\n" +"def func[T: int, *Ts, **P](*args: *Ts, arg: Callable[P, T] = some_default):\n" +" ..." +msgstr "" + +#: ../../reference/compound_stmts.rst:1900 +msgid "" +"Except for the :ref:`lazy evaluation ` of the :class:" +"`~typing.TypeVar` bound, this is equivalent to::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1903 +msgid "" +"DEFAULT_OF_arg = some_default\n" +"\n" +"annotation-def TYPE_PARAMS_OF_func():\n" +"\n" +" annotation-def BOUND_OF_T():\n" +" return int\n" +" # In reality, BOUND_OF_T() is evaluated only on demand.\n" +" T = typing.TypeVar(\"T\", bound=BOUND_OF_T())\n" +"\n" +" Ts = typing.TypeVarTuple(\"Ts\")\n" +" P = typing.ParamSpec(\"P\")\n" +"\n" +" def func(*args: *Ts, arg: Callable[P, T] = DEFAULT_OF_arg):\n" +" ...\n" +"\n" +" func.__type_params__ = (T, Ts, P)\n" +" return func\n" +"func = decorator(TYPE_PARAMS_OF_func())" +msgstr "" + +#: ../../reference/compound_stmts.rst:1922 +msgid "" +"The capitalized names like ``DEFAULT_OF_arg`` are not actually bound at " +"runtime." +msgstr "" + +#: ../../reference/compound_stmts.rst:1928 +msgid "Generic classes" +msgstr "" + +#: ../../reference/compound_stmts.rst:1930 +msgid "Generic classes are declared as follows::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1932 +msgid "class Bag[T]: ..." +msgstr "" + +#: ../../reference/compound_stmts.rst:1936 +msgid "" +"annotation-def TYPE_PARAMS_OF_Bag():\n" +" T = typing.TypeVar(\"T\")\n" +" class Bag(typing.Generic[T]):\n" +" __type_params__ = (T,)\n" +" ...\n" +" return Bag\n" +"Bag = TYPE_PARAMS_OF_Bag()" +msgstr "" + +#: ../../reference/compound_stmts.rst:1944 +msgid "" +"Here again ``annotation-def`` (not a real keyword) indicates an :ref:" +"`annotation scope `, and the name ``TYPE_PARAMS_OF_Bag`` " +"is not actually bound at runtime." +msgstr "" + +#: ../../reference/compound_stmts.rst:1948 +msgid "" +"Generic classes implicitly inherit from :data:`typing.Generic`. The base " +"classes and keyword arguments of generic classes are evaluated within the " +"type scope for the type parameters, and decorators are evaluated outside " +"that scope. This is illustrated by this example::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1954 +msgid "" +"@decorator\n" +"class Bag(Base[T], arg=T): ..." +msgstr "" + +#: ../../reference/compound_stmts.rst:1957 +msgid "This is equivalent to::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1959 +msgid "" +"annotation-def TYPE_PARAMS_OF_Bag():\n" +" T = typing.TypeVar(\"T\")\n" +" class Bag(Base[T], typing.Generic[T], arg=T):\n" +" __type_params__ = (T,)\n" +" ...\n" +" return Bag\n" +"Bag = decorator(TYPE_PARAMS_OF_Bag())" +msgstr "" + +#: ../../reference/compound_stmts.rst:1970 +msgid "Generic type aliases" +msgstr "" + +#: ../../reference/compound_stmts.rst:1972 +msgid "" +"The :keyword:`type` statement can also be used to create a generic type " +"alias::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1974 +msgid "type ListOrSet[T] = list[T] | set[T]" +msgstr "" + +#: ../../reference/compound_stmts.rst:1976 +msgid "" +"Except for the :ref:`lazy evaluation ` of the value, this " +"is equivalent to::" +msgstr "" + +#: ../../reference/compound_stmts.rst:1979 +msgid "" +"annotation-def TYPE_PARAMS_OF_ListOrSet():\n" +" T = typing.TypeVar(\"T\")\n" +"\n" +" annotation-def VALUE_OF_ListOrSet():\n" +" return list[T] | set[T]\n" +" # In reality, the value is lazily evaluated\n" +" return typing.TypeAliasType(\"ListOrSet\", VALUE_OF_ListOrSet(), " +"type_params=(T,))\n" +"ListOrSet = TYPE_PARAMS_OF_ListOrSet()" +msgstr "" + +#: ../../reference/compound_stmts.rst:1988 +msgid "" +"Here, ``annotation-def`` (not a real keyword) indicates an :ref:`annotation " +"scope `. The capitalized names like " +"``TYPE_PARAMS_OF_ListOrSet`` are not actually bound at runtime." +msgstr "" + +#: ../../reference/compound_stmts.rst:1995 +msgid "Annotations" +msgstr "" + +#: ../../reference/compound_stmts.rst:1997 +msgid "Annotations are now lazily evaluated by default." +msgstr "" + +#: ../../reference/compound_stmts.rst:2000 +msgid "" +"Variables and function parameters may carry :term:`annotations " +"`, created by adding a colon after the name, followed by an " +"expression::" +msgstr "" + +#: ../../reference/compound_stmts.rst:2003 +msgid "" +"x: annotation = 1\n" +"def f(param: annotation): ..." +msgstr "" + +#: ../../reference/compound_stmts.rst:2006 +msgid "Functions may also carry a return annotation following an arrow::" +msgstr "" + +#: ../../reference/compound_stmts.rst:2008 +msgid "def f() -> annotation: ..." +msgstr "" + +#: ../../reference/compound_stmts.rst:2010 +msgid "" +"Annotations are conventionally used for :term:`type hints `, but " +"this is not enforced by the language, and in general annotations may contain " +"arbitrary expressions. The presence of annotations does not change the " +"runtime semantics of the code, except if some mechanism is used that " +"introspects and uses the annotations (such as :mod:`dataclasses` or :deco:" +"`functools.singledispatch`)." +msgstr "" + +#: ../../reference/compound_stmts.rst:2016 +msgid "" +"By default, annotations are lazily evaluated in an :ref:`annotation scope " +"`. This means that they are not evaluated when the code " +"containing the annotation is evaluated. Instead, the interpreter saves " +"information that can be used to evaluate the annotation later if requested. " +"The :mod:`annotationlib` module provides tools for evaluating annotations." +msgstr "" + +#: ../../reference/compound_stmts.rst:2021 +msgid "" +"If the :ref:`future statement ` ``from __future__ import " +"annotations`` is present, all annotations are instead stored as strings::" +msgstr "" + +#: ../../reference/compound_stmts.rst:2024 +msgid "" +">>> from __future__ import annotations\n" +">>> def f(param: annotation): ...\n" +">>> f.__annotations__\n" +"{'param': 'annotation'}" +msgstr "" + +#: ../../reference/compound_stmts.rst:2029 +msgid "" +"This future statement will be deprecated and removed in a future version of " +"Python, but not before Python 3.13 reaches its end of life (see :pep:`749`). " +"When it is used, introspection tools like :func:`annotationlib." +"get_annotations` and :func:`typing.get_type_hints` are less likely to be " +"able to resolve annotations at runtime." +msgstr "" + +#: ../../reference/compound_stmts.rst:2037 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../reference/compound_stmts.rst:2038 +msgid "" +"The exception is propagated to the invocation stack unless there is a :" +"keyword:`finally` clause which happens to raise another exception. That new " +"exception causes the old one to be lost." +msgstr "" + +#: ../../reference/compound_stmts.rst:2042 +msgid "In pattern matching, a sequence is defined as one of the following:" +msgstr "" + +#: ../../reference/compound_stmts.rst:2044 +msgid "a class that inherits from :class:`collections.abc.Sequence`" +msgstr "" + +#: ../../reference/compound_stmts.rst:2045 +msgid "" +"a Python class that has been registered as :class:`collections.abc.Sequence`" +msgstr "" + +#: ../../reference/compound_stmts.rst:2046 +msgid "" +"a builtin class that has its (CPython) :c:macro:`Py_TPFLAGS_SEQUENCE` bit set" +msgstr "" + +#: ../../reference/compound_stmts.rst:2047 +#: ../../reference/compound_stmts.rst:2066 +msgid "a class that inherits from any of the above" +msgstr "" + +#: ../../reference/compound_stmts.rst:2049 +msgid "The following standard library classes are sequences:" +msgstr "" + +#: ../../reference/compound_stmts.rst:2051 +msgid ":class:`array.array`" +msgstr "" + +#: ../../reference/compound_stmts.rst:2052 +msgid ":class:`collections.deque`" +msgstr "" + +#: ../../reference/compound_stmts.rst:2054 +msgid ":class:`memoryview`" +msgstr "" + +#: ../../reference/compound_stmts.rst:2055 +msgid ":class:`range`" +msgstr "" + +#: ../../reference/compound_stmts.rst:2058 +msgid "" +"Subject values of type ``str``, ``bytes``, and ``bytearray`` do not match " +"sequence patterns." +msgstr "" + +#: ../../reference/compound_stmts.rst:2061 +msgid "In pattern matching, a mapping is defined as one of the following:" +msgstr "" + +#: ../../reference/compound_stmts.rst:2063 +msgid "a class that inherits from :class:`collections.abc.Mapping`" +msgstr "" + +#: ../../reference/compound_stmts.rst:2064 +msgid "" +"a Python class that has been registered as :class:`collections.abc.Mapping`" +msgstr "" + +#: ../../reference/compound_stmts.rst:2065 +msgid "" +"a builtin class that has its (CPython) :c:macro:`Py_TPFLAGS_MAPPING` bit set" +msgstr "" + +#: ../../reference/compound_stmts.rst:2068 +msgid "" +"The standard library classes :class:`dict` and :class:`types." +"MappingProxyType` are mappings." +msgstr "" + +#: ../../reference/compound_stmts.rst:2071 +msgid "" +"A string literal appearing as the first statement in the function body is " +"transformed into the function's :attr:`~function.__doc__` attribute and " +"therefore the function's :term:`docstring`." +msgstr "" + +#: ../../reference/compound_stmts.rst:2075 +msgid "" +"A string literal appearing as the first statement in the class body is " +"transformed into the namespace's :attr:`~type.__doc__` item and therefore " +"the class's :term:`docstring`." +msgstr "" + +#: ../../reference/compound_stmts.rst:7 +msgid "compound" +msgstr "" + +#: ../../reference/compound_stmts.rst:7 ../../reference/compound_stmts.rst:86 +#: ../../reference/compound_stmts.rst:111 +#: ../../reference/compound_stmts.rst:129 +#: ../../reference/compound_stmts.rst:144 +#: ../../reference/compound_stmts.rst:169 +#: ../../reference/compound_stmts.rst:207 +#: ../../reference/compound_stmts.rst:397 +#: ../../reference/compound_stmts.rst:446 +#: ../../reference/compound_stmts.rst:484 +#: ../../reference/compound_stmts.rst:605 +#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1401 +#: ../../reference/compound_stmts.rst:1627 +#: ../../reference/compound_stmts.rst:1661 +#: ../../reference/compound_stmts.rst:1706 +msgid "statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:21 +msgid "clause" +msgstr "" + +#: ../../reference/compound_stmts.rst:21 +msgid "suite" +msgstr "" + +#: ../../reference/compound_stmts.rst:21 +msgid "; (semicolon)" +msgstr "" + +#: ../../reference/compound_stmts.rst:64 +msgid "NEWLINE token" +msgstr "" + +#: ../../reference/compound_stmts.rst:64 +msgid "DEDENT token" +msgstr "" + +#: ../../reference/compound_stmts.rst:64 +msgid "dangling" +msgstr "" + +#: ../../reference/compound_stmts.rst:64 ../../reference/compound_stmts.rst:86 +#: ../../reference/compound_stmts.rst:111 +#: ../../reference/compound_stmts.rst:144 +#: ../../reference/compound_stmts.rst:207 +#: ../../reference/compound_stmts.rst:397 +msgid "else" +msgstr "" + +#: ../../reference/compound_stmts.rst:86 ../../reference/compound_stmts.rst:605 +msgid "if" +msgstr "" + +#: ../../reference/compound_stmts.rst:86 ../../reference/compound_stmts.rst:111 +#: ../../reference/compound_stmts.rst:144 +#: ../../reference/compound_stmts.rst:207 +#: ../../reference/compound_stmts.rst:330 +#: ../../reference/compound_stmts.rst:397 +#: ../../reference/compound_stmts.rst:415 +#: ../../reference/compound_stmts.rst:484 +#: ../../reference/compound_stmts.rst:605 +#: ../../reference/compound_stmts.rst:1637 +msgid "keyword" +msgstr "" + +#: ../../reference/compound_stmts.rst:86 +msgid "elif" +msgstr "" + +#: ../../reference/compound_stmts.rst:86 ../../reference/compound_stmts.rst:111 +#: ../../reference/compound_stmts.rst:144 +#: ../../reference/compound_stmts.rst:207 +#: ../../reference/compound_stmts.rst:484 +#: ../../reference/compound_stmts.rst:605 +#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1343 +#: ../../reference/compound_stmts.rst:1401 +msgid ": (colon)" +msgstr "" + +#: ../../reference/compound_stmts.rst:86 ../../reference/compound_stmts.rst:111 +#: ../../reference/compound_stmts.rst:144 +#: ../../reference/compound_stmts.rst:207 +#: ../../reference/compound_stmts.rst:484 +#: ../../reference/compound_stmts.rst:605 +#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1401 +msgid "compound statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:111 +msgid "while" +msgstr "" + +#: ../../reference/compound_stmts.rst:111 +#: ../../reference/compound_stmts.rst:144 +msgid "loop" +msgstr "" + +#: ../../reference/compound_stmts.rst:129 +#: ../../reference/compound_stmts.rst:169 +#: ../../reference/compound_stmts.rst:397 +#: ../../reference/compound_stmts.rst:446 +msgid "break" +msgstr "" + +#: ../../reference/compound_stmts.rst:129 +#: ../../reference/compound_stmts.rst:169 +#: ../../reference/compound_stmts.rst:397 +#: ../../reference/compound_stmts.rst:446 +msgid "continue" +msgstr "" + +#: ../../reference/compound_stmts.rst:144 +msgid "for" +msgstr "" + +#: ../../reference/compound_stmts.rst:144 +msgid "in" +msgstr "" + +#: ../../reference/compound_stmts.rst:144 +msgid "target" +msgstr "" + +#: ../../reference/compound_stmts.rst:144 +msgid "list" +msgstr "" + +#: ../../reference/compound_stmts.rst:144 +#: ../../reference/compound_stmts.rst:301 +#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1401 +msgid "object" +msgstr "" + +#: ../../reference/compound_stmts.rst:144 +msgid "sequence" +msgstr "" + +#: ../../reference/compound_stmts.rst:190 +msgid "built-in function" +msgstr "" + +#: ../../reference/compound_stmts.rst:190 +msgid "range" +msgstr "" + +#: ../../reference/compound_stmts.rst:207 +msgid "try" +msgstr "" + +#: ../../reference/compound_stmts.rst:207 +msgid "except" +msgstr "" + +#: ../../reference/compound_stmts.rst:207 +#: ../../reference/compound_stmts.rst:415 +msgid "finally" +msgstr "" + +#: ../../reference/compound_stmts.rst:207 +#: ../../reference/compound_stmts.rst:268 +#: ../../reference/compound_stmts.rst:484 +#: ../../reference/compound_stmts.rst:605 +msgid "as" +msgstr "" + +#: ../../reference/compound_stmts.rst:268 +msgid "except clause" +msgstr "" + +#: ../../reference/compound_stmts.rst:301 +msgid "module" +msgstr "" + +#: ../../reference/compound_stmts.rst:301 +msgid "sys" +msgstr "sys" + +#: ../../reference/compound_stmts.rst:301 +msgid "traceback" +msgstr "" + +#: ../../reference/compound_stmts.rst:330 +msgid "except_star" +msgstr "" + +#: ../../reference/compound_stmts.rst:397 +#: ../../reference/compound_stmts.rst:446 +msgid "return" +msgstr "" + +#: ../../reference/compound_stmts.rst:484 +msgid "with" +msgstr "" + +#: ../../reference/compound_stmts.rst:484 +msgid "with statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:484 +#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1401 +msgid ", (comma)" +msgstr "" + +#: ../../reference/compound_stmts.rst:605 +msgid "match" +msgstr "" + +#: ../../reference/compound_stmts.rst:605 +msgid "case" +msgstr "" + +#: ../../reference/compound_stmts.rst:605 +msgid "pattern matching" +msgstr "" + +#: ../../reference/compound_stmts.rst:605 +msgid "match statement" +msgstr "" + +#: ../../reference/compound_stmts.rst:709 +msgid "guard" +msgstr "" + +#: ../../reference/compound_stmts.rst:748 +msgid "irrefutable case block" +msgstr "" + +#: ../../reference/compound_stmts.rst:748 +msgid "case block" +msgstr "" + +#: ../../reference/compound_stmts.rst:772 +msgid "! patterns" +msgstr "" + +#: ../../reference/compound_stmts.rst:772 +msgid "AS pattern, OR pattern, capture pattern, wildcard pattern" +msgstr "" + +#: ../../reference/compound_stmts.rst:1204 +#: ../../reference/compound_stmts.rst:1293 +msgid "parameter" +msgstr "" + +#: ../../reference/compound_stmts.rst:1204 +#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1257 +#: ../../reference/compound_stmts.rst:1293 +#: ../../reference/compound_stmts.rst:1322 +msgid "function definition" +msgstr "" + +#: ../../reference/compound_stmts.rst:1213 +msgid "def" +msgstr "" + +#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1343 +msgid "function" +msgstr "" + +#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1401 +msgid "definition" +msgstr "" + +#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1401 +msgid "name" +msgstr "" + +#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1401 +msgid "binding" +msgstr "" + +#: ../../reference/compound_stmts.rst:1213 +msgid "user-defined function" +msgstr "" + +#: ../../reference/compound_stmts.rst:1213 +#: ../../reference/compound_stmts.rst:1401 +msgid "() (parentheses)" +msgstr "" + +#: ../../reference/compound_stmts.rst:1213 +msgid "parameter list" +msgstr "" + +#: ../../reference/compound_stmts.rst:1257 +#: ../../reference/compound_stmts.rst:1454 +msgid "@ (at)" +msgstr "" + +#: ../../reference/compound_stmts.rst:1293 +msgid "default" +msgstr "Standard" + +#: ../../reference/compound_stmts.rst:1293 +msgid "value" +msgstr "Wert" + +#: ../../reference/compound_stmts.rst:1293 +msgid "argument" +msgstr "" + +#: ../../reference/compound_stmts.rst:1293 +msgid "= (equals)" +msgstr "" + +#: ../../reference/compound_stmts.rst:1322 +msgid "/ (slash)" +msgstr "" + +#: ../../reference/compound_stmts.rst:1322 +msgid "* (asterisk)" +msgstr "" + +#: ../../reference/compound_stmts.rst:1322 +msgid "**" +msgstr "" + +#: ../../reference/compound_stmts.rst:1343 +msgid "annotations" +msgstr "" + +#: ../../reference/compound_stmts.rst:1343 +msgid "->" +msgstr "" + +#: ../../reference/compound_stmts.rst:1343 +msgid "function annotations" +msgstr "" + +#: ../../reference/compound_stmts.rst:1360 +msgid "lambda" +msgstr "" + +#: ../../reference/compound_stmts.rst:1360 +msgid "expression" +msgstr "" + +#: ../../reference/compound_stmts.rst:1401 +msgid "class" +msgstr "" + +#: ../../reference/compound_stmts.rst:1401 +msgid "execution" +msgstr "" + +#: ../../reference/compound_stmts.rst:1401 +msgid "frame" +msgstr "" + +#: ../../reference/compound_stmts.rst:1401 +msgid "inheritance" +msgstr "" + +#: ../../reference/compound_stmts.rst:1401 +msgid "docstring" +msgstr "" + +#: ../../reference/compound_stmts.rst:1401 +#: ../../reference/compound_stmts.rst:1454 +msgid "class definition" +msgstr "" + +#: ../../reference/compound_stmts.rst:1401 +msgid "expression list" +msgstr "" + +#: ../../reference/compound_stmts.rst:1627 +msgid "async def" +msgstr "" + +#: ../../reference/compound_stmts.rst:1637 +msgid "async" +msgstr "" + +#: ../../reference/compound_stmts.rst:1637 +msgid "await" +msgstr "" + +#: ../../reference/compound_stmts.rst:1661 +msgid "async for" +msgstr "" + +#: ../../reference/compound_stmts.rst:1706 +msgid "async with" +msgstr "" + +#: ../../reference/compound_stmts.rst:1764 +msgid "type parameters" +msgstr "" diff --git a/reference/datamodel.po b/reference/datamodel.po index b22a4445..f012ed4b 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -648,18 +648,18 @@ msgid "" "containing the same number of items as the function's formal parameter list." msgstr "" -#: ../../reference/datamodel.rst:581 ../../reference/datamodel.rst:1503 -#: ../../reference/datamodel.rst:1696 +#: ../../reference/datamodel.rst:581 ../../reference/datamodel.rst:1498 +#: ../../reference/datamodel.rst:1691 msgid "Special read-only attributes" msgstr "" #: ../../reference/datamodel.rst:592 ../../reference/datamodel.rst:634 -#: ../../reference/datamodel.rst:1236 +#: ../../reference/datamodel.rst:1231 msgid "Attribute" msgstr "" #: ../../reference/datamodel.rst:593 ../../reference/datamodel.rst:635 -#: ../../reference/datamodel.rst:1237 +#: ../../reference/datamodel.rst:1232 msgid "Meaning" msgstr "" @@ -689,7 +689,7 @@ msgid "" "the value of the cell, as well as set the value." msgstr "" -#: ../../reference/datamodel.rst:615 ../../reference/datamodel.rst:1744 +#: ../../reference/datamodel.rst:615 ../../reference/datamodel.rst:1739 msgid "Special writable attributes" msgstr "" @@ -746,8 +746,8 @@ msgid "" "__annotations__`." msgstr "" -#: ../../reference/datamodel.rst:674 ../../reference/datamodel.rst:1128 -#: ../../reference/datamodel.rst:1294 +#: ../../reference/datamodel.rst:674 ../../reference/datamodel.rst:1123 +#: ../../reference/datamodel.rst:1289 msgid "" "Annotations are now :ref:`lazily evaluated `. See :pep:" "`649`." @@ -802,7 +802,7 @@ msgid "" "callable object (normally a user-defined function)." msgstr "" -#: ../../reference/datamodel.rst:730 ../../reference/datamodel.rst:1840 +#: ../../reference/datamodel.rst:730 ../../reference/datamodel.rst:1835 msgid "Special read-only attributes:" msgstr "" @@ -897,15 +897,15 @@ msgstr "" #: ../../reference/datamodel.rst:801 msgid "" -"A function or method which uses the :keyword:`yield` statement (see section :" -"ref:`yield`) is called a :dfn:`generator function`. Such a function, when " -"called, always returns an :term:`iterator` object which can be used to " -"execute the body of the function: calling the iterator's :meth:`iterator." -"__next__` method will cause the function to execute until it provides a " -"value using the :keyword:`!yield` statement. When the function executes a :" -"keyword:`return` statement or falls off the end, a :exc:`StopIteration` " -"exception is raised and the iterator will have reached the end of the set of " -"values to be returned." +"A function or method which contains a :keyword:`yield` expression (see " +"section :ref:`yieldexpr`) is called a :dfn:`generator function`. Such a " +"function, when called, always returns an :term:`iterator` object which can " +"be used to execute the body of the function: calling the iterator's :meth:" +"`iterator.__next__` method will cause the function to execute until it " +"provides a value using the :keyword:`!yield` expression. When the function " +"executes a :keyword:`return` statement or falls off the end, a :exc:" +"`StopIteration` exception is raised and the iterator will have reached the " +"end of the set of values to be returned." msgstr "" #: ../../reference/datamodel.rst:813 @@ -928,10 +928,10 @@ msgstr "" #: ../../reference/datamodel.rst:832 msgid "" "A function or method which is defined using :keyword:`async def` and which " -"uses the :keyword:`yield` statement is called a :dfn:`asynchronous generator " -"function`. Such a function, when called, returns an :term:`asynchronous " -"iterator` object which can be used in an :keyword:`async for` statement to " -"execute the body of the function." +"contains a :keyword:`yield` expression is called a :dfn:`asynchronous " +"generator function`. Such a function, when called, returns an :term:" +"`asynchronous iterator` object which can be used in an :keyword:`async for` " +"statement to execute the body of the function." msgstr "" #: ../../reference/datamodel.rst:838 @@ -1243,45 +1243,40 @@ msgstr "" #: ../../reference/datamodel.rst:1102 msgid "" -"Setting ``__cached__`` on a module while failing to set :attr:`!__spec__." -"cached` is deprecated. In Python 3.15, ``__cached__`` will cease to be set " -"or taken into consideration by the import system or standard library." -msgstr "" - -#: ../../reference/datamodel.rst:1108 -msgid "``__cached__`` is no longer set." +"The ``__cached__`` attribute is no longer set on modules or taken into " +"consideration by the import system or standard library." msgstr "" -#: ../../reference/datamodel.rst:1112 +#: ../../reference/datamodel.rst:1107 msgid "Other writable attributes on module objects" msgstr "" -#: ../../reference/datamodel.rst:1114 +#: ../../reference/datamodel.rst:1109 msgid "" "As well as the import-related attributes listed above, module objects also " "have the following writable attributes:" msgstr "" -#: ../../reference/datamodel.rst:1119 +#: ../../reference/datamodel.rst:1114 msgid "" "The module's documentation string, or ``None`` if unavailable. See also: :" "attr:`__doc__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:1124 +#: ../../reference/datamodel.rst:1119 msgid "" "A dictionary containing :term:`variable annotations ` " "collected during module body execution. For best practices on working with :" "attr:`!__annotations__`, see :mod:`annotationlib`." msgstr "" -#: ../../reference/datamodel.rst:1134 +#: ../../reference/datamodel.rst:1129 msgid "" "The :term:`annotate function` for this module, or ``None`` if the module has " "no annotations. See also: :attr:`~object.__annotate__` attributes." msgstr "" -#: ../../reference/datamodel.rst:1141 +#: ../../reference/datamodel.rst:1136 msgid "" "A container (an object implementing :meth:`~object.__contains__`) of fully " "qualified module name strings. When defined at module scope, any regular :" @@ -1292,26 +1287,26 @@ msgid "" "unaffected." msgstr "" -#: ../../reference/datamodel.rst:1149 +#: ../../reference/datamodel.rst:1144 msgid "See :ref:`lazy-modules-compat` for details and examples." msgstr "" -#: ../../reference/datamodel.rst:1154 +#: ../../reference/datamodel.rst:1149 msgid "Module dictionaries" msgstr "" -#: ../../reference/datamodel.rst:1156 +#: ../../reference/datamodel.rst:1151 msgid "Module objects also have the following special read-only attribute:" msgstr "" -#: ../../reference/datamodel.rst:1161 +#: ../../reference/datamodel.rst:1156 msgid "" "The module's namespace as a dictionary object. Uniquely among the attributes " "listed here, :attr:`!__dict__` cannot be accessed as a global variable from " "within a module; it can only be accessed as an attribute on module objects." msgstr "" -#: ../../reference/datamodel.rst:1167 +#: ../../reference/datamodel.rst:1162 msgid "" "Because of the way CPython clears module dictionaries, the module dictionary " "will be cleared when the module falls out of scope even if the dictionary " @@ -1319,11 +1314,11 @@ msgid "" "module around while using its dictionary directly." msgstr "" -#: ../../reference/datamodel.rst:1176 +#: ../../reference/datamodel.rst:1171 msgid "Custom classes" msgstr "" -#: ../../reference/datamodel.rst:1178 +#: ../../reference/datamodel.rst:1173 msgid "" "Custom class types are typically created by class definitions (see section :" "ref:`class`). A class has a namespace implemented by a dictionary object. " @@ -1338,7 +1333,7 @@ msgid "" "found at :ref:`python_2.3_mro`." msgstr "" -#: ../../reference/datamodel.rst:1199 +#: ../../reference/datamodel.rst:1194 msgid "" "When a class attribute reference (for class :class:`!C`, say) would yield a " "class method object, it is transformed into an instance method object whose :" @@ -1349,80 +1344,80 @@ msgid "" "contained in its :attr:`~object.__dict__`." msgstr "" -#: ../../reference/datamodel.rst:1210 +#: ../../reference/datamodel.rst:1205 msgid "" "Class attribute assignments update the class's dictionary, never the " "dictionary of a base class." msgstr "" -#: ../../reference/datamodel.rst:1215 +#: ../../reference/datamodel.rst:1210 msgid "" "A class object can be called (see above) to yield a class instance (see " "below)." msgstr "" -#: ../../reference/datamodel.rst:1218 ../../reference/datamodel.rst:1394 +#: ../../reference/datamodel.rst:1213 ../../reference/datamodel.rst:1389 msgid "Special attributes" msgstr "" -#: ../../reference/datamodel.rst:1240 +#: ../../reference/datamodel.rst:1235 msgid "" "The class's name. See also: :attr:`__name__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:1244 +#: ../../reference/datamodel.rst:1239 msgid "" "The class's :term:`qualified name`. See also: :attr:`__qualname__ attributes " "`." msgstr "" -#: ../../reference/datamodel.rst:1248 +#: ../../reference/datamodel.rst:1243 msgid "The name of the module in which the class was defined." msgstr "" -#: ../../reference/datamodel.rst:1251 +#: ../../reference/datamodel.rst:1246 msgid "" "A :class:`mapping proxy ` providing a read-only view " "of the class's namespace. See also: :attr:`__dict__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:1256 +#: ../../reference/datamodel.rst:1251 msgid "" "A :class:`tuple` containing the class's bases. In most cases, for a class " "defined as ``class X(A, B, C)``, ``X.__bases__`` will be exactly equal to " "``(A, B, C)``." msgstr "" -#: ../../reference/datamodel.rst:1263 +#: ../../reference/datamodel.rst:1258 msgid "" "The single base class in the inheritance chain that is responsible for the " "memory layout of instances. This attribute corresponds to :c:member:" "`~PyTypeObject.tp_base` at the C level." msgstr "" -#: ../../reference/datamodel.rst:1268 +#: ../../reference/datamodel.rst:1263 msgid "" "The class's documentation string, or ``None`` if undefined. Not inherited by " "subclasses." msgstr "" -#: ../../reference/datamodel.rst:1272 +#: ../../reference/datamodel.rst:1267 msgid "" "A dictionary containing :term:`variable annotations ` " "collected during class body execution. See also: :attr:`__annotations__ " "attributes `." msgstr "" -#: ../../reference/datamodel.rst:1277 +#: ../../reference/datamodel.rst:1272 msgid "" "For best practices on working with :attr:`~object.__annotations__`, please " "see :mod:`annotationlib`. Use :func:`annotationlib.get_annotations` instead " "of accessing this attribute directly." msgstr "" -#: ../../reference/datamodel.rst:1284 +#: ../../reference/datamodel.rst:1279 msgid "" "Accessing the :attr:`!__annotations__` attribute directly on a class object " "may return annotations for the wrong class, specifically in certain cases " @@ -1431,69 +1426,69 @@ msgid "" "details." msgstr "" -#: ../../reference/datamodel.rst:1290 +#: ../../reference/datamodel.rst:1285 msgid "" "This attribute does not exist on certain builtin classes. On user-defined " "classes without ``__annotations__``, it is an empty dictionary." msgstr "" -#: ../../reference/datamodel.rst:1299 +#: ../../reference/datamodel.rst:1294 msgid "" "The :term:`annotate function` for this class, or ``None`` if the class has " "no annotations. See also: :attr:`__annotate__ attributes `." msgstr "" -#: ../../reference/datamodel.rst:1306 +#: ../../reference/datamodel.rst:1301 msgid "" "A :class:`tuple` containing the :ref:`type parameters ` of a :" "ref:`generic class `." msgstr "" -#: ../../reference/datamodel.rst:1312 +#: ../../reference/datamodel.rst:1307 msgid "" "A :class:`tuple` containing names of attributes of this class which are " "assigned through ``self.X`` from any function in its body." msgstr "" -#: ../../reference/datamodel.rst:1318 +#: ../../reference/datamodel.rst:1313 msgid "" "The line number of the first line of the class definition, including " "decorators. Setting the :attr:`~type.__module__` attribute removes the :attr:" "`!__firstlineno__` item from the type's dictionary." msgstr "" -#: ../../reference/datamodel.rst:1326 +#: ../../reference/datamodel.rst:1321 msgid "" "The :class:`tuple` of classes that are considered when looking for base " "classes during method resolution." msgstr "" -#: ../../reference/datamodel.rst:1331 +#: ../../reference/datamodel.rst:1326 msgid "Special methods" msgstr "" -#: ../../reference/datamodel.rst:1333 +#: ../../reference/datamodel.rst:1328 msgid "" "In addition to the special attributes described above, all Python classes " "also have the following two methods available:" msgstr "" -#: ../../reference/datamodel.rst:1338 +#: ../../reference/datamodel.rst:1333 msgid "" "This method can be overridden by a metaclass to customize the method " "resolution order for its instances. It is called at class instantiation, " "and its result is stored in :attr:`~type.__mro__`." msgstr "" -#: ../../reference/datamodel.rst:1344 +#: ../../reference/datamodel.rst:1339 msgid "" "Each class keeps a list of weak references to its immediate subclasses. This " "method returns a list of all those references still alive. The list is in " "definition order. Example:" msgstr "" -#: ../../reference/datamodel.rst:1348 +#: ../../reference/datamodel.rst:1343 msgid "" ">>> class A: pass\n" ">>> class B(A): pass\n" @@ -1501,11 +1496,11 @@ msgid "" "[]" msgstr "" -#: ../../reference/datamodel.rst:1356 +#: ../../reference/datamodel.rst:1351 msgid "Class instances" msgstr "" -#: ../../reference/datamodel.rst:1364 +#: ../../reference/datamodel.rst:1359 msgid "" "A class instance is created by calling a class object (see above). A class " "instance has a namespace implemented as a dictionary which is the first " @@ -1522,7 +1517,7 @@ msgid "" "__getattr__` method, that is called to satisfy the lookup." msgstr "" -#: ../../reference/datamodel.rst:1380 +#: ../../reference/datamodel.rst:1375 msgid "" "Attribute assignments and deletions update the instance's dictionary, never " "a class's dictionary. If the class has a :meth:`~object.__setattr__` or :" @@ -1530,28 +1525,28 @@ msgid "" "instance dictionary directly." msgstr "" -#: ../../reference/datamodel.rst:1390 +#: ../../reference/datamodel.rst:1385 msgid "" "Class instances can pretend to be numbers, sequences, or mappings if they " "have methods with certain special names. See section :ref:`specialnames`." msgstr "" -#: ../../reference/datamodel.rst:1402 +#: ../../reference/datamodel.rst:1397 msgid "The class to which a class instance belongs." msgstr "" -#: ../../reference/datamodel.rst:1406 +#: ../../reference/datamodel.rst:1401 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes. Not all instances have a :attr:`!__dict__` attribute; see the " "section on :ref:`slots` for more details." msgstr "" -#: ../../reference/datamodel.rst:1412 +#: ../../reference/datamodel.rst:1407 msgid "I/O objects (also known as file objects)" msgstr "" -#: ../../reference/datamodel.rst:1427 +#: ../../reference/datamodel.rst:1422 msgid "" "A :term:`file object` represents an open file. Various shortcuts are " "available to create file objects: the :func:`open` built-in function, and " @@ -1560,13 +1555,13 @@ msgid "" "methods provided by extension modules)." msgstr "" -#: ../../reference/datamodel.rst:1433 +#: ../../reference/datamodel.rst:1428 msgid "" "File objects implement common methods, listed below, to simplify usage in " "generic code. They are expected to be :ref:`context-managers`." msgstr "" -#: ../../reference/datamodel.rst:1436 +#: ../../reference/datamodel.rst:1431 msgid "" "The objects ``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` are initialized " "to file objects corresponding to the interpreter's standard input, output " @@ -1574,36 +1569,36 @@ msgid "" "interface defined by the :class:`io.TextIOBase` abstract class." msgstr "" -#: ../../reference/datamodel.rst:1444 +#: ../../reference/datamodel.rst:1439 msgid "" "Retrieve up to *size* data from the file. As a convenience if *size* is " "unspecified or -1 retrieve all data available." msgstr "" -#: ../../reference/datamodel.rst:1449 +#: ../../reference/datamodel.rst:1444 msgid "Store *data* to the file." msgstr "" -#: ../../reference/datamodel.rst:1453 +#: ../../reference/datamodel.rst:1448 msgid "Flush any buffers and close the underlying file." msgstr "" -#: ../../reference/datamodel.rst:1457 +#: ../../reference/datamodel.rst:1452 msgid "Internal types" msgstr "" -#: ../../reference/datamodel.rst:1463 +#: ../../reference/datamodel.rst:1458 msgid "" "A few types used internally by the interpreter are exposed to the user. " "Their definitions may change with future versions of the interpreter, but " "they are mentioned here for completeness." msgstr "" -#: ../../reference/datamodel.rst:1471 +#: ../../reference/datamodel.rst:1466 msgid "Code objects" msgstr "" -#: ../../reference/datamodel.rst:1475 +#: ../../reference/datamodel.rst:1470 msgid "" "Code objects represent *byte-compiled* executable Python code, or :term:" "`bytecode`. The difference between a code object and a function object is " @@ -1615,99 +1610,99 @@ msgid "" "no references (directly or indirectly) to mutable objects." msgstr "" -#: ../../reference/datamodel.rst:1508 +#: ../../reference/datamodel.rst:1503 msgid "The function name" msgstr "" -#: ../../reference/datamodel.rst:1511 +#: ../../reference/datamodel.rst:1506 msgid "The fully qualified function name" msgstr "" -#: ../../reference/datamodel.rst:1516 +#: ../../reference/datamodel.rst:1511 msgid "" "The total number of positional :term:`parameters ` (including " "positional-only parameters and parameters with default values) that the " "function has" msgstr "" -#: ../../reference/datamodel.rst:1521 +#: ../../reference/datamodel.rst:1516 msgid "" "The number of positional-only :term:`parameters ` (including " "arguments with default values) that the function has" msgstr "" -#: ../../reference/datamodel.rst:1525 +#: ../../reference/datamodel.rst:1520 msgid "" "The number of keyword-only :term:`parameters ` (including " "arguments with default values) that the function has" msgstr "" -#: ../../reference/datamodel.rst:1529 +#: ../../reference/datamodel.rst:1524 msgid "" "The number of :ref:`local variables ` used by the function " "(including parameters)" msgstr "" -#: ../../reference/datamodel.rst:1533 +#: ../../reference/datamodel.rst:1528 msgid "" "A :class:`tuple` containing the names of the local variables in the function " "(starting with the parameter names)" msgstr "" -#: ../../reference/datamodel.rst:1537 +#: ../../reference/datamodel.rst:1532 msgid "" "A :class:`tuple` containing the names of :ref:`local variables ` " "that are referenced from at least one :term:`nested scope` inside the " "function" msgstr "" -#: ../../reference/datamodel.rst:1541 +#: ../../reference/datamodel.rst:1536 msgid "" "A :class:`tuple` containing the names of :term:`free (closure) variables " "` that a :term:`nested scope` references in an outer " "scope. See also :attr:`function.__closure__`." msgstr "" -#: ../../reference/datamodel.rst:1545 +#: ../../reference/datamodel.rst:1540 msgid "Note: references to global and builtin names are *not* included." msgstr "" -#: ../../reference/datamodel.rst:1548 +#: ../../reference/datamodel.rst:1543 msgid "" "A string representing the sequence of :term:`bytecode` instructions in the " "function" msgstr "" -#: ../../reference/datamodel.rst:1552 +#: ../../reference/datamodel.rst:1547 msgid "" "A :class:`tuple` containing the literals used by the :term:`bytecode` in the " "function" msgstr "" -#: ../../reference/datamodel.rst:1556 +#: ../../reference/datamodel.rst:1551 msgid "" "A :class:`tuple` containing the names used by the :term:`bytecode` in the " "function" msgstr "" -#: ../../reference/datamodel.rst:1560 +#: ../../reference/datamodel.rst:1555 msgid "The name of the file from which the code was compiled" msgstr "" -#: ../../reference/datamodel.rst:1563 +#: ../../reference/datamodel.rst:1558 msgid "The line number of the first line of the function" msgstr "" -#: ../../reference/datamodel.rst:1566 +#: ../../reference/datamodel.rst:1561 msgid "The required stack size of the code object" msgstr "" -#: ../../reference/datamodel.rst:1569 +#: ../../reference/datamodel.rst:1564 msgid "" "An :class:`integer ` encoding a number of flags for the interpreter." msgstr "" -#: ../../reference/datamodel.rst:1574 +#: ../../reference/datamodel.rst:1569 msgid "" "The following flag bits are defined for :attr:`~codeobject.co_flags`: bit " "``0x04`` is set if the function uses the ``*arguments`` syntax to accept an " @@ -1718,7 +1713,7 @@ msgid "" "might be present." msgstr "" -#: ../../reference/datamodel.rst:1582 +#: ../../reference/datamodel.rst:1577 msgid "" "Future feature declarations (for example, ``from __future__ import " "division``) also use bits in :attr:`~codeobject.co_flags` to indicate " @@ -1726,12 +1721,12 @@ msgid "" "attr:`~__future__._Feature.compiler_flag`." msgstr "" -#: ../../reference/datamodel.rst:1586 +#: ../../reference/datamodel.rst:1581 msgid "" "Other bits in :attr:`~codeobject.co_flags` are reserved for internal use." msgstr "" -#: ../../reference/datamodel.rst:1590 +#: ../../reference/datamodel.rst:1585 msgid "" "If a code object represents a function and has a docstring, the :data:" "`~inspect.CO_HAS_DOCSTRING` bit is set in :attr:`~codeobject.co_flags` and " @@ -1739,17 +1734,17 @@ msgid "" "function." msgstr "" -#: ../../reference/datamodel.rst:1596 +#: ../../reference/datamodel.rst:1591 msgid "Methods on code objects" msgstr "" -#: ../../reference/datamodel.rst:1600 +#: ../../reference/datamodel.rst:1595 msgid "" "Returns an iterable over the source code positions of each :term:`bytecode` " "instruction in the code object." msgstr "" -#: ../../reference/datamodel.rst:1603 +#: ../../reference/datamodel.rst:1598 msgid "" "The iterator returns :class:`tuple`\\s containing the ``(start_line, " "end_line, start_column, end_column)``. The *i-th* tuple corresponds to the " @@ -1757,37 +1752,37 @@ msgid "" "information is 0-indexed utf-8 byte offsets on the given source line." msgstr "" -#: ../../reference/datamodel.rst:1609 +#: ../../reference/datamodel.rst:1604 msgid "" "This positional information can be missing. A non-exhaustive lists of cases " "where this may happen:" msgstr "" -#: ../../reference/datamodel.rst:1612 +#: ../../reference/datamodel.rst:1607 msgid "Running the interpreter with :option:`-X` ``no_debug_ranges``." msgstr "" -#: ../../reference/datamodel.rst:1613 +#: ../../reference/datamodel.rst:1608 msgid "" "Loading a pyc file compiled while using :option:`-X` ``no_debug_ranges``." msgstr "" -#: ../../reference/datamodel.rst:1614 +#: ../../reference/datamodel.rst:1609 msgid "Position tuples corresponding to artificial instructions." msgstr "" -#: ../../reference/datamodel.rst:1615 +#: ../../reference/datamodel.rst:1610 msgid "" "Line and column numbers that can't be represented due to implementation " "specific limitations." msgstr "" -#: ../../reference/datamodel.rst:1618 +#: ../../reference/datamodel.rst:1613 msgid "" "When this occurs, some or all of the tuple elements can be :const:`None`." msgstr "" -#: ../../reference/datamodel.rst:1624 +#: ../../reference/datamodel.rst:1619 msgid "" "This feature requires storing column positions in code objects which may " "result in a small increase of disk usage of compiled Python files or " @@ -1797,161 +1792,161 @@ msgid "" "environment variable can be used." msgstr "" -#: ../../reference/datamodel.rst:1633 +#: ../../reference/datamodel.rst:1628 msgid "" "Returns an iterator that yields information about successive ranges of :term:" "`bytecode`\\s. Each item yielded is a ``(start, end, lineno)`` :class:" "`tuple`:" msgstr "" -#: ../../reference/datamodel.rst:1637 +#: ../../reference/datamodel.rst:1632 msgid "" "``start`` (an :class:`int`) represents the offset (inclusive) of the start " "of the :term:`bytecode` range" msgstr "" -#: ../../reference/datamodel.rst:1639 +#: ../../reference/datamodel.rst:1634 msgid "" "``end`` (an :class:`int`) represents the offset (exclusive) of the end of " "the :term:`bytecode` range" msgstr "" -#: ../../reference/datamodel.rst:1641 +#: ../../reference/datamodel.rst:1636 msgid "" "``lineno`` is an :class:`int` representing the line number of the :term:" "`bytecode` range, or ``None`` if the bytecodes in the given range have no " "line number" msgstr "" -#: ../../reference/datamodel.rst:1645 +#: ../../reference/datamodel.rst:1640 msgid "The items yielded will have the following properties:" msgstr "" -#: ../../reference/datamodel.rst:1647 +#: ../../reference/datamodel.rst:1642 msgid "The first range yielded will have a ``start`` of 0." msgstr "" -#: ../../reference/datamodel.rst:1648 +#: ../../reference/datamodel.rst:1643 msgid "" "The ``(start, end)`` ranges will be non-decreasing and consecutive. That is, " "for any pair of :class:`tuple`\\s, the ``start`` of the second will be equal " "to the ``end`` of the first." msgstr "" -#: ../../reference/datamodel.rst:1651 +#: ../../reference/datamodel.rst:1646 msgid "No range will be backwards: ``end >= start`` for all triples." msgstr "" -#: ../../reference/datamodel.rst:1652 +#: ../../reference/datamodel.rst:1647 msgid "" "The last :class:`tuple` yielded will have ``end`` equal to the size of the :" "term:`bytecode`." msgstr "" -#: ../../reference/datamodel.rst:1655 +#: ../../reference/datamodel.rst:1650 msgid "" "Zero-width ranges, where ``start == end``, are allowed. Zero-width ranges " "are used for lines that are present in the source code, but have been " "eliminated by the :term:`bytecode` compiler." msgstr "" -#: ../../reference/datamodel.rst:1663 +#: ../../reference/datamodel.rst:1658 msgid ":pep:`626` - Precise line numbers for debugging and other tools." msgstr "" -#: ../../reference/datamodel.rst:1664 +#: ../../reference/datamodel.rst:1659 msgid "The PEP that introduced the :meth:`!co_lines` method." msgstr "" -#: ../../reference/datamodel.rst:1668 +#: ../../reference/datamodel.rst:1663 msgid "" "Return a copy of the code object with new values for the specified fields." msgstr "" -#: ../../reference/datamodel.rst:1670 +#: ../../reference/datamodel.rst:1665 msgid "" "Code objects are also supported by the generic function :func:`copy.replace`." msgstr "" -#: ../../reference/datamodel.rst:1678 +#: ../../reference/datamodel.rst:1673 msgid "Frame objects" msgstr "" -#: ../../reference/datamodel.rst:1682 +#: ../../reference/datamodel.rst:1677 msgid "" "Frame objects represent execution frames. They may occur in :ref:`traceback " "objects `, and are also passed to registered trace " "functions." msgstr "" -#: ../../reference/datamodel.rst:1701 +#: ../../reference/datamodel.rst:1696 msgid "" "Points to the previous stack frame (towards the caller), or ``None`` if this " "is the bottom stack frame" msgstr "" -#: ../../reference/datamodel.rst:1705 +#: ../../reference/datamodel.rst:1700 msgid "" "The :ref:`code object ` being executed in this frame. " "Accessing this attribute raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"f_code\"``." msgstr "" -#: ../../reference/datamodel.rst:1710 +#: ../../reference/datamodel.rst:1705 msgid "" "The mapping used by the frame to look up :ref:`local variables `. If " "the frame refers to an :term:`optimized scope`, this may return a write-" "through proxy object." msgstr "" -#: ../../reference/datamodel.rst:1715 +#: ../../reference/datamodel.rst:1710 msgid "Return a proxy for optimized scopes." msgstr "" -#: ../../reference/datamodel.rst:1719 +#: ../../reference/datamodel.rst:1714 msgid "" "The dictionary used by the frame to look up :ref:`global variables `" msgstr "" -#: ../../reference/datamodel.rst:1723 +#: ../../reference/datamodel.rst:1718 msgid "" "The dictionary used by the frame to look up :ref:`built-in (intrinsic) names " "`" msgstr "" -#: ../../reference/datamodel.rst:1727 +#: ../../reference/datamodel.rst:1722 msgid "" "The \"precise instruction\" of the frame object (this is an index into the :" "term:`bytecode` string of the :ref:`code object `)" msgstr "" -#: ../../reference/datamodel.rst:1732 +#: ../../reference/datamodel.rst:1727 msgid "" "The :term:`generator` or :term:`coroutine` object that owns this frame, or " "``None`` if the frame is a normal function." msgstr "" -#: ../../reference/datamodel.rst:1749 +#: ../../reference/datamodel.rst:1744 msgid "" "If not ``None``, this is a function called for various events during code " "execution (this is used by debuggers). Normally an event is triggered for " "each new source line (see :attr:`~frame.f_trace_lines`)." msgstr "" -#: ../../reference/datamodel.rst:1754 +#: ../../reference/datamodel.rst:1749 msgid "" "Set this attribute to :const:`False` to disable triggering a tracing event " "for each source line." msgstr "" -#: ../../reference/datamodel.rst:1758 +#: ../../reference/datamodel.rst:1753 msgid "" "Set this attribute to :const:`True` to allow per-opcode events to be " "requested. Note that this may lead to undefined interpreter behaviour if " "exceptions raised by the trace function escape to the function being traced." msgstr "" -#: ../../reference/datamodel.rst:1764 +#: ../../reference/datamodel.rst:1759 msgid "" "The current line number of the frame -- writing to this from within a trace " "function jumps to the given line (only for the bottom-most frame). A " @@ -1959,15 +1954,15 @@ msgid "" "this attribute." msgstr "" -#: ../../reference/datamodel.rst:1770 +#: ../../reference/datamodel.rst:1765 msgid "Frame object methods" msgstr "" -#: ../../reference/datamodel.rst:1772 +#: ../../reference/datamodel.rst:1767 msgid "Frame objects support one method:" msgstr "" -#: ../../reference/datamodel.rst:1776 +#: ../../reference/datamodel.rst:1771 msgid "" "This method clears all references to :ref:`local variables ` held by " "the frame. Also, if the frame belonged to a :term:`generator`, the " @@ -1976,34 +1971,34 @@ msgid "" "and storing its :ref:`traceback ` for later use)." msgstr "" -#: ../../reference/datamodel.rst:1782 +#: ../../reference/datamodel.rst:1777 msgid "" ":exc:`RuntimeError` is raised if the frame is currently executing or " "suspended." msgstr "" -#: ../../reference/datamodel.rst:1787 +#: ../../reference/datamodel.rst:1782 msgid "" "Attempting to clear a suspended frame raises :exc:`RuntimeError` (as has " "always been the case for executing frames)." msgstr "" -#: ../../reference/datamodel.rst:1795 +#: ../../reference/datamodel.rst:1790 msgid "Traceback objects" msgstr "" -#: ../../reference/datamodel.rst:1808 +#: ../../reference/datamodel.rst:1803 msgid "" "Traceback objects represent the stack trace of an :ref:`exception `. A traceback object is implicitly created when an exception occurs, " "and may also be explicitly created by calling :class:`types.TracebackType`." msgstr "" -#: ../../reference/datamodel.rst:1813 +#: ../../reference/datamodel.rst:1808 msgid "Traceback objects can now be explicitly instantiated from Python code." msgstr "" -#: ../../reference/datamodel.rst:1816 +#: ../../reference/datamodel.rst:1811 msgid "" "For implicitly created tracebacks, when the search for an exception handler " "unwinds the execution stack, at each unwound level a traceback object is " @@ -2014,7 +2009,7 @@ msgid "" "the caught exception." msgstr "" -#: ../../reference/datamodel.rst:1825 +#: ../../reference/datamodel.rst:1820 msgid "" "When the program contains no suitable handler, the stack trace is written " "(nicely formatted) to the standard error stream; if the interpreter is " @@ -2022,33 +2017,33 @@ msgid "" "last_traceback`." msgstr "" -#: ../../reference/datamodel.rst:1830 +#: ../../reference/datamodel.rst:1825 msgid "" "For explicitly created tracebacks, it is up to the creator of the traceback " "to determine how the :attr:`~traceback.tb_next` attributes should be linked " "to form a full stack trace." msgstr "" -#: ../../reference/datamodel.rst:1845 +#: ../../reference/datamodel.rst:1840 msgid "" "Points to the execution :ref:`frame ` of the current level." msgstr "" -#: ../../reference/datamodel.rst:1848 +#: ../../reference/datamodel.rst:1843 msgid "" "Accessing this attribute raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"tb_frame\"``." msgstr "" -#: ../../reference/datamodel.rst:1853 +#: ../../reference/datamodel.rst:1848 msgid "Gives the line number where the exception occurred" msgstr "" -#: ../../reference/datamodel.rst:1856 +#: ../../reference/datamodel.rst:1851 msgid "Indicates the \"precise instruction\"." msgstr "" -#: ../../reference/datamodel.rst:1858 +#: ../../reference/datamodel.rst:1853 msgid "" "The line number and last instruction in the traceback may differ from the " "line number of its :ref:`frame object ` if the exception " @@ -2056,46 +2051,46 @@ msgid "" "with a :keyword:`finally` clause." msgstr "" -#: ../../reference/datamodel.rst:1869 +#: ../../reference/datamodel.rst:1864 msgid "" "The special writable attribute :attr:`!tb_next` is the next level in the " "stack trace (towards the frame where the exception occurred), or ``None`` if " "there is no next level." msgstr "" -#: ../../reference/datamodel.rst:1873 +#: ../../reference/datamodel.rst:1868 msgid "This attribute is now writable" msgstr "" -#: ../../reference/datamodel.rst:1878 +#: ../../reference/datamodel.rst:1873 msgid "Slice objects" msgstr "" -#: ../../reference/datamodel.rst:1882 +#: ../../reference/datamodel.rst:1877 msgid "" "Slice objects are used to represent slices for :meth:`~object.__getitem__` " "methods. They are also created by the built-in :func:`slice` function." msgstr "" -#: ../../reference/datamodel.rst:1888 +#: ../../reference/datamodel.rst:1883 msgid "" "The :func:`slice` type now supports :ref:`subscription `. For " "example, ``slice[float]`` may be used in type annotations to indicate a " "slice containing :type:`float` objects." msgstr "" -#: ../../reference/datamodel.rst:1897 +#: ../../reference/datamodel.rst:1892 msgid "" "Special read-only attributes: :attr:`~slice.start` is the lower bound; :attr:" "`~slice.stop` is the upper bound; :attr:`~slice.step` is the step value; " "each is ``None`` if omitted. These attributes can have any type." msgstr "" -#: ../../reference/datamodel.rst:1901 +#: ../../reference/datamodel.rst:1896 msgid "Slice objects support one method:" msgstr "" -#: ../../reference/datamodel.rst:1905 +#: ../../reference/datamodel.rst:1900 msgid "" "This method takes a single integer argument *length* and computes " "information about the slice that the slice object would describe if applied " @@ -2105,11 +2100,11 @@ msgid "" "a manner consistent with regular slices." msgstr "" -#: ../../reference/datamodel.rst:1914 +#: ../../reference/datamodel.rst:1909 msgid "Static method objects" msgstr "" -#: ../../reference/datamodel.rst:1916 +#: ../../reference/datamodel.rst:1911 msgid "" "Static method objects provide a way of defeating the transformation of " "function objects to method objects described above. A static method object " @@ -2120,11 +2115,11 @@ msgid "" "method objects are created by the built-in :func:`staticmethod` constructor." msgstr "" -#: ../../reference/datamodel.rst:1926 +#: ../../reference/datamodel.rst:1921 msgid "Class method objects" msgstr "" -#: ../../reference/datamodel.rst:1928 +#: ../../reference/datamodel.rst:1923 msgid "" "A class method object, like a static method object, is a wrapper around " "another object that alters the way in which that object is retrieved from " @@ -2134,11 +2129,11 @@ msgid "" "`classmethod` constructor." msgstr "" -#: ../../reference/datamodel.rst:1938 +#: ../../reference/datamodel.rst:1933 msgid "Special method names" msgstr "" -#: ../../reference/datamodel.rst:1944 +#: ../../reference/datamodel.rst:1939 msgid "" "A class can implement certain operations that are invoked by special syntax " "(such as arithmetic operations or subscripting and slicing) by defining " @@ -2152,7 +2147,7 @@ msgid "" "`TypeError`)." msgstr "" -#: ../../reference/datamodel.rst:1955 +#: ../../reference/datamodel.rst:1950 msgid "" "Setting a special method to ``None`` indicates that the corresponding " "operation is not available. For example, if a class sets :meth:`~object." @@ -2161,7 +2156,7 @@ msgid "" "`~object.__getitem__`). [#]_" msgstr "" -#: ../../reference/datamodel.rst:1961 +#: ../../reference/datamodel.rst:1956 msgid "" "When implementing a class that emulates any built-in type, it is important " "that the emulation only be implemented to the degree that it makes sense for " @@ -2171,11 +2166,11 @@ msgid "" "in the W3C's Document Object Model.)" msgstr "" -#: ../../reference/datamodel.rst:1972 +#: ../../reference/datamodel.rst:1967 msgid "Basic customization" msgstr "" -#: ../../reference/datamodel.rst:1978 +#: ../../reference/datamodel.rst:1973 msgid "" "Called to create a new instance of class *cls*. :meth:`__new__` is a static " "method (special-cased so you need not declare it as such) that takes the " @@ -2185,7 +2180,7 @@ msgid "" "new object instance (usually an instance of *cls*)." msgstr "" -#: ../../reference/datamodel.rst:1985 +#: ../../reference/datamodel.rst:1980 msgid "" "Typical implementations create a new instance of the class by invoking the " "superclass's :meth:`__new__` method using ``super().__new__(cls[, ...])`` " @@ -2193,7 +2188,7 @@ msgid "" "necessary before returning it." msgstr "" -#: ../../reference/datamodel.rst:1990 +#: ../../reference/datamodel.rst:1985 msgid "" "If :meth:`__new__` is invoked during object construction and it returns an " "instance of *cls*, then the new instance’s :meth:`__init__` method will be " @@ -2202,13 +2197,13 @@ msgid "" "constructor." msgstr "" -#: ../../reference/datamodel.rst:1995 +#: ../../reference/datamodel.rst:1990 msgid "" "If :meth:`__new__` does not return an instance of *cls*, then the new " "instance's :meth:`__init__` method will not be invoked." msgstr "" -#: ../../reference/datamodel.rst:1998 +#: ../../reference/datamodel.rst:1993 msgid "" ":meth:`__new__` is intended mainly to allow subclasses of immutable types " "(like int, str, or tuple) to customize instance creation. It is also " @@ -2216,7 +2211,7 @@ msgid "" "creation." msgstr "" -#: ../../reference/datamodel.rst:2007 +#: ../../reference/datamodel.rst:2002 msgid "" "Called after the instance has been created (by :meth:`__new__`), but before " "it is returned to the caller. The arguments are those passed to the class " @@ -2226,7 +2221,7 @@ msgid "" "example: ``super().__init__([args...])``." msgstr "" -#: ../../reference/datamodel.rst:2014 +#: ../../reference/datamodel.rst:2009 msgid "" "Because :meth:`__new__` and :meth:`__init__` work together in constructing " "objects (:meth:`__new__` to create it, and :meth:`__init__` to customize " @@ -2234,7 +2229,7 @@ msgid "" "will cause a :exc:`TypeError` to be raised at runtime." msgstr "" -#: ../../reference/datamodel.rst:2027 +#: ../../reference/datamodel.rst:2022 msgid "" "Called when the instance is about to be destroyed. This is also called a " "finalizer or (improperly) a destructor. If a base class has a :meth:" @@ -2243,7 +2238,7 @@ msgid "" "instance." msgstr "" -#: ../../reference/datamodel.rst:2033 +#: ../../reference/datamodel.rst:2028 msgid "" "It is possible (though not recommended!) for the :meth:`__del__` method to " "postpone destruction of the instance by creating a new reference to it. " @@ -2253,7 +2248,7 @@ msgid "" "it once." msgstr "" -#: ../../reference/datamodel.rst:2040 +#: ../../reference/datamodel.rst:2035 msgid "" "It is not guaranteed that :meth:`__del__` methods are called for objects " "that still exist when the interpreter exits. :class:`weakref.finalize` " @@ -2261,14 +2256,14 @@ msgid "" "when an object is garbage collected." msgstr "" -#: ../../reference/datamodel.rst:2047 +#: ../../reference/datamodel.rst:2042 msgid "" "``del x`` doesn't directly call ``x.__del__()`` --- the former decrements " "the reference count for ``x`` by one, and the latter is only called when " "``x``'s reference count reaches zero." msgstr "" -#: ../../reference/datamodel.rst:2052 +#: ../../reference/datamodel.rst:2047 msgid "" "It is possible for a reference cycle to prevent the reference count of an " "object from going to zero. In this case, the cycle will be later detected " @@ -2279,18 +2274,18 @@ msgid "" "caught in the traceback." msgstr "" -#: ../../reference/datamodel.rst:2062 +#: ../../reference/datamodel.rst:2057 msgid "Documentation for the :mod:`gc` module." msgstr "" -#: ../../reference/datamodel.rst:2066 +#: ../../reference/datamodel.rst:2061 msgid "" "Due to the precarious circumstances under which :meth:`__del__` methods are " "invoked, exceptions that occur during their execution are ignored, and a " "warning is printed to ``sys.stderr`` instead. In particular:" msgstr "" -#: ../../reference/datamodel.rst:2070 +#: ../../reference/datamodel.rst:2065 msgid "" ":meth:`__del__` can be invoked when arbitrary code is being executed, " "including from any arbitrary thread. If :meth:`__del__` needs to take a " @@ -2299,7 +2294,7 @@ msgid "" "`__del__`." msgstr "" -#: ../../reference/datamodel.rst:2076 +#: ../../reference/datamodel.rst:2071 msgid "" ":meth:`__del__` can be executed during interpreter shutdown. As a " "consequence, the global variables it needs to access (including other " @@ -2310,7 +2305,7 @@ msgid "" "still available at the time when the :meth:`__del__` method is called." msgstr "" -#: ../../reference/datamodel.rst:2091 +#: ../../reference/datamodel.rst:2086 msgid "" "Called by the :func:`repr` built-in function to compute the \"official\" " "string representation of an object. If at all possible, this should look " @@ -2322,14 +2317,14 @@ msgid "" "an \"informal\" string representation of instances of that class is required." msgstr "" -#: ../../reference/datamodel.rst:2100 +#: ../../reference/datamodel.rst:2095 msgid "" "This is typically used for debugging, so it is important that the " "representation is information-rich and unambiguous. A default implementation " "is provided by the :class:`object` class itself." msgstr "" -#: ../../reference/datamodel.rst:2112 +#: ../../reference/datamodel.rst:2107 msgid "" "Called by :func:`str(object) `, the default :meth:`__format__` " "implementation, and the built-in function :func:`print`, to compute the " @@ -2337,27 +2332,27 @@ msgid "" "return value must be a :ref:`str ` object." msgstr "" -#: ../../reference/datamodel.rst:2117 +#: ../../reference/datamodel.rst:2112 msgid "" "This method differs from :meth:`object.__repr__` in that there is no " "expectation that :meth:`__str__` return a valid Python expression: a more " "convenient or concise representation can be used." msgstr "" -#: ../../reference/datamodel.rst:2121 +#: ../../reference/datamodel.rst:2116 msgid "" "The default implementation defined by the built-in type :class:`object` " "calls :meth:`object.__repr__`." msgstr "" -#: ../../reference/datamodel.rst:2131 +#: ../../reference/datamodel.rst:2126 msgid "" "Called by :ref:`bytes ` to compute a byte-string representation " "of an object. This should return a :class:`bytes` object. The :class:" "`object` class itself does not provide this method." msgstr "" -#: ../../reference/datamodel.rst:2143 +#: ../../reference/datamodel.rst:2138 msgid "" "Called by the :func:`format` built-in function, and by extension, evaluation " "of :ref:`formatted string literals ` and the :meth:`str.format` " @@ -2369,34 +2364,34 @@ msgid "" "formatting option syntax." msgstr "" -#: ../../reference/datamodel.rst:2153 +#: ../../reference/datamodel.rst:2148 msgid "" "See :ref:`formatspec` for a description of the standard formatting syntax." msgstr "" -#: ../../reference/datamodel.rst:2155 +#: ../../reference/datamodel.rst:2150 msgid "The return value must be a string object." msgstr "" -#: ../../reference/datamodel.rst:2157 +#: ../../reference/datamodel.rst:2152 msgid "" "The default implementation by the :class:`object` class should be given an " "empty *format_spec* string. It delegates to :meth:`__str__`." msgstr "" -#: ../../reference/datamodel.rst:2160 +#: ../../reference/datamodel.rst:2155 msgid "" "The __format__ method of ``object`` itself raises a :exc:`TypeError` if " "passed any non-empty string." msgstr "" -#: ../../reference/datamodel.rst:2164 +#: ../../reference/datamodel.rst:2159 msgid "" "``object.__format__(x, '')`` is now equivalent to ``str(x)`` rather than " "``format(str(x), '')``." msgstr "" -#: ../../reference/datamodel.rst:2180 +#: ../../reference/datamodel.rst:2175 msgid "" "These are the so-called \"rich comparison\" methods. The correspondence " "between operator symbols and method names is as follows: ``x.__hash__``." msgstr "" -#: ../../reference/datamodel.rst:2278 +#: ../../reference/datamodel.rst:2273 msgid "" "If a class that does not override :meth:`__eq__` wishes to suppress hash " "support, it should include ``__hash__ = None`` in the class definition. A " @@ -2538,7 +2533,7 @@ msgid "" "``isinstance(obj, collections.abc.Hashable)`` call." msgstr "" -#: ../../reference/datamodel.rst:2287 +#: ../../reference/datamodel.rst:2282 msgid "" "By default, the :meth:`__hash__` values of str and bytes objects are " "\"salted\" with an unpredictable random value. Although they remain " @@ -2546,7 +2541,7 @@ msgid "" "between repeated invocations of Python." msgstr "" -#: ../../reference/datamodel.rst:2292 +#: ../../reference/datamodel.rst:2287 msgid "" "This is intended to provide protection against a denial-of-service caused by " "carefully chosen inputs that exploit the worst case performance of a dict " @@ -2554,22 +2549,22 @@ msgid "" "advisories/ocert-2011-003.html for details." msgstr "" -#: ../../reference/datamodel.rst:2297 +#: ../../reference/datamodel.rst:2292 msgid "" "Changing hash values affects the iteration order of sets. Python has never " "made guarantees about this ordering (and it typically varies between 32-bit " "and 64-bit builds)." msgstr "" -#: ../../reference/datamodel.rst:2301 +#: ../../reference/datamodel.rst:2296 msgid "See also :envvar:`PYTHONHASHSEED`." msgstr "" -#: ../../reference/datamodel.rst:2303 +#: ../../reference/datamodel.rst:2298 msgid "Hash randomization is enabled by default." msgstr "" -#: ../../reference/datamodel.rst:2311 +#: ../../reference/datamodel.rst:2306 msgid "" "Called to implement truth value testing and the built-in operation " "``bool()``; should return ``False`` or ``True``. When this method is not " @@ -2579,18 +2574,18 @@ msgid "" "class itself), all its instances are considered true." msgstr "" -#: ../../reference/datamodel.rst:2322 +#: ../../reference/datamodel.rst:2317 msgid "Customizing attribute access" msgstr "" -#: ../../reference/datamodel.rst:2324 +#: ../../reference/datamodel.rst:2319 msgid "" "The following methods can be defined to customize the meaning of attribute " "access (use of, assignment to, or deletion of ``x.name``) for class " "instances." msgstr "" -#: ../../reference/datamodel.rst:2332 +#: ../../reference/datamodel.rst:2327 msgid "" "Called when the default attribute access fails with an :exc:`AttributeError` " "(either :meth:`__getattribute__` raises an :exc:`AttributeError` because " @@ -2601,7 +2596,7 @@ msgid "" "`object` class itself does not provide this method." msgstr "" -#: ../../reference/datamodel.rst:2340 +#: ../../reference/datamodel.rst:2335 msgid "" "Note that if the attribute is found through the normal mechanism, :meth:" "`__getattr__` is not called. (This is an intentional asymmetry between :" @@ -2614,7 +2609,7 @@ msgid "" "actually get total control over attribute access." msgstr "" -#: ../../reference/datamodel.rst:2353 +#: ../../reference/datamodel.rst:2348 msgid "" "Called unconditionally to implement attribute accesses for instances of the " "class. If the class also defines :meth:`__getattr__`, the latter will not be " @@ -2626,64 +2621,64 @@ msgid "" "example, ``object.__getattribute__(self, name)``." msgstr "" -#: ../../reference/datamodel.rst:2364 +#: ../../reference/datamodel.rst:2359 msgid "" "This method may still be bypassed when looking up special methods as the " "result of implicit invocation via language syntax or :ref:`built-in " "functions `. See :ref:`special-lookup`." msgstr "" -#: ../../reference/datamodel.rst:2369 ../../reference/datamodel.rst:2371 +#: ../../reference/datamodel.rst:2364 ../../reference/datamodel.rst:2366 msgid "" "For certain sensitive attribute accesses, raises an :ref:`auditing event " "` ``object.__getattr__`` with arguments ``obj`` and ``name``." msgstr "" -#: ../../reference/datamodel.rst:2378 +#: ../../reference/datamodel.rst:2373 msgid "" "Called when an attribute assignment is attempted. This is called instead of " "the normal mechanism (i.e. store the value in the instance dictionary). " "*name* is the attribute name, *value* is the value to be assigned to it." msgstr "" -#: ../../reference/datamodel.rst:2382 +#: ../../reference/datamodel.rst:2377 msgid "" "If :meth:`__setattr__` wants to assign to an instance attribute, it should " "call the base class method with the same name, for example, ``object." "__setattr__(self, name, value)``." msgstr "" -#: ../../reference/datamodel.rst:2386 ../../reference/datamodel.rst:2388 +#: ../../reference/datamodel.rst:2381 ../../reference/datamodel.rst:2383 msgid "" "For certain sensitive attribute assignments, raises an :ref:`auditing event " "` ``object.__setattr__`` with arguments ``obj``, ``name``, " "``value``." msgstr "" -#: ../../reference/datamodel.rst:2395 +#: ../../reference/datamodel.rst:2390 msgid "" "Like :meth:`__setattr__` but for attribute deletion instead of assignment. " "This should only be implemented if ``del obj.name`` is meaningful for the " "object." msgstr "" -#: ../../reference/datamodel.rst:2398 ../../reference/datamodel.rst:2400 +#: ../../reference/datamodel.rst:2393 ../../reference/datamodel.rst:2395 msgid "" "For certain sensitive attribute deletions, raises an :ref:`auditing event " "` ``object.__delattr__`` with arguments ``obj`` and ``name``." msgstr "" -#: ../../reference/datamodel.rst:2407 +#: ../../reference/datamodel.rst:2402 msgid "" "Called when :func:`dir` is called on the object. An iterable must be " "returned. :func:`dir` converts the returned iterable to a list and sorts it." msgstr "" -#: ../../reference/datamodel.rst:2412 +#: ../../reference/datamodel.rst:2407 msgid "Customizing module attribute access" msgstr "" -#: ../../reference/datamodel.rst:2422 +#: ../../reference/datamodel.rst:2417 msgid "" "Special names ``__getattr__`` and ``__dir__`` can be also used to customize " "access to module attributes. The ``__getattr__`` function at the module " @@ -2695,21 +2690,21 @@ msgid "" "with the attribute name and the result is returned." msgstr "" -#: ../../reference/datamodel.rst:2431 +#: ../../reference/datamodel.rst:2426 msgid "" "The ``__dir__`` function should accept no arguments, and return an iterable " "of strings that represents the names accessible on module. If present, this " "function overrides the standard :func:`dir` search on a module." msgstr "" -#: ../../reference/datamodel.rst:2437 +#: ../../reference/datamodel.rst:2432 msgid "" "For a more fine grained customization of the module behavior (setting " "attributes, properties, etc.), one can set the ``__class__`` attribute of a " "module object to a subclass of :class:`types.ModuleType`. For example::" msgstr "" -#: ../../reference/datamodel.rst:2441 +#: ../../reference/datamodel.rst:2436 msgid "" "import sys\n" "from types import ModuleType\n" @@ -2725,7 +2720,7 @@ msgid "" "sys.modules[__name__].__class__ = VerboseModule" msgstr "" -#: ../../reference/datamodel.rst:2455 +#: ../../reference/datamodel.rst:2450 msgid "" "Defining module ``__getattr__`` and setting module ``__class__`` only affect " "lookups made using the attribute access syntax -- directly accessing the " @@ -2733,27 +2728,27 @@ msgid "" "module's globals dictionary) is unaffected." msgstr "" -#: ../../reference/datamodel.rst:2460 +#: ../../reference/datamodel.rst:2455 msgid "``__class__`` module attribute is now writable." msgstr "" -#: ../../reference/datamodel.rst:2463 +#: ../../reference/datamodel.rst:2458 msgid "``__getattr__`` and ``__dir__`` module attributes." msgstr "" -#: ../../reference/datamodel.rst:2468 +#: ../../reference/datamodel.rst:2463 msgid ":pep:`562` - Module __getattr__ and __dir__" msgstr "" -#: ../../reference/datamodel.rst:2469 +#: ../../reference/datamodel.rst:2464 msgid "Describes the ``__getattr__`` and ``__dir__`` functions on modules." msgstr "" -#: ../../reference/datamodel.rst:2475 +#: ../../reference/datamodel.rst:2470 msgid "Implementing Descriptors" msgstr "" -#: ../../reference/datamodel.rst:2477 +#: ../../reference/datamodel.rst:2472 msgid "" "The following methods only apply when an instance of the class containing " "the method (a so-called *descriptor* class) appears in an *owner* class (the " @@ -2764,7 +2759,7 @@ msgid "" "does not implement any of these protocols." msgstr "" -#: ../../reference/datamodel.rst:2487 +#: ../../reference/datamodel.rst:2482 msgid "" "Called to get the attribute of the owner class (class attribute access) or " "of an instance of that class (instance attribute access). The optional " @@ -2773,13 +2768,13 @@ msgid "" "accessed through the *owner*." msgstr "" -#: ../../reference/datamodel.rst:2493 +#: ../../reference/datamodel.rst:2488 msgid "" "This method should return the computed attribute value or raise an :exc:" "`AttributeError` exception." msgstr "" -#: ../../reference/datamodel.rst:2496 +#: ../../reference/datamodel.rst:2491 msgid "" ":PEP:`252` specifies that :meth:`__get__` is callable with one or two " "arguments. Python's own built-in descriptors support this specification; " @@ -2789,31 +2784,31 @@ msgid "" "not." msgstr "" -#: ../../reference/datamodel.rst:2505 +#: ../../reference/datamodel.rst:2500 msgid "" "Called to set the attribute on an instance *instance* of the owner class to " "a new value, *value*." msgstr "" -#: ../../reference/datamodel.rst:2508 +#: ../../reference/datamodel.rst:2503 msgid "" "Note, adding :meth:`__set__` or :meth:`__delete__` changes the kind of " "descriptor to a \"data descriptor\". See :ref:`descriptor-invocation` for " "more details." msgstr "" -#: ../../reference/datamodel.rst:2514 +#: ../../reference/datamodel.rst:2509 msgid "" "Called to delete the attribute on an instance *instance* of the owner class." msgstr "" -#: ../../reference/datamodel.rst:2516 +#: ../../reference/datamodel.rst:2511 msgid "" "Instances of descriptors may also have the :attr:`!__objclass__` attribute " "present:" msgstr "" -#: ../../reference/datamodel.rst:2521 +#: ../../reference/datamodel.rst:2516 msgid "" "The attribute :attr:`!__objclass__` is interpreted by the :mod:`inspect` " "module as specifying the class where this object was defined (setting this " @@ -2824,11 +2819,11 @@ msgid "" "are implemented in C)." msgstr "" -#: ../../reference/datamodel.rst:2532 +#: ../../reference/datamodel.rst:2527 msgid "Invoking Descriptors" msgstr "" -#: ../../reference/datamodel.rst:2534 +#: ../../reference/datamodel.rst:2529 msgid "" "In general, a descriptor is an object attribute with \"binding behavior\", " "one whose attribute access has been overridden by methods in the descriptor " @@ -2837,7 +2832,7 @@ msgid "" "is said to be a descriptor." msgstr "" -#: ../../reference/datamodel.rst:2540 +#: ../../reference/datamodel.rst:2535 msgid "" "The default behavior for attribute access is to get, set, or delete the " "attribute from an object's dictionary. For instance, ``a.x`` has a lookup " @@ -2845,7 +2840,7 @@ msgid "" "continuing through the base classes of ``type(a)`` excluding metaclasses." msgstr "" -#: ../../reference/datamodel.rst:2545 +#: ../../reference/datamodel.rst:2540 msgid "" "However, if the looked-up value is an object defining one of the descriptor " "methods, then Python may override the default behavior and invoke the " @@ -2853,54 +2848,54 @@ msgid "" "depends on which descriptor methods were defined and how they were called." msgstr "" -#: ../../reference/datamodel.rst:2550 +#: ../../reference/datamodel.rst:2545 msgid "" "The starting point for descriptor invocation is a binding, ``a.x``. How the " "arguments are assembled depends on ``a``:" msgstr "" -#: ../../reference/datamodel.rst:2553 +#: ../../reference/datamodel.rst:2548 msgid "Direct Call" msgstr "" -#: ../../reference/datamodel.rst:2554 +#: ../../reference/datamodel.rst:2549 msgid "" "The simplest and least common call is when user code directly invokes a " "descriptor method: ``x.__get__(a)``." msgstr "" -#: ../../reference/datamodel.rst:2557 +#: ../../reference/datamodel.rst:2552 msgid "Instance Binding" msgstr "" -#: ../../reference/datamodel.rst:2558 +#: ../../reference/datamodel.rst:2553 msgid "" "If binding to an object instance, ``a.x`` is transformed into the call: " "``type(a).__dict__['x'].__get__(a, type(a))``." msgstr "" -#: ../../reference/datamodel.rst:2561 +#: ../../reference/datamodel.rst:2556 msgid "Class Binding" msgstr "" -#: ../../reference/datamodel.rst:2562 +#: ../../reference/datamodel.rst:2557 msgid "" "If binding to a class, ``A.x`` is transformed into the call: ``A." "__dict__['x'].__get__(None, A)``." msgstr "" -#: ../../reference/datamodel.rst:2565 +#: ../../reference/datamodel.rst:2560 msgid "Super Binding" msgstr "" -#: ../../reference/datamodel.rst:2566 +#: ../../reference/datamodel.rst:2561 msgid "" "A dotted lookup such as ``super(A, a).x`` searches ``a.__class__.__mro__`` " "for a base class ``B`` following ``A`` and then returns ``B.__dict__['x']." "__get__(a, A)``. If not a descriptor, ``x`` is returned unchanged." msgstr "" -#: ../../reference/datamodel.rst:2603 +#: ../../reference/datamodel.rst:2598 msgid "" "For instance bindings, the precedence of descriptor invocation depends on " "which descriptor methods are defined. A descriptor can define any " @@ -2918,7 +2913,7 @@ msgid "" "instances." msgstr "" -#: ../../reference/datamodel.rst:2618 +#: ../../reference/datamodel.rst:2613 msgid "" "Python methods (including those decorated with :deco:`staticmethod` and :" "deco:`classmethod`) are implemented as non-data descriptors. Accordingly, " @@ -2927,30 +2922,30 @@ msgid "" "class." msgstr "" -#: ../../reference/datamodel.rst:2624 +#: ../../reference/datamodel.rst:2619 msgid "" "The :deco:`property` decorator is implemented as a data descriptor. " "Accordingly, instances cannot override the behavior of a property." msgstr "" -#: ../../reference/datamodel.rst:2631 +#: ../../reference/datamodel.rst:2626 msgid "__slots__" msgstr "" -#: ../../reference/datamodel.rst:2633 +#: ../../reference/datamodel.rst:2628 msgid "" "*__slots__* allow us to explicitly declare data members (like properties) " "and deny the creation of :attr:`~object.__dict__` and *__weakref__* (unless " "explicitly declared in *__slots__* or available in a parent.)" msgstr "" -#: ../../reference/datamodel.rst:2637 +#: ../../reference/datamodel.rst:2632 msgid "" "The space saved over using :attr:`~object.__dict__` can be significant. " "Attribute lookup speed can be significantly improved as well." msgstr "" -#: ../../reference/datamodel.rst:2642 +#: ../../reference/datamodel.rst:2637 msgid "" "This class variable can be assigned a string, iterable, or sequence of " "strings with variable names used by instances. *__slots__* reserves space " @@ -2958,18 +2953,18 @@ msgid "" "`~object.__dict__` and *__weakref__* for each instance." msgstr "" -#: ../../reference/datamodel.rst:2651 +#: ../../reference/datamodel.rst:2646 msgid "Notes on using *__slots__*:" msgstr "" -#: ../../reference/datamodel.rst:2653 +#: ../../reference/datamodel.rst:2648 msgid "" "When inheriting from a class without *__slots__*, the :attr:`~object." "__dict__` and *__weakref__* attribute of the instances will always be " "accessible." msgstr "" -#: ../../reference/datamodel.rst:2657 +#: ../../reference/datamodel.rst:2652 msgid "" "Without a :attr:`~object.__dict__` variable, instances cannot be assigned " "new variables not listed in the *__slots__* definition. Attempts to assign " @@ -2978,7 +2973,7 @@ msgid "" "sequence of strings in the *__slots__* declaration." msgstr "" -#: ../../reference/datamodel.rst:2664 +#: ../../reference/datamodel.rst:2659 msgid "" "Without a *__weakref__* variable for each instance, classes defining " "*__slots__* do not support :mod:`weak references ` to its " @@ -2986,7 +2981,7 @@ msgid "" "to the sequence of strings in the *__slots__* declaration." msgstr "" -#: ../../reference/datamodel.rst:2670 +#: ../../reference/datamodel.rst:2665 msgid "" "*__slots__* are implemented at the class level by creating :ref:`descriptors " "` for each variable name. As a result, class attributes cannot " @@ -2994,7 +2989,7 @@ msgid "" "otherwise, the class attribute would overwrite the descriptor assignment." msgstr "" -#: ../../reference/datamodel.rst:2676 +#: ../../reference/datamodel.rst:2671 msgid "" "The action of a *__slots__* declaration is not limited to the class where it " "is defined. *__slots__* declared in parents are available in child classes. " @@ -3003,7 +2998,7 @@ msgid "" "only contain names of any *additional* slots)." msgstr "" -#: ../../reference/datamodel.rst:2682 +#: ../../reference/datamodel.rst:2677 msgid "" "If a class defines a slot also defined in a base class, the instance " "variable defined by the base class slot is inaccessible (except by " @@ -3012,7 +3007,7 @@ msgid "" "prevent this." msgstr "" -#: ../../reference/datamodel.rst:2687 +#: ../../reference/datamodel.rst:2682 msgid "" ":exc:`TypeError` will be raised if *__slots__* other than *__dict__* and " "*__weakref__* are defined for a class derived from a :c:member:`\"variable-" @@ -3020,11 +3015,11 @@ msgid "" "class:`bytes`, and :class:`type`, except :class:`tuple`." msgstr "" -#: ../../reference/datamodel.rst:2692 +#: ../../reference/datamodel.rst:2687 msgid "Any non-string :term:`iterable` may be assigned to *__slots__*." msgstr "" -#: ../../reference/datamodel.rst:2694 +#: ../../reference/datamodel.rst:2689 msgid "" "If a :class:`dictionary ` is used to assign *__slots__*, the " "dictionary keys will be used as the slot names. The values of the dictionary " @@ -3032,13 +3027,13 @@ msgid "" "func:`inspect.getdoc` and displayed in the output of :func:`help`." msgstr "" -#: ../../reference/datamodel.rst:2699 +#: ../../reference/datamodel.rst:2694 msgid "" ":attr:`~object.__class__` assignment works only if both classes have the " "same *__slots__*." msgstr "" -#: ../../reference/datamodel.rst:2702 +#: ../../reference/datamodel.rst:2697 msgid "" ":ref:`Multiple inheritance ` with multiple slotted " "parent classes can be used, but only one parent is allowed to have " @@ -3046,24 +3041,24 @@ msgid "" "violations raise :exc:`TypeError`." msgstr "" -#: ../../reference/datamodel.rst:2708 +#: ../../reference/datamodel.rst:2703 msgid "" "If an :term:`iterator` is used for *__slots__* then a :term:`descriptor` is " "created for each of the iterator's values. However, the *__slots__* " "attribute will be an empty iterator." msgstr "" -#: ../../reference/datamodel.rst:2713 +#: ../../reference/datamodel.rst:2708 msgid "" "Allowed defining the *__dict__* and *__weakref__* *__slots__* for any class. " "Allowed defining any *__slots__* for a class derived from :class:`tuple`." msgstr "" -#: ../../reference/datamodel.rst:2721 +#: ../../reference/datamodel.rst:2716 msgid "Customizing class creation" msgstr "" -#: ../../reference/datamodel.rst:2723 +#: ../../reference/datamodel.rst:2718 msgid "" "Whenever a class inherits from another class, :meth:`~object." "__init_subclass__` is called on the parent class. This way, it is possible " @@ -3073,14 +3068,14 @@ msgid "" "future subclasses of the class defining the method." msgstr "" -#: ../../reference/datamodel.rst:2732 +#: ../../reference/datamodel.rst:2727 msgid "" "This method is called whenever the containing class is subclassed. *cls* is " "then the new subclass. If defined as a normal instance method, this method " "is implicitly converted to a class method." msgstr "" -#: ../../reference/datamodel.rst:2736 +#: ../../reference/datamodel.rst:2731 msgid "" "Keyword arguments which are given to a new class are passed to the parent " "class's ``__init_subclass__``. For compatibility with other classes using " @@ -3088,7 +3083,7 @@ msgid "" "pass the others over to the base class, as in::" msgstr "" -#: ../../reference/datamodel.rst:2742 +#: ../../reference/datamodel.rst:2737 msgid "" "class Philosopher:\n" " def __init_subclass__(cls, /, default_name, **kwargs):\n" @@ -3099,13 +3094,13 @@ msgid "" " pass" msgstr "" -#: ../../reference/datamodel.rst:2750 +#: ../../reference/datamodel.rst:2745 msgid "" "The default implementation ``object.__init_subclass__`` does nothing, but " "raises an error if it is called with any arguments." msgstr "" -#: ../../reference/datamodel.rst:2755 +#: ../../reference/datamodel.rst:2750 msgid "" "The metaclass hint ``metaclass`` is consumed by the rest of the type " "machinery, and is never passed to ``__init_subclass__`` implementations. The " @@ -3113,32 +3108,32 @@ msgid "" "``type(cls)``." msgstr "" -#: ../../reference/datamodel.rst:2763 +#: ../../reference/datamodel.rst:2758 msgid "" "When a class is created, :meth:`!type.__new__` scans the class variables and " "makes callbacks to those with a :meth:`~object.__set_name__` hook." msgstr "" -#: ../../reference/datamodel.rst:2768 +#: ../../reference/datamodel.rst:2763 msgid "" "Automatically called at the time the owning class *owner* is created. The " "object has been assigned to *name* in that class::" msgstr "" -#: ../../reference/datamodel.rst:2771 +#: ../../reference/datamodel.rst:2766 msgid "" "class A:\n" " x = C() # Automatically calls: x.__set_name__(A, 'x')" msgstr "" -#: ../../reference/datamodel.rst:2774 +#: ../../reference/datamodel.rst:2769 msgid "" "If the class variable is assigned after the class is created, :meth:" "`__set_name__` will not be called automatically. If needed, :meth:" "`__set_name__` can be called directly::" msgstr "" -#: ../../reference/datamodel.rst:2778 +#: ../../reference/datamodel.rst:2773 msgid "" "class A:\n" " pass\n" @@ -3148,22 +3143,22 @@ msgid "" "c.__set_name__(A, 'x') # Manually invoke the hook" msgstr "" -#: ../../reference/datamodel.rst:2785 +#: ../../reference/datamodel.rst:2780 msgid "See :ref:`class-object-creation` for more details." msgstr "" -#: ../../reference/datamodel.rst:2793 +#: ../../reference/datamodel.rst:2788 msgid "Metaclasses" msgstr "" -#: ../../reference/datamodel.rst:2800 +#: ../../reference/datamodel.rst:2795 msgid "" "By default, classes are constructed using :func:`type`. The class body is " "executed in a new namespace and the class name is bound locally to the " "result of ``type(name, bases, namespace)``." msgstr "" -#: ../../reference/datamodel.rst:2804 +#: ../../reference/datamodel.rst:2799 msgid "" "The class creation process can be customized by passing the ``metaclass`` " "keyword argument in the class definition line, or by inheriting from an " @@ -3171,7 +3166,7 @@ msgid "" "both ``MyClass`` and ``MySubclass`` are instances of ``Meta``::" msgstr "" -#: ../../reference/datamodel.rst:2809 +#: ../../reference/datamodel.rst:2804 msgid "" "class Meta(type):\n" " pass\n" @@ -3183,41 +3178,41 @@ msgid "" " pass" msgstr "" -#: ../../reference/datamodel.rst:2818 +#: ../../reference/datamodel.rst:2813 msgid "" "Any other keyword arguments that are specified in the class definition are " "passed through to all metaclass operations described below." msgstr "" -#: ../../reference/datamodel.rst:2821 +#: ../../reference/datamodel.rst:2816 msgid "When a class definition is executed, the following steps occur:" msgstr "" -#: ../../reference/datamodel.rst:2823 +#: ../../reference/datamodel.rst:2818 msgid "MRO entries are resolved;" msgstr "" -#: ../../reference/datamodel.rst:2824 +#: ../../reference/datamodel.rst:2819 msgid "the appropriate metaclass is determined;" msgstr "" -#: ../../reference/datamodel.rst:2825 +#: ../../reference/datamodel.rst:2820 msgid "the class namespace is prepared;" msgstr "" -#: ../../reference/datamodel.rst:2826 +#: ../../reference/datamodel.rst:2821 msgid "the class body is executed;" msgstr "" -#: ../../reference/datamodel.rst:2827 +#: ../../reference/datamodel.rst:2822 msgid "the class object is created." msgstr "" -#: ../../reference/datamodel.rst:2831 +#: ../../reference/datamodel.rst:2826 msgid "Resolving MRO entries" msgstr "" -#: ../../reference/datamodel.rst:2835 +#: ../../reference/datamodel.rst:2830 msgid "" "If a base that appears in a class definition is not an instance of :class:" "`type`, then an :meth:`!__mro_entries__` method is searched on the base. If " @@ -3229,59 +3224,59 @@ msgid "" "is ignored." msgstr "" -#: ../../reference/datamodel.rst:2846 +#: ../../reference/datamodel.rst:2841 msgid ":func:`types.resolve_bases`" msgstr "" -#: ../../reference/datamodel.rst:2847 +#: ../../reference/datamodel.rst:2842 msgid "Dynamically resolve bases that are not instances of :class:`type`." msgstr "" -#: ../../reference/datamodel.rst:2849 +#: ../../reference/datamodel.rst:2844 msgid ":func:`types.get_original_bases`" msgstr "" -#: ../../reference/datamodel.rst:2850 +#: ../../reference/datamodel.rst:2845 msgid "" "Retrieve a class's \"original bases\" prior to modifications by :meth:" "`~object.__mro_entries__`." msgstr "" -#: ../../reference/datamodel.rst:2853 +#: ../../reference/datamodel.rst:2848 msgid ":pep:`560`" msgstr "" -#: ../../reference/datamodel.rst:2854 +#: ../../reference/datamodel.rst:2849 msgid "Core support for typing module and generic types." msgstr "" -#: ../../reference/datamodel.rst:2860 +#: ../../reference/datamodel.rst:2855 msgid "Determining the appropriate metaclass" msgstr "" -#: ../../reference/datamodel.rst:2864 +#: ../../reference/datamodel.rst:2859 msgid "" "The appropriate metaclass for a class definition is determined as follows:" msgstr "" -#: ../../reference/datamodel.rst:2866 +#: ../../reference/datamodel.rst:2861 msgid "" "if no bases and no explicit metaclass are given, then :func:`type` is used;" msgstr "" -#: ../../reference/datamodel.rst:2867 +#: ../../reference/datamodel.rst:2862 msgid "" "if an explicit metaclass is given and it is *not* an instance of :func:" "`type`, then it is used directly as the metaclass;" msgstr "" -#: ../../reference/datamodel.rst:2869 +#: ../../reference/datamodel.rst:2864 msgid "" "if an instance of :func:`type` is given as the explicit metaclass, or bases " "are defined, then the most derived metaclass is used." msgstr "" -#: ../../reference/datamodel.rst:2872 +#: ../../reference/datamodel.rst:2867 msgid "" "The most derived metaclass is selected from the explicitly specified " "metaclass (if any) and the metaclasses (i.e. ``type(cls)``) of all specified " @@ -3290,11 +3285,11 @@ msgid "" "that criterion, then the class definition will fail with ``TypeError``." msgstr "" -#: ../../reference/datamodel.rst:2882 +#: ../../reference/datamodel.rst:2877 msgid "Preparing the class namespace" msgstr "" -#: ../../reference/datamodel.rst:2887 +#: ../../reference/datamodel.rst:2882 msgid "" "Once the appropriate metaclass has been identified, then the class namespace " "is prepared. If the metaclass has a ``__prepare__`` attribute, it is called " @@ -3306,25 +3301,25 @@ msgid "" "copied into a new ``dict``." msgstr "" -#: ../../reference/datamodel.rst:2896 +#: ../../reference/datamodel.rst:2891 msgid "" "If the metaclass has no ``__prepare__`` attribute, then the class namespace " "is initialised as an empty ordered mapping." msgstr "" -#: ../../reference/datamodel.rst:2901 +#: ../../reference/datamodel.rst:2896 msgid ":pep:`3115` - Metaclasses in Python 3000" msgstr "" -#: ../../reference/datamodel.rst:2902 +#: ../../reference/datamodel.rst:2897 msgid "Introduced the ``__prepare__`` namespace hook" msgstr "" -#: ../../reference/datamodel.rst:2906 +#: ../../reference/datamodel.rst:2901 msgid "Executing the class body" msgstr "" -#: ../../reference/datamodel.rst:2911 +#: ../../reference/datamodel.rst:2906 msgid "" "The class body is executed (approximately) as ``exec(body, globals(), " "namespace)``. The key difference from a normal call to :func:`exec` is that " @@ -3333,7 +3328,7 @@ msgid "" "inside a function." msgstr "" -#: ../../reference/datamodel.rst:2917 +#: ../../reference/datamodel.rst:2912 msgid "" "However, even when the class definition occurs inside the function, methods " "defined inside the class still cannot see names defined at the class scope. " @@ -3342,11 +3337,11 @@ msgid "" "reference described in the next section." msgstr "" -#: ../../reference/datamodel.rst:2926 +#: ../../reference/datamodel.rst:2921 msgid "Creating the class object" msgstr "" -#: ../../reference/datamodel.rst:2933 +#: ../../reference/datamodel.rst:2928 msgid "" "Once the class namespace has been populated by executing the class body, the " "class object is created by calling ``metaclass(name, bases, namespace, " @@ -3354,7 +3349,7 @@ msgid "" "to ``__prepare__``)." msgstr "" -#: ../../reference/datamodel.rst:2938 +#: ../../reference/datamodel.rst:2933 msgid "" "This class object is the one that will be referenced by the zero-argument " "form of :func:`super`. ``__class__`` is an implicit closure reference " @@ -3365,7 +3360,7 @@ msgid "" "is identified based on the first argument passed to the method." msgstr "" -#: ../../reference/datamodel.rst:2948 +#: ../../reference/datamodel.rst:2943 msgid "" "In CPython 3.6 and later, the ``__class__`` cell is passed to the metaclass " "as a ``__classcell__`` entry in the class namespace. If present, this must " @@ -3374,39 +3369,39 @@ msgid "" "in Python 3.8." msgstr "" -#: ../../reference/datamodel.rst:2954 +#: ../../reference/datamodel.rst:2949 msgid "" "When using the default metaclass :class:`type`, or any metaclass that " "ultimately calls ``type.__new__``, the following additional customization " "steps are invoked after creating the class object:" msgstr "" -#: ../../reference/datamodel.rst:2958 +#: ../../reference/datamodel.rst:2953 msgid "" "The ``type.__new__`` method collects all of the attributes in the class " "namespace that define a :meth:`~object.__set_name__` method;" msgstr "" -#: ../../reference/datamodel.rst:2960 +#: ../../reference/datamodel.rst:2955 msgid "" "Those ``__set_name__`` methods are called with the class being defined and " "the assigned name of that particular attribute;" msgstr "" -#: ../../reference/datamodel.rst:2962 +#: ../../reference/datamodel.rst:2957 msgid "" "The :meth:`~object.__init_subclass__` hook is called on the immediate parent " "of the new class in its method resolution order." msgstr "" -#: ../../reference/datamodel.rst:2965 +#: ../../reference/datamodel.rst:2960 msgid "" "After the class object is created, it is passed to the class decorators " "included in the class definition (if any) and the resulting object is bound " "in the local namespace as the defined class." msgstr "" -#: ../../reference/datamodel.rst:2969 +#: ../../reference/datamodel.rst:2964 msgid "" "When a new class is created by ``type.__new__``, the object provided as the " "namespace parameter is copied to a new ordered mapping and the original " @@ -3414,19 +3409,19 @@ msgid "" "becomes the :attr:`~type.__dict__` attribute of the class object." msgstr "" -#: ../../reference/datamodel.rst:2976 +#: ../../reference/datamodel.rst:2971 msgid ":pep:`3135` - New super" msgstr "" -#: ../../reference/datamodel.rst:2977 +#: ../../reference/datamodel.rst:2972 msgid "Describes the implicit ``__class__`` closure reference" msgstr "" -#: ../../reference/datamodel.rst:2981 +#: ../../reference/datamodel.rst:2976 msgid "Uses for metaclasses" msgstr "" -#: ../../reference/datamodel.rst:2983 +#: ../../reference/datamodel.rst:2978 msgid "" "The potential uses for metaclasses are boundless. Some ideas that have been " "explored include enum, logging, interface checking, automatic delegation, " @@ -3434,17 +3429,17 @@ msgid "" "locking/synchronization." msgstr "" -#: ../../reference/datamodel.rst:2990 +#: ../../reference/datamodel.rst:2985 msgid "Customizing instance and subclass checks" msgstr "" -#: ../../reference/datamodel.rst:2992 +#: ../../reference/datamodel.rst:2987 msgid "" "The following methods are used to override the default behavior of the :func:" "`isinstance` and :func:`issubclass` built-in functions." msgstr "" -#: ../../reference/datamodel.rst:2995 +#: ../../reference/datamodel.rst:2990 msgid "" "In particular, the metaclass :class:`abc.ABCMeta` implements these methods " "in order to allow the addition of Abstract Base Classes (ABCs) as \"virtual " @@ -3452,21 +3447,21 @@ msgid "" "other ABCs." msgstr "" -#: ../../reference/datamodel.rst:3002 +#: ../../reference/datamodel.rst:2997 msgid "" "Return true if *instance* should be considered a (direct or indirect) " "instance of *class*. If defined, called to implement ``isinstance(instance, " "class)``." msgstr "" -#: ../../reference/datamodel.rst:3009 +#: ../../reference/datamodel.rst:3004 msgid "" "Return true if *subclass* should be considered a (direct or indirect) " "subclass of *class*. If defined, called to implement ``issubclass(subclass, " "class)``." msgstr "" -#: ../../reference/datamodel.rst:3014 +#: ../../reference/datamodel.rst:3009 msgid "" "Note that these methods are looked up on the type (metaclass) of a class. " "They cannot be defined as class methods in the actual class. This is " @@ -3474,11 +3469,11 @@ msgid "" "only in this case the instance is itself a class." msgstr "" -#: ../../reference/datamodel.rst:3021 +#: ../../reference/datamodel.rst:3016 msgid ":pep:`3119` - Introducing Abstract Base Classes" msgstr "" -#: ../../reference/datamodel.rst:3022 +#: ../../reference/datamodel.rst:3017 msgid "" "Includes the specification for customizing :func:`isinstance` and :func:" "`issubclass` behavior through :meth:`~type.__instancecheck__` and :meth:" @@ -3487,11 +3482,11 @@ msgid "" "language." msgstr "" -#: ../../reference/datamodel.rst:3030 +#: ../../reference/datamodel.rst:3025 msgid "Emulating generic types" msgstr "" -#: ../../reference/datamodel.rst:3032 +#: ../../reference/datamodel.rst:3027 msgid "" "When using :term:`type annotations`, it is often useful to " "*parameterize* a :term:`generic type` using Python's square-brackets " @@ -3499,65 +3494,65 @@ msgid "" "a :class:`list` in which all the elements are of type :class:`int`." msgstr "" -#: ../../reference/datamodel.rst:3039 +#: ../../reference/datamodel.rst:3034 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../reference/datamodel.rst:3040 +#: ../../reference/datamodel.rst:3035 msgid "Introducing Python's framework for type annotations" msgstr "" -#: ../../reference/datamodel.rst:3042 +#: ../../reference/datamodel.rst:3037 msgid ":ref:`Generic Alias Types`" msgstr "" -#: ../../reference/datamodel.rst:3043 +#: ../../reference/datamodel.rst:3038 msgid "Documentation for objects representing parameterized generic classes" msgstr "" -#: ../../reference/datamodel.rst:3045 +#: ../../reference/datamodel.rst:3040 msgid "" ":ref:`Generics`, :ref:`user-defined generics` and :" "class:`typing.Generic`" msgstr "" -#: ../../reference/datamodel.rst:3046 +#: ../../reference/datamodel.rst:3041 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../reference/datamodel.rst:3049 +#: ../../reference/datamodel.rst:3044 msgid "" "A class can *generally* only be parameterized if it defines the special " "class method ``__class_getitem__()``." msgstr "" -#: ../../reference/datamodel.rst:3054 +#: ../../reference/datamodel.rst:3049 msgid "" "Return an object representing the specialization of a generic class by type " "arguments found in *key*." msgstr "" -#: ../../reference/datamodel.rst:3057 +#: ../../reference/datamodel.rst:3052 msgid "" "When defined on a class, ``__class_getitem__()`` is automatically a class " "method. As such, there is no need for it to be decorated with :deco:" "`classmethod` when it is defined." msgstr "" -#: ../../reference/datamodel.rst:3063 +#: ../../reference/datamodel.rst:3058 msgid "The purpose of *__class_getitem__*" msgstr "" -#: ../../reference/datamodel.rst:3065 +#: ../../reference/datamodel.rst:3060 msgid "" "The purpose of :meth:`~object.__class_getitem__` is to allow runtime " "parameterization of standard-library generic classes in order to more easily " "apply :term:`type hints` to these classes." msgstr "" -#: ../../reference/datamodel.rst:3069 +#: ../../reference/datamodel.rst:3064 msgid "" "To implement custom generic classes that can be parameterized at runtime and " "understood by static type-checkers, users should either inherit from a " @@ -3566,7 +3561,7 @@ msgid "" "own implementation of ``__class_getitem__()``." msgstr "" -#: ../../reference/datamodel.rst:3075 +#: ../../reference/datamodel.rst:3070 msgid "" "Custom implementations of :meth:`~object.__class_getitem__` on classes " "defined outside of the standard library may not be understood by third-party " @@ -3574,11 +3569,11 @@ msgid "" "purposes other than type hinting is discouraged." msgstr "" -#: ../../reference/datamodel.rst:3085 +#: ../../reference/datamodel.rst:3080 msgid "*__class_getitem__* versus *__getitem__*" msgstr "" -#: ../../reference/datamodel.rst:3087 +#: ../../reference/datamodel.rst:3082 msgid "" "Usually, the :ref:`subscription` of an object using square " "brackets will call the :meth:`~object.__getitem__` instance method defined " @@ -3588,14 +3583,14 @@ msgid "" "genericalias>` object if it is properly defined." msgstr "" -#: ../../reference/datamodel.rst:3094 +#: ../../reference/datamodel.rst:3089 msgid "" "Presented with the :term:`expression` ``obj[x]``, the Python interpreter " "follows something like the following process to decide whether :meth:" "`~object.__getitem__` or :meth:`~object.__class_getitem__` should be called::" msgstr "" -#: ../../reference/datamodel.rst:3099 +#: ../../reference/datamodel.rst:3094 msgid "" "from inspect import isclass\n" "\n" @@ -3621,7 +3616,7 @@ msgid "" " )" msgstr "" -#: ../../reference/datamodel.rst:3122 +#: ../../reference/datamodel.rst:3117 msgid "" "In Python, all classes are themselves instances of other classes. The class " "of a class is known as that class's :term:`metaclass`, and most classes have " @@ -3631,7 +3626,7 @@ msgid "" "__class_getitem__` being called::" msgstr "" -#: ../../reference/datamodel.rst:3129 +#: ../../reference/datamodel.rst:3124 msgid "" ">>> # list has class \"type\" as its metaclass, like most classes:\n" ">>> type(list)\n" @@ -3646,14 +3641,14 @@ msgid "" "" msgstr "" -#: ../../reference/datamodel.rst:3141 +#: ../../reference/datamodel.rst:3136 msgid "" "However, if a class has a custom metaclass that defines :meth:`~object." "__getitem__`, subscribing the class may result in different behaviour. An " "example of this can be found in the :mod:`enum` module::" msgstr "" -#: ../../reference/datamodel.rst:3145 +#: ../../reference/datamodel.rst:3140 msgid "" ">>> from enum import Enum\n" ">>> class Menu(Enum):\n" @@ -3673,33 +3668,33 @@ msgid "" "" msgstr "" -#: ../../reference/datamodel.rst:3164 +#: ../../reference/datamodel.rst:3159 msgid ":pep:`560` - Core Support for typing module and generic types" msgstr "" -#: ../../reference/datamodel.rst:3165 +#: ../../reference/datamodel.rst:3160 msgid "" "Introducing :meth:`~object.__class_getitem__`, and outlining when a :ref:" "`subscription` results in ``__class_getitem__()`` being " "called instead of :meth:`~object.__getitem__`" msgstr "" -#: ../../reference/datamodel.rst:3173 +#: ../../reference/datamodel.rst:3168 msgid "Emulating callable objects" msgstr "" -#: ../../reference/datamodel.rst:3180 +#: ../../reference/datamodel.rst:3175 msgid "" "Called when the instance is \"called\" as a function; if this method is " "defined, ``x(arg1, arg2, ...)`` roughly translates to ``type(x).__call__(x, " "arg1, ...)``. The :class:`object` class itself does not provide this method." msgstr "" -#: ../../reference/datamodel.rst:3188 +#: ../../reference/datamodel.rst:3183 msgid "Emulating container types" msgstr "" -#: ../../reference/datamodel.rst:3190 +#: ../../reference/datamodel.rst:3185 msgid "" "The following methods can be defined to implement container objects. None of " "them are provided by the :class:`object` class itself. Containers usually " @@ -3720,7 +3715,7 @@ msgid "" "__setitem__`, :meth:`~object.__delitem__`, and :meth:`!keys`." msgstr "" -#: ../../reference/datamodel.rst:3209 +#: ../../reference/datamodel.rst:3204 msgid "" "Mutable sequences should provide methods :meth:`~sequence.append`, :meth:" "`~sequence.clear`, :meth:`~sequence.count`, :meth:`~sequence.extend`, :meth:" @@ -3734,7 +3729,7 @@ msgid "" "numerical operators." msgstr "" -#: ../../reference/datamodel.rst:3221 +#: ../../reference/datamodel.rst:3216 msgid "" "It is recommended that both mappings and sequences implement the :meth:" "`~object.__contains__` method to allow efficient use of the ``in`` operator; " @@ -3746,7 +3741,7 @@ msgid "" "iterate through the values." msgstr "" -#: ../../reference/datamodel.rst:3236 +#: ../../reference/datamodel.rst:3231 msgid "" "Called to implement the built-in function :func:`len`. Should return the " "length of the object, an integer ``>=`` 0. Also, an object that doesn't " @@ -3754,7 +3749,7 @@ msgid "" "returns zero is considered to be false in a Boolean context." msgstr "" -#: ../../reference/datamodel.rst:3243 +#: ../../reference/datamodel.rst:3238 msgid "" "In CPython, the length is required to be at most :data:`sys.maxsize`. If the " "length is larger than :data:`!sys.maxsize` some features (such as :func:" @@ -3763,7 +3758,7 @@ msgid "" "`~object.__bool__` method." msgstr "" -#: ../../reference/datamodel.rst:3252 +#: ../../reference/datamodel.rst:3247 msgid "" "Called to implement :func:`operator.length_hint`. Should return an estimated " "length for the object (which may be greater or less than the actual length). " @@ -3773,19 +3768,19 @@ msgid "" "never required for correctness." msgstr "" -#: ../../reference/datamodel.rst:3264 +#: ../../reference/datamodel.rst:3259 msgid "" "Called to implement *subscription*, that is, ``self[subscript]``. See :ref:" "`subscriptions` for details on the syntax." msgstr "" -#: ../../reference/datamodel.rst:3267 +#: ../../reference/datamodel.rst:3262 msgid "" "There are two types of built-in objects that support subscription via :meth:" "`!__getitem__`:" msgstr "" -#: ../../reference/datamodel.rst:3270 +#: ../../reference/datamodel.rst:3265 msgid "" "**sequences**, where *subscript* (also called :term:`index`) should be an " "integer or a :class:`slice` object. See the :ref:`sequence documentation " @@ -3793,13 +3788,13 @@ msgid "" "`slice` objects and negative indices." msgstr "" -#: ../../reference/datamodel.rst:3274 +#: ../../reference/datamodel.rst:3269 msgid "" "**mappings**, where *subscript* is also called the :term:`key`. See :ref:" "`mapping documentation ` for the expected behavior." msgstr "" -#: ../../reference/datamodel.rst:3278 +#: ../../reference/datamodel.rst:3273 msgid "" "If *subscript* is of an inappropriate type, :meth:`!__getitem__` should " "raise :exc:`TypeError`. If *subscript* has an inappropriate value, :meth:`!" @@ -3807,43 +3802,43 @@ msgid "" "exc:`IndexError` for sequences; :exc:`KeyError` for mappings)." msgstr "" -#: ../../reference/datamodel.rst:3288 +#: ../../reference/datamodel.rst:3283 msgid "" "Slicing is handled by :meth:`!__getitem__`, :meth:`~object.__setitem__`, " "and :meth:`~object.__delitem__`. A call like ::" msgstr "" -#: ../../reference/datamodel.rst:3292 +#: ../../reference/datamodel.rst:3287 msgid "a[1:2] = b" msgstr "" -#: ../../reference/datamodel.rst:3294 +#: ../../reference/datamodel.rst:3289 msgid "is translated to ::" msgstr "" -#: ../../reference/datamodel.rst:3296 +#: ../../reference/datamodel.rst:3291 msgid "a[slice(1, 2, None)] = b" msgstr "" -#: ../../reference/datamodel.rst:3298 +#: ../../reference/datamodel.rst:3293 msgid "and so forth. Missing slice items are always filled in with ``None``." msgstr "" -#: ../../reference/datamodel.rst:3302 +#: ../../reference/datamodel.rst:3297 msgid "" "The sequence iteration protocol (used, for example, in :keyword:`for` " "loops), expects that an :exc:`IndexError` will be raised for illegal indexes " "to allow proper detection of the end of a sequence." msgstr "" -#: ../../reference/datamodel.rst:3308 +#: ../../reference/datamodel.rst:3303 msgid "" "When :ref:`subscripting ` a *class*, the special class " "method :meth:`~object.__class_getitem__` may be called instead of :meth:`!" "__getitem__`. See :ref:`classgetitem-versus-getitem` for more details." msgstr "" -#: ../../reference/datamodel.rst:3316 +#: ../../reference/datamodel.rst:3311 msgid "" "Called to implement assignment to ``self[key]``. Same note as for :meth:" "`__getitem__`. This should only be implemented for mappings if the objects " @@ -3852,7 +3847,7 @@ msgid "" "for improper *key* values as for the :meth:`__getitem__` method." msgstr "" -#: ../../reference/datamodel.rst:3325 +#: ../../reference/datamodel.rst:3320 msgid "" "Called to implement deletion of ``self[key]``. Same note as for :meth:" "`__getitem__`. This should only be implemented for mappings if the objects " @@ -3861,13 +3856,13 @@ msgid "" "values as for the :meth:`__getitem__` method." msgstr "" -#: ../../reference/datamodel.rst:3334 +#: ../../reference/datamodel.rst:3329 msgid "" "Called by :class:`dict`\\ .\\ :meth:`__getitem__` to implement ``self[key]`` " "for dict subclasses when key is not in the dictionary." msgstr "" -#: ../../reference/datamodel.rst:3340 +#: ../../reference/datamodel.rst:3335 msgid "" "This method is called when an :term:`iterator` is required for a container. " "This method should return a new iterator object that can iterate over all " @@ -3875,14 +3870,14 @@ msgid "" "of the container." msgstr "" -#: ../../reference/datamodel.rst:3348 +#: ../../reference/datamodel.rst:3343 msgid "" "Called (if present) by the :func:`reversed` built-in to implement reverse " "iteration. It should return a new iterator object that iterates over all " "the objects in the container in reverse order." msgstr "" -#: ../../reference/datamodel.rst:3352 +#: ../../reference/datamodel.rst:3347 msgid "" "If the :meth:`__reversed__` method is not provided, the :func:`reversed` " "built-in will fall back to using the sequence protocol (:meth:`__len__` and :" @@ -3891,7 +3886,7 @@ msgid "" "more efficient than the one provided by :func:`reversed`." msgstr "" -#: ../../reference/datamodel.rst:3359 +#: ../../reference/datamodel.rst:3354 msgid "" "The membership test operators (:keyword:`in` and :keyword:`not in`) are " "normally implemented as an iteration through a container. However, container " @@ -3899,14 +3894,14 @@ msgid "" "implementation, which also does not require the object be iterable." msgstr "" -#: ../../reference/datamodel.rst:3366 +#: ../../reference/datamodel.rst:3361 msgid "" "Called to implement membership test operators. Should return true if *item* " "is in *self*, false otherwise. For mapping objects, this should consider " "the keys of the mapping rather than the values or the key-item pairs." msgstr "" -#: ../../reference/datamodel.rst:3370 +#: ../../reference/datamodel.rst:3365 msgid "" "For objects that don't define :meth:`__contains__`, the membership test " "first tries iteration via :meth:`__iter__`, then the old sequence iteration " @@ -3914,11 +3909,11 @@ msgid "" "reference `." msgstr "" -#: ../../reference/datamodel.rst:3379 +#: ../../reference/datamodel.rst:3374 msgid "Emulating numeric types" msgstr "" -#: ../../reference/datamodel.rst:3381 +#: ../../reference/datamodel.rst:3376 msgid "" "The following methods can be defined to emulate numeric objects. Methods " "corresponding to operations that are not supported by the particular kind of " @@ -3926,7 +3921,7 @@ msgid "" "should be left undefined." msgstr "" -#: ../../reference/datamodel.rst:3407 +#: ../../reference/datamodel.rst:3402 msgid "" "These methods are called to implement the binary arithmetic operations " "(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:" @@ -3940,13 +3935,13 @@ msgid "" "`pow` function is to be supported." msgstr "" -#: ../../reference/datamodel.rst:3418 +#: ../../reference/datamodel.rst:3413 msgid "" "If one of those methods does not support the operation with the supplied " "arguments, it should return :data:`NotImplemented`." msgstr "" -#: ../../reference/datamodel.rst:3441 +#: ../../reference/datamodel.rst:3436 msgid "" "These methods are called to implement the binary arithmetic operations " "(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:" @@ -3960,21 +3955,21 @@ msgid "" "`NotImplemented` or ``type(y)`` is a subclass of ``type(x)``. [#]_" msgstr "" -#: ../../reference/datamodel.rst:3452 +#: ../../reference/datamodel.rst:3447 msgid "" "Note that :meth:`__rpow__` should be defined to accept an optional third " "argument if the three-argument version of the built-in :func:`pow` function " "is to be supported." msgstr "" -#: ../../reference/datamodel.rst:3458 +#: ../../reference/datamodel.rst:3453 msgid "" "Three-argument :func:`pow` now try calling :meth:`~object.__rpow__` if " "necessary. Previously it was only called in two-argument :func:`!pow` and " "the binary power operator." msgstr "" -#: ../../reference/datamodel.rst:3464 +#: ../../reference/datamodel.rst:3459 msgid "" "If the right operand's type is a subclass of the left operand's type and " "that subclass provides a different implementation of the reflected method " @@ -3983,7 +3978,7 @@ msgid "" "ancestors' operations." msgstr "" -#: ../../reference/datamodel.rst:3484 +#: ../../reference/datamodel.rst:3479 msgid "" "These methods are called to implement the augmented arithmetic assignments " "(``+=``, ``-=``, ``*=``, ``@=``, ``/=``, ``//=``, ``%=``, ``**=``, ``<<=``, " @@ -4001,19 +3996,19 @@ msgid "" "data model." msgstr "" -#: ../../reference/datamodel.rst:3507 +#: ../../reference/datamodel.rst:3502 msgid "" "Called to implement the unary arithmetic operations (``-``, ``+``, :func:" "`abs` and ``~``)." msgstr "" -#: ../../reference/datamodel.rst:3520 +#: ../../reference/datamodel.rst:3515 msgid "" "Called to implement the built-in functions :func:`complex`, :func:`int` and :" "func:`float`. Should return a value of the appropriate type." msgstr "" -#: ../../reference/datamodel.rst:3527 +#: ../../reference/datamodel.rst:3522 msgid "" "Called to implement :func:`operator.index`, and whenever Python needs to " "losslessly convert the numeric object to an integer object (such as in " @@ -4022,14 +4017,14 @@ msgid "" "integer type. Must return an integer." msgstr "" -#: ../../reference/datamodel.rst:3533 +#: ../../reference/datamodel.rst:3528 msgid "" "If :meth:`__int__`, :meth:`__float__` and :meth:`__complex__` are not " "defined then corresponding built-in functions :func:`int`, :func:`float` " "and :func:`complex` fall back to :meth:`__index__`." msgstr "" -#: ../../reference/datamodel.rst:3545 +#: ../../reference/datamodel.rst:3540 msgid "" "Called to implement the built-in function :func:`round` and :mod:`math` " "functions :func:`~math.trunc`, :func:`~math.floor` and :func:`~math.ceil`. " @@ -4038,16 +4033,16 @@ msgid "" "(typically an :class:`int`)." msgstr "" -#: ../../reference/datamodel.rst:3551 +#: ../../reference/datamodel.rst:3546 msgid "" ":func:`int` no longer delegates to the :meth:`~object.__trunc__` method." msgstr "" -#: ../../reference/datamodel.rst:3558 +#: ../../reference/datamodel.rst:3553 msgid "With Statement Context Managers" msgstr "" -#: ../../reference/datamodel.rst:3560 +#: ../../reference/datamodel.rst:3555 msgid "" "A :dfn:`context manager` is an object that defines the runtime context to be " "established when executing a :keyword:`with` statement. The context manager " @@ -4057,34 +4052,34 @@ msgid "" "can also be used by directly invoking their methods." msgstr "" -#: ../../reference/datamodel.rst:3571 +#: ../../reference/datamodel.rst:3566 msgid "" "Typical uses of context managers include saving and restoring various kinds " "of global state, locking and unlocking resources, closing opened files, etc." msgstr "" -#: ../../reference/datamodel.rst:3574 +#: ../../reference/datamodel.rst:3569 msgid "" "For more information on context managers, see :ref:`typecontextmanager`. " "The :class:`object` class itself does not provide the context manager " "methods." msgstr "" -#: ../../reference/datamodel.rst:3580 +#: ../../reference/datamodel.rst:3575 msgid "" "Enter the runtime context related to this object. The :keyword:`with` " "statement will bind this method's return value to the target(s) specified in " "the :keyword:`!as` clause of the statement, if any." msgstr "" -#: ../../reference/datamodel.rst:3587 +#: ../../reference/datamodel.rst:3582 msgid "" "Exit the runtime context related to this object. The parameters describe the " "exception that caused the context to be exited. If the context was exited " "without an exception, all three arguments will be :const:`None`." msgstr "" -#: ../../reference/datamodel.rst:3591 +#: ../../reference/datamodel.rst:3586 msgid "" "If an exception is supplied, and the method wishes to suppress the exception " "(i.e., prevent it from being propagated), it should return a true value. " @@ -4092,27 +4087,27 @@ msgid "" "method." msgstr "" -#: ../../reference/datamodel.rst:3595 +#: ../../reference/datamodel.rst:3590 msgid "" "Note that :meth:`~object.__exit__` methods should not reraise the passed-in " "exception; this is the caller's responsibility." msgstr "" -#: ../../reference/datamodel.rst:3601 +#: ../../reference/datamodel.rst:3596 msgid ":pep:`343` - The \"with\" statement" msgstr "" -#: ../../reference/datamodel.rst:3602 +#: ../../reference/datamodel.rst:3597 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:3609 +#: ../../reference/datamodel.rst:3604 msgid "Customizing positional arguments in class pattern matching" msgstr "" -#: ../../reference/datamodel.rst:3611 +#: ../../reference/datamodel.rst:3606 msgid "" "When using a class name in a pattern, positional arguments in the pattern " "are not allowed by default, i.e. ``case MyClass(x, y)`` is typically invalid " @@ -4120,7 +4115,7 @@ msgid "" "pattern, the class needs to define a *__match_args__* attribute." msgstr "" -#: ../../reference/datamodel.rst:3618 +#: ../../reference/datamodel.rst:3613 msgid "" "This class variable can be assigned a tuple of strings. When this class is " "used in a class pattern with positional arguments, each positional argument " @@ -4129,7 +4124,7 @@ msgid "" "to setting it to ``()``." msgstr "" -#: ../../reference/datamodel.rst:3624 +#: ../../reference/datamodel.rst:3619 msgid "" "For example, if ``MyClass.__match_args__`` is ``(\"left\", \"center\", " "\"right\")`` that means that ``case MyClass(x, y)`` is equivalent to ``case " @@ -4139,19 +4134,19 @@ msgid "" "exc:`TypeError`." msgstr "" -#: ../../reference/datamodel.rst:3634 +#: ../../reference/datamodel.rst:3629 msgid ":pep:`634` - Structural Pattern Matching" msgstr "" -#: ../../reference/datamodel.rst:3635 +#: ../../reference/datamodel.rst:3630 msgid "The specification for the Python ``match`` statement." msgstr "" -#: ../../reference/datamodel.rst:3641 +#: ../../reference/datamodel.rst:3636 msgid "Emulating buffer types" msgstr "" -#: ../../reference/datamodel.rst:3643 +#: ../../reference/datamodel.rst:3638 msgid "" "The :ref:`buffer protocol ` provides a way for Python objects " "to expose efficient access to a low-level memory array. This protocol is " @@ -4159,13 +4154,13 @@ msgid "" "and third-party libraries may define additional buffer types." msgstr "" -#: ../../reference/datamodel.rst:3648 +#: ../../reference/datamodel.rst:3643 msgid "" "While buffer types are usually implemented in C, it is also possible to " "implement the protocol in Python." msgstr "" -#: ../../reference/datamodel.rst:3653 +#: ../../reference/datamodel.rst:3648 msgid "" "Called when a buffer is requested from *self* (for example, by the :class:" "`memoryview` constructor). The *flags* argument is an integer representing " @@ -4175,7 +4170,7 @@ msgid "" "`memoryview` object." msgstr "" -#: ../../reference/datamodel.rst:3660 +#: ../../reference/datamodel.rst:3655 msgid "" "**Thread safety:** In :term:`free-threaded ` Python, " "implementations must manage any internal export counter using atomic " @@ -4185,7 +4180,7 @@ msgid "" "ref:`thread-safety-memoryview` for details." msgstr "" -#: ../../reference/datamodel.rst:3669 +#: ../../reference/datamodel.rst:3664 msgid "" "Called when a buffer is no longer needed. The *buffer* argument is a :class:" "`memoryview` object that was previously returned by :meth:`~object." @@ -4193,7 +4188,7 @@ msgid "" "buffer. This method should return ``None``." msgstr "" -#: ../../reference/datamodel.rst:3674 +#: ../../reference/datamodel.rst:3669 msgid "" "**Thread safety:** In :term:`free-threaded ` Python, any " "export counter decrement must use atomic operations. Resource cleanup must " @@ -4201,41 +4196,41 @@ msgid "" "other threads." msgstr "" -#: ../../reference/datamodel.rst:3679 +#: ../../reference/datamodel.rst:3674 msgid "" "Buffer objects that do not need to perform any cleanup are not required to " "implement this method." msgstr "" -#: ../../reference/datamodel.rst:3686 +#: ../../reference/datamodel.rst:3681 msgid ":pep:`688` - Making the buffer protocol accessible in Python" msgstr "" -#: ../../reference/datamodel.rst:3687 +#: ../../reference/datamodel.rst:3682 msgid "" "Introduces the Python ``__buffer__`` and ``__release_buffer__`` methods." msgstr "" -#: ../../reference/datamodel.rst:3689 +#: ../../reference/datamodel.rst:3684 msgid ":class:`collections.abc.Buffer`" msgstr "" -#: ../../reference/datamodel.rst:3690 +#: ../../reference/datamodel.rst:3685 msgid "ABC for buffer types." msgstr "" -#: ../../reference/datamodel.rst:3693 +#: ../../reference/datamodel.rst:3688 msgid "Annotations" msgstr "" -#: ../../reference/datamodel.rst:3695 +#: ../../reference/datamodel.rst:3690 msgid "" "Functions, classes, and modules may contain :term:`annotations " "`, which are a way to associate information (usually :term:`type " "hints `) with a symbol." msgstr "" -#: ../../reference/datamodel.rst:3701 +#: ../../reference/datamodel.rst:3696 msgid "" "This attribute contains the annotations for an object. It is :ref:`lazily " "evaluated `, so accessing the attribute may execute " @@ -4243,24 +4238,24 @@ msgid "" "attribute is set to a dictionary mapping from variable names to annotations." msgstr "" -#: ../../reference/datamodel.rst:3706 +#: ../../reference/datamodel.rst:3701 msgid "Annotations are now lazily evaluated." msgstr "" -#: ../../reference/datamodel.rst:3711 +#: ../../reference/datamodel.rst:3706 msgid "" "An :term:`annotate function`. Returns a new dictionary object mapping " "attribute/parameter names to their annotation values." msgstr "" -#: ../../reference/datamodel.rst:3714 +#: ../../reference/datamodel.rst:3709 msgid "" "Takes a format parameter specifying the format in which annotations values " "should be provided. It must be a member of the :class:`annotationlib.Format` " "enum, or an integer with a value corresponding to a member of the enum." msgstr "" -#: ../../reference/datamodel.rst:3718 +#: ../../reference/datamodel.rst:3713 msgid "" "If an annotate function doesn't support the requested format, it must raise :" "exc:`NotImplementedError`. Annotate functions must always support :attr:" @@ -4268,34 +4263,34 @@ msgid "" "`NotImplementedError()` when called with this format." msgstr "" -#: ../../reference/datamodel.rst:3723 +#: ../../reference/datamodel.rst:3718 msgid "" "When called with :attr:`~annotationlib.Format.VALUE` format, an annotate " "function may raise :exc:`NameError`; it must not raise :exc:`!NameError` " "when called requesting any other format." msgstr "" -#: ../../reference/datamodel.rst:3726 +#: ../../reference/datamodel.rst:3721 msgid "" "If an object does not have any annotations, :attr:`~object.__annotate__` " "should preferably be set to ``None`` (it can’t be deleted), rather than set " "to a function that returns an empty dict." msgstr "" -#: ../../reference/datamodel.rst:3733 +#: ../../reference/datamodel.rst:3728 msgid ":pep:`649` --- Deferred evaluation of annotation using descriptors" msgstr "" -#: ../../reference/datamodel.rst:3734 +#: ../../reference/datamodel.rst:3729 msgid "" "Introduces lazy evaluation of annotations and the ``__annotate__`` function." msgstr "" -#: ../../reference/datamodel.rst:3740 +#: ../../reference/datamodel.rst:3735 msgid "Special method lookup" msgstr "" -#: ../../reference/datamodel.rst:3742 +#: ../../reference/datamodel.rst:3737 msgid "" "For custom classes, implicit invocations of special methods are only " "guaranteed to work correctly if defined on an object's type, not in the " @@ -4303,7 +4298,7 @@ msgid "" "following code raises an exception::" msgstr "" -#: ../../reference/datamodel.rst:3747 +#: ../../reference/datamodel.rst:3742 msgid "" ">>> class C:\n" "... pass\n" @@ -4316,7 +4311,7 @@ msgid "" "TypeError: object of type 'C' has no len()" msgstr "" -#: ../../reference/datamodel.rst:3757 +#: ../../reference/datamodel.rst:3752 msgid "" "The rationale behind this behaviour lies with a number of special methods " "such as :meth:`~object.__hash__` and :meth:`~object.__repr__` that are " @@ -4325,7 +4320,7 @@ msgid "" "invoked on the type object itself::" msgstr "" -#: ../../reference/datamodel.rst:3764 +#: ../../reference/datamodel.rst:3759 msgid "" ">>> 1 .__hash__() == hash(1)\n" "True\n" @@ -4335,14 +4330,14 @@ msgid "" "TypeError: descriptor '__hash__' of 'int' object needs an argument" msgstr "" -#: ../../reference/datamodel.rst:3771 +#: ../../reference/datamodel.rst:3766 msgid "" "Incorrectly attempting to invoke an unbound method of a class in this way is " "sometimes referred to as 'metaclass confusion', and is avoided by bypassing " "the instance when looking up special methods::" msgstr "" -#: ../../reference/datamodel.rst:3775 +#: ../../reference/datamodel.rst:3770 msgid "" ">>> type(1).__hash__(1) == hash(1)\n" "True\n" @@ -4350,14 +4345,14 @@ msgid "" "True" msgstr "" -#: ../../reference/datamodel.rst:3780 +#: ../../reference/datamodel.rst:3775 msgid "" "In addition to bypassing any instance attributes in the interest of " "correctness, implicit special method lookup generally also bypasses the :" "meth:`~object.__getattribute__` method even of the object's metaclass::" msgstr "" -#: ../../reference/datamodel.rst:3784 +#: ../../reference/datamodel.rst:3779 msgid "" ">>> class Meta(type):\n" "... def __getattribute__(*args):\n" @@ -4382,7 +4377,7 @@ msgid "" "10" msgstr "" -#: ../../reference/datamodel.rst:3806 +#: ../../reference/datamodel.rst:3801 msgid "" "Bypassing the :meth:`~object.__getattribute__` machinery in this fashion " "provides significant scope for speed optimisations within the interpreter, " @@ -4391,29 +4386,29 @@ msgid "" "consistently invoked by the interpreter)." msgstr "" -#: ../../reference/datamodel.rst:3817 +#: ../../reference/datamodel.rst:3812 msgid "Coroutines" msgstr "" -#: ../../reference/datamodel.rst:3821 +#: ../../reference/datamodel.rst:3816 msgid "Awaitable Objects" msgstr "" -#: ../../reference/datamodel.rst:3823 +#: ../../reference/datamodel.rst:3818 msgid "" "An :term:`awaitable` object generally implements an :meth:`~object." "__await__` method. :term:`Coroutine objects ` returned from :" "keyword:`async def` functions are awaitable." msgstr "" -#: ../../reference/datamodel.rst:3829 +#: ../../reference/datamodel.rst:3824 msgid "" "The :term:`generator iterator` objects returned from generators decorated " "with :func:`types.coroutine` are also awaitable, but they do not implement :" "meth:`~object.__await__`." msgstr "" -#: ../../reference/datamodel.rst:3835 +#: ../../reference/datamodel.rst:3830 msgid "" "Must return an :term:`iterator`. Should be used to implement :term:" "`awaitable` objects. For instance, :class:`asyncio.Future` implements this " @@ -4421,7 +4416,7 @@ msgid "" "`object` class itself is not awaitable and does not provide this method." msgstr "" -#: ../../reference/datamodel.rst:3843 +#: ../../reference/datamodel.rst:3838 msgid "" "The language doesn't place any restriction on the type or value of the " "objects yielded by the iterator returned by ``__await__``, as this is " @@ -4429,15 +4424,15 @@ msgid "" "g. :mod:`asyncio`) that will be managing the :term:`awaitable` object." msgstr "" -#: ../../reference/datamodel.rst:3851 +#: ../../reference/datamodel.rst:3846 msgid ":pep:`492` for additional information about awaitable objects." msgstr "" -#: ../../reference/datamodel.rst:3857 +#: ../../reference/datamodel.rst:3852 msgid "Coroutine Objects" msgstr "" -#: ../../reference/datamodel.rst:3859 +#: ../../reference/datamodel.rst:3854 msgid "" ":term:`Coroutine objects ` are :term:`awaitable` objects. A " "coroutine's execution can be controlled by calling :meth:`~object.__await__` " @@ -4448,24 +4443,24 @@ msgid "" "should not directly raise unhandled :exc:`StopIteration` exceptions." msgstr "" -#: ../../reference/datamodel.rst:3867 +#: ../../reference/datamodel.rst:3862 msgid "" "Coroutines also have the methods listed below, which are analogous to those " "of generators (see :ref:`generator-methods`). However, unlike generators, " "coroutines do not directly support iteration." msgstr "" -#: ../../reference/datamodel.rst:3871 +#: ../../reference/datamodel.rst:3866 msgid "" "Coroutines are :ref:`generic ` over the types of their yield, " "send, and return values, respectively." msgstr "" -#: ../../reference/datamodel.rst:3874 +#: ../../reference/datamodel.rst:3869 msgid "It is a :exc:`RuntimeError` to await on a coroutine more than once." msgstr "" -#: ../../reference/datamodel.rst:3880 +#: ../../reference/datamodel.rst:3875 msgid "" "Starts or resumes execution of the coroutine. If *value* is ``None``, this " "is equivalent to advancing the iterator returned by :meth:`~object." @@ -4476,7 +4471,7 @@ msgid "" "value, described above." msgstr "" -#: ../../reference/datamodel.rst:3891 +#: ../../reference/datamodel.rst:3886 msgid "" "Raises the specified exception in the coroutine. This method delegates to " "the :meth:`~generator.throw` method of the iterator that caused the " @@ -4487,13 +4482,13 @@ msgid "" "not caught in the coroutine, it propagates back to the caller." msgstr "" -#: ../../reference/datamodel.rst:3902 +#: ../../reference/datamodel.rst:3897 msgid "" "The second signature \\(type\\[, value\\[, traceback\\]\\]\\) is deprecated " "and may be removed in a future version of Python." msgstr "" -#: ../../reference/datamodel.rst:3907 +#: ../../reference/datamodel.rst:3902 msgid "" "Causes the coroutine to clean itself up and exit. If the coroutine is " "suspended, this method first delegates to the :meth:`~generator.close` " @@ -4503,46 +4498,46 @@ msgid "" "is marked as having finished executing, even if it was never started." msgstr "" -#: ../../reference/datamodel.rst:3915 +#: ../../reference/datamodel.rst:3910 msgid "" "Coroutine objects are automatically closed using the above process when they " "are about to be destroyed." msgstr "" -#: ../../reference/datamodel.rst:3921 +#: ../../reference/datamodel.rst:3916 msgid "Asynchronous Iterators" msgstr "" -#: ../../reference/datamodel.rst:3923 +#: ../../reference/datamodel.rst:3918 msgid "" "An *asynchronous iterator* can call asynchronous code in its ``__anext__`` " "method." msgstr "" -#: ../../reference/datamodel.rst:3926 +#: ../../reference/datamodel.rst:3921 msgid "" "Asynchronous iterators can be used in an :keyword:`async for` statement." msgstr "" -#: ../../reference/datamodel.rst:3928 ../../reference/datamodel.rst:3977 +#: ../../reference/datamodel.rst:3923 ../../reference/datamodel.rst:3972 msgid "The :class:`object` class itself does not provide these methods." msgstr "" -#: ../../reference/datamodel.rst:3933 +#: ../../reference/datamodel.rst:3928 msgid "Must return an *asynchronous iterator* object." msgstr "" -#: ../../reference/datamodel.rst:3937 +#: ../../reference/datamodel.rst:3932 msgid "" "Must return an *awaitable* resulting in a next value of the iterator. " "Should raise a :exc:`StopAsyncIteration` error when the iteration is over." msgstr "" -#: ../../reference/datamodel.rst:3940 +#: ../../reference/datamodel.rst:3935 msgid "An example of an asynchronous iterable object::" msgstr "" -#: ../../reference/datamodel.rst:3942 +#: ../../reference/datamodel.rst:3937 msgid "" "class Reader:\n" " async def readline(self):\n" @@ -4558,53 +4553,53 @@ msgid "" " return val" msgstr "" -#: ../../reference/datamodel.rst:3957 +#: ../../reference/datamodel.rst:3952 msgid "" "Prior to Python 3.7, :meth:`~object.__aiter__` could return an *awaitable* " "that would resolve to an :term:`asynchronous iterator `." msgstr "" -#: ../../reference/datamodel.rst:3962 +#: ../../reference/datamodel.rst:3957 msgid "" "Starting with Python 3.7, :meth:`~object.__aiter__` must return an " "asynchronous iterator object. Returning anything else will result in a :exc:" "`TypeError` error." msgstr "" -#: ../../reference/datamodel.rst:3970 +#: ../../reference/datamodel.rst:3965 msgid "Asynchronous Context Managers" msgstr "" -#: ../../reference/datamodel.rst:3972 +#: ../../reference/datamodel.rst:3967 msgid "" "An *asynchronous context manager* is a *context manager* that is able to " "suspend execution in its ``__aenter__`` and ``__aexit__`` methods." msgstr "" -#: ../../reference/datamodel.rst:3975 +#: ../../reference/datamodel.rst:3970 msgid "" "Asynchronous context managers can be used in an :keyword:`async with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:3981 +#: ../../reference/datamodel.rst:3976 msgid "" "Semantically similar to :meth:`~object.__enter__`, the only difference being " "that it must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3986 +#: ../../reference/datamodel.rst:3981 msgid "" "Semantically similar to :meth:`~object.__exit__`, the only difference being " "that it must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3989 +#: ../../reference/datamodel.rst:3984 msgid "An example of an asynchronous context manager class::" msgstr "" -#: ../../reference/datamodel.rst:3991 +#: ../../reference/datamodel.rst:3986 msgid "" "class AsyncContextManager:\n" " async def __aenter__(self):\n" @@ -4614,18 +4609,18 @@ msgid "" " await log('exiting context')" msgstr "" -#: ../../reference/datamodel.rst:4002 +#: ../../reference/datamodel.rst:3997 msgid "Footnotes" msgstr "Fußnoten" -#: ../../reference/datamodel.rst:4003 +#: ../../reference/datamodel.rst:3998 msgid "" "It *is* possible in some cases to change an object's type, under certain " "controlled conditions. It generally isn't a good idea though, since it can " "lead to some very strange behaviour if it is handled incorrectly." msgstr "" -#: ../../reference/datamodel.rst:4007 +#: ../../reference/datamodel.rst:4002 msgid "" "The :meth:`~object.__hash__`, :meth:`~object.__iter__`, :meth:`~object." "__reversed__`, :meth:`~object.__contains__`, :meth:`~object." @@ -4634,7 +4629,7 @@ msgid "" "by relying on the behavior that ``None`` is not callable." msgstr "" -#: ../../reference/datamodel.rst:4014 +#: ../../reference/datamodel.rst:4009 msgid "" "\"Does not support\" here means that the class has no such method, or the " "method returns :data:`NotImplemented`. Do not set the method to ``None`` if " @@ -4642,14 +4637,14 @@ msgid "" "instead have the opposite effect of explicitly *blocking* such fallback." msgstr "" -#: ../../reference/datamodel.rst:4020 +#: ../../reference/datamodel.rst:4015 msgid "" "For operands of the same type, it is assumed that if the non-reflected " "method (such as :meth:`~object.__add__`) fails then the operation is not " "supported, which is why the reflected method is not called." msgstr "" -#: ../../reference/datamodel.rst:4024 +#: ../../reference/datamodel.rst:4019 msgid "" "If the right operand's type is a subclass of the left operand's type, the " "reflected method having precedence allows subclasses to override their " @@ -4669,11 +4664,11 @@ msgstr "" #: ../../reference/datamodel.rst:555 ../../reference/datamodel.rst:570 #: ../../reference/datamodel.rst:715 ../../reference/datamodel.rst:853 #: ../../reference/datamodel.rst:877 ../../reference/datamodel.rst:913 -#: ../../reference/datamodel.rst:1190 ../../reference/datamodel.rst:1358 -#: ../../reference/datamodel.rst:1385 ../../reference/datamodel.rst:1473 -#: ../../reference/datamodel.rst:1572 ../../reference/datamodel.rst:1680 -#: ../../reference/datamodel.rst:1797 ../../reference/datamodel.rst:2228 -#: ../../reference/datamodel.rst:3284 +#: ../../reference/datamodel.rst:1185 ../../reference/datamodel.rst:1353 +#: ../../reference/datamodel.rst:1380 ../../reference/datamodel.rst:1468 +#: ../../reference/datamodel.rst:1567 ../../reference/datamodel.rst:1675 +#: ../../reference/datamodel.rst:1792 ../../reference/datamodel.rst:2223 +#: ../../reference/datamodel.rst:3279 msgid "object" msgstr "" @@ -4684,12 +4679,12 @@ msgstr "" #: ../../reference/datamodel.rst:22 ../../reference/datamodel.rst:298 #: ../../reference/datamodel.rst:358 ../../reference/datamodel.rst:447 #: ../../reference/datamodel.rst:488 ../../reference/datamodel.rst:853 -#: ../../reference/datamodel.rst:1414 ../../reference/datamodel.rst:1880 -#: ../../reference/datamodel.rst:2129 ../../reference/datamodel.rst:2135 -#: ../../reference/datamodel.rst:2228 ../../reference/datamodel.rst:2795 -#: ../../reference/datamodel.rst:3232 ../../reference/datamodel.rst:3402 -#: ../../reference/datamodel.rst:3437 ../../reference/datamodel.rst:3505 -#: ../../reference/datamodel.rst:3515 ../../reference/datamodel.rst:3543 +#: ../../reference/datamodel.rst:1409 ../../reference/datamodel.rst:1875 +#: ../../reference/datamodel.rst:2124 ../../reference/datamodel.rst:2130 +#: ../../reference/datamodel.rst:2223 ../../reference/datamodel.rst:2790 +#: ../../reference/datamodel.rst:3227 ../../reference/datamodel.rst:3397 +#: ../../reference/datamodel.rst:3432 ../../reference/datamodel.rst:3500 +#: ../../reference/datamodel.rst:3510 ../../reference/datamodel.rst:3538 msgid "built-in function" msgstr "" @@ -4698,7 +4693,7 @@ msgid "id" msgstr "" #: ../../reference/datamodel.rst:22 ../../reference/datamodel.rst:122 -#: ../../reference/datamodel.rst:2795 +#: ../../reference/datamodel.rst:2790 msgid "type" msgstr "Typ" @@ -4734,7 +4729,7 @@ msgstr "" msgid "unreachable object" msgstr "" -#: ../../reference/datamodel.rst:91 ../../reference/datamodel.rst:1190 +#: ../../reference/datamodel.rst:91 ../../reference/datamodel.rst:1185 msgid "container" msgstr "" @@ -4749,7 +4744,7 @@ msgstr "" #: ../../reference/datamodel.rst:122 ../../reference/datamodel.rst:420 #: ../../reference/datamodel.rst:421 ../../reference/datamodel.rst:524 #: ../../reference/datamodel.rst:913 ../../reference/datamodel.rst:933 -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "module" msgstr "" @@ -4763,9 +4758,9 @@ msgstr "" msgid "language" msgstr "" -#: ../../reference/datamodel.rst:135 ../../reference/datamodel.rst:1190 -#: ../../reference/datamodel.rst:1208 ../../reference/datamodel.rst:1358 -#: ../../reference/datamodel.rst:1378 +#: ../../reference/datamodel.rst:135 ../../reference/datamodel.rst:1185 +#: ../../reference/datamodel.rst:1203 ../../reference/datamodel.rst:1353 +#: ../../reference/datamodel.rst:1373 msgid "attribute" msgstr "Attribut" @@ -4785,7 +4780,7 @@ msgstr "" msgid "ellipsis literal" msgstr "" -#: ../../reference/datamodel.rst:195 ../../reference/datamodel.rst:1385 +#: ../../reference/datamodel.rst:195 ../../reference/datamodel.rst:1380 msgid "numeric" msgstr "" @@ -4821,16 +4816,16 @@ msgstr "" msgid "Java" msgstr "" -#: ../../reference/datamodel.rst:284 ../../reference/datamodel.rst:3515 +#: ../../reference/datamodel.rst:284 ../../reference/datamodel.rst:3510 msgid "complex" msgstr "" #: ../../reference/datamodel.rst:298 ../../reference/datamodel.rst:447 -#: ../../reference/datamodel.rst:488 ../../reference/datamodel.rst:3232 +#: ../../reference/datamodel.rst:488 ../../reference/datamodel.rst:3227 msgid "len" msgstr "" -#: ../../reference/datamodel.rst:298 ../../reference/datamodel.rst:1385 +#: ../../reference/datamodel.rst:298 ../../reference/datamodel.rst:1380 msgid "sequence" msgstr "" @@ -4851,15 +4846,15 @@ msgstr "" msgid "slicing" msgstr "" -#: ../../reference/datamodel.rst:316 ../../reference/datamodel.rst:1892 +#: ../../reference/datamodel.rst:316 ../../reference/datamodel.rst:1887 msgid "start (slice object attribute)" msgstr "" -#: ../../reference/datamodel.rst:316 ../../reference/datamodel.rst:1892 +#: ../../reference/datamodel.rst:316 ../../reference/datamodel.rst:1887 msgid "stop (slice object attribute)" msgstr "" -#: ../../reference/datamodel.rst:316 ../../reference/datamodel.rst:1892 +#: ../../reference/datamodel.rst:316 ../../reference/datamodel.rst:1887 msgid "step (slice object attribute)" msgstr "" @@ -4872,7 +4867,7 @@ msgid "immutable" msgstr "" #: ../../reference/datamodel.rst:354 ../../reference/datamodel.rst:358 -#: ../../reference/datamodel.rst:2104 ../../reference/datamodel.rst:2135 +#: ../../reference/datamodel.rst:2099 ../../reference/datamodel.rst:2130 msgid "string" msgstr "" @@ -4912,7 +4907,7 @@ msgstr "" msgid "empty" msgstr "" -#: ../../reference/datamodel.rst:396 ../../reference/datamodel.rst:2129 +#: ../../reference/datamodel.rst:396 ../../reference/datamodel.rst:2124 msgid "bytes" msgstr "" @@ -4928,14 +4923,14 @@ msgstr "" msgid "mutable" msgstr "" -#: ../../reference/datamodel.rst:408 ../../reference/datamodel.rst:1208 -#: ../../reference/datamodel.rst:1378 +#: ../../reference/datamodel.rst:408 ../../reference/datamodel.rst:1203 +#: ../../reference/datamodel.rst:1373 msgid "assignment" msgstr "" #: ../../reference/datamodel.rst:408 ../../reference/datamodel.rst:913 -#: ../../reference/datamodel.rst:1834 ../../reference/datamodel.rst:2022 -#: ../../reference/datamodel.rst:3567 +#: ../../reference/datamodel.rst:1829 ../../reference/datamodel.rst:2017 +#: ../../reference/datamodel.rst:3562 msgid "statement" msgstr "" @@ -4967,12 +4962,12 @@ msgstr "" msgid "frozenset" msgstr "" -#: ../../reference/datamodel.rst:488 ../../reference/datamodel.rst:1385 +#: ../../reference/datamodel.rst:488 ../../reference/datamodel.rst:1380 msgid "mapping" msgstr "" -#: ../../reference/datamodel.rst:505 ../../reference/datamodel.rst:1190 -#: ../../reference/datamodel.rst:2228 +#: ../../reference/datamodel.rst:505 ../../reference/datamodel.rst:1185 +#: ../../reference/datamodel.rst:2223 msgid "dictionary" msgstr "" @@ -4998,8 +4993,8 @@ msgstr "" msgid "function" msgstr "" -#: ../../reference/datamodel.rst:555 ../../reference/datamodel.rst:1190 -#: ../../reference/datamodel.rst:1213 ../../reference/datamodel.rst:3178 +#: ../../reference/datamodel.rst:555 ../../reference/datamodel.rst:1185 +#: ../../reference/datamodel.rst:1208 ../../reference/datamodel.rst:3173 msgid "call" msgstr "" @@ -5107,7 +5102,7 @@ msgstr "" msgid "__module__ (method attribute)" msgstr "" -#: ../../reference/datamodel.rst:797 ../../reference/datamodel.rst:1572 +#: ../../reference/datamodel.rst:797 ../../reference/datamodel.rst:1567 msgid "generator" msgstr "" @@ -5115,7 +5110,7 @@ msgstr "" msgid "iterator" msgstr "" -#: ../../reference/datamodel.rst:815 ../../reference/datamodel.rst:3813 +#: ../../reference/datamodel.rst:815 ../../reference/datamodel.rst:3808 msgid "coroutine" msgstr "" @@ -5179,486 +5174,486 @@ msgstr "" msgid "__lazy_modules__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:1158 +#: ../../reference/datamodel.rst:1153 msgid "__dict__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:1190 ../../reference/datamodel.rst:1208 -#: ../../reference/datamodel.rst:1358 ../../reference/datamodel.rst:2005 -#: ../../reference/datamodel.rst:2908 +#: ../../reference/datamodel.rst:1185 ../../reference/datamodel.rst:1203 +#: ../../reference/datamodel.rst:1353 ../../reference/datamodel.rst:2000 +#: ../../reference/datamodel.rst:2903 msgid "class" msgstr "" -#: ../../reference/datamodel.rst:1190 ../../reference/datamodel.rst:1358 -#: ../../reference/datamodel.rst:1378 +#: ../../reference/datamodel.rst:1185 ../../reference/datamodel.rst:1353 +#: ../../reference/datamodel.rst:1373 msgid "class instance" msgstr "" -#: ../../reference/datamodel.rst:1190 ../../reference/datamodel.rst:1358 -#: ../../reference/datamodel.rst:3178 +#: ../../reference/datamodel.rst:1185 ../../reference/datamodel.rst:1353 +#: ../../reference/datamodel.rst:3173 msgid "instance" msgstr "" -#: ../../reference/datamodel.rst:1190 ../../reference/datamodel.rst:1213 +#: ../../reference/datamodel.rst:1185 ../../reference/datamodel.rst:1208 msgid "class object" msgstr "" -#: ../../reference/datamodel.rst:1220 +#: ../../reference/datamodel.rst:1215 msgid "__name__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1220 +#: ../../reference/datamodel.rst:1215 msgid "__module__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1220 +#: ../../reference/datamodel.rst:1215 msgid "__dict__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1220 +#: ../../reference/datamodel.rst:1215 msgid "__bases__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1220 +#: ../../reference/datamodel.rst:1215 msgid "__base__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1220 +#: ../../reference/datamodel.rst:1215 msgid "__doc__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1220 +#: ../../reference/datamodel.rst:1215 msgid "__annotations__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1220 +#: ../../reference/datamodel.rst:1215 msgid "__annotate__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1220 +#: ../../reference/datamodel.rst:1215 msgid "__type_params__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1220 +#: ../../reference/datamodel.rst:1215 msgid "__static_attributes__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1220 +#: ../../reference/datamodel.rst:1215 msgid "__firstlineno__ (class attribute)" msgstr "" -#: ../../reference/datamodel.rst:1396 +#: ../../reference/datamodel.rst:1391 msgid "__dict__ (instance attribute)" msgstr "" -#: ../../reference/datamodel.rst:1396 +#: ../../reference/datamodel.rst:1391 msgid "__class__ (instance attribute)" msgstr "" -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "open" msgstr "" -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "io" msgstr "" -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "popen() (in module os)" msgstr "" -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "makefile() (socket method)" msgstr "" -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "sys.stdin" msgstr "" -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "sys.stdout" msgstr "" -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "sys.stderr" msgstr "" -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "stdio" msgstr "" -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "stdin (in module sys)" msgstr "" -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "stdout (in module sys)" msgstr "" -#: ../../reference/datamodel.rst:1414 +#: ../../reference/datamodel.rst:1409 msgid "stderr (in module sys)" msgstr "" -#: ../../reference/datamodel.rst:1459 +#: ../../reference/datamodel.rst:1454 msgid "internal type" msgstr "" -#: ../../reference/datamodel.rst:1459 +#: ../../reference/datamodel.rst:1454 msgid "types, internal" msgstr "" -#: ../../reference/datamodel.rst:1473 +#: ../../reference/datamodel.rst:1468 msgid "bytecode" msgstr "" -#: ../../reference/datamodel.rst:1473 +#: ../../reference/datamodel.rst:1468 msgid "code" msgstr "" -#: ../../reference/datamodel.rst:1473 +#: ../../reference/datamodel.rst:1468 msgid "code object" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_argcount (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_posonlyargcount (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_kwonlyargcount (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_code (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_consts (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_filename (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_firstlineno (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_flags (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_name (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_names (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_nlocals (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_stacksize (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_varnames (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_cellvars (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_freevars (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1484 +#: ../../reference/datamodel.rst:1479 msgid "co_qualname (code object attribute)" msgstr "" -#: ../../reference/datamodel.rst:1588 +#: ../../reference/datamodel.rst:1583 msgid "documentation string" msgstr "" -#: ../../reference/datamodel.rst:1680 +#: ../../reference/datamodel.rst:1675 msgid "frame" msgstr "" -#: ../../reference/datamodel.rst:1686 +#: ../../reference/datamodel.rst:1681 msgid "f_back (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1686 +#: ../../reference/datamodel.rst:1681 msgid "f_code (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1686 +#: ../../reference/datamodel.rst:1681 msgid "f_globals (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1686 +#: ../../reference/datamodel.rst:1681 msgid "f_locals (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1686 +#: ../../reference/datamodel.rst:1681 msgid "f_lasti (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1686 +#: ../../reference/datamodel.rst:1681 msgid "f_builtins (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1686 +#: ../../reference/datamodel.rst:1681 msgid "f_generator (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1737 +#: ../../reference/datamodel.rst:1732 msgid "f_trace (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1737 +#: ../../reference/datamodel.rst:1732 msgid "f_trace_lines (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1737 +#: ../../reference/datamodel.rst:1732 msgid "f_trace_opcodes (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1737 +#: ../../reference/datamodel.rst:1732 msgid "f_lineno (frame attribute)" msgstr "" -#: ../../reference/datamodel.rst:1797 +#: ../../reference/datamodel.rst:1792 msgid "traceback" msgstr "" -#: ../../reference/datamodel.rst:1797 +#: ../../reference/datamodel.rst:1792 msgid "stack" msgstr "" -#: ../../reference/datamodel.rst:1797 +#: ../../reference/datamodel.rst:1792 msgid "trace" msgstr "" -#: ../../reference/datamodel.rst:1797 +#: ../../reference/datamodel.rst:1792 msgid "exception" msgstr "" -#: ../../reference/datamodel.rst:1797 +#: ../../reference/datamodel.rst:1792 msgid "handler" msgstr "" -#: ../../reference/datamodel.rst:1797 +#: ../../reference/datamodel.rst:1792 msgid "execution" msgstr "" -#: ../../reference/datamodel.rst:1797 +#: ../../reference/datamodel.rst:1792 msgid "exc_info (in module sys)" msgstr "" -#: ../../reference/datamodel.rst:1797 +#: ../../reference/datamodel.rst:1792 msgid "last_traceback (in module sys)" msgstr "" -#: ../../reference/datamodel.rst:1797 +#: ../../reference/datamodel.rst:1792 msgid "sys.exc_info" msgstr "" -#: ../../reference/datamodel.rst:1797 +#: ../../reference/datamodel.rst:1792 msgid "sys.exception" msgstr "" -#: ../../reference/datamodel.rst:1797 +#: ../../reference/datamodel.rst:1792 msgid "sys.last_traceback" msgstr "" -#: ../../reference/datamodel.rst:1834 +#: ../../reference/datamodel.rst:1829 msgid "tb_frame (traceback attribute)" msgstr "" -#: ../../reference/datamodel.rst:1834 +#: ../../reference/datamodel.rst:1829 msgid "tb_lineno (traceback attribute)" msgstr "" -#: ../../reference/datamodel.rst:1834 +#: ../../reference/datamodel.rst:1829 msgid "tb_lasti (traceback attribute)" msgstr "" -#: ../../reference/datamodel.rst:1834 +#: ../../reference/datamodel.rst:1829 msgid "try" msgstr "" -#: ../../reference/datamodel.rst:1864 +#: ../../reference/datamodel.rst:1859 msgid "tb_next (traceback attribute)" msgstr "" -#: ../../reference/datamodel.rst:1880 ../../reference/datamodel.rst:3284 +#: ../../reference/datamodel.rst:1875 ../../reference/datamodel.rst:3279 msgid "slice" msgstr "" -#: ../../reference/datamodel.rst:1940 +#: ../../reference/datamodel.rst:1935 msgid "operator" msgstr "" -#: ../../reference/datamodel.rst:1940 +#: ../../reference/datamodel.rst:1935 msgid "overloading" msgstr "" -#: ../../reference/datamodel.rst:1940 +#: ../../reference/datamodel.rst:1935 msgid "__getitem__() (mapping object method)" msgstr "" -#: ../../reference/datamodel.rst:1976 +#: ../../reference/datamodel.rst:1971 msgid "subclassing" msgstr "" -#: ../../reference/datamodel.rst:1976 +#: ../../reference/datamodel.rst:1971 msgid "immutable types" msgstr "" -#: ../../reference/datamodel.rst:2005 +#: ../../reference/datamodel.rst:2000 msgid "constructor" msgstr "" -#: ../../reference/datamodel.rst:2022 +#: ../../reference/datamodel.rst:2017 msgid "destructor" msgstr "" -#: ../../reference/datamodel.rst:2022 +#: ../../reference/datamodel.rst:2017 msgid "finalizer" msgstr "" -#: ../../reference/datamodel.rst:2022 +#: ../../reference/datamodel.rst:2017 msgid "del" msgstr "" -#: ../../reference/datamodel.rst:2086 +#: ../../reference/datamodel.rst:2081 msgid "repr() (built-in function)" msgstr "" -#: ../../reference/datamodel.rst:2086 +#: ../../reference/datamodel.rst:2081 msgid "__repr__() (object method)" msgstr "" -#: ../../reference/datamodel.rst:2104 +#: ../../reference/datamodel.rst:2099 msgid "__str__() (object method)" msgstr "" -#: ../../reference/datamodel.rst:2104 +#: ../../reference/datamodel.rst:2099 msgid "format() (built-in function)" msgstr "" -#: ../../reference/datamodel.rst:2104 +#: ../../reference/datamodel.rst:2099 msgid "print() (built-in function)" msgstr "" -#: ../../reference/datamodel.rst:2135 +#: ../../reference/datamodel.rst:2130 msgid "__format__() (object method)" msgstr "" -#: ../../reference/datamodel.rst:2135 +#: ../../reference/datamodel.rst:2130 msgid "conversion" msgstr "" -#: ../../reference/datamodel.rst:2135 +#: ../../reference/datamodel.rst:2130 msgid "print" msgstr "" -#: ../../reference/datamodel.rst:2177 +#: ../../reference/datamodel.rst:2172 msgid "comparisons" msgstr "" -#: ../../reference/datamodel.rst:2228 +#: ../../reference/datamodel.rst:2223 msgid "hash" msgstr "" -#: ../../reference/datamodel.rst:2309 +#: ../../reference/datamodel.rst:2304 msgid "__len__() (mapping object method)" msgstr "" -#: ../../reference/datamodel.rst:2414 +#: ../../reference/datamodel.rst:2409 msgid "__getattr__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:2414 +#: ../../reference/datamodel.rst:2409 msgid "__dir__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:2414 +#: ../../reference/datamodel.rst:2409 msgid "__class__ (module attribute)" msgstr "" -#: ../../reference/datamodel.rst:2795 +#: ../../reference/datamodel.rst:2790 msgid "metaclass" msgstr "" -#: ../../reference/datamodel.rst:2795 +#: ../../reference/datamodel.rst:2790 msgid "= (equals)" msgstr "" -#: ../../reference/datamodel.rst:2795 +#: ../../reference/datamodel.rst:2790 msgid "class definition" msgstr "" -#: ../../reference/datamodel.rst:2861 +#: ../../reference/datamodel.rst:2856 msgid "metaclass hint" msgstr "" -#: ../../reference/datamodel.rst:2884 +#: ../../reference/datamodel.rst:2879 msgid "__prepare__ (metaclass method)" msgstr "" -#: ../../reference/datamodel.rst:2908 +#: ../../reference/datamodel.rst:2903 msgid "body" msgstr "" -#: ../../reference/datamodel.rst:2928 +#: ../../reference/datamodel.rst:2923 msgid "__class__ (method cell)" msgstr "" -#: ../../reference/datamodel.rst:2928 +#: ../../reference/datamodel.rst:2923 msgid "__classcell__ (class namespace entry)" msgstr "" -#: ../../reference/datamodel.rst:3232 +#: ../../reference/datamodel.rst:3227 msgid "__bool__() (object method)" msgstr "" -#: ../../reference/datamodel.rst:3402 ../../reference/datamodel.rst:3437 +#: ../../reference/datamodel.rst:3397 ../../reference/datamodel.rst:3432 msgid "divmod" msgstr "" -#: ../../reference/datamodel.rst:3402 ../../reference/datamodel.rst:3437 +#: ../../reference/datamodel.rst:3397 ../../reference/datamodel.rst:3432 msgid "pow" msgstr "" -#: ../../reference/datamodel.rst:3505 +#: ../../reference/datamodel.rst:3500 msgid "abs" msgstr "" -#: ../../reference/datamodel.rst:3515 +#: ../../reference/datamodel.rst:3510 msgid "int" msgstr "" -#: ../../reference/datamodel.rst:3515 +#: ../../reference/datamodel.rst:3510 msgid "float" msgstr "" -#: ../../reference/datamodel.rst:3543 +#: ../../reference/datamodel.rst:3538 msgid "round" msgstr "" -#: ../../reference/datamodel.rst:3567 +#: ../../reference/datamodel.rst:3562 msgid "with" msgstr "" -#: ../../reference/datamodel.rst:3567 +#: ../../reference/datamodel.rst:3562 msgid "context manager" msgstr "" diff --git a/reference/datamodel.po~ b/reference/datamodel.po~ new file mode 100644 index 00000000..b22a4445 --- /dev/null +++ b/reference/datamodel.po~ @@ -0,0 +1,5664 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../reference/datamodel.rst:6 +msgid "Data model" +msgstr "" + +#: ../../reference/datamodel.rst:12 +msgid "Objects, values and types" +msgstr "" + +#: ../../reference/datamodel.rst:18 +msgid "" +":dfn:`Objects` are Python's abstraction for data. All data in a Python " +"program is represented by objects or by relations between objects. Even code " +"is represented by objects." +msgstr "" + +#: ../../reference/datamodel.rst:31 +msgid "" +"Every object has an identity, a type and a value. An object's *identity* " +"never changes once it has been created; you may think of it as the object's " +"address in memory. The :keyword:`is` operator compares the identity of two " +"objects; the :func:`id` function returns an integer representing its " +"identity." +msgstr "" + +#: ../../reference/datamodel.rst:38 +msgid "For CPython, ``id(x)`` is the memory address where ``x`` is stored." +msgstr "" + +#: ../../reference/datamodel.rst:40 +msgid "" +"An object's type determines the operations that the object supports (e.g., " +"\"does it have a length?\") and also defines the possible values for objects " +"of that type. The :func:`type` function returns an object's type (which is " +"an object itself). Like its identity, an object's :dfn:`type` is also " +"unchangeable. [#]_" +msgstr "" + +#: ../../reference/datamodel.rst:46 +msgid "" +"The *value* of some objects can change. Objects whose value can change are " +"said to be *mutable*; objects whose value is unchangeable once they are " +"created are called *immutable*. (The value of an immutable container object " +"that contains a reference to a mutable object can change when the latter's " +"value is changed; however the container is still considered immutable, " +"because the collection of objects it contains cannot be changed. So, " +"immutability is not strictly the same as having an unchangeable value, it is " +"more subtle.) An object's mutability is determined by its type; for " +"instance, numbers, strings and tuples are immutable, while dictionaries and " +"lists are mutable." +msgstr "" + +#: ../../reference/datamodel.rst:61 +msgid "" +"Objects are never explicitly destroyed; however, when they become " +"unreachable they may be garbage-collected. An implementation is allowed to " +"postpone garbage collection or omit it altogether --- it is a matter of " +"implementation quality how garbage collection is implemented, as long as no " +"objects are collected that are still reachable." +msgstr "" + +#: ../../reference/datamodel.rst:69 +msgid "" +"CPython currently uses a reference-counting scheme with (optional) delayed " +"detection of cyclically linked garbage, which collects most objects as soon " +"as they become unreachable, but is not guaranteed to collect garbage " +"containing circular references. See the documentation of the :mod:`gc` " +"module for information on controlling the collection of cyclic garbage. " +"Other implementations act differently and CPython may change. Do not depend " +"on immediate finalization of objects when they become unreachable (so you " +"should always close files explicitly)." +msgstr "" + +#: ../../reference/datamodel.rst:78 +msgid "" +"Note that the use of the implementation's tracing or debugging facilities " +"may keep objects alive that would normally be collectable. Also note that " +"catching an exception with a :keyword:`try`...\\ :keyword:`except` statement " +"may keep objects alive." +msgstr "" + +#: ../../reference/datamodel.rst:83 +msgid "" +"Some objects contain references to \"external\" resources such as open files " +"or windows. It is understood that these resources are freed when the object " +"is garbage-collected, but since garbage collection is not guaranteed to " +"happen, such objects also provide an explicit way to release the external " +"resource, usually a :meth:`!close` method. Programs are strongly recommended " +"to explicitly close such objects. The :keyword:`try`...\\ :keyword:" +"`finally` statement and the :keyword:`with` statement provide convenient " +"ways to do this." +msgstr "" + +#: ../../reference/datamodel.rst:93 +msgid "" +"Some objects contain references to other objects; these are called " +"*containers*. Examples of containers are tuples, lists and dictionaries. " +"The references are part of a container's value. In most cases, when we talk " +"about the value of a container, we imply the values, not the identities of " +"the contained objects; however, when we talk about the mutability of a " +"container, only the identities of the immediately contained objects are " +"implied. So, if an immutable container (like a tuple) contains a reference " +"to a mutable object, its value changes if that mutable object is changed." +msgstr "" + +#: ../../reference/datamodel.rst:102 +msgid "" +"Types affect almost all aspects of object behavior. Even the importance of " +"object identity is affected in some sense: for immutable types, operations " +"that compute new values may actually return a reference to any existing " +"object with the same type and value, while for mutable objects this is not " +"allowed. For example, after ``a = 1; b = 1``, *a* and *b* may or may not " +"refer to the same object with the value one, depending on the " +"implementation. This is because :class:`int` is an immutable type, so the " +"reference to ``1`` can be reused. This behaviour depends on the " +"implementation used, so should not be relied upon, but is something to be " +"aware of when making use of object identity tests. However, after ``c = []; " +"d = []``, *c* and *d* are guaranteed to refer to two different, unique, " +"newly created empty lists. (Note that ``e = f = []`` assigns the *same* " +"object to both *e* and *f*.)" +msgstr "" + +#: ../../reference/datamodel.rst:120 +msgid "The standard type hierarchy" +msgstr "" + +#: ../../reference/datamodel.rst:129 +msgid "" +"Below is a list of the types that are built into Python. Extension modules " +"(written in C, Java, or other languages, depending on the implementation) " +"can define additional types. Future versions of Python may add types to the " +"type hierarchy (e.g., rational numbers, efficiently stored arrays of " +"integers, etc.), although such additions will often be provided via the " +"standard library instead." +msgstr "" + +#: ../../reference/datamodel.rst:140 +msgid "" +"Some of the type descriptions below contain a paragraph listing 'special " +"attributes.' These are attributes that provide access to the implementation " +"and are not intended for general use. Their definition may change in the " +"future." +msgstr "" + +#: ../../reference/datamodel.rst:146 ../../reference/datamodel.rst:148 +msgid "None" +msgstr "" + +#: ../../reference/datamodel.rst:150 +msgid "" +"This type has a single value. There is a single object with this value. " +"This object is accessed through the built-in name ``None``. It is used to " +"signify the absence of a value in many situations, e.g., it is returned from " +"functions that don't explicitly return anything. Its truth value is false." +msgstr "" + +#: ../../reference/datamodel.rst:157 ../../reference/datamodel.rst:159 +msgid "NotImplemented" +msgstr "" + +#: ../../reference/datamodel.rst:161 +msgid "" +"This type has a single value. There is a single object with this value. " +"This object is accessed through the built-in name :data:`NotImplemented`. " +"Numeric methods and rich comparison methods should return this value if they " +"do not implement the operation for the operands provided. (The interpreter " +"will then try the reflected operation, or some other fallback, depending on " +"the operator.) It should not be evaluated in a boolean context." +msgstr "" + +#: ../../reference/datamodel.rst:168 +msgid "See :ref:`implementing-the-arithmetic-operations` for more details." +msgstr "" + +#: ../../reference/datamodel.rst:172 +msgid "Evaluating :data:`NotImplemented` in a boolean context was deprecated." +msgstr "" + +#: ../../reference/datamodel.rst:175 +msgid "" +"Evaluating :data:`NotImplemented` in a boolean context now raises a :exc:" +"`TypeError`. It previously evaluated to :const:`True` and emitted a :exc:" +"`DeprecationWarning` since Python 3.9." +msgstr "" + +#: ../../reference/datamodel.rst:182 ../../reference/datamodel.rst:183 +msgid "Ellipsis" +msgstr "" + +#: ../../reference/datamodel.rst:187 +msgid "" +"This type has a single value. There is a single object with this value. " +"This object is accessed through the literal ``...`` or the built-in name " +"``Ellipsis``. Its truth value is true." +msgstr "" + +#: ../../reference/datamodel.rst:193 +msgid ":class:`numbers.Number`" +msgstr "" + +#: ../../reference/datamodel.rst:197 +msgid "" +"These are created by numeric literals and returned as results by arithmetic " +"operators and arithmetic built-in functions. Numeric objects are immutable; " +"once created their value never changes. Python numbers are of course " +"strongly related to mathematical numbers, but subject to the limitations of " +"numerical representation in computers." +msgstr "" + +#: ../../reference/datamodel.rst:203 +msgid "" +"The string representations of the numeric classes, computed by :meth:" +"`~object.__repr__` and :meth:`~object.__str__`, have the following " +"properties:" +msgstr "" + +#: ../../reference/datamodel.rst:207 +msgid "" +"They are valid numeric literals which, when passed to their class " +"constructor, produce an object having the value of the original numeric." +msgstr "" + +#: ../../reference/datamodel.rst:211 +msgid "The representation is in base 10, when possible." +msgstr "" + +#: ../../reference/datamodel.rst:213 +msgid "" +"Leading zeros, possibly excepting a single zero before a decimal point, are " +"not shown." +msgstr "" + +#: ../../reference/datamodel.rst:216 +msgid "" +"Trailing zeros, possibly excepting a single zero after a decimal point, are " +"not shown." +msgstr "" + +#: ../../reference/datamodel.rst:219 +msgid "A sign is shown only when the number is negative." +msgstr "" + +#: ../../reference/datamodel.rst:221 +msgid "" +"Python distinguishes between integers, floating-point numbers, and complex " +"numbers:" +msgstr "" + +#: ../../reference/datamodel.rst:226 +msgid ":class:`numbers.Integral`" +msgstr "" + +#: ../../reference/datamodel.rst:230 +msgid "" +"These represent elements from the mathematical set of integers (positive and " +"negative)." +msgstr "" + +#: ../../reference/datamodel.rst:236 +msgid "" +"The rules for integer representation are intended to give the most " +"meaningful interpretation of shift and mask operations involving negative " +"integers." +msgstr "" + +#: ../../reference/datamodel.rst:239 +msgid "There are two types of integers:" +msgstr "" + +#: ../../reference/datamodel.rst:241 +msgid "Integers (:class:`int`)" +msgstr "" + +#: ../../reference/datamodel.rst:242 +msgid "" +"These represent numbers in an unlimited range, subject to available " +"(virtual) memory only. For the purpose of shift and mask operations, a " +"binary representation is assumed, and negative numbers are represented in a " +"variant of 2's complement which gives the illusion of an infinite string of " +"sign bits extending to the left." +msgstr "" + +#: ../../reference/datamodel.rst:248 +msgid "Booleans (:class:`bool`)" +msgstr "" + +#: ../../reference/datamodel.rst:254 +msgid "" +"These represent the truth values False and True. The two objects " +"representing the values ``False`` and ``True`` are the only Boolean objects. " +"The Boolean type is a subtype of the integer type, and Boolean values behave " +"like the values 0 and 1, respectively, in almost all contexts, the exception " +"being that when converted to a string, the strings ``\"False\"`` or " +"``\"True\"`` are returned, respectively." +msgstr "" + +#: ../../reference/datamodel.rst:264 +msgid ":class:`numbers.Real` (:class:`float`)" +msgstr "" + +#: ../../reference/datamodel.rst:272 +msgid "" +"These represent machine-level double precision floating-point numbers. You " +"are at the mercy of the underlying machine architecture (and C or Java " +"implementation) for the accepted range and handling of overflow. Python does " +"not support single-precision floating-point numbers; the savings in " +"processor and memory usage that are usually the reason for using these are " +"dwarfed by the overhead of using objects in Python, so there is no reason to " +"complicate the language with two kinds of floating-point numbers." +msgstr "" + +#: ../../reference/datamodel.rst:282 +msgid ":class:`numbers.Complex` (:class:`complex`)" +msgstr "" + +#: ../../reference/datamodel.rst:288 +msgid "" +"These represent complex numbers as a pair of machine-level double precision " +"floating-point numbers. The same caveats apply as for floating-point " +"numbers. The real and imaginary parts of a complex number ``z`` can be " +"retrieved through the read-only attributes ``z.real`` and ``z.imag``." +msgstr "" + +#: ../../reference/datamodel.rst:296 +msgid "Sequences" +msgstr "" + +#: ../../reference/datamodel.rst:305 +msgid "" +"These represent finite ordered sets indexed by non-negative numbers. The " +"built-in function :func:`len` returns the number of items of a sequence. " +"When the length of a sequence is *n*, the index set contains the numbers 0, " +"1, ..., *n*-1. Item *i* of sequence *a* is selected by ``a[i]``. Some " +"sequences, including built-in sequences, interpret negative subscripts by " +"adding the sequence length. For example, ``a[-2]`` equals ``a[n-2]``, the " +"second to last item of sequence a with length ``n``." +msgstr "" + +#: ../../reference/datamodel.rst:313 +msgid "" +"The resulting value must be a nonnegative integer less than the number of " +"items in the sequence. If it is not, an :exc:`IndexError` is raised." +msgstr "" + +#: ../../reference/datamodel.rst:322 +msgid "" +"Sequences also support slicing: ``a[start:stop]`` selects all items with " +"index *k* such that *start* ``<=`` *k* ``<`` *stop*. When used as an " +"expression, a slice is a sequence of the same type. The comment above about " +"negative subscripts also applies to negative slice positions. Note that no " +"error is raised if a slice position is less than zero or larger than the " +"length of the sequence." +msgstr "" + +#: ../../reference/datamodel.rst:329 +msgid "" +"If *start* is missing or :data:`None`, slicing behaves as if *start* was " +"zero. If *stop* is missing or ``None``, slicing behaves as if *stop* was " +"equal to the length of the sequence." +msgstr "" + +#: ../../reference/datamodel.rst:333 +msgid "" +"Some sequences also support \"extended slicing\" with a third \"step\" " +"parameter: ``a[i:j:k]`` selects all items of *a* with index *x* where ``x = " +"i + n*k``, *n* ``>=`` ``0`` and *i* ``<=`` *x* ``<`` *j*." +msgstr "" + +#: ../../reference/datamodel.rst:337 +msgid "Sequences are distinguished according to their mutability:" +msgstr "" + +#: ../../reference/datamodel.rst:341 +msgid "Immutable sequences" +msgstr "" + +#: ../../reference/datamodel.rst:347 +msgid "" +"An object of an immutable sequence type cannot change once it is created. " +"(If the object contains references to other objects, these other objects may " +"be mutable and may be changed; however, the collection of objects directly " +"referenced by an immutable object cannot change.)" +msgstr "" + +#: ../../reference/datamodel.rst:352 +msgid "The following types are immutable sequences:" +msgstr "" + +#: ../../reference/datamodel.rst:357 +msgid "Strings" +msgstr "" + +#: ../../reference/datamodel.rst:365 +msgid "" +"A string (:class:`str`) is a sequence of values that represent :dfn:" +"`characters`, or more formally, *Unicode code points*. All the code points " +"in the range ``0`` to ``0x10FFFF`` can be represented in a string." +msgstr "" + +#: ../../reference/datamodel.rst:370 +msgid "" +"Python doesn't have a dedicated *character* type. Instead, every code point " +"in the string is represented as a string object with length ``1``." +msgstr "" + +#: ../../reference/datamodel.rst:374 +msgid "" +"The built-in function :func:`ord` converts a code point from its string form " +"to an integer in the range ``0`` to ``0x10FFFF``; :func:`chr` converts an " +"integer in the range ``0`` to ``0x10FFFF`` to the corresponding length ``1`` " +"string object. :meth:`str.encode` can be used to convert a :class:`str` to :" +"class:`bytes` using the given text encoding, and :meth:`bytes.decode` can be " +"used to achieve the opposite." +msgstr "" + +#: ../../reference/datamodel.rst:382 +msgid "Tuples" +msgstr "" + +#: ../../reference/datamodel.rst:388 +msgid "" +"The items of a :class:`tuple` are arbitrary Python objects. Tuples of two or " +"more items are formed by comma-separated lists of expressions. A tuple of " +"one item (a 'singleton') can be formed by affixing a comma to an expression " +"(an expression by itself does not create a tuple, since parentheses must be " +"usable for grouping of expressions). An empty tuple can be formed by an " +"empty pair of parentheses." +msgstr "" + +#: ../../reference/datamodel.rst:395 +msgid "Bytes" +msgstr "" + +#: ../../reference/datamodel.rst:398 +msgid "" +"A :class:`bytes` object is an immutable array. The items are 8-bit bytes, " +"represented by integers in the range 0 <= x < 256. Bytes literals (like " +"``b'abc'``) and the built-in :func:`bytes` constructor can be used to create " +"bytes objects. Also, bytes objects can be decoded to strings via the :meth:" +"`~bytes.decode` method." +msgstr "" + +#: ../../reference/datamodel.rst:406 +msgid "Mutable sequences" +msgstr "" + +#: ../../reference/datamodel.rst:415 +msgid "" +"Mutable sequences can be changed after they are created. The subscription " +"and slicing notations can be used as the target of assignment and :keyword:" +"`del` (delete) statements." +msgstr "" + +#: ../../reference/datamodel.rst:423 +msgid "" +"The :mod:`collections` and :mod:`array` module provide additional examples " +"of mutable sequence types." +msgstr "" + +#: ../../reference/datamodel.rst:426 +msgid "There are currently two intrinsic mutable sequence types:" +msgstr "" + +#: ../../reference/datamodel.rst:428 +msgid "Lists" +msgstr "" + +#: ../../reference/datamodel.rst:431 +msgid "" +"The items of a list are arbitrary Python objects. Lists are formed by " +"placing a comma-separated list of expressions in square brackets. (Note that " +"there are no special cases needed to form lists of length 0 or 1.)" +msgstr "" + +#: ../../reference/datamodel.rst:435 +msgid "Byte Arrays" +msgstr "" + +#: ../../reference/datamodel.rst:438 +msgid "" +"A bytearray object is a mutable array. They are created by the built-in :" +"func:`bytearray` constructor. Aside from being mutable (and hence " +"unhashable), byte arrays otherwise provide the same interface and " +"functionality as immutable :class:`bytes` objects." +msgstr "" + +#: ../../reference/datamodel.rst:445 +msgid "Set types" +msgstr "" + +#: ../../reference/datamodel.rst:451 +msgid "" +"These represent unordered, finite sets of unique, immutable objects. As " +"such, they cannot be indexed by any subscript. However, they can be iterated " +"over, and the built-in function :func:`len` returns the number of items in a " +"set. Common uses for sets are fast membership testing, removing duplicates " +"from a sequence, and computing mathematical operations such as intersection, " +"union, difference, and symmetric difference." +msgstr "" + +#: ../../reference/datamodel.rst:458 +msgid "" +"For set elements, the same immutability rules apply as for dictionary keys. " +"Note that numeric types obey the normal rules for numeric comparison: if two " +"numbers compare equal (e.g., ``1`` and ``1.0``), only one of them can be " +"contained in a set." +msgstr "" + +#: ../../reference/datamodel.rst:463 +msgid "There are currently two intrinsic set types:" +msgstr "" + +#: ../../reference/datamodel.rst:466 +msgid "Sets" +msgstr "" + +#: ../../reference/datamodel.rst:469 +msgid "" +"These represent a mutable set. They are created by the built-in :func:`set` " +"constructor and can be modified afterwards by several methods, such as :meth:" +"`~set.add`." +msgstr "" + +#: ../../reference/datamodel.rst:474 +msgid "Frozen sets" +msgstr "" + +#: ../../reference/datamodel.rst:477 +msgid "" +"These represent an immutable set. They are created by the built-in :func:" +"`frozenset` constructor. As a frozenset is immutable and :term:`hashable`, " +"it can be used again as an element of another set, or as a dictionary key." +msgstr "" + +#: ../../reference/datamodel.rst:486 +msgid "Mappings" +msgstr "" + +#: ../../reference/datamodel.rst:493 +msgid "" +"These represent finite sets of objects indexed by arbitrary index sets. The " +"subscript notation ``a[k]`` selects the item indexed by ``k`` from the " +"mapping ``a``; this can be used in expressions and as the target of " +"assignments or :keyword:`del` statements. The built-in function :func:`len` " +"returns the number of items in a mapping." +msgstr "" + +#: ../../reference/datamodel.rst:499 +msgid "There are two intrinsic mapping types:" +msgstr "" + +#: ../../reference/datamodel.rst:503 +msgid "Dictionaries" +msgstr "" + +#: ../../reference/datamodel.rst:507 +msgid "" +"These represent finite sets of objects indexed by nearly arbitrary values. " +"The only types of values not acceptable as keys are values containing lists " +"or dictionaries or other mutable types that are compared by value rather " +"than by object identity, the reason being that the efficient implementation " +"of dictionaries requires a key's hash value to remain constant. Numeric " +"types used for keys obey the normal rules for numeric comparison: if two " +"numbers compare equal (e.g., ``1`` and ``1.0``) then they can be used " +"interchangeably to index the same dictionary entry." +msgstr "" + +#: ../../reference/datamodel.rst:516 +msgid "" +"Dictionaries preserve insertion order, meaning that keys will be produced in " +"the same order they were added sequentially over the dictionary. Replacing " +"an existing key does not change the order, however removing a key and re-" +"inserting it will add it to the end instead of keeping its old place." +msgstr "" + +#: ../../reference/datamodel.rst:521 +msgid "" +"Dictionaries are mutable; they can be created by the ``{}`` notation (see " +"section :ref:`dict`)." +msgstr "" + +#: ../../reference/datamodel.rst:528 +msgid "" +"The extension modules :mod:`dbm.ndbm` and :mod:`dbm.gnu` provide additional " +"examples of mapping types, as does the :mod:`collections` module." +msgstr "" + +#: ../../reference/datamodel.rst:532 +msgid "" +"Dictionaries did not preserve insertion order in versions of Python before " +"3.6. In CPython 3.6, insertion order was preserved, but it was considered an " +"implementation detail at that time rather than a language guarantee." +msgstr "" + +#: ../../reference/datamodel.rst:539 +msgid "Frozen dictionaries" +msgstr "" + +#: ../../reference/datamodel.rst:543 +msgid "" +"These represent an immutable dictionary. They are created by the built-in :" +"func:`frozendict` constructor. A frozendict is :term:`hashable` if all of " +"its keys and values are hashable, in which case it can be used as an element " +"of a set, or as a key in another mapping. :class:`!frozendict` is not a " +"subclass of :class:`dict`; it inherits directly from :class:`object`." +msgstr "" + +#: ../../reference/datamodel.rst:553 +msgid "Callable types" +msgstr "" + +#: ../../reference/datamodel.rst:561 +msgid "" +"These are the types to which the function call operation (see section :ref:" +"`calls`) can be applied:" +msgstr "" + +#: ../../reference/datamodel.rst:568 +msgid "User-defined functions" +msgstr "" + +#: ../../reference/datamodel.rst:575 +msgid "" +"A user-defined function object is created by a function definition (see " +"section :ref:`function`). It should be called with an argument list " +"containing the same number of items as the function's formal parameter list." +msgstr "" + +#: ../../reference/datamodel.rst:581 ../../reference/datamodel.rst:1503 +#: ../../reference/datamodel.rst:1696 +msgid "Special read-only attributes" +msgstr "" + +#: ../../reference/datamodel.rst:592 ../../reference/datamodel.rst:634 +#: ../../reference/datamodel.rst:1236 +msgid "Attribute" +msgstr "" + +#: ../../reference/datamodel.rst:593 ../../reference/datamodel.rst:635 +#: ../../reference/datamodel.rst:1237 +msgid "Meaning" +msgstr "" + +#: ../../reference/datamodel.rst:596 +msgid "" +"A reference to the :class:`dictionary ` that holds the function's " +"builtins namespace." +msgstr "" + +#: ../../reference/datamodel.rst:602 +msgid "" +"A reference to the :class:`dictionary ` that holds the function's :ref:" +"`global variables ` -- the global namespace of the module in which " +"the function was defined." +msgstr "" + +#: ../../reference/datamodel.rst:607 +msgid "" +"``None`` or a :class:`tuple` of cells that contain bindings for the names " +"specified in the :attr:`~codeobject.co_freevars` attribute of the " +"function's :attr:`code object `." +msgstr "" + +#: ../../reference/datamodel.rst:611 +msgid "" +"A cell object has the attribute ``cell_contents``. This can be used to get " +"the value of the cell, as well as set the value." +msgstr "" + +#: ../../reference/datamodel.rst:615 ../../reference/datamodel.rst:1744 +msgid "Special writable attributes" +msgstr "" + +#: ../../reference/datamodel.rst:629 +msgid "Most of these attributes check the type of the assigned value:" +msgstr "" + +#: ../../reference/datamodel.rst:638 +msgid "The function's documentation string, or ``None`` if unavailable." +msgstr "" + +#: ../../reference/datamodel.rst:641 +msgid "" +"The function's name. See also: :attr:`__name__ attributes `." +msgstr "" + +#: ../../reference/datamodel.rst:645 +msgid "" +"The function's :term:`qualified name`. See also: :attr:`__qualname__ " +"attributes `." +msgstr "" + +#: ../../reference/datamodel.rst:651 +msgid "" +"The name of the module the function was defined in, or ``None`` if " +"unavailable." +msgstr "" + +#: ../../reference/datamodel.rst:655 +msgid "" +"A :class:`tuple` containing default :term:`parameter` values for those " +"parameters that have defaults, or ``None`` if no parameters have a default " +"value." +msgstr "" + +#: ../../reference/datamodel.rst:660 +msgid "" +"The :ref:`code object ` representing the compiled function " +"body." +msgstr "" + +#: ../../reference/datamodel.rst:664 +msgid "" +"The namespace supporting arbitrary function attributes. See also: :attr:" +"`__dict__ attributes `." +msgstr "" + +#: ../../reference/datamodel.rst:668 +msgid "" +"A :class:`dictionary ` containing annotations of :term:`parameters " +"`. The keys of the dictionary are the parameter names, and " +"``'return'`` for the return annotation, if provided. See also: :attr:`object." +"__annotations__`." +msgstr "" + +#: ../../reference/datamodel.rst:674 ../../reference/datamodel.rst:1128 +#: ../../reference/datamodel.rst:1294 +msgid "" +"Annotations are now :ref:`lazily evaluated `. See :pep:" +"`649`." +msgstr "" + +#: ../../reference/datamodel.rst:679 +msgid "" +"The :term:`annotate function` for this function, or ``None`` if the function " +"has no annotations. See :attr:`object.__annotate__`." +msgstr "" + +#: ../../reference/datamodel.rst:685 +msgid "" +"A :class:`dictionary ` containing defaults for keyword-only :term:" +"`parameters `." +msgstr "" + +#: ../../reference/datamodel.rst:689 +msgid "" +"A :class:`tuple` containing the :ref:`type parameters ` of a :" +"ref:`generic function `." +msgstr "" + +#: ../../reference/datamodel.rst:694 +msgid "" +"Function objects also support getting and setting arbitrary attributes, " +"which can be used, for example, to attach metadata to functions. Regular " +"attribute dot-notation is used to get and set such attributes." +msgstr "" + +#: ../../reference/datamodel.rst:700 +msgid "" +"CPython's current implementation only supports function attributes on user-" +"defined functions. Function attributes on :ref:`built-in functions ` may be supported in the future." +msgstr "" + +#: ../../reference/datamodel.rst:705 +msgid "" +"Additional information about a function's definition can be retrieved from " +"its :ref:`code object ` (accessible via the :attr:`~function." +"__code__` attribute)." +msgstr "" + +#: ../../reference/datamodel.rst:713 +msgid "Instance methods" +msgstr "" + +#: ../../reference/datamodel.rst:720 +msgid "" +"An instance method object combines a class, a class instance and any " +"callable object (normally a user-defined function)." +msgstr "" + +#: ../../reference/datamodel.rst:730 ../../reference/datamodel.rst:1840 +msgid "Special read-only attributes:" +msgstr "" + +#: ../../reference/datamodel.rst:735 +msgid "" +"Refers to the class instance object to which the method is :ref:`bound " +"`" +msgstr "" + +#: ../../reference/datamodel.rst:739 +msgid "Refers to the original :ref:`function object `" +msgstr "" + +#: ../../reference/datamodel.rst:742 +msgid "" +"The method's documentation (same as :attr:`method.__func__.__doc__ `). A :class:`string ` if the original function had a " +"docstring, else ``None``." +msgstr "" + +#: ../../reference/datamodel.rst:748 +msgid "" +"The name of the method (same as :attr:`method.__func__.__name__ `)" +msgstr "" + +#: ../../reference/datamodel.rst:752 +msgid "" +"The name of the module the method was defined in, or ``None`` if unavailable." +msgstr "" + +#: ../../reference/datamodel.rst:755 +msgid "" +"Methods also support accessing (but not setting) the arbitrary function " +"attributes on the underlying :ref:`function object `." +msgstr "" + +#: ../../reference/datamodel.rst:758 +msgid "" +"User-defined method objects may be created when getting an attribute of a " +"class (perhaps via an instance of that class), if that attribute is a user-" +"defined :ref:`function object ` or a :class:" +"`classmethod` object." +msgstr "" + +#: ../../reference/datamodel.rst:765 +msgid "" +"When an instance method object is created by retrieving a user-defined :ref:" +"`function object ` from a class via one of its " +"instances, its :attr:`~method.__self__` attribute is the instance, and the " +"method object is said to be *bound*. The new method's :attr:`~method." +"__func__` attribute is the original function object." +msgstr "" + +#: ../../reference/datamodel.rst:771 +msgid "" +"When an instance method object is created by retrieving a :class:" +"`classmethod` object from a class or instance, its :attr:`~method.__self__` " +"attribute is the class itself, and its :attr:`~method.__func__` attribute is " +"the function object underlying the class method." +msgstr "" + +#: ../../reference/datamodel.rst:776 +msgid "" +"When an instance method object is called, the underlying function (:attr:" +"`~method.__func__`) is called, inserting the class instance (:attr:`~method." +"__self__`) in front of the argument list. For instance, when :class:`!C` is " +"a class which contains a definition for a function :meth:`!f`, and ``x`` is " +"an instance of :class:`!C`, calling ``x.f(1)`` is equivalent to calling ``C." +"f(x, 1)``." +msgstr "" + +#: ../../reference/datamodel.rst:783 +msgid "" +"When an instance method object is derived from a :class:`classmethod` " +"object, the \"class instance\" stored in :attr:`~method.__self__` will " +"actually be the class itself, so that calling either ``x.f(1)`` or ``C." +"f(1)`` is equivalent to calling ``f(C,1)`` where ``f`` is the underlying " +"function." +msgstr "" + +#: ../../reference/datamodel.rst:788 +msgid "" +"It is important to note that user-defined functions which are attributes of " +"a class instance are not converted to bound methods; this *only* happens " +"when the function is an attribute of the class." +msgstr "" + +#: ../../reference/datamodel.rst:795 +msgid "Generator functions" +msgstr "" + +#: ../../reference/datamodel.rst:801 +msgid "" +"A function or method which uses the :keyword:`yield` statement (see section :" +"ref:`yield`) is called a :dfn:`generator function`. Such a function, when " +"called, always returns an :term:`iterator` object which can be used to " +"execute the body of the function: calling the iterator's :meth:`iterator." +"__next__` method will cause the function to execute until it provides a " +"value using the :keyword:`!yield` statement. When the function executes a :" +"keyword:`return` statement or falls off the end, a :exc:`StopIteration` " +"exception is raised and the iterator will have reached the end of the set of " +"values to be returned." +msgstr "" + +#: ../../reference/datamodel.rst:813 +msgid "Coroutine functions" +msgstr "" + +#: ../../reference/datamodel.rst:818 +msgid "" +"A function or method which is defined using :keyword:`async def` is called " +"a :dfn:`coroutine function`. Such a function, when called, returns a :term:" +"`coroutine` object. It may contain :keyword:`await` expressions, as well " +"as :keyword:`async with` and :keyword:`async for` statements. See also the :" +"ref:`coroutine-objects` section." +msgstr "" + +#: ../../reference/datamodel.rst:826 +msgid "Asynchronous generator functions" +msgstr "" + +#: ../../reference/datamodel.rst:832 +msgid "" +"A function or method which is defined using :keyword:`async def` and which " +"uses the :keyword:`yield` statement is called a :dfn:`asynchronous generator " +"function`. Such a function, when called, returns an :term:`asynchronous " +"iterator` object which can be used in an :keyword:`async for` statement to " +"execute the body of the function." +msgstr "" + +#: ../../reference/datamodel.rst:838 +msgid "" +"Calling the asynchronous iterator's :meth:`aiterator.__anext__ ` method will return an :term:`awaitable` which when awaited will " +"execute until it provides a value using the :keyword:`yield` expression. " +"When the function executes an empty :keyword:`return` statement or falls off " +"the end, a :exc:`StopAsyncIteration` exception is raised and the " +"asynchronous iterator will have reached the end of the set of values to be " +"yielded." +msgstr "" + +#: ../../reference/datamodel.rst:851 +msgid "Built-in functions" +msgstr "" + +#: ../../reference/datamodel.rst:858 +msgid "" +"A built-in function object is a wrapper around a C function. Examples of " +"built-in functions are :func:`len` and :func:`math.sin` (:mod:`math` is a " +"standard built-in module). The number and type of the arguments are " +"determined by the C function. Special read-only attributes:" +msgstr "" + +#: ../../reference/datamodel.rst:863 +msgid "" +":attr:`!__doc__` is the function's documentation string, or ``None`` if " +"unavailable. See :attr:`function.__doc__`." +msgstr "" + +#: ../../reference/datamodel.rst:865 +msgid "" +":attr:`!__name__` is the function's name. See :attr:`function.__name__`." +msgstr "" + +#: ../../reference/datamodel.rst:866 +msgid ":attr:`!__self__` is set to ``None`` (but see the next item)." +msgstr "" + +#: ../../reference/datamodel.rst:867 +msgid "" +":attr:`!__module__` is the name of the module the function was defined in or " +"``None`` if unavailable. See :attr:`function.__module__`." +msgstr "" + +#: ../../reference/datamodel.rst:875 +msgid "Built-in methods" +msgstr "" + +#: ../../reference/datamodel.rst:882 +msgid "" +"This is really a different disguise of a built-in function, this time " +"containing an object passed to the C function as an implicit extra " +"argument. An example of a built-in method is ``alist.append()``, assuming " +"*alist* is a list object. In this case, the special read-only attribute :" +"attr:`!__self__` is set to the object denoted by *alist*. (The attribute has " +"the same semantics as it does with :attr:`other instance methods `.)" +msgstr "" + +#: ../../reference/datamodel.rst:892 +msgid "Classes" +msgstr "" + +#: ../../reference/datamodel.rst:894 +msgid "" +"Classes are callable. These objects normally act as factories for new " +"instances of themselves, but variations are possible for class types that " +"override :meth:`~object.__new__`. The arguments of the call are passed to :" +"meth:`!__new__` and, in the typical case, to :meth:`~object.__init__` to " +"initialize the new instance." +msgstr "" + +#: ../../reference/datamodel.rst:902 +msgid "Class Instances" +msgstr "" + +#: ../../reference/datamodel.rst:904 +msgid "" +"Instances of arbitrary classes can be made callable by defining a :meth:" +"`~object.__call__` method in their class." +msgstr "" + +#: ../../reference/datamodel.rst:911 +msgid "Modules" +msgstr "" + +#: ../../reference/datamodel.rst:917 +msgid "" +"Modules are a basic organizational unit of Python code, and are created by " +"the :ref:`import system ` as invoked either by the :keyword:" +"`import` statement, or by calling functions such as :func:`importlib." +"import_module` and built-in :func:`__import__`. A module object has a " +"namespace implemented by a :class:`dictionary ` object (this is the " +"dictionary referenced by the :attr:`~function.__globals__` attribute of " +"functions defined in the module). Attribute references are translated to " +"lookups in this dictionary, e.g., ``m.x`` is equivalent to ``m." +"__dict__[\"x\"]``. A module object does not contain the code object used to " +"initialize the module (since it isn't needed once the initialization is " +"done)." +msgstr "" + +#: ../../reference/datamodel.rst:930 +msgid "" +"Attribute assignment updates the module's namespace dictionary, e.g., ``m.x " +"= 1`` is equivalent to ``m.__dict__[\"x\"] = 1``." +msgstr "" + +#: ../../reference/datamodel.rst:949 +msgid "Import-related attributes on module objects" +msgstr "" + +#: ../../reference/datamodel.rst:951 +msgid "" +"Module objects have the following attributes that relate to the :ref:`import " +"system `. When a module is created using the machinery " +"associated with the import system, these attributes are filled in based on " +"the module's :term:`spec `, before the :term:`loader` executes " +"and loads the module." +msgstr "" + +#: ../../reference/datamodel.rst:957 +msgid "" +"To create a module dynamically rather than using the import system, it's " +"recommended to use :func:`importlib.util.module_from_spec`, which will set " +"the various import-controlled attributes to appropriate values. It's also " +"possible to use the :class:`types.ModuleType` constructor to create modules " +"directly, but this technique is more error-prone, as most attributes must be " +"manually set on the module object after it has been created when using this " +"approach." +msgstr "" + +#: ../../reference/datamodel.rst:967 +msgid "" +"With the exception of :attr:`~module.__name__`, it is **strongly** " +"recommended that you rely on :attr:`~module.__spec__` and its attributes " +"instead of any of the other individual attributes listed in this subsection. " +"Note that updating an attribute on :attr:`!__spec__` will not update the " +"corresponding attribute on the module itself:" +msgstr "" + +#: ../../reference/datamodel.rst:973 +msgid "" +">>> import typing\n" +">>> typing.__name__, typing.__spec__.name\n" +"('typing', 'typing')\n" +">>> typing.__spec__.name = 'spelling'\n" +">>> typing.__name__, typing.__spec__.name\n" +"('typing', 'spelling')\n" +">>> typing.__name__ = 'keyboard_smashing'\n" +">>> typing.__name__, typing.__spec__.name\n" +"('keyboard_smashing', 'spelling')" +msgstr "" + +#: ../../reference/datamodel.rst:987 +msgid "" +"The name used to uniquely identify the module in the import system. For a " +"directly executed module, this will be set to ``\"__main__\"``." +msgstr "" + +#: ../../reference/datamodel.rst:990 +msgid "" +"This attribute must be set to the fully qualified name of the module. It is " +"expected to match the value of :attr:`module.__spec__.name `." +msgstr "" + +#: ../../reference/datamodel.rst:996 +msgid "A record of the module's import-system-related state." +msgstr "" + +#: ../../reference/datamodel.rst:998 +msgid "" +"Set to the :class:`module spec ` that was " +"used when importing the module. See :ref:`module-specs` for more details." +msgstr "" + +#: ../../reference/datamodel.rst:1005 +msgid "The :term:`package` a module belongs to." +msgstr "" + +#: ../../reference/datamodel.rst:1007 +msgid "" +"If the module is top-level (that is, not a part of any specific package) " +"then the attribute should be set to ``''`` (the empty string). Otherwise, it " +"should be set to the name of the module's package (which can be equal to :" +"attr:`module.__name__` if the module itself is a package). See :pep:`366` " +"for further details." +msgstr "" + +#: ../../reference/datamodel.rst:1013 +msgid "" +"This attribute is used instead of :attr:`~module.__name__` to calculate " +"explicit relative imports for main modules. It defaults to ``None`` for " +"modules created dynamically using the :class:`types.ModuleType` constructor; " +"use :func:`importlib.util.module_from_spec` instead to ensure the attribute " +"is set to a :class:`str`." +msgstr "" + +#: ../../reference/datamodel.rst:1019 +msgid "" +"It is **strongly** recommended that you use :attr:`module.__spec__.parent " +"` instead of :attr:`!module." +"__package__`. :attr:`__package__` is now only used as a fallback if :attr:`!" +"__spec__.parent` is not set, and this fallback path is deprecated." +msgstr "" + +#: ../../reference/datamodel.rst:1025 ../../reference/datamodel.rst:1066 +msgid "" +"This attribute now defaults to ``None`` for modules created dynamically " +"using the :class:`types.ModuleType` constructor. Previously the attribute " +"was optional." +msgstr "" + +#: ../../reference/datamodel.rst:1030 +msgid "" +"The value of :attr:`!__package__` is expected to be the same as :attr:" +"`__spec__.parent `. :attr:" +"`__package__` is now only used as a fallback during import resolution if :" +"attr:`!__spec__.parent` is not defined." +msgstr "" + +#: ../../reference/datamodel.rst:1036 +msgid "" +":exc:`ImportWarning` is raised if an import resolution falls back to :attr:`!" +"__package__` instead of :attr:`__spec__.parent `." +msgstr "" + +#: ../../reference/datamodel.rst:1041 +msgid "" +"Raise :exc:`DeprecationWarning` instead of :exc:`ImportWarning` when falling " +"back to :attr:`!__package__` during import resolution." +msgstr "" + +#: ../../reference/datamodel.rst:1045 +msgid "" +":attr:`!__package__` will cease to be set or taken into consideration by the " +"import system or standard library." +msgstr "" + +#: ../../reference/datamodel.rst:1051 +msgid "" +"The :term:`loader` object that the import machinery used to load the module." +msgstr "" + +#: ../../reference/datamodel.rst:1053 +msgid "" +"This attribute is mostly useful for introspection, but can be used for " +"additional loader-specific functionality, for example getting data " +"associated with a loader." +msgstr "" + +#: ../../reference/datamodel.rst:1057 +msgid "" +":attr:`!__loader__` defaults to ``None`` for modules created dynamically " +"using the :class:`types.ModuleType` constructor; use :func:`importlib.util." +"module_from_spec` instead to ensure the attribute is set to a :term:`loader` " +"object." +msgstr "" + +#: ../../reference/datamodel.rst:1062 +msgid "" +"It is **strongly** recommended that you use :attr:`module.__spec__.loader " +"` instead of :attr:`!module." +"__loader__`." +msgstr "" + +#: ../../reference/datamodel.rst:1071 +msgid "" +"Setting :attr:`!__loader__` on a module while failing to set :attr:`!" +"__spec__.loader` is deprecated. In Python 3.16, :attr:`!__loader__` will " +"cease to be set or taken into consideration by the import system or the " +"standard library." +msgstr "" + +#: ../../reference/datamodel.rst:1079 +msgid "" +"A (possibly empty) :term:`sequence` of strings enumerating the locations " +"where the package's submodules will be found. Non-package modules should not " +"have a :attr:`!__path__` attribute. See :ref:`package-path-rules` for more " +"details." +msgstr "" + +#: ../../reference/datamodel.rst:1084 +msgid "" +"It is **strongly** recommended that you use :attr:`module.__spec__." +"submodule_search_locations ` instead of :attr:`!module.__path__`." +msgstr "" + +#: ../../reference/datamodel.rst:1090 +msgid "" +":attr:`!__file__` is an optional attribute that may or may not be set. Both " +"attributes should be a :class:`str` when they are available." +msgstr "" + +#: ../../reference/datamodel.rst:1094 +msgid "" +"An optional attribute, :attr:`!__file__` indicates the pathname of the file " +"from which the module was loaded (if loaded from a file), or the pathname of " +"the shared library file for extension modules loaded dynamically from a " +"shared library. It might be missing for certain types of modules, such as C " +"modules that are statically linked into the interpreter, and the :ref:" +"`import system ` may opt to leave it unset if it has no " +"semantic meaning (for example, a module loaded from a database)." +msgstr "" + +#: ../../reference/datamodel.rst:1102 +msgid "" +"Setting ``__cached__`` on a module while failing to set :attr:`!__spec__." +"cached` is deprecated. In Python 3.15, ``__cached__`` will cease to be set " +"or taken into consideration by the import system or standard library." +msgstr "" + +#: ../../reference/datamodel.rst:1108 +msgid "``__cached__`` is no longer set." +msgstr "" + +#: ../../reference/datamodel.rst:1112 +msgid "Other writable attributes on module objects" +msgstr "" + +#: ../../reference/datamodel.rst:1114 +msgid "" +"As well as the import-related attributes listed above, module objects also " +"have the following writable attributes:" +msgstr "" + +#: ../../reference/datamodel.rst:1119 +msgid "" +"The module's documentation string, or ``None`` if unavailable. See also: :" +"attr:`__doc__ attributes `." +msgstr "" + +#: ../../reference/datamodel.rst:1124 +msgid "" +"A dictionary containing :term:`variable annotations ` " +"collected during module body execution. For best practices on working with :" +"attr:`!__annotations__`, see :mod:`annotationlib`." +msgstr "" + +#: ../../reference/datamodel.rst:1134 +msgid "" +"The :term:`annotate function` for this module, or ``None`` if the module has " +"no annotations. See also: :attr:`~object.__annotate__` attributes." +msgstr "" + +#: ../../reference/datamodel.rst:1141 +msgid "" +"A container (an object implementing :meth:`~object.__contains__`) of fully " +"qualified module name strings. When defined at module scope, any regular :" +"keyword:`import` statement in that module whose target module name appears " +"in this container is treated as a :ref:`lazy import `, as if " +"the :keyword:`lazy` keyword had been used. Imports inside functions, class " +"bodies, or :keyword:`try`/:keyword:`except`/:keyword:`finally` blocks are " +"unaffected." +msgstr "" + +#: ../../reference/datamodel.rst:1149 +msgid "See :ref:`lazy-modules-compat` for details and examples." +msgstr "" + +#: ../../reference/datamodel.rst:1154 +msgid "Module dictionaries" +msgstr "" + +#: ../../reference/datamodel.rst:1156 +msgid "Module objects also have the following special read-only attribute:" +msgstr "" + +#: ../../reference/datamodel.rst:1161 +msgid "" +"The module's namespace as a dictionary object. Uniquely among the attributes " +"listed here, :attr:`!__dict__` cannot be accessed as a global variable from " +"within a module; it can only be accessed as an attribute on module objects." +msgstr "" + +#: ../../reference/datamodel.rst:1167 +msgid "" +"Because of the way CPython clears module dictionaries, the module dictionary " +"will be cleared when the module falls out of scope even if the dictionary " +"still has live references. To avoid this, copy the dictionary or keep the " +"module around while using its dictionary directly." +msgstr "" + +#: ../../reference/datamodel.rst:1176 +msgid "Custom classes" +msgstr "" + +#: ../../reference/datamodel.rst:1178 +msgid "" +"Custom class types are typically created by class definitions (see section :" +"ref:`class`). A class has a namespace implemented by a dictionary object. " +"Class attribute references are translated to lookups in this dictionary, e." +"g., ``C.x`` is translated to ``C.__dict__[\"x\"]`` (although there are a " +"number of hooks which allow for other means of locating attributes). When " +"the attribute name is not found there, the attribute search continues in the " +"base classes. This search of the base classes uses the C3 method resolution " +"order which behaves correctly even in the presence of 'diamond' inheritance " +"structures where there are multiple inheritance paths leading back to a " +"common ancestor. Additional details on the C3 MRO used by Python can be " +"found at :ref:`python_2.3_mro`." +msgstr "" + +#: ../../reference/datamodel.rst:1199 +msgid "" +"When a class attribute reference (for class :class:`!C`, say) would yield a " +"class method object, it is transformed into an instance method object whose :" +"attr:`~method.__self__` attribute is :class:`!C`. When it would yield a :" +"class:`staticmethod` object, it is transformed into the object wrapped by " +"the static method object. See section :ref:`descriptors` for another way in " +"which attributes retrieved from a class may differ from those actually " +"contained in its :attr:`~object.__dict__`." +msgstr "" + +#: ../../reference/datamodel.rst:1210 +msgid "" +"Class attribute assignments update the class's dictionary, never the " +"dictionary of a base class." +msgstr "" + +#: ../../reference/datamodel.rst:1215 +msgid "" +"A class object can be called (see above) to yield a class instance (see " +"below)." +msgstr "" + +#: ../../reference/datamodel.rst:1218 ../../reference/datamodel.rst:1394 +msgid "Special attributes" +msgstr "" + +#: ../../reference/datamodel.rst:1240 +msgid "" +"The class's name. See also: :attr:`__name__ attributes `." +msgstr "" + +#: ../../reference/datamodel.rst:1244 +msgid "" +"The class's :term:`qualified name`. See also: :attr:`__qualname__ attributes " +"`." +msgstr "" + +#: ../../reference/datamodel.rst:1248 +msgid "The name of the module in which the class was defined." +msgstr "" + +#: ../../reference/datamodel.rst:1251 +msgid "" +"A :class:`mapping proxy ` providing a read-only view " +"of the class's namespace. See also: :attr:`__dict__ attributes `." +msgstr "" + +#: ../../reference/datamodel.rst:1256 +msgid "" +"A :class:`tuple` containing the class's bases. In most cases, for a class " +"defined as ``class X(A, B, C)``, ``X.__bases__`` will be exactly equal to " +"``(A, B, C)``." +msgstr "" + +#: ../../reference/datamodel.rst:1263 +msgid "" +"The single base class in the inheritance chain that is responsible for the " +"memory layout of instances. This attribute corresponds to :c:member:" +"`~PyTypeObject.tp_base` at the C level." +msgstr "" + +#: ../../reference/datamodel.rst:1268 +msgid "" +"The class's documentation string, or ``None`` if undefined. Not inherited by " +"subclasses." +msgstr "" + +#: ../../reference/datamodel.rst:1272 +msgid "" +"A dictionary containing :term:`variable annotations ` " +"collected during class body execution. See also: :attr:`__annotations__ " +"attributes `." +msgstr "" + +#: ../../reference/datamodel.rst:1277 +msgid "" +"For best practices on working with :attr:`~object.__annotations__`, please " +"see :mod:`annotationlib`. Use :func:`annotationlib.get_annotations` instead " +"of accessing this attribute directly." +msgstr "" + +#: ../../reference/datamodel.rst:1284 +msgid "" +"Accessing the :attr:`!__annotations__` attribute directly on a class object " +"may return annotations for the wrong class, specifically in certain cases " +"where the class, its base class, or a metaclass is defined under ``from " +"__future__ import annotations``. See :pep:`749 <749#pep749-metaclasses>` for " +"details." +msgstr "" + +#: ../../reference/datamodel.rst:1290 +msgid "" +"This attribute does not exist on certain builtin classes. On user-defined " +"classes without ``__annotations__``, it is an empty dictionary." +msgstr "" + +#: ../../reference/datamodel.rst:1299 +msgid "" +"The :term:`annotate function` for this class, or ``None`` if the class has " +"no annotations. See also: :attr:`__annotate__ attributes `." +msgstr "" + +#: ../../reference/datamodel.rst:1306 +msgid "" +"A :class:`tuple` containing the :ref:`type parameters ` of a :" +"ref:`generic class `." +msgstr "" + +#: ../../reference/datamodel.rst:1312 +msgid "" +"A :class:`tuple` containing names of attributes of this class which are " +"assigned through ``self.X`` from any function in its body." +msgstr "" + +#: ../../reference/datamodel.rst:1318 +msgid "" +"The line number of the first line of the class definition, including " +"decorators. Setting the :attr:`~type.__module__` attribute removes the :attr:" +"`!__firstlineno__` item from the type's dictionary." +msgstr "" + +#: ../../reference/datamodel.rst:1326 +msgid "" +"The :class:`tuple` of classes that are considered when looking for base " +"classes during method resolution." +msgstr "" + +#: ../../reference/datamodel.rst:1331 +msgid "Special methods" +msgstr "" + +#: ../../reference/datamodel.rst:1333 +msgid "" +"In addition to the special attributes described above, all Python classes " +"also have the following two methods available:" +msgstr "" + +#: ../../reference/datamodel.rst:1338 +msgid "" +"This method can be overridden by a metaclass to customize the method " +"resolution order for its instances. It is called at class instantiation, " +"and its result is stored in :attr:`~type.__mro__`." +msgstr "" + +#: ../../reference/datamodel.rst:1344 +msgid "" +"Each class keeps a list of weak references to its immediate subclasses. This " +"method returns a list of all those references still alive. The list is in " +"definition order. Example:" +msgstr "" + +#: ../../reference/datamodel.rst:1348 +msgid "" +">>> class A: pass\n" +">>> class B(A): pass\n" +">>> A.__subclasses__()\n" +"[]" +msgstr "" + +#: ../../reference/datamodel.rst:1356 +msgid "Class instances" +msgstr "" + +#: ../../reference/datamodel.rst:1364 +msgid "" +"A class instance is created by calling a class object (see above). A class " +"instance has a namespace implemented as a dictionary which is the first " +"place in which attribute references are searched. When an attribute is not " +"found there, and the instance's class has an attribute by that name, the " +"search continues with the class attributes. If a class attribute is found " +"that is a user-defined function object, it is transformed into an instance " +"method object whose :attr:`~method.__self__` attribute is the instance. " +"Static method and class method objects are also transformed; see above under " +"\"Classes\". See section :ref:`descriptors` for another way in which " +"attributes of a class retrieved via its instances may differ from the " +"objects actually stored in the class's :attr:`~object.__dict__`. If no " +"class attribute is found, and the object's class has a :meth:`~object." +"__getattr__` method, that is called to satisfy the lookup." +msgstr "" + +#: ../../reference/datamodel.rst:1380 +msgid "" +"Attribute assignments and deletions update the instance's dictionary, never " +"a class's dictionary. If the class has a :meth:`~object.__setattr__` or :" +"meth:`~object.__delattr__` method, this is called instead of updating the " +"instance dictionary directly." +msgstr "" + +#: ../../reference/datamodel.rst:1390 +msgid "" +"Class instances can pretend to be numbers, sequences, or mappings if they " +"have methods with certain special names. See section :ref:`specialnames`." +msgstr "" + +#: ../../reference/datamodel.rst:1402 +msgid "The class to which a class instance belongs." +msgstr "" + +#: ../../reference/datamodel.rst:1406 +msgid "" +"A dictionary or other mapping object used to store an object's (writable) " +"attributes. Not all instances have a :attr:`!__dict__` attribute; see the " +"section on :ref:`slots` for more details." +msgstr "" + +#: ../../reference/datamodel.rst:1412 +msgid "I/O objects (also known as file objects)" +msgstr "" + +#: ../../reference/datamodel.rst:1427 +msgid "" +"A :term:`file object` represents an open file. Various shortcuts are " +"available to create file objects: the :func:`open` built-in function, and " +"also :func:`os.popen`, :func:`os.fdopen`, and the :meth:`~socket.socket." +"makefile` method of socket objects (and perhaps by other functions or " +"methods provided by extension modules)." +msgstr "" + +#: ../../reference/datamodel.rst:1433 +msgid "" +"File objects implement common methods, listed below, to simplify usage in " +"generic code. They are expected to be :ref:`context-managers`." +msgstr "" + +#: ../../reference/datamodel.rst:1436 +msgid "" +"The objects ``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` are initialized " +"to file objects corresponding to the interpreter's standard input, output " +"and error streams; they are all open in text mode and therefore follow the " +"interface defined by the :class:`io.TextIOBase` abstract class." +msgstr "" + +#: ../../reference/datamodel.rst:1444 +msgid "" +"Retrieve up to *size* data from the file. As a convenience if *size* is " +"unspecified or -1 retrieve all data available." +msgstr "" + +#: ../../reference/datamodel.rst:1449 +msgid "Store *data* to the file." +msgstr "" + +#: ../../reference/datamodel.rst:1453 +msgid "Flush any buffers and close the underlying file." +msgstr "" + +#: ../../reference/datamodel.rst:1457 +msgid "Internal types" +msgstr "" + +#: ../../reference/datamodel.rst:1463 +msgid "" +"A few types used internally by the interpreter are exposed to the user. " +"Their definitions may change with future versions of the interpreter, but " +"they are mentioned here for completeness." +msgstr "" + +#: ../../reference/datamodel.rst:1471 +msgid "Code objects" +msgstr "" + +#: ../../reference/datamodel.rst:1475 +msgid "" +"Code objects represent *byte-compiled* executable Python code, or :term:" +"`bytecode`. The difference between a code object and a function object is " +"that the function object contains an explicit reference to the function's " +"globals (the module in which it was defined), while a code object contains " +"no context; also the default argument values are stored in the function " +"object, not in the code object (because they represent values calculated at " +"run-time). Unlike function objects, code objects are immutable and contain " +"no references (directly or indirectly) to mutable objects." +msgstr "" + +#: ../../reference/datamodel.rst:1508 +msgid "The function name" +msgstr "" + +#: ../../reference/datamodel.rst:1511 +msgid "The fully qualified function name" +msgstr "" + +#: ../../reference/datamodel.rst:1516 +msgid "" +"The total number of positional :term:`parameters ` (including " +"positional-only parameters and parameters with default values) that the " +"function has" +msgstr "" + +#: ../../reference/datamodel.rst:1521 +msgid "" +"The number of positional-only :term:`parameters ` (including " +"arguments with default values) that the function has" +msgstr "" + +#: ../../reference/datamodel.rst:1525 +msgid "" +"The number of keyword-only :term:`parameters ` (including " +"arguments with default values) that the function has" +msgstr "" + +#: ../../reference/datamodel.rst:1529 +msgid "" +"The number of :ref:`local variables ` used by the function " +"(including parameters)" +msgstr "" + +#: ../../reference/datamodel.rst:1533 +msgid "" +"A :class:`tuple` containing the names of the local variables in the function " +"(starting with the parameter names)" +msgstr "" + +#: ../../reference/datamodel.rst:1537 +msgid "" +"A :class:`tuple` containing the names of :ref:`local variables ` " +"that are referenced from at least one :term:`nested scope` inside the " +"function" +msgstr "" + +#: ../../reference/datamodel.rst:1541 +msgid "" +"A :class:`tuple` containing the names of :term:`free (closure) variables " +"` that a :term:`nested scope` references in an outer " +"scope. See also :attr:`function.__closure__`." +msgstr "" + +#: ../../reference/datamodel.rst:1545 +msgid "Note: references to global and builtin names are *not* included." +msgstr "" + +#: ../../reference/datamodel.rst:1548 +msgid "" +"A string representing the sequence of :term:`bytecode` instructions in the " +"function" +msgstr "" + +#: ../../reference/datamodel.rst:1552 +msgid "" +"A :class:`tuple` containing the literals used by the :term:`bytecode` in the " +"function" +msgstr "" + +#: ../../reference/datamodel.rst:1556 +msgid "" +"A :class:`tuple` containing the names used by the :term:`bytecode` in the " +"function" +msgstr "" + +#: ../../reference/datamodel.rst:1560 +msgid "The name of the file from which the code was compiled" +msgstr "" + +#: ../../reference/datamodel.rst:1563 +msgid "The line number of the first line of the function" +msgstr "" + +#: ../../reference/datamodel.rst:1566 +msgid "The required stack size of the code object" +msgstr "" + +#: ../../reference/datamodel.rst:1569 +msgid "" +"An :class:`integer ` encoding a number of flags for the interpreter." +msgstr "" + +#: ../../reference/datamodel.rst:1574 +msgid "" +"The following flag bits are defined for :attr:`~codeobject.co_flags`: bit " +"``0x04`` is set if the function uses the ``*arguments`` syntax to accept an " +"arbitrary number of positional arguments; bit ``0x08`` is set if the " +"function uses the ``**keywords`` syntax to accept arbitrary keyword " +"arguments; bit ``0x20`` is set if the function is a generator. See :ref:" +"`inspect-module-co-flags` for details on the semantics of each flags that " +"might be present." +msgstr "" + +#: ../../reference/datamodel.rst:1582 +msgid "" +"Future feature declarations (for example, ``from __future__ import " +"division``) also use bits in :attr:`~codeobject.co_flags` to indicate " +"whether a code object was compiled with a particular feature enabled. See :" +"attr:`~__future__._Feature.compiler_flag`." +msgstr "" + +#: ../../reference/datamodel.rst:1586 +msgid "" +"Other bits in :attr:`~codeobject.co_flags` are reserved for internal use." +msgstr "" + +#: ../../reference/datamodel.rst:1590 +msgid "" +"If a code object represents a function and has a docstring, the :data:" +"`~inspect.CO_HAS_DOCSTRING` bit is set in :attr:`~codeobject.co_flags` and " +"the first item in :attr:`~codeobject.co_consts` is the docstring of the " +"function." +msgstr "" + +#: ../../reference/datamodel.rst:1596 +msgid "Methods on code objects" +msgstr "" + +#: ../../reference/datamodel.rst:1600 +msgid "" +"Returns an iterable over the source code positions of each :term:`bytecode` " +"instruction in the code object." +msgstr "" + +#: ../../reference/datamodel.rst:1603 +msgid "" +"The iterator returns :class:`tuple`\\s containing the ``(start_line, " +"end_line, start_column, end_column)``. The *i-th* tuple corresponds to the " +"position of the source code that compiled to the *i-th* code unit. Column " +"information is 0-indexed utf-8 byte offsets on the given source line." +msgstr "" + +#: ../../reference/datamodel.rst:1609 +msgid "" +"This positional information can be missing. A non-exhaustive lists of cases " +"where this may happen:" +msgstr "" + +#: ../../reference/datamodel.rst:1612 +msgid "Running the interpreter with :option:`-X` ``no_debug_ranges``." +msgstr "" + +#: ../../reference/datamodel.rst:1613 +msgid "" +"Loading a pyc file compiled while using :option:`-X` ``no_debug_ranges``." +msgstr "" + +#: ../../reference/datamodel.rst:1614 +msgid "Position tuples corresponding to artificial instructions." +msgstr "" + +#: ../../reference/datamodel.rst:1615 +msgid "" +"Line and column numbers that can't be represented due to implementation " +"specific limitations." +msgstr "" + +#: ../../reference/datamodel.rst:1618 +msgid "" +"When this occurs, some or all of the tuple elements can be :const:`None`." +msgstr "" + +#: ../../reference/datamodel.rst:1624 +msgid "" +"This feature requires storing column positions in code objects which may " +"result in a small increase of disk usage of compiled Python files or " +"interpreter memory usage. To avoid storing the extra information and/or " +"deactivate printing the extra traceback information, the :option:`-X` " +"``no_debug_ranges`` command line flag or the :envvar:`PYTHONNODEBUGRANGES` " +"environment variable can be used." +msgstr "" + +#: ../../reference/datamodel.rst:1633 +msgid "" +"Returns an iterator that yields information about successive ranges of :term:" +"`bytecode`\\s. Each item yielded is a ``(start, end, lineno)`` :class:" +"`tuple`:" +msgstr "" + +#: ../../reference/datamodel.rst:1637 +msgid "" +"``start`` (an :class:`int`) represents the offset (inclusive) of the start " +"of the :term:`bytecode` range" +msgstr "" + +#: ../../reference/datamodel.rst:1639 +msgid "" +"``end`` (an :class:`int`) represents the offset (exclusive) of the end of " +"the :term:`bytecode` range" +msgstr "" + +#: ../../reference/datamodel.rst:1641 +msgid "" +"``lineno`` is an :class:`int` representing the line number of the :term:" +"`bytecode` range, or ``None`` if the bytecodes in the given range have no " +"line number" +msgstr "" + +#: ../../reference/datamodel.rst:1645 +msgid "The items yielded will have the following properties:" +msgstr "" + +#: ../../reference/datamodel.rst:1647 +msgid "The first range yielded will have a ``start`` of 0." +msgstr "" + +#: ../../reference/datamodel.rst:1648 +msgid "" +"The ``(start, end)`` ranges will be non-decreasing and consecutive. That is, " +"for any pair of :class:`tuple`\\s, the ``start`` of the second will be equal " +"to the ``end`` of the first." +msgstr "" + +#: ../../reference/datamodel.rst:1651 +msgid "No range will be backwards: ``end >= start`` for all triples." +msgstr "" + +#: ../../reference/datamodel.rst:1652 +msgid "" +"The last :class:`tuple` yielded will have ``end`` equal to the size of the :" +"term:`bytecode`." +msgstr "" + +#: ../../reference/datamodel.rst:1655 +msgid "" +"Zero-width ranges, where ``start == end``, are allowed. Zero-width ranges " +"are used for lines that are present in the source code, but have been " +"eliminated by the :term:`bytecode` compiler." +msgstr "" + +#: ../../reference/datamodel.rst:1663 +msgid ":pep:`626` - Precise line numbers for debugging and other tools." +msgstr "" + +#: ../../reference/datamodel.rst:1664 +msgid "The PEP that introduced the :meth:`!co_lines` method." +msgstr "" + +#: ../../reference/datamodel.rst:1668 +msgid "" +"Return a copy of the code object with new values for the specified fields." +msgstr "" + +#: ../../reference/datamodel.rst:1670 +msgid "" +"Code objects are also supported by the generic function :func:`copy.replace`." +msgstr "" + +#: ../../reference/datamodel.rst:1678 +msgid "Frame objects" +msgstr "" + +#: ../../reference/datamodel.rst:1682 +msgid "" +"Frame objects represent execution frames. They may occur in :ref:`traceback " +"objects `, and are also passed to registered trace " +"functions." +msgstr "" + +#: ../../reference/datamodel.rst:1701 +msgid "" +"Points to the previous stack frame (towards the caller), or ``None`` if this " +"is the bottom stack frame" +msgstr "" + +#: ../../reference/datamodel.rst:1705 +msgid "" +"The :ref:`code object ` being executed in this frame. " +"Accessing this attribute raises an :ref:`auditing event ` ``object." +"__getattr__`` with arguments ``obj`` and ``\"f_code\"``." +msgstr "" + +#: ../../reference/datamodel.rst:1710 +msgid "" +"The mapping used by the frame to look up :ref:`local variables `. If " +"the frame refers to an :term:`optimized scope`, this may return a write-" +"through proxy object." +msgstr "" + +#: ../../reference/datamodel.rst:1715 +msgid "Return a proxy for optimized scopes." +msgstr "" + +#: ../../reference/datamodel.rst:1719 +msgid "" +"The dictionary used by the frame to look up :ref:`global variables `" +msgstr "" + +#: ../../reference/datamodel.rst:1723 +msgid "" +"The dictionary used by the frame to look up :ref:`built-in (intrinsic) names " +"`" +msgstr "" + +#: ../../reference/datamodel.rst:1727 +msgid "" +"The \"precise instruction\" of the frame object (this is an index into the :" +"term:`bytecode` string of the :ref:`code object `)" +msgstr "" + +#: ../../reference/datamodel.rst:1732 +msgid "" +"The :term:`generator` or :term:`coroutine` object that owns this frame, or " +"``None`` if the frame is a normal function." +msgstr "" + +#: ../../reference/datamodel.rst:1749 +msgid "" +"If not ``None``, this is a function called for various events during code " +"execution (this is used by debuggers). Normally an event is triggered for " +"each new source line (see :attr:`~frame.f_trace_lines`)." +msgstr "" + +#: ../../reference/datamodel.rst:1754 +msgid "" +"Set this attribute to :const:`False` to disable triggering a tracing event " +"for each source line." +msgstr "" + +#: ../../reference/datamodel.rst:1758 +msgid "" +"Set this attribute to :const:`True` to allow per-opcode events to be " +"requested. Note that this may lead to undefined interpreter behaviour if " +"exceptions raised by the trace function escape to the function being traced." +msgstr "" + +#: ../../reference/datamodel.rst:1764 +msgid "" +"The current line number of the frame -- writing to this from within a trace " +"function jumps to the given line (only for the bottom-most frame). A " +"debugger can implement a Jump command (aka Set Next Statement) by writing to " +"this attribute." +msgstr "" + +#: ../../reference/datamodel.rst:1770 +msgid "Frame object methods" +msgstr "" + +#: ../../reference/datamodel.rst:1772 +msgid "Frame objects support one method:" +msgstr "" + +#: ../../reference/datamodel.rst:1776 +msgid "" +"This method clears all references to :ref:`local variables ` held by " +"the frame. Also, if the frame belonged to a :term:`generator`, the " +"generator is finalized. This helps break reference cycles involving frame " +"objects (for example when catching an :ref:`exception ` " +"and storing its :ref:`traceback ` for later use)." +msgstr "" + +#: ../../reference/datamodel.rst:1782 +msgid "" +":exc:`RuntimeError` is raised if the frame is currently executing or " +"suspended." +msgstr "" + +#: ../../reference/datamodel.rst:1787 +msgid "" +"Attempting to clear a suspended frame raises :exc:`RuntimeError` (as has " +"always been the case for executing frames)." +msgstr "" + +#: ../../reference/datamodel.rst:1795 +msgid "Traceback objects" +msgstr "" + +#: ../../reference/datamodel.rst:1808 +msgid "" +"Traceback objects represent the stack trace of an :ref:`exception `. A traceback object is implicitly created when an exception occurs, " +"and may also be explicitly created by calling :class:`types.TracebackType`." +msgstr "" + +#: ../../reference/datamodel.rst:1813 +msgid "Traceback objects can now be explicitly instantiated from Python code." +msgstr "" + +#: ../../reference/datamodel.rst:1816 +msgid "" +"For implicitly created tracebacks, when the search for an exception handler " +"unwinds the execution stack, at each unwound level a traceback object is " +"inserted in front of the current traceback. When an exception handler is " +"entered, the stack trace is made available to the program. (See section :ref:" +"`try`.) It is accessible as the third item of the tuple returned by :func:" +"`sys.exc_info`, and as the :attr:`~BaseException.__traceback__` attribute of " +"the caught exception." +msgstr "" + +#: ../../reference/datamodel.rst:1825 +msgid "" +"When the program contains no suitable handler, the stack trace is written " +"(nicely formatted) to the standard error stream; if the interpreter is " +"interactive, it is also made available to the user as :data:`sys." +"last_traceback`." +msgstr "" + +#: ../../reference/datamodel.rst:1830 +msgid "" +"For explicitly created tracebacks, it is up to the creator of the traceback " +"to determine how the :attr:`~traceback.tb_next` attributes should be linked " +"to form a full stack trace." +msgstr "" + +#: ../../reference/datamodel.rst:1845 +msgid "" +"Points to the execution :ref:`frame ` of the current level." +msgstr "" + +#: ../../reference/datamodel.rst:1848 +msgid "" +"Accessing this attribute raises an :ref:`auditing event ` ``object." +"__getattr__`` with arguments ``obj`` and ``\"tb_frame\"``." +msgstr "" + +#: ../../reference/datamodel.rst:1853 +msgid "Gives the line number where the exception occurred" +msgstr "" + +#: ../../reference/datamodel.rst:1856 +msgid "Indicates the \"precise instruction\"." +msgstr "" + +#: ../../reference/datamodel.rst:1858 +msgid "" +"The line number and last instruction in the traceback may differ from the " +"line number of its :ref:`frame object ` if the exception " +"occurred in a :keyword:`try` statement with no matching except clause or " +"with a :keyword:`finally` clause." +msgstr "" + +#: ../../reference/datamodel.rst:1869 +msgid "" +"The special writable attribute :attr:`!tb_next` is the next level in the " +"stack trace (towards the frame where the exception occurred), or ``None`` if " +"there is no next level." +msgstr "" + +#: ../../reference/datamodel.rst:1873 +msgid "This attribute is now writable" +msgstr "" + +#: ../../reference/datamodel.rst:1878 +msgid "Slice objects" +msgstr "" + +#: ../../reference/datamodel.rst:1882 +msgid "" +"Slice objects are used to represent slices for :meth:`~object.__getitem__` " +"methods. They are also created by the built-in :func:`slice` function." +msgstr "" + +#: ../../reference/datamodel.rst:1888 +msgid "" +"The :func:`slice` type now supports :ref:`subscription `. For " +"example, ``slice[float]`` may be used in type annotations to indicate a " +"slice containing :type:`float` objects." +msgstr "" + +#: ../../reference/datamodel.rst:1897 +msgid "" +"Special read-only attributes: :attr:`~slice.start` is the lower bound; :attr:" +"`~slice.stop` is the upper bound; :attr:`~slice.step` is the step value; " +"each is ``None`` if omitted. These attributes can have any type." +msgstr "" + +#: ../../reference/datamodel.rst:1901 +msgid "Slice objects support one method:" +msgstr "" + +#: ../../reference/datamodel.rst:1905 +msgid "" +"This method takes a single integer argument *length* and computes " +"information about the slice that the slice object would describe if applied " +"to a sequence of *length* items. It returns a tuple of three integers; " +"respectively these are the *start* and *stop* indices and the *step* or " +"stride length of the slice. Missing or out-of-bounds indices are handled in " +"a manner consistent with regular slices." +msgstr "" + +#: ../../reference/datamodel.rst:1914 +msgid "Static method objects" +msgstr "" + +#: ../../reference/datamodel.rst:1916 +msgid "" +"Static method objects provide a way of defeating the transformation of " +"function objects to method objects described above. A static method object " +"is a wrapper around any other object, usually a user-defined method object. " +"When a static method object is retrieved from a class or a class instance, " +"the object actually returned is the wrapped object, which is not subject to " +"any further transformation. Static method objects are also callable. Static " +"method objects are created by the built-in :func:`staticmethod` constructor." +msgstr "" + +#: ../../reference/datamodel.rst:1926 +msgid "Class method objects" +msgstr "" + +#: ../../reference/datamodel.rst:1928 +msgid "" +"A class method object, like a static method object, is a wrapper around " +"another object that alters the way in which that object is retrieved from " +"classes and class instances. The behaviour of class method objects upon such " +"retrieval is described above, under :ref:`\"instance methods\" `. Class method objects are created by the built-in :func:" +"`classmethod` constructor." +msgstr "" + +#: ../../reference/datamodel.rst:1938 +msgid "Special method names" +msgstr "" + +#: ../../reference/datamodel.rst:1944 +msgid "" +"A class can implement certain operations that are invoked by special syntax " +"(such as arithmetic operations or subscripting and slicing) by defining " +"methods with special names. This is Python's approach to :dfn:`operator " +"overloading`, allowing classes to define their own behavior with respect to " +"language operators. For instance, if a class defines a method named :meth:" +"`~object.__getitem__`, and ``x`` is an instance of this class, then ``x[i]`` " +"is roughly equivalent to ``type(x).__getitem__(x, i)``. Except where " +"mentioned, attempts to execute an operation raise an exception when no " +"appropriate method is defined (typically :exc:`AttributeError` or :exc:" +"`TypeError`)." +msgstr "" + +#: ../../reference/datamodel.rst:1955 +msgid "" +"Setting a special method to ``None`` indicates that the corresponding " +"operation is not available. For example, if a class sets :meth:`~object." +"__iter__` to ``None``, the class is not iterable, so calling :func:`iter` on " +"its instances will raise a :exc:`TypeError` (without falling back to :meth:" +"`~object.__getitem__`). [#]_" +msgstr "" + +#: ../../reference/datamodel.rst:1961 +msgid "" +"When implementing a class that emulates any built-in type, it is important " +"that the emulation only be implemented to the degree that it makes sense for " +"the object being modelled. For example, some sequences may work well with " +"retrieval of individual elements, but extracting a slice may not make sense. " +"(One example of this is the :ref:`NodeList ` interface " +"in the W3C's Document Object Model.)" +msgstr "" + +#: ../../reference/datamodel.rst:1972 +msgid "Basic customization" +msgstr "" + +#: ../../reference/datamodel.rst:1978 +msgid "" +"Called to create a new instance of class *cls*. :meth:`__new__` is a static " +"method (special-cased so you need not declare it as such) that takes the " +"class of which an instance was requested as its first argument. The " +"remaining arguments are those passed to the object constructor expression " +"(the call to the class). The return value of :meth:`__new__` should be the " +"new object instance (usually an instance of *cls*)." +msgstr "" + +#: ../../reference/datamodel.rst:1985 +msgid "" +"Typical implementations create a new instance of the class by invoking the " +"superclass's :meth:`__new__` method using ``super().__new__(cls[, ...])`` " +"with appropriate arguments and then modifying the newly created instance as " +"necessary before returning it." +msgstr "" + +#: ../../reference/datamodel.rst:1990 +msgid "" +"If :meth:`__new__` is invoked during object construction and it returns an " +"instance of *cls*, then the new instance’s :meth:`__init__` method will be " +"invoked like ``__init__(self[, ...])``, where *self* is the new instance and " +"the remaining arguments are the same as were passed to the object " +"constructor." +msgstr "" + +#: ../../reference/datamodel.rst:1995 +msgid "" +"If :meth:`__new__` does not return an instance of *cls*, then the new " +"instance's :meth:`__init__` method will not be invoked." +msgstr "" + +#: ../../reference/datamodel.rst:1998 +msgid "" +":meth:`__new__` is intended mainly to allow subclasses of immutable types " +"(like int, str, or tuple) to customize instance creation. It is also " +"commonly overridden in custom metaclasses in order to customize class " +"creation." +msgstr "" + +#: ../../reference/datamodel.rst:2007 +msgid "" +"Called after the instance has been created (by :meth:`__new__`), but before " +"it is returned to the caller. The arguments are those passed to the class " +"constructor expression. If a base class has an :meth:`__init__` method, the " +"derived class's :meth:`__init__` method, if any, must explicitly call it to " +"ensure proper initialization of the base class part of the instance; for " +"example: ``super().__init__([args...])``." +msgstr "" + +#: ../../reference/datamodel.rst:2014 +msgid "" +"Because :meth:`__new__` and :meth:`__init__` work together in constructing " +"objects (:meth:`__new__` to create it, and :meth:`__init__` to customize " +"it), no non-``None`` value may be returned by :meth:`__init__`; doing so " +"will cause a :exc:`TypeError` to be raised at runtime." +msgstr "" + +#: ../../reference/datamodel.rst:2027 +msgid "" +"Called when the instance is about to be destroyed. This is also called a " +"finalizer or (improperly) a destructor. If a base class has a :meth:" +"`__del__` method, the derived class's :meth:`__del__` method, if any, must " +"explicitly call it to ensure proper deletion of the base class part of the " +"instance." +msgstr "" + +#: ../../reference/datamodel.rst:2033 +msgid "" +"It is possible (though not recommended!) for the :meth:`__del__` method to " +"postpone destruction of the instance by creating a new reference to it. " +"This is called object *resurrection*. It is implementation-dependent " +"whether :meth:`__del__` is called a second time when a resurrected object is " +"about to be destroyed; the current :term:`CPython` implementation only calls " +"it once." +msgstr "" + +#: ../../reference/datamodel.rst:2040 +msgid "" +"It is not guaranteed that :meth:`__del__` methods are called for objects " +"that still exist when the interpreter exits. :class:`weakref.finalize` " +"provides a straightforward way to register a cleanup function to be called " +"when an object is garbage collected." +msgstr "" + +#: ../../reference/datamodel.rst:2047 +msgid "" +"``del x`` doesn't directly call ``x.__del__()`` --- the former decrements " +"the reference count for ``x`` by one, and the latter is only called when " +"``x``'s reference count reaches zero." +msgstr "" + +#: ../../reference/datamodel.rst:2052 +msgid "" +"It is possible for a reference cycle to prevent the reference count of an " +"object from going to zero. In this case, the cycle will be later detected " +"and deleted by the :term:`cyclic garbage collector `. A " +"common cause of reference cycles is when an exception has been caught in a " +"local variable. The frame's locals then reference the exception, which " +"references its own traceback, which references the locals of all frames " +"caught in the traceback." +msgstr "" + +#: ../../reference/datamodel.rst:2062 +msgid "Documentation for the :mod:`gc` module." +msgstr "" + +#: ../../reference/datamodel.rst:2066 +msgid "" +"Due to the precarious circumstances under which :meth:`__del__` methods are " +"invoked, exceptions that occur during their execution are ignored, and a " +"warning is printed to ``sys.stderr`` instead. In particular:" +msgstr "" + +#: ../../reference/datamodel.rst:2070 +msgid "" +":meth:`__del__` can be invoked when arbitrary code is being executed, " +"including from any arbitrary thread. If :meth:`__del__` needs to take a " +"lock or invoke any other blocking resource, it may deadlock as the resource " +"may already be taken by the code that gets interrupted to execute :meth:" +"`__del__`." +msgstr "" + +#: ../../reference/datamodel.rst:2076 +msgid "" +":meth:`__del__` can be executed during interpreter shutdown. As a " +"consequence, the global variables it needs to access (including other " +"modules) may already have been deleted or set to ``None``. Python guarantees " +"that globals whose name begins with a single underscore are deleted from " +"their module before other globals are deleted; if no other references to " +"such globals exist, this may help in assuring that imported modules are " +"still available at the time when the :meth:`__del__` method is called." +msgstr "" + +#: ../../reference/datamodel.rst:2091 +msgid "" +"Called by the :func:`repr` built-in function to compute the \"official\" " +"string representation of an object. If at all possible, this should look " +"like a valid Python expression that could be used to recreate an object with " +"the same value (given an appropriate environment). If this is not possible, " +"a string of the form ``<...some useful description...>`` should be returned. " +"The return value must be a string object. If a class defines :meth:" +"`__repr__` but not :meth:`__str__`, then :meth:`__repr__` is also used when " +"an \"informal\" string representation of instances of that class is required." +msgstr "" + +#: ../../reference/datamodel.rst:2100 +msgid "" +"This is typically used for debugging, so it is important that the " +"representation is information-rich and unambiguous. A default implementation " +"is provided by the :class:`object` class itself." +msgstr "" + +#: ../../reference/datamodel.rst:2112 +msgid "" +"Called by :func:`str(object) `, the default :meth:`__format__` " +"implementation, and the built-in function :func:`print`, to compute the " +"\"informal\" or nicely printable string representation of an object. The " +"return value must be a :ref:`str ` object." +msgstr "" + +#: ../../reference/datamodel.rst:2117 +msgid "" +"This method differs from :meth:`object.__repr__` in that there is no " +"expectation that :meth:`__str__` return a valid Python expression: a more " +"convenient or concise representation can be used." +msgstr "" + +#: ../../reference/datamodel.rst:2121 +msgid "" +"The default implementation defined by the built-in type :class:`object` " +"calls :meth:`object.__repr__`." +msgstr "" + +#: ../../reference/datamodel.rst:2131 +msgid "" +"Called by :ref:`bytes ` to compute a byte-string representation " +"of an object. This should return a :class:`bytes` object. The :class:" +"`object` class itself does not provide this method." +msgstr "" + +#: ../../reference/datamodel.rst:2143 +msgid "" +"Called by the :func:`format` built-in function, and by extension, evaluation " +"of :ref:`formatted string literals ` and the :meth:`str.format` " +"method, to produce a \"formatted\" string representation of an object. The " +"*format_spec* argument is a string that contains a description of the " +"formatting options desired. The interpretation of the *format_spec* argument " +"is up to the type implementing :meth:`__format__`, however most classes will " +"either delegate formatting to one of the built-in types, or use a similar " +"formatting option syntax." +msgstr "" + +#: ../../reference/datamodel.rst:2153 +msgid "" +"See :ref:`formatspec` for a description of the standard formatting syntax." +msgstr "" + +#: ../../reference/datamodel.rst:2155 +msgid "The return value must be a string object." +msgstr "" + +#: ../../reference/datamodel.rst:2157 +msgid "" +"The default implementation by the :class:`object` class should be given an " +"empty *format_spec* string. It delegates to :meth:`__str__`." +msgstr "" + +#: ../../reference/datamodel.rst:2160 +msgid "" +"The __format__ method of ``object`` itself raises a :exc:`TypeError` if " +"passed any non-empty string." +msgstr "" + +#: ../../reference/datamodel.rst:2164 +msgid "" +"``object.__format__(x, '')`` is now equivalent to ``str(x)`` rather than " +"``format(str(x), '')``." +msgstr "" + +#: ../../reference/datamodel.rst:2180 +msgid "" +"These are the so-called \"rich comparison\" methods. The correspondence " +"between operator symbols and method names is as follows: ``xy`` calls ``x.__gt__(y)``, and ``x>=y`` " +"calls ``x.__ge__(y)``." +msgstr "" + +#: ../../reference/datamodel.rst:2186 +msgid "" +"A rich comparison method may return the singleton :data:`NotImplemented` if " +"it does not implement the operation for a given pair of arguments. By " +"convention, ``False`` and ``True`` are returned for a successful comparison. " +"However, these methods can return any value, so if the comparison operator " +"is used in a Boolean context (e.g., in the condition of an ``if`` " +"statement), Python will call :func:`bool` on the value to determine if the " +"result is true or false." +msgstr "" + +#: ../../reference/datamodel.rst:2193 +msgid "" +"By default, ``object`` implements :meth:`__eq__` by using ``is``, returning :" +"data:`NotImplemented` in the case of a false comparison: ``True if x is y " +"else NotImplemented``. For :meth:`__ne__`, by default it delegates to :meth:" +"`__eq__` and inverts the result unless it is :data:`!NotImplemented`. There " +"are no other implied relationships among the comparison operators or default " +"implementations; for example, the truth of ``(x.__hash__``." +msgstr "" + +#: ../../reference/datamodel.rst:2278 +msgid "" +"If a class that does not override :meth:`__eq__` wishes to suppress hash " +"support, it should include ``__hash__ = None`` in the class definition. A " +"class which defines its own :meth:`__hash__` that explicitly raises a :exc:" +"`TypeError` would be incorrectly identified as hashable by an " +"``isinstance(obj, collections.abc.Hashable)`` call." +msgstr "" + +#: ../../reference/datamodel.rst:2287 +msgid "" +"By default, the :meth:`__hash__` values of str and bytes objects are " +"\"salted\" with an unpredictable random value. Although they remain " +"constant within an individual Python process, they are not predictable " +"between repeated invocations of Python." +msgstr "" + +#: ../../reference/datamodel.rst:2292 +msgid "" +"This is intended to provide protection against a denial-of-service caused by " +"carefully chosen inputs that exploit the worst case performance of a dict " +"insertion, *O*\\ (*n*\\ :sup:`2`) complexity. See https://ocert.org/" +"advisories/ocert-2011-003.html for details." +msgstr "" + +#: ../../reference/datamodel.rst:2297 +msgid "" +"Changing hash values affects the iteration order of sets. Python has never " +"made guarantees about this ordering (and it typically varies between 32-bit " +"and 64-bit builds)." +msgstr "" + +#: ../../reference/datamodel.rst:2301 +msgid "See also :envvar:`PYTHONHASHSEED`." +msgstr "" + +#: ../../reference/datamodel.rst:2303 +msgid "Hash randomization is enabled by default." +msgstr "" + +#: ../../reference/datamodel.rst:2311 +msgid "" +"Called to implement truth value testing and the built-in operation " +"``bool()``; should return ``False`` or ``True``. When this method is not " +"defined, :meth:`~object.__len__` is called, if it is defined, and the object " +"is considered true if its result is nonzero. If a class defines neither :" +"meth:`!__len__` nor :meth:`!__bool__` (which is true of the :class:`object` " +"class itself), all its instances are considered true." +msgstr "" + +#: ../../reference/datamodel.rst:2322 +msgid "Customizing attribute access" +msgstr "" + +#: ../../reference/datamodel.rst:2324 +msgid "" +"The following methods can be defined to customize the meaning of attribute " +"access (use of, assignment to, or deletion of ``x.name``) for class " +"instances." +msgstr "" + +#: ../../reference/datamodel.rst:2332 +msgid "" +"Called when the default attribute access fails with an :exc:`AttributeError` " +"(either :meth:`__getattribute__` raises an :exc:`AttributeError` because " +"*name* is not an instance attribute or an attribute in the class tree for " +"``self``; or :meth:`__get__` of a *name* property raises :exc:" +"`AttributeError`). This method should either return the (computed) " +"attribute value or raise an :exc:`AttributeError` exception. The :class:" +"`object` class itself does not provide this method." +msgstr "" + +#: ../../reference/datamodel.rst:2340 +msgid "" +"Note that if the attribute is found through the normal mechanism, :meth:" +"`__getattr__` is not called. (This is an intentional asymmetry between :" +"meth:`__getattr__` and :meth:`__setattr__`.) This is done both for " +"efficiency reasons and because otherwise :meth:`__getattr__` would have no " +"way to access other attributes of the instance. Note that at least for " +"instance variables, you can take total control by not inserting any values " +"in the instance attribute dictionary (but instead inserting them in another " +"object). See the :meth:`__getattribute__` method below for a way to " +"actually get total control over attribute access." +msgstr "" + +#: ../../reference/datamodel.rst:2353 +msgid "" +"Called unconditionally to implement attribute accesses for instances of the " +"class. If the class also defines :meth:`__getattr__`, the latter will not be " +"called unless :meth:`__getattribute__` either calls it explicitly or raises " +"an :exc:`AttributeError`. This method should return the (computed) attribute " +"value or raise an :exc:`AttributeError` exception. In order to avoid " +"infinite recursion in this method, its implementation should always call the " +"base class method with the same name to access any attributes it needs, for " +"example, ``object.__getattribute__(self, name)``." +msgstr "" + +#: ../../reference/datamodel.rst:2364 +msgid "" +"This method may still be bypassed when looking up special methods as the " +"result of implicit invocation via language syntax or :ref:`built-in " +"functions `. See :ref:`special-lookup`." +msgstr "" + +#: ../../reference/datamodel.rst:2369 ../../reference/datamodel.rst:2371 +msgid "" +"For certain sensitive attribute accesses, raises an :ref:`auditing event " +"` ``object.__getattr__`` with arguments ``obj`` and ``name``." +msgstr "" + +#: ../../reference/datamodel.rst:2378 +msgid "" +"Called when an attribute assignment is attempted. This is called instead of " +"the normal mechanism (i.e. store the value in the instance dictionary). " +"*name* is the attribute name, *value* is the value to be assigned to it." +msgstr "" + +#: ../../reference/datamodel.rst:2382 +msgid "" +"If :meth:`__setattr__` wants to assign to an instance attribute, it should " +"call the base class method with the same name, for example, ``object." +"__setattr__(self, name, value)``." +msgstr "" + +#: ../../reference/datamodel.rst:2386 ../../reference/datamodel.rst:2388 +msgid "" +"For certain sensitive attribute assignments, raises an :ref:`auditing event " +"` ``object.__setattr__`` with arguments ``obj``, ``name``, " +"``value``." +msgstr "" + +#: ../../reference/datamodel.rst:2395 +msgid "" +"Like :meth:`__setattr__` but for attribute deletion instead of assignment. " +"This should only be implemented if ``del obj.name`` is meaningful for the " +"object." +msgstr "" + +#: ../../reference/datamodel.rst:2398 ../../reference/datamodel.rst:2400 +msgid "" +"For certain sensitive attribute deletions, raises an :ref:`auditing event " +"` ``object.__delattr__`` with arguments ``obj`` and ``name``." +msgstr "" + +#: ../../reference/datamodel.rst:2407 +msgid "" +"Called when :func:`dir` is called on the object. An iterable must be " +"returned. :func:`dir` converts the returned iterable to a list and sorts it." +msgstr "" + +#: ../../reference/datamodel.rst:2412 +msgid "Customizing module attribute access" +msgstr "" + +#: ../../reference/datamodel.rst:2422 +msgid "" +"Special names ``__getattr__`` and ``__dir__`` can be also used to customize " +"access to module attributes. The ``__getattr__`` function at the module " +"level should accept one argument which is the name of an attribute and " +"return the computed value or raise an :exc:`AttributeError`. If an attribute " +"is not found on a module object through the normal lookup, i.e. :meth:" +"`object.__getattribute__`, then ``__getattr__`` is searched in the module " +"``__dict__`` before raising an :exc:`AttributeError`. If found, it is called " +"with the attribute name and the result is returned." +msgstr "" + +#: ../../reference/datamodel.rst:2431 +msgid "" +"The ``__dir__`` function should accept no arguments, and return an iterable " +"of strings that represents the names accessible on module. If present, this " +"function overrides the standard :func:`dir` search on a module." +msgstr "" + +#: ../../reference/datamodel.rst:2437 +msgid "" +"For a more fine grained customization of the module behavior (setting " +"attributes, properties, etc.), one can set the ``__class__`` attribute of a " +"module object to a subclass of :class:`types.ModuleType`. For example::" +msgstr "" + +#: ../../reference/datamodel.rst:2441 +msgid "" +"import sys\n" +"from types import ModuleType\n" +"\n" +"class VerboseModule(ModuleType):\n" +" def __repr__(self):\n" +" return f'Verbose {self.__name__}'\n" +"\n" +" def __setattr__(self, attr, value):\n" +" print(f'Setting {attr}...')\n" +" super().__setattr__(attr, value)\n" +"\n" +"sys.modules[__name__].__class__ = VerboseModule" +msgstr "" + +#: ../../reference/datamodel.rst:2455 +msgid "" +"Defining module ``__getattr__`` and setting module ``__class__`` only affect " +"lookups made using the attribute access syntax -- directly accessing the " +"module globals (whether by code within the module, or via a reference to the " +"module's globals dictionary) is unaffected." +msgstr "" + +#: ../../reference/datamodel.rst:2460 +msgid "``__class__`` module attribute is now writable." +msgstr "" + +#: ../../reference/datamodel.rst:2463 +msgid "``__getattr__`` and ``__dir__`` module attributes." +msgstr "" + +#: ../../reference/datamodel.rst:2468 +msgid ":pep:`562` - Module __getattr__ and __dir__" +msgstr "" + +#: ../../reference/datamodel.rst:2469 +msgid "Describes the ``__getattr__`` and ``__dir__`` functions on modules." +msgstr "" + +#: ../../reference/datamodel.rst:2475 +msgid "Implementing Descriptors" +msgstr "" + +#: ../../reference/datamodel.rst:2477 +msgid "" +"The following methods only apply when an instance of the class containing " +"the method (a so-called *descriptor* class) appears in an *owner* class (the " +"descriptor must be in either the owner's class dictionary or in the class " +"dictionary for one of its parents). In the examples below, \"the " +"attribute\" refers to the attribute whose name is the key of the property in " +"the owner class' :attr:`~object.__dict__`. The :class:`object` class itself " +"does not implement any of these protocols." +msgstr "" + +#: ../../reference/datamodel.rst:2487 +msgid "" +"Called to get the attribute of the owner class (class attribute access) or " +"of an instance of that class (instance attribute access). The optional " +"*owner* argument is the owner class, while *instance* is the instance that " +"the attribute was accessed through, or ``None`` when the attribute is " +"accessed through the *owner*." +msgstr "" + +#: ../../reference/datamodel.rst:2493 +msgid "" +"This method should return the computed attribute value or raise an :exc:" +"`AttributeError` exception." +msgstr "" + +#: ../../reference/datamodel.rst:2496 +msgid "" +":PEP:`252` specifies that :meth:`__get__` is callable with one or two " +"arguments. Python's own built-in descriptors support this specification; " +"however, it is likely that some third-party tools have descriptors that " +"require both arguments. Python's own :meth:`__getattribute__` " +"implementation always passes in both arguments whether they are required or " +"not." +msgstr "" + +#: ../../reference/datamodel.rst:2505 +msgid "" +"Called to set the attribute on an instance *instance* of the owner class to " +"a new value, *value*." +msgstr "" + +#: ../../reference/datamodel.rst:2508 +msgid "" +"Note, adding :meth:`__set__` or :meth:`__delete__` changes the kind of " +"descriptor to a \"data descriptor\". See :ref:`descriptor-invocation` for " +"more details." +msgstr "" + +#: ../../reference/datamodel.rst:2514 +msgid "" +"Called to delete the attribute on an instance *instance* of the owner class." +msgstr "" + +#: ../../reference/datamodel.rst:2516 +msgid "" +"Instances of descriptors may also have the :attr:`!__objclass__` attribute " +"present:" +msgstr "" + +#: ../../reference/datamodel.rst:2521 +msgid "" +"The attribute :attr:`!__objclass__` is interpreted by the :mod:`inspect` " +"module as specifying the class where this object was defined (setting this " +"appropriately can assist in runtime introspection of dynamic class " +"attributes). For callables, it may indicate that an instance of the given " +"type (or a subclass) is expected or required as the first positional " +"argument (for example, CPython sets this attribute for unbound methods that " +"are implemented in C)." +msgstr "" + +#: ../../reference/datamodel.rst:2532 +msgid "Invoking Descriptors" +msgstr "" + +#: ../../reference/datamodel.rst:2534 +msgid "" +"In general, a descriptor is an object attribute with \"binding behavior\", " +"one whose attribute access has been overridden by methods in the descriptor " +"protocol: :meth:`~object.__get__`, :meth:`~object.__set__`, and :meth:" +"`~object.__delete__`. If any of those methods are defined for an object, it " +"is said to be a descriptor." +msgstr "" + +#: ../../reference/datamodel.rst:2540 +msgid "" +"The default behavior for attribute access is to get, set, or delete the " +"attribute from an object's dictionary. For instance, ``a.x`` has a lookup " +"chain starting with ``a.__dict__['x']``, then ``type(a).__dict__['x']``, and " +"continuing through the base classes of ``type(a)`` excluding metaclasses." +msgstr "" + +#: ../../reference/datamodel.rst:2545 +msgid "" +"However, if the looked-up value is an object defining one of the descriptor " +"methods, then Python may override the default behavior and invoke the " +"descriptor method instead. Where this occurs in the precedence chain " +"depends on which descriptor methods were defined and how they were called." +msgstr "" + +#: ../../reference/datamodel.rst:2550 +msgid "" +"The starting point for descriptor invocation is a binding, ``a.x``. How the " +"arguments are assembled depends on ``a``:" +msgstr "" + +#: ../../reference/datamodel.rst:2553 +msgid "Direct Call" +msgstr "" + +#: ../../reference/datamodel.rst:2554 +msgid "" +"The simplest and least common call is when user code directly invokes a " +"descriptor method: ``x.__get__(a)``." +msgstr "" + +#: ../../reference/datamodel.rst:2557 +msgid "Instance Binding" +msgstr "" + +#: ../../reference/datamodel.rst:2558 +msgid "" +"If binding to an object instance, ``a.x`` is transformed into the call: " +"``type(a).__dict__['x'].__get__(a, type(a))``." +msgstr "" + +#: ../../reference/datamodel.rst:2561 +msgid "Class Binding" +msgstr "" + +#: ../../reference/datamodel.rst:2562 +msgid "" +"If binding to a class, ``A.x`` is transformed into the call: ``A." +"__dict__['x'].__get__(None, A)``." +msgstr "" + +#: ../../reference/datamodel.rst:2565 +msgid "Super Binding" +msgstr "" + +#: ../../reference/datamodel.rst:2566 +msgid "" +"A dotted lookup such as ``super(A, a).x`` searches ``a.__class__.__mro__`` " +"for a base class ``B`` following ``A`` and then returns ``B.__dict__['x']." +"__get__(a, A)``. If not a descriptor, ``x`` is returned unchanged." +msgstr "" + +#: ../../reference/datamodel.rst:2603 +msgid "" +"For instance bindings, the precedence of descriptor invocation depends on " +"which descriptor methods are defined. A descriptor can define any " +"combination of :meth:`~object.__get__`, :meth:`~object.__set__` and :meth:" +"`~object.__delete__`. If it does not define :meth:`!__get__`, then " +"accessing the attribute will return the descriptor object itself unless " +"there is a value in the object's instance dictionary. If the descriptor " +"defines :meth:`!__set__` and/or :meth:`!__delete__`, it is a data " +"descriptor; if it defines neither, it is a non-data descriptor. Normally, " +"data descriptors define both :meth:`!__get__` and :meth:`!__set__`, while " +"non-data descriptors have just the :meth:`!__get__` method. Data " +"descriptors with :meth:`!__get__` and :meth:`!__set__` (and/or :meth:`!" +"__delete__`) defined always override a redefinition in an instance " +"dictionary. In contrast, non-data descriptors can be overridden by " +"instances." +msgstr "" + +#: ../../reference/datamodel.rst:2618 +msgid "" +"Python methods (including those decorated with :deco:`staticmethod` and :" +"deco:`classmethod`) are implemented as non-data descriptors. Accordingly, " +"instances can redefine and override methods. This allows individual " +"instances to acquire behaviors that differ from other instances of the same " +"class." +msgstr "" + +#: ../../reference/datamodel.rst:2624 +msgid "" +"The :deco:`property` decorator is implemented as a data descriptor. " +"Accordingly, instances cannot override the behavior of a property." +msgstr "" + +#: ../../reference/datamodel.rst:2631 +msgid "__slots__" +msgstr "" + +#: ../../reference/datamodel.rst:2633 +msgid "" +"*__slots__* allow us to explicitly declare data members (like properties) " +"and deny the creation of :attr:`~object.__dict__` and *__weakref__* (unless " +"explicitly declared in *__slots__* or available in a parent.)" +msgstr "" + +#: ../../reference/datamodel.rst:2637 +msgid "" +"The space saved over using :attr:`~object.__dict__` can be significant. " +"Attribute lookup speed can be significantly improved as well." +msgstr "" + +#: ../../reference/datamodel.rst:2642 +msgid "" +"This class variable can be assigned a string, iterable, or sequence of " +"strings with variable names used by instances. *__slots__* reserves space " +"for the declared variables and prevents the automatic creation of :attr:" +"`~object.__dict__` and *__weakref__* for each instance." +msgstr "" + +#: ../../reference/datamodel.rst:2651 +msgid "Notes on using *__slots__*:" +msgstr "" + +#: ../../reference/datamodel.rst:2653 +msgid "" +"When inheriting from a class without *__slots__*, the :attr:`~object." +"__dict__` and *__weakref__* attribute of the instances will always be " +"accessible." +msgstr "" + +#: ../../reference/datamodel.rst:2657 +msgid "" +"Without a :attr:`~object.__dict__` variable, instances cannot be assigned " +"new variables not listed in the *__slots__* definition. Attempts to assign " +"to an unlisted variable name raises :exc:`AttributeError`. If dynamic " +"assignment of new variables is desired, then add ``'__dict__'`` to the " +"sequence of strings in the *__slots__* declaration." +msgstr "" + +#: ../../reference/datamodel.rst:2664 +msgid "" +"Without a *__weakref__* variable for each instance, classes defining " +"*__slots__* do not support :mod:`weak references ` to its " +"instances. If weak reference support is needed, then add ``'__weakref__'`` " +"to the sequence of strings in the *__slots__* declaration." +msgstr "" + +#: ../../reference/datamodel.rst:2670 +msgid "" +"*__slots__* are implemented at the class level by creating :ref:`descriptors " +"` for each variable name. As a result, class attributes cannot " +"be used to set default values for instance variables defined by *__slots__*; " +"otherwise, the class attribute would overwrite the descriptor assignment." +msgstr "" + +#: ../../reference/datamodel.rst:2676 +msgid "" +"The action of a *__slots__* declaration is not limited to the class where it " +"is defined. *__slots__* declared in parents are available in child classes. " +"However, instances of a child subclass will get a :attr:`~object.__dict__` " +"and *__weakref__* unless the subclass also defines *__slots__* (which should " +"only contain names of any *additional* slots)." +msgstr "" + +#: ../../reference/datamodel.rst:2682 +msgid "" +"If a class defines a slot also defined in a base class, the instance " +"variable defined by the base class slot is inaccessible (except by " +"retrieving its descriptor directly from the base class). This renders the " +"meaning of the program undefined. In the future, a check may be added to " +"prevent this." +msgstr "" + +#: ../../reference/datamodel.rst:2687 +msgid "" +":exc:`TypeError` will be raised if *__slots__* other than *__dict__* and " +"*__weakref__* are defined for a class derived from a :c:member:`\"variable-" +"length\" built-in type ` such as :class:`int`, :" +"class:`bytes`, and :class:`type`, except :class:`tuple`." +msgstr "" + +#: ../../reference/datamodel.rst:2692 +msgid "Any non-string :term:`iterable` may be assigned to *__slots__*." +msgstr "" + +#: ../../reference/datamodel.rst:2694 +msgid "" +"If a :class:`dictionary ` is used to assign *__slots__*, the " +"dictionary keys will be used as the slot names. The values of the dictionary " +"can be used to provide per-attribute docstrings that will be recognised by :" +"func:`inspect.getdoc` and displayed in the output of :func:`help`." +msgstr "" + +#: ../../reference/datamodel.rst:2699 +msgid "" +":attr:`~object.__class__` assignment works only if both classes have the " +"same *__slots__*." +msgstr "" + +#: ../../reference/datamodel.rst:2702 +msgid "" +":ref:`Multiple inheritance ` with multiple slotted " +"parent classes can be used, but only one parent is allowed to have " +"attributes created by slots (the other bases must have empty slot layouts) - " +"violations raise :exc:`TypeError`." +msgstr "" + +#: ../../reference/datamodel.rst:2708 +msgid "" +"If an :term:`iterator` is used for *__slots__* then a :term:`descriptor` is " +"created for each of the iterator's values. However, the *__slots__* " +"attribute will be an empty iterator." +msgstr "" + +#: ../../reference/datamodel.rst:2713 +msgid "" +"Allowed defining the *__dict__* and *__weakref__* *__slots__* for any class. " +"Allowed defining any *__slots__* for a class derived from :class:`tuple`." +msgstr "" + +#: ../../reference/datamodel.rst:2721 +msgid "Customizing class creation" +msgstr "" + +#: ../../reference/datamodel.rst:2723 +msgid "" +"Whenever a class inherits from another class, :meth:`~object." +"__init_subclass__` is called on the parent class. This way, it is possible " +"to write classes which change the behavior of subclasses. This is closely " +"related to class decorators, but where class decorators only affect the " +"specific class they're applied to, ``__init_subclass__`` solely applies to " +"future subclasses of the class defining the method." +msgstr "" + +#: ../../reference/datamodel.rst:2732 +msgid "" +"This method is called whenever the containing class is subclassed. *cls* is " +"then the new subclass. If defined as a normal instance method, this method " +"is implicitly converted to a class method." +msgstr "" + +#: ../../reference/datamodel.rst:2736 +msgid "" +"Keyword arguments which are given to a new class are passed to the parent " +"class's ``__init_subclass__``. For compatibility with other classes using " +"``__init_subclass__``, one should take out the needed keyword arguments and " +"pass the others over to the base class, as in::" +msgstr "" + +#: ../../reference/datamodel.rst:2742 +msgid "" +"class Philosopher:\n" +" def __init_subclass__(cls, /, default_name, **kwargs):\n" +" super().__init_subclass__(**kwargs)\n" +" cls.default_name = default_name\n" +"\n" +"class AustralianPhilosopher(Philosopher, default_name=\"Bruce\"):\n" +" pass" +msgstr "" + +#: ../../reference/datamodel.rst:2750 +msgid "" +"The default implementation ``object.__init_subclass__`` does nothing, but " +"raises an error if it is called with any arguments." +msgstr "" + +#: ../../reference/datamodel.rst:2755 +msgid "" +"The metaclass hint ``metaclass`` is consumed by the rest of the type " +"machinery, and is never passed to ``__init_subclass__`` implementations. The " +"actual metaclass (rather than the explicit hint) can be accessed as " +"``type(cls)``." +msgstr "" + +#: ../../reference/datamodel.rst:2763 +msgid "" +"When a class is created, :meth:`!type.__new__` scans the class variables and " +"makes callbacks to those with a :meth:`~object.__set_name__` hook." +msgstr "" + +#: ../../reference/datamodel.rst:2768 +msgid "" +"Automatically called at the time the owning class *owner* is created. The " +"object has been assigned to *name* in that class::" +msgstr "" + +#: ../../reference/datamodel.rst:2771 +msgid "" +"class A:\n" +" x = C() # Automatically calls: x.__set_name__(A, 'x')" +msgstr "" + +#: ../../reference/datamodel.rst:2774 +msgid "" +"If the class variable is assigned after the class is created, :meth:" +"`__set_name__` will not be called automatically. If needed, :meth:" +"`__set_name__` can be called directly::" +msgstr "" + +#: ../../reference/datamodel.rst:2778 +msgid "" +"class A:\n" +" pass\n" +"\n" +"c = C()\n" +"A.x = c # The hook is not called\n" +"c.__set_name__(A, 'x') # Manually invoke the hook" +msgstr "" + +#: ../../reference/datamodel.rst:2785 +msgid "See :ref:`class-object-creation` for more details." +msgstr "" + +#: ../../reference/datamodel.rst:2793 +msgid "Metaclasses" +msgstr "" + +#: ../../reference/datamodel.rst:2800 +msgid "" +"By default, classes are constructed using :func:`type`. The class body is " +"executed in a new namespace and the class name is bound locally to the " +"result of ``type(name, bases, namespace)``." +msgstr "" + +#: ../../reference/datamodel.rst:2804 +msgid "" +"The class creation process can be customized by passing the ``metaclass`` " +"keyword argument in the class definition line, or by inheriting from an " +"existing class that included such an argument. In the following example, " +"both ``MyClass`` and ``MySubclass`` are instances of ``Meta``::" +msgstr "" + +#: ../../reference/datamodel.rst:2809 +msgid "" +"class Meta(type):\n" +" pass\n" +"\n" +"class MyClass(metaclass=Meta):\n" +" pass\n" +"\n" +"class MySubclass(MyClass):\n" +" pass" +msgstr "" + +#: ../../reference/datamodel.rst:2818 +msgid "" +"Any other keyword arguments that are specified in the class definition are " +"passed through to all metaclass operations described below." +msgstr "" + +#: ../../reference/datamodel.rst:2821 +msgid "When a class definition is executed, the following steps occur:" +msgstr "" + +#: ../../reference/datamodel.rst:2823 +msgid "MRO entries are resolved;" +msgstr "" + +#: ../../reference/datamodel.rst:2824 +msgid "the appropriate metaclass is determined;" +msgstr "" + +#: ../../reference/datamodel.rst:2825 +msgid "the class namespace is prepared;" +msgstr "" + +#: ../../reference/datamodel.rst:2826 +msgid "the class body is executed;" +msgstr "" + +#: ../../reference/datamodel.rst:2827 +msgid "the class object is created." +msgstr "" + +#: ../../reference/datamodel.rst:2831 +msgid "Resolving MRO entries" +msgstr "" + +#: ../../reference/datamodel.rst:2835 +msgid "" +"If a base that appears in a class definition is not an instance of :class:" +"`type`, then an :meth:`!__mro_entries__` method is searched on the base. If " +"an :meth:`!__mro_entries__` method is found, the base is substituted with " +"the result of a call to :meth:`!__mro_entries__` when creating the class. " +"The method is called with the original bases tuple passed to the *bases* " +"parameter, and must return a tuple of classes that will be used instead of " +"the base. The returned tuple may be empty: in these cases, the original base " +"is ignored." +msgstr "" + +#: ../../reference/datamodel.rst:2846 +msgid ":func:`types.resolve_bases`" +msgstr "" + +#: ../../reference/datamodel.rst:2847 +msgid "Dynamically resolve bases that are not instances of :class:`type`." +msgstr "" + +#: ../../reference/datamodel.rst:2849 +msgid ":func:`types.get_original_bases`" +msgstr "" + +#: ../../reference/datamodel.rst:2850 +msgid "" +"Retrieve a class's \"original bases\" prior to modifications by :meth:" +"`~object.__mro_entries__`." +msgstr "" + +#: ../../reference/datamodel.rst:2853 +msgid ":pep:`560`" +msgstr "" + +#: ../../reference/datamodel.rst:2854 +msgid "Core support for typing module and generic types." +msgstr "" + +#: ../../reference/datamodel.rst:2860 +msgid "Determining the appropriate metaclass" +msgstr "" + +#: ../../reference/datamodel.rst:2864 +msgid "" +"The appropriate metaclass for a class definition is determined as follows:" +msgstr "" + +#: ../../reference/datamodel.rst:2866 +msgid "" +"if no bases and no explicit metaclass are given, then :func:`type` is used;" +msgstr "" + +#: ../../reference/datamodel.rst:2867 +msgid "" +"if an explicit metaclass is given and it is *not* an instance of :func:" +"`type`, then it is used directly as the metaclass;" +msgstr "" + +#: ../../reference/datamodel.rst:2869 +msgid "" +"if an instance of :func:`type` is given as the explicit metaclass, or bases " +"are defined, then the most derived metaclass is used." +msgstr "" + +#: ../../reference/datamodel.rst:2872 +msgid "" +"The most derived metaclass is selected from the explicitly specified " +"metaclass (if any) and the metaclasses (i.e. ``type(cls)``) of all specified " +"base classes. The most derived metaclass is one which is a subtype of *all* " +"of these candidate metaclasses. If none of the candidate metaclasses meets " +"that criterion, then the class definition will fail with ``TypeError``." +msgstr "" + +#: ../../reference/datamodel.rst:2882 +msgid "Preparing the class namespace" +msgstr "" + +#: ../../reference/datamodel.rst:2887 +msgid "" +"Once the appropriate metaclass has been identified, then the class namespace " +"is prepared. If the metaclass has a ``__prepare__`` attribute, it is called " +"as ``namespace = metaclass.__prepare__(name, bases, **kwds)`` (where the " +"additional keyword arguments, if any, come from the class definition). The " +"``__prepare__`` method should be implemented as a :func:`classmethod " +"`. The namespace returned by ``__prepare__`` is passed in to " +"``__new__``, but when the final class object is created the namespace is " +"copied into a new ``dict``." +msgstr "" + +#: ../../reference/datamodel.rst:2896 +msgid "" +"If the metaclass has no ``__prepare__`` attribute, then the class namespace " +"is initialised as an empty ordered mapping." +msgstr "" + +#: ../../reference/datamodel.rst:2901 +msgid ":pep:`3115` - Metaclasses in Python 3000" +msgstr "" + +#: ../../reference/datamodel.rst:2902 +msgid "Introduced the ``__prepare__`` namespace hook" +msgstr "" + +#: ../../reference/datamodel.rst:2906 +msgid "Executing the class body" +msgstr "" + +#: ../../reference/datamodel.rst:2911 +msgid "" +"The class body is executed (approximately) as ``exec(body, globals(), " +"namespace)``. The key difference from a normal call to :func:`exec` is that " +"lexical scoping allows the class body (including any methods) to reference " +"names from the current and outer scopes when the class definition occurs " +"inside a function." +msgstr "" + +#: ../../reference/datamodel.rst:2917 +msgid "" +"However, even when the class definition occurs inside the function, methods " +"defined inside the class still cannot see names defined at the class scope. " +"Class variables must be accessed through the first parameter of instance or " +"class methods, or through the implicit lexically scoped ``__class__`` " +"reference described in the next section." +msgstr "" + +#: ../../reference/datamodel.rst:2926 +msgid "Creating the class object" +msgstr "" + +#: ../../reference/datamodel.rst:2933 +msgid "" +"Once the class namespace has been populated by executing the class body, the " +"class object is created by calling ``metaclass(name, bases, namespace, " +"**kwds)`` (the additional keywords passed here are the same as those passed " +"to ``__prepare__``)." +msgstr "" + +#: ../../reference/datamodel.rst:2938 +msgid "" +"This class object is the one that will be referenced by the zero-argument " +"form of :func:`super`. ``__class__`` is an implicit closure reference " +"created by the compiler if any methods in a class body refer to either " +"``__class__`` or ``super``. This allows the zero argument form of :func:" +"`super` to correctly identify the class being defined based on lexical " +"scoping, while the class or instance that was used to make the current call " +"is identified based on the first argument passed to the method." +msgstr "" + +#: ../../reference/datamodel.rst:2948 +msgid "" +"In CPython 3.6 and later, the ``__class__`` cell is passed to the metaclass " +"as a ``__classcell__`` entry in the class namespace. If present, this must " +"be propagated up to the ``type.__new__`` call in order for the class to be " +"initialised correctly. Failing to do so will result in a :exc:`RuntimeError` " +"in Python 3.8." +msgstr "" + +#: ../../reference/datamodel.rst:2954 +msgid "" +"When using the default metaclass :class:`type`, or any metaclass that " +"ultimately calls ``type.__new__``, the following additional customization " +"steps are invoked after creating the class object:" +msgstr "" + +#: ../../reference/datamodel.rst:2958 +msgid "" +"The ``type.__new__`` method collects all of the attributes in the class " +"namespace that define a :meth:`~object.__set_name__` method;" +msgstr "" + +#: ../../reference/datamodel.rst:2960 +msgid "" +"Those ``__set_name__`` methods are called with the class being defined and " +"the assigned name of that particular attribute;" +msgstr "" + +#: ../../reference/datamodel.rst:2962 +msgid "" +"The :meth:`~object.__init_subclass__` hook is called on the immediate parent " +"of the new class in its method resolution order." +msgstr "" + +#: ../../reference/datamodel.rst:2965 +msgid "" +"After the class object is created, it is passed to the class decorators " +"included in the class definition (if any) and the resulting object is bound " +"in the local namespace as the defined class." +msgstr "" + +#: ../../reference/datamodel.rst:2969 +msgid "" +"When a new class is created by ``type.__new__``, the object provided as the " +"namespace parameter is copied to a new ordered mapping and the original " +"object is discarded. The new copy is wrapped in a read-only proxy, which " +"becomes the :attr:`~type.__dict__` attribute of the class object." +msgstr "" + +#: ../../reference/datamodel.rst:2976 +msgid ":pep:`3135` - New super" +msgstr "" + +#: ../../reference/datamodel.rst:2977 +msgid "Describes the implicit ``__class__`` closure reference" +msgstr "" + +#: ../../reference/datamodel.rst:2981 +msgid "Uses for metaclasses" +msgstr "" + +#: ../../reference/datamodel.rst:2983 +msgid "" +"The potential uses for metaclasses are boundless. Some ideas that have been " +"explored include enum, logging, interface checking, automatic delegation, " +"automatic property creation, proxies, frameworks, and automatic resource " +"locking/synchronization." +msgstr "" + +#: ../../reference/datamodel.rst:2990 +msgid "Customizing instance and subclass checks" +msgstr "" + +#: ../../reference/datamodel.rst:2992 +msgid "" +"The following methods are used to override the default behavior of the :func:" +"`isinstance` and :func:`issubclass` built-in functions." +msgstr "" + +#: ../../reference/datamodel.rst:2995 +msgid "" +"In particular, the metaclass :class:`abc.ABCMeta` implements these methods " +"in order to allow the addition of Abstract Base Classes (ABCs) as \"virtual " +"base classes\" to any class or type (including built-in types), including " +"other ABCs." +msgstr "" + +#: ../../reference/datamodel.rst:3002 +msgid "" +"Return true if *instance* should be considered a (direct or indirect) " +"instance of *class*. If defined, called to implement ``isinstance(instance, " +"class)``." +msgstr "" + +#: ../../reference/datamodel.rst:3009 +msgid "" +"Return true if *subclass* should be considered a (direct or indirect) " +"subclass of *class*. If defined, called to implement ``issubclass(subclass, " +"class)``." +msgstr "" + +#: ../../reference/datamodel.rst:3014 +msgid "" +"Note that these methods are looked up on the type (metaclass) of a class. " +"They cannot be defined as class methods in the actual class. This is " +"consistent with the lookup of special methods that are called on instances, " +"only in this case the instance is itself a class." +msgstr "" + +#: ../../reference/datamodel.rst:3021 +msgid ":pep:`3119` - Introducing Abstract Base Classes" +msgstr "" + +#: ../../reference/datamodel.rst:3022 +msgid "" +"Includes the specification for customizing :func:`isinstance` and :func:" +"`issubclass` behavior through :meth:`~type.__instancecheck__` and :meth:" +"`~type.__subclasscheck__`, with motivation for this functionality in the " +"context of adding Abstract Base Classes (see the :mod:`abc` module) to the " +"language." +msgstr "" + +#: ../../reference/datamodel.rst:3030 +msgid "Emulating generic types" +msgstr "" + +#: ../../reference/datamodel.rst:3032 +msgid "" +"When using :term:`type annotations`, it is often useful to " +"*parameterize* a :term:`generic type` using Python's square-brackets " +"notation. For example, the annotation ``list[int]`` might be used to signify " +"a :class:`list` in which all the elements are of type :class:`int`." +msgstr "" + +#: ../../reference/datamodel.rst:3039 +msgid ":pep:`484` - Type Hints" +msgstr "" + +#: ../../reference/datamodel.rst:3040 +msgid "Introducing Python's framework for type annotations" +msgstr "" + +#: ../../reference/datamodel.rst:3042 +msgid ":ref:`Generic Alias Types`" +msgstr "" + +#: ../../reference/datamodel.rst:3043 +msgid "Documentation for objects representing parameterized generic classes" +msgstr "" + +#: ../../reference/datamodel.rst:3045 +msgid "" +":ref:`Generics`, :ref:`user-defined generics` and :" +"class:`typing.Generic`" +msgstr "" + +#: ../../reference/datamodel.rst:3046 +msgid "" +"Documentation on how to implement generic classes that can be parameterized " +"at runtime and understood by static type-checkers." +msgstr "" + +#: ../../reference/datamodel.rst:3049 +msgid "" +"A class can *generally* only be parameterized if it defines the special " +"class method ``__class_getitem__()``." +msgstr "" + +#: ../../reference/datamodel.rst:3054 +msgid "" +"Return an object representing the specialization of a generic class by type " +"arguments found in *key*." +msgstr "" + +#: ../../reference/datamodel.rst:3057 +msgid "" +"When defined on a class, ``__class_getitem__()`` is automatically a class " +"method. As such, there is no need for it to be decorated with :deco:" +"`classmethod` when it is defined." +msgstr "" + +#: ../../reference/datamodel.rst:3063 +msgid "The purpose of *__class_getitem__*" +msgstr "" + +#: ../../reference/datamodel.rst:3065 +msgid "" +"The purpose of :meth:`~object.__class_getitem__` is to allow runtime " +"parameterization of standard-library generic classes in order to more easily " +"apply :term:`type hints` to these classes." +msgstr "" + +#: ../../reference/datamodel.rst:3069 +msgid "" +"To implement custom generic classes that can be parameterized at runtime and " +"understood by static type-checkers, users should either inherit from a " +"standard library class that already implements :meth:`~object." +"__class_getitem__`, or inherit from :class:`typing.Generic`, which has its " +"own implementation of ``__class_getitem__()``." +msgstr "" + +#: ../../reference/datamodel.rst:3075 +msgid "" +"Custom implementations of :meth:`~object.__class_getitem__` on classes " +"defined outside of the standard library may not be understood by third-party " +"type-checkers such as mypy. Using ``__class_getitem__()`` on any class for " +"purposes other than type hinting is discouraged." +msgstr "" + +#: ../../reference/datamodel.rst:3085 +msgid "*__class_getitem__* versus *__getitem__*" +msgstr "" + +#: ../../reference/datamodel.rst:3087 +msgid "" +"Usually, the :ref:`subscription` of an object using square " +"brackets will call the :meth:`~object.__getitem__` instance method defined " +"on the object's class. However, if the object being subscribed is itself a " +"class, the class method :meth:`~object.__class_getitem__` may be called " +"instead. ``__class_getitem__()`` should return a :ref:`GenericAlias` object if it is properly defined." +msgstr "" + +#: ../../reference/datamodel.rst:3094 +msgid "" +"Presented with the :term:`expression` ``obj[x]``, the Python interpreter " +"follows something like the following process to decide whether :meth:" +"`~object.__getitem__` or :meth:`~object.__class_getitem__` should be called::" +msgstr "" + +#: ../../reference/datamodel.rst:3099 +msgid "" +"from inspect import isclass\n" +"\n" +"def subscribe(obj, x):\n" +" \"\"\"Return the result of the expression 'obj[x]'\"\"\"\n" +"\n" +" class_of_obj = type(obj)\n" +"\n" +" # If the class of obj defines __getitem__,\n" +" # call class_of_obj.__getitem__(obj, x)\n" +" if hasattr(class_of_obj, '__getitem__'):\n" +" return class_of_obj.__getitem__(obj, x)\n" +"\n" +" # Else, if obj is a class and defines __class_getitem__,\n" +" # call obj.__class_getitem__(x)\n" +" elif isclass(obj) and hasattr(obj, '__class_getitem__'):\n" +" return obj.__class_getitem__(x)\n" +"\n" +" # Else, raise an exception\n" +" else:\n" +" raise TypeError(\n" +" f\"'{class_of_obj.__name__}' object is not subscriptable\"\n" +" )" +msgstr "" + +#: ../../reference/datamodel.rst:3122 +msgid "" +"In Python, all classes are themselves instances of other classes. The class " +"of a class is known as that class's :term:`metaclass`, and most classes have " +"the :class:`type` class as their metaclass. :class:`type` does not define :" +"meth:`~object.__getitem__`, meaning that expressions such as ``list[int]``, " +"``dict[str, float]`` and ``tuple[str, bytes]`` all result in :meth:`~object." +"__class_getitem__` being called::" +msgstr "" + +#: ../../reference/datamodel.rst:3129 +msgid "" +">>> # list has class \"type\" as its metaclass, like most classes:\n" +">>> type(list)\n" +"\n" +">>> type(dict) == type(list) == type(tuple) == type(str) == type(bytes)\n" +"True\n" +">>> # \"list[int]\" calls \"list.__class_getitem__(int)\"\n" +">>> list[int]\n" +"list[int]\n" +">>> # list.__class_getitem__ returns a GenericAlias object:\n" +">>> type(list[int])\n" +"" +msgstr "" + +#: ../../reference/datamodel.rst:3141 +msgid "" +"However, if a class has a custom metaclass that defines :meth:`~object." +"__getitem__`, subscribing the class may result in different behaviour. An " +"example of this can be found in the :mod:`enum` module::" +msgstr "" + +#: ../../reference/datamodel.rst:3145 +msgid "" +">>> from enum import Enum\n" +">>> class Menu(Enum):\n" +"... \"\"\"A breakfast menu\"\"\"\n" +"... SPAM = 'spam'\n" +"... BACON = 'bacon'\n" +"...\n" +">>> # Enum classes have a custom metaclass:\n" +">>> type(Menu)\n" +"\n" +">>> # EnumMeta defines __getitem__,\n" +">>> # so __class_getitem__ is not called,\n" +">>> # and the result is not a GenericAlias object:\n" +">>> Menu['SPAM']\n" +"\n" +">>> type(Menu['SPAM'])\n" +"" +msgstr "" + +#: ../../reference/datamodel.rst:3164 +msgid ":pep:`560` - Core Support for typing module and generic types" +msgstr "" + +#: ../../reference/datamodel.rst:3165 +msgid "" +"Introducing :meth:`~object.__class_getitem__`, and outlining when a :ref:" +"`subscription` results in ``__class_getitem__()`` being " +"called instead of :meth:`~object.__getitem__`" +msgstr "" + +#: ../../reference/datamodel.rst:3173 +msgid "Emulating callable objects" +msgstr "" + +#: ../../reference/datamodel.rst:3180 +msgid "" +"Called when the instance is \"called\" as a function; if this method is " +"defined, ``x(arg1, arg2, ...)`` roughly translates to ``type(x).__call__(x, " +"arg1, ...)``. The :class:`object` class itself does not provide this method." +msgstr "" + +#: ../../reference/datamodel.rst:3188 +msgid "Emulating container types" +msgstr "" + +#: ../../reference/datamodel.rst:3190 +msgid "" +"The following methods can be defined to implement container objects. None of " +"them are provided by the :class:`object` class itself. Containers usually " +"are :term:`sequences ` (such as :class:`lists ` or :class:" +"`tuples `) or :term:`mappings ` (like :term:`dictionaries " +"`), but can represent other containers as well. The first set " +"of methods is used either to emulate a sequence or to emulate a mapping; the " +"difference is that for a sequence, the allowable keys should be the integers " +"*k* for which ``0 <= k < N`` where *N* is the length of the sequence, or :" +"class:`slice` objects, which define a range of items. It is also " +"recommended that mappings provide the methods :meth:`!keys`, :meth:`!" +"values`, :meth:`!items`, :meth:`!get`, :meth:`!clear`, :meth:`!setdefault`, :" +"meth:`!pop`, :meth:`!popitem`, :meth:`!copy`, and :meth:`!update` behaving " +"similar to those for Python's standard :class:`dictionary ` objects. " +"The :mod:`collections.abc` module provides a :class:`~collections.abc." +"MutableMapping` :term:`abstract base class` to help create those methods " +"from a base set of :meth:`~object.__getitem__`, :meth:`~object." +"__setitem__`, :meth:`~object.__delitem__`, and :meth:`!keys`." +msgstr "" + +#: ../../reference/datamodel.rst:3209 +msgid "" +"Mutable sequences should provide methods :meth:`~sequence.append`, :meth:" +"`~sequence.clear`, :meth:`~sequence.count`, :meth:`~sequence.extend`, :meth:" +"`~sequence.index`, :meth:`~sequence.insert`, :meth:`~sequence.pop`, :meth:" +"`~sequence.remove`, and :meth:`~sequence.reverse`, like Python standard :" +"class:`list` objects. Finally, sequence types should implement addition " +"(meaning concatenation) and multiplication (meaning repetition) by defining " +"the methods :meth:`~object.__add__`, :meth:`~object.__radd__`, :meth:" +"`~object.__iadd__`, :meth:`~object.__mul__`, :meth:`~object.__rmul__` and :" +"meth:`~object.__imul__` described below; they should not define other " +"numerical operators." +msgstr "" + +#: ../../reference/datamodel.rst:3221 +msgid "" +"It is recommended that both mappings and sequences implement the :meth:" +"`~object.__contains__` method to allow efficient use of the ``in`` operator; " +"for mappings, ``in`` should search the mapping's keys; for sequences, it " +"should search through the values. It is further recommended that both " +"mappings and sequences implement the :meth:`~object.__iter__` method to " +"allow efficient iteration through the container; for mappings, :meth:`!" +"__iter__` should iterate through the object's keys; for sequences, it should " +"iterate through the values." +msgstr "" + +#: ../../reference/datamodel.rst:3236 +msgid "" +"Called to implement the built-in function :func:`len`. Should return the " +"length of the object, an integer ``>=`` 0. Also, an object that doesn't " +"define a :meth:`~object.__bool__` method and whose :meth:`!__len__` method " +"returns zero is considered to be false in a Boolean context." +msgstr "" + +#: ../../reference/datamodel.rst:3243 +msgid "" +"In CPython, the length is required to be at most :data:`sys.maxsize`. If the " +"length is larger than :data:`!sys.maxsize` some features (such as :func:" +"`len`) may raise :exc:`OverflowError`. To prevent raising :exc:`!" +"OverflowError` by truth value testing, an object must define a :meth:" +"`~object.__bool__` method." +msgstr "" + +#: ../../reference/datamodel.rst:3252 +msgid "" +"Called to implement :func:`operator.length_hint`. Should return an estimated " +"length for the object (which may be greater or less than the actual length). " +"The length must be an integer ``>=`` 0. The return value may also be :data:" +"`NotImplemented`, which is treated the same as if the ``__length_hint__`` " +"method didn't exist at all. This method is purely an optimization and is " +"never required for correctness." +msgstr "" + +#: ../../reference/datamodel.rst:3264 +msgid "" +"Called to implement *subscription*, that is, ``self[subscript]``. See :ref:" +"`subscriptions` for details on the syntax." +msgstr "" + +#: ../../reference/datamodel.rst:3267 +msgid "" +"There are two types of built-in objects that support subscription via :meth:" +"`!__getitem__`:" +msgstr "" + +#: ../../reference/datamodel.rst:3270 +msgid "" +"**sequences**, where *subscript* (also called :term:`index`) should be an " +"integer or a :class:`slice` object. See the :ref:`sequence documentation " +"` for the expected behavior, including handling :class:" +"`slice` objects and negative indices." +msgstr "" + +#: ../../reference/datamodel.rst:3274 +msgid "" +"**mappings**, where *subscript* is also called the :term:`key`. See :ref:" +"`mapping documentation ` for the expected behavior." +msgstr "" + +#: ../../reference/datamodel.rst:3278 +msgid "" +"If *subscript* is of an inappropriate type, :meth:`!__getitem__` should " +"raise :exc:`TypeError`. If *subscript* has an inappropriate value, :meth:`!" +"__getitem__` should raise an :exc:`LookupError` or one of its subclasses (:" +"exc:`IndexError` for sequences; :exc:`KeyError` for mappings)." +msgstr "" + +#: ../../reference/datamodel.rst:3288 +msgid "" +"Slicing is handled by :meth:`!__getitem__`, :meth:`~object.__setitem__`, " +"and :meth:`~object.__delitem__`. A call like ::" +msgstr "" + +#: ../../reference/datamodel.rst:3292 +msgid "a[1:2] = b" +msgstr "" + +#: ../../reference/datamodel.rst:3294 +msgid "is translated to ::" +msgstr "" + +#: ../../reference/datamodel.rst:3296 +msgid "a[slice(1, 2, None)] = b" +msgstr "" + +#: ../../reference/datamodel.rst:3298 +msgid "and so forth. Missing slice items are always filled in with ``None``." +msgstr "" + +#: ../../reference/datamodel.rst:3302 +msgid "" +"The sequence iteration protocol (used, for example, in :keyword:`for` " +"loops), expects that an :exc:`IndexError` will be raised for illegal indexes " +"to allow proper detection of the end of a sequence." +msgstr "" + +#: ../../reference/datamodel.rst:3308 +msgid "" +"When :ref:`subscripting ` a *class*, the special class " +"method :meth:`~object.__class_getitem__` may be called instead of :meth:`!" +"__getitem__`. See :ref:`classgetitem-versus-getitem` for more details." +msgstr "" + +#: ../../reference/datamodel.rst:3316 +msgid "" +"Called to implement assignment to ``self[key]``. Same note as for :meth:" +"`__getitem__`. This should only be implemented for mappings if the objects " +"support changes to the values for keys, or if new keys can be added, or for " +"sequences if elements can be replaced. The same exceptions should be raised " +"for improper *key* values as for the :meth:`__getitem__` method." +msgstr "" + +#: ../../reference/datamodel.rst:3325 +msgid "" +"Called to implement deletion of ``self[key]``. Same note as for :meth:" +"`__getitem__`. This should only be implemented for mappings if the objects " +"support removal of keys, or for sequences if elements can be removed from " +"the sequence. The same exceptions should be raised for improper *key* " +"values as for the :meth:`__getitem__` method." +msgstr "" + +#: ../../reference/datamodel.rst:3334 +msgid "" +"Called by :class:`dict`\\ .\\ :meth:`__getitem__` to implement ``self[key]`` " +"for dict subclasses when key is not in the dictionary." +msgstr "" + +#: ../../reference/datamodel.rst:3340 +msgid "" +"This method is called when an :term:`iterator` is required for a container. " +"This method should return a new iterator object that can iterate over all " +"the objects in the container. For mappings, it should iterate over the keys " +"of the container." +msgstr "" + +#: ../../reference/datamodel.rst:3348 +msgid "" +"Called (if present) by the :func:`reversed` built-in to implement reverse " +"iteration. It should return a new iterator object that iterates over all " +"the objects in the container in reverse order." +msgstr "" + +#: ../../reference/datamodel.rst:3352 +msgid "" +"If the :meth:`__reversed__` method is not provided, the :func:`reversed` " +"built-in will fall back to using the sequence protocol (:meth:`__len__` and :" +"meth:`__getitem__`). Objects that support the sequence protocol should only " +"provide :meth:`__reversed__` if they can provide an implementation that is " +"more efficient than the one provided by :func:`reversed`." +msgstr "" + +#: ../../reference/datamodel.rst:3359 +msgid "" +"The membership test operators (:keyword:`in` and :keyword:`not in`) are " +"normally implemented as an iteration through a container. However, container " +"objects can supply the following special method with a more efficient " +"implementation, which also does not require the object be iterable." +msgstr "" + +#: ../../reference/datamodel.rst:3366 +msgid "" +"Called to implement membership test operators. Should return true if *item* " +"is in *self*, false otherwise. For mapping objects, this should consider " +"the keys of the mapping rather than the values or the key-item pairs." +msgstr "" + +#: ../../reference/datamodel.rst:3370 +msgid "" +"For objects that don't define :meth:`__contains__`, the membership test " +"first tries iteration via :meth:`__iter__`, then the old sequence iteration " +"protocol via :meth:`__getitem__`, see :ref:`this section in the language " +"reference `." +msgstr "" + +#: ../../reference/datamodel.rst:3379 +msgid "Emulating numeric types" +msgstr "" + +#: ../../reference/datamodel.rst:3381 +msgid "" +"The following methods can be defined to emulate numeric objects. Methods " +"corresponding to operations that are not supported by the particular kind of " +"number implemented (e.g., bitwise operations for non-integral numbers) " +"should be left undefined." +msgstr "" + +#: ../../reference/datamodel.rst:3407 +msgid "" +"These methods are called to implement the binary arithmetic operations " +"(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:" +"`pow`, ``**``, ``<<``, ``>>``, ``&``, ``^``, ``|``). For instance, to " +"evaluate the expression ``x + y``, where *x* is an instance of a class that " +"has an :meth:`__add__` method, ``type(x).__add__(x, y)`` is called. The :" +"meth:`__divmod__` method should be the equivalent to using :meth:" +"`__floordiv__` and :meth:`__mod__`; it should not be related to :meth:" +"`__truediv__`. Note that :meth:`__pow__` should be defined to accept an " +"optional third argument if the three-argument version of the built-in :func:" +"`pow` function is to be supported." +msgstr "" + +#: ../../reference/datamodel.rst:3418 +msgid "" +"If one of those methods does not support the operation with the supplied " +"arguments, it should return :data:`NotImplemented`." +msgstr "" + +#: ../../reference/datamodel.rst:3441 +msgid "" +"These methods are called to implement the binary arithmetic operations " +"(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:" +"`pow`, ``**``, ``<<``, ``>>``, ``&``, ``^``, ``|``) with reflected (swapped) " +"operands. These functions are only called if the operands are of different " +"types, when the left operand does not support the corresponding operation " +"[#]_, or the right operand's class is derived from the left operand's class. " +"[#]_ For instance, to evaluate the expression ``x - y``, where *y* is an " +"instance of a class that has an :meth:`__rsub__` method, ``type(y)." +"__rsub__(y, x)`` is called if ``type(x).__sub__(x, y)`` returns :data:" +"`NotImplemented` or ``type(y)`` is a subclass of ``type(x)``. [#]_" +msgstr "" + +#: ../../reference/datamodel.rst:3452 +msgid "" +"Note that :meth:`__rpow__` should be defined to accept an optional third " +"argument if the three-argument version of the built-in :func:`pow` function " +"is to be supported." +msgstr "" + +#: ../../reference/datamodel.rst:3458 +msgid "" +"Three-argument :func:`pow` now try calling :meth:`~object.__rpow__` if " +"necessary. Previously it was only called in two-argument :func:`!pow` and " +"the binary power operator." +msgstr "" + +#: ../../reference/datamodel.rst:3464 +msgid "" +"If the right operand's type is a subclass of the left operand's type and " +"that subclass provides a different implementation of the reflected method " +"for the operation, this method will be called before the left operand's non-" +"reflected method. This behavior allows subclasses to override their " +"ancestors' operations." +msgstr "" + +#: ../../reference/datamodel.rst:3484 +msgid "" +"These methods are called to implement the augmented arithmetic assignments " +"(``+=``, ``-=``, ``*=``, ``@=``, ``/=``, ``//=``, ``%=``, ``**=``, ``<<=``, " +"``>>=``, ``&=``, ``^=``, ``|=``). These methods should attempt to do the " +"operation in-place (modifying *self*) and return the result (which could be, " +"but does not have to be, *self*). If a specific method is not defined, or " +"if that method returns :data:`NotImplemented`, the augmented assignment " +"falls back to the normal methods. For instance, if *x* is an instance of a " +"class with an :meth:`__iadd__` method, ``x += y`` is equivalent to ``x = x." +"__iadd__(y)`` . If :meth:`__iadd__` does not exist, or if ``x.__iadd__(y)`` " +"returns :data:`!NotImplemented`, ``x.__add__(y)`` and ``y.__radd__(x)`` are " +"considered, as with the evaluation of ``x + y``. In certain situations, " +"augmented assignment can result in unexpected errors (see :ref:`faq-" +"augmented-assignment-tuple-error`), but this behavior is in fact part of the " +"data model." +msgstr "" + +#: ../../reference/datamodel.rst:3507 +msgid "" +"Called to implement the unary arithmetic operations (``-``, ``+``, :func:" +"`abs` and ``~``)." +msgstr "" + +#: ../../reference/datamodel.rst:3520 +msgid "" +"Called to implement the built-in functions :func:`complex`, :func:`int` and :" +"func:`float`. Should return a value of the appropriate type." +msgstr "" + +#: ../../reference/datamodel.rst:3527 +msgid "" +"Called to implement :func:`operator.index`, and whenever Python needs to " +"losslessly convert the numeric object to an integer object (such as in " +"slicing, or in the built-in :func:`bin`, :func:`hex` and :func:`oct` " +"functions). Presence of this method indicates that the numeric object is an " +"integer type. Must return an integer." +msgstr "" + +#: ../../reference/datamodel.rst:3533 +msgid "" +"If :meth:`__int__`, :meth:`__float__` and :meth:`__complex__` are not " +"defined then corresponding built-in functions :func:`int`, :func:`float` " +"and :func:`complex` fall back to :meth:`__index__`." +msgstr "" + +#: ../../reference/datamodel.rst:3545 +msgid "" +"Called to implement the built-in function :func:`round` and :mod:`math` " +"functions :func:`~math.trunc`, :func:`~math.floor` and :func:`~math.ceil`. " +"Unless *ndigits* is passed to :meth:`!__round__` all these methods should " +"return the value of the object truncated to an :class:`~numbers.Integral` " +"(typically an :class:`int`)." +msgstr "" + +#: ../../reference/datamodel.rst:3551 +msgid "" +":func:`int` no longer delegates to the :meth:`~object.__trunc__` method." +msgstr "" + +#: ../../reference/datamodel.rst:3558 +msgid "With Statement Context Managers" +msgstr "" + +#: ../../reference/datamodel.rst:3560 +msgid "" +"A :dfn:`context manager` is an object that defines the runtime context to be " +"established when executing a :keyword:`with` statement. The context manager " +"handles the entry into, and the exit from, the desired runtime context for " +"the execution of the block of code. Context managers are normally invoked " +"using the :keyword:`!with` statement (described in section :ref:`with`), but " +"can also be used by directly invoking their methods." +msgstr "" + +#: ../../reference/datamodel.rst:3571 +msgid "" +"Typical uses of context managers include saving and restoring various kinds " +"of global state, locking and unlocking resources, closing opened files, etc." +msgstr "" + +#: ../../reference/datamodel.rst:3574 +msgid "" +"For more information on context managers, see :ref:`typecontextmanager`. " +"The :class:`object` class itself does not provide the context manager " +"methods." +msgstr "" + +#: ../../reference/datamodel.rst:3580 +msgid "" +"Enter the runtime context related to this object. The :keyword:`with` " +"statement will bind this method's return value to the target(s) specified in " +"the :keyword:`!as` clause of the statement, if any." +msgstr "" + +#: ../../reference/datamodel.rst:3587 +msgid "" +"Exit the runtime context related to this object. The parameters describe the " +"exception that caused the context to be exited. If the context was exited " +"without an exception, all three arguments will be :const:`None`." +msgstr "" + +#: ../../reference/datamodel.rst:3591 +msgid "" +"If an exception is supplied, and the method wishes to suppress the exception " +"(i.e., prevent it from being propagated), it should return a true value. " +"Otherwise, the exception will be processed normally upon exit from this " +"method." +msgstr "" + +#: ../../reference/datamodel.rst:3595 +msgid "" +"Note that :meth:`~object.__exit__` methods should not reraise the passed-in " +"exception; this is the caller's responsibility." +msgstr "" + +#: ../../reference/datamodel.rst:3601 +msgid ":pep:`343` - The \"with\" statement" +msgstr "" + +#: ../../reference/datamodel.rst:3602 +msgid "" +"The specification, background, and examples for the Python :keyword:`with` " +"statement." +msgstr "" + +#: ../../reference/datamodel.rst:3609 +msgid "Customizing positional arguments in class pattern matching" +msgstr "" + +#: ../../reference/datamodel.rst:3611 +msgid "" +"When using a class name in a pattern, positional arguments in the pattern " +"are not allowed by default, i.e. ``case MyClass(x, y)`` is typically invalid " +"without special support in ``MyClass``. To be able to use that kind of " +"pattern, the class needs to define a *__match_args__* attribute." +msgstr "" + +#: ../../reference/datamodel.rst:3618 +msgid "" +"This class variable can be assigned a tuple of strings. When this class is " +"used in a class pattern with positional arguments, each positional argument " +"will be converted into a keyword argument, using the corresponding value in " +"*__match_args__* as the keyword. The absence of this attribute is equivalent " +"to setting it to ``()``." +msgstr "" + +#: ../../reference/datamodel.rst:3624 +msgid "" +"For example, if ``MyClass.__match_args__`` is ``(\"left\", \"center\", " +"\"right\")`` that means that ``case MyClass(x, y)`` is equivalent to ``case " +"MyClass(left=x, center=y)``. Note that the number of arguments in the " +"pattern must be smaller than or equal to the number of elements in " +"*__match_args__*; if it is larger, the pattern match attempt will raise a :" +"exc:`TypeError`." +msgstr "" + +#: ../../reference/datamodel.rst:3634 +msgid ":pep:`634` - Structural Pattern Matching" +msgstr "" + +#: ../../reference/datamodel.rst:3635 +msgid "The specification for the Python ``match`` statement." +msgstr "" + +#: ../../reference/datamodel.rst:3641 +msgid "Emulating buffer types" +msgstr "" + +#: ../../reference/datamodel.rst:3643 +msgid "" +"The :ref:`buffer protocol ` provides a way for Python objects " +"to expose efficient access to a low-level memory array. This protocol is " +"implemented by builtin types such as :class:`bytes` and :class:`memoryview`, " +"and third-party libraries may define additional buffer types." +msgstr "" + +#: ../../reference/datamodel.rst:3648 +msgid "" +"While buffer types are usually implemented in C, it is also possible to " +"implement the protocol in Python." +msgstr "" + +#: ../../reference/datamodel.rst:3653 +msgid "" +"Called when a buffer is requested from *self* (for example, by the :class:" +"`memoryview` constructor). The *flags* argument is an integer representing " +"the kind of buffer requested, affecting for example whether the returned " +"buffer is read-only or writable. :class:`inspect.BufferFlags` provides a " +"convenient way to interpret the flags. The method must return a :class:" +"`memoryview` object." +msgstr "" + +#: ../../reference/datamodel.rst:3660 +msgid "" +"**Thread safety:** In :term:`free-threaded ` Python, " +"implementations must manage any internal export counter using atomic " +"operations. The method must be safe to call concurrently from multiple " +"threads, and the returned buffer's underlying data must remain valid until " +"the corresponding :meth:`~object.__release_buffer__` call completes. See :" +"ref:`thread-safety-memoryview` for details." +msgstr "" + +#: ../../reference/datamodel.rst:3669 +msgid "" +"Called when a buffer is no longer needed. The *buffer* argument is a :class:" +"`memoryview` object that was previously returned by :meth:`~object." +"__buffer__`. The method must release any resources associated with the " +"buffer. This method should return ``None``." +msgstr "" + +#: ../../reference/datamodel.rst:3674 +msgid "" +"**Thread safety:** In :term:`free-threaded ` Python, any " +"export counter decrement must use atomic operations. Resource cleanup must " +"be thread-safe, as the final release may race with concurrent releases from " +"other threads." +msgstr "" + +#: ../../reference/datamodel.rst:3679 +msgid "" +"Buffer objects that do not need to perform any cleanup are not required to " +"implement this method." +msgstr "" + +#: ../../reference/datamodel.rst:3686 +msgid ":pep:`688` - Making the buffer protocol accessible in Python" +msgstr "" + +#: ../../reference/datamodel.rst:3687 +msgid "" +"Introduces the Python ``__buffer__`` and ``__release_buffer__`` methods." +msgstr "" + +#: ../../reference/datamodel.rst:3689 +msgid ":class:`collections.abc.Buffer`" +msgstr "" + +#: ../../reference/datamodel.rst:3690 +msgid "ABC for buffer types." +msgstr "" + +#: ../../reference/datamodel.rst:3693 +msgid "Annotations" +msgstr "" + +#: ../../reference/datamodel.rst:3695 +msgid "" +"Functions, classes, and modules may contain :term:`annotations " +"`, which are a way to associate information (usually :term:`type " +"hints `) with a symbol." +msgstr "" + +#: ../../reference/datamodel.rst:3701 +msgid "" +"This attribute contains the annotations for an object. It is :ref:`lazily " +"evaluated `, so accessing the attribute may execute " +"arbitrary code and raise exceptions. If evaluation is successful, the " +"attribute is set to a dictionary mapping from variable names to annotations." +msgstr "" + +#: ../../reference/datamodel.rst:3706 +msgid "Annotations are now lazily evaluated." +msgstr "" + +#: ../../reference/datamodel.rst:3711 +msgid "" +"An :term:`annotate function`. Returns a new dictionary object mapping " +"attribute/parameter names to their annotation values." +msgstr "" + +#: ../../reference/datamodel.rst:3714 +msgid "" +"Takes a format parameter specifying the format in which annotations values " +"should be provided. It must be a member of the :class:`annotationlib.Format` " +"enum, or an integer with a value corresponding to a member of the enum." +msgstr "" + +#: ../../reference/datamodel.rst:3718 +msgid "" +"If an annotate function doesn't support the requested format, it must raise :" +"exc:`NotImplementedError`. Annotate functions must always support :attr:" +"`~annotationlib.Format.VALUE` format; they must not raise :exc:" +"`NotImplementedError()` when called with this format." +msgstr "" + +#: ../../reference/datamodel.rst:3723 +msgid "" +"When called with :attr:`~annotationlib.Format.VALUE` format, an annotate " +"function may raise :exc:`NameError`; it must not raise :exc:`!NameError` " +"when called requesting any other format." +msgstr "" + +#: ../../reference/datamodel.rst:3726 +msgid "" +"If an object does not have any annotations, :attr:`~object.__annotate__` " +"should preferably be set to ``None`` (it can’t be deleted), rather than set " +"to a function that returns an empty dict." +msgstr "" + +#: ../../reference/datamodel.rst:3733 +msgid ":pep:`649` --- Deferred evaluation of annotation using descriptors" +msgstr "" + +#: ../../reference/datamodel.rst:3734 +msgid "" +"Introduces lazy evaluation of annotations and the ``__annotate__`` function." +msgstr "" + +#: ../../reference/datamodel.rst:3740 +msgid "Special method lookup" +msgstr "" + +#: ../../reference/datamodel.rst:3742 +msgid "" +"For custom classes, implicit invocations of special methods are only " +"guaranteed to work correctly if defined on an object's type, not in the " +"object's instance dictionary. That behaviour is the reason why the " +"following code raises an exception::" +msgstr "" + +#: ../../reference/datamodel.rst:3747 +msgid "" +">>> class C:\n" +"... pass\n" +"...\n" +">>> c = C()\n" +">>> c.__len__ = lambda: 5\n" +">>> len(c)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: object of type 'C' has no len()" +msgstr "" + +#: ../../reference/datamodel.rst:3757 +msgid "" +"The rationale behind this behaviour lies with a number of special methods " +"such as :meth:`~object.__hash__` and :meth:`~object.__repr__` that are " +"implemented by all objects, including type objects. If the implicit lookup " +"of these methods used the conventional lookup process, they would fail when " +"invoked on the type object itself::" +msgstr "" + +#: ../../reference/datamodel.rst:3764 +msgid "" +">>> 1 .__hash__() == hash(1)\n" +"True\n" +">>> int.__hash__() == hash(int)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: descriptor '__hash__' of 'int' object needs an argument" +msgstr "" + +#: ../../reference/datamodel.rst:3771 +msgid "" +"Incorrectly attempting to invoke an unbound method of a class in this way is " +"sometimes referred to as 'metaclass confusion', and is avoided by bypassing " +"the instance when looking up special methods::" +msgstr "" + +#: ../../reference/datamodel.rst:3775 +msgid "" +">>> type(1).__hash__(1) == hash(1)\n" +"True\n" +">>> type(int).__hash__(int) == hash(int)\n" +"True" +msgstr "" + +#: ../../reference/datamodel.rst:3780 +msgid "" +"In addition to bypassing any instance attributes in the interest of " +"correctness, implicit special method lookup generally also bypasses the :" +"meth:`~object.__getattribute__` method even of the object's metaclass::" +msgstr "" + +#: ../../reference/datamodel.rst:3784 +msgid "" +">>> class Meta(type):\n" +"... def __getattribute__(*args):\n" +"... print(\"Metaclass getattribute invoked\")\n" +"... return type.__getattribute__(*args)\n" +"...\n" +">>> class C(object, metaclass=Meta):\n" +"... def __len__(self):\n" +"... return 10\n" +"... def __getattribute__(*args):\n" +"... print(\"Class getattribute invoked\")\n" +"... return object.__getattribute__(*args)\n" +"...\n" +">>> c = C()\n" +">>> c.__len__() # Explicit lookup via instance\n" +"Class getattribute invoked\n" +"10\n" +">>> type(c).__len__(c) # Explicit lookup via type\n" +"Metaclass getattribute invoked\n" +"10\n" +">>> len(c) # Implicit lookup\n" +"10" +msgstr "" + +#: ../../reference/datamodel.rst:3806 +msgid "" +"Bypassing the :meth:`~object.__getattribute__` machinery in this fashion " +"provides significant scope for speed optimisations within the interpreter, " +"at the cost of some flexibility in the handling of special methods (the " +"special method *must* be set on the class object itself in order to be " +"consistently invoked by the interpreter)." +msgstr "" + +#: ../../reference/datamodel.rst:3817 +msgid "Coroutines" +msgstr "" + +#: ../../reference/datamodel.rst:3821 +msgid "Awaitable Objects" +msgstr "" + +#: ../../reference/datamodel.rst:3823 +msgid "" +"An :term:`awaitable` object generally implements an :meth:`~object." +"__await__` method. :term:`Coroutine objects ` returned from :" +"keyword:`async def` functions are awaitable." +msgstr "" + +#: ../../reference/datamodel.rst:3829 +msgid "" +"The :term:`generator iterator` objects returned from generators decorated " +"with :func:`types.coroutine` are also awaitable, but they do not implement :" +"meth:`~object.__await__`." +msgstr "" + +#: ../../reference/datamodel.rst:3835 +msgid "" +"Must return an :term:`iterator`. Should be used to implement :term:" +"`awaitable` objects. For instance, :class:`asyncio.Future` implements this " +"method to be compatible with the :keyword:`await` expression. The :class:" +"`object` class itself is not awaitable and does not provide this method." +msgstr "" + +#: ../../reference/datamodel.rst:3843 +msgid "" +"The language doesn't place any restriction on the type or value of the " +"objects yielded by the iterator returned by ``__await__``, as this is " +"specific to the implementation of the asynchronous execution framework (e." +"g. :mod:`asyncio`) that will be managing the :term:`awaitable` object." +msgstr "" + +#: ../../reference/datamodel.rst:3851 +msgid ":pep:`492` for additional information about awaitable objects." +msgstr "" + +#: ../../reference/datamodel.rst:3857 +msgid "Coroutine Objects" +msgstr "" + +#: ../../reference/datamodel.rst:3859 +msgid "" +":term:`Coroutine objects ` are :term:`awaitable` objects. A " +"coroutine's execution can be controlled by calling :meth:`~object.__await__` " +"and iterating over the result. When the coroutine has finished executing " +"and returns, the iterator raises :exc:`StopIteration`, and the exception's :" +"attr:`~StopIteration.value` attribute holds the return value. If the " +"coroutine raises an exception, it is propagated by the iterator. Coroutines " +"should not directly raise unhandled :exc:`StopIteration` exceptions." +msgstr "" + +#: ../../reference/datamodel.rst:3867 +msgid "" +"Coroutines also have the methods listed below, which are analogous to those " +"of generators (see :ref:`generator-methods`). However, unlike generators, " +"coroutines do not directly support iteration." +msgstr "" + +#: ../../reference/datamodel.rst:3871 +msgid "" +"Coroutines are :ref:`generic ` over the types of their yield, " +"send, and return values, respectively." +msgstr "" + +#: ../../reference/datamodel.rst:3874 +msgid "It is a :exc:`RuntimeError` to await on a coroutine more than once." +msgstr "" + +#: ../../reference/datamodel.rst:3880 +msgid "" +"Starts or resumes execution of the coroutine. If *value* is ``None``, this " +"is equivalent to advancing the iterator returned by :meth:`~object." +"__await__`. If *value* is not ``None``, this method delegates to the :meth:" +"`~generator.send` method of the iterator that caused the coroutine to " +"suspend. The result (return value, :exc:`StopIteration`, or other " +"exception) is the same as when iterating over the :meth:`!__await__` return " +"value, described above." +msgstr "" + +#: ../../reference/datamodel.rst:3891 +msgid "" +"Raises the specified exception in the coroutine. This method delegates to " +"the :meth:`~generator.throw` method of the iterator that caused the " +"coroutine to suspend, if it has such a method. Otherwise, the exception is " +"raised at the suspension point. The result (return value, :exc:" +"`StopIteration`, or other exception) is the same as when iterating over the :" +"meth:`~object.__await__` return value, described above. If the exception is " +"not caught in the coroutine, it propagates back to the caller." +msgstr "" + +#: ../../reference/datamodel.rst:3902 +msgid "" +"The second signature \\(type\\[, value\\[, traceback\\]\\]\\) is deprecated " +"and may be removed in a future version of Python." +msgstr "" + +#: ../../reference/datamodel.rst:3907 +msgid "" +"Causes the coroutine to clean itself up and exit. If the coroutine is " +"suspended, this method first delegates to the :meth:`~generator.close` " +"method of the iterator that caused the coroutine to suspend, if it has such " +"a method. Then it raises :exc:`GeneratorExit` at the suspension point, " +"causing the coroutine to immediately clean itself up. Finally, the coroutine " +"is marked as having finished executing, even if it was never started." +msgstr "" + +#: ../../reference/datamodel.rst:3915 +msgid "" +"Coroutine objects are automatically closed using the above process when they " +"are about to be destroyed." +msgstr "" + +#: ../../reference/datamodel.rst:3921 +msgid "Asynchronous Iterators" +msgstr "" + +#: ../../reference/datamodel.rst:3923 +msgid "" +"An *asynchronous iterator* can call asynchronous code in its ``__anext__`` " +"method." +msgstr "" + +#: ../../reference/datamodel.rst:3926 +msgid "" +"Asynchronous iterators can be used in an :keyword:`async for` statement." +msgstr "" + +#: ../../reference/datamodel.rst:3928 ../../reference/datamodel.rst:3977 +msgid "The :class:`object` class itself does not provide these methods." +msgstr "" + +#: ../../reference/datamodel.rst:3933 +msgid "Must return an *asynchronous iterator* object." +msgstr "" + +#: ../../reference/datamodel.rst:3937 +msgid "" +"Must return an *awaitable* resulting in a next value of the iterator. " +"Should raise a :exc:`StopAsyncIteration` error when the iteration is over." +msgstr "" + +#: ../../reference/datamodel.rst:3940 +msgid "An example of an asynchronous iterable object::" +msgstr "" + +#: ../../reference/datamodel.rst:3942 +msgid "" +"class Reader:\n" +" async def readline(self):\n" +" ...\n" +"\n" +" def __aiter__(self):\n" +" return self\n" +"\n" +" async def __anext__(self):\n" +" val = await self.readline()\n" +" if val == b'':\n" +" raise StopAsyncIteration\n" +" return val" +msgstr "" + +#: ../../reference/datamodel.rst:3957 +msgid "" +"Prior to Python 3.7, :meth:`~object.__aiter__` could return an *awaitable* " +"that would resolve to an :term:`asynchronous iterator `." +msgstr "" + +#: ../../reference/datamodel.rst:3962 +msgid "" +"Starting with Python 3.7, :meth:`~object.__aiter__` must return an " +"asynchronous iterator object. Returning anything else will result in a :exc:" +"`TypeError` error." +msgstr "" + +#: ../../reference/datamodel.rst:3970 +msgid "Asynchronous Context Managers" +msgstr "" + +#: ../../reference/datamodel.rst:3972 +msgid "" +"An *asynchronous context manager* is a *context manager* that is able to " +"suspend execution in its ``__aenter__`` and ``__aexit__`` methods." +msgstr "" + +#: ../../reference/datamodel.rst:3975 +msgid "" +"Asynchronous context managers can be used in an :keyword:`async with` " +"statement." +msgstr "" + +#: ../../reference/datamodel.rst:3981 +msgid "" +"Semantically similar to :meth:`~object.__enter__`, the only difference being " +"that it must return an *awaitable*." +msgstr "" + +#: ../../reference/datamodel.rst:3986 +msgid "" +"Semantically similar to :meth:`~object.__exit__`, the only difference being " +"that it must return an *awaitable*." +msgstr "" + +#: ../../reference/datamodel.rst:3989 +msgid "An example of an asynchronous context manager class::" +msgstr "" + +#: ../../reference/datamodel.rst:3991 +msgid "" +"class AsyncContextManager:\n" +" async def __aenter__(self):\n" +" await log('entering context')\n" +"\n" +" async def __aexit__(self, exc_type, exc, tb):\n" +" await log('exiting context')" +msgstr "" + +#: ../../reference/datamodel.rst:4002 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../reference/datamodel.rst:4003 +msgid "" +"It *is* possible in some cases to change an object's type, under certain " +"controlled conditions. It generally isn't a good idea though, since it can " +"lead to some very strange behaviour if it is handled incorrectly." +msgstr "" + +#: ../../reference/datamodel.rst:4007 +msgid "" +"The :meth:`~object.__hash__`, :meth:`~object.__iter__`, :meth:`~object." +"__reversed__`, :meth:`~object.__contains__`, :meth:`~object." +"__class_getitem__` and :meth:`~os.PathLike.__fspath__` methods have special " +"handling for this. Others will still raise a :exc:`TypeError`, but may do so " +"by relying on the behavior that ``None`` is not callable." +msgstr "" + +#: ../../reference/datamodel.rst:4014 +msgid "" +"\"Does not support\" here means that the class has no such method, or the " +"method returns :data:`NotImplemented`. Do not set the method to ``None`` if " +"you want to force fallback to the right operand's reflected method—that will " +"instead have the opposite effect of explicitly *blocking* such fallback." +msgstr "" + +#: ../../reference/datamodel.rst:4020 +msgid "" +"For operands of the same type, it is assumed that if the non-reflected " +"method (such as :meth:`~object.__add__`) fails then the operation is not " +"supported, which is why the reflected method is not called." +msgstr "" + +#: ../../reference/datamodel.rst:4024 +msgid "" +"If the right operand's type is a subclass of the left operand's type, the " +"reflected method having precedence allows subclasses to override their " +"ancestors' operations." +msgstr "" + +#: ../../reference/datamodel.rst:14 ../../reference/datamodel.rst:148 +#: ../../reference/datamodel.rst:159 ../../reference/datamodel.rst:183 +#: ../../reference/datamodel.rst:195 ../../reference/datamodel.rst:228 +#: ../../reference/datamodel.rst:249 ../../reference/datamodel.rst:266 +#: ../../reference/datamodel.rst:284 ../../reference/datamodel.rst:298 +#: ../../reference/datamodel.rst:343 ../../reference/datamodel.rst:383 +#: ../../reference/datamodel.rst:408 ../../reference/datamodel.rst:429 +#: ../../reference/datamodel.rst:447 ../../reference/datamodel.rst:467 +#: ../../reference/datamodel.rst:475 ../../reference/datamodel.rst:488 +#: ../../reference/datamodel.rst:505 ../../reference/datamodel.rst:541 +#: ../../reference/datamodel.rst:555 ../../reference/datamodel.rst:570 +#: ../../reference/datamodel.rst:715 ../../reference/datamodel.rst:853 +#: ../../reference/datamodel.rst:877 ../../reference/datamodel.rst:913 +#: ../../reference/datamodel.rst:1190 ../../reference/datamodel.rst:1358 +#: ../../reference/datamodel.rst:1385 ../../reference/datamodel.rst:1473 +#: ../../reference/datamodel.rst:1572 ../../reference/datamodel.rst:1680 +#: ../../reference/datamodel.rst:1797 ../../reference/datamodel.rst:2228 +#: ../../reference/datamodel.rst:3284 +msgid "object" +msgstr "" + +#: ../../reference/datamodel.rst:14 ../../reference/datamodel.rst:122 +msgid "data" +msgstr "" + +#: ../../reference/datamodel.rst:22 ../../reference/datamodel.rst:298 +#: ../../reference/datamodel.rst:358 ../../reference/datamodel.rst:447 +#: ../../reference/datamodel.rst:488 ../../reference/datamodel.rst:853 +#: ../../reference/datamodel.rst:1414 ../../reference/datamodel.rst:1880 +#: ../../reference/datamodel.rst:2129 ../../reference/datamodel.rst:2135 +#: ../../reference/datamodel.rst:2228 ../../reference/datamodel.rst:2795 +#: ../../reference/datamodel.rst:3232 ../../reference/datamodel.rst:3402 +#: ../../reference/datamodel.rst:3437 ../../reference/datamodel.rst:3505 +#: ../../reference/datamodel.rst:3515 ../../reference/datamodel.rst:3543 +msgid "built-in function" +msgstr "" + +#: ../../reference/datamodel.rst:22 +msgid "id" +msgstr "" + +#: ../../reference/datamodel.rst:22 ../../reference/datamodel.rst:122 +#: ../../reference/datamodel.rst:2795 +msgid "type" +msgstr "Typ" + +#: ../../reference/datamodel.rst:22 +msgid "identity of an object" +msgstr "" + +#: ../../reference/datamodel.rst:22 +msgid "value of an object" +msgstr "" + +#: ../../reference/datamodel.rst:22 +msgid "type of an object" +msgstr "" + +#: ../../reference/datamodel.rst:22 +msgid "mutable object" +msgstr "" + +#: ../../reference/datamodel.rst:22 +msgid "immutable object" +msgstr "" + +#: ../../reference/datamodel.rst:56 +msgid "garbage collection" +msgstr "" + +#: ../../reference/datamodel.rst:56 +msgid "reference counting" +msgstr "" + +#: ../../reference/datamodel.rst:56 +msgid "unreachable object" +msgstr "" + +#: ../../reference/datamodel.rst:91 ../../reference/datamodel.rst:1190 +msgid "container" +msgstr "" + +#: ../../reference/datamodel.rst:122 +msgid "hierarchy" +msgstr "" + +#: ../../reference/datamodel.rst:122 +msgid "extension" +msgstr "" + +#: ../../reference/datamodel.rst:122 ../../reference/datamodel.rst:420 +#: ../../reference/datamodel.rst:421 ../../reference/datamodel.rst:524 +#: ../../reference/datamodel.rst:913 ../../reference/datamodel.rst:933 +#: ../../reference/datamodel.rst:1414 +msgid "module" +msgstr "" + +#: ../../reference/datamodel.rst:122 ../../reference/datamodel.rst:266 +#: ../../reference/datamodel.rst:853 +msgid "C" +msgstr "" + +#: ../../reference/datamodel.rst:122 ../../reference/datamodel.rst:266 +#: ../../reference/datamodel.rst:853 +msgid "language" +msgstr "" + +#: ../../reference/datamodel.rst:135 ../../reference/datamodel.rst:1190 +#: ../../reference/datamodel.rst:1208 ../../reference/datamodel.rst:1358 +#: ../../reference/datamodel.rst:1378 +msgid "attribute" +msgstr "Attribut" + +#: ../../reference/datamodel.rst:135 +msgid "special" +msgstr "" + +#: ../../reference/datamodel.rst:135 +msgid "generic" +msgstr "" + +#: ../../reference/datamodel.rst:183 +msgid "..." +msgstr "" + +#: ../../reference/datamodel.rst:183 +msgid "ellipsis literal" +msgstr "" + +#: ../../reference/datamodel.rst:195 ../../reference/datamodel.rst:1385 +msgid "numeric" +msgstr "" + +#: ../../reference/datamodel.rst:228 ../../reference/datamodel.rst:234 +msgid "integer" +msgstr "" + +#: ../../reference/datamodel.rst:234 +msgid "representation" +msgstr "" + +#: ../../reference/datamodel.rst:249 +msgid "Boolean" +msgstr "" + +#: ../../reference/datamodel.rst:249 +msgid "False" +msgstr "" + +#: ../../reference/datamodel.rst:249 +msgid "True" +msgstr "" + +#: ../../reference/datamodel.rst:266 +msgid "floating-point" +msgstr "" + +#: ../../reference/datamodel.rst:266 ../../reference/datamodel.rst:284 +msgid "number" +msgstr "" + +#: ../../reference/datamodel.rst:266 +msgid "Java" +msgstr "" + +#: ../../reference/datamodel.rst:284 ../../reference/datamodel.rst:3515 +msgid "complex" +msgstr "" + +#: ../../reference/datamodel.rst:298 ../../reference/datamodel.rst:447 +#: ../../reference/datamodel.rst:488 ../../reference/datamodel.rst:3232 +msgid "len" +msgstr "" + +#: ../../reference/datamodel.rst:298 ../../reference/datamodel.rst:1385 +msgid "sequence" +msgstr "" + +#: ../../reference/datamodel.rst:298 +msgid "index operation" +msgstr "" + +#: ../../reference/datamodel.rst:298 +msgid "item selection" +msgstr "" + +#: ../../reference/datamodel.rst:298 ../../reference/datamodel.rst:408 +#: ../../reference/datamodel.rst:488 +msgid "subscription" +msgstr "" + +#: ../../reference/datamodel.rst:316 ../../reference/datamodel.rst:408 +msgid "slicing" +msgstr "" + +#: ../../reference/datamodel.rst:316 ../../reference/datamodel.rst:1892 +msgid "start (slice object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:316 ../../reference/datamodel.rst:1892 +msgid "stop (slice object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:316 ../../reference/datamodel.rst:1892 +msgid "step (slice object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:343 +msgid "immutable sequence" +msgstr "" + +#: ../../reference/datamodel.rst:343 +msgid "immutable" +msgstr "" + +#: ../../reference/datamodel.rst:354 ../../reference/datamodel.rst:358 +#: ../../reference/datamodel.rst:2104 ../../reference/datamodel.rst:2135 +msgid "string" +msgstr "" + +#: ../../reference/datamodel.rst:354 +msgid "immutable sequences" +msgstr "" + +#: ../../reference/datamodel.rst:358 +msgid "chr" +msgstr "" + +#: ../../reference/datamodel.rst:358 +msgid "ord" +msgstr "" + +#: ../../reference/datamodel.rst:358 +msgid "character" +msgstr "" + +#: ../../reference/datamodel.rst:358 +msgid "item" +msgstr "" + +#: ../../reference/datamodel.rst:358 +msgid "Unicode" +msgstr "" + +#: ../../reference/datamodel.rst:383 +msgid "tuple" +msgstr "" + +#: ../../reference/datamodel.rst:383 +msgid "singleton" +msgstr "" + +#: ../../reference/datamodel.rst:383 +msgid "empty" +msgstr "" + +#: ../../reference/datamodel.rst:396 ../../reference/datamodel.rst:2129 +msgid "bytes" +msgstr "" + +#: ../../reference/datamodel.rst:396 +msgid "byte" +msgstr "" + +#: ../../reference/datamodel.rst:408 +msgid "mutable sequence" +msgstr "" + +#: ../../reference/datamodel.rst:408 +msgid "mutable" +msgstr "" + +#: ../../reference/datamodel.rst:408 ../../reference/datamodel.rst:1208 +#: ../../reference/datamodel.rst:1378 +msgid "assignment" +msgstr "" + +#: ../../reference/datamodel.rst:408 ../../reference/datamodel.rst:913 +#: ../../reference/datamodel.rst:1834 ../../reference/datamodel.rst:2022 +#: ../../reference/datamodel.rst:3567 +msgid "statement" +msgstr "" + +#: ../../reference/datamodel.rst:420 +msgid "array" +msgstr "Array" + +#: ../../reference/datamodel.rst:421 +msgid "collections" +msgstr "" + +#: ../../reference/datamodel.rst:429 +msgid "list" +msgstr "" + +#: ../../reference/datamodel.rst:436 +msgid "bytearray" +msgstr "" + +#: ../../reference/datamodel.rst:447 +msgid "set type" +msgstr "" + +#: ../../reference/datamodel.rst:467 +msgid "set" +msgstr "" + +#: ../../reference/datamodel.rst:475 +msgid "frozenset" +msgstr "" + +#: ../../reference/datamodel.rst:488 ../../reference/datamodel.rst:1385 +msgid "mapping" +msgstr "" + +#: ../../reference/datamodel.rst:505 ../../reference/datamodel.rst:1190 +#: ../../reference/datamodel.rst:2228 +msgid "dictionary" +msgstr "" + +#: ../../reference/datamodel.rst:524 +msgid "dbm.ndbm" +msgstr "" + +#: ../../reference/datamodel.rst:524 +msgid "dbm.gnu" +msgstr "" + +#: ../../reference/datamodel.rst:541 +msgid "frozendict" +msgstr "" + +#: ../../reference/datamodel.rst:555 +msgid "callable" +msgstr "" + +#: ../../reference/datamodel.rst:555 ../../reference/datamodel.rst:570 +#: ../../reference/datamodel.rst:797 ../../reference/datamodel.rst:815 +#: ../../reference/datamodel.rst:828 ../../reference/datamodel.rst:853 +msgid "function" +msgstr "" + +#: ../../reference/datamodel.rst:555 ../../reference/datamodel.rst:1190 +#: ../../reference/datamodel.rst:1213 ../../reference/datamodel.rst:3178 +msgid "call" +msgstr "" + +#: ../../reference/datamodel.rst:555 +msgid "invocation" +msgstr "" + +#: ../../reference/datamodel.rst:555 +msgid "argument" +msgstr "" + +#: ../../reference/datamodel.rst:570 ../../reference/datamodel.rst:715 +msgid "user-defined" +msgstr "" + +#: ../../reference/datamodel.rst:570 +msgid "user-defined function" +msgstr "" + +#: ../../reference/datamodel.rst:583 +msgid "__builtins__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:583 +msgid "__closure__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:583 +msgid "__globals__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:583 +msgid "global" +msgstr "" + +#: ../../reference/datamodel.rst:583 ../../reference/datamodel.rst:933 +msgid "namespace" +msgstr "" + +#: ../../reference/datamodel.rst:617 +msgid "__doc__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:617 +msgid "__name__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:617 +msgid "__module__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:617 +msgid "__dict__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:617 +msgid "__defaults__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:617 +msgid "__code__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:617 +msgid "__annotations__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:617 +msgid "__annotate__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:617 +msgid "__kwdefaults__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:617 +msgid "__type_params__ (function attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:715 ../../reference/datamodel.rst:877 +msgid "method" +msgstr "" + +#: ../../reference/datamodel.rst:715 +msgid "user-defined method" +msgstr "" + +#: ../../reference/datamodel.rst:723 +msgid "__func__ (method attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:723 +msgid "__self__ (method attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:723 +msgid "__doc__ (method attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:723 +msgid "__name__ (method attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:723 +msgid "__module__ (method attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:797 ../../reference/datamodel.rst:1572 +msgid "generator" +msgstr "" + +#: ../../reference/datamodel.rst:797 +msgid "iterator" +msgstr "" + +#: ../../reference/datamodel.rst:815 ../../reference/datamodel.rst:3813 +msgid "coroutine" +msgstr "" + +#: ../../reference/datamodel.rst:828 +msgid "asynchronous generator" +msgstr "" + +#: ../../reference/datamodel.rst:828 +msgid "asynchronous iterator" +msgstr "" + +#: ../../reference/datamodel.rst:877 +msgid "built-in method" +msgstr "" + +#: ../../reference/datamodel.rst:877 +msgid "built-in" +msgstr "" + +#: ../../reference/datamodel.rst:913 +msgid "import" +msgstr "" + +#: ../../reference/datamodel.rst:933 +msgid "__name__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:933 +msgid "__spec__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:933 +msgid "__package__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:933 +msgid "__loader__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:933 +msgid "__path__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:933 +msgid "__file__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:933 +msgid "__doc__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:933 +msgid "__annotations__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:933 +msgid "__annotate__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:933 +msgid "__lazy_modules__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1158 +msgid "__dict__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1190 ../../reference/datamodel.rst:1208 +#: ../../reference/datamodel.rst:1358 ../../reference/datamodel.rst:2005 +#: ../../reference/datamodel.rst:2908 +msgid "class" +msgstr "" + +#: ../../reference/datamodel.rst:1190 ../../reference/datamodel.rst:1358 +#: ../../reference/datamodel.rst:1378 +msgid "class instance" +msgstr "" + +#: ../../reference/datamodel.rst:1190 ../../reference/datamodel.rst:1358 +#: ../../reference/datamodel.rst:3178 +msgid "instance" +msgstr "" + +#: ../../reference/datamodel.rst:1190 ../../reference/datamodel.rst:1213 +msgid "class object" +msgstr "" + +#: ../../reference/datamodel.rst:1220 +msgid "__name__ (class attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1220 +msgid "__module__ (class attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1220 +msgid "__dict__ (class attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1220 +msgid "__bases__ (class attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1220 +msgid "__base__ (class attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1220 +msgid "__doc__ (class attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1220 +msgid "__annotations__ (class attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1220 +msgid "__annotate__ (class attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1220 +msgid "__type_params__ (class attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1220 +msgid "__static_attributes__ (class attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1220 +msgid "__firstlineno__ (class attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1396 +msgid "__dict__ (instance attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1396 +msgid "__class__ (instance attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1414 +msgid "open" +msgstr "" + +#: ../../reference/datamodel.rst:1414 +msgid "io" +msgstr "" + +#: ../../reference/datamodel.rst:1414 +msgid "popen() (in module os)" +msgstr "" + +#: ../../reference/datamodel.rst:1414 +msgid "makefile() (socket method)" +msgstr "" + +#: ../../reference/datamodel.rst:1414 +msgid "sys.stdin" +msgstr "" + +#: ../../reference/datamodel.rst:1414 +msgid "sys.stdout" +msgstr "" + +#: ../../reference/datamodel.rst:1414 +msgid "sys.stderr" +msgstr "" + +#: ../../reference/datamodel.rst:1414 +msgid "stdio" +msgstr "" + +#: ../../reference/datamodel.rst:1414 +msgid "stdin (in module sys)" +msgstr "" + +#: ../../reference/datamodel.rst:1414 +msgid "stdout (in module sys)" +msgstr "" + +#: ../../reference/datamodel.rst:1414 +msgid "stderr (in module sys)" +msgstr "" + +#: ../../reference/datamodel.rst:1459 +msgid "internal type" +msgstr "" + +#: ../../reference/datamodel.rst:1459 +msgid "types, internal" +msgstr "" + +#: ../../reference/datamodel.rst:1473 +msgid "bytecode" +msgstr "" + +#: ../../reference/datamodel.rst:1473 +msgid "code" +msgstr "" + +#: ../../reference/datamodel.rst:1473 +msgid "code object" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_argcount (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_posonlyargcount (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_kwonlyargcount (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_code (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_consts (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_filename (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_firstlineno (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_flags (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_name (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_names (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_nlocals (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_stacksize (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_varnames (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_cellvars (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_freevars (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1484 +msgid "co_qualname (code object attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1588 +msgid "documentation string" +msgstr "" + +#: ../../reference/datamodel.rst:1680 +msgid "frame" +msgstr "" + +#: ../../reference/datamodel.rst:1686 +msgid "f_back (frame attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1686 +msgid "f_code (frame attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1686 +msgid "f_globals (frame attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1686 +msgid "f_locals (frame attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1686 +msgid "f_lasti (frame attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1686 +msgid "f_builtins (frame attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1686 +msgid "f_generator (frame attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1737 +msgid "f_trace (frame attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1737 +msgid "f_trace_lines (frame attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1737 +msgid "f_trace_opcodes (frame attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1737 +msgid "f_lineno (frame attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1797 +msgid "traceback" +msgstr "" + +#: ../../reference/datamodel.rst:1797 +msgid "stack" +msgstr "" + +#: ../../reference/datamodel.rst:1797 +msgid "trace" +msgstr "" + +#: ../../reference/datamodel.rst:1797 +msgid "exception" +msgstr "" + +#: ../../reference/datamodel.rst:1797 +msgid "handler" +msgstr "" + +#: ../../reference/datamodel.rst:1797 +msgid "execution" +msgstr "" + +#: ../../reference/datamodel.rst:1797 +msgid "exc_info (in module sys)" +msgstr "" + +#: ../../reference/datamodel.rst:1797 +msgid "last_traceback (in module sys)" +msgstr "" + +#: ../../reference/datamodel.rst:1797 +msgid "sys.exc_info" +msgstr "" + +#: ../../reference/datamodel.rst:1797 +msgid "sys.exception" +msgstr "" + +#: ../../reference/datamodel.rst:1797 +msgid "sys.last_traceback" +msgstr "" + +#: ../../reference/datamodel.rst:1834 +msgid "tb_frame (traceback attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1834 +msgid "tb_lineno (traceback attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1834 +msgid "tb_lasti (traceback attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1834 +msgid "try" +msgstr "" + +#: ../../reference/datamodel.rst:1864 +msgid "tb_next (traceback attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:1880 ../../reference/datamodel.rst:3284 +msgid "slice" +msgstr "" + +#: ../../reference/datamodel.rst:1940 +msgid "operator" +msgstr "" + +#: ../../reference/datamodel.rst:1940 +msgid "overloading" +msgstr "" + +#: ../../reference/datamodel.rst:1940 +msgid "__getitem__() (mapping object method)" +msgstr "" + +#: ../../reference/datamodel.rst:1976 +msgid "subclassing" +msgstr "" + +#: ../../reference/datamodel.rst:1976 +msgid "immutable types" +msgstr "" + +#: ../../reference/datamodel.rst:2005 +msgid "constructor" +msgstr "" + +#: ../../reference/datamodel.rst:2022 +msgid "destructor" +msgstr "" + +#: ../../reference/datamodel.rst:2022 +msgid "finalizer" +msgstr "" + +#: ../../reference/datamodel.rst:2022 +msgid "del" +msgstr "" + +#: ../../reference/datamodel.rst:2086 +msgid "repr() (built-in function)" +msgstr "" + +#: ../../reference/datamodel.rst:2086 +msgid "__repr__() (object method)" +msgstr "" + +#: ../../reference/datamodel.rst:2104 +msgid "__str__() (object method)" +msgstr "" + +#: ../../reference/datamodel.rst:2104 +msgid "format() (built-in function)" +msgstr "" + +#: ../../reference/datamodel.rst:2104 +msgid "print() (built-in function)" +msgstr "" + +#: ../../reference/datamodel.rst:2135 +msgid "__format__() (object method)" +msgstr "" + +#: ../../reference/datamodel.rst:2135 +msgid "conversion" +msgstr "" + +#: ../../reference/datamodel.rst:2135 +msgid "print" +msgstr "" + +#: ../../reference/datamodel.rst:2177 +msgid "comparisons" +msgstr "" + +#: ../../reference/datamodel.rst:2228 +msgid "hash" +msgstr "" + +#: ../../reference/datamodel.rst:2309 +msgid "__len__() (mapping object method)" +msgstr "" + +#: ../../reference/datamodel.rst:2414 +msgid "__getattr__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:2414 +msgid "__dir__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:2414 +msgid "__class__ (module attribute)" +msgstr "" + +#: ../../reference/datamodel.rst:2795 +msgid "metaclass" +msgstr "" + +#: ../../reference/datamodel.rst:2795 +msgid "= (equals)" +msgstr "" + +#: ../../reference/datamodel.rst:2795 +msgid "class definition" +msgstr "" + +#: ../../reference/datamodel.rst:2861 +msgid "metaclass hint" +msgstr "" + +#: ../../reference/datamodel.rst:2884 +msgid "__prepare__ (metaclass method)" +msgstr "" + +#: ../../reference/datamodel.rst:2908 +msgid "body" +msgstr "" + +#: ../../reference/datamodel.rst:2928 +msgid "__class__ (method cell)" +msgstr "" + +#: ../../reference/datamodel.rst:2928 +msgid "__classcell__ (class namespace entry)" +msgstr "" + +#: ../../reference/datamodel.rst:3232 +msgid "__bool__() (object method)" +msgstr "" + +#: ../../reference/datamodel.rst:3402 ../../reference/datamodel.rst:3437 +msgid "divmod" +msgstr "" + +#: ../../reference/datamodel.rst:3402 ../../reference/datamodel.rst:3437 +msgid "pow" +msgstr "" + +#: ../../reference/datamodel.rst:3505 +msgid "abs" +msgstr "" + +#: ../../reference/datamodel.rst:3515 +msgid "int" +msgstr "" + +#: ../../reference/datamodel.rst:3515 +msgid "float" +msgstr "" + +#: ../../reference/datamodel.rst:3543 +msgid "round" +msgstr "" + +#: ../../reference/datamodel.rst:3567 +msgid "with" +msgstr "" + +#: ../../reference/datamodel.rst:3567 +msgid "context manager" +msgstr "" diff --git a/reference/executionmodel.po b/reference/executionmodel.po index f9b9631b..b4dcd280 100644 --- a/reference/executionmodel.po +++ b/reference/executionmodel.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -566,15 +566,17 @@ msgid "" "how it runs on the host look something like this:" msgstr "" -#: ../../reference/executionmodel.rst:0 +#: ../../reference/executionmodel.rst:415 +#: ../../reference/executionmodel.rst:474 msgid "**host machine**" msgstr "" -#: ../../reference/executionmodel.rst:0 +#: ../../reference/executionmodel.rst:416 +#: ../../reference/executionmodel.rst:475 msgid "**process** (global resources)" msgstr "" -#: ../../reference/executionmodel.rst:0 +#: ../../reference/executionmodel.rst:417 msgid "**thread** (runs machine code)" msgstr "" @@ -656,19 +658,19 @@ msgid "" "data layers specific to Python:" msgstr "" -#: ../../reference/executionmodel.rst:0 +#: ../../reference/executionmodel.rst:476 msgid "Python global runtime (*state*)" msgstr "" -#: ../../reference/executionmodel.rst:0 +#: ../../reference/executionmodel.rst:477 msgid "Python interpreter (*state*)" msgstr "" -#: ../../reference/executionmodel.rst:0 +#: ../../reference/executionmodel.rst:478 msgid "**thread** (runs Python bytecode and \"C-API\")" msgstr "" -#: ../../reference/executionmodel.rst:0 +#: ../../reference/executionmodel.rst:479 msgid "Python thread *state*" msgstr "" diff --git a/reference/executionmodel.po~ b/reference/executionmodel.po~ new file mode 100644 index 00000000..f9b9631b --- /dev/null +++ b/reference/executionmodel.po~ @@ -0,0 +1,937 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../reference/executionmodel.rst:6 +msgid "Execution model" +msgstr "" + +#: ../../reference/executionmodel.rst:15 +msgid "Structure of a program" +msgstr "" + +#: ../../reference/executionmodel.rst:19 +msgid "" +"A Python program is constructed from code blocks. A :dfn:`block` is a piece " +"of Python program text that is executed as a unit. The following are blocks: " +"a module, a function body, and a class definition. Each command typed " +"interactively is a block. A script file (a file given as standard input to " +"the interpreter or specified as a command line argument to the interpreter) " +"is a code block. A script command (a command specified on the interpreter " +"command line with the :option:`-c` option) is a code block. A module run as " +"a top level script (as module ``__main__``) from the command line using a :" +"option:`-m` argument is also a code block. The string argument passed to the " +"built-in functions :func:`eval` and :func:`exec` is a code block." +msgstr "" + +#: ../../reference/executionmodel.rst:33 +msgid "" +"A code block is executed in an :dfn:`execution frame`. A frame contains " +"some administrative information (used for debugging) and determines where " +"and how execution continues after the code block's execution has completed." +msgstr "" + +#: ../../reference/executionmodel.rst:40 +msgid "Naming and binding" +msgstr "" + +#: ../../reference/executionmodel.rst:49 +msgid "Binding of names" +msgstr "" + +#: ../../reference/executionmodel.rst:55 +msgid "" +":dfn:`Names` refer to objects. Names are introduced by name binding " +"operations." +msgstr "" + +#: ../../reference/executionmodel.rst:59 +msgid "The following constructs bind names:" +msgstr "" + +#: ../../reference/executionmodel.rst:61 +msgid "formal parameters to functions," +msgstr "" + +#: ../../reference/executionmodel.rst:62 +msgid "class definitions," +msgstr "" + +#: ../../reference/executionmodel.rst:63 +msgid "function definitions," +msgstr "" + +#: ../../reference/executionmodel.rst:64 +msgid "assignment expressions," +msgstr "" + +#: ../../reference/executionmodel.rst:65 +msgid "" +":ref:`targets ` that are identifiers if occurring in an " +"assignment:" +msgstr "" + +#: ../../reference/executionmodel.rst:68 +msgid ":keyword:`for` loop header," +msgstr "" + +#: ../../reference/executionmodel.rst:69 +msgid "" +"after :keyword:`!as` in a :keyword:`with` statement, :keyword:`except` " +"clause, :keyword:`except* ` clause, or in the as-pattern in " +"structural pattern matching," +msgstr "" + +#: ../../reference/executionmodel.rst:71 +msgid "in a capture pattern in structural pattern matching" +msgstr "" + +#: ../../reference/executionmodel.rst:73 +msgid ":keyword:`import` statements." +msgstr "" + +#: ../../reference/executionmodel.rst:74 +msgid ":keyword:`type` statements." +msgstr "" + +#: ../../reference/executionmodel.rst:75 +msgid ":ref:`type parameter lists `." +msgstr "" + +#: ../../reference/executionmodel.rst:77 +msgid "" +"The :keyword:`!import` statement of the form ``from ... import *`` binds all " +"names defined in the imported module, except those beginning with an " +"underscore. This form may only be used at the module level." +msgstr "" + +#: ../../reference/executionmodel.rst:81 +msgid "" +"A target occurring in a :keyword:`del` statement is also considered bound " +"for this purpose (though the actual semantics are to unbind the name)." +msgstr "" + +#: ../../reference/executionmodel.rst:84 +msgid "" +"Each assignment or import statement occurs within a block defined by a class " +"or function definition or at the module level (the top-level code block)." +msgstr "" + +#: ../../reference/executionmodel.rst:89 +msgid "" +"If a name is bound in a block, it is a local variable of that block, unless " +"declared as :keyword:`nonlocal` or :keyword:`global`. If a name is bound at " +"the module level, it is a global variable. (The variables of the module " +"code block are local and global.) If a variable is used in a code block but " +"not defined there, it is a :term:`free variable`." +msgstr "" + +#: ../../reference/executionmodel.rst:95 +msgid "" +"Each occurrence of a name in the program text refers to the :dfn:`binding` " +"of that name established by the following name resolution rules." +msgstr "" + +#: ../../reference/executionmodel.rst:101 +msgid "Resolution of names" +msgstr "" + +#: ../../reference/executionmodel.rst:105 +msgid "" +"A :dfn:`scope` defines the visibility of a name within a block. If a local " +"variable is defined in a block, its scope includes that block. If the " +"definition occurs in a function block, the scope extends to any blocks " +"contained within the defining one, unless a contained block introduces a " +"different binding for the name." +msgstr "" + +#: ../../reference/executionmodel.rst:113 +msgid "" +"When a name is used in a code block, it is resolved using the nearest " +"enclosing scope. The set of all such scopes visible to a code block is " +"called the block's :dfn:`environment`." +msgstr "" + +#: ../../reference/executionmodel.rst:121 +msgid "" +"When a name is not found at all, a :exc:`NameError` exception is raised. If " +"the current scope is a function scope, and the name refers to a local " +"variable that has not yet been bound to a value at the point where the name " +"is used, an :exc:`UnboundLocalError` exception is raised. :exc:" +"`UnboundLocalError` is a subclass of :exc:`NameError`." +msgstr "" + +#: ../../reference/executionmodel.rst:127 +msgid "" +"If a name binding operation occurs anywhere within a code block, all uses of " +"the name within the block are treated as references to the current block. " +"This can lead to errors when a name is used within a block before it is " +"bound. This rule is subtle. Python lacks declarations and allows name " +"binding operations to occur anywhere within a code block. The local " +"variables of a code block can be determined by scanning the entire text of " +"the block for name binding operations. See :ref:`the FAQ entry on " +"UnboundLocalError ` for examples." +msgstr "" + +#: ../../reference/executionmodel.rst:136 +msgid "" +"If the :keyword:`global` statement occurs within a block, all uses of the " +"names specified in the statement refer to the bindings of those names in the " +"top-level namespace. Names are resolved in the top-level namespace by " +"searching the global namespace, i.e. the namespace of the module containing " +"the code block, and the builtins namespace, the namespace of the module :mod:" +"`builtins`. The global namespace is searched first. If the names are not " +"found there, the builtins namespace is searched next. If the names are also " +"not found in the builtins namespace, new variables are created in the global " +"namespace. The global statement must precede all uses of the listed names." +msgstr "" + +#: ../../reference/executionmodel.rst:146 +msgid "" +"The :keyword:`global` statement has the same scope as a name binding " +"operation in the same block. If the nearest enclosing scope for a free " +"variable contains a global statement, the free variable is treated as a " +"global." +msgstr "" + +#: ../../reference/executionmodel.rst:152 +msgid "" +"The :keyword:`nonlocal` statement causes corresponding names to refer to " +"previously bound variables in the nearest enclosing function scope. :exc:" +"`SyntaxError` is raised at compile time if the given name does not exist in " +"any enclosing function scope. :ref:`Type parameters ` cannot be " +"rebound with the :keyword:`!nonlocal` statement." +msgstr "" + +#: ../../reference/executionmodel.rst:160 +msgid "" +"The namespace for a module is automatically created the first time a module " +"is imported. The main module for a script is always called :mod:`__main__`." +msgstr "" + +#: ../../reference/executionmodel.rst:163 +msgid "" +"Class definition blocks and arguments to :func:`exec` and :func:`eval` are " +"special in the context of name resolution. A class definition is an " +"executable statement that may use and define names. These references follow " +"the normal rules for name resolution with an exception that unbound local " +"variables are looked up in the global namespace. The namespace of the class " +"definition becomes the attribute dictionary of the class. The scope of names " +"defined in a class block is limited to the class block; it does not extend " +"to the code blocks of methods. This includes comprehensions and generator " +"expressions, but it does not include :ref:`annotation scopes `, which have access to their enclosing class scopes. This means that " +"the following will fail::" +msgstr "" + +#: ../../reference/executionmodel.rst:176 +msgid "" +"class A:\n" +" a = 42\n" +" b = list(a + i for i in range(10))" +msgstr "" + +#: ../../reference/executionmodel.rst:180 +msgid "However, the following will succeed::" +msgstr "" + +#: ../../reference/executionmodel.rst:182 +msgid "" +"class A:\n" +" type Alias = Nested\n" +" class Nested: pass\n" +"\n" +"print(A.Alias.__value__) # " +msgstr "" + +#: ../../reference/executionmodel.rst:191 +msgid "Annotation scopes" +msgstr "" + +#: ../../reference/executionmodel.rst:193 +msgid "" +":term:`Annotations `, :ref:`type parameter lists ` " +"and :keyword:`type` statements introduce *annotation scopes*, which behave " +"mostly like function scopes, but with some exceptions discussed below." +msgstr "" + +#: ../../reference/executionmodel.rst:198 +msgid "Annotation scopes are used in the following contexts:" +msgstr "" + +#: ../../reference/executionmodel.rst:200 +msgid ":term:`Function annotations `." +msgstr "" + +#: ../../reference/executionmodel.rst:201 +msgid ":term:`Variable annotations `." +msgstr "" + +#: ../../reference/executionmodel.rst:202 +msgid "" +"Type parameter lists for :ref:`generic type aliases `." +msgstr "" + +#: ../../reference/executionmodel.rst:203 +msgid "" +"Type parameter lists for :ref:`generic functions `. A " +"generic function's annotations are executed within the annotation scope, but " +"its defaults and decorators are not." +msgstr "" + +#: ../../reference/executionmodel.rst:206 +msgid "" +"Type parameter lists for :ref:`generic classes `. A generic " +"class's base classes and keyword arguments are executed within the " +"annotation scope, but its decorators are not." +msgstr "" + +#: ../../reference/executionmodel.rst:209 +msgid "" +"The bounds, constraints, and default values for type parameters (:ref:" +"`lazily evaluated `)." +msgstr "" + +#: ../../reference/executionmodel.rst:211 +msgid "The value of type aliases (:ref:`lazily evaluated `)." +msgstr "" + +#: ../../reference/executionmodel.rst:213 +msgid "Annotation scopes differ from function scopes in the following ways:" +msgstr "" + +#: ../../reference/executionmodel.rst:215 +msgid "" +"Annotation scopes have access to their enclosing class namespace. If an " +"annotation scope is immediately within a class scope, or within another " +"annotation scope that is immediately within a class scope, the code in the " +"annotation scope can use names defined in the class scope as if it were " +"executed directly within the class body. This contrasts with regular " +"functions defined within classes, which cannot access names defined in the " +"class scope." +msgstr "" + +#: ../../reference/executionmodel.rst:221 +msgid "" +"Expressions in annotation scopes cannot contain :keyword:`yield`, ``yield " +"from``, :keyword:`await`, or :token:`:= ` expressions. (These expressions are allowed in other " +"scopes contained within the annotation scope.)" +msgstr "" + +#: ../../reference/executionmodel.rst:225 +msgid "" +"Names defined in annotation scopes cannot be rebound with :keyword:" +"`nonlocal` statements in inner scopes. This includes only type parameters, " +"as no other syntactic elements that can appear within annotation scopes can " +"introduce new names." +msgstr "" + +#: ../../reference/executionmodel.rst:228 +msgid "" +"While annotation scopes have an internal name, that name is not reflected in " +"the :term:`qualified name` of objects defined within the scope. Instead, " +"the :attr:`~definition.__qualname__` of such objects is as if the object " +"were defined in the enclosing scope." +msgstr "" + +#: ../../reference/executionmodel.rst:233 +msgid "Annotation scopes were introduced in Python 3.12 as part of :pep:`695`." +msgstr "" + +#: ../../reference/executionmodel.rst:236 +msgid "" +"Annotation scopes are also used for type parameter defaults, as introduced " +"by :pep:`696`." +msgstr "" + +#: ../../reference/executionmodel.rst:240 +msgid "" +"Annotation scopes are now also used for annotations, as specified in :pep:" +"`649` and :pep:`749`." +msgstr "" + +#: ../../reference/executionmodel.rst:247 +msgid "Lazy evaluation" +msgstr "" + +#: ../../reference/executionmodel.rst:249 +msgid "" +"Most annotation scopes are *lazily evaluated*. This includes annotations, " +"the values of type aliases created through the :keyword:`type` statement, " +"and the bounds, constraints, and default values of type variables created " +"through the :ref:`type parameter syntax `. This means that they " +"are not evaluated when the type alias or type variable is created, or when " +"the object carrying annotations is created. Instead, they are only evaluated " +"when necessary, for example when the ``__value__`` attribute on a type alias " +"is accessed." +msgstr "" + +#: ../../reference/executionmodel.rst:258 +msgid "Example:" +msgstr "" + +#: ../../reference/executionmodel.rst:260 +msgid "" +">>> type Alias = 1/0\n" +">>> Alias.__value__\n" +"Traceback (most recent call last):\n" +" ...\n" +"ZeroDivisionError: division by zero\n" +">>> def func[T: 1/0](): pass\n" +">>> T = func.__type_params__[0]\n" +">>> T.__bound__\n" +"Traceback (most recent call last):\n" +" ...\n" +"ZeroDivisionError: division by zero" +msgstr "" + +#: ../../reference/executionmodel.rst:274 +msgid "" +"Here the exception is raised only when the ``__value__`` attribute of the " +"type alias or the ``__bound__`` attribute of the type variable is accessed." +msgstr "" + +#: ../../reference/executionmodel.rst:278 +msgid "" +"This behavior is primarily useful for references to types that have not yet " +"been defined when the type alias or type variable is created. For example, " +"lazy evaluation enables creation of mutually recursive type aliases::" +msgstr "" + +#: ../../reference/executionmodel.rst:282 +msgid "" +"from typing import Literal\n" +"\n" +"type SimpleExpr = int | Parenthesized\n" +"type Parenthesized = tuple[Literal[\"(\"], Expr, Literal[\")\"]]\n" +"type Expr = SimpleExpr | tuple[SimpleExpr, Literal[\"+\", \"-\"], Expr]" +msgstr "" + +#: ../../reference/executionmodel.rst:288 +msgid "" +"Lazily evaluated values are evaluated in :ref:`annotation scope `, which means that names that appear inside the lazily evaluated " +"value are looked up as if they were used in the immediately enclosing scope." +msgstr "" + +#: ../../reference/executionmodel.rst:297 +msgid "Builtins and restricted execution" +msgstr "" + +#: ../../reference/executionmodel.rst:303 +msgid "" +"Users should not touch ``__builtins__``; it is strictly an implementation " +"detail. Users wanting to override values in the builtins namespace should :" +"keyword:`import` the :mod:`builtins` module and modify its attributes " +"appropriately." +msgstr "" + +#: ../../reference/executionmodel.rst:308 +msgid "" +"The builtins namespace associated with the execution of a code block is " +"actually found by looking up the name ``__builtins__`` in its global " +"namespace; this should be a dictionary or a module (in the latter case the " +"module's dictionary is used). By default, when in the :mod:`__main__` " +"module, ``__builtins__`` is the built-in module :mod:`builtins`; when in any " +"other module, ``__builtins__`` is an alias for the dictionary of the :mod:" +"`builtins` module itself." +msgstr "" + +#: ../../reference/executionmodel.rst:320 +msgid "Interaction with dynamic features" +msgstr "" + +#: ../../reference/executionmodel.rst:322 +msgid "" +"Name resolution of free variables occurs at runtime, not at compile time. " +"This means that the following code will print 42::" +msgstr "" + +#: ../../reference/executionmodel.rst:325 +msgid "" +"i = 10\n" +"def f():\n" +" print(i)\n" +"i = 42\n" +"f()" +msgstr "" + +#: ../../reference/executionmodel.rst:333 +msgid "" +"The :func:`eval` and :func:`exec` functions do not have access to the full " +"environment for resolving names. Names may be resolved in the local and " +"global namespaces of the caller. Free variables are not resolved in the " +"nearest enclosing namespace, but in the global namespace. [#]_ The :func:" +"`exec` and :func:`eval` functions have optional arguments to override the " +"global and local namespace. If only one namespace is specified, it is used " +"for both." +msgstr "" + +#: ../../reference/executionmodel.rst:347 +msgid "Exceptions" +msgstr "Ausnahmen" + +#: ../../reference/executionmodel.rst:358 +msgid "" +"Exceptions are a means of breaking out of the normal flow of control of a " +"code block in order to handle errors or other exceptional conditions. An " +"exception is *raised* at the point where the error is detected; it may be " +"*handled* by the surrounding code block or by any code block that directly " +"or indirectly invoked the code block where the error occurred." +msgstr "" + +#: ../../reference/executionmodel.rst:364 +msgid "" +"The Python interpreter raises an exception when it detects a run-time error " +"(such as division by zero). A Python program can also explicitly raise an " +"exception with the :keyword:`raise` statement. Exception handlers are " +"specified with the :keyword:`try` ... :keyword:`except` statement. The :" +"keyword:`finally` clause of such a statement can be used to specify cleanup " +"code which does not handle the exception, but is executed whether an " +"exception occurred or not in the preceding code." +msgstr "" + +#: ../../reference/executionmodel.rst:374 +msgid "" +"Python uses the \"termination\" model of error handling: an exception " +"handler can find out what happened and continue execution at an outer level, " +"but it cannot repair the cause of the error and retry the failing operation " +"(except by re-entering the offending piece of code from the top)." +msgstr "" + +#: ../../reference/executionmodel.rst:381 +msgid "" +"When an exception is not handled at all, the interpreter terminates " +"execution of the program, or returns to its interactive main loop. In " +"either case, it prints a stack traceback, except when the exception is :exc:" +"`SystemExit`." +msgstr "" + +#: ../../reference/executionmodel.rst:385 +msgid "" +"Exceptions are identified by class instances. The :keyword:`except` clause " +"is selected depending on the class of the instance: it must reference the " +"class of the instance or a :term:`non-virtual base class ` thereof. The instance can be received by the handler and can carry " +"additional information about the exceptional condition." +msgstr "" + +#: ../../reference/executionmodel.rst:393 +msgid "" +"Exception messages are not part of the Python API. Their contents may " +"change from one version of Python to the next without warning and should not " +"be relied on by code which will run under multiple versions of the " +"interpreter." +msgstr "" + +#: ../../reference/executionmodel.rst:397 +msgid "" +"See also the description of the :keyword:`try` statement in section :ref:" +"`try` and :keyword:`raise` statement in section :ref:`raise`." +msgstr "" + +#: ../../reference/executionmodel.rst:404 +msgid "Runtime Components" +msgstr "" + +#: ../../reference/executionmodel.rst:407 +msgid "General Computing Model" +msgstr "" + +#: ../../reference/executionmodel.rst:409 +msgid "" +"Python's execution model does not operate in a vacuum. It runs on a host " +"machine and through that host's runtime environment, including its operating " +"system (OS), if there is one. When a program runs, the conceptual layers of " +"how it runs on the host look something like this:" +msgstr "" + +#: ../../reference/executionmodel.rst:0 +msgid "**host machine**" +msgstr "" + +#: ../../reference/executionmodel.rst:0 +msgid "**process** (global resources)" +msgstr "" + +#: ../../reference/executionmodel.rst:0 +msgid "**thread** (runs machine code)" +msgstr "" + +#: ../../reference/executionmodel.rst:419 +msgid "" +"Each process represents a program running on the host. Think of each " +"process itself as the data part of its program. Think of the process' " +"threads as the execution part of the program. This distinction will be " +"important to understand the conceptual Python runtime." +msgstr "" + +#: ../../reference/executionmodel.rst:424 +msgid "" +"The process, as the data part, is the execution context in which the program " +"runs. It mostly consists of the set of resources assigned to the program by " +"the host, including memory, signals, file handles, sockets, and environment " +"variables." +msgstr "" + +#: ../../reference/executionmodel.rst:429 +msgid "" +"Processes are isolated and independent from one another. (The same is true " +"for hosts.) The host manages the process' access to its assigned resources, " +"in addition to coordinating between processes." +msgstr "" + +#: ../../reference/executionmodel.rst:433 +msgid "" +"Each thread represents the actual execution of the program's machine code, " +"running relative to the resources assigned to the program's process. It's " +"strictly up to the host how and when that execution takes place." +msgstr "" + +#: ../../reference/executionmodel.rst:438 +msgid "" +"From the point of view of Python, a program always starts with exactly one " +"thread. However, the program may grow to run in multiple simultaneous " +"threads. Not all hosts support multiple threads per process, but most do. " +"Unlike processes, threads in a process are not isolated and independent from " +"one another. Specifically, all threads in a process share all of the " +"process' resources." +msgstr "" + +#: ../../reference/executionmodel.rst:445 +msgid "" +"The fundamental point of threads is that each one does *run* independently, " +"at the same time as the others. That may be only conceptually at the same " +"time (\"concurrently\") or physically (\"in parallel\"). Either way, the " +"threads effectively run at a non-synchronized rate." +msgstr "" + +#: ../../reference/executionmodel.rst:453 +msgid "" +"That non-synchronized rate means none of the process' memory is guaranteed " +"to stay consistent for the code running in any given thread. Thus multi-" +"threaded programs must take care to coordinate access to intentionally " +"shared resources. Likewise, they must take care to be absolutely diligent " +"about not accessing any *other* resources in multiple threads; otherwise two " +"threads running at the same time might accidentally interfere with each " +"other's use of some shared data. All this is true for both Python programs " +"and the Python runtime." +msgstr "" + +#: ../../reference/executionmodel.rst:463 +msgid "" +"The cost of this broad, unstructured requirement is the tradeoff for the " +"kind of raw concurrency that threads provide. The alternative to the " +"required discipline generally means dealing with non-deterministic bugs and " +"data corruption." +msgstr "" + +#: ../../reference/executionmodel.rst:469 +msgid "Python Runtime Model" +msgstr "" + +#: ../../reference/executionmodel.rst:471 +msgid "" +"The same conceptual layers apply to each Python program, with some extra " +"data layers specific to Python:" +msgstr "" + +#: ../../reference/executionmodel.rst:0 +msgid "Python global runtime (*state*)" +msgstr "" + +#: ../../reference/executionmodel.rst:0 +msgid "Python interpreter (*state*)" +msgstr "" + +#: ../../reference/executionmodel.rst:0 +msgid "**thread** (runs Python bytecode and \"C-API\")" +msgstr "" + +#: ../../reference/executionmodel.rst:0 +msgid "Python thread *state*" +msgstr "" + +#: ../../reference/executionmodel.rst:481 +msgid "" +"At the conceptual level: when a Python program starts, it looks exactly like " +"that diagram, with one of each. The runtime may grow to include multiple " +"interpreters, and each interpreter may grow to include multiple thread " +"states." +msgstr "" + +#: ../../reference/executionmodel.rst:488 +msgid "" +"A Python implementation won't necessarily implement the runtime layers " +"distinctly or even concretely. The only exception is places where distinct " +"layers are directly specified or exposed to users, like through the :mod:" +"`threading` module." +msgstr "" + +#: ../../reference/executionmodel.rst:495 +msgid "" +"The initial interpreter is typically called the \"main\" interpreter. Some " +"Python implementations, like CPython, assign special roles to the main " +"interpreter." +msgstr "" + +#: ../../reference/executionmodel.rst:499 +msgid "" +"Likewise, the host thread where the runtime was initialized is known as the " +"\"main\" thread. It may be different from the process' initial thread, " +"though they are often the same. In some cases \"main thread\" may be even " +"more specific and refer to the initial thread state. A Python runtime might " +"assign specific responsibilities to the main thread, such as handling " +"signals." +msgstr "" + +#: ../../reference/executionmodel.rst:506 +msgid "" +"As a whole, the Python runtime consists of the global runtime state, " +"interpreters, and thread states. The runtime ensures all that state stays " +"consistent over its lifetime, particularly when used with multiple host " +"threads." +msgstr "" + +#: ../../reference/executionmodel.rst:511 +msgid "" +"The global runtime, at the conceptual level, is just a set of interpreters. " +"While those interpreters are otherwise isolated and independent from one " +"another, they may share some data or other resources. The runtime is " +"responsible for managing these global resources safely. The actual nature " +"and management of these resources is implementation-specific. Ultimately, " +"the external utility of the global runtime is limited to managing " +"interpreters." +msgstr "" + +#: ../../reference/executionmodel.rst:519 +msgid "" +"In contrast, an \"interpreter\" is conceptually what we would normally think " +"of as the (full-featured) \"Python runtime\". When machine code executing " +"in a host thread interacts with the Python runtime, it calls into Python in " +"the context of a specific interpreter." +msgstr "" + +#: ../../reference/executionmodel.rst:526 +msgid "" +"The term \"interpreter\" here is not the same as the \"bytecode " +"interpreter\", which is what regularly runs in threads, executing compiled " +"Python code." +msgstr "" + +#: ../../reference/executionmodel.rst:530 +msgid "" +"In an ideal world, \"Python runtime\" would refer to what we currently call " +"\"interpreter\". However, it's been called \"interpreter\" at least since " +"introduced in 1997 (`CPython:a027efa5b`_)." +msgstr "" + +#: ../../reference/executionmodel.rst:536 +msgid "" +"Each interpreter completely encapsulates all of the non-process-global, non-" +"thread-specific state needed for the Python runtime to work. Notably, the " +"interpreter's state persists between uses. It includes fundamental data " +"like :data:`sys.modules`. The runtime ensures multiple threads using the " +"same interpreter will safely share it between them." +msgstr "" + +#: ../../reference/executionmodel.rst:543 +msgid "" +"A Python implementation may support using multiple interpreters at the same " +"time in the same process. They are independent and isolated from one " +"another. For example, each interpreter has its own :data:`sys.modules`." +msgstr "" + +#: ../../reference/executionmodel.rst:548 +msgid "" +"For thread-specific runtime state, each interpreter has a set of thread " +"states, which it manages, in the same way the global runtime contains a set " +"of interpreters. It can have thread states for as many host threads as it " +"needs. It may even have multiple thread states for the same host thread, " +"though that isn't as common." +msgstr "" + +#: ../../reference/executionmodel.rst:554 +msgid "" +"Each thread state, conceptually, has all the thread-specific runtime data an " +"interpreter needs to operate in one host thread. The thread state includes " +"the current raised exception and the thread's Python call stack. It may " +"include other thread-specific resources." +msgstr "" + +#: ../../reference/executionmodel.rst:561 +msgid "" +"The term \"Python thread\" can sometimes refer to a thread state, but " +"normally it means a thread created using the :mod:`threading` module." +msgstr "" + +#: ../../reference/executionmodel.rst:564 +msgid "" +"Each thread state, over its lifetime, is always tied to exactly one " +"interpreter and exactly one host thread. It will only ever be used in that " +"thread and with that interpreter." +msgstr "" + +#: ../../reference/executionmodel.rst:568 +msgid "" +"Multiple thread states may be tied to the same host thread, whether for " +"different interpreters or even the same interpreter. However, for any given " +"host thread, only one of the thread states tied to it can be used by the " +"thread at a time." +msgstr "" + +#: ../../reference/executionmodel.rst:573 +msgid "" +"Thread states are isolated and independent from one another and don't share " +"any data, except for possibly sharing an interpreter and objects or other " +"resources belonging to that interpreter." +msgstr "" + +#: ../../reference/executionmodel.rst:577 +msgid "" +"Once a program is running, new Python threads can be created using the :mod:" +"`threading` module (on platforms and Python implementations that support " +"threads). Additional processes can be created using the :mod:`os`, :mod:" +"`subprocess`, and :mod:`multiprocessing` modules. Interpreters can be " +"created and used with the :mod:`~concurrent.interpreters` module. " +"Coroutines (async) can be run using :mod:`asyncio` in each interpreter, " +"typically only in a single thread (often the main thread)." +msgstr "" + +#: ../../reference/executionmodel.rst:588 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../reference/executionmodel.rst:589 +msgid "" +"This limitation occurs because the code that is executed by these operations " +"is not available at the time the module is compiled." +msgstr "" + +#: ../../reference/executionmodel.rst:8 +msgid "execution model" +msgstr "" + +#: ../../reference/executionmodel.rst:8 +msgid "code" +msgstr "" + +#: ../../reference/executionmodel.rst:8 ../../reference/executionmodel.rst:17 +msgid "block" +msgstr "" + +#: ../../reference/executionmodel.rst:31 ../../reference/executionmodel.rst:299 +msgid "execution" +msgstr "" + +#: ../../reference/executionmodel.rst:31 +msgid "frame" +msgstr "" + +#: ../../reference/executionmodel.rst:42 +msgid "namespace" +msgstr "" + +#: ../../reference/executionmodel.rst:42 ../../reference/executionmodel.rst:103 +msgid "scope" +msgstr "" + +#: ../../reference/executionmodel.rst:51 +msgid "name" +msgstr "" + +#: ../../reference/executionmodel.rst:51 +msgid "binding" +msgstr "" + +#: ../../reference/executionmodel.rst:57 +msgid "from" +msgstr "" + +#: ../../reference/executionmodel.rst:57 +msgid "import statement" +msgstr "" + +#: ../../reference/executionmodel.rst:87 +msgid "free" +msgstr "" + +#: ../../reference/executionmodel.rst:87 +msgid "variable" +msgstr "" + +#: ../../reference/executionmodel.rst:111 +msgid "environment" +msgstr "" + +#: ../../reference/executionmodel.rst:117 +msgid "NameError (built-in exception)" +msgstr "" + +#: ../../reference/executionmodel.rst:117 +msgid "UnboundLocalError" +msgstr "" + +#: ../../reference/executionmodel.rst:158 +msgid "module" +msgstr "" + +#: ../../reference/executionmodel.rst:158 +msgid "__main__" +msgstr "" + +#: ../../reference/executionmodel.rst:299 +msgid "restricted" +msgstr "" + +#: ../../reference/executionmodel.rst:349 +msgid "exception" +msgstr "" + +#: ../../reference/executionmodel.rst:351 +msgid "raise an exception" +msgstr "" + +#: ../../reference/executionmodel.rst:351 +msgid "handle an exception" +msgstr "" + +#: ../../reference/executionmodel.rst:351 +msgid "exception handler" +msgstr "" + +#: ../../reference/executionmodel.rst:351 +msgid "errors" +msgstr "" + +#: ../../reference/executionmodel.rst:351 +msgid "error handling" +msgstr "" + +#: ../../reference/executionmodel.rst:372 +msgid "termination model" +msgstr "" + +#: ../../reference/executionmodel.rst:379 +msgid "SystemExit (built-in exception)" +msgstr "" diff --git a/reference/index.po b/reference/index.po index 12af3d7c..5565c6e6 100644 --- a/reference/index.po +++ b/reference/index.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2026-08-30 00:02+0000\n" "Last-Translator: Swen Bachmann <142266608+sba72@users.noreply.github.com>\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -27,14 +27,25 @@ msgstr "Die Python-Sprachreferenz" #: ../../reference/index.rst:7 msgid "" -"This reference manual describes the syntax and \"core semantics\" of the " -"language. It is terse, but attempts to be exact and complete. The semantics " -"of non-essential built-in object types and of the built-in functions and " -"modules are described in :ref:`library-index`. For an informal introduction " -"to the language, see :ref:`tutorial-index`. For C or C++ programmers, two " -"additional manuals exist: :ref:`extending-index` describes the high-level " -"picture of how to write a Python extension module, and the :ref:`c-api-" -"index` describes the interfaces available to C/C++ programmers in detail." +"This reference manual describes the syntax and core semantics of the " +"language. It is terse, but attempts to be exact and complete." +msgstr "" + +#: ../../reference/index.rst:10 +msgid "" +"Elsewhere, the built-in object types and functions are described in :ref:" +"`builtins-index`. Standard library modules are described in :ref:`library-" +"index`." +msgstr "" + +#: ../../reference/index.rst:13 +#, fuzzy +msgid "" +"For an informal introduction to the language, see :ref:`tutorial-index`. For " +"C or C++ programmers, two additional manuals exist: :ref:`extending-index` " +"describes the high-level picture of how to write a Python extension module, " +"and the :ref:`c-api-index` describes the interfaces available to C/C++ " +"programmers in detail." msgstr "" "Dieses Referenzhandbuch beschreibt die Syntax und die „Kernsemantik“ der " "Sprache. Es ist knapp gehalten, versucht aber, präzise und vollständig zu " diff --git a/reference/index.po~ b/reference/index.po~ new file mode 100644 index 00000000..12af3d7c --- /dev/null +++ b/reference/index.po~ @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# Swen Bachmann, 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.15\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2026-08-30 00:02+0000\n" +"Last-Translator: Swen Bachmann <142266608+sba72@users.noreply.github.com>\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../reference/index.rst:5 +msgid "The Python Language Reference" +msgstr "Die Python-Sprachreferenz" + +#: ../../reference/index.rst:7 +msgid "" +"This reference manual describes the syntax and \"core semantics\" of the " +"language. It is terse, but attempts to be exact and complete. The semantics " +"of non-essential built-in object types and of the built-in functions and " +"modules are described in :ref:`library-index`. For an informal introduction " +"to the language, see :ref:`tutorial-index`. For C or C++ programmers, two " +"additional manuals exist: :ref:`extending-index` describes the high-level " +"picture of how to write a Python extension module, and the :ref:`c-api-" +"index` describes the interfaces available to C/C++ programmers in detail." +msgstr "" +"Dieses Referenzhandbuch beschreibt die Syntax und die „Kernsemantik“ der " +"Sprache. Es ist knapp gehalten, versucht aber, präzise und vollständig zu " +"sein. Die Semantik nicht-essenzieller eingebauter Objekttypen sowie der " +"eingebauten Funktionen und Module wird in :ref:`library-index` beschrieben. " +"Für eine informelle Einführung in die Sprache siehe :ref:`tutorial-index`. " +"Für C- oder C++-Programmierer existieren zwei zusätzliche Handbücher: :ref:" +"`extending-index` beschreibt im Überblick, wie man ein Python-" +"Erweiterungsmodul schreibt, und :ref:`c-api-index` beschreibt die für C/C++-" +"Programmierer verfügbaren Schnittstellen im Detail." diff --git a/sphinx.po b/sphinx.po index ba125288..6ea49cb8 100644 --- a/sphinx.po +++ b/sphinx.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -278,191 +278,199 @@ msgid "Start here: a tour of Python's syntax and features" msgstr "" #: ../../tools/templates/indexcontent.html:59 -msgid "Library reference" +msgid "Built-ins reference" msgstr "" #: ../../tools/templates/indexcontent.html:60 -msgid "Standard library and builtins" +msgid "Built-in functions and classes" msgstr "" #: ../../tools/templates/indexcontent.html:61 -msgid "Language reference" +msgid "Library reference" msgstr "" #: ../../tools/templates/indexcontent.html:62 -msgid "Syntax and language elements" +msgid "Standard library modules" msgstr "" #: ../../tools/templates/indexcontent.html:63 -msgid "Python setup and usage" +msgid "Language reference" msgstr "" #: ../../tools/templates/indexcontent.html:64 -msgid "How to install, configure, and use Python" +msgid "Syntax and language elements" msgstr "" #: ../../tools/templates/indexcontent.html:65 -msgid "Python HOWTOs" +msgid "Python setup and usage" msgstr "" #: ../../tools/templates/indexcontent.html:66 -msgid "In-depth topic manuals" +msgid "How to install, configure, and use Python" msgstr "" #: ../../tools/templates/indexcontent.html:69 -msgid "Installing Python modules" +msgid "Python HOWTOs" msgstr "" #: ../../tools/templates/indexcontent.html:70 -msgid "Third-party modules and PyPI.org" +msgid "In-depth topic manuals" msgstr "" #: ../../tools/templates/indexcontent.html:71 -msgid "Extending and embedding" +msgid "Installing Python modules" msgstr "" #: ../../tools/templates/indexcontent.html:72 -msgid "For C/C++ programmers" +msgid "Third-party modules and PyPI.org" msgstr "" #: ../../tools/templates/indexcontent.html:73 -msgid "Python's C API" +msgid "Extending and embedding" msgstr "" #: ../../tools/templates/indexcontent.html:74 -msgid "C API reference" +msgid "For C/C++ programmers" msgstr "" #: ../../tools/templates/indexcontent.html:75 -msgid "FAQs" +msgid "Python's C API" msgstr "" #: ../../tools/templates/indexcontent.html:76 -msgid "Frequently asked questions (with answers!)" +msgid "C API reference" msgstr "" #: ../../tools/templates/indexcontent.html:77 -msgid "Deprecations" +msgid "FAQs" msgstr "" #: ../../tools/templates/indexcontent.html:78 +msgid "Frequently asked questions (with answers!)" +msgstr "" + +#: ../../tools/templates/indexcontent.html:79 +msgid "Deprecations" +msgstr "" + +#: ../../tools/templates/indexcontent.html:80 msgid "Deprecated functionality" msgstr "" -#: ../../tools/templates/indexcontent.html:82 +#: ../../tools/templates/indexcontent.html:84 msgid "Other resources:" msgstr "" -#: ../../tools/templates/indexcontent.html:85 +#: ../../tools/templates/indexcontent.html:87 msgid "Python developer's guide" msgstr "" -#: ../../tools/templates/indexcontent.html:86 +#: ../../tools/templates/indexcontent.html:88 msgid "Information on contributing to Python" msgstr "" -#: ../../tools/templates/indexcontent.html:87 +#: ../../tools/templates/indexcontent.html:89 msgid "Python Packaging User Guide" msgstr "" -#: ../../tools/templates/indexcontent.html:88 +#: ../../tools/templates/indexcontent.html:90 msgid "Resources relating to Python packaging" msgstr "" -#: ../../tools/templates/indexcontent.html:89 +#: ../../tools/templates/indexcontent.html:91 msgid "Audio/visual talks" msgstr "" -#: ../../tools/templates/indexcontent.html:90 +#: ../../tools/templates/indexcontent.html:92 msgid "Podcasts, talks, and video presentations from the community" msgstr "" -#: ../../tools/templates/indexcontent.html:93 +#: ../../tools/templates/indexcontent.html:95 msgid "Python Enhancement Proposals" msgstr "" -#: ../../tools/templates/indexcontent.html:94 +#: ../../tools/templates/indexcontent.html:96 msgid "Index of proposed improvements to Python" msgstr "" -#: ../../tools/templates/indexcontent.html:95 +#: ../../tools/templates/indexcontent.html:97 msgid "Static Typing with Python" msgstr "" -#: ../../tools/templates/indexcontent.html:96 +#: ../../tools/templates/indexcontent.html:98 msgid "Information and guides about Python type safety" msgstr "" -#: ../../tools/templates/indexcontent.html:100 +#: ../../tools/templates/indexcontent.html:102 msgid "Indices, glossary, and search:" msgstr "" -#: ../../tools/templates/indexcontent.html:103 +#: ../../tools/templates/indexcontent.html:105 msgid "Global module index" msgstr "" -#: ../../tools/templates/indexcontent.html:104 +#: ../../tools/templates/indexcontent.html:106 msgid "All modules and libraries" msgstr "" -#: ../../tools/templates/indexcontent.html:105 +#: ../../tools/templates/indexcontent.html:107 msgid "General index" msgstr "" -#: ../../tools/templates/indexcontent.html:106 +#: ../../tools/templates/indexcontent.html:108 msgid "All functions, classes, and terms" msgstr "" -#: ../../tools/templates/indexcontent.html:107 +#: ../../tools/templates/indexcontent.html:109 msgid "Glossary" msgstr "" -#: ../../tools/templates/indexcontent.html:108 +#: ../../tools/templates/indexcontent.html:110 msgid "Terms explained" msgstr "" -#: ../../tools/templates/indexcontent.html:111 +#: ../../tools/templates/indexcontent.html:113 msgid "Search page" msgstr "" -#: ../../tools/templates/indexcontent.html:112 +#: ../../tools/templates/indexcontent.html:114 msgid "Search this documentation" msgstr "" -#: ../../tools/templates/indexcontent.html:113 +#: ../../tools/templates/indexcontent.html:115 msgid "Complete table of contents" msgstr "" -#: ../../tools/templates/indexcontent.html:114 +#: ../../tools/templates/indexcontent.html:116 msgid "All sections and subsections" msgstr "" -#: ../../tools/templates/indexcontent.html:118 +#: ../../tools/templates/indexcontent.html:120 msgid "Project information:" msgstr "" -#: ../../tools/templates/indexcontent.html:121 +#: ../../tools/templates/indexcontent.html:123 msgid "Reporting issues" msgstr "" -#: ../../tools/templates/indexcontent.html:122 +#: ../../tools/templates/indexcontent.html:124 msgid "Contributing to docs" msgstr "" -#: ../../tools/templates/indexcontent.html:123 +#: ../../tools/templates/indexcontent.html:125 #: ../../tools/templates/indexsidebar.html:2 msgid "Download the documentation" msgstr "" -#: ../../tools/templates/indexcontent.html:126 +#: ../../tools/templates/indexcontent.html:128 msgid "History and license of Python" msgstr "" -#: ../../tools/templates/indexcontent.html:127 +#: ../../tools/templates/indexcontent.html:129 msgid "Copyright" msgstr "Copyright" -#: ../../tools/templates/indexcontent.html:128 +#: ../../tools/templates/indexcontent.html:130 msgid "About the documentation" msgstr "" diff --git a/sphinx.po~ b/sphinx.po~ new file mode 100644 index 00000000..ba125288 --- /dev/null +++ b/sphinx.po~ @@ -0,0 +1,496 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../tools/templates/_docs_by_version.html:10 +msgid "Stable" +msgstr "" + +#: ../../tools/templates/_docs_by_version.html:11 +msgid "In development" +msgstr "" + +#: ../../tools/templates/customsourcelink.html:17 +msgid "This page" +msgstr "" + +#: ../../tools/templates/customsourcelink.html:19 +msgid "Report a bug" +msgstr "" + +#: ../../tools/templates/customsourcelink.html:20 +msgid "Improve this page" +msgstr "" + +#: ../../tools/templates/customsourcelink.html:23 +msgid "Show source" +msgstr "" + +#: ../../tools/templates/customsourcelink.html:29 +msgid "Show translation source" +msgstr "" + +#: ../../tools/templates/download.html:2 +#: ../../tools/templates/indexsidebar.html:1 +msgid "Download" +msgstr "" + +#: ../../tools/templates/download.html:30 +msgid "Download Python %(dl_version)s documentation" +msgstr "" + +#: ../../tools/templates/download.html:32 +msgid "Last updated on: %(last_updated)s." +msgstr "" + +#: ../../tools/templates/download.html:34 +msgid "" +"Download an archive containing all the documentation for this version of " +"Python:" +msgstr "" + +#: ../../tools/templates/download.html:38 +msgid "Format" +msgstr "" + +#: ../../tools/templates/download.html:39 +msgid "Packed as .zip" +msgstr "" + +#: ../../tools/templates/download.html:40 +msgid "Packed as .tar.bz2" +msgstr "" + +#: ../../tools/templates/download.html:43 +msgid "HTML" +msgstr "" + +#: ../../tools/templates/download.html:44 +msgid "" +"Download" +msgstr "" + +#: ../../tools/templates/download.html:45 +msgid "" +"Download" +msgstr "" + +#: ../../tools/templates/download.html:48 +msgid "Plain text" +msgstr "" + +#: ../../tools/templates/download.html:49 +msgid "" +"Download" +msgstr "" + +#: ../../tools/templates/download.html:50 +msgid "" +"Download" +msgstr "" + +#: ../../tools/templates/download.html:53 +msgid "Texinfo" +msgstr "" + +#: ../../tools/templates/download.html:54 +msgid "" +"Download" +msgstr "" + +#: ../../tools/templates/download.html:55 +msgid "" +"Download" +msgstr "" + +#: ../../tools/templates/download.html:58 +msgid "EPUB" +msgstr "" + +#: ../../tools/templates/download.html:59 +msgid "Download" +msgstr "" + +#: ../../tools/templates/download.html:64 +msgid "" +"\n" +"We no longer provide pre-built PDFs of the documentation.\n" +"To build a PDF archive, follow the instructions in the\n" +"Developer's Guide\n" +"and run make dist-pdf in the Doc/ directory of a " +"copy of the CPython repository.\n" +msgstr "" + +#: ../../tools/templates/download.html:71 +msgid "" +"\n" +"See the directory " +"listing\n" +"for file sizes." +msgstr "" + +#: ../../tools/templates/download.html:75 +msgid "Problems" +msgstr "" + +#: ../../tools/templates/download.html:77 +msgid "" +"Open an issue\n" +"if you have comments or suggestions for the Python documentation." +msgstr "" + +#: ../../tools/templates/dummy.html:6 +msgid "Availability" +msgstr "" + +#: ../../tools/templates/dummy.html:10 +msgid "Part of the" +msgstr "" + +#: ../../tools/templates/dummy.html:11 +msgid "Limited API" +msgstr "" + +#: ../../tools/templates/dummy.html:12 +msgid "Stable ABI" +msgstr "" + +#: ../../tools/templates/dummy.html:13 +msgid "(as an opaque struct)" +msgstr "" + +#: ../../tools/templates/dummy.html:14 +msgid "(including all members)" +msgstr "" + +#: ../../tools/templates/dummy.html:15 +msgid "since version %s" +msgstr "" + +#: ../../tools/templates/dummy.html:16 +msgid "(Only some members are part of the stable ABI.)" +msgstr "" + +#: ../../tools/templates/dummy.html:17 +msgid "This is" +msgstr "" + +#: ../../tools/templates/dummy.html:18 +msgid "Unstable API" +msgstr "" + +#: ../../tools/templates/dummy.html:19 +msgid ". It may change without warning in minor releases." +msgstr "" + +#: ../../tools/templates/dummy.html:20 +msgid "Return value: Always NULL." +msgstr "" + +#: ../../tools/templates/dummy.html:21 +msgid "Return value: New reference." +msgstr "" + +#: ../../tools/templates/dummy.html:22 +msgid "Return value: Borrowed reference." +msgstr "" + +#: ../../tools/templates/dummy.html:26 +msgid "CPython implementation detail:" +msgstr "" + +#: ../../tools/templates/dummy.html:30 +msgid "Deprecated since version %s, will be removed in version %s" +msgstr "" + +#: ../../tools/templates/dummy.html:31 +msgid "Deprecated since version %s, removed in version %s" +msgstr "" + +#: ../../tools/templates/dummy.html:32 +msgid ":term:`Soft deprecated` since version %s" +msgstr "" + +#: ../../tools/templates/dummy.html:36 +msgid "in development" +msgstr "" + +#: ../../tools/templates/dummy.html:37 +msgid "pre-release" +msgstr "" + +#: ../../tools/templates/dummy.html:38 +msgid "stable" +msgstr "" + +#: ../../tools/templates/dummy.html:39 +msgid "security-fixes" +msgstr "" + +#: ../../tools/templates/dummy.html:40 +msgid "EOL" +msgstr "" + +#: ../../tools/templates/indexcontent.html:50 +msgid "Welcome! This is the official documentation for Python %(release)s." +msgstr "" + +#: ../../tools/templates/indexcontent.html:52 +msgid "Documentation sections:" +msgstr "" + +#: ../../tools/templates/indexcontent.html:55 +msgid "What's new in Python %(version)s?" +msgstr "" + +#: ../../tools/templates/indexcontent.html:56 +msgid "" +"Or all \"What's new\" documents since Python " +"2.0" +msgstr "" + +#: ../../tools/templates/indexcontent.html:57 +msgid "Tutorial" +msgstr "" + +#: ../../tools/templates/indexcontent.html:58 +msgid "Start here: a tour of Python's syntax and features" +msgstr "" + +#: ../../tools/templates/indexcontent.html:59 +msgid "Library reference" +msgstr "" + +#: ../../tools/templates/indexcontent.html:60 +msgid "Standard library and builtins" +msgstr "" + +#: ../../tools/templates/indexcontent.html:61 +msgid "Language reference" +msgstr "" + +#: ../../tools/templates/indexcontent.html:62 +msgid "Syntax and language elements" +msgstr "" + +#: ../../tools/templates/indexcontent.html:63 +msgid "Python setup and usage" +msgstr "" + +#: ../../tools/templates/indexcontent.html:64 +msgid "How to install, configure, and use Python" +msgstr "" + +#: ../../tools/templates/indexcontent.html:65 +msgid "Python HOWTOs" +msgstr "" + +#: ../../tools/templates/indexcontent.html:66 +msgid "In-depth topic manuals" +msgstr "" + +#: ../../tools/templates/indexcontent.html:69 +msgid "Installing Python modules" +msgstr "" + +#: ../../tools/templates/indexcontent.html:70 +msgid "Third-party modules and PyPI.org" +msgstr "" + +#: ../../tools/templates/indexcontent.html:71 +msgid "Extending and embedding" +msgstr "" + +#: ../../tools/templates/indexcontent.html:72 +msgid "For C/C++ programmers" +msgstr "" + +#: ../../tools/templates/indexcontent.html:73 +msgid "Python's C API" +msgstr "" + +#: ../../tools/templates/indexcontent.html:74 +msgid "C API reference" +msgstr "" + +#: ../../tools/templates/indexcontent.html:75 +msgid "FAQs" +msgstr "" + +#: ../../tools/templates/indexcontent.html:76 +msgid "Frequently asked questions (with answers!)" +msgstr "" + +#: ../../tools/templates/indexcontent.html:77 +msgid "Deprecations" +msgstr "" + +#: ../../tools/templates/indexcontent.html:78 +msgid "Deprecated functionality" +msgstr "" + +#: ../../tools/templates/indexcontent.html:82 +msgid "Other resources:" +msgstr "" + +#: ../../tools/templates/indexcontent.html:85 +msgid "Python developer's guide" +msgstr "" + +#: ../../tools/templates/indexcontent.html:86 +msgid "Information on contributing to Python" +msgstr "" + +#: ../../tools/templates/indexcontent.html:87 +msgid "Python Packaging User Guide" +msgstr "" + +#: ../../tools/templates/indexcontent.html:88 +msgid "Resources relating to Python packaging" +msgstr "" + +#: ../../tools/templates/indexcontent.html:89 +msgid "Audio/visual talks" +msgstr "" + +#: ../../tools/templates/indexcontent.html:90 +msgid "Podcasts, talks, and video presentations from the community" +msgstr "" + +#: ../../tools/templates/indexcontent.html:93 +msgid "Python Enhancement Proposals" +msgstr "" + +#: ../../tools/templates/indexcontent.html:94 +msgid "Index of proposed improvements to Python" +msgstr "" + +#: ../../tools/templates/indexcontent.html:95 +msgid "Static Typing with Python" +msgstr "" + +#: ../../tools/templates/indexcontent.html:96 +msgid "Information and guides about Python type safety" +msgstr "" + +#: ../../tools/templates/indexcontent.html:100 +msgid "Indices, glossary, and search:" +msgstr "" + +#: ../../tools/templates/indexcontent.html:103 +msgid "Global module index" +msgstr "" + +#: ../../tools/templates/indexcontent.html:104 +msgid "All modules and libraries" +msgstr "" + +#: ../../tools/templates/indexcontent.html:105 +msgid "General index" +msgstr "" + +#: ../../tools/templates/indexcontent.html:106 +msgid "All functions, classes, and terms" +msgstr "" + +#: ../../tools/templates/indexcontent.html:107 +msgid "Glossary" +msgstr "" + +#: ../../tools/templates/indexcontent.html:108 +msgid "Terms explained" +msgstr "" + +#: ../../tools/templates/indexcontent.html:111 +msgid "Search page" +msgstr "" + +#: ../../tools/templates/indexcontent.html:112 +msgid "Search this documentation" +msgstr "" + +#: ../../tools/templates/indexcontent.html:113 +msgid "Complete table of contents" +msgstr "" + +#: ../../tools/templates/indexcontent.html:114 +msgid "All sections and subsections" +msgstr "" + +#: ../../tools/templates/indexcontent.html:118 +msgid "Project information:" +msgstr "" + +#: ../../tools/templates/indexcontent.html:121 +msgid "Reporting issues" +msgstr "" + +#: ../../tools/templates/indexcontent.html:122 +msgid "Contributing to docs" +msgstr "" + +#: ../../tools/templates/indexcontent.html:123 +#: ../../tools/templates/indexsidebar.html:2 +msgid "Download the documentation" +msgstr "" + +#: ../../tools/templates/indexcontent.html:126 +msgid "History and license of Python" +msgstr "" + +#: ../../tools/templates/indexcontent.html:127 +msgid "Copyright" +msgstr "Copyright" + +#: ../../tools/templates/indexcontent.html:128 +msgid "About the documentation" +msgstr "" + +#: ../../tools/templates/indexsidebar.html:3 +msgid "Docs by version" +msgstr "" + +#: ../../tools/templates/indexsidebar.html:7 +msgid "All versions" +msgstr "" + +#: ../../tools/templates/layout.html:6 +msgid "" +"This document is for an old version of Python that is no longer supported.\n" +" You should upgrade, and read the" +msgstr "" + +#: ../../tools/templates/layout.html:8 +msgid "Python documentation for the current stable release" +msgstr "" + +#: ../../tools/templates/layout.html:14 +msgid "" +"This is a deploy preview created from a pull request.\n" +" For authoritative documentation, see" +msgstr "" + +#: ../../tools/templates/layout.html:16 +msgid "the current stable release" +msgstr "" diff --git a/tutorial/controlflow.po b/tutorial/controlflow.po index 95b4a1a7..7bc155e5 100644 --- a/tutorial/controlflow.po +++ b/tutorial/controlflow.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2026-07-31 21:01+0000\n" "Last-Translator: Swen Bachmann <142266608+sba72@users.noreply.github.com>\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -312,12 +312,13 @@ msgstr "" "spart so Speicherplatz." #: ../../tutorial/controlflow.rst:148 +#, fuzzy msgid "" "We say such an object is :term:`iterable`, that is, suitable as a target for " "functions and constructs that expect something from which they can obtain " -"successive items until the supply is exhausted. We have seen that the :" -"keyword:`for` statement is such a construct, while an example of a function " -"that takes an iterable is :func:`sum`::" +"successive items until the supply is :term:`exhausted`. We have seen that " +"the :keyword:`for` statement is such a construct, while an example of a " +"function that takes an iterable is :func:`sum`::" msgstr "" "Wir nennen ein solches Objekt :term:`iterable ` (iterierbar), das " "heißt, es eignet sich als Ziel für Funktionen und Konstrukte, die etwas " diff --git a/tutorial/controlflow.po~ b/tutorial/controlflow.po~ new file mode 100644 index 00000000..95b4a1a7 --- /dev/null +++ b/tutorial/controlflow.po~ @@ -0,0 +1,2639 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR Swen Bachmann <142266608+sba72@users.noreply.github.com>, 2026. +# +# Translators: +# python-doc bot, 2025 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2026-07-31 21:01+0000\n" +"Last-Translator: Swen Bachmann <142266608+sba72@users.noreply.github.com>\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../tutorial/controlflow.rst:5 +msgid "More Control Flow Tools" +msgstr "Mehr Werkzeuge zur Ablaufsteuerung" + +#: ../../tutorial/controlflow.rst:7 +msgid "" +"As well as the :keyword:`while` statement just introduced, Python uses a few " +"more that we will encounter in this chapter." +msgstr "" +"Neben der eben vorgestellten :keyword:`while`-Anweisung verwendet Python " +"noch ein paar weitere, die uns in diesem Kapitel begegnen werden." + +#: ../../tutorial/controlflow.rst:14 +msgid ":keyword:`!if` Statements" +msgstr ":keyword:`!if`-Anweisungen" + +#: ../../tutorial/controlflow.rst:16 +msgid "" +"Perhaps the most well-known statement type is the :keyword:`if` statement. " +"For example::" +msgstr "" +"Die wohl bekannteste Anweisungsart ist die :keyword:`if`-Anweisung. Zum " +"Beispiel::" + +#: ../../tutorial/controlflow.rst:19 +msgid "" +">>> x = int(input(\"Please enter an integer: \"))\n" +"Please enter an integer: 42\n" +">>> if x < 0:\n" +"... x = 0\n" +"... print('Negative changed to zero')\n" +"... elif x == 0:\n" +"... print('Zero')\n" +"... elif x == 1:\n" +"... print('Single')\n" +"... else:\n" +"... print('More')\n" +"...\n" +"More" +msgstr "" +"x = int(input(\"Bitte gib eine ganzzahlige Zahl ein: \"))\n" +"Bitte gib eine ganzzahlige Zahl ein: 42\n" +"if x < 0:\n" +"... x = 0\n" +"... print('Negativ in Null geändert')\n" +"... elif x == 0:\n" +"... print('Null')\n" +"... elif x == 1:\n" +"... print('Eins')\n" +"... else:\n" +"... print('Mehr')\n" +"...\n" +"Mehr" + +#: ../../tutorial/controlflow.rst:33 +msgid "" +"There can be zero or more :keyword:`elif` parts, and the :keyword:`else` " +"part is optional. The keyword ':keyword:`!elif`' is short for 'else if', " +"and is useful to avoid excessive indentation. An :keyword:`!if` ... :" +"keyword:`!elif` ... :keyword:`!elif` ... sequence is a substitute for the " +"``switch`` or ``case`` statements found in other languages." +msgstr "" +"Es kann kein oder mehrere :keyword:`elif`-Teile geben, und der :keyword:" +"`else`-Teil ist optional. Das Schlüsselwort ':keyword:`!elif`' ist die " +"Abkürzung für 'else if' und ist nützlich, um übermäßige Einrückungen zu " +"vermeiden. Eine :keyword:`!if` ... :keyword:`!elif` ... :keyword:`!elif` ...-" +"Sequenz ersetzt die `switch`- oder `case`-Anweisungen, die man aus anderen " +"Sprachen kennt." + +#: ../../tutorial/controlflow.rst:39 +msgid "" +"If you're comparing the same value to several constants, or checking for " +"specific types or attributes, you may also find the :keyword:`!match` " +"statement useful. For more details see :ref:`tut-match`." +msgstr "" +"Wenn du denselben Wert mit mehreren Konstanten vergleichst oder auf " +"bestimmte Typen oder Attribute prüfst, findest du möglicherweise auch die :" +"keyword:`!match`-Anweisung nützlich. Für weitere Details siehe :ref:`tut-" +"match`." + +#: ../../tutorial/controlflow.rst:46 +msgid ":keyword:`!for` Statements" +msgstr ":keyword:`!for`-Anweisungen" + +#: ../../tutorial/controlflow.rst:51 +msgid "" +"The :keyword:`for` statement in Python differs a bit from what you may be " +"used to in C or Pascal. Rather than always iterating over an arithmetic " +"progression of numbers (like in Pascal), or giving the user the ability to " +"define both the iteration step and halting condition (as C), Python's :" +"keyword:`!for` statement iterates over the items of any sequence (a list or " +"a string), in the order that they appear in the sequence. For example (no " +"pun intended):" +msgstr "" +"Die :keyword:`for`-Anweisung in Python unterscheidet sich ein wenig von dem, " +"was du vielleicht aus C oder Pascal gewohnt bist. Anstatt immer über eine " +"arithmetische Zahlenfolge zu iterieren (wie in Pascal) oder der nutzenden " +"Person die Möglichkeit zu geben, sowohl den Iterationsschritt als auch die " +"Abbruchbedingung zu definieren (wie in C), iteriert Pythons :keyword:`!for`-" +"Anweisung über die Elemente einer beliebigen Sequenz (eine Liste oder eine " +"Zeichenkette) in der Reihenfolge, in der sie in der Sequenz erscheinen. Zum " +"Beispiel (ohne Wortspiel):" + +#: ../../tutorial/controlflow.rst:63 +msgid "" +">>> # Measure some strings:\n" +">>> words = ['cat', 'window', 'defenestrate']\n" +">>> for w in words:\n" +"... print(w, len(w))\n" +"...\n" +"cat 3\n" +"window 6\n" +"defenestrate 12" +msgstr "" +">>> # Einige Zeichenketten messen:\n" +">>> words = ['cat', 'window', 'defenestrate']\n" +">>> for w in words:\n" +"... print(w, len(w))\n" +"...\n" +"cat 3\n" +"window 6\n" +"defenestrate 12" + +#: ../../tutorial/controlflow.rst:72 +msgid "" +"Code that modifies a collection while iterating over that same collection " +"can be tricky to get right. Instead, it is usually more straight-forward to " +"loop over a copy of the collection or to create a new collection::" +msgstr "" +"Code, der eine Sammlung verändert, während über dieselbe Sammlung iteriert " +"wird, kann knifflig sein. Stattdessen ist es gewöhnlich einfacher, über eine " +"Kopie der Sammlung zu iterieren oder eine neue Sammlung zu erstellen::" + +#: ../../tutorial/controlflow.rst:76 +msgid "" +"# Create a sample collection\n" +"users = {'Hans': 'active', 'Éléonore': 'inactive', '景太郎': 'active'}\n" +"\n" +"# Strategy: Iterate over a copy\n" +"for user, status in users.copy().items():\n" +" if status == 'inactive':\n" +" del users[user]\n" +"\n" +"# Strategy: Create a new collection\n" +"active_users = {}\n" +"for user, status in users.items():\n" +" if status == 'active':\n" +" active_users[user] = status" +msgstr "" +"# Eine Beispiel-Sammlung erstellen\n" +"users = {'Hans': 'active', 'Éléonore': 'inactive', '景太郎': 'active'}\n" +"\n" +"# Strategie: Über eine Kopie iterieren\n" +"for user, status in users.copy().items():\n" +" if status == 'inactive':\n" +" del users[user]\n" +"\n" +"# Strategie: Eine neue Sammlung erstellen\n" +"active_users = {}\n" +"for user, status in users.items():\n" +" if status == 'active':\n" +" active_users[user] = status" + +#: ../../tutorial/controlflow.rst:94 +msgid "The :func:`range` Function" +msgstr "Die Funktion :func:`range`" + +#: ../../tutorial/controlflow.rst:96 +msgid "" +"If you do need to iterate over a sequence of numbers, the built-in function :" +"func:`range` comes in handy. It generates arithmetic progressions::" +msgstr "" +"Wenn du über eine Zahlenfolge iterieren musst, ist die eingebaute Funktion :" +"func:`range` praktisches Hilfsmittel. Sie erzeugt arithmetische Folgen::" + +#: ../../tutorial/controlflow.rst:99 +msgid "" +">>> for i in range(5):\n" +"... print(i)\n" +"...\n" +"0\n" +"1\n" +"2\n" +"3\n" +"4" +msgstr "" +">>> for i in range(5):\n" +"... print(i)\n" +"...\n" +"0\n" +"1\n" +"2\n" +"3\n" +"4" + +#: ../../tutorial/controlflow.rst:108 +msgid "" +"The given end point is never part of the generated sequence; ``range(10)`` " +"generates 10 values, the legal indices for items of a sequence of length " +"10. It is possible to let the range start at another number, or to specify " +"a different increment (even negative; sometimes this is called the 'step')::" +msgstr "" +"Der angegebene Endpunkt ist nie Teil der erzeugten Sequenz; ``range(10)`` " +"erzeugt 10 Werte, welche genau den gültigen Indizes für die Elemente einer " +"Sequenz der Länge 10 entsprechen. Es ist möglich, die Spanne bei einer " +"anderen Zahl beginnen zu lassen oder einen anderen Schrittabstand anzugeben " +"(sogar negativ; manchmal wird dies als ‚Schrittweite‘ bezeichnet)::" + +#: ../../tutorial/controlflow.rst:113 +msgid "" +">>> list(range(5, 10))\n" +"[5, 6, 7, 8, 9]\n" +"\n" +">>> list(range(0, 10, 3))\n" +"[0, 3, 6, 9]\n" +"\n" +">>> list(range(-10, -100, -30))\n" +"[-10, -40, -70]" +msgstr "" +">>> list(range(5, 10))\n" +"[5, 6, 7, 8, 9]\n" +"\n" +">>> list(range(0, 10, 3))\n" +"[0, 3, 6, 9]\n" +"\n" +">>> list(range(-10, -100, -30))\n" +"[-10, -40, -70]" + +#: ../../tutorial/controlflow.rst:122 +msgid "" +"To iterate over the indices of a sequence, you can combine :func:`range` " +"and :func:`len` as follows::" +msgstr "" +"Um über die Indizes einer Sequenz zu iterieren, kannst du :func:`range` und :" +"func:`len` wie folgt kombinieren::" + +#: ../../tutorial/controlflow.rst:125 +msgid "" +">>> a = ['Mary', 'had', 'a', 'little', 'lamb']\n" +">>> for i in range(len(a)):\n" +"... print(i, a[i])\n" +"...\n" +"0 Mary\n" +"1 had\n" +"2 a\n" +"3 little\n" +"4 lamb" +msgstr "" +">>> a = ['Mary', 'had', 'a', 'little', 'lamb']\n" +">>> for i in range(len(a)):\n" +"... print(i, a[i])\n" +"...\n" +"0 Mary\n" +"1 had\n" +"2 a\n" +"3 little\n" +"4 lamb" + +#: ../../tutorial/controlflow.rst:135 +msgid "" +"In most such cases, however, it is convenient to use the :func:`enumerate` " +"function, see :ref:`tut-loopidioms`." +msgstr "" +"In den meisten dieser Fälle ist es jedoch praktischer, die Funktion :func:" +"`enumerate` zu verwenden, siehe :ref:`tut-loopidioms`." + +#: ../../tutorial/controlflow.rst:138 +msgid "A strange thing happens if you just print a range::" +msgstr "Etwas Merkwürdiges passiert, wenn du ein range einfach ausgibst::" + +#: ../../tutorial/controlflow.rst:140 +msgid "" +">>> range(10)\n" +"range(0, 10)" +msgstr "" +">>> range(10)\n" +"range(0, 10)" + +#: ../../tutorial/controlflow.rst:143 +msgid "" +"In many ways the object returned by :func:`range` behaves as if it is a " +"list, but in fact it isn't. It is an object which returns the successive " +"items of the desired sequence when you iterate over it, but it doesn't " +"really make the list, thus saving space." +msgstr "" +"In vielerlei Hinsicht verhält sich das von :func:`range` zurückgegebene " +"Objekt wie eine Liste, aber das ist es in Wahrheit nicht. Es ist ein Objekt, " +"das die aufeinanderfolgenden Elemente der gewünschten Sequenz zurückgibt, " +"wenn man darüber iteriert, aber es erstellt die Liste nicht wirklich und " +"spart so Speicherplatz." + +#: ../../tutorial/controlflow.rst:148 +msgid "" +"We say such an object is :term:`iterable`, that is, suitable as a target for " +"functions and constructs that expect something from which they can obtain " +"successive items until the supply is exhausted. We have seen that the :" +"keyword:`for` statement is such a construct, while an example of a function " +"that takes an iterable is :func:`sum`::" +msgstr "" +"Wir nennen ein solches Objekt :term:`iterable ` (iterierbar), das " +"heißt, es eignet sich als Ziel für Funktionen und Konstrukte, die etwas " +"erwarten, woraus sie aufeinanderfolgende Elemente beziehen können, bis der " +"Vorrat erschöpft ist. Wir haben gesehen, dass die :keyword:`for`-Anweisung " +"ein solches Konstrukt ist, während ein Beispiel für eine Funktion, die ein " +"Iterable entgegennimmt, :func:`sum` ist::" + +#: ../../tutorial/controlflow.rst:154 +msgid "" +">>> sum(range(4)) # 0 + 1 + 2 + 3\n" +"6" +msgstr "" +">>> sum(range(4)) # 0 + 1 + 2 + 3\n" +"6" + +#: ../../tutorial/controlflow.rst:157 +msgid "" +"Later we will see more functions that return iterables and take iterables as " +"arguments. In chapter :ref:`tut-structures`, we will discuss :func:`list` " +"in more detail." +msgstr "" +"Später werden wir weitere Funktionen sehen, die Iterables zurückgeben und " +"Iterables als Argumente entgegennehmen. Im Kapitel :ref:`tut-structures` " +"werden wir genauer über :func:`list` sprechen." + +#: ../../tutorial/controlflow.rst:164 +msgid ":keyword:`!break` and :keyword:`!continue` Statements" +msgstr ":keyword:`!break`- und :keyword:`!continue`-Anweisungen" + +#: ../../tutorial/controlflow.rst:166 +msgid "" +"The :keyword:`break` statement breaks out of the innermost enclosing :" +"keyword:`for` or :keyword:`while` loop::" +msgstr "" +"Die :keyword:`break`-Anweisung bricht aus der innersten umschließenden :" +"keyword:`for`- oder :keyword:`while`-Schleife aus::" + +#: ../../tutorial/controlflow.rst:169 +msgid "" +">>> for n in range(2, 10):\n" +"... for x in range(2, n):\n" +"... if n % x == 0:\n" +"... print(f\"{n} equals {x} * {n//x}\")\n" +"... break\n" +"...\n" +"4 equals 2 * 2\n" +"6 equals 2 * 3\n" +"8 equals 2 * 4\n" +"9 equals 3 * 3" +msgstr "" +">>> for n in range(2, 10):\n" +"... for x in range(2, n):\n" +"... if n % x == 0:\n" +"... print(f\"{n} equals {x} * {n//x}\")\n" +"... break\n" +"...\n" +"4 equals 2 * 2\n" +"6 equals 2 * 3\n" +"8 equals 2 * 4\n" +"9 equals 3 * 3" + +#: ../../tutorial/controlflow.rst:180 +msgid "" +"The :keyword:`continue` statement continues with the next iteration of the " +"loop::" +msgstr "" +"Die :keyword:`continue`-Anweisung setzt die Ausführung mit der nächsten " +"Iteration der Schleife fort::" + +#: ../../tutorial/controlflow.rst:183 +msgid "" +">>> for num in range(2, 10):\n" +"... if num % 2 == 0:\n" +"... print(f\"Found an even number {num}\")\n" +"... continue\n" +"... print(f\"Found an odd number {num}\")\n" +"...\n" +"Found an even number 2\n" +"Found an odd number 3\n" +"Found an even number 4\n" +"Found an odd number 5\n" +"Found an even number 6\n" +"Found an odd number 7\n" +"Found an even number 8\n" +"Found an odd number 9" +msgstr "" +"... print(f\"Found an odd number {num}\")\n" +"...\n" +"Found an even number 2\n" +"Found an odd number 3\n" +"Found an even number 4\n" +"Found an odd number 5\n" +"Found an even number 6\n" +"Found an odd number 7\n" +"Found an even number 8\n" +"Found an odd number 9" + +#: ../../tutorial/controlflow.rst:202 +msgid ":keyword:`!else` Clauses on Loops" +msgstr ":keyword:`!else`-Klauseln bei Schleifen" + +#: ../../tutorial/controlflow.rst:204 +msgid "" +"In a :keyword:`!for` or :keyword:`!while` loop the :keyword:`!break` " +"statement may be paired with an :keyword:`!else` clause. If the loop " +"finishes without executing the :keyword:`!break`, the :keyword:`!else` " +"clause executes." +msgstr "" +"In einer :keyword:`!for`- oder :keyword:`!while`-Schleife kann die :keyword:" +"`!break`-Anweisung mit einer :keyword:`!else`-Klausel kombiniert werden. " +"Wenn die Schleife beendet wird, ohne dass :keyword:`!break` ausgeführt " +"wurde, wird die :keyword:`!else`-Klausel ausgeführt." + +#: ../../tutorial/controlflow.rst:208 +msgid "" +"In a :keyword:`for` loop, the :keyword:`!else` clause is executed after the " +"loop finishes its final iteration, that is, if no break occurred." +msgstr "" +"In einer :keyword:`for`-Schleife wird die :keyword:`!else`-Klausel " +"ausgeführt, nachdem die Schleife ihre letzte Iteration beendet hat, also " +"wenn kein break aufgetreten ist." + +#: ../../tutorial/controlflow.rst:211 +msgid "" +"In a :keyword:`while` loop, it's executed after the loop's condition becomes " +"false." +msgstr "" +"In einer :keyword:`while`-Schleife wird sie ausgeführt, nachdem die " +"Bedingung der Schleife falsch wird." + +#: ../../tutorial/controlflow.rst:213 +msgid "" +"In either kind of loop, the :keyword:`!else` clause is **not** executed if " +"the loop was terminated by a :keyword:`break`. Of course, other ways of " +"ending the loop early, such as a :keyword:`return` or a raised exception, " +"will also skip execution of the :keyword:`else` clause." +msgstr "" +"In beiden Schleifenarten wird die :keyword:`!else`-Klausel **nicht** " +"ausgeführt, wenn die Schleife durch ein :keyword:`break` abgebrochen wurde. " +"Andere Arten, die Schleife vorzeitig zu beenden, wie etwa ein :keyword:" +"`return` oder eine ausgelöste Ausnahme (Exception), überspringen die " +"Ausführung der :keyword:`else`-Klausel natürlich ebenfalls." + +#: ../../tutorial/controlflow.rst:218 +msgid "" +"This is exemplified in the following :keyword:`!for` loop, which searches " +"for prime numbers::" +msgstr "" +"Dies wird in der folgenden :keyword:`!for`-Schleife veranschaulicht, die " +"nach Primzahlen sucht::" + +#: ../../tutorial/controlflow.rst:221 +msgid "" +">>> for n in range(2, 10):\n" +"... for x in range(2, n):\n" +"... if n % x == 0:\n" +"... print(n, 'equals', x, '*', n//x)\n" +"... break\n" +"... else:\n" +"... # loop fell through without finding a factor\n" +"... print(n, 'is a prime number')\n" +"...\n" +"2 is a prime number\n" +"3 is a prime number\n" +"4 equals 2 * 2\n" +"5 is a prime number\n" +"6 equals 2 * 3\n" +"7 is a prime number\n" +"8 equals 2 * 4\n" +"9 equals 3 * 3" +msgstr "" +"... print(n, 'is a prime number')\n" +"...\n" +"2 is a prime number\n" +"3 is a prime number\n" +"4 equals 2 * 2\n" +"5 is a prime number\n" +"6 equals 2 * 3\n" +"7 is a prime number\n" +"8 equals 2 * 4\n" +"9 equals 3 * 3" + +#: ../../tutorial/controlflow.rst:239 +msgid "" +"(Yes, this is the correct code. Look closely: the ``else`` clause belongs " +"to the ``for`` loop, **not** the ``if`` statement.)" +msgstr "" +"(Ja, das ist der korrekte Code. Sieh genau hin: Die ``else``-Klausel gehört " +"zur ``for``-Schleife, **nicht** zur ``if``-Anweisung.)" + +#: ../../tutorial/controlflow.rst:242 +msgid "" +"One way to think of the else clause is to imagine it paired with the ``if`` " +"inside the loop. As the loop executes, it will run a sequence like if/if/if/" +"else. The ``if`` is inside the loop, encountered a number of times. If the " +"condition is ever true, a ``break`` will happen. If the condition is never " +"true, the ``else`` clause outside the loop will execute." +msgstr "" +"Eine Möglichkeit, sich die else-Klausel vorzustellen, besteht darin, sie " +"gedanklich mit dem ``if`` innerhalb der Schleife zu koppeln. Wenn die " +"Schleife ausgeführt wird, durchläuft sie eine Sequenz wie if/if/if/else. Das " +"``if`` befindet sich innerhalb der Schleife und wird mehrmals angetroffen. " +"Wenn die Bedingung irgendwann wahr ist, erfolgt ein ``break``. Wenn die " +"Bedingung nie wahr ist, wird die ``else``-Klausel außerhalb der Schleife " +"ausgeführt." + +#: ../../tutorial/controlflow.rst:248 +msgid "" +"When used with a loop, the ``else`` clause has more in common with the " +"``else`` clause of a :keyword:`try` statement than it does with that of " +"``if`` statements: a ``try`` statement's ``else`` clause runs when no " +"exception occurs, and a loop's ``else`` clause runs when no ``break`` " +"occurs. For more on the ``try`` statement and exceptions, see :ref:`tut-" +"handling`." +msgstr "" +"Wenn sie mit einer Schleife verwendet wird, hat die ``else``-Klausel mehr " +"mit der ``else``-Klausel einer :keyword:`try`-Anweisung gemeinsam als mit " +"der von ``if``-Anweisungen: Die ``else``-Klausel einer ``try``-Anweisung " +"wird ausgeführt, wenn keine Ausnahme auftritt, und die ``else``-Klausel " +"einer Schleife wird ausgeführt, wenn kein ``break`` auftritt. Für weitere " +"Informationen zur ``try``-Anweisung und zu Ausnahmen siehe :ref:`tut-" +"handling`." + +#: ../../tutorial/controlflow.rst:258 +msgid ":keyword:`!pass` Statements" +msgstr ":keyword:`!pass`-Anweisungen" + +#: ../../tutorial/controlflow.rst:260 +msgid "" +"The :keyword:`pass` statement does nothing. It can be used when a statement " +"is required syntactically but the program requires no action. For example::" +msgstr "" +"Die :keyword:`pass`-Anweisung tut nichts. Sie kann verwendet werden, wenn " +"eine Anweisung syntaktisch erforderlich ist, das Programm aber keine Aktion " +"erfordert. Zum Beispiel::" + +#: ../../tutorial/controlflow.rst:263 +msgid "" +">>> while True:\n" +"... pass # Busy-wait for keyboard interrupt (Ctrl+C)\n" +"..." +msgstr "" +">>> while True:\n" +"... pass # Warten auf Tastaturunterbrechung (Strg+C)\n" +"..." + +#: ../../tutorial/controlflow.rst:267 +msgid "This is commonly used for creating minimal classes::" +msgstr "Dies wird häufig verwendet, um minimale Klassen zu erstellen::" + +#: ../../tutorial/controlflow.rst:269 +msgid "" +">>> class MyEmptyClass:\n" +"... pass\n" +"..." +msgstr "" +">>> class MyEmptyClass:\n" +"... pass\n" +"..." + +#: ../../tutorial/controlflow.rst:273 +msgid "" +"Another place :keyword:`pass` can be used is as a place-holder for a " +"function or conditional body when you are working on new code, allowing you " +"to keep thinking at a more abstract level. The :keyword:`!pass` is silently " +"ignored::" +msgstr "" +"Ein weiterer Ort, an dem :keyword:`pass` verwendet werden kann, ist als " +"Platzhalter für einen Funktionsrumpf oder einen bedingten Zweig, wenn du an " +"neuem Code arbeiten. So kannst du weiterhin auf einer abstrakteren Ebene " +"denken. Das :keyword:`!pass` wird stillschweigend ignoriert::" + +#: ../../tutorial/controlflow.rst:277 +msgid "" +">>> def initlog(*args):\n" +"... pass # Remember to implement this!\n" +"..." +msgstr "" +">>> def initlog(*args):\n" +"... pass # Denke daran, dies zu implementieren!\n" +"..." + +#: ../../tutorial/controlflow.rst:281 +msgid "" +"For this last case, many people use the ellipsis literal :code:`...` instead " +"of :code:`pass`. This use has no special meaning to Python, and is not part " +"of the language definition (you could use any constant expression here), " +"but :code:`...` is used conventionally as a placeholder body as well. See :" +"ref:`bltin-ellipsis-object`." +msgstr "" +"Für diesen letzten Fall verwenden viele Leute das Ellipsis-Literal :code:`..." +"` anstelle von :code:`pass`. Diese Verwendung hat für Python keine besondere " +"Bedeutung und ist kein Teil der Sprachdefinition (Du könntes hier jeden " +"konstanten Ausdruck verwenden), aber :code:`...` wird konventionell " +"ebenfalls als Platzhalter für einen Rumpf verwendet. Siehe :ref:`bltin-" +"ellipsis-object`." + +#: ../../tutorial/controlflow.rst:291 +msgid ":keyword:`!match` Statements" +msgstr ":keyword:`!match`-Anweisungen" + +#: ../../tutorial/controlflow.rst:293 +msgid "" +"A :keyword:`match` statement takes an expression and compares its value to " +"successive patterns given as one or more case blocks. This is superficially " +"similar to a switch statement in C, Java or JavaScript (and many other " +"languages), but it's more similar to pattern matching in languages like Rust " +"or Haskell. Only the first pattern that matches gets executed and it can " +"also extract components (sequence elements or object attributes) from the " +"value into variables. If no case matches, none of the branches is executed." +msgstr "" +"Eine :keyword:`match`-Anweisung nimmt einen Ausdruck entgegen und vergleicht " +"dessen Wert mit aufeinanderfolgenden Mustern, die als ein oder mehrere case-" +"Blöcke angegeben sind. Dies ähnelt oberflächlich einer switch-Anweisung in " +"C, Java oder JavaScript (und vielen anderen Sprachen), entspricht aber eher " +"dem Pattern Matching in Sprachen wie Rust oder Haskell. Nur das erste " +"Muster, das passt, wird ausgeführt, und es kann auch Komponenten " +"(Sequenzelemente oder Objektattribute) aus dem Wert in Variablen " +"extrahieren. Wenn kein case passt, wird keiner der Zweige ausgeführt." + +#: ../../tutorial/controlflow.rst:302 +msgid "" +"The simplest form compares a subject value against one or more literals::" +msgstr "" +"Die einfachste Form vergleicht einen Subjektwert mit einem oder mehreren " +"Literalen::" + +#: ../../tutorial/controlflow.rst:304 +msgid "" +"def http_error(status):\n" +" match status:\n" +" case 400:\n" +" return \"Bad request\"\n" +" case 404:\n" +" return \"Not found\"\n" +" case 418:\n" +" return \"I'm a teapot\"\n" +" case _:\n" +" return \"Something's wrong with the internet\"" +msgstr "" +"def http_error(status):\n" +" match status:\n" +" case 400:\n" +" return \"Bad request\"\n" +" case 404:\n" +" return \"Not found\"\n" +" case 418:\n" +" return \"I'm a teapot\"\n" +" case _:\n" +" return \"Something's wrong with the internet\"" + +#: ../../tutorial/controlflow.rst:315 +msgid "" +"Note the last block: the \"variable name\" ``_`` acts as a *wildcard* and " +"never fails to match." +msgstr "" +"Beachte den letzten Block: Der \\\"Variablenname\\\" ``_`` fungiert als " +"*Platzhalter* (Wildcard) und passt immer." + +#: ../../tutorial/controlflow.rst:318 +msgid "" +"You can combine several literals in a single pattern using ``|`` (\"or\")::" +msgstr "" +"Sie können mehrere Literale in einem einzigen Muster mithilfe von ``|`` (\\" +"\"oder\\\") kombinieren::" + +#: ../../tutorial/controlflow.rst:320 +msgid "" +"case 401 | 403 | 404:\n" +" return \"Not allowed\"" +msgstr "" +"case 401 | 403 | 404:\n" +" return \"Not allowed\"" + +#: ../../tutorial/controlflow.rst:323 +msgid "" +"Patterns can look like unpacking assignments, and can be used to bind " +"variables::" +msgstr "" +"Muster können wie Entpackungszuweisungen aussehen und verwendet werden, um " +"Variablen zu binden::" + +#: ../../tutorial/controlflow.rst:326 +msgid "" +"# point is an (x, y) tuple\n" +"match point:\n" +" case (0, 0):\n" +" print(\"Origin\")\n" +" case (0, y):\n" +" print(f\"Y={y}\")\n" +" case (x, 0):\n" +" print(f\"X={x}\")\n" +" case (x, y):\n" +" print(f\"X={x}, Y={y}\")\n" +" case _:\n" +" raise ValueError(\"Not a point\")" +msgstr "" +"# point ist ein (x, y)-Tupel\n" +"match point:\n" +" case (0, 0):\n" +" print(\"Origin\")\n" +" case (0, y):\n" +" print(f\"Y={y}\")\n" +" case (x, 0):\n" +" print(f\"X={x}\")\n" +" case (x, y):\n" +" print(f\"X={x}, Y={y}\")\n" +" case _:\n" +" raise ValueError(\"Not a point\")" + +#: ../../tutorial/controlflow.rst:339 +msgid "" +"Study that one carefully! The first pattern has two literals, and can be " +"thought of as an extension of the literal pattern shown above. But the next " +"two patterns combine a literal and a variable, and the variable *binds* a " +"value from the subject (``point``). The fourth pattern captures two values, " +"which makes it conceptually similar to the unpacking assignment ``(x, y) = " +"point``." +msgstr "" +"Schau es dir genau an! Das erste Muster hat zwei Literale und kann als " +"Erweiterung des oben gezeigten Literal-Musters betrachtet werden. Die " +"nächsten beiden Muster kombinieren jedoch ein Literal und eine Variable, und " +"die Variable *bindet* einen Wert aus dem Subjekt (``point``). Das vierte " +"Muster erfasst zwei Werte, was es konzeptionell ähnlich wie das Entpacken " +"einer Zuweisung ``(x, y) = point`` macht." + +#: ../../tutorial/controlflow.rst:346 +msgid "" +"If you are using classes to structure your data you can use the class name " +"followed by an argument list resembling a constructor, but with the ability " +"to capture attributes into variables::" +msgstr "" +"Wenn du Klassen zur Strukturierung deiner Daten verwenden, kannst du den " +"Klassennamen gefolgt von einer Argumentliste verwenden, die einem " +"Konstruktor ähneln, jedoch die Möglichkeit bieten, Attribute in Variablen zu " +"erfassen::" + +#: ../../tutorial/controlflow.rst:350 +msgid "" +"class Point:\n" +" def __init__(self, x, y):\n" +" self.x = x\n" +" self.y = y\n" +"\n" +"def where_is(point):\n" +" match point:\n" +" case Point(x=0, y=0):\n" +" print(\"Origin\")\n" +" case Point(x=0, y=y):\n" +" print(f\"Y={y}\")\n" +" case Point(x=x, y=0):\n" +" print(f\"X={x}\")\n" +" case Point():\n" +" print(\"Somewhere else\")\n" +" case _:\n" +" print(\"Not a point\")" +msgstr "" +"class Point:\n" +" def __init__(self, x, y):\n" +" self.x = x\n" +" self.y = y\n" +"\n" +"def where_is(point):\n" +" match point:\n" +" case Point(x=0, y=0):\n" +" print(\"Origin\")\n" +" case Point(x=0, y=y):\n" +" print(f\"Y={y}\")\n" +" case Point(x=x, y=0):\n" +" print(f\"X={x}\")\n" +" case Point():\n" +" print(\"Somewhere else\")\n" +" case _:\n" +" print(\"Not a point\")" + +#: ../../tutorial/controlflow.rst:368 +msgid "" +"You can use positional parameters with some builtin classes that provide an " +"ordering for their attributes (e.g. dataclasses). You can also define a " +"specific position for attributes in patterns by setting the " +"``__match_args__`` special attribute in your classes. If it's set to (\"x\", " +"\"y\"), the following patterns are all equivalent (and all bind the ``y`` " +"attribute to the ``var`` variable)::" +msgstr "" +"Du kannst Positions-Parameter mit einigen eingebauten Klassen verwenden, die " +"eine Reihenfolge für ihre Attribute festlegen (z. B. dataclasses). Du kannst " +"auch eine spezifische Position für Attribute in Mustern definieren, indem du " +"das spezielle Attribut ``__match_args__`` in deinen Klassen setzt. Wenn es " +"auf (\\\"x\\\", \\\"y\\\") gesetzt ist, sind die folgenden Muster alle " +"äquivalent (und binden alle das Attribut ``y`` an die Variable ``var``)::" + +#: ../../tutorial/controlflow.rst:374 +msgid "" +"Point(1, var)\n" +"Point(1, y=var)\n" +"Point(x=1, y=var)\n" +"Point(y=var, x=1)" +msgstr "" +"Point(1, var)\n" +"Point(1, y=var)\n" +"Point(x=1, y=var)\n" +"Point(y=var, x=1)" + +#: ../../tutorial/controlflow.rst:379 +msgid "" +"A recommended way to read patterns is to look at them as an extended form of " +"what you would put on the left of an assignment, to understand which " +"variables would be set to what. Only the standalone names (like ``var`` " +"above) are assigned to by a match statement. Dotted names (like ``foo." +"bar``), attribute names (the ``x=`` and ``y=`` above) or class names " +"(recognized by the \"(...)\" next to them like ``Point`` above) are never " +"assigned to." +msgstr "" +"Eine empfohlene Art, Muster zu lesen, besteht darin, sie als eine erweiterte " +"Form dessen zu betrachten, was du auf die linke Seite einer Zuweisung setzen " +"würdest, um zu verstehen, welche Variablen auf was gesetzt werden. Nur den " +"einzeln stehenden Namen (wie ``var`` oben) wird von einer match-Anweisung " +"etwas zugewiesen. Namen mit Punkten (wie ``foo.bar``), Attributnamen (die " +"``x=`` und ``y=`` oben) oder Klassennamen (erkennbar am \"\\\"(...)\\\" " +"daneben wie ``Point`` oben) wird niemals etwas zugewiesen." + +#: ../../tutorial/controlflow.rst:386 +msgid "" +"Patterns can be arbitrarily nested. For example, if we have a short list of " +"Points, with ``__match_args__`` added, we could match it like this::" +msgstr "" +"Muster können beliebig verschachtelt werden. Wenn wir beispielsweise eine " +"kurze Liste von Point-Objekten haben, denen ``__match_args__`` hinzugefügt " +"wurde, könnten wir sie wie folgt abgleichen::" + +#: ../../tutorial/controlflow.rst:389 +msgid "" +"class Point:\n" +" __match_args__ = ('x', 'y')\n" +" def __init__(self, x, y):\n" +" self.x = x\n" +" self.y = y\n" +"\n" +"match points:\n" +" case []:\n" +" print(\"No points\")\n" +" case [Point(0, 0)]:\n" +" print(\"The origin\")\n" +" case [Point(x, y)]:\n" +" print(f\"Single point {x}, {y}\")\n" +" case [Point(0, y1), Point(0, y2)]:\n" +" print(f\"Two on the Y axis at {y1}, {y2}\")\n" +" case _:\n" +" print(\"Something else\")" +msgstr "" +"class Point:\n" +" __match_args__ = ('x', 'y')\n" +" def __init__(self, x, y):\n" +" self.x = x\n" +" self.y = y\n" +"\n" +"match points:\n" +" case []:\n" +" print(\"No points\")\n" +" case [Point(0, 0)]:\n" +" print(\"The origin\")\n" +" case [Point(x, y)]:\n" +" print(f\"Single point {x}, {y}\")\n" +" case [Point(0, y1), Point(0, y2)]:\n" +" print(f\"Two on the Y axis at {y1}, {y2}\")\n" +" case _:\n" +" print(\"Something else\")" + +#: ../../tutorial/controlflow.rst:407 +msgid "" +"We can add an ``if`` clause to a pattern, known as a \"guard\". If the " +"guard is false, ``match`` goes on to try the next case block. Note that " +"value capture happens before the guard is evaluated::" +msgstr "" +"Wir können einem Muster eine ``if``-Klausel hinzufügen, die als \\\"Guard\\ " +"(Wächter) bezeichnet wird. Wenn der Guard nicht zutrifft, fährt ``match`` " +"mit dem nächsten case-Block fort. Beachte, dass das Erfassen der Werte " +"erfolgt, bevor der Guard ausgewertet wird::" + +#: ../../tutorial/controlflow.rst:411 +msgid "" +"match point:\n" +" case Point(x, y) if x == y:\n" +" print(f\"Y=X at {x}\")\n" +" case Point(x, y):\n" +" print(f\"Not on the diagonal\")" +msgstr "" +"match point:\n" +" case Point(x, y) if x == y:\n" +" print(f\"Y=X at {x}\")\n" +" case Point(x, y):\n" +" print(f\"Not on the diagonal\")" + +#: ../../tutorial/controlflow.rst:417 +msgid "Several other key features of this statement:" +msgstr "Einige weitere Hauptmerkmale dieser Anweisung:" + +#: ../../tutorial/controlflow.rst:419 +msgid "" +"Like unpacking assignments, tuple and list patterns have exactly the same " +"meaning and actually match arbitrary sequences. An important exception is " +"that they don't match iterators or strings." +msgstr "" +"Wie bei Zuweisungen durch Entpacken haben Tupel- und Listenmuster exakt " +"dieselbe Bedeutung und passen tatsächlich auf beliebige Sequenzen. Eine " +"wichtige Ausnahme ist, dass sie nicht auf Iteratoren oder Zeichenketten " +"passen." + +#: ../../tutorial/controlflow.rst:423 +msgid "" +"Sequence patterns support extended unpacking: ``[x, y, *rest]`` and ``(x, y, " +"*rest)`` work similar to unpacking assignments. The name after ``*`` may " +"also be ``_``, so ``(x, y, *_)`` matches a sequence of at least two items " +"without binding the remaining items." +msgstr "" +"Sequenzmuster unterstützen erweitertes Entpacken: ``[x, y, *rest]`` und " +"``(x, y, *rest)`` funktionieren ähnlich wie Zuweisungen durch Entpacken. Der " +"Name nach ``*`` darf auch ``_`` sein, sodass ``(x, y, *_)`` auf eine Sequenz " +"von mindestens zwei Elementen passt, ohne die verbleibenden Elemente zu " +"binden." + +#: ../../tutorial/controlflow.rst:428 +msgid "" +"Mapping patterns: ``{\"bandwidth\": b, \"latency\": l}`` captures the " +"``\"bandwidth\"`` and ``\"latency\"`` values from a dictionary. Unlike " +"sequence patterns, extra keys are ignored. An unpacking like ``**rest`` is " +"also supported. (But ``**_`` would be redundant, so it is not allowed.)" +msgstr "" +"Mapping-Muster: ``{\\\"bandwidth\\\": b, \\\"latency\\\": l}`` fängt die " +"Werte ``\\\"bandwidth\\\"`` und ``\\\"latency\\\"`` aus einem Dictionary ab. " +"Anders als bei Sequenzmustern werden zusätzliche Schlüssel ignoriert. Ein " +"Entpacken wie ``**rest`` wird ebenfalls unterstützt. (Aber ``**_`` wäre " +"redundant und ist daher nicht erlaubt.)" + +#: ../../tutorial/controlflow.rst:433 +msgid "Subpatterns may be captured using the ``as`` keyword::" +msgstr "Untermuster können mit dem Schlüsselwort ``as`` abgefangen werden::" + +#: ../../tutorial/controlflow.rst:435 +msgid "case (Point(x1, y1), Point(x2, y2) as p2): ..." +msgstr "case (Point(x1, y1), Point(x2, y2) as p2): ..." + +#: ../../tutorial/controlflow.rst:437 +msgid "" +"will capture the second element of the input as ``p2`` (as long as the input " +"is a sequence of two points)" +msgstr "" +"fängt das zweite Element der Eingabe als ``p2`` ab (solange die Eingabe eine " +"Sequenz aus zwei Punkten ist)" + +#: ../../tutorial/controlflow.rst:440 +msgid "" +"Most literals are compared by equality, however the singletons ``True``, " +"``False`` and ``None`` are compared by identity." +msgstr "" +"Die meisten Literale werden auf Gleichheit verglichen, die Singletons " +"``True``, ``False`` und ``None`` jedoch auf Identität." + +#: ../../tutorial/controlflow.rst:443 +msgid "" +"Patterns may use named constants. These must be dotted names to prevent " +"them from being interpreted as capture variables::" +msgstr "" +"Muster dürfen benannte Konstanten verwenden. Diese müssen punktierte Namen " +"sein, um zu verhindern, dass sie als Erfassungsvariable interpretiert " +"werden::" + +#: ../../tutorial/controlflow.rst:446 +msgid "" +"from enum import Enum\n" +"class Color(Enum):\n" +" RED = 'red'\n" +" GREEN = 'green'\n" +" BLUE = 'blue'\n" +"\n" +"color = Color(input(\"Enter your choice of 'red', 'blue' or 'green': \"))\n" +"\n" +"match color:\n" +" case Color.RED:\n" +" print(\"I see red!\")\n" +" case Color.GREEN:\n" +" print(\"Grass is green\")\n" +" case Color.BLUE:\n" +" print(\"I'm feeling the blues :(\")" +msgstr "" +"from enum import Enum\n" +"class Color(Enum):\n" +" RED = 'red'\n" +" GREEN = 'green'\n" +" BLUE = 'blue'\n" +"\n" +"color = Color(input(\"Enter your choice of 'red', 'blue' or 'green': \"))\n" +"\n" +"match color:\n" +" case Color.RED:\n" +" print(\"I see red!\")\n" +" case Color.GREEN:\n" +" print(\"Grass is green\")\n" +" case Color.BLUE:\n" +" print(\"I'm feeling the blues :(\")" + +#: ../../tutorial/controlflow.rst:462 +msgid "" +"For a more detailed explanation and additional examples, you can look into :" +"pep:`636` which is written in a tutorial format." +msgstr "" +"Für eine ausführlichere Erklärung und weitere Beispiele kannst du einen " +"Blick in :pep:`636` werfen, das im Tutorial-Format verfasst ist." + +#: ../../tutorial/controlflow.rst:468 +msgid "Defining Functions" +msgstr "Funktionen definieren" + +#: ../../tutorial/controlflow.rst:470 +msgid "" +"We can create a function that writes the Fibonacci series to an arbitrary " +"boundary::" +msgstr "" +"Wir können eine Funktion erstellen, die die Fibonacci-Folge bis zu einer " +"beliebigen Grenze ausgibt::" + +#: ../../tutorial/controlflow.rst:473 +msgid "" +">>> def fib(n): # write Fibonacci series less than n\n" +"... \"\"\"Print a Fibonacci series less than n.\"\"\"\n" +"... a, b = 0, 1\n" +"... while a < n:\n" +"... print(a, end=' ')\n" +"... a, b = b, a+b\n" +"... print()\n" +"...\n" +">>> # Now call the function we just defined:\n" +">>> fib(2000)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597" +msgstr "" +">>> def fib(n): # Fibonacci-Folge kleiner als n ausgeben\n" +"... \"\"\"Fibonacci-Folge kleiner als n ausgeben.\"\"\"\n" +"... a, b = 0, 1\n" +"... while a < n:\n" +"... print(a, end=' ')\n" +"... a, b = b, a+b\n" +"... print()\n" +"...\n" +">>> # Die eben definierte Funktion aufrufen:\n" +">>> fib(2000)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597" + +#: ../../tutorial/controlflow.rst:490 +msgid "" +"The keyword :keyword:`def` introduces a function *definition*. It must be " +"followed by the function name and the parenthesized list of formal " +"parameters. The statements that form the body of the function start at the " +"next line, and must be indented." +msgstr "" +"Das Schlüsselwort :keyword:`def` leitet eine Funktions*definition* ein. " +"Darauf müssen der Funktionsname und die in Klammern gesetzte Liste der " +"formalen Parameter folgen. Die Anweisungen, die den Funktionskörper bilden, " +"beginnen in der nächsten Zeile und müssen eingerückt sein." + +#: ../../tutorial/controlflow.rst:495 +msgid "" +"The first statement of the function body can optionally be a string literal; " +"this string literal is the function's documentation string, or :dfn:" +"`docstring`. (More about docstrings can be found in the section :ref:`tut-" +"docstrings`.) There are tools which use docstrings to automatically produce " +"online or printed documentation, or to let the user interactively browse " +"through code; it's good practice to include docstrings in code that you " +"write, so make a habit of it." +msgstr "" +"Die erste Anweisung des Funktionskörpers kann optional ein Zeichenketten-" +"Literal sein. Dieses Zeichenketten-Literal ist der Dokumentationsstring der " +"Funktion, oder :dfn:`Docstring`. (Mehr über Docstrings findet sich im " +"Abschnitt :ref:`tut-docstrings`.) Es gibt Werkzeuge, die Docstrings " +"verwenden, um automatisch Online- oder gedruckte Dokumentation zu erzeugen " +"oder es dem Benutzer ermöglichen, interaktiv durch den Code zu navigieren. " +"Es gehört zum guten Stil, Docstrings in geschriebenen Code einzufügen, " +"gewöhne es dir also am besten an." + +#: ../../tutorial/controlflow.rst:502 +msgid "" +"The *execution* of a function introduces a new symbol table used for the " +"local variables of the function. More precisely, all variable assignments " +"in a function store the value in the local symbol table; whereas variable " +"references first look in the local symbol table, then in the local symbol " +"tables of enclosing functions, then in the global symbol table, and finally " +"in the table of built-in names. Thus, global variables and variables of " +"enclosing functions cannot be directly assigned a value within a function " +"(unless, for global variables, named in a :keyword:`global` statement, or, " +"for variables of enclosing functions, named in a :keyword:`nonlocal` " +"statement), although they may be referenced." +msgstr "" +"Die *Ausführung* einer Funktion führt eine neue Symboltabelle ein, die für " +"die lokalen Variablen der Funktion verwendet wird. Genauer gesagt speichern " +"alle Variablenzuweisungen in einer Funktion den Wert in der lokalen " +"Symboltabelle; wohingegen Variablenreferenzen zuerst in der lokalen " +"Symboltabelle suchen, dann in den lokalen Symboltabellen umschließender " +"Funktionen, danach in der globalen Symboltabelle und schließlich in der " +"Tabelle der eingebauten Namen. Daher kann globalen Variablen und Variablen " +"umschließender Funktionen innerhalb einer Funktion nicht direkt ein Wert " +"zugewiesen werden (außer wenn globale Variablen in einer :keyword:`global`-" +"Anweisung oder Variablen umschließender Funktionen in einer :keyword:" +"`nonlocal`-Anweisung benannt sind), obwohl auf sie verwiesen werden darf." + +#: ../../tutorial/controlflow.rst:513 +msgid "" +"The actual parameters (arguments) to a function call are introduced in the " +"local symbol table of the called function when it is called; thus, arguments " +"are passed using *call by value* (where the *value* is always an object " +"*reference*, not the value of the object). [#]_ When a function calls " +"another function, or calls itself recursively, a new local symbol table is " +"created for that call." +msgstr "" +"Die tatsächlichen Parameter (Argumente) eines Funktionsaufrufs werden beim " +"Aufruf in die lokale Symboltabelle der aufgerufenen Funktion eingefügt. " +"Daher werden Argumente per *Call by Value* übergeben (wobei der *Wert* immer " +"eine Objekt*referenz* ist, nicht der Wert des Objekts). [#]_ Wenn eine " +"Funktion eine andere Funktion aufruft oder sich selbst rekursiv aufruft, " +"wird für diesen Aufruf eine neue lokale Symboltabelle erstellt." + +#: ../../tutorial/controlflow.rst:520 +msgid "" +"A function definition associates the function name with the function object " +"in the current symbol table. The interpreter recognizes the object pointed " +"to by that name as a user-defined function. Other names can also point to " +"that same function object and can also be used to access the function::" +msgstr "" +"Eine Funktionsdefinition verknüpft den Funktionsnamen mit dem " +"Funktionsobjekt in der aktuellen Symboltabelle. Der Interpreter erkennt das " +"Objekt, auf das dieser Name zeigt, als benutzerdefinierte Funktion an. " +"Andere Namen können ebenfalls auf dasselbe Funktionsobjekt zeigen und " +"verwendet werden, um auf die Funktion zuzugreifen::" + +#: ../../tutorial/controlflow.rst:525 +msgid "" +">>> fib\n" +"\n" +">>> f = fib\n" +">>> f(100)\n" +"0 1 1 2 3 5 8 13 21 34 55 89" +msgstr "" +">>> fib\n" +"\n" +">>> f = fib\n" +">>> f(100)\n" +"0 1 1 2 3 5 8 13 21 34 55 89" + +#: ../../tutorial/controlflow.rst:531 +msgid "" +"Coming from other languages, you might object that ``fib`` is not a function " +"but a procedure since it doesn't return a value. In fact, even functions " +"without a :keyword:`return` statement do return a value, albeit a rather " +"boring one. This value is called ``None`` (it's a built-in name). Writing " +"the value ``None`` is normally suppressed by the interpreter if it would be " +"the only value written. You can see it if you really want to using :func:" +"`print`::" +msgstr "" +"Wenn du von anderen Sprachen kommst, kannst du einwenden, dass ``fib`` keine " +"Funktion, sondern eine Prozedur ist, da sie keinen Wert zurückgibt. " +"Tatsächlich geben selbst Funktionen ohne :keyword:`return`-Anweisung einen " +"Wert zurück, wenn auch einen eher langweiligen. Dieser Wert heißt ``None`` " +"(es ist ein eingebauter Name). Die Ausgabe des Werts ``None`` wird vom " +"Interpreter normalerweise unterdrückt, wenn er der einzige ausgegebene Wert " +"wäre. Du kannst ihn sehen, wenn Sie es wirklich möchten, indem Sie :func:" +"`print` verwenden::" + +#: ../../tutorial/controlflow.rst:538 +msgid "" +">>> fib(0)\n" +">>> print(fib(0))\n" +"None" +msgstr "" +">>> fib(0)\n" +">>> print(fib(0))\n" +"None" + +#: ../../tutorial/controlflow.rst:542 +msgid "" +"It is simple to write a function that returns a list of the numbers of the " +"Fibonacci series, instead of printing it::" +msgstr "" +"Es ist einfach, eine Funktion zu schreiben, die eine Liste der Zahlen der " +"Fibonacci-Folge zurückgibt, anstatt sie auszugeben::" + +#: ../../tutorial/controlflow.rst:545 +msgid "" +">>> def fib2(n): # return Fibonacci series up to n\n" +"... \"\"\"Return a list containing the Fibonacci series up to n.\"\"\"\n" +"... result = []\n" +"... a, b = 0, 1\n" +"... while a < n:\n" +"... result.append(a) # see below\n" +"... a, b = b, a+b\n" +"... return result\n" +"...\n" +">>> f100 = fib2(100) # call it\n" +">>> f100 # write the result\n" +"[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]" +msgstr "" +">>> def fib2(n): # Fibonacci-Folge bis n zurückgeben\n" +"... \"\"\"Gibt eine Liste zurück, die die Fibonacci-Folge bis n enthält." +"\"\"\"\n" +"... result = []\n" +"... a, b = 0, 1\n" +"... while a < n:\n" +"... result.append(a) # siehe unten\n" +"... a, b = b, a+b\n" +"... return result\n" +"...\n" +">>> f100 = fib2(100) # aufrufen\n" +">>> f100 # das Ergebnis ausgeben\n" +"[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]" + +#: ../../tutorial/controlflow.rst:558 +msgid "This example, as usual, demonstrates some new Python features:" +msgstr "" +"Dieses Beispiel demonstriert, wie gewohnt, einige neue Python-Funktionen:" + +#: ../../tutorial/controlflow.rst:560 +msgid "" +"The :keyword:`return` statement returns with a value from a function. :" +"keyword:`!return` without an expression argument returns ``None``. Falling " +"off the end of a function also returns ``None``." +msgstr "" +"Die :keyword:`return`-Anweisung gibt einen Wert aus einer Funktion zurück. :" +"keyword:`!return` ohne Ausdrucksargument gibt ``None`` zurück. Das Erreichen " +"des Endes einer Funktion gibt ebenfalls ``None`` zurück." + +#: ../../tutorial/controlflow.rst:564 +msgid "" +"The statement ``result.append(a)`` calls a *method* of the list object " +"``result``. A method is a function that 'belongs' to an object and is named " +"``obj.methodname``, where ``obj`` is some object (this may be an " +"expression), and ``methodname`` is the name of a method that is defined by " +"the object's type. Different types define different methods. Methods of " +"different types may have the same name without causing ambiguity. (It is " +"possible to define your own object types and methods, using *classes*, see :" +"ref:`tut-classes`) The method :meth:`~list.append` shown in the example is " +"defined for list objects; it adds a new element at the end of the list. In " +"this example it is equivalent to ``result = result + [a]``, but more " +"efficient." +msgstr "" +"Die Anweisung ``result.append(a)`` ruft eine *Methode* des Listenobjekts " +"``result`` auf. Eine Methode ist eine Funktion, die zu einem Objekt »gehört« " +"und den Namen ``obj.methodenname`` trägt, wobei ``obj`` ein Objekt ist (dies " +"kann ein Ausdruck sein) und ``methodenname`` der Name einer Methode ist, die " +"durch den Typ des Objekts definiert wird. Verschiedene Typen definieren " +"unterschiedliche Methoden. Methoden verschiedener Typen können denselben " +"Namen haben, ohne dass es zu Mehrdeutigkeiten kommt. (Es ist möglich, eigene " +"Objekttypen und Methoden mittels *Klassen* zu definieren, siehe :ref:`tut-" +"classes`.) Die im Beispiel gezeigte Methode :meth:`~list.append` ist für " +"Listenobjekte definiert; sie fügt ein neues Element am Ende der Liste hinzu. " +"In diesem Beispiel ist sie äquivalent zu ``result = result + [a]``, aber " +"effizienter." + +#: ../../tutorial/controlflow.rst:579 +msgid "More on Defining Functions" +msgstr "Mehr zum Definieren von Funktionen" + +#: ../../tutorial/controlflow.rst:581 +msgid "" +"It is also possible to define functions with a variable number of arguments. " +"There are three forms, which can be combined." +msgstr "" +"Es ist auch möglich, Funktionen mit einer variablen Anzahl von Argumenten zu " +"definieren. Es gibt drei Formen, die kombiniert werden können." + +#: ../../tutorial/controlflow.rst:588 +msgid "Default Argument Values" +msgstr "Standardwerte für Argumente" + +#: ../../tutorial/controlflow.rst:590 +msgid "" +"The most useful form is to specify a default value for one or more " +"arguments. This creates a function that can be called with fewer arguments " +"than it is defined to allow. For example::" +msgstr "" +"Die nützlichste Form ist die Angabe eines Standardwerts für ein oder mehrere " +"Argumente. Dies erzeugt eine Funktion, die mit weniger Argumenten aufgerufen " +"werden kann, als sie definiert ist zu erlauben. Zum Beispiel::" + +#: ../../tutorial/controlflow.rst:594 +msgid "" +"def ask_ok(prompt, retries=4, reminder='Please try again!'):\n" +" while True:\n" +" reply = input(prompt)\n" +" if reply in {'y', 'ye', 'yes'}:\n" +" return True\n" +" if reply in {'n', 'no', 'nop', 'nope'}:\n" +" return False\n" +" retries = retries - 1\n" +" if retries < 0:\n" +" raise ValueError('invalid user response')\n" +" print(reminder)" +msgstr "" +"def ask_ok(prompt, retries=4, reminder='Please try again!'):\n" +" while True:\n" +" reply = input(prompt)\n" +" if reply in {'y', 'ye', 'yes'}:\n" +" return True\n" +" if reply in {'n', 'no', 'nop', 'nope'}:\n" +" return False\n" +" retries = retries - 1\n" +" if retries < 0:\n" +" raise ValueError('invalid user response')\n" +" print(reminder)" + +#: ../../tutorial/controlflow.rst:606 +msgid "This function can be called in several ways:" +msgstr "Diese Funktion kann auf verschiedene Arten aufgerufen werden:" + +#: ../../tutorial/controlflow.rst:608 +msgid "" +"giving only the mandatory argument: ``ask_ok('Do you really want to quit?')``" +msgstr "" +"nur das erforderliche Argument übergeben: ``ask_ok('Do you really want to " +"quit?')``" + +#: ../../tutorial/controlflow.rst:610 +msgid "" +"giving one of the optional arguments: ``ask_ok('OK to overwrite the file?', " +"2)``" +msgstr "" +"eines der optionalen Argumente übergeben: ``ask_ok('OK to overwrite the " +"file?', 2)``" + +#: ../../tutorial/controlflow.rst:612 +msgid "" +"or even giving all arguments: ``ask_ok('OK to overwrite the file?', 2, 'Come " +"on, only yes or no!')``" +msgstr "" +"oder sogar alle Argumente übergeben: ``ask_ok('OK to overwrite the file?', " +"2, 'Come on, only yes or no!')``" + +#: ../../tutorial/controlflow.rst:615 +msgid "" +"This example also introduces the :keyword:`in` keyword. This tests whether " +"or not a sequence contains a certain value." +msgstr "" +"Dieses Beispiel führt auch das Schlüsselwort :keyword:`in` ein. Dies prüft, " +"ob eine Sequenz einen bestimmten Wert enthält oder nicht." + +#: ../../tutorial/controlflow.rst:618 +msgid "" +"The default values are evaluated at the point of function definition in the " +"*defining* scope, so that ::" +msgstr "" +"Die Standardwerte werden zum Zeitpunkt der Funktionsdefinition im " +"*definierenden* Gültigkeitsbereich ausgewertet, so dass ::" + +#: ../../tutorial/controlflow.rst:621 +msgid "" +"i = 5\n" +"\n" +"def f(arg=i):\n" +" print(arg)\n" +"\n" +"i = 6\n" +"f()" +msgstr "" +"i = 5\n" +"\n" +"def f(arg=i):\n" +" print(arg)\n" +"\n" +"i = 6\n" +"f()" + +#: ../../tutorial/controlflow.rst:629 +msgid "will print ``5``." +msgstr "wird ``5`` ausgeben." + +#: ../../tutorial/controlflow.rst:631 +msgid "" +"**Important warning:** The default value is evaluated only once. This makes " +"a difference when the default is a mutable object such as a list, " +"dictionary, or instances of most classes. For example, the following " +"function accumulates the arguments passed to it on subsequent calls::" +msgstr "" +"**Wichtige Warnung:** Der Standardwert wird nur einmal ausgewertet. Dies " +"macht einen Unterschied, wenn der Standardwert ein veränderbares Objekt wie " +"eine Liste, ein Dictionary oder Instanzen der meisten Klassen ist. Die " +"folgende Funktion sammelt beispielsweise die ihr übergebenen Argumente bei " +"nachfolgenden Aufrufen an::" + +#: ../../tutorial/controlflow.rst:636 +msgid "" +"def f(a, L=[]):\n" +" L.append(a)\n" +" return L\n" +"\n" +"print(f(1))\n" +"print(f(2))\n" +"print(f(3))" +msgstr "" +"def f(a, L=[]):\n" +" L.append(a)\n" +" return L\n" +"\n" +"print(f(1))\n" +"print(f(2))\n" +"print(f(3))" + +#: ../../tutorial/controlflow.rst:644 +msgid "This will print ::" +msgstr "Dies gibt Folgendes aus ::" + +#: ../../tutorial/controlflow.rst:646 +msgid "" +"[1]\n" +"[1, 2]\n" +"[1, 2, 3]" +msgstr "" +"[1]\n" +"[1, 2]\n" +"[1, 2, 3]" + +#: ../../tutorial/controlflow.rst:650 +msgid "" +"If you don't want the default to be shared between subsequent calls, you can " +"write the function like this instead::" +msgstr "" +"Wenn du nicht möchten, dass der Standardwert zwischen nachfolgenden Aufrufen " +"geteilt wird, kannst du die Funktion stattdessen so schreiben::" + +#: ../../tutorial/controlflow.rst:653 +msgid "" +"def f(a, L=None):\n" +" if L is None:\n" +" L = []\n" +" L.append(a)\n" +" return L" +msgstr "" +"def f(a, L=None):\n" +" if L is None:\n" +" L = []\n" +" L.append(a)\n" +" return L" + +#: ../../tutorial/controlflow.rst:663 +msgid "Keyword Arguments" +msgstr "Schlüsselwortargumente" + +#: ../../tutorial/controlflow.rst:665 +msgid "" +"Functions can also be called using :term:`keyword arguments ` of the form ``kwarg=value``. For instance, the following " +"function::" +msgstr "" +"Funktionen können auch mittels :term:`Schlüsselwortargumenten ` der Form ``kwarg=wert`` aufgerufen werden. Die folgende Funktion " +"beispielsweise::" + +#: ../../tutorial/controlflow.rst:668 +msgid "" +"def parrot(voltage, state='a stiff', action='voom', type='Norwegian Blue'):\n" +" print(\"-- This parrot wouldn't\", action, end=' ')\n" +" print(\"if you put\", voltage, \"volts through it.\")\n" +" print(\"-- Lovely plumage, the\", type)\n" +" print(\"-- It's\", state, \"!\")" +msgstr "" +"def parrot(voltage, state='a stiff', action='voom', type='Norwegian Blue'):\n" +" print(\"-- This parrot wouldn't\", action, end=' ')\n" +" print(\"if you put\", voltage, \"volts through it.\")\n" +" print(\"-- Lovely plumage, the\", type)\n" +" print(\"-- It's\", state, \"!\")" + +#: ../../tutorial/controlflow.rst:674 +msgid "" +"accepts one required argument (``voltage``) and three optional arguments " +"(``state``, ``action``, and ``type``). This function can be called in any " +"of the following ways::" +msgstr "" +"akzeptiert ein erforderliches Argument (``voltage``) und drei optionale " +"Argumente (``state``, ``action`` und ``type``). Diese Funktion kann auf jede " +"der folgenden Arten aufgerufen werden::" + +#: ../../tutorial/controlflow.rst:678 +msgid "" +"parrot(1000) # 1 positional " +"argument\n" +"parrot(voltage=1000) # 1 keyword argument\n" +"parrot(voltage=1000000, action='VOOOOOM') # 2 keyword arguments\n" +"parrot(action='VOOOOOM', voltage=1000000) # 2 keyword arguments\n" +"parrot('a million', 'bereft of life', 'jump') # 3 positional " +"arguments\n" +"parrot('a thousand', state='pushing up the daisies') # 1 positional, 1 " +"keyword" +msgstr "" +"parrot(1000) # 1 Positionsargument\n" +"parrot(voltage=1000) # 1 " +"Schlüsselwortargument\n" +"parrot(voltage=1000000, action='VOOOOOM') # 2 " +"Schlüsselwortargumente\n" +"parrot(action='VOOOOOM', voltage=1000000) # 2 " +"Schlüsselwortargumente\n" +"parrot('a million', 'bereft of life', 'jump') # 3 " +"Positionsargumente\n" +"parrot('a thousand', state='pushing up the daisies') # 1 Positionsargument, " +"1 Schlüsselwortargument" + +#: ../../tutorial/controlflow.rst:685 +msgid "but all the following calls would be invalid::" +msgstr "aber alle folgenden Aufrufe wären ungültig::" + +#: ../../tutorial/controlflow.rst:687 +msgid "" +"parrot() # required argument missing\n" +"parrot(voltage=5.0, 'dead') # non-keyword argument after a keyword " +"argument\n" +"parrot(110, voltage=220) # duplicate value for the same argument\n" +"parrot(actor='John Cleese') # unknown keyword argument" +msgstr "" +"parrot() # erforderliches Argument fehlt\n" +"parrot(voltage=5.0, 'dead') # Nicht-Schlüsselwortargument nach einem " +"Schlüsselwortargument\n" +"parrot(110, voltage=220) # doppelter Wert für dasselbe Argument\n" +"parrot(actor='John Cleese') # unbekanntes Schlüsselwortargument" + +#: ../../tutorial/controlflow.rst:692 +msgid "" +"In a function call, keyword arguments must follow positional arguments. All " +"the keyword arguments passed must match one of the arguments accepted by the " +"function (e.g. ``actor`` is not a valid argument for the ``parrot`` " +"function), and their order is not important. This also includes non-" +"optional arguments (e.g. ``parrot(voltage=1000)`` is valid too). No argument " +"may receive a value more than once. Here's an example that fails due to this " +"restriction::" +msgstr "" +"In einem Funktionsaufruf müssen Schlüsselwortargumente auf " +"Positionsargumente folgen. Alle übergebenen Schlüsselwortargumente müssen " +"mit einem der von der Funktion akzeptierten Argumente übereinstimmen (z. B. " +"ist ``actor`` kein gültiges Argument für die Funktion ``parrot``), und ihre " +"Reihenfolge ist nicht von Bedeutung. Dies schließt auch nicht-optionale " +"Argumente ein (z. B. ist auch ``parrot(voltage=1000)`` gültig). Kein " +"Argument darf mehr als einmal einen Wert erhalten. Hier ist ein Beispiel, " +"das aufgrund dieser Einschränkung fehlschlägt::" + +#: ../../tutorial/controlflow.rst:700 +msgid "" +">>> def function(a):\n" +"... pass\n" +"...\n" +">>> function(0, a=0)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: function() got multiple values for argument 'a'" +msgstr "" +">>> def function(a):\n" +"... pass\n" +"...\n" +">>> function(0, a=0)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: function() got multiple values for argument 'a'" + +#: ../../tutorial/controlflow.rst:708 +msgid "" +"When a final formal parameter of the form ``**name`` is present, it receives " +"a dictionary (see :ref:`typesmapping`) containing all keyword arguments " +"except for those corresponding to a formal parameter. This may be combined " +"with a formal parameter of the form ``*name`` (described in the next " +"subsection) which receives a :ref:`tuple ` containing the " +"positional arguments beyond the formal parameter list. (``*name`` must " +"occur before ``**name``.) For example, if we define a function like this::" +msgstr "" +"Wenn ein abschließender formaler Parameter der Form ``**name`` vorhanden " +"ist, erhält dieser ein Dictionary (siehe :ref:`typesmapping`), das alle " +"Schlüsselwortargumente enthält, mit Ausnahme derjenigen, die einem formalen " +"Parameter entsprechen. Dies kann mit einem formalen Parameter der Form " +"``*name`` kombiniert werden (beschrieben im nächsten Unterabschnitt), " +"welcher ein :ref:`Tupel ` erhält, das die Positionsargumente " +"außerhalb der formalen Parameterliste enthält. (``*name`` muss vor " +"``**name`` stehen.) Wenn wir beispielsweise eine Funktion wie folgt " +"definieren::" + +#: ../../tutorial/controlflow.rst:716 +msgid "" +"def cheeseshop(kind, *arguments, **keywords):\n" +" print(\"-- Do you have any\", kind, \"?\")\n" +" print(\"-- I'm sorry, we're all out of\", kind)\n" +" for arg in arguments:\n" +" print(arg)\n" +" print(\"-\" * 40)\n" +" for kw in keywords:\n" +" print(kw, \":\", keywords[kw])" +msgstr "" +"def cheeseshop(kind, *arguments, **keywords):\n" +" print(\"-- Do you have any\", kind, \"?\")\n" +" print(\"-- I'm sorry, we're all out of\", kind)\n" +" for arg in arguments:\n" +" print(arg)\n" +" print(\"-\" * 40)\n" +" for kw in keywords:\n" +" print(kw, \":\", keywords[kw])" + +#: ../../tutorial/controlflow.rst:725 +msgid "It could be called like this::" +msgstr "Sie könnte wie folgt aufgerufen werden::" + +#: ../../tutorial/controlflow.rst:727 +msgid "" +"cheeseshop(\"Limburger\", \"It's very runny, sir.\",\n" +" \"It's really very, VERY runny, sir.\",\n" +" shopkeeper=\"Michael Palin\",\n" +" client=\"John Cleese\",\n" +" sketch=\"Cheese Shop Sketch\")" +msgstr "" +"cheeseshop(\"Limburger\", \"It's very runny, sir.\",\n" +" \"It's really very, VERY runny, sir.\",\n" +" shopkeeper=\"Michael Palin\",\n" +" client=\"John Cleese\",\n" +" sketch=\"Cheese Shop Sketch\")" + +#: ../../tutorial/controlflow.rst:733 +msgid "and of course it would print:" +msgstr "und sie würde natürlich Folgendes ausgeben:" + +#: ../../tutorial/controlflow.rst:735 +msgid "" +"-- Do you have any Limburger ?\n" +"-- I'm sorry, we're all out of Limburger\n" +"It's very runny, sir.\n" +"It's really very, VERY runny, sir.\n" +"----------------------------------------\n" +"shopkeeper : Michael Palin\n" +"client : John Cleese\n" +"sketch : Cheese Shop Sketch" +msgstr "" +"-- Do you have any Limburger ?\n" +"-- I'm sorry, we're all out of Limburger\n" +"It's very runny, sir.\n" +"It's really very, VERY runny, sir.\n" +"----------------------------------------\n" +"shopkeeper : Michael Palin\n" +"client : John Cleese\n" +"sketch : Cheese Shop Sketch" + +#: ../../tutorial/controlflow.rst:746 +msgid "" +"Note that the order in which the keyword arguments are printed is guaranteed " +"to match the order in which they were provided in the function call." +msgstr "" +"Beachte, dass die Reihenfolge, in der die Schlüsselwortargumente ausgegeben " +"werden, garantiert der Reihenfolge entspricht, in der sie im Funktionsaufruf " +"übergeben wurden." + +#: ../../tutorial/controlflow.rst:750 +msgid "Special parameters" +msgstr "Spezielle Parameter" + +#: ../../tutorial/controlflow.rst:752 +msgid "" +"By default, arguments may be passed to a Python function either by position " +"or explicitly by keyword. For readability and performance, it makes sense to " +"restrict the way arguments can be passed so that a developer need only look " +"at the function definition to determine if items are passed by position, by " +"position or keyword, or by keyword." +msgstr "" +"Standardmäßig können Argumente an eine Python-Funktion entweder über die " +"Position oder explizit als Schlüsselwort übergeben werden. Aus Gründen der " +"Lesbarkeit und Performance ist es sinnvoll, die Art und Weise der " +"Argumentübergabe einzuschränken, sodass Entwickler nur auf die " +"Funktionsdefinition schauen müssen, um festzustellen, ob Argumente über die " +"Position, über Position oder Schlüsselwort oder über Schlüsselwörter " +"übergeben werden." + +#: ../../tutorial/controlflow.rst:758 +msgid "A function definition may look like:" +msgstr "Eine Funktionsdefinition kann wie folgt aussehen:" + +#: ../../tutorial/controlflow.rst:760 +msgid "" +"def f(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):\n" +" ----------- ---------- ----------\n" +" | | |\n" +" | Positional or keyword |\n" +" | - Keyword only\n" +" -- Positional only" +msgstr "" +"def f(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):\n" +" ----------- ---------- ----------\n" +" | | |\n" +" | Positional or keyword |\n" +" | - Keyword only\n" +" -- Positional only" + +#: ../../tutorial/controlflow.rst:769 +msgid "" +"where ``/`` and ``*`` are optional. If used, these symbols indicate the kind " +"of parameter by how the arguments may be passed to the function: positional-" +"only, positional-or-keyword, and keyword-only. Keyword parameters are also " +"referred to as named parameters." +msgstr "" +"wobei ``/`` und ``*`` optional sind. Wenn sie verwendet werden, geben diese " +"Symbole die Art des Parameters dadurch an, wie die Argumente an die Funktion " +"übergeben werden dürfen: Nur-Positions- (positional-only), Positions- oder " +"Schlüsselwort- (positional-or-keyword) und Nur-Schlüsselwort-Parameter " +"(keyword-only). Schlüsselwortparameter werden auch als benannte Parameter " +"bezeichnet." + +#: ../../tutorial/controlflow.rst:776 +msgid "Positional-or-Keyword Arguments" +msgstr "Positions- oder Schlüsselwortargumente" + +#: ../../tutorial/controlflow.rst:778 +msgid "" +"If ``/`` and ``*`` are not present in the function definition, arguments may " +"be passed to a function by position or by keyword." +msgstr "" +"Wenn ``/`` und ``*`` in der Funktionsdefinition nicht vorhanden sind, können " +"Argumente an eine Funktion über die Position oder über ein Schlüsselwort " +"übergeben werden." + +#: ../../tutorial/controlflow.rst:783 +msgid "Positional-Only Parameters" +msgstr "Reine Positionsargumente" + +#: ../../tutorial/controlflow.rst:785 +msgid "" +"Looking at this in a bit more detail, it is possible to mark certain " +"parameters as *positional-only*. If *positional-only*, the parameters' order " +"matters, and the parameters cannot be passed by keyword. Positional-only " +"parameters are placed before a ``/`` (forward-slash). The ``/`` is used to " +"logically separate the positional-only parameters from the rest of the " +"parameters. If there is no ``/`` in the function definition, there are no " +"positional-only parameters." +msgstr "" +"Schaut man sich das genauer an, ist es möglich, bestimmte Parameter als " +"*positional-only* (reine Positions-Parameter) zu kennzeichnen. Wenn sie " +"*positional-only* sind, spielt die Reihenfolge der Parameter eine Rolle, und " +"sie können nicht als Schlüsselwort übergeben werden. Reine Positions-" +"Parameter stehen vor einem Schrägstrich ``/``. Der ``/`` wird verwendet, um " +"die reinen Positions-Parameter logisch vom Rest der Parameter zu trennen. " +"Wenn in der Funktionsdefinition kein ``/`` vorkommt, gibt es keine reinen " +"Positions-Parameter." + +#: ../../tutorial/controlflow.rst:793 +msgid "" +"Parameters following the ``/`` may be *positional-or-keyword* or *keyword-" +"only*." +msgstr "" +"Parameter, die dem ``/`` folgen, können *positional-or-keyword* oder " +"*keyword-only* sein." + +#: ../../tutorial/controlflow.rst:797 +msgid "Keyword-Only Arguments" +msgstr "eine Schlüsselwortargumente" + +#: ../../tutorial/controlflow.rst:799 +msgid "" +"To mark parameters as *keyword-only*, indicating the parameters must be " +"passed by keyword argument, place an ``*`` in the arguments list just before " +"the first *keyword-only* parameter." +msgstr "" +"Um Parameter als *keyword-only* zu kennzeichnen, was anzeigt, dass die " +"Parameter als Schlüsselwortargument übergeben werden müssen, setze ein ``*`` " +"in die Argumentliste direkt vor den ersten *keyword-only*-Parameter." + +#: ../../tutorial/controlflow.rst:805 +msgid "Function Examples" +msgstr "Funktionsbeispiele" + +#: ../../tutorial/controlflow.rst:807 +msgid "" +"Consider the following example function definitions paying close attention " +"to the markers ``/`` and ``*``::" +msgstr "" +"Betrachte die folgenden Definitionen der Beispielfunktionen und achte dabei " +"genau auf die Markierungen ``/`` und ``*``::" + +#: ../../tutorial/controlflow.rst:810 +msgid "" +">>> def standard_arg(arg):\n" +"... print(arg)\n" +"...\n" +">>> def pos_only_arg(arg, /):\n" +"... print(arg)\n" +"...\n" +">>> def kwd_only_arg(*, arg):\n" +"... print(arg)\n" +"...\n" +">>> def combined_example(pos_only, /, standard, *, kwd_only):\n" +"... print(pos_only, standard, kwd_only)" +msgstr "" +">>> def standard_arg(arg):\n" +"... print(arg)\n" +"...\n" +">>> def pos_only_arg(arg, /):\n" +"... print(arg)\n" +"...\n" +">>> def kwd_only_arg(*, arg):\n" +"... print(arg)\n" +"...\n" +">>> def combined_example(pos_only, /, standard, *, kwd_only):\n" +"... print(pos_only, standard, kwd_only)" + +#: ../../tutorial/controlflow.rst:823 +msgid "" +"The first function definition, ``standard_arg``, the most familiar form, " +"places no restrictions on the calling convention and arguments may be passed " +"by position or keyword::" +msgstr "" +"Die erste Funktionsdefinition, ``standard_arg``, die geläufigste Form, " +"schränkt die Aufrufkonvention nicht ein und Argumente können über die " +"Position oder per Schlüsselwort übergeben werden::" + +#: ../../tutorial/controlflow.rst:827 +msgid "" +">>> standard_arg(2)\n" +"2\n" +"\n" +">>> standard_arg(arg=2)\n" +"2" +msgstr "" +">>> standard_arg(2)\n" +"2\n" +"\n" +">>> standard_arg(arg=2)\n" +"2" + +#: ../../tutorial/controlflow.rst:833 +msgid "" +"The second function ``pos_only_arg`` is restricted to only use positional " +"parameters as there is a ``/`` in the function definition::" +msgstr "" +"Die zweite Funktion ``pos_only_arg`` ist darauf beschränkt, nur " +"Positionsparameter zu verwenden, da in der Funktionsdefinition ein ``/`` " +"steht::" + +#: ../../tutorial/controlflow.rst:836 +msgid "" +">>> pos_only_arg(1)\n" +"1\n" +"\n" +">>> pos_only_arg(arg=1)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: pos_only_arg() got some positional-only arguments passed as " +"keyword arguments: 'arg'" +msgstr "" +">>> pos_only_arg(1)\n" +"1\n" +"\n" +">>> pos_only_arg(arg=1)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: pos_only_arg() got some positional-only arguments passed as " +"keyword arguments: 'arg'" + +#: ../../tutorial/controlflow.rst:844 +msgid "" +"The third function ``kwd_only_arg`` only allows keyword arguments as " +"indicated by a ``*`` in the function definition::" +msgstr "" +"Die dritte Funktion ``kwd_only_arg`` erlaubt nur Schlüsselwortargumente, wie " +"durch ein ``*`` in der Funktionsdefinition angezeigt wird::" + +#: ../../tutorial/controlflow.rst:847 +msgid "" +">>> kwd_only_arg(3)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: kwd_only_arg() takes 0 positional arguments but 1 was given\n" +"\n" +">>> kwd_only_arg(arg=3)\n" +"3" +msgstr "" +">>> kwd_only_arg(3)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: kwd_only_arg() takes 0 positional arguments but 1 was given\n" +"\n" +">>> kwd_only_arg(arg=3)\n" +"3" + +#: ../../tutorial/controlflow.rst:855 +msgid "" +"And the last uses all three calling conventions in the same function " +"definition::" +msgstr "" +"Und die letzte verwendet alle drei Aufrufkonventionen in derselben " +"Funktionsdefinition::" + +#: ../../tutorial/controlflow.rst:858 +msgid "" +">>> combined_example(1, 2, 3)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: combined_example() takes 2 positional arguments but 3 were given\n" +"\n" +">>> combined_example(1, 2, kwd_only=3)\n" +"1 2 3\n" +"\n" +">>> combined_example(1, standard=2, kwd_only=3)\n" +"1 2 3\n" +"\n" +">>> combined_example(pos_only=1, standard=2, kwd_only=3)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: combined_example() got some positional-only arguments passed as " +"keyword arguments: 'pos_only'" +msgstr "" +">>> combined_example(1, 2, 3)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: combined_example() takes 2 positional arguments but 3 were given\n" +"\n" +">>> combined_example(1, 2, kwd_only=3)\n" +"1 2 3\n" +"\n" +">>> combined_example(1, standard=2, kwd_only=3)\n" +"1 2 3\n" +"\n" +">>> combined_example(pos_only=1, standard=2, kwd_only=3)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: combined_example() got some positional-only arguments passed as " +"keyword arguments: 'pos_only'" + +#: ../../tutorial/controlflow.rst:875 +msgid "" +"Finally, consider this function definition which has a potential collision " +"between the positional argument ``name`` and ``**kwds`` which has ``name`` " +"as a key::" +msgstr "" +"Betrachte schließlich diese Funktionsdefinition, bei der es zu einer " +"möglichen Kollision zwischen dem Positionsargument ``name`` und ``**kwds`` " +"kommt, das ``name`` als Schlüssel enthält::" + +#: ../../tutorial/controlflow.rst:877 +msgid "" +"def foo(name, **kwds):\n" +" return 'name' in kwds" +msgstr "" +"def foo(name, **kwds):\n" +" return 'name' in kwds" + +#: ../../tutorial/controlflow.rst:880 +msgid "" +"There is no possible call that will make it return ``True`` as the keyword " +"``'name'`` will always bind to the first parameter. For example::" +msgstr "" +"Es gibt keinen möglichen Aufruf, der dazu führt, dass sie ``True`` " +"zurückgibt, da das Schlüsselwort ``'name'`` immer an den ersten Parameter " +"gebunden wird. Zum Beispiel::" + +#: ../../tutorial/controlflow.rst:883 +msgid "" +">>> foo(1, **{'name': 2})\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: foo() got multiple values for argument 'name'\n" +">>>" +msgstr "" +">>> foo(1, **{'name': 2})\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: foo() got multiple values for argument 'name'\n" +">>>" + +#: ../../tutorial/controlflow.rst:889 +msgid "" +"But using ``/`` (positional only arguments), it is possible since it allows " +"``name`` as a positional argument and ``'name'`` as a key in the keyword " +"arguments::" +msgstr "" +"Aber unter Verwendung von ``/`` (reine Positionsargumente) ist es möglich, " +"da dies ``name`` als Positionsargument und ``'name'`` als Schlüssel in den " +"Schlüsselwortargumenten erlaubt::" + +#: ../../tutorial/controlflow.rst:891 +msgid "" +">>> def foo(name, /, **kwds):\n" +"... return 'name' in kwds\n" +"...\n" +">>> foo(1, **{'name': 2})\n" +"True" +msgstr "" +">>> def foo(name, /, **kwds):\n" +"... return 'name' in kwds\n" +"...\n" +">>> foo(1, **{'name': 2})\n" +"True" + +#: ../../tutorial/controlflow.rst:897 +msgid "" +"In other words, the names of positional-only parameters can be used in " +"``**kwds`` without ambiguity." +msgstr "" +"Mit anderen Worten können die Namen reiner Positions-Parameter ohne " +"Mehrdeutigkeit in ``**kwds`` verwendet werden." + +#: ../../tutorial/controlflow.rst:902 +msgid "Recap" +msgstr "Rückblick" + +#: ../../tutorial/controlflow.rst:904 +msgid "" +"The use case will determine which parameters to use in the function " +"definition::" +msgstr "" +"Der Anwendungsfall bestimmt, welche Parameter in der Funktionsdefinition zu " +"verwenden sind::" + +#: ../../tutorial/controlflow.rst:906 +msgid "def f(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):" +msgstr "def f(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):" + +#: ../../tutorial/controlflow.rst:908 +msgid "As guidance:" +msgstr "Als Orientierungshilfe:" + +#: ../../tutorial/controlflow.rst:910 +msgid "" +"Use positional-only if you want the name of the parameters to not be " +"available to the user. This is useful when parameter names have no real " +"meaning, if you want to enforce the order of the arguments when the function " +"is called or if you need to take some positional parameters and arbitrary " +"keywords." +msgstr "" +"Verwende reine Positions-Parameter, wenn der Name der Parameter dem Benutzer " +"nicht zur Verfügung stehen soll. Dies ist nützlich, wenn Parameternamen " +"keine wirkliche Bedeutung haben, wenn die Reihenfolge der Argumente beim " +"Aufruf der Funktion erzwungen werden soll oder wenn einige " +"Positionsparameter und beliebige Schlüsselwörter entgegengenommen werden " +"müssen." + +#: ../../tutorial/controlflow.rst:915 +msgid "" +"Use keyword-only when names have meaning and the function definition is more " +"understandable by being explicit with names or you want to prevent users " +"relying on the position of the argument being passed." +msgstr "" +"Verwende *keyword-only*, wenn Namen eine Bedeutung haben und die " +"Funktionsdefinition verständlicher ist, indem Namen explizit gemacht werden, " +"oder wenn du verhindern willst, dass sich Benutzer auf die Position des " +"übergebenen Arguments verlassen." + +#: ../../tutorial/controlflow.rst:918 +msgid "" +"For an API, use positional-only to prevent breaking API changes if the " +"parameter's name is modified in the future." +msgstr "" +"Verwende für eine API reine Positions-Parameter, um inkompatible API-" +"Änderungen zu verhindern, falls der Name des Parameters in Zukunft geändert " +"wird." + +#: ../../tutorial/controlflow.rst:924 +msgid "Arbitrary Argument Lists" +msgstr "Beliebige Argumentlisten" + +#: ../../tutorial/controlflow.rst:929 +msgid "" +"Finally, the least frequently used option is to specify that a function can " +"be called with an arbitrary number of arguments. These arguments will be " +"wrapped up in a tuple (see :ref:`tut-tuples`). Before the variable number " +"of arguments, zero or more normal arguments may occur. ::" +msgstr "" +"Schließlich ist die am seltensten genutzte Option anzugeben, dass eine " +"Funktion mit einer beliebigen Anzahl von Argumenten aufgerufen werden kann. " +"Diese Argumente werden in einem Tupel zusammengefasst (siehe :ref:`tut-" +"tuples`). Vor der variablen Anzahl von Argumenten können null oder mehr " +"normale Argumente vorkommen. ::" + +#: ../../tutorial/controlflow.rst:934 +msgid "" +"def write_multiple_items(file, separator, *args):\n" +" file.write(separator.join(args))" +msgstr "" +"def write_multiple_items(file, separator, *args):\n" +" file.write(separator.join(args))" + +#: ../../tutorial/controlflow.rst:938 +msgid "" +"Normally, these *variadic* arguments will be last in the list of formal " +"parameters, because they scoop up all remaining input arguments that are " +"passed to the function. Any formal parameters which occur after the " +"``*args`` parameter are 'keyword-only' arguments, meaning that they can only " +"be used as keywords rather than positional arguments. ::" +msgstr "" +"Normalerweise stehen diese *variadischen* Argumente an letzter Stelle in der " +"Liste der formalen Parameter, da sie alle verbleibenden Eingabeargumente " +"aufsammeln, die an die Funktion übergeben werden. Alle formalen Parameter, " +"die nach dem Parameter ``*args`` stehen, sind „Keyword-only“-Argumente, was " +"bedeutet, dass sie nur als Schlüsselwörter und nicht als Positionsargumente " +"verwendet werden können. ::" + +#: ../../tutorial/controlflow.rst:944 +msgid "" +">>> def concat(*args, sep=\"/\"):\n" +"... return sep.join(args)\n" +"...\n" +">>> concat(\"earth\", \"mars\", \"venus\")\n" +"'earth/mars/venus'\n" +">>> concat(\"earth\", \"mars\", \"venus\", sep=\".\")\n" +"'earth.mars.venus'" +msgstr "" +">>> def concat(*args, sep=\"/\"):\n" +"... return sep.join(args)\n" +"...\n" +">>> concat(\"earth\", \"mars\", \"venus\")\n" +"'earth/mars/venus'\n" +">>> concat(\"earth\", \"mars\", \"venus\", sep=\".\")\n" +"'earth.mars.venus'" + +#: ../../tutorial/controlflow.rst:955 +msgid "Unpacking Argument Lists" +msgstr "Entpacken von Argumentlisten" + +#: ../../tutorial/controlflow.rst:957 +msgid "" +"The reverse situation occurs when the arguments are already in a list or " +"tuple but need to be unpacked for a function call requiring separate " +"positional arguments. For instance, the built-in :func:`range` function " +"expects separate *start* and *stop* arguments. If they are not available " +"separately, write the function call with the ``*``\\ -operator to unpack " +"the arguments out of a list or tuple::" +msgstr "" +"Die umgekehrte Situation tritt ein, wenn die Argumente bereits in einer " +"Liste oder einem Tupel vorliegen, aber für einen Funktionsaufruf entpackt " +"werden müssen, der separate Positionsargumente erfordert. Beispielsweise " +"erwartet die eingebaute :func:`range`-Funktion separate *start*- und *stop*-" +"Argumente. Stehen diese nicht separat zur Verfügung, schreibe den " +"Funktionsaufruf mit dem ``*``\\\\ -Operator, um die Argumente aus einer " +"Liste oder einem Tupel zu entpacken::" + +#: ../../tutorial/controlflow.rst:964 +msgid "" +">>> list(range(3, 6)) # normal call with separate arguments\n" +"[3, 4, 5]\n" +">>> args = [3, 6]\n" +">>> list(range(*args)) # call with arguments unpacked from a " +"list\n" +"[3, 4, 5]" +msgstr "" +">>> list(range(3, 6)) # Normaler Aufruf mit separaten Argumenten\n" +"[3, 4, 5]\n" +">>> args = [3, 6]\n" +">>> list(range(*args)) # Aufruf mit aus einer Liste entpackten " +"Argumenten\n" +"[3, 4, 5]" + +#: ../../tutorial/controlflow.rst:973 +msgid "" +"In the same fashion, dictionaries can deliver keyword arguments with the " +"``**``\\ -operator::" +msgstr "" +"Auf die gleiche Weise können Wörterbücher mit dem ``**``\\\\ -Operator " +"Schlüsselwortargumente übergeben::" + +#: ../../tutorial/controlflow.rst:976 +msgid "" +">>> def parrot(voltage, state='a stiff', action='voom'):\n" +"... print(\"-- This parrot wouldn't\", action, end=' ')\n" +"... print(\"if you put\", voltage, \"volts through it.\", end=' ')\n" +"... print(\"E's\", state, \"!\")\n" +"...\n" +">>> d = {\"voltage\": \"four million\", \"state\": \"bleedin' demised\", " +"\"action\": \"VOOM\"}\n" +">>> parrot(**d)\n" +"-- This parrot wouldn't VOOM if you put four million volts through it. E's " +"bleedin' demised !" +msgstr "" +">>> def parrot(voltage, state='a stiff', action='voom'):\n" +"... print(\"-- This parrot wouldn't\", action, end=' ')\n" +"... print(\"if you put\", voltage, \"volts through it.\", end=' ')\n" +"... print(\"E's\", state, \"!\")\n" +"...\n" +">>> d = {\"voltage\": \"four million\", \"state\": \"bleedin' demised\", " +"\"action\": \"VOOM\"}\n" +">>> parrot(**d)\n" +"-- This parrot wouldn't VOOM if you put four million volts through it. E's " +"bleedin' demised !" + +#: ../../tutorial/controlflow.rst:989 +msgid "Lambda Expressions" +msgstr "Lambda-Ausdrücke" + +#: ../../tutorial/controlflow.rst:991 +msgid "" +"Small anonymous functions can be created with the :keyword:`lambda` keyword. " +"This function returns the sum of its two arguments: ``lambda a, b: a+b``. " +"Lambda functions can be used wherever function objects are required. They " +"are syntactically restricted to a single expression. Semantically, they are " +"just syntactic sugar for a normal function definition. Like nested function " +"definitions, lambda functions can reference variables from the containing " +"scope::" +msgstr "" +"Kleine anonyme Funktionen können mit dem Schlüsselwort :keyword:`lambda` " +"erstellt werden. Diese Funktion gibt die Summe ihrer beiden Argumente " +"zurück: ``lambda a, b: a+b``. Lambda-Funktionen können überall dort " +"verwendet werden, wo Funktionsobjekte benötigt werden. Sie sind syntaktisch " +"auf einen einzelnen Ausdruck beschränkt. Semantisch sind sie lediglich " +"syntaktischer Zucker für eine normale Funktionsdefinition. Wie " +"verschachtelte Funktionsdefinitionen können Lambda-Funktionen auf Variablen " +"aus dem umgebenden Gültigkeitsbereich verweisen::" + +#: ../../tutorial/controlflow.rst:999 +msgid "" +">>> def make_incrementor(n):\n" +"... return lambda x: x + n\n" +"...\n" +">>> f = make_incrementor(42)\n" +">>> f(0)\n" +"42\n" +">>> f(1)\n" +"43" +msgstr "" +">>> def make_incrementor(n):\n" +"... return lambda x: x + n\n" +"...\n" +">>> f = make_incrementor(42)\n" +">>> f(0)\n" +"42\n" +">>> f(1)\n" +"43" + +#: ../../tutorial/controlflow.rst:1008 +msgid "" +"The above example uses a lambda expression to return a function. Another " +"use is to pass a small function as an argument. For instance, :meth:`list." +"sort` takes a sorting key function *key* which can be a lambda function::" +msgstr "" +"Das obige Beispiel verwendet einen Lambda-Ausdruck, um eine Funktion " +"zurückzugeben. Eine weitere Anwendung ist die Übergabe einer kleinen " +"Funktion als Argument. Beispielsweise nimmt :meth:`list.sort` eine " +"Sortierschlüsselfunktion *key* an, bei der es sich um eine Lambda-Funktion " +"handeln kann::" + +#: ../../tutorial/controlflow.rst:1012 +msgid "" +">>> pairs = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')]\n" +">>> pairs.sort(key=lambda pair: pair[1])\n" +">>> pairs\n" +"[(4, 'four'), (1, 'one'), (3, 'three'), (2, 'two')]" +msgstr "" +">>> pairs = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')]\n" +">>> pairs.sort(key=lambda pair: pair[1])\n" +">>> pairs\n" +"[(4, 'four'), (1, 'one'), (3, 'three'), (2, 'two')]" + +#: ../../tutorial/controlflow.rst:1021 +msgid "Documentation Strings" +msgstr "Dokumentations-Zeichenketten" + +#: ../../tutorial/controlflow.rst:1028 +msgid "" +"Here are some conventions about the content and formatting of documentation " +"strings." +msgstr "" +"Hier sind einige Konventionen über den Inhalt und die Formatierung von " +"Dokumentations-Zeichenketten." + +#: ../../tutorial/controlflow.rst:1031 +msgid "" +"The first line should always be a short, concise summary of the object's " +"purpose. For brevity, it should not explicitly state the object's name or " +"type, since these are available by other means (except if the name happens " +"to be a verb describing a function's operation). This line should begin " +"with a capital letter and end with a period." +msgstr "" +"Die erste Zeile sollte immer eine kurze, prägnante Zusammenfassung des " +"Zwecks des Objekts sein. Der Kürze halber sollte sie weder den Namen noch " +"den Typ des Objekts explizit nennen, da diese auf andere Weise verfügbar " +"sind (außer wenn der Name zufällig ein Verb ist, das die Funktionsweise " +"beschreibt). Diese Zeile sollte mit einem Großbuchstaben beginnen und mit " +"einem Punkt enden." + +#: ../../tutorial/controlflow.rst:1037 +msgid "" +"If there are more lines in the documentation string, the second line should " +"be blank, visually separating the summary from the rest of the description. " +"The following lines should be one or more paragraphs describing the object's " +"calling conventions, its side effects, etc." +msgstr "" +"Gibt es weitere Zeilen in der Dokumentations-Zeichenkette, sollte die zweite " +"Zeile leer sein, um die Zusammenfassung visuell vom Rest der Beschreibung zu " +"trennen. Die folgenden Zeilen sollten aus einem oder mehreren Absätzen " +"bestehen, die die Aufrufkonventionen des Objekts, seine Seiteneffekte usw. " +"beschreiben." + +#: ../../tutorial/controlflow.rst:1042 +msgid "" +"The Python parser strips indentation from multi-line string literals when " +"they serve as module, class, or function docstrings." +msgstr "" +"Der Python-Parser entfernt die Einrückung aus mehrzeiligen String-Literalen, " +"wenn diese als Modul-, Klassen- oder Funktions-Docstrings dienen." + +#: ../../tutorial/controlflow.rst:1045 +msgid "Here is an example of a multi-line docstring::" +msgstr "Hier ist ein Beispiel für einen mehrzeiligen Docstring::" + +#: ../../tutorial/controlflow.rst:1047 +msgid "" +">>> def my_function():\n" +"... \"\"\"Do nothing, but document it.\n" +"...\n" +"... No, really, it doesn't do anything:\n" +"...\n" +"... >>> my_function()\n" +"... >>>\n" +"... \"\"\"\n" +"... pass\n" +"...\n" +">>> print(my_function.__doc__)\n" +"Do nothing, but document it.\n" +"\n" +"No, really, it doesn't do anything:\n" +"\n" +" >>> my_function()\n" +" >>>" +msgstr "" +">>> def my_function():\n" +"... \"\"\"Tut nichts, dokumentiert dies aber.\n" +"...\n" +"... Nein, wirklich, es tut nichts:\n" +"...\n" +"... >>> my_function()\n" +"... >>>\n" +"... \"\"\"\n" +"... pass\n" +"...\n" +">>> print(my_function.__doc__)\n" +"Tut nichts, dokumentiert dies aber.\n" +"\n" +"Nein, wirklich, es tut nichts:\n" +"\n" +" >>> my_function()\n" +" >>>" + +#: ../../tutorial/controlflow.rst:1069 +msgid "Function Annotations" +msgstr "Funktions-Annotationen" + +#: ../../tutorial/controlflow.rst:1076 +msgid "" +":ref:`Function annotations ` are completely optional metadata " +"information about the types used by user-defined functions (see :pep:`3107` " +"and :pep:`484` for more information)." +msgstr "" +":ref:`Funktions-Annotationen ` sind völlig optionale Metadaten-" +"Informationen über die Typen, die von benutzerdefinierten Funktionen " +"verwendet werden (siehe :pep:`3107` und :pep:`484` für weitere " +"Informationen)." + +#: ../../tutorial/controlflow.rst:1080 +msgid "" +":term:`Annotations ` are stored in the :attr:`~object." +"__annotations__` attribute of the function as a dictionary and have no " +"effect on any other part of the function. Parameter annotations are defined " +"by a colon after the parameter name, followed by an expression evaluating to " +"the value of the annotation. Return annotations are defined by a literal ``-" +">``, followed by an expression, between the parameter list and the colon " +"denoting the end of the :keyword:`def` statement. The following example has " +"a required argument, an optional argument, and the return value annotated::" +msgstr "" +":term:`Annotationen ` werden im Attribut :attr:`~object." +"__annotations__` der Funktion als Wörterbuch gespeichert und haben keinerlei " +"Auswirkung auf andere Teile der Funktion. Parameter-Annotationen werden " +"durch einen Doppelpunkt nach dem Parameternamen definiert, gefolgt von einem " +"Ausdruck, der den Wert der Annotation ergibt. Rückgabe-Annotationen werden " +"durch das Literal ``->`` gefolgt von einem Ausdruck zwischen der " +"Parameterliste und dem Doppelpunkt definiert, der das Ende der :keyword:" +"`def`-Anweisung markiert. Das folgende Beispiel hat ein erforderliches " +"Argument, ein optionales Argument sowie einen annotierten Rückgabewert::" + +#: ../../tutorial/controlflow.rst:1089 +msgid "" +">>> def f(ham: str, eggs: str = 'eggs') -> str:\n" +"... print(\"Annotations:\", f.__annotations__)\n" +"... print(\"Arguments:\", ham, eggs)\n" +"... return ham + ' and ' + eggs\n" +"...\n" +">>> f('spam')\n" +"Annotations: {'ham': , 'return': , 'eggs': }\n" +"Arguments: spam eggs\n" +"'spam and eggs'" +msgstr "" +">>> def f(ham: str, eggs: str = 'eggs') -> str:\n" +"... print(\"Annotations:\", f.__annotations__)\n" +"... print(\"Arguments:\", ham, eggs)\n" +"... return ham + ' and ' + eggs\n" +"...\n" +">>> f('spam')\n" +"Annotations: {'ham': , 'return': , 'eggs': }\n" +"Arguments: spam eggs\n" +"'spam and eggs'" + +#: ../../tutorial/controlflow.rst:1102 +msgid "Intermezzo: Coding Style" +msgstr "Intermezzo: Programmierstil" + +#: ../../tutorial/controlflow.rst:1106 +msgid "" +"Now that you are about to write longer, more complex pieces of Python, it is " +"a good time to talk about *coding style*. Most languages can be written (or " +"more concisely, *formatted*) in different styles; some are more readable " +"than others. Making it easy for others to read your code is always a good " +"idea, and adopting a nice coding style helps tremendously for that." +msgstr "" +"Nun, da du im Begriff sind, längere und komplexere Stücke Python-Code zu " +"schreiben, ist ein guter Zeitpunkt, über den *Programmierstil* (*coding " +"style*) zu sprechen. Die meisten Sprachen können in unterschiedlichen Stilen " +"geschrieben (oder genauer gesagt *formatiert*) werden. Manche sind besser " +"lesbar als andere. Es anderen leicht zu machen, den eigenen Code zu lesen, " +"ist immer eine gute Idee, und die Aneignung eines guten Programmierstils " +"hilft dabei ungemein." + +#: ../../tutorial/controlflow.rst:1112 +msgid "" +"For Python, :pep:`8` has emerged as the style guide that most projects " +"adhere to; it promotes a very readable and eye-pleasing coding style. Every " +"Python developer should read it at some point; here are the most important " +"points extracted for you:" +msgstr "" +"Für Python hat sich :pep:`8` als der Styleguide herauskristallisiert, an den " +"sich die meisten Projekte halten. Er fördert einen sehr gut lesbaren und " +"ansprechenden Programmierstil. Alle Python-Entwickler sollten ihn irgendwann " +"gelesen haben. Hier sind die wichtigsten Punkte für dich zusammengefasst:\"" + +#: ../../tutorial/controlflow.rst:1117 +msgid "Use 4-space indentation, and no tabs." +msgstr "Verwende 4 Leerzeichen zur Einrückung und keine Tabulatoren." + +#: ../../tutorial/controlflow.rst:1119 +msgid "" +"4 spaces are a good compromise between small indentation (allows greater " +"nesting depth) and large indentation (easier to read). Tabs introduce " +"confusion, and are best left out." +msgstr "" +"4 Leerzeichen sind ein guter Kompromiss zwischen einer geringen Einrückung " +"(ermöglicht eine größere Schachtelungstiefe) und einer großen Einrückung " +"(leichter zu lesen). Tabulatoren sorgen für Verwirrung und werden am besten " +"weggelassen." + +#: ../../tutorial/controlflow.rst:1123 +msgid "Wrap lines so that they don't exceed 79 characters." +msgstr "Brich Zeilen um, sodass sie 79 Zeichen nicht überschreiten." + +#: ../../tutorial/controlflow.rst:1125 +msgid "" +"This helps users with small displays and makes it possible to have several " +"code files side-by-side on larger displays." +msgstr "" +"Dies hilft Nutzern mit kleinen Bildschirmen und ermöglicht es, auf größeren " +"Bildschirmen mehrere Code-Dateien nebeneinander anzuzeigen." + +#: ../../tutorial/controlflow.rst:1128 +msgid "" +"Use blank lines to separate functions and classes, and larger blocks of code " +"inside functions." +msgstr "" +"Verwende Leerzeilen, um Funktionen und Klassen sowie größere Codeblöcke " +"innerhalb von Funktionen voneinander zu trennen." + +#: ../../tutorial/controlflow.rst:1131 +msgid "When possible, put comments on a line of their own." +msgstr "Setze Kommentare nach Möglichkeit in eine eigene Zeile." + +#: ../../tutorial/controlflow.rst:1133 +msgid "Use docstrings." +msgstr "Verwende Dokumentations-Zeichenketten." + +#: ../../tutorial/controlflow.rst:1135 +msgid "" +"Use spaces around operators and after commas, but not directly inside " +"bracketing constructs: ``a = f(1, 2) + g(3, 4)``." +msgstr "" +"Verwende Leerzeichen um Operatoren und nach Kommas, aber nicht direkt " +"innerhalb von Klammerkonstrukten: ``a = f(1, 2) + g(3, 4)``." + +#: ../../tutorial/controlflow.rst:1138 +msgid "" +"Name your classes and functions consistently; the convention is to use " +"``UpperCamelCase`` for classes and ``lowercase_with_underscores`` for " +"functions and methods. Always use ``self`` as the name for the first method " +"argument (see :ref:`tut-firstclasses` for more on classes and methods)." +msgstr "" +"Benenne deine Klassen und Funktionen einheitlich. Die Konvention ist, " +"``UpperCamelCase`` für Klassen und ``lowercase_with_underscores`` für " +"Funktionen und Methoden zu verwenden. Verwende immer ``self`` als Namen für " +"das erste Methodenargument (siehe :ref:`tut-firstclasses` für mehr zu " +"Klassen und Methoden)." + +#: ../../tutorial/controlflow.rst:1143 +msgid "" +"Don't use fancy encodings if your code is meant to be used in international " +"environments. Python's default, UTF-8, or even plain ASCII work best in any " +"case." +msgstr "" +"Verwende keine ausgefallenen Zeichenkodierungen, wenn dein Code in " +"internationalen Umgebungen verwendet werden soll. Pythons Standard UTF-8 " +"oder sogar einfaches ASCII funktionieren in jedem Fall am besten." + +#: ../../tutorial/controlflow.rst:1147 +msgid "" +"Likewise, don't use non-ASCII characters in identifiers if there is only the " +"slightest chance people speaking a different language will read or maintain " +"the code." +msgstr "" +"Verwende ebenso keine Nicht-ASCII-Zeichen in Bezeichnern, wenn auch nur die " +"geringste Wahrscheinlichkeit besteht, dass Personen, die eine andere Sprache " +"sprechen, den Code lesen oder warten." + +#: ../../tutorial/controlflow.rst:1153 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../tutorial/controlflow.rst:1154 +msgid "" +"Actually, *call by object reference* would be a better description, since if " +"a mutable object is passed, the caller will see any changes the callee makes " +"to it (items inserted into a list)." +msgstr "" +"Tatsächlich wäre *call by object reference* (Aufruf über Objektreferenz) " +"eine bessere Beschreibung, da der Aufrufer jede Änderung sieht, die der " +"Aufgerufene an einem übergebenen veränderbaren Objekt vornimmt (z. B. in " +"eine Liste eingefügte Elemente)." + +#: ../../tutorial/controlflow.rst:48 +msgid "statement" +msgstr "Anweisung" + +#: ../../tutorial/controlflow.rst:48 +msgid "for" +msgstr "for" + +#: ../../tutorial/controlflow.rst:254 +msgid "..." +msgstr "..." + +#: ../../tutorial/controlflow.rst:254 +msgid "ellipsis literal" +msgstr "Ellipsis-Literal" + +#: ../../tutorial/controlflow.rst:485 ../../tutorial/controlflow.rst:1023 +msgid "documentation strings" +msgstr "Ellipsis-Literal" + +#: ../../tutorial/controlflow.rst:485 ../../tutorial/controlflow.rst:1023 +msgid "docstrings" +msgstr "Dokumentations-Zeichenketten" + +#: ../../tutorial/controlflow.rst:485 ../../tutorial/controlflow.rst:1023 +msgid "strings, documentation" +msgstr "Zeichenketten, Dokumentation" + +#: ../../tutorial/controlflow.rst:926 +msgid "* (asterisk)" +msgstr "* (Sternchen)" + +#: ../../tutorial/controlflow.rst:926 ../../tutorial/controlflow.rst:970 +msgid "in function calls" +msgstr "in Funktionsaufrufen" + +#: ../../tutorial/controlflow.rst:970 +msgid "**" +msgstr "**" + +#: ../../tutorial/controlflow.rst:1071 +msgid "function" +msgstr "Funktion" + +#: ../../tutorial/controlflow.rst:1071 +msgid "annotations" +msgstr "Annotationen" + +#: ../../tutorial/controlflow.rst:1071 +msgid "->" +msgstr "->" + +#: ../../tutorial/controlflow.rst:1071 +msgid "function annotations" +msgstr "Funktions-Annotationen" + +#: ../../tutorial/controlflow.rst:1071 +msgid ": (colon)" +msgstr "Doppelpunkt" + +#: ../../tutorial/controlflow.rst:1104 +msgid "coding" +msgstr "Codierung" + +#: ../../tutorial/controlflow.rst:1104 +msgid "style" +msgstr "Stil" + +#~ msgid "" +#~ "The Python parser does not strip indentation from multi-line string " +#~ "literals in Python, so tools that process documentation have to strip " +#~ "indentation if desired. This is done using the following convention. The " +#~ "first non-blank line *after* the first line of the string determines the " +#~ "amount of indentation for the entire documentation string. (We can't use " +#~ "the first line since it is generally adjacent to the string's opening " +#~ "quotes so its indentation is not apparent in the string literal.) " +#~ "Whitespace \"equivalent\" to this indentation is then stripped from the " +#~ "start of all lines of the string. Lines that are indented less should " +#~ "not occur, but if they occur all their leading whitespace should be " +#~ "stripped. Equivalence of whitespace should be tested after expansion of " +#~ "tabs (to 8 spaces, normally)." +#~ msgstr "" +#~ "Der Python-Parser entfernt keine Einrückungen aus mehrzeiligen " +#~ "Zeichenketten-Literalen in Python, daher müssen Werkzeuge zur " +#~ "Dokumentationsverarbeitung Einrückungen bei Bedarf selbst entfernen. Dies " +#~ "geschieht nach folgender Konvention: Die erste nicht-leere Zeile *nach* " +#~ "der ersten Zeile der Zeichenkette bestimmt das Maß der Einrückung für die " +#~ "gesamte Dokumentations-Zeichenkette. (Die erste Zeile kann nicht " +#~ "verwendet werden, da sie in der Regel direkt an die öffnenden " +#~ "Anführungszeichen anschließt und ihre Einrückung im Zeichenketten-Literal " +#~ "daher nicht erkennbar ist.) Whitespace, der dieser Einrückung " +#~ "„äquivalent“ ist, wird dann am Anfang aller Zeilen der Zeichenkette " +#~ "entfernt. Zeilen, die weniger eingerückt sind, sollten nicht vorkommen; " +#~ "treten sie dennoch auf, sollte ihr gesamter führender Whitespace entfernt " +#~ "werden. Die Äquivalenz von Whitespace sollte nach der Ersetzung von " +#~ "Tabulatoren (normalerweise durch 8 Leerzeichen) geprüft werden." diff --git a/tutorial/datastructures.po b/tutorial/datastructures.po index c284f8ae..77307707 100644 --- a/tutorial/datastructures.po +++ b/tutorial/datastructures.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -288,7 +288,7 @@ msgstr "" "Elemente um eine Position verschoben werden müssen). Weitere Informationen " "findest du unter :ref:`time-complexity`." -#: ../../tutorial/datastructures.rst:172 +#: ../../tutorial/datastructures.rst:173 msgid "" "To implement a queue, use :class:`collections.deque` which was designed to " "have fast appends and pops from both ends. For example::" @@ -297,7 +297,7 @@ msgstr "" "deque`, das für schnelles Hinzufügen und Entnehmen von beiden Enden " "ausgelegt ist. Beispiel::" -#: ../../tutorial/datastructures.rst:175 +#: ../../tutorial/datastructures.rst:176 msgid "" ">>> from collections import deque\n" ">>> queue = deque([\"Eric\", \"John\", \"Michael\"])\n" @@ -324,11 +324,11 @@ msgstr "" "Reihenfolge der Ankunft\n" "deque(['Michael', 'Terry', 'Graham'])" -#: ../../tutorial/datastructures.rst:190 +#: ../../tutorial/datastructures.rst:191 msgid "List Comprehensions" msgstr "Listen-Abstraktion" -#: ../../tutorial/datastructures.rst:192 +#: ../../tutorial/datastructures.rst:193 msgid "" "List comprehensions provide a concise way to create lists. Common " "applications are to make new lists where each element is the result of some " @@ -342,13 +342,13 @@ msgstr "" "oder die Erstellung einer Teilsequenz aus den Elementen, die eine bestimmte " "Bedingung erfüllen." -#: ../../tutorial/datastructures.rst:197 +#: ../../tutorial/datastructures.rst:198 msgid "For example, assume we want to create a list of squares, like::" msgstr "" "Nehmen wir zum Beispiel an, wir möchten eine Liste von Quadraten erstellen, " "etwa wie folgt:" -#: ../../tutorial/datastructures.rst:199 +#: ../../tutorial/datastructures.rst:200 msgid "" ">>> squares = []\n" ">>> for x in range(10):\n" @@ -364,7 +364,7 @@ msgstr "" ">>> squares\n" "[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]" -#: ../../tutorial/datastructures.rst:206 +#: ../../tutorial/datastructures.rst:207 msgid "" "Note that this creates (or overwrites) a variable named ``x`` that still " "exists after the loop completes. We can calculate the list of squares " @@ -375,23 +375,23 @@ msgstr "" "ist. Wir können die Liste der Quadrate ohne Nebenwirkungen wie folgt " "berechnen:" -#: ../../tutorial/datastructures.rst:210 +#: ../../tutorial/datastructures.rst:211 msgid "squares = list(map(lambda x: x**2, range(10)))" msgstr "Quadrate = list(map(lambda x: x**2, range(10)))" -#: ../../tutorial/datastructures.rst:212 +#: ../../tutorial/datastructures.rst:213 msgid "or, equivalently::" msgstr "oder, gleichbedeutend::" -#: ../../tutorial/datastructures.rst:214 +#: ../../tutorial/datastructures.rst:215 msgid "squares = [x**2 for x in range(10)]" msgstr "Quadrate = [x**2 for x in range(10)]" -#: ../../tutorial/datastructures.rst:216 +#: ../../tutorial/datastructures.rst:217 msgid "which is more concise and readable." msgstr "was prägnanter und besser lesbar ist." -#: ../../tutorial/datastructures.rst:218 +#: ../../tutorial/datastructures.rst:219 msgid "" "A list comprehension consists of brackets containing an expression followed " "by a :keyword:`!for` clause, then zero or more :keyword:`!for` or :keyword:`!" @@ -408,7 +408,7 @@ msgstr "" "Listenkomprimierung kombiniert beispielsweise die Elemente zweier Listen, " "sofern sie nicht identisch sind:" -#: ../../tutorial/datastructures.rst:225 +#: ../../tutorial/datastructures.rst:226 msgid "" ">>> [(x, y) for x in [1,2,3] for y in [3,1,4] if x != y]\n" "[(1, 3), (1, 4), (2, 3), (2, 1), (2, 4), (3, 1), (3, 4)]" @@ -416,11 +416,11 @@ msgstr "" ">>> [(x, y) für x in [1, 2, 3] für y in [3, 1, 4], wenn x != y]\n" "[(1, 3), (1, 4), (2, 3), (2, 1), (2, 4), (3, 1), (3, 4)]" -#: ../../tutorial/datastructures.rst:228 +#: ../../tutorial/datastructures.rst:229 msgid "and it's equivalent to::" msgstr "und das entspricht::" -#: ../../tutorial/datastructures.rst:230 +#: ../../tutorial/datastructures.rst:231 msgid "" ">>> combs = []\n" ">>> for x in [1,2,3]:\n" @@ -440,7 +440,7 @@ msgstr "" ">>> combs\n" "[(1, 3), (1, 4), (2, 3), (2, 1), (2, 4), (3, 1), (3, 4)]" -#: ../../tutorial/datastructures.rst:239 +#: ../../tutorial/datastructures.rst:240 msgid "" "Note how the order of the :keyword:`for` and :keyword:`if` statements is the " "same in both these snippets." @@ -448,7 +448,7 @@ msgstr "" "Beachte, dass die Reihenfolge der Anweisungen :keyword:`for` und :keyword:" "`if` in beiden Codeausschnitten identisch ist." -#: ../../tutorial/datastructures.rst:242 +#: ../../tutorial/datastructures.rst:243 msgid "" "If the expression is a tuple (e.g. the ``(x, y)`` in the previous example), " "it must be parenthesized. ::" @@ -456,7 +456,7 @@ msgstr "" "Wenn es sich bei dem Ausdruck um ein Tupel handelt (z. B. ``(x, y)`` im " "vorherigen Beispiel), muss es in Klammern gesetzt werden. ::" -#: ../../tutorial/datastructures.rst:245 +#: ../../tutorial/datastructures.rst:246 msgid "" ">>> vec = [-4, -2, 0, 2, 4]\n" ">>> # create a new list with the values doubled\n" @@ -517,14 +517,14 @@ msgstr "" ">>> [num for elem in vec for num in elem]\n" "[1, 2, 3, 4, 5, 6, 7, 8, 9]" -#: ../../tutorial/datastructures.rst:273 +#: ../../tutorial/datastructures.rst:274 msgid "" "List comprehensions can contain complex expressions and nested functions::" msgstr "" "Listen-Abstraktionen können komplexe Ausdrücke und verschachtelte Funktionen " "enthalten::" -#: ../../tutorial/datastructures.rst:275 +#: ../../tutorial/datastructures.rst:276 msgid "" ">>> from math import pi\n" ">>> [str(round(pi, i)) for i in range(1, 6)]\n" @@ -534,11 +534,11 @@ msgstr "" ">>> [str(round(pi, i)) for i in range(1, 6)]\n" "['3,1', '3,14', '3,142', '3,1416', '3,14159']" -#: ../../tutorial/datastructures.rst:280 +#: ../../tutorial/datastructures.rst:281 msgid "Nested List Comprehensions" msgstr "Verschachtelte Listen-Abstraktion" -#: ../../tutorial/datastructures.rst:282 +#: ../../tutorial/datastructures.rst:283 msgid "" "The initial expression in a list comprehension can be any arbitrary " "expression, including another list comprehension." @@ -546,7 +546,7 @@ msgstr "" "Der erste Ausdruck in einer Listen-Abstraktion kann ein beliebiger Ausdruck " "sein, einschließlich einer weiteren Listen-Abstraktion." -#: ../../tutorial/datastructures.rst:285 +#: ../../tutorial/datastructures.rst:286 msgid "" "Consider the following example of a 3x4 matrix implemented as a list of 3 " "lists of length 4::" @@ -554,7 +554,7 @@ msgstr "" "Betrachte das folgende Beispiel einer 3×4-Matrix, die als Liste aus drei " "Listen der Länge 4 implementiert ist::" -#: ../../tutorial/datastructures.rst:288 +#: ../../tutorial/datastructures.rst:289 msgid "" ">>> matrix = [\n" "... [1, 2, 3, 4],\n" @@ -568,11 +568,11 @@ msgstr "" "... [9, 10, 11, 12],\n" "... ]" -#: ../../tutorial/datastructures.rst:294 +#: ../../tutorial/datastructures.rst:295 msgid "The following list comprehension will transpose rows and columns::" msgstr "Die folgende Listen-Abstraktion transponiert Zeilen und Spalten::" -#: ../../tutorial/datastructures.rst:296 +#: ../../tutorial/datastructures.rst:297 msgid "" ">>> [[row[i] for row in matrix] for i in range(4)]\n" "[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" @@ -580,7 +580,7 @@ msgstr "" ">>> [[row[i] for row in matrix] for i in range(4)]\n" "[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" -#: ../../tutorial/datastructures.rst:299 +#: ../../tutorial/datastructures.rst:300 msgid "" "As we saw in the previous section, the inner list comprehension is evaluated " "in the context of the :keyword:`for` that follows it, so this example is " @@ -590,7 +590,7 @@ msgstr "" "im Kontext des darauf folgenden :keyword:`for` ausgewertet, sodass dieses " "Beispiel gleichbedeutend ist mit::" -#: ../../tutorial/datastructures.rst:303 +#: ../../tutorial/datastructures.rst:304 msgid "" ">>> transposed = []\n" ">>> for i in range(4):\n" @@ -606,11 +606,11 @@ msgstr "" ">>> transposed\n" "[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" -#: ../../tutorial/datastructures.rst:310 +#: ../../tutorial/datastructures.rst:311 msgid "which, in turn, is the same as::" msgstr "was wiederum dasselbe ist wie::" -#: ../../tutorial/datastructures.rst:312 +#: ../../tutorial/datastructures.rst:313 msgid "" ">>> transposed = []\n" ">>> for i in range(4):\n" @@ -635,7 +635,7 @@ msgstr "" ">>> transponiert\n" "[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" -#: ../../tutorial/datastructures.rst:323 +#: ../../tutorial/datastructures.rst:324 msgid "" "In the real world, you should prefer built-in functions to complex flow " "statements. The :func:`zip` function would do a great job for this use case::" @@ -644,7 +644,7 @@ msgstr "" "vorziehen. Die Funktion :func:`zip` eignet sich hervorragend für diesen " "Anwendungsfall:" -#: ../../tutorial/datastructures.rst:326 +#: ../../tutorial/datastructures.rst:327 msgid "" ">>> list(zip(*matrix))\n" "[(1, 5, 9), (2, 6, 10), (3, 7, 11), (4, 8, 12)]" @@ -652,18 +652,18 @@ msgstr "" ">>> list(zip(*matrix))\n" "[(1, 5, 9), (2, 6, 10), (3, 7, 11), (4, 8, 12)]" -#: ../../tutorial/datastructures.rst:329 +#: ../../tutorial/datastructures.rst:330 msgid "" "See :ref:`tut-unpacking-arguments` for details on the asterisk in this line." msgstr "" "Weitere Informationen zum Sternchen in dieser Zeile findest du unter :ref:" "`tut-unpacking-arguments`." -#: ../../tutorial/datastructures.rst:332 +#: ../../tutorial/datastructures.rst:333 msgid "Unpacking in Lists and List Comprehensions" msgstr "Entpacken in Listen und List Comprehensions" -#: ../../tutorial/datastructures.rst:334 +#: ../../tutorial/datastructures.rst:335 msgid "" "The section on :ref:`tut-unpacking-arguments` describes the use of ``*`` to " "\"unpack\" the elements of an iterable object, providing each one separately " @@ -680,7 +680,7 @@ msgstr "" "vorangestellt, wird das Ergebnis dieses Ausdrucks entpackt, wobei jedes " "seiner Elemente der Liste hinzugefügt wird, die wir gerade erstellen::" -#: ../../tutorial/datastructures.rst:341 +#: ../../tutorial/datastructures.rst:342 msgid "" ">>> x = [1, 2, 3]\n" ">>> [0, *x, 4, 5, 6]\n" @@ -690,7 +690,7 @@ msgstr "" ">>> [0, *x, 4, 5, 6]\n" "[0, 1, 2, 3, 4, 5, 6]" -#: ../../tutorial/datastructures.rst:345 +#: ../../tutorial/datastructures.rst:346 msgid "" "This only works if the expression following the ``*`` evaluates to an " "iterable object; trying to unpack a non-iterable object will raise an " @@ -700,7 +700,7 @@ msgstr "" "iterierbaren Objekt ausgewertet wird; der Versuch, ein nicht iterierbares " "Objekt zu entpacken, löst eine Ausnahme aus::" -#: ../../tutorial/datastructures.rst:348 +#: ../../tutorial/datastructures.rst:349 msgid "" ">>> x = 1\n" ">>> [0, *x, 2, 3, 4]\n" @@ -716,7 +716,7 @@ msgstr "" " [0, *x, 2, 3, 4]\n" "TypeError: Value after * must be an iterable, not int" -#: ../../tutorial/datastructures.rst:355 +#: ../../tutorial/datastructures.rst:356 msgid "" "Unpacking can also be used in list comprehensions, as a way to build a new " "list representing the concatenation of an arbitrary number of iterables::" @@ -725,7 +725,7 @@ msgstr "" "Liste zu erstellen, die die Verkettung einer beliebigen Anzahl von " "iterierbaren Objekten darstellt::" -#: ../../tutorial/datastructures.rst:358 +#: ../../tutorial/datastructures.rst:359 msgid "" ">>> x = [[1, 2, 3], [4, 5, 6], [], [7], [8, 9]]\n" ">>> [*element for element in x]\n" @@ -735,7 +735,7 @@ msgstr "" ">>> [*element for element in x]\n" "[1, 2, 3, 4, 5, 6, 7, 8, 9]" -#: ../../tutorial/datastructures.rst:362 +#: ../../tutorial/datastructures.rst:363 msgid "" "Note that the effect is that each element from ``x`` is unpacked. This " "works for arbitrary iterable objects, not just lists::" @@ -743,7 +743,7 @@ msgstr "" "Beachte, dass dabei jedes Element aus ``x`` entpackt wird. Dies funktioniert " "für beliebige iterierbare Objekte, nicht nur für Listen::" -#: ../../tutorial/datastructures.rst:365 +#: ../../tutorial/datastructures.rst:366 msgid "" ">>> x = [[1, 2, 3], 'cat', {'spam': 'eggs'}]\n" ">>> [*element for element in x]\n" @@ -753,7 +753,7 @@ msgstr "" ">>> [*element for element in x]\n" "[1, 2, 3, 'c', 'a', 't', 'spam']" -#: ../../tutorial/datastructures.rst:369 +#: ../../tutorial/datastructures.rst:370 msgid "" "But if the objects in ``x`` are not iterable, this expression would again " "raise an exception." @@ -761,11 +761,11 @@ msgstr "" "Wenn die Objekte in ``x`` jedoch nicht iterierbar sind, würde dieser " "Ausdruck erneut eine Ausnahme auslösen." -#: ../../tutorial/datastructures.rst:375 +#: ../../tutorial/datastructures.rst:376 msgid "The :keyword:`!del` statement" msgstr "Die Erklärung der :keyword:`!del`" -#: ../../tutorial/datastructures.rst:377 +#: ../../tutorial/datastructures.rst:378 msgid "" "There is a way to remove an item from a list given its index instead of its " "value: the :keyword:`del` statement. This differs from the :meth:`~list." @@ -781,7 +781,7 @@ msgstr "" "(was wir zuvor durch die Zuweisung einer leeren Liste zur Teilmenge getan " "haben). Zum Beispiel::" -#: ../../tutorial/datastructures.rst:383 +#: ../../tutorial/datastructures.rst:384 msgid "" ">>> a = [-1, 1, 66.25, 333, 333, 1234.5]\n" ">>> del a[0]\n" @@ -805,16 +805,16 @@ msgstr "" ">>> a\n" "[]" -#: ../../tutorial/datastructures.rst:394 +#: ../../tutorial/datastructures.rst:395 msgid ":keyword:`del` can also be used to delete entire variables::" msgstr "" ":keyword:`del` kann auch zum Löschen ganzer Variablen verwendet werden::" -#: ../../tutorial/datastructures.rst:396 +#: ../../tutorial/datastructures.rst:397 msgid ">>> del a" msgstr ">>> del a" -#: ../../tutorial/datastructures.rst:398 +#: ../../tutorial/datastructures.rst:399 msgid "" "Referencing the name ``a`` hereafter is an error (at least until another " "value is assigned to it). We'll find other uses for :keyword:`del` later." @@ -823,11 +823,11 @@ msgstr "" "ihm ein anderer Wert zugewiesen wird). Wir werden später noch weitere " "Verwendungsmöglichkeiten für :keyword:`del` finden." -#: ../../tutorial/datastructures.rst:405 +#: ../../tutorial/datastructures.rst:406 msgid "Tuples and Sequences" msgstr "Tupel und Sequenzen" -#: ../../tutorial/datastructures.rst:407 +#: ../../tutorial/datastructures.rst:408 msgid "" "We saw that lists and strings have many common properties, such as indexing " "and slicing operations. They are two examples of *sequence* data types " @@ -842,14 +842,14 @@ msgstr "" "können weitere Sequenz-Datentypen hinzukommen. Es gibt außerdem einen " "weiteren standardmäßigen Sequenz-Datentyp: das *Tupel*." -#: ../../tutorial/datastructures.rst:413 +#: ../../tutorial/datastructures.rst:414 msgid "" "A tuple consists of a number of values separated by commas, for instance::" msgstr "" "Ein Tupel besteht aus einer Reihe von Werten, die durch Kommas getrennt " "sind, zum Beispiel::" -#: ../../tutorial/datastructures.rst:415 +#: ../../tutorial/datastructures.rst:416 msgid "" ">>> t = 12345, 54321, 'hello!'\n" ">>> t[0]\n" @@ -897,7 +897,7 @@ msgstr "" ">>> 0, *x, 4\n" "(0, 1, 2, 3, 4)" -#: ../../tutorial/datastructures.rst:438 +#: ../../tutorial/datastructures.rst:439 msgid "" "As you see, on output tuples are always enclosed in parentheses, so that " "nested tuples are interpreted correctly; they may be input with or without " @@ -914,7 +914,7 @@ msgstr "" "ist jedoch möglich, Tupel zu erstellen, die veränderbare Objekte wie " "beispielsweise Listen enthalten." -#: ../../tutorial/datastructures.rst:445 +#: ../../tutorial/datastructures.rst:446 msgid "" "Though tuples may seem similar to lists, they are often used in different " "situations and for different purposes. Tuples are :term:`immutable`, and " @@ -933,7 +933,7 @@ msgstr "" "sind :term:`veränderlich `, und ihre Elemente sind in der Regel " "homogen; der Zugriff erfolgt durch Iteration über die Liste." -#: ../../tutorial/datastructures.rst:453 +#: ../../tutorial/datastructures.rst:454 msgid "" "A special problem is the construction of tuples containing 0 or 1 items: the " "syntax has some extra quirks to accommodate these. Empty tuples are " @@ -948,7 +948,7 @@ msgstr "" "ein Komma nachsetzt (es reicht nicht aus, einen einzelnen Wert in Klammern " "zu setzen). Unschön, aber effektiv. Zum Beispiel::" -#: ../../tutorial/datastructures.rst:459 +#: ../../tutorial/datastructures.rst:460 msgid "" ">>> empty = ()\n" ">>> singleton = 'hello', # <-- note trailing comma\n" @@ -968,7 +968,7 @@ msgstr "" ">>> singleton\n" "('hello',)" -#: ../../tutorial/datastructures.rst:468 +#: ../../tutorial/datastructures.rst:469 msgid "" "The statement ``t = 12345, 54321, 'hello!'`` is an example of *tuple " "packing*: the values ``12345``, ``54321`` and ``'hello!'`` are packed " @@ -978,11 +978,11 @@ msgstr "" "Packing*: Die Werte ``12345``, ``54321`` und ``'hello!'`` werden in einem " "Tupel zusammengefasst. Auch die umgekehrte Operation ist möglich::" -#: ../../tutorial/datastructures.rst:472 +#: ../../tutorial/datastructures.rst:473 msgid ">>> x, y, z = t" msgstr ">>> x, y, z = t" -#: ../../tutorial/datastructures.rst:474 +#: ../../tutorial/datastructures.rst:475 msgid "" "This is called, appropriately enough, *sequence unpacking* and works for any " "sequence on the right-hand side. Sequence unpacking requires that there are " @@ -997,11 +997,11 @@ msgstr "" "Beachte, dass die Mehrfachzuweisung im Grunde nur eine Kombination aus Tupel-" "Packing und Sequenz-Unpacking ist." -#: ../../tutorial/datastructures.rst:484 +#: ../../tutorial/datastructures.rst:485 msgid "Sets" msgstr "Sets" -#: ../../tutorial/datastructures.rst:486 +#: ../../tutorial/datastructures.rst:487 msgid "" "Python also includes a data type for :ref:`sets `. A set is an " "unordered collection with no duplicate elements. Basic uses include " @@ -1016,7 +1016,7 @@ msgstr "" "unterstützen zudem mathematische Operationen wie Vereinigung, Schnittmenge, " "Differenz und symmetrische Differenz." -#: ../../tutorial/datastructures.rst:492 +#: ../../tutorial/datastructures.rst:493 msgid "" "Curly braces or the :func:`set` function can be used to create sets. Note: " "to create an empty set you have to use ``set()``, not ``{}``; the latter " @@ -1028,7 +1028,7 @@ msgstr "" "Sie ``set()`` verwenden, nicht ``{}``; Letzteres erstellt ein leeres " "Wörterbuch, eine Datenstruktur, die wir im nächsten Abschnitt behandeln." -#: ../../tutorial/datastructures.rst:496 +#: ../../tutorial/datastructures.rst:497 msgid "" "Because sets are unordered, iterating over them or printing them can produce " "the elements in a different order than you expect." @@ -1037,11 +1037,11 @@ msgstr "" "Elemente vorkommen, dass diese in einer anderen Reihenfolge angezeigt " "werden, als erwartet." -#: ../../tutorial/datastructures.rst:499 +#: ../../tutorial/datastructures.rst:500 msgid "Here is a brief demonstration::" msgstr "Hier eine kurze Demonstration:" -#: ../../tutorial/datastructures.rst:501 +#: ../../tutorial/datastructures.rst:502 msgid "" ">>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}\n" ">>> print(basket) # show that duplicates have been " @@ -1096,7 +1096,7 @@ msgstr "" "in b vorkommen, aber nicht in beiden\n" "{'r', 'd', 'b', 'm', 'z', 'l'}" -#: ../../tutorial/datastructures.rst:524 +#: ../../tutorial/datastructures.rst:525 msgid "" "Similarly to :ref:`list comprehensions `, set comprehensions " "are also supported, including comprehensions with unpacking::" @@ -1104,7 +1104,7 @@ msgstr "" "Ähnlich wie :ref:`List Comprehensions ` werden auch Set " "Comprehensions unterstützt, einschließlich Comprehensions mit Entpacken::" -#: ../../tutorial/datastructures.rst:527 +#: ../../tutorial/datastructures.rst:528 msgid "" ">>> a = {x for x in 'abracadabra' if x not in 'abc'}\n" ">>> a\n" @@ -1122,11 +1122,11 @@ msgstr "" ">>> {*fruit for fruit in fruits}\n" "{'blueberry', 'banana', 'avocado', 'apple', 'apricot'}" -#: ../../tutorial/datastructures.rst:539 +#: ../../tutorial/datastructures.rst:540 msgid "Dictionaries" msgstr "Wörterbücher" -#: ../../tutorial/datastructures.rst:541 +#: ../../tutorial/datastructures.rst:542 msgid "" "Another useful data type built into Python is the *dictionary* (see :ref:" "`typesmapping`). Dictionaries are sometimes found in other languages as " @@ -1153,7 +1153,7 @@ msgstr "" "Methoden wie :meth:`~list.append` und :meth:`~list.extend` an Ort und Stelle " "verändert werden können." -#: ../../tutorial/datastructures.rst:552 +#: ../../tutorial/datastructures.rst:553 msgid "" "It is best to think of a dictionary as a set of *key: value* pairs, with the " "requirement that the keys are unique (within one dictionary). A pair of " @@ -1169,7 +1169,7 @@ msgstr "" "Wörterbuch anfängliche Schlüssel:Wert-Paare hinzugefügt; auf diese Weise " "werden Wörterbücher auch bei der Ausgabe dargestellt." -#: ../../tutorial/datastructures.rst:558 +#: ../../tutorial/datastructures.rst:559 msgid "" "The main operations on a dictionary are storing a value with some key and " "extracting the value given the key. It is also possible to delete a key:" @@ -1182,7 +1182,7 @@ msgstr "" "löschen. Wenn du einen Wert unter einem Schlüssel speicherst, der bereits " "verwendet wird, wird der alte, diesem Schlüssel zugeordnete Wert verworfen." -#: ../../tutorial/datastructures.rst:563 +#: ../../tutorial/datastructures.rst:564 msgid "" "Extracting a value for a non-existent key by subscripting (``d[key]``) " "raises a :exc:`KeyError`. To avoid getting this error when trying to access " @@ -1197,7 +1197,7 @@ msgstr "" "die ``None`` (oder einen angegebenen Standardwert) zurückgibt, wenn der " "Schlüssel nicht im Wörterbuch enthalten ist." -#: ../../tutorial/datastructures.rst:568 +#: ../../tutorial/datastructures.rst:569 msgid "" "Performing ``list(d)`` on a dictionary returns a list of all the keys used " "in the dictionary, in insertion order (if you want it sorted, just use " @@ -1210,11 +1210,11 @@ msgstr "" "stattdessen einfach ``sorted(d)``). Um zu prüfen, ob ein einzelner Schlüssel " "im Wörterbuch enthalten ist, verwende das Schlüsselwort :keyword:`in` ." -#: ../../tutorial/datastructures.rst:573 +#: ../../tutorial/datastructures.rst:574 msgid "Here is a small example using a dictionary::" msgstr "Hier ist ein kleines Beispiel, bei dem ein Wörterbuch verwendet wird::" -#: ../../tutorial/datastructures.rst:575 +#: ../../tutorial/datastructures.rst:576 msgid "" ">>> tel = {'jack': 4098, 'sape': 4139}\n" ">>> tel['guido'] = 4127\n" @@ -1266,7 +1266,7 @@ msgstr "" ">>> 'jack' not in tel\n" "False" -#: ../../tutorial/datastructures.rst:600 +#: ../../tutorial/datastructures.rst:601 msgid "" "The :func:`dict` constructor builds dictionaries directly from sequences of " "key-value pairs::" @@ -1274,7 +1274,7 @@ msgstr "" "Der Konstruktor ` :func:`dict` ` erstellt Wörterbücher direkt aus Sequenzen " "von Schlüssel-Wert-Paaren::" -#: ../../tutorial/datastructures.rst:603 +#: ../../tutorial/datastructures.rst:604 msgid "" ">>> dict([('sape', 4139), ('guido', 4127), ('jack', 4098)])\n" "{'sape': 4139, 'guido': 4127, 'jack': 4098}" @@ -1282,7 +1282,7 @@ msgstr "" ">>> dict([('sape', 4139), ('guido', 4127), ('jack', 4098)])\n" "{'sape': 4139, 'guido': 4127, 'jack': 4098}" -#: ../../tutorial/datastructures.rst:606 +#: ../../tutorial/datastructures.rst:607 msgid "" "In addition, dict comprehensions can be used to create dictionaries from " "arbitrary key and value expressions::" @@ -1290,7 +1290,7 @@ msgstr "" "Darüber hinaus können Dict-Comprehensions verwendet werden, um Wörterbücher " "aus beliebigen Schlüssel- und Wert-Ausdrücken zu erstellen::" -#: ../../tutorial/datastructures.rst:609 +#: ../../tutorial/datastructures.rst:610 msgid "" ">>> {x: x**2 for x in (2, 4, 6)}\n" "{2: 4, 4: 16, 6: 36}" @@ -1298,7 +1298,7 @@ msgstr "" ">>> {x: x**2 for x in (2, 4, 6)}\n" "{2: 4, 4: 16, 6: 36}" -#: ../../tutorial/datastructures.rst:612 +#: ../../tutorial/datastructures.rst:613 msgid "" "And dictionary unpacking (via ``**``) can be used to merge multiple " "dictionaries::" @@ -1306,7 +1306,7 @@ msgstr "" "Und Dictionary-Entpacken (mittels ``**``) kann verwendet werden, um mehrere " "Dictionaries zusammenzuführen::" -#: ../../tutorial/datastructures.rst:615 +#: ../../tutorial/datastructures.rst:616 msgid "" ">>> odds = {i: i**2 for i in (1, 3, 5)}\n" ">>> evens = {i: i**2 for i in (2, 4, 6)}\n" @@ -1326,7 +1326,7 @@ msgstr "" ">>> {**i for i in all_values}\n" "{1: 1, 3: 9, 5: 25, 2: 4, 4: 16, 6: 36, 0: 0}" -#: ../../tutorial/datastructures.rst:624 +#: ../../tutorial/datastructures.rst:625 msgid "" "When the keys are simple strings, it is sometimes easier to specify pairs " "using keyword arguments::" @@ -1334,7 +1334,7 @@ msgstr "" "Wenn es sich bei den Schlüsseln um einfache Zeichenfolgen handelt, ist es " "manchmal einfacher, Paare mithilfe von Schlüsselwortargumenten anzugeben::" -#: ../../tutorial/datastructures.rst:627 +#: ../../tutorial/datastructures.rst:628 msgid "" ">>> dict(sape=4139, guido=4127, jack=4098)\n" "{'sape': 4139, 'guido': 4127, 'jack': 4098}" @@ -1342,11 +1342,11 @@ msgstr "" ">>> dict(sape=4139, guido=4127, jack=4098)\n" "{'sape': 4139, 'guido': 4127, 'jack': 4098}" -#: ../../tutorial/datastructures.rst:634 +#: ../../tutorial/datastructures.rst:635 msgid "Looping Techniques" msgstr "Schleifentechniken" -#: ../../tutorial/datastructures.rst:636 +#: ../../tutorial/datastructures.rst:637 msgid "" "When looping through dictionaries, the key and corresponding value can be " "retrieved at the same time using the :meth:`~dict.items` method. ::" @@ -1355,7 +1355,7 @@ msgstr "" "Wert mithilfe der Methode :meth:`~dict.items` gleichzeitig abgerufen " "werden. ::" -#: ../../tutorial/datastructures.rst:639 +#: ../../tutorial/datastructures.rst:640 msgid "" ">>> knights = {'gallahad': 'the pure', 'robin': 'the brave'}\n" ">>> for k, v in knights.items():\n" @@ -1371,7 +1371,7 @@ msgstr "" "gallahad der Reine\n" "robin der Tapfere" -#: ../../tutorial/datastructures.rst:646 +#: ../../tutorial/datastructures.rst:647 msgid "" "When looping through a sequence, the position index and corresponding value " "can be retrieved at the same time using the :func:`enumerate` function. ::" @@ -1380,7 +1380,7 @@ msgstr "" "Wert mithilfe der Funktion :func:`enumerate` gleichzeitig abgerufen " "werden. ::" -#: ../../tutorial/datastructures.rst:649 +#: ../../tutorial/datastructures.rst:650 msgid "" ">>> for i, v in enumerate(['tic', 'tac', 'toe']):\n" "... print(i, v)\n" @@ -1396,7 +1396,7 @@ msgstr "" "1 tac\n" "2 toe" -#: ../../tutorial/datastructures.rst:656 +#: ../../tutorial/datastructures.rst:657 msgid "" "To loop over two or more sequences at the same time, the entries can be " "paired with the :func:`zip` function. ::" @@ -1404,7 +1404,7 @@ msgstr "" "Um zwei oder mehr Sequenzen gleichzeitig zu durchlaufen, können die Einträge " "mit der Funktion :func:`zip` gepaart werden. ::" -#: ../../tutorial/datastructures.rst:659 +#: ../../tutorial/datastructures.rst:660 msgid "" ">>> questions = ['name', 'quest', 'favorite color']\n" ">>> answers = ['lancelot', 'the holy grail', 'blue']\n" @@ -1424,7 +1424,7 @@ msgstr "" "Was ist deine Aufgabe? Es ist der Heilige Gral.\n" "Was ist deine Lieblingsfarbe? Es ist Blau." -#: ../../tutorial/datastructures.rst:668 +#: ../../tutorial/datastructures.rst:669 msgid "" "To loop over a sequence in reverse, first specify the sequence in a forward " "direction and then call the :func:`reversed` function. ::" @@ -1433,7 +1433,7 @@ msgstr "" "Folge in Vorwärtsrichtung an und rufe anschließend die Funktion :func:" "`reversed` auf. ::" -#: ../../tutorial/datastructures.rst:671 +#: ../../tutorial/datastructures.rst:672 msgid "" ">>> for i in reversed(range(1, 10, 2)):\n" "... print(i)\n" @@ -1453,7 +1453,7 @@ msgstr "" "3\n" "1" -#: ../../tutorial/datastructures.rst:680 +#: ../../tutorial/datastructures.rst:681 msgid "" "To loop over a sequence in sorted order, use the :func:`sorted` function " "which returns a new sorted list while leaving the source unaltered. ::" @@ -1462,7 +1462,7 @@ msgstr "" "Funktion :func:`sorted`, die eine neue sortierte Liste zurückgibt, während " "die Quelle unverändert bleibt. ::" -#: ../../tutorial/datastructures.rst:683 +#: ../../tutorial/datastructures.rst:684 msgid "" ">>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']\n" ">>> for i in sorted(basket):\n" @@ -1486,7 +1486,7 @@ msgstr "" "Orange\n" "Birne" -#: ../../tutorial/datastructures.rst:694 +#: ../../tutorial/datastructures.rst:695 msgid "" "Using :func:`set` on a sequence eliminates duplicate elements. The use of :" "func:`sorted` in combination with :func:`set` over a sequence is an " @@ -1498,7 +1498,7 @@ msgstr "" "Sequenz ist eine gängige Methode, um die eindeutigen Elemente der Sequenz in " "sortierter Reihenfolge durchzugehen. ::" -#: ../../tutorial/datastructures.rst:698 +#: ../../tutorial/datastructures.rst:699 msgid "" ">>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']\n" ">>> for f in sorted(set(basket)):\n" @@ -1518,7 +1518,7 @@ msgstr "" "Orange\n" "Birne" -#: ../../tutorial/datastructures.rst:707 +#: ../../tutorial/datastructures.rst:708 msgid "" "It is sometimes tempting to change a list while you are looping over it; " "however, it is often simpler and safer to create a new list instead. ::" @@ -1527,7 +1527,7 @@ msgstr "" "Schleife durchläuft; oft ist es jedoch einfacher und sicherer, stattdessen " "eine neue Liste zu erstellen. ::" -#: ../../tutorial/datastructures.rst:710 +#: ../../tutorial/datastructures.rst:711 msgid "" ">>> import math\n" ">>> raw_data = [56.2, float('NaN'), 51.7, 55.3, 52.5, float('NaN'), 47.8]\n" @@ -1549,11 +1549,11 @@ msgstr "" ">>> filtered_data\n" "[56,2, 51,7, 55,3, 52,5, 47,8]" -#: ../../tutorial/datastructures.rst:724 +#: ../../tutorial/datastructures.rst:725 msgid "More on Conditions" msgstr "Mehr zu den Bedingungen" -#: ../../tutorial/datastructures.rst:726 +#: ../../tutorial/datastructures.rst:727 msgid "" "The conditions used in ``while`` and ``if`` statements can contain any " "operators, not just comparisons." @@ -1561,7 +1561,7 @@ msgstr "" "Die in den Anweisungen ``while`` und ``if`` verwendeten Bedingungen können " "beliebige Operatoren enthalten, nicht nur Vergleichsoperatoren." -#: ../../tutorial/datastructures.rst:730 +#: ../../tutorial/datastructures.rst:731 msgid "" "The comparison operators ``in`` and ``not in`` are membership tests that " "determine whether a value is in (or not in) a container. The operators " @@ -1575,7 +1575,7 @@ msgstr "" "tatsächlich dasselbe Objekt sind. Alle Vergleichsoperatoren haben dieselbe " "Priorität, die niedriger ist als die aller numerischen Operatoren." -#: ../../tutorial/datastructures.rst:736 +#: ../../tutorial/datastructures.rst:737 msgid "" "Comparisons can be chained. For example, ``a < b == c`` tests whether ``a`` " "is less than ``b`` and moreover ``b`` equals ``c``." @@ -1583,7 +1583,7 @@ msgstr "" "Vergleiche können verkettet werden. Beispielsweise prüft ``a < b == c``, ob " "``a`` kleiner ist als ``b`` und ob darüber hinaus ``b`` gleich ``c`` ist." -#: ../../tutorial/datastructures.rst:739 +#: ../../tutorial/datastructures.rst:740 msgid "" "Comparisons may be combined using the Boolean operators ``and`` and ``or``, " "and the outcome of a comparison (or of any other Boolean expression) may be " @@ -1600,7 +1600,7 @@ msgstr "" "gleichbedeutend ist mit ``(A and (not B)) or C``. Wie immer können Klammern " "verwendet werden, um die gewünschte Zusammensetzung auszudrücken." -#: ../../tutorial/datastructures.rst:746 +#: ../../tutorial/datastructures.rst:747 msgid "" "The Boolean operators ``and`` and ``or`` are so-called *short-circuit* " "operators: their arguments are evaluated from left to right, and evaluation " @@ -1617,7 +1617,7 @@ msgstr "" "allgemeiner Wert und nicht als Boolescher Wert verwendet, ist der " "Rückgabewert das zuletzt ausgewertete Argument." -#: ../../tutorial/datastructures.rst:753 +#: ../../tutorial/datastructures.rst:754 msgid "" "It is possible to assign the result of a comparison or other Boolean " "expression to a variable. For example, ::" @@ -1625,7 +1625,7 @@ msgstr "" "Es ist möglich, das Ergebnis eines Vergleichs oder eines anderen booleschen " "Ausdrucks einer Variablen zuzuweisen. Beispiel: ::" -#: ../../tutorial/datastructures.rst:756 +#: ../../tutorial/datastructures.rst:757 msgid "" ">>> string1, string2, string3 = '', 'Trondheim', 'Hammer Dance'\n" ">>> non_null = string1 or string2 or string3\n" @@ -1637,7 +1637,7 @@ msgstr "" ">>> non_null\n" "'Trondheim'" -#: ../../tutorial/datastructures.rst:761 +#: ../../tutorial/datastructures.rst:762 msgid "" "Note that in Python, unlike C, assignment inside expressions must be done " "explicitly with the :ref:`walrus operator `` is legal " "provided that the objects have appropriate comparison methods. For example, " @@ -1716,11 +1716,11 @@ msgstr "" "usw. Andernfalls liefert der Interpreter keine willkürliche Reihenfolge, " "sondern löst eine :exc:`TypeError`-Ausnahme aus." -#: ../../tutorial/datastructures.rst:800 +#: ../../tutorial/datastructures.rst:801 msgid "Footnotes" msgstr "Fußnoten" -#: ../../tutorial/datastructures.rst:801 +#: ../../tutorial/datastructures.rst:802 msgid "" "Other languages may return the mutated object, which allows method chaining, " "such as ``d->insert(\"a\")->remove(\"b\")->sort();``." diff --git a/tutorial/datastructures.po~ b/tutorial/datastructures.po~ new file mode 100644 index 00000000..c284f8ae --- /dev/null +++ b/tutorial/datastructures.po~ @@ -0,0 +1,1739 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../tutorial/datastructures.rst:5 +msgid "Data Structures" +msgstr "Datenstrukturen" + +#: ../../tutorial/datastructures.rst:7 +msgid "" +"This chapter describes some things you've learned about already in more " +"detail, and adds some new things as well." +msgstr "" +"In diesem Kapitel werden einige Dinge, die du bereits kennengelernt hast, " +"näher erläutert, und es werden zudem einige neue Aspekte hinzugefügt." + +#: ../../tutorial/datastructures.rst:13 +msgid "More on Lists" +msgstr "Mehr zum Thema Listen" + +#: ../../tutorial/datastructures.rst:15 +msgid "" +"The :ref:`list ` data type has some more methods. Here are " +"all of the methods of list objects:" +msgstr "" +"Der Datentyp :ref:`list ` verfügt über einige weitere " +"Methoden. Hier sind alle Methoden von Listenobjekten aufgeführt:" + +#: ../../tutorial/datastructures.rst:21 +msgid "Add an item to the end of the list. Similar to ``a[len(a):] = [x]``." +msgstr "" +"Füge einen Eintrag am Ende der Liste hinzu. Ähnlich wie bei ``a[len(a):] = " +"[x]``." + +#: ../../tutorial/datastructures.rst:27 +msgid "" +"Extend the list by appending all the items from the iterable. Similar to " +"``a[len(a):] = iterable``." +msgstr "" +"Erweitere die Liste, indem du alle Elemente aus der iterierbaren Struktur " +"anhängst. Ähnlich wie bei ``a[len(a):] = iterable``." + +#: ../../tutorial/datastructures.rst:34 +msgid "" +"Insert an item at a given position. The first argument is the index of the " +"element before which to insert, so ``a.insert(0, x)`` inserts at the front " +"of the list, and ``a.insert(len(a), x)`` is equivalent to ``a.append(x)``." +msgstr "" +"Fügt ein Element an einer bestimmten Position ein. Das erste Argument ist " +"der Index des Elements, vor dem eingefügt werden soll. Daher fügt ``a." +"insert(0, x)`` am Anfang der Liste ein, und ``a.insert(len(a), x)`` " +"entspricht ``a.append(x)``." + +#: ../../tutorial/datastructures.rst:42 +msgid "" +"Remove the first item from the list whose value is equal to *value*. It " +"raises a :exc:`ValueError` if there is no such item." +msgstr "" +"Entferne das erste Element aus der Liste, dessen Wert *value* entspricht. " +"Wenn kein solches Element vorhanden ist, wird eine :exc:`ValueError` " +"ausgelöst." + +#: ../../tutorial/datastructures.rst:49 +msgid "" +"Remove the item at the given position in the list, and return it. If no " +"index is specified, ``a.pop()`` removes and returns the last item in the " +"list. It raises an :exc:`IndexError` if the list is empty or the index is " +"outside the list range." +msgstr "" +"Entfernt das Element an der angegebenen Position aus der Liste und gibt es " +"zurück. Wenn kein Index angegeben wird, entfernt ``a.pop()`` das letzte " +"Element der Liste und gibt es zurück. Es löst eine :exc:`IndexError` aus, " +"wenn die Liste leer ist oder der Index außerhalb des Listenbereichs liegt." + +#: ../../tutorial/datastructures.rst:58 +msgid "Remove all items from the list. Similar to ``del a[:]``." +msgstr "Entferne alle Elemente aus der Liste. Ähnlich wie bei ``del a[:]`` ." + +#: ../../tutorial/datastructures.rst:64 +msgid "" +"Return zero-based index of the first occurrence of *value* in the list. " +"Raises a :exc:`ValueError` if there is no such item." +msgstr "" +"Gibt den nullbasierten Index des ersten Vorkommens von *value* in der Liste " +"zurück. Löst eine Ausnahme vom Typ :exc:`ValueError` aus, wenn kein " +"entsprechendes Element vorhanden ist." + +#: ../../tutorial/datastructures.rst:67 +msgid "" +"The optional arguments *start* and *end* are interpreted as in the slice " +"notation and are used to limit the search to a particular subsequence of the " +"list. The returned index is computed relative to the beginning of the full " +"sequence rather than the *start* argument." +msgstr "" +"Die optionalen Argumente *start* und *end* werden wie in der Slice-Notation " +"interpretiert und dienen dazu, die Suche auf eine bestimmte Teilfolge der " +"Liste zu beschränken. Der zurückgegebene Index wird relativ zum Anfang der " +"vollständigen Folge und nicht relativ zum Argument *start* berechnet." + +#: ../../tutorial/datastructures.rst:76 +msgid "Return the number of times *value* appears in the list." +msgstr "Gibt die Anzahl der Vorkommen von *value* in der Liste zurück." + +#: ../../tutorial/datastructures.rst:82 +msgid "" +"Sort the items of the list in place (the arguments can be used for sort " +"customization, see :func:`sorted` for their explanation)." +msgstr "" +"Sortiere die Elemente der Liste an Ort und Stelle (die Argumente können zur " +"Anpassung der Sortierung verwendet werden; eine Erläuterung findest du " +"unter :func:`sorted` )." + +#: ../../tutorial/datastructures.rst:89 +msgid "Reverse the elements of the list in place." +msgstr "" +"Die Elemente der Liste an Ort und Stelle in umgekehrter Reihenfolge anordnen." + +#: ../../tutorial/datastructures.rst:95 +msgid "Return a shallow copy of the list. Similar to ``a[:]``." +msgstr "Gibt eine flache Kopie der Liste zurück. Ähnlich wie bei ``a[:]`` ." + +#: ../../tutorial/datastructures.rst:98 +msgid "An example that uses most of the list methods::" +msgstr "Ein Beispiel, das die meisten Methoden der Liste verwendet::" + +#: ../../tutorial/datastructures.rst:100 +msgid "" +">>> fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', " +"'banana']\n" +">>> fruits.count('apple')\n" +"2\n" +">>> fruits.count('tangerine')\n" +"0\n" +">>> fruits.index('banana')\n" +"3\n" +">>> fruits.index('banana', 4) # Find next banana starting at position 4\n" +"6\n" +">>> fruits.reverse()\n" +">>> fruits\n" +"['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange']\n" +">>> fruits.append('grape')\n" +">>> fruits\n" +"['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange', 'grape']\n" +">>> fruits.sort()\n" +">>> fruits\n" +"['apple', 'apple', 'banana', 'banana', 'grape', 'kiwi', 'orange', 'pear']\n" +">>> fruits.pop()\n" +"'pear'" +msgstr "" +">>> fruits = ['Orange', 'Apfel', 'Birne', 'Banane', 'Kiwi', 'Apfel', " +"'Banane']\n" +">>> fruits.count('Apfel')\n" +"2\n" +">>> fruits.count('Mandarine')\n" +"0\n" +">>> fruits.index('Banane')\n" +"3\n" +">>> fruits.index('banana', 4) # Die nächste Banane ab Position 4 finden\n" +"6\n" +">>> fruits.reverse()\n" +">>> fruits\n" +"['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange']\n" +">>> fruits.append('traube')\n" +">>> fruits\n" +"['banane', 'apfel', 'kiwi', 'banane', 'birne', 'apfel', 'orange', 'traube']\n" +">>> fruits.sort()\n" +">>> fruits\n" +"['Apfel', 'Apfel', 'Banane', 'Banane', 'Traube', 'Kiwi', 'Orange', 'Birne']\n" +">>> fruits.pop()\n" +"'Birne'" + +#: ../../tutorial/datastructures.rst:121 +msgid "" +"You might have noticed that methods like ``insert``, ``remove`` or ``sort`` " +"that only modify the list have no return value printed -- they return the " +"default ``None``. [#]_ This is a design principle for all mutable data " +"structures in Python." +msgstr "" +"Vielleicht ist dir aufgefallen, dass bei Methoden wie ``insert``, ``remove`` " +"oder ``sort``, die lediglich die Liste verändern, kein Rückgabewert " +"ausgegeben wird – sie geben den Standardwert ``None`` zurück. [#]_ Dies ist " +"ein Entwurfsprinzip für alle veränderbaren Datenstrukturen in Python." + +#: ../../tutorial/datastructures.rst:126 +msgid "" +"Another thing you might notice is that not all data can be sorted or " +"compared. For instance, ``[None, 'hello', 10]`` doesn't sort because " +"integers can't be compared to strings and ``None`` can't be compared to " +"other types. Also, there are some types that don't have a defined ordering " +"relation. For example, ``3+4j < 5+7j`` isn't a valid comparison." +msgstr "" +"Außerdem wird dir vielleicht auffallen, dass nicht alle Daten sortiert oder " +"verglichen werden können. So lässt sich beispielsweise ``[None, 'hello', " +"10]`` nicht sortieren, da Ganzzahlen nicht mit Zeichenketten verglichen " +"werden können und ``None`` nicht mit anderen Typen verglichen werden kann. " +"Zudem gibt es einige Typen, für die keine definierte Ordnungsrelation " +"existiert. So ist beispielsweise ``3+4j < 5+7j`` kein gültiger Vergleich." + +#: ../../tutorial/datastructures.rst:137 +msgid "Using Lists as Stacks" +msgstr "Listen als Stapel verwenden" + +#: ../../tutorial/datastructures.rst:139 +msgid "" +"The list methods make it very easy to use a list as a stack, where the last " +"element added is the first element retrieved (\"last-in, first-out\"). To " +"add an item to the top of the stack, use :meth:`~list.append`. To retrieve " +"an item from the top of the stack, use :meth:`~list.pop` without an explicit " +"index. For example::" +msgstr "" +"Die Listenmethoden machen es sehr einfach, eine Liste als Stapel zu " +"verwenden, bei dem das zuletzt hinzugefügte Element als erstes wieder " +"abgerufen wird (\"Last-in, First-out\"). Um ein Element oben auf den Stapel " +"zu setzen, verwende :meth:`~list.append`. Um ein Element von der Spitze des " +"Stapels abzurufen, verwende ` :meth:`~list.pop` ` ohne expliziten Index. " +"Beispiel::" + +#: ../../tutorial/datastructures.rst:144 +msgid "" +">>> stack = [3, 4, 5]\n" +">>> stack.append(6)\n" +">>> stack.append(7)\n" +">>> stack\n" +"[3, 4, 5, 6, 7]\n" +">>> stack.pop()\n" +"7\n" +">>> stack\n" +"[3, 4, 5, 6]\n" +">>> stack.pop()\n" +"6\n" +">>> stack.pop()\n" +"5\n" +">>> stack\n" +"[3, 4]" +msgstr "" +">>> stack = [3, 4, 5]\n" +">>> stack.append(6)\n" +">>> stack.append(7)\n" +">>> stack\n" +"[3, 4, 5, 6, 7]\n" +">>> stack.pop()\n" +"7\n" +">>> stack\n" +"[3, 4, 5, 6]\n" +">>> stack.pop()\n" +"6\n" +">>> stack.pop()\n" +"5\n" +">>> stack\n" +"[3, 4]" + +#: ../../tutorial/datastructures.rst:164 +msgid "Using Lists as Queues" +msgstr "Listen als Warteschlangen verwenden" + +#: ../../tutorial/datastructures.rst:166 +msgid "" +"It is also possible to use a list as a queue, where the first element added " +"is the first element retrieved (\"first-in, first-out\"); however, lists are " +"not efficient for this purpose. While appends and pops from the end of list " +"are fast, doing inserts or pops from the beginning of a list is slow " +"(because all of the other elements have to be shifted by one). See :ref:" +"`time-complexity` for more information." +msgstr "" +"Es ist auch möglich, eine Liste als Warteschlange zu verwenden, bei der das " +"zuerst hinzugefügte Element als erstes wieder abgerufen wird (\"First-in, " +"First-out\"); allerdings sind Listen für diesen Zweck nicht effizient. " +"Während das Anhängen und Entnehmen am Ende einer Liste schnell erfolgt, ist " +"das Einfügen oder Entnehmen am Anfang einer Liste langsam (da alle anderen " +"Elemente um eine Position verschoben werden müssen). Weitere Informationen " +"findest du unter :ref:`time-complexity`." + +#: ../../tutorial/datastructures.rst:172 +msgid "" +"To implement a queue, use :class:`collections.deque` which was designed to " +"have fast appends and pops from both ends. For example::" +msgstr "" +"Um eine Warteschlange zu implementieren, verwende :class:`collections." +"deque`, das für schnelles Hinzufügen und Entnehmen von beiden Enden " +"ausgelegt ist. Beispiel::" + +#: ../../tutorial/datastructures.rst:175 +msgid "" +">>> from collections import deque\n" +">>> queue = deque([\"Eric\", \"John\", \"Michael\"])\n" +">>> queue.append(\"Terry\") # Terry arrives\n" +">>> queue.append(\"Graham\") # Graham arrives\n" +">>> queue.popleft() # The first to arrive now leaves\n" +"'Eric'\n" +">>> queue.popleft() # The second to arrive now leaves\n" +"'John'\n" +">>> queue # Remaining queue in order of arrival\n" +"deque(['Michael', 'Terry', 'Graham'])" +msgstr "" +">>> from collections import deque\n" +">>> queue = deque([\"Eric\", \"John\", \"Michael\"])\n" +">>> queue.append(\"Terry\") # Terry kommt an\n" +">>> queue.append(\"Graham\") # Graham kommt an\n" +">>> queue.popleft() # Der Erste, der angekommen ist, " +"verlässt nun die Warteschlange\n" +"'Eric'\n" +">>> queue.popleft() # Der Zweite, der angekommen ist, " +"verlässt nun die Warteschlange\n" +"'John'\n" +">>> queue # Verbleibende Warteschlange in der " +"Reihenfolge der Ankunft\n" +"deque(['Michael', 'Terry', 'Graham'])" + +#: ../../tutorial/datastructures.rst:190 +msgid "List Comprehensions" +msgstr "Listen-Abstraktion" + +#: ../../tutorial/datastructures.rst:192 +msgid "" +"List comprehensions provide a concise way to create lists. Common " +"applications are to make new lists where each element is the result of some " +"operations applied to each member of another sequence or iterable, or to " +"create a subsequence of those elements that satisfy a certain condition." +msgstr "" +"Listen-Abstraktion bieten eine prägnante Möglichkeit, Listen zu erstellen. " +"Häufige Anwendungsfälle sind die Erstellung neuer Listen, bei denen jedes " +"Element das Ergebnis bestimmter Operationen ist, die auf jedes Element einer " +"anderen Sequenz oder eines anderen iterierbaren Objekts angewendet werden, " +"oder die Erstellung einer Teilsequenz aus den Elementen, die eine bestimmte " +"Bedingung erfüllen." + +#: ../../tutorial/datastructures.rst:197 +msgid "For example, assume we want to create a list of squares, like::" +msgstr "" +"Nehmen wir zum Beispiel an, wir möchten eine Liste von Quadraten erstellen, " +"etwa wie folgt:" + +#: ../../tutorial/datastructures.rst:199 +msgid "" +">>> squares = []\n" +">>> for x in range(10):\n" +"... squares.append(x**2)\n" +"...\n" +">>> squares\n" +"[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]" +msgstr "" +">>> squares = []\n" +">>> for x in range(10):\n" +"... squares.append(x**2)\n" +"...\n" +">>> squares\n" +"[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]" + +#: ../../tutorial/datastructures.rst:206 +msgid "" +"Note that this creates (or overwrites) a variable named ``x`` that still " +"exists after the loop completes. We can calculate the list of squares " +"without any side effects using::" +msgstr "" +"Beachte, dass dadurch eine Variable namens ``x`` angelegt (oder " +"überschrieben) wird, die auch nach Abschluss der Schleife noch vorhanden " +"ist. Wir können die Liste der Quadrate ohne Nebenwirkungen wie folgt " +"berechnen:" + +#: ../../tutorial/datastructures.rst:210 +msgid "squares = list(map(lambda x: x**2, range(10)))" +msgstr "Quadrate = list(map(lambda x: x**2, range(10)))" + +#: ../../tutorial/datastructures.rst:212 +msgid "or, equivalently::" +msgstr "oder, gleichbedeutend::" + +#: ../../tutorial/datastructures.rst:214 +msgid "squares = [x**2 for x in range(10)]" +msgstr "Quadrate = [x**2 for x in range(10)]" + +#: ../../tutorial/datastructures.rst:216 +msgid "which is more concise and readable." +msgstr "was prägnanter und besser lesbar ist." + +#: ../../tutorial/datastructures.rst:218 +msgid "" +"A list comprehension consists of brackets containing an expression followed " +"by a :keyword:`!for` clause, then zero or more :keyword:`!for` or :keyword:`!" +"if` clauses. The result will be a new list resulting from evaluating the " +"expression in the context of the :keyword:`!for` and :keyword:`!if` clauses " +"which follow it. For example, this listcomp combines the elements of two " +"lists if they are not equal::" +msgstr "" +"Eine Listenkomprimierung besteht aus Klammern, die einen Ausdruck enthalten, " +"gefolgt von einer :keyword:`!for`-Klausel und anschließend null oder mehr :" +"keyword:`!for`- oder :keyword:`!if`-Klauseln. Das Ergebnis ist eine neue " +"Liste, die sich aus der Auswertung des Ausdrucks im Kontext der darauf " +"folgenden :keyword:`!for`- und :keyword:`!if`-Klauseln ergibt. Diese " +"Listenkomprimierung kombiniert beispielsweise die Elemente zweier Listen, " +"sofern sie nicht identisch sind:" + +#: ../../tutorial/datastructures.rst:225 +msgid "" +">>> [(x, y) for x in [1,2,3] for y in [3,1,4] if x != y]\n" +"[(1, 3), (1, 4), (2, 3), (2, 1), (2, 4), (3, 1), (3, 4)]" +msgstr "" +">>> [(x, y) für x in [1, 2, 3] für y in [3, 1, 4], wenn x != y]\n" +"[(1, 3), (1, 4), (2, 3), (2, 1), (2, 4), (3, 1), (3, 4)]" + +#: ../../tutorial/datastructures.rst:228 +msgid "and it's equivalent to::" +msgstr "und das entspricht::" + +#: ../../tutorial/datastructures.rst:230 +msgid "" +">>> combs = []\n" +">>> for x in [1,2,3]:\n" +"... for y in [3,1,4]:\n" +"... if x != y:\n" +"... combs.append((x, y))\n" +"...\n" +">>> combs\n" +"[(1, 3), (1, 4), (2, 3), (2, 1), (2, 4), (3, 1), (3, 4)]" +msgstr "" +">>> combs = []\n" +">>> for x in [1, 2, 3]:\n" +"... for y in [3, 1, 4]:\n" +"... if x != y:\n" +"... combs.append((x, y))\n" +"...\n" +">>> combs\n" +"[(1, 3), (1, 4), (2, 3), (2, 1), (2, 4), (3, 1), (3, 4)]" + +#: ../../tutorial/datastructures.rst:239 +msgid "" +"Note how the order of the :keyword:`for` and :keyword:`if` statements is the " +"same in both these snippets." +msgstr "" +"Beachte, dass die Reihenfolge der Anweisungen :keyword:`for` und :keyword:" +"`if` in beiden Codeausschnitten identisch ist." + +#: ../../tutorial/datastructures.rst:242 +msgid "" +"If the expression is a tuple (e.g. the ``(x, y)`` in the previous example), " +"it must be parenthesized. ::" +msgstr "" +"Wenn es sich bei dem Ausdruck um ein Tupel handelt (z. B. ``(x, y)`` im " +"vorherigen Beispiel), muss es in Klammern gesetzt werden. ::" + +#: ../../tutorial/datastructures.rst:245 +msgid "" +">>> vec = [-4, -2, 0, 2, 4]\n" +">>> # create a new list with the values doubled\n" +">>> [x*2 for x in vec]\n" +"[-8, -4, 0, 4, 8]\n" +">>> # filter the list to exclude negative numbers\n" +">>> [x for x in vec if x >= 0]\n" +"[0, 2, 4]\n" +">>> # apply a function to all the elements\n" +">>> [abs(x) for x in vec]\n" +"[4, 2, 0, 2, 4]\n" +">>> # call a method on each element\n" +">>> freshfruit = [' banana', ' loganberry ', 'passion fruit ']\n" +">>> [weapon.strip() for weapon in freshfruit]\n" +"['banana', 'loganberry', 'passion fruit']\n" +">>> # create a list of 2-tuples like (number, square)\n" +">>> [(x, x**2) for x in range(6)]\n" +"[(0, 0), (1, 1), (2, 4), (3, 9), (4, 16), (5, 25)]\n" +">>> # the tuple must be parenthesized, otherwise an error is raised\n" +">>> [x, x**2 for x in range(6)]\n" +" File \"\", line 1\n" +" [x, x**2 for x in range(6)]\n" +" ^^^^^^^\n" +"SyntaxError: did you forget parentheses around the comprehension target?\n" +">>> # flatten a list using a listcomp with two 'for'\n" +">>> vec = [[1,2,3], [4,5,6], [7,8,9]]\n" +">>> [num for elem in vec for num in elem]\n" +"[1, 2, 3, 4, 5, 6, 7, 8, 9]" +msgstr "" +">>> vec = [-4, -2, 0, 2, 4]\n" +">>> # Erstelle eine neue Liste, in der die Werte verdoppelt sind\n" +">>> [x*2 for x in vec]\n" +"[-8, -4, 0, 4, 8]\n" +">>> # Filtere die Liste, um negative Zahlen auszuschließen\n" +">>> [x for x in vec if x >= 0]\n" +"[0, 2, 4]\n" +">>> # Eine Funktion auf alle Elemente anwenden\n" +">>> [abs(x) for x in vec]\n" +"[4, 2, 0, 2, 4]\n" +">>> # Eine Methode auf jedes Element anwenden\n" +">>> freshfruit = [' banana', ' loganberry ', 'passion fruit ']\n" +">>> [weapon.strip() for weapon in freshfruit]\n" +"['banana', 'loganberry', 'passion fruit']\n" +">>> # Eine Liste von 2-Tupeln wie (Zahl, Quadrat) erstellen\n" +">>> [(x, x**2) for x in range(6)]\n" +"[(0, 0), (1, 1), (2, 4), (3, 9), (4, 16), (5, 25)]\n" +">>> # Das Tupel muss in Klammern gesetzt werden, sonst wird ein Fehler " +"ausgelöst\n" +">>> [x, x**2 for x in range(6)]\n" +" Datei \"\", Zeile 1\n" +" [x, x**2 for x in range(6)]\n" +" ^^^^^^^\n" +"SyntaxError: Hast du die Klammern um das Ziel der List Comprehension " +"vergessen?\n" +">>> # Eine Liste mithilfe einer List Comprehension mit zwei \"for\"-" +"Schleifen abflachen\n" +">>> vec = [[1,2,3], [4,5,6], [7,8,9]]\n" +">>> [num for elem in vec for num in elem]\n" +"[1, 2, 3, 4, 5, 6, 7, 8, 9]" + +#: ../../tutorial/datastructures.rst:273 +msgid "" +"List comprehensions can contain complex expressions and nested functions::" +msgstr "" +"Listen-Abstraktionen können komplexe Ausdrücke und verschachtelte Funktionen " +"enthalten::" + +#: ../../tutorial/datastructures.rst:275 +msgid "" +">>> from math import pi\n" +">>> [str(round(pi, i)) for i in range(1, 6)]\n" +"['3.1', '3.14', '3.142', '3.1416', '3.14159']" +msgstr "" +">>> from math import pi\n" +">>> [str(round(pi, i)) for i in range(1, 6)]\n" +"['3,1', '3,14', '3,142', '3,1416', '3,14159']" + +#: ../../tutorial/datastructures.rst:280 +msgid "Nested List Comprehensions" +msgstr "Verschachtelte Listen-Abstraktion" + +#: ../../tutorial/datastructures.rst:282 +msgid "" +"The initial expression in a list comprehension can be any arbitrary " +"expression, including another list comprehension." +msgstr "" +"Der erste Ausdruck in einer Listen-Abstraktion kann ein beliebiger Ausdruck " +"sein, einschließlich einer weiteren Listen-Abstraktion." + +#: ../../tutorial/datastructures.rst:285 +msgid "" +"Consider the following example of a 3x4 matrix implemented as a list of 3 " +"lists of length 4::" +msgstr "" +"Betrachte das folgende Beispiel einer 3×4-Matrix, die als Liste aus drei " +"Listen der Länge 4 implementiert ist::" + +#: ../../tutorial/datastructures.rst:288 +msgid "" +">>> matrix = [\n" +"... [1, 2, 3, 4],\n" +"... [5, 6, 7, 8],\n" +"... [9, 10, 11, 12],\n" +"... ]" +msgstr "" +">>> matrix = [\n" +"... [1, 2, 3, 4],\n" +"... [5, 6, 7, 8],\n" +"... [9, 10, 11, 12],\n" +"... ]" + +#: ../../tutorial/datastructures.rst:294 +msgid "The following list comprehension will transpose rows and columns::" +msgstr "Die folgende Listen-Abstraktion transponiert Zeilen und Spalten::" + +#: ../../tutorial/datastructures.rst:296 +msgid "" +">>> [[row[i] for row in matrix] for i in range(4)]\n" +"[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" +msgstr "" +">>> [[row[i] for row in matrix] for i in range(4)]\n" +"[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" + +#: ../../tutorial/datastructures.rst:299 +msgid "" +"As we saw in the previous section, the inner list comprehension is evaluated " +"in the context of the :keyword:`for` that follows it, so this example is " +"equivalent to::" +msgstr "" +"Wie wir im vorigen Abschnitt gesehen haben, wird die innere Listenauswertung " +"im Kontext des darauf folgenden :keyword:`for` ausgewertet, sodass dieses " +"Beispiel gleichbedeutend ist mit::" + +#: ../../tutorial/datastructures.rst:303 +msgid "" +">>> transposed = []\n" +">>> for i in range(4):\n" +"... transposed.append([row[i] for row in matrix])\n" +"...\n" +">>> transposed\n" +"[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" +msgstr "" +">>> transposed = []\n" +">>> for i in range(4):\n" +"... transposed.append([row[i] for row in matrix])\n" +"...\n" +">>> transposed\n" +"[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" + +#: ../../tutorial/datastructures.rst:310 +msgid "which, in turn, is the same as::" +msgstr "was wiederum dasselbe ist wie::" + +#: ../../tutorial/datastructures.rst:312 +msgid "" +">>> transposed = []\n" +">>> for i in range(4):\n" +"... # the following 3 lines implement the nested listcomp\n" +"... transposed_row = []\n" +"... for row in matrix:\n" +"... transposed_row.append(row[i])\n" +"... transposed.append(transposed_row)\n" +"...\n" +">>> transposed\n" +"[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" +msgstr "" +">>> transposed = []\n" +">>> for i in range(4):\n" +"... # Die folgenden 3 Zeilen implementieren die verschachtelte " +"Listenkomposition\n" +"... transposed_row = []\n" +"... for row in matrix:\n" +"... transposed_row.append(row[i])\n" +"... transponiert.append(transponierte_Zeile)\n" +"...\n" +">>> transponiert\n" +"[[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]]" + +#: ../../tutorial/datastructures.rst:323 +msgid "" +"In the real world, you should prefer built-in functions to complex flow " +"statements. The :func:`zip` function would do a great job for this use case::" +msgstr "" +"In der Praxis solltest du integrierte Funktionen komplexen Ablaufanweisungen " +"vorziehen. Die Funktion :func:`zip` eignet sich hervorragend für diesen " +"Anwendungsfall:" + +#: ../../tutorial/datastructures.rst:326 +msgid "" +">>> list(zip(*matrix))\n" +"[(1, 5, 9), (2, 6, 10), (3, 7, 11), (4, 8, 12)]" +msgstr "" +">>> list(zip(*matrix))\n" +"[(1, 5, 9), (2, 6, 10), (3, 7, 11), (4, 8, 12)]" + +#: ../../tutorial/datastructures.rst:329 +msgid "" +"See :ref:`tut-unpacking-arguments` for details on the asterisk in this line." +msgstr "" +"Weitere Informationen zum Sternchen in dieser Zeile findest du unter :ref:" +"`tut-unpacking-arguments`." + +#: ../../tutorial/datastructures.rst:332 +msgid "Unpacking in Lists and List Comprehensions" +msgstr "Entpacken in Listen und List Comprehensions" + +#: ../../tutorial/datastructures.rst:334 +msgid "" +"The section on :ref:`tut-unpacking-arguments` describes the use of ``*`` to " +"\"unpack\" the elements of an iterable object, providing each one separately " +"as an argument to a function. Unpacking can also be used in other contexts, " +"for example, when creating lists. When specifying elements of a list, " +"prefixing an expression by a ``*`` will unpack the result of that " +"expression, adding each of its elements to the list we're creating::" +msgstr "" +"Der Abschnitt :ref:`tut-unpacking-arguments` beschreibt die Verwendung von " +"``*``, um die Elemente eines iterierbaren Objekts zu \"entpacken\" und jedes " +"einzeln als Argument an eine Funktion zu übergeben. Entpacken kann auch in " +"anderen Kontexten verwendet werden, zum Beispiel beim Erstellen von Listen. " +"Wird bei der Angabe von Listenelementen einem Ausdruck ein ``*`` " +"vorangestellt, wird das Ergebnis dieses Ausdrucks entpackt, wobei jedes " +"seiner Elemente der Liste hinzugefügt wird, die wir gerade erstellen::" + +#: ../../tutorial/datastructures.rst:341 +msgid "" +">>> x = [1, 2, 3]\n" +">>> [0, *x, 4, 5, 6]\n" +"[0, 1, 2, 3, 4, 5, 6]" +msgstr "" +">>> x = [1, 2, 3]\n" +">>> [0, *x, 4, 5, 6]\n" +"[0, 1, 2, 3, 4, 5, 6]" + +#: ../../tutorial/datastructures.rst:345 +msgid "" +"This only works if the expression following the ``*`` evaluates to an " +"iterable object; trying to unpack a non-iterable object will raise an " +"exception::" +msgstr "" +"Dies funktioniert nur, wenn der Ausdruck nach dem ``*`` zu einem " +"iterierbaren Objekt ausgewertet wird; der Versuch, ein nicht iterierbares " +"Objekt zu entpacken, löst eine Ausnahme aus::" + +#: ../../tutorial/datastructures.rst:348 +msgid "" +">>> x = 1\n" +">>> [0, *x, 2, 3, 4]\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" [0, *x, 2, 3, 4]\n" +"TypeError: Value after * must be an iterable, not int" +msgstr "" +">>> x = 1\n" +">>> [0, *x, 2, 3, 4]\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" [0, *x, 2, 3, 4]\n" +"TypeError: Value after * must be an iterable, not int" + +#: ../../tutorial/datastructures.rst:355 +msgid "" +"Unpacking can also be used in list comprehensions, as a way to build a new " +"list representing the concatenation of an arbitrary number of iterables::" +msgstr "" +"Entpacken kann auch in List Comprehensions verwendet werden, um eine neue " +"Liste zu erstellen, die die Verkettung einer beliebigen Anzahl von " +"iterierbaren Objekten darstellt::" + +#: ../../tutorial/datastructures.rst:358 +msgid "" +">>> x = [[1, 2, 3], [4, 5, 6], [], [7], [8, 9]]\n" +">>> [*element for element in x]\n" +"[1, 2, 3, 4, 5, 6, 7, 8, 9]" +msgstr "" +">>> x = [[1, 2, 3], [4, 5, 6], [], [7], [8, 9]]\n" +">>> [*element for element in x]\n" +"[1, 2, 3, 4, 5, 6, 7, 8, 9]" + +#: ../../tutorial/datastructures.rst:362 +msgid "" +"Note that the effect is that each element from ``x`` is unpacked. This " +"works for arbitrary iterable objects, not just lists::" +msgstr "" +"Beachte, dass dabei jedes Element aus ``x`` entpackt wird. Dies funktioniert " +"für beliebige iterierbare Objekte, nicht nur für Listen::" + +#: ../../tutorial/datastructures.rst:365 +msgid "" +">>> x = [[1, 2, 3], 'cat', {'spam': 'eggs'}]\n" +">>> [*element for element in x]\n" +"[1, 2, 3, 'c', 'a', 't', 'spam']" +msgstr "" +">>> x = [[1, 2, 3], 'cat', {'spam': 'eggs'}]\n" +">>> [*element for element in x]\n" +"[1, 2, 3, 'c', 'a', 't', 'spam']" + +#: ../../tutorial/datastructures.rst:369 +msgid "" +"But if the objects in ``x`` are not iterable, this expression would again " +"raise an exception." +msgstr "" +"Wenn die Objekte in ``x`` jedoch nicht iterierbar sind, würde dieser " +"Ausdruck erneut eine Ausnahme auslösen." + +#: ../../tutorial/datastructures.rst:375 +msgid "The :keyword:`!del` statement" +msgstr "Die Erklärung der :keyword:`!del`" + +#: ../../tutorial/datastructures.rst:377 +msgid "" +"There is a way to remove an item from a list given its index instead of its " +"value: the :keyword:`del` statement. This differs from the :meth:`~list." +"pop` method which returns a value. The :keyword:`!del` statement can also " +"be used to remove slices from a list or clear the entire list (which we did " +"earlier by assignment of an empty list to the slice). For example::" +msgstr "" +"Es gibt eine Möglichkeit, ein Element anhand seines Indexes statt seines " +"Wertes aus einer Liste zu entfernen: die Anweisung :keyword:`del`. Diese " +"unterscheidet sich von der Methode :meth:`~list.pop`, die einen Wert " +"zurückgibt. Die Anweisung :keyword:`!del` kann auch verwendet werden, um " +"Teilmengen aus einer Liste zu entfernen oder die gesamte Liste zu leeren " +"(was wir zuvor durch die Zuweisung einer leeren Liste zur Teilmenge getan " +"haben). Zum Beispiel::" + +#: ../../tutorial/datastructures.rst:383 +msgid "" +">>> a = [-1, 1, 66.25, 333, 333, 1234.5]\n" +">>> del a[0]\n" +">>> a\n" +"[1, 66.25, 333, 333, 1234.5]\n" +">>> del a[2:4]\n" +">>> a\n" +"[1, 66.25, 1234.5]\n" +">>> del a[:]\n" +">>> a\n" +"[]" +msgstr "" +">>> a = [-1, 1, 66,25, 333, 333, 1234,5]\n" +">>> del a[0]\n" +">>> a\n" +"[1, 66,25, 333, 333, 1234,5]\n" +">>> del a[2:4]\n" +">>> a\n" +"[1, 66,25, 1234,5]\n" +">>> del a[:]\n" +">>> a\n" +"[]" + +#: ../../tutorial/datastructures.rst:394 +msgid ":keyword:`del` can also be used to delete entire variables::" +msgstr "" +":keyword:`del` kann auch zum Löschen ganzer Variablen verwendet werden::" + +#: ../../tutorial/datastructures.rst:396 +msgid ">>> del a" +msgstr ">>> del a" + +#: ../../tutorial/datastructures.rst:398 +msgid "" +"Referencing the name ``a`` hereafter is an error (at least until another " +"value is assigned to it). We'll find other uses for :keyword:`del` later." +msgstr "" +"Der Verweis auf den Namen ``a`` ist hier ein Fehler (zumindest solange, bis " +"ihm ein anderer Wert zugewiesen wird). Wir werden später noch weitere " +"Verwendungsmöglichkeiten für :keyword:`del` finden." + +#: ../../tutorial/datastructures.rst:405 +msgid "Tuples and Sequences" +msgstr "Tupel und Sequenzen" + +#: ../../tutorial/datastructures.rst:407 +msgid "" +"We saw that lists and strings have many common properties, such as indexing " +"and slicing operations. They are two examples of *sequence* data types " +"(see :ref:`typesseq`). Since Python is an evolving language, other sequence " +"data types may be added. There is also another standard sequence data type: " +"the *tuple*." +msgstr "" +"Wir haben gesehen, dass Listen und Zeichenketten viele gemeinsame " +"Eigenschaften haben, wie beispielsweise Indizierungs- und " +"Ausschnittoperationen. Sie sind zwei Beispiele für *Sequenz*-Datentypen " +"(siehe :ref:`typesseq`). Da Python eine sich weiterentwickelnde Sprache ist, " +"können weitere Sequenz-Datentypen hinzukommen. Es gibt außerdem einen " +"weiteren standardmäßigen Sequenz-Datentyp: das *Tupel*." + +#: ../../tutorial/datastructures.rst:413 +msgid "" +"A tuple consists of a number of values separated by commas, for instance::" +msgstr "" +"Ein Tupel besteht aus einer Reihe von Werten, die durch Kommas getrennt " +"sind, zum Beispiel::" + +#: ../../tutorial/datastructures.rst:415 +msgid "" +">>> t = 12345, 54321, 'hello!'\n" +">>> t[0]\n" +"12345\n" +">>> t\n" +"(12345, 54321, 'hello!')\n" +">>> # Tuples may be nested:\n" +">>> u = t, (1, 2, 3, 4, 5)\n" +">>> u\n" +"((12345, 54321, 'hello!'), (1, 2, 3, 4, 5))\n" +">>> # Tuples are immutable:\n" +">>> t[0] = 88888\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: 'tuple' object does not support item assignment\n" +">>> # but they can contain mutable objects:\n" +">>> v = ([1, 2, 3], [3, 2, 1])\n" +">>> v\n" +"([1, 2, 3], [3, 2, 1])\n" +">>> # they support unpacking just like lists:\n" +">>> x = [1, 2, 3]\n" +">>> 0, *x, 4\n" +"(0, 1, 2, 3, 4)" +msgstr "" +">>> t = 12345, 54321, 'hello!'\n" +">>> t[0]\n" +"12345\n" +">>> t\n" +"(12345, 54321, 'hello!')\n" +">>> # Tupel können verschachtelt werden:\n" +">>> u = t, (1, 2, 3, 4, 5)\n" +">>> u\n" +"((12345, 54321, 'hello!'), (1, 2, 3, 4, 5))\n" +">>> # Tupel sind unveränderlich:\n" +">>> t[0] = 88888\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: 'tuple' object does not support item assignment\n" +">>> # aber sie können veränderliche Objekte enthalten:\n" +">>> v = ([1, 2, 3], [3, 2, 1])\n" +">>> v\n" +"([1, 2, 3], [3, 2, 1])\n" +">>> # sie unterstützen Entpacken genau wie Listen:\n" +">>> x = [1, 2, 3]\n" +">>> 0, *x, 4\n" +"(0, 1, 2, 3, 4)" + +#: ../../tutorial/datastructures.rst:438 +msgid "" +"As you see, on output tuples are always enclosed in parentheses, so that " +"nested tuples are interpreted correctly; they may be input with or without " +"surrounding parentheses, although often parentheses are necessary anyway (if " +"the tuple is part of a larger expression). It is not possible to assign to " +"the individual items of a tuple, however it is possible to create tuples " +"which contain mutable objects, such as lists." +msgstr "" +"Wie du siehst, werden Tupel in der Ausgabe immer in Klammern gesetzt, damit " +"verschachtelte Tupel korrekt interpretiert werden; sie können mit oder ohne " +"umschließende Klammern eingegeben werden, obwohl Klammern oft ohnehin " +"erforderlich sind (wenn das Tupel Teil eines größeren Ausdrucks ist). Es " +"ist nicht möglich, den einzelnen Elementen eines Tupels Werte zuzuweisen; es " +"ist jedoch möglich, Tupel zu erstellen, die veränderbare Objekte wie " +"beispielsweise Listen enthalten." + +#: ../../tutorial/datastructures.rst:445 +msgid "" +"Though tuples may seem similar to lists, they are often used in different " +"situations and for different purposes. Tuples are :term:`immutable`, and " +"usually contain a heterogeneous sequence of elements that are accessed via " +"unpacking (see later in this section) or indexing (or even by attribute in " +"the case of :func:`namedtuples `). Lists are :term:" +"`mutable`, and their elements are usually homogeneous and are accessed by " +"iterating over the list." +msgstr "" +"Auch wenn Tupel auf den ersten Blick Listen ähneln mögen, werden sie oft in " +"anderen Situationen und für andere Zwecke verwendet. Tupel sind :term:" +"`unveränderlich ` und enthalten in der Regel eine heterogene " +"Folge von Elementen, auf die über Entpacken (siehe weiter unten in diesem " +"Abschnitt) oder Indizierung (oder im Fall von :func:`namedtuples " +"` sogar über Attribute) zugegriffen wird. Listen " +"sind :term:`veränderlich `, und ihre Elemente sind in der Regel " +"homogen; der Zugriff erfolgt durch Iteration über die Liste." + +#: ../../tutorial/datastructures.rst:453 +msgid "" +"A special problem is the construction of tuples containing 0 or 1 items: the " +"syntax has some extra quirks to accommodate these. Empty tuples are " +"constructed by an empty pair of parentheses; a tuple with one item is " +"constructed by following a value with a comma (it is not sufficient to " +"enclose a single value in parentheses). Ugly, but effective. For example::" +msgstr "" +"Ein besonderes Problem stellt die Bildung von Tupeln dar, die 0 oder 1 " +"Element enthalten: Die Syntax weist hierfür einige zusätzliche " +"Besonderheiten auf. Leere Tupel werden durch ein leeres Klammerpaar " +"gebildet; ein Tupel mit einem Element wird gebildet, indem man einem Wert " +"ein Komma nachsetzt (es reicht nicht aus, einen einzelnen Wert in Klammern " +"zu setzen). Unschön, aber effektiv. Zum Beispiel::" + +#: ../../tutorial/datastructures.rst:459 +msgid "" +">>> empty = ()\n" +">>> singleton = 'hello', # <-- note trailing comma\n" +">>> len(empty)\n" +"0\n" +">>> len(singleton)\n" +"1\n" +">>> singleton\n" +"('hello',)" +msgstr "" +">>> empty = ()\n" +">>> singleton = 'hello', # <-- note trailing comma\n" +">>> len(empty)\n" +"0\n" +">>> len(singleton)\n" +"1\n" +">>> singleton\n" +"('hello',)" + +#: ../../tutorial/datastructures.rst:468 +msgid "" +"The statement ``t = 12345, 54321, 'hello!'`` is an example of *tuple " +"packing*: the values ``12345``, ``54321`` and ``'hello!'`` are packed " +"together in a tuple. The reverse operation is also possible::" +msgstr "" +"Die Anweisung ``t = 12345, 54321, 'hello!'`` ist ein Beispiel für *Tupel-" +"Packing*: Die Werte ``12345``, ``54321`` und ``'hello!'`` werden in einem " +"Tupel zusammengefasst. Auch die umgekehrte Operation ist möglich::" + +#: ../../tutorial/datastructures.rst:472 +msgid ">>> x, y, z = t" +msgstr ">>> x, y, z = t" + +#: ../../tutorial/datastructures.rst:474 +msgid "" +"This is called, appropriately enough, *sequence unpacking* and works for any " +"sequence on the right-hand side. Sequence unpacking requires that there are " +"as many variables on the left side of the equals sign as there are elements " +"in the sequence. Note that multiple assignment is really just a combination " +"of tuple packing and sequence unpacking." +msgstr "" +"Dies wird passenderweise als *Sequenz-Entpackung* bezeichnet und " +"funktioniert für jede beliebige Sequenz auf der rechten Seite. Für die " +"Sequenz-Entpackung muss die Anzahl der Variablen auf der linken Seite des " +"Gleichheitszeichens der Anzahl der Elemente in der Sequenz entsprechen. " +"Beachte, dass die Mehrfachzuweisung im Grunde nur eine Kombination aus Tupel-" +"Packing und Sequenz-Unpacking ist." + +#: ../../tutorial/datastructures.rst:484 +msgid "Sets" +msgstr "Sets" + +#: ../../tutorial/datastructures.rst:486 +msgid "" +"Python also includes a data type for :ref:`sets `. A set is an " +"unordered collection with no duplicate elements. Basic uses include " +"membership testing and eliminating duplicate entries. Set objects also " +"support mathematical operations like union, intersection, difference, and " +"symmetric difference." +msgstr "" +"Python enthält außerdem einen Datentyp für :ref:`Mengen `. Eine " +"Menge ist eine ungeordnete Sammlung ohne doppelte Elemente. Zu den " +"grundlegenden Anwendungsbereichen gehören die Überprüfung der Zugehörigkeit " +"zu einer Menge und das Entfernen doppelter Einträge. Mengenobjekte " +"unterstützen zudem mathematische Operationen wie Vereinigung, Schnittmenge, " +"Differenz und symmetrische Differenz." + +#: ../../tutorial/datastructures.rst:492 +msgid "" +"Curly braces or the :func:`set` function can be used to create sets. Note: " +"to create an empty set you have to use ``set()``, not ``{}``; the latter " +"creates an empty dictionary, a data structure that we discuss in the next " +"section." +msgstr "" +"Zum Erstellen von Mengen können geschweifte Klammern oder die Funktion :func:" +"`set` verwendet werden. Hinweis: Um eine leere Menge zu erstellen, müssen " +"Sie ``set()`` verwenden, nicht ``{}``; Letzteres erstellt ein leeres " +"Wörterbuch, eine Datenstruktur, die wir im nächsten Abschnitt behandeln." + +#: ../../tutorial/datastructures.rst:496 +msgid "" +"Because sets are unordered, iterating over them or printing them can produce " +"the elements in a different order than you expect." +msgstr "" +"Da Mengen ungeordnet sind, kann es beim Durchlaufen oder Ausgeben der " +"Elemente vorkommen, dass diese in einer anderen Reihenfolge angezeigt " +"werden, als erwartet." + +#: ../../tutorial/datastructures.rst:499 +msgid "Here is a brief demonstration::" +msgstr "Hier eine kurze Demonstration:" + +#: ../../tutorial/datastructures.rst:501 +msgid "" +">>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}\n" +">>> print(basket) # show that duplicates have been " +"removed\n" +"{'orange', 'banana', 'pear', 'apple'}\n" +">>> 'orange' in basket # fast membership testing\n" +"True\n" +">>> 'crabgrass' in basket\n" +"False\n" +"\n" +">>> # Demonstrate set operations on unique letters from two words\n" +">>>\n" +">>> a = set('abracadabra')\n" +">>> b = set('alacazam')\n" +">>> a # unique letters in a\n" +"{'a', 'r', 'b', 'c', 'd'}\n" +">>> a - b # letters in a but not in b\n" +"{'r', 'd', 'b'}\n" +">>> a | b # letters in a or b or both\n" +"{'a', 'c', 'r', 'd', 'b', 'm', 'z', 'l'}\n" +">>> a & b # letters in both a and b\n" +"{'a', 'c'}\n" +">>> a ^ b # letters in a or b but not both\n" +"{'r', 'd', 'b', 'm', 'z', 'l'}" +msgstr "" +">>> basket = {'Apfel', 'Orange', 'Apfel', 'Birne', 'Orange', 'Banane'}\n" +">>> print(basket) # zeigt, dass Duplikate entfernt " +"wurden\n" +"{'Orange', 'Banane', 'Birne', 'Apfel'}\n" +">>> 'orange' in basket # schnelle Zugehörigkeitsprüfung\n" +"True\n" +">>> 'crabgrass' in basket\n" +"False\n" +"\n" +">>> # Demonstration von Mengenoperationen mit eindeutigen Buchstaben aus " +"zwei Wörtern\n" +">>>\n" +">>> a = set('abracadabra')\n" +">>> b = set('alacazam')\n" +">>> a # eindeutige Buchstaben in a\n" +"{'a', 'r', 'b', 'c', 'd'}\n" +">>> a - b # Buchstaben in a, die nicht in b " +"vorkommen\n" +"{'r', 'd', 'b'}\n" +">>> a | b # Buchstaben in a oder b oder in " +"beiden\n" +"{'a', 'c', 'r', 'd', 'b', 'm', 'z', 'l'}\n" +">>> a & b # Buchstaben, die sowohl in a als " +"auch in b vorkommen\n" +"{'a', 'c'}\n" +">>> a ^ b # Buchstaben, die entweder in a oder " +"in b vorkommen, aber nicht in beiden\n" +"{'r', 'd', 'b', 'm', 'z', 'l'}" + +#: ../../tutorial/datastructures.rst:524 +msgid "" +"Similarly to :ref:`list comprehensions `, set comprehensions " +"are also supported, including comprehensions with unpacking::" +msgstr "" +"Ähnlich wie :ref:`List Comprehensions ` werden auch Set " +"Comprehensions unterstützt, einschließlich Comprehensions mit Entpacken::" + +#: ../../tutorial/datastructures.rst:527 +msgid "" +">>> a = {x for x in 'abracadabra' if x not in 'abc'}\n" +">>> a\n" +"{'r', 'd'}\n" +"\n" +">>> fruits = [{'apple', 'avocado', 'apricot'}, {'banana', 'blueberry'}]\n" +">>> {*fruit for fruit in fruits}\n" +"{'blueberry', 'banana', 'avocado', 'apple', 'apricot'}" +msgstr "" +">>> a = {x for x in 'abracadabra' if x not in 'abc'}\n" +">>> a\n" +"{'r', 'd'}\n" +"\n" +">>> fruits = [{'apple', 'avocado', 'apricot'}, {'banana', 'blueberry'}]\n" +">>> {*fruit for fruit in fruits}\n" +"{'blueberry', 'banana', 'avocado', 'apple', 'apricot'}" + +#: ../../tutorial/datastructures.rst:539 +msgid "Dictionaries" +msgstr "Wörterbücher" + +#: ../../tutorial/datastructures.rst:541 +msgid "" +"Another useful data type built into Python is the *dictionary* (see :ref:" +"`typesmapping`). Dictionaries are sometimes found in other languages as " +"\"associative memories\" or \"associative arrays\". Unlike sequences, which " +"are indexed by a range of numbers, dictionaries are indexed by *keys*, which " +"can be any immutable type; strings and numbers can always be keys. Tuples " +"can be used as keys if they contain only strings, numbers, or tuples; if a " +"tuple contains any mutable object either directly or indirectly, it cannot " +"be used as a key. You can't use lists as keys, since lists can be modified " +"in place using index assignments, slice assignments, or methods like :meth:" +"`~list.append` and :meth:`~list.extend`." +msgstr "" +"Ein weiterer nützlicher, in Python integrierter Datentyp ist das " +"*Wörterbuch* (siehe :ref:`typesmapping`). Wörterbücher werden in anderen " +"Sprachen manchmal als \"assoziative Speicher\" oder \"assoziative Arrays\" " +"bezeichnet. Im Gegensatz zu Sequenzen, die durch einen Zahlenbereich " +"indiziert werden, werden Dictionaries durch *Schlüssel* indiziert, die von " +"jedem unveränderlichen Typ sein können; Zeichenketten und Zahlen können " +"immer als Schlüssel verwendet werden. Tupel können als Schlüssel verwendet " +"werden, wenn sie ausschließlich Zeichenketten, Zahlen oder Tupel enthalten; " +"enthält ein Tupel direkt oder indirekt ein veränderbliches Objekt, kann es " +"nicht als Schlüssel verwendet werden. Listen können nicht als Schlüssel " +"verwendet werden, da sie durch Indexzuweisungen, Slice-Zuweisungen oder " +"Methoden wie :meth:`~list.append` und :meth:`~list.extend` an Ort und Stelle " +"verändert werden können." + +#: ../../tutorial/datastructures.rst:552 +msgid "" +"It is best to think of a dictionary as a set of *key: value* pairs, with the " +"requirement that the keys are unique (within one dictionary). A pair of " +"braces creates an empty dictionary: ``{}``. Placing a comma-separated list " +"of key:value pairs within the braces adds initial key:value pairs to the " +"dictionary; this is also the way dictionaries are written on output." +msgstr "" +"Man kann sich ein Wörterbuch am besten als eine Menge von *Schlüssel:Wert*-" +"Paaren vorstellen, wobei die Schlüssel (innerhalb eines Wörterbuchs) " +"eindeutig sein müssen. Ein Paar geschweifter Klammern erstellt ein leeres " +"Wörterbuch: ``{}``. Durch Einfügen einer durch Kommas getrennten Liste von " +"Schlüssel:Wert-Paaren innerhalb der geschweiften Klammern werden dem " +"Wörterbuch anfängliche Schlüssel:Wert-Paare hinzugefügt; auf diese Weise " +"werden Wörterbücher auch bei der Ausgabe dargestellt." + +#: ../../tutorial/datastructures.rst:558 +msgid "" +"The main operations on a dictionary are storing a value with some key and " +"extracting the value given the key. It is also possible to delete a key:" +"value pair with ``del``. If you store using a key that is already in use, " +"the old value associated with that key is forgotten." +msgstr "" +"Die wichtigsten Operationen in einem Wörterbuch sind das Speichern eines " +"Werts unter einem bestimmten Schlüssel und das Abrufen des Werts anhand des " +"Schlüssels. Es ist außerdem möglich, ein Schlüssel-Wert-Paar mit ``del`` zu " +"löschen. Wenn du einen Wert unter einem Schlüssel speicherst, der bereits " +"verwendet wird, wird der alte, diesem Schlüssel zugeordnete Wert verworfen." + +#: ../../tutorial/datastructures.rst:563 +msgid "" +"Extracting a value for a non-existent key by subscripting (``d[key]``) " +"raises a :exc:`KeyError`. To avoid getting this error when trying to access " +"a possibly non-existent key, use the :meth:`~dict.get` method instead, which " +"returns ``None`` (or a specified default value) if the key is not in the " +"dictionary." +msgstr "" +"Der Versuch, einen Wert für einen nicht vorhandenen Schlüssel mittels " +"Indexierung abzurufen (``d[key]``), löst einen :exc:`KeyError` aus. Um " +"diesen Fehler beim Zugriff auf einen möglicherweise nicht vorhandenen " +"Schlüssel zu vermeiden, verwende stattdessen die Methode :meth:`~dict.get`, " +"die ``None`` (oder einen angegebenen Standardwert) zurückgibt, wenn der " +"Schlüssel nicht im Wörterbuch enthalten ist." + +#: ../../tutorial/datastructures.rst:568 +msgid "" +"Performing ``list(d)`` on a dictionary returns a list of all the keys used " +"in the dictionary, in insertion order (if you want it sorted, just use " +"``sorted(d)`` instead). To check whether a single key is in the dictionary, " +"use the :keyword:`in` keyword." +msgstr "" +"Wendet man ``list(d)`` auf ein Wörterbuch an, wird eine Liste aller im " +"Wörterbuch verwendeten Schlüssel in der Reihenfolge ihrer Einfügung " +"zurückgegeben (wenn du die Liste sortiert haben möchtest, verwende " +"stattdessen einfach ``sorted(d)``). Um zu prüfen, ob ein einzelner Schlüssel " +"im Wörterbuch enthalten ist, verwende das Schlüsselwort :keyword:`in` ." + +#: ../../tutorial/datastructures.rst:573 +msgid "Here is a small example using a dictionary::" +msgstr "Hier ist ein kleines Beispiel, bei dem ein Wörterbuch verwendet wird::" + +#: ../../tutorial/datastructures.rst:575 +msgid "" +">>> tel = {'jack': 4098, 'sape': 4139}\n" +">>> tel['guido'] = 4127\n" +">>> tel\n" +"{'jack': 4098, 'sape': 4139, 'guido': 4127}\n" +">>> tel['jack']\n" +"4098\n" +">>> tel['irv']\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"KeyError: 'irv'\n" +">>> print(tel.get('irv'))\n" +"None\n" +">>> del tel['sape']\n" +">>> tel['irv'] = 4127\n" +">>> tel\n" +"{'jack': 4098, 'guido': 4127, 'irv': 4127}\n" +">>> list(tel)\n" +"['jack', 'guido', 'irv']\n" +">>> sorted(tel)\n" +"['guido', 'irv', 'jack']\n" +">>> 'guido' in tel\n" +"True\n" +">>> 'jack' not in tel\n" +"False" +msgstr "" +">>> tel = {'jack': 4098, 'sape': 4139}\n" +">>> tel['guido'] = 4127\n" +">>> tel\n" +"{'jack': 4098, 'sape': 4139, 'guido': 4127}\n" +">>> tel['jack']\n" +"4098\n" +">>> tel['irv']\n" +"Traceback (letzter Aufruf zuletzt):\n" +" Datei \"\", Zeile 1, in \n" +"KeyError: 'irv'\n" +">>> print(tel.get('irv'))\n" +"None\n" +">>> del tel['sape']\n" +">>> tel['irv'] = 4127\n" +">>> tel\n" +"{'jack': 4098, 'guido': 4127, 'irv': 4127}\n" +">>> list(tel)\n" +"['jack', 'guido', 'irv']\n" +">>> sorted(tel)\n" +"['guido', 'irv', 'jack']\n" +">>> 'guido' in tel\n" +"True\n" +">>> 'jack' not in tel\n" +"False" + +#: ../../tutorial/datastructures.rst:600 +msgid "" +"The :func:`dict` constructor builds dictionaries directly from sequences of " +"key-value pairs::" +msgstr "" +"Der Konstruktor ` :func:`dict` ` erstellt Wörterbücher direkt aus Sequenzen " +"von Schlüssel-Wert-Paaren::" + +#: ../../tutorial/datastructures.rst:603 +msgid "" +">>> dict([('sape', 4139), ('guido', 4127), ('jack', 4098)])\n" +"{'sape': 4139, 'guido': 4127, 'jack': 4098}" +msgstr "" +">>> dict([('sape', 4139), ('guido', 4127), ('jack', 4098)])\n" +"{'sape': 4139, 'guido': 4127, 'jack': 4098}" + +#: ../../tutorial/datastructures.rst:606 +msgid "" +"In addition, dict comprehensions can be used to create dictionaries from " +"arbitrary key and value expressions::" +msgstr "" +"Darüber hinaus können Dict-Comprehensions verwendet werden, um Wörterbücher " +"aus beliebigen Schlüssel- und Wert-Ausdrücken zu erstellen::" + +#: ../../tutorial/datastructures.rst:609 +msgid "" +">>> {x: x**2 for x in (2, 4, 6)}\n" +"{2: 4, 4: 16, 6: 36}" +msgstr "" +">>> {x: x**2 for x in (2, 4, 6)}\n" +"{2: 4, 4: 16, 6: 36}" + +#: ../../tutorial/datastructures.rst:612 +msgid "" +"And dictionary unpacking (via ``**``) can be used to merge multiple " +"dictionaries::" +msgstr "" +"Und Dictionary-Entpacken (mittels ``**``) kann verwendet werden, um mehrere " +"Dictionaries zusammenzuführen::" + +#: ../../tutorial/datastructures.rst:615 +msgid "" +">>> odds = {i: i**2 for i in (1, 3, 5)}\n" +">>> evens = {i: i**2 for i in (2, 4, 6)}\n" +">>> {**odds, **evens}\n" +"{1: 1, 3: 9, 5: 25, 2: 4, 4: 16, 6: 36}\n" +"\n" +">>> all_values = [odds, evens, {0: 0}]\n" +">>> {**i for i in all_values}\n" +"{1: 1, 3: 9, 5: 25, 2: 4, 4: 16, 6: 36, 0: 0}" +msgstr "" +">>> odds = {i: i**2 for i in (1, 3, 5)}\n" +">>> evens = {i: i**2 for i in (2, 4, 6)}\n" +">>> {**odds, **evens}\n" +"{1: 1, 3: 9, 5: 25, 2: 4, 4: 16, 6: 36}\n" +"\n" +">>> all_values = [odds, evens, {0: 0}]\n" +">>> {**i for i in all_values}\n" +"{1: 1, 3: 9, 5: 25, 2: 4, 4: 16, 6: 36, 0: 0}" + +#: ../../tutorial/datastructures.rst:624 +msgid "" +"When the keys are simple strings, it is sometimes easier to specify pairs " +"using keyword arguments::" +msgstr "" +"Wenn es sich bei den Schlüsseln um einfache Zeichenfolgen handelt, ist es " +"manchmal einfacher, Paare mithilfe von Schlüsselwortargumenten anzugeben::" + +#: ../../tutorial/datastructures.rst:627 +msgid "" +">>> dict(sape=4139, guido=4127, jack=4098)\n" +"{'sape': 4139, 'guido': 4127, 'jack': 4098}" +msgstr "" +">>> dict(sape=4139, guido=4127, jack=4098)\n" +"{'sape': 4139, 'guido': 4127, 'jack': 4098}" + +#: ../../tutorial/datastructures.rst:634 +msgid "Looping Techniques" +msgstr "Schleifentechniken" + +#: ../../tutorial/datastructures.rst:636 +msgid "" +"When looping through dictionaries, the key and corresponding value can be " +"retrieved at the same time using the :meth:`~dict.items` method. ::" +msgstr "" +"Beim Durchlaufen von Wörterbüchern können der Schlüssel und der zugehörige " +"Wert mithilfe der Methode :meth:`~dict.items` gleichzeitig abgerufen " +"werden. ::" + +#: ../../tutorial/datastructures.rst:639 +msgid "" +">>> knights = {'gallahad': 'the pure', 'robin': 'the brave'}\n" +">>> for k, v in knights.items():\n" +"... print(k, v)\n" +"...\n" +"gallahad the pure\n" +"robin the brave" +msgstr "" +">>> knights = {'gallahad': 'der Reine', 'robin': 'der Tapfere'}\n" +">>> for k, v in knights.items():\n" +"... print(k, v)\n" +"...\n" +"gallahad der Reine\n" +"robin der Tapfere" + +#: ../../tutorial/datastructures.rst:646 +msgid "" +"When looping through a sequence, the position index and corresponding value " +"can be retrieved at the same time using the :func:`enumerate` function. ::" +msgstr "" +"Beim Durchlaufen einer Sequenz können der Positionsindex und der zugehörige " +"Wert mithilfe der Funktion :func:`enumerate` gleichzeitig abgerufen " +"werden. ::" + +#: ../../tutorial/datastructures.rst:649 +msgid "" +">>> for i, v in enumerate(['tic', 'tac', 'toe']):\n" +"... print(i, v)\n" +"...\n" +"0 tic\n" +"1 tac\n" +"2 toe" +msgstr "" +">>> for i, v in enumerate(['tic', 'tac', 'toe']):\n" +"... print(i, v)\n" +"...\n" +"0 tic\n" +"1 tac\n" +"2 toe" + +#: ../../tutorial/datastructures.rst:656 +msgid "" +"To loop over two or more sequences at the same time, the entries can be " +"paired with the :func:`zip` function. ::" +msgstr "" +"Um zwei oder mehr Sequenzen gleichzeitig zu durchlaufen, können die Einträge " +"mit der Funktion :func:`zip` gepaart werden. ::" + +#: ../../tutorial/datastructures.rst:659 +msgid "" +">>> questions = ['name', 'quest', 'favorite color']\n" +">>> answers = ['lancelot', 'the holy grail', 'blue']\n" +">>> for q, a in zip(questions, answers):\n" +"... print('What is your {0}? It is {1}.'.format(q, a))\n" +"...\n" +"What is your name? It is lancelot.\n" +"What is your quest? It is the holy grail.\n" +"What is your favorite color? It is blue." +msgstr "" +">>> Fragen = ['Name', 'Aufgabe', 'Lieblingsfarbe']\n" +">>> Antworten = ['Lancelot', 'der Heilige Gral', 'blau']\n" +">>> for q, a in zip(Fragen, Antworten):\n" +"... print('Wie heißt du {0}? Du heißt {1}.'.format(q, a))\n" +"...\n" +"Wie heißt du? Du heißt Lancelot.\n" +"Was ist deine Aufgabe? Es ist der Heilige Gral.\n" +"Was ist deine Lieblingsfarbe? Es ist Blau." + +#: ../../tutorial/datastructures.rst:668 +msgid "" +"To loop over a sequence in reverse, first specify the sequence in a forward " +"direction and then call the :func:`reversed` function. ::" +msgstr "" +"Um eine Folge in umgekehrter Reihenfolge zu durchlaufen, gib zunächst die " +"Folge in Vorwärtsrichtung an und rufe anschließend die Funktion :func:" +"`reversed` auf. ::" + +#: ../../tutorial/datastructures.rst:671 +msgid "" +">>> for i in reversed(range(1, 10, 2)):\n" +"... print(i)\n" +"...\n" +"9\n" +"7\n" +"5\n" +"3\n" +"1" +msgstr "" +">>> for i in reversed(range(1, 10, 2)):\n" +"... print(i)\n" +"...\n" +"9\n" +"7\n" +"5\n" +"3\n" +"1" + +#: ../../tutorial/datastructures.rst:680 +msgid "" +"To loop over a sequence in sorted order, use the :func:`sorted` function " +"which returns a new sorted list while leaving the source unaltered. ::" +msgstr "" +"Um eine Folge in sortierter Reihenfolge zu durchlaufen, verwende die " +"Funktion :func:`sorted`, die eine neue sortierte Liste zurückgibt, während " +"die Quelle unverändert bleibt. ::" + +#: ../../tutorial/datastructures.rst:683 +msgid "" +">>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']\n" +">>> for i in sorted(basket):\n" +"... print(i)\n" +"...\n" +"apple\n" +"apple\n" +"banana\n" +"orange\n" +"orange\n" +"pear" +msgstr "" +">>> basket = ['Apfel', 'Orange', 'Apfel', 'Birne', 'Orange', 'Banane']\n" +">>> for i in sorted(basket):\n" +"... print(i)\n" +"...\n" +"Apfel\n" +"Apfel\n" +"Banane\n" +"Orange\n" +"Orange\n" +"Birne" + +#: ../../tutorial/datastructures.rst:694 +msgid "" +"Using :func:`set` on a sequence eliminates duplicate elements. The use of :" +"func:`sorted` in combination with :func:`set` over a sequence is an " +"idiomatic way to loop over unique elements of the sequence in sorted " +"order. ::" +msgstr "" +"Die Anwendung von :func:`set` auf eine Sequenz entfernt doppelte Elemente. " +"Die Verwendung von :func:`sorted` in Kombination mit :func:`set` auf eine " +"Sequenz ist eine gängige Methode, um die eindeutigen Elemente der Sequenz in " +"sortierter Reihenfolge durchzugehen. ::" + +#: ../../tutorial/datastructures.rst:698 +msgid "" +">>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']\n" +">>> for f in sorted(set(basket)):\n" +"... print(f)\n" +"...\n" +"apple\n" +"banana\n" +"orange\n" +"pear" +msgstr "" +">>> basket = ['Apfel', 'Orange', 'Apfel', 'Birne', 'Orange', 'Banane']\n" +">>> for f in sorted(set(basket)):\n" +"... print(f)\n" +"...\n" +"Apfel\n" +"Banane\n" +"Orange\n" +"Birne" + +#: ../../tutorial/datastructures.rst:707 +msgid "" +"It is sometimes tempting to change a list while you are looping over it; " +"however, it is often simpler and safer to create a new list instead. ::" +msgstr "" +"Manchmal ist es verlockend, eine Liste zu ändern, während man sie in einer " +"Schleife durchläuft; oft ist es jedoch einfacher und sicherer, stattdessen " +"eine neue Liste zu erstellen. ::" + +#: ../../tutorial/datastructures.rst:710 +msgid "" +">>> import math\n" +">>> raw_data = [56.2, float('NaN'), 51.7, 55.3, 52.5, float('NaN'), 47.8]\n" +">>> filtered_data = []\n" +">>> for value in raw_data:\n" +"... if not math.isnan(value):\n" +"... filtered_data.append(value)\n" +"...\n" +">>> filtered_data\n" +"[56.2, 51.7, 55.3, 52.5, 47.8]" +msgstr "" +">>> import math\n" +">>> raw_data = [56.2, float('NaN'), 51.7, 55.3, 52.5, float('NaN'), 47.8]\n" +">>> filtered_data = []\n" +">>> for value in raw_data:\n" +"... if not math.isnan(value):\n" +"... filtered_data.append(value)\n" +"...\n" +">>> filtered_data\n" +"[56,2, 51,7, 55,3, 52,5, 47,8]" + +#: ../../tutorial/datastructures.rst:724 +msgid "More on Conditions" +msgstr "Mehr zu den Bedingungen" + +#: ../../tutorial/datastructures.rst:726 +msgid "" +"The conditions used in ``while`` and ``if`` statements can contain any " +"operators, not just comparisons." +msgstr "" +"Die in den Anweisungen ``while`` und ``if`` verwendeten Bedingungen können " +"beliebige Operatoren enthalten, nicht nur Vergleichsoperatoren." + +#: ../../tutorial/datastructures.rst:730 +msgid "" +"The comparison operators ``in`` and ``not in`` are membership tests that " +"determine whether a value is in (or not in) a container. The operators " +"``is`` and ``is not`` compare whether two objects are really the same " +"object. All comparison operators have the same priority, which is lower " +"than that of all numerical operators." +msgstr "" +"Die Vergleichsoperatoren ``in`` und ``not in`` sind Zugehörigkeitsprüfungen, " +"die feststellen, ob ein Wert in einem Container enthalten ist (oder nicht). " +"Die Operatoren ``is`` und ``is not`` vergleichen, ob zwei Objekte " +"tatsächlich dasselbe Objekt sind. Alle Vergleichsoperatoren haben dieselbe " +"Priorität, die niedriger ist als die aller numerischen Operatoren." + +#: ../../tutorial/datastructures.rst:736 +msgid "" +"Comparisons can be chained. For example, ``a < b == c`` tests whether ``a`` " +"is less than ``b`` and moreover ``b`` equals ``c``." +msgstr "" +"Vergleiche können verkettet werden. Beispielsweise prüft ``a < b == c``, ob " +"``a`` kleiner ist als ``b`` und ob darüber hinaus ``b`` gleich ``c`` ist." + +#: ../../tutorial/datastructures.rst:739 +msgid "" +"Comparisons may be combined using the Boolean operators ``and`` and ``or``, " +"and the outcome of a comparison (or of any other Boolean expression) may be " +"negated with ``not``. These have lower priorities than comparison " +"operators; between them, ``not`` has the highest priority and ``or`` the " +"lowest, so that ``A and not B or C`` is equivalent to ``(A and (not B)) or " +"C``. As always, parentheses can be used to express the desired composition." +msgstr "" +"Vergleiche können mithilfe der Booleschen Operatoren ``and`` und ``or`` " +"kombiniert werden, und das Ergebnis eines Vergleichs (oder eines beliebigen " +"anderen Booleschen Ausdrucks) kann mit ``not`` negiert werden. Diese haben " +"eine niedrigere Priorität als Vergleichsoperatoren; unter ihnen hat ``not`` " +"die höchste Priorität und ``or`` die niedrigste, sodass ``A and not B or C`` " +"gleichbedeutend ist mit ``(A and (not B)) or C``. Wie immer können Klammern " +"verwendet werden, um die gewünschte Zusammensetzung auszudrücken." + +#: ../../tutorial/datastructures.rst:746 +msgid "" +"The Boolean operators ``and`` and ``or`` are so-called *short-circuit* " +"operators: their arguments are evaluated from left to right, and evaluation " +"stops as soon as the outcome is determined. For example, if ``A`` and ``C`` " +"are true but ``B`` is false, ``A and B and C`` does not evaluate the " +"expression ``C``. When used as a general value and not as a Boolean, the " +"return value of a short-circuit operator is the last evaluated argument." +msgstr "" +"Die Booleschen Operatoren ``and`` und ``or`` sind sogenannte *Kurzschluss*-" +"Operatoren: Deine Argumente werden von links nach rechts ausgewertet, und " +"die Auswertung wird beendet, sobald das Ergebnis feststeht. Sind " +"beispielsweise ``A`` und ``C`` wahr, ``B`` jedoch falsch, so wertet ``A and " +"B and C`` den Ausdruck ``C`` nicht aus. Wird ein Kurzschlussoperator als " +"allgemeiner Wert und nicht als Boolescher Wert verwendet, ist der " +"Rückgabewert das zuletzt ausgewertete Argument." + +#: ../../tutorial/datastructures.rst:753 +msgid "" +"It is possible to assign the result of a comparison or other Boolean " +"expression to a variable. For example, ::" +msgstr "" +"Es ist möglich, das Ergebnis eines Vergleichs oder eines anderen booleschen " +"Ausdrucks einer Variablen zuzuweisen. Beispiel: ::" + +#: ../../tutorial/datastructures.rst:756 +msgid "" +">>> string1, string2, string3 = '', 'Trondheim', 'Hammer Dance'\n" +">>> non_null = string1 or string2 or string3\n" +">>> non_null\n" +"'Trondheim'" +msgstr "" +">>> string1, string2, string3 = '', 'Trondheim', 'Hammer Dance'\n" +">>> non_null = string1 or string2 or string3\n" +">>> non_null\n" +"'Trondheim'" + +#: ../../tutorial/datastructures.rst:761 +msgid "" +"Note that in Python, unlike C, assignment inside expressions must be done " +"explicitly with the :ref:`walrus operator ` ``:=``. This avoids a common class of problems encountered " +"in C programs: typing ``=`` in an expression when ``==`` was intended." +msgstr "" +"Beachte dass in Python – anders als in C – Zuweisungen innerhalb von " +"Ausdrücken explizit mit dem :ref:`Walross-Operator ` ``:=`` erfolgen müssen. Dadurch wird eine " +"häufige Problemklasse vermieden, die in C-Programmen auftritt: die Eingabe " +"von ``=`` in einem Ausdruck, obwohl eigentlich ``==`` gemeint war." + +#: ../../tutorial/datastructures.rst:771 +msgid "Comparing Sequences and Other Types" +msgstr "Vergleich von Sequenzen und anderen Typen" + +#: ../../tutorial/datastructures.rst:772 +msgid "" +"Sequence objects typically may be compared to other objects with the same " +"sequence type. The comparison uses *lexicographical* ordering: first the " +"first two items are compared, and if they differ this determines the outcome " +"of the comparison; if they are equal, the next two items are compared, and " +"so on, until either sequence is exhausted. If two items to be compared are " +"themselves sequences of the same type, the lexicographical comparison is " +"carried out recursively. If all items of two sequences compare equal, the " +"sequences are considered equal. If one sequence is an initial sub-sequence " +"of the other, the shorter sequence is the smaller (lesser) one. " +"Lexicographical ordering for strings uses the Unicode code point number to " +"order individual characters. Some examples of comparisons between sequences " +"of the same type::" +msgstr "" +"Sequenzobjekte können in der Regel mit anderen Objekten desselben " +"Sequenztyps verglichen werden. Der Vergleich erfolgt nach *lexikografischer* " +"Reihenfolge: Zunächst werden die ersten beiden Elemente verglichen; " +"unterscheiden sie sich, bestimmt dies das Ergebnis des Vergleichs; sind sie " +"gleich, werden die nächsten beiden Elemente verglichen und so weiter, bis " +"eine der beiden Sequenzen erschöpft ist. Sind zwei zu vergleichende Elemente " +"selbst Sequenzen desselben Typs, wird der lexikografische Vergleich rekursiv " +"durchgeführt. Sind alle Elemente zweier Sequenzen gleich, gelten die " +"Sequenzen als gleich. Ist eine Sequenz eine anfängliche Teilsequenz der " +"anderen, ist die kürzere Sequenz die kleinere (geringere). Bei der " +"lexikografischen Sortierung von Zeichenketten wird die Unicode-" +"Codepunktnummer zur Sortierung einzelner Zeichen verwendet. Einige Beispiele " +"für Vergleiche zwischen Sequenzen desselben Typs:" + +#: ../../tutorial/datastructures.rst:784 +msgid "" +"(1, 2, 3) < (1, 2, 4)\n" +"[1, 2, 3] < [1, 2, 4]\n" +"'ABC' < 'C' < 'Pascal' < 'Python'\n" +"(1, 2, 3, 4) < (1, 2, 4)\n" +"(1, 2) < (1, 2, -1)\n" +"(1, 2, 3) == (1.0, 2.0, 3.0)\n" +"(1, 2, ('aa', 'ab')) < (1, 2, ('abc', 'a'), 4)" +msgstr "" +"(1, 2, 3) < (1, 2, 4)\n" +"[1, 2, 3] < [1, 2, 4]\n" +"'ABC' < 'C' < 'Pascal' < 'Python'\n" +"(1, 2, 3, 4) < (1, 2, 4)\n" +"(1, 2) < (1, 2, -1)\n" +"(1, 2, 3) == (1,0, 2,0, 3,0)\n" +"(1, 2, ('aa', 'ab')) < (1, 2, ('abc', 'a'), 4)" + +#: ../../tutorial/datastructures.rst:792 +msgid "" +"Note that comparing objects of different types with ``<`` or ``>`` is legal " +"provided that the objects have appropriate comparison methods. For example, " +"mixed numeric types are compared according to their numeric value, so 0 " +"equals 0.0, etc. Otherwise, rather than providing an arbitrary ordering, " +"the interpreter will raise a :exc:`TypeError` exception." +msgstr "" +"Beachte, dass der Vergleich von Objekten unterschiedlicher Typen mit ``<`` " +"oder ``>`` zulässig ist, sofern die Objekte über entsprechende " +"Vergleichsmethoden verfügen. Beispielsweise werden gemischte numerische " +"Typen anhand ihres numerischen Werts verglichen, sodass 0 gleich 0,0 ist " +"usw. Andernfalls liefert der Interpreter keine willkürliche Reihenfolge, " +"sondern löst eine :exc:`TypeError`-Ausnahme aus." + +#: ../../tutorial/datastructures.rst:800 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../tutorial/datastructures.rst:801 +msgid "" +"Other languages may return the mutated object, which allows method chaining, " +"such as ``d->insert(\"a\")->remove(\"b\")->sort();``." +msgstr "" +"Andere Sprachen geben möglicherweise das geänderte Objekt zurück, was eine " +"Methodenverkettung ermöglicht, wie beispielsweise ``d->insert(\"a\")-" +">remove(\"b\")->sort();``." + +#~ msgid "" +#~ ">>> a = {x for x in 'abracadabra' if x not in 'abc'}\n" +#~ ">>> a\n" +#~ "{'r', 'd'}" +#~ msgstr "" +#~ ">>> a = {x for x in 'abracadabra' if x not in 'abc'}\n" +#~ ">>> a\n" +#~ "{'r', 'd'}" diff --git a/tutorial/index.po b/tutorial/index.po index 6e710a6a..b5e8cc01 100644 --- a/tutorial/index.po +++ b/tutorial/index.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2026-07-31 21:31+0000\n" "Last-Translator: \n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -87,11 +87,13 @@ msgstr "" "Tutorial auch offline gelesen werden kann." #: ../../tutorial/index.rst:33 +#, fuzzy msgid "" -"For a description of standard objects and modules, see :ref:`library-" -"index`. :ref:`reference-index` gives a more formal definition of the " -"language. To write extensions in C or C++, read :ref:`extending-index` and :" -"ref:`c-api-index`. There are also several books covering Python in depth." +"For a description of standard objects and modules, see :ref:`builtins-index` " +"and :ref:`library-index`. :ref:`reference-index` gives a more formal " +"definition of the language. To write extensions in C or C++, read :ref:" +"`extending-index` and :ref:`c-api-index`. There are also several books " +"covering Python in depth." msgstr "" "Eine Beschreibung der Standardobjekte und -module findest du unter :ref:" "`library-index`. :ref:`reference-index` bietet eine formellere Definition " diff --git a/tutorial/index.po~ b/tutorial/index.po~ new file mode 100644 index 00000000..6e710a6a --- /dev/null +++ b/tutorial/index.po~ @@ -0,0 +1,122 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR Swen Bachmann <142266608+sba72@users.noreply.github.com>, 2026. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2026-07-31 21:31+0000\n" +"Last-Translator: \n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../tutorial/index.rst:5 +msgid "The Python Tutorial" +msgstr "Das Python-Tutorial" + +#: ../../tutorial/index.rst:7 +msgid "" +"This tutorial is designed for *programmers* that are new to the Python " +"language, **not** *beginners* who are new to programming." +msgstr "" +"Dieses Tutorial richtet sich an *Programmierer*, die neu bei der Sprache " +"Python sind, **nicht** an *Anfänger*, die neu beim Programmieren sind." + +#: ../../tutorial/index.rst:11 +msgid "" +"Python is an easy to learn, powerful programming language. It has efficient " +"high-level data structures and a simple but effective approach to object-" +"oriented programming. Python's elegant syntax and dynamic typing, together " +"with its interpreted nature, make it an ideal language for scripting and " +"rapid application development in many areas on most platforms." +msgstr "" +"Python ist eine leicht zu erlernende, mächtige Programmiersprache. Sie " +"bietet effiziente objektorientierte Datenstrukturen und einen einfachen, " +"aber effektiven Ansatz zur objektorientierten Programmierung. Pythons " +"elegante Syntax und dynamische Typisierung machen es zusammen mit seiner " +"Eigenschaft als Interpretationssprache zu einer idealen Sprache für Skripte " +"und schnelle Anwendungsentwicklung in vielen Bereichen auf den meisten " +"Plattformen." + +#: ../../tutorial/index.rst:17 +msgid "" +"The Python interpreter and the extensive standard library are freely " +"available in source or binary form for all major platforms from the Python " +"website, https://www.python.org/, and may be freely distributed. The same " +"site also contains distributions of and pointers to many free third party " +"Python modules, programs and tools, and additional documentation." +msgstr "" +"Der Python-Interpreter und die umfangreiche Standardbibliothek sind für alle " +"wichtigen Plattformen frei im Quell- oder Binärformat auf der Python-" +"Website, https://www.python.org/, erhältlich und dürfen frei weitergegeben " +"werden. Dieselbe Seite enthält außerdem Distributionen und Verweise auf " +"viele freie Python-Module, -Programme und -Werkzeuge von Drittanbietern " +"sowie zusätzliche Dokumentation." + +#: ../../tutorial/index.rst:23 +msgid "" +"The Python interpreter is easily extended with new functions and data types " +"implemented in C or C++ (or other languages callable from C). Python is also " +"suitable as an extension language for customizable applications." +msgstr "" +"Der Python-Interpreter lässt sich leicht um neue Funktionen und Datentypen " +"erweitern, die in C oder C++ (oder anderen aus C aufrufbaren Sprachen) " +"implementiert sind. Python eignet sich auch als Erweiterungssprache für " +"anpassbare Anwendungen." + +#: ../../tutorial/index.rst:27 +msgid "" +"This tutorial introduces the reader informally to the basic concepts and " +"features of the Python language and system. Be aware that it expects you to " +"have a basic understanding of programming in general. It helps to have a " +"Python interpreter handy for hands-on experience, but all examples are self-" +"contained, so the tutorial can be read off-line as well." +msgstr "" +"Dieses Tutorial führt den Leser informell in die grundlegenden Konzepte und " +"Funktionen der Sprache Python und ihres Systems ein. Bitte beachte, dass ein " +"grundlegendes Verständnis der Programmierung im Allgemeinen vorausgesetzt " +"wird. Es ist hilfreich, für praktische Erfahrungen einen Python-Interpreter " +"zur Hand zu haben; alle Beispiele sind jedoch eigenständig, sodass das " +"Tutorial auch offline gelesen werden kann." + +#: ../../tutorial/index.rst:33 +msgid "" +"For a description of standard objects and modules, see :ref:`library-" +"index`. :ref:`reference-index` gives a more formal definition of the " +"language. To write extensions in C or C++, read :ref:`extending-index` and :" +"ref:`c-api-index`. There are also several books covering Python in depth." +msgstr "" +"Eine Beschreibung der Standardobjekte und -module findest du unter :ref:" +"`library-index`. :ref:`reference-index` bietet eine formellere Definition " +"der Sprache. Um Erweiterungen in C oder C++ zu schreiben, lies :ref:" +"`extending-index` und :ref:`c-api-index`. Es gibt außerdem mehrere Bücher, " +"die sich eingehend mit Python befassen." + +#: ../../tutorial/index.rst:38 +msgid "" +"This tutorial does not attempt to be comprehensive and cover every single " +"feature, or even every commonly used feature. Instead, it introduces many of " +"Python's most noteworthy features, and will give you a good idea of the " +"language's flavor and style. After reading it, you will be able to read and " +"write Python modules and programs, and you will be ready to learn more about " +"the various Python library modules described in :ref:`library-index`." +msgstr "" +"Dieses Tutorial erhebt keinen Anspruch darauf, vollständig zu sein und jedes " +"einzelne oder auch nur jedes häufig genutzte Feature abzudecken. Stattdessen " +"führt es in viele der bemerkenswertesten Features von Python ein und " +"vermittelt dir einen guten Eindruck vom Stil und der Philosophie der " +"Sprache. Nach dem Lesen wirst du in der Lage sein, Python-Module und -" +"Programme zu lesen und zu schreiben, und du wirst bereit sein, mehr über die " +"verschiedenen im :ref:`library-index` beschriebenen Python-Bibliotheksmodule " +"zu lernen." + +#: ../../tutorial/index.rst:45 +msgid "The :ref:`glossary` is also worth going through." +msgstr "Auch das :ref:`glossary` ist einen Blick wert." diff --git a/tutorial/modules.po b/tutorial/modules.po index 7d8620c7..a421e7bc 100644 --- a/tutorial/modules.po +++ b/tutorial/modules.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: Swen Bachmann <142266608+sba72@users.noreply.github.com>\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -1321,38 +1321,10 @@ msgstr "" "verwenden." #: ../../tutorial/modules.rst:588 -msgid "Packages in Multiple Directories" -msgstr "Pakete in mehreren Verzeichnissen" - -#: ../../tutorial/modules.rst:590 -msgid "" -"Packages support one more special attribute, :attr:`~module.__path__`. This " -"is initialized to be a :term:`sequence` of strings containing the name of " -"the directory holding the package's :file:`__init__.py` before the code in " -"that file is executed. This variable can be modified; doing so affects " -"future searches for modules and subpackages contained in the package." -msgstr "" -"Pakete unterstützen ein weiteres spezielles Attribut: :attr:`~module." -"__path__` . Dieses wird zunächst als :term:`Sequenz ` von " -"Zeichenketten initialisiert, die den Namen des Verzeichnisses enthalten, in " -"dem sich die Datei :file:`__init__.py` des Pakets befindet – und zwar bevor " -"der Code in dieser Datei ausgeführt wird. Diese Variable kann geändert " -"werden; dies wirkt sich auf zukünftige Suchvorgänge nach Modulen und " -"Unterpaketen aus, die in dem Paket enthalten sind." - -#: ../../tutorial/modules.rst:597 -msgid "" -"While this feature is not often needed, it can be used to extend the set of " -"modules found in a package." -msgstr "" -"Auch wenn diese Funktion nicht oft benötigt wird, kann sie dazu dienen, die " -"in einem Paket enthaltenen Module zu erweitern." - -#: ../../tutorial/modules.rst:602 msgid "Footnotes" msgstr "Fußnoten" -#: ../../tutorial/modules.rst:603 +#: ../../tutorial/modules.rst:589 msgid "" "In fact function definitions are also 'statements' that are 'executed'; the " "execution of a module-level function definition adds the function name to " @@ -1387,3 +1359,29 @@ msgstr "builtins" #: ../../tutorial/modules.rst:495 msgid "__all__" msgstr "__all__" + +#~ msgid "Packages in Multiple Directories" +#~ msgstr "Pakete in mehreren Verzeichnissen" + +#~ msgid "" +#~ "Packages support one more special attribute, :attr:`~module.__path__`. " +#~ "This is initialized to be a :term:`sequence` of strings containing the " +#~ "name of the directory holding the package's :file:`__init__.py` before " +#~ "the code in that file is executed. This variable can be modified; doing " +#~ "so affects future searches for modules and subpackages contained in the " +#~ "package." +#~ msgstr "" +#~ "Pakete unterstützen ein weiteres spezielles Attribut: :attr:`~module." +#~ "__path__` . Dieses wird zunächst als :term:`Sequenz ` von " +#~ "Zeichenketten initialisiert, die den Namen des Verzeichnisses enthalten, " +#~ "in dem sich die Datei :file:`__init__.py` des Pakets befindet – und zwar " +#~ "bevor der Code in dieser Datei ausgeführt wird. Diese Variable kann " +#~ "geändert werden; dies wirkt sich auf zukünftige Suchvorgänge nach Modulen " +#~ "und Unterpaketen aus, die in dem Paket enthalten sind." + +#~ msgid "" +#~ "While this feature is not often needed, it can be used to extend the set " +#~ "of modules found in a package." +#~ msgstr "" +#~ "Auch wenn diese Funktion nicht oft benötigt wird, kann sie dazu dienen, " +#~ "die in einem Paket enthaltenen Module zu erweitern." diff --git a/tutorial/modules.po~ b/tutorial/modules.po~ new file mode 100644 index 00000000..7d8620c7 --- /dev/null +++ b/tutorial/modules.po~ @@ -0,0 +1,1389 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Last-Translator: Swen Bachmann <142266608+sba72@users.noreply.github.com>\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../tutorial/modules.rst:5 +msgid "Modules" +msgstr "Module" + +#: ../../tutorial/modules.rst:7 +msgid "" +"If you quit from the Python interpreter and enter it again, the definitions " +"you have made (functions and variables) are lost. Therefore, if you want to " +"write a somewhat longer program, you are better off using a text editor to " +"prepare the input for the interpreter and running it with that file as input " +"instead. This is known as creating a *script*. As your program gets " +"longer, you may want to split it into several files for easier maintenance. " +"You may also want to use a handy function that you've written in several " +"programs without copying its definition into each program." +msgstr "" +"Wenn du den Python-Interpreter beenden und erneut starten, gehen die von dir " +"erstellten Definitionen (Funktionen und Variablen) verloren. Wenn du also " +"ein etwas längeres Programm schreiben möchtest, solltest du die Eingabe für " +"den Interpreter besser in einem Texteditor vorbereiten und den Interpreter " +"stattdessen mit dieser Datei als Eingabe ausführen. Dies wird als Erstellen " +"eines *Skripts* bezeichnet. Wenn dein Programm länger wird, möchtest du es " +"möglicherweise zur einfacheren Wartung in mehrere Dateien aufteilen. " +"Vielleicht möchtest du auch eine nützliche Funktion, die du geschrieben " +"hast, in mehreren Programmen verwenden, ohne deren Definition in jedes " +"Programm kopieren zu müssen." + +#: ../../tutorial/modules.rst:16 +msgid "" +"To support this, Python has a way to put definitions in a file and use them " +"in a script or in an interactive instance of the interpreter. Such a file is " +"called a *module*; definitions from a module can be *imported* into other " +"modules or into the *main* module (the collection of variables that you have " +"access to in a script executed at the top level and in calculator mode)." +msgstr "" +"Um dies zu unterstützen, bietet Python die Möglichkeit, Definitionen in " +"einer Datei zu speichern und sie in einem Skript oder in einer interaktiven " +"Instanz des Interpreters zu verwenden. Eine solche Datei wird als *Modul* " +"bezeichnet; Definitionen aus einem Modul können in andere Module oder in das " +"*Hauptmodul* (*main*) *importiert* werden (die Sammlung von Variablen, auf " +"die du in einem Skript auf oberster Ebene und im Taschenrechnermodus Zugriff " +"hast)." + +#: ../../tutorial/modules.rst:22 +msgid "" +"A module is a file containing Python definitions and statements. The file " +"name is the module name with the suffix :file:`.py` appended. Within a " +"module, the module's name (as a string) is available as the value of the " +"global variable ``__name__``. For instance, use your favorite text editor " +"to create a file called :file:`fibo.py` in the current directory with the " +"following contents::" +msgstr "" +"Ein Modul ist eine Datei, die Python-Definitionen und -Anweisungen enthält. " +"Der Dateiname besteht aus dem Modulnamen mit dem angehängten Suffix :file:`." +"py`. Innerhalb eines Moduls steht der Modulname (als Zeichenkette) als Wert " +"der globalen Variablen ``__name__`` zur Verfügung. Erstelle beispielsweise " +"mit deinem bevorzugten Texteditor im aktuellen Verzeichnis eine Datei " +"namens :file:`fibo.py` mit folgendem Inhalt::" + +#: ../../tutorial/modules.rst:28 +msgid "" +"# Fibonacci numbers module\n" +"\n" +"def fib(n):\n" +" \"\"\"Write Fibonacci series up to n.\"\"\"\n" +" a, b = 0, 1\n" +" while a < n:\n" +" print(a, end=' ')\n" +" a, b = b, a+b\n" +" print()\n" +"\n" +"def fib2(n):\n" +" \"\"\"Return Fibonacci series up to n.\"\"\"\n" +" result = []\n" +" a, b = 0, 1\n" +" while a < n:\n" +" result.append(a)\n" +" a, b = b, a+b\n" +" return result" +msgstr "" +"# Modul „Fibonacci-Zahlen“\n" +"\n" +"def fib(n):\n" +" \"\"\"Die Fibonacci-Folge bis n ausgeben.\"\"\"\n" +" a, b = 0, 1\n" +" while a < n:\n" +" print(a, end=' ')\n" +" a, b = b, a+b\n" +" print()\n" +"\n" +"def fib2(n):\n" +" \"\"\"Gibt die Fibonacci-Folge bis n zurück.\"\"\"\n" +" result = []\n" +" a, b = 0, 1\n" +" while a < n:\n" +" result.append(a)\n" +" a, b = b, a+b\n" +" return result" + +#: ../../tutorial/modules.rst:47 +msgid "" +"Now enter the Python interpreter and import this module with the following " +"command::" +msgstr "" +"Öffne nun den Python-Interpreter und importiere dieses Modul mit dem " +"folgenden Befehl::" + +#: ../../tutorial/modules.rst:50 +msgid ">>> import fibo" +msgstr ">>> import fibo" + +#: ../../tutorial/modules.rst:52 +msgid "" +"This does not add the names of the functions defined in ``fibo`` directly " +"to the current :term:`namespace` (see :ref:`tut-scopes` for more details); " +"it only adds the module name ``fibo`` there. Using the module name you can " +"access the functions::" +msgstr "" +"Dadurch werden die Namen der in ``fibo`` definierten Funktionen nicht direkt " +"zum aktuellen :term:`Namensraum ` hinzugefügt (weitere Details " +"findest du unter :ref:`tut-scopes` ); es wird dort lediglich der Modulname " +"``fibo`` hinzugefügt. Über den Modulnamen kannst du auf die Funktionen " +"zugreifen::" + +#: ../../tutorial/modules.rst:57 +msgid "" +">>> fibo.fib(1000)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987\n" +">>> fibo.fib2(100)\n" +"[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]\n" +">>> fibo.__name__\n" +"'fibo'" +msgstr "" +">>> fibo.fib(1000)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987\n" +">>> fibo.fib2(100)\n" +"[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]\n" +">>> fibo.__name__\n" +"'fibo'" + +#: ../../tutorial/modules.rst:64 +msgid "" +"If you intend to use a function often you can assign it to a local name::" +msgstr "" +"Wenn du eine Funktion häufig verwenden möchtest, kannst du ihr einen lokalen " +"Namen zuweisen::" + +#: ../../tutorial/modules.rst:66 +msgid "" +">>> fib = fibo.fib\n" +">>> fib(500)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" +msgstr "" +">>> fib = fibo.fib\n" +">>> fib(500)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" + +#: ../../tutorial/modules.rst:74 +msgid "More on Modules" +msgstr "Mehr zum Thema Module" + +#: ../../tutorial/modules.rst:76 +msgid "" +"A module can contain executable statements as well as function definitions. " +"These statements are intended to initialize the module. They are executed " +"only the *first* time the module name is encountered in an import statement. " +"[#]_ (They are also run if the file is executed as a script.)" +msgstr "" +"Ein Modul kann sowohl ausführbare Anweisungen als auch Funktionsdefinitionen " +"enthalten. Diese Anweisungen dienen der Initialisierung des Moduls. Sie " +"werden nur beim *ersten* Auftreten des Modulnamens in einer Importanweisung " +"ausgeführt. [#]_ (Sie werden auch ausgeführt, wenn die Datei als Skript " +"ausgeführt wird.)" + +#: ../../tutorial/modules.rst:81 +msgid "" +"Each module has its own private namespace, which is used as the global " +"namespace by all functions defined in the module. Thus, the author of a " +"module can use global variables in the module without worrying about " +"accidental clashes with a user's global variables. On the other hand, if you " +"know what you are doing you can touch a module's global variables with the " +"same notation used to refer to its functions, ``modname.itemname``." +msgstr "" +"Jedes Modul verfügt über einen eigenen privaten Namensraum, der von allen im " +"Modul definierten Funktionen als globaler Namensraum genutzt wird. Somit " +"kann der Autor eines Moduls globale Variablen im Modul verwenden, ohne sich " +"Gedanken über versehentliche Konflikte mit den globalen Variablen eines " +"Benutzers machen zu müssen. Andererseits kannst du, wenn du weisst, was du " +"tust, auf die globalen Variablen eines Moduls mit derselben Notation " +"zugreifen, die auch für den Verweis auf dessen Funktionen verwendet wird: " +"``modname.itemname``." + +#: ../../tutorial/modules.rst:88 +msgid "" +"Modules can import other modules. It is customary but not required to place " +"all :keyword:`import` statements at the beginning of a module (or script, " +"for that matter). The imported module names, if placed at the top level of " +"a module (outside any functions or classes), are added to the module's " +"global namespace." +msgstr "" +"Module können andere Module importieren. Es ist üblich, aber nicht zwingend " +"erforderlich, alle :keyword:`import`-Anweisungen am Anfang eines Moduls " +"(oder Skripts) zu platzieren. Die Namen der importierten Module werden, " +"sofern sie auf der obersten Ebene eines Moduls (außerhalb von Funktionen " +"oder Klassen) stehen, dem globalen Namensraum des Moduls hinzugefügt." + +#: ../../tutorial/modules.rst:93 +msgid "" +"There is a variant of the :keyword:`import` statement that imports names " +"from a module directly into the importing module's namespace. For example::" +msgstr "" +"Es gibt eine Variante der Anweisung :keyword:`import`, mit der Namen aus " +"einem Modul direkt in den Namensraum des importierenden Moduls importiert " +"werden. Zum Beispiel::" + +#: ../../tutorial/modules.rst:96 +msgid "" +">>> from fibo import fib, fib2\n" +">>> fib(500)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" +msgstr "" +">>> from fibo import fib, fib2\n" +">>> fib(500)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" + +#: ../../tutorial/modules.rst:100 +msgid "" +"This does not introduce the module name from which the imports are taken in " +"the local namespace (so in the example, ``fibo`` is not defined)." +msgstr "" +"Dadurch wird der Modulname, aus dem die Importe stammen, nicht in den " +"lokalen Namensraum eingeführt (im Beispiel ist ``fibo`` also nicht " +"definiert)." + +#: ../../tutorial/modules.rst:103 +msgid "There is even a variant to import all names that a module defines::" +msgstr "" +"Es gibt sogar eine Variante, mit der alle von einem Modul definierten Namen " +"importiert werden können::" + +#: ../../tutorial/modules.rst:105 +msgid "" +">>> from fibo import *\n" +">>> fib(500)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" +msgstr "" +">>> from fibo import *\n" +">>> fib(500)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" + +#: ../../tutorial/modules.rst:109 +msgid "" +"This imports all names except those beginning with an underscore (``_``). In " +"most cases Python programmers do not use this facility since it introduces " +"an unknown set of names into the interpreter, possibly hiding some things " +"you have already defined." +msgstr "" +"Dadurch werden alle Namen importiert, mit Ausnahme derjenigen, die mit einem " +"Unterstrich beginnen (``_``). In den meisten Fällen nutzen Python-" +"Programmierer diese Funktion nicht, da dadurch eine unbekannte Menge von " +"Namen in den Interpreter eingeführt wird, wodurch möglicherweise einige " +"bereits von dir definierte Elemente verdeckt werden." + +#: ../../tutorial/modules.rst:114 +msgid "" +"Note that in general the practice of importing ``*`` from a module or " +"package is frowned upon, since it often causes poorly readable code. " +"However, it is okay to use it to save typing in interactive sessions." +msgstr "" +"Beachte, dass das Importieren von ``*`` aus einem Modul oder Paket im " +"Allgemeinen nicht gerne gesehen wird, da dies oft zu schwer lesbarem Code " +"führt. Es ist jedoch in Ordnung, diese Funktion zu verwenden, um sich in " +"interaktiven Sitzungen Tipparbeit zu ersparen." + +#: ../../tutorial/modules.rst:118 +msgid "" +"If the module name is followed by :keyword:`!as`, then the name following :" +"keyword:`!as` is bound directly to the imported module." +msgstr "" +"Folgt auf den Modulnamen :keyword:`!as`, wird der Name nach :keyword:`!as` " +"direkt an das importierte Modul gebunden." + +#: ../../tutorial/modules.rst:123 +msgid "" +">>> import fibo as fib\n" +">>> fib.fib(500)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" +msgstr "" +">>> import fibo as fib\n" +">>> fib.fib(500)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" + +#: ../../tutorial/modules.rst:127 +msgid "" +"This is effectively importing the module in the same way that ``import " +"fibo`` will do, with the only difference of it being available as ``fib``." +msgstr "" +"Damit wird das Modul im Grunde genauso importiert wie mit dem Befehl " +"``import fibo``, mit dem einzigen Unterschied, dass es unter ``fib`` " +"verfügbar ist." + +#: ../../tutorial/modules.rst:130 +msgid "" +"It can also be used when utilising :keyword:`from` with similar effects::" +msgstr "" +"Es kann auch bei der Verwendung von :keyword:`from` mit ähnlichen Effekten " +"eingesetzt werden::" + +#: ../../tutorial/modules.rst:132 +msgid "" +">>> from fibo import fib as fibonacci\n" +">>> fibonacci(500)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" +msgstr "" +">>> from fibo import fib as fibonacci\n" +">>> fibonacci(500)\n" +"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377" + +#: ../../tutorial/modules.rst:139 +msgid "" +"For efficiency reasons, each module is only imported once per interpreter " +"session. Therefore, if you change your modules, you must restart the " +"interpreter -- or, if it's just one module you want to test interactively, " +"use :func:`importlib.reload`, e.g. ``import importlib; importlib." +"reload(modulename)``." +msgstr "" +"Aus Effizienzgründen wird jedes Modul pro Interpreter-Sitzung nur einmal " +"geladen. Wenn du also deine Module änderst, musst du den Interpreter neu " +"starten – oder, falls du nur ein Modul interaktiv testen möchten, die " +"Funktion :func:`importlib.reload` verwenden, z. B. ``import importlib; " +"importlib.reload(modulename)``." + +#: ../../tutorial/modules.rst:149 +msgid "Executing modules as scripts" +msgstr "Module als Skripte ausführen" + +#: ../../tutorial/modules.rst:151 +msgid "When you run a Python module with ::" +msgstr "Wenn du ein Python-Modul mit :: ausführst:" + +#: ../../tutorial/modules.rst:153 +msgid "python fibo.py " +msgstr "python fibo.py " + +#: ../../tutorial/modules.rst:155 +msgid "" +"the code in the module will be executed, just as if you imported it, but " +"with the ``__name__`` set to ``\"__main__\"``. That means that by adding " +"this code at the end of your module::" +msgstr "" +"Der Code im Modul wird ausgeführt, genau so, als hättest du ihn importiert, " +"allerdings mit der Einstellung ``__name__`` auf ``\"__main__\"``. Das " +"bedeutet, dass du durch Hinzufügen dieses Codes am Ende deines Moduls::" + +#: ../../tutorial/modules.rst:159 +msgid "" +"if __name__ == \"__main__\":\n" +" import sys\n" +" fib(int(sys.argv[1]))" +msgstr "" +"if __name__ == \"__main__\":\n" +" import sys\n" +" fib(int(sys.argv[1]))" + +#: ../../tutorial/modules.rst:163 +msgid "" +"you can make the file usable as a script as well as an importable module, " +"because the code that parses the command line only runs if the module is " +"executed as the \"main\" file:" +msgstr "" +"Du kannst die Datei sowohl als Skript als auch als importierbares Modul " +"nutzen, da der Code, der die Befehlszeile auswertet, nur ausgeführt wird, " +"wenn das Modul als \"Hauptdatei\" ausgeführt wird:" + +#: ../../tutorial/modules.rst:167 +msgid "" +"$ python fibo.py 50\n" +"0 1 1 2 3 5 8 13 21 34" +msgstr "" +"$ python fibo.py 50\n" +"0 1 1 2 3 5 8 13 21 34" + +#: ../../tutorial/modules.rst:172 +msgid "If the module is imported, the code is not run::" +msgstr "Wenn das Modul importiert wird, wird der Code nicht ausgeführt::" + +#: ../../tutorial/modules.rst:174 +msgid "" +">>> import fibo\n" +">>>" +msgstr "" +">>> import fibo\n" +">>>" + +#: ../../tutorial/modules.rst:177 +msgid "" +"This is often used either to provide a convenient user interface to a " +"module, or for testing purposes (running the module as a script executes a " +"test suite)." +msgstr "" +"Dies wird häufig entweder verwendet, um eine benutzerfreundliche Oberfläche " +"für ein Modul bereitzustellen, oder zu Testzwecken (die Ausführung des " +"Moduls als Skript führt eine Testsuite aus)." + +#: ../../tutorial/modules.rst:184 +msgid "The Module Search Path" +msgstr "Der Suchpfad für Module" + +#: ../../tutorial/modules.rst:188 +msgid "" +"When a module named :mod:`!spam` is imported, the interpreter first searches " +"for a built-in module with that name. These module names are listed in :data:" +"`sys.builtin_module_names`. If not found, it then searches for a file named :" +"file:`spam.py` in a list of directories given by the variable :data:`sys." +"path`. :data:`sys.path` is initialized from these locations:" +msgstr "" +"Wenn ein Modul namens :mod:`!spam` importiert wird, sucht der Interpreter " +"zunächst nach einem integrierten Modul mit diesem Namen. Diese Modulnamen " +"sind unter :data:`sys.builtin_module_names` aufgeführt. Wird es dort nicht " +"gefunden, sucht er anschließend nach einer Datei namens :file:`spam.py` in " +"einer Liste von Verzeichnissen, die durch die Variable :data:`sys.path` " +"angegeben wird. :data:`sys.path` wird anhand dieser Speicherorte " +"initialisiert:" + +#: ../../tutorial/modules.rst:194 +msgid "" +"The directory containing the input script (or the current directory when no " +"file is specified)." +msgstr "" +"Das Verzeichnis, in dem sich das Eingabeskript befindet (oder das aktuelle " +"Verzeichnis, wenn keine Datei angegeben ist)." + +#: ../../tutorial/modules.rst:196 +msgid "" +":envvar:`PYTHONPATH` (a list of directory names, with the same syntax as the " +"shell variable :envvar:`PATH`)." +msgstr "" +":envvar:`PYTHONPATH` (eine Liste von Verzeichnisnamen, deren Syntax der der " +"Shell-Variablen :envvar:`PATH` entspricht)." + +#: ../../tutorial/modules.rst:198 +msgid "" +"The installation-dependent default (by convention including a ``site-" +"packages`` directory, handled by the :mod:`site` module)." +msgstr "" +"Die installationsabhängige Standardeinstellung (gemäß Konvention " +"einschließlich des Verzeichnisses ``site-packages``, das vom Modul :mod:" +"`site` verwaltet wird)." + +#: ../../tutorial/modules.rst:201 +msgid "More details are at :ref:`sys-path-init`." +msgstr "Weitere Informationen findest du unter :ref:`sys-path-init`." + +#: ../../tutorial/modules.rst:204 +msgid "" +"On file systems which support symlinks, the directory containing the input " +"script is calculated after the symlink is followed. In other words the " +"directory containing the symlink is **not** added to the module search path." +msgstr "" +"Bei Dateisystemen, die symbolische Links unterstützen, wird das Verzeichnis, " +"in dem sich das Eingabeskript befindet, erst ermittelt, nachdem dem " +"symbolischen Link gefolgt wurde. Mit anderen Worten: Das Verzeichnis, in dem " +"sich der symbolische Link befindet, wird **nicht** zum Suchpfad des Moduls " +"hinzugefügt." + +#: ../../tutorial/modules.rst:208 +msgid "" +"After initialization, Python programs can modify :data:`sys.path`. The " +"directory containing the script being run is placed at the beginning of the " +"search path, ahead of the standard library path. This means that scripts in " +"that directory will be loaded instead of modules of the same name in the " +"library directory. This is an error unless the replacement is intended. See " +"section :ref:`tut-standardmodules` for more information." +msgstr "" +"Nach der Initialisierung können Python-Programme die Variable :data:`sys." +"path` ändern. Das Verzeichnis, in dem sich das ausgeführte Skript befindet, " +"wird an den Anfang des Suchpfads gesetzt, noch vor dem " +"Standardbibliothekspfad. Das bedeutet, dass Skripte in diesem Verzeichnis " +"anstelle von Modulen mit demselben Namen im Bibliotheksverzeichnis geladen " +"werden. Dies führt zu einem Fehler, es sei denn, die Ersetzung ist " +"beabsichtigt. Weitere Informationen findest du im Abschnitt :ref:`tut-" +"standardmodules` ." + +#: ../../tutorial/modules.rst:221 +msgid "\"Compiled\" Python files" +msgstr "\"Kompilierte\" Python-Dateien" + +#: ../../tutorial/modules.rst:223 +msgid "" +"To speed up loading modules, Python caches the compiled version of each " +"module in the ``__pycache__`` directory under the name :file:`module." +"{version}.pyc`, where the version encodes the format of the compiled file; " +"it generally contains the Python version number. For example, in CPython " +"release 3.3 the compiled version of spam.py would be cached as ``__pycache__/" +"spam.cpython-33.pyc``. This naming convention allows compiled modules from " +"different releases and different versions of Python to coexist." +msgstr "" +"Um das Laden von Modulen zu beschleunigen, speichert Python die kompilierte " +"Version jedes Moduls im Verzeichnis ``__pycache__`` unter dem Namen :file:" +"`module.{version}.pyc` , wobei die Versionsangabe das Format der " +"kompilierten Datei angibt; sie enthält in der Regel die Python-" +"Versionsnummer. Beispielsweise würde in der CPython-Version 3.3 die " +"kompilierte Version von spam.py als ``__pycache__/spam.cpython-33.pyc`` " +"zwischengespeichert werden. Diese Namenskonvention ermöglicht es, dass " +"kompilierte Module aus verschiedenen Releases und verschiedenen Python-" +"Versionen nebeneinander existieren können." + +#: ../../tutorial/modules.rst:231 +msgid "" +"Python checks the modification date of the source against the compiled " +"version to see if it's out of date and needs to be recompiled. This is a " +"completely automatic process. Also, the compiled modules are platform-" +"independent, so the same library can be shared among systems with different " +"architectures." +msgstr "" +"Python vergleicht das Änderungsdatum der Quelldatei mit der kompilierten " +"Version, um festzustellen, ob diese veraltet ist und neu kompiliert werden " +"muss. Dies ist ein vollständig automatischer Vorgang. Außerdem sind die " +"kompilierten Module plattformunabhängig, sodass dieselbe Bibliothek auf " +"Systemen mit unterschiedlichen Architekturen gemeinsam genutzt werden kann." + +#: ../../tutorial/modules.rst:236 +msgid "" +"Python does not check the cache in two circumstances. First, it always " +"recompiles and does not store the result for the module that's loaded " +"directly from the command line. Second, it does not check the cache if " +"there is no source module. To support a non-source (compiled only) " +"distribution, the compiled module must be in the source directory, and there " +"must not be a source module." +msgstr "" +"Python überprüft den Cache unter zwei Umständen nicht. Erstens wird das " +"Modul, das direkt über die Befehlszeile geladen wird, immer neu kompiliert, " +"und das Ergebnis wird nicht gespeichert. Zweitens wird der Cache nicht " +"überprüft, wenn kein Quellmodul vorhanden ist. Um eine Distribution ohne " +"Quellcode (nur kompiliert) zu unterstützen, muss sich das kompilierte Modul " +"im Quellverzeichnis befinden, und es darf kein Quellmodul vorhanden sein." + +#: ../../tutorial/modules.rst:243 +msgid "Some tips for experts:" +msgstr "Einige Tipps für Experten:" + +#: ../../tutorial/modules.rst:245 +msgid "" +"You can use the :option:`-O` or :option:`-OO` switches on the Python command " +"to reduce the size of a compiled module. The ``-O`` switch removes assert " +"statements, the ``-OO`` switch removes both assert statements and __doc__ " +"strings. Since some programs may rely on having these available, you should " +"only use this option if you know what you're doing. \"Optimized\" modules " +"have an ``opt-`` tag and are usually smaller. Future releases may change " +"the effects of optimization." +msgstr "" +"Sie können die Schalter :option:`-O` oder :option:`-OO` im Python-Befehl " +"verwenden, um die Größe eines kompilierten Moduls zu verringern. Der " +"Schalter ``-O`` entfernt \"assert\"-Anweisungen, der Schalter ``-OO`` " +"entfernt sowohl \"assert\"-Anweisungen als auch \"__doc__\"-Zeichenketten. " +"Da manche Programme möglicherweise darauf angewiesen sind, dass diese " +"verfügbar sind, solltest du diese Option nur verwenden, wenn du genau " +"weisst, was du tust. \"Optimierte\" Module tragen das Tag ``opt-`` und sind " +"in der Regel kleiner. In zukünftigen Versionen können sich die Auswirkungen " +"der Optimierung ändern." + +#: ../../tutorial/modules.rst:253 +msgid "" +"A program doesn't run any faster when it is read from a ``.pyc`` file than " +"when it is read from a ``.py`` file; the only thing that's faster about ``." +"pyc`` files is the speed with which they are loaded." +msgstr "" +"Ein Programm läuft nicht schneller, wenn es aus einer ``.pyc`` -Datei " +"geladen wird, als wenn es aus einer ``.py`` -Datei geladen wird; das " +"Einzige, was bei ``.pyc`` -Dateien schneller ist, ist die Geschwindigkeit, " +"mit der sie geladen werden." + +#: ../../tutorial/modules.rst:257 +msgid "" +"The module :mod:`compileall` can create .pyc files for all modules in a " +"directory." +msgstr "" +"Das Modul :mod:`compileall` kann für alle Module in einem Verzeichnis .pyc-" +"Dateien erstellen." + +#: ../../tutorial/modules.rst:260 +msgid "" +"There is more detail on this process, including a flow chart of the " +"decisions, in :pep:`3147`." +msgstr "" +"Weitere Einzelheiten zu diesem Prozess, einschließlich eines " +"Entscheidungsdiagramms, findest du unter :pep:`3147`." + +#: ../../tutorial/modules.rst:267 +msgid "Standard Modules" +msgstr "Standardmodule" + +#: ../../tutorial/modules.rst:271 +msgid "" +"Python comes with a library of standard modules, described in a separate " +"document, the Python Library Reference (\"Library Reference\" hereafter). " +"Some modules are built into the interpreter; these provide access to " +"operations that are not part of the core of the language but are " +"nevertheless built in, either for efficiency or to provide access to " +"operating system primitives such as system calls. The set of such modules " +"is a configuration option which also depends on the underlying platform. " +"For example, the :mod:`winreg` module is only provided on Windows systems. " +"One particular module deserves some attention: :mod:`sys`, which is built " +"into every Python interpreter. The variables ``sys.ps1`` and ``sys.ps2`` " +"define the strings used as primary and secondary prompts::" +msgstr "" +"Python verfügt über eine Bibliothek mit Standardmodulen, die in einem " +"separaten Dokument, der Python-Bibliotheksreferenz (im Folgenden " +"\"Bibliotheksreferenz\"), beschrieben sind. Einige Module sind in den " +"Interpreter integriert; diese bieten Zugriff auf Operationen, die zwar nicht " +"zum Kern der Sprache gehören, aber dennoch integriert sind – entweder aus " +"Gründen der Effizienz oder um Zugriff auf Betriebssystemprimitive wie " +"Systemaufrufe zu ermöglichen. Die Auswahl dieser Module ist eine " +"Konfigurationsoption, die zudem von der zugrunde liegenden Plattform " +"abhängt. Beispielsweise wird das Modul :mod:`winreg` nur auf Windows-" +"Systemen bereitgestellt. Ein bestimmtes Modul verdient besondere " +"Beachtung: :mod:`sys` , das in jeden Python-Interpreter integriert ist. Die " +"Variablen ``sys.ps1`` und ``sys.ps2`` definieren die Zeichenketten, die als " +"primäre und sekundäre Eingabeaufforderung verwendet werden::" + +#: ../../tutorial/modules.rst:283 +msgid "" +">>> import sys\n" +">>> sys.ps1\n" +"'>>> '\n" +">>> sys.ps2\n" +"'... '\n" +">>> sys.ps1 = 'C> '\n" +"C> print('Yuck!')\n" +"Yuck!\n" +"C>" +msgstr "" +">>> import sys\n" +">>> sys.ps1\n" +"'>>> '\n" +">>> sys.ps2\n" +"'... '\n" +">>> sys.ps1 = 'C> '\n" +"C> print('Igitt!')\n" +"Igitt!\n" +"C>" + +#: ../../tutorial/modules.rst:294 +msgid "" +"These two variables are only defined if the interpreter is in interactive " +"mode." +msgstr "" +"Diese beiden Variablen sind nur definiert, wenn sich der Interpreter im " +"interaktiven Modus befindet." + +#: ../../tutorial/modules.rst:296 +msgid "" +"The variable ``sys.path`` is a list of strings that determines the " +"interpreter's search path for modules. It is initialized to a default path " +"taken from the environment variable :envvar:`PYTHONPATH`, or from a built-in " +"default if :envvar:`PYTHONPATH` is not set. You can modify it using " +"standard list operations::" +msgstr "" +"Die Variable ``sys.path`` ist eine Liste von Zeichenketten, die den Suchpfad " +"des Interpreters für Module festlegt. Sie wird mit einem Standardpfad " +"initialisiert, der aus der Umgebungsvariable :envvar:`PYTHONPATH` übernommen " +"wird, oder – falls :envvar:`PYTHONPATH` nicht gesetzt ist – mit einem " +"integrierten Standardwert. Sie können sie mithilfe von Standardoperationen " +"für Listen ändern::" + +#: ../../tutorial/modules.rst:302 +msgid "" +">>> import sys\n" +">>> sys.path.append('/ufs/guido/lib/python')" +msgstr "" +">>> import sys\n" +">>> sys.path.append('/ufs/guido/lib/python')" + +#: ../../tutorial/modules.rst:309 +msgid "The :func:`dir` Function" +msgstr "Die Funktion :func:`dir`" + +#: ../../tutorial/modules.rst:311 +msgid "" +"The built-in function :func:`dir` is used to find out which names a module " +"defines. It returns a sorted list of strings::" +msgstr "" +"Die integrierte Funktion :func:`dir` dient dazu, herauszufinden, welche " +"Namen ein Modul definiert. Sie gibt eine sortierte Liste von Zeichenketten " +"zurück::" + +#: ../../tutorial/modules.rst:314 +msgid "" +">>> import fibo, sys\n" +">>> dir(fibo)\n" +"['__name__', 'fib', 'fib2']\n" +">>> dir(sys)\n" +"['__breakpointhook__', '__displayhook__', '__doc__', '__excepthook__',\n" +" '__interactivehook__', '__loader__', '__name__', '__package__', " +"'__spec__',\n" +" '__stderr__', '__stdin__', '__stdout__', '__unraisablehook__',\n" +" '_clear_type_cache', '_current_frames', '_debugmallocstats', '_framework',\n" +" '_getframe', '_git', '_home', '_xoptions', 'abiflags', 'addaudithook',\n" +" 'api_version', 'argv', 'audit', 'base_exec_prefix', 'base_prefix',\n" +" 'breakpointhook', 'builtin_module_names', 'byteorder', 'call_tracing',\n" +" 'callstats', 'copyright', 'displayhook', 'dont_write_bytecode', " +"'exc_info',\n" +" 'excepthook', 'exec_prefix', 'executable', 'exit', 'flags', 'float_info',\n" +" 'float_repr_style', 'get_asyncgen_hooks', " +"'get_coroutine_origin_tracking_depth',\n" +" 'getallocatedblocks', 'getdefaultencoding', 'getdlopenflags',\n" +" 'getfilesystemencodeerrors', 'getfilesystemencoding', 'getprofile',\n" +" 'getrecursionlimit', 'getrefcount', 'getsizeof', 'getswitchinterval',\n" +" 'gettrace', 'hash_info', 'hexversion', 'implementation', 'int_info',\n" +" 'intern', 'is_finalizing', 'last_traceback', 'last_type', 'last_value',\n" +" 'maxsize', 'maxunicode', 'meta_path', 'modules', 'path', 'path_hooks',\n" +" 'path_importer_cache', 'platform', 'prefix', 'ps1', 'ps2', " +"'pycache_prefix',\n" +" 'set_asyncgen_hooks', 'set_coroutine_origin_tracking_depth', " +"'setdlopenflags',\n" +" 'setprofile', 'setrecursionlimit', 'setswitchinterval', 'settrace', " +"'stderr',\n" +" 'stdin', 'stdout', 'thread_info', 'unraisablehook', 'version', " +"'version_info',\n" +" 'warnoptions']" +msgstr "" +">>> import fibo, sys\n" +">>> dir(fibo)\n" +"['__name__', 'fib', 'fib2']\n" +">>> dir(sys)\n" +"['__breakpointhook__', '__displayhook__', '__doc__', '__excepthook__',\n" +" '__interactivehook__', '__loader__', '__name__', '__package__', " +"'__spec__',\n" +" '__stderr__', '__stdin__', '__stdout__', '__unraisablehook__',\n" +" '_clear_type_cache', '_current_frames', '_debugmallocstats', '_framework',\n" +" '_getframe', '_git', '_home', '_xoptions', 'abiflags', 'addaudithook',\n" +" 'api_version', 'argv', 'audit', 'base_exec_prefix', 'base_prefix',\n" +" 'breakpointhook', 'builtin_module_names', 'byteorder', 'call_tracing',\n" +" 'callstats', 'copyright', 'displayhook', 'dont_write_bytecode', " +"'exc_info',\n" +" 'excepthook', 'exec_prefix', 'executable', 'exit', 'flags', 'float_info',\n" +" 'float_repr_style', 'get_asyncgen_hooks', " +"'get_coroutine_origin_tracking_depth',\n" +" 'getallocatedblocks', 'getdefaultencoding', 'getdlopenflags',\n" +" 'getfilesystemencodeerrors', 'getfilesystemencoding', 'getprofile',\n" +" 'getrecursionlimit', 'getrefcount', 'getsizeof', 'getswitchinterval',\n" +" 'gettrace', 'hash_info', 'hexversion', 'implementation', 'int_info',\n" +" 'intern', 'is_finalizing', 'last_traceback', 'last_type', 'last_value',\n" +" 'maxsize', 'maxunicode', 'meta_path', 'modules', 'path', 'path_hooks',\n" +" 'path_importer_cache', 'platform', 'prefix', 'ps1', 'ps2', " +"'pycache_prefix',\n" +" 'set_asyncgen_hooks', 'set_coroutine_origin_tracking_depth', " +"'setdlopenflags',\n" +" 'setprofile', 'setrecursionlimit', 'setswitchinterval', 'settrace', " +"'stderr',\n" +" 'stdin', 'stdout', 'thread_info', 'unraisablehook', 'version', " +"'version_info',\n" +" 'warnoptions']" + +#: ../../tutorial/modules.rst:340 +msgid "" +"Without arguments, :func:`dir` lists the names you have defined currently::" +msgstr "" +"Ohne Argumente listet der Befehl :func:`dir` die Namen auf, die du derzeit " +"definiert hast::" + +#: ../../tutorial/modules.rst:342 +msgid "" +">>> a = [1, 2, 3, 4, 5]\n" +">>> import fibo\n" +">>> fib = fibo.fib\n" +">>> dir()\n" +"['__builtins__', '__name__', 'a', 'fib', 'fibo', 'sys']" +msgstr "" +">>> a = [1, 2, 3, 4, 5]\n" +">>> import fibo\n" +">>> fib = fibo.fib\n" +">>> dir()\n" +"['__builtins__', '__name__', 'a', 'fib', 'fibo', 'sys']" + +#: ../../tutorial/modules.rst:348 +msgid "" +"Note that it lists all types of names: variables, modules, functions, etc." +msgstr "" +"Beachte, dass hier alle Arten von Namen aufgeführt sind: Variablen, Module, " +"Funktionen usw." + +#: ../../tutorial/modules.rst:352 +msgid "" +":func:`dir` does not list the names of built-in functions and variables. If " +"you want a list of those, they are defined in the standard module :mod:" +"`builtins`::" +msgstr "" +":func:`dir` enthält keine Auflistung der Namen der integrierten Funktionen " +"und Variablen. Wenn du eine Liste davon benötigst: Diese sind im " +"Standardmodul :mod:`builtins` definiert ::" + +#: ../../tutorial/modules.rst:356 +msgid "" +">>> import builtins\n" +">>> dir(builtins)\n" +"['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException',\n" +" 'BlockingIOError', 'BrokenPipeError', 'BufferError', 'BytesWarning',\n" +" 'ChildProcessError', 'ConnectionAbortedError', 'ConnectionError',\n" +" 'ConnectionRefusedError', 'ConnectionResetError', 'DeprecationWarning',\n" +" 'EOFError', 'Ellipsis', 'EnvironmentError', 'Exception', 'False',\n" +" 'FileExistsError', 'FileNotFoundError', 'FloatingPointError',\n" +" 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError',\n" +" 'ImportWarning', 'IndentationError', 'IndexError', 'InterruptedError',\n" +" 'IsADirectoryError', 'KeyError', 'KeyboardInterrupt', 'LookupError',\n" +" 'MemoryError', 'NameError', 'None', 'NotADirectoryError', " +"'NotImplemented',\n" +" 'NotImplementedError', 'OSError', 'OverflowError',\n" +" 'PendingDeprecationWarning', 'PermissionError', 'ProcessLookupError',\n" +" 'ReferenceError', 'ResourceWarning', 'RuntimeError', 'RuntimeWarning',\n" +" 'StopIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError',\n" +" 'SystemExit', 'TabError', 'TimeoutError', 'True', 'TypeError',\n" +" 'UnboundLocalError', 'UnicodeDecodeError', 'UnicodeEncodeError',\n" +" 'UnicodeError', 'UnicodeTranslateError', 'UnicodeWarning', 'UserWarning',\n" +" 'ValueError', 'Warning', 'ZeroDivisionError', '_', '__build_class__',\n" +" '__debug__', '__doc__', '__import__', '__name__', '__package__', 'abs',\n" +" 'all', 'any', 'ascii', 'bin', 'bool', 'bytearray', 'bytes', 'callable',\n" +" 'chr', 'classmethod', 'compile', 'complex', 'copyright', 'credits',\n" +" 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'exec', 'exit',\n" +" 'filter', 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr',\n" +" 'hash', 'help', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass',\n" +" 'iter', 'len', 'license', 'list', 'locals', 'map', 'max', 'memoryview',\n" +" 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', 'property',\n" +" 'quit', 'range', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice',\n" +" 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'vars',\n" +" 'zip']" +msgstr "" +">>> import builtins\n" +">>> dir(builtins)\n" +"['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException',\n" +" 'BlockingIOError', 'BrokenPipeError', 'BufferError', 'BytesWarning',\n" +" 'ChildProcessError', 'ConnectionAbortedError', 'ConnectionError',\n" +" 'ConnectionRefusedError', 'ConnectionResetError', 'DeprecationWarning',\n" +" 'EOFError', 'Ellipsis', 'EnvironmentError', 'Exception', 'False',\n" +" 'FileExistsError', 'FileNotFoundError', 'FloatingPointError',\n" +" 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError',\n" +" 'ImportWarning', 'IndentationError', 'IndexError', 'InterruptedError',\n" +" 'IsADirectoryError', 'KeyError', 'KeyboardInterrupt', 'LookupError',\n" +" 'MemoryError', 'NameError', 'None', 'NotADirectoryError', " +"'NotImplemented',\n" +" 'NotImplementedError', 'OSError', 'OverflowError',\n" +" 'PendingDeprecationWarning', 'PermissionError', 'ProcessLookupError',\n" +" 'ReferenceError', 'ResourceWarning', 'RuntimeError', 'RuntimeWarning',\n" +" 'StopIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError',\n" +" 'SystemExit', 'TabError', 'TimeoutError', 'True', 'TypeError',\n" +" 'UnboundLocalError', 'UnicodeDecodeError', 'UnicodeEncodeError',\n" +" 'UnicodeError', 'UnicodeTranslateError', 'UnicodeWarning', 'UserWarning',\n" +" 'ValueError', 'Warning', 'ZeroDivisionError', '_', '__build_class__',\n" +" '__debug__', '__doc__', '__import__', '__name__', '__package__', 'abs',\n" +" 'all', 'any', 'ascii', 'bin', 'bool', 'bytearray', 'bytes', 'callable',\n" +" 'chr', 'classmethod', 'compile', 'complex', 'copyright', 'credits',\n" +" 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'exec', 'exit',\n" +" 'filter', 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr',\n" +" 'hash', 'help', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass',\n" +" 'iter', 'len', 'license', 'list', 'locals', 'map', 'max', 'memoryview',\n" +" 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', 'property',\n" +" 'quit', 'range', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice',\n" +" 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'vars',\n" +" 'zip']" + +#: ../../tutorial/modules.rst:391 +msgid "Packages" +msgstr "Pakete" + +#: ../../tutorial/modules.rst:393 +msgid "" +"Packages are a way of structuring Python's module namespace by using " +"\"dotted module names\". For example, the module name :mod:`!A.B` " +"designates a submodule named ``B`` in a package named ``A``. Just like the " +"use of modules saves the authors of different modules from having to worry " +"about each other's global variable names, the use of dotted module names " +"saves the authors of multi-module packages like NumPy or Pillow from having " +"to worry about each other's module names." +msgstr "" +"Pakete sind eine Möglichkeit, den Modul-Namensraum von Python mithilfe von " +"\"Modulnamen mit Punkt\" zu strukturieren. Der Modulname :mod:`!A.B` " +"bezeichnet beispielsweise ein Untermodul namens ``B`` in einem Paket namens " +"``A`` . Genauso wie die Verwendung von Modulen den Autoren verschiedener " +"Module erspart, sich um die globalen Variablennamen der anderen kümmern zu " +"müssen, erspart die Verwendung von Modulnamen mit Punkten den Autoren von " +"Paketen mit mehreren Modulen wie NumPy oder Pillow, sich um die Modulnamen " +"der anderen kümmern zu müssen." + +#: ../../tutorial/modules.rst:401 +msgid "" +"Suppose you want to design a collection of modules (a \"package\") for the " +"uniform handling of sound files and sound data. There are many different " +"sound file formats (usually recognized by their extension, for example: :" +"file:`.wav`, :file:`.aiff`, :file:`.au`), so you may need to create and " +"maintain a growing collection of modules for the conversion between the " +"various file formats. There are also many different operations you might " +"want to perform on sound data (such as mixing, adding echo, applying an " +"equalizer function, creating an artificial stereo effect), so in addition " +"you will be writing a never-ending stream of modules to perform these " +"operations. Here's a possible structure for your package (expressed in " +"terms of a hierarchical filesystem):" +msgstr "" +"Angenommen, du möchtest eine Sammlung von Modulen (ein „Paket“) für die " +"einheitliche Verarbeitung von Audiodateien und Audiodaten entwerfen. Es gibt " +"viele verschiedene Audiodateiformate (die in der Regel an ihrer Dateiendung " +"zu erkennen sind, zum Beispiel: :file:`.wav`, :file:`.aiff`, :file:`.au`), " +"sodass du möglicherweise eine ständig wachsende Sammlung von Modulen für die " +"Konvertierung zwischen den verschiedenen Dateiformaten erstellen und pflegen " +"musst. Außerdem gibt es viele verschiedene Operationen, die du " +"möglicherweise an Audiodaten durchführen möchtest (wie Mischen, Hinzufügen " +"eines Echos, Anwenden einer Equalizer-Funktion, Erzeugen eines künstlichen " +"Stereoeffekts), sodass du darüber hinaus eine endlose Reihe von Modulen " +"schreiben wirst, um diese Operationen auszuführen. Hier ist eine mögliche " +"Struktur für dein Paket (dargestellt als hierarchisches Dateisystem):" + +#: ../../tutorial/modules.rst:412 +msgid "" +"sound/ Top-level package\n" +" __init__.py Initialize the sound package\n" +" formats/ Subpackage for file format conversions\n" +" __init__.py\n" +" wavread.py\n" +" wavwrite.py\n" +" aiffread.py\n" +" aiffwrite.py\n" +" auread.py\n" +" auwrite.py\n" +" ...\n" +" effects/ Subpackage for sound effects\n" +" __init__.py\n" +" echo.py\n" +" surround.py\n" +" reverse.py\n" +" ...\n" +" filters/ Subpackage for filters\n" +" __init__.py\n" +" equalizer.py\n" +" vocoder.py\n" +" karaoke.py\n" +" ..." +msgstr "" +"sound/ Paket der obersten Ebene\n" +" __init__.py Initialisierung des Sound-Pakets\n" +" formats/ Unterpaket für Dateiformatkonvertierungen\n" +" __init__.py\n" +" wavread.py\n" +" wavwrite.py\n" +" aiffread.py\n" +" aiffwrite.py\n" +" auread.py\n" +" auwrite.py\n" +" ...\n" +" effects/ Unterpaket für Soundeffekte\n" +" __init__.py\n" +" echo.py\n" +" surround.py\n" +" reverse.py\n" +" ...\n" +" filters/ Unterpaket für Filter\n" +" __init__.py\n" +" equalizer.py\n" +" vocoder.py\n" +" karaoke.py\n" +" ..." + +#: ../../tutorial/modules.rst:438 +msgid "" +"When importing the package, Python searches through the directories on ``sys." +"path`` looking for the package subdirectory." +msgstr "" +"Beim Importieren des Pakets durchsucht Python die Verzeichnisse unter ``sys." +"path`` nach dem Unterverzeichnis des Pakets." + +#: ../../tutorial/modules.rst:441 +msgid "" +"The :file:`__init__.py` files are required to make Python treat directories " +"containing the file as packages (unless using a :term:`namespace package`, a " +"relatively advanced feature). This prevents directories with a common name, " +"such as ``string``, from unintentionally hiding valid modules that occur " +"later on the module search path. In the simplest case, :file:`__init__.py` " +"can just be an empty file, but it can also execute initialization code for " +"the package or set the ``__all__`` variable, described later." +msgstr "" +"Die :file:`__init__.py` -Dateien sind erforderlich, damit Python " +"Verzeichnisse, die diese Datei enthalten, als Pakete behandelt (es sei denn, " +"es wird ein :term:`Namespace-Paket ` verwendet, eine " +"relativ fortgeschrittene Funktion). Dies verhindert, dass Verzeichnisse mit " +"einem gemeinsamen Namen, wie beispielsweise ``string`` , unbeabsichtigt " +"gültige Module verdecken, die später im Modulsuchpfad vorkommen. Im " +"einfachsten Fall kann :file:`__init__.py` einfach eine leere Datei sein, sie " +"kann aber auch Initialisierungscode für das Paket ausführen oder die " +"Variable ``__all__`` setzen, die später beschrieben wird." + +#: ../../tutorial/modules.rst:449 +msgid "" +"Users of the package can import individual modules from the package, for " +"example::" +msgstr "" +"Benutzer des Pakets können einzelne Module aus dem Paket importieren, zum " +"Beispiel::" + +#: ../../tutorial/modules.rst:452 +msgid "import sound.effects.echo" +msgstr "import sound.effects.echo" + +#: ../../tutorial/modules.rst:454 +msgid "" +"This loads the submodule :mod:`!sound.effects.echo`. It must be referenced " +"with its full name. ::" +msgstr "" +"Dadurch wird das Submodul :mod:`!sound.effects.echo` geladen. Es muss mit " +"seinem vollständigen Namen referenziert werden. ::" + +#: ../../tutorial/modules.rst:457 +msgid "sound.effects.echo.echofilter(input, output, delay=0.7, atten=4)" +msgstr "sound.effects.echo.echofilter(input, output, delay=0.7, atten=4)" + +#: ../../tutorial/modules.rst:459 +msgid "An alternative way of importing the submodule is::" +msgstr "Eine alternative Möglichkeit, das Submodul zu importieren, ist:" + +#: ../../tutorial/modules.rst:461 +msgid "from sound.effects import echo" +msgstr "from sound.effects import echo" + +#: ../../tutorial/modules.rst:463 +msgid "" +"This also loads the submodule :mod:`!echo`, and makes it available without " +"its package prefix, so it can be used as follows::" +msgstr "" +"Dadurch wird auch das Submodul :mod:`!echo` geladen und ohne sein " +"Paketpräfix zur Verfügung gestellt, sodass es wie folgt verwendet werden " +"kann::" + +#: ../../tutorial/modules.rst:466 +msgid "echo.echofilter(input, output, delay=0.7, atten=4)" +msgstr "echo.echofilter(input, output, delay=0.7, atten=4)" + +#: ../../tutorial/modules.rst:468 +msgid "" +"Yet another variation is to import the desired function or variable " +"directly::" +msgstr "" +"Eine weitere Möglichkeit besteht darin, die gewünschte Funktion oder " +"Variable direkt zu importieren::" + +#: ../../tutorial/modules.rst:470 +msgid "from sound.effects.echo import echofilter" +msgstr "from sound.effects.echo import echofilter" + +#: ../../tutorial/modules.rst:472 +msgid "" +"Again, this loads the submodule :mod:`!echo`, but this makes its function :" +"func:`!echofilter` directly available::" +msgstr "" +"Auch hier wird das Submodul :mod:`!echo` geladen, wodurch dessen Funktion :" +"func:`!echofilter` direkt verfügbar ist::" + +#: ../../tutorial/modules.rst:475 +msgid "echofilter(input, output, delay=0.7, atten=4)" +msgstr "echofilter(input, output, delay=0.7, atten=4)" + +#: ../../tutorial/modules.rst:477 +msgid "" +"Note that when using ``from package import item``, the item can be either a " +"submodule (or subpackage) of the package, or some other name defined in the " +"package, like a function, class or variable. The ``import`` statement first " +"tests whether the item is defined in the package; if not, it assumes it is a " +"module and attempts to load it. If it fails to find it, an :exc:" +"`ImportError` exception is raised." +msgstr "" +"Beachte dass bei der Verwendung von ``from package import item`` das " +"Element entweder ein Submodul (oder Subpaket) des Pakets oder ein anderer im " +"Paket definierter Name sein kann, wie beispielsweise eine Funktion, eine " +"Klasse oder eine Variable. Die Anweisung ``import`` prüft zunächst, ob das " +"Element im Paket definiert ist; ist dies nicht der Fall, geht sie davon aus, " +"dass es sich um ein Modul handelt, und versucht, dieses zu laden. Wird das " +"Element nicht gefunden, wird eine Ausnahme vom Typ :exc:`ImportError` " +"ausgelöst." + +#: ../../tutorial/modules.rst:484 +msgid "" +"Contrarily, when using syntax like ``import item.subitem.subsubitem``, each " +"item except for the last must be a package; the last item can be a module or " +"a package but can't be a class or function or variable defined in the " +"previous item." +msgstr "" +"Im Gegensatz dazu muss bei der Verwendung einer Syntax wie ``import item." +"subitem.subsubitem`` jedes Element mit Ausnahme des letzten ein Paket sein; " +"das letzte Element kann ein Modul oder ein Paket sein, darf jedoch keine " +"Klasse, Funktion oder Variable sein, die im vorherigen Element definiert " +"wurde." + +#: ../../tutorial/modules.rst:493 +msgid "Importing \\* From a Package" +msgstr "Importieren von \\* aus einem Paket" + +#: ../../tutorial/modules.rst:497 +msgid "" +"Now what happens when the user writes ``from sound.effects import *``? " +"Ideally, one would hope that this somehow goes out to the filesystem, finds " +"which submodules are present in the package, and imports them all. This " +"could take a long time and importing sub-modules might have unwanted side-" +"effects that should only happen when the sub-module is explicitly imported." +msgstr "" +"Was passiert nun, wenn der Benutzer ``from sound.effects import *`` eingibt? " +"Im Idealfall würde man hoffen, dass dies irgendwie an das Dateisystem " +"weitergeleitet wird, das dann ermittelt, welche Submodule im Paket vorhanden " +"sind, und diese alle importiert. Dies könnte lange dauern, und das " +"Importieren von Submodulen könnte unerwünschte Nebenwirkungen haben, die nur " +"auftreten sollten, wenn das Submodul explizit importiert wird." + +#: ../../tutorial/modules.rst:503 +msgid "" +"The only solution is for the package author to provide an explicit index of " +"the package. The :keyword:`import` statement uses the following convention: " +"if a package's :file:`__init__.py` code defines a list named ``__all__``, it " +"is taken to be the list of module names that should be imported when ``from " +"package import *`` is encountered. It is up to the package author to keep " +"this list up-to-date when a new version of the package is released. Package " +"authors may also decide not to support it, if they don't see a use for " +"importing \\* from their package. For example, the file :file:`sound/" +"effects/__init__.py` could contain the following code::" +msgstr "" +"Die einzige Lösung besteht darin, dass der Paketautor einen expliziten Index " +"des Pakets bereitstellt. Die Anweisung :keyword:`import` verwendet die " +"folgende Konvention: Wenn im Code von :file:`__init__.py` eines Pakets eine " +"Liste namens ``__all__`` definiert ist, wird diese als Liste der Modulnamen " +"angesehen, die importiert werden sollen, sobald auf ``from package import " +"*`` gestoßen wird. Es liegt im Ermessen des Paketautors, diese Liste bei " +"der Veröffentlichung einer neuen Version des Pakets auf dem neuesten Stand " +"zu halten. Paketautoren können sich auch dafür entscheiden, diese Funktion " +"nicht zu unterstützen, wenn sie keinen Nutzen darin sehen, \\* aus ihrem " +"Paket zu importieren. Beispielsweise könnte die Datei :file:`sound/effects/" +"__init__.py` den folgenden Code enthalten::" + +#: ../../tutorial/modules.rst:513 +msgid "__all__ = [\"echo\", \"surround\", \"reverse\"]" +msgstr "__all__ = [\"echo\", \"surround\", \"reverse\"]" + +#: ../../tutorial/modules.rst:515 +msgid "" +"This would mean that ``from sound.effects import *`` would import the three " +"named submodules of the :mod:`!sound.effects` package." +msgstr "" +"Das würde bedeuten, dass ``from sound.effects import *`` die drei genannten " +"Submodule des Pakets :mod:`!sound.effects` importieren würde." + +#: ../../tutorial/modules.rst:518 +msgid "" +"Be aware that submodules might become shadowed by locally defined names. For " +"example, if you added a ``reverse`` function to the :file:`sound/effects/" +"__init__.py` file, the ``from sound.effects import *`` would only import the " +"two submodules ``echo`` and ``surround``, but *not* the ``reverse`` " +"submodule, because it is shadowed by the locally defined ``reverse`` " +"function::" +msgstr "" +"Beachte, dass Submodule durch lokal definierte Namen überschattet werden " +"können. Wenn du beispielsweise die Funktion ``reverse`` zur Datei :file:" +"`sound/effects/__init__.py` hinzugefügt hast, würde die Datei ``from sound." +"effects import *`` nur die beiden Submodule ``echo`` und ``surround`` " +"importieren, jedoch *nicht* das Submodul ``reverse``, da dieses durch die " +"lokal definierte Funktion ``reverse`` überschattet wird::" + +#: ../../tutorial/modules.rst:525 +msgid "" +"__all__ = [\n" +" \"echo\", # refers to the 'echo.py' file\n" +" \"surround\", # refers to the 'surround.py' file\n" +" \"reverse\", # !!! refers to the 'reverse' function now !!!\n" +"]\n" +"\n" +"def reverse(msg: str): # <-- this name shadows the 'reverse.py' submodule\n" +" return msg[::-1] # in the case of a 'from sound.effects import *'" +msgstr "" +"__all__ = [\n" +" \"echo\", # bezieht sich auf die Datei „echo.py“\n" +" \"surround\", # bezieht sich auf die Datei „surround.py“\n" +" \"reverse\", # !!! bezieht sich jetzt auf die Funktion „reverse“ !!!\n" +"]\n" +"\n" +"def reverse(msg: str): # <-- dieser Name überschreibt das Submodul „reverse." +"py“\n" +" return msg[::-1] # im Fall von „from sound.effects import *“" + +#: ../../tutorial/modules.rst:534 +msgid "" +"If ``__all__`` is not defined, the statement ``from sound.effects import *`` " +"does *not* import all submodules from the package :mod:`!sound.effects` into " +"the current namespace; it only ensures that the package :mod:`!sound." +"effects` has been imported (possibly running any initialization code in :" +"file:`__init__.py`) and then imports whatever names are defined in the " +"package. This includes any names defined (and submodules explicitly loaded) " +"by :file:`__init__.py`. It also includes any submodules of the package that " +"were explicitly loaded by previous :keyword:`import` statements. Consider " +"this code::" +msgstr "" +"Wenn ``__all__`` nicht definiert ist, importiert die Anweisung ``from sound." +"effects import *`` *nicht* alle Submodule aus dem Paket :mod:`!sound." +"effects` in den aktuellen Namensraum; sie stellt lediglich sicher, dass das " +"Paket :mod:`!sound.effects` importiert wurde (wobei gegebenenfalls der " +"Initialisierungscode in :file:`__init__.py` ausgeführt wird) und importiert " +"anschließend alle Namen, die in diesem Paket definiert sind. Dazu gehören " +"alle Namen, die von :file:`__init__.py` definiert wurden (sowie explizit " +"geladene Submodule). Ebenfalls enthalten sind alle Submodule des Pakets, " +"die durch vorherige :keyword:`import` -Anweisungen explizit geladen wurden. " +"Betrachte folgenden Code::" + +#: ../../tutorial/modules.rst:543 +msgid "" +"import sound.effects.echo\n" +"import sound.effects.surround\n" +"from sound.effects import *" +msgstr "" +"import sound.effects.echo\n" +"import sound.effects.surround\n" +"from sound.effects import *" + +#: ../../tutorial/modules.rst:547 +msgid "" +"In this example, the :mod:`!echo` and :mod:`!surround` modules are imported " +"in the current namespace because they are defined in the :mod:`!sound." +"effects` package when the ``from...import`` statement is executed. (This " +"also works when ``__all__`` is defined.)" +msgstr "" +"In diesem Beispiel werden die Module :mod:`!echo` und :mod:`!surround` in " +"den aktuellen Namensraum importiert, da sie im Paket :mod:`!sound.effects` " +"definiert sind, wenn die Anweisung ``from...import`` ausgeführt wird. (Dies " +"funktioniert auch, wenn ``__all__`` definiert ist.)" + +#: ../../tutorial/modules.rst:552 +msgid "" +"Although certain modules are designed to export only names that follow " +"certain patterns when you use ``import *``, it is still considered bad " +"practice in production code." +msgstr "" +"Obwohl bestimmte Module so konzipiert sind, dass sie bei Verwendung von " +"``import *`` nur Namen exportieren, die bestimmten Mustern entsprechen, gilt " +"dies im Produktionscode dennoch als schlechte Praxis." + +#: ../../tutorial/modules.rst:556 +msgid "" +"Remember, there is nothing wrong with using ``from package import " +"specific_submodule``! In fact, this is the recommended notation unless the " +"importing module needs to use submodules with the same name from different " +"packages." +msgstr "" +"Denke daran: Es ist völlig in Ordnung, ``from package import " +"specific_submodule`` zu verwenden! Tatsächlich ist dies die empfohlene " +"Schreibweise, es sei denn, das importierende Modul muss Submodule mit " +"demselben Namen aus verschiedenen Paketen verwenden." + +#: ../../tutorial/modules.rst:565 +msgid "Intra-package References" +msgstr "Verweise innerhalb eines Pakets" + +#: ../../tutorial/modules.rst:567 +msgid "" +"When packages are structured into subpackages (as with the :mod:`!sound` " +"package in the example), you can use absolute imports to refer to submodules " +"of siblings packages. For example, if the module :mod:`!sound.filters." +"vocoder` needs to use the :mod:`!echo` module in the :mod:`!sound.effects` " +"package, it can use ``from sound.effects import echo``." +msgstr "" +"Wenn Pakete in Unterpakete gegliedert sind (wie im Beispiel beim Paket :mod:" +"`!sound` ), kannst du absolute Importe verwenden, um auf Submodule von " +"gleichrangigen Paketen zu verweisen. Wenn beispielsweise das Modul :mod:`!" +"sound.filters.vocoder` das Modul :mod:`!echo` aus dem Paket :mod:`!sound." +"effects` verwenden muss, kann es ``from sound.effects import echo`` " +"verwenden." + +#: ../../tutorial/modules.rst:573 +msgid "" +"You can also write relative imports, with the ``from module import name`` " +"form of import statement. These imports use leading dots to indicate the " +"current and parent packages involved in the relative import. From the :mod:" +"`!surround` module for example, you might use::" +msgstr "" +"Du kannst auch relative Importe schreiben, und zwar mithilfe der " +"Importanweisung in der Form ``from module import name`` . Bei diesen " +"Importen werden führende Punkte verwendet, um das aktuelle und das " +"übergeordnete Paket anzugeben, die an dem relativen Import beteiligt sind. " +"Aus dem Modul :mod:`!surround` kannst du beispielsweise Folgendes verwenden::" + +#: ../../tutorial/modules.rst:578 +msgid "" +"from . import echo\n" +"from .. import formats\n" +"from ..filters import equalizer" +msgstr "" +"from . import echo\n" +"from .. import formats\n" +"from ..filters import equalizer" + +#: ../../tutorial/modules.rst:582 +msgid "" +"Note that relative imports are based on the name of the current module's " +"package. Since the main module does not have a package, modules intended for " +"use as the main module of a Python application must always use absolute " +"imports." +msgstr "" +"Beachte, dass relative Importe auf dem Namen des Pakets des aktuellen Moduls " +"basieren. Da das Hauptmodul kein Paket hat, müssen Module, die als " +"Hauptmodul einer Python-Anwendung dienen sollen, stets absolute Importe " +"verwenden." + +#: ../../tutorial/modules.rst:588 +msgid "Packages in Multiple Directories" +msgstr "Pakete in mehreren Verzeichnissen" + +#: ../../tutorial/modules.rst:590 +msgid "" +"Packages support one more special attribute, :attr:`~module.__path__`. This " +"is initialized to be a :term:`sequence` of strings containing the name of " +"the directory holding the package's :file:`__init__.py` before the code in " +"that file is executed. This variable can be modified; doing so affects " +"future searches for modules and subpackages contained in the package." +msgstr "" +"Pakete unterstützen ein weiteres spezielles Attribut: :attr:`~module." +"__path__` . Dieses wird zunächst als :term:`Sequenz ` von " +"Zeichenketten initialisiert, die den Namen des Verzeichnisses enthalten, in " +"dem sich die Datei :file:`__init__.py` des Pakets befindet – und zwar bevor " +"der Code in dieser Datei ausgeführt wird. Diese Variable kann geändert " +"werden; dies wirkt sich auf zukünftige Suchvorgänge nach Modulen und " +"Unterpaketen aus, die in dem Paket enthalten sind." + +#: ../../tutorial/modules.rst:597 +msgid "" +"While this feature is not often needed, it can be used to extend the set of " +"modules found in a package." +msgstr "" +"Auch wenn diese Funktion nicht oft benötigt wird, kann sie dazu dienen, die " +"in einem Paket enthaltenen Module zu erweitern." + +#: ../../tutorial/modules.rst:602 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../tutorial/modules.rst:603 +msgid "" +"In fact function definitions are also 'statements' that are 'executed'; the " +"execution of a module-level function definition adds the function name to " +"the module's global namespace." +msgstr "" +"Tatsächlich sind Funktionsdefinitionen ebenfalls „Anweisungen“, die " +"\"ausgeführt\" werden; durch die Ausführung einer Funktionsdefinition auf " +"Modulebene wird der Funktionsname dem globalen Namensraum des Moduls " +"hinzugefügt." + +#: ../../tutorial/modules.rst:186 ../../tutorial/modules.rst:269 +#: ../../tutorial/modules.rst:350 +msgid "module" +msgstr "module" + +#: ../../tutorial/modules.rst:186 +msgid "search" +msgstr "search" + +#: ../../tutorial/modules.rst:186 +msgid "path" +msgstr "path" + +#: ../../tutorial/modules.rst:269 +msgid "sys" +msgstr "sys" + +#: ../../tutorial/modules.rst:350 +msgid "builtins" +msgstr "builtins" + +#: ../../tutorial/modules.rst:495 +msgid "__all__" +msgstr "__all__" diff --git a/tutorial/whatnow.po b/tutorial/whatnow.po index eab0840e..c0a650ef 100644 --- a/tutorial/whatnow.po +++ b/tutorial/whatnow.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2026-08-6 00:02+0000\n" "Last-Translator: Swen Bachmann <142266608+sba72@users.noreply.github.com>\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -43,18 +43,21 @@ msgstr "" "der Sammlung sind:" #: ../../tutorial/whatnow.rst:14 -msgid ":ref:`library-index`:" -msgstr ":ref:`library-index`:" +msgid "" +":ref:`builtins-index`: gives details about Python's built-in types and " +"functions." +msgstr "" -#: ../../tutorial/whatnow.rst:16 +#: ../../tutorial/whatnow.rst:17 +#, fuzzy msgid "" -"You should browse through this manual, which gives complete (though terse) " -"reference material about types, functions, and the modules in the standard " -"library. The standard Python distribution includes a *lot* of additional " -"code. There are modules to read Unix mailboxes, retrieve documents via HTTP, " -"generate random numbers, parse command-line options, compress data, and many " -"other tasks. Skimming through the Library Reference will give you an idea of " -"what's available." +":ref:`library-index`: gives complete (though terse) reference material about " +"types, functions, and the modules in the standard library. The standard " +"Python distribution includes a *lot* of additional code. There are modules " +"to read Unix mailboxes, retrieve documents via HTTP, generate random " +"numbers, parse command-line options, compress data, and many other tasks. " +"Skimming through the Library Reference will give you an idea of what's " +"available." msgstr "" "Du solltest dieses Handbuch durchblättern, das vollständiges (wenn auch " "knappes) Referenzmaterial zu Typen, Funktionen und den Modulen der " @@ -65,7 +68,7 @@ msgstr "" "andere Aufgaben. Das Überfliegen der Bibliotheksreferenz gibt dir eine " "Vorstellung davon, was verfügbar ist." -#: ../../tutorial/whatnow.rst:24 +#: ../../tutorial/whatnow.rst:25 msgid "" ":ref:`installing-index` explains how to install additional modules written " "by other Python users." @@ -73,7 +76,7 @@ msgstr "" ":ref:`installing-index` erklärt, wie zusätzliche Module installiert werden, " "die von anderen Python-Nutzern geschrieben wurden." -#: ../../tutorial/whatnow.rst:27 +#: ../../tutorial/whatnow.rst:28 msgid "" ":ref:`reference-index`: A detailed explanation of Python's syntax and " "semantics. It's heavy reading, but is useful as a complete guide to the " @@ -83,11 +86,11 @@ msgstr "" "von Python. Es ist schwere Kost, aber als vollständiger Leitfaden zur " "Sprache selbst sehr nützlich." -#: ../../tutorial/whatnow.rst:31 +#: ../../tutorial/whatnow.rst:32 msgid "More Python resources:" msgstr "Weitere Python-Ressourcen:" -#: ../../tutorial/whatnow.rst:33 +#: ../../tutorial/whatnow.rst:34 msgid "" "https://www.python.org: The major Python website. It contains code, " "documentation, and pointers to Python-related pages around the web." @@ -95,12 +98,12 @@ msgstr "" "https://www.python.org: Die Haupt-Website von Python. Sie enthält Code, " "Dokumentation und Verweise auf Seiten rund um Python im Web." -#: ../../tutorial/whatnow.rst:36 +#: ../../tutorial/whatnow.rst:37 msgid "https://docs.python.org: Fast access to Python's documentation." msgstr "" "https://docs.python.org: Schneller Zugriff auf die Python-Dokumentation." -#: ../../tutorial/whatnow.rst:38 +#: ../../tutorial/whatnow.rst:39 msgid "" "https://pypi.org: The Python Package Index, previously also nicknamed the " "Cheese Shop [#]_, is an index of user-created Python modules that are " @@ -113,7 +116,7 @@ msgstr "" "veröffentlichst, kannst du ihn hier registrieren, damit andere ihn finden " "können." -#: ../../tutorial/whatnow.rst:43 +#: ../../tutorial/whatnow.rst:44 msgid "" "https://code.activestate.com/recipes/langs/python/: The Python Cookbook is a " "sizable collection of code examples, larger modules, and useful scripts. " @@ -126,7 +129,7 @@ msgstr "" "zusammengefasst, das ebenfalls den Titel Python Cookbook trägt (O'Reilly & " "Associates, ISBN 0-596-00797-3)." -#: ../../tutorial/whatnow.rst:48 +#: ../../tutorial/whatnow.rst:49 msgid "" "https://pyvideo.org collects links to Python-related videos from conferences " "and user-group meetings." @@ -134,7 +137,7 @@ msgstr "" "https://pyvideo.org sammelt Links zu Python-bezogenen Videos von Konferenzen " "und Treffen von Anwendergruppen." -#: ../../tutorial/whatnow.rst:51 +#: ../../tutorial/whatnow.rst:52 msgid "" "https://scipy.org: The Scientific Python project includes modules for fast " "array computations and manipulations plus a host of packages for such things " @@ -146,7 +149,7 @@ msgstr "" "Bereiche wie lineare Algebra, Fourier-Transformationen, nichtlineare Löser, " "Zufallszahlenverteilungen, statistische Analysen und Ähnliches." -#: ../../tutorial/whatnow.rst:56 +#: ../../tutorial/whatnow.rst:57 msgid "" "For Python-related questions and problem reports, you can post to the " "newsgroup :newsgroup:`comp.lang.python`, or send them to the mailing list at " @@ -165,7 +168,7 @@ msgstr "" "und neue Module angekündigt werden. Archive der Mailingliste sind unter " "https://mail.python.org/pipermail/ verfügbar." -#: ../../tutorial/whatnow.rst:64 +#: ../../tutorial/whatnow.rst:65 msgid "" "Before posting, be sure to check the list of :ref:`Frequently Asked " "Questions ` (also called the FAQ). The FAQ answers many of the " @@ -177,11 +180,11 @@ msgstr "" "beantwortet viele der Fragen, die immer wieder auftauchen, und enthält " "möglicherweise bereits die Lösung für dein Problem." -#: ../../tutorial/whatnow.rst:70 +#: ../../tutorial/whatnow.rst:71 msgid "Footnotes" msgstr "Fußnoten" -#: ../../tutorial/whatnow.rst:71 +#: ../../tutorial/whatnow.rst:72 msgid "" "\"Cheese Shop\" is a Monty Python sketch: a customer enters a cheese shop, " "but whatever cheese he asks for, the clerk says it's missing." @@ -189,3 +192,6 @@ msgstr "" "\"Cheese Shop\" ist ein Sketch von Monty Python: Ein Kunde betritt einen " "Käseladen, doch egal, nach welchem Käse er fragt, der Verkäufer sagt immer, " "dieser sei nicht vorrätig." + +#~ msgid ":ref:`library-index`:" +#~ msgstr ":ref:`library-index`:" diff --git a/tutorial/whatnow.po~ b/tutorial/whatnow.po~ new file mode 100644 index 00000000..eab0840e --- /dev/null +++ b/tutorial/whatnow.po~ @@ -0,0 +1,191 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR Swen Bachmann <142266608+sba72@users.noreply.github.com>, 2026. +# +# Translators: +# python-doc bot, 2025 +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2026-08-6 00:02+0000\n" +"Last-Translator: Swen Bachmann <142266608+sba72@users.noreply.github.com>\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../tutorial/whatnow.rst:5 +msgid "What Now?" +msgstr "Was nun?" + +#: ../../tutorial/whatnow.rst:7 +msgid "" +"Reading this tutorial has probably reinforced your interest in using Python " +"--- you should be eager to apply Python to solving your real-world problems. " +"Where should you go to learn more?" +msgstr "" +"Das Lesen dieses Tutorials hat dein Interesse an der Verwendung von Python " +"vermutlich verstärkt – du brennst sicher darauf, Python zur Lösung deiner " +"praktischen Probleme einzusetzen. Wo solltest du ansetzen, um mehr zu lernen?" + +#: ../../tutorial/whatnow.rst:11 +msgid "" +"This tutorial is part of Python's documentation set. Some other documents " +"in the set are:" +msgstr "" +"Dieses Tutorial ist Teil der Python-Dokumentation. Einige weitere Dokumente " +"der Sammlung sind:" + +#: ../../tutorial/whatnow.rst:14 +msgid ":ref:`library-index`:" +msgstr ":ref:`library-index`:" + +#: ../../tutorial/whatnow.rst:16 +msgid "" +"You should browse through this manual, which gives complete (though terse) " +"reference material about types, functions, and the modules in the standard " +"library. The standard Python distribution includes a *lot* of additional " +"code. There are modules to read Unix mailboxes, retrieve documents via HTTP, " +"generate random numbers, parse command-line options, compress data, and many " +"other tasks. Skimming through the Library Reference will give you an idea of " +"what's available." +msgstr "" +"Du solltest dieses Handbuch durchblättern, das vollständiges (wenn auch " +"knappes) Referenzmaterial zu Typen, Funktionen und den Modulen der " +"Standardbibliothek bietet. Die Standard-Python-Distribution enthält *sehr " +"viel* zusätzlichen Code. Es gibt Module zum Lesen von Unix-Mailboxen, zum " +"Abrufen von Dokumenten über HTTP, zum Generieren von Zufallszahlen, zum " +"Parsen von Befehlszeilenoptionen, zum Komprimieren von Daten und für viele " +"andere Aufgaben. Das Überfliegen der Bibliotheksreferenz gibt dir eine " +"Vorstellung davon, was verfügbar ist." + +#: ../../tutorial/whatnow.rst:24 +msgid "" +":ref:`installing-index` explains how to install additional modules written " +"by other Python users." +msgstr "" +":ref:`installing-index` erklärt, wie zusätzliche Module installiert werden, " +"die von anderen Python-Nutzern geschrieben wurden." + +#: ../../tutorial/whatnow.rst:27 +msgid "" +":ref:`reference-index`: A detailed explanation of Python's syntax and " +"semantics. It's heavy reading, but is useful as a complete guide to the " +"language itself." +msgstr "" +":ref:`reference-index`: Eine detaillierte Erklärung der Syntax und Semantik " +"von Python. Es ist schwere Kost, aber als vollständiger Leitfaden zur " +"Sprache selbst sehr nützlich." + +#: ../../tutorial/whatnow.rst:31 +msgid "More Python resources:" +msgstr "Weitere Python-Ressourcen:" + +#: ../../tutorial/whatnow.rst:33 +msgid "" +"https://www.python.org: The major Python website. It contains code, " +"documentation, and pointers to Python-related pages around the web." +msgstr "" +"https://www.python.org: Die Haupt-Website von Python. Sie enthält Code, " +"Dokumentation und Verweise auf Seiten rund um Python im Web." + +#: ../../tutorial/whatnow.rst:36 +msgid "https://docs.python.org: Fast access to Python's documentation." +msgstr "" +"https://docs.python.org: Schneller Zugriff auf die Python-Dokumentation." + +#: ../../tutorial/whatnow.rst:38 +msgid "" +"https://pypi.org: The Python Package Index, previously also nicknamed the " +"Cheese Shop [#]_, is an index of user-created Python modules that are " +"available for download. Once you begin releasing code, you can register it " +"here so that others can find it." +msgstr "" +"https://pypi.org: Der Python Package Index, früher auch unter dem Spitznamen " +"Cheese Shop [#]_ bekannt, ist ein Index von Benutzern erstellten Python-" +"Modulen, die zum Download bereitstehen. Sobald du eigenen Code " +"veröffentlichst, kannst du ihn hier registrieren, damit andere ihn finden " +"können." + +#: ../../tutorial/whatnow.rst:43 +msgid "" +"https://code.activestate.com/recipes/langs/python/: The Python Cookbook is a " +"sizable collection of code examples, larger modules, and useful scripts. " +"Particularly notable contributions are collected in a book also titled " +"Python Cookbook (O'Reilly & Associates, ISBN 0-596-00797-3.)" +msgstr "" +"https://code.activestate.com/recipes/langs/python/: Das Python Cookbook ist " +"eine umfangreiche Sammlung von Codebeispielen, größeren Modulen und " +"nützlichen Skripten. Besonders bemerkenswerte Beiträge sind in einem Buch " +"zusammengefasst, das ebenfalls den Titel Python Cookbook trägt (O'Reilly & " +"Associates, ISBN 0-596-00797-3)." + +#: ../../tutorial/whatnow.rst:48 +msgid "" +"https://pyvideo.org collects links to Python-related videos from conferences " +"and user-group meetings." +msgstr "" +"https://pyvideo.org sammelt Links zu Python-bezogenen Videos von Konferenzen " +"und Treffen von Anwendergruppen." + +#: ../../tutorial/whatnow.rst:51 +msgid "" +"https://scipy.org: The Scientific Python project includes modules for fast " +"array computations and manipulations plus a host of packages for such things " +"as linear algebra, Fourier transforms, non-linear solvers, random number " +"distributions, statistical analysis and the like." +msgstr "" +"https://scipy.org: Das Scientific-Python-Projekt umfasst Module für schnelle " +"Array-Berechnungen und -Manipulationen sowie eine Vielzahl von Paketen für " +"Bereiche wie lineare Algebra, Fourier-Transformationen, nichtlineare Löser, " +"Zufallszahlenverteilungen, statistische Analysen und Ähnliches." + +#: ../../tutorial/whatnow.rst:56 +msgid "" +"For Python-related questions and problem reports, you can post to the " +"newsgroup :newsgroup:`comp.lang.python`, or send them to the mailing list at " +"python-list@python.org. The newsgroup and mailing list are gatewayed, so " +"messages posted to one will automatically be forwarded to the other. There " +"are hundreds of postings a day, asking (and answering) questions, suggesting " +"new features, and announcing new modules. Mailing list archives are " +"available at https://mail.python.org/pipermail/." +msgstr "" +"Für Fragen und Fehlerberichte zu Python kannst du in die Newsgroup :" +"newsgroup:`comp.lang.python` schreiben oder sie an die Mailingliste python-" +"list@python.org senden. Newsgroup und Mailingliste sind miteinander " +"verbunden, sodass an die eine Stelle gesendete Nachrichten automatisch an " +"die andere weitergeleitet werden. Jeden Tag gibt es Hunderte von Beiträgen, " +"in denen Fragen gestellt (und beantwortet), neue Funktionen vorgeschlagen " +"und neue Module angekündigt werden. Archive der Mailingliste sind unter " +"https://mail.python.org/pipermail/ verfügbar." + +#: ../../tutorial/whatnow.rst:64 +msgid "" +"Before posting, be sure to check the list of :ref:`Frequently Asked " +"Questions ` (also called the FAQ). The FAQ answers many of the " +"questions that come up again and again, and may already contain the solution " +"for your problem." +msgstr "" +"Bevor du einen Beitrag verfasst, schaue unbedingt in die Liste der :ref:" +"`Häufig gestellten Fragen ` (auch FAQ genannt). Die FAQ " +"beantwortet viele der Fragen, die immer wieder auftauchen, und enthält " +"möglicherweise bereits die Lösung für dein Problem." + +#: ../../tutorial/whatnow.rst:70 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../tutorial/whatnow.rst:71 +msgid "" +"\"Cheese Shop\" is a Monty Python sketch: a customer enters a cheese shop, " +"but whatever cheese he asks for, the clerk says it's missing." +msgstr "" +"\"Cheese Shop\" ist ein Sketch von Monty Python: Ein Kunde betritt einen " +"Käseladen, doch egal, nach welchem Käse er fragt, der Verkäufer sagt immer, " +"dieser sei nicht vorrätig." diff --git a/using/configure.po b/using/configure.po index 08c767a3..bbed6a3d 100644 --- a/using/configure.po +++ b/using/configure.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -193,11 +193,11 @@ msgstr "" msgid "`OpenSSL `_" msgstr "" -#: ../../using/configure.rst:0 +#: ../../using/configure.rst:97 msgid "3.0.18 recommended" msgstr "" -#: ../../using/configure.rst:0 +#: ../../using/configure.rst:98 msgid "(1.1.1 minimum)" msgstr "" diff --git a/using/configure.po~ b/using/configure.po~ new file mode 100644 index 00000000..08c767a3 --- /dev/null +++ b/using/configure.po~ @@ -0,0 +1,2547 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../using/configure.rst:3 +msgid "Configure Python" +msgstr "" + +#: ../../using/configure.rst:11 +msgid "Build Requirements" +msgstr "" + +#: ../../using/configure.rst:13 +msgid "To build CPython, you will need:" +msgstr "" + +#: ../../using/configure.rst:15 +msgid "" +"A `C11 `_ compiler. `Optional C11 " +"features `_ are not required." +msgstr "" + +#: ../../using/configure.rst:20 +msgid "On Windows, Microsoft Visual Studio 2017 or later is required." +msgstr "" + +#: ../../using/configure.rst:22 +msgid "" +"Support for `IEEE 754 `_ floating-" +"point numbers and `floating-point Not-a-Number (NaN) `_." +msgstr "" + +#: ../../using/configure.rst:26 +msgid "Support for threads." +msgstr "" + +#: ../../using/configure.rst:28 +msgid "On Windows, Visual Studio 2015 or later is now required." +msgstr "" + +#: ../../using/configure.rst:31 +msgid "" +"Selected C99 features, like ```` and ``static inline`` functions, " +"are now required." +msgstr "" + +#: ../../using/configure.rst:35 +msgid "Thread support is now required." +msgstr "" + +#: ../../using/configure.rst:38 +msgid "" +"C11 compiler, IEEE 754 and NaN support are now required. On Windows, Visual " +"Studio 2017 or later is required." +msgstr "" + +#: ../../using/configure.rst:42 +msgid "" +"See also :pep:`7` \"Style Guide for C Code\" and :pep:`11` \"CPython " +"platform support\"." +msgstr "" + +#: ../../using/configure.rst:49 +msgid "Requirements for optional modules" +msgstr "" + +#: ../../using/configure.rst:51 +msgid "" +"Some :term:`optional modules ` of the standard library " +"require third-party libraries installed for development (for example, header " +"files must be available)." +msgstr "" + +#: ../../using/configure.rst:55 +msgid "" +"Missing requirements are reported in the ``configure`` output. Modules that " +"are missing due to missing dependencies are listed near the end of the " +"``make`` output, sometimes using an internal name, for example, ``_ctypes`` " +"for :mod:`ctypes` module." +msgstr "" + +#: ../../using/configure.rst:61 +msgid "" +"If you distribute a CPython interpreter without optional modules, it's best " +"practice to advise users, who generally expect that standard library modules " +"are available." +msgstr "" + +#: ../../using/configure.rst:65 +msgid "Dependencies to build optional modules are:" +msgstr "" + +#: ../../using/configure.rst:71 +msgid "Dependency" +msgstr "" + +#: ../../using/configure.rst:72 +msgid "Minimum version" +msgstr "" + +#: ../../using/configure.rst:73 +msgid "Python module" +msgstr "" + +#: ../../using/configure.rst:74 +msgid "`libbz2 `_" +msgstr "" + +#: ../../using/configure.rst:76 +msgid ":mod:`bz2`" +msgstr "" + +#: ../../using/configure.rst:77 +msgid "`libffi `_" +msgstr "" + +#: ../../using/configure.rst:78 +msgid "3.3.0 recommended" +msgstr "" + +#: ../../using/configure.rst:79 +msgid ":mod:`ctypes`" +msgstr "" + +#: ../../using/configure.rst:80 +msgid "`liblzma `_" +msgstr "" + +#: ../../using/configure.rst:82 +msgid ":mod:`lzma`" +msgstr "" + +#: ../../using/configure.rst:83 +msgid "`libmpdec `_" +msgstr "" + +#: ../../using/configure.rst:84 +msgid "2.5.0" +msgstr "" + +#: ../../using/configure.rst:85 +msgid ":mod:`decimal` [1]_" +msgstr "" + +#: ../../using/configure.rst:86 +msgid "" +"`libreadline `_ or " +"`libedit `_ [2]_" +msgstr "" + +#: ../../using/configure.rst:89 +msgid ":mod:`readline`" +msgstr "" + +#: ../../using/configure.rst:90 +msgid "`libuuid `_" +msgstr "" + +#: ../../using/configure.rst:92 +msgid "``_uuid`` [3]_" +msgstr "" + +#: ../../using/configure.rst:93 +msgid "`ncurses `_ [4]_" +msgstr "" + +#: ../../using/configure.rst:95 +msgid ":mod:`curses`" +msgstr "" + +#: ../../using/configure.rst:96 +msgid "`OpenSSL `_" +msgstr "" + +#: ../../using/configure.rst:0 +msgid "3.0.18 recommended" +msgstr "" + +#: ../../using/configure.rst:0 +msgid "(1.1.1 minimum)" +msgstr "" + +#: ../../using/configure.rst:99 +msgid ":mod:`ssl`, :mod:`hashlib` [5]_" +msgstr "" + +#: ../../using/configure.rst:100 +msgid "`SQLite `_" +msgstr "" + +#: ../../using/configure.rst:101 +msgid "3.15.2" +msgstr "" + +#: ../../using/configure.rst:102 +msgid ":mod:`sqlite3`" +msgstr "" + +#: ../../using/configure.rst:103 +msgid "`Tcl/Tk `_" +msgstr "" + +#: ../../using/configure.rst:104 +msgid "8.5.12" +msgstr "" + +#: ../../using/configure.rst:105 +msgid ":mod:`tkinter`, :ref:`IDLE `, :mod:`turtle`" +msgstr "" + +#: ../../using/configure.rst:106 +msgid "`zlib `_" +msgstr "" + +#: ../../using/configure.rst:107 +msgid "1.2.2.1" +msgstr "" + +#: ../../using/configure.rst:108 +msgid ":mod:`zlib`, :mod:`gzip`, :mod:`ensurepip`" +msgstr "" + +#: ../../using/configure.rst:109 +msgid "`zstd `_" +msgstr "" + +#: ../../using/configure.rst:110 +msgid "1.4.5" +msgstr "" + +#: ../../using/configure.rst:111 +msgid ":mod:`compression.zstd`" +msgstr "" + +#: ../../using/configure.rst:113 +msgid "" +"If *libmpdec* is not available, the :mod:`decimal` module will use a pure-" +"Python implementation. See :option:`--with-system-libmpdec` for details." +msgstr "" + +#: ../../using/configure.rst:116 +msgid "" +"See :option:`--with-readline` for choosing the backend for the :mod:" +"`readline` module." +msgstr "" + +#: ../../using/configure.rst:118 +msgid "" +"The :mod:`uuid` module uses ``_uuid`` to generate \"safe\" UUIDs. See the " +"module documentation for details." +msgstr "" + +#: ../../using/configure.rst:120 +msgid "" +"The :mod:`curses` module requires the ``libncurses`` or ``libncursesw`` " +"library. The :mod:`curses.panel` module additionally requires the " +"``libpanel`` or ``libpanelw`` library." +msgstr "" + +#: ../../using/configure.rst:124 +msgid "" +"If OpenSSL is not available, the :mod:`hashlib` module will use bundled " +"implementations of several hash functions. See :option:`--with-builtin-" +"hashlib-hashes` for *forcing* usage of OpenSSL." +msgstr "" + +#: ../../using/configure.rst:128 +msgid "" +"Note that the table does not include all optional modules; in particular, " +"platform-specific modules like :mod:`winreg` are not listed here." +msgstr "" + +#: ../../using/configure.rst:133 +msgid "" +"The `devguide `_ includes a full list of dependencies required to " +"build all modules and instructions on how to install them on common " +"platforms." +msgstr "" + +#: ../../using/configure.rst:136 +msgid "" +":option:`--with-system-expat` allows building with an external `libexpat " +"`_ library." +msgstr "" + +#: ../../using/configure.rst:138 +msgid ":ref:`configure-options-for-dependencies`" +msgstr "" + +#: ../../using/configure.rst:140 +msgid "Tcl/Tk version 8.3.1 is now required for :mod:`tkinter`." +msgstr "" + +#: ../../using/configure.rst:143 +msgid "Tcl/Tk version 8.4 is now required for :mod:`tkinter`." +msgstr "" + +#: ../../using/configure.rst:146 +msgid "OpenSSL 1.0.2 is now required for :mod:`hashlib` and :mod:`ssl`." +msgstr "" + +#: ../../using/configure.rst:149 +msgid "" +"OpenSSL 1.1.1 is now required for :mod:`hashlib` and :mod:`ssl`. SQLite " +"3.7.15 is now required for :mod:`sqlite3`." +msgstr "" + +#: ../../using/configure.rst:153 +msgid "Tcl/Tk version 8.5.12 is now required for :mod:`tkinter`." +msgstr "" + +#: ../../using/configure.rst:156 +msgid "SQLite 3.15.2 is now required for :mod:`sqlite3`." +msgstr "" + +#: ../../using/configure.rst:161 +msgid "Generated files" +msgstr "" + +#: ../../using/configure.rst:163 +msgid "" +"To reduce build dependencies, Python source code contains multiple generated " +"files. Commands to regenerate all generated files::" +msgstr "" + +#: ../../using/configure.rst:166 +msgid "" +"make regen-all\n" +"make regen-stdlib-module-names\n" +"make regen-limited-abi\n" +"make regen-configure" +msgstr "" + +#: ../../using/configure.rst:171 +msgid "" +"The ``Makefile.pre.in`` file documents generated files, their inputs, and " +"tools used to regenerate them. Search for ``regen-*`` make targets." +msgstr "" + +#: ../../using/configure.rst:175 +msgid "configure script" +msgstr "" + +#: ../../using/configure.rst:177 +msgid "" +"The ``make regen-configure`` command regenerates the ``aclocal.m4`` file and " +"the ``configure`` script using the ``Tools/build/regen-configure.sh`` shell " +"script which uses an Ubuntu container to get the same tools versions and " +"have a reproducible output." +msgstr "" + +#: ../../using/configure.rst:182 +msgid "The container is optional, the following command can be run locally::" +msgstr "" + +#: ../../using/configure.rst:184 +msgid "autoreconf -ivf -Werror" +msgstr "" + +#: ../../using/configure.rst:186 +msgid "" +"The generated files can change depending on the exact versions of the tools " +"used. The container that CPython uses has `Autoconf `_ 2.72, ``aclocal`` from `Automake `_ 1.16.5, and `pkg-config `_ 1.8.1." +msgstr "" + +#: ../../using/configure.rst:193 +msgid "" +"Autoconf 2.71 and aclocal 1.16.5 and are now used to regenerate :file:" +"`configure`." +msgstr "" + +#: ../../using/configure.rst:197 +msgid "Autoconf 2.72 is now used to regenerate :file:`configure`." +msgstr "" + +#: ../../using/configure.rst:204 +msgid "Configure Options" +msgstr "" + +#: ../../using/configure.rst:206 +msgid "List all :file:`configure` script options using::" +msgstr "" + +#: ../../using/configure.rst:208 +msgid "./configure --help" +msgstr "" + +#: ../../using/configure.rst:210 +msgid "" +"See also the :file:`Misc/SpecialBuilds.txt` in the Python source " +"distribution." +msgstr "" + +#: ../../using/configure.rst:213 +msgid "General Options" +msgstr "" + +#: ../../using/configure.rst:217 +msgid "" +"Support loadable extensions in the :mod:`!_sqlite` extension module (default " +"is no) of the :mod:`sqlite3` module." +msgstr "" + +#: ../../using/configure.rst:220 +msgid "" +"See the :meth:`sqlite3.Connection.enable_load_extension` method of the :mod:" +"`sqlite3` module." +msgstr "" + +#: ../../using/configure.rst:227 +msgid "" +"Disable IPv6 support (enabled by default if supported), see the :mod:" +"`socket` module." +msgstr "" + +#: ../../using/configure.rst:232 +msgid "Define the size in bits of Python :class:`int` digits: 15 or 30 bits." +msgstr "" + +#: ../../using/configure.rst:234 +msgid "By default, the digit size is 30." +msgstr "" + +#: ../../using/configure.rst:236 +msgid "Define the ``PYLONG_BITS_IN_DIGIT`` to ``15`` or ``30``." +msgstr "" + +#: ../../using/configure.rst:238 +msgid "See :data:`sys.int_info.bits_per_digit `." +msgstr "" + +#: ../../using/configure.rst:242 +msgid "Set the Python executable suffix to *SUFFIX*." +msgstr "" + +#: ../../using/configure.rst:244 +msgid "" +"The default suffix is ``.exe`` on Windows and macOS (``python.exe`` " +"executable), ``.js`` on Emscripten node, ``.html`` on Emscripten browser, ``." +"wasm`` on WASI, and an empty string on other platforms (``python`` " +"executable)." +msgstr "" + +#: ../../using/configure.rst:249 +msgid "" +"The default suffix on WASM platform is one of ``.js``, ``.html`` or ``." +"wasm``." +msgstr "" + +#: ../../using/configure.rst:255 +msgid "" +"Select the default time zone search path for :const:`zoneinfo.TZPATH`. See " +"the :ref:`Compile-time configuration ` of " +"the :mod:`zoneinfo` module." +msgstr "" + +#: ../../using/configure.rst:259 +msgid "" +"Default: ``/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/" +"etc/zoneinfo``." +msgstr "" + +#: ../../using/configure.rst:261 +msgid "See :data:`os.pathsep` path separator." +msgstr "" + +#: ../../using/configure.rst:267 +msgid "" +"Build the ``_decimal`` extension module using a thread-local context rather " +"than a coroutine-local context (default), see the :mod:`decimal` module." +msgstr "" + +#: ../../using/configure.rst:270 +msgid "See :const:`decimal.HAVE_CONTEXTVAR` and the :mod:`contextvars` module." +msgstr "" + +#: ../../using/configure.rst:276 +msgid "Override order to check db backends for the :mod:`dbm` module" +msgstr "" + +#: ../../using/configure.rst:278 +msgid "" +"A valid value is a colon (``:``) separated string with the backend names:" +msgstr "" + +#: ../../using/configure.rst:280 +msgid "``ndbm``;" +msgstr "" + +#: ../../using/configure.rst:281 +msgid "``gdbm``;" +msgstr "" + +#: ../../using/configure.rst:282 +msgid "``bdb``." +msgstr "" + +#: ../../using/configure.rst:286 +msgid "Disable C locale coercion to a UTF-8 based locale (enabled by default)." +msgstr "" + +#: ../../using/configure.rst:288 +msgid "Don't define the ``PY_COERCE_C_LOCALE`` macro." +msgstr "" + +#: ../../using/configure.rst:290 +msgid "See :envvar:`PYTHONCOERCECLOCALE` and the :pep:`538`." +msgstr "" + +#: ../../using/configure.rst:294 +msgid "Python library directory name (default is ``lib``)." +msgstr "" + +#: ../../using/configure.rst:296 +msgid "Fedora and SuSE use ``lib64`` on 64-bit platforms." +msgstr "" + +#: ../../using/configure.rst:298 +msgid "See :data:`sys.platlibdir`." +msgstr "" + +#: ../../using/configure.rst:304 +msgid "" +"Directory of wheel packages used by the :mod:`ensurepip` module (none by " +"default)." +msgstr "" + +#: ../../using/configure.rst:307 +msgid "" +"Some Linux distribution packaging policies recommend against bundling " +"dependencies. For example, Fedora installs wheel packages in the ``/usr/" +"share/python-wheels/`` directory and don't install the :mod:`!ensurepip." +"_bundled` package." +msgstr "" + +#: ../../using/configure.rst:316 +msgid "" +"Whether configure should use :program:`pkg-config` to detect build " +"dependencies." +msgstr "" + +#: ../../using/configure.rst:319 +msgid "``check`` (default): :program:`pkg-config` is optional" +msgstr "" + +#: ../../using/configure.rst:320 +msgid "``yes``: :program:`pkg-config` is mandatory" +msgstr "" + +#: ../../using/configure.rst:321 +msgid "``no``: configure does not use :program:`pkg-config` even when present" +msgstr "" + +#: ../../using/configure.rst:327 +msgid "" +"Path to a `JSON `_ configuration file " +"containing custom error messages for missing :term:`standard library` " +"modules." +msgstr "" + +#: ../../using/configure.rst:330 +msgid "" +"This option is intended for Python distributors who wish to provide " +"distribution-specific guidance when users encounter standard library modules " +"that are missing or packaged separately." +msgstr "" + +#: ../../using/configure.rst:334 +msgid "" +"The JSON file should map missing module names to custom error message " +"strings. For example, if your distribution packages :mod:`tkinter` and :mod:" +"`_tkinter` separately and excludes :mod:`!_gdbm` for legal reasons, the " +"configuration could contain:" +msgstr "" + +#: ../../using/configure.rst:339 +msgid "" +"{\n" +" \"_gdbm\": \"The '_gdbm' module is not available in this " +"distribution\",\n" +" \"tkinter\": \"Install the python-tk package to use tkinter\",\n" +" \"_tkinter\": \"Install the python-tk package to use tkinter\",\n" +"}" +msgstr "" + +#: ../../using/configure.rst:351 +msgid "Turn on internal Python performance statistics gathering." +msgstr "" + +#: ../../using/configure.rst:353 +msgid "" +"By default, statistics gathering is off. Use ``python3 -X pystats`` command " +"or set ``PYTHONSTATS=1`` environment variable to turn on statistics " +"gathering at Python startup." +msgstr "" + +#: ../../using/configure.rst:357 +msgid "" +"At Python exit, dump statistics if statistics gathering was on and not " +"cleared." +msgstr "" + +#: ../../using/configure.rst:360 ../../using/configure.rst:955 +msgid "Effects:" +msgstr "" + +#: ../../using/configure.rst:362 +msgid "Add :option:`-X pystats <-X>` command line option." +msgstr "" + +#: ../../using/configure.rst:363 +msgid "Add :envvar:`!PYTHONSTATS` environment variable." +msgstr "" + +#: ../../using/configure.rst:364 +msgid "Define the ``Py_STATS`` macro." +msgstr "" + +#: ../../using/configure.rst:365 +msgid "Add functions to the :mod:`sys` module:" +msgstr "" + +#: ../../using/configure.rst:367 +msgid ":func:`!sys._stats_on`: Turns on statistics gathering." +msgstr "" + +#: ../../using/configure.rst:368 +msgid ":func:`!sys._stats_off`: Turns off statistics gathering." +msgstr "" + +#: ../../using/configure.rst:369 +msgid ":func:`!sys._stats_clear`: Clears the statistics." +msgstr "" + +#: ../../using/configure.rst:370 +msgid "" +":func:`!sys._stats_dump`: Dump statistics to file, and clears the statistics." +msgstr "" + +#: ../../using/configure.rst:372 +msgid "" +"The statistics will be dumped to a arbitrary (probably unique) file in ``/" +"tmp/py_stats/`` (Unix) or ``C:\\temp\\py_stats\\`` (Windows). If that " +"directory does not exist, results will be printed on stderr." +msgstr "" + +#: ../../using/configure.rst:376 +msgid "Use ``Tools/scripts/summarize_stats.py`` to read the stats." +msgstr "" + +#: ../../using/configure.rst:378 +msgid "Statistics:" +msgstr "" + +#: ../../using/configure.rst:380 +msgid "Opcode:" +msgstr "" + +#: ../../using/configure.rst:382 +msgid "Specialization: success, failure, hit, deferred, miss, deopt, failures;" +msgstr "" + +#: ../../using/configure.rst:383 +msgid "Execution count;" +msgstr "" + +#: ../../using/configure.rst:384 +msgid "Pair count." +msgstr "" + +#: ../../using/configure.rst:386 +msgid "Call:" +msgstr "" + +#: ../../using/configure.rst:388 +msgid "Inlined Python calls;" +msgstr "" + +#: ../../using/configure.rst:389 +msgid "PyEval calls;" +msgstr "" + +#: ../../using/configure.rst:390 +msgid "Frames pushed;" +msgstr "" + +#: ../../using/configure.rst:391 +msgid "Frame object created;" +msgstr "" + +#: ../../using/configure.rst:392 +msgid "" +"Eval calls: vector, generator, legacy, function VECTORCALL, build class, " +"slot, function \"ex\", API, method." +msgstr "" + +#: ../../using/configure.rst:395 +msgid "Object:" +msgstr "" + +#: ../../using/configure.rst:397 +msgid "incref and decref;" +msgstr "" + +#: ../../using/configure.rst:398 +msgid "interpreter incref and decref;" +msgstr "" + +#: ../../using/configure.rst:399 +msgid "allocations: all, 512 bytes, 4 kiB, big;" +msgstr "" + +#: ../../using/configure.rst:400 +msgid "free;" +msgstr "" + +#: ../../using/configure.rst:401 +msgid "to/from free lists;" +msgstr "" + +#: ../../using/configure.rst:402 +msgid "dictionary materialized/dematerialized;" +msgstr "" + +#: ../../using/configure.rst:403 +msgid "type cache;" +msgstr "" + +#: ../../using/configure.rst:404 +msgid "optimization attempts;" +msgstr "" + +#: ../../using/configure.rst:405 +msgid "optimization traces created/executed;" +msgstr "" + +#: ../../using/configure.rst:406 +msgid "uops executed." +msgstr "" + +#: ../../using/configure.rst:408 +msgid "Garbage collector:" +msgstr "" + +#: ../../using/configure.rst:410 +msgid "Garbage collections;" +msgstr "" + +#: ../../using/configure.rst:411 +msgid "Objects visited;" +msgstr "" + +#: ../../using/configure.rst:412 +msgid "Objects collected." +msgstr "" + +#: ../../using/configure.rst:423 +msgid "" +"Enables support for running Python without the :term:`global interpreter " +"lock` (GIL): :term:`free-threaded build`." +msgstr "" + +#: ../../using/configure.rst:426 +msgid "" +"Defines the ``Py_GIL_DISABLED`` macro and adds ``\"t\"`` to :data:`sys." +"abiflags`." +msgstr "" + +#: ../../using/configure.rst:429 +msgid "See :ref:`whatsnew313-free-threaded-cpython` for more detail." +msgstr "" + +#: ../../using/configure.rst:435 +msgid "" +"Indicate how to integrate the :ref:`experimental just-in-time compiler " +"`." +msgstr "" + +#: ../../using/configure.rst:437 +msgid "``no``: Don't build the JIT." +msgstr "" + +#: ../../using/configure.rst:438 +msgid "" +"``yes``: Enable the JIT. To disable it at runtime, set the environment " +"variable :envvar:`PYTHON_JIT=0 `." +msgstr "" + +#: ../../using/configure.rst:440 +msgid "" +"``yes-off``: Build the JIT, but disable it by default. To enable it at " +"runtime, set the environment variable :envvar:`PYTHON_JIT=1 `." +msgstr "" + +#: ../../using/configure.rst:442 +msgid "" +"``interpreter``: Enable the \"JIT interpreter\" (only useful for those " +"debugging the JIT itself). To disable it at runtime, set the environment " +"variable :envvar:`PYTHON_JIT=0 `." +msgstr "" + +#: ../../using/configure.rst:446 +msgid "" +"``--enable-experimental-jit=no`` is the default behavior if the option is " +"not provided, and ``--enable-experimental-jit`` is shorthand for ``--enable-" +"experimental-jit=yes``. See :file:`Tools/jit/README.md` for more " +"information, including how to install the necessary build-time dependencies." +msgstr "" + +#: ../../using/configure.rst:453 +msgid "" +"When building CPython with JIT enabled, ensure that your system has Python " +"3.11 or later installed." +msgstr "" + +#: ../../using/configure.rst:459 +msgid "Path to ``pkg-config`` utility." +msgstr "" + +#: ../../using/configure.rst:464 +msgid "``pkg-config`` options." +msgstr "" + +#: ../../using/configure.rst:468 +msgid "" +"Build without ``epoll``, meaning that :py:func:`select.epoll` will not be " +"present even if the system provides an :manpage:`epoll_create " +"` function. This may be used on systems where :manpage:`!" +"epoll_create` or :manpage:`epoll_create1 ` is available " +"but incompatible with Linux semantics." +msgstr "" + +#: ../../using/configure.rst:479 +msgid "C compiler options" +msgstr "" + +#: ../../using/configure.rst:483 ../../using/configure.rst:1547 +msgid "C compiler command." +msgstr "" + +#: ../../using/configure.rst:487 ../../using/configure.rst:1559 +msgid "C compiler flags." +msgstr "" + +#: ../../using/configure.rst:491 +msgid "C preprocessor command." +msgstr "" + +#: ../../using/configure.rst:495 +msgid "C preprocessor flags, e.g. :samp:`-I{include_dir}`." +msgstr "" + +#: ../../using/configure.rst:499 ../../using/configure.rst:1029 +msgid "Linker options" +msgstr "" + +#: ../../using/configure.rst:503 +msgid "Linker flags, e.g. :samp:`-L{library_directory}`." +msgstr "" + +#: ../../using/configure.rst:507 +msgid "Libraries to pass to the linker, e.g. :samp:`-l{library}`." +msgstr "" + +#: ../../using/configure.rst:511 +msgid "Name for machine-dependent library files." +msgstr "" + +#: ../../using/configure.rst:517 +msgid "Options for third-party dependencies" +msgstr "" + +#: ../../using/configure.rst:524 +msgid "" +"C compiler and linker flags to link Python to ``libbz2``, used by :mod:`bz2` " +"module, overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:530 +msgid "" +"C compiler and linker flags for ``libncurses`` or ``libncursesw``, used by :" +"mod:`curses` module, overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:536 +msgid "C compiler and linker flags for ``gdbm``." +msgstr "" + +#: ../../using/configure.rst:541 +msgid "" +"C compiler and linker flags for ``libedit``, used by :mod:`readline` module, " +"overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:547 +msgid "" +"C compiler and linker flags for ``libffi``, used by :mod:`ctypes` module, " +"overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:553 +msgid "" +"C compiler and linker flags for ``libmpdec``, used by :mod:`decimal` module, " +"overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:558 +msgid "" +"These environment variables have no effect unless :option:`--with-system-" +"libmpdec` is specified." +msgstr "" + +#: ../../using/configure.rst:564 +msgid "" +"C compiler and linker flags for ``liblzma``, used by :mod:`lzma` module, " +"overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:570 +msgid "" +"C compiler and linker flags for ``libreadline``, used by :mod:`readline` " +"module, overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:576 +msgid "" +"C compiler and linker flags for ``libsqlite3``, used by :mod:`sqlite3` " +"module, overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:582 +msgid "" +"C compiler and linker flags for ``libuuid``, used by :mod:`uuid` module, " +"overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:588 +msgid "" +"C compiler and linker flags for ``libzstd``, used by :mod:`compression.zstd` " +"module, overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:596 +msgid "C compiler and linker flags for PANEL, overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:598 +msgid "" +"C compiler and linker flags for ``libpanel`` or ``libpanelw``, used by :mod:" +"`curses.panel` module, overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:604 +msgid "C compiler and linker flags for TCLTK, overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:609 +msgid "" +"C compiler and linker flags for ``libzlib``, used by :mod:`gzip` module, " +"overriding ``pkg-config``." +msgstr "" + +#: ../../using/configure.rst:614 +msgid "WebAssembly Options" +msgstr "" + +#: ../../using/configure.rst:618 +msgid "Turn on dynamic linking support for WASM." +msgstr "" + +#: ../../using/configure.rst:620 +msgid "" +"Dynamic linking enables ``dlopen``. File size of the executable increases " +"due to limited dead code elimination and additional features." +msgstr "" + +#: ../../using/configure.rst:627 +msgid "Turn on pthreads support for WASM." +msgstr "" + +#: ../../using/configure.rst:633 +msgid "Install Options" +msgstr "" + +#: ../../using/configure.rst:637 +msgid "" +"Install architecture-independent files in PREFIX. On Unix, it defaults to :" +"file:`/usr/local`." +msgstr "" + +#: ../../using/configure.rst:640 +msgid "This value can be retrieved at runtime using :data:`sys.prefix`." +msgstr "" + +#: ../../using/configure.rst:642 +msgid "" +"As an example, one can use ``--prefix=\"$HOME/.local/\"`` to install a " +"Python in its home directory." +msgstr "" + +#: ../../using/configure.rst:647 +msgid "" +"Install architecture-dependent files in EPREFIX, defaults to :option:`--" +"prefix`." +msgstr "" + +#: ../../using/configure.rst:649 +msgid "This value can be retrieved at runtime using :data:`sys.exec_prefix`." +msgstr "" + +#: ../../using/configure.rst:653 +msgid "" +"Don't build nor install test modules, like the :mod:`test` package or the :" +"mod:`!_testcapi` extension module (built and installed by default)." +msgstr "" + +#: ../../using/configure.rst:660 +msgid "Select the :mod:`ensurepip` command run on Python installation:" +msgstr "" + +#: ../../using/configure.rst:662 +msgid "" +"``upgrade`` (default): run ``python -m ensurepip --altinstall --upgrade`` " +"command." +msgstr "" + +#: ../../using/configure.rst:664 +msgid "``install``: run ``python -m ensurepip --altinstall`` command;" +msgstr "" + +#: ../../using/configure.rst:665 +msgid "``no``: don't run ensurepip;" +msgstr "" + +#: ../../using/configure.rst:671 +msgid "Performance options" +msgstr "" + +#: ../../using/configure.rst:673 +msgid "" +"Configuring Python using ``--enable-optimizations --with-lto`` (PGO + LTO) " +"is recommended for best performance. The experimental ``--enable-bolt`` flag " +"can also be used to improve performance." +msgstr "" + +#: ../../using/configure.rst:679 +msgid "" +"Enable Profile Guided Optimization (PGO) using :envvar:`PROFILE_TASK` " +"(disabled by default)." +msgstr "" + +#: ../../using/configure.rst:682 +msgid "" +"The C compiler Clang requires ``llvm-profdata`` program for PGO. On macOS, " +"GCC also requires it: GCC is just an alias to Clang on macOS." +msgstr "" + +#: ../../using/configure.rst:685 +msgid "" +"Disable also semantic interposition in libpython if ``--enable-shared`` and " +"GCC is used: add ``-fno-semantic-interposition`` to the compiler and linker " +"flags." +msgstr "" + +#: ../../using/configure.rst:691 +msgid "" +"During the build, you may encounter compiler warnings about profile data not " +"being available for some source files. These warnings are harmless, as only " +"a subset of the code is exercised during profile data acquisition. To " +"disable these warnings on Clang, manually suppress them by adding ``-Wno-" +"profile-instr-unprofiled`` to :envvar:`CFLAGS`." +msgstr "" + +#: ../../using/configure.rst:700 +msgid "Use ``-fno-semantic-interposition`` on GCC." +msgstr "" + +#: ../../using/configure.rst:705 +msgid "" +"Environment variable used in the Makefile: Python command line arguments for " +"the PGO generation task." +msgstr "" + +#: ../../using/configure.rst:708 +msgid "Default: ``-m test --pgo --timeout=$(TESTTIMEOUT)``." +msgstr "" + +#: ../../using/configure.rst:712 +msgid "Task failure is no longer ignored silently." +msgstr "" + +#: ../../using/configure.rst:717 +msgid "Enable Link Time Optimization (LTO) in any build (disabled by default)." +msgstr "" + +#: ../../using/configure.rst:719 +msgid "" +"The C compiler Clang requires ``llvm-ar`` for LTO (``ar`` on macOS), as well " +"as an LTO-aware linker (``ld.gold`` or ``lld``)." +msgstr "" + +#: ../../using/configure.rst:724 +msgid "To use ThinLTO feature, use ``--with-lto=thin`` on Clang." +msgstr "" + +#: ../../using/configure.rst:727 +msgid "" +"Use ThinLTO as the default optimization policy on Clang if the compiler " +"accepts the flag." +msgstr "" + +#: ../../using/configure.rst:732 +msgid "" +"Enable usage of the `BOLT post-link binary optimizer `_ (disabled by default)." +msgstr "" + +#: ../../using/configure.rst:736 +msgid "" +"BOLT is part of the LLVM project but is not always included in their binary " +"distributions. This flag requires that ``llvm-bolt`` and ``merge-fdata`` are " +"available." +msgstr "" + +#: ../../using/configure.rst:740 +msgid "" +"BOLT is still a fairly new project so this flag should be considered " +"experimental for now. Because this tool operates on machine code its success " +"is dependent on a combination of the build environment + the other " +"optimization configure args + the CPU architecture, and not all combinations " +"are supported. BOLT versions before LLVM 16 are known to crash BOLT under " +"some scenarios. Use of LLVM 16 or newer for BOLT optimization is strongly " +"encouraged." +msgstr "" + +#: ../../using/configure.rst:748 +msgid "" +"The :envvar:`!BOLT_INSTRUMENT_FLAGS` and :envvar:`!BOLT_APPLY_FLAGS` :" +"program:`configure` variables can be defined to override the default set of " +"arguments for :program:`llvm-bolt` to instrument and apply BOLT data to " +"binaries, respectively." +msgstr "" + +#: ../../using/configure.rst:757 +msgid "" +"Arguments to ``llvm-bolt`` when creating a `BOLT optimized binary `_." +msgstr "" + +#: ../../using/configure.rst:764 +msgid "Arguments to ``llvm-bolt`` when instrumenting binaries." +msgstr "" + +#: ../../using/configure.rst:770 +msgid "" +"Enable computed gotos in evaluation loop (enabled by default on supported " +"compilers)." +msgstr "" + +#: ../../using/configure.rst:775 +msgid "" +"Enable interpreters using tail calls in CPython. If enabled, enabling PGO (:" +"option:`--enable-optimizations`) is highly recommended. This option " +"specifically requires a C compiler with proper tail call support, and the " +"`preserve_none `_ calling convention. For example, Clang 19 and newer supports this " +"feature." +msgstr "" + +#: ../../using/configure.rst:785 +msgid "Disable frame pointers, which are enabled by default (see :pep:`831`)." +msgstr "" + +#: ../../using/configure.rst:787 +msgid "" +"By default, the build appends flags to generate frame or backchain pointers " +"to ``BASECFLAGS``:" +msgstr "" + +#: ../../using/configure.rst:790 +msgid "" +"``-fno-omit-frame-pointer`` and/or ``-mno-omit-leaf-frame-pointer`` are " +"added when the compiler supports them." +msgstr "" + +#: ../../using/configure.rst:792 +msgid "``-marm`` and/or ``-mno-thumb`` is added on 32-bit ARM when supported," +msgstr "" + +#: ../../using/configure.rst:793 +msgid "" +"on s390x platforms, when supported, ``-mbackchain`` is added *instead*. of " +"the above frame pointer flags." +msgstr "" + +#: ../../using/configure.rst:795 +msgid "" +"on ppc64le platforms, no compiler flags is needed since the power ABI " +"requires that compilers maintain a back chain by default." +msgstr "" + +#: ../../using/configure.rst:798 +msgid "" +"Frame pointers enable profilers, debuggers, and system tracing tools " +"(``perf``, ``eBPF``, ``dtrace``, ``gdb``) to walk the C call stack without " +"DWARF metadata. The flags propagate to third-party C extensions through :mod:" +"`sysconfig`. On compilers that do not understand them, the build silently " +"skips them." +msgstr "" + +#: ../../using/configure.rst:804 +msgid "" +"Downstream packagers and authors of native libraries built with custom build " +"systems should set the same flags so the unwind chain stays unbroken across " +"all native frames." +msgstr "" + +#: ../../using/configure.rst:812 +msgid "" +"Disable the fast :ref:`mimalloc ` allocator (enabled by default)." +msgstr "" + +#: ../../using/configure.rst:815 +msgid "" +"This option cannot be used together with :option:`--disable-gil` because " +"the :term:`free-threaded ` build requires mimalloc." +msgstr "" + +#: ../../using/configure.rst:818 ../../using/configure.rst:825 +msgid "See also :envvar:`PYTHONMALLOC` environment variable." +msgstr "" + +#: ../../using/configure.rst:822 +msgid "" +"Disable the specialized Python memory allocator :ref:`pymalloc ` " +"(enabled by default)." +msgstr "" + +#: ../../using/configure.rst:829 +msgid "" +"Enable huge page support for :ref:`pymalloc ` arenas (disabled by " +"default). When enabled, the arena size on 64-bit platforms is increased to 2 " +"MiB and arena allocation uses ``MAP_HUGETLB`` (Linux) or ``MEM_LARGE_PAGES`` " +"(Windows) with automatic fallback to regular pages." +msgstr "" + +#: ../../using/configure.rst:834 +msgid "" +"Even when compiled with this option, huge pages are **not** used at runtime " +"unless the :envvar:`PYTHON_PYMALLOC_HUGEPAGES` environment variable is set " +"to ``1``. This opt-in is required because huge pages" +msgstr "" + +#: ../../using/configure.rst:838 +msgid "" +"carry risks on Linux: if the huge-page pool is exhausted, page faults " +"(including copy-on-write faults after :func:`os.fork`) deliver ``SIGBUS`` " +"and kill the process." +msgstr "" + +#: ../../using/configure.rst:842 +msgid "" +"need a special privilege on Windows. See the `Windows documentation for " +"large pages `_ for details. Python will fail on startup if the required " +"privilege `SeLockMemoryPrivilege `_ is not held by the user." +msgstr "" + +#: ../../using/configure.rst:849 +msgid "" +"The configure script checks that the platform supports ``MAP_HUGETLB`` and " +"emits a warning if it is not available." +msgstr "" + +#: ../../using/configure.rst:852 +msgid "" +"On Windows, use the ``--pymalloc-hugepages`` flag with ``build.bat`` or set " +"the ``UsePymallocHugepages`` MSBuild property." +msgstr "" + +#: ../../using/configure.rst:859 +msgid "" +"Disable static documentation strings to reduce the memory footprint (enabled " +"by default). Documentation strings defined in Python are not affected." +msgstr "" + +#: ../../using/configure.rst:862 +msgid "Don't define the ``WITH_DOC_STRINGS`` macro." +msgstr "" + +#: ../../using/configure.rst:864 +msgid "See the ``PyDoc_STRVAR()`` macro." +msgstr "" + +#: ../../using/configure.rst:868 +msgid "Enable C-level code profiling with ``gprof`` (disabled by default)." +msgstr "" + +#: ../../using/configure.rst:872 +msgid "" +"Add ``-fstrict-overflow`` to the C compiler flags (by default we add ``-fno-" +"strict-overflow`` instead)." +msgstr "" + +#: ../../using/configure.rst:877 +msgid "" +"Deactivate remote debugging support described in :pep:`768` (enabled by " +"default). When this flag is provided the code that allows the interpreter to " +"schedule the execution of a Python file in a separate process as described " +"in :pep:`768` is not compiled. This includes both the functionality to " +"schedule code to be executed and the functionality to receive code to be " +"executed." +msgstr "" + +#: ../../using/configure.rst:885 +msgid "" +"This macro is defined by default, unless Python is configured with :option:" +"`--without-remote-debug`." +msgstr "" + +#: ../../using/configure.rst:888 +msgid "" +"Note that even if the macro is defined, remote debugging may not be " +"available (for example, on an incompatible platform)." +msgstr "" + +#: ../../using/configure.rst:897 +msgid "Python Debug Build" +msgstr "" + +#: ../../using/configure.rst:899 +msgid "" +"A debug build is Python built with the :option:`--with-pydebug` configure " +"option." +msgstr "" + +#: ../../using/configure.rst:902 +msgid "Effects of a debug build:" +msgstr "" + +#: ../../using/configure.rst:904 +msgid "" +"Display all warnings by default: the list of default warning filters is " +"empty in the :mod:`warnings` module." +msgstr "" + +#: ../../using/configure.rst:906 +msgid "Add ``d`` to :data:`sys.abiflags`." +msgstr "" + +#: ../../using/configure.rst:907 +msgid "Add :func:`!sys.gettotalrefcount` function." +msgstr "" + +#: ../../using/configure.rst:908 +msgid "Add :option:`-X showrefcount <-X>` command line option." +msgstr "" + +#: ../../using/configure.rst:909 +msgid "" +"Add :option:`-d` command line option and :envvar:`PYTHONDEBUG` environment " +"variable to debug the parser." +msgstr "" + +#: ../../using/configure.rst:911 +msgid "" +"Add support for the ``__lltrace__`` variable: enable low-level tracing in " +"the bytecode evaluation loop if the variable is defined." +msgstr "" + +#: ../../using/configure.rst:913 +msgid "" +"Install :ref:`debug hooks on memory allocators ` " +"to detect buffer overflow and other memory errors." +msgstr "" + +#: ../../using/configure.rst:915 +msgid "Define ``Py_DEBUG`` and ``Py_REF_DEBUG`` macros." +msgstr "" + +#: ../../using/configure.rst:916 +msgid "" +"Add runtime checks: code surrounded by ``#ifdef Py_DEBUG`` and ``#endif``. " +"Enable ``assert(...)`` and ``_PyObject_ASSERT(...)`` assertions: don't set " +"the ``NDEBUG`` macro (see also the :option:`--with-assertions` configure " +"option). Main runtime checks:" +msgstr "" + +#: ../../using/configure.rst:921 +msgid "Add sanity checks on the function arguments." +msgstr "" + +#: ../../using/configure.rst:922 +msgid "" +"Unicode and int objects are created with their memory filled with a pattern " +"to detect usage of uninitialized objects." +msgstr "" + +#: ../../using/configure.rst:924 +msgid "" +"Ensure that functions which can clear or replace the current exception are " +"not called with an exception raised." +msgstr "" + +#: ../../using/configure.rst:926 +msgid "Check that deallocator functions don't change the current exception." +msgstr "" + +#: ../../using/configure.rst:927 +msgid "" +"The garbage collector (:func:`gc.collect` function) runs some basic checks " +"on objects consistency." +msgstr "" + +#: ../../using/configure.rst:929 +msgid "" +"The :c:macro:`!Py_SAFE_DOWNCAST()` macro checks for integer underflow and " +"overflow when downcasting from wide types to narrow types." +msgstr "" + +#: ../../using/configure.rst:932 +msgid "" +"See also the :ref:`Python Development Mode ` and the :option:`--" +"with-trace-refs` configure option." +msgstr "" + +#: ../../using/configure.rst:935 +msgid "" +"Release builds are now ABI compatible with debug builds: defining the " +"``Py_DEBUG`` macro no longer implies the ``Py_TRACE_REFS`` macro (see the :" +"option:`--with-trace-refs` option). However, debug builds still expose more " +"symbols than release builds and code built against a debug build is not " +"necessarily compatible with a release build." +msgstr "" + +#: ../../using/configure.rst:944 +msgid "Debug options" +msgstr "" + +#: ../../using/configure.rst:948 +msgid "" +":ref:`Build Python in debug mode `: define the ``Py_DEBUG`` " +"macro (disabled by default)." +msgstr "" + +#: ../../using/configure.rst:953 +msgid "Enable tracing references for debugging purpose (disabled by default)." +msgstr "" + +#: ../../using/configure.rst:957 +msgid "Define the ``Py_TRACE_REFS`` macro." +msgstr "" + +#: ../../using/configure.rst:958 +msgid "Add :func:`sys.getobjects` function." +msgstr "" + +#: ../../using/configure.rst:959 +msgid "Add :envvar:`PYTHONDUMPREFS` environment variable." +msgstr "" + +#: ../../using/configure.rst:961 +msgid "" +"The :envvar:`PYTHONDUMPREFS` environment variable can be used to dump " +"objects and reference counts still alive at Python exit." +msgstr "" + +#: ../../using/configure.rst:964 +msgid ":ref:`Statically allocated objects ` are not traced." +msgstr "" + +#: ../../using/configure.rst:968 +msgid "" +"This build is now ABI compatible with release build and :ref:`debug build " +"`." +msgstr "" + +#: ../../using/configure.rst:974 +msgid "" +"Build with C assertions enabled (default is no): ``assert(...);`` and " +"``_PyObject_ASSERT(...);``." +msgstr "" + +#: ../../using/configure.rst:977 +msgid "" +"If set, the ``NDEBUG`` macro is not defined in the :envvar:`OPT` compiler " +"variable." +msgstr "" + +#: ../../using/configure.rst:980 +msgid "" +"See also the :option:`--with-pydebug` option (:ref:`debug build `) which also enables assertions." +msgstr "" + +#: ../../using/configure.rst:987 +msgid "Enable Valgrind support (default is no)." +msgstr "" + +#: ../../using/configure.rst:991 +msgid "Enable DTrace support (default is no)." +msgstr "" + +#: ../../using/configure.rst:993 +msgid "" +"See :ref:`Instrumenting CPython with DTrace and SystemTap `." +msgstr "" + +#: ../../using/configure.rst:1000 +msgid "" +"Enable AddressSanitizer memory error detector, ``asan`` (default is no). To " +"improve ASan detection capabilities you may also want to combine this with :" +"option:`--without-pymalloc` to disable the specialized small-object " +"allocator whose allocations are not tracked by ASan." +msgstr "" + +#: ../../using/configure.rst:1009 +msgid "" +"Enable MemorySanitizer allocation error detector, ``msan`` (default is no)." +msgstr "" + +#: ../../using/configure.rst:1015 +msgid "" +"Enable UndefinedBehaviorSanitizer undefined behaviour detector, ``ubsan`` " +"(default is no)." +msgstr "" + +#: ../../using/configure.rst:1022 +msgid "Enable ThreadSanitizer data race detector, ``tsan`` (default is no)." +msgstr "" + +#: ../../using/configure.rst:1033 +msgid "Enable building a shared Python library: ``libpython`` (default is no)." +msgstr "" + +#: ../../using/configure.rst:1037 +msgid "" +"Do not build ``libpythonMAJOR.MINOR.a`` and do not install ``python.o`` " +"(built and enabled by default)." +msgstr "" + +#: ../../using/configure.rst:1044 +msgid "" +"Do not link the Python interpreter binary (``python3``) against the shared " +"Python library; instead, statically link the interpreter against " +"``libpython`` as if ``--enable-shared`` had not been used, but continue to " +"build the shared ``libpython`` (for use by other programs)." +msgstr "" + +#: ../../using/configure.rst:1050 +msgid "This option does nothing if ``--enable-shared`` is not used." +msgstr "" + +#: ../../using/configure.rst:1052 +msgid "" +"The default (when ``-enable-shared`` is used) is to link the Python " +"interpreter against the built shared library." +msgstr "" + +#: ../../using/configure.rst:1059 +msgid "Libraries options" +msgstr "" + +#: ../../using/configure.rst:1063 +msgid "Link against additional libraries (default is no)." +msgstr "" + +#: ../../using/configure.rst:1067 +msgid "" +"Build the :mod:`!pyexpat` module using an installed ``expat`` library " +"(default is no)." +msgstr "" + +#: ../../using/configure.rst:1072 +msgid "" +"Build the ``_decimal`` extension module using an installed ``mpdecimal`` " +"library, see the :mod:`decimal` module (default is yes)." +msgstr "" + +#: ../../using/configure.rst:1077 +msgid "Default to using the installed ``mpdecimal`` library." +msgstr "" + +#: ../../using/configure.rst:1082 +msgid "" +"A bundled copy of the library will no longer be selected implicitly if an " +"installed ``mpdecimal`` library is not found. In Python 3.15 only, it can " +"still be selected explicitly using ``--with-system-libmpdec=no`` or ``--" +"without-system-libmpdec``." +msgstr "" + +#: ../../using/configure.rst:1087 +msgid "" +"A copy of the ``mpdecimal`` library sources will no longer be distributed " +"with Python 3.16." +msgstr "" + +#: ../../using/configure.rst:1091 +msgid ":option:`LIBMPDEC_CFLAGS` and :option:`LIBMPDEC_LIBS`." +msgstr "" + +#: ../../using/configure.rst:1095 +msgid "Designate a backend library for the :mod:`readline` module." +msgstr "" + +#: ../../using/configure.rst:1097 +msgid "readline: Use readline as the backend." +msgstr "" + +#: ../../using/configure.rst:1098 +msgid "editline: Use editline as the backend." +msgstr "" + +#: ../../using/configure.rst:1104 +msgid "Don't build the :mod:`readline` module (built by default)." +msgstr "" + +#: ../../using/configure.rst:1106 +msgid "Don't define the ``HAVE_LIBREADLINE`` macro." +msgstr "" + +#: ../../using/configure.rst:1112 +msgid "" +"Override ``libm`` math library to *STRING* (default is system-dependent)." +msgstr "" + +#: ../../using/configure.rst:1116 +msgid "Override ``libc`` C library to *STRING* (default is system-dependent)." +msgstr "" + +#: ../../using/configure.rst:1120 +msgid "Root of the OpenSSL directory." +msgstr "" + +#: ../../using/configure.rst:1126 +msgid "Set runtime library directory (rpath) for OpenSSL libraries:" +msgstr "" + +#: ../../using/configure.rst:1128 +msgid "``no`` (default): don't set rpath;" +msgstr "" + +#: ../../using/configure.rst:1129 +msgid "" +"``auto``: auto-detect rpath from :option:`--with-openssl` and ``pkg-config``;" +msgstr "" + +#: ../../using/configure.rst:1131 +msgid "*DIR*: set an explicit rpath." +msgstr "" + +#: ../../using/configure.rst:1137 +msgid "Security Options" +msgstr "" + +#: ../../using/configure.rst:1141 +msgid "Select hash algorithm for use in ``Python/pyhash.c``:" +msgstr "" + +#: ../../using/configure.rst:1143 +msgid "``siphash13`` (default);" +msgstr "" + +#: ../../using/configure.rst:1144 +msgid "``siphash24``;" +msgstr "" + +#: ../../using/configure.rst:1145 +msgid "``fnv``." +msgstr "" + +#: ../../using/configure.rst:1149 +msgid "``siphash13`` is added and it is the new default." +msgstr "" + +#: ../../using/configure.rst:1154 +msgid "Built-in hash modules:" +msgstr "" + +#: ../../using/configure.rst:1156 +msgid "``md5``;" +msgstr "" + +#: ../../using/configure.rst:1157 +msgid "``sha1``;" +msgstr "" + +#: ../../using/configure.rst:1158 +msgid "``sha256``;" +msgstr "" + +#: ../../using/configure.rst:1159 +msgid "``sha512``;" +msgstr "" + +#: ../../using/configure.rst:1160 +msgid "``sha3`` (with shake);" +msgstr "" + +#: ../../using/configure.rst:1161 +msgid "``blake2``." +msgstr "" + +#: ../../using/configure.rst:1167 +msgid "Override the OpenSSL default cipher suites string:" +msgstr "" + +#: ../../using/configure.rst:1169 +msgid "``python`` (default): use Python's preferred selection;" +msgstr "" + +#: ../../using/configure.rst:1170 +msgid "``openssl``: leave OpenSSL's defaults untouched;" +msgstr "" + +#: ../../using/configure.rst:1171 +msgid "*STRING*: use a custom string" +msgstr "" + +#: ../../using/configure.rst:1173 +msgid "See the :mod:`ssl` module." +msgstr "" + +#: ../../using/configure.rst:1179 +msgid "" +"The settings ``python`` and *STRING* also set TLS 1.2 as minimum protocol " +"version." +msgstr "" + +#: ../../using/configure.rst:1184 +msgid "" +"Disable compiler options that are `recommended by OpenSSF`_ for security " +"reasons with no performance overhead. If this option is not enabled, CPython " +"will be built based on safety compiler options with no slow down. When this " +"option is enabled, CPython will not be built with the compiler options " +"listed below." +msgstr "" + +#: ../../using/configure.rst:1188 +msgid "" +"The following compiler options are disabled with :option:`!--disable-safety`:" +msgstr "" + +#: ../../using/configure.rst:1190 +msgid "" +"`-fstack-protector-strong`_: Enable run-time checks for stack-based buffer " +"overflows." +msgstr "" + +#: ../../using/configure.rst:1191 +msgid "" +"`-Wtrampolines`_: Enable warnings about trampolines that require executable " +"stacks." +msgstr "" + +#: ../../using/configure.rst:1201 +msgid "" +"Enable compiler options that are `recommended by OpenSSF`_ for security " +"reasons which require overhead. If this option is not enabled, CPython will " +"not be built based on safety compiler options which performance impact. When " +"this option is enabled, CPython will be built with the compiler options " +"listed below." +msgstr "" + +#: ../../using/configure.rst:1205 +msgid "" +"The following compiler options are enabled with :option:`!--enable-slower-" +"safety`:" +msgstr "" + +#: ../../using/configure.rst:1207 +msgid "" +"`-D_FORTIFY_SOURCE=3`_: Fortify sources with compile- and run-time checks " +"for unsafe libc usage and buffer overflows." +msgstr "" + +#: ../../using/configure.rst:1215 +msgid "macOS Options" +msgstr "" + +#: ../../using/configure.rst:1217 +msgid "See :source:`Mac/README.rst`." +msgstr "" + +#: ../../using/configure.rst:1222 +msgid "" +"Create a universal binary build. *SDKDIR* specifies which macOS SDK should " +"be used to perform the build (default is no)." +msgstr "" + +#: ../../using/configure.rst:1228 +msgid "" +"Create a Python.framework rather than a traditional Unix install. Optional " +"*INSTALLDIR* specifies the installation path (default is no)." +msgstr "" + +#: ../../using/configure.rst:1233 +msgid "" +"Specify the kind of universal binary that should be created. This option is " +"only valid when :option:`--enable-universalsdk` is set." +msgstr "" + +#: ../../using/configure.rst:1236 +msgid "Options:" +msgstr "" + +#: ../../using/configure.rst:1238 +msgid "``universal2`` (x86-64 and arm64);" +msgstr "" + +#: ../../using/configure.rst:1239 +msgid "``32-bit`` (PPC and i386);" +msgstr "" + +#: ../../using/configure.rst:1240 +msgid "``64-bit`` (PPC64 and x86-64);" +msgstr "" + +#: ../../using/configure.rst:1241 +msgid "``3-way`` (i386, PPC and x86-64);" +msgstr "" + +#: ../../using/configure.rst:1242 +msgid "``intel`` (i386 and x86-64);" +msgstr "" + +#: ../../using/configure.rst:1243 +msgid "``intel-32`` (i386);" +msgstr "" + +#: ../../using/configure.rst:1244 +msgid "``intel-64`` (x86-64);" +msgstr "" + +#: ../../using/configure.rst:1245 +msgid "``all`` (PPC, i386, PPC64 and x86-64)." +msgstr "" + +#: ../../using/configure.rst:1247 +msgid "" +"Note that values for this configuration item are *not* the same as the " +"identifiers used for universal binary wheels on macOS. See the Python " +"Packaging User Guide for details on the `packaging platform compatibility " +"tags used on macOS `_" +msgstr "" + +#: ../../using/configure.rst:1255 +msgid "" +"Specify the name for the python framework on macOS only valid when :option:" +"`--enable-framework` is set (default: ``Python``)." +msgstr "" + +#: ../../using/configure.rst:1261 +msgid "" +"The Python standard library contains strings that are known to trigger " +"automated inspection tool errors when submitted for distribution by the " +"macOS and iOS App Stores. If enabled, this option will apply the list of " +"patches that are known to correct app store compliance. A custom patch file " +"can also be specified. This option is disabled by default." +msgstr "" + +#: ../../using/configure.rst:1270 +msgid "iOS Options" +msgstr "" + +#: ../../using/configure.rst:1272 +msgid "See :source:`Platforms/Apple/iOS/README.md`." +msgstr "" + +#: ../../using/configure.rst:1276 +msgid "" +"Create a Python.framework. Unlike macOS, the *INSTALLDIR* argument " +"specifying the installation path is mandatory." +msgstr "" + +#: ../../using/configure.rst:1281 +msgid "Specify the name for the framework (default: ``Python``)." +msgstr "" + +#: ../../using/configure.rst:1285 +msgid "Cross Compiling Options" +msgstr "" + +#: ../../using/configure.rst:1287 +msgid "" +"Cross compiling, also known as cross building, can be used to build Python " +"for another CPU architecture or platform. Cross compiling requires a Python " +"interpreter for the build platform. The version of the build Python must " +"match the version of the cross compiled host Python." +msgstr "" + +#: ../../using/configure.rst:1294 +msgid "" +"configure for building on BUILD, usually guessed by :program:`config.guess`." +msgstr "" + +#: ../../using/configure.rst:1298 +msgid "cross-compile to build programs to run on HOST (target platform)" +msgstr "" + +#: ../../using/configure.rst:1302 +msgid "path to build ``python`` binary for cross compiling" +msgstr "" + +#: ../../using/configure.rst:1308 +msgid "An environment variable that points to a file with configure overrides." +msgstr "" + +#: ../../using/configure.rst:1310 +msgid "Example *config.site* file:" +msgstr "" + +#: ../../using/configure.rst:1312 +msgid "" +"# config.site-aarch64\n" +"ac_cv_buggy_getaddrinfo=no\n" +"ac_cv_file__dev_ptmx=yes\n" +"ac_cv_file__dev_ptc=no" +msgstr "" + +#: ../../using/configure.rst:1321 +msgid "Program to run CPython for the host platform for cross-compilation." +msgstr "" + +#: ../../using/configure.rst:1326 +msgid "Cross compiling example::" +msgstr "" + +#: ../../using/configure.rst:1328 +msgid "" +"CONFIG_SITE=config.site-aarch64 ../configure \\\n" +" --build=x86_64-pc-linux-gnu \\\n" +" --host=aarch64-unknown-linux-gnu \\\n" +" --with-build-python=../x86_64/python" +msgstr "" + +#: ../../using/configure.rst:1335 +msgid "Python Build System" +msgstr "" + +#: ../../using/configure.rst:1338 +msgid "Main files of the build system" +msgstr "" + +#: ../../using/configure.rst:1340 +msgid ":file:`configure.ac` => :file:`configure`;" +msgstr "" + +#: ../../using/configure.rst:1341 +msgid "" +":file:`Makefile.pre.in` => :file:`Makefile` (created by :file:`configure`);" +msgstr "" + +#: ../../using/configure.rst:1342 +msgid ":file:`pyconfig.h` (created by :file:`configure`);" +msgstr "" + +#: ../../using/configure.rst:1343 +msgid "" +":file:`Modules/Setup`: C extensions built by the Makefile using :file:" +"`Module/makesetup` shell script;" +msgstr "" + +#: ../../using/configure.rst:1347 +msgid "Main build steps" +msgstr "" + +#: ../../using/configure.rst:1349 +msgid "C files (``.c``) are built as object files (``.o``)." +msgstr "" + +#: ../../using/configure.rst:1350 +msgid "A static ``libpython`` library (``.a``) is created from objects files." +msgstr "" + +#: ../../using/configure.rst:1351 +msgid "" +"``python.o`` and the static ``libpython`` library are linked into the final " +"``python`` program." +msgstr "" + +#: ../../using/configure.rst:1353 +msgid "C extensions are built by the Makefile (see :file:`Modules/Setup`)." +msgstr "" + +#: ../../using/configure.rst:1356 +msgid "Main Makefile targets" +msgstr "" + +#: ../../using/configure.rst:1359 +msgid "make" +msgstr "" + +#: ../../using/configure.rst:1361 +msgid "" +"For the most part, when rebuilding after editing some code or refreshing " +"your checkout from upstream, all you need to do is execute ``make``, which " +"(per Make's semantics) builds the default target, the first one defined in " +"the Makefile. By tradition (including in the CPython project) this is " +"usually the ``all`` target. The ``configure`` script expands an ``autoconf`` " +"variable, ``@DEF_MAKE_ALL_RULE@`` to describe precisely which targets ``make " +"all`` will build. The three choices are:" +msgstr "" + +#: ../../using/configure.rst:1370 +msgid "``profile-opt`` (configured with ``--enable-optimizations``)" +msgstr "" + +#: ../../using/configure.rst:1371 +msgid "" +"``build_wasm`` (chosen if the host platform matches ``wasm32-wasi*`` or " +"``wasm32-emscripten``)" +msgstr "" + +#: ../../using/configure.rst:1373 +msgid "" +"``build_all`` (configured without explicitly using either of the others)" +msgstr "" + +#: ../../using/configure.rst:1375 +msgid "" +"Depending on the most recent source file changes, Make will rebuild any " +"targets (object files and executables) deemed out-of-date, including running " +"``configure`` again if necessary. Source/target dependencies are many and " +"maintained manually however, so Make sometimes doesn't have all the " +"information necessary to correctly detect all targets which need to be " +"rebuilt. Depending on which targets aren't rebuilt, you might experience a " +"number of problems. If you have build or test problems which you can't " +"otherwise explain, ``make clean && make`` should work around most dependency " +"problems, at the expense of longer build times." +msgstr "" + +#: ../../using/configure.rst:1388 +msgid "make platform" +msgstr "" + +#: ../../using/configure.rst:1390 +msgid "" +"Build the ``python`` program, but don't build the standard library extension " +"modules. This generates a file named ``platform`` which contains a single " +"line describing the details of the build platform, e.g., ``macosx-14.3-" +"arm64-3.12`` or ``linux-x86_64-3.13``." +msgstr "" + +#: ../../using/configure.rst:1397 +msgid "make profile-opt" +msgstr "" + +#: ../../using/configure.rst:1399 +msgid "" +"Build Python using profile-guided optimization (PGO). You can use the " +"configure :option:`--enable-optimizations` option to make this the default " +"target of the ``make`` command (``make all`` or just ``make``)." +msgstr "" + +#: ../../using/configure.rst:1407 +msgid "make clean" +msgstr "" + +#: ../../using/configure.rst:1409 +msgid "Remove built files." +msgstr "" + +#: ../../using/configure.rst:1413 +msgid "make distclean" +msgstr "" + +#: ../../using/configure.rst:1415 +msgid "" +"In addition to the work done by ``make clean``, remove files created by the " +"configure script. ``configure`` will have to be run before building again. " +"[#]_" +msgstr "" + +#: ../../using/configure.rst:1421 +msgid "make install" +msgstr "" + +#: ../../using/configure.rst:1423 +msgid "Build the ``all`` target and install Python." +msgstr "" + +#: ../../using/configure.rst:1427 +msgid "make test" +msgstr "" + +#: ../../using/configure.rst:1429 +msgid "" +"Build the ``all`` target and run the Python test suite with the ``--fast-" +"ci`` option without GUI tests. Variables:" +msgstr "" + +#: ../../using/configure.rst:1432 +msgid "``TESTOPTS``: additional regrtest command-line options." +msgstr "" + +#: ../../using/configure.rst:1433 +msgid "``TESTPYTHONOPTS``: additional Python command-line options." +msgstr "" + +#: ../../using/configure.rst:1434 +msgid "``TESTTIMEOUT``: timeout in seconds (default: 10 minutes)." +msgstr "" + +#: ../../using/configure.rst:1438 +msgid "make ci" +msgstr "" + +#: ../../using/configure.rst:1440 +msgid "" +"This is similar to ``make test``, but uses the ``-ugui`` to also run GUI " +"tests." +msgstr "" + +#: ../../using/configure.rst:1446 +msgid "make buildbottest" +msgstr "" + +#: ../../using/configure.rst:1448 +msgid "" +"This is similar to ``make test``, but uses the ``--slow-ci`` option and " +"default timeout of 20 minutes, instead of ``--fast-ci`` option." +msgstr "" + +#: ../../using/configure.rst:1453 +msgid "make regen-all" +msgstr "" + +#: ../../using/configure.rst:1455 +msgid "" +"Regenerate (almost) all generated files. These include (but are not limited " +"to) bytecode cases, and parser generator file. ``make regen-stdlib-module-" +"names`` and ``autoconf`` must be run separately for the remaining `generated " +"files <#generated-files>`_." +msgstr "" + +#: ../../using/configure.rst:1462 +msgid "C extensions" +msgstr "" + +#: ../../using/configure.rst:1464 +msgid "" +"Some C extensions are built as built-in modules, like the ``sys`` module. " +"They are built with the ``Py_BUILD_CORE_BUILTIN`` macro defined. Built-in " +"modules have no ``__file__`` attribute:" +msgstr "" + +#: ../../using/configure.rst:1468 +msgid "" +">>> import sys\n" +">>> sys\n" +"\n" +">>> sys.__file__\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"AttributeError: module 'sys' has no attribute '__file__'" +msgstr "" + +#: ../../using/configure.rst:1478 +msgid "" +"Other C extensions are built as dynamic libraries, like the ``_asyncio`` " +"module. They are built with the ``Py_BUILD_CORE_MODULE`` macro defined. " +"Example on Linux x86-64:" +msgstr "" + +#: ../../using/configure.rst:1482 +msgid "" +">>> import _asyncio\n" +">>> _asyncio\n" +"\n" +">>> _asyncio.__file__\n" +"'/usr/lib64/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so'" +msgstr "" + +#: ../../using/configure.rst:1490 +msgid "" +":file:`Modules/Setup` is used to generate Makefile targets to build C " +"extensions. At the beginning of the files, C extensions are built as built-" +"in modules. Extensions defined after the ``*shared*`` marker are built as " +"dynamic libraries." +msgstr "" + +#: ../../using/configure.rst:1494 +msgid "" +"The :c:macro:`!PyAPI_FUNC()`, :c:macro:`!PyAPI_DATA()` and :c:macro:" +"`PyMODINIT_FUNC` macros of :file:`Include/exports.h` are defined differently " +"depending if the ``Py_BUILD_CORE_MODULE`` macro is defined:" +msgstr "" + +#: ../../using/configure.rst:1498 +msgid "Use ``Py_EXPORTED_SYMBOL`` if the ``Py_BUILD_CORE_MODULE`` is defined" +msgstr "" + +#: ../../using/configure.rst:1499 +msgid "Use ``Py_IMPORTED_SYMBOL`` otherwise." +msgstr "" + +#: ../../using/configure.rst:1501 +msgid "" +"If the ``Py_BUILD_CORE_BUILTIN`` macro is used by mistake on a C extension " +"built as a shared library, its :samp:`PyInit_{xxx}()` function is not " +"exported, causing an :exc:`ImportError` on import." +msgstr "" + +#: ../../using/configure.rst:1507 +msgid "Compiler and linker flags" +msgstr "" + +#: ../../using/configure.rst:1509 +msgid "" +"Options set by the ``./configure`` script and environment variables and used " +"by ``Makefile``." +msgstr "" + +#: ../../using/configure.rst:1513 +msgid "Preprocessor flags" +msgstr "" + +#: ../../using/configure.rst:1517 +msgid "" +"Value of :envvar:`CPPFLAGS` variable passed to the ``./configure`` script." +msgstr "" + +#: ../../using/configure.rst:1523 +msgid "" +"(Objective) C/C++ preprocessor flags, e.g. :samp:`-I{include_dir}` if you " +"have headers in a nonstandard directory *include_dir*." +msgstr "" + +#: ../../using/configure.rst:1526 ../../using/configure.rst:1722 +msgid "" +"Both :envvar:`CPPFLAGS` and :envvar:`LDFLAGS` need to contain the shell's " +"value to be able to build extension modules using the directories specified " +"in the environment variables." +msgstr "" + +#: ../../using/configure.rst:1536 +msgid "" +"Extra preprocessor flags added for building the interpreter object files." +msgstr "" + +#: ../../using/configure.rst:1538 +msgid "" +"Default: ``$(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) " +"$(CPPFLAGS)``." +msgstr "" + +#: ../../using/configure.rst:1543 +msgid "Compiler flags" +msgstr "" + +#: ../../using/configure.rst:1549 +msgid "Example: ``gcc -pthread``." +msgstr "" + +#: ../../using/configure.rst:1553 +msgid "C++ compiler command." +msgstr "" + +#: ../../using/configure.rst:1555 +msgid "Example: ``g++ -pthread``." +msgstr "" + +#: ../../using/configure.rst:1563 +msgid "" +":envvar:`CFLAGS_NODIST` is used for building the interpreter and stdlib C " +"extensions. Use it when a compiler flag should *not* be part of :envvar:" +"`CFLAGS` once Python is installed (:gh:`65320`)." +msgstr "" + +#: ../../using/configure.rst:1567 +msgid "In particular, :envvar:`CFLAGS` should not contain:" +msgstr "" + +#: ../../using/configure.rst:1569 +msgid "" +"the compiler flag ``-I`` (for setting the search path for include files). " +"The ``-I`` flags are processed from left to right, and any flags in :envvar:" +"`CFLAGS` would take precedence over user- and package-supplied ``-I`` flags." +msgstr "" + +#: ../../using/configure.rst:1574 +msgid "" +"hardening flags such as ``-Werror`` because distributions cannot control " +"whether packages installed by users conform to such heightened standards." +msgstr "" + +#: ../../using/configure.rst:1582 +msgid "" +"Options passed to the :mod:`compileall` command line when building PYC files " +"in ``make install``. Default: ``-j0``." +msgstr "" + +#: ../../using/configure.rst:1589 +msgid "Extra C compiler flags." +msgstr "" + +#: ../../using/configure.rst:1593 +msgid "" +"Value of :envvar:`CFLAGS` variable passed to the ``./configure`` script." +msgstr "" + +#: ../../using/configure.rst:1600 +msgid "" +"Value of :envvar:`CFLAGS_NODIST` variable passed to the ``./configure`` " +"script." +msgstr "" + +#: ../../using/configure.rst:1607 +msgid "Base compiler flags." +msgstr "" + +#: ../../using/configure.rst:1611 +msgid "Optimization flags." +msgstr "" + +#: ../../using/configure.rst:1615 +msgid "Strict or non-strict aliasing flags used to compile ``Python/dtoa.c``." +msgstr "" + +#: ../../using/configure.rst:1621 +msgid "Flags used to compile ``Python/ceval.c``." +msgstr "" + +#: ../../using/configure.rst:1627 +msgid "Compiler flags used to build a shared library." +msgstr "" + +#: ../../using/configure.rst:1629 +msgid "For example, ``-fPIC`` is used on Linux and on BSD." +msgstr "" + +#: ../../using/configure.rst:1633 +msgid "Extra C flags added for building the interpreter object files." +msgstr "" + +#: ../../using/configure.rst:1635 +msgid "" +"Default: ``$(CCSHARED)`` when :option:`--enable-shared` is used, or an empty " +"string otherwise." +msgstr "" + +#: ../../using/configure.rst:1640 +msgid "" +"Default: ``$(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) " +"$(EXTRA_CFLAGS)``." +msgstr "" + +#: ../../using/configure.rst:1644 +msgid "" +"Default: ``$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/" +"internal``." +msgstr "" + +#: ../../using/configure.rst:1650 +msgid "C flags used for building the interpreter object files." +msgstr "" + +#: ../../using/configure.rst:1652 +msgid "" +"Default: ``$(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) " +"$(CFLAGSFORSHARED)``." +msgstr "" + +#: ../../using/configure.rst:1658 +msgid "Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE``." +msgstr "" + +#: ../../using/configure.rst:1664 +msgid "" +"Compiler flags to build a standard library extension module as a built-in " +"module, like the :mod:`posix` module." +msgstr "" + +#: ../../using/configure.rst:1667 +msgid "Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN``." +msgstr "" + +#: ../../using/configure.rst:1673 +msgid "Purify command. Purify is a memory debugger program." +msgstr "" + +#: ../../using/configure.rst:1675 +msgid "Default: empty string (not used)." +msgstr "" + +#: ../../using/configure.rst:1679 +msgid "Linker flags" +msgstr "" + +#: ../../using/configure.rst:1683 +msgid "" +"Linker command used to build programs like ``python`` and ``_testembed``." +msgstr "" + +#: ../../using/configure.rst:1685 +msgid "Default: ``$(PURIFY) $(CC)``." +msgstr "" + +#: ../../using/configure.rst:1689 +msgid "" +"Value of :envvar:`LDFLAGS` variable passed to the ``./configure`` script." +msgstr "" + +#: ../../using/configure.rst:1691 +msgid "" +"Avoid assigning :envvar:`CFLAGS`, :envvar:`LDFLAGS`, etc. so users can use " +"them on the command line to append to these values without stomping the pre-" +"set values." +msgstr "" + +#: ../../using/configure.rst:1699 +msgid "" +":envvar:`LDFLAGS_NODIST` is used in the same manner as :envvar:" +"`CFLAGS_NODIST`. Use it when a linker flag should *not* be part of :envvar:" +"`LDFLAGS` once Python is installed (:gh:`65320`)." +msgstr "" + +#: ../../using/configure.rst:1703 +msgid "In particular, :envvar:`LDFLAGS` should not contain:" +msgstr "" + +#: ../../using/configure.rst:1705 +msgid "" +"the compiler flag ``-L`` (for setting the search path for libraries). The ``-" +"L`` flags are processed from left to right, and any flags in :envvar:" +"`LDFLAGS` would take precedence over user- and package-supplied ``-L`` flags." +msgstr "" + +#: ../../using/configure.rst:1712 +msgid "" +"Value of :envvar:`LDFLAGS_NODIST` variable passed to the ``./configure`` " +"script." +msgstr "" + +#: ../../using/configure.rst:1719 +msgid "" +"Linker flags, e.g. :samp:`-L{lib_dir}` if you have libraries in a " +"nonstandard directory *lib_dir*." +msgstr "" + +#: ../../using/configure.rst:1726 +msgid "" +"Please consider using ``EXE_LDFLAGS`` if the supplied linker flags are " +"executable specific, e.g. GCC's ``-pie`` flag." +msgstr "" + +#: ../../using/configure.rst:1731 +msgid "" +"Linker flags to pass libraries to the linker when linking the Python " +"executable." +msgstr "" + +#: ../../using/configure.rst:1734 +msgid "Example: ``-lrt``." +msgstr "" + +#: ../../using/configure.rst:1738 +msgid "Command to build a shared library." +msgstr "" + +#: ../../using/configure.rst:1740 +msgid "Default: ``@LDSHARED@ $(PY_LDFLAGS)``." +msgstr "" + +#: ../../using/configure.rst:1744 +msgid "Command to build ``libpython`` shared library." +msgstr "" + +#: ../../using/configure.rst:1746 +msgid "Default: ``@BLDSHARED@ $(PY_CORE_LDFLAGS)``." +msgstr "" + +#: ../../using/configure.rst:1750 +msgid "Default: ``$(CONFIGURE_LDFLAGS) $(LDFLAGS)``." +msgstr "" + +#: ../../using/configure.rst:1754 +msgid "Default: ``$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)``." +msgstr "" + +#: ../../using/configure.rst:1760 +msgid "Linker flags used for building the interpreter object files." +msgstr "" + +#: ../../using/configure.rst:1766 +msgid "" +"Linker flags used for building executable targets such as the interpreter. " +"If supplied, :envvar:`PY_CORE_EXE_LDFLAGS` will be used in replacement of :" +"envvar:`PY_CORE_LDFLAGS`." +msgstr "" + +#: ../../using/configure.rst:1774 +msgid "" +"Value of :envvar:`EXE_LDFLAGS` variable passed to the ``./configure`` script." +msgstr "" + +#: ../../using/configure.rst:1781 +msgid "Linker flags used for building the interpreter and executable targets." +msgstr "" + +#: ../../using/configure.rst:1784 +msgid "Default: ``$(PY_CORE_LDFLAGS)``" +msgstr "" + +#: ../../using/configure.rst:1790 +msgid "Footnotes" +msgstr "Fußnoten" + +#: ../../using/configure.rst:1791 +msgid "" +"``git clean -fdx`` is an even more extreme way to \"clean\" your checkout. " +"It removes all files not known to Git. When bug hunting using ``git " +"bisect``, this is `recommended between probes `_ to guarantee a completely " +"clean build. **Use with care**, as it will delete all files not checked into " +"Git, including your new, uncommitted work." +msgstr "" diff --git a/using/windows.po b/using/windows.po index 0d355459..79c3fd4c 100644 --- a/using/windows.po +++ b/using/windows.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -608,8 +608,8 @@ msgid "Environment Variable" msgstr "" #: ../../using/windows.rst:419 ../../using/windows.rst:755 -#: ../../using/windows.rst:1596 ../../using/windows.rst:1616 -#: ../../using/windows.rst:2206 +#: ../../using/windows.rst:1627 ../../using/windows.rst:1647 +#: ../../using/windows.rst:2237 msgid "Description" msgstr "Beschreibung" @@ -813,7 +813,7 @@ msgid "" "format`` would be specified as ``{\"list\": {\"format\": \"table\"}}``." msgstr "" -#: ../../using/windows.rst:523 ../../using/windows.rst:1962 +#: ../../using/windows.rst:523 ../../using/windows.rst:1993 msgid "Shebang lines" msgstr "" @@ -853,15 +853,15 @@ msgstr "" msgid "````" msgstr "" -#: ../../using/windows.rst:541 ../../using/windows.rst:1980 +#: ../../using/windows.rst:541 ../../using/windows.rst:2011 msgid "For example, if the first line of your script starts with" msgstr "" -#: ../../using/windows.rst:543 ../../using/windows.rst:1982 +#: ../../using/windows.rst:543 ../../using/windows.rst:2013 msgid "#! /usr/bin/python" msgstr "" -#: ../../using/windows.rst:547 ../../using/windows.rst:1986 +#: ../../using/windows.rst:547 ../../using/windows.rst:2017 msgid "" "The default Python or an active virtual environment will be located and " "used. As many Python scripts written to work on Unix will already have this " @@ -1276,7 +1276,7 @@ msgid "" "currently only for :ref:`index signatures `." msgstr "" -#: ../../using/windows.rst:824 ../../using/windows.rst:1775 +#: ../../using/windows.rst:824 ../../using/windows.rst:1806 msgid "Installing free-threaded binaries" msgstr "" @@ -1426,12 +1426,62 @@ msgid "" "}" msgstr "" -#: ../../using/windows.rst:940 ../../using/windows.rst:952 -msgid "Troubleshooting" +#: ../../using/windows.rst:938 +msgid "Proxy settings" msgstr "" #: ../../using/windows.rst:942 msgid "" +"By default, the Python install manager will use your system-wide proxy " +"settings, including automatic authentication. For most users, this behaves " +"the same as your browser and other applications." +msgstr "" + +#: ../../using/windows.rst:946 +msgid "" +"To override the settings, use the ``NO_PROXY``, ``HTTP_PROXY`` and " +"``HTTPS_PROXY`` environment variables. These should be set in the terminal " +"session before using the Python install manager. Other applications may also " +"use the variables, so use caution before setting them globally for your " +"entire machine." +msgstr "" + +#: ../../using/windows.rst:952 +msgid "" +"Setting ``NO_PROXY`` to any non-empty value will disable the use of any " +"proxy. Use this to bypass your system's default proxy setting and attempt to " +"access the index server directly." +msgstr "" + +#: ../../using/windows.rst:956 +msgid "" +"Setting ``HTTPS_PROXY`` to a string like ``example.com:8080`` will connect " +"to that proxy server for all HTTPS connections. For the default index, all " +"connections will be using HTTPS, and so this is the usual setting to " +"override." +msgstr "" + +#: ../../using/windows.rst:960 +msgid "" +"The ``HTTP_PROXY`` variable may be needed if you are using a private index " +"server that does not use encrypted connections, but does require the default " +"proxy server to be overridden. It follows the same format as ``HTTPS_PROXY``." +msgstr "" + +#: ../../using/windows.rst:964 +msgid "" +"Credentials may be embedded in either setting, however, when ``HTTPS_PROXY`` " +"has credentials embedded they will be used in preference to other " +"credentials. Only one set of credentials will be used for both types of " +"proxy." +msgstr "" + +#: ../../using/windows.rst:971 ../../using/windows.rst:983 +msgid "Troubleshooting" +msgstr "" + +#: ../../using/windows.rst:973 +msgid "" "If your Python install manager does not seem to be working correctly, please " "work through these tests and fixes to see if it helps. If not, please report " "an issue at `our bug tracker `_, " @@ -1439,25 +1489,25 @@ msgid "" "by default)." msgstr "" -#: ../../using/windows.rst:956 +#: ../../using/windows.rst:987 msgid "Symptom" msgstr "" -#: ../../using/windows.rst:957 +#: ../../using/windows.rst:988 msgid "Things to try" msgstr "" -#: ../../using/windows.rst:959 +#: ../../using/windows.rst:990 msgid "" "``python`` gives me a \"command not found\" error or opens the Store app " "when I type it in my terminal." msgstr "" -#: ../../using/windows.rst:961 ../../using/windows.rst:980 +#: ../../using/windows.rst:992 ../../using/windows.rst:1011 msgid "Did you :ref:`install the Python install manager `?" msgstr "" -#: ../../using/windows.rst:964 ../../using/windows.rst:983 +#: ../../using/windows.rst:995 ../../using/windows.rst:1014 msgid "" "Click Start, open \"Manage app execution aliases\", and check that the " "aliases for \"Python (default)\" are enabled. If they already are, try " @@ -1465,11 +1515,11 @@ msgid "" "windowed)\" and \"Python install manager\" commands may also need refreshing." msgstr "" -#: ../../using/windows.rst:971 +#: ../../using/windows.rst:1002 msgid "Check that the ``py`` and ``pymanager`` commands work." msgstr "" -#: ../../using/windows.rst:974 ../../using/windows.rst:990 +#: ../../using/windows.rst:1005 ../../using/windows.rst:1021 msgid "" "Ensure your :envvar:`PATH` variable contains the entry for ``%UserProfile%" "\\AppData\\Local\\Microsoft\\WindowsApps``. The operating system includes " @@ -1477,59 +1527,59 @@ msgid "" "will not be found." msgstr "" -#: ../../using/windows.rst:979 +#: ../../using/windows.rst:1010 msgid "" "``py`` gives me a \"command not found\" error when I type it in my terminal." msgstr "" -#: ../../using/windows.rst:995 +#: ../../using/windows.rst:1026 msgid "" "``py`` gives me a \"can't open file\" error when I type commands in my " "terminal." msgstr "" -#: ../../using/windows.rst:997 +#: ../../using/windows.rst:1028 msgid "" "This usually means you have the legacy launcher installed and it has " "priority over the Python install manager. To remove, click Start, open " "\"Installed apps\", search for \"Python launcher\" and uninstall it." msgstr "" -#: ../../using/windows.rst:1002 +#: ../../using/windows.rst:1033 msgid "``python`` doesn't launch the same runtime as ``py``" msgstr "" -#: ../../using/windows.rst:1003 +#: ../../using/windows.rst:1034 msgid "" "Click Start, open \"Installed apps\", look for any existing Python runtimes, " "and either remove them or Modify and disable the :envvar:`PATH` options." msgstr "" -#: ../../using/windows.rst:1007 +#: ../../using/windows.rst:1038 msgid "" "Click Start, open \"Manage app execution aliases\", and check that your " "``python.exe`` alias is set to \"Python (default)\"" msgstr "" -#: ../../using/windows.rst:1010 +#: ../../using/windows.rst:1041 msgid "``python`` and ``py`` don't launch the runtime I expect" msgstr "" -#: ../../using/windows.rst:1011 +#: ../../using/windows.rst:1042 msgid "" "Check your :envvar:`PYTHON_MANAGER_DEFAULT` environment variable or " "``default_tag`` configuration. The ``py list`` command will show your " "default based on these settings." msgstr "" -#: ../../using/windows.rst:1016 +#: ../../using/windows.rst:1047 msgid "" "Installs that are managed by the Python install manager will be chosen ahead " "of unmanaged installs. Use ``py install`` to install the runtime you expect, " "or configure your default tag." msgstr "" -#: ../../using/windows.rst:1022 +#: ../../using/windows.rst:1053 msgid "" "Prerelease and experimental installs that are not managed by the Python " "install manager may be chosen ahead of stable releases. Configure your " @@ -1537,29 +1587,29 @@ msgid "" "install``." msgstr "" -#: ../../using/windows.rst:1027 +#: ../../using/windows.rst:1058 msgid "" "``pythonw`` or ``pyw`` don't launch the same runtime as ``python`` or ``py``" msgstr "" -#: ../../using/windows.rst:1028 +#: ../../using/windows.rst:1059 msgid "" "Click Start, open \"Manage app execution aliases\", and check that your " "``pythonw.exe`` and ``pyw.exe`` aliases are consistent with your others." msgstr "" -#: ../../using/windows.rst:1031 +#: ../../using/windows.rst:1062 msgid "" "``pip`` gives me a \"command not found\" error when I type it in my terminal." msgstr "" -#: ../../using/windows.rst:1032 ../../using/windows.rst:1044 +#: ../../using/windows.rst:1063 ../../using/windows.rst:1075 msgid "" "Have you activated a virtual environment? Run the ``." "venv\\Scripts\\activate`` script in your terminal to activate." msgstr "" -#: ../../using/windows.rst:1036 +#: ../../using/windows.rst:1067 msgid "" "The package may be available but missing the generated executable. We " "recommend using the ``python -m pip`` command instead. Running ``py install " @@ -1568,11 +1618,11 @@ msgid "" "commands such as ``pip`` (and other installed packages) available." msgstr "" -#: ../../using/windows.rst:1043 +#: ../../using/windows.rst:1074 msgid "I installed a package with ``pip`` but its command is not found." msgstr "" -#: ../../using/windows.rst:1048 +#: ../../using/windows.rst:1079 msgid "" "New packages do not automatically have global shortcuts created by the " "Python install manager. Similarly, uninstalled packages do not have their " @@ -1580,11 +1630,11 @@ msgid "" "shortcuts for newly installed packages." msgstr "" -#: ../../using/windows.rst:1054 +#: ../../using/windows.rst:1085 msgid "Typing ``script-name.py`` in the terminal opens in a new window." msgstr "" -#: ../../using/windows.rst:1055 +#: ../../using/windows.rst:1086 msgid "" "This is a known limitation of the operating system. Either specify ``py`` " "before the script name, create a batch file containing ``@py \"%~dpn0.py\" " @@ -1592,68 +1642,68 @@ msgid "" "select it as the association for scripts." msgstr "" -#: ../../using/windows.rst:1060 +#: ../../using/windows.rst:1091 msgid "Drag-dropping files onto a script doesn't work" msgstr "" -#: ../../using/windows.rst:1061 +#: ../../using/windows.rst:1092 msgid "" "This is a known limitation of the operating system. It is supported with the " "`legacy launcher`_, or with the Python install manager when installed from " "the MSI." msgstr "" -#: ../../using/windows.rst:1065 +#: ../../using/windows.rst:1096 msgid "I have installed the Python install manager multiple times." msgstr "" -#: ../../using/windows.rst:1066 +#: ../../using/windows.rst:1097 msgid "" "It is possible to install from the Store or WinGet, from the MSIX on the " "Python website, and from the MSI, all at once. They are all compatible and " "will share configuration and runtimes." msgstr "" -#: ../../using/windows.rst:1071 +#: ../../using/windows.rst:1102 msgid "" "See the earlier :ref:`pymanager-advancedinstall` section for ways to " "uninstall the install manager other than the typical Installed Apps (Add and " "Remove Programs) settings page." msgstr "" -#: ../../using/windows.rst:1075 +#: ../../using/windows.rst:1106 msgid "My old ``py.ini`` settings no longer work." msgstr "" -#: ../../using/windows.rst:1076 +#: ../../using/windows.rst:1107 msgid "" "The new Python install manager no longer supports this configuration file or " "its settings, and so it will be ignored. See :ref:`pymanager-config` for " "information about configuration settings." msgstr "" -#: ../../using/windows.rst:1083 +#: ../../using/windows.rst:1114 msgid "The embeddable package" msgstr "" -#: ../../using/windows.rst:1087 +#: ../../using/windows.rst:1118 msgid "" "The embedded distribution is a ZIP file containing a minimal Python " "environment. It is intended for acting as part of another application, " "rather than being directly accessed by end-users." msgstr "" -#: ../../using/windows.rst:1091 +#: ../../using/windows.rst:1122 msgid "" "To install an embedded distribution, we recommend using ``py install`` with " "the ``--target`` option:" msgstr "" -#: ../../using/windows.rst:1094 +#: ../../using/windows.rst:1125 msgid "$> py install 3.14-embed --target=" msgstr "" -#: ../../using/windows.rst:1098 +#: ../../using/windows.rst:1129 msgid "" "When extracted, the embedded distribution is (almost) fully isolated from " "the user's system, including environment variables, system registry " @@ -1664,14 +1714,14 @@ msgid "" "documentation are not included." msgstr "" -#: ../../using/windows.rst:1105 +#: ../../using/windows.rst:1136 msgid "" "A default ``._pth`` file is included, which further restricts the default " "search paths (as described below in :ref:`windows_finding_modules`). This " "file is intended for embedders to modify as necessary." msgstr "" -#: ../../using/windows.rst:1109 +#: ../../using/windows.rst:1140 msgid "" "Third-party packages should be installed by the application installer " "alongside the embedded distribution. Using pip to manage dependencies as for " @@ -1682,16 +1732,16 @@ msgid "" "compatibility with newer versions before providing updates to users." msgstr "" -#: ../../using/windows.rst:1117 +#: ../../using/windows.rst:1148 msgid "" "The two recommended use cases for this distribution are described below." msgstr "" -#: ../../using/windows.rst:1120 +#: ../../using/windows.rst:1151 msgid "Python application" msgstr "" -#: ../../using/windows.rst:1122 +#: ../../using/windows.rst:1153 msgid "" "An application written in Python does not necessarily require users to be " "aware of that fact. The embedded distribution may be used in this case to " @@ -1700,7 +1750,7 @@ msgid "" "there are two options." msgstr "" -#: ../../using/windows.rst:1128 +#: ../../using/windows.rst:1159 msgid "" "Using a specialized executable as a launcher requires some coding, but " "provides the most transparent experience for users. With a customized " @@ -1711,7 +1761,7 @@ msgid "" "line." msgstr "" -#: ../../using/windows.rst:1135 +#: ../../using/windows.rst:1166 msgid "" "The simpler approach is to provide a batch file or generated shortcut that " "directly calls the ``python.exe`` or ``pythonw.exe`` with the required " @@ -1720,7 +1770,7 @@ msgid "" "from other running Python processes or file associations." msgstr "" -#: ../../using/windows.rst:1141 +#: ../../using/windows.rst:1172 msgid "" "With the latter approach, packages should be installed as directories " "alongside the Python executable to ensure they are available on the path. " @@ -1729,11 +1779,11 @@ msgid "" "application." msgstr "" -#: ../../using/windows.rst:1147 +#: ../../using/windows.rst:1178 msgid "Embedding Python" msgstr "" -#: ../../using/windows.rst:1149 +#: ../../using/windows.rst:1180 msgid "" "Applications written in native code often require some form of scripting " "language, and the embedded Python distribution can be used for this purpose. " @@ -1744,7 +1794,7 @@ msgid "" "interpreter." msgstr "" -#: ../../using/windows.rst:1156 +#: ../../using/windows.rst:1187 msgid "" "As with the application use, packages can be installed to any location as " "there is an opportunity to specify search paths before initializing the " @@ -1752,11 +1802,11 @@ msgid "" "the embedded distribution and a regular installation." msgstr "" -#: ../../using/windows.rst:1165 +#: ../../using/windows.rst:1196 msgid "The nuget.org packages" msgstr "" -#: ../../using/windows.rst:1169 +#: ../../using/windows.rst:1200 msgid "" "The nuget.org package is a reduced size Python environment intended for use " "on continuous integration and build systems that do not have a system-wide " @@ -1764,14 +1814,14 @@ msgid "" "works perfectly fine for packages containing build-time tools." msgstr "" -#: ../../using/windows.rst:1174 +#: ../../using/windows.rst:1205 msgid "" "Visit `nuget.org `_ for the most up-to-date " "information on using nuget. What follows is a summary that is sufficient for " "Python developers." msgstr "" -#: ../../using/windows.rst:1178 +#: ../../using/windows.rst:1209 msgid "" "The ``nuget.exe`` command line tool may be downloaded directly from " "``https://dist.nuget.org/win-x86-commandline/latest/nuget.exe``, for " @@ -1779,13 +1829,13 @@ msgid "" "Python for 64-bit or 32-bit machines is installed using::" msgstr "" -#: ../../using/windows.rst:1183 +#: ../../using/windows.rst:1214 msgid "" "nuget.exe install python -ExcludeVersion -OutputDirectory .\n" "nuget.exe install pythonx86 -ExcludeVersion -OutputDirectory ." msgstr "" -#: ../../using/windows.rst:1186 +#: ../../using/windows.rst:1217 msgid "" "To select a particular version, add a ``-Version 3.x.y``. The output " "directory may be changed from ``.``, and the package will be installed into " @@ -1795,7 +1845,7 @@ msgid "" "directory that contains the Python installation:" msgstr "" -#: ../../using/windows.rst:1193 +#: ../../using/windows.rst:1224 msgid "" "# Without -ExcludeVersion\n" "> .\\python.3.5.2\\tools\\python.exe -V\n" @@ -1806,7 +1856,7 @@ msgid "" "Python 3.5.2" msgstr "" -#: ../../using/windows.rst:1203 +#: ../../using/windows.rst:1234 msgid "" "In general, nuget packages are not upgradeable, and newer versions should be " "installed side-by-side and referenced using the full path. Alternatively, " @@ -1814,7 +1864,7 @@ msgid "" "will do this automatically if they do not preserve files between builds." msgstr "" -#: ../../using/windows.rst:1208 +#: ../../using/windows.rst:1239 msgid "" "Alongside the ``tools`` directory is a ``build\\native`` directory. This " "contains a MSBuild properties file ``python.props`` that can be used in a C+" @@ -1822,7 +1872,7 @@ msgid "" "automatically use the headers and import libraries in your build." msgstr "" -#: ../../using/windows.rst:1213 +#: ../../using/windows.rst:1244 msgid "" "The package information pages on nuget.org are `www.nuget.org/packages/" "python `_ for the 64-bit version, " @@ -1831,11 +1881,11 @@ msgid "" "`_ for the ARM64 version" msgstr "" -#: ../../using/windows.rst:1221 +#: ../../using/windows.rst:1252 msgid "Free-threaded packages" msgstr "" -#: ../../using/windows.rst:1225 +#: ../../using/windows.rst:1256 msgid "" "Packages containing free-threaded binaries are named `python-freethreaded " "`_ for the 64-bit " @@ -1846,45 +1896,45 @@ msgid "" "exe`` entry points, both of which run free threaded." msgstr "" -#: ../../using/windows.rst:1236 +#: ../../using/windows.rst:1267 msgid "Alternative bundles" msgstr "" -#: ../../using/windows.rst:1238 +#: ../../using/windows.rst:1269 msgid "" "Besides the standard CPython distribution, there are modified packages " "including additional functionality. The following is a list of popular " "versions and their key features:" msgstr "" -#: ../../using/windows.rst:1242 +#: ../../using/windows.rst:1273 msgid "`ActivePython `_" msgstr "" -#: ../../using/windows.rst:1243 +#: ../../using/windows.rst:1274 msgid "Installer with multi-platform compatibility, documentation, PyWin32" msgstr "" -#: ../../using/windows.rst:1245 +#: ../../using/windows.rst:1276 msgid "`Anaconda `_" msgstr "" -#: ../../using/windows.rst:1246 +#: ../../using/windows.rst:1277 msgid "" "Popular scientific modules (such as numpy, scipy and pandas) and the " "``conda`` package manager." msgstr "" -#: ../../using/windows.rst:1249 +#: ../../using/windows.rst:1280 msgid "" "`Enthought Deployment Manager `_" msgstr "" -#: ../../using/windows.rst:1250 +#: ../../using/windows.rst:1281 msgid "\"The Next Generation Python Environment and Package Manager\"." msgstr "" -#: ../../using/windows.rst:1252 +#: ../../using/windows.rst:1283 msgid "" "Previously Enthought provided Canopy, but it `reached end of life in 2016 " "`_." msgstr "" -#: ../../using/windows.rst:1255 +#: ../../using/windows.rst:1286 msgid "`WinPython `_" msgstr "" -#: ../../using/windows.rst:1256 +#: ../../using/windows.rst:1287 msgid "" "Windows-specific distribution with prebuilt scientific packages and tools " "for building packages." msgstr "" -#: ../../using/windows.rst:1259 +#: ../../using/windows.rst:1290 msgid "" "Note that these packages may not include the latest versions of Python or " "other libraries, and are not maintained or supported by the core Python team." msgstr "" -#: ../../using/windows.rst:1264 +#: ../../using/windows.rst:1295 msgid "Supported Windows versions" msgstr "" -#: ../../using/windows.rst:1266 +#: ../../using/windows.rst:1297 msgid "" "As specified in :pep:`11`, a Python release only supports a Windows platform " "while Microsoft considers the platform under extended support. This means " @@ -1921,17 +1971,17 @@ msgid "" "please install Python 3.12." msgstr "" -#: ../../using/windows.rst:1276 ../../using/windows.rst:1562 +#: ../../using/windows.rst:1307 ../../using/windows.rst:1593 msgid "Removing the MAX_PATH limitation" msgstr "" -#: ../../using/windows.rst:1278 ../../using/windows.rst:1564 +#: ../../using/windows.rst:1309 ../../using/windows.rst:1595 msgid "" "Windows historically has limited path lengths to 260 characters. This meant " "that paths longer than this would not resolve and errors would result." msgstr "" -#: ../../using/windows.rst:1281 +#: ../../using/windows.rst:1312 msgid "" "In the latest versions of Windows, this limitation can be expanded to over " "32,000 characters. Your administrator will need to activate the \"Enable " @@ -1940,40 +1990,40 @@ msgid "" "``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem``." msgstr "" -#: ../../using/windows.rst:1286 ../../using/windows.rst:1573 +#: ../../using/windows.rst:1317 ../../using/windows.rst:1604 msgid "" "This allows the :func:`open` function, the :mod:`os` module and most other " "path functionality to accept and return paths longer than 260 characters." msgstr "" -#: ../../using/windows.rst:1289 +#: ../../using/windows.rst:1320 msgid "" "After changing the above option and rebooting, no further configuration is " "required." msgstr "" -#: ../../using/windows.rst:1296 +#: ../../using/windows.rst:1327 msgid "UTF-8 mode" msgstr "" -#: ../../using/windows.rst:1301 +#: ../../using/windows.rst:1332 msgid "Python UTF-8 mode is now enabled by default (:pep:`686`)." msgstr "" -#: ../../using/windows.rst:1303 +#: ../../using/windows.rst:1334 msgid "" "Windows still uses legacy encodings for the system encoding (the ANSI Code " "Page). Python uses it for the default encoding of text files (e.g. :func:" "`locale.getencoding`)." msgstr "" -#: ../../using/windows.rst:1307 +#: ../../using/windows.rst:1338 msgid "" "This may cause issues because UTF-8 is widely used on the internet and most " "Unix systems, including WSL (Windows Subsystem for Linux)." msgstr "" -#: ../../using/windows.rst:1310 +#: ../../using/windows.rst:1341 msgid "" "The :ref:`Python UTF-8 Mode `, enabled by default, can help by " "changing the default text encoding to UTF-8. When the :ref:`UTF-8 mode ` via the ``-X " "utf8=0`` command line option, or the ``PYTHONUTF8=0`` environment variable. " @@ -1989,7 +2039,7 @@ msgid "" "envvars` for how to modify environment variables." msgstr "" -#: ../../using/windows.rst:1321 +#: ../../using/windows.rst:1352 msgid "" "Adding ``PYTHONUTF8={0,1}`` to the default environment variables will affect " "all Python 3.7+ applications on your system. If you have any Python 3.7+ " @@ -1998,45 +2048,45 @@ msgid "" "option." msgstr "" -#: ../../using/windows.rst:1328 +#: ../../using/windows.rst:1359 msgid "" "Even when UTF-8 mode is disabled, Python uses UTF-8 by default on Windows " "for:" msgstr "" -#: ../../using/windows.rst:1331 +#: ../../using/windows.rst:1362 msgid "Console I/O including standard I/O (see :pep:`528` for details)." msgstr "" -#: ../../using/windows.rst:1332 +#: ../../using/windows.rst:1363 msgid "" "The :term:`filesystem encoding ` " "(see :pep:`529` for details)." msgstr "" -#: ../../using/windows.rst:1339 +#: ../../using/windows.rst:1370 msgid "Finding modules" msgstr "Module finden" -#: ../../using/windows.rst:1341 +#: ../../using/windows.rst:1372 msgid "" "These notes supplement the description at :ref:`sys-path-init` with detailed " "Windows notes." msgstr "" -#: ../../using/windows.rst:1344 +#: ../../using/windows.rst:1375 msgid "" "When no ``._pth`` file is found, this is how :data:`sys.path` is populated " "on Windows:" msgstr "" -#: ../../using/windows.rst:1347 +#: ../../using/windows.rst:1378 msgid "" "An empty entry is added at the start, which corresponds to the current " "directory." msgstr "" -#: ../../using/windows.rst:1350 +#: ../../using/windows.rst:1381 msgid "" "If the environment variable :envvar:`PYTHONPATH` exists, as described in :" "ref:`using-on-envvars`, its entries are added next. Note that on Windows, " @@ -2044,7 +2094,7 @@ msgid "" "from the colon used in drive identifiers (``C:\\`` etc.)." msgstr "" -#: ../../using/windows.rst:1355 +#: ../../using/windows.rst:1386 msgid "" "Additional \"application paths\" can be added in the registry as subkeys of :" "samp:`\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\{version}\\\\PythonPath` under " @@ -2054,7 +2104,7 @@ msgid "" "installers only use HKLM, so HKCU is typically empty.)" msgstr "" -#: ../../using/windows.rst:1362 +#: ../../using/windows.rst:1393 msgid "" "If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as " "\"Python Home\". Otherwise, the path of the main Python executable is used " @@ -2065,31 +2115,31 @@ msgid "" "PythonPath stored in the registry." msgstr "" -#: ../../using/windows.rst:1370 +#: ../../using/windows.rst:1401 msgid "" "If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified " "in the environment, and no registry entries can be found, a default path " "with relative entries is used (e.g. ``.\\Lib;.\\plat-win``, etc)." msgstr "" -#: ../../using/windows.rst:1374 +#: ../../using/windows.rst:1405 msgid "" "If a ``pyvenv.cfg`` file is found alongside the main executable or in the " "directory one level above the executable, the following variations apply:" msgstr "" -#: ../../using/windows.rst:1377 +#: ../../using/windows.rst:1408 msgid "" "If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this " "path is used instead of the path to the main executable when deducing the " "home location." msgstr "" -#: ../../using/windows.rst:1381 +#: ../../using/windows.rst:1412 msgid "The end result of all this is:" msgstr "" -#: ../../using/windows.rst:1383 +#: ../../using/windows.rst:1414 msgid "" "When running :file:`python.exe`, or any other .exe in the main Python " "directory (either an installed version, or directly from the PCbuild " @@ -2097,7 +2147,7 @@ msgid "" "ignored. Other \"application paths\" in the registry are always read." msgstr "" -#: ../../using/windows.rst:1388 +#: ../../using/windows.rst:1419 msgid "" "When Python is hosted in another .exe (different directory, embedded via " "COM, etc), the \"Python Home\" will not be deduced, so the core path from " @@ -2105,20 +2155,20 @@ msgid "" "always read." msgstr "" -#: ../../using/windows.rst:1392 +#: ../../using/windows.rst:1423 msgid "" "If Python can't find its home and there are no registry value (frozen .exe, " "some very strange installation setup) you get a path with some default, but " "relative, paths." msgstr "" -#: ../../using/windows.rst:1396 +#: ../../using/windows.rst:1427 msgid "" "For those who want to bundle Python into their application or distribution, " "the following advice will prevent conflicts with other installations:" msgstr "" -#: ../../using/windows.rst:1399 +#: ../../using/windows.rst:1430 msgid "" "Include a ``._pth`` file alongside your executable containing the " "directories to include. This will ignore paths listed in the registry and " @@ -2126,20 +2176,20 @@ msgid "" "listed." msgstr "" -#: ../../using/windows.rst:1404 +#: ../../using/windows.rst:1435 msgid "" "If you are loading :file:`python3.dll` or :file:`python37.dll` in your own " "executable, explicitly set :c:member:`PyConfig.module_search_paths` before :" "c:func:`Py_InitializeFromConfig`." msgstr "" -#: ../../using/windows.rst:1408 +#: ../../using/windows.rst:1439 msgid "" "Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME` " "before launching :file:`python.exe` from your application." msgstr "" -#: ../../using/windows.rst:1411 +#: ../../using/windows.rst:1442 msgid "" "If you cannot use the previous suggestions (for example, you are a " "distribution that allows people to run :file:`python.exe` directly), ensure " @@ -2148,7 +2198,7 @@ msgid "" "correctly named ZIP file will be detected instead.)" msgstr "" -#: ../../using/windows.rst:1417 +#: ../../using/windows.rst:1448 msgid "" "These will ensure that the files in a system-wide installation will not take " "precedence over the copy of the standard library bundled with your " @@ -2158,19 +2208,19 @@ msgid "" "packages." msgstr "" -#: ../../using/windows.rst:1425 +#: ../../using/windows.rst:1456 msgid "" "Add ``._pth`` file support and removes ``applocal`` option from ``pyvenv." "cfg``." msgstr "" -#: ../../using/windows.rst:1430 +#: ../../using/windows.rst:1461 msgid "" "Add :file:`python{XX}.zip` as a potential landmark when directly adjacent to " "the executable." msgstr "" -#: ../../using/windows.rst:1435 +#: ../../using/windows.rst:1466 msgid "" "Modules specified in the registry under ``Modules`` (not ``PythonPath``) may " "be imported by :class:`importlib.machinery.WindowsRegistryFinder`. This " @@ -2178,86 +2228,86 @@ msgid "" "explicitly added to :data:`sys.meta_path` in the future." msgstr "" -#: ../../using/windows.rst:1441 +#: ../../using/windows.rst:1472 msgid "Additional modules" msgstr "" -#: ../../using/windows.rst:1443 +#: ../../using/windows.rst:1474 msgid "" "Even though Python aims to be portable among all platforms, there are " "features that are unique to Windows. A couple of modules, both in the " "standard library and external, and snippets exist to use these features." msgstr "" -#: ../../using/windows.rst:1447 +#: ../../using/windows.rst:1478 msgid "" "The Windows-specific standard modules are documented in :ref:`mswin-specific-" "services`." msgstr "" -#: ../../using/windows.rst:1451 +#: ../../using/windows.rst:1482 msgid "PyWin32" msgstr "" -#: ../../using/windows.rst:1453 +#: ../../using/windows.rst:1484 msgid "" "The :pypi:`PyWin32` module by Mark Hammond is a collection of modules for " "advanced Windows-specific support. This includes utilities for:" msgstr "" -#: ../../using/windows.rst:1457 +#: ../../using/windows.rst:1488 msgid "" "`Component Object Model `_ (COM)" msgstr "" -#: ../../using/windows.rst:1460 +#: ../../using/windows.rst:1491 msgid "Win32 API calls" msgstr "" -#: ../../using/windows.rst:1461 +#: ../../using/windows.rst:1492 msgid "Registry" msgstr "" -#: ../../using/windows.rst:1462 +#: ../../using/windows.rst:1493 msgid "Event log" msgstr "" -#: ../../using/windows.rst:1463 +#: ../../using/windows.rst:1494 msgid "" "`Microsoft Foundation Classes `_ (MFC) user interfaces" msgstr "" -#: ../../using/windows.rst:1467 +#: ../../using/windows.rst:1498 msgid "" "`PythonWin `_ is a sample MFC application shipped with PyWin32. " "It is an embeddable IDE with a built-in debugger." msgstr "" -#: ../../using/windows.rst:1473 +#: ../../using/windows.rst:1504 msgid "" "`Win32 How Do I...? `_" msgstr "" -#: ../../using/windows.rst:1474 +#: ../../using/windows.rst:1505 msgid "by Tim Golden" msgstr "" -#: ../../using/windows.rst:1476 +#: ../../using/windows.rst:1507 msgid "`Python and COM `_" msgstr "" -#: ../../using/windows.rst:1477 +#: ../../using/windows.rst:1508 msgid "by David and Paul Boddie" msgstr "" -#: ../../using/windows.rst:1481 +#: ../../using/windows.rst:1512 msgid "cx_Freeze" msgstr "" -#: ../../using/windows.rst:1483 +#: ../../using/windows.rst:1514 msgid "" "`cx_Freeze `_ wraps Python " "scripts into executable Windows programs (:file:`{*}.exe` files). When you " @@ -2265,11 +2315,11 @@ msgid "" "users to install Python." msgstr "" -#: ../../using/windows.rst:1490 +#: ../../using/windows.rst:1521 msgid "Compiling Python on Windows" msgstr "" -#: ../../using/windows.rst:1492 +#: ../../using/windows.rst:1523 msgid "" "If you want to compile CPython yourself, first thing you should do is get " "the `source `_. You can download " @@ -2277,38 +2327,38 @@ msgid "" "devguide.python.org/setup/#get-the-source-code>`_." msgstr "" -#: ../../using/windows.rst:1497 +#: ../../using/windows.rst:1528 msgid "" "The source tree contains a build solution and project files for Microsoft " "Visual Studio, which is the compiler used to build the official Python " "releases. These files are in the :file:`PCbuild` directory." msgstr "" -#: ../../using/windows.rst:1501 +#: ../../using/windows.rst:1532 msgid "" "Check :file:`PCbuild/readme.txt` for general information on the build " "process." msgstr "" -#: ../../using/windows.rst:1503 +#: ../../using/windows.rst:1534 msgid "For extension modules, consult :ref:`building-on-windows`." msgstr "" -#: ../../using/windows.rst:1510 +#: ../../using/windows.rst:1541 msgid "The full installer (deprecated)" msgstr "" -#: ../../using/windows.rst:1514 +#: ../../using/windows.rst:1545 msgid "" "This installer is deprecated since 3.14 and will not be produced for Python " "3.16 or later. See :ref:`pymanager` for the modern installer." msgstr "" -#: ../../using/windows.rst:1519 +#: ../../using/windows.rst:1550 msgid "Installation steps" msgstr "" -#: ../../using/windows.rst:1521 +#: ../../using/windows.rst:1552 msgid "" "Four Python |version| installers are available for download - two each for " "the 32-bit and 64-bit versions of the interpreter. The *web installer* is a " @@ -2319,45 +2369,45 @@ msgid "" "ways to avoid downloading during installation." msgstr "" -#: ../../using/windows.rst:1529 +#: ../../using/windows.rst:1560 msgid "After starting the installer, one of two options may be selected:" msgstr "" "Nach dem Starten den Installers kann eine der beiden Optionen ausgewählt " "werden:" -#: ../../using/windows.rst:1533 +#: ../../using/windows.rst:1564 msgid "If you select \"Install Now\":" msgstr "Wenn Sie \"Jetzt installieren\" wählen:" -#: ../../using/windows.rst:1535 +#: ../../using/windows.rst:1566 msgid "" "You will *not* need to be an administrator (unless a system update for the C " "Runtime Library is required or you install the :ref:`launcher` for all users)" msgstr "" -#: ../../using/windows.rst:1538 +#: ../../using/windows.rst:1569 msgid "Python will be installed into your user directory" msgstr "" -#: ../../using/windows.rst:1539 +#: ../../using/windows.rst:1570 msgid "" "The :ref:`launcher` will be installed according to the option at the bottom " "of the first page" msgstr "" -#: ../../using/windows.rst:1541 +#: ../../using/windows.rst:1572 msgid "The standard library, test suite, launcher and pip will be installed" msgstr "" -#: ../../using/windows.rst:1542 +#: ../../using/windows.rst:1573 msgid "If selected, the install directory will be added to your :envvar:`PATH`" msgstr "" -#: ../../using/windows.rst:1543 +#: ../../using/windows.rst:1574 msgid "Shortcuts will only be visible for the current user" msgstr "" -#: ../../using/windows.rst:1545 +#: ../../using/windows.rst:1576 msgid "" "Selecting \"Customize installation\" will allow you to select the features " "to install, the installation location and other options or post-install " @@ -2365,42 +2415,42 @@ msgid "" "option." msgstr "" -#: ../../using/windows.rst:1549 +#: ../../using/windows.rst:1580 msgid "" "To perform an all-users installation, you should select \"Customize " "installation\". In this case:" msgstr "" -#: ../../using/windows.rst:1552 +#: ../../using/windows.rst:1583 msgid "You may be required to provide administrative credentials or approval" msgstr "" -#: ../../using/windows.rst:1553 +#: ../../using/windows.rst:1584 msgid "Python will be installed into the Program Files directory" msgstr "" -#: ../../using/windows.rst:1554 +#: ../../using/windows.rst:1585 msgid "The :ref:`launcher` will be installed into the Windows directory" msgstr "" -#: ../../using/windows.rst:1555 +#: ../../using/windows.rst:1586 msgid "Optional features may be selected during installation" msgstr "" -#: ../../using/windows.rst:1556 +#: ../../using/windows.rst:1587 msgid "The standard library can be pre-compiled to bytecode" msgstr "" -#: ../../using/windows.rst:1557 +#: ../../using/windows.rst:1588 msgid "" "If selected, the install directory will be added to the system :envvar:`PATH`" msgstr "" -#: ../../using/windows.rst:1558 +#: ../../using/windows.rst:1589 msgid "Shortcuts are available for all users" msgstr "" -#: ../../using/windows.rst:1567 +#: ../../using/windows.rst:1598 msgid "" "In the latest versions of Windows, this limitation can be expanded to " "approximately 32,000 characters. Your administrator will need to activate " @@ -2409,19 +2459,19 @@ msgid "" "``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem``." msgstr "" -#: ../../using/windows.rst:1576 +#: ../../using/windows.rst:1607 msgid "After changing the above option, no further configuration is required." msgstr "" -#: ../../using/windows.rst:1580 +#: ../../using/windows.rst:1611 msgid "Support for long paths was enabled in Python." msgstr "" -#: ../../using/windows.rst:1585 +#: ../../using/windows.rst:1616 msgid "Installing without UI" msgstr "" -#: ../../using/windows.rst:1587 +#: ../../using/windows.rst:1618 msgid "" "All of the options available in the installer UI can also be specified from " "the command line, allowing scripted installers to replicate an installation " @@ -2429,357 +2479,357 @@ msgid "" "without suppressing the UI in order to change some of the defaults." msgstr "" -#: ../../using/windows.rst:1592 +#: ../../using/windows.rst:1623 msgid "" "The following options (found by executing the installer with ``/?``) can be " "passed into the installer:" msgstr "" -#: ../../using/windows.rst:1596 ../../using/windows.rst:1616 -#: ../../using/windows.rst:2206 +#: ../../using/windows.rst:1627 ../../using/windows.rst:1647 +#: ../../using/windows.rst:2237 msgid "Name" msgstr "Name" -#: ../../using/windows.rst:1598 +#: ../../using/windows.rst:1629 msgid "/passive" msgstr "" -#: ../../using/windows.rst:1598 +#: ../../using/windows.rst:1629 msgid "to display progress without requiring user interaction" msgstr "" -#: ../../using/windows.rst:1600 +#: ../../using/windows.rst:1631 msgid "/quiet" msgstr "" -#: ../../using/windows.rst:1600 +#: ../../using/windows.rst:1631 msgid "to install/uninstall without displaying any UI" msgstr "" -#: ../../using/windows.rst:1602 +#: ../../using/windows.rst:1633 msgid "/simple" msgstr "" -#: ../../using/windows.rst:1602 +#: ../../using/windows.rst:1633 msgid "to prevent user customization" msgstr "" -#: ../../using/windows.rst:1604 +#: ../../using/windows.rst:1635 msgid "/uninstall" msgstr "" -#: ../../using/windows.rst:1604 +#: ../../using/windows.rst:1635 msgid "to remove Python (without confirmation)" msgstr "" -#: ../../using/windows.rst:1606 +#: ../../using/windows.rst:1637 msgid "/layout [directory]" msgstr "" -#: ../../using/windows.rst:1606 +#: ../../using/windows.rst:1637 msgid "to pre-download all components" msgstr "" -#: ../../using/windows.rst:1608 +#: ../../using/windows.rst:1639 msgid "/log [filename]" msgstr "" -#: ../../using/windows.rst:1608 +#: ../../using/windows.rst:1639 msgid "to specify log files location" msgstr "" -#: ../../using/windows.rst:1611 +#: ../../using/windows.rst:1642 msgid "" "All other options are passed as ``name=value``, where the value is usually " "``0`` to disable a feature, ``1`` to enable a feature, or a path. The full " "list of available options is shown below." msgstr "" -#: ../../using/windows.rst:1616 +#: ../../using/windows.rst:1647 msgid "Default" msgstr "Standard" -#: ../../using/windows.rst:1618 +#: ../../using/windows.rst:1649 msgid "InstallAllUsers" msgstr "" -#: ../../using/windows.rst:1618 +#: ../../using/windows.rst:1649 msgid "Perform a system-wide installation." msgstr "" -#: ../../using/windows.rst:1618 ../../using/windows.rst:1644 -#: ../../using/windows.rst:1647 ../../using/windows.rst:1651 -#: ../../using/windows.rst:1660 ../../using/windows.rst:1682 -#: ../../using/windows.rst:1690 ../../using/windows.rst:1693 +#: ../../using/windows.rst:1649 ../../using/windows.rst:1675 +#: ../../using/windows.rst:1678 ../../using/windows.rst:1682 +#: ../../using/windows.rst:1691 ../../using/windows.rst:1713 +#: ../../using/windows.rst:1721 ../../using/windows.rst:1724 msgid "0" msgstr "" -#: ../../using/windows.rst:1620 +#: ../../using/windows.rst:1651 msgid "TargetDir" msgstr "" -#: ../../using/windows.rst:1620 +#: ../../using/windows.rst:1651 msgid "The installation directory" msgstr "Das Installations-Verzeichnis" -#: ../../using/windows.rst:1620 +#: ../../using/windows.rst:1651 msgid "Selected based on InstallAllUsers" msgstr "" -#: ../../using/windows.rst:1623 +#: ../../using/windows.rst:1654 msgid "DefaultAllUsersTargetDir" msgstr "" -#: ../../using/windows.rst:1623 +#: ../../using/windows.rst:1654 msgid "The default installation directory for all-user installs" msgstr "" -#: ../../using/windows.rst:1623 +#: ../../using/windows.rst:1654 msgid "" -":file:`%ProgramFiles%\\\\\\ Python X.Y` or :file:`\\ %ProgramFiles(x86)%\\\\" -"\\ Python X.Y`" +":file:`%ProgramFiles%\\\\ Python X.Y` or :file:` %ProgramFiles(x86)%\\\\ " +"Python X.Y`" msgstr "" -#: ../../using/windows.rst:1628 +#: ../../using/windows.rst:1659 msgid "DefaultJustForMeTargetDir" msgstr "" -#: ../../using/windows.rst:1628 +#: ../../using/windows.rst:1659 msgid "The default install directory for just-for-me installs" msgstr "" -#: ../../using/windows.rst:1628 +#: ../../using/windows.rst:1659 msgid "" -":file:`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY` or :file:" -"`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY-32` or :file:" -"`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY-64`" +":file:`%LocalAppData%\\\\ Programs\\\\Python\\\\ PythonXY` or :file:" +"`%LocalAppData%\\\\ Programs\\\\Python\\\\ PythonXY-32` or :file:" +"`%LocalAppData%\\\\ Programs\\\\Python\\\\ PythonXY-64`" msgstr "" -#: ../../using/windows.rst:1638 +#: ../../using/windows.rst:1669 msgid "DefaultCustomTargetDir" msgstr "" -#: ../../using/windows.rst:1638 +#: ../../using/windows.rst:1669 msgid "The default custom install directory displayed in the UI" msgstr "" -#: ../../using/windows.rst:1638 ../../using/windows.rst:1695 +#: ../../using/windows.rst:1669 ../../using/windows.rst:1726 msgid "(empty)" msgstr "(leer)" -#: ../../using/windows.rst:1641 +#: ../../using/windows.rst:1672 msgid "AssociateFiles" msgstr "" -#: ../../using/windows.rst:1641 +#: ../../using/windows.rst:1672 msgid "Create file associations if the launcher is also installed." msgstr "" -#: ../../using/windows.rst:1641 ../../using/windows.rst:1655 -#: ../../using/windows.rst:1658 ../../using/windows.rst:1662 -#: ../../using/windows.rst:1666 ../../using/windows.rst:1670 -#: ../../using/windows.rst:1672 ../../using/windows.rst:1676 -#: ../../using/windows.rst:1680 ../../using/windows.rst:1684 -#: ../../using/windows.rst:1686 ../../using/windows.rst:1688 +#: ../../using/windows.rst:1672 ../../using/windows.rst:1686 +#: ../../using/windows.rst:1689 ../../using/windows.rst:1693 +#: ../../using/windows.rst:1697 ../../using/windows.rst:1701 +#: ../../using/windows.rst:1703 ../../using/windows.rst:1707 +#: ../../using/windows.rst:1711 ../../using/windows.rst:1715 +#: ../../using/windows.rst:1717 ../../using/windows.rst:1719 msgid "1" msgstr "" -#: ../../using/windows.rst:1644 +#: ../../using/windows.rst:1675 msgid "CompileAll" msgstr "" -#: ../../using/windows.rst:1644 +#: ../../using/windows.rst:1675 msgid "Compile all ``.py`` files to ``.pyc``." msgstr "" -#: ../../using/windows.rst:1647 +#: ../../using/windows.rst:1678 msgid "PrependPath" msgstr "" -#: ../../using/windows.rst:1647 +#: ../../using/windows.rst:1678 msgid "" "Prepend install and Scripts directories to :envvar:`PATH` and add ``.PY`` " "to :envvar:`PATHEXT`" msgstr "" -#: ../../using/windows.rst:1651 +#: ../../using/windows.rst:1682 msgid "AppendPath" msgstr "" -#: ../../using/windows.rst:1651 +#: ../../using/windows.rst:1682 msgid "" "Append install and Scripts directories to :envvar:`PATH` and add ``.PY`` " "to :envvar:`PATHEXT`" msgstr "" -#: ../../using/windows.rst:1655 +#: ../../using/windows.rst:1686 msgid "Shortcuts" msgstr "" -#: ../../using/windows.rst:1655 +#: ../../using/windows.rst:1686 msgid "" "Create shortcuts for the interpreter, documentation and IDLE if installed." msgstr "" -#: ../../using/windows.rst:1658 +#: ../../using/windows.rst:1689 msgid "Include_doc" msgstr "" -#: ../../using/windows.rst:1658 +#: ../../using/windows.rst:1689 msgid "Install Python manual" msgstr "" -#: ../../using/windows.rst:1660 +#: ../../using/windows.rst:1691 msgid "Include_debug" msgstr "" -#: ../../using/windows.rst:1660 +#: ../../using/windows.rst:1691 msgid "Install debug binaries" msgstr "" -#: ../../using/windows.rst:1662 +#: ../../using/windows.rst:1693 msgid "Include_dev" msgstr "" -#: ../../using/windows.rst:1662 +#: ../../using/windows.rst:1693 msgid "" "Install developer headers and libraries. Omitting this may lead to an " "unusable installation." msgstr "" -#: ../../using/windows.rst:1666 +#: ../../using/windows.rst:1697 msgid "Include_exe" msgstr "" -#: ../../using/windows.rst:1666 +#: ../../using/windows.rst:1697 msgid "" "Install :file:`python.exe` and related files. Omitting this may lead to an " "unusable installation." msgstr "" -#: ../../using/windows.rst:1670 +#: ../../using/windows.rst:1701 msgid "Include_launcher" msgstr "" -#: ../../using/windows.rst:1670 +#: ../../using/windows.rst:1701 msgid "Install :ref:`launcher`." msgstr "" -#: ../../using/windows.rst:1672 +#: ../../using/windows.rst:1703 msgid "InstallLauncherAllUsers" msgstr "" -#: ../../using/windows.rst:1672 +#: ../../using/windows.rst:1703 msgid "" "Installs the launcher for all users. Also requires ``Include_launcher`` to " "be set to 1" msgstr "" -#: ../../using/windows.rst:1676 +#: ../../using/windows.rst:1707 msgid "Include_lib" msgstr "" -#: ../../using/windows.rst:1676 +#: ../../using/windows.rst:1707 msgid "" "Install standard library and extension modules. Omitting this may lead to an " "unusable installation." msgstr "" -#: ../../using/windows.rst:1680 +#: ../../using/windows.rst:1711 msgid "Include_pip" msgstr "" -#: ../../using/windows.rst:1680 +#: ../../using/windows.rst:1711 msgid "Install bundled pip and setuptools" msgstr "" -#: ../../using/windows.rst:1682 +#: ../../using/windows.rst:1713 msgid "Include_symbols" msgstr "" -#: ../../using/windows.rst:1682 +#: ../../using/windows.rst:1713 msgid "Install debugging symbols (``*.pdb``)" msgstr "" -#: ../../using/windows.rst:1684 +#: ../../using/windows.rst:1715 msgid "Include_tcltk" msgstr "" -#: ../../using/windows.rst:1684 +#: ../../using/windows.rst:1715 msgid "Install Tcl/Tk support and IDLE" msgstr "" -#: ../../using/windows.rst:1686 +#: ../../using/windows.rst:1717 msgid "Include_test" msgstr "" -#: ../../using/windows.rst:1686 +#: ../../using/windows.rst:1717 msgid "Install standard library test suite" msgstr "" -#: ../../using/windows.rst:1688 +#: ../../using/windows.rst:1719 msgid "Include_tools" msgstr "" -#: ../../using/windows.rst:1688 +#: ../../using/windows.rst:1719 msgid "Install utility scripts" msgstr "" -#: ../../using/windows.rst:1690 +#: ../../using/windows.rst:1721 msgid "LauncherOnly" msgstr "" -#: ../../using/windows.rst:1690 +#: ../../using/windows.rst:1721 msgid "Only installs the launcher. This will override most other options." msgstr "" -#: ../../using/windows.rst:1693 +#: ../../using/windows.rst:1724 msgid "SimpleInstall" msgstr "" -#: ../../using/windows.rst:1693 +#: ../../using/windows.rst:1724 msgid "Disable most install UI" msgstr "" -#: ../../using/windows.rst:1695 +#: ../../using/windows.rst:1726 msgid "SimpleInstallDescription" msgstr "" -#: ../../using/windows.rst:1695 +#: ../../using/windows.rst:1726 msgid "A custom message to display when the simplified install UI is used." msgstr "" -#: ../../using/windows.rst:1699 +#: ../../using/windows.rst:1730 msgid "" "For example, to silently install a default, system-wide Python installation, " "you could use the following command (from an elevated command prompt)::" msgstr "" -#: ../../using/windows.rst:1702 +#: ../../using/windows.rst:1733 msgid "python-3.9.0.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0" msgstr "" -#: ../../using/windows.rst:1704 +#: ../../using/windows.rst:1735 msgid "" "To allow users to easily install a personal copy of Python without the test " "suite, you could provide a shortcut with the following command. This will " "display a simplified initial page and disallow customization::" msgstr "" -#: ../../using/windows.rst:1708 +#: ../../using/windows.rst:1739 msgid "" "python-3.9.0.exe InstallAllUsers=0 Include_launcher=0 Include_test=0\n" " SimpleInstall=1 SimpleInstallDescription=\"Just for me, no test suite.\"" msgstr "" -#: ../../using/windows.rst:1711 +#: ../../using/windows.rst:1742 msgid "" "(Note that omitting the launcher also omits file associations, and is only " "recommended for per-user installs when there is also a system-wide " "installation that included the launcher.)" msgstr "" -#: ../../using/windows.rst:1715 +#: ../../using/windows.rst:1746 msgid "" "The options listed above can also be provided in a file named ``unattend." "xml`` alongside the executable. This file specifies a list of options and " @@ -2788,7 +2838,7 @@ msgid "" "strings. This example file sets the same options as the previous example:" msgstr "" -#: ../../using/windows.rst:1721 +#: ../../using/windows.rst:1752 msgid "" "\n" " " msgstr "" -#: ../../using/windows.rst:1734 +#: ../../using/windows.rst:1765 msgid "Installing without downloading" msgstr "" -#: ../../using/windows.rst:1736 +#: ../../using/windows.rst:1767 msgid "" "As some features of Python are not included in the initial installer " "download, selecting those features may require an internet connection. To " @@ -2815,7 +2865,7 @@ msgid "" "to be performed it is very useful to have a locally cached copy." msgstr "" -#: ../../using/windows.rst:1744 +#: ../../using/windows.rst:1775 msgid "" "Execute the following command from Command Prompt to download all possible " "required files. Remember to substitute ``python-3.9.0.exe`` for the actual " @@ -2823,27 +2873,27 @@ msgid "" "avoid collisions between files with the same name." msgstr "" -#: ../../using/windows.rst:1751 +#: ../../using/windows.rst:1782 msgid "python-3.9.0.exe /layout [optional target directory]" msgstr "" -#: ../../using/windows.rst:1753 +#: ../../using/windows.rst:1784 msgid "" "You may also specify the ``/quiet`` option to hide the progress display." msgstr "" -#: ../../using/windows.rst:1756 +#: ../../using/windows.rst:1787 msgid "Modifying an install" msgstr "" -#: ../../using/windows.rst:1758 +#: ../../using/windows.rst:1789 msgid "" "Once Python has been installed, you can add or remove features through the " "Programs and Features tool that is part of Windows. Select the Python entry " "and choose \"Uninstall/Change\" to open the installer in maintenance mode." msgstr "" -#: ../../using/windows.rst:1762 +#: ../../using/windows.rst:1793 msgid "" "\"Modify\" allows you to add or remove features by modifying the checkboxes " "- unchanged checkboxes will not install or remove anything. Some options " @@ -2851,26 +2901,26 @@ msgid "" "these, you will need to remove and then reinstall Python completely." msgstr "" -#: ../../using/windows.rst:1767 +#: ../../using/windows.rst:1798 msgid "" "\"Repair\" will verify all the files that should be installed using the " "current settings and replace any that have been removed or modified." msgstr "" -#: ../../using/windows.rst:1770 +#: ../../using/windows.rst:1801 msgid "" "\"Uninstall\" will remove Python entirely, with the exception of the :ref:" "`launcher`, which has its own entry in Programs and Features." msgstr "" -#: ../../using/windows.rst:1779 +#: ../../using/windows.rst:1810 msgid "" "To install pre-built binaries with free-threading enabled (see :pep:`703`), " "you should select \"Customize installation\". The second page of options " "includes the \"Download free-threaded binaries\" checkbox." msgstr "" -#: ../../using/windows.rst:1785 +#: ../../using/windows.rst:1816 msgid "" "Selecting this option will download and install additional binaries to the " "same location as the main Python install. The main executable is called " @@ -2879,7 +2929,7 @@ msgid "" "are shared with the main install." msgstr "" -#: ../../using/windows.rst:1791 +#: ../../using/windows.rst:1822 msgid "" "The free-threaded version is registered as a regular Python install with the " "tag ``3.13t`` (with a ``-32`` or ``-arm64`` suffix as normal for those " @@ -2891,7 +2941,7 @@ msgid "" "not install the free-threaded binaries at this time." msgstr "" -#: ../../using/windows.rst:1800 +#: ../../using/windows.rst:1831 msgid "" "To specify the install option at the command line, use " "``Include_freethreaded=1``. See :ref:`install-layout-option` for " @@ -2900,24 +2950,24 @@ msgid "" "apply to the free-threaded builds." msgstr "" -#: ../../using/windows.rst:1806 +#: ../../using/windows.rst:1837 msgid "" "Free-threaded binaries are also available :ref:`on nuget.org `." msgstr "" -#: ../../using/windows.rst:1810 +#: ../../using/windows.rst:1841 msgid "Python launcher for Windows (deprecated)" msgstr "" -#: ../../using/windows.rst:1814 +#: ../../using/windows.rst:1845 msgid "" "The launcher and this documentation have been superseded by the Python " "Install Manager described above. This is preserved temporarily for " "historical interest." msgstr "" -#: ../../using/windows.rst:1820 +#: ../../using/windows.rst:1851 msgid "" "The Python launcher for Windows is a utility which aids in locating and " "executing of different Python versions. It allows scripts (or the command-" @@ -2925,7 +2975,7 @@ msgid "" "locate and execute that version." msgstr "" -#: ../../using/windows.rst:1825 +#: ../../using/windows.rst:1856 msgid "" "Unlike the :envvar:`PATH` variable, the launcher will correctly select the " "most appropriate version of Python. It will prefer per-user installations " @@ -2933,19 +2983,19 @@ msgid "" "most recently installed version." msgstr "" -#: ../../using/windows.rst:1830 +#: ../../using/windows.rst:1861 msgid "The launcher was originally specified in :pep:`397`." msgstr "" -#: ../../using/windows.rst:1833 +#: ../../using/windows.rst:1864 msgid "Getting started" msgstr "Los geht's" -#: ../../using/windows.rst:1836 +#: ../../using/windows.rst:1867 msgid "From the command-line" msgstr "" -#: ../../using/windows.rst:1840 +#: ../../using/windows.rst:1871 msgid "" "System-wide installations of Python 3.3 and later will put the launcher on " "your :envvar:`PATH`. The launcher is compatible with all available versions " @@ -2953,62 +3003,62 @@ msgid "" "the launcher is available, execute the following command in Command Prompt::" msgstr "" -#: ../../using/windows.rst:1845 +#: ../../using/windows.rst:1876 msgid "py" msgstr "" -#: ../../using/windows.rst:1847 +#: ../../using/windows.rst:1878 msgid "" "You should find that the latest version of Python you have installed is " "started - it can be exited as normal, and any additional command-line " "arguments specified will be sent directly to Python." msgstr "" -#: ../../using/windows.rst:1851 +#: ../../using/windows.rst:1882 msgid "" "If you have multiple versions of Python installed (e.g., 3.7 and |version|) " "you will have noticed that Python |version| was started - to launch Python " "3.7, try the command::" msgstr "" -#: ../../using/windows.rst:1855 +#: ../../using/windows.rst:1886 msgid "py -3.7" msgstr "" -#: ../../using/windows.rst:1857 +#: ../../using/windows.rst:1888 msgid "" "If you want the latest version of Python 2 you have installed, try the " "command::" msgstr "" -#: ../../using/windows.rst:1860 +#: ../../using/windows.rst:1891 msgid "py -2" msgstr "" -#: ../../using/windows.rst:1862 +#: ../../using/windows.rst:1893 msgid "" "If you see the following error, you do not have the launcher installed::" msgstr "" -#: ../../using/windows.rst:1864 +#: ../../using/windows.rst:1895 msgid "" "'py' is not recognized as an internal or external command,\n" "operable program or batch file." msgstr "" -#: ../../using/windows.rst:1867 +#: ../../using/windows.rst:1898 msgid "The command::" msgstr "" -#: ../../using/windows.rst:1869 +#: ../../using/windows.rst:1900 msgid "py --list" msgstr "" -#: ../../using/windows.rst:1871 +#: ../../using/windows.rst:1902 msgid "displays the currently installed version(s) of Python." msgstr "" -#: ../../using/windows.rst:1873 +#: ../../using/windows.rst:1904 msgid "" "The ``-x.y`` argument is the short form of the ``-V:Company/Tag`` argument, " "which allows selecting a specific Python runtime, including those that may " @@ -3017,14 +3067,14 @@ msgid "" "available runtimes using the ``-V:`` format." msgstr "" -#: ../../using/windows.rst:1879 +#: ../../using/windows.rst:1910 msgid "" "When using the ``-V:`` argument, specifying the Company will limit selection " "to runtimes from that provider, while specifying only the Tag will select " "from all providers. Note that omitting the slash implies a tag::" msgstr "" -#: ../../using/windows.rst:1883 +#: ../../using/windows.rst:1914 msgid "" "# Select any '3.*' tagged runtime\n" "py -V:3\n" @@ -3036,14 +3086,14 @@ msgid "" "py -V:PythonCore/3" msgstr "" -#: ../../using/windows.rst:1892 +#: ../../using/windows.rst:1923 msgid "" "The short form of the argument (``-3``) only ever selects from core Python " "releases, and not other distributions. However, the longer form (``-V:3``) " "will select from any." msgstr "" -#: ../../using/windows.rst:1896 +#: ../../using/windows.rst:1927 msgid "" "The Company is matched on the full string, case-insensitive. The Tag is " "matched on either the full string, or a prefix, provided the next character " @@ -3052,11 +3102,11 @@ msgid "" "``3.1``), but are compared using text (``-V:3.01`` does not match ``3.1``)." msgstr "" -#: ../../using/windows.rst:1904 +#: ../../using/windows.rst:1935 msgid "Virtual environments" msgstr "" -#: ../../using/windows.rst:1908 +#: ../../using/windows.rst:1939 msgid "" "If the launcher is run with no explicit Python version specification, and a " "virtual environment (created with the standard library :mod:`venv` module or " @@ -3066,42 +3116,42 @@ msgid "" "specify the global Python version." msgstr "" -#: ../../using/windows.rst:1916 +#: ../../using/windows.rst:1947 msgid "From a script" msgstr "" -#: ../../using/windows.rst:1918 +#: ../../using/windows.rst:1949 msgid "" "Let's create a test Python script - create a file called ``hello.py`` with " "the following contents" msgstr "" -#: ../../using/windows.rst:1921 +#: ../../using/windows.rst:1952 msgid "" "#! python\n" "import sys\n" "sys.stdout.write(\"hello from Python %s\\n\" % (sys.version,))" msgstr "" -#: ../../using/windows.rst:1927 +#: ../../using/windows.rst:1958 msgid "From the directory in which hello.py lives, execute the command::" msgstr "" -#: ../../using/windows.rst:1929 +#: ../../using/windows.rst:1960 msgid "py hello.py" msgstr "" -#: ../../using/windows.rst:1931 +#: ../../using/windows.rst:1962 msgid "" "You should notice the version number of your latest Python 2.x installation " "is printed. Now try changing the first line to be:" msgstr "" -#: ../../using/windows.rst:1934 +#: ../../using/windows.rst:1965 msgid "#! python3" msgstr "" -#: ../../using/windows.rst:1938 +#: ../../using/windows.rst:1969 msgid "" "Re-executing the command should now print the latest Python 3.x information. " "As with the above command-line examples, you can specify a more explicit " @@ -3110,7 +3160,7 @@ msgid "" "information printed." msgstr "" -#: ../../using/windows.rst:1944 +#: ../../using/windows.rst:1975 msgid "" "Note that unlike interactive use, a bare \"python\" will use the latest " "version of Python 2.x that you have installed. This is for backward " @@ -3118,11 +3168,11 @@ msgid "" "typically refers to Python 2." msgstr "" -#: ../../using/windows.rst:1950 +#: ../../using/windows.rst:1981 msgid "From file associations" msgstr "" -#: ../../using/windows.rst:1952 +#: ../../using/windows.rst:1983 msgid "" "The launcher should have been associated with Python files (i.e. ``.py``, ``." "pyw``, ``.pyc`` files) when it was installed. This means that when you " @@ -3131,13 +3181,13 @@ msgid "" "have the script specify the version which should be used." msgstr "" -#: ../../using/windows.rst:1958 +#: ../../using/windows.rst:1989 msgid "" "The key benefit of this is that a single launcher can support multiple " "Python versions at the same time depending on the contents of the first line." msgstr "" -#: ../../using/windows.rst:1964 +#: ../../using/windows.rst:1995 msgid "" "If the first line of a script file starts with ``#!``, it is known as a " "\"shebang\" line. Linux and other Unix like operating systems have native " @@ -3147,30 +3197,30 @@ msgid "" "demonstrate their use." msgstr "" -#: ../../using/windows.rst:1971 +#: ../../using/windows.rst:2002 msgid "" "To allow shebang lines in Python scripts to be portable between Unix and " "Windows, this launcher supports a number of 'virtual' commands to specify " "which interpreter to use. The supported virtual commands are:" msgstr "" -#: ../../using/windows.rst:1975 +#: ../../using/windows.rst:2006 msgid "``/usr/bin/env``" msgstr "" -#: ../../using/windows.rst:1976 +#: ../../using/windows.rst:2007 msgid "``/usr/bin/python``" msgstr "" -#: ../../using/windows.rst:1977 +#: ../../using/windows.rst:2008 msgid "``/usr/local/bin/python``" msgstr "" -#: ../../using/windows.rst:1978 +#: ../../using/windows.rst:2009 msgid "``python``" msgstr "" -#: ../../using/windows.rst:1992 +#: ../../using/windows.rst:2023 msgid "" "Any of the above virtual commands can be suffixed with an explicit version " "(either just the major version, or the major and minor version). Furthermore " @@ -3180,21 +3230,21 @@ msgid "" "and the environment will be used." msgstr "" -#: ../../using/windows.rst:2001 +#: ../../using/windows.rst:2032 msgid "" "Beginning with python launcher 3.7 it is possible to request 64-bit version " "by the \"-64\" suffix. Furthermore it is possible to specify a major and " "architecture without minor (i.e. ``/usr/bin/python3-64``)." msgstr "" -#: ../../using/windows.rst:2007 +#: ../../using/windows.rst:2038 msgid "" "The \"-64\" suffix is deprecated, and now implies \"any architecture that is " "not provably i386/32-bit\". To request a specific environment, use the new :" "samp:`-V:{TAG}` argument with the complete tag." msgstr "" -#: ../../using/windows.rst:2013 +#: ../../using/windows.rst:2044 msgid "" "Virtual commands referencing ``python`` now prefer an active virtual " "environment rather than searching :envvar:`PATH`. This handles cases where " @@ -3202,7 +3252,7 @@ msgid "" "not present in the active environment." msgstr "" -#: ../../using/windows.rst:2018 +#: ../../using/windows.rst:2049 msgid "" "The ``/usr/bin/env`` form of shebang line has one further special property. " "Before looking for installed Python interpreters, this form will search the " @@ -3216,7 +3266,7 @@ msgid "" "envvar:`PATH`." msgstr "" -#: ../../using/windows.rst:2029 +#: ../../using/windows.rst:2060 msgid "" "Shebang lines that do not match any of these patterns are looked up in the " "``[commands]`` section of the launcher's :ref:`.INI file `. " @@ -3227,13 +3277,13 @@ msgid "" "part of the filename)." msgstr "" -#: ../../using/windows.rst:2037 +#: ../../using/windows.rst:2068 msgid "" "[commands]\n" "/bin/xpython=C:\\Program Files\\XPython\\python.exe" msgstr "" -#: ../../using/windows.rst:2042 +#: ../../using/windows.rst:2073 msgid "" "Any commands not found in the .INI file are treated as **Windows** " "executable paths that are absolute or relative to the directory containing " @@ -3244,33 +3294,33 @@ msgid "" "will be appended." msgstr "" -#: ../../using/windows.rst:2051 +#: ../../using/windows.rst:2082 msgid "Arguments in shebang lines" msgstr "" -#: ../../using/windows.rst:2053 +#: ../../using/windows.rst:2084 msgid "" "The shebang lines can also specify additional options to be passed to the " "Python interpreter. For example, if you have a shebang line:" msgstr "" -#: ../../using/windows.rst:2056 +#: ../../using/windows.rst:2087 msgid "#! /usr/bin/python -v" msgstr "" -#: ../../using/windows.rst:2060 +#: ../../using/windows.rst:2091 msgid "Then Python will be started with the ``-v`` option" msgstr "" -#: ../../using/windows.rst:2063 +#: ../../using/windows.rst:2094 msgid "Customization" msgstr "" -#: ../../using/windows.rst:2068 +#: ../../using/windows.rst:2099 msgid "Customization via INI files" msgstr "" -#: ../../using/windows.rst:2070 +#: ../../using/windows.rst:2101 msgid "" "Two .ini files will be searched by the launcher - ``py.ini`` in the current " "user's application data directory (``%LOCALAPPDATA%`` or ``$env:" @@ -3279,7 +3329,7 @@ msgid "" "e. py.exe) and for the 'windows' version (i.e. pyw.exe)." msgstr "" -#: ../../using/windows.rst:2076 +#: ../../using/windows.rst:2107 msgid "" "Customization specified in the \"application directory\" will have " "precedence over the one next to the executable, so a user, who may not have " @@ -3287,11 +3337,11 @@ msgid "" "that global .ini file." msgstr "" -#: ../../using/windows.rst:2081 +#: ../../using/windows.rst:2112 msgid "Customizing default Python versions" msgstr "" -#: ../../using/windows.rst:2083 +#: ../../using/windows.rst:2114 msgid "" "In some cases, a version qualifier can be included in a command to dictate " "which version of Python will be used by the command. A version qualifier " @@ -3301,13 +3351,13 @@ msgid "" "\"-32\" or \"-64\"." msgstr "" -#: ../../using/windows.rst:2089 +#: ../../using/windows.rst:2120 msgid "" "For example, a shebang line of ``#!python`` has no version qualifier, while " "``#!python3`` has a version qualifier which specifies only a major version." msgstr "" -#: ../../using/windows.rst:2092 +#: ../../using/windows.rst:2123 msgid "" "If no version qualifiers are found in a command, the environment variable :" "envvar:`!PY_PYTHON` can be set to specify the default version qualifier. If " @@ -3317,7 +3367,7 @@ msgid "" "launcher included with Python 3.7 or newer.)" msgstr "" -#: ../../using/windows.rst:2099 +#: ../../using/windows.rst:2130 msgid "" "If no minor version qualifiers are found, the environment variable " "``PY_PYTHON{major}`` (where ``{major}`` is the current major version " @@ -3328,7 +3378,7 @@ msgid "" "version in that family." msgstr "" -#: ../../using/windows.rst:2107 +#: ../../using/windows.rst:2138 msgid "" "On 64-bit Windows with both 32-bit and 64-bit implementations of the same " "(major.minor) Python version installed, the 64-bit version will always be " @@ -3342,30 +3392,30 @@ msgid "" "suffix can be used on a version specifier to change this behaviour." msgstr "" -#: ../../using/windows.rst:2118 +#: ../../using/windows.rst:2149 msgid "Examples:" msgstr "Beispiele:" -#: ../../using/windows.rst:2120 +#: ../../using/windows.rst:2151 msgid "" "If no relevant options are set, the commands ``python`` and ``python2`` will " "use the latest Python 2.x version installed and the command ``python3`` will " "use the latest Python 3.x installed." msgstr "" -#: ../../using/windows.rst:2124 +#: ../../using/windows.rst:2155 msgid "" "The command ``python3.7`` will not consult any options at all as the " "versions are fully specified." msgstr "" -#: ../../using/windows.rst:2127 +#: ../../using/windows.rst:2158 msgid "" "If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use " "the latest installed Python 3 version." msgstr "" -#: ../../using/windows.rst:2130 +#: ../../using/windows.rst:2161 msgid "" "If ``PY_PYTHON=3.7-32``, the command ``python`` will use the 32-bit " "implementation of 3.7 whereas the command ``python3`` will use the latest " @@ -3373,13 +3423,13 @@ msgid "" "specified.)" msgstr "" -#: ../../using/windows.rst:2135 +#: ../../using/windows.rst:2166 msgid "" "If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7``, the commands ``python`` and " "``python3`` will both use specifically 3.7" msgstr "" -#: ../../using/windows.rst:2138 +#: ../../using/windows.rst:2169 msgid "" "In addition to environment variables, the same settings can be configured in " "the .INI file used by the launcher. The section in the INI file is called " @@ -3389,38 +3439,38 @@ msgid "" "will override things specified in the INI file." msgstr "" -#: ../../using/windows.rst:2145 +#: ../../using/windows.rst:2176 msgid "For example:" msgstr "Zum Beispiel:" -#: ../../using/windows.rst:2147 +#: ../../using/windows.rst:2178 msgid "Setting ``PY_PYTHON=3.7`` is equivalent to the INI file containing:" msgstr "" -#: ../../using/windows.rst:2149 +#: ../../using/windows.rst:2180 msgid "" "[defaults]\n" "python=3.7" msgstr "" -#: ../../using/windows.rst:2154 +#: ../../using/windows.rst:2185 msgid "" "Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7`` is equivalent to the INI file " "containing:" msgstr "" -#: ../../using/windows.rst:2157 +#: ../../using/windows.rst:2188 msgid "" "[defaults]\n" "python=3\n" "python3=3.7" msgstr "" -#: ../../using/windows.rst:2164 +#: ../../using/windows.rst:2195 msgid "Diagnostics" msgstr "" -#: ../../using/windows.rst:2166 +#: ../../using/windows.rst:2197 msgid "" "If an environment variable :envvar:`!PYLAUNCHER_DEBUG` is set (to any " "value), the launcher will print diagnostic information to stderr (i.e. to " @@ -3431,11 +3481,11 @@ msgid "" "debugging." msgstr "" -#: ../../using/windows.rst:2174 +#: ../../using/windows.rst:2205 msgid "Dry run" msgstr "" -#: ../../using/windows.rst:2176 +#: ../../using/windows.rst:2207 msgid "" "If an environment variable :envvar:`!PYLAUNCHER_DRYRUN` is set (to any " "value), the launcher will output the command it would have run, but will not " @@ -3445,11 +3495,11 @@ msgid "" "correctly in the console." msgstr "" -#: ../../using/windows.rst:2184 +#: ../../using/windows.rst:2215 msgid "Install on demand" msgstr "" -#: ../../using/windows.rst:2186 +#: ../../using/windows.rst:2217 msgid "" "If an environment variable :envvar:`!PYLAUNCHER_ALLOW_INSTALL` is set (to " "any value), and the requested Python version is not installed but is " @@ -3458,7 +3508,7 @@ msgid "" "command again." msgstr "" -#: ../../using/windows.rst:2191 +#: ../../using/windows.rst:2222 msgid "" "An additional :envvar:`!PYLAUNCHER_ALWAYS_INSTALL` variable causes the " "launcher to always try to install Python, even if it is detected. This is " @@ -3466,110 +3516,110 @@ msgid "" "PYLAUNCHER_DRYRUN`)." msgstr "" -#: ../../using/windows.rst:2196 +#: ../../using/windows.rst:2227 msgid "Return codes" msgstr "" -#: ../../using/windows.rst:2198 +#: ../../using/windows.rst:2229 msgid "" "The following exit codes may be returned by the Python launcher. " "Unfortunately, there is no way to distinguish these from the exit code of " "Python itself." msgstr "" -#: ../../using/windows.rst:2201 +#: ../../using/windows.rst:2232 msgid "" "The names of codes are as used in the sources, and are only for reference. " "There is no way to access or resolve them apart from reading this page. " "Entries are listed in alphabetical order of names." msgstr "" -#: ../../using/windows.rst:2206 +#: ../../using/windows.rst:2237 msgid "Value" msgstr "" -#: ../../using/windows.rst:2208 +#: ../../using/windows.rst:2239 msgid "RC_BAD_VENV_CFG" msgstr "" -#: ../../using/windows.rst:2208 +#: ../../using/windows.rst:2239 msgid "107" msgstr "" -#: ../../using/windows.rst:2208 +#: ../../using/windows.rst:2239 msgid "A :file:`pyvenv.cfg` was found but is corrupt." msgstr "" -#: ../../using/windows.rst:2210 +#: ../../using/windows.rst:2241 msgid "RC_CREATE_PROCESS" msgstr "" -#: ../../using/windows.rst:2210 +#: ../../using/windows.rst:2241 msgid "101" msgstr "" -#: ../../using/windows.rst:2210 +#: ../../using/windows.rst:2241 msgid "Failed to launch Python." msgstr "" -#: ../../using/windows.rst:2212 +#: ../../using/windows.rst:2243 msgid "RC_INSTALLING" msgstr "" -#: ../../using/windows.rst:2212 +#: ../../using/windows.rst:2243 msgid "111" msgstr "" -#: ../../using/windows.rst:2212 +#: ../../using/windows.rst:2243 msgid "" "An install was started, but the command will need to be re-run after it " "completes." msgstr "" -#: ../../using/windows.rst:2215 +#: ../../using/windows.rst:2246 msgid "RC_INTERNAL_ERROR" msgstr "" -#: ../../using/windows.rst:2215 +#: ../../using/windows.rst:2246 msgid "109" msgstr "" -#: ../../using/windows.rst:2215 +#: ../../using/windows.rst:2246 msgid "Unexpected error. Please report a bug." msgstr "" -#: ../../using/windows.rst:2217 +#: ../../using/windows.rst:2248 msgid "RC_NO_COMMANDLINE" msgstr "" -#: ../../using/windows.rst:2217 +#: ../../using/windows.rst:2248 msgid "108" msgstr "" -#: ../../using/windows.rst:2217 +#: ../../using/windows.rst:2248 msgid "Unable to obtain command line from the operating system." msgstr "" -#: ../../using/windows.rst:2220 +#: ../../using/windows.rst:2251 msgid "RC_NO_PYTHON" msgstr "" -#: ../../using/windows.rst:2220 +#: ../../using/windows.rst:2251 msgid "103" msgstr "" -#: ../../using/windows.rst:2220 +#: ../../using/windows.rst:2251 msgid "Unable to locate the requested version." msgstr "" -#: ../../using/windows.rst:2222 +#: ../../using/windows.rst:2253 msgid "RC_NO_VENV_CFG" msgstr "" -#: ../../using/windows.rst:2222 +#: ../../using/windows.rst:2253 msgid "106" msgstr "" -#: ../../using/windows.rst:2222 +#: ../../using/windows.rst:2253 msgid "A :file:`pyvenv.cfg` was required but not found." msgstr "" diff --git a/using/windows.po~ b/using/windows.po~ new file mode 100644 index 00000000..0d355459 --- /dev/null +++ b/using/windows.po~ @@ -0,0 +1,3575 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../using/windows.rst:13 +msgid "Using Python on Windows" +msgstr "Python unter Windows verwenden" + +#: ../../using/windows.rst:15 +msgid "" +"This document aims to give an overview of Windows-specific behaviour you " +"should know about when using Python on Microsoft Windows." +msgstr "" + +#: ../../using/windows.rst:18 +msgid "" +"Unlike most Unix systems and services, Windows does not include a system " +"supported installation of Python. Instead, Python can be obtained from a " +"number of distributors, including directly from the CPython team. Each " +"Python distribution will have its own benefits and drawbacks, however, " +"consistency with other tools you are using is generally a worthwhile " +"benefit. Before committing to the process described here, we recommend " +"investigating your existing tools to see if they can provide Python directly." +msgstr "" + +#: ../../using/windows.rst:26 +msgid "" +"To obtain Python from the CPython team, use the Python Install Manager. This " +"is a standalone tool that makes Python available as global commands on your " +"Windows machine, integrates with the system, and supports updates over time. " +"You can download the Python Install Manager from `python.org/downloads`_ or " +"through the `Microsoft Store app`_." +msgstr "" + +#: ../../using/windows.rst:32 +msgid "" +"Once you have installed the Python Install Manager, the global ``python`` " +"command can be used from any terminal to launch your current latest version " +"of Python. This version may change over time as you add or remove different " +"versions, and the ``py list`` command will show which is current." +msgstr "" + +#: ../../using/windows.rst:37 +msgid "" +"In general, we recommend that you create a :ref:`virtual environment ` for each project and run ``\\Scripts\\Activate`` in your " +"terminal to use it. This provides isolation between projects, consistency " +"over time, and ensures that additional commands added by packages are also " +"available in your session. Create a virtual environment using ``python -m " +"venv ``." +msgstr "" + +#: ../../using/windows.rst:43 +msgid "" +"If the ``python`` or ``py`` commands do not seem to be working, please see " +"the :ref:`Troubleshooting ` section below. There are " +"sometimes additional manual steps required to configure your PC." +msgstr "" + +#: ../../using/windows.rst:47 +msgid "" +"Apart from using the Python install manager, Python can also be obtained as " +"NuGet packages. See :ref:`windows-nuget` below for more information on these " +"packages." +msgstr "" + +#: ../../using/windows.rst:51 +msgid "" +"The embeddable distros are minimal packages of Python suitable for embedding " +"into larger applications. They can be installed using the Python install " +"manager. See :ref:`windows-embeddable` below for more information on these " +"packages." +msgstr "" + +#: ../../using/windows.rst:64 +msgid "Python install manager" +msgstr "" + +#: ../../using/windows.rst:67 +msgid "Installation" +msgstr "" + +#: ../../using/windows.rst:69 +msgid "" +"The Python install manager can be installed from the `Microsoft Store app`_ " +"or downloaded and installed from `python.org/downloads`_. The two versions " +"are identical." +msgstr "" + +#: ../../using/windows.rst:73 +msgid "" +"To install through the Store, simply click \"Install\". After it has " +"completed, open a terminal and type ``python`` to get started." +msgstr "" + +#: ../../using/windows.rst:76 +msgid "" +"To install the file downloaded from python.org, either double-click and " +"select \"Install\", or run ``Add-AppxPackage `` in Windows " +"Powershell." +msgstr "" + +#: ../../using/windows.rst:79 +msgid "" +"After installation, the ``python``, ``py``, and ``pymanager`` commands " +"should be available. If you have existing installations of Python, or you " +"have modified your :envvar:`PATH` variable, you may need to remove them or " +"undo the modifications. See :ref:`pymanager-troubleshoot` for more help with " +"fixing non-working commands." +msgstr "" + +#: ../../using/windows.rst:85 +msgid "" +"When you first install a runtime, you will likely be prompted to add a " +"directory to your :envvar:`PATH`. This is optional, if you prefer to use the " +"``py`` command, but is offered for those who prefer the full range of " +"aliases (such as ``python3.14.exe``) to be available. The directory will be :" +"file:`%LocalAppData%\\\\Python\\\\bin` by default, but may be customized by " +"an administrator. Click Start and search for \"Edit environment variables " +"for your account\" for the system settings page to add the path." +msgstr "" + +#: ../../using/windows.rst:93 +msgid "" +"Each Python runtime you install will have its own directory for scripts. " +"These also need to be added to :envvar:`PATH` if you want to use them." +msgstr "" + +#: ../../using/windows.rst:96 +msgid "" +"The Python install manager will be automatically updated to new releases. " +"This does not affect any installs of Python runtimes. Uninstalling the " +"Python install manager does not uninstall any Python runtimes." +msgstr "" + +#: ../../using/windows.rst:100 +msgid "" +"If you are not able to install an MSIX in your context, for example, you are " +"using automated deployment software that does not support it, or are " +"targeting Windows Server 2019, please see :ref:`pymanager-advancedinstall` " +"below for more information." +msgstr "" + +#: ../../using/windows.rst:107 +msgid "Basic use" +msgstr "" + +#: ../../using/windows.rst:109 +msgid "" +"The recommended command for launching Python is ``python``, which will " +"either launch the version requested by the script being launched, an active " +"virtual environment, or the default installed version, which will be the " +"latest stable release unless configured otherwise. If no version is " +"specifically requested and no runtimes are installed at all, the current " +"latest release will be installed automatically." +msgstr "" + +#: ../../using/windows.rst:116 +msgid "" +"For all scenarios involving multiple runtime versions, the recommended " +"command is ``py``. This may be used anywhere in place of ``python`` or the " +"older ``py.exe`` launcher. By default, ``py`` matches the behaviour of " +"``python``, but also allows command line options to select a specific " +"version as well as subcommands to manage installations. These are detailed " +"below." +msgstr "" + +#: ../../using/windows.rst:122 +msgid "" +"Because the ``py`` command may already be taken by the previous version, " +"there is also an unambiguous ``pymanager`` command. Scripted installs that " +"are intending to use Python install manager should consider using " +"``pymanager``, due to the lower chance of encountering a conflict with " +"existing installs. The only difference between the two commands is when " +"running without any arguments: ``py`` will launch your default interpreter, " +"while ``pymanager`` will display help (``pymanager exec ...`` provides " +"equivalent behaviour to ``py ...``)." +msgstr "" + +#: ../../using/windows.rst:130 +msgid "" +"Each of these commands also has a windowed version that avoids creating a " +"console window. These are ``pyw``, ``pythonw`` and ``pywmanager``. A " +"``python3`` command is also included that mimics the ``python`` command. It " +"is intended to catch accidental uses of the typical POSIX command on " +"Windows, but is not meant to be widely used or recommended." +msgstr "" + +#: ../../using/windows.rst:136 +msgid "" +"To launch your default runtime, run ``python`` or ``py`` with the arguments " +"you want to be passed to the runtime (such as script files or the module to " +"launch):" +msgstr "" + +#: ../../using/windows.rst:139 +msgid "" +"$> py\n" +"...\n" +"$> python my-script.py\n" +"...\n" +"$> py -m this\n" +"..." +msgstr "" + +#: ../../using/windows.rst:148 +msgid "" +"The default runtime can be overridden with the :envvar:" +"`PYTHON_MANAGER_DEFAULT` environment variable, or a configuration file. See :" +"ref:`pymanager-config` for information about configuration settings." +msgstr "" + +#: ../../using/windows.rst:152 +msgid "" +"To launch a specific runtime, the ``py`` command accepts a ``-V:`` " +"option. This option must be specified before any others. The tag is part or " +"all of the identifier for the runtime; for those from the CPython team, it " +"looks like the version, potentially with the platform. For compatibility, " +"the ``V:`` may be omitted in cases where the tag refers to an official " +"release and starts with ``3``." +msgstr "" + +#: ../../using/windows.rst:159 +msgid "" +"$> py -V:3.14 ...\n" +"$> py -V:3-arm64 ..." +msgstr "" + +#: ../../using/windows.rst:164 +msgid "" +"Runtimes from other distributors may require the *company* to be included as " +"well. It should be separated from the tag by a slash (either ``/`` or " +"``\\``), and may be shortened to any prefix of its full value. Specifying " +"the company is optional when it is ``PythonCore``, and specifying the tag is " +"optional (but not the slash) when you want the latest release from a " +"specific company." +msgstr "" + +#: ../../using/windows.rst:172 +msgid "" +"$> py -V:Distributor\\1.0 ...\n" +"$> py -V:distrib/ ..." +msgstr "" + +#: ../../using/windows.rst:177 +msgid "" +"If no version is specified, but a script file is passed, the script will be " +"inspected for a *shebang line*. This is a special format for the first line " +"in a file that allows overriding the command. See :ref:`pymanager-shebang` " +"for more information. When there is no shebang line, or it cannot be " +"resolved, the script will be launched with the default runtime." +msgstr "" + +#: ../../using/windows.rst:183 +msgid "" +"If you are running in an active virtual environment, have not requested a " +"particular version, and there is no shebang line, the default runtime will " +"be that virtual environment. In this scenario, the ``python`` command was " +"likely already overridden and none of these checks occurred. However, this " +"behaviour ensures that the ``py`` command can be used interchangeably." +msgstr "" + +#: ../../using/windows.rst:189 +msgid "" +"When no runtimes are installed, any launch command will try to install the " +"requested version and launch it. However, after any version is installed, " +"only the ``py exec ...`` and ``pymanager exec ...`` commands will install if " +"the requested version is absent. Other forms of commands will display an " +"error and direct you to use ``py install`` first." +msgstr "" + +#: ../../using/windows.rst:197 +msgid "Command help" +msgstr "" + +#: ../../using/windows.rst:199 +msgid "" +"The ``py help`` command will display the full list of supported commands, " +"along with their options. Any command may be passed the ``-?`` option to " +"display its help, or its name passed to ``py help``." +msgstr "" + +#: ../../using/windows.rst:203 +msgid "" +"$> py help\n" +"$> py help install\n" +"$> py install /?" +msgstr "" + +#: ../../using/windows.rst:210 +msgid "" +"All commands support some common options, which will be shown by ``py " +"help``. These options must be specified after any subcommand. Specifying ``-" +"v`` or ``--verbose`` will increase the amount of output shown, and ``-vv`` " +"will increase it further for debugging purposes. Passing ``-q`` or ``--" +"quiet`` will reduce output, and ``-qq`` will reduce it further." +msgstr "" + +#: ../../using/windows.rst:216 +msgid "" +"The ``--config=`` option allows specifying a configuration file to " +"override multiple settings at once. See :ref:`pymanager-config` below for " +"more information about these files." +msgstr "" + +#: ../../using/windows.rst:222 +msgid "Listing runtimes" +msgstr "" + +#: ../../using/windows.rst:224 +msgid "" +"$> py list [-f=|--format=] [-1|--one] [--online|-s=|--source=] " +"[...]" +msgstr "" + +#: ../../using/windows.rst:228 +msgid "" +"The list of installed runtimes can be seen using ``py list``. A filter may " +"be added in the form of one or more tags (with or without company " +"specifier), and each may include a ``<``, ``<=``, ``>=`` or ``>`` prefix to " +"restrict to a range." +msgstr "" + +#: ../../using/windows.rst:232 +msgid "" +"A range of formats are supported, and can be passed as the ``--" +"format=`` or ``-f `` option. Formats include ``table`` (a user " +"friendly table view), ``csv`` (comma-separated table), ``json`` (a single " +"JSON blob), ``jsonl`` (one JSON blob per result), ``exe`` (just the " +"executable path), ``prefix`` (just the prefix path)." +msgstr "" + +#: ../../using/windows.rst:238 +msgid "" +"The ``--one`` or ``-1`` option only displays a single result. If the default " +"runtime is included, it will be the one. Otherwise, the \"best\" result is " +"shown (\"best\" is deliberately vaguely defined, but will usually be the " +"most recent version). The result shown by ``py list --one `` will match " +"the runtime that would be launched by ``py -V:``." +msgstr "" + +#: ../../using/windows.rst:244 +msgid "" +"The ``--only-managed`` option excludes results that were not installed by " +"the Python install manager. This is useful when determining which runtimes " +"may be updated or uninstalled through the ``py`` command." +msgstr "" + +#: ../../using/windows.rst:248 +msgid "" +"The ``--online`` option is short for passing ``--source=`` with the " +"default source. Passing either of these options will search the online index " +"for runtimes that can be installed. The result shown by ``py list --online --" +"one `` will match the runtime that would be installed by ``py install " +"``." +msgstr "" + +#: ../../using/windows.rst:253 +msgid "$> py list --online 3.14" +msgstr "" + +#: ../../using/windows.rst:257 +msgid "" +"For compatibility with the old launcher, the ``--list``, ``--list-paths``, " +"``-0`` and ``-0p`` commands (e.g. ``py -0p``) are retained. They do not " +"allow additional options, and will produce legacy formatted output." +msgstr "" + +#: ../../using/windows.rst:263 +msgid "Installing runtimes" +msgstr "" + +#: ../../using/windows.rst:265 +msgid "" +"$> py install [-s=|--source=] [-f|--force] [-u|--update] [--dry-run] " +"[...]" +msgstr "" + +#: ../../using/windows.rst:269 +msgid "" +"New runtime versions may be added using ``py install``. One or more tags may " +"be specified, and the special tag ``default`` may be used to select the " +"default. Ranges are not supported for installation." +msgstr "" + +#: ../../using/windows.rst:273 +msgid "" +"The ``--source=`` option allows overriding the online index that is " +"used to obtain runtimes. This may be used with an offline index, as shown " +"in :ref:`pymanager-offline`." +msgstr "" + +#: ../../using/windows.rst:277 +msgid "" +"Passing ``--force`` will ignore any cached files and remove any existing " +"install to replace it with the specified one." +msgstr "" + +#: ../../using/windows.rst:280 +msgid "" +"Passing ``--update`` will replace existing installs if the new version is " +"newer. Otherwise, they will be left. If no tags are provided with ``--" +"update``, all installs managed by the Python install manager will be updated " +"if newer versions are available. Updates will remove any modifications made " +"to the install, including globally installed packages, but virtual " +"environments will continue to work." +msgstr "" + +#: ../../using/windows.rst:287 +msgid "" +"Passing ``--dry-run`` will generate output and logs, but will not modify any " +"installs." +msgstr "" + +#: ../../using/windows.rst:290 +msgid "" +"Passing ``--refresh`` will update all registrations for installed runtimes. " +"This will recreate Start menu shortcuts, registry keys, and global aliases " +"(such as ``python3.14.exe`` or for any installed scripts). These are " +"automatically refreshed on installation of any runtime, but may need to be " +"manually refreshed after installing packages." +msgstr "" + +#: ../../using/windows.rst:296 +msgid "" +"In addition to the above options, the ``--target`` option will extract the " +"runtime to the specified directory instead of doing a normal install. This " +"is useful for embedding runtimes into larger applications. Unlike a normal " +"install, ``py`` will not be aware of the extracted runtime, and no Start " +"menu or other shortcuts will be created. To launch the runtime, directly " +"execute the main executable (typically ``python.exe``) in the target " +"directory." +msgstr "" + +#: ../../using/windows.rst:304 +msgid "$> py install ... [-t=|--target=] " +msgstr "" + +#: ../../using/windows.rst:308 +msgid "" +"The ``py exec`` command will install the requested runtime if it is not " +"already present. This is controlled by the ``automatic_install`` " +"configuration (:envvar:`PYTHON_MANAGER_AUTOMATIC_INSTALL`), and is enabled " +"by default. If no runtimes are available at all, all launch commands will do " +"an automatic install if the configuration setting allows. This is to ensure " +"a good experience for new users, but should not generally be relied on " +"rather than using the ``py exec`` command or explicit install commands." +msgstr "" + +#: ../../using/windows.rst:320 +msgid "Offline installs" +msgstr "" + +#: ../../using/windows.rst:322 +msgid "" +"To perform offline installs of Python, you will need to first create an " +"offline index on a machine that has network access." +msgstr "" + +#: ../../using/windows.rst:325 +msgid "$> py install --download= ... ..." +msgstr "" + +#: ../../using/windows.rst:329 +msgid "" +"The ``--download=`` option will download the packages for the listed " +"tags and create a directory containing them and an ``index.json`` file " +"suitable for later installation. This entire directory can be moved to the " +"offline machine and used to install one or more of the bundled runtimes:" +msgstr "" + +#: ../../using/windows.rst:334 +msgid "$> py install --source=\"\\index.json\" ..." +msgstr "" + +#: ../../using/windows.rst:338 +msgid "" +"The Python install manager can be installed by downloading its installer and " +"moving it to another machine before installing." +msgstr "" + +#: ../../using/windows.rst:341 +msgid "" +"Alternatively, the ZIP files in an offline index directory can simply be " +"transferred to another machine and extracted. This will not register the " +"install in any way, and so it must be launched by directly referencing the " +"executables in the extracted directory, but it is sometimes a preferable " +"approach in cases where installing the Python install manager is not " +"possible or convenient." +msgstr "" + +#: ../../using/windows.rst:347 +msgid "" +"In this way, Python runtimes can be installed and managed on a machine " +"without access to the internet." +msgstr "" + +#: ../../using/windows.rst:352 +msgid "Uninstalling runtimes" +msgstr "" + +#: ../../using/windows.rst:354 +msgid "$> py uninstall [-y|--yes] ..." +msgstr "" + +#: ../../using/windows.rst:358 +msgid "" +"Runtimes may be removed using the ``py uninstall`` command. One or more tags " +"must be specified. Ranges are not supported here." +msgstr "" + +#: ../../using/windows.rst:361 +msgid "" +"The ``--yes`` option bypasses the confirmation prompt before uninstalling." +msgstr "" + +#: ../../using/windows.rst:363 +msgid "" +"Instead of passing tags individually, the ``--purge`` option may be " +"specified. This will remove all runtimes managed by the Python install " +"manager, including cleaning up the Start menu, registry, and any download " +"caches. Runtimes that were not installed by the Python install manager will " +"not be impacted, and neither will manually created configuration files." +msgstr "" + +#: ../../using/windows.rst:369 +msgid "$> py uninstall [-y|--yes] --purge" +msgstr "" + +#: ../../using/windows.rst:373 +msgid "" +"The Python install manager can be uninstalled through the Windows " +"\"Installed apps\" settings page. This does not remove any runtimes, and " +"they will still be usable, though the global ``python`` and ``py`` commands " +"will be removed. Reinstalling the Python install manager will allow you to " +"manage these runtimes again. To completely clean up all Python runtimes, run " +"with ``--purge`` before uninstalling the Python install manager." +msgstr "" + +#: ../../using/windows.rst:383 +msgid "Configuration" +msgstr "" + +#: ../../using/windows.rst:385 +msgid "" +"Python install manager is configured with a hierarchy of configuration " +"files, environment variables, command-line options, and registry settings. " +"In general, configuration files have the ability to configure everything, " +"including the location of other configuration files, while registry settings " +"are administrator-only and will override configuration files. Command-line " +"options override all other settings, but not every option is available." +msgstr "" + +#: ../../using/windows.rst:392 +msgid "" +"This section will describe the defaults, but be aware that modified or " +"overridden installs may resolve settings differently." +msgstr "" + +#: ../../using/windows.rst:395 +msgid "" +"A global configuration file may be configured by an administrator, and would " +"be read first. The user configuration file is stored at :file:`%AppData%\\" +"\\Python\\\\pymanager.json` (note that this location is under ``Roaming``, " +"not ``Local``) and is read next, overwriting any settings from earlier " +"files. An additional configuration file may be specified as the " +"``PYTHON_MANAGER_CONFIG`` environment variable or the ``--config`` command " +"line option (but not both). These locations may be modified by " +"administrative customization options listed later." +msgstr "" + +#: ../../using/windows.rst:405 +msgid "" +"The following settings are those that are considered likely to be modified " +"in normal use. Later sections list those that are intended for " +"administrative customization." +msgstr "" + +#: ../../using/windows.rst:413 +msgid "Standard configuration options" +msgstr "" + +#: ../../using/windows.rst:417 ../../using/windows.rst:754 +msgid "Config Key" +msgstr "" + +#: ../../using/windows.rst:418 +msgid "Environment Variable" +msgstr "" + +#: ../../using/windows.rst:419 ../../using/windows.rst:755 +#: ../../using/windows.rst:1596 ../../using/windows.rst:1616 +#: ../../using/windows.rst:2206 +msgid "Description" +msgstr "Beschreibung" + +#: ../../using/windows.rst:421 +msgid "``default_tag``" +msgstr "" + +#: ../../using/windows.rst:423 +msgid "" +"The preferred default version to launch or install. By default, this is " +"interpreted as the most recent non-prerelease version from the CPython team." +msgstr "" + +#: ../../using/windows.rst:427 +msgid "``default_platform``" +msgstr "" + +#: ../../using/windows.rst:428 +msgid "``PYTHON_MANAGER_DEFAULT_PLATFORM``" +msgstr "" + +#: ../../using/windows.rst:429 +msgid "" +"The preferred default platform to launch or install. This is treated as a " +"suffix to the specified tag, such that ``py -V:3.14`` would prefer an " +"install for ``3.14-64`` if it exists (and ``default_platform`` is ``-64``), " +"but will use ``3.14`` if no tagged install exists." +msgstr "" + +#: ../../using/windows.rst:435 +msgid "``logs_dir``" +msgstr "" + +#: ../../using/windows.rst:436 +msgid "``PYTHON_MANAGER_LOGS``" +msgstr "" + +#: ../../using/windows.rst:437 +msgid "The location where log files are written. By default, :file:`%TEMP%`." +msgstr "" + +#: ../../using/windows.rst:440 +msgid "``automatic_install``" +msgstr "" + +#: ../../using/windows.rst:442 +msgid "" +"True to allow automatic installs when using ``py exec`` to launch (or ``py`` " +"when no runtimes are installed yet). Other commands will not automatically " +"install, regardless of this setting. By default, true." +msgstr "" + +#: ../../using/windows.rst:448 +msgid "``include_unmanaged``" +msgstr "" + +#: ../../using/windows.rst:449 +msgid "``PYTHON_MANAGER_INCLUDE_UNMANAGED``" +msgstr "" + +#: ../../using/windows.rst:450 +msgid "" +"True to allow listing and launching runtimes that were not installed by the " +"Python install manager, or false to exclude them. By default, true." +msgstr "" + +#: ../../using/windows.rst:454 +msgid "``shebang_can_run_anything``" +msgstr "" + +#: ../../using/windows.rst:455 +msgid "``PYTHON_MANAGER_SHEBANG_CAN_RUN_ANYTHING``" +msgstr "" + +#: ../../using/windows.rst:456 +msgid "" +"True to allow shebangs in ``.py`` files to launch applications other than " +"Python runtimes, or false to prevent it. By default, true." +msgstr "" + +#: ../../using/windows.rst:460 +msgid "``shebang_templates``" +msgstr "" + +#: ../../using/windows.rst:461 ../../using/windows.rst:485 +#: ../../using/windows.rst:498 ../../using/windows.rst:504 +#: ../../using/windows.rst:511 +msgid "(none)" +msgstr "" + +#: ../../using/windows.rst:462 +msgid "" +"Mapping from shebang line template to alternative command, such as ``py -V:" +"`` or a substitute string. See :ref:`pymanager-shebang` for more " +"details." +msgstr "" + +#: ../../using/windows.rst:466 +msgid "``log_level``" +msgstr "" + +#: ../../using/windows.rst:467 +msgid "``PYMANAGER_VERBOSE``, ``PYMANAGER_DEBUG``" +msgstr "" + +#: ../../using/windows.rst:468 +msgid "" +"Set the default level of output (0-50). By default, 20. Lower values produce " +"more output. The environment variables are boolean, and may produce " +"additional output during startup that is later suppressed by other " +"configuration." +msgstr "" + +#: ../../using/windows.rst:474 +msgid "``confirm``" +msgstr "" + +#: ../../using/windows.rst:475 +msgid "``PYTHON_MANAGER_CONFIRM``" +msgstr "" + +#: ../../using/windows.rst:476 +msgid "" +"True to confirm certain actions before taking them (such as uninstall), or " +"false to skip the confirmation. By default, true." +msgstr "" + +#: ../../using/windows.rst:480 +msgid "``install.source``" +msgstr "" + +#: ../../using/windows.rst:481 +msgid "``PYTHON_MANAGER_SOURCE_URL``" +msgstr "" + +#: ../../using/windows.rst:482 +msgid "Override the index feed to obtain new installs from." +msgstr "" + +#: ../../using/windows.rst:484 +msgid "``install.enable_entrypoints``" +msgstr "" + +#: ../../using/windows.rst:486 +msgid "" +"True to generate global commands for installed packages (such as ``pip." +"exe``). These are defined by the packages themselves. If set to false, only " +"the Python interpreter has global commands created. By default, true. You " +"should run ``py install --refresh`` after changing this setting." +msgstr "" + +#: ../../using/windows.rst:492 +msgid "``list.format``" +msgstr "" + +#: ../../using/windows.rst:493 +msgid "``PYTHON_MANAGER_LIST_FORMAT``" +msgstr "" + +#: ../../using/windows.rst:494 +msgid "" +"Specify the default format used by the ``py list`` command. By default, " +"``table``." +msgstr "" + +#: ../../using/windows.rst:497 +msgid "``install_dir``" +msgstr "" + +#: ../../using/windows.rst:499 +msgid "" +"Specify the root directory that runtimes will be installed into. If you " +"change this setting, previously installed runtimes will not be usable unless " +"you move them to the new location." +msgstr "" + +#: ../../using/windows.rst:503 +msgid "``global_dir``" +msgstr "" + +#: ../../using/windows.rst:505 +msgid "" +"Specify the directory where global commands (such as ``python3.14.exe`` and " +"``pip.exe``) are stored. This directory should be added to your :envvar:" +"`PATH` to make the commands available from your terminal." +msgstr "" + +#: ../../using/windows.rst:510 +msgid "``download_dir``" +msgstr "" + +#: ../../using/windows.rst:512 +msgid "" +"Specify the directory where downloaded files are stored. This directory is a " +"temporary cache, and can be cleaned up from time to time." +msgstr "" + +#: ../../using/windows.rst:517 +msgid "" +"Dotted names should be nested inside JSON objects, for example, ``list." +"format`` would be specified as ``{\"list\": {\"format\": \"table\"}}``." +msgstr "" + +#: ../../using/windows.rst:523 ../../using/windows.rst:1962 +msgid "Shebang lines" +msgstr "" + +#: ../../using/windows.rst:525 +msgid "" +"If the first line of a script file starts with ``#!``, it is known as a " +"\"shebang\" line. Linux and other Unix like operating systems have native " +"support for such lines and they are commonly used on such systems to " +"indicate how a script should be executed. The ``python`` and ``py`` commands " +"allow the same facilities to be used with Python scripts on Windows." +msgstr "" + +#: ../../using/windows.rst:531 +msgid "" +"To allow shebang lines in Python scripts to be portable between Unix and " +"Windows, a number of 'virtual' commands are supported to specify which " +"interpreter to use. The supported virtual commands are:" +msgstr "" + +#: ../../using/windows.rst:535 +msgid "``/usr/bin/env ``" +msgstr "" + +#: ../../using/windows.rst:536 +msgid "``/usr/bin/env -S ``" +msgstr "" + +#: ../../using/windows.rst:537 +msgid "``/usr/bin/``" +msgstr "" + +#: ../../using/windows.rst:538 +msgid "``/usr/local/bin/``" +msgstr "" + +#: ../../using/windows.rst:539 +msgid "````" +msgstr "" + +#: ../../using/windows.rst:541 ../../using/windows.rst:1980 +msgid "For example, if the first line of your script starts with" +msgstr "" + +#: ../../using/windows.rst:543 ../../using/windows.rst:1982 +msgid "#! /usr/bin/python" +msgstr "" + +#: ../../using/windows.rst:547 ../../using/windows.rst:1986 +msgid "" +"The default Python or an active virtual environment will be located and " +"used. As many Python scripts written to work on Unix will already have this " +"line, you should find these scripts can be used by the launcher without " +"modification. If you are writing a new script on Windows which you hope will " +"be useful on Unix, you should use one of the shebang lines starting with ``/" +"usr``." +msgstr "" + +#: ../../using/windows.rst:553 +msgid "" +"Any of the above virtual commands can have ```` replaced by an alias " +"from an installed runtime. That is, any command generated in the global " +"aliases directory (which you may have added to your :envvar:`PATH` " +"environment variable) can be used in a shebang, even if it is not on your :" +"envvar:`PATH`. This allows the use of shebangs like ``/usr/bin/python3.12`` " +"to select a particular runtime." +msgstr "" + +#: ../../using/windows.rst:559 +msgid "" +"If no runtimes are installed, or if automatic installation is enabled, the " +"requested runtime will be installed if necessary. See :ref:`pymanager-" +"config` for information about configuration settings." +msgstr "" + +#: ../../using/windows.rst:563 +msgid "" +"The ``/usr/bin/env`` form of shebang line will also search the :envvar:" +"`PATH` environment variable for unrecognized commands. This corresponds to " +"the behaviour of the Unix ``env`` program, which performs the same search, " +"but prefers launching known Python commands. A warning may be displayed when " +"searching for arbitrary executables, and this search may be disabled by the " +"``shebang_can_run_anything`` configuration option." +msgstr "" + +#: ../../using/windows.rst:570 +msgid "" +"Shebang lines that do not match any of patterns are treated as *Windows* " +"executable paths that are absolute or relative to the directory containing " +"the script file. This is a convenience for Windows-only scripts, such as " +"those generated by an installer, since the behavior is not compatible with " +"Unix-style shells. These paths may be quoted, and may include multiple " +"arguments, after which the path to the script and any additional arguments " +"will be appended. This functionality may be disabled by the " +"``shebang_can_run_anything`` configuration option." +msgstr "" + +#: ../../using/windows.rst:579 +msgid "" +"Since version 26.3 of the Python install manager, custom shebang templates " +"may be added to your configuration file. Add the ``shebang_templates`` " +"object with one member for each template (the string to match) and the " +"command to use when the template is matched. Most commands should be ``py -V:" +"`` (or ``pyw``) to launch one of your installed runtimes. The ``py -3." +"`` form is also allowed, as is a plain ``py`` to launch the " +"default. No other arguments are supported." +msgstr "" + +#: ../../using/windows.rst:587 +msgid "" +"{\n" +" \"shebang_templates\": {\n" +" \"/usr/bin/python\": \"py\",\n" +" \"/usr/bin/my_custom_python\": \"py -V:MyCustomPython/3\"\n" +" }\n" +"}" +msgstr "" + +#: ../../using/windows.rst:596 +msgid "" +"If the substitute command is not ``py`` or ``pyw``, it will be written back " +"into the shebang and regular handling continues. If launching arbitrary " +"executables is permitted, then providing a full path will allow you to " +"redirect from Python to any executable. The template should match either the " +"entire line (ignoring leading and trailing whitespace), or up to the first " +"space in the shebang line." +msgstr "" + +#: ../../using/windows.rst:605 +msgid "" +"The behaviour of shebangs in the Python install manager is subtly different " +"from the previous ``py.exe`` launcher, and the old configuration options no " +"longer apply. If you are specifically reliant on the old behaviour or " +"configuration, we recommend installing the `legacy launcher`_. The legacy " +"launcher's ``py`` command will override PyManager's one by default, and you " +"will need to use ``pymanager`` commands for installing and uninstalling." +msgstr "" + +#: ../../using/windows.rst:623 +msgid "Advanced installation" +msgstr "" + +#: ../../using/windows.rst:625 +msgid "" +"For situations where an MSIX cannot be installed, such as some older " +"administrative distribution platforms, there is an MSI available from the " +"python.org downloads page. This MSI has no user interface, and can only " +"perform per-machine installs to its default location in Program Files. It " +"will attempt to modify the system :envvar:`PATH` environment variable to " +"include this install location, but be sure to validate this on your " +"configuration." +msgstr "" + +#: ../../using/windows.rst:634 +msgid "" +"Windows Server 2019 is the only version of Windows that CPython supports " +"that does not support MSIX. For Windows Server 2019, you should use the MSI." +msgstr "" + +#: ../../using/windows.rst:637 +msgid "" +"Be aware that the MSI package does not bundle any runtimes, and so is not " +"suitable for installs into offline environments without also creating an " +"offline install index. See :ref:`pymanager-offline` and :ref:`pymanager-" +"admin-config` for information on handling these scenarios." +msgstr "" + +#: ../../using/windows.rst:642 +msgid "" +"Runtimes installed by the MSI are shared with those installed by the MSIX, " +"and are all per-user only. The Python install manager does not support " +"installing runtimes per-machine. To emulate a per-machine install, you can " +"use ``py install --target=`` as administrator and add your " +"own system-wide modifications to :envvar:`PATH`, the registry, or the Start " +"menu." +msgstr "" + +#: ../../using/windows.rst:648 +msgid "" +"When the MSIX is installed, but commands are not available in the :envvar:" +"`PATH` environment variable, they can be found under :file:`%LocalAppData%\\" +"\\Microsoft\\\\WindowsApps\\\\PythonSoftwareFoundation." +"PythonManager_3847v3x7pw1km` or :file:`%LocalAppData%\\\\Microsoft\\" +"\\WindowsApps\\\\PythonSoftwareFoundation.PythonManager_qbz5n2kfra8p0`, " +"depending on whether it was installed from python.org or through the Windows " +"Store. Attempting to run the executable directly from Program Files is not " +"recommended." +msgstr "" + +#: ../../using/windows.rst:657 +msgid "" +"To programmatically install the Python install manager, it is easiest to use " +"WinGet, which is included with all supported versions of Windows:" +msgstr "" + +#: ../../using/windows.rst:660 +msgid "" +"$> winget install 9NQ7512CXL7T -e --accept-package-agreements --disable-" +"interactivity\n" +"\n" +"# Optionally run the configuration checker and accept all changes\n" +"$> py install --configure -y" +msgstr "" + +#: ../../using/windows.rst:667 +msgid "" +"To download the Python install manager and install on another machine, the " +"following WinGet command will download the required files from the Store to " +"your Downloads directory (add ``-d `` to customize the output " +"location). This also generates a YAML file that appears to be unnecessary, " +"as the downloaded MSIX can be installed by launching or using the commands " +"below." +msgstr "" + +#: ../../using/windows.rst:673 +msgid "" +"$> winget download 9NQ7512CXL7T -e --skip-license --accept-package-" +"agreements --accept-source-agreements" +msgstr "" + +#: ../../using/windows.rst:677 +msgid "" +"To programmatically install or uninstall an MSIX using only PowerShell, the " +"`Add-AppxPackage`_ and `Remove-AppxPackage`_ PowerShell cmdlets are " +"recommended:" +msgstr "" + +#: ../../using/windows.rst:680 +msgid "" +"$> Add-AppxPackage C:\\Downloads\\python-manager-25.0.msix\n" +"...\n" +"$> Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-" +"AppxPackage" +msgstr "" + +#: ../../using/windows.rst:686 +msgid "" +"The latest release can be downloaded and installed by Windows by passing the " +"AppInstaller file to the Add-AppxPackage command. This installs using the " +"MSIX on python.org, and is only recommended for cases where installing via " +"the Store (interactively or using WinGet) is not possible." +msgstr "" + +#: ../../using/windows.rst:691 +msgid "" +"$> Add-AppxPackage -AppInstallerFile https://www.python.org/ftp/python/" +"pymanager/pymanager.appinstaller" +msgstr "" + +#: ../../using/windows.rst:695 +msgid "" +"Other tools and APIs may also be used to provision an MSIX package for all " +"users on a machine, but Python does not consider this a supported scenario. " +"We suggest looking into the PowerShell `Add-AppxProvisionedPackage`_ cmdlet, " +"the native Windows `PackageManager`_ class, or the documentation and support " +"for your deployment tool." +msgstr "" + +#: ../../using/windows.rst:701 +msgid "" +"Regardless of the install method, users will still need to install their own " +"copies of Python itself, as there is no way to trigger those installs " +"without being a logged in user. When using the MSIX, the latest version of " +"Python will be available for all users to install without network access." +msgstr "" + +#: ../../using/windows.rst:706 +msgid "" +"Note that the MSIX downloadable from the Store and from the Python website " +"are subtly different and cannot be installed at the same time. Wherever " +"possible, we suggest using the above WinGet commands to download the package " +"from the Store to reduce the risk of setting up conflicting installs. There " +"are no licensing restrictions on the Python install manager that would " +"prevent using the Store package in this way." +msgstr "" + +#: ../../using/windows.rst:717 +msgid "Administrative configuration" +msgstr "" + +#: ../../using/windows.rst:719 +msgid "" +"There are a number of options that may be useful for administrators to " +"override configuration of the Python install manager. These can be used to " +"provide local caching, disable certain shortcut types, override bundled " +"content. All of the above configuration options may be set, as well as those " +"below." +msgstr "" + +#: ../../using/windows.rst:724 +msgid "" +"Configuration options may be overridden in the registry by setting values " +"under :file:`HKEY_LOCAL_MACHINE\\\\Software\\\\Policies\\\\Python\\" +"\\PyManager`, where the value name matches the configuration key and the " +"value type is ``REG_SZ``. Note that this key can itself be customized, but " +"only by modifying the core config file distributed with the Python install " +"manager. We recommend, however, that registry values are used only to set " +"``base_config`` to a JSON file containing the full set of overrides. " +"Registry key overrides will replace any other configured setting, while " +"``base_config`` allows users to further modify settings they may need." +msgstr "" + +#: ../../using/windows.rst:734 +msgid "" +"Note that most settings with environment variables support those variables " +"because their default setting specifies the variable. If you override them, " +"the environment variable will no longer work, unless you override it with " +"another one. For example, the default value of ``confirm`` is literally " +"``%PYTHON_MANAGER_CONFIRM%``, which will resolve the variable at load time. " +"If you override the value to ``yes``, then the environment variable will no " +"longer be used. If you override the value to ``%CONFIRM%``, then that " +"environment variable will be used instead." +msgstr "" + +#: ../../using/windows.rst:743 +msgid "" +"Configuration settings that are paths are interpreted as relative to the " +"directory containing the configuration file that specified them." +msgstr "" + +#: ../../using/windows.rst:750 +msgid "Administrative configuration options" +msgstr "" + +#: ../../using/windows.rst:757 +msgid "``base_config``" +msgstr "" + +#: ../../using/windows.rst:758 +msgid "" +"The highest priority configuration file to read. Note that only the built-in " +"configuration file and the registry can modify this setting." +msgstr "" + +#: ../../using/windows.rst:762 +msgid "``user_config``" +msgstr "" + +#: ../../using/windows.rst:763 +msgid "The second configuration file to read." +msgstr "" + +#: ../../using/windows.rst:765 +msgid "``additional_config``" +msgstr "" + +#: ../../using/windows.rst:766 +msgid "The third configuration file to read." +msgstr "" + +#: ../../using/windows.rst:768 +msgid "``registry_override_key``" +msgstr "" + +#: ../../using/windows.rst:769 +msgid "" +"Registry location to check for overrides. Note that only the built-in " +"configuration file can modify this setting." +msgstr "" + +#: ../../using/windows.rst:772 +msgid "``bundled_dir``" +msgstr "" + +#: ../../using/windows.rst:773 +msgid "Read-only directory containing locally cached files." +msgstr "" + +#: ../../using/windows.rst:775 +msgid "``install.fallback_source``" +msgstr "" + +#: ../../using/windows.rst:776 +msgid "" +"Path or URL to an index to consult when the main index cannot be accessed." +msgstr "" + +#: ../../using/windows.rst:778 +msgid "``install.enable_shortcut_kinds``" +msgstr "" + +#: ../../using/windows.rst:779 +msgid "" +"Comma-separated list of shortcut kinds to allow (e.g. ``\"pep514,start\"``). " +"Enabled shortcuts may still be disabled by ``disable_shortcut_kinds``." +msgstr "" + +#: ../../using/windows.rst:782 +msgid "``install.disable_shortcut_kinds``" +msgstr "" + +#: ../../using/windows.rst:783 +msgid "" +"Comma-separated list of shortcut kinds to exclude (e.g. ``\"pep514," +"start\"``). Disabled shortcuts are not reactivated by " +"``enable_shortcut_kinds``." +msgstr "" + +#: ../../using/windows.rst:787 +msgid "``install.hard_link_entrypoints``" +msgstr "" + +#: ../../using/windows.rst:788 +msgid "" +"True to use hard links for global shortcuts to save disk space. If false, " +"each shortcut executable is copied instead. After changing this setting, you " +"must run ``py install --refresh --force`` to update existing commands. By " +"default, true. Disabling this may be necessary for troubleshooting or " +"systems that have issues with file links." +msgstr "" + +#: ../../using/windows.rst:795 +msgid "``pep514_root``" +msgstr "" + +#: ../../using/windows.rst:796 +msgid "" +"Registry location to read and write PEP 514 entries into. By default, :file:" +"`HKEY_CURRENT_USER\\\\Software\\\\Python`." +msgstr "" + +#: ../../using/windows.rst:799 +msgid "``start_folder``" +msgstr "" + +#: ../../using/windows.rst:800 +msgid "" +"Start menu folder to write shortcuts into. By default, ``Python``. This path " +"is relative to the user's Programs folder." +msgstr "" + +#: ../../using/windows.rst:804 +msgid "``virtual_env``" +msgstr "" + +#: ../../using/windows.rst:805 +msgid "" +"Path to the active virtual environment. By default, this is " +"``%VIRTUAL_ENV%``, but may be set empty to disable venv detection." +msgstr "" + +#: ../../using/windows.rst:809 +msgid "``shebang_can_run_anything_silently``" +msgstr "" + +#: ../../using/windows.rst:810 +msgid "" +"True to suppress visible warnings when a shebang launches an application " +"other than a Python runtime." +msgstr "" + +#: ../../using/windows.rst:813 +msgid "``source_settings``" +msgstr "" + +#: ../../using/windows.rst:814 +msgid "" +"A mapping from source URL to settings specific to that index. When multiple " +"configuration files include this section, URL settings are added or " +"overwritten, but individual settings are not merged. These settings are " +"currently only for :ref:`index signatures `." +msgstr "" + +#: ../../using/windows.rst:824 ../../using/windows.rst:1775 +msgid "Installing free-threaded binaries" +msgstr "" + +#: ../../using/windows.rst:828 +msgid "" +"Pre-built distributions of the free-threaded build are available by " +"installing tags with the ``t`` suffix." +msgstr "" + +#: ../../using/windows.rst:831 +msgid "" +"$> py install 3.14t\n" +"$> py install 3.14t-arm64\n" +"$> py install 3.14t-32" +msgstr "" + +#: ../../using/windows.rst:837 +msgid "" +"This will install and register as normal. If you have no other runtimes " +"installed, then ``python`` will launch this one. Otherwise, you will need to " +"use ``py -V:3.14t ...`` or, if you have added the global aliases directory " +"to your :envvar:`PATH` environment variable, the ``python3.14t.exe`` " +"commands." +msgstr "" + +#: ../../using/windows.rst:846 +msgid "Index signatures" +msgstr "" + +#: ../../using/windows.rst:850 +msgid "" +"Index files may be signed to detect tampering. A signature is a catalog file " +"at the same URL as the index with ``.cat`` added to the filename. The " +"catalog file should contain the hash of its matching index file, and should " +"be signed with a valid Authenticode signature. This allows standard tooling " +"(on Windows) to generate a signature, and any certificate may be used as " +"long as the client operating system already trusts its certification " +"authority (root CA)." +msgstr "" + +#: ../../using/windows.rst:857 +msgid "" +"Index signatures are only downloaded and checked when the local " +"configuration's ``source_settings`` section includes the index URL and " +"``requires_signature`` is true, or the index JSON contains " +"``requires_signature`` set to true. When the setting exists in local " +"configuration, even when false, settings in the index are ignored." +msgstr "" + +#: ../../using/windows.rst:863 +msgid "" +"As well as requiring a valid signature, the ``required_root_subject`` and " +"``required_publisher_subject`` settings can further restrict acceptable " +"signatures based on the certificate Subject fields. Any attribute specified " +"in the configuration must match the attribute in the certificate (additional " +"attributes in the certificate are ignored). Typical attributes are ``CN=`` " +"for the common name, ``O=`` for the organizational unit, and ``C=`` for the " +"publisher's country." +msgstr "" + +#: ../../using/windows.rst:871 +msgid "" +"Finally, the ``required_publisher_eku`` setting allows requiring that a " +"specific Enhanced Key Usage (EKU) has been assigned to the publisher " +"certificate. For example, the EKU ``1.3.6.1.5.5.7.3.3`` indicates that the " +"certificate was intended for code signing (as opposed to server or client " +"authentication). In combination with a specific root CA, this provides " +"another mechanism to verify a legitimate signature." +msgstr "" + +#: ../../using/windows.rst:878 +msgid "" +"This is an example ``source_settings`` section from a configuration file. In " +"this case, the publisher of the feed is uniquely identified by the " +"combination of the Microsoft Identity Verification root and the EKU assigned " +"by that root. The signature for this case would be found at ``https://www." +"python.org/ftp/python/index-windows.json.cat``." +msgstr "" + +#: ../../using/windows.rst:884 +msgid "" +"{\n" +" \"source_settings\": {\n" +" \"https://www.python.org/ftp/python/index-windows.json\": {\n" +" \"requires_signature\": true,\n" +" \"required_root_subject\": \"CN=Microsoft Identity Verification Root " +"Certificate Authority 2020\",\n" +" \"required_publisher_subject\": \"CN=Python Software Foundation\",\n" +" \"required_publisher_eku\": " +"\"1.3.6.1.4.1.311.97.608394634.79987812.305991749.578777327\"\n" +" }\n" +" }\n" +"}" +msgstr "" + +#: ../../using/windows.rst:897 +msgid "" +"The same settings could be specified in the ``index.json`` file instead. In " +"this case, the root and EKU are omitted, meaning that the signature must be " +"valid and have a specific common name in the publisher's certificate, but no " +"other checks are used." +msgstr "" + +#: ../../using/windows.rst:902 +msgid "" +"{\n" +" \"requires_signature\": true,\n" +" \"required_publisher_subject\": \"CN=Python Software Foundation\",\n" +" \"versions\": [\n" +" // ...\n" +" ]\n" +"}" +msgstr "" + +#: ../../using/windows.rst:912 +msgid "" +"When settings from inside a feed are used, the user is notified and the " +"settings are shown in the log file or verbose output. It is recommended to " +"copy these settings into a local configuration file for feeds that will be " +"used frequently, so that unauthorised modifications to the feed cannot " +"disable verification." +msgstr "" + +#: ../../using/windows.rst:917 +msgid "" +"It is not possible to override the location of the signature file in the " +"feed or through a configuration file. Administrators can provide their own " +"``source_settings`` in a mandatory configuration file (see :ref:`pymanager-" +"admin-config`)." +msgstr "" + +#: ../../using/windows.rst:922 +msgid "" +"If signature validation fails, you will be notified and prompted to " +"continue. When interactive confirmation is not allowed (for example, because " +"``--yes`` was specified), it will always abort. To use a feed with invalid " +"configuration in this scenario, you must provide a configuration file that " +"disables signature checking for that feed." +msgstr "" + +#: ../../using/windows.rst:928 +msgid "" +"\"source_settings\": {\n" +" \"https://www.example.com/feed-with-invalid-signature.json\": {\n" +" \"requires_signature\": false\n" +" }\n" +"}" +msgstr "" + +#: ../../using/windows.rst:940 ../../using/windows.rst:952 +msgid "Troubleshooting" +msgstr "" + +#: ../../using/windows.rst:942 +msgid "" +"If your Python install manager does not seem to be working correctly, please " +"work through these tests and fixes to see if it helps. If not, please report " +"an issue at `our bug tracker `_, " +"including any relevant log files (written to your :file:`%TEMP%` directory " +"by default)." +msgstr "" + +#: ../../using/windows.rst:956 +msgid "Symptom" +msgstr "" + +#: ../../using/windows.rst:957 +msgid "Things to try" +msgstr "" + +#: ../../using/windows.rst:959 +msgid "" +"``python`` gives me a \"command not found\" error or opens the Store app " +"when I type it in my terminal." +msgstr "" + +#: ../../using/windows.rst:961 ../../using/windows.rst:980 +msgid "Did you :ref:`install the Python install manager `?" +msgstr "" + +#: ../../using/windows.rst:964 ../../using/windows.rst:983 +msgid "" +"Click Start, open \"Manage app execution aliases\", and check that the " +"aliases for \"Python (default)\" are enabled. If they already are, try " +"disabling and re-enabling to refresh the command. The \"Python (default " +"windowed)\" and \"Python install manager\" commands may also need refreshing." +msgstr "" + +#: ../../using/windows.rst:971 +msgid "Check that the ``py`` and ``pymanager`` commands work." +msgstr "" + +#: ../../using/windows.rst:974 ../../using/windows.rst:990 +msgid "" +"Ensure your :envvar:`PATH` variable contains the entry for ``%UserProfile%" +"\\AppData\\Local\\Microsoft\\WindowsApps``. The operating system includes " +"this entry once by default, after other user paths. If removed, shortcuts " +"will not be found." +msgstr "" + +#: ../../using/windows.rst:979 +msgid "" +"``py`` gives me a \"command not found\" error when I type it in my terminal." +msgstr "" + +#: ../../using/windows.rst:995 +msgid "" +"``py`` gives me a \"can't open file\" error when I type commands in my " +"terminal." +msgstr "" + +#: ../../using/windows.rst:997 +msgid "" +"This usually means you have the legacy launcher installed and it has " +"priority over the Python install manager. To remove, click Start, open " +"\"Installed apps\", search for \"Python launcher\" and uninstall it." +msgstr "" + +#: ../../using/windows.rst:1002 +msgid "``python`` doesn't launch the same runtime as ``py``" +msgstr "" + +#: ../../using/windows.rst:1003 +msgid "" +"Click Start, open \"Installed apps\", look for any existing Python runtimes, " +"and either remove them or Modify and disable the :envvar:`PATH` options." +msgstr "" + +#: ../../using/windows.rst:1007 +msgid "" +"Click Start, open \"Manage app execution aliases\", and check that your " +"``python.exe`` alias is set to \"Python (default)\"" +msgstr "" + +#: ../../using/windows.rst:1010 +msgid "``python`` and ``py`` don't launch the runtime I expect" +msgstr "" + +#: ../../using/windows.rst:1011 +msgid "" +"Check your :envvar:`PYTHON_MANAGER_DEFAULT` environment variable or " +"``default_tag`` configuration. The ``py list`` command will show your " +"default based on these settings." +msgstr "" + +#: ../../using/windows.rst:1016 +msgid "" +"Installs that are managed by the Python install manager will be chosen ahead " +"of unmanaged installs. Use ``py install`` to install the runtime you expect, " +"or configure your default tag." +msgstr "" + +#: ../../using/windows.rst:1022 +msgid "" +"Prerelease and experimental installs that are not managed by the Python " +"install manager may be chosen ahead of stable releases. Configure your " +"default tag or uninstall the prerelease runtime and reinstall it using ``py " +"install``." +msgstr "" + +#: ../../using/windows.rst:1027 +msgid "" +"``pythonw`` or ``pyw`` don't launch the same runtime as ``python`` or ``py``" +msgstr "" + +#: ../../using/windows.rst:1028 +msgid "" +"Click Start, open \"Manage app execution aliases\", and check that your " +"``pythonw.exe`` and ``pyw.exe`` aliases are consistent with your others." +msgstr "" + +#: ../../using/windows.rst:1031 +msgid "" +"``pip`` gives me a \"command not found\" error when I type it in my terminal." +msgstr "" + +#: ../../using/windows.rst:1032 ../../using/windows.rst:1044 +msgid "" +"Have you activated a virtual environment? Run the ``." +"venv\\Scripts\\activate`` script in your terminal to activate." +msgstr "" + +#: ../../using/windows.rst:1036 +msgid "" +"The package may be available but missing the generated executable. We " +"recommend using the ``python -m pip`` command instead. Running ``py install " +"--refresh`` and ensuring that the global shortcuts directory is on :envvar:" +"`PATH` (it will be shown in the command output if it is not) should make " +"commands such as ``pip`` (and other installed packages) available." +msgstr "" + +#: ../../using/windows.rst:1043 +msgid "I installed a package with ``pip`` but its command is not found." +msgstr "" + +#: ../../using/windows.rst:1048 +msgid "" +"New packages do not automatically have global shortcuts created by the " +"Python install manager. Similarly, uninstalled packages do not have their " +"shortcuts removed. Run ``py install --refresh`` to update the global " +"shortcuts for newly installed packages." +msgstr "" + +#: ../../using/windows.rst:1054 +msgid "Typing ``script-name.py`` in the terminal opens in a new window." +msgstr "" + +#: ../../using/windows.rst:1055 +msgid "" +"This is a known limitation of the operating system. Either specify ``py`` " +"before the script name, create a batch file containing ``@py \"%~dpn0.py\" " +"%*`` with the same name as the script, or install the `legacy launcher`_ and " +"select it as the association for scripts." +msgstr "" + +#: ../../using/windows.rst:1060 +msgid "Drag-dropping files onto a script doesn't work" +msgstr "" + +#: ../../using/windows.rst:1061 +msgid "" +"This is a known limitation of the operating system. It is supported with the " +"`legacy launcher`_, or with the Python install manager when installed from " +"the MSI." +msgstr "" + +#: ../../using/windows.rst:1065 +msgid "I have installed the Python install manager multiple times." +msgstr "" + +#: ../../using/windows.rst:1066 +msgid "" +"It is possible to install from the Store or WinGet, from the MSIX on the " +"Python website, and from the MSI, all at once. They are all compatible and " +"will share configuration and runtimes." +msgstr "" + +#: ../../using/windows.rst:1071 +msgid "" +"See the earlier :ref:`pymanager-advancedinstall` section for ways to " +"uninstall the install manager other than the typical Installed Apps (Add and " +"Remove Programs) settings page." +msgstr "" + +#: ../../using/windows.rst:1075 +msgid "My old ``py.ini`` settings no longer work." +msgstr "" + +#: ../../using/windows.rst:1076 +msgid "" +"The new Python install manager no longer supports this configuration file or " +"its settings, and so it will be ignored. See :ref:`pymanager-config` for " +"information about configuration settings." +msgstr "" + +#: ../../using/windows.rst:1083 +msgid "The embeddable package" +msgstr "" + +#: ../../using/windows.rst:1087 +msgid "" +"The embedded distribution is a ZIP file containing a minimal Python " +"environment. It is intended for acting as part of another application, " +"rather than being directly accessed by end-users." +msgstr "" + +#: ../../using/windows.rst:1091 +msgid "" +"To install an embedded distribution, we recommend using ``py install`` with " +"the ``--target`` option:" +msgstr "" + +#: ../../using/windows.rst:1094 +msgid "$> py install 3.14-embed --target=" +msgstr "" + +#: ../../using/windows.rst:1098 +msgid "" +"When extracted, the embedded distribution is (almost) fully isolated from " +"the user's system, including environment variables, system registry " +"settings, and installed packages. The standard library is included as pre-" +"compiled and optimized ``.pyc`` files in a ZIP, and ``python3.dll``, " +"``python313.dll``, ``python.exe`` and ``pythonw.exe`` are all provided. Tcl/" +"tk (including all dependents, such as Idle), pip and the Python " +"documentation are not included." +msgstr "" + +#: ../../using/windows.rst:1105 +msgid "" +"A default ``._pth`` file is included, which further restricts the default " +"search paths (as described below in :ref:`windows_finding_modules`). This " +"file is intended for embedders to modify as necessary." +msgstr "" + +#: ../../using/windows.rst:1109 +msgid "" +"Third-party packages should be installed by the application installer " +"alongside the embedded distribution. Using pip to manage dependencies as for " +"a regular Python installation is not supported with this distribution, " +"though with some care it may be possible to include and use pip for " +"automatic updates. In general, third-party packages should be treated as " +"part of the application (\"vendoring\") so that the developer can ensure " +"compatibility with newer versions before providing updates to users." +msgstr "" + +#: ../../using/windows.rst:1117 +msgid "" +"The two recommended use cases for this distribution are described below." +msgstr "" + +#: ../../using/windows.rst:1120 +msgid "Python application" +msgstr "" + +#: ../../using/windows.rst:1122 +msgid "" +"An application written in Python does not necessarily require users to be " +"aware of that fact. The embedded distribution may be used in this case to " +"include a private version of Python in an install package. Depending on how " +"transparent it should be (or conversely, how professional it should appear), " +"there are two options." +msgstr "" + +#: ../../using/windows.rst:1128 +msgid "" +"Using a specialized executable as a launcher requires some coding, but " +"provides the most transparent experience for users. With a customized " +"launcher, there are no obvious indications that the program is running on " +"Python: icons can be customized, company and version information can be " +"specified, and file associations behave properly. In most cases, a custom " +"launcher should simply be able to call ``Py_Main`` with a hard-coded command " +"line." +msgstr "" + +#: ../../using/windows.rst:1135 +msgid "" +"The simpler approach is to provide a batch file or generated shortcut that " +"directly calls the ``python.exe`` or ``pythonw.exe`` with the required " +"command-line arguments. In this case, the application will appear to be " +"Python and not its actual name, and users may have trouble distinguishing it " +"from other running Python processes or file associations." +msgstr "" + +#: ../../using/windows.rst:1141 +msgid "" +"With the latter approach, packages should be installed as directories " +"alongside the Python executable to ensure they are available on the path. " +"With the specialized launcher, packages can be located in other locations as " +"there is an opportunity to specify the search path before launching the " +"application." +msgstr "" + +#: ../../using/windows.rst:1147 +msgid "Embedding Python" +msgstr "" + +#: ../../using/windows.rst:1149 +msgid "" +"Applications written in native code often require some form of scripting " +"language, and the embedded Python distribution can be used for this purpose. " +"In general, the majority of the application is in native code, and some part " +"will either invoke ``python.exe`` or directly use ``python3.dll``. For " +"either case, extracting the embedded distribution to a subdirectory of the " +"application installation is sufficient to provide a loadable Python " +"interpreter." +msgstr "" + +#: ../../using/windows.rst:1156 +msgid "" +"As with the application use, packages can be installed to any location as " +"there is an opportunity to specify search paths before initializing the " +"interpreter. Otherwise, there is no fundamental differences between using " +"the embedded distribution and a regular installation." +msgstr "" + +#: ../../using/windows.rst:1165 +msgid "The nuget.org packages" +msgstr "" + +#: ../../using/windows.rst:1169 +msgid "" +"The nuget.org package is a reduced size Python environment intended for use " +"on continuous integration and build systems that do not have a system-wide " +"install of Python. While nuget is \"the package manager for .NET\", it also " +"works perfectly fine for packages containing build-time tools." +msgstr "" + +#: ../../using/windows.rst:1174 +msgid "" +"Visit `nuget.org `_ for the most up-to-date " +"information on using nuget. What follows is a summary that is sufficient for " +"Python developers." +msgstr "" + +#: ../../using/windows.rst:1178 +msgid "" +"The ``nuget.exe`` command line tool may be downloaded directly from " +"``https://dist.nuget.org/win-x86-commandline/latest/nuget.exe``, for " +"example, using curl or PowerShell. With the tool, the latest version of " +"Python for 64-bit or 32-bit machines is installed using::" +msgstr "" + +#: ../../using/windows.rst:1183 +msgid "" +"nuget.exe install python -ExcludeVersion -OutputDirectory .\n" +"nuget.exe install pythonx86 -ExcludeVersion -OutputDirectory ." +msgstr "" + +#: ../../using/windows.rst:1186 +msgid "" +"To select a particular version, add a ``-Version 3.x.y``. The output " +"directory may be changed from ``.``, and the package will be installed into " +"a subdirectory. By default, the subdirectory is named the same as the " +"package, and without the ``-ExcludeVersion`` option this name will include " +"the specific version installed. Inside the subdirectory is a ``tools`` " +"directory that contains the Python installation:" +msgstr "" + +#: ../../using/windows.rst:1193 +msgid "" +"# Without -ExcludeVersion\n" +"> .\\python.3.5.2\\tools\\python.exe -V\n" +"Python 3.5.2\n" +"\n" +"# With -ExcludeVersion\n" +"> .\\python\\tools\\python.exe -V\n" +"Python 3.5.2" +msgstr "" + +#: ../../using/windows.rst:1203 +msgid "" +"In general, nuget packages are not upgradeable, and newer versions should be " +"installed side-by-side and referenced using the full path. Alternatively, " +"delete the package directory manually and install it again. Many CI systems " +"will do this automatically if they do not preserve files between builds." +msgstr "" + +#: ../../using/windows.rst:1208 +msgid "" +"Alongside the ``tools`` directory is a ``build\\native`` directory. This " +"contains a MSBuild properties file ``python.props`` that can be used in a C+" +"+ project to reference the Python install. Including the settings will " +"automatically use the headers and import libraries in your build." +msgstr "" + +#: ../../using/windows.rst:1213 +msgid "" +"The package information pages on nuget.org are `www.nuget.org/packages/" +"python `_ for the 64-bit version, " +"`www.nuget.org/packages/pythonx86 `_ for the 32-bit version, and `www.nuget.org/packages/pythonarm64 " +"`_ for the ARM64 version" +msgstr "" + +#: ../../using/windows.rst:1221 +msgid "Free-threaded packages" +msgstr "" + +#: ../../using/windows.rst:1225 +msgid "" +"Packages containing free-threaded binaries are named `python-freethreaded " +"`_ for the 64-bit " +"version, `pythonx86-freethreaded `_ for the 32-bit version, and `pythonarm64-freethreaded " +"`_ for the ARM64 " +"version. These packages contain both the ``python3.13t.exe`` and ``python." +"exe`` entry points, both of which run free threaded." +msgstr "" + +#: ../../using/windows.rst:1236 +msgid "Alternative bundles" +msgstr "" + +#: ../../using/windows.rst:1238 +msgid "" +"Besides the standard CPython distribution, there are modified packages " +"including additional functionality. The following is a list of popular " +"versions and their key features:" +msgstr "" + +#: ../../using/windows.rst:1242 +msgid "`ActivePython `_" +msgstr "" + +#: ../../using/windows.rst:1243 +msgid "Installer with multi-platform compatibility, documentation, PyWin32" +msgstr "" + +#: ../../using/windows.rst:1245 +msgid "`Anaconda `_" +msgstr "" + +#: ../../using/windows.rst:1246 +msgid "" +"Popular scientific modules (such as numpy, scipy and pandas) and the " +"``conda`` package manager." +msgstr "" + +#: ../../using/windows.rst:1249 +msgid "" +"`Enthought Deployment Manager `_" +msgstr "" + +#: ../../using/windows.rst:1250 +msgid "\"The Next Generation Python Environment and Package Manager\"." +msgstr "" + +#: ../../using/windows.rst:1252 +msgid "" +"Previously Enthought provided Canopy, but it `reached end of life in 2016 " +"`_." +msgstr "" + +#: ../../using/windows.rst:1255 +msgid "`WinPython `_" +msgstr "" + +#: ../../using/windows.rst:1256 +msgid "" +"Windows-specific distribution with prebuilt scientific packages and tools " +"for building packages." +msgstr "" + +#: ../../using/windows.rst:1259 +msgid "" +"Note that these packages may not include the latest versions of Python or " +"other libraries, and are not maintained or supported by the core Python team." +msgstr "" + +#: ../../using/windows.rst:1264 +msgid "Supported Windows versions" +msgstr "" + +#: ../../using/windows.rst:1266 +msgid "" +"As specified in :pep:`11`, a Python release only supports a Windows platform " +"while Microsoft considers the platform under extended support. This means " +"that Python |version| supports Windows 10 and newer. If you require Windows " +"7 support, please install Python 3.8. If you require Windows 8.1 support, " +"please install Python 3.12." +msgstr "" + +#: ../../using/windows.rst:1276 ../../using/windows.rst:1562 +msgid "Removing the MAX_PATH limitation" +msgstr "" + +#: ../../using/windows.rst:1278 ../../using/windows.rst:1564 +msgid "" +"Windows historically has limited path lengths to 260 characters. This meant " +"that paths longer than this would not resolve and errors would result." +msgstr "" + +#: ../../using/windows.rst:1281 +msgid "" +"In the latest versions of Windows, this limitation can be expanded to over " +"32,000 characters. Your administrator will need to activate the \"Enable " +"Win32 long paths\" group policy, or set ``LongPathsEnabled`` to ``1`` in the " +"registry key " +"``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem``." +msgstr "" + +#: ../../using/windows.rst:1286 ../../using/windows.rst:1573 +msgid "" +"This allows the :func:`open` function, the :mod:`os` module and most other " +"path functionality to accept and return paths longer than 260 characters." +msgstr "" + +#: ../../using/windows.rst:1289 +msgid "" +"After changing the above option and rebooting, no further configuration is " +"required." +msgstr "" + +#: ../../using/windows.rst:1296 +msgid "UTF-8 mode" +msgstr "" + +#: ../../using/windows.rst:1301 +msgid "Python UTF-8 mode is now enabled by default (:pep:`686`)." +msgstr "" + +#: ../../using/windows.rst:1303 +msgid "" +"Windows still uses legacy encodings for the system encoding (the ANSI Code " +"Page). Python uses it for the default encoding of text files (e.g. :func:" +"`locale.getencoding`)." +msgstr "" + +#: ../../using/windows.rst:1307 +msgid "" +"This may cause issues because UTF-8 is widely used on the internet and most " +"Unix systems, including WSL (Windows Subsystem for Linux)." +msgstr "" + +#: ../../using/windows.rst:1310 +msgid "" +"The :ref:`Python UTF-8 Mode `, enabled by default, can help by " +"changing the default text encoding to UTF-8. When the :ref:`UTF-8 mode ` is enabled, you can still use the system encoding (the ANSI Code " +"Page) via the \"mbcs\" codec." +msgstr "" + +#: ../../using/windows.rst:1315 +msgid "" +"You can disable the :ref:`Python UTF-8 Mode ` via the ``-X " +"utf8=0`` command line option, or the ``PYTHONUTF8=0`` environment variable. " +"See :envvar:`PYTHONUTF8` for disabling UTF-8 mode, and :ref:`setting-" +"envvars` for how to modify environment variables." +msgstr "" + +#: ../../using/windows.rst:1321 +msgid "" +"Adding ``PYTHONUTF8={0,1}`` to the default environment variables will affect " +"all Python 3.7+ applications on your system. If you have any Python 3.7+ " +"applications which rely on the legacy system encoding, it is recommended to " +"set the environment variable temporarily or use the ``-X utf8`` command line " +"option." +msgstr "" + +#: ../../using/windows.rst:1328 +msgid "" +"Even when UTF-8 mode is disabled, Python uses UTF-8 by default on Windows " +"for:" +msgstr "" + +#: ../../using/windows.rst:1331 +msgid "Console I/O including standard I/O (see :pep:`528` for details)." +msgstr "" + +#: ../../using/windows.rst:1332 +msgid "" +"The :term:`filesystem encoding ` " +"(see :pep:`529` for details)." +msgstr "" + +#: ../../using/windows.rst:1339 +msgid "Finding modules" +msgstr "Module finden" + +#: ../../using/windows.rst:1341 +msgid "" +"These notes supplement the description at :ref:`sys-path-init` with detailed " +"Windows notes." +msgstr "" + +#: ../../using/windows.rst:1344 +msgid "" +"When no ``._pth`` file is found, this is how :data:`sys.path` is populated " +"on Windows:" +msgstr "" + +#: ../../using/windows.rst:1347 +msgid "" +"An empty entry is added at the start, which corresponds to the current " +"directory." +msgstr "" + +#: ../../using/windows.rst:1350 +msgid "" +"If the environment variable :envvar:`PYTHONPATH` exists, as described in :" +"ref:`using-on-envvars`, its entries are added next. Note that on Windows, " +"paths in this variable must be separated by semicolons, to distinguish them " +"from the colon used in drive identifiers (``C:\\`` etc.)." +msgstr "" + +#: ../../using/windows.rst:1355 +msgid "" +"Additional \"application paths\" can be added in the registry as subkeys of :" +"samp:`\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\{version}\\\\PythonPath` under " +"both the ``HKEY_CURRENT_USER`` and ``HKEY_LOCAL_MACHINE`` hives. Subkeys " +"which have semicolon-delimited path strings as their default value will " +"cause each path to be added to :data:`sys.path`. (Note that all known " +"installers only use HKLM, so HKCU is typically empty.)" +msgstr "" + +#: ../../using/windows.rst:1362 +msgid "" +"If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as " +"\"Python Home\". Otherwise, the path of the main Python executable is used " +"to locate a \"landmark file\" (either ``Lib\\os.py`` or ``pythonXY.zip``) to " +"deduce the \"Python Home\". If a Python home is found, the relevant sub-" +"directories added to :data:`sys.path` (``Lib``, ``plat-win``, etc) are based " +"on that folder. Otherwise, the core Python path is constructed from the " +"PythonPath stored in the registry." +msgstr "" + +#: ../../using/windows.rst:1370 +msgid "" +"If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified " +"in the environment, and no registry entries can be found, a default path " +"with relative entries is used (e.g. ``.\\Lib;.\\plat-win``, etc)." +msgstr "" + +#: ../../using/windows.rst:1374 +msgid "" +"If a ``pyvenv.cfg`` file is found alongside the main executable or in the " +"directory one level above the executable, the following variations apply:" +msgstr "" + +#: ../../using/windows.rst:1377 +msgid "" +"If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this " +"path is used instead of the path to the main executable when deducing the " +"home location." +msgstr "" + +#: ../../using/windows.rst:1381 +msgid "The end result of all this is:" +msgstr "" + +#: ../../using/windows.rst:1383 +msgid "" +"When running :file:`python.exe`, or any other .exe in the main Python " +"directory (either an installed version, or directly from the PCbuild " +"directory), the core path is deduced, and the core paths in the registry are " +"ignored. Other \"application paths\" in the registry are always read." +msgstr "" + +#: ../../using/windows.rst:1388 +msgid "" +"When Python is hosted in another .exe (different directory, embedded via " +"COM, etc), the \"Python Home\" will not be deduced, so the core path from " +"the registry is used. Other \"application paths\" in the registry are " +"always read." +msgstr "" + +#: ../../using/windows.rst:1392 +msgid "" +"If Python can't find its home and there are no registry value (frozen .exe, " +"some very strange installation setup) you get a path with some default, but " +"relative, paths." +msgstr "" + +#: ../../using/windows.rst:1396 +msgid "" +"For those who want to bundle Python into their application or distribution, " +"the following advice will prevent conflicts with other installations:" +msgstr "" + +#: ../../using/windows.rst:1399 +msgid "" +"Include a ``._pth`` file alongside your executable containing the " +"directories to include. This will ignore paths listed in the registry and " +"environment variables, and also ignore :mod:`site` unless ``import site`` is " +"listed." +msgstr "" + +#: ../../using/windows.rst:1404 +msgid "" +"If you are loading :file:`python3.dll` or :file:`python37.dll` in your own " +"executable, explicitly set :c:member:`PyConfig.module_search_paths` before :" +"c:func:`Py_InitializeFromConfig`." +msgstr "" + +#: ../../using/windows.rst:1408 +msgid "" +"Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME` " +"before launching :file:`python.exe` from your application." +msgstr "" + +#: ../../using/windows.rst:1411 +msgid "" +"If you cannot use the previous suggestions (for example, you are a " +"distribution that allows people to run :file:`python.exe` directly), ensure " +"that the landmark file (:file:`Lib\\\\os.py`) exists in your install " +"directory. (Note that it will not be detected inside a ZIP file, but a " +"correctly named ZIP file will be detected instead.)" +msgstr "" + +#: ../../using/windows.rst:1417 +msgid "" +"These will ensure that the files in a system-wide installation will not take " +"precedence over the copy of the standard library bundled with your " +"application. Otherwise, your users may experience problems using your " +"application. Note that the first suggestion is the best, as the others may " +"still be susceptible to non-standard paths in the registry and user site-" +"packages." +msgstr "" + +#: ../../using/windows.rst:1425 +msgid "" +"Add ``._pth`` file support and removes ``applocal`` option from ``pyvenv." +"cfg``." +msgstr "" + +#: ../../using/windows.rst:1430 +msgid "" +"Add :file:`python{XX}.zip` as a potential landmark when directly adjacent to " +"the executable." +msgstr "" + +#: ../../using/windows.rst:1435 +msgid "" +"Modules specified in the registry under ``Modules`` (not ``PythonPath``) may " +"be imported by :class:`importlib.machinery.WindowsRegistryFinder`. This " +"finder is enabled on Windows in 3.6.0 and earlier, but may need to be " +"explicitly added to :data:`sys.meta_path` in the future." +msgstr "" + +#: ../../using/windows.rst:1441 +msgid "Additional modules" +msgstr "" + +#: ../../using/windows.rst:1443 +msgid "" +"Even though Python aims to be portable among all platforms, there are " +"features that are unique to Windows. A couple of modules, both in the " +"standard library and external, and snippets exist to use these features." +msgstr "" + +#: ../../using/windows.rst:1447 +msgid "" +"The Windows-specific standard modules are documented in :ref:`mswin-specific-" +"services`." +msgstr "" + +#: ../../using/windows.rst:1451 +msgid "PyWin32" +msgstr "" + +#: ../../using/windows.rst:1453 +msgid "" +"The :pypi:`PyWin32` module by Mark Hammond is a collection of modules for " +"advanced Windows-specific support. This includes utilities for:" +msgstr "" + +#: ../../using/windows.rst:1457 +msgid "" +"`Component Object Model `_ (COM)" +msgstr "" + +#: ../../using/windows.rst:1460 +msgid "Win32 API calls" +msgstr "" + +#: ../../using/windows.rst:1461 +msgid "Registry" +msgstr "" + +#: ../../using/windows.rst:1462 +msgid "Event log" +msgstr "" + +#: ../../using/windows.rst:1463 +msgid "" +"`Microsoft Foundation Classes `_ (MFC) user interfaces" +msgstr "" + +#: ../../using/windows.rst:1467 +msgid "" +"`PythonWin `_ is a sample MFC application shipped with PyWin32. " +"It is an embeddable IDE with a built-in debugger." +msgstr "" + +#: ../../using/windows.rst:1473 +msgid "" +"`Win32 How Do I...? `_" +msgstr "" + +#: ../../using/windows.rst:1474 +msgid "by Tim Golden" +msgstr "" + +#: ../../using/windows.rst:1476 +msgid "`Python and COM `_" +msgstr "" + +#: ../../using/windows.rst:1477 +msgid "by David and Paul Boddie" +msgstr "" + +#: ../../using/windows.rst:1481 +msgid "cx_Freeze" +msgstr "" + +#: ../../using/windows.rst:1483 +msgid "" +"`cx_Freeze `_ wraps Python " +"scripts into executable Windows programs (:file:`{*}.exe` files). When you " +"have done this, you can distribute your application without requiring your " +"users to install Python." +msgstr "" + +#: ../../using/windows.rst:1490 +msgid "Compiling Python on Windows" +msgstr "" + +#: ../../using/windows.rst:1492 +msgid "" +"If you want to compile CPython yourself, first thing you should do is get " +"the `source `_. You can download " +"either the latest release's source or just grab a fresh `checkout `_." +msgstr "" + +#: ../../using/windows.rst:1497 +msgid "" +"The source tree contains a build solution and project files for Microsoft " +"Visual Studio, which is the compiler used to build the official Python " +"releases. These files are in the :file:`PCbuild` directory." +msgstr "" + +#: ../../using/windows.rst:1501 +msgid "" +"Check :file:`PCbuild/readme.txt` for general information on the build " +"process." +msgstr "" + +#: ../../using/windows.rst:1503 +msgid "For extension modules, consult :ref:`building-on-windows`." +msgstr "" + +#: ../../using/windows.rst:1510 +msgid "The full installer (deprecated)" +msgstr "" + +#: ../../using/windows.rst:1514 +msgid "" +"This installer is deprecated since 3.14 and will not be produced for Python " +"3.16 or later. See :ref:`pymanager` for the modern installer." +msgstr "" + +#: ../../using/windows.rst:1519 +msgid "Installation steps" +msgstr "" + +#: ../../using/windows.rst:1521 +msgid "" +"Four Python |version| installers are available for download - two each for " +"the 32-bit and 64-bit versions of the interpreter. The *web installer* is a " +"small initial download, and it will automatically download the required " +"components as necessary. The *offline installer* includes the components " +"necessary for a default installation and only requires an internet " +"connection for optional features. See :ref:`install-layout-option` for other " +"ways to avoid downloading during installation." +msgstr "" + +#: ../../using/windows.rst:1529 +msgid "After starting the installer, one of two options may be selected:" +msgstr "" +"Nach dem Starten den Installers kann eine der beiden Optionen ausgewählt " +"werden:" + +#: ../../using/windows.rst:1533 +msgid "If you select \"Install Now\":" +msgstr "Wenn Sie \"Jetzt installieren\" wählen:" + +#: ../../using/windows.rst:1535 +msgid "" +"You will *not* need to be an administrator (unless a system update for the C " +"Runtime Library is required or you install the :ref:`launcher` for all users)" +msgstr "" + +#: ../../using/windows.rst:1538 +msgid "Python will be installed into your user directory" +msgstr "" + +#: ../../using/windows.rst:1539 +msgid "" +"The :ref:`launcher` will be installed according to the option at the bottom " +"of the first page" +msgstr "" + +#: ../../using/windows.rst:1541 +msgid "The standard library, test suite, launcher and pip will be installed" +msgstr "" + +#: ../../using/windows.rst:1542 +msgid "If selected, the install directory will be added to your :envvar:`PATH`" +msgstr "" + +#: ../../using/windows.rst:1543 +msgid "Shortcuts will only be visible for the current user" +msgstr "" + +#: ../../using/windows.rst:1545 +msgid "" +"Selecting \"Customize installation\" will allow you to select the features " +"to install, the installation location and other options or post-install " +"actions. To install debugging symbols or binaries, you will need to use this " +"option." +msgstr "" + +#: ../../using/windows.rst:1549 +msgid "" +"To perform an all-users installation, you should select \"Customize " +"installation\". In this case:" +msgstr "" + +#: ../../using/windows.rst:1552 +msgid "You may be required to provide administrative credentials or approval" +msgstr "" + +#: ../../using/windows.rst:1553 +msgid "Python will be installed into the Program Files directory" +msgstr "" + +#: ../../using/windows.rst:1554 +msgid "The :ref:`launcher` will be installed into the Windows directory" +msgstr "" + +#: ../../using/windows.rst:1555 +msgid "Optional features may be selected during installation" +msgstr "" + +#: ../../using/windows.rst:1556 +msgid "The standard library can be pre-compiled to bytecode" +msgstr "" + +#: ../../using/windows.rst:1557 +msgid "" +"If selected, the install directory will be added to the system :envvar:`PATH`" +msgstr "" + +#: ../../using/windows.rst:1558 +msgid "Shortcuts are available for all users" +msgstr "" + +#: ../../using/windows.rst:1567 +msgid "" +"In the latest versions of Windows, this limitation can be expanded to " +"approximately 32,000 characters. Your administrator will need to activate " +"the \"Enable Win32 long paths\" group policy, or set ``LongPathsEnabled`` to " +"``1`` in the registry key " +"``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\FileSystem``." +msgstr "" + +#: ../../using/windows.rst:1576 +msgid "After changing the above option, no further configuration is required." +msgstr "" + +#: ../../using/windows.rst:1580 +msgid "Support for long paths was enabled in Python." +msgstr "" + +#: ../../using/windows.rst:1585 +msgid "Installing without UI" +msgstr "" + +#: ../../using/windows.rst:1587 +msgid "" +"All of the options available in the installer UI can also be specified from " +"the command line, allowing scripted installers to replicate an installation " +"on many machines without user interaction. These options may also be set " +"without suppressing the UI in order to change some of the defaults." +msgstr "" + +#: ../../using/windows.rst:1592 +msgid "" +"The following options (found by executing the installer with ``/?``) can be " +"passed into the installer:" +msgstr "" + +#: ../../using/windows.rst:1596 ../../using/windows.rst:1616 +#: ../../using/windows.rst:2206 +msgid "Name" +msgstr "Name" + +#: ../../using/windows.rst:1598 +msgid "/passive" +msgstr "" + +#: ../../using/windows.rst:1598 +msgid "to display progress without requiring user interaction" +msgstr "" + +#: ../../using/windows.rst:1600 +msgid "/quiet" +msgstr "" + +#: ../../using/windows.rst:1600 +msgid "to install/uninstall without displaying any UI" +msgstr "" + +#: ../../using/windows.rst:1602 +msgid "/simple" +msgstr "" + +#: ../../using/windows.rst:1602 +msgid "to prevent user customization" +msgstr "" + +#: ../../using/windows.rst:1604 +msgid "/uninstall" +msgstr "" + +#: ../../using/windows.rst:1604 +msgid "to remove Python (without confirmation)" +msgstr "" + +#: ../../using/windows.rst:1606 +msgid "/layout [directory]" +msgstr "" + +#: ../../using/windows.rst:1606 +msgid "to pre-download all components" +msgstr "" + +#: ../../using/windows.rst:1608 +msgid "/log [filename]" +msgstr "" + +#: ../../using/windows.rst:1608 +msgid "to specify log files location" +msgstr "" + +#: ../../using/windows.rst:1611 +msgid "" +"All other options are passed as ``name=value``, where the value is usually " +"``0`` to disable a feature, ``1`` to enable a feature, or a path. The full " +"list of available options is shown below." +msgstr "" + +#: ../../using/windows.rst:1616 +msgid "Default" +msgstr "Standard" + +#: ../../using/windows.rst:1618 +msgid "InstallAllUsers" +msgstr "" + +#: ../../using/windows.rst:1618 +msgid "Perform a system-wide installation." +msgstr "" + +#: ../../using/windows.rst:1618 ../../using/windows.rst:1644 +#: ../../using/windows.rst:1647 ../../using/windows.rst:1651 +#: ../../using/windows.rst:1660 ../../using/windows.rst:1682 +#: ../../using/windows.rst:1690 ../../using/windows.rst:1693 +msgid "0" +msgstr "" + +#: ../../using/windows.rst:1620 +msgid "TargetDir" +msgstr "" + +#: ../../using/windows.rst:1620 +msgid "The installation directory" +msgstr "Das Installations-Verzeichnis" + +#: ../../using/windows.rst:1620 +msgid "Selected based on InstallAllUsers" +msgstr "" + +#: ../../using/windows.rst:1623 +msgid "DefaultAllUsersTargetDir" +msgstr "" + +#: ../../using/windows.rst:1623 +msgid "The default installation directory for all-user installs" +msgstr "" + +#: ../../using/windows.rst:1623 +msgid "" +":file:`%ProgramFiles%\\\\\\ Python X.Y` or :file:`\\ %ProgramFiles(x86)%\\\\" +"\\ Python X.Y`" +msgstr "" + +#: ../../using/windows.rst:1628 +msgid "DefaultJustForMeTargetDir" +msgstr "" + +#: ../../using/windows.rst:1628 +msgid "The default install directory for just-for-me installs" +msgstr "" + +#: ../../using/windows.rst:1628 +msgid "" +":file:`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY` or :file:" +"`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY-32` or :file:" +"`%LocalAppData%\\\\\\ Programs\\\\Python\\\\\\ PythonXY-64`" +msgstr "" + +#: ../../using/windows.rst:1638 +msgid "DefaultCustomTargetDir" +msgstr "" + +#: ../../using/windows.rst:1638 +msgid "The default custom install directory displayed in the UI" +msgstr "" + +#: ../../using/windows.rst:1638 ../../using/windows.rst:1695 +msgid "(empty)" +msgstr "(leer)" + +#: ../../using/windows.rst:1641 +msgid "AssociateFiles" +msgstr "" + +#: ../../using/windows.rst:1641 +msgid "Create file associations if the launcher is also installed." +msgstr "" + +#: ../../using/windows.rst:1641 ../../using/windows.rst:1655 +#: ../../using/windows.rst:1658 ../../using/windows.rst:1662 +#: ../../using/windows.rst:1666 ../../using/windows.rst:1670 +#: ../../using/windows.rst:1672 ../../using/windows.rst:1676 +#: ../../using/windows.rst:1680 ../../using/windows.rst:1684 +#: ../../using/windows.rst:1686 ../../using/windows.rst:1688 +msgid "1" +msgstr "" + +#: ../../using/windows.rst:1644 +msgid "CompileAll" +msgstr "" + +#: ../../using/windows.rst:1644 +msgid "Compile all ``.py`` files to ``.pyc``." +msgstr "" + +#: ../../using/windows.rst:1647 +msgid "PrependPath" +msgstr "" + +#: ../../using/windows.rst:1647 +msgid "" +"Prepend install and Scripts directories to :envvar:`PATH` and add ``.PY`` " +"to :envvar:`PATHEXT`" +msgstr "" + +#: ../../using/windows.rst:1651 +msgid "AppendPath" +msgstr "" + +#: ../../using/windows.rst:1651 +msgid "" +"Append install and Scripts directories to :envvar:`PATH` and add ``.PY`` " +"to :envvar:`PATHEXT`" +msgstr "" + +#: ../../using/windows.rst:1655 +msgid "Shortcuts" +msgstr "" + +#: ../../using/windows.rst:1655 +msgid "" +"Create shortcuts for the interpreter, documentation and IDLE if installed." +msgstr "" + +#: ../../using/windows.rst:1658 +msgid "Include_doc" +msgstr "" + +#: ../../using/windows.rst:1658 +msgid "Install Python manual" +msgstr "" + +#: ../../using/windows.rst:1660 +msgid "Include_debug" +msgstr "" + +#: ../../using/windows.rst:1660 +msgid "Install debug binaries" +msgstr "" + +#: ../../using/windows.rst:1662 +msgid "Include_dev" +msgstr "" + +#: ../../using/windows.rst:1662 +msgid "" +"Install developer headers and libraries. Omitting this may lead to an " +"unusable installation." +msgstr "" + +#: ../../using/windows.rst:1666 +msgid "Include_exe" +msgstr "" + +#: ../../using/windows.rst:1666 +msgid "" +"Install :file:`python.exe` and related files. Omitting this may lead to an " +"unusable installation." +msgstr "" + +#: ../../using/windows.rst:1670 +msgid "Include_launcher" +msgstr "" + +#: ../../using/windows.rst:1670 +msgid "Install :ref:`launcher`." +msgstr "" + +#: ../../using/windows.rst:1672 +msgid "InstallLauncherAllUsers" +msgstr "" + +#: ../../using/windows.rst:1672 +msgid "" +"Installs the launcher for all users. Also requires ``Include_launcher`` to " +"be set to 1" +msgstr "" + +#: ../../using/windows.rst:1676 +msgid "Include_lib" +msgstr "" + +#: ../../using/windows.rst:1676 +msgid "" +"Install standard library and extension modules. Omitting this may lead to an " +"unusable installation." +msgstr "" + +#: ../../using/windows.rst:1680 +msgid "Include_pip" +msgstr "" + +#: ../../using/windows.rst:1680 +msgid "Install bundled pip and setuptools" +msgstr "" + +#: ../../using/windows.rst:1682 +msgid "Include_symbols" +msgstr "" + +#: ../../using/windows.rst:1682 +msgid "Install debugging symbols (``*.pdb``)" +msgstr "" + +#: ../../using/windows.rst:1684 +msgid "Include_tcltk" +msgstr "" + +#: ../../using/windows.rst:1684 +msgid "Install Tcl/Tk support and IDLE" +msgstr "" + +#: ../../using/windows.rst:1686 +msgid "Include_test" +msgstr "" + +#: ../../using/windows.rst:1686 +msgid "Install standard library test suite" +msgstr "" + +#: ../../using/windows.rst:1688 +msgid "Include_tools" +msgstr "" + +#: ../../using/windows.rst:1688 +msgid "Install utility scripts" +msgstr "" + +#: ../../using/windows.rst:1690 +msgid "LauncherOnly" +msgstr "" + +#: ../../using/windows.rst:1690 +msgid "Only installs the launcher. This will override most other options." +msgstr "" + +#: ../../using/windows.rst:1693 +msgid "SimpleInstall" +msgstr "" + +#: ../../using/windows.rst:1693 +msgid "Disable most install UI" +msgstr "" + +#: ../../using/windows.rst:1695 +msgid "SimpleInstallDescription" +msgstr "" + +#: ../../using/windows.rst:1695 +msgid "A custom message to display when the simplified install UI is used." +msgstr "" + +#: ../../using/windows.rst:1699 +msgid "" +"For example, to silently install a default, system-wide Python installation, " +"you could use the following command (from an elevated command prompt)::" +msgstr "" + +#: ../../using/windows.rst:1702 +msgid "python-3.9.0.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0" +msgstr "" + +#: ../../using/windows.rst:1704 +msgid "" +"To allow users to easily install a personal copy of Python without the test " +"suite, you could provide a shortcut with the following command. This will " +"display a simplified initial page and disallow customization::" +msgstr "" + +#: ../../using/windows.rst:1708 +msgid "" +"python-3.9.0.exe InstallAllUsers=0 Include_launcher=0 Include_test=0\n" +" SimpleInstall=1 SimpleInstallDescription=\"Just for me, no test suite.\"" +msgstr "" + +#: ../../using/windows.rst:1711 +msgid "" +"(Note that omitting the launcher also omits file associations, and is only " +"recommended for per-user installs when there is also a system-wide " +"installation that included the launcher.)" +msgstr "" + +#: ../../using/windows.rst:1715 +msgid "" +"The options listed above can also be provided in a file named ``unattend." +"xml`` alongside the executable. This file specifies a list of options and " +"values. When a value is provided as an attribute, it will be converted to a " +"number if possible. Values provided as element text are always left as " +"strings. This example file sets the same options as the previous example:" +msgstr "" + +#: ../../using/windows.rst:1721 +msgid "" +"\n" +" " +msgstr "" + +#: ../../using/windows.rst:1734 +msgid "Installing without downloading" +msgstr "" + +#: ../../using/windows.rst:1736 +msgid "" +"As some features of Python are not included in the initial installer " +"download, selecting those features may require an internet connection. To " +"avoid this need, all possible components may be downloaded on-demand to " +"create a complete *layout* that will no longer require an internet " +"connection regardless of the selected features. Note that this download may " +"be bigger than required, but where a large number of installations are going " +"to be performed it is very useful to have a locally cached copy." +msgstr "" + +#: ../../using/windows.rst:1744 +msgid "" +"Execute the following command from Command Prompt to download all possible " +"required files. Remember to substitute ``python-3.9.0.exe`` for the actual " +"name of your installer, and to create layouts in their own directories to " +"avoid collisions between files with the same name." +msgstr "" + +#: ../../using/windows.rst:1751 +msgid "python-3.9.0.exe /layout [optional target directory]" +msgstr "" + +#: ../../using/windows.rst:1753 +msgid "" +"You may also specify the ``/quiet`` option to hide the progress display." +msgstr "" + +#: ../../using/windows.rst:1756 +msgid "Modifying an install" +msgstr "" + +#: ../../using/windows.rst:1758 +msgid "" +"Once Python has been installed, you can add or remove features through the " +"Programs and Features tool that is part of Windows. Select the Python entry " +"and choose \"Uninstall/Change\" to open the installer in maintenance mode." +msgstr "" + +#: ../../using/windows.rst:1762 +msgid "" +"\"Modify\" allows you to add or remove features by modifying the checkboxes " +"- unchanged checkboxes will not install or remove anything. Some options " +"cannot be changed in this mode, such as the install directory; to modify " +"these, you will need to remove and then reinstall Python completely." +msgstr "" + +#: ../../using/windows.rst:1767 +msgid "" +"\"Repair\" will verify all the files that should be installed using the " +"current settings and replace any that have been removed or modified." +msgstr "" + +#: ../../using/windows.rst:1770 +msgid "" +"\"Uninstall\" will remove Python entirely, with the exception of the :ref:" +"`launcher`, which has its own entry in Programs and Features." +msgstr "" + +#: ../../using/windows.rst:1779 +msgid "" +"To install pre-built binaries with free-threading enabled (see :pep:`703`), " +"you should select \"Customize installation\". The second page of options " +"includes the \"Download free-threaded binaries\" checkbox." +msgstr "" + +#: ../../using/windows.rst:1785 +msgid "" +"Selecting this option will download and install additional binaries to the " +"same location as the main Python install. The main executable is called " +"``python3.13t.exe``, and other binaries either receive a ``t`` suffix or a " +"full ABI suffix. Python source files and bundled third-party dependencies " +"are shared with the main install." +msgstr "" + +#: ../../using/windows.rst:1791 +msgid "" +"The free-threaded version is registered as a regular Python install with the " +"tag ``3.13t`` (with a ``-32`` or ``-arm64`` suffix as normal for those " +"platforms). This allows tools to discover it, and for the :ref:`launcher` to " +"support ``py.exe -3.13t``. Note that the launcher will interpret ``py.exe " +"-3`` (or a ``python3`` shebang) as \"the latest 3.x install\", which will " +"prefer the free-threaded binaries over the regular ones, while ``py.exe " +"-3.13`` will not. If you use the short style of option, you may prefer to " +"not install the free-threaded binaries at this time." +msgstr "" + +#: ../../using/windows.rst:1800 +msgid "" +"To specify the install option at the command line, use " +"``Include_freethreaded=1``. See :ref:`install-layout-option` for " +"instructions on pre-emptively downloading the additional binaries for " +"offline install. The options to include debug symbols and binaries also " +"apply to the free-threaded builds." +msgstr "" + +#: ../../using/windows.rst:1806 +msgid "" +"Free-threaded binaries are also available :ref:`on nuget.org `." +msgstr "" + +#: ../../using/windows.rst:1810 +msgid "Python launcher for Windows (deprecated)" +msgstr "" + +#: ../../using/windows.rst:1814 +msgid "" +"The launcher and this documentation have been superseded by the Python " +"Install Manager described above. This is preserved temporarily for " +"historical interest." +msgstr "" + +#: ../../using/windows.rst:1820 +msgid "" +"The Python launcher for Windows is a utility which aids in locating and " +"executing of different Python versions. It allows scripts (or the command-" +"line) to indicate a preference for a specific Python version, and will " +"locate and execute that version." +msgstr "" + +#: ../../using/windows.rst:1825 +msgid "" +"Unlike the :envvar:`PATH` variable, the launcher will correctly select the " +"most appropriate version of Python. It will prefer per-user installations " +"over system-wide ones, and orders by language version rather than using the " +"most recently installed version." +msgstr "" + +#: ../../using/windows.rst:1830 +msgid "The launcher was originally specified in :pep:`397`." +msgstr "" + +#: ../../using/windows.rst:1833 +msgid "Getting started" +msgstr "Los geht's" + +#: ../../using/windows.rst:1836 +msgid "From the command-line" +msgstr "" + +#: ../../using/windows.rst:1840 +msgid "" +"System-wide installations of Python 3.3 and later will put the launcher on " +"your :envvar:`PATH`. The launcher is compatible with all available versions " +"of Python, so it does not matter which version is installed. To check that " +"the launcher is available, execute the following command in Command Prompt::" +msgstr "" + +#: ../../using/windows.rst:1845 +msgid "py" +msgstr "" + +#: ../../using/windows.rst:1847 +msgid "" +"You should find that the latest version of Python you have installed is " +"started - it can be exited as normal, and any additional command-line " +"arguments specified will be sent directly to Python." +msgstr "" + +#: ../../using/windows.rst:1851 +msgid "" +"If you have multiple versions of Python installed (e.g., 3.7 and |version|) " +"you will have noticed that Python |version| was started - to launch Python " +"3.7, try the command::" +msgstr "" + +#: ../../using/windows.rst:1855 +msgid "py -3.7" +msgstr "" + +#: ../../using/windows.rst:1857 +msgid "" +"If you want the latest version of Python 2 you have installed, try the " +"command::" +msgstr "" + +#: ../../using/windows.rst:1860 +msgid "py -2" +msgstr "" + +#: ../../using/windows.rst:1862 +msgid "" +"If you see the following error, you do not have the launcher installed::" +msgstr "" + +#: ../../using/windows.rst:1864 +msgid "" +"'py' is not recognized as an internal or external command,\n" +"operable program or batch file." +msgstr "" + +#: ../../using/windows.rst:1867 +msgid "The command::" +msgstr "" + +#: ../../using/windows.rst:1869 +msgid "py --list" +msgstr "" + +#: ../../using/windows.rst:1871 +msgid "displays the currently installed version(s) of Python." +msgstr "" + +#: ../../using/windows.rst:1873 +msgid "" +"The ``-x.y`` argument is the short form of the ``-V:Company/Tag`` argument, " +"which allows selecting a specific Python runtime, including those that may " +"have come from somewhere other than python.org. Any runtime registered by " +"following :pep:`514` will be discoverable. The ``--list`` command lists all " +"available runtimes using the ``-V:`` format." +msgstr "" + +#: ../../using/windows.rst:1879 +msgid "" +"When using the ``-V:`` argument, specifying the Company will limit selection " +"to runtimes from that provider, while specifying only the Tag will select " +"from all providers. Note that omitting the slash implies a tag::" +msgstr "" + +#: ../../using/windows.rst:1883 +msgid "" +"# Select any '3.*' tagged runtime\n" +"py -V:3\n" +"\n" +"# Select any 'PythonCore' released runtime\n" +"py -V:PythonCore/\n" +"\n" +"# Select PythonCore's latest Python 3 runtime\n" +"py -V:PythonCore/3" +msgstr "" + +#: ../../using/windows.rst:1892 +msgid "" +"The short form of the argument (``-3``) only ever selects from core Python " +"releases, and not other distributions. However, the longer form (``-V:3``) " +"will select from any." +msgstr "" + +#: ../../using/windows.rst:1896 +msgid "" +"The Company is matched on the full string, case-insensitive. The Tag is " +"matched on either the full string, or a prefix, provided the next character " +"is a dot or a hyphen. This allows ``-V:3.1`` to match ``3.1-32``, but not " +"``3.10``. Tags are sorted using numerical ordering (``3.10`` is newer than " +"``3.1``), but are compared using text (``-V:3.01`` does not match ``3.1``)." +msgstr "" + +#: ../../using/windows.rst:1904 +msgid "Virtual environments" +msgstr "" + +#: ../../using/windows.rst:1908 +msgid "" +"If the launcher is run with no explicit Python version specification, and a " +"virtual environment (created with the standard library :mod:`venv` module or " +"the external ``virtualenv`` tool) active, the launcher will run the virtual " +"environment's interpreter rather than the global one. To run the global " +"interpreter, either deactivate the virtual environment, or explicitly " +"specify the global Python version." +msgstr "" + +#: ../../using/windows.rst:1916 +msgid "From a script" +msgstr "" + +#: ../../using/windows.rst:1918 +msgid "" +"Let's create a test Python script - create a file called ``hello.py`` with " +"the following contents" +msgstr "" + +#: ../../using/windows.rst:1921 +msgid "" +"#! python\n" +"import sys\n" +"sys.stdout.write(\"hello from Python %s\\n\" % (sys.version,))" +msgstr "" + +#: ../../using/windows.rst:1927 +msgid "From the directory in which hello.py lives, execute the command::" +msgstr "" + +#: ../../using/windows.rst:1929 +msgid "py hello.py" +msgstr "" + +#: ../../using/windows.rst:1931 +msgid "" +"You should notice the version number of your latest Python 2.x installation " +"is printed. Now try changing the first line to be:" +msgstr "" + +#: ../../using/windows.rst:1934 +msgid "#! python3" +msgstr "" + +#: ../../using/windows.rst:1938 +msgid "" +"Re-executing the command should now print the latest Python 3.x information. " +"As with the above command-line examples, you can specify a more explicit " +"version qualifier. Assuming you have Python 3.7 installed, try changing the " +"first line to ``#! python3.7`` and you should find the 3.7 version " +"information printed." +msgstr "" + +#: ../../using/windows.rst:1944 +msgid "" +"Note that unlike interactive use, a bare \"python\" will use the latest " +"version of Python 2.x that you have installed. This is for backward " +"compatibility and for compatibility with Unix, where the command ``python`` " +"typically refers to Python 2." +msgstr "" + +#: ../../using/windows.rst:1950 +msgid "From file associations" +msgstr "" + +#: ../../using/windows.rst:1952 +msgid "" +"The launcher should have been associated with Python files (i.e. ``.py``, ``." +"pyw``, ``.pyc`` files) when it was installed. This means that when you " +"double-click on one of these files from Windows explorer the launcher will " +"be used, and therefore you can use the same facilities described above to " +"have the script specify the version which should be used." +msgstr "" + +#: ../../using/windows.rst:1958 +msgid "" +"The key benefit of this is that a single launcher can support multiple " +"Python versions at the same time depending on the contents of the first line." +msgstr "" + +#: ../../using/windows.rst:1964 +msgid "" +"If the first line of a script file starts with ``#!``, it is known as a " +"\"shebang\" line. Linux and other Unix like operating systems have native " +"support for such lines and they are commonly used on such systems to " +"indicate how a script should be executed. This launcher allows the same " +"facilities to be used with Python scripts on Windows and the examples above " +"demonstrate their use." +msgstr "" + +#: ../../using/windows.rst:1971 +msgid "" +"To allow shebang lines in Python scripts to be portable between Unix and " +"Windows, this launcher supports a number of 'virtual' commands to specify " +"which interpreter to use. The supported virtual commands are:" +msgstr "" + +#: ../../using/windows.rst:1975 +msgid "``/usr/bin/env``" +msgstr "" + +#: ../../using/windows.rst:1976 +msgid "``/usr/bin/python``" +msgstr "" + +#: ../../using/windows.rst:1977 +msgid "``/usr/local/bin/python``" +msgstr "" + +#: ../../using/windows.rst:1978 +msgid "``python``" +msgstr "" + +#: ../../using/windows.rst:1992 +msgid "" +"Any of the above virtual commands can be suffixed with an explicit version " +"(either just the major version, or the major and minor version). Furthermore " +"the 32-bit version can be requested by adding \"-32\" after the minor " +"version. I.e. ``/usr/bin/python3.7-32`` will request usage of the 32-bit " +"Python 3.7. If a virtual environment is active, the version will be ignored " +"and the environment will be used." +msgstr "" + +#: ../../using/windows.rst:2001 +msgid "" +"Beginning with python launcher 3.7 it is possible to request 64-bit version " +"by the \"-64\" suffix. Furthermore it is possible to specify a major and " +"architecture without minor (i.e. ``/usr/bin/python3-64``)." +msgstr "" + +#: ../../using/windows.rst:2007 +msgid "" +"The \"-64\" suffix is deprecated, and now implies \"any architecture that is " +"not provably i386/32-bit\". To request a specific environment, use the new :" +"samp:`-V:{TAG}` argument with the complete tag." +msgstr "" + +#: ../../using/windows.rst:2013 +msgid "" +"Virtual commands referencing ``python`` now prefer an active virtual " +"environment rather than searching :envvar:`PATH`. This handles cases where " +"the shebang specifies ``/usr/bin/env python3`` but :file:`python3.exe` is " +"not present in the active environment." +msgstr "" + +#: ../../using/windows.rst:2018 +msgid "" +"The ``/usr/bin/env`` form of shebang line has one further special property. " +"Before looking for installed Python interpreters, this form will search the " +"executable :envvar:`PATH` for a Python executable matching the name provided " +"as the first argument. This corresponds to the behaviour of the Unix ``env`` " +"program, which performs a :envvar:`PATH` search. If an executable matching " +"the first argument after the ``env`` command cannot be found, but the " +"argument starts with ``python``, it will be handled as described for the " +"other virtual commands. The environment variable :envvar:`!" +"PYLAUNCHER_NO_SEARCH_PATH` may be set (to any value) to skip this search of :" +"envvar:`PATH`." +msgstr "" + +#: ../../using/windows.rst:2029 +msgid "" +"Shebang lines that do not match any of these patterns are looked up in the " +"``[commands]`` section of the launcher's :ref:`.INI file `. " +"This may be used to handle certain commands in a way that makes sense for " +"your system. The name of the command must be a single argument (no spaces in " +"the shebang executable), and the value substituted is the full path to the " +"executable (additional arguments specified in the .INI will be quoted as " +"part of the filename)." +msgstr "" + +#: ../../using/windows.rst:2037 +msgid "" +"[commands]\n" +"/bin/xpython=C:\\Program Files\\XPython\\python.exe" +msgstr "" + +#: ../../using/windows.rst:2042 +msgid "" +"Any commands not found in the .INI file are treated as **Windows** " +"executable paths that are absolute or relative to the directory containing " +"the script file. This is a convenience for Windows-only scripts, such as " +"those generated by an installer, since the behavior is not compatible with " +"Unix-style shells. These paths may be quoted, and may include multiple " +"arguments, after which the path to the script and any additional arguments " +"will be appended." +msgstr "" + +#: ../../using/windows.rst:2051 +msgid "Arguments in shebang lines" +msgstr "" + +#: ../../using/windows.rst:2053 +msgid "" +"The shebang lines can also specify additional options to be passed to the " +"Python interpreter. For example, if you have a shebang line:" +msgstr "" + +#: ../../using/windows.rst:2056 +msgid "#! /usr/bin/python -v" +msgstr "" + +#: ../../using/windows.rst:2060 +msgid "Then Python will be started with the ``-v`` option" +msgstr "" + +#: ../../using/windows.rst:2063 +msgid "Customization" +msgstr "" + +#: ../../using/windows.rst:2068 +msgid "Customization via INI files" +msgstr "" + +#: ../../using/windows.rst:2070 +msgid "" +"Two .ini files will be searched by the launcher - ``py.ini`` in the current " +"user's application data directory (``%LOCALAPPDATA%`` or ``$env:" +"LocalAppData``) and ``py.ini`` in the same directory as the launcher. The " +"same .ini files are used for both the 'console' version of the launcher (i." +"e. py.exe) and for the 'windows' version (i.e. pyw.exe)." +msgstr "" + +#: ../../using/windows.rst:2076 +msgid "" +"Customization specified in the \"application directory\" will have " +"precedence over the one next to the executable, so a user, who may not have " +"write access to the .ini file next to the launcher, can override commands in " +"that global .ini file." +msgstr "" + +#: ../../using/windows.rst:2081 +msgid "Customizing default Python versions" +msgstr "" + +#: ../../using/windows.rst:2083 +msgid "" +"In some cases, a version qualifier can be included in a command to dictate " +"which version of Python will be used by the command. A version qualifier " +"starts with a major version number and can optionally be followed by a " +"period ('.') and a minor version specifier. Furthermore it is possible to " +"specify if a 32 or 64 bit implementation shall be requested by adding " +"\"-32\" or \"-64\"." +msgstr "" + +#: ../../using/windows.rst:2089 +msgid "" +"For example, a shebang line of ``#!python`` has no version qualifier, while " +"``#!python3`` has a version qualifier which specifies only a major version." +msgstr "" + +#: ../../using/windows.rst:2092 +msgid "" +"If no version qualifiers are found in a command, the environment variable :" +"envvar:`!PY_PYTHON` can be set to specify the default version qualifier. If " +"it is not set, the default is \"3\". The variable can specify any value that " +"may be passed on the command line, such as \"3\", \"3.7\", \"3.7-32\" or " +"\"3.7-64\". (Note that the \"-64\" option is only available with the " +"launcher included with Python 3.7 or newer.)" +msgstr "" + +#: ../../using/windows.rst:2099 +msgid "" +"If no minor version qualifiers are found, the environment variable " +"``PY_PYTHON{major}`` (where ``{major}`` is the current major version " +"qualifier as determined above) can be set to specify the full version. If no " +"such option is found, the launcher will enumerate the installed Python " +"versions and use the latest minor release found for the major version, which " +"is likely, although not guaranteed, to be the most recently installed " +"version in that family." +msgstr "" + +#: ../../using/windows.rst:2107 +msgid "" +"On 64-bit Windows with both 32-bit and 64-bit implementations of the same " +"(major.minor) Python version installed, the 64-bit version will always be " +"preferred. This will be true for both 32-bit and 64-bit implementations of " +"the launcher - a 32-bit launcher will prefer to execute a 64-bit Python " +"installation of the specified version if available. This is so the behavior " +"of the launcher can be predicted knowing only what versions are installed on " +"the PC and without regard to the order in which they were installed (i.e., " +"without knowing whether a 32 or 64-bit version of Python and corresponding " +"launcher was installed last). As noted above, an optional \"-32\" or \"-64\" " +"suffix can be used on a version specifier to change this behaviour." +msgstr "" + +#: ../../using/windows.rst:2118 +msgid "Examples:" +msgstr "Beispiele:" + +#: ../../using/windows.rst:2120 +msgid "" +"If no relevant options are set, the commands ``python`` and ``python2`` will " +"use the latest Python 2.x version installed and the command ``python3`` will " +"use the latest Python 3.x installed." +msgstr "" + +#: ../../using/windows.rst:2124 +msgid "" +"The command ``python3.7`` will not consult any options at all as the " +"versions are fully specified." +msgstr "" + +#: ../../using/windows.rst:2127 +msgid "" +"If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use " +"the latest installed Python 3 version." +msgstr "" + +#: ../../using/windows.rst:2130 +msgid "" +"If ``PY_PYTHON=3.7-32``, the command ``python`` will use the 32-bit " +"implementation of 3.7 whereas the command ``python3`` will use the latest " +"installed Python (PY_PYTHON was not considered at all as a major version was " +"specified.)" +msgstr "" + +#: ../../using/windows.rst:2135 +msgid "" +"If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7``, the commands ``python`` and " +"``python3`` will both use specifically 3.7" +msgstr "" + +#: ../../using/windows.rst:2138 +msgid "" +"In addition to environment variables, the same settings can be configured in " +"the .INI file used by the launcher. The section in the INI file is called " +"``[defaults]`` and the key name will be the same as the environment " +"variables without the leading ``PY_`` prefix (and note that the key names in " +"the INI file are case insensitive.) The contents of an environment variable " +"will override things specified in the INI file." +msgstr "" + +#: ../../using/windows.rst:2145 +msgid "For example:" +msgstr "Zum Beispiel:" + +#: ../../using/windows.rst:2147 +msgid "Setting ``PY_PYTHON=3.7`` is equivalent to the INI file containing:" +msgstr "" + +#: ../../using/windows.rst:2149 +msgid "" +"[defaults]\n" +"python=3.7" +msgstr "" + +#: ../../using/windows.rst:2154 +msgid "" +"Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7`` is equivalent to the INI file " +"containing:" +msgstr "" + +#: ../../using/windows.rst:2157 +msgid "" +"[defaults]\n" +"python=3\n" +"python3=3.7" +msgstr "" + +#: ../../using/windows.rst:2164 +msgid "Diagnostics" +msgstr "" + +#: ../../using/windows.rst:2166 +msgid "" +"If an environment variable :envvar:`!PYLAUNCHER_DEBUG` is set (to any " +"value), the launcher will print diagnostic information to stderr (i.e. to " +"the console). While this information manages to be simultaneously verbose " +"*and* terse, it should allow you to see what versions of Python were " +"located, why a particular version was chosen and the exact command-line used " +"to execute the target Python. It is primarily intended for testing and " +"debugging." +msgstr "" + +#: ../../using/windows.rst:2174 +msgid "Dry run" +msgstr "" + +#: ../../using/windows.rst:2176 +msgid "" +"If an environment variable :envvar:`!PYLAUNCHER_DRYRUN` is set (to any " +"value), the launcher will output the command it would have run, but will not " +"actually launch Python. This may be useful for tools that want to use the " +"launcher to detect and then launch Python directly. Note that the command " +"written to standard output is always encoded using UTF-8, and may not render " +"correctly in the console." +msgstr "" + +#: ../../using/windows.rst:2184 +msgid "Install on demand" +msgstr "" + +#: ../../using/windows.rst:2186 +msgid "" +"If an environment variable :envvar:`!PYLAUNCHER_ALLOW_INSTALL` is set (to " +"any value), and the requested Python version is not installed but is " +"available on the Microsoft Store, the launcher will attempt to install it. " +"This may require user interaction to complete, and you may need to run the " +"command again." +msgstr "" + +#: ../../using/windows.rst:2191 +msgid "" +"An additional :envvar:`!PYLAUNCHER_ALWAYS_INSTALL` variable causes the " +"launcher to always try to install Python, even if it is detected. This is " +"mainly intended for testing (and should be used with :envvar:`!" +"PYLAUNCHER_DRYRUN`)." +msgstr "" + +#: ../../using/windows.rst:2196 +msgid "Return codes" +msgstr "" + +#: ../../using/windows.rst:2198 +msgid "" +"The following exit codes may be returned by the Python launcher. " +"Unfortunately, there is no way to distinguish these from the exit code of " +"Python itself." +msgstr "" + +#: ../../using/windows.rst:2201 +msgid "" +"The names of codes are as used in the sources, and are only for reference. " +"There is no way to access or resolve them apart from reading this page. " +"Entries are listed in alphabetical order of names." +msgstr "" + +#: ../../using/windows.rst:2206 +msgid "Value" +msgstr "" + +#: ../../using/windows.rst:2208 +msgid "RC_BAD_VENV_CFG" +msgstr "" + +#: ../../using/windows.rst:2208 +msgid "107" +msgstr "" + +#: ../../using/windows.rst:2208 +msgid "A :file:`pyvenv.cfg` was found but is corrupt." +msgstr "" + +#: ../../using/windows.rst:2210 +msgid "RC_CREATE_PROCESS" +msgstr "" + +#: ../../using/windows.rst:2210 +msgid "101" +msgstr "" + +#: ../../using/windows.rst:2210 +msgid "Failed to launch Python." +msgstr "" + +#: ../../using/windows.rst:2212 +msgid "RC_INSTALLING" +msgstr "" + +#: ../../using/windows.rst:2212 +msgid "111" +msgstr "" + +#: ../../using/windows.rst:2212 +msgid "" +"An install was started, but the command will need to be re-run after it " +"completes." +msgstr "" + +#: ../../using/windows.rst:2215 +msgid "RC_INTERNAL_ERROR" +msgstr "" + +#: ../../using/windows.rst:2215 +msgid "109" +msgstr "" + +#: ../../using/windows.rst:2215 +msgid "Unexpected error. Please report a bug." +msgstr "" + +#: ../../using/windows.rst:2217 +msgid "RC_NO_COMMANDLINE" +msgstr "" + +#: ../../using/windows.rst:2217 +msgid "108" +msgstr "" + +#: ../../using/windows.rst:2217 +msgid "Unable to obtain command line from the operating system." +msgstr "" + +#: ../../using/windows.rst:2220 +msgid "RC_NO_PYTHON" +msgstr "" + +#: ../../using/windows.rst:2220 +msgid "103" +msgstr "" + +#: ../../using/windows.rst:2220 +msgid "Unable to locate the requested version." +msgstr "" + +#: ../../using/windows.rst:2222 +msgid "RC_NO_VENV_CFG" +msgstr "" + +#: ../../using/windows.rst:2222 +msgid "106" +msgstr "" + +#: ../../using/windows.rst:2222 +msgid "A :file:`pyvenv.cfg` was required but not found." +msgstr "" diff --git a/whatsnew/3.11.po b/whatsnew/3.11.po index 6846561c..67d75bd9 100644 --- a/whatsnew/3.11.po +++ b/whatsnew/3.11.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -2322,11 +2322,11 @@ msgstr "" msgid "Notes" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1650 msgid ":opcode:`!BINARY_*`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1651 msgid ":opcode:`!INPLACE_*`" msgstr "" @@ -2338,31 +2338,31 @@ msgstr "" msgid "Replaced all numeric binary/in-place opcodes with a single opcode" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1653 msgid ":opcode:`!CALL_FUNCTION`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1654 msgid ":opcode:`!CALL_FUNCTION_KW`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1655 msgid ":opcode:`!CALL_METHOD`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1653 msgid ":opcode:`CALL`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1654 msgid ":opcode:`!KW_NAMES`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1655 msgid ":opcode:`!PRECALL`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1656 msgid ":opcode:`PUSH_NULL`" msgstr "" @@ -2372,35 +2372,35 @@ msgid "" "allows better specialization of calls" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1658 msgid ":opcode:`!DUP_TOP`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1659 msgid ":opcode:`!DUP_TOP_TWO`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1660 msgid ":opcode:`!ROT_TWO`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1661 msgid ":opcode:`!ROT_THREE`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1662 msgid ":opcode:`!ROT_FOUR`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1663 msgid ":opcode:`!ROT_N`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1658 msgid ":opcode:`COPY`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1659 msgid ":opcode:`SWAP`" msgstr "" @@ -2408,11 +2408,11 @@ msgstr "" msgid "Stack manipulation instructions" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1665 msgid ":opcode:`!JUMP_IF_NOT_EXC_MATCH`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1665 msgid ":opcode:`CHECK_EXC_MATCH`" msgstr "" @@ -2420,27 +2420,27 @@ msgstr "" msgid "Now performs check but doesn't jump" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1667 msgid ":opcode:`!JUMP_ABSOLUTE`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1668 msgid ":opcode:`!POP_JUMP_IF_FALSE`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1669 msgid ":opcode:`!POP_JUMP_IF_TRUE`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1667 msgid ":opcode:`JUMP_BACKWARD`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1668 msgid ":opcode:`!POP_JUMP_BACKWARD_IF_*`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1669 msgid ":opcode:`!POP_JUMP_FORWARD_IF_*`" msgstr "" @@ -2450,11 +2450,11 @@ msgid "" "variants for each direction" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1673 msgid ":opcode:`!SETUP_WITH`" msgstr "" -#: ../../whatsnew/3.11.rst:0 +#: ../../whatsnew/3.11.rst:1674 msgid ":opcode:`!SETUP_ASYNC_WITH`" msgstr "" diff --git a/whatsnew/3.11.po~ b/whatsnew/3.11.po~ new file mode 100644 index 00000000..6846561c --- /dev/null +++ b/whatsnew/3.11.po~ @@ -0,0 +1,4482 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../whatsnew/3.11.rst:3 +msgid "What's New In Python 3.11" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid "Editor" +msgstr "" + +#: ../../whatsnew/3.11.rst:5 +msgid "Pablo Galindo Salgado" +msgstr "" + +#: ../../whatsnew/3.11.rst:47 +msgid "" +"This article explains the new features in Python 3.11, compared to 3.10. " +"Python 3.11 was released on October 24, 2022. For full details, see the :ref:" +"`changelog `." +msgstr "" + +#: ../../whatsnew/3.11.rst:55 +msgid "Summary -- Release highlights" +msgstr "Zusammenfassung - Release Höhepunkte" + +#: ../../whatsnew/3.11.rst:60 +msgid "" +"Python 3.11 is between 10-60% faster than Python 3.10. On average, we " +"measured a 1.25x speedup on the standard benchmark suite. See :ref:" +"`whatsnew311-faster-cpython` for details." +msgstr "" + +#: ../../whatsnew/3.11.rst:66 +msgid "New syntax features:" +msgstr "" + +#: ../../whatsnew/3.11.rst:68 +msgid ":ref:`whatsnew311-pep654`" +msgstr "" + +#: ../../whatsnew/3.11.rst:70 +msgid "New built-in features:" +msgstr "" + +#: ../../whatsnew/3.11.rst:72 +msgid ":ref:`whatsnew311-pep678`" +msgstr "" + +#: ../../whatsnew/3.11.rst:74 +msgid "New standard library modules:" +msgstr "" + +#: ../../whatsnew/3.11.rst:76 +msgid "" +":pep:`680`: :mod:`tomllib` — Support for parsing `TOML `_ " +"in the Standard Library" +msgstr "" + +#: ../../whatsnew/3.11.rst:79 +msgid "Interpreter improvements:" +msgstr "" + +#: ../../whatsnew/3.11.rst:81 +msgid ":ref:`whatsnew311-pep657`" +msgstr "" + +#: ../../whatsnew/3.11.rst:82 +msgid "" +"New :option:`-P` command line option and :envvar:`PYTHONSAFEPATH` " +"environment variable to :ref:`disable automatically prepending potentially " +"unsafe paths ` to :data:`sys.path`" +msgstr "" + +#: ../../whatsnew/3.11.rst:86 +msgid "New typing features:" +msgstr "Neue Typisierungsfunktionen:" + +#: ../../whatsnew/3.11.rst:88 +msgid ":ref:`whatsnew311-pep646`" +msgstr "" + +#: ../../whatsnew/3.11.rst:89 +msgid ":ref:`whatsnew311-pep655`" +msgstr "" + +#: ../../whatsnew/3.11.rst:90 +msgid ":ref:`whatsnew311-pep673`" +msgstr "" + +#: ../../whatsnew/3.11.rst:91 +msgid ":ref:`whatsnew311-pep675`" +msgstr "" + +#: ../../whatsnew/3.11.rst:92 +msgid ":ref:`whatsnew311-pep681`" +msgstr "" + +#: ../../whatsnew/3.11.rst:94 +msgid "Important deprecations, removals and restrictions:" +msgstr "" + +#: ../../whatsnew/3.11.rst:96 +msgid "" +":pep:`594`: :ref:`Many legacy standard library modules have been deprecated " +"` and will be removed in Python 3.13" +msgstr "" + +#: ../../whatsnew/3.11.rst:99 +msgid "" +":pep:`624`: :ref:`Py_UNICODE encoder APIs have been removed `" +msgstr "" + +#: ../../whatsnew/3.11.rst:101 +msgid "" +":pep:`670`: :ref:`Macros converted to static inline functions `" +msgstr "" + +#: ../../whatsnew/3.11.rst:108 ../../whatsnew/3.11.rst:2211 +msgid "New Features" +msgstr "Neue Funktionen" + +#: ../../whatsnew/3.11.rst:113 +msgid "PEP 657: Fine-grained error locations in tracebacks" +msgstr "" + +#: ../../whatsnew/3.11.rst:115 +msgid "" +"When printing tracebacks, the interpreter will now point to the exact " +"expression that caused the error, instead of just the line. For example:" +msgstr "" + +#: ../../whatsnew/3.11.rst:118 +msgid "" +"Traceback (most recent call last):\n" +" File \"distance.py\", line 11, in \n" +" print(manhattan_distance(p1, p2))\n" +" ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +" File \"distance.py\", line 6, in manhattan_distance\n" +" return abs(point_1.x - point_2.x) + abs(point_1.y - point_2.y)\n" +" ^^^^^^^^^\n" +"AttributeError: 'NoneType' object has no attribute 'x'" +msgstr "" + +#: ../../whatsnew/3.11.rst:129 +msgid "" +"Previous versions of the interpreter would point to just the line, making it " +"ambiguous which object was ``None``. These enhanced errors can also be " +"helpful when dealing with deeply nested :class:`dict` objects and multiple " +"function calls:" +msgstr "" + +#: ../../whatsnew/3.11.rst:133 +msgid "" +"Traceback (most recent call last):\n" +" File \"query.py\", line 37, in \n" +" magic_arithmetic('foo')\n" +" File \"query.py\", line 18, in magic_arithmetic\n" +" return add_counts(x) / 25\n" +" ^^^^^^^^^^^^^\n" +" File \"query.py\", line 24, in add_counts\n" +" return 25 + query_user(user1) + query_user(user2)\n" +" ^^^^^^^^^^^^^^^^^\n" +" File \"query.py\", line 32, in query_user\n" +" return 1 + query_count(db, response['a']['b']['c']['user'], retry=True)\n" +" ~~~~~~~~~~~~~~~~~~^^^^^\n" +"TypeError: 'NoneType' object is not subscriptable" +msgstr "" + +#: ../../whatsnew/3.11.rst:149 +msgid "As well as complex arithmetic expressions:" +msgstr "" + +#: ../../whatsnew/3.11.rst:151 +msgid "" +"Traceback (most recent call last):\n" +" File \"calculation.py\", line 54, in \n" +" result = (x / y / z) * (a / b / c)\n" +" ~~~~~~^~~\n" +"ZeroDivisionError: division by zero" +msgstr "" + +#: ../../whatsnew/3.11.rst:159 +msgid "" +"Additionally, the information used by the enhanced traceback feature is made " +"available via a general API, that can be used to correlate :term:`bytecode` :" +"ref:`instructions ` with source code location. This information " +"can be retrieved using:" +msgstr "" + +#: ../../whatsnew/3.11.rst:164 +msgid "The :meth:`codeobject.co_positions` method in Python." +msgstr "" + +#: ../../whatsnew/3.11.rst:165 +msgid "The :c:func:`PyCode_Addr2Location` function in the C API." +msgstr "" + +#: ../../whatsnew/3.11.rst:167 +msgid "" +"See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan " +"Taskaya and Ammar Askar in :issue:`43950`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:171 +msgid "" +"This feature requires storing column positions in :ref:`codeobjects`, which " +"may result in a small increase in interpreter memory usage and disk usage " +"for compiled Python files. To avoid storing the extra information and " +"deactivate printing the extra traceback information, use the :option:`-X " +"no_debug_ranges <-X>` command line option or the :envvar:" +"`PYTHONNODEBUGRANGES` environment variable." +msgstr "" + +#: ../../whatsnew/3.11.rst:183 +msgid "PEP 654: Exception Groups and ``except*``" +msgstr "" + +#: ../../whatsnew/3.11.rst:185 +msgid "" +":pep:`654` introduces language features that enable a program to raise and " +"handle multiple unrelated exceptions simultaneously. The builtin types :exc:" +"`ExceptionGroup` and :exc:`BaseExceptionGroup` make it possible to group " +"exceptions and raise them together, and the new :keyword:`except* " +"` syntax generalizes :keyword:`except` to match subgroups of " +"exception groups." +msgstr "" + +#: ../../whatsnew/3.11.rst:192 +msgid "See :pep:`654` for more details." +msgstr "" + +#: ../../whatsnew/3.11.rst:194 +msgid "" +"(Contributed by Irit Katriel in :issue:`45292`. PEP written by Irit Katriel, " +"Yury Selivanov and Guido van Rossum.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:201 +msgid "PEP 678: Exceptions can be enriched with notes" +msgstr "" + +#: ../../whatsnew/3.11.rst:203 +msgid "" +"The :meth:`~BaseException.add_note` method is added to :exc:`BaseException`. " +"It can be used to enrich exceptions with context information that is not " +"available at the time when the exception is raised. The added notes appear " +"in the default traceback." +msgstr "" + +#: ../../whatsnew/3.11.rst:208 +msgid "See :pep:`678` for more details." +msgstr "" + +#: ../../whatsnew/3.11.rst:210 +msgid "" +"(Contributed by Irit Katriel in :issue:`45607`. PEP written by Zac Hatfield-" +"Dodds.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:217 +msgid "Windows ``py.exe`` launcher improvements" +msgstr "" + +#: ../../whatsnew/3.11.rst:219 +msgid "" +"The copy of the :ref:`launcher` included with Python 3.11 has been " +"significantly updated. It now supports company/tag syntax as defined in :pep:" +"`514` using the :samp:`-V:{}/{}` argument instead of the " +"limited :samp:`-{}.{}`. This allows launching distributions " +"other than ``PythonCore``, the one hosted on `python.org `_." +msgstr "" + +#: ../../whatsnew/3.11.rst:225 +msgid "" +"When using ``-V:`` selectors, either company or tag can be omitted, but all " +"installs will be searched. For example, ``-V:OtherPython/`` will select the " +"\"best\" tag registered for ``OtherPython``, while ``-V:3.11`` or ``-" +"V:/3.11`` will select the \"best\" distribution with tag ``3.11``." +msgstr "" + +#: ../../whatsnew/3.11.rst:230 +msgid "" +"When using the legacy :samp:`-{}`, :samp:`-{}.{}`, :" +"samp:`-{}-{}` or :samp:`-{}.{}-{}` " +"arguments, all existing behaviour should be preserved from past versions, " +"and only releases from ``PythonCore`` will be selected. However, the ``-64`` " +"suffix now implies \"not 32-bit\" (not necessarily x86-64), as there are " +"multiple supported 64-bit platforms. 32-bit runtimes are detected by " +"checking the runtime's tag for a ``-32`` suffix. All releases of Python " +"since 3.5 have included this in their 32-bit builds." +msgstr "" + +#: ../../whatsnew/3.11.rst:244 +msgid "New Features Related to Type Hints" +msgstr "Neue Funktionen im Zusammenhang mit Typ-Hinweisen" + +#: ../../whatsnew/3.11.rst:246 +msgid "" +"This section covers major changes affecting :pep:`484` type hints and the :" +"mod:`typing` module." +msgstr "" + +#: ../../whatsnew/3.11.rst:253 +msgid "PEP 646: Variadic generics" +msgstr "" + +#: ../../whatsnew/3.11.rst:255 +msgid "" +":pep:`484` previously introduced :data:`~typing.TypeVar`, enabling creation " +"of generics parameterised with a single type. :pep:`646` adds :data:`~typing." +"TypeVarTuple`, enabling parameterisation with an *arbitrary* number of " +"types. In other words, a :data:`~typing.TypeVarTuple` is a *variadic* type " +"variable, enabling *variadic* generics." +msgstr "" + +#: ../../whatsnew/3.11.rst:262 +msgid "" +"This enables a wide variety of use cases. In particular, it allows the type " +"of array-like structures in numerical computing libraries such as NumPy and " +"TensorFlow to be parameterised with the array *shape*. Static type checkers " +"will now be able to catch shape-related bugs in code that uses these " +"libraries." +msgstr "" + +#: ../../whatsnew/3.11.rst:268 +msgid "See :pep:`646` for more details." +msgstr "" + +#: ../../whatsnew/3.11.rst:270 +msgid "" +"(Contributed by Matthew Rahtz in :issue:`43224`, with contributions by " +"Serhiy Storchaka and Jelle Zijlstra. PEP written by Mark Mendoza, Matthew " +"Rahtz, Pradeep Kumar Srinivasan, and Vincent Siles.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:278 +msgid "" +"PEP 655: Marking individual ``TypedDict`` items as required or not-required" +msgstr "" + +#: ../../whatsnew/3.11.rst:280 +msgid "" +":data:`~typing.Required` and :data:`~typing.NotRequired` provide a " +"straightforward way to mark whether individual items in a :class:`~typing." +"TypedDict` must be present. Previously, this was only possible using " +"inheritance." +msgstr "" + +#: ../../whatsnew/3.11.rst:285 +msgid "" +"All fields are still required by default, unless the *total* parameter is " +"set to ``False``, in which case all fields are still not-required by " +"default. For example, the following specifies a :class:`!TypedDict` with one " +"required and one not-required key::" +msgstr "" + +#: ../../whatsnew/3.11.rst:291 +msgid "" +"class Movie(TypedDict):\n" +" title: str\n" +" year: NotRequired[int]\n" +"\n" +"m1: Movie = {\"title\": \"Black Panther\", \"year\": 2018} # OK\n" +"m2: Movie = {\"title\": \"Star Wars\"} # OK (year is not required)\n" +"m3: Movie = {\"year\": 2022} # ERROR (missing required field title)" +msgstr "" + +#: ../../whatsnew/3.11.rst:299 +msgid "The following definition is equivalent::" +msgstr "" + +#: ../../whatsnew/3.11.rst:301 +msgid "" +"class Movie(TypedDict, total=False):\n" +" title: Required[str]\n" +" year: int" +msgstr "" + +#: ../../whatsnew/3.11.rst:305 +msgid "See :pep:`655` for more details." +msgstr "" + +#: ../../whatsnew/3.11.rst:307 +msgid "" +"(Contributed by David Foster and Jelle Zijlstra in :issue:`47087`. PEP " +"written by David Foster.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:314 +msgid "PEP 673: ``Self`` type" +msgstr "" + +#: ../../whatsnew/3.11.rst:316 +msgid "" +"The new :data:`~typing.Self` annotation provides a simple and intuitive way " +"to annotate methods that return an instance of their class. This behaves the " +"same as the :class:`~typing.TypeVar`-based approach :pep:`specified in PEP " +"484 <484#annotating-instance-and-class-methods>`, but is more concise and " +"easier to follow." +msgstr "" + +#: ../../whatsnew/3.11.rst:322 +msgid "" +"Common use cases include alternative constructors provided as :func:" +"`classmethod `\\s, and :meth:`~object.__enter__` methods that " +"return ``self``::" +msgstr "" + +#: ../../whatsnew/3.11.rst:326 +msgid "" +"class MyLock:\n" +" def __enter__(self) -> Self:\n" +" self.lock()\n" +" return self\n" +"\n" +" ...\n" +"\n" +"class MyInt:\n" +" @classmethod\n" +" def fromhex(cls, s: str) -> Self:\n" +" return cls(int(s, 16))\n" +"\n" +" ..." +msgstr "" + +#: ../../whatsnew/3.11.rst:340 +msgid "" +":data:`~typing.Self` can also be used to annotate method parameters or " +"attributes of the same type as their enclosing class." +msgstr "" + +#: ../../whatsnew/3.11.rst:343 +msgid "See :pep:`673` for more details." +msgstr "" + +#: ../../whatsnew/3.11.rst:345 +msgid "" +"(Contributed by James Hilton-Balfe in :issue:`46534`. PEP written by Pradeep " +"Kumar Srinivasan and James Hilton-Balfe.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:352 +msgid "PEP 675: Arbitrary literal string type" +msgstr "" + +#: ../../whatsnew/3.11.rst:354 +msgid "" +"The new :data:`~typing.LiteralString` annotation may be used to indicate " +"that a function parameter can be of any literal string type. This allows a " +"function to accept arbitrary literal string types, as well as strings " +"created from other literal strings. Type checkers can then enforce that " +"sensitive functions, such as those that execute SQL statements or shell " +"commands, are called only with static arguments, providing protection " +"against injection attacks." +msgstr "" + +#: ../../whatsnew/3.11.rst:362 +msgid "For example, a SQL query function could be annotated as follows::" +msgstr "" + +#: ../../whatsnew/3.11.rst:364 +msgid "" +"def run_query(sql: LiteralString) -> ...\n" +" ...\n" +"\n" +"def caller(\n" +" arbitrary_string: str,\n" +" query_string: LiteralString,\n" +" table_name: LiteralString,\n" +") -> None:\n" +" run_query(\"SELECT * FROM students\") # ok\n" +" run_query(query_string) # ok\n" +" run_query(\"SELECT * FROM \" + table_name) # ok\n" +" run_query(arbitrary_string) # type checker error\n" +" run_query( # type checker error\n" +" f\"SELECT * FROM students WHERE name = {arbitrary_string}\"\n" +" )" +msgstr "" + +#: ../../whatsnew/3.11.rst:380 +msgid "See :pep:`675` for more details." +msgstr "" + +#: ../../whatsnew/3.11.rst:382 +msgid "" +"(Contributed by Jelle Zijlstra in :issue:`47088`. PEP written by Pradeep " +"Kumar Srinivasan and Graham Bleaney.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:389 +msgid "PEP 681: Data class transforms" +msgstr "" + +#: ../../whatsnew/3.11.rst:391 +msgid "" +":deco:`~typing.dataclass_transform` may be used to decorate a class, " +"metaclass, or a function that is itself a decorator. The presence of " +"``@dataclass_transform()`` tells a static type checker that the decorated " +"object performs runtime \"magic\" that transforms a class, giving it :func:" +"`dataclass `-like behaviors." +msgstr "" + +#: ../../whatsnew/3.11.rst:397 +msgid "For example::" +msgstr "Zum Beispiel::" + +#: ../../whatsnew/3.11.rst:399 +msgid "" +"# The create_model decorator is defined by a library.\n" +"@typing.dataclass_transform()\n" +"def create_model(cls: Type[T]) -> Type[T]:\n" +" cls.__init__ = ...\n" +" cls.__eq__ = ...\n" +" cls.__ne__ = ...\n" +" return cls\n" +"\n" +"# The create_model decorator can now be used to create new model classes:\n" +"@create_model\n" +"class CustomerModel:\n" +" id: int\n" +" name: str\n" +"\n" +"c = CustomerModel(id=327, name=\"Eric Idle\")" +msgstr "" + +#: ../../whatsnew/3.11.rst:415 +msgid "See :pep:`681` for more details." +msgstr "" + +#: ../../whatsnew/3.11.rst:417 +msgid "" +"(Contributed by Jelle Zijlstra in :gh:`91860`. PEP written by Erik De Bonte " +"and Eric Traut.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:424 +msgid "PEP 563 may not be the future" +msgstr "" + +#: ../../whatsnew/3.11.rst:426 +msgid "" +":pep:`563` Postponed Evaluation of Annotations (the ``from __future__ import " +"annotations`` :ref:`future statement `) that was originally planned " +"for release in Python 3.10 has been put on hold indefinitely. See `this " +"message from the Steering Council `__ for more " +"information." +msgstr "" + +#: ../../whatsnew/3.11.rst:437 +msgid "Other Language Changes" +msgstr "Andere sprachliche Änderungen" + +#: ../../whatsnew/3.11.rst:439 +msgid "" +"Starred unpacking expressions can now be used in :keyword:`for` statements. " +"(See :issue:`46725` for more details.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:442 +msgid "" +"Asynchronous :ref:`comprehensions ` are now allowed inside " +"comprehensions in :ref:`asynchronous functions `. Outer " +"comprehensions implicitly become asynchronous in this case. (Contributed by " +"Serhiy Storchaka in :issue:`33346`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:447 +msgid "" +"A :exc:`TypeError` is now raised instead of an :exc:`AttributeError` in :" +"keyword:`with` statements and :meth:`contextlib.ExitStack.enter_context` for " +"objects that do not support the :term:`context manager` protocol, and in :" +"keyword:`async with` statements and :meth:`contextlib.AsyncExitStack." +"enter_async_context` for objects not supporting the :term:`asynchronous " +"context manager` protocol. (Contributed by Serhiy Storchaka in :issue:" +"`12022` and :issue:`44471`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:455 +msgid "" +"Added :meth:`object.__getstate__`, which provides the default implementation " +"of the :meth:`!__getstate__` method. :mod:`copy`\\ing and :mod:`pickle`\\ing " +"instances of subclasses of builtin types :class:`bytearray`, :class:`set`, :" +"class:`frozenset`, :class:`collections.OrderedDict`, :class:`collections." +"deque`, :class:`weakref.WeakSet`, and :class:`datetime.tzinfo` now copies " +"and pickles instance attributes implemented as :term:`slots <__slots__>`. " +"This change has an unintended side effect: It trips up a small minority of " +"existing Python projects not expecting :meth:`object.__getstate__` to exist. " +"See the later comments on :gh:`70766` for discussions of what workarounds " +"such code may need. (Contributed by Serhiy Storchaka in :issue:`26579`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:470 +msgid "" +"Added a :option:`-P` command line option and a :envvar:`PYTHONSAFEPATH` " +"environment variable, which disable the automatic prepending to :data:`sys." +"path` of the script's directory when running a script, or the current " +"directory when using :option:`-c` and :option:`-m`. This ensures only stdlib " +"and installed modules are picked up by :keyword:`import`, and avoids " +"unintentionally or maliciously shadowing modules with those in a local (and " +"typically user-writable) directory. (Contributed by Victor Stinner in :gh:" +"`57684`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:481 +msgid "" +"A ``\"z\"`` option was added to the :ref:`formatspec` that coerces negative " +"to positive zero after rounding to the format precision. See :pep:`682` for " +"more details. (Contributed by John Belmonte in :gh:`90153`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:486 +msgid "" +"Bytes are no longer accepted on :data:`sys.path`. Support broke sometime " +"between Python 3.2 and 3.6, with no one noticing until after Python 3.10.0 " +"was released. In addition, bringing back support would be problematic due to " +"interactions between :option:`-b` and :data:`sys.path_importer_cache` when " +"there is a mixture of :class:`str` and :class:`bytes` keys. (Contributed by " +"Thomas Grainger in :gh:`91181`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:497 +msgid "Other CPython Implementation Changes" +msgstr "" + +#: ../../whatsnew/3.11.rst:499 +msgid "" +"The special methods :meth:`~object.__complex__` for :class:`complex` and :" +"meth:`~object.__bytes__` for :class:`bytes` are implemented to support the :" +"class:`typing.SupportsComplex` and :class:`typing.SupportsBytes` protocols. " +"(Contributed by Mark Dickinson and Donghee Na in :issue:`24234`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:504 +msgid "" +"``siphash13`` is added as a new internal hashing algorithm. It has similar " +"security properties as ``siphash24``, but it is slightly faster for long " +"inputs. :class:`str`, :class:`bytes`, and some other types now use it as the " +"default algorithm for :func:`hash`. :pep:`552` :ref:`hash-based .pyc files " +"` now use ``siphash13`` too. (Contributed by Inada Naoki " +"in :issue:`29410`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:513 +msgid "" +"When an active exception is re-raised by a :keyword:`raise` statement with " +"no parameters, the traceback attached to this exception is now always ``sys." +"exc_info()[1].__traceback__``. This means that changes made to the traceback " +"in the current :keyword:`except` clause are reflected in the re-raised " +"exception. (Contributed by Irit Katriel in :issue:`45711`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:519 +msgid "" +"The interpreter state's representation of handled exceptions (aka " +"``exc_info`` or ``_PyErr_StackItem``) now only has the ``exc_value`` field; " +"``exc_type`` and ``exc_traceback`` have been removed, as they can be derived " +"from ``exc_value``. (Contributed by Irit Katriel in :issue:`45711`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:525 +msgid "" +"A new :ref:`command line option `, ``AppendPath``, has " +"been added for the Windows installer. It behaves similarly to " +"``PrependPath``, but appends the install and scripts directories instead of " +"prepending them. (Contributed by Bastian Neuburger in :issue:`44934`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:531 +msgid "" +"The :c:member:`PyConfig.module_search_paths_set` field must now be set to " +"``1`` for initialization to use :c:member:`PyConfig.module_search_paths` to " +"initialize :data:`sys.path`. Otherwise, initialization will recalculate the " +"path and replace any values added to ``module_search_paths``." +msgstr "" + +#: ../../whatsnew/3.11.rst:536 +msgid "" +"The output of the :option:`--help` option now fits in 50 lines/80 columns. " +"Information about :ref:`Python environment variables ` " +"and :option:`-X` options is now available using the respective :option:`--" +"help-env` and :option:`--help-xoptions` flags, and with the new :option:`--" +"help-all`. (Contributed by Éric Araujo in :issue:`46142`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:543 +msgid "" +"Converting between :class:`int` and :class:`str` in bases other than 2 " +"(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) " +"now raises a :exc:`ValueError` if the number of digits in string form is " +"above a limit to avoid potential denial of service attacks due to the " +"algorithmic complexity. This is a mitigation for :cve:`2020-10735`. This " +"limit can be configured or disabled by environment variable, command line " +"flag, or :mod:`sys` APIs. See the :ref:`integer string conversion length " +"limitation ` documentation. The default limit is 4300 " +"digits in string form." +msgstr "" + +#: ../../whatsnew/3.11.rst:557 +msgid "New Modules" +msgstr "Neue Module" + +#: ../../whatsnew/3.11.rst:559 +msgid "" +":mod:`tomllib`: For parsing `TOML `_. See :pep:`680` for " +"more details. (Contributed by Taneli Hukkinen in :issue:`40059`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:563 +msgid "" +":mod:`wsgiref.types`: :pep:`WSGI <3333>`-specific types for static type " +"checking. (Contributed by Sebastian Rittau in :issue:`42012`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:571 +msgid "Improved Modules" +msgstr "Verbesserte Module" + +#: ../../whatsnew/3.11.rst:576 +msgid "asyncio" +msgstr "asyncio" + +#: ../../whatsnew/3.11.rst:578 +msgid "" +"Added the :class:`~asyncio.TaskGroup` class, an :ref:`asynchronous context " +"manager ` holding a group of tasks that will wait " +"for all of them upon exit. For new code this is recommended over using :func:" +"`~asyncio.create_task` and :func:`~asyncio.gather` directly. (Contributed by " +"Yury Selivanov and others in :gh:`90908`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:585 +msgid "" +"Added :func:`~asyncio.timeout`, an asynchronous context manager for setting " +"a timeout on asynchronous operations. For new code this is recommended over " +"using :func:`~asyncio.wait_for` directly. (Contributed by Andrew Svetlov in :" +"gh:`90927`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:590 +msgid "" +"Added the :class:`~asyncio.Runner` class, which exposes the machinery used " +"by :func:`~asyncio.run`. (Contributed by Andrew Svetlov in :gh:`91218`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:594 +msgid "" +"Added the :class:`~asyncio.Barrier` class to the synchronization primitives " +"in the asyncio library, and the related :exc:`~asyncio.BrokenBarrierError` " +"exception. (Contributed by Yves Duprat and Andrew Svetlov in :gh:`87518`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:599 +msgid "" +"Added keyword argument *all_errors* to :meth:`asyncio.loop." +"create_connection` so that multiple connection errors can be raised as an :" +"exc:`ExceptionGroup`." +msgstr "" + +#: ../../whatsnew/3.11.rst:602 +msgid "" +"Added the :meth:`asyncio.StreamWriter.start_tls` method for upgrading " +"existing stream-based connections to TLS. (Contributed by Ian Good in :issue:" +"`34975`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:606 +msgid "" +"Added raw datagram socket functions to the event loop: :meth:`~asyncio.loop." +"sock_sendto`, :meth:`~asyncio.loop.sock_recvfrom` and :meth:`~asyncio.loop." +"sock_recvfrom_into`. These have implementations in :class:`~asyncio." +"SelectorEventLoop` and :class:`~asyncio.ProactorEventLoop`. (Contributed by " +"Alex Grönholm in :issue:`46805`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:614 +msgid "" +"Added :meth:`~asyncio.Task.cancelling` and :meth:`~asyncio.Task.uncancel` " +"methods to :class:`~asyncio.Task`. These are primarily intended for internal " +"use, notably by :class:`~asyncio.TaskGroup`." +msgstr "" + +#: ../../whatsnew/3.11.rst:623 +msgid "contextlib" +msgstr "" + +#: ../../whatsnew/3.11.rst:625 +msgid "" +"Added non parallel-safe :func:`~contextlib.chdir` context manager to change " +"the current working directory and then restore it on exit. Simple wrapper " +"around :func:`~os.chdir`. (Contributed by Filipe Laíns in :issue:`25625`)" +msgstr "" + +#: ../../whatsnew/3.11.rst:633 +msgid "dataclasses" +msgstr "" + +#: ../../whatsnew/3.11.rst:635 +msgid "" +"Change field default mutability check, allowing only defaults which are :" +"term:`hashable` instead of any object which is not an instance of :class:" +"`dict`, :class:`list` or :class:`set`. (Contributed by Eric V. Smith in :" +"issue:`44674`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:644 +msgid "datetime" +msgstr "" + +#: ../../whatsnew/3.11.rst:646 +msgid "" +"Add :const:`datetime.UTC`, a convenience alias for :attr:`datetime.timezone." +"utc`. (Contributed by Kabir Kwatra in :gh:`91973`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:649 +msgid "" +":meth:`datetime.date.fromisoformat`, :meth:`datetime.time.fromisoformat` " +"and :meth:`datetime.datetime.fromisoformat` can now be used to parse most " +"ISO 8601 formats (barring only those that support fractional hours and " +"minutes). (Contributed by Paul Ganssle in :gh:`80010`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:658 +msgid "enum" +msgstr "" + +#: ../../whatsnew/3.11.rst:660 +msgid "" +"Renamed :class:`!EnumMeta` to :class:`~enum.EnumType` (:class:`!EnumMeta` " +"kept as an alias)." +msgstr "" + +#: ../../whatsnew/3.11.rst:663 +msgid "" +"Added :class:`~enum.StrEnum`, with members that can be used as (and must be) " +"strings." +msgstr "" + +#: ../../whatsnew/3.11.rst:666 +msgid "" +"Added :class:`~enum.ReprEnum`, which only modifies the :meth:`~object." +"__repr__` of members while returning their literal values (rather than " +"names) for :meth:`~object.__str__` and :meth:`~object.__format__` (used by :" +"func:`str`, :func:`format` and :term:`f-string`\\s)." +msgstr "" + +#: ../../whatsnew/3.11.rst:672 +msgid "" +"Changed :meth:`Enum.__format__() ` (the default for :" +"func:`format`, :meth:`str.format` and :term:`f-string`\\s) to always produce " +"the same result as :meth:`Enum.__str__() `: for enums " +"inheriting from :class:`~enum.ReprEnum` it will be the member's value; for " +"all other enums it will be the enum and member name (e.g. ``Color.RED``)." +msgstr "" + +#: ../../whatsnew/3.11.rst:678 +msgid "" +"Added a new *boundary* class parameter to :class:`~enum.Flag` enums and the :" +"class:`~enum.FlagBoundary` enum with its options, to control how to handle " +"out-of-range flag values." +msgstr "" + +#: ../../whatsnew/3.11.rst:682 +msgid "" +"Added the :func:`~enum.verify` enum decorator and the :class:`~enum." +"EnumCheck` enum with its options, to check enum classes against several " +"specific constraints." +msgstr "" + +#: ../../whatsnew/3.11.rst:686 +msgid "" +"Added the :func:`~enum.member` and :func:`~enum.nonmember` decorators, to " +"ensure the decorated object is/is not converted to an enum member." +msgstr "" + +#: ../../whatsnew/3.11.rst:689 +msgid "" +"Added the :deco:`~enum.property` decorator, which works like :deco:" +"`property` except for enums. Use this instead of :func:`types." +"DynamicClassAttribute`." +msgstr "" + +#: ../../whatsnew/3.11.rst:693 +msgid "" +"Added the :func:`~enum.global_enum` enum decorator, which adjusts :meth:" +"`~object.__repr__` and :meth:`~object.__str__` to show values as members of " +"their module rather than the enum class. For example, ``'re.ASCII'`` for " +"the :const:`~re.ASCII` member of :class:`re.RegexFlag` rather than " +"``'RegexFlag.ASCII'``." +msgstr "" + +#: ../../whatsnew/3.11.rst:699 +msgid "" +"Enhanced :class:`~enum.Flag` to support :func:`len`, iteration and :keyword:" +"`in`/:keyword:`not in` on its members. For example, the following now works: " +"``len(AFlag(3)) == 2 and list(AFlag(3)) == (AFlag.ONE, AFlag.TWO)``" +msgstr "" + +#: ../../whatsnew/3.11.rst:704 +msgid "" +"Changed :class:`~enum.Enum` and :class:`~enum.Flag` so that members are now " +"defined before :meth:`~object.__init_subclass__` is called; :func:`dir` now " +"includes methods, etc., from mixed-in data types." +msgstr "" + +#: ../../whatsnew/3.11.rst:709 +msgid "" +"Changed :class:`~enum.Flag` to only consider primary values (power of two) " +"canonical while composite values (``3``, ``6``, ``10``, etc.) are considered " +"aliases; inverted flags are coerced to their positive equivalent." +msgstr "" + +#: ../../whatsnew/3.11.rst:718 +msgid "fcntl" +msgstr "" + +#: ../../whatsnew/3.11.rst:720 +msgid "" +"On FreeBSD, the :data:`!F_DUP2FD` and :data:`!F_DUP2FD_CLOEXEC` flags " +"respectively are supported, the former equals to ``dup2`` usage while the " +"latter set the ``FD_CLOEXEC`` flag in addition." +msgstr "" + +#: ../../whatsnew/3.11.rst:728 +msgid "fractions" +msgstr "fractions" + +#: ../../whatsnew/3.11.rst:730 +msgid "" +"Support :PEP:`515`-style initialization of :class:`~fractions.Fraction` from " +"string. (Contributed by Sergey B Kirpichev in :issue:`44258`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:733 +msgid "" +":class:`~fractions.Fraction` now implements an ``__int__`` method, so that " +"an ``isinstance(some_fraction, typing.SupportsInt)`` check passes. " +"(Contributed by Mark Dickinson in :issue:`44547`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:741 +msgid "functools" +msgstr "" + +#: ../../whatsnew/3.11.rst:743 +msgid "" +":deco:`functools.singledispatch` now supports :class:`types.UnionType` and :" +"class:`typing.Union` as annotations to the dispatch argument.::" +msgstr "" + +#: ../../whatsnew/3.11.rst:746 +msgid "" +">>> from functools import singledispatch\n" +">>> @singledispatch\n" +"... def fun(arg, verbose=False):\n" +"... if verbose:\n" +"... print(\"Let me just say,\", end=\" \")\n" +"... print(arg)\n" +"...\n" +">>> @fun.register\n" +"... def _(arg: int | float, verbose=False):\n" +"... if verbose:\n" +"... print(\"Strength in numbers, eh?\", end=\" \")\n" +"... print(arg)\n" +"...\n" +">>> from typing import Union\n" +">>> @fun.register\n" +"... def _(arg: Union[list, set], verbose=False):\n" +"... if verbose:\n" +"... print(\"Enumerate this:\")\n" +"... for i, elem in enumerate(arg):\n" +"... print(i, elem)\n" +"..." +msgstr "" + +#: ../../whatsnew/3.11.rst:768 +msgid "(Contributed by Yurii Karabas in :issue:`46014`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:774 +msgid "gzip" +msgstr "" + +#: ../../whatsnew/3.11.rst:776 +msgid "" +"The :func:`gzip.compress` function is now faster when used with the " +"**mtime=0** argument as it delegates the compression entirely to a single :" +"func:`zlib.compress` operation. There is one side effect of this change: The " +"gzip file header contains an \"OS\" byte in its header. That was " +"traditionally always set to a value of 255 representing \"unknown\" by the :" +"mod:`gzip` module. Now, when using :func:`~gzip.compress` with **mtime=0**, " +"it may be set to a different value by the underlying zlib C library Python " +"was linked against. (See :gh:`112346` for details on the side effect.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:789 +msgid "hashlib" +msgstr "" + +#: ../../whatsnew/3.11.rst:791 +msgid "" +":func:`hashlib.blake2b` and :func:`hashlib.blake2s` now prefer `libb2`_ over " +"Python's vendored copy. (Contributed by Christian Heimes in :issue:`47095`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:795 +msgid "" +"The internal ``_sha3`` module with SHA3 and SHAKE algorithms now uses " +"*tiny_sha3* instead of the *Keccak Code Package* to reduce code and binary " +"size. The :mod:`hashlib` module prefers optimized SHA3 and SHAKE " +"implementations from OpenSSL. The change affects only installations without " +"OpenSSL support. (Contributed by Christian Heimes in :issue:`47098`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:802 +msgid "" +"Add :func:`hashlib.file_digest`, a helper function for efficient hashing of " +"files or file-like objects. (Contributed by Christian Heimes in :gh:`89313`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:810 +msgid "IDLE and idlelib" +msgstr "" + +#: ../../whatsnew/3.11.rst:812 +msgid "" +"Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex Waygood " +"and Terry Jan Reedy in :issue:`45447`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:815 +msgid "" +"Include prompts when saving Shell with inputs and outputs. (Contributed by " +"Terry Jan Reedy in :gh:`95191`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:822 +msgid "inspect" +msgstr "" + +#: ../../whatsnew/3.11.rst:824 +msgid "" +"Add :func:`~inspect.getmembers_static` to return all members without " +"triggering dynamic lookup via the descriptor protocol. (Contributed by " +"Weipeng Hong in :issue:`30533`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:828 +msgid "" +"Add :func:`~inspect.ismethodwrapper` for checking if the type of an object " +"is a :class:`~types.MethodWrapperType`. (Contributed by Hakan Çelik in :" +"issue:`29418`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:832 +msgid "" +"Change the frame-related functions in the :mod:`inspect` module to return " +"new :class:`~inspect.FrameInfo` and :class:`~inspect.Traceback` class " +"instances (backwards compatible with the previous :term:`named tuple`-like " +"interfaces) that includes the extended :pep:`657` position information (end " +"line number, column and end column). The affected functions are:" +msgstr "" + +#: ../../whatsnew/3.11.rst:838 +msgid ":func:`inspect.getframeinfo`" +msgstr "" + +#: ../../whatsnew/3.11.rst:839 +msgid ":func:`inspect.getouterframes`" +msgstr "" + +#: ../../whatsnew/3.11.rst:840 +msgid ":func:`inspect.getinnerframes`," +msgstr "" + +#: ../../whatsnew/3.11.rst:841 +msgid ":func:`inspect.stack`" +msgstr "" + +#: ../../whatsnew/3.11.rst:842 +msgid ":func:`inspect.trace`" +msgstr "" + +#: ../../whatsnew/3.11.rst:844 +msgid "(Contributed by Pablo Galindo in :gh:`88116`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:850 +msgid "locale" +msgstr "" + +#: ../../whatsnew/3.11.rst:852 +msgid "" +"Add :func:`locale.getencoding` to get the current locale encoding. It is " +"similar to ``locale.getpreferredencoding(False)`` but ignores the :ref:" +"`Python UTF-8 Mode `." +msgstr "" + +#: ../../whatsnew/3.11.rst:860 +msgid "logging" +msgstr "" + +#: ../../whatsnew/3.11.rst:862 +msgid "" +"Added :func:`~logging.getLevelNamesMapping` to return a mapping from logging " +"level names (e.g. ``'CRITICAL'``) to the values of their corresponding :ref:" +"`levels` (e.g. ``50``, by default). (Contributed by Andrei Kulakovin in :gh:" +"`88024`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:867 +msgid "" +"Added a :meth:`~logging.handlers.SysLogHandler.createSocket` method to :" +"class:`~logging.handlers.SysLogHandler`, to match :meth:`SocketHandler." +"createSocket() `. It is called " +"automatically during handler initialization and when emitting an event, if " +"there is no active socket. (Contributed by Kirill Pinchuk in :gh:`88457`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:879 +msgid "math" +msgstr "math" + +#: ../../whatsnew/3.11.rst:881 +msgid "" +"Add :func:`math.exp2`: return 2 raised to the power of x. (Contributed by " +"Gideon Mitchell in :issue:`45917`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:884 +msgid "" +"Add :func:`math.cbrt`: return the cube root of x. (Contributed by Ajith " +"Ramachandran in :issue:`44357`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:887 +msgid "" +"The behaviour of two :func:`math.pow` corner cases was changed, for " +"consistency with the IEEE 754 specification. The operations ``math.pow(0.0, -" +"math.inf)`` and ``math.pow(-0.0, -math.inf)`` now return ``inf``. Previously " +"they raised :exc:`ValueError`. (Contributed by Mark Dickinson in :issue:" +"`44339`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:893 +msgid "" +"The :data:`math.nan` value is now always available. (Contributed by Victor " +"Stinner in :issue:`46917`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:900 +msgid "operator" +msgstr "" + +#: ../../whatsnew/3.11.rst:902 +msgid "" +"A new function ``operator.call`` has been added, such that ``operator." +"call(obj, *args, **kwargs) == obj(*args, **kwargs)``. (Contributed by Antony " +"Lee in :issue:`44019`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:910 +msgid "os" +msgstr "os" + +#: ../../whatsnew/3.11.rst:912 +msgid "" +"On Windows, :func:`os.urandom` now uses ``BCryptGenRandom()``, instead of " +"``CryptGenRandom()`` which is deprecated. (Contributed by Donghee Na in :" +"issue:`44611`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:920 +msgid "pathlib" +msgstr "pathlib" + +#: ../../whatsnew/3.11.rst:922 +msgid "" +":meth:`~pathlib.Path.glob` and :meth:`~pathlib.Path.rglob` return only " +"directories if *pattern* ends with a pathname components separator: :data:" +"`~os.sep` or :data:`~os.altsep`. (Contributed by Eisuke Kawasima in :issue:" +"`22276` and :issue:`33392`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:931 +msgid "re" +msgstr "" + +#: ../../whatsnew/3.11.rst:933 +msgid "" +"Atomic grouping (``(?>...)``) and possessive quantifiers (``*+``, ``++``, ``?" +"+``, ``{m,n}+``) are now supported in regular expressions. (Contributed by " +"Jeffrey C. Jacobs and Serhiy Storchaka in :issue:`433030`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:941 +msgid "shutil" +msgstr "" + +#: ../../whatsnew/3.11.rst:943 +msgid "" +"Add optional parameter *dir_fd* in :func:`shutil.rmtree`. (Contributed by " +"Serhiy Storchaka in :issue:`46245`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:950 +msgid "socket" +msgstr "" + +#: ../../whatsnew/3.11.rst:952 +msgid "" +"Add CAN Socket support for NetBSD. (Contributed by Thomas Klausner in :issue:" +"`30512`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:955 +msgid "" +":meth:`~socket.create_connection` has an option to raise, in case of failure " +"to connect, an :exc:`ExceptionGroup` containing all errors instead of only " +"raising the last error. (Contributed by Irit Katriel in :issue:`29980`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:964 +msgid "sqlite3" +msgstr "sqlite3" + +#: ../../whatsnew/3.11.rst:966 +msgid "" +"You can now disable the authorizer by passing :const:`None` to :meth:" +"`~sqlite3.Connection.set_authorizer`. (Contributed by Erlend E. Aasland in :" +"issue:`44491`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:970 +msgid "" +"Collation name :meth:`~sqlite3.Connection.create_collation` can now contain " +"any Unicode character. Collation names with invalid characters now raise :" +"exc:`UnicodeEncodeError` instead of :exc:`sqlite3.ProgrammingError`. " +"(Contributed by Erlend E. Aasland in :issue:`44688`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:975 +msgid "" +":mod:`sqlite3` exceptions now include the SQLite extended error code as :" +"attr:`~sqlite3.Error.sqlite_errorcode` and the SQLite error name as :attr:" +"`~sqlite3.Error.sqlite_errorname`. (Contributed by Aviv Palivoda, Daniel " +"Shahaf, and Erlend E. Aasland in :issue:`16379` and :issue:`24139`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:981 +msgid "" +"Add :meth:`~sqlite3.Connection.setlimit` and :meth:`~sqlite3.Connection." +"getlimit` to :class:`sqlite3.Connection` for setting and getting SQLite " +"limits by connection basis. (Contributed by Erlend E. Aasland in :issue:" +"`45243`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:986 +msgid "" +":mod:`sqlite3` now sets :attr:`sqlite3.threadsafety` based on the default " +"threading mode the underlying SQLite library has been compiled with. " +"(Contributed by Erlend E. Aasland in :issue:`45613`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:990 +msgid "" +":mod:`sqlite3` C callbacks now use unraisable exceptions if callback " +"tracebacks are enabled. Users can now register an :func:`unraisable hook " +"handler ` to improve their debug experience. " +"(Contributed by Erlend E. Aasland in :issue:`45828`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:996 +msgid "" +"Fetch across rollback no longer raises :exc:`~sqlite3.InterfaceError`. " +"Instead we leave it to the SQLite library to handle these cases. " +"(Contributed by Erlend E. Aasland in :issue:`44092`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1000 +msgid "" +"Add :meth:`~sqlite3.Connection.serialize` and :meth:`~sqlite3.Connection." +"deserialize` to :class:`sqlite3.Connection` for serializing and " +"deserializing databases. (Contributed by Erlend E. Aasland in :issue:" +"`41930`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1005 +msgid "" +"Add :meth:`~sqlite3.Connection.create_window_function` to :class:`sqlite3." +"Connection` for creating aggregate window functions. (Contributed by Erlend " +"E. Aasland in :issue:`34916`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1009 +msgid "" +"Add :meth:`~sqlite3.Connection.blobopen` to :class:`sqlite3.Connection`. :" +"class:`sqlite3.Blob` allows incremental I/O operations on blobs. " +"(Contributed by Aviv Palivoda and Erlend E. Aasland in :issue:`24905`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1017 +msgid "string" +msgstr "" + +#: ../../whatsnew/3.11.rst:1019 +msgid "" +"Add :meth:`~string.Template.get_identifiers` and :meth:`~string.Template." +"is_valid` to :class:`string.Template`, which respectively return all valid " +"placeholders, and whether any invalid placeholders are present. (Contributed " +"by Ben Kehoe in :gh:`90465`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1029 +msgid "sys" +msgstr "sys" + +#: ../../whatsnew/3.11.rst:1031 +msgid "" +":func:`sys.exc_info` now derives the ``type`` and ``traceback`` fields from " +"the ``value`` (the exception instance), so when an exception is modified " +"while it is being handled, the changes are reflected in the results of " +"subsequent calls to :func:`!exc_info`. (Contributed by Irit Katriel in :" +"issue:`45711`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1037 +msgid "" +"Add :func:`sys.exception` which returns the active exception instance " +"(equivalent to ``sys.exc_info()[1]``). (Contributed by Irit Katriel in :" +"issue:`46328`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1041 +msgid "" +"Add the :data:`sys.flags.safe_path ` flag. (Contributed by Victor " +"Stinner in :gh:`57684`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1048 +msgid "sysconfig" +msgstr "" + +#: ../../whatsnew/3.11.rst:1050 +msgid "" +"Three new :ref:`installation schemes ` (*posix_venv*, " +"*nt_venv* and *venv*) were added and are used when Python creates new " +"virtual environments or when it is running from a virtual environment. The " +"first two schemes (*posix_venv* and *nt_venv*) are OS-specific for non-" +"Windows and Windows, the *venv* is essentially an alias to one of them " +"according to the OS Python runs on. This is useful for downstream " +"distributors who modify :func:`sysconfig.get_preferred_scheme`. Third party " +"code that creates new virtual environments should use the new *venv* " +"installation scheme to determine the paths, as does :mod:`venv`. " +"(Contributed by Miro Hrončok in :issue:`45413`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1067 +msgid "tempfile" +msgstr "tempfile" + +#: ../../whatsnew/3.11.rst:1069 +msgid "" +":class:`~tempfile.SpooledTemporaryFile` objects now fully implement the " +"methods of :class:`io.BufferedIOBase` or :class:`io.TextIOBase` (depending " +"on file mode). This lets them work correctly with APIs that expect file-like " +"objects, such as compression modules. (Contributed by Carey Metcalfe in :gh:" +"`70363`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1080 +msgid "threading" +msgstr "threading" + +#: ../../whatsnew/3.11.rst:1082 +msgid "" +"On Unix, if the ``sem_clockwait()`` function is available in the C library " +"(glibc 2.30 and newer), the :meth:`threading.Lock.acquire` method now uses " +"the monotonic clock (:const:`time.CLOCK_MONOTONIC`) for the timeout, rather " +"than using the system clock (:const:`time.CLOCK_REALTIME`), to not be " +"affected by system clock changes. (Contributed by Victor Stinner in :issue:" +"`41710`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1093 +msgid "time" +msgstr "" + +#: ../../whatsnew/3.11.rst:1095 +msgid "" +"On Unix, :func:`time.sleep` now uses the ``clock_nanosleep()`` or " +"``nanosleep()`` function, if available, which has a resolution of 1 " +"nanosecond (10\\ :sup:`-9` seconds), rather than using ``select()`` which " +"has a resolution of 1 microsecond (10\\ :sup:`-6` seconds). (Contributed by " +"Benjamin Szőke and Victor Stinner in :issue:`21302`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1101 +msgid "" +"On Windows 8.1 and newer, :func:`time.sleep` now uses a waitable timer based " +"on `high-resolution timers `_ which has a resolution of " +"100 nanoseconds (10\\ :sup:`-7` seconds). Previously, it had a resolution of " +"1 millisecond (10\\ :sup:`-3` seconds). (Contributed by Benjamin Szőke, " +"Donghee Na, Eryk Sun and Victor Stinner in :issue:`21302` and :issue:" +"`45429`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1112 +msgid "tkinter" +msgstr "tkinter" + +#: ../../whatsnew/3.11.rst:1114 +msgid "" +"Added method ``info_patchlevel()`` which returns the exact version of the " +"Tcl library as a named tuple similar to :data:`sys.version_info`. " +"(Contributed by Serhiy Storchaka in :gh:`91827`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1122 +msgid "traceback" +msgstr "" + +#: ../../whatsnew/3.11.rst:1124 +msgid "" +"Add :func:`traceback.StackSummary.format_frame_summary` to allow users to " +"override which frames appear in the traceback, and how they are formatted. " +"(Contributed by Ammar Askar in :issue:`44569`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1129 +msgid "" +"Add :func:`traceback.TracebackException.print`, which prints the formatted :" +"exc:`~traceback.TracebackException` instance to a file. (Contributed by Irit " +"Katriel in :issue:`33809`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1137 +msgid "typing" +msgstr "typing" + +#: ../../whatsnew/3.11.rst:1139 +msgid "For major changes, see :ref:`new-feat-related-type-hints-311`." +msgstr "" + +#: ../../whatsnew/3.11.rst:1141 +msgid "" +"Add :func:`typing.assert_never` and :class:`typing.Never`. :func:`typing." +"assert_never` is useful for asking a type checker to confirm that a line of " +"code is not reachable. At runtime, it raises an :exc:`AssertionError`. " +"(Contributed by Jelle Zijlstra in :gh:`90633`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1147 +msgid "" +"Add :func:`typing.reveal_type`. This is useful for asking a type checker " +"what type it has inferred for a given expression. At runtime it prints the " +"type of the received value. (Contributed by Jelle Zijlstra in :gh:`90572`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1152 +msgid "" +"Add :func:`typing.assert_type`. This is useful for asking a type checker to " +"confirm that the type it has inferred for a given expression matches the " +"given type. At runtime it simply returns the received value. (Contributed by " +"Jelle Zijlstra in :gh:`90638`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1157 +msgid "" +":data:`typing.TypedDict` types can now be generic. (Contributed by Samodya " +"Abeysiriwardane in :gh:`89026`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1160 +msgid "" +":class:`~typing.NamedTuple` types can now be generic. (Contributed by Serhiy " +"Storchaka in :issue:`43923`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1163 +msgid "" +"Allow subclassing of :class:`typing.Any`. This is useful for avoiding type " +"checker errors related to highly dynamic class, such as mocks. (Contributed " +"by Shantanu Jain in :gh:`91154`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1167 +msgid "" +"The :deco:`typing.final` decorator now sets the ``__final__`` attributed on " +"the decorated object. (Contributed by Jelle Zijlstra in :gh:`90500`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1171 +msgid "" +"The :func:`typing.get_overloads` function can be used for introspecting the " +"overloads of a function. :func:`typing.clear_overloads` can be used to clear " +"all registered overloads of a function. (Contributed by Jelle Zijlstra in :" +"gh:`89263`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1176 +msgid "" +"The :meth:`~object.__init__` method of :class:`~typing.Protocol` subclasses " +"is now preserved. (Contributed by Adrian Garcia Badarasco in :gh:`88970`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1179 +msgid "" +"The representation of empty tuple types (``Tuple[()]``) is simplified. This " +"affects introspection, e.g. ``get_args(Tuple[()])`` now evaluates to ``()`` " +"instead of ``((),)``. (Contributed by Serhiy Storchaka in :gh:`91137`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1184 +msgid "" +"Loosen runtime requirements for type annotations by removing the callable " +"check in the private ``typing._type_check`` function. (Contributed by " +"Gregory Beauregard in :gh:`90802`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1188 +msgid "" +":func:`typing.get_type_hints` now supports evaluating strings as forward " +"references in :ref:`PEP 585 generic aliases `. " +"(Contributed by Niklas Rosenstein in :gh:`85542`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1192 +msgid "" +":func:`typing.get_type_hints` no longer adds :data:`~typing.Optional` to " +"parameters with ``None`` as a default. (Contributed by Nikita Sobolev in :gh:" +"`90353`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1196 +msgid "" +":func:`typing.get_type_hints` now supports evaluating bare stringified :data:" +"`~typing.ClassVar` annotations. (Contributed by Gregory Beauregard in :gh:" +"`90711`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1200 +msgid "" +":deco:`typing.no_type_check` no longer modifies external classes and " +"functions. It also now correctly marks classmethods as not to be type " +"checked. (Contributed by Nikita Sobolev in :gh:`90729`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1208 +msgid "unicodedata" +msgstr "unicodedata" + +#: ../../whatsnew/3.11.rst:1210 +msgid "" +"The Unicode database has been updated to version 14.0.0. (Contributed by " +"Benjamin Peterson in :issue:`45190`)." +msgstr "" + +#: ../../whatsnew/3.11.rst:1217 +msgid "unittest" +msgstr "unittest" + +#: ../../whatsnew/3.11.rst:1219 +msgid "" +"Added methods :meth:`~unittest.TestCase.enterContext` and :meth:`~unittest." +"TestCase.enterClassContext` of class :class:`~unittest.TestCase`, method :" +"meth:`~unittest.IsolatedAsyncioTestCase.enterAsyncContext` of class :class:" +"`~unittest.IsolatedAsyncioTestCase` and function :func:`unittest." +"enterModuleContext`. (Contributed by Serhiy Storchaka in :issue:`45046`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1231 +msgid "venv" +msgstr "" + +#: ../../whatsnew/3.11.rst:1233 +msgid "" +"When new Python virtual environments are created, the *venv* :ref:`sysconfig " +"installation scheme ` is used to determine the paths " +"inside the environment. When Python runs in a virtual environment, the same " +"installation scheme is the default. That means that downstream distributors " +"can change the default sysconfig install scheme without changing behavior of " +"virtual environments. Third party code that also creates new virtual " +"environments should do the same. (Contributed by Miro Hrončok in :issue:" +"`45413`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1247 +msgid "warnings" +msgstr "" + +#: ../../whatsnew/3.11.rst:1249 +msgid "" +":func:`warnings.catch_warnings` now accepts arguments for :func:`warnings." +"simplefilter`, providing a more concise way to locally ignore warnings or " +"convert them to errors. (Contributed by Zac Hatfield-Dodds in :issue:" +"`47074`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1257 +msgid "zipfile" +msgstr "" + +#: ../../whatsnew/3.11.rst:1259 +msgid "" +"Added support for specifying member name encoding for reading metadata in a :" +"class:`~zipfile.ZipFile`'s directory and file headers. (Contributed by " +"Stephen J. Turnbull and Serhiy Storchaka in :issue:`28080`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1263 +msgid "" +"Added :meth:`ZipFile.mkdir() ` for creating new " +"directories inside ZIP archives. (Contributed by Sam Ezeh in :gh:`49083`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1267 +msgid "" +"Added :attr:`~zipfile.Path.stem`, :attr:`~zipfile.Path.suffix` and :attr:" +"`~zipfile.Path.suffixes` to :class:`zipfile.Path`. (Contributed by Miguel " +"Brito in :gh:`88261`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1275 +msgid "Optimizations" +msgstr "Optimierungen" + +#: ../../whatsnew/3.11.rst:1277 +msgid "" +"This section covers specific optimizations independent of the :ref:" +"`whatsnew311-faster-cpython` project, which is covered in its own section." +msgstr "" + +#: ../../whatsnew/3.11.rst:1280 +msgid "" +"The compiler now optimizes simple :ref:`printf-style % formatting ` on string literals containing only the format codes " +"``%s``, ``%r`` and ``%a`` and makes it as fast as a corresponding :term:`f-" +"string` expression. (Contributed by Serhiy Storchaka in :issue:`28307`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1286 +msgid "" +"Integer division (``//``) is better tuned for optimization by compilers. It " +"is now around 20% faster on x86-64 when dividing an :class:`int` by a value " +"smaller than ``2**30``. (Contributed by Gregory P. Smith and Tim Peters in :" +"gh:`90564`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1291 +msgid "" +":func:`sum` is now nearly 30% faster for integers smaller than ``2**30``. " +"(Contributed by Stefan Behnel in :gh:`68264`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1294 +msgid "" +"Resizing lists is streamlined for the common case, speeding up :meth:`list." +"append` by ≈15% and simple :term:`list comprehension`\\s by up to 20-30% " +"(Contributed by Dennis Sweeney in :gh:`91165`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1299 +msgid "" +"Dictionaries don't store hash values when all keys are Unicode objects, " +"decreasing :class:`dict` size. For example, ``sys.getsizeof(dict." +"fromkeys(\"abcdefg\"))`` is reduced from 352 bytes to 272 bytes (23% " +"smaller) on 64-bit platforms. (Contributed by Inada Naoki in :issue:`46845`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1305 +msgid "" +"Using :class:`asyncio.DatagramProtocol` is now orders of magnitude faster " +"when transferring large files over UDP, with speeds over 100 times higher " +"for a ≈60 MiB file. (Contributed by msoxzw in :gh:`91487`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1310 +msgid "" +":mod:`math` functions :func:`~math.comb` and :func:`~math.perm` are now ≈10 " +"times faster for large arguments (with a larger speedup for larger *k*). " +"(Contributed by Serhiy Storchaka in :issue:`37295`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1314 +msgid "" +"The :mod:`statistics` functions :func:`~statistics.mean`, :func:`~statistics." +"variance` and :func:`~statistics.stdev` now consume iterators in one pass " +"rather than converting them to a :class:`list` first. This is twice as fast " +"and can save substantial memory. (Contributed by Raymond Hettinger in :gh:" +"`90415`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1320 +msgid "" +":func:`unicodedata.normalize` now normalizes pure-ASCII strings in constant " +"time. (Contributed by Donghee Na in :issue:`44987`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1328 +msgid "Faster CPython" +msgstr "" + +#: ../../whatsnew/3.11.rst:1330 +msgid "" +"CPython 3.11 is an average of `25% faster `_ than CPython 3.10 as measured with the " +"`pyperformance `_ benchmark suite, " +"when compiled with GCC on Ubuntu Linux. Depending on your workload, the " +"overall speedup could be 10-60%." +msgstr "" + +#: ../../whatsnew/3.11.rst:1337 +msgid "" +"This project focuses on two major areas in Python: :ref:`whatsnew311-faster-" +"startup` and :ref:`whatsnew311-faster-runtime`. Optimizations not covered by " +"this project are listed separately under :ref:`whatsnew311-optimizations`." +msgstr "" + +#: ../../whatsnew/3.11.rst:1346 +msgid "Faster Startup" +msgstr "" + +#: ../../whatsnew/3.11.rst:1351 +msgid "Frozen imports / Static code objects" +msgstr "" + +#: ../../whatsnew/3.11.rst:1353 +msgid "" +"Python caches :term:`bytecode` in the :ref:`__pycache__ ` " +"directory to speed up module loading." +msgstr "" + +#: ../../whatsnew/3.11.rst:1356 +msgid "Previously in 3.10, Python module execution looked like this:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1358 +msgid "Read __pycache__ -> Unmarshal -> Heap allocated code object -> Evaluate" +msgstr "" + +#: ../../whatsnew/3.11.rst:1362 +msgid "" +"In Python 3.11, the core modules essential for Python startup are " +"\"frozen\". This means that their :ref:`codeobjects` (and bytecode) are " +"statically allocated by the interpreter. This reduces the steps in module " +"execution process to:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1367 +msgid "Statically allocated code object -> Evaluate" +msgstr "" + +#: ../../whatsnew/3.11.rst:1371 +msgid "" +"Interpreter startup is now 10-15% faster in Python 3.11. This has a big " +"impact for short-running programs using Python." +msgstr "" + +#: ../../whatsnew/3.11.rst:1374 +msgid "" +"(Contributed by Eric Snow, Guido van Rossum and Kumar Aditya in many issues.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1380 +msgid "Faster Runtime" +msgstr "" + +#: ../../whatsnew/3.11.rst:1385 +msgid "Cheaper, lazy Python frames" +msgstr "" + +#: ../../whatsnew/3.11.rst:1387 +msgid "" +"Python frames, holding execution information, are created whenever Python " +"calls a Python function. The following are new frame optimizations:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1391 +msgid "Streamlined the frame creation process." +msgstr "" + +#: ../../whatsnew/3.11.rst:1392 +msgid "" +"Avoided memory allocation by generously re-using frame space on the C stack." +msgstr "" + +#: ../../whatsnew/3.11.rst:1393 +msgid "" +"Streamlined the internal frame struct to contain only essential information. " +"Frames previously held extra debugging and memory management information." +msgstr "" + +#: ../../whatsnew/3.11.rst:1396 +msgid "" +"Old-style :ref:`frame objects ` are now created only when " +"requested by debuggers or by Python introspection functions such as :func:" +"`sys._getframe` and :func:`inspect.currentframe`. For most user code, no " +"frame objects are created at all. As a result, nearly all Python functions " +"calls have sped up significantly. We measured a 3-7% speedup in " +"pyperformance." +msgstr "" + +#: ../../whatsnew/3.11.rst:1403 +msgid "(Contributed by Mark Shannon in :issue:`44590`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1410 +msgid "Inlined Python function calls" +msgstr "" + +#: ../../whatsnew/3.11.rst:1412 +msgid "" +"During a Python function call, Python will call an evaluating C function to " +"interpret that function's code. This effectively limits pure Python " +"recursion to what's safe for the C stack." +msgstr "" + +#: ../../whatsnew/3.11.rst:1416 +msgid "" +"In 3.11, when CPython detects Python code calling another Python function, " +"it sets up a new frame, and \"jumps\" to the new code inside the new frame. " +"This avoids calling the C interpreting function altogether." +msgstr "" + +#: ../../whatsnew/3.11.rst:1420 +msgid "" +"Most Python function calls now consume no C stack space, speeding them up. " +"In simple recursive functions like fibonacci or factorial, we observed a " +"1.7x speedup. This also means recursive functions can recurse significantly " +"deeper (if the user increases the recursion limit with :func:`sys." +"setrecursionlimit`). We measured a 1-3% improvement in pyperformance." +msgstr "" + +#: ../../whatsnew/3.11.rst:1427 +msgid "(Contributed by Pablo Galindo and Mark Shannon in :issue:`45256`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1433 +msgid "PEP 659: Specializing Adaptive Interpreter" +msgstr "" + +#: ../../whatsnew/3.11.rst:1435 +msgid "" +":pep:`659` is one of the key parts of the Faster CPython project. The " +"general idea is that while Python is a dynamic language, most code has " +"regions where objects and types rarely change. This concept is known as " +"*type stability*." +msgstr "" + +#: ../../whatsnew/3.11.rst:1439 +msgid "" +"At runtime, Python will try to look for common patterns and type stability " +"in the executing code. Python will then replace the current operation with a " +"more specialized one. This specialized operation uses fast paths available " +"only to those use cases/types, which generally outperform their generic " +"counterparts. This also brings in another concept called *inline caching*, " +"where Python caches the results of expensive operations directly in the :" +"term:`bytecode`." +msgstr "" + +#: ../../whatsnew/3.11.rst:1447 +msgid "" +"The specializer will also combine certain common instruction pairs into one " +"superinstruction, reducing the overhead during execution." +msgstr "" + +#: ../../whatsnew/3.11.rst:1450 +msgid "" +"Python will only specialize when it sees code that is \"hot\" (executed " +"multiple times). This prevents Python from wasting time on run-once code. " +"Python can also de-specialize when code is too dynamic or when the use " +"changes. Specialization is attempted periodically, and specialization " +"attempts are not too expensive, allowing specialization to adapt to new " +"circumstances." +msgstr "" + +#: ../../whatsnew/3.11.rst:1457 +msgid "" +"(PEP written by Mark Shannon, with ideas inspired by Stefan Brunthaler. See :" +"pep:`659` for more information. Implementation by Mark Shannon and Brandt " +"Bucher, with additional help from Irit Katriel and Dennis Sweeney.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1465 +msgid "Operation" +msgstr "" + +#: ../../whatsnew/3.11.rst:1465 +msgid "Form" +msgstr "" + +#: ../../whatsnew/3.11.rst:1465 +msgid "Specialization" +msgstr "" + +#: ../../whatsnew/3.11.rst:1465 +msgid "Operation speedup (up to)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1465 +msgid "Contributor(s)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1468 +msgid "Binary operations" +msgstr "" + +#: ../../whatsnew/3.11.rst:1468 +msgid "``x + x``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1470 +msgid "``x - x``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1472 +msgid "``x * x``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1468 +msgid "" +"Binary add, multiply and subtract for common types such as :class:`int`, :" +"class:`float` and :class:`str` take custom fast paths for their underlying " +"types." +msgstr "" + +#: ../../whatsnew/3.11.rst:1468 +msgid "10%" +msgstr "" + +#: ../../whatsnew/3.11.rst:1468 +msgid "Mark Shannon, Donghee Na, Brandt Bucher, Dennis Sweeney" +msgstr "" + +#: ../../whatsnew/3.11.rst:1474 +msgid "Subscript" +msgstr "" + +#: ../../whatsnew/3.11.rst:1474 +msgid "``a[i]``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1474 +msgid "" +"Subscripting container types such as :class:`list`, :class:`tuple` and :" +"class:`dict` directly index the underlying data structures." +msgstr "" + +#: ../../whatsnew/3.11.rst:1478 +msgid "" +"Subscripting custom :meth:`~object.__getitem__` is also inlined similar to :" +"ref:`inline-calls`." +msgstr "" + +#: ../../whatsnew/3.11.rst:1474 ../../whatsnew/3.11.rst:1481 +msgid "10-25%" +msgstr "" + +#: ../../whatsnew/3.11.rst:1474 +msgid "Irit Katriel, Mark Shannon" +msgstr "" + +#: ../../whatsnew/3.11.rst:1481 +msgid "Store subscript" +msgstr "" + +#: ../../whatsnew/3.11.rst:1481 +msgid "``a[i] = z``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1481 +msgid "Similar to subscripting specialization above." +msgstr "" + +#: ../../whatsnew/3.11.rst:1481 +msgid "Dennis Sweeney" +msgstr "" + +#: ../../whatsnew/3.11.rst:1484 +msgid "Calls" +msgstr "" + +#: ../../whatsnew/3.11.rst:1484 +msgid "``f(arg)``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1486 +msgid "``C(arg)``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1484 +msgid "" +"Calls to common builtin (C) functions and types such as :func:`len` and :" +"class:`str` directly call their underlying C version. This avoids going " +"through the internal calling convention." +msgstr "" + +#: ../../whatsnew/3.11.rst:1484 +msgid "20%" +msgstr "" + +#: ../../whatsnew/3.11.rst:1484 +msgid "Mark Shannon, Ken Jin" +msgstr "" + +#: ../../whatsnew/3.11.rst:1489 +msgid "Load global variable" +msgstr "" + +#: ../../whatsnew/3.11.rst:1489 +msgid "``print``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1491 +msgid "``len``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1489 +msgid "" +"The object's index in the globals/builtins namespace is cached. Loading " +"globals and builtins require zero namespace lookups." +msgstr "" + +#: ../../whatsnew/3.11.rst:1489 +msgid "[#load-global]_" +msgstr "" + +#: ../../whatsnew/3.11.rst:1489 ../../whatsnew/3.11.rst:1493 +#: ../../whatsnew/3.11.rst:1502 +msgid "Mark Shannon" +msgstr "" + +#: ../../whatsnew/3.11.rst:1493 +msgid "Load attribute" +msgstr "" + +#: ../../whatsnew/3.11.rst:1493 +msgid "``o.attr``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1493 +msgid "" +"Similar to loading global variables. The attribute's index inside the class/" +"object's namespace is cached. In most cases, attribute loading will require " +"zero namespace lookups." +msgstr "" + +#: ../../whatsnew/3.11.rst:1493 +msgid "[#load-attr]_" +msgstr "" + +#: ../../whatsnew/3.11.rst:1498 +msgid "Load methods for call" +msgstr "" + +#: ../../whatsnew/3.11.rst:1498 +msgid "``o.meth()``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1498 +msgid "" +"The actual address of the method is cached. Method loading now has no " +"namespace lookups -- even for classes with long inheritance chains." +msgstr "" + +#: ../../whatsnew/3.11.rst:1498 +msgid "10-20%" +msgstr "" + +#: ../../whatsnew/3.11.rst:1498 +msgid "Ken Jin, Mark Shannon" +msgstr "" + +#: ../../whatsnew/3.11.rst:1502 +msgid "Store attribute" +msgstr "" + +#: ../../whatsnew/3.11.rst:1502 +msgid "``o.attr = z``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1502 +msgid "Similar to load attribute optimization." +msgstr "" + +#: ../../whatsnew/3.11.rst:1502 +msgid "2% in pyperformance" +msgstr "" + +#: ../../whatsnew/3.11.rst:1505 +msgid "Unpack Sequence" +msgstr "" + +#: ../../whatsnew/3.11.rst:1505 +msgid "``*seq``" +msgstr "" + +#: ../../whatsnew/3.11.rst:1505 +msgid "" +"Specialized for common containers such as :class:`list` and :class:`tuple`. " +"Avoids internal calling convention." +msgstr "" + +#: ../../whatsnew/3.11.rst:1505 +msgid "8%" +msgstr "" + +#: ../../whatsnew/3.11.rst:1505 +msgid "Brandt Bucher" +msgstr "" + +#: ../../whatsnew/3.11.rst:1510 +msgid "" +"A similar optimization already existed since Python 3.8. 3.11 specializes " +"for more forms and reduces some overhead." +msgstr "" + +#: ../../whatsnew/3.11.rst:1513 +msgid "" +"A similar optimization already existed since Python 3.10. 3.11 specializes " +"for more forms. Furthermore, all attribute loads should be sped up by :issue:" +"`45947`." +msgstr "" + +#: ../../whatsnew/3.11.rst:1521 +msgid "Misc" +msgstr "" + +#: ../../whatsnew/3.11.rst:1523 +msgid "" +"Objects now require less memory due to lazily created object namespaces. " +"Their namespace dictionaries now also share keys more freely. (Contributed " +"Mark Shannon in :issue:`45340` and :issue:`40116`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1527 +msgid "" +"\"Zero-cost\" exceptions are implemented, eliminating the cost of :keyword:" +"`try` statements when no exception is raised. (Contributed by Mark Shannon " +"in :issue:`40222`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1531 +msgid "" +"A more concise representation of exceptions in the interpreter reduced the " +"time required for catching an exception by about 10%. (Contributed by Irit " +"Katriel in :issue:`45711`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1535 +msgid "" +":mod:`re`'s regular expression matching engine has been partially " +"refactored, and now uses computed gotos (or \"threaded code\") on supported " +"platforms. As a result, Python 3.11 executes the `pyperformance regular " +"expression benchmarks `_ up to 10% faster than Python 3.10. (Contributed by Brandt " +"Bucher in :gh:`91404`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1546 +msgid "FAQ" +msgstr "" + +#: ../../whatsnew/3.11.rst:1551 +msgid "How should I write my code to utilize these speedups?" +msgstr "" + +#: ../../whatsnew/3.11.rst:1553 +msgid "" +"Write Pythonic code that follows common best practices; you don't have to " +"change your code. The Faster CPython project optimizes for common code " +"patterns we observe." +msgstr "" + +#: ../../whatsnew/3.11.rst:1561 +msgid "Will CPython 3.11 use more memory?" +msgstr "" + +#: ../../whatsnew/3.11.rst:1563 +msgid "" +"Maybe not; we don't expect memory use to exceed 20% higher than 3.10. This " +"is offset by memory optimizations for frame objects and object dictionaries " +"as mentioned above." +msgstr "" + +#: ../../whatsnew/3.11.rst:1571 +msgid "I don't see any speedups in my workload. Why?" +msgstr "" + +#: ../../whatsnew/3.11.rst:1573 +msgid "" +"Certain code won't have noticeable benefits. If your code spends most of its " +"time on I/O operations, or already does most of its computation in a C " +"extension library like NumPy, there won't be significant speedups. This " +"project currently benefits pure-Python workloads the most." +msgstr "" + +#: ../../whatsnew/3.11.rst:1578 +msgid "" +"Furthermore, the pyperformance figures are a geometric mean. Even within the " +"pyperformance benchmarks, certain benchmarks have slowed down slightly, " +"while others have sped up by nearly 2x!" +msgstr "" + +#: ../../whatsnew/3.11.rst:1586 +msgid "Is there a JIT compiler?" +msgstr "" + +#: ../../whatsnew/3.11.rst:1588 +msgid "No. We're still exploring other optimizations." +msgstr "" + +#: ../../whatsnew/3.11.rst:1594 +msgid "About" +msgstr "" + +#: ../../whatsnew/3.11.rst:1596 +msgid "" +"Faster CPython explores optimizations for :term:`CPython`. The main team is " +"funded by Microsoft to work on this full-time. Pablo Galindo Salgado is also " +"funded by Bloomberg LP to work on the project part-time. Finally, many " +"contributors are volunteers from the community." +msgstr "" + +#: ../../whatsnew/3.11.rst:1605 +msgid "CPython bytecode changes" +msgstr "CPython Bytecode Änderungen" + +#: ../../whatsnew/3.11.rst:1607 +msgid "" +"The bytecode now contains inline cache entries, which take the form of the " +"newly-added :opcode:`CACHE` instructions. Many opcodes expect to be followed " +"by an exact number of caches, and instruct the interpreter to skip over them " +"at runtime. Populated caches can look like arbitrary instructions, so great " +"care should be taken when reading or modifying raw, adaptive bytecode " +"containing quickened data." +msgstr "" + +#: ../../whatsnew/3.11.rst:1619 +msgid "New opcodes" +msgstr "" + +#: ../../whatsnew/3.11.rst:1621 +msgid "" +":opcode:`!ASYNC_GEN_WRAP`, :opcode:`RETURN_GENERATOR` and :opcode:`SEND`, " +"used in generators and co-routines." +msgstr "" + +#: ../../whatsnew/3.11.rst:1624 +msgid "" +":opcode:`COPY_FREE_VARS`, which avoids needing special caller-side code for " +"closures." +msgstr "" + +#: ../../whatsnew/3.11.rst:1627 +msgid "" +":opcode:`JUMP_BACKWARD_NO_INTERRUPT`, for use in certain loops where " +"handling interrupts is undesirable." +msgstr "" + +#: ../../whatsnew/3.11.rst:1630 +msgid ":opcode:`MAKE_CELL`, to create :ref:`cell-objects`." +msgstr "" + +#: ../../whatsnew/3.11.rst:1632 +msgid "" +":opcode:`CHECK_EG_MATCH` and :opcode:`!PREP_RERAISE_STAR`, to handle the :" +"ref:`new exception groups and except* ` added in :pep:" +"`654`." +msgstr "" + +#: ../../whatsnew/3.11.rst:1636 +msgid ":opcode:`PUSH_EXC_INFO`, for use in exception handlers." +msgstr "" + +#: ../../whatsnew/3.11.rst:1638 +msgid "" +":opcode:`RESUME`, a no-op, for internal tracing, debugging and optimization " +"checks." +msgstr "" + +#: ../../whatsnew/3.11.rst:1645 +msgid "Replaced opcodes" +msgstr "" + +#: ../../whatsnew/3.11.rst:1648 +msgid "Replaced Opcode(s)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1648 +msgid "New Opcode(s)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1648 +msgid "Notes" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!BINARY_*`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!INPLACE_*`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1650 +msgid ":opcode:`BINARY_OP`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1650 +msgid "Replaced all numeric binary/in-place opcodes with a single opcode" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!CALL_FUNCTION`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!CALL_FUNCTION_KW`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!CALL_METHOD`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`CALL`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!KW_NAMES`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!PRECALL`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`PUSH_NULL`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1653 +msgid "" +"Decouples argument shifting for methods from handling of keyword arguments; " +"allows better specialization of calls" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!DUP_TOP`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!DUP_TOP_TWO`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!ROT_TWO`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!ROT_THREE`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!ROT_FOUR`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!ROT_N`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`COPY`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`SWAP`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1658 +msgid "Stack manipulation instructions" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!JUMP_IF_NOT_EXC_MATCH`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`CHECK_EXC_MATCH`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1665 +msgid "Now performs check but doesn't jump" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!JUMP_ABSOLUTE`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!POP_JUMP_IF_FALSE`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!POP_JUMP_IF_TRUE`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`JUMP_BACKWARD`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!POP_JUMP_BACKWARD_IF_*`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!POP_JUMP_FORWARD_IF_*`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1667 +msgid "" +"See [#bytecode-jump]_; ``TRUE``, ``FALSE``, ``NONE`` and ``NOT_NONE`` " +"variants for each direction" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!SETUP_WITH`" +msgstr "" + +#: ../../whatsnew/3.11.rst:0 +msgid ":opcode:`!SETUP_ASYNC_WITH`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1673 +msgid ":opcode:`!BEFORE_WITH`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1673 +msgid ":keyword:`with` block setup" +msgstr "" + +#: ../../whatsnew/3.11.rst:1677 +msgid "" +"All jump opcodes are now relative, including the existing :opcode:`!" +"JUMP_IF_TRUE_OR_POP` and :opcode:`!JUMP_IF_FALSE_OR_POP`. The argument is " +"now an offset from the current instruction rather than an absolute location." +msgstr "" + +#: ../../whatsnew/3.11.rst:1688 +msgid "Changed/removed opcodes" +msgstr "" + +#: ../../whatsnew/3.11.rst:1690 +msgid "" +"Changed :opcode:`MATCH_CLASS` and :opcode:`MATCH_KEYS` to no longer push an " +"additional boolean value to indicate success/failure. Instead, ``None`` is " +"pushed on failure in place of the tuple of extracted values." +msgstr "" + +#: ../../whatsnew/3.11.rst:1695 +msgid "" +"Changed opcodes that work with exceptions to reflect them now being " +"represented as one item on the stack instead of three (see :gh:`89874`)." +msgstr "" + +#: ../../whatsnew/3.11.rst:1699 +msgid "" +"Removed :opcode:`!COPY_DICT_WITHOUT_KEYS`, :opcode:`!GEN_START`, :opcode:`!" +"POP_BLOCK`, :opcode:`!SETUP_FINALLY` and :opcode:`!YIELD_FROM`." +msgstr "" + +#: ../../whatsnew/3.11.rst:1707 ../../whatsnew/3.11.rst:2580 +msgid "Deprecated" +msgstr "Als veraltet markiert" + +#: ../../whatsnew/3.11.rst:1709 +msgid "" +"This section lists Python APIs that have been deprecated in Python 3.11." +msgstr "" + +#: ../../whatsnew/3.11.rst:1711 +msgid "" +"Deprecated C APIs are :ref:`listed separately `." +msgstr "" + +#: ../../whatsnew/3.11.rst:1718 +msgid "Language/Builtins" +msgstr "" + +#: ../../whatsnew/3.11.rst:1720 +msgid "" +"Chaining :class:`classmethod` descriptors (introduced in :issue:`19072`) is " +"now deprecated. It can no longer be used to wrap other descriptors such as :" +"class:`property`. The core design of this feature was flawed and caused a " +"number of downstream problems. To \"pass-through\" a :class:`classmethod`, " +"consider using the :attr:`!__wrapped__` attribute that was added in Python " +"3.10. (Contributed by Raymond Hettinger in :gh:`89519`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1728 +msgid "" +"Octal escapes in string and bytes literals with values larger than ``0o377`` " +"(255 in decimal) now produce a :exc:`DeprecationWarning`. In a future Python " +"version, they will raise a :exc:`SyntaxWarning` and eventually a :exc:" +"`SyntaxError`. (Contributed by Serhiy Storchaka in :gh:`81548`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1734 +msgid "" +"The delegation of :func:`int` to :meth:`~object.__trunc__` is now " +"deprecated. Calling ``int(a)`` when ``type(a)`` implements :meth:`!" +"__trunc__` but not :meth:`~object.__int__` or :meth:`~object.__index__` now " +"raises a :exc:`DeprecationWarning`. (Contributed by Zackery Spytz in :issue:" +"`44977`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1744 +msgid "Modules" +msgstr "" + +#: ../../whatsnew/3.11.rst:1748 +msgid "" +":pep:`594` led to the deprecations of the following modules slated for " +"removal in Python 3.13:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1752 +msgid ":mod:`!aifc`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1752 +msgid ":mod:`!chunk`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1752 +msgid ":mod:`!msilib`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1752 +msgid ":mod:`!pipes`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1752 +msgid ":mod:`!telnetlib`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1754 +msgid ":mod:`!audioop`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1754 +msgid ":mod:`!crypt`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1754 +msgid ":mod:`!nis`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1754 +msgid ":mod:`!sndhdr`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1754 +msgid ":mod:`!uu`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1756 +msgid ":mod:`!cgi`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1756 +msgid ":mod:`!imghdr`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1756 +msgid ":mod:`!nntplib`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1756 +msgid ":mod:`!spwd`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1756 +msgid ":mod:`!xdrlib`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1758 +msgid ":mod:`!cgitb`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1758 +msgid ":mod:`!mailcap`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1758 +msgid ":mod:`!ossaudiodev`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1758 +msgid ":mod:`!sunau`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1761 +msgid "" +"(Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in :gh:" +"`68966`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1764 +msgid "" +"The :mod:`!asynchat`, :mod:`!asyncore` and :mod:`!smtpd` modules have been " +"deprecated since at least Python 3.6. Their documentation and deprecation " +"warnings have now been updated to note they will be removed in Python 3.12. " +"(Contributed by Hugo van Kemenade in :issue:`47022`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1769 +msgid "" +"The :mod:`!lib2to3` package and ``2to3`` tool are now deprecated and may not " +"be able to parse Python 3.10 or newer. See :pep:`617`, introducing the new " +"PEG parser, for details. (Contributed by Victor Stinner in :issue:`40360`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1774 +msgid "" +"Undocumented modules :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!" +"sre_parse` are now deprecated. (Contributed by Serhiy Storchaka in :issue:" +"`47152`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1782 +msgid "Standard Library" +msgstr "" + +#: ../../whatsnew/3.11.rst:1784 +msgid "" +"The following have been deprecated in :mod:`configparser` since Python 3.2. " +"Their deprecation warnings have now been updated to note they will be " +"removed in Python 3.12:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1788 +msgid "the :class:`!configparser.SafeConfigParser` class" +msgstr "" + +#: ../../whatsnew/3.11.rst:1789 +msgid "the :attr:`!configparser.ParsingError.filename` property" +msgstr "" + +#: ../../whatsnew/3.11.rst:1790 +msgid "the :meth:`!configparser.RawConfigParser.readfp` method" +msgstr "" + +#: ../../whatsnew/3.11.rst:1792 +msgid "(Contributed by Hugo van Kemenade in :issue:`45173`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1794 +msgid "" +":class:`!configparser.LegacyInterpolation` has been deprecated in the " +"docstring since Python 3.2, and is not listed in the :mod:`configparser` " +"documentation. It now emits a :exc:`DeprecationWarning` and will be removed " +"in Python 3.13. Use :class:`configparser.BasicInterpolation` or :class:" +"`configparser.ExtendedInterpolation` instead. (Contributed by Hugo van " +"Kemenade in :issue:`46607`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1801 +msgid "" +"The older set of :mod:`importlib.resources` functions were deprecated in " +"favor of the replacements added in Python 3.9 and will be removed in a " +"future Python version, due to not supporting resources located within " +"package subdirectories:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1806 +msgid ":func:`!importlib.resources.contents`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1807 +msgid ":func:`!importlib.resources.is_resource`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1808 +msgid ":func:`!importlib.resources.open_binary`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1809 +msgid ":func:`!importlib.resources.open_text`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1810 +msgid ":func:`!importlib.resources.read_binary`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1811 +msgid ":func:`!importlib.resources.read_text`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1812 +msgid ":func:`!importlib.resources.path`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1814 +msgid "" +"The :func:`locale.getdefaultlocale` function is deprecated and will be " +"removed in Python 3.15. Use :func:`locale.setlocale`, :func:`locale." +"getpreferredencoding(False) ` and :func:`locale." +"getlocale` functions instead. (Contributed by Victor Stinner in :gh:`90817`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1820 +msgid "" +"The :func:`!locale.resetlocale` function is deprecated and will be removed " +"in Python 3.13. Use ``locale.setlocale(locale.LC_ALL, \"\")`` instead. " +"(Contributed by Victor Stinner in :gh:`90817`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1824 +msgid "" +"Stricter rules will now be applied for numerical group references and group " +"names in :ref:`regular expressions `. Only sequences of ASCII " +"digits will now be accepted as a numerical reference, and the group name in :" +"class:`bytes` patterns and replacement strings can only contain ASCII " +"letters, digits and underscores. For now, a deprecation warning is raised " +"for syntax violating these rules. (Contributed by Serhiy Storchaka in :gh:" +"`91760`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1832 +msgid "" +"In the :mod:`re` module, the :func:`!re.template` function and the " +"corresponding :const:`!re.TEMPLATE` and :const:`!re.T` flags are deprecated, " +"as they were undocumented and lacked an obvious purpose. They will be " +"removed in Python 3.13. (Contributed by Serhiy Storchaka and Miro Hrončok " +"in :gh:`92728`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1838 +msgid "" +":func:`!turtle.settiltangle` has been deprecated since Python 3.1; it now " +"emits a deprecation warning and will be removed in Python 3.13. Use :func:" +"`turtle.tiltangle` instead (it was earlier incorrectly marked as deprecated, " +"and its docstring is now corrected). (Contributed by Hugo van Kemenade in :" +"issue:`45837`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1844 +msgid "" +":class:`typing.Text`, which exists solely to provide compatibility support " +"between Python 2 and Python 3 code, is now deprecated. Its removal is " +"currently unplanned, but users are encouraged to use :class:`str` instead " +"wherever possible. (Contributed by Alex Waygood in :gh:`92332`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1850 +msgid "" +"The keyword argument syntax for constructing :data:`typing.TypedDict` types " +"is now deprecated. Support will be removed in Python 3.13. (Contributed by " +"Jingchen Ye in :gh:`90224`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1854 +msgid "" +":class:`!webbrowser.MacOSX` is deprecated and will be removed in Python " +"3.13. It is untested, undocumented, and not used by :mod:`webbrowser` " +"itself. (Contributed by Donghee Na in :issue:`42255`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1858 +msgid "" +"The behavior of returning a value from a :class:`~unittest.TestCase` and :" +"class:`~unittest.IsolatedAsyncioTestCase` test methods (other than the " +"default ``None`` value) is now deprecated." +msgstr "" + +#: ../../whatsnew/3.11.rst:1862 +msgid "" +"Deprecated the following not-formally-documented :mod:`unittest` functions, " +"scheduled for removal in Python 3.13:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1865 +msgid ":func:`!unittest.findTestCases`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1866 +msgid ":func:`!unittest.makeSuite`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1867 +msgid ":func:`!unittest.getTestCaseNames`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1869 +msgid "Use :class:`~unittest.TestLoader` methods instead:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1871 +msgid ":meth:`unittest.TestLoader.loadTestsFromModule`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1872 +msgid ":meth:`unittest.TestLoader.loadTestsFromTestCase`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1873 +msgid ":meth:`unittest.TestLoader.getTestCaseNames`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1875 +msgid "(Contributed by Erlend E. Aasland in :issue:`5846`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1877 +msgid "" +":meth:`!unittest.TestProgram.usageExit` is marked deprecated, to be removed " +"in 3.13. (Contributed by Carlos Damázio in :gh:`67048`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1886 ../../whatsnew/3.11.rst:2608 +msgid "Pending Removal in Python 3.12" +msgstr "" + +#: ../../whatsnew/3.11.rst:1888 +msgid "" +"The following Python APIs have been deprecated in earlier Python releases, " +"and will be removed in Python 3.12." +msgstr "" + +#: ../../whatsnew/3.11.rst:1891 +msgid "" +"C APIs pending removal are :ref:`listed separately `." +msgstr "" + +#: ../../whatsnew/3.11.rst:1894 +msgid "The :mod:`!asynchat` module" +msgstr "" + +#: ../../whatsnew/3.11.rst:1895 +msgid "The :mod:`!asyncore` module" +msgstr "" + +#: ../../whatsnew/3.11.rst:1896 +msgid "The :ref:`entire distutils package `" +msgstr "" + +#: ../../whatsnew/3.11.rst:1897 +msgid "The :mod:`!imp` module" +msgstr "" + +#: ../../whatsnew/3.11.rst:1898 +msgid "The :class:`typing.io ` namespace" +msgstr "" + +#: ../../whatsnew/3.11.rst:1899 +msgid "The :class:`typing.re ` namespace" +msgstr "" + +#: ../../whatsnew/3.11.rst:1900 +msgid ":func:`!cgi.log`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1901 +msgid ":func:`!importlib.find_loader`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1902 +msgid ":meth:`!importlib.abc.Loader.module_repr`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1903 +msgid ":meth:`!importlib.abc.MetaPathFinder.find_module`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1904 +msgid ":meth:`!importlib.abc.PathEntryFinder.find_loader`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1905 +msgid ":meth:`!importlib.abc.PathEntryFinder.find_module`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1906 +msgid ":meth:`!importlib.machinery.BuiltinImporter.find_module`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1907 +msgid ":meth:`!importlib.machinery.BuiltinLoader.module_repr`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1908 +msgid ":meth:`!importlib.machinery.FileFinder.find_loader`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1909 +msgid ":meth:`!importlib.machinery.FileFinder.find_module`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1910 +msgid ":meth:`!importlib.machinery.FrozenImporter.find_module`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1911 +msgid ":meth:`!importlib.machinery.FrozenLoader.module_repr`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1912 +msgid ":meth:`!importlib.machinery.PathFinder.find_module`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1913 +msgid ":meth:`!importlib.machinery.WindowsRegistryFinder.find_module`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1914 +msgid ":func:`!importlib.util.module_for_loader`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1915 +msgid ":func:`!importlib.util.set_loader_wrapper`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1916 +msgid ":func:`!importlib.util.set_package_wrapper`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1917 +msgid ":class:`!pkgutil.ImpImporter`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1918 +msgid ":class:`!pkgutil.ImpLoader`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1919 +msgid ":meth:`!pathlib.Path.link_to`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1920 +msgid ":func:`!sqlite3.enable_shared_cache`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1921 +msgid ":func:`!sqlite3.OptimizedUnicode`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1922 +msgid ":envvar:`!PYTHONTHREADDEBUG` environment variable" +msgstr "" + +#: ../../whatsnew/3.11.rst:1923 +msgid "The following deprecated aliases in :mod:`unittest`:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1926 +msgid "Deprecated alias" +msgstr "Veraltetes Alias" + +#: ../../whatsnew/3.11.rst:1926 +msgid "Method Name" +msgstr "Methodenname" + +#: ../../whatsnew/3.11.rst:1926 +msgid "Deprecated in" +msgstr "Als veraltet markiert in:" + +#: ../../whatsnew/3.11.rst:1928 +msgid "``failUnless``" +msgstr "``failUnless``" + +#: ../../whatsnew/3.11.rst:1928 ../../whatsnew/3.11.rst:1935 +msgid ":meth:`.assertTrue`" +msgstr ":meth:`.assertTrue`" + +#: ../../whatsnew/3.11.rst:1928 ../../whatsnew/3.11.rst:1929 +#: ../../whatsnew/3.11.rst:1930 ../../whatsnew/3.11.rst:1931 +#: ../../whatsnew/3.11.rst:1932 ../../whatsnew/3.11.rst:1933 +#: ../../whatsnew/3.11.rst:1934 +msgid "3.1" +msgstr "3.1" + +#: ../../whatsnew/3.11.rst:1929 +msgid "``failIf``" +msgstr "``failIf``" + +#: ../../whatsnew/3.11.rst:1929 +msgid ":meth:`.assertFalse`" +msgstr ":meth:`.assertFalse`" + +#: ../../whatsnew/3.11.rst:1930 +msgid "``failUnlessEqual``" +msgstr "``failUnlessEqual``" + +#: ../../whatsnew/3.11.rst:1930 ../../whatsnew/3.11.rst:1936 +msgid ":meth:`.assertEqual`" +msgstr ":meth:`.assertEqual`" + +#: ../../whatsnew/3.11.rst:1931 +msgid "``failIfEqual``" +msgstr "``failIfEqual``" + +#: ../../whatsnew/3.11.rst:1931 ../../whatsnew/3.11.rst:1937 +msgid ":meth:`.assertNotEqual`" +msgstr ":meth:`.assertNotEqual`" + +#: ../../whatsnew/3.11.rst:1932 +msgid "``failUnlessAlmostEqual``" +msgstr "``failUnlessAlmostEqual``" + +#: ../../whatsnew/3.11.rst:1932 ../../whatsnew/3.11.rst:1938 +msgid ":meth:`.assertAlmostEqual`" +msgstr ":meth:`.assertAlmostEqual`" + +#: ../../whatsnew/3.11.rst:1933 +msgid "``failIfAlmostEqual``" +msgstr "``failIfAlmostEqual``" + +#: ../../whatsnew/3.11.rst:1933 ../../whatsnew/3.11.rst:1939 +msgid ":meth:`.assertNotAlmostEqual`" +msgstr ":meth:`.assertNotAlmostEqual`" + +#: ../../whatsnew/3.11.rst:1934 +msgid "``failUnlessRaises``" +msgstr "``failUnlessRaises``" + +#: ../../whatsnew/3.11.rst:1934 +msgid ":meth:`.assertRaises`" +msgstr ":meth:`.assertRaises`" + +#: ../../whatsnew/3.11.rst:1935 +msgid "``assert_``" +msgstr "``assert_``" + +#: ../../whatsnew/3.11.rst:1935 ../../whatsnew/3.11.rst:1936 +#: ../../whatsnew/3.11.rst:1937 ../../whatsnew/3.11.rst:1938 +#: ../../whatsnew/3.11.rst:1939 ../../whatsnew/3.11.rst:1940 +#: ../../whatsnew/3.11.rst:1941 +msgid "3.2" +msgstr "3.2" + +#: ../../whatsnew/3.11.rst:1936 +msgid "``assertEquals``" +msgstr "``assertEquals``" + +#: ../../whatsnew/3.11.rst:1937 +msgid "``assertNotEquals``" +msgstr "``assertNotEquals``" + +#: ../../whatsnew/3.11.rst:1938 +msgid "``assertAlmostEquals``" +msgstr "``assertAlmostEquals``" + +#: ../../whatsnew/3.11.rst:1939 +msgid "``assertNotAlmostEquals``" +msgstr "``assertNotAlmostEquals``" + +#: ../../whatsnew/3.11.rst:1940 +msgid "``assertRegexpMatches``" +msgstr "``assertRegexpMatches``" + +#: ../../whatsnew/3.11.rst:1940 +msgid ":meth:`.assertRegex`" +msgstr ":meth:`.assertRegex`" + +#: ../../whatsnew/3.11.rst:1941 +msgid "``assertRaisesRegexp``" +msgstr "``assertRaisesRegexp``" + +#: ../../whatsnew/3.11.rst:1941 +msgid ":meth:`.assertRaisesRegex`" +msgstr ":meth:`.assertRaisesRegex`" + +#: ../../whatsnew/3.11.rst:1942 +msgid "``assertNotRegexpMatches``" +msgstr "``assertNotRegexpMatches``" + +#: ../../whatsnew/3.11.rst:1942 +msgid ":meth:`.assertNotRegex`" +msgstr ":meth:`.assertNotRegex`" + +#: ../../whatsnew/3.11.rst:1942 +msgid "3.5" +msgstr "3.5" + +#: ../../whatsnew/3.11.rst:1949 ../../whatsnew/3.11.rst:2634 +msgid "Removed" +msgstr "Entfernt" + +#: ../../whatsnew/3.11.rst:1951 +msgid "This section lists Python APIs that have been removed in Python 3.11." +msgstr "" + +#: ../../whatsnew/3.11.rst:1953 +msgid "" +"Removed C APIs are :ref:`listed separately `." +msgstr "" + +#: ../../whatsnew/3.11.rst:1955 +msgid "" +"Removed the :func:`!@asyncio.coroutine` :term:`decorator` enabling legacy " +"generator-based coroutines to be compatible with :keyword:`async` / :keyword:" +"`await` code. The function has been deprecated since Python 3.8 and the " +"removal was initially scheduled for Python 3.10. Use :keyword:`async def` " +"instead. (Contributed by Illia Volochii in :issue:`43216`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1962 +msgid "" +"Removed :class:`!asyncio.coroutines.CoroWrapper` used for wrapping legacy " +"generator-based coroutine objects in the debug mode. (Contributed by Illia " +"Volochii in :issue:`43216`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1966 +msgid "" +"Due to significant security concerns, the *reuse_address* parameter of :meth:" +"`asyncio.loop.create_datagram_endpoint`, disabled in Python 3.9, is now " +"entirely removed. This is because of the behavior of the socket option " +"``SO_REUSEADDR`` in UDP. (Contributed by Hugo van Kemenade in :issue:" +"`45129`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1972 +msgid "" +"Removed the :mod:`!binhex` module, deprecated in Python 3.9. Also removed " +"the related, similarly-deprecated :mod:`binascii` functions:" +msgstr "" + +#: ../../whatsnew/3.11.rst:1975 +msgid ":func:`!binascii.a2b_hqx`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1976 +msgid ":func:`!binascii.b2a_hqx`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1977 +msgid ":func:`!binascii.rlecode_hqx`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1978 +msgid ":func:`!binascii.rldecode_hqx`" +msgstr "" + +#: ../../whatsnew/3.11.rst:1980 +msgid "The :func:`binascii.crc_hqx` function remains available." +msgstr "" + +#: ../../whatsnew/3.11.rst:1982 +msgid "(Contributed by Victor Stinner in :issue:`45085`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1984 +msgid "" +"Removed the :mod:`!distutils` ``bdist_msi`` command deprecated in Python " +"3.9. Use ``bdist_wheel`` (wheel packages) instead. (Contributed by Hugo van " +"Kemenade in :issue:`45124`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1988 +msgid "" +"Removed the :meth:`~object.__getitem__` methods of :class:`xml.dom.pulldom." +"DOMEventStream`, :class:`wsgiref.util.FileWrapper` and :class:`fileinput." +"FileInput`, deprecated since Python 3.9. (Contributed by Hugo van Kemenade " +"in :issue:`45132`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:1993 +msgid "" +"Removed the deprecated :mod:`gettext` functions :func:`!lgettext`, :func:`!" +"ldgettext`, :func:`!lngettext` and :func:`!ldngettext`. Also removed the :" +"func:`!bind_textdomain_codeset` function, the :meth:`!NullTranslations." +"output_charset` and :meth:`!NullTranslations.set_output_charset` methods, " +"and the *codeset* parameter of :func:`!translation` and :func:`!install`, " +"since they are only used for the :func:`!l*gettext` functions. (Contributed " +"by Donghee Na and Serhiy Storchaka in :issue:`44235`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2003 +msgid "Removed from the :mod:`inspect` module:" +msgstr "" + +#: ../../whatsnew/3.11.rst:2005 +msgid "" +"The :func:`!getargspec` function, deprecated since Python 3.0; use :func:" +"`inspect.signature` or :func:`inspect.getfullargspec` instead." +msgstr "" + +#: ../../whatsnew/3.11.rst:2008 +msgid "" +"The :func:`!formatargspec` function, deprecated since Python 3.5; use the :" +"func:`inspect.signature` function or the :class:`inspect.Signature` object " +"directly." +msgstr "" + +#: ../../whatsnew/3.11.rst:2012 +msgid "" +"The undocumented :meth:`!Signature.from_builtin` and :meth:`!Signature." +"from_function` methods, deprecated since Python 3.5; use the :meth:" +"`Signature.from_callable() ` method instead." +msgstr "" + +#: ../../whatsnew/3.11.rst:2017 +msgid "(Contributed by Hugo van Kemenade in :issue:`45320`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2019 +msgid "" +"Removed the :meth:`~object.__class_getitem__` method from :class:`pathlib." +"PurePath`, because it was not used and added by mistake in previous " +"versions. (Contributed by Nikita Sobolev in :issue:`46483`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2024 +msgid "" +"Removed the :class:`!MailmanProxy` class in the :mod:`!smtpd` module, as it " +"is unusable without the external :mod:`!mailman` package. (Contributed by " +"Donghee Na in :issue:`35800`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2028 +msgid "" +"Removed the deprecated :meth:`!split` method of :class:`!_tkinter." +"TkappType`. (Contributed by Erlend E. Aasland in :issue:`38371`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2031 +msgid "" +"Removed namespace package support from :mod:`unittest` discovery. It was " +"introduced in Python 3.4 but has been broken since Python 3.7. (Contributed " +"by Inada Naoki in :issue:`23882`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2035 +msgid "" +"Removed the undocumented private :meth:`!float.__set_format__` method, " +"previously known as :meth:`!float.__setformat__` in Python 3.7. Its " +"docstring said: \"You probably don't want to use this function. It exists " +"mainly to be used in Python's test suite.\" (Contributed by Victor Stinner " +"in :issue:`46852`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2041 +msgid "" +"The :option:`!--experimental-isolated-subinterpreters` configure flag (and " +"corresponding :c:macro:`!EXPERIMENTAL_ISOLATED_SUBINTERPRETERS` macro) have " +"been removed." +msgstr "" + +#: ../../whatsnew/3.11.rst:2045 +msgid "" +":pypi:`Pynche` --- The Pythonically Natural Color and Hue Editor --- has " +"been moved out of ``Tools/scripts`` and is `being developed independently " +"`_ from the Python source tree." +msgstr "" + +#: ../../whatsnew/3.11.rst:2055 ../../whatsnew/3.11.rst:2277 +msgid "Porting to Python 3.11" +msgstr "" + +#: ../../whatsnew/3.11.rst:2057 +msgid "" +"This section lists previously described changes and other bugfixes in the " +"Python API that may require changes to your Python code." +msgstr "" + +#: ../../whatsnew/3.11.rst:2060 +msgid "" +"Porting notes for the C API are :ref:`listed separately `." +msgstr "" + +#: ../../whatsnew/3.11.rst:2063 +msgid "" +":func:`open`, :func:`io.open`, :func:`codecs.open` and :class:`fileinput." +"FileInput` no longer accept ``'U'`` (\"universal newline\") in the file " +"mode. In Python 3, \"universal newline\" mode is used by default whenever a " +"file is opened in text mode, and the ``'U'`` flag has been deprecated since " +"Python 3.3. The :ref:`newline parameter ` to these " +"functions controls how universal newlines work. (Contributed by Victor " +"Stinner in :issue:`37330`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2072 +msgid "" +":class:`ast.AST` node positions are now validated when provided to :func:" +"`compile` and other related functions. If invalid positions are detected, a :" +"exc:`ValueError` will be raised. (Contributed by Pablo Galindo in :gh:" +"`93351`)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2076 +msgid "" +"Prohibited passing non-:class:`concurrent.futures.ThreadPoolExecutor` " +"executors to :meth:`asyncio.loop.set_default_executor` following a " +"deprecation in Python 3.8. (Contributed by Illia Volochii in :issue:`43234`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2081 +msgid "" +":mod:`calendar`: The :class:`calendar.LocaleTextCalendar` and :class:" +"`calendar.LocaleHTMLCalendar` classes now use :func:`locale.getlocale`, " +"instead of using :func:`locale.getdefaultlocale`, if no locale is specified. " +"(Contributed by Victor Stinner in :issue:`46659`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2087 +msgid "" +"The :mod:`pdb` module now reads the :file:`.pdbrc` configuration file with " +"the ``'UTF-8'`` encoding. (Contributed by Srinivas Reddy Thatiparthy (శ్రీనివాస్ " +"రెడ్డి తాటిపర్తి) in :issue:`41137`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2091 +msgid "" +"The *population* parameter of :func:`random.sample` must be a sequence, and " +"automatic conversion of :class:`set`\\s to :class:`list`\\s is no longer " +"supported. Also, if the sample size is larger than the population size, a :" +"exc:`ValueError` is raised. (Contributed by Raymond Hettinger in :issue:" +"`40465`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2097 +msgid "" +"The *random* optional parameter of :func:`random.shuffle` was removed. It " +"was previously an arbitrary random function to use for the shuffle; now, :" +"func:`random.random` (its previous default) will always be used." +msgstr "" + +#: ../../whatsnew/3.11.rst:2101 +msgid "" +"In :mod:`re` :ref:`re-syntax`, global inline flags (e.g. ``(?i)``) can now " +"only be used at the start of regular expressions. Using them elsewhere has " +"been deprecated since Python 3.6. (Contributed by Serhiy Storchaka in :issue:" +"`47066`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2106 +msgid "" +"In the :mod:`re` module, several long-standing bugs where fixed that, in " +"rare cases, could cause capture groups to get the wrong result. Therefore, " +"this could change the captured output in these cases. (Contributed by Ma Lin " +"in :issue:`35859`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2115 +msgid "Build Changes" +msgstr "Build Änderungen" + +#: ../../whatsnew/3.11.rst:2117 +msgid "" +"CPython now has :pep:`11` :pep:`Tier 3 support <11#tier-3>` for cross " +"compiling to the `WebAssembly `_ platforms " +"`Emscripten `_ (``wasm32-unknown-emscripten``, i.e. " +"Python in the browser) and `WebAssembly System Interface (WASI) `_ (``wasm32-unknown-wasi``). The effort is inspired by previous " +"work like `Pyodide `_. These platforms provide a " +"limited subset of POSIX APIs; Python standard libraries features and modules " +"related to networking, processes, threading, signals, mmap, and users/groups " +"are not available or don't work. (Emscripten contributed by Christian Heimes " +"and Ethan Smith in :gh:`84461` and WASI contributed by Christian Heimes in :" +"gh:`90473`; platforms promoted in :gh:`95085`)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2131 +msgid "Building CPython now requires:" +msgstr "" + +#: ../../whatsnew/3.11.rst:2133 +msgid "" +"A `C11 `_ compiler and standard library. " +"`Optional C11 features `_ are not required. " +"(Contributed by Victor Stinner in :issue:`46656`, :issue:`45440` and :issue:" +"`46640`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2140 +msgid "" +"Support for `IEEE 754 `_ floating-" +"point numbers. (Contributed by Victor Stinner in :issue:`46917`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2144 +msgid "" +"The :c:macro:`!Py_NO_NAN` macro has been removed. Since CPython now requires " +"IEEE 754 floats, NaN values are always available. (Contributed by Victor " +"Stinner in :issue:`46656`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2148 +msgid "" +"The :mod:`tkinter` package now requires `Tcl/Tk `_ " +"version 8.5.12 or newer. (Contributed by Serhiy Storchaka in :issue:`46996`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2152 +msgid "" +"Build dependencies, compiler flags, and linker flags for most stdlib " +"extension modules are now detected by :program:`configure`. libffi, libnsl, " +"libsqlite3, zlib, bzip2, liblzma, libcrypt, Tcl/Tk, and uuid flags are " +"detected by `pkg-config `_ (when available). :mod:`tkinter` now requires a pkg-config " +"command to detect development settings for `Tcl/Tk`_ headers and libraries. " +"(Contributed by Christian Heimes and Erlend Egeberg Aasland in :issue:" +"`45847`, :issue:`45747`, and :issue:`45763`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2162 +msgid "" +"libpython is no longer linked against libcrypt. (Contributed by Mike Gilbert " +"in :issue:`45433`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2165 +msgid "" +"CPython can now be built with the `ThinLTO `_ option via passing ``thin`` to :option:`--with-lto`, i.e. " +"``--with-lto=thin``. (Contributed by Donghee Na and Brett Holman in :issue:" +"`44340`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2170 +msgid "" +"Freelists for object structs can now be disabled. A new :program:`configure` " +"option ``--without-freelists`` can be used to disable all freelists except " +"empty tuple singleton. (Contributed by Christian Heimes in :issue:`45522`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2175 +msgid "" +"``Modules/Setup`` and ``Modules/makesetup`` have been improved and tied up. " +"Extension modules can now be built through ``makesetup``. All except some " +"test modules can be linked statically into a main binary or library. " +"(Contributed by Brett Cannon and Christian Heimes in :issue:`45548`, :issue:" +"`45570`, :issue:`45571`, and :issue:`43974`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2182 +msgid "" +"Use the environment variables :envvar:`!TCLTK_CFLAGS` and :envvar:`!" +"TCLTK_LIBS` to manually specify the location of Tcl/Tk headers and " +"libraries. The :program:`configure` options :option:`!--with-tcltk-includes` " +"and :option:`!--with-tcltk-libs` have been removed." +msgstr "" + +#: ../../whatsnew/3.11.rst:2188 +msgid "" +"On RHEL 7 and CentOS 7 the development packages do not provide ``tcl.pc`` " +"and ``tk.pc``; use ``TCLTK_LIBS=\"-ltk8.5 -ltkstub8.5 -ltcl8.5\"``. The " +"directory ``Misc/rhel7`` contains ``.pc`` files and instructions on how to " +"build Python with RHEL 7's and CentOS 7's Tcl/Tk and OpenSSL." +msgstr "" + +#: ../../whatsnew/3.11.rst:2193 +msgid "" +"CPython will now use 30-bit digits by default for the Python :class:`int` " +"implementation. Previously, the default was to use 30-bit digits on " +"platforms with ``SIZEOF_VOID_P >= 8``, and 15-bit digits otherwise. It's " +"still possible to explicitly request use of 15-bit digits via either the :" +"option:`--enable-big-digits` option to the configure script or (for Windows) " +"the ``PYLONG_BITS_IN_DIGIT`` variable in ``PC/pyconfig.h``, but this option " +"may be removed at some point in the future. (Contributed by Mark Dickinson " +"in :issue:`45569`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2206 +msgid "C API Changes" +msgstr "C API Änderungen" + +#: ../../whatsnew/3.11.rst:2213 +msgid "" +"Add a new :c:func:`PyType_GetName` function to get type's short name. " +"(Contributed by Hai Shi in :issue:`42035`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2216 +msgid "" +"Add a new :c:func:`PyType_GetQualName` function to get type's qualified " +"name. (Contributed by Hai Shi in :issue:`42035`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2219 +msgid "" +"Add new :c:func:`PyThreadState_EnterTracing` and :c:func:" +"`PyThreadState_LeaveTracing` functions to the limited C API to suspend and " +"resume tracing and profiling. (Contributed by Victor Stinner in :issue:" +"`43760`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2224 +msgid "" +"Added the :c:data:`Py_Version` constant which bears the same value as :c:" +"macro:`PY_VERSION_HEX`. (Contributed by Gabriele N. Tornetta in :issue:" +"`43931`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2228 +msgid "" +":c:type:`Py_buffer` and APIs are now part of the limited API and the stable " +"ABI:" +msgstr "" + +#: ../../whatsnew/3.11.rst:2231 +msgid ":c:func:`PyObject_CheckBuffer`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2232 +msgid ":c:func:`PyObject_GetBuffer`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2233 +msgid ":c:func:`PyBuffer_GetPointer`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2234 +msgid ":c:func:`PyBuffer_SizeFromFormat`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2235 +msgid ":c:func:`PyBuffer_ToContiguous`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2236 +msgid ":c:func:`PyBuffer_FromContiguous`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2237 +msgid ":c:func:`PyObject_CopyData`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2238 +msgid ":c:func:`PyBuffer_IsContiguous`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2239 +msgid ":c:func:`PyBuffer_FillContiguousStrides`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2240 +msgid ":c:func:`PyBuffer_FillInfo`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2241 +msgid ":c:func:`PyBuffer_Release`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2242 +msgid ":c:func:`PyMemoryView_FromBuffer`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2243 +msgid "" +":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs." +"bf_releasebuffer` type slots" +msgstr "" + +#: ../../whatsnew/3.11.rst:2246 +msgid "(Contributed by Christian Heimes in :issue:`45459`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2248 +msgid "" +"Added the :c:func:`PyType_GetModuleByDef` function, used to get the module " +"in which a method was defined, in cases where this information is not " +"available directly (via :c:type:`PyCMethod`). (Contributed by Petr Viktorin " +"in :issue:`46613`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2253 +msgid "" +"Add new functions to pack and unpack C double (serialize and deserialize): :" +"c:func:`PyFloat_Pack2`, :c:func:`PyFloat_Pack4`, :c:func:`PyFloat_Pack8`, :c:" +"func:`PyFloat_Unpack2`, :c:func:`PyFloat_Unpack4` and :c:func:" +"`PyFloat_Unpack8`. (Contributed by Victor Stinner in :issue:`46906`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2259 +msgid "" +"Add new functions to get frame object attributes: :c:func:" +"`PyFrame_GetBuiltins`, :c:func:`PyFrame_GetGenerator`, :c:func:" +"`PyFrame_GetGlobals`, :c:func:`PyFrame_GetLasti`." +msgstr "" + +#: ../../whatsnew/3.11.rst:2263 +msgid "" +"Added two new functions to get and set the active exception instance: :c:" +"func:`PyErr_GetHandledException` and :c:func:`PyErr_SetHandledException`. " +"These are alternatives to :c:func:`PyErr_SetExcInfo()` and :c:func:" +"`PyErr_GetExcInfo()` which work with the legacy 3-tuple representation of " +"exceptions. (Contributed by Irit Katriel in :issue:`46343`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2270 +msgid "" +"Added the :c:member:`PyConfig.safe_path` member. (Contributed by Victor " +"Stinner in :gh:`57684`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2281 +msgid "" +"Some macros have been converted to static inline functions to avoid `macro " +"pitfalls `_. The " +"change should be mostly transparent to users, as the replacement functions " +"will cast their arguments to the expected types to avoid compiler warnings " +"due to static type checks. However, when the limited C API is set to >=3.11, " +"these casts are not done, and callers will need to cast arguments to their " +"expected types. See :pep:`670` for more details. (Contributed by Victor " +"Stinner and Erlend E. Aasland in :gh:`89653`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2292 +msgid "" +":c:func:`PyErr_SetExcInfo()` no longer uses the ``type`` and ``traceback`` " +"arguments, the interpreter now derives those values from the exception " +"instance (the ``value`` argument). The function still steals references of " +"all three arguments. (Contributed by Irit Katriel in :issue:`45711`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2298 +msgid "" +":c:func:`PyErr_GetExcInfo()` now derives the ``type`` and ``traceback`` " +"fields of the result from the exception instance (the ``value`` field). " +"(Contributed by Irit Katriel in :issue:`45711`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2302 +msgid "" +":c:struct:`_frozen` has a new ``is_package`` field to indicate whether or " +"not the frozen module is a package. Previously, a negative value in the " +"``size`` field was the indicator. Now only non-negative values be used for " +"``size``. (Contributed by Kumar Aditya in :issue:`46608`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2308 +msgid "" +":c:func:`_PyFrameEvalFunction` now takes ``_PyInterpreterFrame*`` as its " +"second parameter, instead of ``PyFrameObject*``. See :pep:`523` for more " +"details of how to use this function pointer type." +msgstr "" + +#: ../../whatsnew/3.11.rst:2312 +msgid "" +":c:func:`!PyCode_New` and :c:func:`!PyCode_NewWithPosOnlyArgs` now take an " +"additional ``exception_table`` argument. Using these functions should be " +"avoided, if at all possible. To get a custom code object: create a code " +"object using the compiler, then get a modified version with the ``replace`` " +"method." +msgstr "" + +#: ../../whatsnew/3.11.rst:2318 +msgid "" +":c:type:`PyCodeObject` no longer has the ``co_code``, ``co_varnames``, " +"``co_cellvars`` and ``co_freevars`` fields. Instead, use :c:func:" +"`PyCode_GetCode`, :c:func:`PyCode_GetVarnames`, :c:func:`PyCode_GetCellvars` " +"and :c:func:`PyCode_GetFreevars` respectively to access them via the C API. " +"(Contributed by Brandt Bucher in :issue:`46841` and Ken Jin in :gh:`92154` " +"and :gh:`94936`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2326 +msgid "" +"The old trashcan macros (``Py_TRASHCAN_SAFE_BEGIN``/" +"``Py_TRASHCAN_SAFE_END``) are now deprecated. They should be replaced by the " +"new macros ``Py_TRASHCAN_BEGIN`` and ``Py_TRASHCAN_END``." +msgstr "" + +#: ../../whatsnew/3.11.rst:2330 +msgid "A tp_dealloc function that has the old macros, such as::" +msgstr "" + +#: ../../whatsnew/3.11.rst:2332 +msgid "" +"static void\n" +"mytype_dealloc(mytype *p)\n" +"{\n" +" PyObject_GC_UnTrack(p);\n" +" Py_TRASHCAN_SAFE_BEGIN(p);\n" +" ...\n" +" Py_TRASHCAN_SAFE_END\n" +"}" +msgstr "" + +#: ../../whatsnew/3.11.rst:2341 +msgid "should migrate to the new macros as follows::" +msgstr "" + +#: ../../whatsnew/3.11.rst:2343 +msgid "" +"static void\n" +"mytype_dealloc(mytype *p)\n" +"{\n" +" PyObject_GC_UnTrack(p);\n" +" Py_TRASHCAN_BEGIN(p, mytype_dealloc)\n" +" ...\n" +" Py_TRASHCAN_END\n" +"}" +msgstr "" + +#: ../../whatsnew/3.11.rst:2352 +msgid "" +"Note that ``Py_TRASHCAN_BEGIN`` has a second argument which should be the " +"deallocation function it is in." +msgstr "" + +#: ../../whatsnew/3.11.rst:2355 +msgid "" +"To support older Python versions in the same codebase, you can define the " +"following macros and use them throughout the code (credit: these were copied " +"from the ``mypy`` codebase)::" +msgstr "" + +#: ../../whatsnew/3.11.rst:2359 +msgid "" +"#if PY_VERSION_HEX >= 0x03080000\n" +"# define CPy_TRASHCAN_BEGIN(op, dealloc) Py_TRASHCAN_BEGIN(op, dealloc)\n" +"# define CPy_TRASHCAN_END(op) Py_TRASHCAN_END\n" +"#else\n" +"# define CPy_TRASHCAN_BEGIN(op, dealloc) Py_TRASHCAN_SAFE_BEGIN(op)\n" +"# define CPy_TRASHCAN_END(op) Py_TRASHCAN_SAFE_END(op)\n" +"#endif" +msgstr "" + +#: ../../whatsnew/3.11.rst:2367 +msgid "" +"The :c:func:`PyType_Ready` function now raises an error if a type is defined " +"with the :c:macro:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse function " +"(:c:member:`PyTypeObject.tp_traverse`). (Contributed by Victor Stinner in :" +"issue:`44263`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2372 +msgid "" +"Heap types with the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag can now inherit " +"the :pep:`590` vectorcall protocol. Previously, this was only possible for :" +"ref:`static types `. (Contributed by Erlend E. Aasland in :" +"issue:`43908`)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2377 +msgid "" +"Since :c:func:`Py_TYPE()` is changed to a inline static function, " +"``Py_TYPE(obj) = new_type`` must be replaced with ``Py_SET_TYPE(obj, " +"new_type)``: see the :c:func:`Py_SET_TYPE()` function (available since " +"Python 3.9). For backward compatibility, this macro can be used::" +msgstr "" + +#: ../../whatsnew/3.11.rst:2383 +msgid "" +"#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_TYPE)\n" +"static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type)\n" +"{ ob->ob_type = type; }\n" +"#define Py_SET_TYPE(ob, type) _Py_SET_TYPE((PyObject*)(ob), type)\n" +"#endif" +msgstr "" + +#: ../../whatsnew/3.11.rst:2389 ../../whatsnew/3.11.rst:2403 +msgid "(Contributed by Victor Stinner in :issue:`39573`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2391 +msgid "" +"Since :c:func:`Py_SIZE()` is changed to a inline static function, " +"``Py_SIZE(obj) = new_size`` must be replaced with ``Py_SET_SIZE(obj, " +"new_size)``: see the :c:func:`Py_SET_SIZE()` function (available since " +"Python 3.9). For backward compatibility, this macro can be used::" +msgstr "" + +#: ../../whatsnew/3.11.rst:2397 +msgid "" +"#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_SIZE)\n" +"static inline void _Py_SET_SIZE(PyVarObject *ob, Py_ssize_t size)\n" +"{ ob->ob_size = size; }\n" +"#define Py_SET_SIZE(ob, size) _Py_SET_SIZE((PyVarObject*)(ob), size)\n" +"#endif" +msgstr "" + +#: ../../whatsnew/3.11.rst:2405 +msgid "" +"```` no longer includes the header files ````, ````, ```` and ```` when the ``Py_LIMITED_API`` macro is " +"set to ``0x030b0000`` (Python 3.11) or higher. C extensions should " +"explicitly include the header files after ``#include ``. " +"(Contributed by Victor Stinner in :issue:`45434`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2411 +msgid "" +"The non-limited API files ``cellobject.h``, ``classobject.h``, ``code.h``, " +"``context.h``, ``funcobject.h``, ``genobject.h`` and ``longintrepr.h`` have " +"been moved to the ``Include/cpython`` directory. Moreover, the ``eval.h`` " +"header file was removed. These files must not be included directly, as they " +"are already included in ``Python.h``: :ref:`Include Files `. " +"If they have been included directly, consider including ``Python.h`` " +"instead. (Contributed by Victor Stinner in :issue:`35134`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2419 +msgid "" +"The :c:func:`!PyUnicode_CHECK_INTERNED` macro has been excluded from the " +"limited C API. It was never usable there, because it used internal " +"structures which are not available in the limited C API. (Contributed by " +"Victor Stinner in :issue:`46007`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2424 +msgid "" +"The following frame functions and type are now directly available with " +"``#include ``, it's no longer needed to add ``#include " +"``:" +msgstr "" + +#: ../../whatsnew/3.11.rst:2428 +msgid ":c:func:`PyFrame_Check`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2429 +msgid ":c:func:`PyFrame_GetBack`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2430 +msgid ":c:func:`PyFrame_GetBuiltins`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2431 +msgid ":c:func:`PyFrame_GetGenerator`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2432 +msgid ":c:func:`PyFrame_GetGlobals`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2433 +msgid ":c:func:`PyFrame_GetLasti`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2434 +msgid ":c:func:`PyFrame_GetLocals`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2435 +msgid ":c:type:`PyFrame_Type`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2437 +msgid "(Contributed by Victor Stinner in :gh:`93937`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2441 +msgid "" +"The :c:type:`PyFrameObject` structure members have been removed from the " +"public C API." +msgstr "" + +#: ../../whatsnew/3.11.rst:2444 +msgid "" +"While the documentation notes that the :c:type:`PyFrameObject` fields are " +"subject to change at any time, they have been stable for a long time and " +"were used in several popular extensions." +msgstr "" + +#: ../../whatsnew/3.11.rst:2448 +msgid "" +"In Python 3.11, the frame struct was reorganized to allow performance " +"optimizations. Some fields were removed entirely, as they were details of " +"the old implementation." +msgstr "" + +#: ../../whatsnew/3.11.rst:2452 +msgid ":c:type:`PyFrameObject` fields:" +msgstr "" + +#: ../../whatsnew/3.11.rst:2454 +msgid "``f_back``: use :c:func:`PyFrame_GetBack`." +msgstr "" + +#: ../../whatsnew/3.11.rst:2455 +msgid "``f_blockstack``: removed." +msgstr "" + +#: ../../whatsnew/3.11.rst:2456 +msgid "``f_builtins``: use :c:func:`PyFrame_GetBuiltins`." +msgstr "" + +#: ../../whatsnew/3.11.rst:2457 +msgid "``f_code``: use :c:func:`PyFrame_GetCode`." +msgstr "" + +#: ../../whatsnew/3.11.rst:2458 +msgid "``f_gen``: use :c:func:`PyFrame_GetGenerator`." +msgstr "" + +#: ../../whatsnew/3.11.rst:2459 +msgid "``f_globals``: use :c:func:`PyFrame_GetGlobals`." +msgstr "" + +#: ../../whatsnew/3.11.rst:2460 +msgid "``f_iblock``: removed." +msgstr "" + +#: ../../whatsnew/3.11.rst:2461 +msgid "" +"``f_lasti``: use :c:func:`PyFrame_GetLasti`. Code using ``f_lasti`` with " +"``PyCode_Addr2Line()`` should use :c:func:`PyFrame_GetLineNumber` instead; " +"it may be faster." +msgstr "" + +#: ../../whatsnew/3.11.rst:2464 +msgid "``f_lineno``: use :c:func:`PyFrame_GetLineNumber`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2465 +msgid "``f_locals``: use :c:func:`PyFrame_GetLocals`." +msgstr "" + +#: ../../whatsnew/3.11.rst:2466 +msgid "``f_stackdepth``: removed." +msgstr "" + +#: ../../whatsnew/3.11.rst:2467 +msgid "``f_state``: no public API (renamed to ``f_frame.f_state``)." +msgstr "" + +#: ../../whatsnew/3.11.rst:2468 +msgid "``f_trace``: no public API." +msgstr "" + +#: ../../whatsnew/3.11.rst:2469 +msgid "" +"``f_trace_lines``: use ``PyObject_GetAttrString((PyObject*)frame, " +"\"f_trace_lines\")``." +msgstr "" + +#: ../../whatsnew/3.11.rst:2470 +msgid "" +"``f_trace_opcodes``: use ``PyObject_GetAttrString((PyObject*)frame, " +"\"f_trace_opcodes\")``." +msgstr "" + +#: ../../whatsnew/3.11.rst:2471 +msgid "``f_localsplus``: no public API (renamed to ``f_frame.localsplus``)." +msgstr "" + +#: ../../whatsnew/3.11.rst:2472 +msgid "``f_valuestack``: removed." +msgstr "" + +#: ../../whatsnew/3.11.rst:2474 +msgid "" +"The Python frame object is now created lazily. A side effect is that the :" +"attr:`~frame.f_back` member must not be accessed directly, since its value " +"is now also computed lazily. The :c:func:`PyFrame_GetBack` function must be " +"called instead." +msgstr "" + +#: ../../whatsnew/3.11.rst:2480 +msgid "" +"Debuggers that accessed the :attr:`~frame.f_locals` directly *must* call :c:" +"func:`PyFrame_GetLocals` instead. They no longer need to call :c:func:`!" +"PyFrame_FastToLocalsWithError` or :c:func:`!PyFrame_LocalsToFast`, in fact " +"they should not call those functions. The necessary updating of the frame is " +"now managed by the virtual machine." +msgstr "" + +#: ../../whatsnew/3.11.rst:2486 +msgid "Code defining ``PyFrame_GetCode()`` on Python 3.8 and older::" +msgstr "" + +#: ../../whatsnew/3.11.rst:2488 +msgid "" +"#if PY_VERSION_HEX < 0x030900B1\n" +"static inline PyCodeObject* PyFrame_GetCode(PyFrameObject *frame)\n" +"{\n" +" Py_INCREF(frame->f_code);\n" +" return frame->f_code;\n" +"}\n" +"#endif" +msgstr "" + +#: ../../whatsnew/3.11.rst:2496 +msgid "Code defining ``PyFrame_GetBack()`` on Python 3.8 and older::" +msgstr "" + +#: ../../whatsnew/3.11.rst:2498 +msgid "" +"#if PY_VERSION_HEX < 0x030900B1\n" +"static inline PyFrameObject* PyFrame_GetBack(PyFrameObject *frame)\n" +"{\n" +" Py_XINCREF(frame->f_back);\n" +" return frame->f_back;\n" +"}\n" +"#endif" +msgstr "" + +#: ../../whatsnew/3.11.rst:2506 +msgid "" +"Or use the `pythoncapi_compat project `__ to get these two functions on older Python versions." +msgstr "" + +#: ../../whatsnew/3.11.rst:2510 +msgid "Changes of the :c:type:`PyThreadState` structure members:" +msgstr "" + +#: ../../whatsnew/3.11.rst:2512 +msgid "" +"``frame``: removed, use :c:func:`PyThreadState_GetFrame` (function added to " +"Python 3.9 by :issue:`40429`). Warning: the function returns a :term:`strong " +"reference`, need to call :c:func:`Py_XDECREF`." +msgstr "" + +#: ../../whatsnew/3.11.rst:2516 +msgid "" +"``tracing``: changed, use :c:func:`PyThreadState_EnterTracing` and :c:func:" +"`PyThreadState_LeaveTracing` (functions added to Python 3.11 by :issue:" +"`43760`)." +msgstr "" + +#: ../../whatsnew/3.11.rst:2519 +msgid "" +"``recursion_depth``: removed, use ``(tstate->recursion_limit - tstate-" +">recursion_remaining)`` instead." +msgstr "" + +#: ../../whatsnew/3.11.rst:2521 +msgid "``stackcheck_counter``: removed." +msgstr "" + +#: ../../whatsnew/3.11.rst:2523 +msgid "Code defining ``PyThreadState_GetFrame()`` on Python 3.8 and older::" +msgstr "" + +#: ../../whatsnew/3.11.rst:2525 +msgid "" +"#if PY_VERSION_HEX < 0x030900B1\n" +"static inline PyFrameObject* PyThreadState_GetFrame(PyThreadState *tstate)\n" +"{\n" +" Py_XINCREF(tstate->frame);\n" +" return tstate->frame;\n" +"}\n" +"#endif" +msgstr "" + +#: ../../whatsnew/3.11.rst:2533 +msgid "" +"Code defining ``PyThreadState_EnterTracing()`` and " +"``PyThreadState_LeaveTracing()`` on Python 3.10 and older::" +msgstr "" + +#: ../../whatsnew/3.11.rst:2536 +msgid "" +"#if PY_VERSION_HEX < 0x030B00A2\n" +"static inline void PyThreadState_EnterTracing(PyThreadState *tstate)\n" +"{\n" +" tstate->tracing++;\n" +"#if PY_VERSION_HEX >= 0x030A00A1\n" +" tstate->cframe->use_tracing = 0;\n" +"#else\n" +" tstate->use_tracing = 0;\n" +"#endif\n" +"}\n" +"\n" +"static inline void PyThreadState_LeaveTracing(PyThreadState *tstate)\n" +"{\n" +" int use_tracing = (tstate->c_tracefunc != NULL || tstate->c_profilefunc !" +"= NULL);\n" +" tstate->tracing--;\n" +"#if PY_VERSION_HEX >= 0x030A00A1\n" +" tstate->cframe->use_tracing = use_tracing;\n" +"#else\n" +" tstate->use_tracing = use_tracing;\n" +"#endif\n" +"}\n" +"#endif" +msgstr "" + +#: ../../whatsnew/3.11.rst:2559 +msgid "" +"Or use `the pythoncapi-compat project `__ to get these functions on old Python functions." +msgstr "" + +#: ../../whatsnew/3.11.rst:2563 +msgid "" +"Distributors are encouraged to build Python with the optimized Blake2 " +"library `libb2`_." +msgstr "" + +#: ../../whatsnew/3.11.rst:2566 +msgid "" +"The :c:member:`PyConfig.module_search_paths_set` field must now be set to 1 " +"for initialization to use :c:member:`PyConfig.module_search_paths` to " +"initialize :data:`sys.path`. Otherwise, initialization will recalculate the " +"path and replace any values added to ``module_search_paths``." +msgstr "" + +#: ../../whatsnew/3.11.rst:2571 +msgid "" +":c:func:`PyConfig_Read` no longer calculates the initial search path, and " +"will not fill any values into :c:member:`PyConfig.module_search_paths`. To " +"calculate default paths and then modify them, finish initialization and use :" +"c:func:`PySys_GetObject` to retrieve :data:`sys.path` as a Python list " +"object and modify it directly." +msgstr "" + +#: ../../whatsnew/3.11.rst:2582 +msgid "" +"Deprecate the following functions to configure the Python initialization:" +msgstr "" + +#: ../../whatsnew/3.11.rst:2584 +msgid ":c:func:`!PySys_AddWarnOptionUnicode`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2585 +msgid ":c:func:`!PySys_AddWarnOption`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2586 +msgid ":c:func:`!PySys_AddXOption`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2587 +msgid ":c:func:`!PySys_HasWarnOptions`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2588 +msgid ":c:func:`!PySys_SetArgvEx`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2589 +msgid ":c:func:`!PySys_SetArgv`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2590 +msgid ":c:func:`!PySys_SetPath`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2591 +msgid ":c:func:`!Py_SetPath`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2592 +msgid ":c:func:`!Py_SetProgramName`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2593 +msgid ":c:func:`!Py_SetPythonHome`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2594 +msgid ":c:func:`!Py_SetStandardStreamEncoding`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2595 +msgid ":c:func:`!_Py_SetProgramFullPath`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2597 +msgid "" +"Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization " +"Configuration ` instead (:pep:`587`). (Contributed by Victor " +"Stinner in :gh:`88279`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2601 +msgid "" +"Deprecate the ``ob_shash`` member of the :c:type:`PyBytesObject`. Use :c:" +"func:`PyObject_Hash` instead. (Contributed by Inada Naoki in :issue:`46864`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2610 +msgid "" +"The following C APIs have been deprecated in earlier Python releases, and " +"will be removed in Python 3.12." +msgstr "" + +#: ../../whatsnew/3.11.rst:2613 +msgid ":c:func:`!PyUnicode_AS_DATA`" +msgstr ":c:func:`!PyUnicode_AS_DATA`" + +#: ../../whatsnew/3.11.rst:2614 +msgid ":c:func:`!PyUnicode_AS_UNICODE`" +msgstr ":c:func:`!PyUnicode_AS_UNICODE`" + +#: ../../whatsnew/3.11.rst:2615 +msgid ":c:func:`!PyUnicode_AsUnicodeAndSize`" +msgstr ":c:func:`!PyUnicode_AsUnicodeAndSize`" + +#: ../../whatsnew/3.11.rst:2616 +msgid ":c:func:`!PyUnicode_AsUnicode`" +msgstr ":c:func:`!PyUnicode_AsUnicode`" + +#: ../../whatsnew/3.11.rst:2617 +msgid ":c:func:`!PyUnicode_FromUnicode`" +msgstr ":c:func:`!PyUnicode_FromUnicode`" + +#: ../../whatsnew/3.11.rst:2618 +msgid ":c:func:`!PyUnicode_GET_DATA_SIZE`" +msgstr ":c:func:`!PyUnicode_GET_DATA_SIZE`" + +#: ../../whatsnew/3.11.rst:2619 +msgid ":c:func:`!PyUnicode_GET_SIZE`" +msgstr ":c:func:`!PyUnicode_GET_SIZE`" + +#: ../../whatsnew/3.11.rst:2620 +msgid ":c:func:`!PyUnicode_GetSize`" +msgstr ":c:func:`!PyUnicode_GetSize`" + +#: ../../whatsnew/3.11.rst:2621 +msgid ":c:func:`!PyUnicode_IS_COMPACT`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2622 +msgid ":c:func:`!PyUnicode_IS_READY`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2623 +msgid ":c:func:`PyUnicode_READY`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2624 +msgid ":c:func:`!PyUnicode_WSTR_LENGTH`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2625 +msgid ":c:func:`!_PyUnicode_AsUnicode`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2626 +msgid ":c:macro:`!PyUnicode_WCHAR_KIND`" +msgstr ":c:macro:`!PyUnicode_WCHAR_KIND`" + +#: ../../whatsnew/3.11.rst:2627 +msgid ":c:type:`PyUnicodeObject`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2628 +msgid ":c:func:`!PyUnicode_InternImmortal`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2636 +msgid "" +":c:func:`!PyFrame_BlockSetup` and :c:func:`!PyFrame_BlockPop` have been " +"removed. (Contributed by Mark Shannon in :issue:`40222`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2640 +msgid "Remove the following math macros using the ``errno`` variable:" +msgstr "" + +#: ../../whatsnew/3.11.rst:2642 +msgid "``Py_ADJUST_ERANGE1()``" +msgstr "" + +#: ../../whatsnew/3.11.rst:2643 +msgid "``Py_ADJUST_ERANGE2()``" +msgstr "" + +#: ../../whatsnew/3.11.rst:2644 +msgid "``Py_OVERFLOWED()``" +msgstr "" + +#: ../../whatsnew/3.11.rst:2645 +msgid "``Py_SET_ERANGE_IF_OVERFLOW()``" +msgstr "" + +#: ../../whatsnew/3.11.rst:2646 +msgid "``Py_SET_ERRNO_ON_MATH_ERROR()``" +msgstr "" + +#: ../../whatsnew/3.11.rst:2648 +msgid "(Contributed by Victor Stinner in :issue:`45412`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2650 +msgid "" +"Remove ``Py_UNICODE_COPY()`` and ``Py_UNICODE_FILL()`` macros, deprecated " +"since Python 3.3. Use ``PyUnicode_CopyCharacters()`` or ``memcpy()`` " +"(``wchar_t*`` string), and ``PyUnicode_Fill()`` functions instead. " +"(Contributed by Victor Stinner in :issue:`41123`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2655 +msgid "" +"Remove the ``pystrhex.h`` header file. It only contains private functions. C " +"extensions should only include the main ```` header file. " +"(Contributed by Victor Stinner in :issue:`45434`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2659 +msgid "" +"Remove the ``Py_FORCE_DOUBLE()`` macro. It was used by the " +"``Py_IS_INFINITY()`` macro. (Contributed by Victor Stinner in :issue:" +"`45440`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2663 +msgid "" +"The following items are no longer available when :c:macro:`Py_LIMITED_API` " +"is defined:" +msgstr "" + +#: ../../whatsnew/3.11.rst:2666 +msgid ":c:func:`PyMarshal_WriteLongToFile`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2667 +msgid ":c:func:`PyMarshal_WriteObjectToFile`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2668 +msgid ":c:func:`PyMarshal_ReadObjectFromString`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2669 +msgid ":c:func:`PyMarshal_WriteObjectToString`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2670 +msgid "the ``Py_MARSHAL_VERSION`` macro" +msgstr "" + +#: ../../whatsnew/3.11.rst:2672 +msgid "These are not part of the :ref:`limited API `." +msgstr "" + +#: ../../whatsnew/3.11.rst:2674 +msgid "(Contributed by Victor Stinner in :issue:`45474`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2676 +msgid "" +"Exclude :c:func:`!PyWeakref_GET_OBJECT` from the limited C API. It never " +"worked since the :c:type:`!PyWeakReference` structure is opaque in the " +"limited C API. (Contributed by Victor Stinner in :issue:`35134`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2681 +msgid "" +"Remove the ``PyHeapType_GET_MEMBERS()`` macro. It was exposed in the public " +"C API by mistake, it must only be used by Python internally. Use the " +"``PyTypeObject.tp_members`` member instead. (Contributed by Victor Stinner " +"in :issue:`40170`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2686 +msgid "" +"Remove the ``HAVE_PY_SET_53BIT_PRECISION`` macro (moved to the internal C " +"API). (Contributed by Victor Stinner in :issue:`45412`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2692 +msgid "" +"Remove the :c:type:`Py_UNICODE` encoder APIs, as they have been deprecated " +"since Python 3.3, are little used and are inefficient relative to the " +"recommended alternatives." +msgstr "" + +#: ../../whatsnew/3.11.rst:2697 +msgid "The removed functions are:" +msgstr "" + +#: ../../whatsnew/3.11.rst:2699 +msgid ":func:`!PyUnicode_Encode`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2700 +msgid ":func:`!PyUnicode_EncodeASCII`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2701 +msgid ":func:`!PyUnicode_EncodeLatin1`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2702 +msgid ":func:`!PyUnicode_EncodeUTF7`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2703 +msgid ":func:`!PyUnicode_EncodeUTF8`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2704 +msgid ":func:`!PyUnicode_EncodeUTF16`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2705 +msgid ":func:`!PyUnicode_EncodeUTF32`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2706 +msgid ":func:`!PyUnicode_EncodeUnicodeEscape`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2707 +msgid ":func:`!PyUnicode_EncodeRawUnicodeEscape`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2708 +msgid ":func:`!PyUnicode_EncodeCharmap`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2709 +msgid ":func:`!PyUnicode_TranslateCharmap`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2710 +msgid ":func:`!PyUnicode_EncodeDecimal`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2711 +msgid ":func:`!PyUnicode_TransformDecimalToASCII`" +msgstr "" + +#: ../../whatsnew/3.11.rst:2713 +msgid "" +"See :pep:`624` for details and :pep:`migration guidance <624#alternative-" +"apis>`. (Contributed by Inada Naoki in :issue:`44029`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2719 +msgid "Notable changes in 3.11.4" +msgstr "" + +#: ../../whatsnew/3.11.rst:2722 +msgid "tarfile" +msgstr "" + +#: ../../whatsnew/3.11.rst:2724 +msgid "" +"The extraction methods in :mod:`tarfile`, and :func:`shutil.unpack_archive`, " +"have a new a *filter* argument that allows limiting tar features than may be " +"surprising or dangerous, such as creating files outside the destination " +"directory. See :ref:`tarfile-extraction-filter` for details. In Python 3.12, " +"use without the *filter* argument will show a :exc:`DeprecationWarning`. In " +"Python 3.14, the default will switch to ``'data'``. (Contributed by Petr " +"Viktorin in :pep:`706`.)" +msgstr "" + +#: ../../whatsnew/3.11.rst:2736 +msgid "Notable changes in 3.11.5" +msgstr "" + +#: ../../whatsnew/3.11.rst:2739 +msgid "OpenSSL" +msgstr "" + +#: ../../whatsnew/3.11.rst:2741 +msgid "" +"Windows builds and macOS installers from python.org now use OpenSSL 3.0." +msgstr "" diff --git a/whatsnew/3.14.po b/whatsnew/3.14.po index 698e288d..a783593a 100644 --- a/whatsnew/3.14.po +++ b/whatsnew/3.14.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -915,7 +915,7 @@ msgstr "" #: ../../whatsnew/3.14.rst:651 msgid "" -"The new :mod:`!compression` package contains modules :mod:`!compression." +"The new :mod:`compression` package contains modules :mod:`!compression." "lzma`, :mod:`!compression.bz2`, :mod:`!compression.gzip` and :mod:`!" "compression.zlib` which re-export the :mod:`lzma`, :mod:`bz2`, :mod:`gzip` " "and :mod:`zlib` modules respectively. The new import names under :mod:`!" @@ -927,7 +927,7 @@ msgstr "" #: ../../whatsnew/3.14.rst:660 msgid "" -"The new :mod:`!compression.zstd` module provides compression and " +"The new :mod:`compression.zstd` module provides compression and " "decompression APIs for the Zstandard format via bindings to `Meta's zstd " "library `__. Zstandard is a widely " "adopted, highly efficient, and fast compression format. In addition to the " @@ -1342,7 +1342,7 @@ msgstr "" msgid "Garbage collection" msgstr "" -#: ../../whatsnew/3.14.rst:962 ../../whatsnew/3.14.rst:2220 +#: ../../whatsnew/3.14.rst:962 ../../whatsnew/3.14.rst:2226 msgid "**From Python 3.14.5 onwards:**" msgstr "" @@ -1359,7 +1359,7 @@ msgid "" "3.14.5 and later." msgstr "" -#: ../../whatsnew/3.14.rst:973 ../../whatsnew/3.14.rst:2229 +#: ../../whatsnew/3.14.rst:973 ../../whatsnew/3.14.rst:2235 msgid "**Previously in Python 3.14.0-3.14.4:**" msgstr "" @@ -1381,17 +1381,17 @@ msgstr "" msgid "The behavior of :func:`!gc.collect` changes slightly:" msgstr "" -#: ../../whatsnew/3.14.rst:987 ../../whatsnew/3.14.rst:3304 +#: ../../whatsnew/3.14.rst:987 ../../whatsnew/3.14.rst:3310 msgid "" "``gc.collect(1)``: Performs an increment of garbage collection, rather than " "collecting generation 1." msgstr "" -#: ../../whatsnew/3.14.rst:989 ../../whatsnew/3.14.rst:3306 +#: ../../whatsnew/3.14.rst:989 ../../whatsnew/3.14.rst:3312 msgid "Other calls to :func:`!gc.collect` are unchanged." msgstr "" -#: ../../whatsnew/3.14.rst:991 ../../whatsnew/3.14.rst:2260 +#: ../../whatsnew/3.14.rst:991 ../../whatsnew/3.14.rst:2266 msgid "(Contributed by Mark Shannon in :gh:`108362`.)" msgstr "" @@ -1471,7 +1471,7 @@ msgstr "" msgid "Improved modules" msgstr "" -#: ../../whatsnew/3.14.rst:1054 ../../whatsnew/3.14.rst:2334 +#: ../../whatsnew/3.14.rst:1054 ../../whatsnew/3.14.rst:2340 msgid "argparse" msgstr "" @@ -1499,7 +1499,7 @@ msgid "" "by Hugo van Kemenade in :gh:`130645`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1074 ../../whatsnew/3.14.rst:2353 +#: ../../whatsnew/3.14.rst:1074 ../../whatsnew/3.14.rst:2359 msgid "ast" msgstr "" @@ -1542,8 +1542,8 @@ msgid "" "`133367`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1100 ../../whatsnew/3.14.rst:2175 -#: ../../whatsnew/3.14.rst:2384 +#: ../../whatsnew/3.14.rst:1100 ../../whatsnew/3.14.rst:2181 +#: ../../whatsnew/3.14.rst:2390 msgid "asyncio" msgstr "asyncio" @@ -1800,7 +1800,7 @@ msgid "" "(Contributed by Sergey B Kirpichev in :gh:`53032`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1293 ../../whatsnew/3.14.rst:2211 +#: ../../whatsnew/3.14.rst:1293 ../../whatsnew/3.14.rst:2217 msgid "difflib" msgstr "" @@ -2074,7 +2074,7 @@ msgid "" "term:`package` or not. (Contributed by Zhikang Yan in :gh:`125634`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1472 ../../whatsnew/3.14.rst:2264 +#: ../../whatsnew/3.14.rst:1472 ../../whatsnew/3.14.rst:2270 msgid "io" msgstr "" @@ -2469,8 +2469,8 @@ msgid "" "`2025-4517`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1690 ../../whatsnew/3.14.rst:2273 -#: ../../whatsnew/3.14.rst:2534 +#: ../../whatsnew/3.14.rst:1690 ../../whatsnew/3.14.rst:2279 +#: ../../whatsnew/3.14.rst:2540 msgid "pathlib" msgstr "pathlib" @@ -2512,7 +2512,7 @@ msgid "" "directory. (Contributed by Barney Gale in :gh:`125413`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1712 ../../whatsnew/3.14.rst:2281 +#: ../../whatsnew/3.14.rst:1712 ../../whatsnew/3.14.rst:2287 msgid "pdb" msgstr "pdb" @@ -2827,35 +2827,44 @@ msgid "" "event:`!BRANCH` event. (Contributed by Mark Shannon in :gh:`122548`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1911 +#: ../../whatsnew/3.14.rst:1909 +msgid "" +"Add :func:`sys.monitoring.clear_tool_id` to unregister all events and " +"callback functions associated with a tool identifier. :func:`sys.monitoring." +"free_tool_id` now calls it before releasing the tool identifier, instead of " +"leaving its events and callbacks registered. (Contributed by Tian Gao in :gh:" +"`116750`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1917 msgid "sysconfig" msgstr "" -#: ../../whatsnew/3.14.rst:1913 +#: ../../whatsnew/3.14.rst:1919 msgid "" "Add ``ABIFLAGS`` key to :func:`~sysconfig.get_config_vars` on Windows. " "(Contributed by Xuehai Pan in :gh:`131799`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1918 +#: ../../whatsnew/3.14.rst:1924 msgid "tarfile" msgstr "" -#: ../../whatsnew/3.14.rst:1920 +#: ../../whatsnew/3.14.rst:1926 msgid "" ":func:`~tarfile.data_filter` now normalizes symbolic link targets in order " "to avoid path traversal attacks. (Contributed by Petr Viktorin in :gh:" "`127987` and :cve:`2025-4138`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1924 +#: ../../whatsnew/3.14.rst:1930 msgid "" ":func:`~tarfile.TarFile.extractall` now skips fixing up directory attributes " "when a directory was removed or replaced by another kind of file. " "(Contributed by Petr Viktorin in :gh:`127987` and :cve:`2024-12718`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1928 +#: ../../whatsnew/3.14.rst:1934 msgid "" ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` now " "(re-)apply the extraction filter when substituting a link (hard or symbolic) " @@ -2865,7 +2874,7 @@ msgid "" "cve:`2024-12718`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1935 +#: ../../whatsnew/3.14.rst:1941 msgid "" ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` no " "longer extract rejected members when :func:`~tarfile.TarFile.errorlevel` is " @@ -2873,59 +2882,59 @@ msgid "" "cve:`2025-4435`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1943 +#: ../../whatsnew/3.14.rst:1949 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.14.rst:1945 +#: ../../whatsnew/3.14.rst:1951 msgid "" ":meth:`threading.Thread.start` now sets the operating system thread name to :" "attr:`threading.Thread.name`. (Contributed by Victor Stinner in :gh:`59705`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1951 +#: ../../whatsnew/3.14.rst:1957 msgid "tkinter" msgstr "tkinter" -#: ../../whatsnew/3.14.rst:1953 +#: ../../whatsnew/3.14.rst:1959 msgid "" "Make :mod:`tkinter` widget methods :meth:`!after` and :meth:`!after_idle` " "accept keyword arguments. (Contributed by Zhikang Yan in :gh:`126899`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1957 +#: ../../whatsnew/3.14.rst:1963 msgid "" "Add ability to specify a name for :class:`!tkinter.OptionMenu` and :class:`!" "tkinter.ttk.OptionMenu`. (Contributed by Zhikang Yan in :gh:`130482`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1963 +#: ../../whatsnew/3.14.rst:1969 msgid "turtle" msgstr "" -#: ../../whatsnew/3.14.rst:1965 +#: ../../whatsnew/3.14.rst:1971 msgid "" "Add context managers for :func:`turtle.fill`, :func:`turtle.poly`, and :func:" "`turtle.no_animation`. (Contributed by Marie Roald and Yngve Mardal Moe in :" "gh:`126350`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1971 +#: ../../whatsnew/3.14.rst:1977 msgid "types" msgstr "types" -#: ../../whatsnew/3.14.rst:1973 +#: ../../whatsnew/3.14.rst:1979 msgid "" ":class:`types.UnionType` is now an alias for :class:`typing.Union`. See :ref:" "`below ` for more details. (Contributed by Jelle " "Zijlstra in :gh:`105499`.)" msgstr "" -#: ../../whatsnew/3.14.rst:1979 +#: ../../whatsnew/3.14.rst:1985 msgid "typing" msgstr "typing" -#: ../../whatsnew/3.14.rst:1983 +#: ../../whatsnew/3.14.rst:1989 msgid "" "The :class:`types.UnionType` and :class:`typing.Union` types are now aliases " "for each other, meaning that both old-style unions (created with " @@ -2935,14 +2944,14 @@ msgid "" "users who introspect types at runtime:" msgstr "" -#: ../../whatsnew/3.14.rst:1990 +#: ../../whatsnew/3.14.rst:1996 msgid "" "Both syntaxes for creating a union now produce the same string " "representation in :func:`repr`. For example, ``repr(Union[int, str])`` is " "now ``\"int | str\"`` instead of ``\"typing.Union[int, str]\"``." msgstr "" -#: ../../whatsnew/3.14.rst:1995 +#: ../../whatsnew/3.14.rst:2001 msgid "" "Unions created using the old syntax are no longer cached. Previously, " "running ``Union[int, str]`` multiple times would return the same object " @@ -2959,7 +2968,7 @@ msgid "" "memory usage for most users." msgstr "" -#: ../../whatsnew/3.14.rst:2011 +#: ../../whatsnew/3.14.rst:2017 msgid "" "Previously, old-style unions were implemented using the private class " "``typing._UnionGenericAlias``. This class is no longer needed for the " @@ -2969,80 +2978,80 @@ msgid "" "of relying on private implementation details." msgstr "" -#: ../../whatsnew/3.14.rst:2020 +#: ../../whatsnew/3.14.rst:2026 msgid "" "It is now possible to use :class:`typing.Union` itself in :func:`isinstance` " "checks. For example, ``isinstance(int | str, typing.Union)`` will return " "``True``; previously this raised :exc:`TypeError`." msgstr "" -#: ../../whatsnew/3.14.rst:2025 +#: ../../whatsnew/3.14.rst:2031 msgid "" "The :attr:`!__args__` attribute of :class:`typing.Union` objects is no " "longer writable." msgstr "" -#: ../../whatsnew/3.14.rst:2028 +#: ../../whatsnew/3.14.rst:2034 msgid "" "It is no longer possible to set any attributes on :class:`~typing.Union` " "objects. This only ever worked for dunder attributes on previous versions, " "was never documented to work, and was subtly broken in many cases." msgstr "" -#: ../../whatsnew/3.14.rst:2033 +#: ../../whatsnew/3.14.rst:2039 msgid "(Contributed by Jelle Zijlstra in :gh:`105499`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2035 +#: ../../whatsnew/3.14.rst:2041 msgid ":class:`~typing.TypeAliasType` now supports star unpacking." msgstr "" -#: ../../whatsnew/3.14.rst:2039 +#: ../../whatsnew/3.14.rst:2045 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.14.rst:2041 +#: ../../whatsnew/3.14.rst:2047 msgid "The Unicode database has been updated to Unicode 16.0.0." msgstr "" -#: ../../whatsnew/3.14.rst:2045 +#: ../../whatsnew/3.14.rst:2051 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.14.rst:2049 +#: ../../whatsnew/3.14.rst:2055 msgid "" ":mod:`unittest` output is now colored by default. This can be controlled by :" "ref:`environment variables `. (Contributed by " "Hugo van Kemenade in :gh:`127221`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2054 +#: ../../whatsnew/3.14.rst:2060 msgid "" "unittest discovery supports :term:`namespace package` as start directory " "again. It was removed in Python 3.11. (Contributed by Jacob Walls in :gh:" "`80958`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2058 +#: ../../whatsnew/3.14.rst:2064 msgid "" "A number of new methods were added in the :class:`~unittest.TestCase` class " "that provide more specialized tests." msgstr "" -#: ../../whatsnew/3.14.rst:2061 +#: ../../whatsnew/3.14.rst:2067 msgid "" ":meth:`~unittest.TestCase.assertHasAttr` and :meth:`~unittest.TestCase." "assertNotHasAttr` check whether the object has a particular attribute." msgstr "" -#: ../../whatsnew/3.14.rst:2064 +#: ../../whatsnew/3.14.rst:2070 msgid "" ":meth:`~unittest.TestCase.assertIsSubclass` and :meth:`~unittest.TestCase." "assertNotIsSubclass` check whether the object is a subclass of a particular " "class, or of one of a tuple of classes." msgstr "" -#: ../../whatsnew/3.14.rst:2067 +#: ../../whatsnew/3.14.rst:2073 msgid "" ":meth:`~unittest.TestCase.assertStartsWith`, :meth:`~unittest.TestCase." "assertNotStartsWith`, :meth:`~unittest.TestCase.assertEndsWith` and :meth:" @@ -3050,129 +3059,129 @@ msgid "" "string starts or ends with particular strings." msgstr "" -#: ../../whatsnew/3.14.rst:2073 +#: ../../whatsnew/3.14.rst:2079 msgid "(Contributed by Serhiy Storchaka in :gh:`71339`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2077 ../../whatsnew/3.14.rst:2580 +#: ../../whatsnew/3.14.rst:2083 ../../whatsnew/3.14.rst:2586 msgid "urllib" msgstr "" -#: ../../whatsnew/3.14.rst:2079 +#: ../../whatsnew/3.14.rst:2085 msgid "" "Upgrade HTTP digest authentication algorithm for :mod:`urllib.request` by " "supporting SHA-256 digest authentication as specified in :rfc:`7616`. " "(Contributed by Calvin Bui in :gh:`128193`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2083 +#: ../../whatsnew/3.14.rst:2089 msgid "" "Improve ergonomics and standards compliance when parsing and emitting ``file:" "`` URLs." msgstr "" -#: ../../whatsnew/3.14.rst:2086 +#: ../../whatsnew/3.14.rst:2092 msgid "In :func:`~urllib.request.url2pathname`:" msgstr "" -#: ../../whatsnew/3.14.rst:2088 +#: ../../whatsnew/3.14.rst:2094 msgid "" "Accept a complete URL when the new *require_scheme* argument is set to true." msgstr "" -#: ../../whatsnew/3.14.rst:2090 +#: ../../whatsnew/3.14.rst:2096 msgid "Discard URL authority if it matches the local hostname." msgstr "" -#: ../../whatsnew/3.14.rst:2091 +#: ../../whatsnew/3.14.rst:2097 msgid "" "Discard URL authority if it resolves to a local IP address when the new " "*resolve_host* argument is set to true." msgstr "" -#: ../../whatsnew/3.14.rst:2093 +#: ../../whatsnew/3.14.rst:2099 msgid "Discard URL query and fragment components." msgstr "" -#: ../../whatsnew/3.14.rst:2094 +#: ../../whatsnew/3.14.rst:2100 msgid "" "Raise :exc:`~urllib.error.URLError` if a URL authority isn't local, except " "on Windows where we return a UNC path as before." msgstr "" -#: ../../whatsnew/3.14.rst:2097 +#: ../../whatsnew/3.14.rst:2103 msgid "In :func:`~urllib.request.pathname2url`:" msgstr "" -#: ../../whatsnew/3.14.rst:2099 +#: ../../whatsnew/3.14.rst:2105 msgid "" "Return a complete URL when the new *add_scheme* argument is set to true." msgstr "" -#: ../../whatsnew/3.14.rst:2100 +#: ../../whatsnew/3.14.rst:2106 msgid "" "Include an empty URL authority when a path begins with a slash. For example, " "the path ``/etc/hosts`` is converted to the URL ``///etc/hosts``." msgstr "" -#: ../../whatsnew/3.14.rst:2103 +#: ../../whatsnew/3.14.rst:2109 msgid "" "On Windows, drive letters are no longer converted to uppercase, and ``:`` " "characters not following a drive letter no longer cause an :exc:`OSError` " "exception to be raised." msgstr "" -#: ../../whatsnew/3.14.rst:2107 +#: ../../whatsnew/3.14.rst:2113 msgid "(Contributed by Barney Gale in :gh:`125866`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2111 ../../whatsnew/3.14.rst:2302 +#: ../../whatsnew/3.14.rst:2117 ../../whatsnew/3.14.rst:2308 msgid "uuid" msgstr "uuid" -#: ../../whatsnew/3.14.rst:2113 +#: ../../whatsnew/3.14.rst:2119 msgid "" "Add support for UUID versions 6, 7, and 8 via :func:`~uuid.uuid6`, :func:" "`~uuid.uuid7`, and :func:`~uuid.uuid8` respectively, as specified in :rfc:" "`9562`. (Contributed by Bénédikt Tran in :gh:`89083`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2118 +#: ../../whatsnew/3.14.rst:2124 msgid "" ":const:`~uuid.NIL` and :const:`~uuid.MAX` are now available to represent the " "Nil and Max UUID formats as defined by :rfc:`9562`. (Contributed by Nick " "Pope in :gh:`128427`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2122 +#: ../../whatsnew/3.14.rst:2128 msgid "" "Allow generating multiple UUIDs simultaneously on the command-line via :" "option:`python -m uuid --count `. (Contributed by Simon Legner " "in :gh:`131236`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2128 +#: ../../whatsnew/3.14.rst:2134 msgid "webbrowser" msgstr "" -#: ../../whatsnew/3.14.rst:2130 +#: ../../whatsnew/3.14.rst:2136 msgid "" "Names in the :envvar:`BROWSER` environment variable can now refer to already " "registered browsers for the :mod:`webbrowser` module, instead of always " "generating a new browser command." msgstr "" -#: ../../whatsnew/3.14.rst:2134 +#: ../../whatsnew/3.14.rst:2140 msgid "" "This makes it possible to set :envvar:`BROWSER` to the value of one of the " "supported browsers on macOS." msgstr "" -#: ../../whatsnew/3.14.rst:2139 +#: ../../whatsnew/3.14.rst:2145 msgid "zipfile" msgstr "" -#: ../../whatsnew/3.14.rst:2141 +#: ../../whatsnew/3.14.rst:2147 msgid "" "Added :meth:`ZipInfo._for_archive `, a method " "to resolve suitable defaults for a :class:`~zipfile.ZipInfo` object as used " @@ -3180,18 +3189,18 @@ msgid "" "Bénédikt Tran in :gh:`123424`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2146 +#: ../../whatsnew/3.14.rst:2152 msgid "" ":meth:`.ZipFile.writestr` now respects the :envvar:`SOURCE_DATE_EPOCH` " "environment variable in order to better support reproducible builds. " "(Contributed by Jiahao Li in :gh:`91279`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2155 +#: ../../whatsnew/3.14.rst:2161 msgid "Optimizations" msgstr "Optimierungen" -#: ../../whatsnew/3.14.rst:2157 +#: ../../whatsnew/3.14.rst:2163 msgid "" "The import time for several standard library modules has been improved, " "including :mod:`annotationlib`, :mod:`ast`, :mod:`asyncio`, :mod:`base64`, :" @@ -3202,13 +3211,13 @@ msgid "" "`zipfile`." msgstr "" -#: ../../whatsnew/3.14.rst:2164 +#: ../../whatsnew/3.14.rst:2170 msgid "" "(Contributed by Adam Turner, Bénédikt Tran, Chris Markiewicz, Eli Schwartz, " "Hugo van Kemenade, Jelle Zijlstra, and others in :gh:`118761`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2167 +#: ../../whatsnew/3.14.rst:2173 msgid "" "The interpreter now avoids some reference count modifications internally " "when it's safe to do so. This can lead to different values being returned " @@ -3216,7 +3225,7 @@ msgid "" "versions of Python. See :ref:`below ` for details." msgstr "" -#: ../../whatsnew/3.14.rst:2177 +#: ../../whatsnew/3.14.rst:2183 msgid "" "Standard benchmark results have improved by 10-20% following the " "implementation of a new per-thread doubly linked list for :class:`native " @@ -3226,7 +3235,7 @@ msgid "" "running in all threads. (Contributed by Kumar Aditya in :gh:`107803`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2186 +#: ../../whatsnew/3.14.rst:2192 msgid "" "The module now has first class support for :term:`free-threading builds " "`. This enables parallel execution of multiple event loops " @@ -3234,38 +3243,38 @@ msgid "" "(Contributed by Kumar Aditya in :gh:`128002`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2194 +#: ../../whatsnew/3.14.rst:2200 msgid "base64" msgstr "" -#: ../../whatsnew/3.14.rst:2196 +#: ../../whatsnew/3.14.rst:2202 msgid "" ":func:`~base64.b16decode` is now up to six times faster. (Contributed by " "Bénédikt Tran, Chris Markiewicz, and Adam Turner in :gh:`118761`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2202 +#: ../../whatsnew/3.14.rst:2208 msgid "bdb" msgstr "" -#: ../../whatsnew/3.14.rst:2204 +#: ../../whatsnew/3.14.rst:2210 msgid "" "The basic debugger now has a :mod:`sys.monitoring`-based backend, which can " "be selected via the passing ``'monitoring'`` to the :class:`~bdb.Bdb` " "class's new *backend* parameter. (Contributed by Tian Gao in :gh:`124533`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2213 +#: ../../whatsnew/3.14.rst:2219 msgid "" "The :func:`~difflib.IS_LINE_JUNK` function is now up to twice as fast. " "(Contributed by Adam Turner and Semyon Moroz in :gh:`130167`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2218 ../../whatsnew/3.14.rst:3491 +#: ../../whatsnew/3.14.rst:2224 ../../whatsnew/3.14.rst:3497 msgid "gc" msgstr "" -#: ../../whatsnew/3.14.rst:2222 +#: ../../whatsnew/3.14.rst:2228 msgid "" "Python 3.14.0-3.14.4 shipped with a new incremental garbage collector. " "However, due to a number of `reports ` " "means that maximum pause times are reduced by an order of magnitude or more " "for larger heaps." msgstr "" -#: ../../whatsnew/3.14.rst:2235 +#: ../../whatsnew/3.14.rst:2241 msgid "" "Because of this optimization, the meaning of the results of :meth:`~gc." "get_threshold` and :meth:`~gc.set_threshold` have changed, along with :meth:" "`~gc.get_count` and :meth:`~gc.get_stats`." msgstr "" -#: ../../whatsnew/3.14.rst:2239 +#: ../../whatsnew/3.14.rst:2245 msgid "" "For backwards compatibility, :meth:`~gc.get_threshold` continues to return a " "three-item tuple. The first value is the threshold for young collections, as " @@ -3298,11 +3307,11 @@ msgid "" "zero." msgstr "" -#: ../../whatsnew/3.14.rst:2247 +#: ../../whatsnew/3.14.rst:2253 msgid ":meth:`~gc.set_threshold` now ignores any items after the second." msgstr "" -#: ../../whatsnew/3.14.rst:2249 +#: ../../whatsnew/3.14.rst:2255 msgid "" ":meth:`~gc.get_count` and :meth:`~gc.get_stats` continue to return the same " "format of results. The only difference is that instead of the results " @@ -3310,28 +3319,28 @@ msgid "" "young generation and the aging and collecting spaces of the old generation." msgstr "" -#: ../../whatsnew/3.14.rst:2256 +#: ../../whatsnew/3.14.rst:2262 msgid "" "In summary, code that attempted to manipulate the behavior of the cycle GC " "may not work exactly as intended, but it is very unlikely to be harmful. All " "other code will work just fine." msgstr "" -#: ../../whatsnew/3.14.rst:2266 +#: ../../whatsnew/3.14.rst:2272 msgid "" "Opening and reading files now executes fewer system calls. Reading a small " "operating system cached file in full is up to 15% faster. (Contributed by " "Cody Maloney and Victor Stinner in :gh:`120754` and :gh:`90102`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2275 +#: ../../whatsnew/3.14.rst:2281 msgid "" ":func:`Path.read_bytes ` now uses unbuffered mode " "to open files, which is between 9% and 17% faster to read in full. " "(Contributed by Cody Maloney in :gh:`120754`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2283 +#: ../../whatsnew/3.14.rst:2289 msgid "" ":mod:`pdb` now supports two backends, based on either :func:`sys.settrace` " "or :mod:`sys.monitoring`. Using the :ref:`pdb CLI ` or :func:" @@ -3341,11 +3350,11 @@ msgid "" "Tian Gao in :gh:`124533`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2293 +#: ../../whatsnew/3.14.rst:2299 msgid "textwrap" msgstr "" -#: ../../whatsnew/3.14.rst:2295 +#: ../../whatsnew/3.14.rst:2301 msgid "" "Optimize the :func:`~textwrap.dedent` function, improving performance by an " "average of 2.4x, with larger improvements for bigger inputs, and fix a bug " @@ -3353,24 +3362,24 @@ msgid "" "other than space and tab." msgstr "" -#: ../../whatsnew/3.14.rst:2304 +#: ../../whatsnew/3.14.rst:2310 msgid "" ":func:`~uuid.uuid3` and :func:`~uuid.uuid5` are now both roughly 40% faster " "for 16-byte names and 20% faster for 1024-byte names. Performance for longer " "names remains unchanged. (Contributed by Bénédikt Tran in :gh:`128150`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2309 +#: ../../whatsnew/3.14.rst:2315 msgid "" ":func:`~uuid.uuid4` is now c. 30% faster. (Contributed by Bénédikt Tran in :" "gh:`128150`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2314 +#: ../../whatsnew/3.14.rst:2320 msgid "zlib" msgstr "" -#: ../../whatsnew/3.14.rst:2316 +#: ../../whatsnew/3.14.rst:2322 msgid "" "On Windows, `zlib-ng `__ is now used as " "the implementation of the :mod:`zlib` module in the default binaries. There " @@ -3379,29 +3388,29 @@ msgid "" "compression levels." msgstr "" -#: ../../whatsnew/3.14.rst:2323 +#: ../../whatsnew/3.14.rst:2329 msgid "" "It is worth noting that ``zlib.Z_BEST_SPEED`` (``1``) may result in " "significantly less compression than the previous implementation, whilst also " "significantly reducing the time taken to compress." msgstr "" -#: ../../whatsnew/3.14.rst:2327 +#: ../../whatsnew/3.14.rst:2333 msgid "(Contributed by Steve Dower in :gh:`91349`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2331 +#: ../../whatsnew/3.14.rst:2337 msgid "Removed" msgstr "Entfernt" -#: ../../whatsnew/3.14.rst:2336 +#: ../../whatsnew/3.14.rst:2342 msgid "" "Remove the *type*, *choices*, and *metavar* parameters of :class:`!" "BooleanOptionalAction`. These have been deprecated since Python 3.12. " "(Contributed by Nikita Sobolev in :gh:`118805`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2341 +#: ../../whatsnew/3.14.rst:2347 msgid "" "Calling :meth:`~argparse.ArgumentParser.add_argument_group` on an argument " "group now raises a :exc:`ValueError`. Similarly, :meth:`~argparse." @@ -3413,34 +3422,34 @@ msgid "" "Savannah Ostrowski in :gh:`127186`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2355 +#: ../../whatsnew/3.14.rst:2361 msgid "" "Remove the following classes, which have been deprecated aliases of :class:" "`~ast.Constant` since Python 3.8 and have emitted deprecation warnings since " "Python 3.12:" msgstr "" -#: ../../whatsnew/3.14.rst:2359 +#: ../../whatsnew/3.14.rst:2365 msgid ":class:`!Bytes`" msgstr "" -#: ../../whatsnew/3.14.rst:2360 +#: ../../whatsnew/3.14.rst:2366 msgid ":class:`!Ellipsis`" msgstr "" -#: ../../whatsnew/3.14.rst:2361 +#: ../../whatsnew/3.14.rst:2367 msgid ":class:`!NameConstant`" msgstr "" -#: ../../whatsnew/3.14.rst:2362 +#: ../../whatsnew/3.14.rst:2368 msgid ":class:`!Num`" msgstr "" -#: ../../whatsnew/3.14.rst:2363 +#: ../../whatsnew/3.14.rst:2369 msgid ":class:`!Str`" msgstr "" -#: ../../whatsnew/3.14.rst:2365 +#: ../../whatsnew/3.14.rst:2371 msgid "" "As a consequence of these removals, user-defined ``visit_Num``, " "``visit_Str``, ``visit_Bytes``, ``visit_NameConstant`` and " @@ -3449,106 +3458,106 @@ msgid "" "an AST. Define a ``visit_Constant`` method instead." msgstr "" -#: ../../whatsnew/3.14.rst:2371 +#: ../../whatsnew/3.14.rst:2377 msgid "(Contributed by Alex Waygood in :gh:`119562`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2373 +#: ../../whatsnew/3.14.rst:2379 msgid "" "Remove the following deprecated properties on :class:`ast.Constant`, which " "were present for compatibility with the now-removed AST classes:" msgstr "" -#: ../../whatsnew/3.14.rst:2376 +#: ../../whatsnew/3.14.rst:2382 msgid ":attr:`!Constant.n`" msgstr "" -#: ../../whatsnew/3.14.rst:2377 +#: ../../whatsnew/3.14.rst:2383 msgid ":attr:`!Constant.s`" msgstr "" -#: ../../whatsnew/3.14.rst:2379 +#: ../../whatsnew/3.14.rst:2385 msgid "" "Use :attr:`!Constant.value` instead. (Contributed by Alex Waygood in :gh:" "`119562`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2386 +#: ../../whatsnew/3.14.rst:2392 msgid "" "Remove the following classes, methods, and functions, which have been " "deprecated since Python 3.12:" msgstr "" -#: ../../whatsnew/3.14.rst:2389 +#: ../../whatsnew/3.14.rst:2395 msgid ":class:`!AbstractChildWatcher`" msgstr "" -#: ../../whatsnew/3.14.rst:2390 +#: ../../whatsnew/3.14.rst:2396 msgid ":class:`!FastChildWatcher`" msgstr "" -#: ../../whatsnew/3.14.rst:2391 +#: ../../whatsnew/3.14.rst:2397 msgid ":class:`!MultiLoopChildWatcher`" msgstr "" -#: ../../whatsnew/3.14.rst:2392 +#: ../../whatsnew/3.14.rst:2398 msgid ":class:`!PidfdChildWatcher`" msgstr "" -#: ../../whatsnew/3.14.rst:2393 +#: ../../whatsnew/3.14.rst:2399 msgid ":class:`!SafeChildWatcher`" msgstr "" -#: ../../whatsnew/3.14.rst:2394 +#: ../../whatsnew/3.14.rst:2400 msgid ":class:`!ThreadedChildWatcher`" msgstr "" -#: ../../whatsnew/3.14.rst:2395 +#: ../../whatsnew/3.14.rst:2401 msgid ":meth:`!AbstractEventLoopPolicy.get_child_watcher`" msgstr "" -#: ../../whatsnew/3.14.rst:2396 +#: ../../whatsnew/3.14.rst:2402 msgid ":meth:`!AbstractEventLoopPolicy.set_child_watcher`" msgstr "" -#: ../../whatsnew/3.14.rst:2397 +#: ../../whatsnew/3.14.rst:2403 msgid ":func:`!get_child_watcher`" msgstr "" -#: ../../whatsnew/3.14.rst:2398 +#: ../../whatsnew/3.14.rst:2404 msgid ":func:`!set_child_watcher`" msgstr "" -#: ../../whatsnew/3.14.rst:2400 +#: ../../whatsnew/3.14.rst:2406 msgid "(Contributed by Kumar Aditya in :gh:`120804`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2402 +#: ../../whatsnew/3.14.rst:2408 msgid "" ":func:`asyncio.get_event_loop` now raises a :exc:`RuntimeError` if there is " "no current event loop, and no longer implicitly creates an event loop." msgstr "" -#: ../../whatsnew/3.14.rst:2406 +#: ../../whatsnew/3.14.rst:2412 msgid "(Contributed by Kumar Aditya in :gh:`126353`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2411 +#: ../../whatsnew/3.14.rst:2417 msgid "" "There's a few patterns that use :func:`asyncio.get_event_loop`, most of them " "can be replaced with :func:`asyncio.run`." msgstr "" -#: ../../whatsnew/3.14.rst:2414 +#: ../../whatsnew/3.14.rst:2420 msgid "If you're running an async function, simply use :func:`asyncio.run`." msgstr "" -#: ../../whatsnew/3.14.rst:2416 ../../whatsnew/3.14.rst:2443 -#: ../../whatsnew/3.14.rst:2471 +#: ../../whatsnew/3.14.rst:2422 ../../whatsnew/3.14.rst:2449 +#: ../../whatsnew/3.14.rst:2477 msgid "Before:" msgstr "" -#: ../../whatsnew/3.14.rst:2418 +#: ../../whatsnew/3.14.rst:2424 msgid "" "async def main():\n" " ...\n" @@ -3561,12 +3570,12 @@ msgid "" " loop.close()" msgstr "" -#: ../../whatsnew/3.14.rst:2430 ../../whatsnew/3.14.rst:2456 -#: ../../whatsnew/3.14.rst:2487 +#: ../../whatsnew/3.14.rst:2436 ../../whatsnew/3.14.rst:2462 +#: ../../whatsnew/3.14.rst:2493 msgid "After:" msgstr "" -#: ../../whatsnew/3.14.rst:2432 +#: ../../whatsnew/3.14.rst:2438 msgid "" "async def main():\n" " ...\n" @@ -3574,13 +3583,13 @@ msgid "" "asyncio.run(main())" msgstr "" -#: ../../whatsnew/3.14.rst:2439 +#: ../../whatsnew/3.14.rst:2445 msgid "" "If you need to start something, for example, a server listening on a socket " "and then run forever, use :func:`asyncio.run` and an :class:`asyncio.Event`." msgstr "" -#: ../../whatsnew/3.14.rst:2445 +#: ../../whatsnew/3.14.rst:2451 msgid "" "def start_server(loop): ...\n" "\n" @@ -3592,7 +3601,7 @@ msgid "" " loop.close()" msgstr "" -#: ../../whatsnew/3.14.rst:2458 +#: ../../whatsnew/3.14.rst:2464 msgid "" "def start_server(loop): ...\n" "\n" @@ -3603,13 +3612,13 @@ msgid "" "asyncio.run(main())" msgstr "" -#: ../../whatsnew/3.14.rst:2468 +#: ../../whatsnew/3.14.rst:2474 msgid "" "If you need to run something in an event loop, then run some blocking code " "around it, use :class:`asyncio.Runner`." msgstr "" -#: ../../whatsnew/3.14.rst:2473 +#: ../../whatsnew/3.14.rst:2479 msgid "" "async def operation_one(): ...\n" "def blocking_code(): ...\n" @@ -3624,7 +3633,7 @@ msgid "" " loop.close()" msgstr "" -#: ../../whatsnew/3.14.rst:2489 +#: ../../whatsnew/3.14.rst:2495 msgid "" "async def operation_one(): ...\n" "def blocking_code(): ...\n" @@ -3636,66 +3645,66 @@ msgid "" " runner.run(operation_two())" msgstr "" -#: ../../whatsnew/3.14.rst:2502 +#: ../../whatsnew/3.14.rst:2508 msgid "email" msgstr "" -#: ../../whatsnew/3.14.rst:2504 +#: ../../whatsnew/3.14.rst:2510 msgid "" "Remove :func:`email.utils.localtime`'s *isdst* parameter, which was " "deprecated in and has been ignored since Python 3.12. (Contributed by Hugo " "van Kemenade in :gh:`118798`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2510 +#: ../../whatsnew/3.14.rst:2516 msgid "importlib.abc" msgstr "" -#: ../../whatsnew/3.14.rst:2512 +#: ../../whatsnew/3.14.rst:2518 msgid "Remove deprecated :mod:`importlib.abc` classes:" msgstr "" -#: ../../whatsnew/3.14.rst:2514 +#: ../../whatsnew/3.14.rst:2520 msgid "" ":class:`!ResourceReader` (use :class:`~importlib.resources.abc." "TraversableResources`)" msgstr "" -#: ../../whatsnew/3.14.rst:2516 +#: ../../whatsnew/3.14.rst:2522 msgid "" ":class:`!Traversable` (use :class:`~importlib.resources.abc.Traversable`)" msgstr "" -#: ../../whatsnew/3.14.rst:2518 +#: ../../whatsnew/3.14.rst:2524 msgid "" ":class:`!TraversableResources` (use :class:`~importlib.resources.abc." "TraversableResources`)" msgstr "" -#: ../../whatsnew/3.14.rst:2521 +#: ../../whatsnew/3.14.rst:2527 msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)" msgstr "" "(Beigetragen von Jason R. Coombs und Hugo van Kemenade in :gh:`93963`.)" -#: ../../whatsnew/3.14.rst:2525 +#: ../../whatsnew/3.14.rst:2531 msgid "itertools" msgstr "itertools" -#: ../../whatsnew/3.14.rst:2527 +#: ../../whatsnew/3.14.rst:2533 msgid "" "Remove support for copy, deepcopy, and pickle operations from :mod:" "`itertools` iterators. These have emitted a :exc:`DeprecationWarning` since " "Python 3.12. (Contributed by Raymond Hettinger in :gh:`101588`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2536 +#: ../../whatsnew/3.14.rst:2542 msgid "" "Remove support for passing additional keyword arguments to :class:`~pathlib." "Path`. In previous versions, any such arguments are ignored. (Contributed by " "Barney Gale in :gh:`74033`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2541 +#: ../../whatsnew/3.14.rst:2547 msgid "" "Remove support for passing additional positional arguments to :meth:`." "PurePath.relative_to` and :meth:`~pathlib.PurePath.is_relative_to`. In " @@ -3703,33 +3712,33 @@ msgid "" "by Barney Gale in :gh:`78707`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2548 +#: ../../whatsnew/3.14.rst:2554 msgid "pkgutil" msgstr "" -#: ../../whatsnew/3.14.rst:2550 +#: ../../whatsnew/3.14.rst:2556 msgid "" "Remove the :func:`!get_loader` and :func:`!find_loader` functions, which " "have been deprecated since Python 3.12. (Contributed by Bénédikt Tran in :gh:" "`97850`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2556 +#: ../../whatsnew/3.14.rst:2562 msgid "pty" msgstr "" -#: ../../whatsnew/3.14.rst:2558 +#: ../../whatsnew/3.14.rst:2564 msgid "" "Remove the :func:`!master_open` and :func:`!slave_open` functions, which " "have been deprecated since Python 3.12. Use :func:`pty.openpty` instead. " "(Contributed by Nikita Sobolev in :gh:`118824`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2565 +#: ../../whatsnew/3.14.rst:2571 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.14.rst:2567 +#: ../../whatsnew/3.14.rst:2573 msgid "" "Remove :data:`!version` and :data:`!version_info` from the :mod:`sqlite3` " "module; use :data:`~sqlite3.sqlite_version` and :data:`~sqlite3." @@ -3737,27 +3746,27 @@ msgid "" "library. (Contributed by Hugo van Kemenade in :gh:`118924`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2573 +#: ../../whatsnew/3.14.rst:2579 msgid "" "Using a sequence of parameters with named placeholders now raises a :exc:" "`~sqlite3.ProgrammingError`, having been deprecated since Python 3.12. " "(Contributed by Erlend E. Aasland in :gh:`118928` and :gh:`101693`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2582 +#: ../../whatsnew/3.14.rst:2588 msgid "" "Remove the :class:`!Quoter` class from :mod:`urllib.parse`, which has been " "deprecated since Python 3.11. (Contributed by Nikita Sobolev in :gh:" "`118827`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2586 +#: ../../whatsnew/3.14.rst:2592 msgid "" "Remove the :class:`!URLopener` and :class:`!FancyURLopener` classes from :" "mod:`urllib.request`, which have been deprecated since Python 3.3." msgstr "" -#: ../../whatsnew/3.14.rst:2590 +#: ../../whatsnew/3.14.rst:2596 msgid "" "``myopener.open()`` can be replaced with :func:`~urllib.request.urlopen`. " "``myopener.retrieve()`` can be replaced with :func:`~urllib.request." @@ -3766,15 +3775,15 @@ msgid "" "(Contributed by Barney Gale in :gh:`84850`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2599 +#: ../../whatsnew/3.14.rst:2605 msgid "Deprecated" msgstr "Als veraltet markiert" -#: ../../whatsnew/3.14.rst:2602 +#: ../../whatsnew/3.14.rst:2608 msgid "New deprecations" msgstr "" -#: ../../whatsnew/3.14.rst:2604 +#: ../../whatsnew/3.14.rst:2610 msgid "" "Passing a complex number as the *real* or *imag* argument in the :func:" "`complex` constructor is now deprecated; complex numbers should only be " @@ -3782,84 +3791,84 @@ msgid "" "gh:`109218`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2609 +#: ../../whatsnew/3.14.rst:2615 #: ../../deprecations/pending-removal-in-future.rst:7 msgid ":mod:`argparse`:" msgstr "" -#: ../../whatsnew/3.14.rst:2611 +#: ../../whatsnew/3.14.rst:2617 msgid "" "Passing the undocumented keyword argument *prefix_chars* to the :meth:" "`~argparse.ArgumentParser.add_argument_group` method is now deprecated. " "(Contributed by Savannah Ostrowski in :gh:`125563`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2615 +#: ../../whatsnew/3.14.rst:2621 msgid "" "Deprecated the :class:`argparse.FileType` type converter. Anything relating " "to resource management should be handled downstream, after the arguments " "have been parsed. (Contributed by Serhiy Storchaka in :gh:`58032`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2620 +#: ../../whatsnew/3.14.rst:2626 #: ../../deprecations/pending-removal-in-3.16.rst:19 msgid ":mod:`asyncio`:" msgstr "" -#: ../../whatsnew/3.14.rst:2622 +#: ../../whatsnew/3.14.rst:2628 msgid "" "The :func:`!asyncio.iscoroutinefunction` is now deprecated and will be " "removed in Python 3.16; use :func:`inspect.iscoroutinefunction` instead. " "(Contributed by Jiahao Li and Kumar Aditya in :gh:`122875`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2627 +#: ../../whatsnew/3.14.rst:2633 msgid "" "The :mod:`asyncio` policy system is deprecated and will be removed in Python " "3.16. In particular, the following classes and functions are deprecated:" msgstr "" -#: ../../whatsnew/3.14.rst:2631 +#: ../../whatsnew/3.14.rst:2637 #: ../../deprecations/pending-removal-in-3.16.rst:29 msgid ":class:`asyncio.AbstractEventLoopPolicy`" msgstr "" -#: ../../whatsnew/3.14.rst:2632 +#: ../../whatsnew/3.14.rst:2638 #: ../../deprecations/pending-removal-in-3.16.rst:30 msgid ":class:`asyncio.DefaultEventLoopPolicy`" msgstr "" -#: ../../whatsnew/3.14.rst:2633 +#: ../../whatsnew/3.14.rst:2639 #: ../../deprecations/pending-removal-in-3.16.rst:31 msgid ":class:`asyncio.WindowsSelectorEventLoopPolicy`" msgstr "" -#: ../../whatsnew/3.14.rst:2634 +#: ../../whatsnew/3.14.rst:2640 #: ../../deprecations/pending-removal-in-3.16.rst:32 msgid ":class:`asyncio.WindowsProactorEventLoopPolicy`" msgstr "" -#: ../../whatsnew/3.14.rst:2635 +#: ../../whatsnew/3.14.rst:2641 #: ../../deprecations/pending-removal-in-3.16.rst:33 msgid ":func:`asyncio.get_event_loop_policy`" msgstr "" -#: ../../whatsnew/3.14.rst:2636 +#: ../../whatsnew/3.14.rst:2642 #: ../../deprecations/pending-removal-in-3.16.rst:34 msgid ":func:`asyncio.set_event_loop_policy`" msgstr "" -#: ../../whatsnew/3.14.rst:2638 +#: ../../whatsnew/3.14.rst:2644 msgid "" "Users should use :func:`asyncio.run` or :class:`asyncio.Runner` with the " "*loop_factory* argument to use the desired event loop implementation." msgstr "" -#: ../../whatsnew/3.14.rst:2641 +#: ../../whatsnew/3.14.rst:2647 msgid "For example, to use :class:`asyncio.SelectorEventLoop` on Windows:" msgstr "" -#: ../../whatsnew/3.14.rst:2643 +#: ../../whatsnew/3.14.rst:2649 #: ../../deprecations/pending-removal-in-3.16.rst:41 msgid "" "import asyncio\n" @@ -3870,25 +3879,25 @@ msgid "" "asyncio.run(main(), loop_factory=asyncio.SelectorEventLoop)" msgstr "" -#: ../../whatsnew/3.14.rst:2652 +#: ../../whatsnew/3.14.rst:2658 #: ../../deprecations/pending-removal-in-3.16.rst:48 msgid "(Contributed by Kumar Aditya in :gh:`127949`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2654 +#: ../../whatsnew/3.14.rst:2660 msgid "" ":mod:`codecs`: The :func:`codecs.open` function is now deprecated, and will " "be removed in a future version of Python. Use :func:`open` instead. " "(Contributed by Inada Naoki in :gh:`133036`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2660 +#: ../../whatsnew/3.14.rst:2666 #: ../../deprecations/pending-removal-in-3.15.rst:16 #: ../../deprecations/pending-removal-in-3.19.rst:4 msgid ":mod:`ctypes`:" msgstr "" -#: ../../whatsnew/3.14.rst:2662 +#: ../../whatsnew/3.14.rst:2668 msgid "" "On non-Windows platforms, setting :attr:`.Structure._pack_` to use a MSVC-" "compatible default memory layout is now deprecated in favor of setting :attr:" @@ -3896,7 +3905,7 @@ msgid "" "(Contributed by Petr Viktorin in :gh:`131747`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2667 +#: ../../whatsnew/3.14.rst:2673 msgid "" "Calling :func:`ctypes.POINTER` on a string is now deprecated. Use :ref:" "`incomplete types ` for self-referential " @@ -3905,7 +3914,7 @@ msgid "" "by Sergey Myrianov in :gh:`100926`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2674 +#: ../../whatsnew/3.14.rst:2680 msgid "" ":mod:`functools`: Calling the Python implementation of :func:`functools." "reduce` with *function* or *sequence* as keyword arguments is now " @@ -3913,7 +3922,7 @@ msgid "" "(Contributed by Kirill Podoprigora in :gh:`121676`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2680 +#: ../../whatsnew/3.14.rst:2686 msgid "" ":mod:`logging`: Support for custom logging handlers with the *strm* argument " "is now deprecated and scheduled for removal in Python 3.16. Define handlers " @@ -3921,7 +3930,7 @@ msgid "" "`115032`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2686 +#: ../../whatsnew/3.14.rst:2692 msgid "" ":mod:`mimetypes`: Valid extensions are either empty or must start with '.' " "for :meth:`mimetypes.MimeTypes.add_type`. Undotted extensions are deprecated " @@ -3929,14 +3938,14 @@ msgid "" "Kemenade in :gh:`75223`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2693 +#: ../../whatsnew/3.14.rst:2699 msgid "" ":mod:`!nturl2path`: This module is now deprecated. Call :func:`urllib." "request.url2pathname` and :func:`~urllib.request.pathname2url` instead. " "(Contributed by Barney Gale in :gh:`125866`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2698 +#: ../../whatsnew/3.14.rst:2704 msgid "" ":mod:`os`: The :func:`os.popen` and :func:`os.spawn* ` functions " "are now :term:`soft deprecated`. They should no longer be used to write new " @@ -3944,14 +3953,14 @@ msgid "" "Victor Stinner in :gh:`120743`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2705 +#: ../../whatsnew/3.14.rst:2711 msgid "" ":mod:`pathlib`: :meth:`!pathlib.PurePath.as_uri` is now deprecated and " "scheduled for removal in Python 3.19. Use :meth:`pathlib.Path.as_uri` " "instead. (Contributed by Barney Gale in :gh:`123599`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2711 +#: ../../whatsnew/3.14.rst:2717 msgid "" ":mod:`pdb`: The undocumented ``pdb.Pdb.curframe_locals`` attribute is now a " "deprecated read-only property, which will be removed in a future version of " @@ -3962,14 +3971,14 @@ msgid "" "(Contributed by Tian Gao in :gh:`124369` and :gh:`125951`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2720 +#: ../../whatsnew/3.14.rst:2726 msgid "" ":mod:`symtable`: Deprecate :meth:`symtable.Class.get_methods` due to the " "lack of interest, scheduled for removal in Python 3.16. (Contributed by " "Bénédikt Tran in :gh:`119698`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2725 +#: ../../whatsnew/3.14.rst:2731 msgid "" ":mod:`tkinter`: The :class:`!tkinter.Variable` methods :meth:`!" "trace_variable`, :meth:`!trace_vdelete` and :meth:`!trace_vinfo` are now " @@ -3977,7 +3986,7 @@ msgid "" "trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2731 +#: ../../whatsnew/3.14.rst:2737 msgid "" ":mod:`urllib.parse`: Accepting objects with false values (like ``0`` and " "``[]``) except empty strings, bytes-like objects and ``None`` in :func:" @@ -5035,18 +5044,18 @@ msgid "" "_clear_internal_caches` instead." msgstr "" -#: ../../whatsnew/3.14.rst:2755 +#: ../../whatsnew/3.14.rst:2761 msgid "CPython bytecode changes" msgstr "CPython Bytecode Änderungen" -#: ../../whatsnew/3.14.rst:2757 +#: ../../whatsnew/3.14.rst:2763 msgid "" "Replaced the opcode :opcode:`!BINARY_SUBSCR` by the :opcode:`BINARY_OP` " "opcode with the ``NB_SUBSCR`` oparg. (Contributed by Irit Katriel in :gh:" "`100239`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2761 +#: ../../whatsnew/3.14.rst:2767 msgid "" "Add the :opcode:`BUILD_INTERPOLATION` and :opcode:`BUILD_TEMPLATE` opcodes " "to construct new :class:`~string.templatelib.Interpolation` and :class:" @@ -5055,20 +5064,20 @@ msgid "" "Template strings `)." msgstr "" -#: ../../whatsnew/3.14.rst:2767 +#: ../../whatsnew/3.14.rst:2773 msgid "" "Remove the :opcode:`!BUILD_CONST_KEY_MAP` opcode. Use :opcode:`BUILD_MAP` " "instead. (Contributed by Mark Shannon in :gh:`122160`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2771 +#: ../../whatsnew/3.14.rst:2777 msgid "" "Replace the :opcode:`!LOAD_ASSERTION_ERROR` opcode with :opcode:" "`LOAD_COMMON_CONSTANT` and add support for loading :exc:" "`NotImplementedError`." msgstr "" -#: ../../whatsnew/3.14.rst:2775 +#: ../../whatsnew/3.14.rst:2781 msgid "" "Add the :opcode:`LOAD_FAST_BORROW` and :opcode:" "`LOAD_FAST_BORROW_LOAD_FAST_BORROW` opcodes to reduce reference counting " @@ -5077,14 +5086,14 @@ msgid "" "gh:`130704`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2780 +#: ../../whatsnew/3.14.rst:2786 msgid "" "Add the :opcode:`LOAD_SMALL_INT` opcode, which pushes a small integer equal " "to the ``oparg`` to the stack. The :opcode:`!RETURN_CONST` opcode is removed " "as it is no longer used. (Contributed by Mark Shannon in :gh:`125837`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2785 +#: ../../whatsnew/3.14.rst:2791 msgid "" "Add the new :opcode:`LOAD_SPECIAL` instruction. Generate code for :keyword:" "`with` and :keyword:`async with` statements using the new instruction. " @@ -5092,17 +5101,17 @@ msgid "" "instructions. (Contributed by Mark Shannon in :gh:`120507`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2791 +#: ../../whatsnew/3.14.rst:2797 msgid "" "Add the :opcode:`POP_ITER` opcode to support 'virtual' iterators. " "(Contributed by Mark Shannon in :gh:`132554`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2796 +#: ../../whatsnew/3.14.rst:2802 msgid "Pseudo-instructions" msgstr "" -#: ../../whatsnew/3.14.rst:2798 +#: ../../whatsnew/3.14.rst:2804 msgid "" "Add the :opcode:`!ANNOTATIONS_PLACEHOLDER` pseudo instruction to support " "partially executed module-level annotations with :ref:`deferred evaluation " @@ -5110,14 +5119,14 @@ msgid "" "Zijlstra in :gh:`130907`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2803 +#: ../../whatsnew/3.14.rst:2809 msgid "" "Add the :opcode:`!BINARY_OP_EXTEND` pseudo instruction, which executes a " "pair of functions (guard and specialization functions) accessed from the " "inline cache. (Contributed by Irit Katriel in :gh:`100239`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2808 +#: ../../whatsnew/3.14.rst:2814 msgid "" "Add three specializations for :opcode:`CALL_KW`; :opcode:`!CALL_KW_PY` for " "calls to Python functions, :opcode:`!CALL_KW_BOUND_METHOD` for calls to " @@ -5125,7 +5134,7 @@ msgid "" "(Contributed by Mark Shannon in :gh:`118093`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2814 +#: ../../whatsnew/3.14.rst:2820 msgid "" "Add the :opcode:`JUMP_IF_TRUE` and :opcode:`JUMP_IF_FALSE` pseudo " "instructions, conditional jumps which do not impact the stack. Replaced by " @@ -5133,55 +5142,55 @@ msgid "" "(Contributed by Irit Katriel in :gh:`124285`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2819 +#: ../../whatsnew/3.14.rst:2825 msgid "" "Add the :opcode:`!LOAD_CONST_MORTAL` pseudo instruction. (Contributed by " "Mark Shannon in :gh:`128685`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2822 +#: ../../whatsnew/3.14.rst:2828 msgid "" "Add the :opcode:`!LOAD_CONST_IMMORTAL` pseudo instruction, which does the " "same as :opcode:`!LOAD_CONST`, but is more efficient for immortal objects. " "(Contributed by Mark Shannon in :gh:`125837`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2827 +#: ../../whatsnew/3.14.rst:2833 msgid "" "Add the :opcode:`NOT_TAKEN` pseudo instruction, used by :mod:`sys." "monitoring` to record branch events (such as :monitoring-event:" "`BRANCH_LEFT`). (Contributed by Mark Shannon in :gh:`122548`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2833 +#: ../../whatsnew/3.14.rst:2839 msgid "C API changes" msgstr "" -#: ../../whatsnew/3.14.rst:2838 +#: ../../whatsnew/3.14.rst:2844 msgid "Python configuration C API" msgstr "" -#: ../../whatsnew/3.14.rst:2840 +#: ../../whatsnew/3.14.rst:2846 msgid "" "Add a :ref:`PyInitConfig C API ` to configure the Python " "initialization without relying on C structures and the ability to make ABI-" "compatible changes in the future." msgstr "" -#: ../../whatsnew/3.14.rst:2844 +#: ../../whatsnew/3.14.rst:2850 msgid "" "Complete the :pep:`587` :ref:`PyConfig C API ` by adding :c:" "func:`PyInitConfig_AddModule` which can be used to add a built-in extension " "module; a feature previously referred to as the \"inittab\"." msgstr "" -#: ../../whatsnew/3.14.rst:2848 +#: ../../whatsnew/3.14.rst:2854 msgid "" "Add :c:func:`PyConfig_Get` and :c:func:`PyConfig_Set` functions to get and " "set the current runtime configuration." msgstr "" -#: ../../whatsnew/3.14.rst:2851 +#: ../../whatsnew/3.14.rst:2857 msgid "" ":pep:`587` 'Python Initialization Configuration' unified all the ways to " "configure Python's initialization. This PEP also unifies the configuration " @@ -5190,7 +5199,7 @@ msgid "" "two 'Python' and 'Isolated' choices (PEP 587), to further simplify the API." msgstr "" -#: ../../whatsnew/3.14.rst:2858 +#: ../../whatsnew/3.14.rst:2864 msgid "" "The lower level PEP 587 PyConfig API remains available for use cases with an " "intentionally higher level of coupling to CPython implementation details " @@ -5198,20 +5207,20 @@ msgid "" "configuration mechanisms)." msgstr "" -#: ../../whatsnew/3.14.rst:2863 ../../whatsnew/3.14.rst:2890 -#: ../../whatsnew/3.14.rst:2910 +#: ../../whatsnew/3.14.rst:2869 ../../whatsnew/3.14.rst:2896 +#: ../../whatsnew/3.14.rst:2916 msgid "(Contributed by Victor Stinner in :gh:`107954`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2865 +#: ../../whatsnew/3.14.rst:2871 msgid ":pep:`741` and :pep:`587`" msgstr "" -#: ../../whatsnew/3.14.rst:2869 +#: ../../whatsnew/3.14.rst:2875 msgid "New features in the C API" msgstr "" -#: ../../whatsnew/3.14.rst:2871 +#: ../../whatsnew/3.14.rst:2877 msgid "" "Add :c:func:`Py_PACK_VERSION` and :c:func:`Py_PACK_FULL_VERSION`, two new " "macros for bit-packing Python version numbers. This is useful for " @@ -5219,99 +5228,99 @@ msgid "" "(Contributed by Petr Viktorin in :gh:`128629`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2877 +#: ../../whatsnew/3.14.rst:2883 msgid "" "Add :c:func:`PyBytes_Join(sep, iterable) ` function, similar " "to ``sep.join(iterable)`` in Python. (Contributed by Victor Stinner in :gh:" "`121645`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2881 +#: ../../whatsnew/3.14.rst:2887 msgid "" "Add functions to manipulate the configuration of the current runtime Python " "interpreter (:ref:`PEP 741: Python configuration C API `):" msgstr "" -#: ../../whatsnew/3.14.rst:2885 +#: ../../whatsnew/3.14.rst:2891 msgid ":c:func:`PyConfig_Get`" msgstr "" -#: ../../whatsnew/3.14.rst:2886 +#: ../../whatsnew/3.14.rst:2892 msgid ":c:func:`PyConfig_GetInt`" msgstr "" -#: ../../whatsnew/3.14.rst:2887 +#: ../../whatsnew/3.14.rst:2893 msgid ":c:func:`PyConfig_Set`" msgstr "" -#: ../../whatsnew/3.14.rst:2888 +#: ../../whatsnew/3.14.rst:2894 msgid ":c:func:`PyConfig_Names`" msgstr "" -#: ../../whatsnew/3.14.rst:2892 +#: ../../whatsnew/3.14.rst:2898 msgid "" "Add functions to configure Python initialization (:ref:`PEP 741: Python " "configuration C API `):" msgstr "" -#: ../../whatsnew/3.14.rst:2895 +#: ../../whatsnew/3.14.rst:2901 msgid ":c:func:`Py_InitializeFromInitConfig`" msgstr "" -#: ../../whatsnew/3.14.rst:2896 +#: ../../whatsnew/3.14.rst:2902 msgid ":c:func:`PyInitConfig_AddModule`" msgstr "" -#: ../../whatsnew/3.14.rst:2897 +#: ../../whatsnew/3.14.rst:2903 msgid ":c:func:`PyInitConfig_Create`" msgstr "" -#: ../../whatsnew/3.14.rst:2898 +#: ../../whatsnew/3.14.rst:2904 msgid ":c:func:`PyInitConfig_Free`" msgstr "" -#: ../../whatsnew/3.14.rst:2899 +#: ../../whatsnew/3.14.rst:2905 msgid ":c:func:`PyInitConfig_FreeStrList`" msgstr "" -#: ../../whatsnew/3.14.rst:2900 +#: ../../whatsnew/3.14.rst:2906 msgid ":c:func:`PyInitConfig_GetError`" msgstr "" -#: ../../whatsnew/3.14.rst:2901 +#: ../../whatsnew/3.14.rst:2907 msgid ":c:func:`PyInitConfig_GetExitCode`" msgstr "" -#: ../../whatsnew/3.14.rst:2902 +#: ../../whatsnew/3.14.rst:2908 msgid ":c:func:`PyInitConfig_GetInt`" msgstr "" -#: ../../whatsnew/3.14.rst:2903 +#: ../../whatsnew/3.14.rst:2909 msgid ":c:func:`PyInitConfig_GetStr`" msgstr "" -#: ../../whatsnew/3.14.rst:2904 +#: ../../whatsnew/3.14.rst:2910 msgid ":c:func:`PyInitConfig_GetStrList`" msgstr "" -#: ../../whatsnew/3.14.rst:2905 +#: ../../whatsnew/3.14.rst:2911 msgid ":c:func:`PyInitConfig_HasOption`" msgstr "" -#: ../../whatsnew/3.14.rst:2906 +#: ../../whatsnew/3.14.rst:2912 msgid ":c:func:`PyInitConfig_SetInt`" msgstr "" -#: ../../whatsnew/3.14.rst:2907 +#: ../../whatsnew/3.14.rst:2913 msgid ":c:func:`PyInitConfig_SetStr`" msgstr "" -#: ../../whatsnew/3.14.rst:2908 +#: ../../whatsnew/3.14.rst:2914 msgid ":c:func:`PyInitConfig_SetStrList`" msgstr "" -#: ../../whatsnew/3.14.rst:2912 +#: ../../whatsnew/3.14.rst:2918 msgid "" "Add :c:func:`Py_fopen` function to open a file. This works similarly to the " "standard C :c:func:`!fopen` function, instead accepting a Python object for " @@ -5320,13 +5329,13 @@ msgid "" "(Contributed by Victor Stinner in :gh:`127350`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2920 +#: ../../whatsnew/3.14.rst:2926 msgid "" "Add :c:func:`Py_HashBuffer` to compute and return the hash value of a " "buffer. (Contributed by Antoine Pitrou and Victor Stinner in :gh:`122854`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2923 +#: ../../whatsnew/3.14.rst:2929 msgid "" "Add :c:func:`PyImport_ImportModuleAttr` and :c:func:" "`PyImport_ImportModuleAttrString` helper functions to import a module and " @@ -5334,20 +5343,20 @@ msgid "" "`128911`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2928 +#: ../../whatsnew/3.14.rst:2934 msgid "" "Add :c:func:`PyIter_NextItem` to replace :c:func:`PyIter_Next`, which has an " "ambiguous return value. (Contributed by Irit Katriel and Erlend Aasland in :" "gh:`105201`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2932 +#: ../../whatsnew/3.14.rst:2938 msgid "" "Add :c:func:`PyLong_GetSign` function to get the sign of :class:`int` " "objects. (Contributed by Sergey B Kirpichev in :gh:`116560`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2935 +#: ../../whatsnew/3.14.rst:2941 msgid "" "Add :c:func:`PyLong_IsPositive`, :c:func:`PyLong_IsNegative` and :c:func:" "`PyLong_IsZero` for checking if :c:type:`PyLongObject` is positive, " @@ -5355,82 +5364,82 @@ msgid "" "Kirpichev in :gh:`126061`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2940 +#: ../../whatsnew/3.14.rst:2946 msgid "" "Add new functions to convert C ```` numbers to/from Python :class:" "`int` objects:" msgstr "" -#: ../../whatsnew/3.14.rst:2943 +#: ../../whatsnew/3.14.rst:2949 msgid ":c:func:`PyLong_AsInt32`" msgstr "" -#: ../../whatsnew/3.14.rst:2944 +#: ../../whatsnew/3.14.rst:2950 msgid ":c:func:`PyLong_AsInt64`" msgstr "" -#: ../../whatsnew/3.14.rst:2945 +#: ../../whatsnew/3.14.rst:2951 msgid ":c:func:`PyLong_AsUInt32`" msgstr "" -#: ../../whatsnew/3.14.rst:2946 +#: ../../whatsnew/3.14.rst:2952 msgid ":c:func:`PyLong_AsUInt64`" msgstr "" -#: ../../whatsnew/3.14.rst:2947 +#: ../../whatsnew/3.14.rst:2953 msgid ":c:func:`PyLong_FromInt32`" msgstr "" -#: ../../whatsnew/3.14.rst:2948 +#: ../../whatsnew/3.14.rst:2954 msgid ":c:func:`PyLong_FromInt64`" msgstr "" -#: ../../whatsnew/3.14.rst:2949 +#: ../../whatsnew/3.14.rst:2955 msgid ":c:func:`PyLong_FromUInt32`" msgstr "" -#: ../../whatsnew/3.14.rst:2950 +#: ../../whatsnew/3.14.rst:2956 msgid ":c:func:`PyLong_FromUInt64`" msgstr "" -#: ../../whatsnew/3.14.rst:2952 +#: ../../whatsnew/3.14.rst:2958 msgid "(Contributed by Victor Stinner in :gh:`120389`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2954 +#: ../../whatsnew/3.14.rst:2960 msgid "" "Add a new import and export API for Python :class:`int` objects (:pep:`757`):" msgstr "" -#: ../../whatsnew/3.14.rst:2957 +#: ../../whatsnew/3.14.rst:2963 msgid ":c:func:`PyLong_GetNativeLayout`" msgstr "" -#: ../../whatsnew/3.14.rst:2958 +#: ../../whatsnew/3.14.rst:2964 msgid ":c:func:`PyLong_Export`" msgstr "" -#: ../../whatsnew/3.14.rst:2959 +#: ../../whatsnew/3.14.rst:2965 msgid ":c:func:`PyLong_FreeExport`" msgstr "" -#: ../../whatsnew/3.14.rst:2960 +#: ../../whatsnew/3.14.rst:2966 msgid ":c:func:`PyLongWriter_Create`" msgstr "" -#: ../../whatsnew/3.14.rst:2961 +#: ../../whatsnew/3.14.rst:2967 msgid ":c:func:`PyLongWriter_Finish`" msgstr "" -#: ../../whatsnew/3.14.rst:2962 +#: ../../whatsnew/3.14.rst:2968 msgid ":c:func:`PyLongWriter_Discard`" msgstr "" -#: ../../whatsnew/3.14.rst:2964 +#: ../../whatsnew/3.14.rst:2970 msgid "(Contributed by Sergey B Kirpichev and Victor Stinner in :gh:`102471`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2966 +#: ../../whatsnew/3.14.rst:2972 msgid "" "Add :c:func:`PyMonitoring_FireBranchLeftEvent` and :c:func:" "`PyMonitoring_FireBranchRightEvent` for generating :monitoring-event:" @@ -5438,13 +5447,13 @@ msgid "" "(Contributed by Mark Shannon in :gh:`122548`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2972 +#: ../../whatsnew/3.14.rst:2978 msgid "" "Add :c:func:`PyType_Freeze` function to make a type immutable. (Contributed " "by Victor Stinner in :gh:`121654`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2975 +#: ../../whatsnew/3.14.rst:2981 msgid "" "Add :c:func:`PyType_GetBaseByToken` and :c:data:`Py_tp_token` slot for " "easier superclass identification, which attempts to resolve the type " @@ -5452,110 +5461,110 @@ msgid "" "in :gh:`124153`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2980 +#: ../../whatsnew/3.14.rst:2986 msgid "" "Add a new :c:func:`PyUnicode_Equal` function to test if two strings are " "equal. The function is also added to the Limited C API. (Contributed by " "Victor Stinner in :gh:`124502`.)" msgstr "" -#: ../../whatsnew/3.14.rst:2985 +#: ../../whatsnew/3.14.rst:2991 msgid "" "Add a new :c:type:`PyUnicodeWriter` API to create a Python :class:`str` " "object, with the following functions:" msgstr "" -#: ../../whatsnew/3.14.rst:2988 +#: ../../whatsnew/3.14.rst:2994 msgid ":c:func:`PyUnicodeWriter_Create`" msgstr "" -#: ../../whatsnew/3.14.rst:2989 +#: ../../whatsnew/3.14.rst:2995 msgid ":c:func:`PyUnicodeWriter_DecodeUTF8Stateful`" msgstr "" -#: ../../whatsnew/3.14.rst:2990 +#: ../../whatsnew/3.14.rst:2996 msgid ":c:func:`PyUnicodeWriter_Discard`" msgstr "" -#: ../../whatsnew/3.14.rst:2991 +#: ../../whatsnew/3.14.rst:2997 msgid ":c:func:`PyUnicodeWriter_Finish`" msgstr "" -#: ../../whatsnew/3.14.rst:2992 +#: ../../whatsnew/3.14.rst:2998 msgid ":c:func:`PyUnicodeWriter_Format`" msgstr "" -#: ../../whatsnew/3.14.rst:2993 +#: ../../whatsnew/3.14.rst:2999 msgid ":c:func:`PyUnicodeWriter_WriteASCII`" msgstr "" -#: ../../whatsnew/3.14.rst:2994 +#: ../../whatsnew/3.14.rst:3000 msgid ":c:func:`PyUnicodeWriter_WriteChar`" msgstr "" -#: ../../whatsnew/3.14.rst:2995 +#: ../../whatsnew/3.14.rst:3001 msgid ":c:func:`PyUnicodeWriter_WriteRepr`" msgstr "" -#: ../../whatsnew/3.14.rst:2996 +#: ../../whatsnew/3.14.rst:3002 msgid ":c:func:`PyUnicodeWriter_WriteStr`" msgstr "" -#: ../../whatsnew/3.14.rst:2997 +#: ../../whatsnew/3.14.rst:3003 msgid ":c:func:`PyUnicodeWriter_WriteSubstring`" msgstr "" -#: ../../whatsnew/3.14.rst:2998 +#: ../../whatsnew/3.14.rst:3004 msgid ":c:func:`PyUnicodeWriter_WriteUCS4`" msgstr "" -#: ../../whatsnew/3.14.rst:2999 +#: ../../whatsnew/3.14.rst:3005 msgid ":c:func:`PyUnicodeWriter_WriteUTF8`" msgstr "" -#: ../../whatsnew/3.14.rst:3000 +#: ../../whatsnew/3.14.rst:3006 msgid ":c:func:`PyUnicodeWriter_WriteWideChar`" msgstr "" -#: ../../whatsnew/3.14.rst:3002 +#: ../../whatsnew/3.14.rst:3008 msgid "(Contributed by Victor Stinner in :gh:`119182`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3004 +#: ../../whatsnew/3.14.rst:3010 msgid "" "The ``k`` and ``K`` formats in :c:func:`PyArg_ParseTuple` and similar " "functions now use :meth:`~object.__index__` if available, like all other " "integer formats. (Contributed by Serhiy Storchaka in :gh:`112068`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3009 +#: ../../whatsnew/3.14.rst:3015 msgid "" "Add support for a new ``p`` format unit in :c:func:`Py_BuildValue` that " "produces a Python :class:`bool` object from a C integer. (Contributed by " "Pablo Galindo in :issue:`45325`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3013 +#: ../../whatsnew/3.14.rst:3019 msgid "" "Add :c:func:`PyUnstable_IsImmortal` for determining if an object is :term:" "`immortal`, for debugging purposes. (Contributed by Peter Bierma in :gh:" "`128509`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3017 +#: ../../whatsnew/3.14.rst:3023 msgid "" "Add :c:func:`PyUnstable_Object_EnableDeferredRefcount` for enabling deferred " "reference counting, as outlined in :pep:`703`." msgstr "" -#: ../../whatsnew/3.14.rst:3020 +#: ../../whatsnew/3.14.rst:3026 msgid "" "Add :c:func:`PyUnstable_Object_IsUniquelyReferenced` as a replacement for " "``Py_REFCNT(op) == 1`` on :term:`free threaded ` builds. " "(Contributed by Peter Bierma in :gh:`133140`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3025 +#: ../../whatsnew/3.14.rst:3031 msgid "" "Add :c:func:`PyUnstable_Object_IsUniqueReferencedTemporary` to determine if " "an object is a unique temporary object on the interpreter's operand stack. " @@ -5564,11 +5573,11 @@ msgid "" "functions. (Contributed by Sam Gross in :gh:`133164`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3035 +#: ../../whatsnew/3.14.rst:3041 msgid "Limited C API changes" msgstr "" -#: ../../whatsnew/3.14.rst:3037 +#: ../../whatsnew/3.14.rst:3043 msgid "" "In the limited C API version 3.14 and newer, :c:func:`Py_TYPE` and :c:func:" "`Py_REFCNT` are now implemented as an opaque function call to hide " @@ -5576,7 +5585,7 @@ msgid "" "gh:`124127`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3042 +#: ../../whatsnew/3.14.rst:3048 msgid "" "Remove the :c:macro:`PySequence_Fast_GET_SIZE`, :c:macro:" "`PySequence_Fast_GET_ITEM`, and :c:macro:`PySequence_Fast_ITEMS` macros from " @@ -5584,32 +5593,32 @@ msgid "" "(Contributed by Victor Stinner in :gh:`91417`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3053 +#: ../../whatsnew/3.14.rst:3059 msgid "Removed C APIs" msgstr "" -#: ../../whatsnew/3.14.rst:3055 +#: ../../whatsnew/3.14.rst:3061 msgid "" "Creating :c:data:`immutable types ` with mutable " "bases was deprecated in Python 3.12, and now raises a :exc:`TypeError`. " "(Contributed by Nikita Sobolev in :gh:`119775`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3060 +#: ../../whatsnew/3.14.rst:3066 msgid "" "Remove ``PyDictObject.ma_version_tag`` member, which was deprecated in " "Python 3.12. Use the :c:func:`PyDict_AddWatcher` API instead. (Contributed " "by Sam Gross in :gh:`124296`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3065 +#: ../../whatsnew/3.14.rst:3071 msgid "" "Remove the private ``_Py_InitializeMain()`` function. It was a :term:" "`provisional API` added to Python 3.8 by :pep:`587`. (Contributed by Victor " "Stinner in :gh:`129033`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3069 +#: ../../whatsnew/3.14.rst:3075 msgid "" "Remove the undocumented APIs :c:macro:`!Py_C_RECURSION_LIMIT` and :c:member:" "`!PyThreadState.c_recursion_remaining`. These were added in 3.13 and have " @@ -5618,18 +5627,18 @@ msgid "" "`133079`, see also :gh:`130396`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3080 +#: ../../whatsnew/3.14.rst:3086 msgid "Deprecated C APIs" msgstr "" -#: ../../whatsnew/3.14.rst:3082 +#: ../../whatsnew/3.14.rst:3088 msgid "" "The :c:macro:`!Py_HUGE_VAL` macro is now :term:`soft deprecated`. Use :c:" "macro:`!INFINITY` instead. (Contributed by Sergey B Kirpichev in :gh:" "`120026`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3086 +#: ../../whatsnew/3.14.rst:3092 msgid "" "The :c:macro:`!Py_IS_NAN`, :c:macro:`!Py_IS_INFINITY`, and :c:macro:`!" "Py_IS_FINITE` macros are now :term:`soft deprecated`. Use :c:macro:`!" @@ -5637,7 +5646,7 @@ msgid "" "file:`math.h` since C99. (Contributed by Sergey B Kirpichev in :gh:`119613`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3092 +#: ../../whatsnew/3.14.rst:3098 msgid "" "Non-tuple sequences are now deprecated as argument for the ``(items)`` " "format unit in :c:func:`PyArg_ParseTuple` and other :ref:`argument parsing " @@ -5646,14 +5655,14 @@ msgid "" "(Contributed by Serhiy Storchaka in :gh:`50333`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3099 +#: ../../whatsnew/3.14.rst:3105 msgid "" "The ``_PyMonitoring_FireBranchEvent`` function is now deprecated and should " "be replaced with calls to :c:func:`PyMonitoring_FireBranchLeftEvent` and :c:" "func:`PyMonitoring_FireBranchRightEvent`." msgstr "" -#: ../../whatsnew/3.14.rst:3104 +#: ../../whatsnew/3.14.rst:3110 msgid "" "The previously undocumented function :c:func:`PySequence_In` is now :term:" "`soft deprecated`. Use :c:func:`PySequence_Contains` instead. (Contributed " @@ -6139,11 +6148,11 @@ msgstr "" msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." msgstr "" -#: ../../whatsnew/3.14.rst:3123 +#: ../../whatsnew/3.14.rst:3129 msgid "Build changes" msgstr "" -#: ../../whatsnew/3.14.rst:3125 +#: ../../whatsnew/3.14.rst:3131 msgid "" ":pep:`776`: Emscripten is now an officially supported platform at :pep:`tier " "3 <11#tier-3>`. As a part of this effort, more than 25 bugs in `Emscripten " @@ -6153,31 +6162,31 @@ msgid "" "Chatham in :gh:`127146`, :gh:`127683`, and :gh:`136931`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3135 +#: ../../whatsnew/3.14.rst:3141 msgid "Official Android binary releases are now provided on python.org__." msgstr "" -#: ../../whatsnew/3.14.rst:3139 +#: ../../whatsnew/3.14.rst:3145 msgid "" "GNU Autoconf 2.72 is now required to generate :file:`configure`. " "(Contributed by Erlend Aasland in :gh:`115765`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3142 +#: ../../whatsnew/3.14.rst:3148 msgid "" "``wasm32-unknown-emscripten`` is now a :pep:`11` tier 3 platform. " "(Contributed by R. Hood Chatham in :gh:`127146`, :gh:`127683`, and :gh:" "`136931`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3145 +#: ../../whatsnew/3.14.rst:3151 msgid "" "``#pragma``-based linking with ``python3*.lib`` can now be switched off " "with :c:expr:`Py_NO_LINK_LIB`. (Contributed by Jean-Christophe Fillion-Robin " "in :gh:`82909`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3149 +#: ../../whatsnew/3.14.rst:3155 msgid "" "CPython now enables a set of recommended compiler options by default for " "improved security. Use the :option:`--disable-safety` :file:`configure` " @@ -6185,45 +6194,45 @@ msgid "" "larger set of compiler options, albeit with a performance cost." msgstr "" -#: ../../whatsnew/3.14.rst:3155 +#: ../../whatsnew/3.14.rst:3161 msgid "" "The ``WITH_FREELISTS`` macro and ``--without-freelists`` :file:`configure` " "option have been removed." msgstr "" -#: ../../whatsnew/3.14.rst:3158 +#: ../../whatsnew/3.14.rst:3164 msgid "" "The new :file:`configure` option :option:`--with-tail-call-interp` may be " "used to enable the experimental tail call interpreter. See :ref:`whatsnew314-" "tail-call-interpreter` for further details." msgstr "" -#: ../../whatsnew/3.14.rst:3162 +#: ../../whatsnew/3.14.rst:3168 msgid "" "To disable the new remote debugging support, use the :option:`--without-" "remote-debug` :file:`configure` option. This may be useful for security " "reasons." msgstr "" -#: ../../whatsnew/3.14.rst:3166 +#: ../../whatsnew/3.14.rst:3172 msgid "" "iOS and macOS apps can now be configured to redirect ``stdout`` and " "``stderr`` content to the system log. (Contributed by Russell Keith-Magee " "in :gh:`127592`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3170 +#: ../../whatsnew/3.14.rst:3176 msgid "" "The iOS testbed is now able to stream test output while the test is running. " "The testbed can also be used to run the test suite of projects other than " "CPython itself. (Contributed by Russell Keith-Magee in :gh:`127592`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3179 +#: ../../whatsnew/3.14.rst:3185 msgid ":file:`build-details.json`" msgstr "" -#: ../../whatsnew/3.14.rst:3181 +#: ../../whatsnew/3.14.rst:3187 msgid "" "Installations of Python now contain a new file, :file:`build-details.json`. " "This is a static JSON document containing build details for CPython, to " @@ -6231,7 +6240,7 @@ msgid "" "cases such as Python launchers, cross-compilation, and so on." msgstr "" -#: ../../whatsnew/3.14.rst:3187 +#: ../../whatsnew/3.14.rst:3193 msgid "" ":file:`build-details.json` must be installed in the platform-independent " "standard library directory. This corresponds to the :ref:`'stdlib' " @@ -6239,17 +6248,17 @@ msgid "" "by running ``sysconfig.get_path('stdlib')``." msgstr "" -#: ../../whatsnew/3.14.rst:3193 +#: ../../whatsnew/3.14.rst:3199 msgid "" ":pep:`739` -- ``build-details.json`` 1.0 -- a static description file for " "Python build details" msgstr "" -#: ../../whatsnew/3.14.rst:3200 +#: ../../whatsnew/3.14.rst:3206 msgid "Discontinuation of PGP signatures" msgstr "" -#: ../../whatsnew/3.14.rst:3202 +#: ../../whatsnew/3.14.rst:3208 msgid "" "PGP (Pretty Good Privacy) signatures will not be provided for releases of " "Python 3.14 or future versions. To verify CPython artifacts, users must use " @@ -6257,15 +6266,15 @@ msgid "" "sigstore/>`__. Releases have been signed using Sigstore_ since Python 3.11." msgstr "" -#: ../../whatsnew/3.14.rst:3208 +#: ../../whatsnew/3.14.rst:3214 msgid "This change in release process was specified in :pep:`761`." msgstr "" -#: ../../whatsnew/3.14.rst:3216 +#: ../../whatsnew/3.14.rst:3222 msgid "Free-threaded Python is officially supported" msgstr "" -#: ../../whatsnew/3.14.rst:3218 +#: ../../whatsnew/3.14.rst:3224 msgid "" "The free-threaded build of Python is now supported and no longer " "experimental. This is the start of `phase II `__, with free-threading as the default or sole build of Python is " @@ -6296,19 +6305,19 @@ msgid "" "and the community. This decision is for the future." msgstr "" -#: ../../whatsnew/3.14.rst:3238 +#: ../../whatsnew/3.14.rst:3244 msgid ":pep:`779`" msgstr "" -#: ../../whatsnew/3.14.rst:3240 +#: ../../whatsnew/3.14.rst:3246 msgid "`PEP 779's acceptance `__" msgstr "" -#: ../../whatsnew/3.14.rst:3246 +#: ../../whatsnew/3.14.rst:3252 msgid "Binary releases for the experimental just-in-time compiler" msgstr "" -#: ../../whatsnew/3.14.rst:3248 +#: ../../whatsnew/3.14.rst:3254 msgid "" "The official macOS and Windows release binaries now include an " "*experimental* just-in-time (JIT) compiler. Although it is **not** " @@ -6318,7 +6327,7 @@ msgid "" "off` configuration option for similar behavior." msgstr "" -#: ../../whatsnew/3.14.rst:3255 +#: ../../whatsnew/3.14.rst:3261 msgid "" "The JIT is at an early stage and still in active development. As such, the " "typical performance impact of enabling it can range from 10% slower to 20% " @@ -6330,7 +6339,7 @@ msgid "" "current process." msgstr "" -#: ../../whatsnew/3.14.rst:3263 +#: ../../whatsnew/3.14.rst:3269 msgid "" "Currently, the most significant missing functionality is that native " "debuggers and profilers like ``gdb`` and ``perf`` are unable to unwind " @@ -6339,76 +6348,76 @@ msgid "" "not support JIT compilation." msgstr "" -#: ../../whatsnew/3.14.rst:3268 +#: ../../whatsnew/3.14.rst:3274 msgid "" "Please report any bugs or major performance regressions that you encounter!" msgstr "" -#: ../../whatsnew/3.14.rst:3270 +#: ../../whatsnew/3.14.rst:3276 msgid ":pep:`744`" msgstr "" -#: ../../whatsnew/3.14.rst:3274 +#: ../../whatsnew/3.14.rst:3280 msgid "Porting to Python 3.14" msgstr "" -#: ../../whatsnew/3.14.rst:3276 +#: ../../whatsnew/3.14.rst:3282 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.14.rst:3281 +#: ../../whatsnew/3.14.rst:3287 msgid "Changes in the Python API" msgstr "Änderungen in der Python API" -#: ../../whatsnew/3.14.rst:3283 +#: ../../whatsnew/3.14.rst:3289 msgid "" "On Unix platforms other than macOS, *forkserver* is now the default :ref:" "`start method ` for :mod:`multiprocessing` " "and :class:`~concurrent.futures.ProcessPoolExecutor`, instead of *fork*." msgstr "" -#: ../../whatsnew/3.14.rst:3287 +#: ../../whatsnew/3.14.rst:3293 msgid "" "See :ref:`(1) ` and :ref:`(2) " "` for details." msgstr "" -#: ../../whatsnew/3.14.rst:3290 +#: ../../whatsnew/3.14.rst:3296 msgid "" "If you encounter :exc:`NameError`\\s or pickling errors coming out of :mod:" "`multiprocessing` or :mod:`concurrent.futures`, see the :ref:`forkserver " "restrictions `." msgstr "" -#: ../../whatsnew/3.14.rst:3294 +#: ../../whatsnew/3.14.rst:3300 msgid "" "This change does not affect Windows or macOS, where :ref:`'spawn' " "` remains the default start method." msgstr "" -#: ../../whatsnew/3.14.rst:3297 +#: ../../whatsnew/3.14.rst:3303 msgid "" ":class:`functools.partial` is now a method descriptor. Wrap it in :func:" "`staticmethod` if you want to preserve the old behavior. (Contributed by " "Serhiy Storchaka and Dominykas Grigonis in :gh:`121027`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3301 +#: ../../whatsnew/3.14.rst:3307 msgid "" "The :ref:`garbage collector is now incremental `, which means that the behavior of :func:`gc.collect` changes slightly:" msgstr "" -#: ../../whatsnew/3.14.rst:3308 +#: ../../whatsnew/3.14.rst:3314 msgid "" "The :func:`locale.nl_langinfo` function now temporarily sets the " "``LC_CTYPE`` locale in some cases. This temporary change affects other " "threads. (Contributed by Serhiy Storchaka in :gh:`69998`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3313 +#: ../../whatsnew/3.14.rst:3319 msgid "" ":func:`pickle.dump` and :func:`pickle.dumps` now raise :exc:`~pickle." "PicklingError` for some failures that previously raised :exc:" @@ -6420,14 +6429,14 @@ msgid "" "PicklingError`. (Contributed by Serhiy Storchaka in :gh:`122311`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3323 +#: ../../whatsnew/3.14.rst:3329 msgid "" ":class:`types.UnionType` is now an alias for :class:`typing.Union`, causing " "changes in some behaviors. See :ref:`above ` for " "more details. (Contributed by Jelle Zijlstra in :gh:`105499`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3328 +#: ../../whatsnew/3.14.rst:3334 msgid "" "The runtime behavior of annotations has changed in various ways; see :ref:" "`above ` for details. While most code that " @@ -6435,29 +6444,29 @@ msgid "" "details may behave differently." msgstr "" -#: ../../whatsnew/3.14.rst:3333 +#: ../../whatsnew/3.14.rst:3339 msgid "" "As part of making the :mod:`mimetypes` CLI public, it now exits with ``1`` " "on failure instead of ``0`` and ``2`` on incorrect command-line parameters " "instead of ``1``. Error messages are now printed to stderr." msgstr "" -#: ../../whatsnew/3.14.rst:3338 +#: ../../whatsnew/3.14.rst:3344 msgid "" "The ``\\B`` pattern in regular expression now matches the empty string when " "given as the entire pattern, which may cause behavioural changes." msgstr "" -#: ../../whatsnew/3.14.rst:3341 +#: ../../whatsnew/3.14.rst:3347 msgid "" "On FreeBSD, :data:`sys.platform` no longer contains the major version number." msgstr "" -#: ../../whatsnew/3.14.rst:3347 +#: ../../whatsnew/3.14.rst:3353 msgid "Changes in annotations (:pep:`649` and :pep:`749`)" msgstr "" -#: ../../whatsnew/3.14.rst:3349 +#: ../../whatsnew/3.14.rst:3355 msgid "" "This section contains guidance on changes that may be needed to annotations " "or Python code that interacts with or introspects annotations, due to the " @@ -6465,24 +6474,24 @@ msgid "" "deferred-annotations>`." msgstr "" -#: ../../whatsnew/3.14.rst:3354 +#: ../../whatsnew/3.14.rst:3360 msgid "" "In the majority of cases, working code from older versions of Python will " "not require any changes." msgstr "" -#: ../../whatsnew/3.14.rst:3359 +#: ../../whatsnew/3.14.rst:3365 msgid "Implications for annotated code" msgstr "" -#: ../../whatsnew/3.14.rst:3361 +#: ../../whatsnew/3.14.rst:3367 msgid "" "If you define annotations in your code (for example, for use with a static " "type checker), then this change probably does not affect you: you can keep " "writing annotations the same way you did with previous versions of Python." msgstr "" -#: ../../whatsnew/3.14.rst:3365 +#: ../../whatsnew/3.14.rst:3371 msgid "" "You will likely be able to remove quoted strings in annotations, which are " "frequently used for forward references. Similarly, if you use ``from " @@ -6493,11 +6502,11 @@ msgid "" "annotations before they work as expected." msgstr "" -#: ../../whatsnew/3.14.rst:3375 +#: ../../whatsnew/3.14.rst:3381 msgid "Implications for readers of ``__annotations__``" msgstr "" -#: ../../whatsnew/3.14.rst:3377 +#: ../../whatsnew/3.14.rst:3383 msgid "" "If your code reads the :attr:`~object.__annotations__` attribute on objects, " "you may want to make changes in order to support code that relies on " @@ -6506,7 +6515,7 @@ msgid "" "FORWARDREF` format, as the :mod:`dataclasses` module now does." msgstr "" -#: ../../whatsnew/3.14.rst:3384 +#: ../../whatsnew/3.14.rst:3390 msgid "" "The external :pypi:`typing_extensions` package provides partial backports of " "some of the functionality of the :mod:`annotationlib` module, such as the :" @@ -6515,11 +6524,11 @@ msgid "" "that takes advantage of the new behavior in Python 3.14." msgstr "" -#: ../../whatsnew/3.14.rst:3393 +#: ../../whatsnew/3.14.rst:3399 msgid "Related changes" msgstr "" -#: ../../whatsnew/3.14.rst:3395 +#: ../../whatsnew/3.14.rst:3401 msgid "" "The changes in Python 3.14 are designed to rework how :attr:`!" "__annotations__` works at runtime while minimizing breakage to code that " @@ -6531,7 +6540,7 @@ msgid "" "the :mod:`annotationlib` module." msgstr "" -#: ../../whatsnew/3.14.rst:3404 +#: ../../whatsnew/3.14.rst:3410 msgid "" "In particular, do not read annotations directly from the namespace " "dictionary attribute of type objects. Use :func:`annotationlib." @@ -6539,25 +6548,25 @@ msgid "" "`annotationlib.get_annotations` afterwards." msgstr "" -#: ../../whatsnew/3.14.rst:3409 +#: ../../whatsnew/3.14.rst:3415 msgid "" "In previous releases, it was sometimes possible to access class annotations " "from an instance of an annotated class. This behavior was undocumented and " "accidental, and will no longer work in Python 3.14." msgstr "" -#: ../../whatsnew/3.14.rst:3415 +#: ../../whatsnew/3.14.rst:3421 msgid "``from __future__ import annotations``" msgstr "" -#: ../../whatsnew/3.14.rst:3417 +#: ../../whatsnew/3.14.rst:3423 msgid "" "In Python 3.7, :pep:`563` introduced the ``from __future__ import " "annotations`` :ref:`future statement `, which turns all annotations " "into strings." msgstr "" -#: ../../whatsnew/3.14.rst:3420 +#: ../../whatsnew/3.14.rst:3426 msgid "" "However, this statement is now deprecated and it is expected to be removed " "in a future version of Python. This removal will not happen until after " @@ -6565,17 +6574,17 @@ msgid "" "Python without support for deferred evaluation of annotations." msgstr "" -#: ../../whatsnew/3.14.rst:3426 +#: ../../whatsnew/3.14.rst:3432 msgid "" "In Python 3.14, the behavior of code using ``from __future__ import " "annotations`` is unchanged." msgstr "" -#: ../../whatsnew/3.14.rst:3431 +#: ../../whatsnew/3.14.rst:3437 msgid "Changes in the C API" msgstr "" -#: ../../whatsnew/3.14.rst:3433 +#: ../../whatsnew/3.14.rst:3439 msgid "" ":c:func:`Py_Finalize` now deletes all interned strings. This is backwards " "incompatible to any C extension that holds onto an interned string after a " @@ -6588,14 +6597,14 @@ msgid "" "`113601`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3443 +#: ../../whatsnew/3.14.rst:3449 msgid "" "The :ref:`Unicode Exception Objects ` C API now raises a :" "exc:`TypeError` if its exception argument is not a :exc:`UnicodeError` " "object. (Contributed by Bénédikt Tran in :gh:`127691`.)" msgstr "" -#: ../../whatsnew/3.14.rst:3450 +#: ../../whatsnew/3.14.rst:3456 msgid "" "The interpreter internally avoids some reference count modifications when " "loading objects onto the operands stack by :term:`borrowing , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../whatsnew/3.14.rst:4 +msgid "What's new in Python 3.14" +msgstr "" + +#: ../../whatsnew/3.14.rst:0 +msgid "Editors" +msgstr "" + +#: ../../whatsnew/3.14.rst:6 +msgid "Adam Turner and Hugo van Kemenade" +msgstr "" + +#: ../../whatsnew/3.14.rst:48 +msgid "" +"This article explains the new features in Python 3.14, compared to 3.13. " +"Python 3.14 was released on 7 October 2025. For full details, see the :ref:" +"`changelog `." +msgstr "" + +#: ../../whatsnew/3.14.rst:54 +msgid ":pep:`745` -- Python 3.14 release schedule" +msgstr "" + +#: ../../whatsnew/3.14.rst:58 +msgid "Summary -- Release highlights" +msgstr "Zusammenfassung - Release Höhepunkte" + +#: ../../whatsnew/3.14.rst:63 +msgid "" +"Python 3.14 is the latest stable release of the Python programming language, " +"with a mix of changes to the language, the implementation, and the standard " +"library. The biggest changes include :ref:`template string literals " +"`, :ref:`deferred evaluation of " +"annotations `, and support for :ref:" +"`subinterpreters ` in the standard " +"library." +msgstr "" + +#: ../../whatsnew/3.14.rst:72 +msgid "" +"The library changes include significantly improved capabilities for :ref:" +"`introspection in asyncio `, :ref:" +"`support for Zstandard ` via a new :mod:`compression." +"zstd` module, syntax highlighting in the REPL, as well as the usual " +"deprecations and removals, and improvements in user-friendliness and " +"correctness." +msgstr "" + +#: ../../whatsnew/3.14.rst:79 +msgid "" +"This article doesn't attempt to provide a complete specification of all new " +"features, but instead gives a convenient overview. For full details refer to " +"the documentation, such as the :ref:`Library Reference ` and :" +"ref:`Language Reference `. To understand the complete " +"implementation and design rationale for a change, refer to the PEP for a " +"particular new feature; but note that PEPs usually are not kept up-to-date " +"once a feature has been fully implemented. See `Porting to Python 3.14`_ for " +"guidance on upgrading from earlier versions of Python." +msgstr "" + +#: ../../whatsnew/3.14.rst:95 +msgid "Interpreter improvements:" +msgstr "" + +#: ../../whatsnew/3.14.rst:97 +msgid "" +":pep:`649` and :pep:`749`: :ref:`Deferred evaluation of annotations " +"`" +msgstr "" + +#: ../../whatsnew/3.14.rst:99 +msgid "" +":pep:`734`: :ref:`Multiple interpreters in the standard library `" +msgstr "" + +#: ../../whatsnew/3.14.rst:101 +msgid "" +":pep:`750`: :ref:`Template strings `" +msgstr "" + +#: ../../whatsnew/3.14.rst:102 +msgid "" +":pep:`758`: :ref:`Allow except and except* expressions without brackets " +"`" +msgstr "" + +#: ../../whatsnew/3.14.rst:104 +msgid "" +":pep:`765`: :ref:`Control flow in finally blocks `" +msgstr "" + +#: ../../whatsnew/3.14.rst:106 +msgid "" +":pep:`768`: :ref:`Safe external debugger interface for CPython `" +msgstr "" + +#: ../../whatsnew/3.14.rst:108 +msgid ":ref:`A new type of interpreter `" +msgstr "" + +#: ../../whatsnew/3.14.rst:109 +msgid "" +":ref:`Free-threaded mode improvements `" +msgstr "" + +#: ../../whatsnew/3.14.rst:110 +msgid ":ref:`Improved error messages `" +msgstr "" + +#: ../../whatsnew/3.14.rst:111 +msgid ":ref:`Incremental garbage collection `" +msgstr "" + +#: ../../whatsnew/3.14.rst:113 +msgid "Significant improvements in the standard library:" +msgstr "" + +#: ../../whatsnew/3.14.rst:115 +msgid "" +":pep:`784`: :ref:`Zstandard support in the standard library `" +msgstr "" + +#: ../../whatsnew/3.14.rst:117 +msgid ":ref:`whatsnew314-asyncio-introspection`" +msgstr "" + +#: ../../whatsnew/3.14.rst:118 +msgid ":ref:`whatsnew314-concurrent-warnings-control`" +msgstr "" + +#: ../../whatsnew/3.14.rst:119 +msgid "" +":ref:`Syntax highlighting in the default interactive shell `, and color output in several standard library CLIs" +msgstr "" + +#: ../../whatsnew/3.14.rst:123 +msgid "C API improvements:" +msgstr "" + +#: ../../whatsnew/3.14.rst:125 +msgid ":pep:`741`: :ref:`Python configuration C API `" +msgstr "" + +#: ../../whatsnew/3.14.rst:127 +msgid "Platform support:" +msgstr "" + +#: ../../whatsnew/3.14.rst:129 +msgid "" +":pep:`776`: Emscripten is now an :ref:`officially supported platform " +"`, at :pep:`tier 3 <11#tier-3>`." +msgstr "" + +#: ../../whatsnew/3.14.rst:132 +msgid "Release changes:" +msgstr "" + +#: ../../whatsnew/3.14.rst:134 +msgid "" +":pep:`779`: :ref:`Free-threaded Python is officially supported `" +msgstr "" + +#: ../../whatsnew/3.14.rst:136 +msgid "" +":pep:`761`: :ref:`PGP signatures have been discontinued for official " +"releases `" +msgstr "" + +#: ../../whatsnew/3.14.rst:138 +msgid "" +":ref:`Windows and macOS binary releases now support the experimental just-in-" +"time compiler `" +msgstr "" + +#: ../../whatsnew/3.14.rst:140 +msgid "" +":ref:`Binary releases for Android are now provided `" +msgstr "" + +#: ../../whatsnew/3.14.rst:144 +msgid "New features" +msgstr "" + +#: ../../whatsnew/3.14.rst:149 +msgid ":pep:`649` & :pep:`749`: Deferred evaluation of annotations" +msgstr "" + +#: ../../whatsnew/3.14.rst:151 +msgid "" +"The :term:`annotations ` on functions, classes, and modules are " +"no longer evaluated eagerly. Instead, annotations are stored in special-" +"purpose :term:`annotate functions ` and evaluated only " +"when necessary (except if ``from __future__ import annotations`` is used)." +msgstr "" + +#: ../../whatsnew/3.14.rst:156 +msgid "" +"This change is designed to improve performance and usability of annotations " +"in Python in most circumstances. The runtime cost for defining annotations " +"is minimized, but it remains possible to introspect annotations at runtime. " +"It is no longer necessary to enclose annotations in strings if they contain " +"forward references." +msgstr "" + +#: ../../whatsnew/3.14.rst:162 +msgid "" +"The new :mod:`annotationlib` module provides tools for inspecting deferred " +"annotations. Annotations may be evaluated in the :attr:`~annotationlib." +"Format.VALUE` format (which evaluates annotations to runtime values, similar " +"to the behavior in earlier Python versions), the :attr:`~annotationlib." +"Format.FORWARDREF` format (which replaces undefined names with special " +"markers), and the :attr:`~annotationlib.Format.STRING` format (which returns " +"annotations as strings)." +msgstr "" + +#: ../../whatsnew/3.14.rst:169 +msgid "This example shows how these formats behave:" +msgstr "" + +#: ../../whatsnew/3.14.rst:171 +msgid "" +">>> from annotationlib import get_annotations, Format\n" +">>> def func(arg: Undefined):\n" +"... pass\n" +">>> get_annotations(func, format=Format.VALUE)\n" +"Traceback (most recent call last):\n" +" ...\n" +"NameError: name 'Undefined' is not defined\n" +">>> get_annotations(func, format=Format.FORWARDREF)\n" +"{'arg': ForwardRef('Undefined', owner=)}\n" +">>> get_annotations(func, format=Format.STRING)\n" +"{'arg': 'Undefined'}" +msgstr "" + +#: ../../whatsnew/3.14.rst:185 +msgid "" +"The :ref:`porting ` section contains " +"guidance on changes that may be needed due to these changes, though in the " +"majority of cases, code will continue working as-is." +msgstr "" + +#: ../../whatsnew/3.14.rst:189 +msgid "" +"(Contributed by Jelle Zijlstra in :pep:`749` and :gh:`119180`; :pep:`649` " +"was written by Larry Hastings.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:194 +msgid ":pep:`649`" +msgstr "" + +#: ../../whatsnew/3.14.rst:195 +msgid "Deferred Evaluation Of Annotations Using Descriptors" +msgstr "" + +#: ../../whatsnew/3.14.rst:196 +msgid ":pep:`749`" +msgstr "" + +#: ../../whatsnew/3.14.rst:197 +msgid "Implementing PEP 649" +msgstr "" + +#: ../../whatsnew/3.14.rst:203 +msgid ":pep:`734`: Multiple interpreters in the standard library" +msgstr "" + +#: ../../whatsnew/3.14.rst:205 +msgid "" +"The CPython runtime supports running multiple copies of Python in the same " +"process simultaneously and has done so for over 20 years. Each of these " +"separate copies is called an 'interpreter'. However, the feature had been " +"available only through the :ref:`C-API `." +msgstr "" + +#: ../../whatsnew/3.14.rst:211 +msgid "" +"That limitation is removed in Python 3.14, with the new :mod:`concurrent." +"interpreters` module." +msgstr "" + +#: ../../whatsnew/3.14.rst:214 +msgid "" +"There are at least two notable reasons why using multiple interpreters has " +"significant benefits:" +msgstr "" + +#: ../../whatsnew/3.14.rst:217 +msgid "they support a new (to Python), human-friendly concurrency model" +msgstr "" + +#: ../../whatsnew/3.14.rst:218 +msgid "true multi-core parallelism" +msgstr "" + +#: ../../whatsnew/3.14.rst:220 +msgid "" +"For some use cases, concurrency in software improves efficiency and can " +"simplify design, at a high level. At the same time, implementing and " +"maintaining all but the simplest concurrency is often a struggle for the " +"human brain. That especially applies to plain threads (for example, :mod:" +"`threading`), where all memory is shared between all threads." +msgstr "" + +#: ../../whatsnew/3.14.rst:227 +msgid "" +"With multiple isolated interpreters, you can take advantage of a class of " +"concurrency models, like Communicating Sequential Processes (CSP) or the " +"actor model, that have found success in other programming languages, like " +"Smalltalk, Erlang, Haskell, and Go. Think of multiple interpreters as " +"threads but with opt-in sharing." +msgstr "" + +#: ../../whatsnew/3.14.rst:234 +msgid "" +"Regarding multi-core parallelism: as of Python 3.12, interpreters are now " +"sufficiently isolated from one another to be used in parallel (see :pep:" +"`684`). This unlocks a variety of CPU-intensive use cases for Python that " +"were limited by the :term:`GIL`." +msgstr "" + +#: ../../whatsnew/3.14.rst:239 +msgid "" +"Using multiple interpreters is similar in many ways to :mod:" +"`multiprocessing`, in that they both provide isolated logical \"processes\" " +"that can run in parallel, with no sharing by default. However, when using " +"multiple interpreters, an application will use fewer system resources and " +"will operate more efficiently (since it stays within the same process). " +"Think of multiple interpreters as having the isolation of processes with the " +"efficiency of threads." +msgstr "" + +#: ../../whatsnew/3.14.rst:250 +msgid "" +"While the feature has been around for decades, multiple interpreters have " +"not been used widely, due to low awareness and the lack of a standard " +"library module. Consequently, they currently have several notable " +"limitations, which are expected to improve significantly now that the " +"feature is going mainstream." +msgstr "" + +#: ../../whatsnew/3.14.rst:256 +msgid "Current limitations:" +msgstr "" + +#: ../../whatsnew/3.14.rst:258 +msgid "starting each interpreter has not been optimized yet" +msgstr "" + +#: ../../whatsnew/3.14.rst:259 +msgid "" +"each interpreter uses more memory than necessary (work continues on " +"extensive internal sharing between interpreters)" +msgstr "" + +#: ../../whatsnew/3.14.rst:261 +msgid "" +"there aren't many options *yet* for truly sharing objects or other data " +"between interpreters (other than :type:`memoryview`)" +msgstr "" + +#: ../../whatsnew/3.14.rst:263 +msgid "" +"many third-party extension modules on PyPI are not yet compatible with " +"multiple interpreters (all standard library extension modules *are* " +"compatible)" +msgstr "" + +#: ../../whatsnew/3.14.rst:266 +msgid "" +"the approach to writing applications that use multiple isolated interpreters " +"is mostly unfamiliar to Python users, for now" +msgstr "" + +#: ../../whatsnew/3.14.rst:269 +msgid "" +"The impact of these limitations will depend on future CPython improvements, " +"how interpreters are used, and what the community solves through PyPI " +"packages. Depending on the use case, the limitations may not have much " +"impact, so try it out!" +msgstr "" + +#: ../../whatsnew/3.14.rst:274 +msgid "" +"Furthermore, future CPython releases will reduce or eliminate overhead and " +"provide utilities that are less appropriate on PyPI. In the meantime, most " +"of the limitations can also be addressed through extension modules, meaning " +"PyPI packages can fill any gap for 3.14, and even back to 3.12 where " +"interpreters were finally properly isolated and stopped sharing the :term:" +"`GIL`. Likewise, libraries on PyPI are expected to emerge for high-level " +"abstractions on top of interpreters." +msgstr "" + +#: ../../whatsnew/3.14.rst:282 +msgid "" +"Regarding extension modules, work is in progress to update some PyPI " +"projects, as well as tools like Cython, pybind11, nanobind, and PyO3. The " +"steps for isolating an extension module are found at :ref:`isolating-" +"extensions-howto`. Isolating a module has a lot of overlap with what is " +"required to support :ref:`free-threading `, so the ongoing work in the community in that area will help " +"accelerate support for multiple interpreters." +msgstr "" + +#: ../../whatsnew/3.14.rst:291 +msgid "" +"Also added in 3.14: :ref:`concurrent.futures.InterpreterPoolExecutor " +"`." +msgstr "" + +#: ../../whatsnew/3.14.rst:294 +msgid "(Contributed by Eric Snow in :gh:`134939`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:296 +msgid ":pep:`734`" +msgstr "" + +#: ../../whatsnew/3.14.rst:302 +msgid ":pep:`750`: Template string literals" +msgstr "" + +#: ../../whatsnew/3.14.rst:304 +msgid "" +"Template strings are a new mechanism for custom string processing. They " +"share the familiar syntax of f-strings but, unlike f-strings, return an " +"object representing the static and interpolated parts of the string, instead " +"of a simple :class:`str`." +msgstr "" + +#: ../../whatsnew/3.14.rst:309 +msgid "To write a t-string, use a ``'t'`` prefix instead of an ``'f'``:" +msgstr "" + +#: ../../whatsnew/3.14.rst:311 +msgid "" +">>> variety = 'Stilton'\n" +">>> template = t'Try some {variety} cheese!'\n" +">>> type(template)\n" +"" +msgstr "" + +#: ../../whatsnew/3.14.rst:318 +msgid "" +":class:`~string.templatelib.Template` objects provide access to the static " +"and interpolated (in curly braces) parts of a string *before* they are " +"combined. Iterate over :class:`!Template` instances to access their parts in " +"order:" +msgstr "" + +#: ../../whatsnew/3.14.rst:327 +msgid "" +">>> list(template)\n" +"['Try some ', Interpolation('Stilton', 'variety', None, ''), ' cheese!']" +msgstr "" + +#: ../../whatsnew/3.14.rst:332 +msgid "" +"It's easy to write (or call) code to process :class:`!Template` instances. " +"For example, here's a function that renders static parts lowercase and :" +"class:`~string.templatelib.Interpolation` instances uppercase:" +msgstr "" + +#: ../../whatsnew/3.14.rst:336 +msgid "" +"from string.templatelib import Interpolation\n" +"\n" +"def lower_upper(template):\n" +" \"\"\"Render static parts lowercase and interpolations uppercase.\"\"\"\n" +" parts = []\n" +" for part in template:\n" +" if isinstance(part, Interpolation):\n" +" parts.append(str(part.value).upper())\n" +" else:\n" +" parts.append(part.lower())\n" +" return ''.join(parts)\n" +"\n" +"name = 'Wenslydale'\n" +"template = t'Mister {name}'\n" +"assert lower_upper(template) == 'mister WENSLYDALE'" +msgstr "" + +#: ../../whatsnew/3.14.rst:354 +msgid "" +"Because :class:`!Template` instances distinguish between static strings and " +"interpolations at runtime, they can be useful for sanitising user input. " +"Writing a :func:`!html` function that escapes user input in HTML is an " +"exercise left to the reader! Template processing code can provide improved " +"flexibility. For instance, a more advanced :func:`!html` function could " +"accept a :class:`!dict` of HTML attributes directly in the template:" +msgstr "" + +#: ../../whatsnew/3.14.rst:362 +msgid "" +"attributes = {'src': 'limburger.jpg', 'alt': 'lovely cheese'}\n" +"template = t''\n" +"assert html(template) == '\"lovely'" +msgstr "" + +#: ../../whatsnew/3.14.rst:368 +msgid "" +"Of course, template processing code does not need to return a string-like " +"result. An even *more* advanced :func:`!html` could return a custom type " +"representing a DOM-like structure." +msgstr "" + +#: ../../whatsnew/3.14.rst:372 +msgid "" +"With t-strings in place, developers can write systems that sanitise SQL, " +"make safe shell operations, improve logging, tackle modern ideas in web " +"development (HTML, CSS, and so on), and implement lightweight custom " +"business DSLs." +msgstr "" + +#: ../../whatsnew/3.14.rst:376 +msgid "" +"(Contributed by Jim Baker, Guido van Rossum, Paul Everitt, Koudai Aono, " +"Lysandros Nikolaou, Dave Peck, Adam Turner, Jelle Zijlstra, Bénédikt Tran, " +"and Pablo Galindo Salgado in :gh:`132661`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:380 +msgid ":pep:`750`." +msgstr "" + +#: ../../whatsnew/3.14.rst:386 +msgid ":pep:`768`: Safe external debugger interface" +msgstr "" + +#: ../../whatsnew/3.14.rst:388 +msgid "" +"Python 3.14 introduces a zero-overhead debugging interface that allows " +"debuggers and profilers to safely attach to running Python processes without " +"stopping or restarting them. This is a significant enhancement to Python's " +"debugging capabilities, meaning that unsafe alternatives are no longer " +"required." +msgstr "" + +#: ../../whatsnew/3.14.rst:394 +msgid "" +"The new interface provides safe execution points for attaching debugger code " +"without modifying the interpreter's normal execution path or adding any " +"overhead at runtime. Due to this, tools can now inspect and interact with " +"Python applications in real-time, which is a crucial capability for high-" +"availability systems and production environments." +msgstr "" + +#: ../../whatsnew/3.14.rst:401 +msgid "" +"For convenience, this interface is implemented in the :func:`sys." +"remote_exec` function. For example:" +msgstr "" + +#: ../../whatsnew/3.14.rst:404 +msgid "" +"import sys\n" +"from tempfile import NamedTemporaryFile\n" +"\n" +"with NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f:\n" +" script_path = f.name\n" +" f.write(f'import my_debugger; my_debugger.connect({os.getpid()})')\n" +"\n" +"# Execute in process with PID 1234\n" +"print('Behold! An offering:')\n" +"sys.remote_exec(1234, script_path)" +msgstr "" + +#: ../../whatsnew/3.14.rst:418 +msgid "" +"This function allows sending Python code to be executed in a target process " +"at the next safe execution point. However, tool authors can also implement " +"the protocol directly as described in the PEP, which details the underlying " +"mechanisms used to safely attach to running processes." +msgstr "" + +#: ../../whatsnew/3.14.rst:424 +msgid "" +"The debugging interface has been carefully designed with security in mind " +"and includes several mechanisms to control access:" +msgstr "" + +#: ../../whatsnew/3.14.rst:427 +msgid "A :envvar:`PYTHON_DISABLE_REMOTE_DEBUG` environment variable." +msgstr "" + +#: ../../whatsnew/3.14.rst:428 +msgid "A :option:`-X disable-remote-debug` command-line option." +msgstr "" + +#: ../../whatsnew/3.14.rst:429 +msgid "" +"A :option:`--without-remote-debug` configure flag to completely disable the " +"feature at build time." +msgstr "" + +#: ../../whatsnew/3.14.rst:432 +msgid "" +"(Contributed by Pablo Galindo Salgado, Matt Wozniski, and Ivona Stojanovic " +"in :gh:`131591`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:435 +msgid ":pep:`768`." +msgstr "" + +#: ../../whatsnew/3.14.rst:441 +msgid "A new type of interpreter" +msgstr "" + +#: ../../whatsnew/3.14.rst:443 +msgid "" +"A new type of interpreter has been added to CPython. It uses tail calls " +"between small C functions that implement individual Python opcodes, rather " +"than one large C ``case`` statement. For certain newer compilers, this " +"interpreter provides significantly better performance. Preliminary " +"benchmarks suggest a geometric mean of 3-5% faster on the standard " +"``pyperformance`` benchmark suite, depending on platform and architecture. " +"The baseline is Python 3.14 built with Clang 19, without this new " +"interpreter." +msgstr "" + +#: ../../whatsnew/3.14.rst:452 +msgid "" +"This interpreter currently only works with Clang 19 and newer on x86-64 and " +"AArch64 architectures. However, a future release of GCC is expected to " +"support this as well." +msgstr "" + +#: ../../whatsnew/3.14.rst:456 +msgid "" +"This feature is opt-in for now. Enabling profile-guided optimization is " +"highly recommended when using the new interpreter as it is the only " +"configuration that has been tested and validated for improved performance. " +"For further information, see :option:`--with-tail-call-interp`." +msgstr "" + +#: ../../whatsnew/3.14.rst:463 +msgid "" +"This is not to be confused with `tail call optimization`__ of Python " +"functions, which is currently not implemented in CPython." +msgstr "" + +#: ../../whatsnew/3.14.rst:466 +msgid "" +"This new interpreter type is an internal implementation detail of the " +"CPython interpreter. It doesn't change the visible behavior of Python " +"programs at all. It can improve their performance, but doesn't change " +"anything else." +msgstr "" + +#: ../../whatsnew/3.14.rst:472 +msgid "" +"(Contributed by Ken Jin in :gh:`128563`, with ideas on how to implement this " +"in CPython by Mark Shannon, Garrett Gu, Haoran Xu, and Josh Haberman.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:479 +msgid "Free-threaded mode improvements" +msgstr "" + +#: ../../whatsnew/3.14.rst:481 +msgid "" +"CPython's free-threaded mode (:pep:`703`), initially added in 3.13, has been " +"significantly improved in Python 3.14. The implementation described in PEP " +"703 has been finished, including C API changes, and temporary workarounds in " +"the interpreter were replaced with more permanent solutions. The " +"specializing adaptive interpreter (:pep:`659`) is now enabled in free-" +"threaded mode, which along with many other optimizations greatly improves " +"its performance. The performance penalty on single-threaded code in free-" +"threaded mode is now roughly 5-10%, depending on the platform and C compiler " +"used." +msgstr "" + +#: ../../whatsnew/3.14.rst:492 +msgid "" +"From Python 3.14, when compiling extension modules for the free-threaded " +"build of CPython on Windows, the preprocessor variable ``Py_GIL_DISABLED`` " +"now needs to be specified by the build backend, as it will no longer be " +"determined automatically by the C compiler. For a running interpreter, the " +"setting that was used at compile time can be found using :func:`sysconfig." +"get_config_var`." +msgstr "" + +#: ../../whatsnew/3.14.rst:498 +msgid "" +"The new :option:`-X context_aware_warnings <-X>` flag controls if :ref:" +"`concurrent safe warnings control ` " +"is enabled. The flag defaults to true for the free-threaded build and false " +"for the GIL-enabled build." +msgstr "" + +#: ../../whatsnew/3.14.rst:503 +msgid "" +"A new :data:`~sys.flags.thread_inherit_context` flag has been added, which " +"if enabled means that threads created with :class:`threading.Thread` start " +"with a copy of the :class:`~contextvars.Context()` of the caller of :meth:" +"`~threading.Thread.start`. Most significantly, this makes the warning " +"filtering context established by :class:`~warnings.catch_warnings` be " +"\"inherited\" by threads (or asyncio tasks) started within that context. It " +"also affects other modules that use context variables, such as the :mod:" +"`decimal` context manager. This flag defaults to true for the free-threaded " +"build and false for the GIL-enabled build." +msgstr "" + +#: ../../whatsnew/3.14.rst:514 +msgid "" +"(Contributed by Sam Gross, Matt Page, Neil Schemenauer, Thomas Wouters, " +"Donghee Na, Kirill Podoprigora, Ken Jin, Itamar Oren, Brett Simmers, Dino " +"Viehland, Nathan Goldbaum, Ralf Gommers, Lysandros Nikolaou, Kumar Aditya, " +"Edgar Margffoy, and many others. Some of these contributors are employed by " +"Meta, which has continued to provide significant engineering resources to " +"support this project.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:525 +msgid "Improved error messages" +msgstr "" + +#: ../../whatsnew/3.14.rst:527 +msgid "" +"The interpreter now provides helpful suggestions when it detects typos in " +"Python keywords. When a word that closely resembles a Python keyword is " +"encountered, the interpreter will suggest the correct keyword in the error " +"message. This feature helps programmers quickly identify and fix common " +"typing mistakes. For example:" +msgstr "" + +#: ../../whatsnew/3.14.rst:533 +msgid "" +">>> whille True:\n" +"... pass\n" +"Traceback (most recent call last):\n" +" File \"\", line 1\n" +" whille True:\n" +" ^^^^^^\n" +"SyntaxError: invalid syntax. Did you mean 'while'?" +msgstr "" + +#: ../../whatsnew/3.14.rst:543 +msgid "" +"While the feature focuses on the most common cases, some variations of " +"misspellings may still result in regular syntax errors. (Contributed by " +"Pablo Galindo in :gh:`132449`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:547 +msgid "" +":keyword:`elif` statements that follow an :keyword:`else` block now have a " +"specific error message. (Contributed by Steele Farnsworth in :gh:`129902`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:551 +msgid "" +">>> if who == \"me\":\n" +"... print(\"It's me!\")\n" +"... else:\n" +"... print(\"It's not me!\")\n" +"... elif who is None:\n" +"... print(\"Who is it?\")\n" +"File \"\", line 5\n" +" elif who is None:\n" +" ^^^^\n" +"SyntaxError: 'elif' block follows an 'else' block" +msgstr "" + +#: ../../whatsnew/3.14.rst:564 +msgid "" +"If a statement is passed to the :ref:`if_expr` after :keyword:`else`, or one " +"of :keyword:`pass`, :keyword:`break`, or :keyword:`continue` is passed " +"before :keyword:`if`, then the error message highlights where the :token:" +"`~python-grammar:expression` is required. (Contributed by Sergey Miryanov " +"in :gh:`129515`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:570 +msgid "" +">>> x = 1 if True else pass\n" +"Traceback (most recent call last):\n" +" File \"\", line 1\n" +" x = 1 if True else pass\n" +" ^^^^\n" +"SyntaxError: expected expression after 'else', but statement is given\n" +"\n" +">>> x = continue if True else break\n" +"Traceback (most recent call last):\n" +" File \"\", line 1\n" +" x = continue if True else break\n" +" ^^^^^^^^\n" +"SyntaxError: expected expression before 'if', but statement is given" +msgstr "" + +#: ../../whatsnew/3.14.rst:586 +msgid "" +"When incorrectly closed strings are detected, the error message suggests " +"that the string may be intended to be part of the string. (Contributed by " +"Pablo Galindo in :gh:`88535`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:590 +msgid "" +">>> \"The interesting object \"The important object\" is very important\"\n" +"Traceback (most recent call last):\n" +"SyntaxError: invalid syntax. Is this intended to be part of the string?" +msgstr "" + +#: ../../whatsnew/3.14.rst:596 +msgid "" +"When strings have incompatible prefixes, the error now shows which prefixes " +"are incompatible. (Contributed by Nikita Sobolev in :gh:`133197`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:600 +msgid "" +">>> ub'abc'\n" +" File \"\", line 1\n" +" ub'abc'\n" +" ^^\n" +"SyntaxError: 'u' and 'b' prefixes are incompatible" +msgstr "" + +#: ../../whatsnew/3.14.rst:608 +msgid "Improved error messages when using ``as`` with incompatible targets in:" +msgstr "" + +#: ../../whatsnew/3.14.rst:610 +msgid "Imports: ``import ... as ...``" +msgstr "" + +#: ../../whatsnew/3.14.rst:611 +msgid "From imports: ``from ... import ... as ...``" +msgstr "" + +#: ../../whatsnew/3.14.rst:612 +msgid "Except handlers: ``except ... as ...``" +msgstr "" + +#: ../../whatsnew/3.14.rst:613 +msgid "Pattern-match cases: ``case ... as ...``" +msgstr "" + +#: ../../whatsnew/3.14.rst:615 +msgid "" +"(Contributed by Nikita Sobolev in :gh:`123539`, :gh:`123562`, and :gh:" +"`123440`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:617 +msgid "" +"Improved error message when trying to add an instance of an unhashable type " +"to a :class:`dict` or :class:`set`. (Contributed by CF Bolz-Tereick and " +"Victor Stinner in :gh:`132828`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:621 +msgid "" +">>> s = set()\n" +">>> s.add({'pages': 12, 'grade': 'A'})\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" s.add({'pages': 12, 'grade': 'A'})\n" +" ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +"TypeError: cannot use 'dict' as a set element (unhashable type: 'dict')\n" +">>> d = {}\n" +">>> l = [1, 2, 3]\n" +">>> d[l] = 12\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" d[l] = 12\n" +" ~^^^\n" +"TypeError: cannot use 'list' as a dict key (unhashable type: 'list')" +msgstr "" + +#: ../../whatsnew/3.14.rst:639 +msgid "" +"Improved error message when an object supporting the synchronous context " +"manager protocol is entered using :keyword:`async with` instead of :keyword:" +"`with`, and vice versa for the asynchronous context manager protocol. " +"(Contributed by Bénédikt Tran in :gh:`128398`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:649 +msgid ":pep:`784`: Zstandard support in the standard library" +msgstr "" + +#: ../../whatsnew/3.14.rst:651 +msgid "" +"The new :mod:`!compression` package contains modules :mod:`!compression." +"lzma`, :mod:`!compression.bz2`, :mod:`!compression.gzip` and :mod:`!" +"compression.zlib` which re-export the :mod:`lzma`, :mod:`bz2`, :mod:`gzip` " +"and :mod:`zlib` modules respectively. The new import names under :mod:`!" +"compression` are the preferred names for importing these compression modules " +"from Python 3.14. However, the existing modules names have not been " +"deprecated. Any deprecation or removal of the existing compression modules " +"will occur no sooner than five years after the release of 3.14." +msgstr "" + +#: ../../whatsnew/3.14.rst:660 +msgid "" +"The new :mod:`!compression.zstd` module provides compression and " +"decompression APIs for the Zstandard format via bindings to `Meta's zstd " +"library `__. Zstandard is a widely " +"adopted, highly efficient, and fast compression format. In addition to the " +"APIs introduced in :mod:`!compression.zstd`, support for reading and writing " +"Zstandard compressed archives has been added to the :mod:`tarfile`, :mod:" +"`zipfile`, and :mod:`shutil` modules." +msgstr "" + +#: ../../whatsnew/3.14.rst:668 +msgid "Here's an example of using the new module to compress some data:" +msgstr "" + +#: ../../whatsnew/3.14.rst:670 +msgid "" +"from compression import zstd\n" +"import math\n" +"\n" +"data = str(math.pi).encode() * 20\n" +"compressed = zstd.compress(data)\n" +"ratio = len(compressed) / len(data)\n" +"print(f\"Achieved compression ratio of {ratio}\")" +msgstr "" + +#: ../../whatsnew/3.14.rst:680 +msgid "" +"As can be seen, the API is similar to the APIs of the :mod:`!lzma` and :mod:" +"`!bz2` modules." +msgstr "" + +#: ../../whatsnew/3.14.rst:683 +msgid "" +"(Contributed by Emma Harper Smith, Adam Turner, Gregory P. Smith, Tomas " +"Roun, Victor Stinner, and Rogdham in :gh:`132983`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:686 +msgid ":pep:`784`." +msgstr "" + +#: ../../whatsnew/3.14.rst:692 +msgid "Asyncio introspection capabilities" +msgstr "" + +#: ../../whatsnew/3.14.rst:694 +msgid "" +"Added a new command-line interface to inspect running Python processes using " +"asynchronous tasks, available via ``python -m asyncio ps PID`` or ``python -" +"m asyncio pstree PID``." +msgstr "" + +#: ../../whatsnew/3.14.rst:698 +msgid "" +"The ``ps`` subcommand inspects the given process ID (PID) and displays " +"information about currently running asyncio tasks. It outputs a task table: " +"a flat listing of all tasks, their names, their coroutine stacks, and which " +"tasks are awaiting them." +msgstr "" + +#: ../../whatsnew/3.14.rst:704 +msgid "" +"The ``pstree`` subcommand fetches the same information, but instead renders " +"a visual async call tree, showing coroutine relationships in a hierarchical " +"format. This command is particularly useful for debugging long-running or " +"stuck asynchronous programs. It can help developers quickly identify where a " +"program is blocked, what tasks are pending, and how coroutines are chained " +"together." +msgstr "" + +#: ../../whatsnew/3.14.rst:711 +msgid "For example given this code:" +msgstr "" + +#: ../../whatsnew/3.14.rst:713 +msgid "" +"import asyncio\n" +"\n" +"async def play_track(track):\n" +" await asyncio.sleep(5)\n" +" print(f'🎵 Finished: {track}')\n" +"\n" +"async def play_album(name, tracks):\n" +" async with asyncio.TaskGroup() as tg:\n" +" for track in tracks:\n" +" tg.create_task(play_track(track), name=track)\n" +"\n" +"async def main():\n" +" async with asyncio.TaskGroup() as tg:\n" +" tg.create_task(\n" +" play_album('Sundowning', ['TNDNBTG', 'Levitate']),\n" +" name='Sundowning')\n" +" tg.create_task(\n" +" play_album('TMBTE', ['DYWTYLM', 'Aqua Regia']),\n" +" name='TMBTE')\n" +"\n" +"if __name__ == '__main__':\n" +" asyncio.run(main())" +msgstr "" + +#: ../../whatsnew/3.14.rst:738 +msgid "" +"Executing the new tool on the running process will yield a table like this:" +msgstr "" + +#: ../../whatsnew/3.14.rst:740 +msgid "" +"python -m asyncio ps 12345\n" +"\n" +"tid task id task name coroutine " +"stack awaiter " +"chain awaiter name awaiter id\n" +"------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n" +"1935500 0x7fc930c18050 Task-1 TaskGroup._aexit -> " +"TaskGroup.__aexit__ -> " +"main " +"0x0\n" +"1935500 0x7fc930c18230 Sundowning TaskGroup._aexit -> " +"TaskGroup.__aexit__ -> album TaskGroup._aexit -> TaskGroup.__aexit__ -> " +"main Task-1 0x7fc930c18050\n" +"1935500 0x7fc93173fa50 TMBTE TaskGroup._aexit -> " +"TaskGroup.__aexit__ -> album TaskGroup._aexit -> TaskGroup.__aexit__ -> " +"main Task-1 0x7fc930c18050\n" +"1935500 0x7fc93173fdf0 TNDNBTG sleep -> " +"play TaskGroup._aexit -> TaskGroup." +"__aexit__ -> album Sundowning 0x7fc930c18230\n" +"1935500 0x7fc930d32510 Levitate sleep -> " +"play TaskGroup._aexit -> TaskGroup." +"__aexit__ -> album Sundowning 0x7fc930c18230\n" +"1935500 0x7fc930d32890 DYWTYLM sleep -> " +"play TaskGroup._aexit -> TaskGroup." +"__aexit__ -> album TMBTE 0x7fc93173fa50\n" +"1935500 0x7fc93161ec30 Aqua Regia sleep -> " +"play TaskGroup._aexit -> TaskGroup." +"__aexit__ -> album TMBTE 0x7fc93173fa50" +msgstr "" + +#: ../../whatsnew/3.14.rst:754 +msgid "or a tree like this:" +msgstr "" + +#: ../../whatsnew/3.14.rst:756 +msgid "" +"python -m asyncio pstree 12345\n" +"\n" +"└── (T) Task-1\n" +" └── main example.py:13\n" +" └── TaskGroup.__aexit__ Lib/asyncio/taskgroups.py:72\n" +" └── TaskGroup._aexit Lib/asyncio/taskgroups.py:121\n" +" ├── (T) Sundowning\n" +" │ └── album example.py:8\n" +" │ └── TaskGroup.__aexit__ Lib/asyncio/taskgroups." +"py:72\n" +" │ └── TaskGroup._aexit Lib/asyncio/taskgroups." +"py:121\n" +" │ ├── (T) TNDNBTG\n" +" │ │ └── play example.py:4\n" +" │ │ └── sleep Lib/asyncio/tasks.py:702\n" +" │ └── (T) Levitate\n" +" │ └── play example.py:4\n" +" │ └── sleep Lib/asyncio/tasks.py:702\n" +" └── (T) TMBTE\n" +" └── album example.py:8\n" +" └── TaskGroup.__aexit__ Lib/asyncio/taskgroups." +"py:72\n" +" └── TaskGroup._aexit Lib/asyncio/taskgroups." +"py:121\n" +" ├── (T) DYWTYLM\n" +" │ └── play example.py:4\n" +" │ └── sleep Lib/asyncio/tasks.py:702\n" +" └── (T) Aqua Regia\n" +" └── play example.py:4\n" +" └── sleep Lib/asyncio/tasks.py:702" +msgstr "" + +#: ../../whatsnew/3.14.rst:785 +msgid "" +"If a cycle is detected in the async await graph (which could indicate a " +"programming issue), the tool raises an error and lists the cycle paths that " +"prevent tree construction:" +msgstr "" + +#: ../../whatsnew/3.14.rst:789 +msgid "" +"python -m asyncio pstree 12345\n" +"\n" +"ERROR: await-graph contains cycles - cannot print a tree!\n" +"\n" +"cycle: Task-2 → Task-3 → Task-2" +msgstr "" + +#: ../../whatsnew/3.14.rst:797 +msgid "" +"(Contributed by Pablo Galindo, Łukasz Langa, Yury Selivanov, and Marta Gomez " +"Macias in :gh:`91048`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:804 +msgid "Concurrent safe warnings control" +msgstr "" + +#: ../../whatsnew/3.14.rst:806 +msgid "" +"The :class:`warnings.catch_warnings` context manager will now optionally use " +"a context variable for warning filters. This is enabled by setting the :data:" +"`~sys.flags.context_aware_warnings` flag, either with the ``-X`` command-" +"line option or an environment variable. This gives predictable warnings " +"control when using :class:`~warnings.catch_warnings` combined with multiple " +"threads or asynchronous tasks. The flag defaults to true for the free-" +"threaded build and false for the GIL-enabled build." +msgstr "" + +#: ../../whatsnew/3.14.rst:814 +msgid "(Contributed by Neil Schemenauer and Kumar Aditya in :gh:`130010`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:818 +msgid "Other language changes" +msgstr "" + +#: ../../whatsnew/3.14.rst:820 +msgid "" +"All Windows code pages are now supported as 'cpXXX' codecs on Windows. " +"(Contributed by Serhiy Storchaka in :gh:`123803`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:823 +msgid "" +"Implement mixed-mode arithmetic rules combining real and complex numbers as " +"specified by the C standard since C99. (Contributed by Sergey B Kirpichev " +"in :gh:`69639`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:827 +msgid "" +"More syntax errors are now detected regardless of optimisation and the :" +"option:`-O` command-line option. This includes writes to ``__debug__``, " +"incorrect use of :keyword:`await`, and asynchronous comprehensions outside " +"asynchronous functions. For example, ``python -O -c 'assert (__debug__ := " +"1)'`` or ``python -O -c 'assert await 1'`` now produce :exc:`SyntaxError`\\ " +"s. (Contributed by Irit Katriel and Jelle Zijlstra in :gh:`122245` & :gh:" +"`121637`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:835 +msgid "" +"When subclassing a pure C type, the C slots for the new type are no longer " +"replaced with a wrapped version on class creation if they are not explicitly " +"overridden in the subclass. (Contributed by Tomasz Pytel in :gh:`132284`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:842 +msgid "Built-ins" +msgstr "" + +#: ../../whatsnew/3.14.rst:844 +msgid "" +"The :meth:`bytes.fromhex` and :meth:`bytearray.fromhex` methods now accept " +"ASCII :class:`bytes` and :term:`bytes-like objects `. " +"(Contributed by Daniel Pope in :gh:`129349`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:848 +msgid "" +"Add class methods :meth:`float.from_number` and :meth:`complex.from_number` " +"to convert a number to :class:`float` or :class:`complex` type " +"correspondingly. They raise a :exc:`TypeError` if the argument is not a real " +"number. (Contributed by Serhiy Storchaka in :gh:`84978`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:853 +msgid "" +"Support underscore and comma as thousands separators in the fractional part " +"for floating-point presentation types of the new-style string formatting " +"(with :func:`format` or :ref:`f-strings`). (Contributed by Sergey B " +"Kirpichev in :gh:`87790`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:858 +msgid "" +"The :func:`int` function no longer delegates to :meth:`~object.__trunc__`. " +"Classes that want to support conversion to :func:`!int` must implement " +"either :meth:`~object.__int__` or :meth:`~object.__index__`. (Contributed by " +"Mark Dickinson in :gh:`119743`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:863 +msgid "" +"The :func:`map` function now has an optional keyword-only *strict* flag " +"like :func:`zip` to check that all the iterables are of equal length. " +"(Contributed by Wannes Boeykens in :gh:`119793`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:867 +msgid "" +"The :class:`memoryview` type now supports subscription, making it a :term:" +"`generic type`. (Contributed by Brian Schubert in :gh:`126012`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:871 +msgid "" +"Using :data:`NotImplemented` in a boolean context will now raise a :exc:" +"`TypeError`. This has raised a :exc:`DeprecationWarning` since Python 3.9. " +"(Contributed by Jelle Zijlstra in :gh:`118767`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:876 +msgid "" +"Three-argument :func:`pow` now tries calling :meth:`~object.__rpow__` if " +"necessary. Previously it was only called in two-argument :func:`!pow` and " +"the binary power operator. (Contributed by Serhiy Storchaka in :gh:`130104`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:882 +msgid "" +":class:`super` objects are now :mod:`copyable ` and :mod:`pickleable " +"`. (Contributed by Serhiy Storchaka in :gh:`125767`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:888 +msgid "Command line and environment" +msgstr "" + +#: ../../whatsnew/3.14.rst:890 +msgid "" +"The import time flag can now track modules that are already loaded " +"('cached'), via the new :option:`-X importtime=2 <-X>`. When such a module " +"is imported, the ``self`` and ``cumulative`` times are replaced by the " +"string ``cached``." +msgstr "" + +#: ../../whatsnew/3.14.rst:895 +msgid "" +"Values above ``2`` for ``-X importtime`` are now reserved for future use." +msgstr "" + +#: ../../whatsnew/3.14.rst:897 +msgid "(Contributed by Noah Kim and Adam Turner in :gh:`118655`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:899 +msgid "" +"The command-line option :option:`-c` now automatically dedents its code " +"argument before execution. (Contributed by Jon Crall and Steven Sun in :gh:" +"`103998`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:903 +msgid "" +":option:`!-J` is no longer a reserved flag for Jython_, and now has no " +"special meaning. (Contributed by Adam Turner in :gh:`133336`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:913 +msgid "PEP 758: Allow ``except`` and ``except*`` expressions without brackets" +msgstr "" + +#: ../../whatsnew/3.14.rst:915 +msgid "" +"The :keyword:`except` and :keyword:`except* ` expressions now " +"allow brackets to be omitted when there are multiple exception types and the " +"``as`` clause is not used. For example:" +msgstr "" + +#: ../../whatsnew/3.14.rst:920 +msgid "" +"try:\n" +" connect_to_server()\n" +"except TimeoutError, ConnectionRefusedError:\n" +" print('The network has ceased to be!')" +msgstr "" + +#: ../../whatsnew/3.14.rst:927 +msgid "" +"(Contributed by Pablo Galindo and Brett Cannon in :pep:`758` and :gh:" +"`131831`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:933 +msgid "PEP 765: Control flow in :keyword:`finally` blocks" +msgstr "" + +#: ../../whatsnew/3.14.rst:935 +msgid "" +"The compiler now emits a :exc:`SyntaxWarning` when a :keyword:`return`, :" +"keyword:`break`, or :keyword:`continue` statement have the effect of leaving " +"a :keyword:`finally` block. This change is specified in :pep:`765`." +msgstr "" + +#: ../../whatsnew/3.14.rst:940 +msgid "" +"In situations where this change is inconvenient (such as those where the " +"warnings are redundant due to code linting), the :ref:`warning filter " +"` can be used to turn off all syntax warnings by adding " +"``ignore::SyntaxWarning`` as a filter. This can be specified in combination " +"with a filter that converts other warnings to errors (for example, passing " +"``-Werror -Wignore::SyntaxWarning`` as CLI options, or setting " +"``PYTHONWARNINGS=error,ignore::SyntaxWarning``)." +msgstr "" + +#: ../../whatsnew/3.14.rst:948 +msgid "" +"Note that applying such a filter at runtime using the :mod:`warnings` module " +"will only suppress the warning in code that is compiled *after* the filter " +"is adjusted. Code that is compiled prior to the filter adjustment (for " +"example, when a module is imported) will still emit the syntax warning." +msgstr "" + +#: ../../whatsnew/3.14.rst:953 +msgid "(Contributed by Irit Katriel in :gh:`130080`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:960 +msgid "Garbage collection" +msgstr "" + +#: ../../whatsnew/3.14.rst:962 ../../whatsnew/3.14.rst:2220 +msgid "**From Python 3.14.5 onwards:**" +msgstr "" + +#: ../../whatsnew/3.14.rst:964 +msgid "The garbage collector (GC) has changed in Python 3.14.5." +msgstr "" + +#: ../../whatsnew/3.14.rst:966 +msgid "" +"Python 3.14.0-3.14.4 shipped with a new incremental GC. However, due to a " +"number of `reports `__ of " +"significant memory pressure in production environments, it has been reverted " +"back to the generational GC from 3.13. This is the GC now used in Python " +"3.14.5 and later." +msgstr "" + +#: ../../whatsnew/3.14.rst:973 ../../whatsnew/3.14.rst:2229 +msgid "**Previously in Python 3.14.0-3.14.4:**" +msgstr "" + +#: ../../whatsnew/3.14.rst:975 +msgid "" +"The cycle garbage collector is now incremental. This means that maximum " +"pause times are reduced by an order of magnitude or more for larger heaps." +msgstr "" + +#: ../../whatsnew/3.14.rst:979 +msgid "" +"There are now only two generations: young and old. When :func:`gc.collect` " +"is not called directly, the GC is invoked a little less frequently. When " +"invoked, it collects the young generation and an increment of the old " +"generation, instead of collecting one or more generations." +msgstr "" + +#: ../../whatsnew/3.14.rst:985 +msgid "The behavior of :func:`!gc.collect` changes slightly:" +msgstr "" + +#: ../../whatsnew/3.14.rst:987 ../../whatsnew/3.14.rst:3304 +msgid "" +"``gc.collect(1)``: Performs an increment of garbage collection, rather than " +"collecting generation 1." +msgstr "" + +#: ../../whatsnew/3.14.rst:989 ../../whatsnew/3.14.rst:3306 +msgid "Other calls to :func:`!gc.collect` are unchanged." +msgstr "" + +#: ../../whatsnew/3.14.rst:991 ../../whatsnew/3.14.rst:2260 +msgid "(Contributed by Mark Shannon in :gh:`108362`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:995 +msgid "Default interactive shell" +msgstr "" + +#: ../../whatsnew/3.14.rst:999 +msgid "" +"The default :term:`interactive` shell now highlights Python syntax. The " +"feature is enabled by default, save if :envvar:`PYTHON_BASIC_REPL` or any " +"other environment variable that disables colour is set. See :ref:`using-on-" +"controlling-color` for details." +msgstr "" + +#: ../../whatsnew/3.14.rst:1004 +msgid "" +"The default color theme for syntax highlighting strives for good contrast " +"and exclusively uses the 4-bit VGA standard ANSI color codes for maximum " +"compatibility. The theme can be customized using an experimental API :func:`!" +"_colorize.set_theme`. This can be called interactively or in the :envvar:" +"`PYTHONSTARTUP` script. Note that this function has no stability guarantees, " +"and may change or be removed." +msgstr "" + +#: ../../whatsnew/3.14.rst:1012 +msgid "(Contributed by Łukasz Langa in :gh:`131507`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1014 +msgid "" +"The default :term:`interactive` shell now supports import auto-completion. " +"This means that typing ``import co`` and pressing :kbd:`` will suggest " +"modules starting with ``co``. Similarly, typing ``from concurrent import i`` " +"will suggest submodules of ``concurrent`` starting with ``i``. Note that " +"autocompletion of module attributes is not currently supported. (Contributed " +"by Tomas Roun in :gh:`69605`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1023 +msgid "New modules" +msgstr "" + +#: ../../whatsnew/3.14.rst:1025 +msgid "" +":mod:`annotationlib`: For introspecting :term:`annotations `. " +"See :ref:`PEP 749 ` for more details. " +"(Contributed by Jelle Zijlstra in :gh:`119180`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1030 +msgid "" +":mod:`compression` (including :mod:`compression.zstd`): A package for " +"compression-related modules, including a new module to support the Zstandard " +"compression format. See :ref:`PEP 784 ` for more " +"details. (Contributed by Emma Harper Smith, Adam Turner, Gregory P. Smith, " +"Tomas Roun, Victor Stinner, and Rogdham in :gh:`132983`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1037 +msgid "" +":mod:`concurrent.interpreters`: Support for multiple interpreters in the " +"standard library. See :ref:`PEP 734 ` for " +"more details. (Contributed by Eric Snow in :gh:`134939`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1042 +msgid "" +":mod:`string.templatelib`: Support for template string literals (t-strings). " +"See :ref:`PEP 750 ` for more details. " +"(Contributed by Jim Baker, Guido van Rossum, Paul Everitt, Koudai Aono, " +"Lysandros Nikolaou, Dave Peck, Adam Turner, Jelle Zijlstra, Bénédikt Tran, " +"and Pablo Galindo Salgado in :gh:`132661`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1051 +msgid "Improved modules" +msgstr "" + +#: ../../whatsnew/3.14.rst:1054 ../../whatsnew/3.14.rst:2334 +msgid "argparse" +msgstr "" + +#: ../../whatsnew/3.14.rst:1056 +msgid "" +"The default value of the :ref:`program name ` for :class:`argparse." +"ArgumentParser` now reflects the way the Python interpreter was instructed " +"to find the ``__main__`` module code. (Contributed by Serhiy Storchaka and " +"Alyssa Coghlan in :gh:`66436`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1061 +msgid "" +"Introduced the optional *suggest_on_error* parameter to :class:`argparse." +"ArgumentParser`, enabling suggestions for argument choices and subparser " +"names if mistyped by the user. (Contributed by Savannah Ostrowski in :gh:" +"`124456`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1066 +msgid "" +"Enable color for help text, which can be disabled with the optional *color* " +"parameter to :class:`argparse.ArgumentParser`. This can also be controlled " +"by :ref:`environment variables `. (Contributed " +"by Hugo van Kemenade in :gh:`130645`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1074 ../../whatsnew/3.14.rst:2353 +msgid "ast" +msgstr "" + +#: ../../whatsnew/3.14.rst:1076 +msgid "" +"Add :func:`~ast.compare`, a function for comparing two ASTs. (Contributed by " +"Batuhan Taskaya and Jeremy Hylton in :gh:`60191`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1079 +msgid "" +"Add support for :func:`copy.replace` for AST nodes. (Contributed by Bénédikt " +"Tran in :gh:`121141`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1082 +msgid "" +"Docstrings are now removed from an optimized AST in optimization level 2. " +"(Contributed by Irit Katriel in :gh:`123958`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1085 +msgid "" +"The :func:`repr` output for AST nodes now includes more information. " +"(Contributed by Tomas Roun in :gh:`116022`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1088 +msgid "" +"When called with an AST as input, the :func:`~ast.parse` function now always " +"verifies that the root node type is appropriate. (Contributed by Irit " +"Katriel in :gh:`130139`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1092 +msgid "" +"Add new options to the command-line interface: :option:`--feature-version " +"`, :option:`--optimize `, and :option:" +"`--show-empty `. (Contributed by Semyon Moroz in :gh:" +"`133367`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1100 ../../whatsnew/3.14.rst:2175 +#: ../../whatsnew/3.14.rst:2384 +msgid "asyncio" +msgstr "asyncio" + +#: ../../whatsnew/3.14.rst:1102 +msgid "" +"The function and methods named :func:`!create_task` now take an arbitrary " +"list of keyword arguments. All keyword arguments are passed to the :class:" +"`~asyncio.Task` constructor or the custom task factory. (See :meth:`~asyncio." +"loop.set_task_factory` for details.) The ``name`` and ``context`` keyword " +"arguments are no longer special; the name should now be set using the " +"``name`` keyword argument of the factory, and ``context`` may be ``None``." +msgstr "" + +#: ../../whatsnew/3.14.rst:1110 +msgid "" +"This affects the following function and methods: :meth:`asyncio." +"create_task`, :meth:`asyncio.loop.create_task`, :meth:`asyncio.TaskGroup." +"create_task`." +msgstr "" + +#: ../../whatsnew/3.14.rst:1115 +msgid "(Contributed by Thomas Grainger in :gh:`128307`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1117 +msgid "" +"There are two new utility functions for introspecting and printing a " +"program's call graph: :func:`~asyncio.capture_call_graph` and :func:" +"`~asyncio.print_call_graph`. See :ref:`Asyncio introspection capabilities " +"` for more details. (Contributed by Yury " +"Selivanov, Pablo Galindo Salgado, and Łukasz Langa in :gh:`91048`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1127 +msgid "calendar" +msgstr "Kalender" + +#: ../../whatsnew/3.14.rst:1131 +msgid "" +"By default, today's date is highlighted in color in :mod:`calendar`'s :ref:" +"`command-line ` text output. This can be controlled by :ref:" +"`environment variables `. (Contributed by Hugo " +"van Kemenade in :gh:`128317`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1139 +msgid "concurrent.futures" +msgstr "" + +#: ../../whatsnew/3.14.rst:1143 +msgid "" +"Add a new executor class, :class:`~concurrent.futures." +"InterpreterPoolExecutor`, which exposes multiple Python interpreters in the " +"same process ('subinterpreters') to Python code. This uses a pool of " +"independent Python interpreters to execute calls asynchronously." +msgstr "" + +#: ../../whatsnew/3.14.rst:1149 +msgid "" +"This is separate from the new :mod:`~concurrent.interpreters` module " +"introduced by :ref:`PEP 734 `. " +"(Contributed by Eric Snow in :gh:`124548`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1155 +msgid "" +"On Unix platforms other than macOS, :ref:`'forkserver' ` is now the default :ref:`start method " +"` for :class:`~concurrent.futures." +"ProcessPoolExecutor` (replacing :ref:`'fork' `). This change does not affect Windows or macOS, where :ref:`'spawn' " +"` remains the default start method." +msgstr "" + +#: ../../whatsnew/3.14.rst:1163 +msgid "" +"If the threading incompatible *fork* method is required, you must explicitly " +"request it by supplying a multiprocessing context *mp_context* to :class:" +"`~concurrent.futures.ProcessPoolExecutor`." +msgstr "" + +#: ../../whatsnew/3.14.rst:1167 ../../whatsnew/3.14.rst:1617 +msgid "" +"See :ref:`forkserver restrictions ` " +"for information and differences with the *fork* method and how this change " +"may affect existing code with mutable global shared variables and/or shared " +"objects that can not be automatically :mod:`pickled `." +msgstr "" + +#: ../../whatsnew/3.14.rst:1172 ../../whatsnew/3.14.rst:1622 +msgid "(Contributed by Gregory P. Smith in :gh:`84559`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1174 +msgid "" +"Add two new methods to :class:`~concurrent.futures.ProcessPoolExecutor`, :" +"meth:`~concurrent.futures.ProcessPoolExecutor.terminate_workers` and :meth:" +"`~concurrent.futures.ProcessPoolExecutor.kill_workers`, as ways to terminate " +"or kill all living worker processes in the given pool. (Contributed by " +"Charles Machalow in :gh:`130849`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1180 +msgid "" +"Add the optional *buffersize* parameter to :meth:`Executor.map ` to limit the number of submitted tasks whose results " +"have not yet been yielded. If the buffer is full, iteration over the " +"*iterables* pauses until a result is yielded from the buffer. (Contributed " +"by Enzo Bonnal and Josh Rosenberg in :gh:`74028`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1189 +msgid "configparser" +msgstr "" + +#: ../../whatsnew/3.14.rst:1191 +msgid "" +":mod:`!configparser` will no longer write config files it cannot read, to " +"improve security. Attempting to :meth:`~configparser.ConfigParser.write` " +"keys containing delimiters or beginning with the section header pattern will " +"raise an :class:`~configparser.InvalidWriteError`. (Contributed by Jacob " +"Lincoln in :gh:`129270`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1200 +msgid "contextvars" +msgstr "" + +#: ../../whatsnew/3.14.rst:1202 +msgid "" +"Support the :term:`context manager` protocol for :class:`~contextvars.Token` " +"objects. (Contributed by Andrew Svetlov in :gh:`129889`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1208 +msgid "ctypes" +msgstr "" + +#: ../../whatsnew/3.14.rst:1210 +msgid "" +"The layout of :ref:`bit fields ` in :" +"class:`~ctypes.Structure` and :class:`~ctypes.Union` objects is now a closer " +"match to platform defaults (GCC/Clang or MSVC). In particular, fields no " +"longer overlap. (Contributed by Matthias Görgens in :gh:`97702`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1216 +msgid "" +"The :attr:`.Structure._layout_` class attribute can now be set to help match " +"a non-default ABI. (Contributed by Petr Viktorin in :gh:`97702`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1220 +msgid "" +"The class of :class:`~ctypes.Structure`/:class:`~ctypes.Union` field " +"descriptors is now available as :class:`~ctypes.CField`, and has new " +"attributes to aid debugging and introspection. (Contributed by Petr Viktorin " +"in :gh:`128715`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1225 +msgid "" +"On Windows, the :exc:`~ctypes.COMError` exception is now public. " +"(Contributed by Jun Komoda in :gh:`126686`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1228 +msgid "" +"On Windows, the :func:`~ctypes.CopyComPointer` function is now public. " +"(Contributed by Jun Komoda in :gh:`127275`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1231 +msgid "" +"Add :func:`~ctypes.memoryview_at`, a function to create a :class:" +"`memoryview` object that refers to the supplied pointer and length. This " +"works like :func:`ctypes.string_at` except it avoids a buffer copy, and is " +"typically useful when implementing pure Python callback functions that are " +"passed dynamically-sized buffers. (Contributed by Rian Hunter in :gh:" +"`112018`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1238 +msgid "" +"Complex types, :class:`~ctypes.c_float_complex`, :class:`~ctypes." +"c_double_complex`, and :class:`~ctypes.c_longdouble_complex`, are now " +"available if both the compiler and the ``libffi`` library support complex C " +"types. (Contributed by Sergey B Kirpichev in :gh:`61103`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1244 +msgid "" +"Add :func:`ctypes.util.dllist` for listing the shared libraries loaded by " +"the current process. (Contributed by Brian Ward in :gh:`119349`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1248 +msgid "" +"Move :func:`ctypes.POINTER` types cache from a global internal cache " +"(``_pointer_type_cache``) to the :attr:`_CData.__pointer_type__ ` attribute of the corresponding :mod:`!ctypes` " +"types. This will stop the cache from growing without limits in some " +"situations. (Contributed by Sergey Miryanov in :gh:`100926`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1255 +msgid "" +"The :class:`~ctypes.py_object` type now supports subscription, making it a :" +"term:`generic type`. (Contributed by Brian Schubert in :gh:`132168`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1259 +msgid "" +":mod:`!ctypes` now supports :term:`free-threading builds `. " +"(Contributed by Kumar Aditya and Peter Bierma in :gh:`127945`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1264 +msgid "curses" +msgstr "" + +#: ../../whatsnew/3.14.rst:1266 +msgid "" +"Add the :func:`~curses.assume_default_colors` function, a refinement of the :" +"func:`~curses.use_default_colors` function which allows changing the color " +"pair ``0``. (Contributed by Serhiy Storchaka in :gh:`133139`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1273 +msgid "datetime" +msgstr "" + +#: ../../whatsnew/3.14.rst:1275 +msgid "" +"Add the :meth:`~datetime.date.strptime` method to the :class:`datetime.date` " +"and :class:`datetime.time` classes. (Contributed by Wannes Boeykens in :gh:" +"`41431`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1281 +msgid "decimal" +msgstr "" + +#: ../../whatsnew/3.14.rst:1283 +msgid "" +"Add :meth:`.Decimal.from_number` as an alternative constructor for :class:" +"`~decimal.Decimal`. (Contributed by Serhiy Storchaka in :gh:`121798`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1287 +msgid "" +"Expose :func:`~decimal.IEEEContext` to support creation of contexts " +"corresponding to the IEEE 754 (2008) decimal interchange formats. " +"(Contributed by Sergey B Kirpichev in :gh:`53032`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1293 ../../whatsnew/3.14.rst:2211 +msgid "difflib" +msgstr "" + +#: ../../whatsnew/3.14.rst:1295 +msgid "" +"Comparison pages with highlighted changes generated by the :class:`~difflib." +"HtmlDiff` class now support 'dark mode'. (Contributed by Jiahao Li in :gh:" +"`129939`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1301 +msgid "dis" +msgstr "dis" + +#: ../../whatsnew/3.14.rst:1303 +msgid "" +"Add support for rendering full source location information of :class:" +"`instructions `, rather than only the line number. This " +"feature is added to the following interfaces via the *show_positions* " +"keyword argument:" +msgstr "" + +#: ../../whatsnew/3.14.rst:1308 +msgid ":class:`dis.Bytecode`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1309 +msgid ":func:`dis.dis`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1310 +msgid ":func:`dis.distb`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1311 +msgid ":func:`dis.disassemble`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1313 +msgid "" +"This feature is also exposed via :option:`dis --show-positions`. " +"(Contributed by Bénédikt Tran in :gh:`123165`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1316 +msgid "" +"Add the :option:`dis --specialized` command-line option to show specialized " +"bytecode. (Contributed by Bénédikt Tran in :gh:`127413`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1322 +msgid "errno" +msgstr "" + +#: ../../whatsnew/3.14.rst:1324 +msgid "" +"Add the :data:`~errno.EHWPOISON` error code constant. (Contributed by James " +"Roy in :gh:`126585`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1329 +msgid "faulthandler" +msgstr "" + +#: ../../whatsnew/3.14.rst:1331 +msgid "" +"Add support for printing the C stack trace on systems that :ref:`support it " +"` via the new :func:`~faulthandler.dump_c_stack` " +"function or via the *c_stack* argument in :func:`faulthandler.enable`. " +"(Contributed by Peter Bierma in :gh:`127604`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1339 +msgid "fnmatch" +msgstr "" + +#: ../../whatsnew/3.14.rst:1341 +msgid "" +"Add :func:`~fnmatch.filterfalse`, a function to reject names matching a " +"given pattern. (Contributed by Bénédikt Tran in :gh:`74598`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1347 +msgid "fractions" +msgstr "fractions" + +#: ../../whatsnew/3.14.rst:1349 +msgid "" +"A :class:`~fractions.Fraction` object may now be constructed from any object " +"with the :meth:`!as_integer_ratio` method. (Contributed by Serhiy Storchaka " +"in :gh:`82017`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1353 +msgid "" +"Add :meth:`.Fraction.from_number` as an alternative constructor for :class:" +"`~fractions.Fraction`. (Contributed by Serhiy Storchaka in :gh:`121797`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1359 +msgid "functools" +msgstr "" + +#: ../../whatsnew/3.14.rst:1361 +msgid "" +"Add the :data:`~functools.Placeholder` sentinel. This may be used with the :" +"func:`~functools.partial` or :func:`~functools.partialmethod` functions to " +"reserve a place for positional arguments in the returned :ref:`partial " +"object `. (Contributed by Dominykas Grigonis in :gh:" +"`119127`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1368 +msgid "" +"Allow the *initial* parameter of :func:`~functools.reduce` to be passed as a " +"keyword argument. (Contributed by Sayandip Dutta in :gh:`125916`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1374 +msgid "getopt" +msgstr "" + +#: ../../whatsnew/3.14.rst:1376 +msgid "" +"Add support for options with optional arguments. (Contributed by Serhiy " +"Storchaka in :gh:`126374`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1379 +msgid "" +"Add support for returning intermixed options and non-option arguments in " +"order. (Contributed by Serhiy Storchaka in :gh:`126390`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1384 +msgid "getpass" +msgstr "" + +#: ../../whatsnew/3.14.rst:1386 +msgid "" +"Support keyboard feedback in the :func:`~getpass.getpass` function via the " +"keyword-only optional argument *echo_char*. Placeholder characters are " +"rendered whenever a character is entered, and removed when a character is " +"deleted. (Contributed by Semyon Moroz in :gh:`77065`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1394 +msgid "graphlib" +msgstr "" + +#: ../../whatsnew/3.14.rst:1396 +msgid "" +"Allow :meth:`.TopologicalSorter.prepare` to be called more than once as long " +"as sorting has not started. (Contributed by Daniel Pope in :gh:`130914`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1402 +msgid "heapq" +msgstr "" + +#: ../../whatsnew/3.14.rst:1404 +msgid "" +"The :mod:`!heapq` module has improved support for working with max-heaps, " +"via the following new functions:" +msgstr "" + +#: ../../whatsnew/3.14.rst:1407 +msgid ":func:`~heapq.heapify_max`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1408 +msgid ":func:`~heapq.heappush_max`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1409 +msgid ":func:`~heapq.heappop_max`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1410 +msgid ":func:`~heapq.heapreplace_max`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1411 +msgid ":func:`~heapq.heappushpop_max`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1415 +msgid "hmac" +msgstr "" + +#: ../../whatsnew/3.14.rst:1417 +msgid "" +"Add a built-in implementation for HMAC (:rfc:`2104`) using formally verified " +"code from the `HACL* `__ project. " +"This implementation is used as a fallback when the OpenSSL implementation of " +"HMAC is not available. (Contributed by Bénédikt Tran in :gh:`99108`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1425 +msgid "http" +msgstr "" + +#: ../../whatsnew/3.14.rst:1427 +msgid "" +"Directory lists and error pages generated by the :mod:`http.server` module " +"allow the browser to apply its default dark mode. (Contributed by Yorik " +"Hansen in :gh:`123430`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1431 +msgid "" +"The :mod:`http.server` module now supports serving over HTTPS using the :" +"class:`http.server.HTTPSServer` class. This functionality is exposed by the " +"command-line interface (``python -m http.server``) through the following " +"options:" +msgstr "" + +#: ../../whatsnew/3.14.rst:1436 +msgid "" +":option:`--tls-cert \\ `: Path to the TLS " +"certificate file." +msgstr "" + +#: ../../whatsnew/3.14.rst:1438 +msgid "" +":option:`--tls-key \\ `: Optional path to the " +"private key file." +msgstr "" + +#: ../../whatsnew/3.14.rst:1440 +msgid "" +":option:`--tls-password-file \\ `: " +"Optional path to the password file for the private key." +msgstr "" + +#: ../../whatsnew/3.14.rst:1443 +msgid "(Contributed by Semyon Moroz in :gh:`85162`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1447 +msgid "imaplib" +msgstr "" + +#: ../../whatsnew/3.14.rst:1449 +msgid "" +"Add :meth:`.IMAP4.idle`, implementing the IMAP4 ``IDLE`` command as defined " +"in :rfc:`2177`. (Contributed by Forest in :gh:`55454`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1455 +msgid "inspect" +msgstr "" + +#: ../../whatsnew/3.14.rst:1457 +msgid "" +":func:`~inspect.signature` takes a new argument *annotation_format* to " +"control the :class:`annotationlib.Format` used for representing annotations. " +"(Contributed by Jelle Zijlstra in :gh:`101552`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1461 +msgid "" +":meth:`.Signature.format` takes a new argument *unquote_annotations*. If " +"true, string :term:`annotations ` are displayed without " +"surrounding quotes. (Contributed by Jelle Zijlstra in :gh:`101552`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1466 +msgid "" +"Add function :func:`~inspect.ispackage` to determine whether an object is a :" +"term:`package` or not. (Contributed by Zhikang Yan in :gh:`125634`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1472 ../../whatsnew/3.14.rst:2264 +msgid "io" +msgstr "" + +#: ../../whatsnew/3.14.rst:1474 +msgid "" +"Reading text from a non-blocking stream with ``read`` may now raise a :exc:" +"`BlockingIOError` if the operation cannot immediately return bytes. " +"(Contributed by Giovanni Siragusa in :gh:`109523`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1478 +msgid "" +"Add the :class:`~io.Reader` and :class:`~io.Writer` protocols as simpler " +"alternatives to the pseudo-protocols :class:`typing.IO`, :class:`typing." +"TextIO`, and :class:`typing.BinaryIO`. (Contributed by Sebastian Rittau in :" +"gh:`127648`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1485 +msgid "json" +msgstr "" + +#: ../../whatsnew/3.14.rst:1487 +msgid "" +"Add exception notes for JSON serialization errors that allow identifying the " +"source of the error. (Contributed by Serhiy Storchaka in :gh:`122163`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1491 +msgid "" +"Allow using the :mod:`json` module as a script using the :option:`-m` " +"switch: :program:`python -m json`. This is now preferred to :program:`python " +"-m json.tool`, which is :term:`soft deprecated`. See the :ref:`JSON command-" +"line interface ` documentation. (Contributed by Trey " +"Hunner in :gh:`122873`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1498 +msgid "" +"By default, the output of the :ref:`JSON command-line interface ` is highlighted in color. This can be controlled by :ref:" +"`environment variables `. (Contributed by Tomas " +"Roun in :gh:`131952`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1506 +msgid "linecache" +msgstr "" + +#: ../../whatsnew/3.14.rst:1508 +msgid "" +":func:`~linecache.getline` can now retrieve source code for frozen modules. " +"(Contributed by Tian Gao in :gh:`131638`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1513 +msgid "logging.handlers" +msgstr "" + +#: ../../whatsnew/3.14.rst:1515 +msgid "" +":class:`~logging.handlers.QueueListener` objects now support the :term:" +"`context manager` protocol. (Contributed by Charles Machalow in :gh:" +"`132106`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1519 +msgid "" +":meth:`QueueListener.start ` now " +"raises a :exc:`RuntimeError` if the listener is already started. " +"(Contributed by Charles Machalow in :gh:`132106`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1525 +msgid "math" +msgstr "math" + +#: ../../whatsnew/3.14.rst:1527 +msgid "" +"Added more detailed error messages for domain errors in the module. " +"(Contributed by Charlie Zhao and Sergey B Kirpichev in :gh:`101410`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1532 +msgid "mimetypes" +msgstr "" + +#: ../../whatsnew/3.14.rst:1534 +msgid "" +"Add a public :ref:`command-line ` for the module, invoked " +"via :program:`python -m mimetypes`. (Contributed by Oleg Iarygin and Hugo " +"van Kemenade in :gh:`93096`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1538 +msgid "Add several new MIME types based on RFCs and common usage:" +msgstr "" + +#: ../../whatsnew/3.14.rst:0 +msgid "Microsoft and :rfc:`8081` MIME types for fonts" +msgstr "" + +#: ../../whatsnew/3.14.rst:1542 +msgid "Embedded OpenType: ``application/vnd.ms-fontobject``" +msgstr "" + +#: ../../whatsnew/3.14.rst:1543 +msgid "OpenType Layout (OTF) ``font/otf``" +msgstr "" + +#: ../../whatsnew/3.14.rst:1544 +msgid "TrueType: ``font/ttf``" +msgstr "" + +#: ../../whatsnew/3.14.rst:1545 +msgid "WOFF 1.0 ``font/woff``" +msgstr "" + +#: ../../whatsnew/3.14.rst:1546 +msgid "WOFF 2.0 ``font/woff2``" +msgstr "" + +#: ../../whatsnew/3.14.rst:0 +msgid "" +":rfc:`9559` MIME types for Matroska audiovisual data container structures" +msgstr "" + +#: ../../whatsnew/3.14.rst:1551 +msgid "audio with no video: ``audio/matroska`` (``.mka``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1552 +msgid "video: ``video/matroska`` (``.mkv``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1553 +msgid "stereoscopic video: ``video/matroska-3d`` (``.mk3d``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:0 +msgid "Images with RFCs" +msgstr "" + +#: ../../whatsnew/3.14.rst:1557 +msgid ":rfc:`1494`: CCITT Group 3 (``.g3``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1558 +msgid ":rfc:`3362`: Real-time Facsimile, T.38 (``.t38``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1559 +msgid "" +":rfc:`3745`: JPEG 2000 (``.jp2``), extension (``.jpx``) and compound (``." +"jpm``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1560 +msgid ":rfc:`3950`: Tag Image File Format Fax eXtended, TIFF-FX (``.tfx``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1561 +msgid ":rfc:`4047`: Flexible Image Transport System (``.fits``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1562 +msgid "" +":rfc:`7903`: Enhanced Metafile (``.emf``) and Windows Metafile (``.wmf``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:0 +msgid "Other MIME type additions and changes" +msgstr "" + +#: ../../whatsnew/3.14.rst:1566 +msgid "" +":rfc:`2361`: Change type for ``.avi`` to ``video/vnd.avi`` and for ``.wav`` " +"to ``audio/vnd.wave``" +msgstr "" + +#: ../../whatsnew/3.14.rst:1568 +msgid ":rfc:`4337`: Add MPEG-4 ``audio/mp4`` (``.m4a``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1569 +msgid ":rfc:`5334`: Add Ogg media (``.oga``, ``.ogg`` and ``.ogx``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1570 +msgid ":rfc:`6713`: Add gzip ``application/gzip`` (``.gz``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1571 +msgid ":rfc:`9639`: Add FLAC ``audio/flac`` (``.flac``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1572 +msgid "" +":rfc:`9512` ``application/yaml`` MIME type for YAML files (``.yaml`` and ``." +"yml``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1574 +msgid "Add 7z ``application/x-7z-compressed`` (``.7z``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1575 +msgid "" +"Add Android Package ``application/vnd.android.package-archive`` (``.apk``) " +"when not strict" +msgstr "" + +#: ../../whatsnew/3.14.rst:1577 +msgid "Add deb ``application/x-debian-package`` (``.deb``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1578 +msgid "Add glTF binary ``model/gltf-binary`` (``.glb``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1579 +msgid "Add glTF JSON/ASCII ``model/gltf+json`` (``.gltf``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1580 +msgid "Add M4V ``video/x-m4v`` (``.m4v``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1581 +msgid "Add PHP ``application/x-httpd-php`` (``.php``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1582 +msgid "Add RAR ``application/vnd.rar`` (``.rar``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1583 +msgid "Add RPM ``application/x-rpm`` (``.rpm``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1584 +msgid "Add STL ``model/stl`` (``.stl``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1585 +msgid "Add Windows Media Video ``video/x-ms-wmv`` (``.wmv``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1586 +msgid "De facto: Add WebM ``audio/webm`` (``.weba``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1587 +msgid "" +"`ECMA-376 `__: Add ``.docx``, ``.pptx`` and ``.xlsx`` types" +msgstr "" + +#: ../../whatsnew/3.14.rst:1590 +msgid "" +"`OASIS `__: Add OpenDocument ``.odg``, ``.odp``, ``.ods`` and " +"``.odt`` types" +msgstr "" + +#: ../../whatsnew/3.14.rst:1593 +msgid "" +"`W3C `__: Add EPUB " +"``application/epub+zip`` (``.epub``)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1596 +msgid "" +"(Contributed by Sahil Prajapati and Hugo van Kemenade in :gh:`84852`, by " +"Sasha \"Nelie\" Chernykh and Hugo van Kemenade in :gh:`132056`, and by Hugo " +"van Kemenade in :gh:`89416`, :gh:`85957`, and :gh:`129965`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1602 +msgid "multiprocessing" +msgstr "" + +#: ../../whatsnew/3.14.rst:1606 +msgid "" +"On Unix platforms other than macOS, :ref:`'forkserver' ` is now the default :ref:`start method " +"` (replacing :ref:`'fork' `). This change does not affect Windows or macOS, where :" +"ref:`'spawn' ` remains the default start " +"method." +msgstr "" + +#: ../../whatsnew/3.14.rst:1613 +msgid "" +"If the threading incompatible *fork* method is required, you must explicitly " +"request it via a context from :func:`~multiprocessing.get_context` " +"(preferred) or change the default via :func:`~multiprocessing." +"set_start_method`." +msgstr "" + +#: ../../whatsnew/3.14.rst:1624 +msgid "" +":mod:`multiprocessing`'s ``'forkserver'`` start method now authenticates its " +"control socket to avoid solely relying on filesystem permissions to restrict " +"what other processes could cause the forkserver to spawn workers and run " +"code. (Contributed by Gregory P. Smith for :gh:`97514`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1630 +msgid "" +"The :ref:`multiprocessing proxy objects ` for " +"*list* and *dict* types gain previously overlooked missing methods:" +msgstr "" + +#: ../../whatsnew/3.14.rst:1633 +msgid ":meth:`!clear` and :meth:`!copy` for proxies of :class:`list`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1634 +msgid "" +":meth:`~dict.fromkeys`, ``reversed(d)``, ``d | {}``, ``{} | d``, ``d |= " +"{'b': 2}`` for proxies of :class:`dict`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1637 +msgid "(Contributed by Roy Hyunjin Han for :gh:`103134`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1639 +msgid "" +"Add support for shared :class:`set` objects via :meth:`.SyncManager.set`. " +"The :func:`set` in :func:`~multiprocessing.Manager` method is now available. " +"(Contributed by Mingyu Park in :gh:`129949`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1644 +msgid "" +"Add the :meth:`~multiprocessing.Process.interrupt` to :class:" +"`multiprocessing.Process` objects, which terminates the child process by " +"sending :py:const:`~signal.SIGINT`. This enables :keyword:`finally` clauses " +"to print a stack trace for the terminated process. (Contributed by Artem " +"Pulkin in :gh:`131913`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1652 +msgid "operator" +msgstr "" + +#: ../../whatsnew/3.14.rst:1654 +msgid "" +"Add :func:`~operator.is_none` and :func:`~operator.is_not_none` as a pair of " +"functions, such that ``operator.is_none(obj)`` is equivalent to ``obj is " +"None`` and ``operator.is_not_none(obj)`` is equivalent to ``obj is not " +"None``. (Contributed by Raymond Hettinger and Nico Mexis in :gh:`115808`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1662 +msgid "os" +msgstr "os" + +#: ../../whatsnew/3.14.rst:1664 +msgid "" +"Add the :func:`~os.reload_environ` function to update :data:`os.environ` " +"and :data:`os.environb` with changes to the environment made by :func:`os." +"putenv`, by :func:`os.unsetenv`, or made outside Python in the same process. " +"(Contributed by Victor Stinner in :gh:`120057`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1670 +msgid "" +"Add the :data:`~os.SCHED_DEADLINE` and :data:`~os.SCHED_NORMAL` constants to " +"the :mod:`!os` module. (Contributed by James Roy in :gh:`127688`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1674 +msgid "" +"Add the :func:`~os.readinto` function to read into a :ref:`buffer object " +"` from a file descriptor. (Contributed by Cody Maloney in :gh:" +"`129205`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1680 +msgid "os.path" +msgstr "os.path" + +#: ../../whatsnew/3.14.rst:1682 +msgid "" +"The *strict* parameter to :func:`~os.path.realpath` accepts a new value, :" +"data:`~os.path.ALLOW_MISSING`. If used, errors other than :exc:" +"`FileNotFoundError` will be re-raised; the resulting path can be missing but " +"it will be free of symlinks. (Contributed by Petr Viktorin for :cve:" +"`2025-4517`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1690 ../../whatsnew/3.14.rst:2273 +#: ../../whatsnew/3.14.rst:2534 +msgid "pathlib" +msgstr "pathlib" + +#: ../../whatsnew/3.14.rst:1692 +msgid "" +"Add methods to :class:`pathlib.Path` to recursively copy or move files and " +"directories:" +msgstr "" + +#: ../../whatsnew/3.14.rst:1695 +msgid "" +":meth:`~pathlib.Path.copy` copies a file or directory tree to a destination." +msgstr "" + +#: ../../whatsnew/3.14.rst:1696 +msgid ":meth:`~pathlib.Path.copy_into` copies *into* a destination directory." +msgstr "" + +#: ../../whatsnew/3.14.rst:1697 +msgid "" +":meth:`~pathlib.Path.move` moves a file or directory tree to a destination." +msgstr "" + +#: ../../whatsnew/3.14.rst:1698 +msgid ":meth:`~pathlib.Path.move_into` moves *into* a destination directory." +msgstr "" + +#: ../../whatsnew/3.14.rst:1700 +msgid "(Contributed by Barney Gale in :gh:`73991`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1702 +msgid "" +"Add the :attr:`~pathlib.Path.info` attribute, which stores an object " +"implementing the new :class:`pathlib.types.PathInfo` protocol. The object " +"supports querying the file type and internally caching :func:`~os.stat` " +"results. Path objects generated by :meth:`~pathlib.Path.iterdir` are " +"initialized with file type information gleaned from scanning the parent " +"directory. (Contributed by Barney Gale in :gh:`125413`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1712 ../../whatsnew/3.14.rst:2281 +msgid "pdb" +msgstr "pdb" + +#: ../../whatsnew/3.14.rst:1714 +msgid "" +"The :mod:`pdb` module now supports remote attaching to a running Python " +"process using a new :option:`-p PID ` command-line option:" +msgstr "" + +#: ../../whatsnew/3.14.rst:1717 +msgid "python -m pdb -p 1234" +msgstr "" + +#: ../../whatsnew/3.14.rst:1721 +msgid "" +"This will connect to the Python process with the given PID and allow you to " +"debug it interactively. Notice that due to how the Python interpreter works " +"attaching to a remote process that is blocked in a system call or waiting " +"for I/O will only work once the next bytecode instruction is executed or " +"when the process receives a signal." +msgstr "" + +#: ../../whatsnew/3.14.rst:1727 +msgid "" +"This feature uses :ref:`PEP 768 ` and the new :" +"func:`sys.remote_exec` function to attach to the remote process and send the " +"PDB commands to it." +msgstr "" + +#: ../../whatsnew/3.14.rst:1731 +msgid "(Contributed by Matt Wozniski and Pablo Galindo in :gh:`131591`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1733 +msgid "" +"Hardcoded breakpoints (:func:`breakpoint` and :func:`~pdb.set_trace`) now " +"reuse the most recent :class:`~pdb.Pdb` instance that calls :meth:`~pdb.Pdb." +"set_trace`, instead of creating a new one each time. As a result, all the " +"instance specific data like :pdbcmd:`display` and :pdbcmd:`commands` are " +"preserved across hardcoded breakpoints. (Contributed by Tian Gao in :gh:" +"`121450`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1740 +msgid "" +"Add a new argument *mode* to :class:`pdb.Pdb`. Disable the ``restart`` " +"command when :mod:`pdb` is in ``inline`` mode. (Contributed by Tian Gao in :" +"gh:`123757`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1744 +msgid "" +"A confirmation prompt will be shown when the user tries to quit :mod:`pdb` " +"in ``inline`` mode. ``y``, ``Y``, ```` or ``EOF`` will confirm the " +"quit and call :func:`sys.exit`, instead of raising :exc:`bdb.BdbQuit`. " +"(Contributed by Tian Gao in :gh:`124704`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1749 +msgid "" +"Inline breakpoints like :func:`breakpoint` or :func:`pdb.set_trace` will " +"always stop the program at calling frame, ignoring the ``skip`` pattern (if " +"any). (Contributed by Tian Gao in :gh:`130493`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1754 +msgid "" +"```` at the beginning of the line in :mod:`pdb` multi-line input will " +"fill in a 4-space indentation now, instead of inserting a ``\\t`` character. " +"(Contributed by Tian Gao in :gh:`130471`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1758 +msgid "" +"Auto-indent is introduced in :mod:`pdb` multi-line input. It will either " +"keep the indentation of the last line or insert a 4-space indentation when " +"it detects a new code block. (Contributed by Tian Gao in :gh:`133350`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1763 +msgid "" +"``$_asynctask`` is added to access the current asyncio task if applicable. " +"(Contributed by Tian Gao in :gh:`124367`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1766 +msgid "" +":func:`pdb.set_trace_async` is added to support debugging asyncio " +"coroutines. :keyword:`await` statements are supported with this function. " +"(Contributed by Tian Gao in :gh:`132576`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1771 +msgid "" +"Source code displayed in :mod:`pdb` will be syntax-highlighted. This feature " +"can be controlled using the same methods as the default :term:`interactive` " +"shell, in addition to the newly added ``colorize`` argument of :class:`pdb." +"Pdb`. (Contributed by Tian Gao and Łukasz Langa in :gh:`133355`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1778 +msgid "pickle" +msgstr "" + +#: ../../whatsnew/3.14.rst:1780 +msgid "" +"Set the default protocol version on the :mod:`pickle` module to 5. For more " +"details, see :ref:`pickle protocols `." +msgstr "" + +#: ../../whatsnew/3.14.rst:1783 +msgid "" +"Add exception notes for pickle serialization errors that allow identifying " +"the source of the error. (Contributed by Serhiy Storchaka in :gh:`122213`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1789 +msgid "platform" +msgstr "" + +#: ../../whatsnew/3.14.rst:1791 +msgid "" +"Add :func:`~platform.invalidate_caches`, a function to invalidate cached " +"results in the :mod:`!platform` module. (Contributed by Bénédikt Tran in :gh:" +"`122549`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1797 +msgid "pydoc" +msgstr "" + +#: ../../whatsnew/3.14.rst:1799 +msgid "" +":term:`Annotations ` in help output are now usually displayed in " +"a format closer to that in the original source. (Contributed by Jelle " +"Zijlstra in :gh:`101552`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1805 +msgid "re" +msgstr "" + +#: ../../whatsnew/3.14.rst:1807 +msgid "" +"Support ``\\z`` as a synonym for ``\\Z`` in :mod:`regular expressions `. " +"It is interpreted unambiguously in many other regular expression engines, " +"unlike ``\\Z``, which has subtly different behavior. (Contributed by Serhiy " +"Storchaka in :gh:`133306`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1812 +msgid "" +"``\\B`` in :mod:`regular expression ` now matches the empty input " +"string, meaning that it is now always the opposite of ``\\b``. (Contributed " +"by Serhiy Storchaka in :gh:`124130`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1818 +msgid "socket" +msgstr "" + +#: ../../whatsnew/3.14.rst:1820 +msgid "Improve and fix support for Bluetooth sockets." +msgstr "" + +#: ../../whatsnew/3.14.rst:1822 +msgid "" +"Fix support of Bluetooth sockets on NetBSD and DragonFly BSD. (Contributed " +"by Serhiy Storchaka in :gh:`132429`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1824 +msgid "" +"Fix support for :const:`~socket.BTPROTO_HCI` on FreeBSD. (Contributed by " +"Victor Stinner in :gh:`111178`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1826 +msgid "" +"Add support for :const:`~socket.BTPROTO_SCO` on FreeBSD. (Contributed by " +"Serhiy Storchaka in :gh:`85302`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1828 +msgid "" +"Add support for *cid* and *bdaddr_type* in the address for :const:`~socket." +"BTPROTO_L2CAP` on FreeBSD. (Contributed by Serhiy Storchaka in :gh:`132429`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1831 +msgid "" +"Add support for *channel* in the address for :const:`~socket.BTPROTO_HCI` on " +"Linux. (Contributed by Serhiy Storchaka in :gh:`70145`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1834 +msgid "" +"Accept an integer as the address for :const:`~socket.BTPROTO_HCI` on Linux. " +"(Contributed by Serhiy Storchaka in :gh:`132099`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1837 +msgid "" +"Return *cid* in :meth:`~socket.socket.getsockname` for :const:`~socket." +"BTPROTO_L2CAP`. (Contributed by Serhiy Storchaka in :gh:`132429`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1840 +msgid "" +"Add many new constants. (Contributed by Serhiy Storchaka in :gh:`132734`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1845 +msgid "ssl" +msgstr "" + +#: ../../whatsnew/3.14.rst:1847 +msgid "" +"Indicate through the :data:`~ssl.HAS_PHA` Boolean whether the :mod:`!ssl` " +"module supports TLSv1.3 post-handshake client authentication (PHA). " +"(Contributed by Will Childs-Klein in :gh:`128036`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1853 +msgid "struct" +msgstr "" + +#: ../../whatsnew/3.14.rst:1855 +msgid "" +"Support the :c:expr:`float complex` and :c:expr:`double complex` C types in " +"the :mod:`struct` module (formatting characters ``'F'`` and ``'D'`` " +"respectively). (Contributed by Sergey B Kirpichev in :gh:`121249`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1862 +msgid "symtable" +msgstr "" + +#: ../../whatsnew/3.14.rst:1864 +msgid "Expose the following :class:`~symtable.Symbol` methods:" +msgstr "" + +#: ../../whatsnew/3.14.rst:1866 +msgid ":meth:`~symtable.Symbol.is_comp_cell`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1867 +msgid ":meth:`~symtable.Symbol.is_comp_iter`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1868 +msgid ":meth:`~symtable.Symbol.is_free_class`" +msgstr "" + +#: ../../whatsnew/3.14.rst:1870 +msgid "(Contributed by Bénédikt Tran in :gh:`120029`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1874 +msgid "sys" +msgstr "sys" + +#: ../../whatsnew/3.14.rst:1876 +msgid "" +"The previously undocumented special function :func:`sys.getobjects`, which " +"only exists in specialized builds of Python, may now return objects from " +"other interpreters than the one it's called in. (Contributed by Eric Snow " +"in :gh:`125286`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1881 +msgid "" +"Add :func:`sys._is_immortal` for determining if an object is :term:" +"`immortal`. (Contributed by Peter Bierma in :gh:`128509`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1884 +msgid "" +"On FreeBSD, :data:`sys.platform` no longer contains the major version " +"number. It is always ``'freebsd'``, instead of ``'freebsd13'`` or " +"``'freebsd14'``. (Contributed by Michael Osipov in :gh:`129393`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1888 +msgid "" +"Raise :exc:`DeprecationWarning` for :func:`sys._clear_type_cache`. This " +"function was deprecated in Python 3.13 but it didn't raise a runtime warning." +msgstr "" + +#: ../../whatsnew/3.14.rst:1891 +msgid "" +"Add :func:`sys.remote_exec` to implement the new external debugger " +"interface. See :ref:`PEP 768 ` for details. " +"(Contributed by Pablo Galindo Salgado, Matt Wozniski, and Ivona Stojanovic " +"in :gh:`131591`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1896 +msgid "" +"Add the :data:`sys._jit` namespace, containing utilities for introspecting " +"just-in-time compilation. (Contributed by Brandt Bucher in :gh:`133231`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1902 +msgid "sys.monitoring" +msgstr "" + +#: ../../whatsnew/3.14.rst:1904 +msgid "" +"Add two new monitoring events, :monitoring-event:`BRANCH_LEFT` and :" +"monitoring-event:`BRANCH_RIGHT`. These replace and deprecate the :monitoring-" +"event:`!BRANCH` event. (Contributed by Mark Shannon in :gh:`122548`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1911 +msgid "sysconfig" +msgstr "" + +#: ../../whatsnew/3.14.rst:1913 +msgid "" +"Add ``ABIFLAGS`` key to :func:`~sysconfig.get_config_vars` on Windows. " +"(Contributed by Xuehai Pan in :gh:`131799`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1918 +msgid "tarfile" +msgstr "" + +#: ../../whatsnew/3.14.rst:1920 +msgid "" +":func:`~tarfile.data_filter` now normalizes symbolic link targets in order " +"to avoid path traversal attacks. (Contributed by Petr Viktorin in :gh:" +"`127987` and :cve:`2025-4138`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1924 +msgid "" +":func:`~tarfile.TarFile.extractall` now skips fixing up directory attributes " +"when a directory was removed or replaced by another kind of file. " +"(Contributed by Petr Viktorin in :gh:`127987` and :cve:`2024-12718`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1928 +msgid "" +":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` now " +"(re-)apply the extraction filter when substituting a link (hard or symbolic) " +"with a copy of another archive member, and when fixing up directory " +"attributes. The former raises a new exception, :exc:`~tarfile." +"LinkFallbackError`. (Contributed by Petr Viktorin for :cve:`2025-4330` and :" +"cve:`2024-12718`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1935 +msgid "" +":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` no " +"longer extract rejected members when :func:`~tarfile.TarFile.errorlevel` is " +"zero. (Contributed by Matt Prodani and Petr Viktorin in :gh:`112887` and :" +"cve:`2025-4435`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1943 +msgid "threading" +msgstr "threading" + +#: ../../whatsnew/3.14.rst:1945 +msgid "" +":meth:`threading.Thread.start` now sets the operating system thread name to :" +"attr:`threading.Thread.name`. (Contributed by Victor Stinner in :gh:`59705`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1951 +msgid "tkinter" +msgstr "tkinter" + +#: ../../whatsnew/3.14.rst:1953 +msgid "" +"Make :mod:`tkinter` widget methods :meth:`!after` and :meth:`!after_idle` " +"accept keyword arguments. (Contributed by Zhikang Yan in :gh:`126899`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1957 +msgid "" +"Add ability to specify a name for :class:`!tkinter.OptionMenu` and :class:`!" +"tkinter.ttk.OptionMenu`. (Contributed by Zhikang Yan in :gh:`130482`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1963 +msgid "turtle" +msgstr "" + +#: ../../whatsnew/3.14.rst:1965 +msgid "" +"Add context managers for :func:`turtle.fill`, :func:`turtle.poly`, and :func:" +"`turtle.no_animation`. (Contributed by Marie Roald and Yngve Mardal Moe in :" +"gh:`126350`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1971 +msgid "types" +msgstr "types" + +#: ../../whatsnew/3.14.rst:1973 +msgid "" +":class:`types.UnionType` is now an alias for :class:`typing.Union`. See :ref:" +"`below ` for more details. (Contributed by Jelle " +"Zijlstra in :gh:`105499`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:1979 +msgid "typing" +msgstr "typing" + +#: ../../whatsnew/3.14.rst:1983 +msgid "" +"The :class:`types.UnionType` and :class:`typing.Union` types are now aliases " +"for each other, meaning that both old-style unions (created with " +"``Union[int, str]``) and new-style unions (``int | str``) now create " +"instances of the same runtime type. This unifies the behavior between the " +"two syntaxes, but leads to some differences in behavior that may affect " +"users who introspect types at runtime:" +msgstr "" + +#: ../../whatsnew/3.14.rst:1990 +msgid "" +"Both syntaxes for creating a union now produce the same string " +"representation in :func:`repr`. For example, ``repr(Union[int, str])`` is " +"now ``\"int | str\"`` instead of ``\"typing.Union[int, str]\"``." +msgstr "" + +#: ../../whatsnew/3.14.rst:1995 +msgid "" +"Unions created using the old syntax are no longer cached. Previously, " +"running ``Union[int, str]`` multiple times would return the same object " +"(``Union[int, str] is Union[int, str]`` would be ``True``), but now it will " +"return two different objects. Use ``==`` to compare unions for equality, not " +"``is``. New-style unions have never been cached this way. This change could " +"increase memory usage for some programs that use a large number of unions " +"created by subscripting ``typing.Union``. However, several factors offset " +"this cost: unions used in annotations are no longer evaluated by default in " +"Python 3.14 because of :pep:`649`; an instance of :class:`types.UnionType` " +"is itself much smaller than the object returned by ``Union[]`` was on prior " +"Python versions; and removing the cache also saves some space. It is " +"therefore unlikely that this change will cause a significant increase in " +"memory usage for most users." +msgstr "" + +#: ../../whatsnew/3.14.rst:2011 +msgid "" +"Previously, old-style unions were implemented using the private class " +"``typing._UnionGenericAlias``. This class is no longer needed for the " +"implementation, but it has been retained for backward compatibility, with " +"removal scheduled for Python 3.17. Users should use documented introspection " +"helpers like :func:`~typing.get_origin` and :func:`typing.get_args` instead " +"of relying on private implementation details." +msgstr "" + +#: ../../whatsnew/3.14.rst:2020 +msgid "" +"It is now possible to use :class:`typing.Union` itself in :func:`isinstance` " +"checks. For example, ``isinstance(int | str, typing.Union)`` will return " +"``True``; previously this raised :exc:`TypeError`." +msgstr "" + +#: ../../whatsnew/3.14.rst:2025 +msgid "" +"The :attr:`!__args__` attribute of :class:`typing.Union` objects is no " +"longer writable." +msgstr "" + +#: ../../whatsnew/3.14.rst:2028 +msgid "" +"It is no longer possible to set any attributes on :class:`~typing.Union` " +"objects. This only ever worked for dunder attributes on previous versions, " +"was never documented to work, and was subtly broken in many cases." +msgstr "" + +#: ../../whatsnew/3.14.rst:2033 +msgid "(Contributed by Jelle Zijlstra in :gh:`105499`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2035 +msgid ":class:`~typing.TypeAliasType` now supports star unpacking." +msgstr "" + +#: ../../whatsnew/3.14.rst:2039 +msgid "unicodedata" +msgstr "unicodedata" + +#: ../../whatsnew/3.14.rst:2041 +msgid "The Unicode database has been updated to Unicode 16.0.0." +msgstr "" + +#: ../../whatsnew/3.14.rst:2045 +msgid "unittest" +msgstr "unittest" + +#: ../../whatsnew/3.14.rst:2049 +msgid "" +":mod:`unittest` output is now colored by default. This can be controlled by :" +"ref:`environment variables `. (Contributed by " +"Hugo van Kemenade in :gh:`127221`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2054 +msgid "" +"unittest discovery supports :term:`namespace package` as start directory " +"again. It was removed in Python 3.11. (Contributed by Jacob Walls in :gh:" +"`80958`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2058 +msgid "" +"A number of new methods were added in the :class:`~unittest.TestCase` class " +"that provide more specialized tests." +msgstr "" + +#: ../../whatsnew/3.14.rst:2061 +msgid "" +":meth:`~unittest.TestCase.assertHasAttr` and :meth:`~unittest.TestCase." +"assertNotHasAttr` check whether the object has a particular attribute." +msgstr "" + +#: ../../whatsnew/3.14.rst:2064 +msgid "" +":meth:`~unittest.TestCase.assertIsSubclass` and :meth:`~unittest.TestCase." +"assertNotIsSubclass` check whether the object is a subclass of a particular " +"class, or of one of a tuple of classes." +msgstr "" + +#: ../../whatsnew/3.14.rst:2067 +msgid "" +":meth:`~unittest.TestCase.assertStartsWith`, :meth:`~unittest.TestCase." +"assertNotStartsWith`, :meth:`~unittest.TestCase.assertEndsWith` and :meth:" +"`~unittest.TestCase.assertNotEndsWith` check whether the Unicode or byte " +"string starts or ends with particular strings." +msgstr "" + +#: ../../whatsnew/3.14.rst:2073 +msgid "(Contributed by Serhiy Storchaka in :gh:`71339`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2077 ../../whatsnew/3.14.rst:2580 +msgid "urllib" +msgstr "" + +#: ../../whatsnew/3.14.rst:2079 +msgid "" +"Upgrade HTTP digest authentication algorithm for :mod:`urllib.request` by " +"supporting SHA-256 digest authentication as specified in :rfc:`7616`. " +"(Contributed by Calvin Bui in :gh:`128193`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2083 +msgid "" +"Improve ergonomics and standards compliance when parsing and emitting ``file:" +"`` URLs." +msgstr "" + +#: ../../whatsnew/3.14.rst:2086 +msgid "In :func:`~urllib.request.url2pathname`:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2088 +msgid "" +"Accept a complete URL when the new *require_scheme* argument is set to true." +msgstr "" + +#: ../../whatsnew/3.14.rst:2090 +msgid "Discard URL authority if it matches the local hostname." +msgstr "" + +#: ../../whatsnew/3.14.rst:2091 +msgid "" +"Discard URL authority if it resolves to a local IP address when the new " +"*resolve_host* argument is set to true." +msgstr "" + +#: ../../whatsnew/3.14.rst:2093 +msgid "Discard URL query and fragment components." +msgstr "" + +#: ../../whatsnew/3.14.rst:2094 +msgid "" +"Raise :exc:`~urllib.error.URLError` if a URL authority isn't local, except " +"on Windows where we return a UNC path as before." +msgstr "" + +#: ../../whatsnew/3.14.rst:2097 +msgid "In :func:`~urllib.request.pathname2url`:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2099 +msgid "" +"Return a complete URL when the new *add_scheme* argument is set to true." +msgstr "" + +#: ../../whatsnew/3.14.rst:2100 +msgid "" +"Include an empty URL authority when a path begins with a slash. For example, " +"the path ``/etc/hosts`` is converted to the URL ``///etc/hosts``." +msgstr "" + +#: ../../whatsnew/3.14.rst:2103 +msgid "" +"On Windows, drive letters are no longer converted to uppercase, and ``:`` " +"characters not following a drive letter no longer cause an :exc:`OSError` " +"exception to be raised." +msgstr "" + +#: ../../whatsnew/3.14.rst:2107 +msgid "(Contributed by Barney Gale in :gh:`125866`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2111 ../../whatsnew/3.14.rst:2302 +msgid "uuid" +msgstr "uuid" + +#: ../../whatsnew/3.14.rst:2113 +msgid "" +"Add support for UUID versions 6, 7, and 8 via :func:`~uuid.uuid6`, :func:" +"`~uuid.uuid7`, and :func:`~uuid.uuid8` respectively, as specified in :rfc:" +"`9562`. (Contributed by Bénédikt Tran in :gh:`89083`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2118 +msgid "" +":const:`~uuid.NIL` and :const:`~uuid.MAX` are now available to represent the " +"Nil and Max UUID formats as defined by :rfc:`9562`. (Contributed by Nick " +"Pope in :gh:`128427`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2122 +msgid "" +"Allow generating multiple UUIDs simultaneously on the command-line via :" +"option:`python -m uuid --count `. (Contributed by Simon Legner " +"in :gh:`131236`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2128 +msgid "webbrowser" +msgstr "" + +#: ../../whatsnew/3.14.rst:2130 +msgid "" +"Names in the :envvar:`BROWSER` environment variable can now refer to already " +"registered browsers for the :mod:`webbrowser` module, instead of always " +"generating a new browser command." +msgstr "" + +#: ../../whatsnew/3.14.rst:2134 +msgid "" +"This makes it possible to set :envvar:`BROWSER` to the value of one of the " +"supported browsers on macOS." +msgstr "" + +#: ../../whatsnew/3.14.rst:2139 +msgid "zipfile" +msgstr "" + +#: ../../whatsnew/3.14.rst:2141 +msgid "" +"Added :meth:`ZipInfo._for_archive `, a method " +"to resolve suitable defaults for a :class:`~zipfile.ZipInfo` object as used " +"by :func:`ZipFile.writestr `. (Contributed by " +"Bénédikt Tran in :gh:`123424`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2146 +msgid "" +":meth:`.ZipFile.writestr` now respects the :envvar:`SOURCE_DATE_EPOCH` " +"environment variable in order to better support reproducible builds. " +"(Contributed by Jiahao Li in :gh:`91279`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2155 +msgid "Optimizations" +msgstr "Optimierungen" + +#: ../../whatsnew/3.14.rst:2157 +msgid "" +"The import time for several standard library modules has been improved, " +"including :mod:`annotationlib`, :mod:`ast`, :mod:`asyncio`, :mod:`base64`, :" +"mod:`cmd`, :mod:`csv`, :mod:`gettext`, :mod:`importlib.util`, :mod:" +"`locale`, :mod:`mimetypes`, :mod:`optparse`, :mod:`pickle`, :mod:`pprint`, :" +"mod:`pstats`, :mod:`shlex`, :mod:`socket`, :mod:`string`, :mod:" +"`subprocess`, :mod:`threading`, :mod:`tomllib`, :mod:`types`, and :mod:" +"`zipfile`." +msgstr "" + +#: ../../whatsnew/3.14.rst:2164 +msgid "" +"(Contributed by Adam Turner, Bénédikt Tran, Chris Markiewicz, Eli Schwartz, " +"Hugo van Kemenade, Jelle Zijlstra, and others in :gh:`118761`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2167 +msgid "" +"The interpreter now avoids some reference count modifications internally " +"when it's safe to do so. This can lead to different values being returned " +"from :func:`sys.getrefcount` and :c:func:`Py_REFCNT` compared to previous " +"versions of Python. See :ref:`below ` for details." +msgstr "" + +#: ../../whatsnew/3.14.rst:2177 +msgid "" +"Standard benchmark results have improved by 10-20% following the " +"implementation of a new per-thread doubly linked list for :class:`native " +"tasks `, also reducing memory usage. This enables external " +"introspection tools such as :ref:`python -m asyncio pstree ` to introspect the call graph of asyncio tasks " +"running in all threads. (Contributed by Kumar Aditya in :gh:`107803`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2186 +msgid "" +"The module now has first class support for :term:`free-threading builds " +"`. This enables parallel execution of multiple event loops " +"across different threads, scaling linearly with the number of threads. " +"(Contributed by Kumar Aditya in :gh:`128002`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2194 +msgid "base64" +msgstr "" + +#: ../../whatsnew/3.14.rst:2196 +msgid "" +":func:`~base64.b16decode` is now up to six times faster. (Contributed by " +"Bénédikt Tran, Chris Markiewicz, and Adam Turner in :gh:`118761`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2202 +msgid "bdb" +msgstr "" + +#: ../../whatsnew/3.14.rst:2204 +msgid "" +"The basic debugger now has a :mod:`sys.monitoring`-based backend, which can " +"be selected via the passing ``'monitoring'`` to the :class:`~bdb.Bdb` " +"class's new *backend* parameter. (Contributed by Tian Gao in :gh:`124533`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2213 +msgid "" +"The :func:`~difflib.IS_LINE_JUNK` function is now up to twice as fast. " +"(Contributed by Adam Turner and Semyon Moroz in :gh:`130167`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2218 ../../whatsnew/3.14.rst:3491 +msgid "gc" +msgstr "" + +#: ../../whatsnew/3.14.rst:2222 +msgid "" +"Python 3.14.0-3.14.4 shipped with a new incremental garbage collector. " +"However, due to a number of `reports `__ of significant memory pressure in production environments, " +"it has been reverted back to the generational GC from 3.13. This is the GC " +"now used in Python 3.14.5 and later." +msgstr "" + +#: ../../whatsnew/3.14.rst:2231 +msgid "" +"The new :ref:`incremental garbage collector ` " +"means that maximum pause times are reduced by an order of magnitude or more " +"for larger heaps." +msgstr "" + +#: ../../whatsnew/3.14.rst:2235 +msgid "" +"Because of this optimization, the meaning of the results of :meth:`~gc." +"get_threshold` and :meth:`~gc.set_threshold` have changed, along with :meth:" +"`~gc.get_count` and :meth:`~gc.get_stats`." +msgstr "" + +#: ../../whatsnew/3.14.rst:2239 +msgid "" +"For backwards compatibility, :meth:`~gc.get_threshold` continues to return a " +"three-item tuple. The first value is the threshold for young collections, as " +"before; the second value determines the rate at which the old collection is " +"scanned (the default is 10, and higher values mean that the old collection " +"is scanned more slowly). The third value is now meaningless and is always " +"zero." +msgstr "" + +#: ../../whatsnew/3.14.rst:2247 +msgid ":meth:`~gc.set_threshold` now ignores any items after the second." +msgstr "" + +#: ../../whatsnew/3.14.rst:2249 +msgid "" +":meth:`~gc.get_count` and :meth:`~gc.get_stats` continue to return the same " +"format of results. The only difference is that instead of the results " +"referring to the young, aging and old generations, the results refer to the " +"young generation and the aging and collecting spaces of the old generation." +msgstr "" + +#: ../../whatsnew/3.14.rst:2256 +msgid "" +"In summary, code that attempted to manipulate the behavior of the cycle GC " +"may not work exactly as intended, but it is very unlikely to be harmful. All " +"other code will work just fine." +msgstr "" + +#: ../../whatsnew/3.14.rst:2266 +msgid "" +"Opening and reading files now executes fewer system calls. Reading a small " +"operating system cached file in full is up to 15% faster. (Contributed by " +"Cody Maloney and Victor Stinner in :gh:`120754` and :gh:`90102`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2275 +msgid "" +":func:`Path.read_bytes ` now uses unbuffered mode " +"to open files, which is between 9% and 17% faster to read in full. " +"(Contributed by Cody Maloney in :gh:`120754`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2283 +msgid "" +":mod:`pdb` now supports two backends, based on either :func:`sys.settrace` " +"or :mod:`sys.monitoring`. Using the :ref:`pdb CLI ` or :func:" +"`breakpoint` will always use the :mod:`sys.monitoring` backend. Explicitly " +"instantiating :class:`pdb.Pdb` and its derived classes will use the :func:" +"`sys.settrace` backend by default, which is configurable. (Contributed by " +"Tian Gao in :gh:`124533`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2293 +msgid "textwrap" +msgstr "" + +#: ../../whatsnew/3.14.rst:2295 +msgid "" +"Optimize the :func:`~textwrap.dedent` function, improving performance by an " +"average of 2.4x, with larger improvements for bigger inputs, and fix a bug " +"with incomplete normalization of blank lines with whitespace characters " +"other than space and tab." +msgstr "" + +#: ../../whatsnew/3.14.rst:2304 +msgid "" +":func:`~uuid.uuid3` and :func:`~uuid.uuid5` are now both roughly 40% faster " +"for 16-byte names and 20% faster for 1024-byte names. Performance for longer " +"names remains unchanged. (Contributed by Bénédikt Tran in :gh:`128150`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2309 +msgid "" +":func:`~uuid.uuid4` is now c. 30% faster. (Contributed by Bénédikt Tran in :" +"gh:`128150`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2314 +msgid "zlib" +msgstr "" + +#: ../../whatsnew/3.14.rst:2316 +msgid "" +"On Windows, `zlib-ng `__ is now used as " +"the implementation of the :mod:`zlib` module in the default binaries. There " +"are no known incompatibilities between ``zlib-ng`` and the previously-used " +"``zlib`` implementation. This should result in better performance at all " +"compression levels." +msgstr "" + +#: ../../whatsnew/3.14.rst:2323 +msgid "" +"It is worth noting that ``zlib.Z_BEST_SPEED`` (``1``) may result in " +"significantly less compression than the previous implementation, whilst also " +"significantly reducing the time taken to compress." +msgstr "" + +#: ../../whatsnew/3.14.rst:2327 +msgid "(Contributed by Steve Dower in :gh:`91349`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2331 +msgid "Removed" +msgstr "Entfernt" + +#: ../../whatsnew/3.14.rst:2336 +msgid "" +"Remove the *type*, *choices*, and *metavar* parameters of :class:`!" +"BooleanOptionalAction`. These have been deprecated since Python 3.12. " +"(Contributed by Nikita Sobolev in :gh:`118805`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2341 +msgid "" +"Calling :meth:`~argparse.ArgumentParser.add_argument_group` on an argument " +"group now raises a :exc:`ValueError`. Similarly, :meth:`~argparse." +"ArgumentParser.add_argument_group` or :meth:`~argparse.ArgumentParser." +"add_mutually_exclusive_group` on a mutually exclusive group now both raise :" +"exc:`ValueError`\\ s. This 'nesting' was never supported, often failed to " +"work correctly, and was unintentionally exposed through inheritance. This " +"functionality has been deprecated since Python 3.11. (Contributed by " +"Savannah Ostrowski in :gh:`127186`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2355 +msgid "" +"Remove the following classes, which have been deprecated aliases of :class:" +"`~ast.Constant` since Python 3.8 and have emitted deprecation warnings since " +"Python 3.12:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2359 +msgid ":class:`!Bytes`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2360 +msgid ":class:`!Ellipsis`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2361 +msgid ":class:`!NameConstant`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2362 +msgid ":class:`!Num`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2363 +msgid ":class:`!Str`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2365 +msgid "" +"As a consequence of these removals, user-defined ``visit_Num``, " +"``visit_Str``, ``visit_Bytes``, ``visit_NameConstant`` and " +"``visit_Ellipsis`` methods on custom :class:`~ast.NodeVisitor` subclasses " +"will no longer be called when the :class:`!NodeVisitor` subclass is visiting " +"an AST. Define a ``visit_Constant`` method instead." +msgstr "" + +#: ../../whatsnew/3.14.rst:2371 +msgid "(Contributed by Alex Waygood in :gh:`119562`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2373 +msgid "" +"Remove the following deprecated properties on :class:`ast.Constant`, which " +"were present for compatibility with the now-removed AST classes:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2376 +msgid ":attr:`!Constant.n`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2377 +msgid ":attr:`!Constant.s`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2379 +msgid "" +"Use :attr:`!Constant.value` instead. (Contributed by Alex Waygood in :gh:" +"`119562`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2386 +msgid "" +"Remove the following classes, methods, and functions, which have been " +"deprecated since Python 3.12:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2389 +msgid ":class:`!AbstractChildWatcher`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2390 +msgid ":class:`!FastChildWatcher`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2391 +msgid ":class:`!MultiLoopChildWatcher`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2392 +msgid ":class:`!PidfdChildWatcher`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2393 +msgid ":class:`!SafeChildWatcher`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2394 +msgid ":class:`!ThreadedChildWatcher`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2395 +msgid ":meth:`!AbstractEventLoopPolicy.get_child_watcher`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2396 +msgid ":meth:`!AbstractEventLoopPolicy.set_child_watcher`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2397 +msgid ":func:`!get_child_watcher`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2398 +msgid ":func:`!set_child_watcher`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2400 +msgid "(Contributed by Kumar Aditya in :gh:`120804`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2402 +msgid "" +":func:`asyncio.get_event_loop` now raises a :exc:`RuntimeError` if there is " +"no current event loop, and no longer implicitly creates an event loop." +msgstr "" + +#: ../../whatsnew/3.14.rst:2406 +msgid "(Contributed by Kumar Aditya in :gh:`126353`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2411 +msgid "" +"There's a few patterns that use :func:`asyncio.get_event_loop`, most of them " +"can be replaced with :func:`asyncio.run`." +msgstr "" + +#: ../../whatsnew/3.14.rst:2414 +msgid "If you're running an async function, simply use :func:`asyncio.run`." +msgstr "" + +#: ../../whatsnew/3.14.rst:2416 ../../whatsnew/3.14.rst:2443 +#: ../../whatsnew/3.14.rst:2471 +msgid "Before:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2418 +msgid "" +"async def main():\n" +" ...\n" +"\n" +"\n" +"loop = asyncio.get_event_loop()\n" +"try:\n" +" loop.run_until_complete(main())\n" +"finally:\n" +" loop.close()" +msgstr "" + +#: ../../whatsnew/3.14.rst:2430 ../../whatsnew/3.14.rst:2456 +#: ../../whatsnew/3.14.rst:2487 +msgid "After:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2432 +msgid "" +"async def main():\n" +" ...\n" +"\n" +"asyncio.run(main())" +msgstr "" + +#: ../../whatsnew/3.14.rst:2439 +msgid "" +"If you need to start something, for example, a server listening on a socket " +"and then run forever, use :func:`asyncio.run` and an :class:`asyncio.Event`." +msgstr "" + +#: ../../whatsnew/3.14.rst:2445 +msgid "" +"def start_server(loop): ...\n" +"\n" +"loop = asyncio.get_event_loop()\n" +"try:\n" +" start_server(loop)\n" +" loop.run_forever()\n" +"finally:\n" +" loop.close()" +msgstr "" + +#: ../../whatsnew/3.14.rst:2458 +msgid "" +"def start_server(loop): ...\n" +"\n" +"async def main():\n" +" start_server(asyncio.get_running_loop())\n" +" await asyncio.Event().wait()\n" +"\n" +"asyncio.run(main())" +msgstr "" + +#: ../../whatsnew/3.14.rst:2468 +msgid "" +"If you need to run something in an event loop, then run some blocking code " +"around it, use :class:`asyncio.Runner`." +msgstr "" + +#: ../../whatsnew/3.14.rst:2473 +msgid "" +"async def operation_one(): ...\n" +"def blocking_code(): ...\n" +"async def operation_two(): ...\n" +"\n" +"loop = asyncio.get_event_loop()\n" +"try:\n" +" loop.run_until_complete(operation_one())\n" +" blocking_code()\n" +" loop.run_until_complete(operation_two())\n" +"finally:\n" +" loop.close()" +msgstr "" + +#: ../../whatsnew/3.14.rst:2489 +msgid "" +"async def operation_one(): ...\n" +"def blocking_code(): ...\n" +"async def operation_two(): ...\n" +"\n" +"with asyncio.Runner() as runner:\n" +" runner.run(operation_one())\n" +" blocking_code()\n" +" runner.run(operation_two())" +msgstr "" + +#: ../../whatsnew/3.14.rst:2502 +msgid "email" +msgstr "" + +#: ../../whatsnew/3.14.rst:2504 +msgid "" +"Remove :func:`email.utils.localtime`'s *isdst* parameter, which was " +"deprecated in and has been ignored since Python 3.12. (Contributed by Hugo " +"van Kemenade in :gh:`118798`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2510 +msgid "importlib.abc" +msgstr "" + +#: ../../whatsnew/3.14.rst:2512 +msgid "Remove deprecated :mod:`importlib.abc` classes:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2514 +msgid "" +":class:`!ResourceReader` (use :class:`~importlib.resources.abc." +"TraversableResources`)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2516 +msgid "" +":class:`!Traversable` (use :class:`~importlib.resources.abc.Traversable`)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2518 +msgid "" +":class:`!TraversableResources` (use :class:`~importlib.resources.abc." +"TraversableResources`)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2521 +msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)" +msgstr "" +"(Beigetragen von Jason R. Coombs und Hugo van Kemenade in :gh:`93963`.)" + +#: ../../whatsnew/3.14.rst:2525 +msgid "itertools" +msgstr "itertools" + +#: ../../whatsnew/3.14.rst:2527 +msgid "" +"Remove support for copy, deepcopy, and pickle operations from :mod:" +"`itertools` iterators. These have emitted a :exc:`DeprecationWarning` since " +"Python 3.12. (Contributed by Raymond Hettinger in :gh:`101588`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2536 +msgid "" +"Remove support for passing additional keyword arguments to :class:`~pathlib." +"Path`. In previous versions, any such arguments are ignored. (Contributed by " +"Barney Gale in :gh:`74033`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2541 +msgid "" +"Remove support for passing additional positional arguments to :meth:`." +"PurePath.relative_to` and :meth:`~pathlib.PurePath.is_relative_to`. In " +"previous versions, any such arguments are joined onto *other*. (Contributed " +"by Barney Gale in :gh:`78707`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2548 +msgid "pkgutil" +msgstr "" + +#: ../../whatsnew/3.14.rst:2550 +msgid "" +"Remove the :func:`!get_loader` and :func:`!find_loader` functions, which " +"have been deprecated since Python 3.12. (Contributed by Bénédikt Tran in :gh:" +"`97850`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2556 +msgid "pty" +msgstr "" + +#: ../../whatsnew/3.14.rst:2558 +msgid "" +"Remove the :func:`!master_open` and :func:`!slave_open` functions, which " +"have been deprecated since Python 3.12. Use :func:`pty.openpty` instead. " +"(Contributed by Nikita Sobolev in :gh:`118824`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2565 +msgid "sqlite3" +msgstr "sqlite3" + +#: ../../whatsnew/3.14.rst:2567 +msgid "" +"Remove :data:`!version` and :data:`!version_info` from the :mod:`sqlite3` " +"module; use :data:`~sqlite3.sqlite_version` and :data:`~sqlite3." +"sqlite_version_info` for the actual version number of the runtime SQLite " +"library. (Contributed by Hugo van Kemenade in :gh:`118924`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2573 +msgid "" +"Using a sequence of parameters with named placeholders now raises a :exc:" +"`~sqlite3.ProgrammingError`, having been deprecated since Python 3.12. " +"(Contributed by Erlend E. Aasland in :gh:`118928` and :gh:`101693`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2582 +msgid "" +"Remove the :class:`!Quoter` class from :mod:`urllib.parse`, which has been " +"deprecated since Python 3.11. (Contributed by Nikita Sobolev in :gh:" +"`118827`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2586 +msgid "" +"Remove the :class:`!URLopener` and :class:`!FancyURLopener` classes from :" +"mod:`urllib.request`, which have been deprecated since Python 3.3." +msgstr "" + +#: ../../whatsnew/3.14.rst:2590 +msgid "" +"``myopener.open()`` can be replaced with :func:`~urllib.request.urlopen`. " +"``myopener.retrieve()`` can be replaced with :func:`~urllib.request." +"urlretrieve`. Customisations to the opener classes can be replaced by " +"passing customized handlers to :func:`~urllib.request.build_opener`. " +"(Contributed by Barney Gale in :gh:`84850`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2599 +msgid "Deprecated" +msgstr "Als veraltet markiert" + +#: ../../whatsnew/3.14.rst:2602 +msgid "New deprecations" +msgstr "" + +#: ../../whatsnew/3.14.rst:2604 +msgid "" +"Passing a complex number as the *real* or *imag* argument in the :func:" +"`complex` constructor is now deprecated; complex numbers should only be " +"passed as a single positional argument. (Contributed by Serhiy Storchaka in :" +"gh:`109218`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2609 +#: ../../deprecations/pending-removal-in-future.rst:7 +msgid ":mod:`argparse`:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2611 +msgid "" +"Passing the undocumented keyword argument *prefix_chars* to the :meth:" +"`~argparse.ArgumentParser.add_argument_group` method is now deprecated. " +"(Contributed by Savannah Ostrowski in :gh:`125563`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2615 +msgid "" +"Deprecated the :class:`argparse.FileType` type converter. Anything relating " +"to resource management should be handled downstream, after the arguments " +"have been parsed. (Contributed by Serhiy Storchaka in :gh:`58032`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2620 +#: ../../deprecations/pending-removal-in-3.16.rst:19 +msgid ":mod:`asyncio`:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2622 +msgid "" +"The :func:`!asyncio.iscoroutinefunction` is now deprecated and will be " +"removed in Python 3.16; use :func:`inspect.iscoroutinefunction` instead. " +"(Contributed by Jiahao Li and Kumar Aditya in :gh:`122875`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2627 +msgid "" +"The :mod:`asyncio` policy system is deprecated and will be removed in Python " +"3.16. In particular, the following classes and functions are deprecated:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2631 +#: ../../deprecations/pending-removal-in-3.16.rst:29 +msgid ":class:`asyncio.AbstractEventLoopPolicy`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2632 +#: ../../deprecations/pending-removal-in-3.16.rst:30 +msgid ":class:`asyncio.DefaultEventLoopPolicy`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2633 +#: ../../deprecations/pending-removal-in-3.16.rst:31 +msgid ":class:`asyncio.WindowsSelectorEventLoopPolicy`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2634 +#: ../../deprecations/pending-removal-in-3.16.rst:32 +msgid ":class:`asyncio.WindowsProactorEventLoopPolicy`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2635 +#: ../../deprecations/pending-removal-in-3.16.rst:33 +msgid ":func:`asyncio.get_event_loop_policy`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2636 +#: ../../deprecations/pending-removal-in-3.16.rst:34 +msgid ":func:`asyncio.set_event_loop_policy`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2638 +msgid "" +"Users should use :func:`asyncio.run` or :class:`asyncio.Runner` with the " +"*loop_factory* argument to use the desired event loop implementation." +msgstr "" + +#: ../../whatsnew/3.14.rst:2641 +msgid "For example, to use :class:`asyncio.SelectorEventLoop` on Windows:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2643 +#: ../../deprecations/pending-removal-in-3.16.rst:41 +msgid "" +"import asyncio\n" +"\n" +"async def main():\n" +" ...\n" +"\n" +"asyncio.run(main(), loop_factory=asyncio.SelectorEventLoop)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2652 +#: ../../deprecations/pending-removal-in-3.16.rst:48 +msgid "(Contributed by Kumar Aditya in :gh:`127949`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2654 +msgid "" +":mod:`codecs`: The :func:`codecs.open` function is now deprecated, and will " +"be removed in a future version of Python. Use :func:`open` instead. " +"(Contributed by Inada Naoki in :gh:`133036`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2660 +#: ../../deprecations/pending-removal-in-3.15.rst:16 +#: ../../deprecations/pending-removal-in-3.19.rst:4 +msgid ":mod:`ctypes`:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2662 +msgid "" +"On non-Windows platforms, setting :attr:`.Structure._pack_` to use a MSVC-" +"compatible default memory layout is now deprecated in favor of setting :attr:" +"`.Structure._layout_` to ``'ms'``, and will be removed in Python 3.19. " +"(Contributed by Petr Viktorin in :gh:`131747`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2667 +msgid "" +"Calling :func:`ctypes.POINTER` on a string is now deprecated. Use :ref:" +"`incomplete types ` for self-referential " +"structures. Also, the internal ``ctypes._pointer_type_cache`` is deprecated. " +"See :func:`ctypes.POINTER` for updated implementation details. (Contributed " +"by Sergey Myrianov in :gh:`100926`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2674 +msgid "" +":mod:`functools`: Calling the Python implementation of :func:`functools." +"reduce` with *function* or *sequence* as keyword arguments is now " +"deprecated; the parameters will be made positional-only in Python 3.16. " +"(Contributed by Kirill Podoprigora in :gh:`121676`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2680 +msgid "" +":mod:`logging`: Support for custom logging handlers with the *strm* argument " +"is now deprecated and scheduled for removal in Python 3.16. Define handlers " +"with the *stream* argument instead. (Contributed by Mariusz Felisiak in :gh:" +"`115032`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2686 +msgid "" +":mod:`mimetypes`: Valid extensions are either empty or must start with '.' " +"for :meth:`mimetypes.MimeTypes.add_type`. Undotted extensions are deprecated " +"and will raise a :exc:`ValueError` in Python 3.16. (Contributed by Hugo van " +"Kemenade in :gh:`75223`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2693 +msgid "" +":mod:`!nturl2path`: This module is now deprecated. Call :func:`urllib." +"request.url2pathname` and :func:`~urllib.request.pathname2url` instead. " +"(Contributed by Barney Gale in :gh:`125866`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2698 +msgid "" +":mod:`os`: The :func:`os.popen` and :func:`os.spawn* ` functions " +"are now :term:`soft deprecated`. They should no longer be used to write new " +"code. The :mod:`subprocess` module is recommended instead. (Contributed by " +"Victor Stinner in :gh:`120743`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2705 +msgid "" +":mod:`pathlib`: :meth:`!pathlib.PurePath.as_uri` is now deprecated and " +"scheduled for removal in Python 3.19. Use :meth:`pathlib.Path.as_uri` " +"instead. (Contributed by Barney Gale in :gh:`123599`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2711 +msgid "" +":mod:`pdb`: The undocumented ``pdb.Pdb.curframe_locals`` attribute is now a " +"deprecated read-only property, which will be removed in a future version of " +"Python. The low overhead dynamic frame locals access added in Python 3.13 " +"by :pep:`667` means the frame locals cache reference previously stored in " +"this attribute is no longer needed. Derived debuggers should access ``pdb." +"Pdb.curframe.f_locals`` directly in Python 3.13 and later versions. " +"(Contributed by Tian Gao in :gh:`124369` and :gh:`125951`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2720 +msgid "" +":mod:`symtable`: Deprecate :meth:`symtable.Class.get_methods` due to the " +"lack of interest, scheduled for removal in Python 3.16. (Contributed by " +"Bénédikt Tran in :gh:`119698`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2725 +msgid "" +":mod:`tkinter`: The :class:`!tkinter.Variable` methods :meth:`!" +"trace_variable`, :meth:`!trace_vdelete` and :meth:`!trace_vinfo` are now " +"deprecated. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!" +"trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2731 +msgid "" +":mod:`urllib.parse`: Accepting objects with false values (like ``0`` and " +"``[]``) except empty strings, bytes-like objects and ``None`` in :func:" +"`~urllib.parse.parse_qsl` and :func:`~urllib.parse.parse_qs` is now " +"deprecated. (Contributed by Serhiy Storchaka in :gh:`116897`.)" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:2 +#: ../../deprecations/pending-removal-in-3.15.rst:2 +msgid "Pending removal in Python 3.15" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:4 +#: ../../deprecations/pending-removal-in-3.16.rst:4 +msgid "The import system:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:6 +msgid "" +"Setting ``__cached__`` on a module while failing to set :attr:`__spec__." +"cached ` is deprecated. In Python " +"3.15, ``__cached__`` will cease to be set or take into consideration by the " +"import system or standard library. (:gh:`97879`)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:11 +msgid "" +"Setting :attr:`~module.__package__` on a module while failing to set :attr:" +"`__spec__.parent ` is deprecated. In " +"Python 3.15, :attr:`!__package__` will cease to be set or take into " +"consideration by the import system or standard library. (:gh:`97879`)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:18 +msgid "" +"The undocumented :func:`!ctypes.SetPointerType` function has been deprecated " +"since Python 3.13." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:21 +msgid ":mod:`http.server`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:23 +msgid "" +"The obsolete and rarely used :class:`!CGIHTTPRequestHandler` has been " +"deprecated since Python 3.13. No direct replacement exists. *Anything* is " +"better than CGI to interface a web server with a request handler." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:29 +msgid "" +"The :option:`!--cgi` flag to the :program:`python -m http.server` command-" +"line interface has been deprecated since Python 3.13." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:32 +#: ../../deprecations/pending-removal-in-future.rst:62 +msgid ":mod:`importlib`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:34 +msgid "``load_module()`` method: use ``exec_module()`` instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:36 +msgid ":mod:`pathlib`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:38 +msgid "" +":meth:`!.PurePath.is_reserved` has been deprecated since Python 3.13. Use :" +"func:`os.path.isreserved` to detect reserved paths on Windows." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:42 +msgid ":mod:`platform`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:44 +msgid "" +":func:`!platform.java_ver` has been deprecated since Python 3.13. This " +"function is only useful for Jython support, has a confusing API, and is " +"largely untested." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:48 +#: ../../deprecations/pending-removal-in-3.16.rst:96 +msgid ":mod:`sysconfig`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:50 +msgid "" +"The *check_home* argument of :func:`sysconfig.is_python_build` has been " +"deprecated since Python 3.12." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:53 +msgid ":mod:`threading`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:55 +msgid "" +":func:`~threading.RLock` will take no arguments in Python 3.15. Passing any " +"arguments has been deprecated since Python 3.14, as the Python version does " +"not permit any arguments, but the C version allows any number of positional " +"or keyword arguments, ignoring every argument." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:61 +msgid ":mod:`types`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:63 +msgid "" +":class:`types.CodeType`: Accessing :attr:`!codeobject.co_lnotab` was " +"deprecated in :pep:`626` since 3.10 and was planned to be removed in 3.12, " +"but it only got a proper :exc:`DeprecationWarning` in 3.12. May be removed " +"in 3.15. (Contributed by Nikita Sobolev in :gh:`101866`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:70 +#: ../../deprecations/pending-removal-in-3.17.rst:52 +#: ../../deprecations/pending-removal-in-3.20.rst:57 +msgid ":mod:`typing`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:72 +msgid "" +"The undocumented keyword argument syntax for creating :class:`~typing." +"NamedTuple` classes (for example, ``Point = NamedTuple(\"Point\", x=int, " +"y=int)``) has been deprecated since Python 3.13. Use the class-based syntax " +"or the functional syntax instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:78 +msgid "" +"When using the functional syntax of :class:`~typing.TypedDict`\\s, failing " +"to pass a value to the *fields* parameter (``TD = TypedDict(\"TD\")``) or " +"passing ``None`` (``TD = TypedDict(\"TD\", None)``) has been deprecated " +"since Python 3.13. Use ``class TD(TypedDict): pass`` or ``TD = " +"TypedDict(\"TD\", {})`` to create a TypedDict with zero field." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:85 +msgid "" +"The :deco:`!typing.no_type_check_decorator` decorator function has been " +"deprecated since Python 3.13. After eight years in the :mod:`typing` module, " +"it has yet to be supported by any major type checker." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:90 +msgid "" +":mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` modules." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:92 +msgid ":mod:`wave`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:94 +msgid "" +"The ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of the :class:" +"`~wave.Wave_read` and :class:`~wave.Wave_write` classes have been deprecated " +"since Python 3.13." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:98 +msgid ":mod:`zipimport`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.15.rst:100 +msgid "" +":meth:`!zipimport.zipimporter.load_module` has been deprecated since Python " +"3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead. (:gh:`125746`.)" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.16.rst:2 +#: ../../deprecations/pending-removal-in-3.16.rst:2 +msgid "Pending removal in Python 3.16" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:6 +msgid "" +"Setting :attr:`~module.__loader__` on a module while failing to set :attr:" +"`__spec__.loader ` is deprecated. In " +"Python 3.16, :attr:`!__loader__` will cease to be set or taken into " +"consideration by the import system or the standard library." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:11 +msgid ":mod:`array`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:13 +msgid "" +"The ``'u'`` format code (:c:type:`wchar_t`) has been deprecated in " +"documentation since Python 3.3 and at runtime since Python 3.13. Use the " +"``'w'`` format code (:c:type:`Py_UCS4`) for Unicode characters instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:21 +msgid "" +":func:`!asyncio.iscoroutinefunction` is deprecated and will be removed in " +"Python 3.16; use :func:`inspect.iscoroutinefunction` instead. (Contributed " +"by Jiahao Li and Kumar Aditya in :gh:`122875`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:26 +msgid "" +":mod:`asyncio` policy system is deprecated and will be removed in Python " +"3.16. In particular, the following classes and functions are deprecated:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:36 +msgid "" +"Users should use :func:`asyncio.run` or :class:`asyncio.Runner` with " +"*loop_factory* to use the desired event loop implementation." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:39 +msgid "For example, to use :class:`asyncio.SelectorEventLoop` on Windows::" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:50 +#: ../../deprecations/pending-removal-in-future.rst:16 +msgid ":mod:`builtins`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:52 +msgid "" +"Bitwise inversion on boolean types, ``~True`` or ``~False`` has been " +"deprecated since Python 3.12, as it produces surprising and unintuitive " +"results (``-2`` and ``-1``). Use ``not x`` instead for the logical negation " +"of a Boolean. In the rare case that you need the bitwise inversion of the " +"underlying integer, convert to ``int`` explicitly (``~int(x)``)." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:59 +msgid ":mod:`functools`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:61 +msgid "" +"Calling the Python implementation of :func:`functools.reduce` with " +"*function* or *sequence* as keyword arguments has been deprecated since " +"Python 3.14." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:64 +msgid ":mod:`logging`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:66 +msgid "" +"Support for custom logging handlers with the *strm* argument is deprecated " +"and scheduled for removal in Python 3.16. Define handlers with the *stream* " +"argument instead. (Contributed by Mariusz Felisiak in :gh:`115032`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:70 +msgid ":mod:`mimetypes`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:72 +msgid "" +"Valid extensions start with a '.' or are empty for :meth:`mimetypes." +"MimeTypes.add_type`. Undotted extensions are deprecated and will raise a :" +"exc:`ValueError` in Python 3.16. (Contributed by Hugo van Kemenade in :gh:" +"`75223`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:78 +msgid ":mod:`shutil`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:80 +msgid "" +"The :class:`!ExecError` exception has been deprecated since Python 3.14. It " +"has not been used by any function in :mod:`!shutil` since Python 3.4, and is " +"now an alias of :exc:`RuntimeError`." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:85 +msgid ":mod:`symtable`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:87 +msgid "" +"The :meth:`Class.get_methods ` method has been " +"deprecated since Python 3.14." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:90 +msgid ":mod:`sys`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:92 +msgid "" +"The :func:`~sys._enablelegacywindowsfsencoding` function has been deprecated " +"since Python 3.13. Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` " +"environment variable instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:98 +msgid "" +"The :func:`!sysconfig.expand_makefile_vars` function has been deprecated " +"since Python 3.14. Use the ``vars`` argument of :func:`sysconfig.get_paths` " +"instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:102 +msgid ":mod:`tarfile`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.16.rst:104 +msgid "" +"The undocumented and unused :attr:`!TarFile.tarfile` attribute has been " +"deprecated since Python 3.13." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:2 +msgid "Pending removal in Python 3.17" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:4 +#: ../../deprecations/pending-removal-in-future.rst:53 +msgid ":mod:`datetime`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:6 +msgid "" +":meth:`~datetime.datetime.strptime` calls using a format string containing " +"``%e`` (day of month) without a year. This has been deprecated since Python " +"3.15. (Contributed by Stan Ulbrych in :gh:`70647`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:12 +msgid ":mod:`collections.abc`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:14 +msgid "" +":class:`collections.abc.ByteString` is scheduled for removal in Python 3.17." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:16 +#: ../../deprecations/pending-removal-in-3.17.rst:62 +msgid "" +"Use ``isinstance(obj, collections.abc.Buffer)`` to test if ``obj`` " +"implements the :ref:`buffer protocol ` at runtime. For use in " +"type annotations, either use :class:`~collections.abc.Buffer` or a union " +"that explicitly specifies the types your code supports (e.g., ``bytes | " +"bytearray | memoryview``)." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:22 +#: ../../deprecations/pending-removal-in-3.17.rst:68 +msgid "" +":class:`!ByteString` was originally intended to be an abstract class that " +"would serve as a supertype of both :class:`bytes` and :class:`bytearray`. " +"However, since the ABC never had any methods, knowing that an object was an " +"instance of :class:`!ByteString` never actually told you anything useful " +"about the object. Other common buffer types such as :class:`memoryview` were " +"also never understood as subtypes of :class:`!ByteString` (either at runtime " +"or by static type checkers)." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:30 +#: ../../deprecations/pending-removal-in-3.17.rst:76 +msgid "" +"See :pep:`PEP 688 <688#current-options>` for more details. (Contributed by " +"Shantanu Jain in :gh:`91896`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:34 +msgid ":mod:`encodings`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:36 +msgid "" +"Passing non-ascii *encoding* names to :func:`encodings.normalize_encoding` " +"is deprecated and scheduled for removal in Python 3.17. (Contributed by Stan " +"Ulbrych in :gh:`136702`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:40 +msgid ":mod:`profile`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:42 +msgid "" +"The :mod:`!profile` module is deprecated and will be removed in Python 3.17. " +"Use :mod:`profiling.tracing` instead, which provides a compatible API. See :" +"pep:`799` for details. (Contributed by Pablo Galindo and László Kiss Kollár " +"in :gh:`138122`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:47 +msgid ":mod:`webbrowser`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:49 +msgid "" +":class:`!webbrowser.MacOSXOSAScript` is deprecated in favour of :class:`!" +"webbrowser.MacOS`. (:gh:`137586`)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:54 +msgid "" +"Before Python 3.14, old-style unions were implemented using the private " +"class ``typing._UnionGenericAlias``. This class is no longer needed for the " +"implementation, but it has been retained for backward compatibility, with " +"removal scheduled for Python 3.17. Users should use documented introspection " +"helpers like :func:`typing.get_origin` and :func:`typing.get_args` instead " +"of relying on private implementation details." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:59 +msgid "" +":class:`typing.ByteString`, deprecated since Python 3.9, is scheduled for " +"removal in Python 3.17." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.17.rst:79 +#, fuzzy +msgid ":mod:`tkinter`:" +msgstr "tkinter" + +#: ../../deprecations/pending-removal-in-3.17.rst:81 +msgid "" +"The :class:`!tkinter.Variable` methods :meth:`!trace_variable`, :meth:`!" +"trace` (an alias of :meth:`!trace_variable`), :meth:`!trace_vdelete` and :" +"meth:`!trace_vinfo`, deprecated since Python 3.14, are scheduled for removal " +"in Python 3.17. Use :meth:`!trace_add`, :meth:`!trace_remove` and :meth:`!" +"trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:2 +#: ../../deprecations/pending-removal-in-3.18.rst:2 +msgid "Pending removal in Python 3.18" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.18.rst:4 +msgid "" +"No longer accept a boolean value when a file descriptor is expected. " +"(Contributed by Serhiy Storchaka in :gh:`82626`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.18.rst:7 +msgid ":mod:`decimal`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.18.rst:9 +msgid "" +"The non-standard and undocumented :class:`~decimal.Decimal` format specifier " +"``'N'``, which is only supported in the :mod:`!decimal` module's C " +"implementation, has been deprecated since Python 3.13. (Contributed by " +"Serhiy Storchaka in :gh:`89902`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.18.rst:14 +#: ../../deprecations/pending-removal-in-3.20.rst:42 +msgid "Deprecations defined by :pep:`829`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.18.rst:16 +msgid "``import`` lines in :file:`{name}.pth` files are silently ignored." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.18.rst:18 +#: ../../deprecations/pending-removal-in-3.20.rst:50 +msgid "(Contributed by Barry Warsaw in :gh:`148641`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:2 +msgid "Pending removal in Python 3.19" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:6 +msgid "" +"Implicitly switching to the MSVC-compatible struct layout by setting :attr:" +"`~ctypes.Structure._pack_` but not :attr:`~ctypes.Structure._layout_` on non-" +"Windows platforms." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:10 +msgid ":mod:`hashlib`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:12 +msgid "" +"In hash function constructors such as :func:`~hashlib.new` or the direct " +"hash-named constructors such as :func:`~hashlib.md5` and :func:`~hashlib." +"sha256`, their optional initial data parameter could also be passed a " +"keyword argument named ``data=`` or ``string=`` in various :mod:`!hashlib` " +"implementations." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:18 +msgid "" +"Support for the ``string`` keyword argument name is now deprecated and " +"slated for removal in Python 3.19." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:21 +msgid "" +"Before Python 3.13, the ``string`` keyword parameter was not correctly " +"supported depending on the backend implementation of hash functions. Prefer " +"passing the initial data as a positional argument for maximum backwards " +"compatibility." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:26 +msgid ":mod:`http.cookies`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:28 +msgid "" +":meth:`http.cookies.Morsel.js_output` is deprecated and will be removed in " +"Python 3.19." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:31 +msgid "" +":meth:`http.cookies.BaseCookie.js_output` is deprecated and will be removed " +"in Python 3.19." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:34 +msgid ":mod:`imaplib`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:36 +msgid "" +"Altering :attr:`IMAP4.file ` is now deprecated and " +"slated for removal in Python 3.19. This property is now unused and changing " +"its value does not automatically close the current file." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.19.rst:40 +msgid "" +"Before Python 3.14, this property was used to implement the corresponding " +"``read()`` and ``readline()`` methods for :class:`~imaplib.IMAP4` but this " +"is no longer the case since then." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:2 +msgid "Pending removal in Python 3.20" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:4 +msgid "" +"Calling the ``__new__()`` method of :class:`struct.Struct` without the " +"*format* argument is deprecated and will be removed in Python 3.20. " +"Calling :meth:`~object.__init__` method on initialized :class:`~struct." +"Struct` objects is deprecated and will be removed in Python 3.20." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:9 +msgid "" +"(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:11 +msgid "" +"The ``__version__``, ``version`` and ``VERSION`` attributes have been " +"deprecated in these standard library modules and will be removed in Python " +"3.20. Use :py:data:`sys.version_info` instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:15 +msgid ":mod:`argparse`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:16 +msgid ":mod:`csv`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:17 +msgid ":mod:`ctypes`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:18 +msgid ":mod:`!ctypes.macholib`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:19 +msgid ":mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:20 +msgid ":mod:`http.server`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:21 +msgid ":mod:`imaplib`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:22 +msgid ":mod:`ipaddress`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:23 +msgid ":mod:`json`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:24 +msgid ":mod:`logging` (``__date__`` also deprecated)" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:25 +msgid ":mod:`optparse`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:26 +msgid ":mod:`pickle`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:27 +msgid ":mod:`platform`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:28 +msgid ":mod:`re`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:29 +msgid ":mod:`socketserver`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:30 +msgid ":mod:`tabnanny`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:31 +msgid ":mod:`tarfile`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:32 +msgid ":mod:`tkinter.font`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:33 +msgid ":mod:`tkinter.ttk`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:34 +msgid ":mod:`wsgiref.simple_server`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:35 +msgid ":mod:`xml.etree.ElementTree`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:36 +msgid ":mod:`!xml.sax.expatreader`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:37 +msgid ":mod:`xml.sax.handler`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:38 +msgid ":mod:`zlib`" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:40 +#, fuzzy +msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" +msgstr "" +"(Beigetragen von Jason R. Coombs und Hugo van Kemenade in :gh:`93963`.)" + +#: ../../deprecations/pending-removal-in-3.20.rst:44 +msgid "" +"Warnings are produced for ``import`` lines found in :file:`{name}.pth` files." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:47 +msgid "" +":file:`{name}.pth` files are no longer decoded in the locale encoding by " +"default. They **MUST** be encoded in ``utf-8-sig``." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:52 +msgid ":mod:`ast`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:54 +msgid "" +"Creating instances of abstract AST nodes (such as :class:`ast.AST` or :class:" +"`!ast.expr`) is deprecated and will raise an error in Python 3.20." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:59 +msgid "" +"It is deprecated to call :func:`isinstance` and :func:`issubclass` checks on " +"protocol classes that were not explicitly decorated with :func:`!" +"runtime_checkable` but that inherit from a runtime-checkable protocol class. " +"This will raise a :exc:`TypeError` in Python 3.20." +msgstr "" + +#: ../../deprecations/pending-removal-in-3.20.rst:64 +msgid "(Contributed by Bartosz Sławecki in :gh:`132604`.)" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:2 +#: ../../deprecations/pending-removal-in-future.rst:2 +msgid "Pending removal in future versions" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:4 +msgid "" +"The following APIs will be removed in the future, although there is " +"currently no date scheduled for their removal." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:9 +msgid "" +"Nesting argument groups and nesting mutually exclusive groups are deprecated." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:11 +msgid "" +"Passing the undocumented keyword argument *prefix_chars* to :meth:`~argparse." +"ArgumentParser.add_argument_group` is now deprecated." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:14 +msgid "The :class:`argparse.FileType` type converter is deprecated." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:18 +msgid "" +"Generators: ``throw(type, exc, tb)`` and ``athrow(type, exc, tb)`` signature " +"is deprecated: use ``throw(exc)`` and ``athrow(exc)`` instead, the single " +"argument signature." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:21 +msgid "" +"Currently Python accepts numeric literals immediately followed by keywords, " +"for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing and " +"ambiguous expressions like ``[0x1for x in y]`` (which can be interpreted as " +"``[0x1 for x in y]`` or ``[0x1f or x in y]``). A syntax warning is raised " +"if the numeric literal is immediately followed by one of keywords :keyword:" +"`and`, :keyword:`else`, :keyword:`for`, :keyword:`if`, :keyword:`in`, :" +"keyword:`is` and :keyword:`or`. In a future release it will be changed to a " +"syntax error. (:gh:`87999`)" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:29 +msgid "" +"Support for ``__index__()`` and ``__int__()`` method returning non-int type: " +"these methods will be required to return an instance of a strict subclass " +"of :class:`int`." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:32 +msgid "" +"Support for ``__float__()`` method returning a strict subclass of :class:" +"`float`: these methods will be required to return an instance of :class:" +"`float`." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:35 +msgid "" +"Support for ``__complex__()`` method returning a strict subclass of :class:" +"`complex`: these methods will be required to return an instance of :class:" +"`complex`." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:38 +msgid "" +"Passing a complex number as the *real* or *imag* argument in the :func:" +"`complex` constructor is now deprecated; it should only be passed as a " +"single positional argument. (Contributed by Serhiy Storchaka in :gh:" +"`109218`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:43 +msgid "" +":mod:`calendar`: ``calendar.January`` and ``calendar.February`` constants " +"are deprecated and replaced by :data:`calendar.JANUARY` and :data:`calendar." +"FEBRUARY`. (Contributed by Prince Roshan in :gh:`103636`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:48 +msgid "" +":mod:`codecs`: use :func:`open` instead of :func:`codecs.open`. (:gh:" +"`133038`)" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:50 +msgid "" +":attr:`!codeobject.co_lnotab`: use the :meth:`codeobject.co_lines` method " +"instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:55 +msgid "" +":meth:`~datetime.datetime.utcnow`: use ``datetime.datetime.now(tz=datetime." +"UTC)``." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:57 +msgid "" +":meth:`~datetime.datetime.utcfromtimestamp`: use ``datetime.datetime." +"fromtimestamp(timestamp, tz=datetime.UTC)``." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:60 +msgid ":mod:`gettext`: Plural value must be an integer." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:64 +msgid "" +":func:`~importlib.util.cache_from_source` *debug_override* parameter is " +"deprecated: use the *optimization* parameter instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:67 +msgid ":mod:`importlib.metadata`:" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:69 +msgid "``EntryPoints`` tuple interface." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:70 +msgid "Implicit ``None`` on return values." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:72 +msgid "" +":mod:`logging`: the ``warn()`` method has been deprecated since Python 3.3, " +"use :meth:`~logging.warning` instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:75 +msgid "" +":mod:`mailbox`: Use of StringIO input and text mode is deprecated, use " +"BytesIO and binary mode instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:78 +msgid "" +":mod:`os`: Calling :func:`os.register_at_fork` in a multi-threaded process." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:80 +msgid "" +":mod:`os.path`: :func:`os.path.commonprefix` is deprecated, use :func:`os." +"path.commonpath` for path prefixes. The :func:`os.path.commonprefix` " +"function is being deprecated due to having a misleading name and module. The " +"function is not safe to use for path prefixes despite being included in a " +"module about path manipulation, meaning it is easy to accidentally introduce " +"path traversal vulnerabilities into Python programs by using this function." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:88 +msgid "" +":class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is " +"deprecated, use an exception instance." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:91 +msgid "" +":mod:`re`: More strict rules are now applied for numerical group references " +"and group names in regular expressions. Only sequence of ASCII digits is " +"now accepted as a numerical reference. The group name in bytes patterns and " +"replacement strings can now only contain ASCII letters and digits and " +"underscore. (Contributed by Serhiy Storchaka in :gh:`91760`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:98 +msgid "" +":mod:`shutil`: :func:`~shutil.rmtree`'s *onerror* parameter is deprecated in " +"Python 3.12; use the *onexc* parameter instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:101 +msgid ":mod:`ssl` options and protocols:" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:103 +msgid ":class:`ssl.SSLContext` without protocol argument is deprecated." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:104 +msgid "" +":class:`ssl.SSLContext`: :meth:`~ssl.SSLContext.set_npn_protocols` and :meth:" +"`!selected_npn_protocol` are deprecated: use ALPN instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:107 +msgid "``ssl.OP_NO_SSL*`` options" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:108 +msgid "``ssl.OP_NO_TLS*`` options" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:109 +msgid "``ssl.PROTOCOL_SSLv3``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:110 +msgid "``ssl.PROTOCOL_TLS``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:111 +msgid "``ssl.PROTOCOL_TLSv1``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:112 +msgid "``ssl.PROTOCOL_TLSv1_1``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:113 +msgid "``ssl.PROTOCOL_TLSv1_2``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:114 +msgid "``ssl.TLSVersion.SSLv3``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:115 +msgid "``ssl.TLSVersion.TLSv1``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:116 +msgid "``ssl.TLSVersion.TLSv1_1``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:118 +msgid ":mod:`threading` methods:" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:120 +msgid "" +":meth:`!threading.Condition.notifyAll`: use :meth:`~threading.Condition." +"notify_all`." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:121 +msgid ":meth:`!threading.Event.isSet`: use :meth:`~threading.Event.is_set`." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:122 +msgid "" +":meth:`!threading.Thread.isDaemon`, :meth:`threading.Thread.setDaemon`: use :" +"attr:`threading.Thread.daemon` attribute." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:124 +msgid "" +":meth:`!threading.Thread.getName`, :meth:`threading.Thread.setName`: use :" +"attr:`threading.Thread.name` attribute." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:126 +msgid ":meth:`!threading.currentThread`: use :meth:`threading.current_thread`." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:127 +msgid ":meth:`!threading.activeCount`: use :meth:`threading.active_count`." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:129 +msgid ":class:`typing.Text` (:gh:`92332`)." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:131 +msgid "" +"The internal class ``typing._UnionGenericAlias`` is no longer used to " +"implement :class:`typing.Union`. To preserve compatibility with users using " +"this private class, a compatibility shim will be provided until at least " +"Python 3.17. (Contributed by Jelle Zijlstra in :gh:`105499`.)" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:136 +msgid "" +":class:`unittest.IsolatedAsyncioTestCase`: it is deprecated to return a " +"value that is not ``None`` from a test case." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:139 +msgid "" +":mod:`urllib.parse` deprecated functions: :func:`~urllib.parse.urlparse` " +"instead" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:141 +msgid "``splitattr()``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:142 +msgid "``splithost()``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:143 +msgid "``splitnport()``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:144 +msgid "``splitpasswd()``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:145 +msgid "``splitport()``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:146 +msgid "``splitquery()``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:147 +msgid "``splittag()``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:148 +msgid "``splittype()``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:149 +msgid "``splituser()``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:150 +msgid "``splitvalue()``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:151 +msgid "``to_bytes()``" +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:153 +msgid "" +":mod:`wsgiref`: ``SimpleHandler.stdout.write()`` should not do partial " +"writes." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:156 +msgid "" +":mod:`xml.etree.ElementTree`: Testing the truth value of an :class:`~xml." +"etree.ElementTree.Element` is deprecated. In a future release it will always " +"return ``True``. Prefer explicit ``len(elem)`` or ``elem is not None`` tests " +"instead." +msgstr "" + +#: ../../deprecations/pending-removal-in-future.rst:161 +msgid "" +":func:`sys._clear_type_cache` is deprecated: use :func:`sys." +"_clear_internal_caches` instead." +msgstr "" + +#: ../../whatsnew/3.14.rst:2755 +msgid "CPython bytecode changes" +msgstr "CPython Bytecode Änderungen" + +#: ../../whatsnew/3.14.rst:2757 +msgid "" +"Replaced the opcode :opcode:`!BINARY_SUBSCR` by the :opcode:`BINARY_OP` " +"opcode with the ``NB_SUBSCR`` oparg. (Contributed by Irit Katriel in :gh:" +"`100239`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2761 +msgid "" +"Add the :opcode:`BUILD_INTERPOLATION` and :opcode:`BUILD_TEMPLATE` opcodes " +"to construct new :class:`~string.templatelib.Interpolation` and :class:" +"`~string.templatelib.Template` instances, respectively. (Contributed by " +"Lysandros Nikolaou and others in :gh:`132661`; see also :ref:`PEP 750: " +"Template strings `)." +msgstr "" + +#: ../../whatsnew/3.14.rst:2767 +msgid "" +"Remove the :opcode:`!BUILD_CONST_KEY_MAP` opcode. Use :opcode:`BUILD_MAP` " +"instead. (Contributed by Mark Shannon in :gh:`122160`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2771 +msgid "" +"Replace the :opcode:`!LOAD_ASSERTION_ERROR` opcode with :opcode:" +"`LOAD_COMMON_CONSTANT` and add support for loading :exc:" +"`NotImplementedError`." +msgstr "" + +#: ../../whatsnew/3.14.rst:2775 +msgid "" +"Add the :opcode:`LOAD_FAST_BORROW` and :opcode:" +"`LOAD_FAST_BORROW_LOAD_FAST_BORROW` opcodes to reduce reference counting " +"overhead when the interpreter can prove that the reference in the frame " +"outlives the reference loaded onto the stack. (Contributed by Matt Page in :" +"gh:`130704`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2780 +msgid "" +"Add the :opcode:`LOAD_SMALL_INT` opcode, which pushes a small integer equal " +"to the ``oparg`` to the stack. The :opcode:`!RETURN_CONST` opcode is removed " +"as it is no longer used. (Contributed by Mark Shannon in :gh:`125837`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2785 +msgid "" +"Add the new :opcode:`LOAD_SPECIAL` instruction. Generate code for :keyword:" +"`with` and :keyword:`async with` statements using the new instruction. " +"Removed the :opcode:`!BEFORE_WITH` and :opcode:`!BEFORE_ASYNC_WITH` " +"instructions. (Contributed by Mark Shannon in :gh:`120507`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2791 +msgid "" +"Add the :opcode:`POP_ITER` opcode to support 'virtual' iterators. " +"(Contributed by Mark Shannon in :gh:`132554`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2796 +msgid "Pseudo-instructions" +msgstr "" + +#: ../../whatsnew/3.14.rst:2798 +msgid "" +"Add the :opcode:`!ANNOTATIONS_PLACEHOLDER` pseudo instruction to support " +"partially executed module-level annotations with :ref:`deferred evaluation " +"of annotations `. (Contributed by Jelle " +"Zijlstra in :gh:`130907`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2803 +msgid "" +"Add the :opcode:`!BINARY_OP_EXTEND` pseudo instruction, which executes a " +"pair of functions (guard and specialization functions) accessed from the " +"inline cache. (Contributed by Irit Katriel in :gh:`100239`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2808 +msgid "" +"Add three specializations for :opcode:`CALL_KW`; :opcode:`!CALL_KW_PY` for " +"calls to Python functions, :opcode:`!CALL_KW_BOUND_METHOD` for calls to " +"bound methods, and :opcode:`!CALL_KW_NON_PY` for all other calls. " +"(Contributed by Mark Shannon in :gh:`118093`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2814 +msgid "" +"Add the :opcode:`JUMP_IF_TRUE` and :opcode:`JUMP_IF_FALSE` pseudo " +"instructions, conditional jumps which do not impact the stack. Replaced by " +"the sequence ``COPY 1``, ``TO_BOOL``, ``POP_JUMP_IF_TRUE/FALSE``. " +"(Contributed by Irit Katriel in :gh:`124285`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2819 +msgid "" +"Add the :opcode:`!LOAD_CONST_MORTAL` pseudo instruction. (Contributed by " +"Mark Shannon in :gh:`128685`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2822 +msgid "" +"Add the :opcode:`!LOAD_CONST_IMMORTAL` pseudo instruction, which does the " +"same as :opcode:`!LOAD_CONST`, but is more efficient for immortal objects. " +"(Contributed by Mark Shannon in :gh:`125837`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2827 +msgid "" +"Add the :opcode:`NOT_TAKEN` pseudo instruction, used by :mod:`sys." +"monitoring` to record branch events (such as :monitoring-event:" +"`BRANCH_LEFT`). (Contributed by Mark Shannon in :gh:`122548`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2833 +msgid "C API changes" +msgstr "" + +#: ../../whatsnew/3.14.rst:2838 +msgid "Python configuration C API" +msgstr "" + +#: ../../whatsnew/3.14.rst:2840 +msgid "" +"Add a :ref:`PyInitConfig C API ` to configure the Python " +"initialization without relying on C structures and the ability to make ABI-" +"compatible changes in the future." +msgstr "" + +#: ../../whatsnew/3.14.rst:2844 +msgid "" +"Complete the :pep:`587` :ref:`PyConfig C API ` by adding :c:" +"func:`PyInitConfig_AddModule` which can be used to add a built-in extension " +"module; a feature previously referred to as the \"inittab\"." +msgstr "" + +#: ../../whatsnew/3.14.rst:2848 +msgid "" +"Add :c:func:`PyConfig_Get` and :c:func:`PyConfig_Set` functions to get and " +"set the current runtime configuration." +msgstr "" + +#: ../../whatsnew/3.14.rst:2851 +msgid "" +":pep:`587` 'Python Initialization Configuration' unified all the ways to " +"configure Python's initialization. This PEP also unifies the configuration " +"of Python's preinitialization and initialization in a single API. Moreover, " +"this PEP only provides a single choice to embed Python, instead of having " +"two 'Python' and 'Isolated' choices (PEP 587), to further simplify the API." +msgstr "" + +#: ../../whatsnew/3.14.rst:2858 +msgid "" +"The lower level PEP 587 PyConfig API remains available for use cases with an " +"intentionally higher level of coupling to CPython implementation details " +"(such as emulating the full functionality of CPython's CLI, including its " +"configuration mechanisms)." +msgstr "" + +#: ../../whatsnew/3.14.rst:2863 ../../whatsnew/3.14.rst:2890 +#: ../../whatsnew/3.14.rst:2910 +msgid "(Contributed by Victor Stinner in :gh:`107954`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2865 +msgid ":pep:`741` and :pep:`587`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2869 +msgid "New features in the C API" +msgstr "" + +#: ../../whatsnew/3.14.rst:2871 +msgid "" +"Add :c:func:`Py_PACK_VERSION` and :c:func:`Py_PACK_FULL_VERSION`, two new " +"macros for bit-packing Python version numbers. This is useful for " +"comparisons with :c:var:`Py_Version` or :c:macro:`PY_VERSION_HEX`. " +"(Contributed by Petr Viktorin in :gh:`128629`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2877 +msgid "" +"Add :c:func:`PyBytes_Join(sep, iterable) ` function, similar " +"to ``sep.join(iterable)`` in Python. (Contributed by Victor Stinner in :gh:" +"`121645`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2881 +msgid "" +"Add functions to manipulate the configuration of the current runtime Python " +"interpreter (:ref:`PEP 741: Python configuration C API `):" +msgstr "" + +#: ../../whatsnew/3.14.rst:2885 +msgid ":c:func:`PyConfig_Get`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2886 +msgid ":c:func:`PyConfig_GetInt`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2887 +msgid ":c:func:`PyConfig_Set`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2888 +msgid ":c:func:`PyConfig_Names`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2892 +msgid "" +"Add functions to configure Python initialization (:ref:`PEP 741: Python " +"configuration C API `):" +msgstr "" + +#: ../../whatsnew/3.14.rst:2895 +msgid ":c:func:`Py_InitializeFromInitConfig`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2896 +msgid ":c:func:`PyInitConfig_AddModule`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2897 +msgid ":c:func:`PyInitConfig_Create`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2898 +msgid ":c:func:`PyInitConfig_Free`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2899 +msgid ":c:func:`PyInitConfig_FreeStrList`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2900 +msgid ":c:func:`PyInitConfig_GetError`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2901 +msgid ":c:func:`PyInitConfig_GetExitCode`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2902 +msgid ":c:func:`PyInitConfig_GetInt`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2903 +msgid ":c:func:`PyInitConfig_GetStr`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2904 +msgid ":c:func:`PyInitConfig_GetStrList`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2905 +msgid ":c:func:`PyInitConfig_HasOption`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2906 +msgid ":c:func:`PyInitConfig_SetInt`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2907 +msgid ":c:func:`PyInitConfig_SetStr`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2908 +msgid ":c:func:`PyInitConfig_SetStrList`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2912 +msgid "" +"Add :c:func:`Py_fopen` function to open a file. This works similarly to the " +"standard C :c:func:`!fopen` function, instead accepting a Python object for " +"the *path* parameter and setting an exception on error. The corresponding " +"new :c:func:`Py_fclose` function should be used to close a file. " +"(Contributed by Victor Stinner in :gh:`127350`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2920 +msgid "" +"Add :c:func:`Py_HashBuffer` to compute and return the hash value of a " +"buffer. (Contributed by Antoine Pitrou and Victor Stinner in :gh:`122854`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2923 +msgid "" +"Add :c:func:`PyImport_ImportModuleAttr` and :c:func:" +"`PyImport_ImportModuleAttrString` helper functions to import a module and " +"get an attribute of the module. (Contributed by Victor Stinner in :gh:" +"`128911`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2928 +msgid "" +"Add :c:func:`PyIter_NextItem` to replace :c:func:`PyIter_Next`, which has an " +"ambiguous return value. (Contributed by Irit Katriel and Erlend Aasland in :" +"gh:`105201`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2932 +msgid "" +"Add :c:func:`PyLong_GetSign` function to get the sign of :class:`int` " +"objects. (Contributed by Sergey B Kirpichev in :gh:`116560`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2935 +msgid "" +"Add :c:func:`PyLong_IsPositive`, :c:func:`PyLong_IsNegative` and :c:func:" +"`PyLong_IsZero` for checking if :c:type:`PyLongObject` is positive, " +"negative, or zero, respectively. (Contributed by James Roy and Sergey B " +"Kirpichev in :gh:`126061`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2940 +msgid "" +"Add new functions to convert C ```` numbers to/from Python :class:" +"`int` objects:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2943 +msgid ":c:func:`PyLong_AsInt32`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2944 +msgid ":c:func:`PyLong_AsInt64`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2945 +msgid ":c:func:`PyLong_AsUInt32`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2946 +msgid ":c:func:`PyLong_AsUInt64`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2947 +msgid ":c:func:`PyLong_FromInt32`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2948 +msgid ":c:func:`PyLong_FromInt64`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2949 +msgid ":c:func:`PyLong_FromUInt32`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2950 +msgid ":c:func:`PyLong_FromUInt64`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2952 +msgid "(Contributed by Victor Stinner in :gh:`120389`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2954 +msgid "" +"Add a new import and export API for Python :class:`int` objects (:pep:`757`):" +msgstr "" + +#: ../../whatsnew/3.14.rst:2957 +msgid ":c:func:`PyLong_GetNativeLayout`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2958 +msgid ":c:func:`PyLong_Export`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2959 +msgid ":c:func:`PyLong_FreeExport`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2960 +msgid ":c:func:`PyLongWriter_Create`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2961 +msgid ":c:func:`PyLongWriter_Finish`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2962 +msgid ":c:func:`PyLongWriter_Discard`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2964 +msgid "(Contributed by Sergey B Kirpichev and Victor Stinner in :gh:`102471`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2966 +msgid "" +"Add :c:func:`PyMonitoring_FireBranchLeftEvent` and :c:func:" +"`PyMonitoring_FireBranchRightEvent` for generating :monitoring-event:" +"`BRANCH_LEFT` and :monitoring-event:`BRANCH_RIGHT` events, respectively. " +"(Contributed by Mark Shannon in :gh:`122548`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2972 +msgid "" +"Add :c:func:`PyType_Freeze` function to make a type immutable. (Contributed " +"by Victor Stinner in :gh:`121654`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2975 +msgid "" +"Add :c:func:`PyType_GetBaseByToken` and :c:data:`Py_tp_token` slot for " +"easier superclass identification, which attempts to resolve the type " +"checking issue mentioned in :pep:`PEP 630 <630#type-checking>`. (Contributed " +"in :gh:`124153`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2980 +msgid "" +"Add a new :c:func:`PyUnicode_Equal` function to test if two strings are " +"equal. The function is also added to the Limited C API. (Contributed by " +"Victor Stinner in :gh:`124502`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:2985 +msgid "" +"Add a new :c:type:`PyUnicodeWriter` API to create a Python :class:`str` " +"object, with the following functions:" +msgstr "" + +#: ../../whatsnew/3.14.rst:2988 +msgid ":c:func:`PyUnicodeWriter_Create`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2989 +msgid ":c:func:`PyUnicodeWriter_DecodeUTF8Stateful`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2990 +msgid ":c:func:`PyUnicodeWriter_Discard`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2991 +msgid ":c:func:`PyUnicodeWriter_Finish`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2992 +msgid ":c:func:`PyUnicodeWriter_Format`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2993 +msgid ":c:func:`PyUnicodeWriter_WriteASCII`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2994 +msgid ":c:func:`PyUnicodeWriter_WriteChar`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2995 +msgid ":c:func:`PyUnicodeWriter_WriteRepr`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2996 +msgid ":c:func:`PyUnicodeWriter_WriteStr`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2997 +msgid ":c:func:`PyUnicodeWriter_WriteSubstring`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2998 +msgid ":c:func:`PyUnicodeWriter_WriteUCS4`" +msgstr "" + +#: ../../whatsnew/3.14.rst:2999 +msgid ":c:func:`PyUnicodeWriter_WriteUTF8`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3000 +msgid ":c:func:`PyUnicodeWriter_WriteWideChar`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3002 +msgid "(Contributed by Victor Stinner in :gh:`119182`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3004 +msgid "" +"The ``k`` and ``K`` formats in :c:func:`PyArg_ParseTuple` and similar " +"functions now use :meth:`~object.__index__` if available, like all other " +"integer formats. (Contributed by Serhiy Storchaka in :gh:`112068`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3009 +msgid "" +"Add support for a new ``p`` format unit in :c:func:`Py_BuildValue` that " +"produces a Python :class:`bool` object from a C integer. (Contributed by " +"Pablo Galindo in :issue:`45325`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3013 +msgid "" +"Add :c:func:`PyUnstable_IsImmortal` for determining if an object is :term:" +"`immortal`, for debugging purposes. (Contributed by Peter Bierma in :gh:" +"`128509`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3017 +msgid "" +"Add :c:func:`PyUnstable_Object_EnableDeferredRefcount` for enabling deferred " +"reference counting, as outlined in :pep:`703`." +msgstr "" + +#: ../../whatsnew/3.14.rst:3020 +msgid "" +"Add :c:func:`PyUnstable_Object_IsUniquelyReferenced` as a replacement for " +"``Py_REFCNT(op) == 1`` on :term:`free threaded ` builds. " +"(Contributed by Peter Bierma in :gh:`133140`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3025 +msgid "" +"Add :c:func:`PyUnstable_Object_IsUniqueReferencedTemporary` to determine if " +"an object is a unique temporary object on the interpreter's operand stack. " +"This can be used in some cases as a replacement for checking if :c:func:" +"`Py_REFCNT` is ``1`` for Python objects passed as arguments to C API " +"functions. (Contributed by Sam Gross in :gh:`133164`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3035 +msgid "Limited C API changes" +msgstr "" + +#: ../../whatsnew/3.14.rst:3037 +msgid "" +"In the limited C API version 3.14 and newer, :c:func:`Py_TYPE` and :c:func:" +"`Py_REFCNT` are now implemented as an opaque function call to hide " +"implementation details. (Contributed by Victor Stinner in :gh:`120600` and :" +"gh:`124127`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3042 +msgid "" +"Remove the :c:macro:`PySequence_Fast_GET_SIZE`, :c:macro:" +"`PySequence_Fast_GET_ITEM`, and :c:macro:`PySequence_Fast_ITEMS` macros from " +"the limited C API, since they have always been broken in the limited C API. " +"(Contributed by Victor Stinner in :gh:`91417`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3053 +msgid "Removed C APIs" +msgstr "" + +#: ../../whatsnew/3.14.rst:3055 +msgid "" +"Creating :c:data:`immutable types ` with mutable " +"bases was deprecated in Python 3.12, and now raises a :exc:`TypeError`. " +"(Contributed by Nikita Sobolev in :gh:`119775`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3060 +msgid "" +"Remove ``PyDictObject.ma_version_tag`` member, which was deprecated in " +"Python 3.12. Use the :c:func:`PyDict_AddWatcher` API instead. (Contributed " +"by Sam Gross in :gh:`124296`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3065 +msgid "" +"Remove the private ``_Py_InitializeMain()`` function. It was a :term:" +"`provisional API` added to Python 3.8 by :pep:`587`. (Contributed by Victor " +"Stinner in :gh:`129033`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3069 +msgid "" +"Remove the undocumented APIs :c:macro:`!Py_C_RECURSION_LIMIT` and :c:member:" +"`!PyThreadState.c_recursion_remaining`. These were added in 3.13 and have " +"been removed without deprecation. Use :c:func:`Py_EnterRecursiveCall` to " +"guard against runaway recursion in C code. (Removed by Petr Viktorin in :gh:" +"`133079`, see also :gh:`130396`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3080 +msgid "Deprecated C APIs" +msgstr "" + +#: ../../whatsnew/3.14.rst:3082 +msgid "" +"The :c:macro:`!Py_HUGE_VAL` macro is now :term:`soft deprecated`. Use :c:" +"macro:`!INFINITY` instead. (Contributed by Sergey B Kirpichev in :gh:" +"`120026`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3086 +msgid "" +"The :c:macro:`!Py_IS_NAN`, :c:macro:`!Py_IS_INFINITY`, and :c:macro:`!" +"Py_IS_FINITE` macros are now :term:`soft deprecated`. Use :c:macro:`!" +"isnan`, :c:macro:`!isinf` and :c:macro:`!isfinite` instead, available from :" +"file:`math.h` since C99. (Contributed by Sergey B Kirpichev in :gh:`119613`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3092 +msgid "" +"Non-tuple sequences are now deprecated as argument for the ``(items)`` " +"format unit in :c:func:`PyArg_ParseTuple` and other :ref:`argument parsing " +"` functions if *items* contains format units which store a :ref:" +"`borrowed buffer ` or a :term:`borrowed reference`. " +"(Contributed by Serhiy Storchaka in :gh:`50333`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3099 +msgid "" +"The ``_PyMonitoring_FireBranchEvent`` function is now deprecated and should " +"be replaced with calls to :c:func:`PyMonitoring_FireBranchLeftEvent` and :c:" +"func:`PyMonitoring_FireBranchRightEvent`." +msgstr "" + +#: ../../whatsnew/3.14.rst:3104 +msgid "" +"The previously undocumented function :c:func:`PySequence_In` is now :term:" +"`soft deprecated`. Use :c:func:`PySequence_Contains` instead. (Contributed " +"by Yuki Kobayashi in :gh:`127896`.)" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:4 +msgid "" +"The :c:func:`!PyImport_ImportModuleNoBlock`: Use :c:func:" +"`PyImport_ImportModule` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:6 +msgid "" +":c:func:`!PyWeakref_GetObject` and :c:func:`!PyWeakref_GET_OBJECT`: Use :c:" +"func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project `__ can be used to get :c:func:" +"`PyWeakref_GetRef` on Python 3.12 and older." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:10 +msgid "" +":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:12 +msgid "" +":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead; " +"Note that some codecs (for example, \"base64\") may return a type other " +"than :class:`str`, such as :class:`bytes`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:15 +msgid "" +":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:17 +msgid "" +":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead; " +"Note that some codecs (for example, \"base64\") may return a type other " +"than :class:`bytes`, such as :class:`str`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:20 +msgid "Python initialization functions, deprecated in Python 3.13:" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:22 +msgid "" +":c:func:`!Py_GetPath`: Use :c:func:`PyConfig_Get(\"module_search_paths\") " +"` (:data:`sys.path`) instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:25 +msgid "" +":c:func:`!Py_GetPrefix`: 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 "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:30 +msgid "" +":c:func:`!Py_GetExecPrefix`: 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 "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:36 +msgid "" +":c:func:`!Py_GetProgramFullPath`: Use :c:func:`PyConfig_Get(\"executable\") " +"` (:data:`sys.executable`) instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:39 +msgid "" +":c:func:`!Py_GetProgramName`: Use :c:func:`PyConfig_Get(\"executable\") " +"` (:data:`sys.executable`) instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:42 +msgid "" +":c:func:`!Py_GetPythonHome`: Use :c:func:`PyConfig_Get(\"home\") " +"` or the :envvar:`PYTHONHOME` environment variable instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:46 +msgid "" +"The `pythoncapi-compat project `__ can be used to get :c:func:`PyConfig_Get` on Python 3.13 and older." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:50 +msgid "" +"Functions to configure Python's initialization, deprecated in Python 3.11:" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:52 +msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:54 +msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:56 +msgid "" +":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " +"instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:58 +msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:60 +msgid "" +":c:func:`!PySys_ResetWarnOptions`: Clear :data:`sys.warnoptions` and :data:`!" +"warnings.filters` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:63 +msgid "" +"The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" +"`PyConfig` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:66 +msgid "Global configuration variables:" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:68 +msgid "" +":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` or :c:func:" +"`PyConfig_Get(\"parser_debug\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:71 +msgid "" +":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` or :c:func:" +"`PyConfig_Get(\"verbose\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:74 +msgid "" +":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` or :c:func:" +"`PyConfig_Get(\"quiet\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:77 +msgid "" +":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` or :c:func:" +"`PyConfig_Get(\"interactive\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:80 +msgid "" +":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` or :c:func:" +"`PyConfig_Get(\"inspect\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:83 +msgid "" +":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` or :c:" +"func:`PyConfig_Get(\"optimization_level\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:86 +msgid "" +":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` or :c:func:" +"`PyConfig_Get(\"site_import\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:89 +msgid "" +":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` or :c:" +"func:`PyConfig_Get(\"bytes_warning\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:92 +msgid "" +":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` or :c:" +"func:`PyConfig_Get(\"pathconfig_warnings\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:95 +msgid "" +":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " +"or :c:func:`PyConfig_Get(\"use_environment\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:98 +msgid "" +":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " +"or :c:func:`PyConfig_Get(\"write_bytecode\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:101 +msgid "" +":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." +"user_site_directory` or :c:func:`PyConfig_Get(\"user_site_directory\") " +"` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:104 +msgid "" +":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` or :" +"c:func:`PyConfig_Get(\"buffered_stdio\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:107 +msgid "" +":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " +"and :c:member:`PyConfig.hash_seed` or :c:func:`PyConfig_Get(\"hash_seed\") " +"` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:111 +msgid "" +":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` or :c:func:" +"`PyConfig_Get(\"isolated\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:114 +msgid "" +":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." +"legacy_windows_fs_encoding` or :c:func:" +"`PyConfig_Get(\"legacy_windows_fs_encoding\") ` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:117 +msgid "" +":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." +"legacy_windows_stdio` or :c:func:`PyConfig_Get(\"legacy_windows_stdio\") " +"` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:120 +msgid "" +":c:var:`!Py_FileSystemDefaultEncoding`, :c:var:`!" +"Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." +"filesystem_encoding` or :c:func:`PyConfig_Get(\"filesystem_encoding\") " +"` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:123 +msgid "" +":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." +"filesystem_errors` or :c:func:`PyConfig_Get(\"filesystem_errors\") " +"` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:126 +msgid "" +":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` or :c:func:" +"`PyConfig_Get(\"utf8_mode\") ` instead. (see :c:func:" +"`Py_PreInitialize`)" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.15.rst:131 +msgid "" +"The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" +"`PyConfig` to set these options. Or :c:func:`PyConfig_Get` can be used to " +"get these options at runtime." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.16.rst:4 +msgid "The bundled copy of ``libmpdec``." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:4 +msgid "" +"The following private functions are deprecated and planned for removal in " +"Python 3.18:" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:7 +msgid ":c:func:`!_PyBytes_Join`: use :c:func:`PyBytes_Join`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:8 +msgid "" +":c:func:`!_PyDict_GetItemStringWithError`: use :c:func:" +"`PyDict_GetItemStringRef`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:9 +msgid ":c:func:`!_PyDict_Pop()`: use :c:func:`PyDict_Pop`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:10 +msgid ":c:func:`!_PyLong_Sign()`: use :c:func:`PyLong_GetSign`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:11 +msgid "" +":c:func:`!_PyLong_FromDigits` and :c:func:`!_PyLong_New`: use :c:func:" +"`PyLongWriter_Create`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:13 +msgid "" +":c:func:`!_PyThreadState_UncheckedGet`: use :c:func:" +"`PyThreadState_GetUnchecked`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:14 +msgid ":c:func:`!_PyUnicode_AsString`: use :c:func:`PyUnicode_AsUTF8`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:15 +msgid "" +":c:func:`!_PyUnicodeWriter_Init`: replace ``_PyUnicodeWriter_Init(&writer)`` " +"with :c:func:`writer = PyUnicodeWriter_Create(0) `." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:18 +msgid "" +":c:func:`!_PyUnicodeWriter_Finish`: replace " +"``_PyUnicodeWriter_Finish(&writer)`` with :c:func:" +"`PyUnicodeWriter_Finish(writer) `." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:21 +msgid "" +":c:func:`!_PyUnicodeWriter_Dealloc`: replace " +"``_PyUnicodeWriter_Dealloc(&writer)`` with :c:func:" +"`PyUnicodeWriter_Discard(writer) `." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:24 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteChar`: replace " +"``_PyUnicodeWriter_WriteChar(&writer, ch)`` with :c:func:" +"`PyUnicodeWriter_WriteChar(writer, ch) `." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:27 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteStr`: replace " +"``_PyUnicodeWriter_WriteStr(&writer, str)`` with :c:func:" +"`PyUnicodeWriter_WriteStr(writer, str) `." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:30 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteSubstring`: replace " +"``_PyUnicodeWriter_WriteSubstring(&writer, str, start, end)`` with :c:func:" +"`PyUnicodeWriter_WriteSubstring(writer, str, start, end) " +"`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:33 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteASCIIString`: replace " +"``_PyUnicodeWriter_WriteASCIIString(&writer, str)`` with :c:func:" +"`PyUnicodeWriter_WriteASCII(writer, str) `." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:36 +msgid "" +":c:func:`!_PyUnicodeWriter_WriteLatin1String`: replace " +"``_PyUnicodeWriter_WriteLatin1String(&writer, str)`` with :c:func:" +"`PyUnicodeWriter_WriteUTF8(writer, str) `." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:39 +msgid ":c:func:`!_PyUnicodeWriter_Prepare`: (no replacement)." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:40 +msgid ":c:func:`!_PyUnicodeWriter_PrepareKind`: (no replacement)." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:41 +msgid ":c:func:`!_Py_HashPointer`: use :c:func:`Py_HashPointer`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:42 +msgid ":c:func:`!_Py_fopen_obj`: use :c:func:`Py_fopen`." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-3.18.rst:44 +msgid "" +"The `pythoncapi-compat project `__ can be used to get these new public functions on Python 3.13 and older. " +"(Contributed by Victor Stinner in :gh:`128863`.)" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:4 +msgid "" +"The following APIs are deprecated and will be removed, although there is " +"currently no date scheduled for their removal." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:7 +msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: Unneeded since Python 3.8." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:9 +msgid ":c:func:`PyErr_Fetch`: Use :c:func:`PyErr_GetRaisedException` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:11 +msgid "" +":c:func:`PyErr_NormalizeException`: Use :c:func:`PyErr_GetRaisedException` " +"instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:13 +msgid "" +":c:func:`PyErr_Restore`: Use :c:func:`PyErr_SetRaisedException` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:15 +msgid "" +":c:func:`PyModule_GetFilename`: Use :c:func:`PyModule_GetFilenameObject` " +"instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:17 +msgid ":c:func:`PyOS_AfterFork`: Use :c:func:`PyOS_AfterFork_Child` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:19 +msgid "" +":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` and :c:func:" +"`PySlice_AdjustIndices` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:21 +msgid ":c:func:`PyUnicode_READY`: Unneeded since Python 3.12" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:23 +msgid ":c:func:`!PyErr_Display`: Use :c:func:`PyErr_DisplayException` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:25 +msgid "" +":c:func:`!_PyErr_ChainExceptions`: Use :c:func:`!_PyErr_ChainExceptions1` " +"instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:27 +msgid "" +":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " +"instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:29 +msgid "Thread Local Storage (TLS) API:" +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:31 +msgid "" +":c:func:`PyThread_create_key`: Use :c:func:`PyThread_tss_alloc` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:33 +msgid ":c:func:`PyThread_delete_key`: Use :c:func:`PyThread_tss_free` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:35 +msgid "" +":c:func:`PyThread_set_key_value`: Use :c:func:`PyThread_tss_set` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:37 +msgid "" +":c:func:`PyThread_get_key_value`: Use :c:func:`PyThread_tss_get` instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:39 +msgid "" +":c:func:`PyThread_delete_key_value`: Use :c:func:`PyThread_tss_delete` " +"instead." +msgstr "" + +#: ../../deprecations/c-api-pending-removal-in-future.rst:41 +msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." +msgstr "" + +#: ../../whatsnew/3.14.rst:3123 +msgid "Build changes" +msgstr "" + +#: ../../whatsnew/3.14.rst:3125 +msgid "" +":pep:`776`: Emscripten is now an officially supported platform at :pep:`tier " +"3 <11#tier-3>`. As a part of this effort, more than 25 bugs in `Emscripten " +"libc`__ were fixed. Emscripten now includes support for :mod:`ctypes`, :mod:" +"`termios`, and :mod:`fcntl`, as well as experimental support for the new :" +"ref:`default interactive shell `. (Contributed by R. Hood " +"Chatham in :gh:`127146`, :gh:`127683`, and :gh:`136931`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3135 +msgid "Official Android binary releases are now provided on python.org__." +msgstr "" + +#: ../../whatsnew/3.14.rst:3139 +msgid "" +"GNU Autoconf 2.72 is now required to generate :file:`configure`. " +"(Contributed by Erlend Aasland in :gh:`115765`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3142 +msgid "" +"``wasm32-unknown-emscripten`` is now a :pep:`11` tier 3 platform. " +"(Contributed by R. Hood Chatham in :gh:`127146`, :gh:`127683`, and :gh:" +"`136931`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3145 +msgid "" +"``#pragma``-based linking with ``python3*.lib`` can now be switched off " +"with :c:expr:`Py_NO_LINK_LIB`. (Contributed by Jean-Christophe Fillion-Robin " +"in :gh:`82909`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3149 +msgid "" +"CPython now enables a set of recommended compiler options by default for " +"improved security. Use the :option:`--disable-safety` :file:`configure` " +"option to disable them, or the :option:`--enable-slower-safety` option for a " +"larger set of compiler options, albeit with a performance cost." +msgstr "" + +#: ../../whatsnew/3.14.rst:3155 +msgid "" +"The ``WITH_FREELISTS`` macro and ``--without-freelists`` :file:`configure` " +"option have been removed." +msgstr "" + +#: ../../whatsnew/3.14.rst:3158 +msgid "" +"The new :file:`configure` option :option:`--with-tail-call-interp` may be " +"used to enable the experimental tail call interpreter. See :ref:`whatsnew314-" +"tail-call-interpreter` for further details." +msgstr "" + +#: ../../whatsnew/3.14.rst:3162 +msgid "" +"To disable the new remote debugging support, use the :option:`--without-" +"remote-debug` :file:`configure` option. This may be useful for security " +"reasons." +msgstr "" + +#: ../../whatsnew/3.14.rst:3166 +msgid "" +"iOS and macOS apps can now be configured to redirect ``stdout`` and " +"``stderr`` content to the system log. (Contributed by Russell Keith-Magee " +"in :gh:`127592`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3170 +msgid "" +"The iOS testbed is now able to stream test output while the test is running. " +"The testbed can also be used to run the test suite of projects other than " +"CPython itself. (Contributed by Russell Keith-Magee in :gh:`127592`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3179 +msgid ":file:`build-details.json`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3181 +msgid "" +"Installations of Python now contain a new file, :file:`build-details.json`. " +"This is a static JSON document containing build details for CPython, to " +"allow for introspection without needing to run code. This is helpful for use-" +"cases such as Python launchers, cross-compilation, and so on." +msgstr "" + +#: ../../whatsnew/3.14.rst:3187 +msgid "" +":file:`build-details.json` must be installed in the platform-independent " +"standard library directory. This corresponds to the :ref:`'stdlib' " +"` :mod:`sysconfig` installation path, which can be found " +"by running ``sysconfig.get_path('stdlib')``." +msgstr "" + +#: ../../whatsnew/3.14.rst:3193 +msgid "" +":pep:`739` -- ``build-details.json`` 1.0 -- a static description file for " +"Python build details" +msgstr "" + +#: ../../whatsnew/3.14.rst:3200 +msgid "Discontinuation of PGP signatures" +msgstr "" + +#: ../../whatsnew/3.14.rst:3202 +msgid "" +"PGP (Pretty Good Privacy) signatures will not be provided for releases of " +"Python 3.14 or future versions. To verify CPython artifacts, users must use " +"`Sigstore verification materials `__. Releases have been signed using Sigstore_ since Python 3.11." +msgstr "" + +#: ../../whatsnew/3.14.rst:3208 +msgid "This change in release process was specified in :pep:`761`." +msgstr "" + +#: ../../whatsnew/3.14.rst:3216 +msgid "Free-threaded Python is officially supported" +msgstr "" + +#: ../../whatsnew/3.14.rst:3218 +msgid "" +"The free-threaded build of Python is now supported and no longer " +"experimental. This is the start of `phase II `__ where free-threaded Python is officially supported but still " +"optional." +msgstr "" + +#: ../../whatsnew/3.14.rst:3222 +msgid "" +"The free-threading team are confident that the project is on the right path, " +"and appreciate the continued dedication from everyone working to make free-" +"threading ready for broader adoption across the Python community." +msgstr "" + +#: ../../whatsnew/3.14.rst:3226 +msgid "" +"With these recommendations and the acceptance of this PEP, the Python " +"developer community should broadly advertise that free-threading is a " +"supported Python build option now and into the future, and that it will not " +"be removed without a proper deprecation schedule." +msgstr "" + +#: ../../whatsnew/3.14.rst:3231 +msgid "" +"Any decision to transition to `phase III `__, with free-threading as the default or sole build of Python is " +"still undecided, and dependent on many factors both within CPython itself " +"and the community. This decision is for the future." +msgstr "" + +#: ../../whatsnew/3.14.rst:3238 +msgid ":pep:`779`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3240 +msgid "`PEP 779's acceptance `__" +msgstr "" + +#: ../../whatsnew/3.14.rst:3246 +msgid "Binary releases for the experimental just-in-time compiler" +msgstr "" + +#: ../../whatsnew/3.14.rst:3248 +msgid "" +"The official macOS and Windows release binaries now include an " +"*experimental* just-in-time (JIT) compiler. Although it is **not** " +"recommended for production use, it can be tested by setting :envvar:" +"`PYTHON_JIT=1 ` as an environment variable. Downstream source " +"builds and redistributors can use the :option:`--enable-experimental-jit=yes-" +"off` configuration option for similar behavior." +msgstr "" + +#: ../../whatsnew/3.14.rst:3255 +msgid "" +"The JIT is at an early stage and still in active development. As such, the " +"typical performance impact of enabling it can range from 10% slower to 20% " +"faster, depending on workload. To aid in testing and evaluation, a set of " +"introspection functions has been provided in the :data:`sys._jit` " +"namespace. :func:`sys._jit.is_available` can be used to determine if the " +"current executable supports JIT compilation, while :func:`sys._jit." +"is_enabled` can be used to tell if JIT compilation has been enabled for the " +"current process." +msgstr "" + +#: ../../whatsnew/3.14.rst:3263 +msgid "" +"Currently, the most significant missing functionality is that native " +"debuggers and profilers like ``gdb`` and ``perf`` are unable to unwind " +"through JIT frames (Python debuggers and profilers, like :mod:`pdb` or :mod:" +"`profile`, continue to work without modification). Free-threaded builds do " +"not support JIT compilation." +msgstr "" + +#: ../../whatsnew/3.14.rst:3268 +msgid "" +"Please report any bugs or major performance regressions that you encounter!" +msgstr "" + +#: ../../whatsnew/3.14.rst:3270 +msgid ":pep:`744`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3274 +msgid "Porting to Python 3.14" +msgstr "" + +#: ../../whatsnew/3.14.rst:3276 +msgid "" +"This section lists previously described changes and other bugfixes that may " +"require changes to your code." +msgstr "" + +#: ../../whatsnew/3.14.rst:3281 +msgid "Changes in the Python API" +msgstr "Änderungen in der Python API" + +#: ../../whatsnew/3.14.rst:3283 +msgid "" +"On Unix platforms other than macOS, *forkserver* is now the default :ref:" +"`start method ` for :mod:`multiprocessing` " +"and :class:`~concurrent.futures.ProcessPoolExecutor`, instead of *fork*." +msgstr "" + +#: ../../whatsnew/3.14.rst:3287 +msgid "" +"See :ref:`(1) ` and :ref:`(2) " +"` for details." +msgstr "" + +#: ../../whatsnew/3.14.rst:3290 +msgid "" +"If you encounter :exc:`NameError`\\s or pickling errors coming out of :mod:" +"`multiprocessing` or :mod:`concurrent.futures`, see the :ref:`forkserver " +"restrictions `." +msgstr "" + +#: ../../whatsnew/3.14.rst:3294 +msgid "" +"This change does not affect Windows or macOS, where :ref:`'spawn' " +"` remains the default start method." +msgstr "" + +#: ../../whatsnew/3.14.rst:3297 +msgid "" +":class:`functools.partial` is now a method descriptor. Wrap it in :func:" +"`staticmethod` if you want to preserve the old behavior. (Contributed by " +"Serhiy Storchaka and Dominykas Grigonis in :gh:`121027`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3301 +msgid "" +"The :ref:`garbage collector is now incremental `, which means that the behavior of :func:`gc.collect` changes slightly:" +msgstr "" + +#: ../../whatsnew/3.14.rst:3308 +msgid "" +"The :func:`locale.nl_langinfo` function now temporarily sets the " +"``LC_CTYPE`` locale in some cases. This temporary change affects other " +"threads. (Contributed by Serhiy Storchaka in :gh:`69998`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3313 +msgid "" +":func:`pickle.dump` and :func:`pickle.dumps` now raise :exc:`~pickle." +"PicklingError` for some failures that previously raised :exc:" +"`AttributeError`, :exc:`ImportError`, :exc:`ValueError`, :exc:" +"`UnicodeEncodeError` or :exc:`!PicklingError`, depending on the " +"implementation (for example, pickling a local object, or an object whose " +"module cannot be imported). The original exception is chained to the :exc:`!" +"PicklingError`. Code that caught these exceptions should also catch :exc:`!" +"PicklingError`. (Contributed by Serhiy Storchaka in :gh:`122311`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3323 +msgid "" +":class:`types.UnionType` is now an alias for :class:`typing.Union`, causing " +"changes in some behaviors. See :ref:`above ` for " +"more details. (Contributed by Jelle Zijlstra in :gh:`105499`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3328 +msgid "" +"The runtime behavior of annotations has changed in various ways; see :ref:" +"`above ` for details. While most code that " +"interacts with annotations should continue to work, some undocumented " +"details may behave differently." +msgstr "" + +#: ../../whatsnew/3.14.rst:3333 +msgid "" +"As part of making the :mod:`mimetypes` CLI public, it now exits with ``1`` " +"on failure instead of ``0`` and ``2`` on incorrect command-line parameters " +"instead of ``1``. Error messages are now printed to stderr." +msgstr "" + +#: ../../whatsnew/3.14.rst:3338 +msgid "" +"The ``\\B`` pattern in regular expression now matches the empty string when " +"given as the entire pattern, which may cause behavioural changes." +msgstr "" + +#: ../../whatsnew/3.14.rst:3341 +msgid "" +"On FreeBSD, :data:`sys.platform` no longer contains the major version number." +msgstr "" + +#: ../../whatsnew/3.14.rst:3347 +msgid "Changes in annotations (:pep:`649` and :pep:`749`)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3349 +msgid "" +"This section contains guidance on changes that may be needed to annotations " +"or Python code that interacts with or introspects annotations, due to the " +"changes related to :ref:`deferred evaluation of annotations `." +msgstr "" + +#: ../../whatsnew/3.14.rst:3354 +msgid "" +"In the majority of cases, working code from older versions of Python will " +"not require any changes." +msgstr "" + +#: ../../whatsnew/3.14.rst:3359 +msgid "Implications for annotated code" +msgstr "" + +#: ../../whatsnew/3.14.rst:3361 +msgid "" +"If you define annotations in your code (for example, for use with a static " +"type checker), then this change probably does not affect you: you can keep " +"writing annotations the same way you did with previous versions of Python." +msgstr "" + +#: ../../whatsnew/3.14.rst:3365 +msgid "" +"You will likely be able to remove quoted strings in annotations, which are " +"frequently used for forward references. Similarly, if you use ``from " +"__future__ import annotations`` to avoid having to write strings in " +"annotations, you may well be able to remove that import once you support " +"only Python 3.14 and newer. However, if you rely on third-party libraries " +"that read annotations, those libraries may need changes to support unquoted " +"annotations before they work as expected." +msgstr "" + +#: ../../whatsnew/3.14.rst:3375 +msgid "Implications for readers of ``__annotations__``" +msgstr "" + +#: ../../whatsnew/3.14.rst:3377 +msgid "" +"If your code reads the :attr:`~object.__annotations__` attribute on objects, " +"you may want to make changes in order to support code that relies on " +"deferred evaluation of annotations. For example, you may want to use :func:" +"`annotationlib.get_annotations` with the :attr:`~annotationlib.Format." +"FORWARDREF` format, as the :mod:`dataclasses` module now does." +msgstr "" + +#: ../../whatsnew/3.14.rst:3384 +msgid "" +"The external :pypi:`typing_extensions` package provides partial backports of " +"some of the functionality of the :mod:`annotationlib` module, such as the :" +"class:`~annotationlib.Format` enum and the :func:`~annotationlib." +"get_annotations` function. These can be used to write cross-version code " +"that takes advantage of the new behavior in Python 3.14." +msgstr "" + +#: ../../whatsnew/3.14.rst:3393 +msgid "Related changes" +msgstr "" + +#: ../../whatsnew/3.14.rst:3395 +msgid "" +"The changes in Python 3.14 are designed to rework how :attr:`!" +"__annotations__` works at runtime while minimizing breakage to code that " +"contains annotations in source code and to code that reads :attr:`!" +"__annotations__`. However, if you rely on undocumented details of the " +"annotation behavior or on private functions in the standard library, there " +"are many ways in which your code may not work in Python 3.14. To safeguard " +"your code against future changes, only use the documented functionality of " +"the :mod:`annotationlib` module." +msgstr "" + +#: ../../whatsnew/3.14.rst:3404 +msgid "" +"In particular, do not read annotations directly from the namespace " +"dictionary attribute of type objects. Use :func:`annotationlib." +"get_annotate_from_class_namespace` during class construction and :func:" +"`annotationlib.get_annotations` afterwards." +msgstr "" + +#: ../../whatsnew/3.14.rst:3409 +msgid "" +"In previous releases, it was sometimes possible to access class annotations " +"from an instance of an annotated class. This behavior was undocumented and " +"accidental, and will no longer work in Python 3.14." +msgstr "" + +#: ../../whatsnew/3.14.rst:3415 +msgid "``from __future__ import annotations``" +msgstr "" + +#: ../../whatsnew/3.14.rst:3417 +msgid "" +"In Python 3.7, :pep:`563` introduced the ``from __future__ import " +"annotations`` :ref:`future statement `, which turns all annotations " +"into strings." +msgstr "" + +#: ../../whatsnew/3.14.rst:3420 +msgid "" +"However, this statement is now deprecated and it is expected to be removed " +"in a future version of Python. This removal will not happen until after " +"Python 3.13 reaches its end of life in 2029, being the last version of " +"Python without support for deferred evaluation of annotations." +msgstr "" + +#: ../../whatsnew/3.14.rst:3426 +msgid "" +"In Python 3.14, the behavior of code using ``from __future__ import " +"annotations`` is unchanged." +msgstr "" + +#: ../../whatsnew/3.14.rst:3431 +msgid "Changes in the C API" +msgstr "" + +#: ../../whatsnew/3.14.rst:3433 +msgid "" +":c:func:`Py_Finalize` now deletes all interned strings. This is backwards " +"incompatible to any C extension that holds onto an interned string after a " +"call to :c:func:`Py_Finalize` and is then reused after a call to :c:func:" +"`Py_Initialize`. Any issues arising from this behavior will normally result " +"in crashes during the execution of the subsequent call to :c:func:" +"`Py_Initialize` from accessing uninitialized memory. To fix, use an address " +"sanitizer to identify any use-after-free coming from an interned string and " +"deallocate it during module shutdown. (Contributed by Eddie Elizondo in :gh:" +"`113601`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3443 +msgid "" +"The :ref:`Unicode Exception Objects ` C API now raises a :" +"exc:`TypeError` if its exception argument is not a :exc:`UnicodeError` " +"object. (Contributed by Bénédikt Tran in :gh:`127691`.)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3450 +msgid "" +"The interpreter internally avoids some reference count modifications when " +"loading objects onto the operands stack by :term:`borrowing ` references when possible. This can lead to smaller reference " +"count values compared to previous Python versions. C API extensions that " +"checked :c:func:`Py_REFCNT` of ``1`` to determine if an function argument is " +"not referenced by any other code should instead use :c:func:" +"`PyUnstable_Object_IsUniqueReferencedTemporary` as a safer replacement." +msgstr "" + +#: ../../whatsnew/3.14.rst:3459 +msgid "Private functions promoted to public C APIs:" +msgstr "" + +#: ../../whatsnew/3.14.rst:3461 +msgid "``_PyBytes_Join()``: :c:func:`PyBytes_Join`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3462 +msgid "``_PyLong_IsNegative()``: :c:func:`PyLong_IsNegative`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3463 +msgid "``_PyLong_IsPositive()``: :c:func:`PyLong_IsPositive`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3464 +msgid "``_PyLong_IsZero()``: :c:func:`PyLong_IsZero`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3465 +msgid "``_PyLong_Sign()``: :c:func:`PyLong_GetSign`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3466 +msgid "``_PyUnicodeWriter_Dealloc()``: :c:func:`PyUnicodeWriter_Discard`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3467 +msgid "``_PyUnicodeWriter_Finish()``: :c:func:`PyUnicodeWriter_Finish`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3468 +msgid "``_PyUnicodeWriter_Init()``: use :c:func:`PyUnicodeWriter_Create`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3469 +msgid "``_PyUnicodeWriter_Prepare()``: (no replacement)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3470 +msgid "``_PyUnicodeWriter_PrepareKind()``: (no replacement)" +msgstr "" + +#: ../../whatsnew/3.14.rst:3471 +msgid "``_PyUnicodeWriter_WriteChar()``: :c:func:`PyUnicodeWriter_WriteChar`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3472 +msgid "``_PyUnicodeWriter_WriteStr()``: :c:func:`PyUnicodeWriter_WriteStr`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3473 +msgid "" +"``_PyUnicodeWriter_WriteSubstring()``: :c:func:" +"`PyUnicodeWriter_WriteSubstring`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3474 +msgid "``_PyUnicode_EQ()``: :c:func:`PyUnicode_Equal`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3475 +msgid "``_PyUnicode_Equal()``: :c:func:`PyUnicode_Equal`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3476 +msgid "" +"``_Py_GetConfig()``: :c:func:`PyConfig_Get` and :c:func:`PyConfig_GetInt`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3477 +msgid "``_Py_HashBytes()``: :c:func:`Py_HashBuffer`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3478 +msgid "``_Py_fopen_obj()``: :c:func:`Py_fopen`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3479 +msgid "``PyMutex_IsLocked()`` : :c:func:`PyMutex_IsLocked`" +msgstr "" + +#: ../../whatsnew/3.14.rst:3481 +msgid "" +"The `pythoncapi-compat project`_ can be used to get most of these new " +"functions on Python 3.13 and older." +msgstr "" + +#: ../../whatsnew/3.14.rst:3488 +msgid "Notable changes in 3.14.5" +msgstr "" + +#: ../../whatsnew/3.14.rst:3493 +msgid "" +"The incremental garbage collector shipped in Python 3.14.0-3.14.4 has been " +"reverted back to the generational garbage collector from 3.13, due to a " +"number of `reports `__ of " +"significant memory pressure in production environments. See :ref:" +"`whatsnew314-incremental-gc` for details." +msgstr "" diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index ec050db9..fa1d6a48 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -1043,7 +1043,7 @@ msgstr "" #: ../../whatsnew/3.7.rst:731 msgid "" -"The :meth:`loop.create_datagram_endpoint() \\ ` method gained support for Unix sockets. " "(Contributed by Quentin Dawans in :issue:`31245`.)" msgstr "" diff --git a/whatsnew/3.7.po~ b/whatsnew/3.7.po~ new file mode 100644 index 00000000..ec050db9 --- /dev/null +++ b/whatsnew/3.7.po~ @@ -0,0 +1,3731 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +# Translators: +# python-doc bot, 2025 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"PO-Revision-Date: 2025-09-16 00:02+0000\n" +"Last-Translator: python-doc bot, 2025\n" +"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" +"Language: de\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" + +#: ../../whatsnew/3.7.rst:3 +msgid "What's New In Python 3.7" +msgstr "" + +#: ../../whatsnew/3.7.rst:0 +msgid "Editor" +msgstr "" + +#: ../../whatsnew/3.7.rst:5 +msgid "Elvis Pranskevichus " +msgstr "" + +#: ../../whatsnew/3.7.rst:47 +msgid "" +"This article explains the new features in Python 3.7, compared to 3.6. " +"Python 3.7 was released on June 27, 2018. For full details, see the :ref:" +"`changelog `." +msgstr "" + +#: ../../whatsnew/3.7.rst:53 +msgid "Summary -- Release Highlights" +msgstr "" + +#: ../../whatsnew/3.7.rst:58 +msgid "New syntax features:" +msgstr "" + +#: ../../whatsnew/3.7.rst:60 +msgid "" +":ref:`PEP 563 `, postponed evaluation of type annotations." +msgstr "" + +#: ../../whatsnew/3.7.rst:62 +msgid "Backwards incompatible syntax changes:" +msgstr "" + +#: ../../whatsnew/3.7.rst:64 +msgid ":keyword:`async` and :keyword:`await` are now reserved keywords." +msgstr "" + +#: ../../whatsnew/3.7.rst:66 +msgid "New library modules:" +msgstr "" + +#: ../../whatsnew/3.7.rst:68 +msgid "" +":mod:`contextvars`: :ref:`PEP 567 -- Context Variables `" +msgstr "" + +#: ../../whatsnew/3.7.rst:69 +msgid ":mod:`dataclasses`: :ref:`PEP 557 -- Data Classes `" +msgstr "" + +#: ../../whatsnew/3.7.rst:70 +msgid ":ref:`whatsnew37_importlib_resources`" +msgstr "" + +#: ../../whatsnew/3.7.rst:72 +msgid "New built-in features:" +msgstr "" + +#: ../../whatsnew/3.7.rst:74 +msgid "" +":ref:`PEP 553 `, the new :func:`breakpoint` function." +msgstr "" + +#: ../../whatsnew/3.7.rst:76 +msgid "Python data model improvements:" +msgstr "" + +#: ../../whatsnew/3.7.rst:78 +msgid "" +":ref:`PEP 562 `, customization of access to module " +"attributes." +msgstr "" + +#: ../../whatsnew/3.7.rst:81 +msgid "" +":ref:`PEP 560 `, core support for typing module and " +"generic types." +msgstr "" + +#: ../../whatsnew/3.7.rst:84 +msgid "" +"the insertion-order preservation nature of :ref:`dict ` " +"objects `has been declared`_ to be an official part of the Python language " +"spec." +msgstr "" + +#: ../../whatsnew/3.7.rst:90 +msgid "Significant improvements in the standard library:" +msgstr "" + +#: ../../whatsnew/3.7.rst:92 +msgid "" +"The :mod:`asyncio` module has received new features, significant :ref:" +"`usability and performance improvements `." +msgstr "" + +#: ../../whatsnew/3.7.rst:95 +msgid "" +"The :mod:`time` module gained support for :ref:`functions with nanosecond " +"resolution `." +msgstr "" + +#: ../../whatsnew/3.7.rst:98 +msgid "CPython implementation improvements:" +msgstr "" + +#: ../../whatsnew/3.7.rst:100 +msgid "Avoiding the use of ASCII as a default text encoding:" +msgstr "" + +#: ../../whatsnew/3.7.rst:102 +msgid ":ref:`PEP 538 `, legacy C locale coercion" +msgstr "" + +#: ../../whatsnew/3.7.rst:103 +msgid ":ref:`PEP 540 `, forced UTF-8 runtime mode" +msgstr "" + +#: ../../whatsnew/3.7.rst:104 +msgid ":ref:`PEP 552 `, deterministic .pycs" +msgstr "" + +#: ../../whatsnew/3.7.rst:105 +msgid ":ref:`New Python Development Mode `" +msgstr "" + +#: ../../whatsnew/3.7.rst:106 +msgid "" +":ref:`PEP 565 `, improved :exc:`DeprecationWarning` " +"handling" +msgstr "" + +#: ../../whatsnew/3.7.rst:109 +msgid "C API improvements:" +msgstr "" + +#: ../../whatsnew/3.7.rst:111 +msgid ":ref:`PEP 539 `, new C API for thread-local storage" +msgstr "" + +#: ../../whatsnew/3.7.rst:113 +msgid "Documentation improvements:" +msgstr "" + +#: ../../whatsnew/3.7.rst:115 +msgid ":ref:`PEP 545 `, Python documentation translations" +msgstr "" + +#: ../../whatsnew/3.7.rst:116 +msgid "" +"New documentation translations: `Japanese `_, " +"`French `_, and `Korean `_." +msgstr "" + +#: ../../whatsnew/3.7.rst:120 +msgid "" +"This release features notable performance improvements in many areas. The :" +"ref:`whatsnew37-perf` section lists them in detail." +msgstr "" + +#: ../../whatsnew/3.7.rst:123 +msgid "" +"For a list of changes that may affect compatibility with previous Python " +"releases please refer to the :ref:`porting-to-python-37` section." +msgstr "" + +#: ../../whatsnew/3.7.rst:128 +msgid "New Features" +msgstr "Neue Funktionen" + +#: ../../whatsnew/3.7.rst:133 +msgid "PEP 563: Postponed Evaluation of Annotations" +msgstr "" + +#: ../../whatsnew/3.7.rst:135 +msgid "" +"The advent of type hints in Python uncovered two glaring usability issues " +"with the functionality of annotations added in :pep:`3107` and refined " +"further in :pep:`526`:" +msgstr "" + +#: ../../whatsnew/3.7.rst:139 +msgid "" +"annotations could only use names which were already available in the current " +"scope, in other words they didn't support forward references of any kind; and" +msgstr "" + +#: ../../whatsnew/3.7.rst:143 +msgid "" +"annotating source code had adverse effects on startup time of Python " +"programs." +msgstr "" + +#: ../../whatsnew/3.7.rst:146 +msgid "" +"Both of these issues are fixed by postponing the evaluation of annotations. " +"Instead of compiling code which executes expressions in annotations at their " +"definition time, the compiler stores the annotation in a string form " +"equivalent to the AST of the expression in question. If needed, annotations " +"can be resolved at runtime using :func:`typing.get_type_hints`. In the " +"common case where this is not required, the annotations are cheaper to store " +"(since short strings are interned by the interpreter) and make startup time " +"faster." +msgstr "" + +#: ../../whatsnew/3.7.rst:155 +msgid "" +"Usability-wise, annotations now support forward references, making the " +"following syntax valid::" +msgstr "" + +#: ../../whatsnew/3.7.rst:158 +msgid "" +"class C:\n" +" @classmethod\n" +" def from_string(cls, source: str) -> C:\n" +" ...\n" +"\n" +" def validate_b(self, obj: B) -> bool:\n" +" ...\n" +"\n" +"class B:\n" +" ..." +msgstr "" + +#: ../../whatsnew/3.7.rst:169 +msgid "" +"Since this change breaks compatibility, the new behavior needs to be enabled " +"on a per-module basis in Python 3.7 using a :mod:`__future__` import::" +msgstr "" + +#: ../../whatsnew/3.7.rst:172 +msgid "from __future__ import annotations" +msgstr "" + +#: ../../whatsnew/3.7.rst:174 +msgid "It will become the default in Python 3.10." +msgstr "" + +#: ../../whatsnew/3.7.rst:178 +msgid ":pep:`563` -- Postponed evaluation of annotations" +msgstr "" + +#: ../../whatsnew/3.7.rst:179 +msgid "PEP written and implemented by Łukasz Langa." +msgstr "" + +#: ../../whatsnew/3.7.rst:185 +msgid "PEP 538: Legacy C Locale Coercion" +msgstr "" + +#: ../../whatsnew/3.7.rst:187 +msgid "" +"An ongoing challenge within the Python 3 series has been determining a " +"sensible default strategy for handling the \"7-bit ASCII\" text encoding " +"assumption currently implied by the use of the default C or POSIX locale on " +"non-Windows platforms." +msgstr "" + +#: ../../whatsnew/3.7.rst:192 +msgid "" +":pep:`538` updates the default interpreter command line interface to " +"automatically coerce that locale to an available UTF-8 based locale as " +"described in the documentation of the new :envvar:`PYTHONCOERCECLOCALE` " +"environment variable. Automatically setting ``LC_CTYPE`` this way means that " +"both the core interpreter and locale-aware C extensions (such as :mod:" +"`readline`) will assume the use of UTF-8 as the default text encoding, " +"rather than ASCII." +msgstr "" + +#: ../../whatsnew/3.7.rst:200 +msgid "" +"The platform support definition in :pep:`11` has also been updated to limit " +"full text handling support to suitably configured non-ASCII based locales." +msgstr "" + +#: ../../whatsnew/3.7.rst:203 +msgid "" +"As part of this change, the default error handler for :data:`~sys.stdin` " +"and :data:`~sys.stdout` is now ``surrogateescape`` (rather than ``strict``) " +"when using any of the defined coercion target locales (currently ``C." +"UTF-8``, ``C.utf8``, and ``UTF-8``). The default error handler for :data:" +"`~sys.stderr` continues to be ``backslashreplace``, regardless of locale." +msgstr "" + +#: ../../whatsnew/3.7.rst:209 +msgid "" +"Locale coercion is silent by default, but to assist in debugging potentially " +"locale related integration problems, explicit warnings (emitted directly on :" +"data:`~sys.stderr`) can be requested by setting " +"``PYTHONCOERCECLOCALE=warn``. This setting will also cause the Python " +"runtime to emit a warning if the legacy C locale remains active when the " +"core interpreter is initialized." +msgstr "" + +#: ../../whatsnew/3.7.rst:215 +msgid "" +"While :pep:`538`'s locale coercion has the benefit of also affecting " +"extension modules (such as GNU ``readline``), as well as child processes " +"(including those running non-Python applications and older versions of " +"Python), it has the downside of requiring that a suitable target locale be " +"present on the running system. To better handle the case where no suitable " +"target locale is available (as occurs on RHEL/CentOS 7, for example), Python " +"3.7 also implements :ref:`whatsnew37-pep540`." +msgstr "" + +#: ../../whatsnew/3.7.rst:225 +msgid ":pep:`538` -- Coercing the legacy C locale to a UTF-8 based locale" +msgstr "" + +#: ../../whatsnew/3.7.rst:226 +msgid "PEP written and implemented by Nick Coghlan." +msgstr "" + +#: ../../whatsnew/3.7.rst:232 +msgid "PEP 540: Forced UTF-8 Runtime Mode" +msgstr "" + +#: ../../whatsnew/3.7.rst:234 +msgid "" +"The new :option:`-X` ``utf8`` command line option and :envvar:`PYTHONUTF8` " +"environment variable can be used to enable the :ref:`Python UTF-8 Mode `." +msgstr "" + +#: ../../whatsnew/3.7.rst:238 +msgid "" +"When in UTF-8 mode, CPython ignores the locale settings, and uses the UTF-8 " +"encoding by default. The error handlers for :data:`sys.stdin` and :data:" +"`sys.stdout` streams are set to ``surrogateescape``." +msgstr "" + +#: ../../whatsnew/3.7.rst:242 +msgid "" +"The forced UTF-8 mode can be used to change the text handling behavior in an " +"embedded Python interpreter without changing the locale settings of an " +"embedding application." +msgstr "" + +#: ../../whatsnew/3.7.rst:246 +msgid "" +"While :pep:`540`'s UTF-8 mode has the benefit of working regardless of which " +"locales are available on the running system, it has the downside of having " +"no effect on extension modules (such as GNU ``readline``), child processes " +"running non-Python applications, and child processes running older versions " +"of Python. To reduce the risk of corrupting text data when communicating " +"with such components, Python 3.7 also implements :ref:`whatsnew37-pep540`)." +msgstr "" + +#: ../../whatsnew/3.7.rst:253 +msgid "" +"The UTF-8 mode is enabled by default when the locale is ``C`` or ``POSIX``, " +"and the :pep:`538` locale coercion feature fails to change it to a UTF-8 " +"based alternative (whether that failure is due to ``PYTHONCOERCECLOCALE=0`` " +"being set, ``LC_ALL`` being set, or the lack of a suitable target locale)." +msgstr "" + +#: ../../whatsnew/3.7.rst:260 +msgid ":pep:`540` -- Add a new UTF-8 mode" +msgstr "" + +#: ../../whatsnew/3.7.rst:261 ../../whatsnew/3.7.rst:363 +msgid "PEP written and implemented by Victor Stinner" +msgstr "" + +#: ../../whatsnew/3.7.rst:267 +msgid "PEP 553: Built-in ``breakpoint()``" +msgstr "" + +#: ../../whatsnew/3.7.rst:269 +msgid "" +"Python 3.7 includes the new built-in :func:`breakpoint` function as an easy " +"and consistent way to enter the Python debugger." +msgstr "" + +#: ../../whatsnew/3.7.rst:272 +msgid "" +"Built-in ``breakpoint()`` calls :func:`sys.breakpointhook`. By default, the " +"latter imports :mod:`pdb` and then calls ``pdb.set_trace()``, but by binding " +"``sys.breakpointhook()`` to the function of your choosing, ``breakpoint()`` " +"can enter any debugger. Additionally, the environment variable :envvar:" +"`PYTHONBREAKPOINT` can be set to the callable of your debugger of choice. " +"Set ``PYTHONBREAKPOINT=0`` to completely disable built-in ``breakpoint()``." +msgstr "" + +#: ../../whatsnew/3.7.rst:282 +msgid ":pep:`553` -- Built-in breakpoint()" +msgstr "" + +#: ../../whatsnew/3.7.rst:283 +msgid "PEP written and implemented by Barry Warsaw" +msgstr "" + +#: ../../whatsnew/3.7.rst:289 +msgid "PEP 539: New C API for Thread-Local Storage" +msgstr "" + +#: ../../whatsnew/3.7.rst:291 +msgid "" +"While Python provides a C API for thread-local storage support; the " +"existing :ref:`Thread Local Storage (TLS) API ` " +"has used :c:expr:`int` to represent TLS keys across all platforms. This has " +"not generally been a problem for officially support platforms, but that is " +"neither POSIX-compliant, nor portable in any practical sense." +msgstr "" + +#: ../../whatsnew/3.7.rst:297 +msgid "" +":pep:`539` changes this by providing a new :ref:`Thread Specific Storage " +"(TSS) API ` to CPython which supersedes use of " +"the existing TLS API within the CPython interpreter, while deprecating the " +"existing API. The TSS API uses a new type :c:type:`Py_tss_t` instead of :c:" +"expr:`int` to represent TSS keys--an opaque type the definition of which may " +"depend on the underlying TLS implementation. Therefore, this will allow to " +"build CPython on platforms where the native TLS key is defined in a way that " +"cannot be safely cast to :c:expr:`int`." +msgstr "" + +#: ../../whatsnew/3.7.rst:306 +msgid "" +"Note that on platforms where the native TLS key is defined in a way that " +"cannot be safely cast to :c:expr:`int`, all functions of the existing TLS " +"API will be no-op and immediately return failure. This indicates clearly " +"that the old API is not supported on platforms where it cannot be used " +"reliably, and that no effort will be made to add such support." +msgstr "" + +#: ../../whatsnew/3.7.rst:314 +msgid ":pep:`539` -- A New C-API for Thread-Local Storage in CPython" +msgstr "" + +#: ../../whatsnew/3.7.rst:315 +msgid "PEP written by Erik M. Bray; implementation by Masayuki Yamamoto." +msgstr "" + +#: ../../whatsnew/3.7.rst:321 +msgid "PEP 562: Customization of Access to Module Attributes" +msgstr "" + +#: ../../whatsnew/3.7.rst:323 +msgid "" +"Python 3.7 allows defining :meth:`~module.__getattr__` on modules and will " +"call it whenever a module attribute is otherwise not found. Defining :meth:" +"`~module.__dir__` on modules is now also allowed." +msgstr "" + +#: ../../whatsnew/3.7.rst:327 +msgid "" +"A typical example of where this may be useful is module attribute " +"deprecation and lazy loading." +msgstr "" + +#: ../../whatsnew/3.7.rst:332 +msgid ":pep:`562` -- Module ``__getattr__`` and ``__dir__``" +msgstr "" + +#: ../../whatsnew/3.7.rst:333 ../../whatsnew/3.7.rst:422 +msgid "PEP written and implemented by Ivan Levkivskyi" +msgstr "" + +#: ../../whatsnew/3.7.rst:339 +msgid "PEP 564: New Time Functions With Nanosecond Resolution" +msgstr "" + +#: ../../whatsnew/3.7.rst:341 +msgid "" +"The resolution of clocks in modern systems can exceed the limited precision " +"of a floating-point number returned by the :func:`time.time` function and " +"its variants. To avoid loss of precision, :pep:`564` adds six new " +"\"nanosecond\" variants of the existing timer functions to the :mod:`time` " +"module:" +msgstr "" + +#: ../../whatsnew/3.7.rst:347 ../../whatsnew/3.7.rst:1455 +msgid ":func:`time.clock_gettime_ns`" +msgstr "" + +#: ../../whatsnew/3.7.rst:348 ../../whatsnew/3.7.rst:1456 +msgid ":func:`time.clock_settime_ns`" +msgstr "" + +#: ../../whatsnew/3.7.rst:349 ../../whatsnew/3.7.rst:1457 +msgid ":func:`time.monotonic_ns`" +msgstr "" + +#: ../../whatsnew/3.7.rst:350 ../../whatsnew/3.7.rst:1458 +msgid ":func:`time.perf_counter_ns`" +msgstr "" + +#: ../../whatsnew/3.7.rst:351 ../../whatsnew/3.7.rst:1459 +msgid ":func:`time.process_time_ns`" +msgstr "" + +#: ../../whatsnew/3.7.rst:352 ../../whatsnew/3.7.rst:1460 +msgid ":func:`time.time_ns`" +msgstr "" + +#: ../../whatsnew/3.7.rst:354 +msgid "The new functions return the number of nanoseconds as an integer value." +msgstr "" + +#: ../../whatsnew/3.7.rst:356 +msgid "" +":pep:`Measurements <0564#annex-clocks-resolution-in-python>` show that on " +"Linux and Windows the resolution of :func:`time.time_ns` is approximately 3 " +"times better than that of :func:`time.time`." +msgstr "" + +#: ../../whatsnew/3.7.rst:362 +msgid ":pep:`564` -- Add new time functions with nanosecond resolution" +msgstr "" + +#: ../../whatsnew/3.7.rst:369 +msgid "PEP 565: Show DeprecationWarning in ``__main__``" +msgstr "" + +#: ../../whatsnew/3.7.rst:371 +msgid "" +"The default handling of :exc:`DeprecationWarning` has been changed such that " +"these warnings are once more shown by default, but only when the code " +"triggering them is running directly in the :mod:`__main__` module. As a " +"result, developers of single file scripts and those using Python " +"interactively should once again start seeing deprecation warnings for the " +"APIs they use, but deprecation warnings triggered by imported application, " +"library and framework modules will continue to be hidden by default." +msgstr "" + +#: ../../whatsnew/3.7.rst:379 +msgid "" +"As a result of this change, the standard library now allows developers to " +"choose between three different deprecation warning behaviours:" +msgstr "" + +#: ../../whatsnew/3.7.rst:382 +msgid "" +":exc:`FutureWarning`: always displayed by default, recommended for warnings " +"intended to be seen by application end users (e.g. for deprecated " +"application configuration settings)." +msgstr "" + +#: ../../whatsnew/3.7.rst:385 +msgid "" +":exc:`DeprecationWarning`: displayed by default only in :mod:`__main__` and " +"when running tests, recommended for warnings intended to be seen by other " +"Python developers where a version upgrade may result in changed behaviour or " +"an error." +msgstr "" + +#: ../../whatsnew/3.7.rst:389 +msgid "" +":exc:`PendingDeprecationWarning`: displayed by default only when running " +"tests, intended for cases where a future version upgrade will change the " +"warning category to :exc:`DeprecationWarning` or :exc:`FutureWarning`." +msgstr "" + +#: ../../whatsnew/3.7.rst:393 +msgid "" +"Previously both :exc:`DeprecationWarning` and :exc:" +"`PendingDeprecationWarning` were only visible when running tests, which " +"meant that developers primarily writing single file scripts or using Python " +"interactively could be surprised by breaking changes in the APIs they used." +msgstr "" + +#: ../../whatsnew/3.7.rst:400 +msgid ":pep:`565` -- Show DeprecationWarning in ``__main__``" +msgstr "" + +#: ../../whatsnew/3.7.rst:401 +msgid "PEP written and implemented by Nick Coghlan" +msgstr "" + +#: ../../whatsnew/3.7.rst:407 +msgid "PEP 560: Core Support for ``typing`` module and Generic Types" +msgstr "" + +#: ../../whatsnew/3.7.rst:409 +msgid "" +"Initially :pep:`484` was designed in such way that it would not introduce " +"*any* changes to the core CPython interpreter. Now type hints and the :mod:" +"`typing` module are extensively used by the community, so this restriction " +"is removed. The PEP introduces two special methods :meth:`~object." +"__class_getitem__` and :meth:`~object.__mro_entries__`, these methods are " +"now used by most classes and special constructs in :mod:`typing`. As a " +"result, the speed of various operations with types increased up to 7 times, " +"the generic types can be used without metaclass conflicts, and several long " +"standing bugs in :mod:`typing` module are fixed." +msgstr "" + +#: ../../whatsnew/3.7.rst:421 +msgid ":pep:`560` -- Core support for typing module and generic types" +msgstr "" + +#: ../../whatsnew/3.7.rst:428 +msgid "PEP 552: Hash-based .pyc Files" +msgstr "" + +#: ../../whatsnew/3.7.rst:430 +msgid "" +"Python has traditionally checked the up-to-dateness of bytecode cache files " +"(i.e., ``.pyc`` files) by comparing the source metadata (last-modified " +"timestamp and size) with source metadata saved in the cache file header when " +"it was generated. While effective, this invalidation method has its " +"drawbacks. When filesystem timestamps are too coarse, Python can miss " +"source updates, leading to user confusion. Additionally, having a timestamp " +"in the cache file is problematic for `build reproducibility `_ and content-based build systems." +msgstr "" + +#: ../../whatsnew/3.7.rst:439 +msgid "" +":pep:`552` extends the pyc format to allow the hash of the source file to be " +"used for invalidation instead of the source timestamp. Such ``.pyc`` files " +"are called \"hash-based\". By default, Python still uses timestamp-based " +"invalidation and does not generate hash-based ``.pyc`` files at runtime. " +"Hash-based ``.pyc`` files may be generated with :mod:`py_compile` or :mod:" +"`compileall`." +msgstr "" + +#: ../../whatsnew/3.7.rst:445 +msgid "" +"Hash-based ``.pyc`` files come in two variants: checked and unchecked. " +"Python validates checked hash-based ``.pyc`` files against the corresponding " +"source files at runtime but doesn't do so for unchecked hash-based pycs. " +"Unchecked hash-based ``.pyc`` files are a useful performance optimization " +"for environments where a system external to Python (e.g., the build system) " +"is responsible for keeping ``.pyc`` files up-to-date." +msgstr "" + +#: ../../whatsnew/3.7.rst:452 +msgid "See :ref:`pyc-invalidation` for more information." +msgstr "" + +#: ../../whatsnew/3.7.rst:456 +msgid ":pep:`552` -- Deterministic pycs" +msgstr "" + +#: ../../whatsnew/3.7.rst:457 +msgid "PEP written and implemented by Benjamin Peterson" +msgstr "" + +#: ../../whatsnew/3.7.rst:463 +msgid "PEP 545: Python Documentation Translations" +msgstr "" + +#: ../../whatsnew/3.7.rst:465 +msgid "" +":pep:`545` describes the process of creating and maintaining Python " +"documentation translations." +msgstr "" + +#: ../../whatsnew/3.7.rst:468 +msgid "Three new translations have been added:" +msgstr "" + +#: ../../whatsnew/3.7.rst:470 +msgid "Japanese: https://docs.python.org/ja/" +msgstr "" + +#: ../../whatsnew/3.7.rst:471 +msgid "French: https://docs.python.org/fr/" +msgstr "" + +#: ../../whatsnew/3.7.rst:472 +msgid "Korean: https://docs.python.org/ko/" +msgstr "" + +#: ../../whatsnew/3.7.rst:476 +msgid ":pep:`545` -- Python Documentation Translations" +msgstr "" + +#: ../../whatsnew/3.7.rst:477 +msgid "" +"PEP written and implemented by Julien Palard, Inada Naoki, and Victor " +"Stinner." +msgstr "" + +#: ../../whatsnew/3.7.rst:484 +msgid "Python Development Mode (-X dev)" +msgstr "" + +#: ../../whatsnew/3.7.rst:486 +msgid "" +"The new :option:`-X` ``dev`` command line option or the new :envvar:" +"`PYTHONDEVMODE` environment variable can be used to enable :ref:`Python " +"Development Mode `. When in development mode, Python performs " +"additional runtime checks that are too expensive to be enabled by default. " +"See :ref:`Python Development Mode ` documentation for the full " +"description." +msgstr "" + +#: ../../whatsnew/3.7.rst:495 +msgid "Other Language Changes" +msgstr "Andere sprachliche Änderungen" + +#: ../../whatsnew/3.7.rst:497 +msgid "" +"An :keyword:`await` expression and comprehensions containing an :keyword:" +"`async for` clause were illegal in the expressions in :ref:`formatted string " +"literals ` due to a problem with the implementation. In Python " +"3.7 this restriction was lifted." +msgstr "" + +#: ../../whatsnew/3.7.rst:502 +msgid "" +"More than 255 arguments can now be passed to a function, and a function can " +"now have more than 255 parameters. (Contributed by Serhiy Storchaka in :" +"issue:`12844` and :issue:`18896`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:506 +msgid "" +":meth:`bytes.fromhex` and :meth:`bytearray.fromhex` now ignore all ASCII " +"whitespace, not only spaces. (Contributed by Robert Xiao in :issue:`28927`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:509 +msgid "" +":class:`str`, :class:`bytes`, and :class:`bytearray` gained support for the " +"new :meth:`isascii() ` method, which can be used to test if a " +"string or bytes contain only the ASCII characters. (Contributed by INADA " +"Naoki in :issue:`32677`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:514 +msgid "" +":exc:`ImportError` now displays module name and module ``__file__`` path " +"when ``from ... import ...`` fails. (Contributed by Matthias Bussonnier in :" +"issue:`29546`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:518 +msgid "" +"Circular imports involving absolute imports with binding a submodule to a " +"name are now supported. (Contributed by Serhiy Storchaka in :issue:`30024`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:522 +msgid "" +"``object.__format__(x, '')`` is now equivalent to ``str(x)`` rather than " +"``format(str(self), '')``. (Contributed by Serhiy Storchaka in :issue:" +"`28974`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:526 +msgid "" +"In order to better support dynamic creation of stack traces, :class:`types." +"TracebackType` can now be instantiated from Python code, and the :attr:" +"`~traceback.tb_next` attribute on :ref:`tracebacks ` is " +"now writable. (Contributed by Nathaniel J. Smith in :issue:`30579`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:532 +msgid "" +"When using the :option:`-m` switch, ``sys.path[0]`` is now eagerly expanded " +"to the full starting directory path, rather than being left as the empty " +"directory (which allows imports from the *current* working directory at the " +"time when an import occurs) (Contributed by Nick Coghlan in :issue:`33053`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:538 +msgid "" +"The new :option:`-X` ``importtime`` option or the :envvar:" +"`PYTHONPROFILEIMPORTTIME` environment variable can be used to show the " +"timing of each module import. (Contributed by Inada Naoki in :issue:`31415`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:545 +msgid "New Modules" +msgstr "Neue Module" + +#: ../../whatsnew/3.7.rst:550 +msgid "contextvars" +msgstr "" + +#: ../../whatsnew/3.7.rst:552 +msgid "" +"The new :mod:`contextvars` module and a set of :ref:`new C APIs " +"` introduce support for *context variables*. Context " +"variables are conceptually similar to thread-local variables. Unlike TLS, " +"context variables support asynchronous code correctly." +msgstr "" + +#: ../../whatsnew/3.7.rst:558 +msgid "" +"The :mod:`asyncio` and :mod:`decimal` modules have been updated to use and " +"support context variables out of the box. Particularly the active decimal " +"context is now stored in a context variable, which allows decimal operations " +"to work with the correct context in asynchronous code." +msgstr "" + +#: ../../whatsnew/3.7.rst:565 +msgid ":pep:`567` -- Context Variables" +msgstr "" + +#: ../../whatsnew/3.7.rst:566 +msgid "PEP written and implemented by Yury Selivanov" +msgstr "" + +#: ../../whatsnew/3.7.rst:572 +msgid "dataclasses" +msgstr "" + +#: ../../whatsnew/3.7.rst:574 +msgid "" +"The new :deco:`~dataclasses.dataclass` decorator provides a way to declare " +"*data classes*. A data class describes its attributes using class variable " +"annotations. Its constructor and other magic methods, such as :meth:" +"`~object.__repr__`, :meth:`~object.__eq__`, and :meth:`~object.__hash__` are " +"generated automatically." +msgstr "" + +#: ../../whatsnew/3.7.rst:580 +msgid "Example::" +msgstr "" + +#: ../../whatsnew/3.7.rst:582 +msgid "" +"@dataclass\n" +"class Point:\n" +" x: float\n" +" y: float\n" +" z: float = 0.0\n" +"\n" +"p = Point(1.5, 2.5)\n" +"print(p) # produces \"Point(x=1.5, y=2.5, z=0.0)\"" +msgstr "" + +#: ../../whatsnew/3.7.rst:593 +msgid ":pep:`557` -- Data Classes" +msgstr "" + +#: ../../whatsnew/3.7.rst:594 +msgid "PEP written and implemented by Eric V. Smith" +msgstr "" + +#: ../../whatsnew/3.7.rst:600 +msgid "importlib.resources" +msgstr "" + +#: ../../whatsnew/3.7.rst:602 +msgid "" +"The new :mod:`importlib.resources` module provides several new APIs and one " +"new ABC for access to, opening, and reading *resources* inside packages. " +"Resources are roughly similar to files inside packages, but they needn't be " +"actual files on the physical file system. Module loaders can provide a :" +"meth:`!get_resource_reader` function which returns a :class:`!importlib.abc." +"ResourceReader` instance to support this new API. Built-in file path " +"loaders and zip file loaders both support this." +msgstr "" + +#: ../../whatsnew/3.7.rst:610 +msgid "Contributed by Barry Warsaw and Brett Cannon in :issue:`32248`." +msgstr "" + +#: ../../whatsnew/3.7.rst:614 +msgid "" +"`importlib_resources `_ -- a PyPI backport for earlier Python versions." +msgstr "" + +#: ../../whatsnew/3.7.rst:619 +msgid "Improved Modules" +msgstr "Verbesserte Module" + +#: ../../whatsnew/3.7.rst:623 +msgid "argparse" +msgstr "" + +#: ../../whatsnew/3.7.rst:625 +msgid "" +"The new :meth:`ArgumentParser.parse_intermixed_args() ` method allows intermixing options and " +"positional arguments. (Contributed by paul.j3 in :issue:`14191`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:634 ../../whatsnew/3.7.rst:1968 +msgid "asyncio" +msgstr "asyncio" + +#: ../../whatsnew/3.7.rst:636 +msgid "" +"The :mod:`asyncio` module has received many new features, usability and :ref:" +"`performance improvements `. Notable changes " +"include:" +msgstr "" + +#: ../../whatsnew/3.7.rst:640 +msgid "" +"The new :term:`provisional ` :func:`asyncio.run` function " +"can be used to run a coroutine from synchronous code by automatically " +"creating and destroying the event loop. (Contributed by Yury Selivanov in :" +"issue:`32314`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:645 +msgid "" +"asyncio gained support for :mod:`contextvars`. :meth:`loop.call_soon() " +"`, :meth:`loop.call_soon_threadsafe() `, :meth:`loop.call_later() `, :meth:`loop.call_at() `, and :meth:" +"`Future.add_done_callback() ` have a new " +"optional keyword-only *context* parameter. :class:`Tasks ` now " +"track their context automatically. See :pep:`567` for more details. " +"(Contributed by Yury Selivanov in :issue:`32436`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:656 +msgid "" +"The new :func:`asyncio.create_task` function has been added as a shortcut to " +"``asyncio.get_event_loop().create_task()``. (Contributed by Andrew Svetlov " +"in :issue:`32311`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:660 +msgid "" +"The new :meth:`loop.start_tls() ` method can be used " +"to upgrade an existing connection to TLS. (Contributed by Yury Selivanov in :" +"issue:`23749`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:664 +msgid "" +"The new :meth:`loop.sock_recv_into() ` method " +"allows reading data from a socket directly into a provided buffer making it " +"possible to reduce data copies. (Contributed by Antoine Pitrou in :issue:" +"`31819`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:669 +msgid "" +"The new :func:`asyncio.current_task` function returns the currently running :" +"class:`~asyncio.Task` instance, and the new :func:`asyncio.all_tasks` " +"function returns a set of all existing ``Task`` instances in a given loop. " +"The :meth:`!Task.current_task` and :meth:`!Task.all_tasks` methods have been " +"deprecated. (Contributed by Andrew Svetlov in :issue:`32250`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:676 +msgid "" +"The new *provisional* :class:`~asyncio.BufferedProtocol` class allows " +"implementing streaming protocols with manual control over the receive " +"buffer. (Contributed by Yury Selivanov in :issue:`32251`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:680 +msgid "" +"The new :func:`asyncio.get_running_loop` function returns the currently " +"running loop, and raises a :exc:`RuntimeError` if no loop is running. This " +"is in contrast with :func:`asyncio.get_event_loop`, which will *create* a " +"new event loop if none is running. (Contributed by Yury Selivanov in :issue:" +"`32269`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:686 +msgid "" +"The new :meth:`StreamWriter.wait_closed() ` coroutine method allows waiting until the stream writer is " +"closed. The new :meth:`StreamWriter.is_closing() ` method can be used to determine if the writer is closing. " +"(Contributed by Andrew Svetlov in :issue:`32391`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:692 +msgid "" +"The new :meth:`loop.sock_sendfile() ` coroutine " +"method allows sending files using :mod:`os.sendfile` when possible. " +"(Contributed by Andrew Svetlov in :issue:`32410`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:696 +msgid "" +"The new :meth:`Future.get_loop() ` and ``Task." +"get_loop()`` methods return the instance of the loop on which a task or a " +"future were created. :meth:`Server.get_loop() ` " +"allows doing the same for :class:`asyncio.Server` objects. (Contributed by " +"Yury Selivanov in :issue:`32415` and Srinivas Reddy Thatiparthy in :issue:" +"`32418`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:704 +msgid "" +"It is now possible to control how instances of :class:`asyncio.Server` begin " +"serving. Previously, the server would start serving immediately when " +"created. The new *start_serving* keyword argument to :meth:`loop." +"create_server() ` and :meth:`loop." +"create_unix_server() `, as well as :meth:" +"`Server.start_serving() `, and :meth:`Server." +"serve_forever() ` can be used to decouple " +"server instantiation and serving. The new :meth:`Server.is_serving() " +"` method returns ``True`` if the server is " +"serving. :class:`~asyncio.Server` objects are now asynchronous context " +"managers::" +msgstr "" + +#: ../../whatsnew/3.7.rst:716 +msgid "" +"srv = await loop.create_server(...)\n" +"\n" +"async with srv:\n" +" # some code\n" +"\n" +"# At this point, srv is closed and no longer accepts new connections." +msgstr "" + +#: ../../whatsnew/3.7.rst:723 +msgid "(Contributed by Yury Selivanov in :issue:`32662`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:725 +msgid "" +"Callback objects returned by :func:`loop.call_later() ` gained the new :meth:`when() ` method " +"which returns an absolute scheduled callback timestamp. (Contributed by " +"Andrew Svetlov in :issue:`32741`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:731 +msgid "" +"The :meth:`loop.create_datagram_endpoint() \\ ` method gained support for Unix sockets. " +"(Contributed by Quentin Dawans in :issue:`31245`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:736 +msgid "" +"The :func:`asyncio.open_connection`, :func:`asyncio.start_server` " +"functions, :meth:`loop.create_connection() `, :meth:`loop.create_server() `, :meth:`loop.create_accepted_socket() ` methods and their corresponding UNIX socket " +"variants now accept the *ssl_handshake_timeout* keyword argument. " +"(Contributed by Neil Aspinall in :issue:`29970`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:744 +msgid "" +"The new :meth:`Handle.cancelled() ` method returns " +"``True`` if the callback was cancelled. (Contributed by Marat Sharafutdinov " +"in :issue:`31943`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:748 +msgid "" +"The asyncio source has been converted to use the :keyword:`async`/:keyword:" +"`await` syntax. (Contributed by Andrew Svetlov in :issue:`32193`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:752 +msgid "" +"The new :meth:`ReadTransport.is_reading() ` method can be used to determine the reading state of the " +"transport. Additionally, calls to :meth:`ReadTransport.resume_reading() " +"` and :meth:`ReadTransport." +"pause_reading() ` are now idempotent. " +"(Contributed by Yury Selivanov in :issue:`32356`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:760 +msgid "" +"Loop methods which accept socket paths now support passing :term:`path-like " +"objects `. (Contributed by Yury Selivanov in :issue:" +"`32066`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:764 +msgid "" +"In :mod:`asyncio` TCP sockets on Linux are now created with ``TCP_NODELAY`` " +"flag set by default. (Contributed by Yury Selivanov and Victor Stinner in :" +"issue:`27456`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:768 +msgid "" +"Exceptions occurring in cancelled tasks are no longer logged. (Contributed " +"by Yury Selivanov in :issue:`30508`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:771 +msgid "" +"New ``WindowsSelectorEventLoopPolicy`` and " +"``WindowsProactorEventLoopPolicy`` classes. (Contributed by Yury Selivanov " +"in :issue:`33792`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:775 +msgid "" +"Several ``asyncio`` APIs have been :ref:`deprecated `." +msgstr "" + +#: ../../whatsnew/3.7.rst:780 +msgid "binascii" +msgstr "" + +#: ../../whatsnew/3.7.rst:782 +msgid "" +"The :func:`~binascii.b2a_uu` function now accepts an optional *backtick* " +"keyword argument. When it's true, zeros are represented by ``'`'`` instead " +"of spaces. (Contributed by Xiang Zhang in :issue:`30103`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:788 +msgid "calendar" +msgstr "Kalender" + +#: ../../whatsnew/3.7.rst:790 +msgid "" +"The :class:`~calendar.HTMLCalendar` class has new class attributes which " +"ease the customization of CSS classes in the produced HTML calendar. " +"(Contributed by Oz Tiram in :issue:`30095`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:796 ../../whatsnew/3.7.rst:1982 +msgid "collections" +msgstr "" + +#: ../../whatsnew/3.7.rst:798 +msgid "" +"``collections.namedtuple()`` now supports default values. (Contributed by " +"Raymond Hettinger in :issue:`32320`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:803 +msgid "compileall" +msgstr "" + +#: ../../whatsnew/3.7.rst:805 +msgid "" +":func:`compileall.compile_dir` learned the new *invalidation_mode* " +"parameter, which can be used to enable :ref:`hash-based .pyc invalidation " +"`. The invalidation mode can also be specified on the " +"command line using the new ``--invalidation-mode`` argument. (Contributed by " +"Benjamin Peterson in :issue:`31650`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:814 +msgid "concurrent.futures" +msgstr "" + +#: ../../whatsnew/3.7.rst:816 +msgid "" +":class:`ProcessPoolExecutor ` and :" +"class:`ThreadPoolExecutor ` now " +"support the new *initializer* and *initargs* constructor arguments. " +"(Contributed by Antoine Pitrou in :issue:`21423`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:821 +msgid "" +"The :class:`ProcessPoolExecutor ` " +"can now take the multiprocessing context via the new *mp_context* argument. " +"(Contributed by Thomas Moreau in :issue:`31540`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:827 +msgid "contextlib" +msgstr "" + +#: ../../whatsnew/3.7.rst:829 +msgid "" +"The new :func:`~contextlib.nullcontext` is a simpler and faster no-op " +"context manager than :class:`~contextlib.ExitStack`. (Contributed by Jesse-" +"Bakker in :issue:`10049`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:833 +msgid "" +"The new :deco:`~contextlib.asynccontextmanager`, :class:`~contextlib." +"AbstractAsyncContextManager`, and :class:`~contextlib.AsyncExitStack` have " +"been added to complement their synchronous counterparts. (Contributed by " +"Jelle Zijlstra in :issue:`29679` and :issue:`30241`, and by Alexander Mohr " +"and Ilya Kulakov in :issue:`29302`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:842 +msgid "cProfile" +msgstr "" + +#: ../../whatsnew/3.7.rst:844 +msgid "" +"The :mod:`!cProfile` command line now accepts ``-m module_name`` as an " +"alternative to script path. (Contributed by Sanyam Khurana in :issue:" +"`21862`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:849 +msgid "crypt" +msgstr "" + +#: ../../whatsnew/3.7.rst:851 +msgid "" +"The :mod:`!crypt` module now supports the Blowfish hashing method. " +"(Contributed by Serhiy Storchaka in :issue:`31664`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:854 +msgid "" +"The :func:`!mksalt` function now allows specifying the number of rounds for " +"hashing. (Contributed by Serhiy Storchaka in :issue:`31702`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:859 +msgid "datetime" +msgstr "" + +#: ../../whatsnew/3.7.rst:861 +msgid "" +"The new :meth:`datetime.fromisoformat() ` " +"method constructs a :class:`~datetime.datetime` object from a string in one " +"of the formats output by :meth:`datetime.isoformat() `. (Contributed by Paul Ganssle in :issue:`15873`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:867 +msgid "" +"The :class:`tzinfo ` class now supports sub-minute offsets. " +"(Contributed by Alexander Belopolsky in :issue:`5288`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:872 ../../whatsnew/3.7.rst:1992 +msgid "dbm" +msgstr "" + +#: ../../whatsnew/3.7.rst:874 +msgid "" +":mod:`dbm.dumb` now supports reading read-only files and no longer writes " +"the index file when it is not changed." +msgstr "" + +#: ../../whatsnew/3.7.rst:879 +msgid "decimal" +msgstr "" + +#: ../../whatsnew/3.7.rst:881 +msgid "" +"The :mod:`decimal` module now uses :ref:`context variables ` to store the decimal context. (Contributed by Yury Selivanov in :" +"issue:`32630`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:887 +msgid "dis" +msgstr "dis" + +#: ../../whatsnew/3.7.rst:889 +msgid "" +"The :func:`~dis.dis` function is now able to disassemble nested code objects " +"(the code of comprehensions, generator expressions and nested functions, and " +"the code used for building nested classes). The maximum depth of " +"disassembly recursion is controlled by the new *depth* parameter. " +"(Contributed by Serhiy Storchaka in :issue:`11822`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:898 +msgid "distutils" +msgstr "" + +#: ../../whatsnew/3.7.rst:900 +msgid "" +"``README.rst`` is now included in the list of distutils standard READMEs and " +"therefore included in source distributions. (Contributed by Ryan Gonzalez " +"in :issue:`11913`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:906 ../../whatsnew/3.7.rst:2002 +msgid "enum" +msgstr "" + +#: ../../whatsnew/3.7.rst:908 +msgid "" +"The :class:`Enum ` learned the new ``_ignore_`` class property, " +"which allows listing the names of properties which should not become enum " +"members. (Contributed by Ethan Furman in :issue:`31801`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:913 +msgid "" +"In Python 3.8, attempting to check for non-Enum objects in :class:`~enum." +"Enum` classes will raise a :exc:`TypeError` (e.g. ``1 in Color``); " +"similarly, attempting to check for non-Flag objects in a :class:`~enum.Flag` " +"member will raise :exc:`TypeError` (e.g. ``1 in Perm.RW``); currently, both " +"operations return :const:`False` instead and are deprecated. (Contributed by " +"Ethan Furman in :issue:`33217`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:922 +msgid "functools" +msgstr "" + +#: ../../whatsnew/3.7.rst:924 +msgid "" +":deco:`functools.singledispatch` now supports registering implementations " +"using type annotations. (Contributed by Łukasz Langa in :issue:`32227`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:930 +msgid "gc" +msgstr "" + +#: ../../whatsnew/3.7.rst:932 +msgid "" +"The new :func:`gc.freeze` function allows freezing all objects tracked by " +"the garbage collector and excluding them from future collections. This can " +"be used before a POSIX ``fork()`` call to make the GC copy-on-write friendly " +"or to speed up collection. The new :func:`gc.unfreeze` functions reverses " +"this operation. Additionally, :func:`gc.get_freeze_count` can be used to " +"obtain the number of frozen objects. (Contributed by Li Zekun in :issue:" +"`31558`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:942 +msgid "hmac" +msgstr "" + +#: ../../whatsnew/3.7.rst:944 +msgid "" +"The :mod:`hmac` module now has an optimized one-shot :func:`~hmac.digest` " +"function, which is up to three times faster than :func:`~hmac.HMAC`. " +"(Contributed by Christian Heimes in :issue:`32433`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:950 +msgid "http.client" +msgstr "" + +#: ../../whatsnew/3.7.rst:952 +msgid "" +":class:`~http.client.HTTPConnection` and :class:`~http.client." +"HTTPSConnection` now support the new *blocksize* argument for improved " +"upload throughput. (Contributed by Nir Soffer in :issue:`31945`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:958 +msgid "http.server" +msgstr "" + +#: ../../whatsnew/3.7.rst:960 +msgid "" +":class:`~http.server.SimpleHTTPRequestHandler` now supports the HTTP ``If-" +"Modified-Since`` header. The server returns the 304 response status if the " +"target file was not modified after the time specified in the header. " +"(Contributed by Pierre Quentel in :issue:`29654`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:965 +msgid "" +":class:`~http.server.SimpleHTTPRequestHandler` accepts the new *directory* " +"argument, in addition to the new ``--directory`` command line argument. With " +"this parameter, the server serves the specified directory, by default it " +"uses the current working directory. (Contributed by Stéphane Wirtel and " +"Julien Palard in :issue:`28707`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:971 +msgid "" +"The new :class:`ThreadingHTTPServer ` class " +"uses threads to handle requests using :class:`~socketserver.ThreadingMixIn`. " +"It is used when ``http.server`` is run with ``-m``. (Contributed by Julien " +"Palard in :issue:`31639`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:978 +msgid "idlelib and IDLE" +msgstr "" + +#: ../../whatsnew/3.7.rst:980 +msgid "" +"Multiple fixes for autocompletion. (Contributed by Louie Lu in :issue:" +"`15786`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:982 +msgid "" +"Module Browser (on the File menu, formerly called Class Browser), now " +"displays nested functions and classes in addition to top-level functions and " +"classes. (Contributed by Guilherme Polo, Cheryl Sabella, and Terry Jan Reedy " +"in :issue:`1612262`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:988 +msgid "" +"The Settings dialog (Options, Configure IDLE) has been partly rewritten to " +"improve both appearance and function. (Contributed by Cheryl Sabella and " +"Terry Jan Reedy in multiple issues.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:992 +msgid "" +"The font sample now includes a selection of non-Latin characters so that " +"users can better see the effect of selecting a particular font. (Contributed " +"by Terry Jan Reedy in :issue:`13802`.) The sample can be edited to include " +"other characters. (Contributed by Serhiy Storchaka in :issue:`31860`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:998 +msgid "" +"The IDLE features formerly implemented as extensions have been reimplemented " +"as normal features. Their settings have been moved from the Extensions tab " +"to other dialog tabs. (Contributed by Charles Wohlganger and Terry Jan Reedy " +"in :issue:`27099`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1003 +msgid "" +"Editor code context option revised. Box displays all context lines up to " +"maxlines. Clicking on a context line jumps the editor to that line. " +"Context colors for custom themes is added to Highlights tab of Settings " +"dialog. (Contributed by Cheryl Sabella and Terry Jan Reedy in :issue:" +"`33642`, :issue:`33768`, and :issue:`33679`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1009 +msgid "" +"On Windows, a new API call tells Windows that tk scales for DPI. On Windows " +"8.1+ or 10, with DPI compatibility properties of the Python binary " +"unchanged, and a monitor resolution greater than 96 DPI, this should make " +"text and lines sharper. It should otherwise have no effect. (Contributed by " +"Terry Jan Reedy in :issue:`33656`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1015 +msgid "New in 3.7.1:" +msgstr "" + +#: ../../whatsnew/3.7.rst:1017 +msgid "" +"Output over N lines (50 by default) is squeezed down to a button. N can be " +"changed in the PyShell section of the General page of the Settings dialog. " +"Fewer, but possibly extra long, lines can be squeezed by right clicking on " +"the output. Squeezed output can be expanded in place by double-clicking the " +"button or into the clipboard or a separate window by right-clicking the " +"button. (Contributed by Tal Einat in :issue:`1529353`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1024 +msgid "The changes above have been backported to 3.6 maintenance releases." +msgstr "" + +#: ../../whatsnew/3.7.rst:1026 +msgid "NEW in 3.7.4:" +msgstr "" + +#: ../../whatsnew/3.7.rst:1028 +msgid "" +"Add \"Run Customized\" to the Run menu to run a module with customized " +"settings. Any command line arguments entered are added to sys.argv. They re-" +"appear in the box for the next customized run. One can also suppress the " +"normal Shell main module restart. (Contributed by Cheryl Sabella, Terry Jan " +"Reedy, and others in :issue:`5680` and :issue:`37627`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1034 +msgid "New in 3.7.5:" +msgstr "" + +#: ../../whatsnew/3.7.rst:1036 +msgid "" +"Add optional line numbers for IDLE editor windows. Windows open without line " +"numbers unless set otherwise in the General tab of the configuration " +"dialog. Line numbers for an existing window are shown and hidden in the " +"Options menu. (Contributed by Tal Einat and Saimadhav Heblikar in :issue:" +"`17535`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1044 ../../whatsnew/3.7.rst:2021 +msgid "importlib" +msgstr "" + +#: ../../whatsnew/3.7.rst:1046 +msgid "" +"The :class:`!importlib.abc.ResourceReader` ABC was introduced to support the " +"loading of resources from packages. See also :ref:" +"`whatsnew37_importlib_resources`. (Contributed by Barry Warsaw, Brett Cannon " +"in :issue:`32248`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1051 +msgid "" +":func:`importlib.reload` now raises :exc:`ModuleNotFoundError` if the module " +"lacks a spec. (Contributed by Garvit Khatri in :issue:`29851`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1055 +msgid "" +":func:`importlib.util.find_spec` now raises :exc:`ModuleNotFoundError` " +"instead of :exc:`AttributeError` if the specified parent module is not a " +"package (i.e. lacks a ``__path__`` attribute). (Contributed by Milan " +"Oberkirch in :issue:`30436`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1060 +msgid "" +"The new :func:`importlib.util.source_hash` can be used to compute the hash " +"of the passed source. A :ref:`hash-based .pyc file ` " +"embeds the value returned by this function." +msgstr "" + +#: ../../whatsnew/3.7.rst:1066 +msgid "io" +msgstr "" + +#: ../../whatsnew/3.7.rst:1068 +msgid "" +"The new :meth:`TextIOWrapper.reconfigure() ` " +"method can be used to reconfigure the text stream with the new settings. " +"(Contributed by Antoine Pitrou in :issue:`30526` and INADA Naoki in :issue:" +"`15216`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1075 +msgid "ipaddress" +msgstr "" + +#: ../../whatsnew/3.7.rst:1077 +msgid "" +"The new ``subnet_of()`` and ``supernet_of()`` methods of :class:`ipaddress." +"IPv6Network` and :class:`ipaddress.IPv4Network` can be used for network " +"containment tests. (Contributed by Michel Albert and Cheryl Sabella in :" +"issue:`20825`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1084 +msgid "itertools" +msgstr "itertools" + +#: ../../whatsnew/3.7.rst:1086 +msgid "" +":func:`itertools.islice` now accepts :meth:`integer-like objects ` as start, stop, and slice arguments. (Contributed by Will " +"Roberts in :issue:`30537`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1093 ../../whatsnew/3.7.rst:2039 +msgid "locale" +msgstr "" + +#: ../../whatsnew/3.7.rst:1095 +msgid "" +"The new *monetary* argument to :func:`locale.format_string` can be used to " +"make the conversion use monetary thousands separators and grouping strings. " +"(Contributed by Garvit in :issue:`10379`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1099 +msgid "" +"The :func:`locale.getpreferredencoding` function now always returns " +"``'UTF-8'`` on Android or when in the :ref:`forced UTF-8 mode `." +msgstr "" + +#: ../../whatsnew/3.7.rst:1104 +msgid "logging" +msgstr "" + +#: ../../whatsnew/3.7.rst:1106 +msgid "" +":class:`~logging.Logger` instances can now be pickled. (Contributed by Vinay " +"Sajip in :issue:`30520`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1109 +msgid "" +"The new :meth:`StreamHandler.setStream() ` " +"method can be used to replace the logger stream after handler creation. " +"(Contributed by Vinay Sajip in :issue:`30522`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1113 +msgid "" +"It is now possible to specify keyword arguments to handler constructors in " +"configuration passed to :func:`logging.config.fileConfig`. (Contributed by " +"Preston Landers in :issue:`31080`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1119 +msgid "math" +msgstr "math" + +#: ../../whatsnew/3.7.rst:1121 +msgid "" +"The new :func:`math.remainder` function implements the IEEE 754-style " +"remainder operation. (Contributed by Mark Dickinson in :issue:`29962`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1126 +msgid "mimetypes" +msgstr "" + +#: ../../whatsnew/3.7.rst:1128 +msgid "" +"The MIME type of .bmp has been changed from ``'image/x-ms-bmp'`` to ``'image/" +"bmp'``. (Contributed by Nitish Chandra in :issue:`22589`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1134 +msgid "msilib" +msgstr "" + +#: ../../whatsnew/3.7.rst:1136 +msgid "" +"The new :meth:`!Database.Close` method can be used to close the :abbr:`MSI` " +"database. (Contributed by Berker Peksag in :issue:`20486`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1142 +msgid "multiprocessing" +msgstr "" + +#: ../../whatsnew/3.7.rst:1144 +msgid "" +"The new :meth:`Process.close() ` method " +"explicitly closes the process object and releases all resources associated " +"with it. :exc:`ValueError` is raised if the underlying process is still " +"running. (Contributed by Antoine Pitrou in :issue:`30596`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1150 +msgid "" +"The new :meth:`Process.kill() ` method can be " +"used to terminate the process using the :data:`~signal.SIGKILL` signal on " +"Unix. (Contributed by Vitor Pereira in :issue:`30794`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1154 +msgid "" +"Non-daemonic threads created by :class:`~multiprocessing.Process` are now " +"joined on process exit. (Contributed by Antoine Pitrou in :issue:`18966`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1160 +msgid "os" +msgstr "os" + +#: ../../whatsnew/3.7.rst:1162 +msgid "" +":func:`os.fwalk` now accepts the *path* argument as :class:`bytes`. " +"(Contributed by Serhiy Storchaka in :issue:`28682`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1165 +msgid "" +":func:`os.scandir` gained support for :ref:`file descriptors `. " +"(Contributed by Serhiy Storchaka in :issue:`25996`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1168 +msgid "" +"The new :func:`~os.register_at_fork` function allows registering Python " +"callbacks to be executed at process fork. (Contributed by Antoine Pitrou in :" +"issue:`16500`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1172 +msgid "" +"Added :func:`os.preadv` (combine the functionality of :func:`os.readv` and :" +"func:`os.pread`) and :func:`os.pwritev` functions (combine the functionality " +"of :func:`os.writev` and :func:`os.pwrite`). (Contributed by Pablo Galindo " +"in :issue:`31368`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1177 +msgid "" +"The mode argument of :func:`os.makedirs` no longer affects the file " +"permission bits of newly created intermediate-level directories. " +"(Contributed by Serhiy Storchaka in :issue:`19930`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1181 +msgid "" +":func:`os.dup2` now returns the new file descriptor. Previously, ``None`` " +"was always returned. (Contributed by Benjamin Peterson in :issue:`32441`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1185 +msgid "" +"The structure returned by :func:`os.stat` now contains the :attr:`~os." +"stat_result.st_fstype` attribute on Solaris and its derivatives. " +"(Contributed by Jesús Cea Avión in :issue:`32659`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1191 +msgid "pathlib" +msgstr "pathlib" + +#: ../../whatsnew/3.7.rst:1193 +msgid "" +"The new :meth:`Path.is_mount() ` method is now " +"available on POSIX systems and can be used to determine whether a path is a " +"mount point. (Contributed by Cooper Ry Lees in :issue:`30897`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1199 +msgid "pdb" +msgstr "pdb" + +#: ../../whatsnew/3.7.rst:1201 +msgid "" +":func:`pdb.set_trace` now takes an optional *header* keyword-only argument. " +"If given, it is printed to the console just before debugging begins. " +"(Contributed by Barry Warsaw in :issue:`31389`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1205 +msgid "" +":mod:`pdb` command line now accepts ``-m module_name`` as an alternative to " +"script file. (Contributed by Mario Corchero in :issue:`32206`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1210 +msgid "py_compile" +msgstr "" + +#: ../../whatsnew/3.7.rst:1212 +msgid "" +":func:`py_compile.compile` -- and by extension, :mod:`compileall` -- now " +"respects the :envvar:`SOURCE_DATE_EPOCH` environment variable by " +"unconditionally creating ``.pyc`` files for hash-based validation. This " +"allows for guaranteeing `reproducible builds `_ of ``.pyc`` files when they are created eagerly. (Contributed by " +"Bernhard M. Wiedemann in :issue:`29708`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1222 +msgid "pydoc" +msgstr "" + +#: ../../whatsnew/3.7.rst:1224 +msgid "" +"The pydoc server can now bind to an arbitrary hostname specified by the new " +"``-n`` command-line argument. (Contributed by Feanil Patel in :issue:" +"`31128`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1230 +msgid "queue" +msgstr "" + +#: ../../whatsnew/3.7.rst:1232 +msgid "" +"The new :class:`~queue.SimpleQueue` class is an unbounded :abbr:`FIFO` " +"queue. (Contributed by Antoine Pitrou in :issue:`14976`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1237 +msgid "re" +msgstr "" + +#: ../../whatsnew/3.7.rst:1239 +msgid "" +"The flags :const:`re.ASCII`, :const:`re.LOCALE` and :const:`re.UNICODE` can " +"be set within the scope of a group. (Contributed by Serhiy Storchaka in :" +"issue:`31690`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1243 +msgid "" +":func:`re.split` now supports splitting on a pattern like ``r'\\b'``, " +"``'^$'`` or ``(?=-)`` that matches an empty string. (Contributed by Serhiy " +"Storchaka in :issue:`25054`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1247 +msgid "" +"Regular expressions compiled with the :const:`re.LOCALE` flag no longer " +"depend on the locale at compile time. Locale settings are applied only when " +"the compiled regular expression is used. (Contributed by Serhiy Storchaka " +"in :issue:`30215`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1252 +msgid "" +":exc:`FutureWarning` is now emitted if a regular expression contains " +"character set constructs that will change semantically in the future, such " +"as nested sets and set operations. (Contributed by Serhiy Storchaka in :" +"issue:`30349`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1257 +msgid "" +"Compiled regular expression and match objects can now be copied using :func:" +"`copy.copy` and :func:`copy.deepcopy`. (Contributed by Serhiy Storchaka in :" +"issue:`10076`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1263 +msgid "signal" +msgstr "" + +#: ../../whatsnew/3.7.rst:1265 +msgid "" +"The new *warn_on_full_buffer* argument to the :func:`signal.set_wakeup_fd` " +"function makes it possible to specify whether Python prints a warning on " +"stderr when the wakeup buffer overflows. (Contributed by Nathaniel J. Smith " +"in :issue:`30050`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1272 ../../whatsnew/3.7.rst:2062 +msgid "socket" +msgstr "" + +#: ../../whatsnew/3.7.rst:1274 +msgid "" +"The new :func:`socket.getblocking() ` method " +"returns ``True`` if the socket is in blocking mode and ``False`` otherwise. " +"(Contributed by Yury Selivanov in :issue:`32373`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1278 +msgid "" +"The new :func:`socket.close` function closes the passed socket file " +"descriptor. This function should be used instead of :func:`os.close` for " +"better compatibility across platforms. (Contributed by Christian Heimes in :" +"issue:`32454`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1283 +msgid "" +"The :mod:`socket` module now exposes the :ref:`socket.TCP_CONGESTION ` (Linux 2.6.13), :ref:`socket.TCP_USER_TIMEOUT ` (Linux 2.6.37), and :ref:`socket.TCP_NOTSENT_LOWAT ` (Linux 3.12) constants. (Contributed by Omar Sandoval in :issue:" +"`26273` and Nathaniel J. Smith in :issue:`29728`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1290 +msgid "" +"Support for :const:`socket.AF_VSOCK` sockets has been added to allow " +"communication between virtual machines and their hosts. (Contributed by " +"Cathy Avery in :issue:`27584`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1294 +msgid "" +"Sockets now auto-detect family, type and protocol from file descriptor by " +"default. (Contributed by Christian Heimes in :issue:`28134`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1300 +msgid "socketserver" +msgstr "" + +#: ../../whatsnew/3.7.rst:1302 +msgid "" +":meth:`socketserver.ThreadingMixIn.server_close ` now waits until all non-daemon threads complete. :meth:" +"`socketserver.ForkingMixIn.server_close ` now waits until all child processes complete." +msgstr "" + +#: ../../whatsnew/3.7.rst:1308 +msgid "" +"Add a new :attr:`socketserver.ForkingMixIn.block_on_close ` class attribute to :class:`socketserver." +"ForkingMixIn` and :class:`socketserver.ThreadingMixIn` classes. Set the " +"class attribute to ``False`` to get the pre-3.7 behaviour." +msgstr "" + +#: ../../whatsnew/3.7.rst:1315 +msgid "sqlite3" +msgstr "sqlite3" + +#: ../../whatsnew/3.7.rst:1317 +msgid "" +":class:`sqlite3.Connection` now exposes the :meth:`~sqlite3.Connection." +"backup` method when the underlying SQLite library is at version 3.6.11 or " +"higher. (Contributed by Lele Gaifax in :issue:`27645`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1321 +msgid "" +"The *database* argument of :func:`sqlite3.connect` now accepts any :term:" +"`path-like object`, instead of just a string. (Contributed by Anders " +"Lorentsen in :issue:`31843`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1327 ../../whatsnew/3.7.rst:2071 +msgid "ssl" +msgstr "" + +#: ../../whatsnew/3.7.rst:1329 +msgid "" +"The :mod:`ssl` module now uses OpenSSL's builtin API instead of :func:`!" +"match_hostname` to check a host name or an IP address. Values are validated " +"during TLS handshake. Any certificate validation error including failing " +"the host name check now raises :exc:`~ssl.SSLCertVerificationError` and " +"aborts the handshake with a proper TLS Alert message. The new exception " +"contains additional information. Host name validation can be customized " +"with :attr:`SSLContext.hostname_checks_common_name `. (Contributed by Christian Heimes in :issue:" +"`31399`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1340 +msgid "" +"The improved host name check requires a *libssl* implementation compatible " +"with OpenSSL 1.0.2 or 1.1. Consequently, OpenSSL 0.9.8 and 1.0.1 are no " +"longer supported (see :ref:`37-platform-support-removals` for more details). " +"The ssl module is mostly compatible with LibreSSL 2.7.2 and newer." +msgstr "" + +#: ../../whatsnew/3.7.rst:1345 +msgid "" +"The ``ssl`` module no longer sends IP addresses in SNI TLS extension. " +"(Contributed by Christian Heimes in :issue:`32185`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1348 +msgid "" +":func:`!match_hostname` no longer supports partial wildcards like ``www*." +"example.org``. (Contributed by Mandeep Singh in :issue:`23033` and Christian " +"Heimes in :issue:`31399`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1353 +msgid "" +"The default cipher suite selection of the ``ssl`` module now uses a " +"blacklist approach rather than a hard-coded whitelist. Python no longer re-" +"enables ciphers that have been blocked by OpenSSL security updates. Default " +"cipher suite selection can be configured at compile time. (Contributed by " +"Christian Heimes in :issue:`31429`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1359 +msgid "" +"Validation of server certificates containing internationalized domain names " +"(IDNs) is now supported. As part of this change, the :attr:`SSLSocket." +"server_hostname ` attribute now stores the " +"expected hostname in A-label form (``\"xn--pythn-mua.org\"``), rather than " +"the U-label form (``\"pythön.org\"``). (Contributed by Nathaniel J. Smith " +"and Christian Heimes in :issue:`28414`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1366 +msgid "" +"The ``ssl`` module has preliminary and experimental support for TLS 1.3 and " +"OpenSSL 1.1.1. At the time of Python 3.7.0 release, OpenSSL 1.1.1 is still " +"under development and TLS 1.3 hasn't been finalized yet. The TLS 1.3 " +"handshake and protocol behaves slightly differently than TLS 1.2 and " +"earlier, see :ref:`ssl-tlsv1_3`. (Contributed by Christian Heimes in :issue:" +"`32947`, :issue:`20995`, :issue:`29136`, :issue:`30622` and :issue:`33618`)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1374 +msgid "" +":class:`~ssl.SSLSocket` and :class:`~ssl.SSLObject` no longer have a public " +"constructor. Direct instantiation was never a documented and supported " +"feature. Instances must be created with :class:`~ssl.SSLContext` methods :" +"meth:`~ssl.SSLContext.wrap_socket` and :meth:`~ssl.SSLContext.wrap_bio`. " +"(Contributed by Christian Heimes in :issue:`32951`)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1380 +msgid "" +"OpenSSL 1.1 APIs for setting the minimum and maximum TLS protocol version " +"are available as :attr:`SSLContext.minimum_version ` and :attr:`SSLContext.maximum_version `. Supported protocols are indicated by several new flags, " +"such as :data:`~ssl.HAS_TLSv1_1`. (Contributed by Christian Heimes in :issue:" +"`32609`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1387 +msgid "" +"Added :attr:`ssl.SSLContext.post_handshake_auth` to enable and :meth:`ssl." +"SSLSocket.verify_client_post_handshake` to initiate TLS 1.3 post-handshake " +"authentication. (Contributed by Christian Heimes in :gh:`78851`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1393 +msgid "string" +msgstr "" + +#: ../../whatsnew/3.7.rst:1395 +msgid "" +":class:`string.Template` now lets you to optionally modify the regular " +"expression pattern for braced placeholders and non-braced placeholders " +"separately. (Contributed by Barry Warsaw in :issue:`1198569`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1401 +msgid "subprocess" +msgstr "" + +#: ../../whatsnew/3.7.rst:1403 +msgid "" +"The :func:`subprocess.run` function accepts the new *capture_output* keyword " +"argument. When true, stdout and stderr will be captured. This is equivalent " +"to passing :const:`subprocess.PIPE` as *stdout* and *stderr* arguments. " +"(Contributed by Bo Bayles in :issue:`32102`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1409 +msgid "" +"The ``subprocess.run`` function and the :class:`subprocess.Popen` " +"constructor now accept the *text* keyword argument as an alias to " +"*universal_newlines*. (Contributed by Andrew Clegg in :issue:`31756`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1414 +msgid "" +"On Windows the default for *close_fds* was changed from ``False`` to " +"``True`` when redirecting the standard handles. It's now possible to set " +"*close_fds* to true when redirecting the standard handles. See :class:" +"`subprocess.Popen`. This means that *close_fds* now defaults to ``True`` on " +"all supported platforms. (Contributed by Segev Finer in :issue:`19764`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1421 +msgid "" +"The subprocess module is now more graceful when handling :exc:" +"`KeyboardInterrupt` during :func:`subprocess.call`, :func:`subprocess.run`, " +"or in a :class:`~subprocess.Popen` context manager. It now waits a short " +"amount of time for the child to exit, before continuing the handling of the " +"``KeyboardInterrupt`` exception. (Contributed by Gregory P. Smith in :issue:" +"`25942`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1431 ../../whatsnew/3.7.rst:2087 +msgid "sys" +msgstr "sys" + +#: ../../whatsnew/3.7.rst:1433 +msgid "" +"The new :func:`sys.breakpointhook` hook function is called by the built-in :" +"func:`breakpoint`. (Contributed by Barry Warsaw in :issue:`31353`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1437 +msgid "" +"On Android, the new :func:`sys.getandroidapilevel` returns the build-time " +"Android API version. (Contributed by Victor Stinner in :issue:`28740`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1441 +msgid "" +"The new :func:`sys.get_coroutine_origin_tracking_depth` function returns the " +"current coroutine origin tracking depth, as set by the new :func:`sys." +"set_coroutine_origin_tracking_depth`. :mod:`asyncio` has been converted to " +"use this new API instead of the deprecated :func:`!sys." +"set_coroutine_wrapper`. (Contributed by Nathaniel J. Smith in :issue:" +"`32591`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1450 +msgid "time" +msgstr "" + +#: ../../whatsnew/3.7.rst:1452 +msgid "" +":pep:`564` adds six new functions with nanosecond resolution to the :mod:" +"`time` module:" +msgstr "" + +#: ../../whatsnew/3.7.rst:1462 +msgid "New clock identifiers have been added:" +msgstr "" + +#: ../../whatsnew/3.7.rst:1464 +msgid "" +":const:`time.CLOCK_BOOTTIME` (Linux): Identical to :const:`time." +"CLOCK_MONOTONIC`, except it also includes any time that the system is " +"suspended." +msgstr "" + +#: ../../whatsnew/3.7.rst:1467 +msgid "" +":const:`time.CLOCK_PROF` (FreeBSD, NetBSD and OpenBSD): High-resolution per-" +"process CPU timer." +msgstr "" + +#: ../../whatsnew/3.7.rst:1469 +msgid "" +":const:`time.CLOCK_UPTIME` (FreeBSD, OpenBSD): Time whose absolute value is " +"the time the system has been running and not suspended, providing accurate " +"uptime measurement." +msgstr "" + +#: ../../whatsnew/3.7.rst:1473 +msgid "" +"The new :func:`time.thread_time` and :func:`time.thread_time_ns` functions " +"can be used to get per-thread CPU time measurements. (Contributed by Antoine " +"Pitrou in :issue:`32025`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1477 +msgid "" +"The new :func:`time.pthread_getcpuclockid` function returns the clock ID of " +"the thread-specific CPU-time clock." +msgstr "" + +#: ../../whatsnew/3.7.rst:1482 +msgid "tkinter" +msgstr "tkinter" + +#: ../../whatsnew/3.7.rst:1484 +msgid "" +"The new :class:`tkinter.ttk.Spinbox` class is now available. (Contributed by " +"Alan Moore in :issue:`32585`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1489 +msgid "tracemalloc" +msgstr "" + +#: ../../whatsnew/3.7.rst:1491 +msgid "" +":class:`tracemalloc.Traceback` behaves more like regular tracebacks, sorting " +"the frames from oldest to most recent. :meth:`Traceback.format() " +"` now accepts negative *limit*, truncating the " +"result to the ``abs(limit)`` oldest frames. To get the old behaviour, use " +"the new *most_recent_first* argument to ``Traceback.format()``. (Contributed " +"by Jesse Bakker in :issue:`32121`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1501 +msgid "types" +msgstr "types" + +#: ../../whatsnew/3.7.rst:1503 +msgid "" +"The new :class:`~types.WrapperDescriptorType`, :class:`~types." +"MethodWrapperType`, :class:`~types.MethodDescriptorType`, and :class:`~types." +"ClassMethodDescriptorType` classes are now available. (Contributed by Manuel " +"Krebber and Guido van Rossum in :issue:`29377`, and Serhiy Storchaka in :" +"issue:`32265`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1509 +msgid "" +"The new :func:`types.resolve_bases` function resolves MRO entries " +"dynamically as specified by :pep:`560`. (Contributed by Ivan Levkivskyi in :" +"issue:`32717`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1515 +msgid "unicodedata" +msgstr "unicodedata" + +#: ../../whatsnew/3.7.rst:1517 +msgid "" +"The internal :mod:`unicodedata` database has been upgraded to use `Unicode " +"11 `_. (Contributed by " +"Benjamin Peterson.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1523 +msgid "unittest" +msgstr "unittest" + +#: ../../whatsnew/3.7.rst:1525 +msgid "" +"The new ``-k`` command-line option allows filtering tests by a name " +"substring or a Unix shell-like pattern. For example, ``python -m unittest -k " +"foo`` runs ``foo_tests.SomeTest.test_something``, ``bar_tests.SomeTest." +"test_foo``, but not ``bar_tests.FooTest.test_something``. (Contributed by " +"Jonas Haag in :issue:`32071`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1534 +msgid "unittest.mock" +msgstr "" + +#: ../../whatsnew/3.7.rst:1536 +msgid "" +"The :const:`~unittest.mock.sentinel` attributes now preserve their identity " +"when they are :mod:`copied ` or :mod:`pickled `. (Contributed " +"by Serhiy Storchaka in :issue:`20804`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1540 +msgid "" +"The new :func:`~unittest.mock.seal` function allows sealing :class:" +"`~unittest.mock.Mock` instances, which will disallow further creation of " +"attribute mocks. The seal is applied recursively to all attributes that are " +"themselves mocks. (Contributed by Mario Corchero in :issue:`30541`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1548 +msgid "urllib.parse" +msgstr "" + +#: ../../whatsnew/3.7.rst:1550 +msgid "" +":func:`urllib.parse.quote` has been updated from :rfc:`2396` to :rfc:`3986`, " +"adding ``~`` to the set of characters that are never quoted by default. " +"(Contributed by Christian Theune and Ratnadeep Debnath in :issue:`16285`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1556 +msgid "uu" +msgstr "" + +#: ../../whatsnew/3.7.rst:1558 +msgid "" +"The :func:`!uu.encode` function now accepts an optional *backtick* keyword " +"argument. When it's true, zeros are represented by ``'`'`` instead of " +"spaces. (Contributed by Xiang Zhang in :issue:`30103`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1564 +msgid "uuid" +msgstr "uuid" + +#: ../../whatsnew/3.7.rst:1566 +msgid "" +"The new :attr:`UUID.is_safe ` attribute relays " +"information from the platform about whether generated UUIDs are generated " +"with a multiprocessing-safe method. (Contributed by Barry Warsaw in :issue:" +"`22807`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1571 +msgid "" +":func:`uuid.getnode` now prefers universally administered MAC addresses over " +"locally administered MAC addresses. This makes a better guarantee for global " +"uniqueness of UUIDs returned from :func:`uuid.uuid1`. If only locally " +"administered MAC addresses are available, the first such one found is " +"returned. (Contributed by Barry Warsaw in :issue:`32107`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1580 +msgid "warnings" +msgstr "" + +#: ../../whatsnew/3.7.rst:1582 +msgid "" +"The initialization of the default warnings filters has changed as follows:" +msgstr "" + +#: ../../whatsnew/3.7.rst:1584 +msgid "" +"warnings enabled via command line options (including those for :option:`-b` " +"and the new CPython-specific :option:`-X` ``dev`` option) are always passed " +"to the warnings machinery via the :data:`sys.warnoptions` attribute." +msgstr "" + +#: ../../whatsnew/3.7.rst:1588 +msgid "" +"warnings filters enabled via the command line or the environment now have " +"the following order of precedence:" +msgstr "" + +#: ../../whatsnew/3.7.rst:1591 +msgid "the ``BytesWarning`` filter for :option:`-b` (or ``-bb``)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1592 +msgid "any filters specified with the :option:`-W` option" +msgstr "" + +#: ../../whatsnew/3.7.rst:1593 +msgid "" +"any filters specified with the :envvar:`PYTHONWARNINGS` environment variable" +msgstr "" + +#: ../../whatsnew/3.7.rst:1595 +msgid "" +"any other CPython specific filters (e.g. the ``default`` filter added for " +"the new ``-X dev`` mode)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1597 +msgid "any implicit filters defined directly by the warnings machinery" +msgstr "" + +#: ../../whatsnew/3.7.rst:1599 +msgid "" +"in :ref:`CPython debug builds `, all warnings are now displayed " +"by default (the implicit filter list is empty)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1602 +msgid "" +"(Contributed by Nick Coghlan and Victor Stinner in :issue:`20361`, :issue:" +"`32043`, and :issue:`32230`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1605 +msgid "" +"Deprecation warnings are once again shown by default in single-file scripts " +"and at the interactive prompt. See :ref:`whatsnew37-pep565` for details. " +"(Contributed by Nick Coghlan in :issue:`31975`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1611 +msgid "xml" +msgstr "" + +#: ../../whatsnew/3.7.rst:1613 +msgid "" +"As mitigation against DTD and external entity retrieval, the :mod:`xml.dom." +"minidom` and :mod:`xml.sax` modules no longer process external entities by " +"default. (Contributed by Christian Heimes in :gh:`61441`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1620 +msgid "xml.etree" +msgstr "" + +#: ../../whatsnew/3.7.rst:1622 +msgid "" +":ref:`ElementPath ` predicates in the :meth:`!find` " +"methods can now compare text of the current node with ``[. = \"text\"]``, " +"not only text in children. Predicates also allow adding spaces for better " +"readability. (Contributed by Stefan Behnel in :issue:`31648`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1629 +msgid "xmlrpc.server" +msgstr "" + +#: ../../whatsnew/3.7.rst:1631 +msgid "" +":meth:`!SimpleXMLRPCDispatcher.register_function` can now be used as a " +"decorator. (Contributed by Xiang Zhang in :issue:`7769`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1637 +msgid "zipapp" +msgstr "" + +#: ../../whatsnew/3.7.rst:1639 +msgid "" +"Function :func:`~zipapp.create_archive` now accepts an optional *filter* " +"argument to allow the user to select which files should be included in the " +"archive. (Contributed by Irmen de Jong in :issue:`31072`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1643 +msgid "" +"Function :func:`~zipapp.create_archive` now accepts an optional *compressed* " +"argument to generate a compressed archive. A command line option ``--" +"compress`` has also been added to support compression. (Contributed by " +"Zhiming Wang in :issue:`31638`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1650 +msgid "zipfile" +msgstr "" + +#: ../../whatsnew/3.7.rst:1652 +msgid "" +":class:`~zipfile.ZipFile` now accepts the new *compresslevel* parameter to " +"control the compression level. (Contributed by Bo Bayles in :issue:`21417`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1656 +msgid "" +"Subdirectories in archives created by ``ZipFile`` are now stored in " +"alphabetical order. (Contributed by Bernhard M. Wiedemann in :issue:`30693`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1662 +msgid "C API Changes" +msgstr "C API Änderungen" + +#: ../../whatsnew/3.7.rst:1664 +msgid "" +"A new API for thread-local storage has been implemented. See :ref:" +"`whatsnew37-pep539` for an overview and :ref:`thread-specific-storage-api` " +"for a complete reference. (Contributed by Masayuki Yamamoto in :issue:" +"`25658`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1669 +msgid "" +"The new :ref:`context variables ` functionality exposes a " +"number of :ref:`new C APIs `." +msgstr "" + +#: ../../whatsnew/3.7.rst:1672 +msgid "" +"The new :c:func:`PyImport_GetModule` function returns the previously " +"imported module with the given name. (Contributed by Eric Snow in :issue:" +"`28411`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1676 +msgid "" +"The new :c:macro:`Py_RETURN_RICHCOMPARE` macro eases writing rich comparison " +"functions. (Contributed by Petr Victorin in :issue:`23699`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1680 +msgid "" +"The new :c:macro:`Py_UNREACHABLE` macro can be used to mark unreachable code " +"paths. (Contributed by Barry Warsaw in :issue:`31338`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1684 +msgid "" +"The :mod:`tracemalloc` now exposes a C API through the new :c:func:" +"`PyTraceMalloc_Track` and :c:func:`PyTraceMalloc_Untrack` functions. " +"(Contributed by Victor Stinner in :issue:`30054`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1689 +msgid "" +"The new :ref:`import__find__load__start ` and :ref:" +"`import__find__load__done ` static markers can be used to " +"trace module imports. (Contributed by Christian Heimes in :issue:`31574`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1694 +msgid "" +"The fields :c:member:`!name` and :c:member:`!doc` of structures :c:type:" +"`PyMemberDef`, :c:type:`PyGetSetDef`, :c:type:`PyStructSequence_Field`, :c:" +"type:`PyStructSequence_Desc`, and :c:struct:`!wrapperbase` are now of type " +"``const char *`` rather of ``char *``. (Contributed by Serhiy Storchaka in :" +"issue:`28761`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1700 +msgid "" +"The result of :c:func:`PyUnicode_AsUTF8AndSize` and :c:func:" +"`PyUnicode_AsUTF8` is now of type ``const char *`` rather of ``char *``. " +"(Contributed by Serhiy Storchaka in :issue:`28769`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1704 +msgid "" +"The result of :c:func:`PyMapping_Keys`, :c:func:`PyMapping_Values` and :c:" +"func:`PyMapping_Items` is now always a list, rather than a list or a tuple. " +"(Contributed by Oren Milman in :issue:`28280`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1708 +msgid "" +"Added functions :c:func:`PySlice_Unpack` and :c:func:" +"`PySlice_AdjustIndices`. (Contributed by Serhiy Storchaka in :issue:`27867`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1711 +msgid "" +":c:func:`PyOS_AfterFork` is deprecated in favour of the new functions :c:" +"func:`PyOS_BeforeFork`, :c:func:`PyOS_AfterFork_Parent` and :c:func:" +"`PyOS_AfterFork_Child`. (Contributed by Antoine Pitrou in :issue:`16500`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1716 +msgid "" +"The ``PyExc_RecursionErrorInst`` singleton that was part of the public API " +"has been removed as its members being never cleared may cause a segfault " +"during finalization of the interpreter. Contributed by Xavier de Gaye in :" +"issue:`22898` and :issue:`30697`." +msgstr "" + +#: ../../whatsnew/3.7.rst:1721 +msgid "" +"Added C API support for timezones with timezone constructors :c:func:" +"`PyTimeZone_FromOffset` and :c:func:`PyTimeZone_FromOffsetAndName`, and " +"access to the UTC singleton with :c:data:`PyDateTime_TimeZone_UTC`. " +"Contributed by Paul Ganssle in :issue:`10381`." +msgstr "" + +#: ../../whatsnew/3.7.rst:1726 +msgid "" +"The type of results of :c:func:`!PyThread_start_new_thread` and :c:func:`!" +"PyThread_get_thread_ident`, and the *id* parameter of :c:func:" +"`PyThreadState_SetAsyncExc` changed from :c:expr:`long` to :c:expr:`unsigned " +"long`. (Contributed by Serhiy Storchaka in :issue:`6532`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1732 +msgid "" +":c:func:`PyUnicode_AsWideCharString` now raises a :exc:`ValueError` if the " +"second argument is ``NULL`` and the :c:expr:`wchar_t*` string contains null " +"characters. (Contributed by Serhiy Storchaka in :issue:`30708`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1736 +msgid "" +"Changes to the startup sequence and the management of dynamic memory " +"allocators mean that the long documented requirement to call :c:func:" +"`Py_Initialize` before calling most C API functions is now relied on more " +"heavily, and failing to abide by it may lead to segfaults in embedding " +"applications. See the :ref:`porting-to-python-37` section in this document " +"and the :ref:`pre-init-safe` section in the C API documentation for more " +"details." +msgstr "" + +#: ../../whatsnew/3.7.rst:1744 +msgid "" +"The new :c:func:`PyInterpreterState_GetID` returns the unique ID for a given " +"interpreter. (Contributed by Eric Snow in :issue:`29102`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1748 +msgid "" +":c:func:`Py_DecodeLocale`, :c:func:`Py_EncodeLocale` now use the UTF-8 " +"encoding when the :ref:`UTF-8 mode ` is enabled. " +"(Contributed by Victor Stinner in :issue:`29240`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1752 +msgid "" +":c:func:`PyUnicode_DecodeLocaleAndSize` and :c:func:`PyUnicode_EncodeLocale` " +"now use the current locale encoding for ``surrogateescape`` error handler. " +"(Contributed by Victor Stinner in :issue:`29240`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1756 +msgid "" +"The *start* and *end* parameters of :c:func:`PyUnicode_FindChar` are now " +"adjusted to behave like string slices. (Contributed by Xiang Zhang in :issue:" +"`28822`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1762 +msgid "Build Changes" +msgstr "Build Änderungen" + +#: ../../whatsnew/3.7.rst:1764 +msgid "" +"Support for building ``--without-threads`` has been removed. The :mod:" +"`threading` module is now always available. (Contributed by Antoine Pitrou " +"in :issue:`31370`.)." +msgstr "" + +#: ../../whatsnew/3.7.rst:1768 +msgid "" +"A full copy of libffi is no longer bundled for use when building the :mod:" +"`_ctypes ` module on non-OSX UNIX platforms. An installed copy of " +"libffi is now required when building ``_ctypes`` on such platforms. " +"(Contributed by Zachary Ware in :issue:`27979`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1773 +msgid "" +"The Windows build process no longer depends on Subversion to pull in " +"external sources, a Python script is used to download zipfiles from GitHub " +"instead. If Python 3.6 is not found on the system (via ``py -3.6``), NuGet " +"is used to download a copy of 32-bit Python for this purpose. (Contributed " +"by Zachary Ware in :issue:`30450`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1779 +msgid "" +"The :mod:`ssl` module requires OpenSSL 1.0.2 or 1.1 compatible libssl. " +"OpenSSL 1.0.1 has reached end of lifetime on 2016-12-31 and is no longer " +"supported. LibreSSL is temporarily not supported as well. LibreSSL releases " +"up to version 2.6.4 are missing required OpenSSL 1.0.2 APIs." +msgstr "" + +#: ../../whatsnew/3.7.rst:1788 +msgid "Optimizations" +msgstr "Optimierungen" + +#: ../../whatsnew/3.7.rst:1790 +msgid "" +"The overhead of calling many methods of various standard library classes " +"implemented in C has been significantly reduced by porting more code to use " +"the ``METH_FASTCALL`` convention. (Contributed by Victor Stinner in :issue:" +"`29300`, :issue:`29507`, :issue:`29452`, and :issue:`29286`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1796 +msgid "" +"Various optimizations have reduced Python startup time by 10% on Linux and " +"up to 30% on macOS. (Contributed by Victor Stinner, INADA Naoki in :issue:" +"`29585`, and Ivan Levkivskyi in :issue:`31333`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1801 +msgid "" +"Method calls are now up to 20% faster due to the bytecode changes which " +"avoid creating bound method instances. (Contributed by Yury Selivanov and " +"INADA Naoki in :issue:`26110`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1807 +msgid "" +"The :mod:`asyncio` module received a number of notable optimizations for " +"commonly used functions:" +msgstr "" + +#: ../../whatsnew/3.7.rst:1810 +msgid "" +"The :func:`asyncio.get_event_loop` function has been reimplemented in C to " +"make it up to 15 times faster. (Contributed by Yury Selivanov in :issue:" +"`32296`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1814 +msgid "" +":class:`asyncio.Future` callback management has been optimized. (Contributed " +"by Yury Selivanov in :issue:`32348`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1817 +msgid "" +":func:`asyncio.gather` is now up to 15% faster. (Contributed by Yury " +"Selivanov in :issue:`32355`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1820 +msgid "" +":func:`asyncio.sleep` is now up to 2 times faster when the *delay* argument " +"is zero or negative. (Contributed by Andrew Svetlov in :issue:`32351`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1824 +msgid "" +"The performance overhead of asyncio debug mode has been reduced. " +"(Contributed by Antoine Pitrou in :issue:`31970`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1827 +msgid "" +"As a result of :ref:`PEP 560 work `, the import time of :" +"mod:`typing` has been reduced by a factor of 7, and many typing operations " +"are now faster. (Contributed by Ivan Levkivskyi in :issue:`32226`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1832 +msgid "" +":func:`sorted` and :meth:`list.sort` have been optimized for common cases to " +"be up to 40-75% faster. (Contributed by Elliot Gorokhovsky in :issue:" +"`28685`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1836 +msgid "" +":meth:`dict.copy` is now up to 5.5 times faster. (Contributed by Yury " +"Selivanov in :issue:`31179`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1839 +msgid "" +":func:`hasattr` and :func:`getattr` are now about 4 times faster when *name* " +"is not found and *obj* does not override :meth:`object.__getattr__` or :meth:" +"`object.__getattribute__`. (Contributed by INADA Naoki in :issue:`32544`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1844 +msgid "" +"Searching for certain Unicode characters (like Ukrainian capital \"Є\") in a " +"string was up to 25 times slower than searching for other characters. It is " +"now only 3 times slower in the worst case. (Contributed by Serhiy Storchaka " +"in :issue:`24821`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1849 +msgid "" +"The :func:`collections.namedtuple` factory has been reimplemented to make " +"the creation of named tuples 4 to 6 times faster. (Contributed by Jelle " +"Zijlstra with further improvements by INADA Naoki, Serhiy Storchaka, and " +"Raymond Hettinger in :issue:`28638`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1854 +msgid "" +":meth:`datetime.date.fromordinal` and :meth:`datetime.date.fromtimestamp` " +"are now up to 30% faster in the common case. (Contributed by Paul Ganssle " +"in :issue:`32403`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1858 +msgid "" +"The :func:`os.fwalk` function is now up to 2 times faster thanks to the use " +"of :func:`os.scandir`. (Contributed by Serhiy Storchaka in :issue:`25996`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1862 +msgid "" +"The speed of the :func:`shutil.rmtree` function has been improved by 20--40% " +"thanks to the use of the :func:`os.scandir` function. (Contributed by Serhiy " +"Storchaka in :issue:`28564`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1866 +msgid "" +"Optimized case-insensitive matching and searching of :mod:`regular " +"expressions `. Searching some patterns can now be up to 20 times " +"faster. (Contributed by Serhiy Storchaka in :issue:`30285`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1870 +msgid "" +":func:`re.compile` now converts ``flags`` parameter to int object if it is " +"``RegexFlag``. It is now as fast as Python 3.5, and faster than Python 3.6 " +"by about 10% depending on the pattern. (Contributed by INADA Naoki in :issue:" +"`31671`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1875 +msgid "" +"The :meth:`~selectors.BaseSelector.modify` methods of classes :class:" +"`selectors.EpollSelector`, :class:`selectors.PollSelector` and :class:" +"`selectors.DevpollSelector` may be around 10% faster under heavy loads. " +"(Contributed by Giampaolo Rodola' in :issue:`30014`)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1880 +msgid "" +"Constant folding has been moved from the peephole optimizer to the new AST " +"optimizer, which is able perform optimizations more consistently. " +"(Contributed by Eugene Toder and INADA Naoki in :issue:`29469` and :issue:" +"`11549`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1885 +msgid "" +"Most functions and methods in :mod:`abc` have been rewritten in C. This " +"makes creation of abstract base classes, and calling :func:`isinstance` and :" +"func:`issubclass` on them 1.5x faster. This also reduces Python start-up " +"time by up to 10%. (Contributed by Ivan Levkivskyi and INADA Naoki in :issue:" +"`31333`)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1891 +msgid "" +"Significant speed improvements to alternate constructors for :class:" +"`datetime.date` and :class:`datetime.datetime` by using fast-path " +"constructors when not constructing subclasses. (Contributed by Paul Ganssle " +"in :issue:`32403`)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1896 +msgid "" +"The speed of comparison of :class:`array.array` instances has been improved " +"considerably in certain cases. It is now from 10x to 70x faster when " +"comparing arrays holding values of the same integer type. (Contributed by " +"Adrian Wielgosik in :issue:`24700`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1901 +msgid "" +"The :func:`math.erf` and :func:`math.erfc` functions now use the (faster) C " +"library implementation on most platforms. (Contributed by Serhiy Storchaka " +"in :issue:`26121`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1907 +msgid "Other CPython Implementation Changes" +msgstr "" + +#: ../../whatsnew/3.7.rst:1909 +msgid "" +"Trace hooks may now opt out of receiving the ``line`` and opt into receiving " +"the ``opcode`` events from the interpreter by setting the corresponding new :" +"attr:`~frame.f_trace_lines` and :attr:`~frame.f_trace_opcodes` attributes on " +"the frame being traced. (Contributed by Nick Coghlan in :issue:`31344`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1914 +msgid "" +"Fixed some consistency problems with namespace package module attributes. " +"Namespace module objects now have an ``__file__`` that is set to ``None`` " +"(previously unset), and their ``__spec__.origin`` is also set to ``None`` " +"(previously the string ``\"namespace\"``). See :issue:`32305`. Also, the " +"namespace module object's ``__spec__.loader`` is set to the same value as " +"``__loader__`` (previously, the former was set to ``None``). See :issue:" +"`32303`." +msgstr "" + +#: ../../whatsnew/3.7.rst:1922 +msgid "" +"The :func:`locals` dictionary now displays in the lexical order that " +"variables were defined. Previously, the order was undefined. (Contributed " +"by Raymond Hettinger in :issue:`32690`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1926 +msgid "" +"The ``distutils`` ``upload`` command no longer tries to change CR end-of-" +"line characters to CRLF. This fixes a corruption issue with sdists that " +"ended with a byte equivalent to CR. (Contributed by Bo Bayles in :issue:" +"`32304`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1933 +msgid "Deprecated Python Behavior" +msgstr "" + +#: ../../whatsnew/3.7.rst:1935 +msgid "" +"Yield expressions (both ``yield`` and ``yield from`` clauses) are now " +"deprecated in comprehensions and generator expressions (aside from the " +"iterable expression in the leftmost :keyword:`!for` clause). This ensures " +"that comprehensions always immediately return a container of the appropriate " +"type (rather than potentially returning a :term:`generator iterator` " +"object), while generator expressions won't attempt to interleave their " +"implicit output with the output from any explicit yield expressions. In " +"Python 3.7, such expressions emit :exc:`DeprecationWarning` when compiled, " +"in Python 3.8 this will be a :exc:`SyntaxError`. (Contributed by Serhiy " +"Storchaka in :issue:`10544`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1946 +msgid "" +"Returning a subclass of :class:`complex` from :meth:`object.__complex__` is " +"deprecated and will be an error in future Python versions. This makes " +"``__complex__()`` consistent with :meth:`object.__int__` and :meth:`object." +"__float__`. (Contributed by Serhiy Storchaka in :issue:`28894`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1955 +msgid "Deprecated Python modules, functions and methods" +msgstr "" + +#: ../../whatsnew/3.7.rst:1958 +msgid "aifc" +msgstr "" + +#: ../../whatsnew/3.7.rst:1960 +msgid "" +":func:`!aifc.openfp` has been deprecated and will be removed in Python 3.9. " +"Use :func:`!aifc.open` instead. (Contributed by Brian Curtin in :issue:" +"`31985`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1970 +msgid "" +"Support for directly ``await``-ing instances of :class:`asyncio.Lock` and " +"other asyncio synchronization primitives has been deprecated. An " +"asynchronous context manager must be used in order to acquire and release " +"the synchronization resource. (Contributed by Andrew Svetlov in :issue:" +"`32253`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1976 +msgid "" +"The :meth:`!asyncio.Task.current_task` and :meth:`!asyncio.Task.all_tasks` " +"methods have been deprecated. (Contributed by Andrew Svetlov in :issue:" +"`32250`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1984 +msgid "" +"In Python 3.8, the abstract base classes in :mod:`collections.abc` will no " +"longer be exposed in the regular :mod:`collections` module. This will help " +"create a clearer distinction between the concrete classes and the abstract " +"base classes. (Contributed by Serhiy Storchaka in :issue:`25988`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:1994 +msgid "" +":mod:`dbm.dumb` now supports reading read-only files and no longer writes " +"the index file when it is not changed. A deprecation warning is now emitted " +"if the index file is missing and recreated in the ``'r'`` and ``'w'`` modes " +"(this will be an error in future Python releases). (Contributed by Serhiy " +"Storchaka in :issue:`28847`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2004 +msgid "" +"In Python 3.8, attempting to check for non-Enum objects in :class:`~enum." +"Enum` classes will raise a :exc:`TypeError` (e.g. ``1 in Color``); " +"similarly, attempting to check for non-Flag objects in a :class:`~enum.Flag` " +"member will raise :exc:`TypeError` (e.g. ``1 in Perm.RW``); currently, both " +"operations return :const:`False` instead. (Contributed by Ethan Furman in :" +"issue:`33217`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2013 +msgid "gettext" +msgstr "" + +#: ../../whatsnew/3.7.rst:2015 +msgid "" +"Using non-integer value for selecting a plural form in :mod:`gettext` is now " +"deprecated. It never correctly worked. (Contributed by Serhiy Storchaka in :" +"issue:`28692`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2023 +msgid "" +"Methods :meth:`!MetaPathFinder.find_module` (replaced by :meth:" +"`MetaPathFinder.find_spec() `) and :" +"meth:`!PathEntryFinder.find_loader` (replaced by :meth:`PathEntryFinder." +"find_spec() `) both deprecated in " +"Python 3.4 now emit :exc:`DeprecationWarning`. (Contributed by Matthias " +"Bussonnier in :issue:`29576`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2034 +msgid "" +"The :class:`importlib.abc.ResourceLoader` ABC has been deprecated in favour " +"of :class:`!importlib.abc.ResourceReader`." +msgstr "" + +#: ../../whatsnew/3.7.rst:2041 +msgid "" +":func:`!locale.format` has been deprecated, use :meth:`locale.format_string` " +"instead. (Contributed by Garvit in :issue:`10379`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2046 +msgid "macpath" +msgstr "" + +#: ../../whatsnew/3.7.rst:2048 +msgid "" +"The :mod:`!macpath` is now deprecated and will be removed in Python 3.8. " +"(Contributed by Chi Hsuan Yen in :issue:`9850`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2053 +msgid "threading" +msgstr "threading" + +#: ../../whatsnew/3.7.rst:2055 +msgid "" +":mod:`!dummy_threading` and :mod:`!_dummy_thread` have been deprecated. It " +"is no longer possible to build Python with threading disabled. Use :mod:" +"`threading` instead. (Contributed by Antoine Pitrou in :issue:`31370`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2064 +msgid "" +"The silent argument value truncation in :func:`socket.htons` and :func:" +"`socket.ntohs` has been deprecated. In future versions of Python, if the " +"passed argument is larger than 16 bits, an exception will be raised. " +"(Contributed by Oren Milman in :issue:`28332`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2073 +msgid "" +":func:`!ssl.wrap_socket` is deprecated. Use :meth:`ssl.SSLContext." +"wrap_socket` instead. (Contributed by Christian Heimes in :issue:`28124`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2079 +msgid "sunau" +msgstr "" + +#: ../../whatsnew/3.7.rst:2081 +msgid "" +":func:`!sunau.openfp` has been deprecated and will be removed in Python 3.9. " +"Use :func:`!sunau.open` instead. (Contributed by Brian Curtin in :issue:" +"`31985`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2089 +msgid "" +"Deprecated :func:`!sys.set_coroutine_wrapper` and :func:`!sys." +"get_coroutine_wrapper`." +msgstr "" + +#: ../../whatsnew/3.7.rst:2092 +msgid "" +"The undocumented ``sys.callstats()`` function has been deprecated and will " +"be removed in a future Python version. (Contributed by Victor Stinner in :" +"issue:`28799`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2098 +msgid "wave" +msgstr "" + +#: ../../whatsnew/3.7.rst:2100 +msgid "" +":func:`!wave.openfp` has been deprecated and will be removed in Python 3.9. " +"Use :func:`wave.open` instead. (Contributed by Brian Curtin in :issue:" +"`31985`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2106 +msgid "Deprecated functions and types of the C API" +msgstr "" + +#: ../../whatsnew/3.7.rst:2108 +msgid "" +"Function :c:func:`PySlice_GetIndicesEx` is deprecated and replaced with a " +"macro if ``Py_LIMITED_API`` is not set or set to a value in the range " +"between ``0x03050400`` and ``0x03060000`` (not inclusive), or is " +"``0x03060100`` or higher. (Contributed by Serhiy Storchaka in :issue:" +"`27867`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2113 +msgid "" +":c:func:`PyOS_AfterFork` has been deprecated. Use :c:func:" +"`PyOS_BeforeFork`, :c:func:`PyOS_AfterFork_Parent` or :c:func:" +"`PyOS_AfterFork_Child()` instead. (Contributed by Antoine Pitrou in :issue:" +"`16500`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2121 +msgid "Platform Support Removals" +msgstr "" + +#: ../../whatsnew/3.7.rst:2123 +msgid "FreeBSD 9 and older are no longer officially supported." +msgstr "" + +#: ../../whatsnew/3.7.rst:2124 +msgid "" +"For full Unicode support, including within extension modules, \\*nix " +"platforms are now expected to provide at least one of ``C.UTF-8`` (full " +"locale), ``C.utf8`` (full locale) or ``UTF-8`` (``LC_CTYPE``-only locale) as " +"an alternative to the legacy ``ASCII``-based ``C`` locale." +msgstr "" + +#: ../../whatsnew/3.7.rst:2128 +msgid "" +"OpenSSL 0.9.8 and 1.0.1 are no longer supported, which means building " +"CPython 3.7 with SSL/TLS support on older platforms still using these " +"versions requires custom build options that link to a more recent version of " +"OpenSSL." +msgstr "" + +#: ../../whatsnew/3.7.rst:2132 +msgid "" +"Notably, this issue affects the Debian 8 (aka \"jessie\") and Ubuntu 14.04 " +"(aka \"Trusty\") LTS Linux distributions, as they still use OpenSSL 1.0.1 by " +"default." +msgstr "" + +#: ../../whatsnew/3.7.rst:2136 +msgid "" +"Debian 9 (\"stretch\") and Ubuntu 16.04 (\"xenial\"), as well as recent " +"releases of other LTS Linux releases (e.g. RHEL/CentOS 7.5, SLES 12-SP3), " +"use OpenSSL 1.0.2 or later, and remain supported in the default build " +"configuration." +msgstr "" + +#: ../../whatsnew/3.7.rst:2140 +msgid "" +"CPython's own `CI configuration file `_ provides an example of using the SSL :source:" +"`compatibility testing infrastructure ` in " +"CPython's test suite to build and link against OpenSSL 1.1.0 rather than an " +"outdated system provided OpenSSL." +msgstr "" + +#: ../../whatsnew/3.7.rst:2149 +msgid "API and Feature Removals" +msgstr "" + +#: ../../whatsnew/3.7.rst:2151 +msgid "The following features and APIs have been removed from Python 3.7:" +msgstr "" + +#: ../../whatsnew/3.7.rst:2153 +msgid "" +"The ``os.stat_float_times()`` function has been removed. It was introduced " +"in Python 2.3 for backward compatibility with Python 2.2, and was deprecated " +"since Python 3.1." +msgstr "" + +#: ../../whatsnew/3.7.rst:2157 +msgid "" +"Unknown escapes consisting of ``'\\'`` and an ASCII letter in replacement " +"templates for :func:`re.sub` were deprecated in Python 3.5, and will now " +"cause an error." +msgstr "" + +#: ../../whatsnew/3.7.rst:2161 +msgid "" +"Removed support of the *exclude* argument in :meth:`tarfile.TarFile.add`. It " +"was deprecated in Python 2.7 and 3.2. Use the *filter* argument instead." +msgstr "" + +#: ../../whatsnew/3.7.rst:2164 +msgid "" +"The :func:`!ntpath.splitunc` function was deprecated in Python 3.1, and has " +"now been removed. Use :func:`~os.path.splitdrive` instead." +msgstr "" + +#: ../../whatsnew/3.7.rst:2168 +msgid "" +":func:`collections.namedtuple` no longer supports the *verbose* parameter or " +"``_source`` attribute which showed the generated source code for the named " +"tuple class. This was part of an optimization designed to speed-up class " +"creation. (Contributed by Jelle Zijlstra with further improvements by INADA " +"Naoki, Serhiy Storchaka, and Raymond Hettinger in :issue:`28638`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2174 +msgid "" +"Functions :func:`bool`, :func:`float`, :func:`list` and :func:`tuple` no " +"longer take keyword arguments. The first argument of :func:`int` can now be " +"passed only as positional argument." +msgstr "" + +#: ../../whatsnew/3.7.rst:2178 +msgid "" +"Removed previously deprecated in Python 2.4 classes ``Plist``, ``Dict`` and " +"``_InternalDict`` in the :mod:`plistlib` module. Dict values in the result " +"of functions :func:`!readPlist` and :func:`!readPlistFromBytes` are now " +"normal dicts. You no longer can use attribute access to access items of " +"these dictionaries." +msgstr "" + +#: ../../whatsnew/3.7.rst:2184 +msgid "" +"The ``asyncio.windows_utils.socketpair()`` function has been removed. Use " +"the :func:`socket.socketpair` function instead, it is available on all " +"platforms since Python 3.5. ``asyncio.windows_utils.socketpair`` was just an " +"alias to ``socket.socketpair`` on Python 3.5 and newer." +msgstr "" + +#: ../../whatsnew/3.7.rst:2190 +msgid "" +":mod:`asyncio` no longer exports the :mod:`selectors` and :mod:`!" +"_overlapped` modules as ``asyncio.selectors`` and ``asyncio._overlapped``. " +"Replace ``from asyncio import selectors`` with ``import selectors``." +msgstr "" + +#: ../../whatsnew/3.7.rst:2195 +msgid "" +"Direct instantiation of :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` " +"objects is now prohibited. The constructors were never documented, tested, " +"or designed as public constructors. Users were supposed to use :func:`!ssl." +"wrap_socket` or :class:`ssl.SSLContext`. (Contributed by Christian Heimes " +"in :issue:`32951`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2201 +msgid "" +"The unused ``distutils`` ``install_misc`` command has been removed. " +"(Contributed by Eric N. Vander Weele in :issue:`29218`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2206 +msgid "Module Removals" +msgstr "" + +#: ../../whatsnew/3.7.rst:2208 +msgid "" +"The ``fpectl`` module has been removed. It was never enabled by default, " +"never worked correctly on x86-64, and it changed the Python ABI in ways that " +"caused unexpected breakage of C extensions. (Contributed by Nathaniel J. " +"Smith in :issue:`29137`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2215 ../../whatsnew/3.7.rst:2494 +msgid "Windows-only Changes" +msgstr "" + +#: ../../whatsnew/3.7.rst:2217 +msgid "" +"The python launcher, (py.exe), can accept 32 & 64 bit specifiers **without** " +"having to specify a minor version as well. So ``py -3-32`` and ``py -3-64`` " +"become valid as well as ``py -3.7-32``, also the -*m*-64 and -*m.n*-64 forms " +"are now accepted to force 64 bit python even if 32 bit would have otherwise " +"been used. If the specified version is not available py.exe will error exit. " +"(Contributed by Steve Barnes in :issue:`30291`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2224 +msgid "" +"The launcher can be run as ``py -0`` to produce a list of the installed " +"pythons, *with default marked with an asterisk*. Running ``py -0p`` will " +"include the paths. If py is run with a version specifier that cannot be " +"matched it will also print the *short form* list of available specifiers. " +"(Contributed by Steve Barnes in :issue:`30362`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2234 +msgid "Porting to Python 3.7" +msgstr "" + +#: ../../whatsnew/3.7.rst:2236 +msgid "" +"This section lists previously described changes and other bugfixes that may " +"require changes to your code." +msgstr "" + +#: ../../whatsnew/3.7.rst:2241 +msgid "Changes in Python Behavior" +msgstr "" + +#: ../../whatsnew/3.7.rst:2243 +msgid "" +":keyword:`async` and :keyword:`await` names are now reserved keywords. Code " +"using these names as identifiers will now raise a :exc:`SyntaxError`. " +"(Contributed by Jelle Zijlstra in :issue:`30406`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2247 +msgid "" +":pep:`479` is enabled for all code in Python 3.7, meaning that :exc:" +"`StopIteration` exceptions raised directly or indirectly in coroutines and " +"generators are transformed into :exc:`RuntimeError` exceptions. (Contributed " +"by Yury Selivanov in :issue:`32670`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2253 +msgid "" +":meth:`object.__aiter__` methods can no longer be declared as asynchronous. " +"(Contributed by Yury Selivanov in :issue:`31709`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2256 +msgid "" +"Due to an oversight, earlier Python versions erroneously accepted the " +"following syntax::" +msgstr "" + +#: ../../whatsnew/3.7.rst:2259 +msgid "" +"f(1 for x in [1],)\n" +"\n" +"class C(1 for x in [1]):\n" +" pass" +msgstr "" + +#: ../../whatsnew/3.7.rst:2264 +msgid "" +"Python 3.7 now correctly raises a :exc:`SyntaxError`, as a generator " +"expression always needs to be directly inside a set of parentheses and " +"cannot have a comma on either side, and the duplication of the parentheses " +"can be omitted only on calls. (Contributed by Serhiy Storchaka in :issue:" +"`32012` and :issue:`32023`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2270 +msgid "" +"When using the :option:`-m` switch, the initial working directory is now " +"added to :data:`sys.path`, rather than an empty string (which dynamically " +"denoted the current working directory at the time of each import). Any " +"programs that are checking for the empty string, or otherwise relying on the " +"previous behaviour, will need to be updated accordingly (e.g. by also " +"checking for ``os.getcwd()`` or ``os.path.dirname(__main__.__file__)``, " +"depending on why the code was checking for the empty string in the first " +"place)." +msgstr "" + +#: ../../whatsnew/3.7.rst:2280 +msgid "Changes in the Python API" +msgstr "Änderungen in der Python API" + +#: ../../whatsnew/3.7.rst:2282 +msgid "" +":meth:`socketserver.ThreadingMixIn.server_close ` now waits until all non-daemon threads complete. Set the " +"new :attr:`socketserver.ThreadingMixIn.block_on_close` class attribute to " +"``False`` to get the pre-3.7 behaviour. (Contributed by Victor Stinner in :" +"issue:`31233` and :issue:`33540`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2289 +msgid "" +":meth:`socketserver.ForkingMixIn.server_close ` now waits until all child processes complete. Set the new :" +"attr:`socketserver.ForkingMixIn.block_on_close ` class attribute to ``False`` to get the pre-3.7 behaviour. " +"(Contributed by Victor Stinner in :issue:`31151` and :issue:`33540`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2297 +msgid "" +"The :func:`locale.localeconv` function now temporarily sets the ``LC_CTYPE`` " +"locale to the value of ``LC_NUMERIC`` in some cases. (Contributed by Victor " +"Stinner in :issue:`31900`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2301 +msgid "" +":meth:`pkgutil.walk_packages` now raises a :exc:`ValueError` if *path* is a " +"string. Previously an empty list was returned. (Contributed by Sanyam " +"Khurana in :issue:`24744`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2305 +msgid "" +"A format string argument for :meth:`string.Formatter.format` is now :ref:" +"`positional-only `. Passing it as a keyword " +"argument was deprecated in Python 3.5. (Contributed by Serhiy Storchaka in :" +"issue:`29193`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2310 +msgid "" +"Attributes :attr:`~http.cookies.Morsel.key`, :attr:`~http.cookies.Morsel." +"value` and :attr:`~http.cookies.Morsel.coded_value` of class :class:`http." +"cookies.Morsel` are now read-only. Assigning to them was deprecated in " +"Python 3.5. Use the :meth:`~http.cookies.Morsel.set` method for setting " +"them. (Contributed by Serhiy Storchaka in :issue:`29192`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2318 +msgid "" +"The *mode* argument of :func:`os.makedirs` no longer affects the file " +"permission bits of newly created intermediate-level directories. To set " +"their file permission bits you can set the umask before invoking " +"``makedirs()``. (Contributed by Serhiy Storchaka in :issue:`19930`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2324 +msgid "" +"The :attr:`struct.Struct.format` type is now :class:`str` instead of :class:" +"`bytes`. (Contributed by Victor Stinner in :issue:`21071`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2327 +msgid "" +":func:`!cgi.parse_multipart` now accepts the *encoding* and *errors* " +"arguments and returns the same results as :class:`!FieldStorage`: for non-" +"file fields, the value associated to a key is a list of strings, not bytes. " +"(Contributed by Pierre Quentel in :issue:`29979`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2333 +msgid "" +"Due to internal changes in :mod:`socket`, calling :func:`socket.fromshare` " +"on a socket created by :func:`socket.share ` in older " +"Python versions is not supported." +msgstr "" + +#: ../../whatsnew/3.7.rst:2337 +msgid "" +"``repr`` for :exc:`BaseException` has changed to not include the trailing " +"comma. Most exceptions are affected by this change. (Contributed by Serhiy " +"Storchaka in :issue:`30399`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2341 +msgid "" +"``repr`` for :class:`datetime.timedelta` has changed to include the keyword " +"arguments in the output. (Contributed by Utkarsh Upadhyay in :issue:`30302`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2344 +msgid "" +"Because :func:`shutil.rmtree` is now implemented using the :func:`os." +"scandir` function, the user specified handler *onerror* is now called with " +"the first argument ``os.scandir`` instead of ``os.listdir`` when listing the " +"directory is failed." +msgstr "" + +#: ../../whatsnew/3.7.rst:2349 +msgid "" +"Support for nested sets and set operations in regular expressions as in " +"`Unicode Technical Standard #18`_ might be added in the future. This would " +"change the syntax. To facilitate this future change a :exc:`FutureWarning` " +"will be raised in ambiguous cases for the time being. That include sets " +"starting with a literal ``'['`` or containing literal character sequences " +"``'--'``, ``'&&'``, ``'~~'``, and ``'||'``. To avoid a warning, escape them " +"with a backslash. (Contributed by Serhiy Storchaka in :issue:`30349`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2360 +msgid "" +"The result of splitting a string on a :mod:`regular expression ` that " +"could match an empty string has been changed. For example splitting on " +"``r'\\s*'`` will now split not only on whitespaces as it did previously, but " +"also on empty strings before all non-whitespace characters and just before " +"the end of the string. The previous behavior can be restored by changing the " +"pattern to ``r'\\s+'``. A :exc:`FutureWarning` was emitted for such " +"patterns since Python 3.5." +msgstr "" + +#: ../../whatsnew/3.7.rst:2369 +msgid "" +"For patterns that match both empty and non-empty strings, the result of " +"searching for all matches may also be changed in other cases. For example " +"in the string ``'a\\n\\n'``, the pattern ``r'(?m)^\\s*?$'`` will not only " +"match empty strings at positions 2 and 3, but also the string ``'\\n'`` at " +"positions 2--3. To match only blank lines, the pattern should be rewritten " +"as ``r'(?m)^[^\\S\\n]*$'``." +msgstr "" + +#: ../../whatsnew/3.7.rst:2376 +msgid "" +":func:`re.sub` now replaces empty matches adjacent to a previous non-empty " +"match. For example ``re.sub('x*', '-', 'abxd')`` returns now ``'-a-b--d-'`` " +"instead of ``'-a-b-d-'`` (the first minus between 'b' and 'd' replaces 'x', " +"and the second minus replaces an empty string between 'x' and 'd')." +msgstr "" + +#: ../../whatsnew/3.7.rst:2382 +msgid "(Contributed by Serhiy Storchaka in :issue:`25054` and :issue:`32308`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2384 +msgid "" +"Change :func:`re.escape` to only escape regex special characters instead of " +"escaping all characters other than ASCII letters, numbers, and ``'_'``. " +"(Contributed by Serhiy Storchaka in :issue:`29995`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2388 +msgid "" +":class:`tracemalloc.Traceback` frames are now sorted from oldest to most " +"recent to be more consistent with :mod:`traceback`. (Contributed by Jesse " +"Bakker in :issue:`32121`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2392 +msgid "" +"On OSes that support :const:`socket.SOCK_NONBLOCK` or :const:`socket." +"SOCK_CLOEXEC` bit flags, the :attr:`socket.type ` no " +"longer has them applied. Therefore, checks like ``if sock.type == socket." +"SOCK_STREAM`` work as expected on all platforms. (Contributed by Yury " +"Selivanov in :issue:`32331`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2399 +msgid "" +"On Windows the default for the *close_fds* argument of :class:`subprocess." +"Popen` was changed from :const:`False` to :const:`True` when redirecting the " +"standard handles. If you previously depended on handles being inherited when " +"using :class:`subprocess.Popen` with standard io redirection, you will have " +"to pass ``close_fds=False`` to preserve the previous behaviour, or use :attr:" +"`STARTUPINFO.lpAttributeList `." +msgstr "" + +#: ../../whatsnew/3.7.rst:2407 +msgid "" +":meth:`importlib.machinery.PathFinder.invalidate_caches` -- which implicitly " +"affects :func:`importlib.invalidate_caches` -- now deletes entries in :data:" +"`sys.path_importer_cache` which are set to ``None``. (Contributed by Brett " +"Cannon in :issue:`33169`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2412 +msgid "" +"In :mod:`asyncio`, :meth:`loop.sock_recv() `, :meth:" +"`loop.sock_sendall() `, :meth:`loop.sock_accept() " +"`, :meth:`loop.getaddrinfo() `, :meth:`loop.getnameinfo() ` have " +"been changed to be proper coroutine methods to match their documentation. " +"Previously, these methods returned :class:`asyncio.Future` instances. " +"(Contributed by Yury Selivanov in :issue:`32327`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2423 +msgid "" +":attr:`asyncio.Server.sockets` now returns a copy of the internal list of " +"server sockets, instead of returning it directly. (Contributed by Yury " +"Selivanov in :issue:`32662`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2427 +msgid "" +":attr:`Struct.format ` is now a :class:`str` instance " +"instead of a :class:`bytes` instance. (Contributed by Victor Stinner in :" +"issue:`21071`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2431 +msgid "" +":mod:`argparse` subparsers can now be made mandatory by passing " +"``required=True`` to :meth:`ArgumentParser.add_subparsers() `. (Contributed by Anthony Sottile in :issue:" +"`26510`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2435 +msgid "" +":meth:`ast.literal_eval` is now stricter. Addition and subtraction of " +"arbitrary numbers are no longer allowed. (Contributed by Serhiy Storchaka " +"in :issue:`31778`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2439 +msgid "" +":meth:`Calendar.itermonthdates ` will now " +"consistently raise an exception when a date falls outside of the " +"``0001-01-01`` through ``9999-12-31`` range. To support applications that " +"cannot tolerate such exceptions, the new :meth:`Calendar.itermonthdays3 " +"` and :meth:`Calendar.itermonthdays4 " +"` can be used. The new methods return " +"tuples and are not restricted by the range supported by :class:`datetime." +"date`. (Contributed by Alexander Belopolsky in :issue:`28292`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2449 +msgid "" +":class:`collections.ChainMap` now preserves the order of the underlying " +"mappings. (Contributed by Raymond Hettinger in :issue:`32792`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2452 +msgid "" +"The ``submit()`` method of :class:`concurrent.futures.ThreadPoolExecutor` " +"and :class:`concurrent.futures.ProcessPoolExecutor` now raises a :exc:" +"`RuntimeError` if called during interpreter shutdown. (Contributed by Mark " +"Nemec in :issue:`33097`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2457 +msgid "" +"The :class:`configparser.ConfigParser` constructor now uses ``read_dict()`` " +"to process the default values, making its behavior consistent with the rest " +"of the parser. Non-string keys and values in the defaults dictionary are " +"now being implicitly converted to strings. (Contributed by James Tocknell " +"in :issue:`23835`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2463 +msgid "" +"Several undocumented internal imports were removed. One example is that ``os." +"errno`` is no longer available; use ``import errno`` directly instead. Note " +"that such undocumented internal imports may be removed any time without " +"notice, even in micro version releases." +msgstr "" + +#: ../../whatsnew/3.7.rst:2471 +msgid "Changes in the C API" +msgstr "" + +#: ../../whatsnew/3.7.rst:2473 +msgid "" +"The function :c:func:`PySlice_GetIndicesEx` is considered unsafe for " +"resizable sequences. If the slice indices are not instances of :class:" +"`int`, but objects that implement the :meth:`!__index__` method, the " +"sequence can be resized after passing its length to :c:func:`!" +"PySlice_GetIndicesEx`. This can lead to returning indices out of the length " +"of the sequence. For avoiding possible problems use new functions :c:func:" +"`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices`. (Contributed by Serhiy " +"Storchaka in :issue:`27867`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2484 +msgid "CPython bytecode changes" +msgstr "CPython Bytecode Änderungen" + +#: ../../whatsnew/3.7.rst:2486 +msgid "" +"There are two new opcodes: :opcode:`!LOAD_METHOD` and :opcode:`!" +"CALL_METHOD`. (Contributed by Yury Selivanov and INADA Naoki in :issue:" +"`26110`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2489 +msgid "" +"The :opcode:`!STORE_ANNOTATION` opcode has been removed. (Contributed by " +"Mark Shannon in :issue:`32550`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2496 +msgid "" +"The file used to override :data:`sys.path` is now called ``._pth`` instead of ``'sys.path'``. See :ref:" +"`windows_finding_modules` for more information. (Contributed by Steve Dower " +"in :issue:`28137`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2503 +msgid "Other CPython implementation changes" +msgstr "" + +#: ../../whatsnew/3.7.rst:2505 +msgid "" +"In preparation for potential future changes to the public CPython runtime " +"initialization API (see :pep:`432` for an initial, but somewhat outdated, " +"draft), CPython's internal startup and configuration management logic has " +"been significantly refactored. While these updates are intended to be " +"entirely transparent to both embedding applications and users of the regular " +"CPython CLI, they're being mentioned here as the refactoring changes the " +"internal order of various operations during interpreter startup, and hence " +"may uncover previously latent defects, either in embedding applications, or " +"in CPython itself. (Initially contributed by Nick Coghlan and Eric Snow as " +"part of :issue:`22257`, and further updated by Nick, Eric, and Victor " +"Stinner in a number of other issues). Some known details affected:" +msgstr "" + +#: ../../whatsnew/3.7.rst:2518 +msgid "" +":c:func:`!PySys_AddWarnOptionUnicode` is not currently usable by embedding " +"applications due to the requirement to create a Unicode object prior to " +"calling ``Py_Initialize``. Use :c:func:`!PySys_AddWarnOption` instead." +msgstr "" + +#: ../../whatsnew/3.7.rst:2522 +msgid "" +"warnings filters added by an embedding application with :c:func:`!" +"PySys_AddWarnOption` should now more consistently take precedence over the " +"default filters set by the interpreter" +msgstr "" + +#: ../../whatsnew/3.7.rst:2526 +msgid "" +"Due to changes in the way the default warnings filters are configured, " +"setting :c:data:`Py_BytesWarningFlag` to a value greater than one is no " +"longer sufficient to both emit :exc:`BytesWarning` messages and have them " +"converted to exceptions. Instead, the flag must be set (to cause the " +"warnings to be emitted in the first place), and an explicit ``error::" +"BytesWarning`` warnings filter added to convert them to exceptions." +msgstr "" + +#: ../../whatsnew/3.7.rst:2533 +msgid "" +"Due to a change in the way docstrings are handled by the compiler, the " +"implicit ``return None`` in a function body consisting solely of a docstring " +"is now marked as occurring on the same line as the docstring, not on the " +"function's header line." +msgstr "" + +#: ../../whatsnew/3.7.rst:2538 +msgid "" +"The current exception state has been moved from the frame object to the co-" +"routine. This simplified the interpreter and fixed a couple of obscure bugs " +"caused by having swap exception state when entering or exiting a generator. " +"(Contributed by Mark Shannon in :issue:`25612`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2544 +msgid "Notable changes in Python 3.7.1" +msgstr "" + +#: ../../whatsnew/3.7.rst:2546 +msgid "" +"Starting in 3.7.1, :c:func:`Py_Initialize` now consistently reads and " +"respects all of the same environment settings as :c:func:`Py_Main` (in " +"earlier Python versions, it respected an ill-defined subset of those " +"environment variables, while in Python 3.7.0 it didn't read any of them due " +"to :issue:`34247`). If this behavior is unwanted, set :c:data:" +"`Py_IgnoreEnvironmentFlag` to 1 before calling :c:func:`Py_Initialize`." +msgstr "" + +#: ../../whatsnew/3.7.rst:2553 +msgid "" +"In 3.7.1 the C API for Context Variables :ref:`was updated " +"` to use :c:type:`PyObject` " +"pointers. See also :issue:`34762`." +msgstr "" + +#: ../../whatsnew/3.7.rst:2557 +msgid "" +"In 3.7.1 the :mod:`tokenize` module now implicitly emits a ``NEWLINE`` token " +"when provided with input that does not have a trailing new line. This " +"behavior now matches what the C tokenizer does internally. (Contributed by " +"Ammar Askar in :issue:`33899`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2563 +msgid "Notable changes in Python 3.7.2" +msgstr "" + +#: ../../whatsnew/3.7.rst:2565 +msgid "" +"In 3.7.2, :mod:`venv` on Windows no longer copies the original binaries, but " +"creates redirector scripts named ``python.exe`` and ``pythonw.exe`` instead. " +"This resolves a long standing issue where all virtual environments would " +"have to be upgraded or recreated with each Python update. However, note that " +"this release will still require recreation of virtual environments in order " +"to get the new scripts." +msgstr "" + +#: ../../whatsnew/3.7.rst:2573 +msgid "Notable changes in Python 3.7.6" +msgstr "" + +#: ../../whatsnew/3.7.rst:2575 +msgid "" +"Due to significant security concerns, the *reuse_address* parameter of :meth:" +"`asyncio.loop.create_datagram_endpoint` is no longer supported. This is " +"because of the behavior of the socket option ``SO_REUSEADDR`` in UDP. For " +"more details, see the documentation for ``loop.create_datagram_endpoint()``. " +"(Contributed by Kyle Stanley, Antoine Pitrou, and Yury Selivanov in :issue:" +"`37228`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2583 +msgid "Notable changes in Python 3.7.10" +msgstr "" + +#: ../../whatsnew/3.7.rst:2585 +msgid "" +"Earlier Python versions allowed using both ``;`` and ``&`` as query " +"parameter separators in :func:`urllib.parse.parse_qs` and :func:`urllib." +"parse.parse_qsl`. Due to security concerns, and to conform with newer W3C " +"recommendations, this has been changed to allow only a single separator key, " +"with ``&`` as the default. This change also affects :func:`!cgi.parse` and :" +"func:`!cgi.parse_multipart` as they use the affected functions internally. " +"For more details, please see their respective documentation. (Contributed by " +"Adam Goldschmidt, Senthil Kumaran and Ken Jin in :issue:`42967`.)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2596 +msgid "Notable changes in Python 3.7.11" +msgstr "" + +#: ../../whatsnew/3.7.rst:2598 +msgid "" +"A security fix alters the :class:`ftplib.FTP` behavior to not trust the IPv4 " +"address sent from the remote server when setting up a passive data channel. " +"We reuse the ftp server IP address instead. For unusual code requiring the " +"old behavior, set a ``trust_server_pasv_ipv4_address`` attribute on your FTP " +"instance to ``True``. (See :gh:`87451`)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2605 +msgid "" +"The presence of newline or tab characters in parts of a URL allows for some " +"forms of attacks. Following the WHATWG specification that updates RFC 3986, " +"ASCII newline ``\\n``, ``\\r`` and tab ``\\t`` characters are stripped from " +"the URL by the parser :func:`urllib.parse` preventing such attacks. The " +"removal characters are controlled by a new module level variable ``urllib." +"parse._UNSAFE_URL_BYTES_TO_REMOVE``. (See :gh:`88048`)" +msgstr "" + +#: ../../whatsnew/3.7.rst:2613 +msgid "Notable security feature in 3.7.14" +msgstr "" + +#: ../../whatsnew/3.7.rst:2615 +msgid "" +"Converting between :class:`int` and :class:`str` in bases other than 2 " +"(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) " +"now raises a :exc:`ValueError` if the number of digits in string form is " +"above a limit to avoid potential denial of service attacks due to the " +"algorithmic complexity. This is a mitigation for :cve:`2020-10735`. This " +"limit can be configured or disabled by environment variable, command line " +"flag, or :mod:`sys` APIs. See the :ref:`integer string conversion length " +"limitation ` documentation. The default limit is 4300 " +"digits in string form." +msgstr "" diff --git a/whatsnew/changelog.po b/whatsnew/changelog.po index c1ce734e..fd65a428 100644 --- a/whatsnew/changelog.po +++ b/whatsnew/changelog.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-08-22 12:07+0200\n" +"POT-Creation-Date: 2026-09-14 20:17+0000\n" "PO-Revision-Date: 2025-09-16 00:02+0000\n" "Last-Translator: python-doc bot, 2025\n" "Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n" @@ -33,58 +33,258 @@ msgstr "" msgid "*Release date: XXXX-XX-XX*" msgstr "" -#: ../NEWS:8 ../NEWS:439 ../NEWS:1715 ../NEWS:3179 ../NEWS:4104 ../NEWS:4582 -#: ../NEWS:5197 ../NEWS:5924 ../NEWS:8240 ../NEWS:9064 ../NEWS:9430 -#: ../NEWS:10008 ../NEWS:10560 ../NEWS:10909 ../NEWS:11374 ../NEWS:12062 -#: ../NEWS:15993 ../NEWS:16515 ../NEWS:17952 ../NEWS:20217 ../NEWS:21428 -#: ../NEWS:21775 ../NEWS:22778 ../NEWS:23115 ../NEWS:25667 ../NEWS:26565 -#: ../NEWS:27184 ../NEWS:31370 ../NEWS:33523 ../NEWS:34034 ../NEWS:36044 -#: ../NEWS:36506 ../NEWS:36979 ../NEWS:39961 ../NEWS:40824 ../NEWS:41363 -#: ../NEWS:41705 ../NEWS:44828 ../NEWS:45450 ../NEWS:45667 ../NEWS:45927 -#: ../NEWS:46533 ../NEWS:47121 ../NEWS:49436 ../NEWS:49824 ../NEWS:50165 -#: ../NEWS:50588 ../NEWS:51075 ../NEWS:51440 ../NEWS:51834 ../NEWS:51908 -#: ../NEWS:52893 ../NEWS:53354 ../NEWS:53662 ../NEWS:54922 ../NEWS:56031 -#: ../NEWS:56857 ../NEWS:57380 ../NEWS:58067 ../NEWS:58286 ../NEWS:58494 -#: ../NEWS:60406 -msgid "Tools/Demos" +#: ../NEWS:8 ../NEWS:108 ../NEWS:329 ../NEWS:696 ../NEWS:1312 ../NEWS:1640 +#: ../NEWS:1987 ../NEWS:2811 ../NEWS:3677 ../NEWS:4122 ../NEWS:4508 +#: ../NEWS:4726 ../NEWS:5146 ../NEWS:5756 ../NEWS:5786 ../NEWS:5801 +#: ../NEWS:5814 ../NEWS:5857 ../NEWS:5881 ../NEWS:7574 ../NEWS:7618 +#: ../NEWS:7661 ../NEWS:7691 ../NEWS:7714 ../NEWS:7839 ../NEWS:7852 +#: ../NEWS:7866 ../NEWS:7987 ../NEWS:8021 ../NEWS:8039 ../NEWS:8071 +#: ../NEWS:8178 ../NEWS:8207 ../NEWS:8888 ../NEWS:8929 ../NEWS:8991 +#: ../NEWS:9474 ../NEWS:9558 ../NEWS:9940 ../NEWS:10048 ../NEWS:10108 +#: ../NEWS:10516 ../NEWS:10552 ../NEWS:10653 ../NEWS:10943 ../NEWS:10968 +#: ../NEWS:11000 ../NEWS:11359 ../NEWS:11405 ../NEWS:11986 ../NEWS:12006 +#: ../NEWS:12023 ../NEWS:13603 ../NEWS:13627 ../NEWS:13722 ../NEWS:13895 +#: ../NEWS:13967 ../NEWS:14030 ../NEWS:14048 ../NEWS:14215 ../NEWS:14616 +#: ../NEWS:14644 ../NEWS:15258 ../NEWS:15369 ../NEWS:15773 ../NEWS:15815 +#: ../NEWS:15828 ../NEWS:16220 ../NEWS:16777 ../NEWS:17651 ../NEWS:18312 +#: ../NEWS:20790 ../NEWS:20920 ../NEWS:21687 ../NEWS:21728 ../NEWS:21764 +#: ../NEWS:22005 ../NEWS:22314 ../NEWS:22563 ../NEWS:22612 ../NEWS:22677 +#: ../NEWS:23013 ../NEWS:23051 ../NEWS:23361 ../NEWS:23494 ../NEWS:23821 +#: ../NEWS:23857 ../NEWS:23933 ../NEWS:23978 ../NEWS:24171 ../NEWS:24189 +#: ../NEWS:24206 ../NEWS:24331 ../NEWS:24454 ../NEWS:24469 ../NEWS:26063 +#: ../NEWS:26208 ../NEWS:26253 ../NEWS:26823 ../NEWS:26899 ../NEWS:26924 +#: ../NEWS:27436 ../NEWS:27519 ../NEWS:27571 ../NEWS:27596 ../NEWS:27895 +#: ../NEWS:27986 ../NEWS:28013 ../NEWS:28292 ../NEWS:28342 ../NEWS:28366 +#: ../NEWS:28431 ../NEWS:28744 ../NEWS:28802 ../NEWS:29232 ../NEWS:29785 +#: ../NEWS:29819 ../NEWS:29831 ../NEWS:29890 ../NEWS:29910 ../NEWS:29942 +#: ../NEWS:30072 ../NEWS:30123 ../NEWS:30143 ../NEWS:30242 ../NEWS:31771 +#: ../NEWS:31808 ../NEWS:31899 ../NEWS:32453 ../NEWS:32474 ../NEWS:32869 +#: ../NEWS:32914 ../NEWS:32939 ../NEWS:33114 ../NEWS:33167 ../NEWS:33377 +#: ../NEWS:33419 ../NEWS:33452 ../NEWS:33757 ../NEWS:33809 ../NEWS:33854 +#: ../NEWS:33865 ../NEWS:34351 ../NEWS:34430 ../NEWS:34717 ../NEWS:34739 +#: ../NEWS:34767 ../NEWS:34786 ../NEWS:34799 ../NEWS:34815 ../NEWS:34829 +#: ../NEWS:34841 ../NEWS:34859 ../NEWS:34900 ../NEWS:34919 ../NEWS:34968 +#: ../NEWS:34998 ../NEWS:35112 ../NEWS:35132 ../NEWS:35956 ../NEWS:36318 +#: ../NEWS:36762 ../NEWS:37272 ../NEWS:37613 ../NEWS:37980 ../NEWS:38396 +#: ../NEWS:40315 ../NEWS:41076 ../NEWS:41614 ../NEWS:41920 ../NEWS:42181 +#: ../NEWS:45161 ../NEWS:45273 ../NEWS:45486 ../NEWS:45677 ../NEWS:45887 +#: ../NEWS:46131 ../NEWS:46450 ../NEWS:46754 ../NEWS:47354 ../NEWS:47643 +#: ../NEWS:49735 ../NEWS:50072 ../NEWS:50389 ../NEWS:50838 ../NEWS:51327 +#: ../NEWS:51669 ../NEWS:51693 ../NEWS:52017 ../NEWS:52047 ../NEWS:52111 +#: ../NEWS:52225 ../NEWS:52349 ../NEWS:52617 ../NEWS:53126 ../NEWS:53373 +#: ../NEWS:53587 ../NEWS:53879 ../NEWS:55185 ../NEWS:55246 ../NEWS:55647 +#: ../NEWS:56320 ../NEWS:56363 ../NEWS:57071 ../NEWS:57089 ../NEWS:57612 +#: ../NEWS:57647 ../NEWS:57675 ../NEWS:57767 ../NEWS:57854 ../NEWS:57959 +#: ../NEWS:58002 ../NEWS:58278 ../NEWS:58513 ../NEWS:58699 ../NEWS:58838 +msgid "Core and Builtins" msgstr "" #: ../NEWS:10 msgid "" -":gh:`154059`: Fix the time units in Tachyon flame graph tooltips by " -"accounting for the sampling interval when converting samples to milliseconds." +":gh:`156995`: Fix :class:`bytearray` sharing its buffer with the single-" +"byte :class:`bytes` object of the same value, so that writing to the " +"bytearray modified that :class:`bytes` object. This happened with :meth:" +"`bytearray.take_bytes` when exactly one byte remained, and on the free-" +"threaded build when a bytearray was shrunk to one byte from another thread." +msgstr "" + +#: ../NEWS:17 +msgid "" +":gh:`156910`: Fix a deadlock in the :term:`free threaded ` " +"build when setting ``__abstractmethods__`` on a type while another thread " +"holds the type lock." +msgstr "" + +#: ../NEWS:21 +msgid "" +":gh:`156126`: Fix a crash when importing a module whose name contains " +"characters that cannot be encoded to UTF-8 (such as lone surrogates) while :" +"option:`-X importtime <-X>` is enabled." +msgstr "" + +#: ../NEWS:25 +msgid "" +":gh:`154719`: Trailing whitespace in a t-string interpolation expression is " +"now preserved in :attr:`string.templatelib.Interpolation.expression`, up to " +"the closing ``}`` or the conversion (``!``), format (``:``), or debug " +"(``=``) delimiter. Explicit line continuations following a debug ``=`` " +"remain part of the debug text and are excluded from :attr:`~string." +"templatelib.Interpolation.expression`." +msgstr "" + +#: ../NEWS:33 ../NEWS:172 ../NEWS:382 ../NEWS:805 ../NEWS:1401 ../NEWS:1706 +#: ../NEWS:2187 ../NEWS:2992 ../NEWS:3449 ../NEWS:3922 ../NEWS:4314 +#: ../NEWS:4643 ../NEWS:4814 ../NEWS:5427 ../NEWS:5780 ../NEWS:5795 +#: ../NEWS:5807 ../NEWS:5848 ../NEWS:5873 ../NEWS:6284 ../NEWS:7612 +#: ../NEWS:7655 ../NEWS:7685 ../NEWS:7704 ../NEWS:7830 ../NEWS:7847 +#: ../NEWS:7860 ../NEWS:7977 ../NEWS:8015 ../NEWS:8033 ../NEWS:8065 +#: ../NEWS:8172 ../NEWS:8201 ../NEWS:8472 ../NEWS:8923 ../NEWS:8985 +#: ../NEWS:9132 ../NEWS:9291 ../NEWS:9552 ../NEWS:9670 ../NEWS:10043 +#: ../NEWS:10101 ../NEWS:10253 ../NEWS:10546 ../NEWS:10646 ../NEWS:10660 +#: ../NEWS:10766 ../NEWS:10961 ../NEWS:10993 ../NEWS:11132 ../NEWS:11394 +#: ../NEWS:11591 ../NEWS:11999 ../NEWS:12016 ../NEWS:12119 ../NEWS:12377 +#: ../NEWS:13621 ../NEWS:13716 ../NEWS:13889 ../NEWS:13960 ../NEWS:14023 +#: ../NEWS:14041 ../NEWS:14209 ../NEWS:14637 ../NEWS:14815 ../NEWS:15360 +#: ../NEWS:15375 ../NEWS:15808 ../NEWS:15821 ../NEWS:15844 ../NEWS:16330 +#: ../NEWS:16936 ../NEWS:17823 ../NEWS:18948 ../NEWS:20784 ../NEWS:20910 +#: ../NEWS:21006 ../NEWS:21721 ../NEWS:21770 ../NEWS:22085 ../NEWS:22375 +#: ../NEWS:22606 ../NEWS:22672 ../NEWS:22684 ../NEWS:23042 ../NEWS:23088 +#: ../NEWS:23519 ../NEWS:23849 ../NEWS:23928 ../NEWS:23971 ../NEWS:24165 +#: ../NEWS:24182 ../NEWS:24195 ../NEWS:24321 ../NEWS:24449 ../NEWS:24464 +#: ../NEWS:24491 ../NEWS:26199 ../NEWS:26271 ../NEWS:26892 ../NEWS:26918 +#: ../NEWS:26954 ../NEWS:27514 ../NEWS:27564 ../NEWS:27587 ../NEWS:27611 +#: ../NEWS:27980 ../NEWS:28003 ../NEWS:28020 ../NEWS:28336 ../NEWS:28361 +#: ../NEWS:28425 ../NEWS:28457 ../NEWS:28796 ../NEWS:28876 ../NEWS:29341 +#: ../NEWS:29810 ../NEWS:29824 ../NEWS:29883 ../NEWS:29902 ../NEWS:29936 +#: ../NEWS:30065 ../NEWS:30115 ../NEWS:30136 ../NEWS:30235 ../NEWS:30359 +#: ../NEWS:31800 ../NEWS:31893 ../NEWS:31913 ../NEWS:32468 ../NEWS:32551 +#: ../NEWS:32901 ../NEWS:32930 ../NEWS:32946 ../NEWS:33160 ../NEWS:33176 +#: ../NEWS:33412 ../NEWS:33426 ../NEWS:33462 ../NEWS:33803 ../NEWS:33849 +#: ../NEWS:33860 ../NEWS:33877 ../NEWS:34423 ../NEWS:34437 ../NEWS:34733 +#: ../NEWS:34749 ../NEWS:34774 ../NEWS:34792 ../NEWS:34809 ../NEWS:34824 +#: ../NEWS:34835 ../NEWS:34853 ../NEWS:34895 ../NEWS:34912 ../NEWS:34963 +#: ../NEWS:34992 ../NEWS:35105 ../NEWS:35124 ../NEWS:35141 ../NEWS:36014 +#: ../NEWS:36402 ../NEWS:36889 ../NEWS:37349 ../NEWS:37711 ../NEWS:38057 +#: ../NEWS:38713 ../NEWS:40479 ../NEWS:41146 ../NEWS:41689 ../NEWS:41984 +#: ../NEWS:42735 ../NEWS:45143 ../NEWS:45176 ../NEWS:45304 ../NEWS:45512 +#: ../NEWS:45703 ../NEWS:45908 ../NEWS:46206 ../NEWS:46527 ../NEWS:46852 +#: ../NEWS:47442 ../NEWS:48102 ../NEWS:49772 ../NEWS:50118 ../NEWS:50484 +#: ../NEWS:50808 ../NEWS:50911 ../NEWS:51374 ../NEWS:51761 ../NEWS:52064 +#: ../NEWS:52146 ../NEWS:52249 ../NEWS:52419 ../NEWS:52754 ../NEWS:53172 +#: ../NEWS:53390 ../NEWS:53627 ../NEWS:54164 ../NEWS:55191 ../NEWS:55209 +#: ../NEWS:55297 ../NEWS:55778 ../NEWS:56493 ../NEWS:57157 ../NEWS:57595 +#: ../NEWS:57622 ../NEWS:57660 ../NEWS:57680 ../NEWS:57787 ../NEWS:57881 +#: ../NEWS:57977 ../NEWS:58052 ../NEWS:58310 ../NEWS:58533 ../NEWS:58706 +#: ../NEWS:59064 +msgid "Library" +msgstr "" + +#: ../NEWS:35 +msgid "" +":gh:`157213`: Fix :func:`asyncio.gather` leaving stale await-graph edges on " +"children that outlive it." msgstr "" -#: ../NEWS:15 ../NEWS:124 ../NEWS:467 ../NEWS:1100 ../NEWS:1411 ../NEWS:1738 -#: ../NEWS:2603 ../NEWS:3246 ../NEWS:3703 ../NEWS:4600 ../NEWS:5223 -#: ../NEWS:6012 ../NEWS:8270 ../NEWS:9084 ../NEWS:9470 ../NEWS:10033 -#: ../NEWS:10932 ../NEWS:11394 ../NEWS:12134 ../NEWS:14414 ../NEWS:15564 -#: ../NEWS:16020 ../NEWS:16576 ../NEWS:18095 ../NEWS:20574 ../NEWS:21792 -#: ../NEWS:22113 ../NEWS:22807 ../NEWS:23149 ../NEWS:23591 ../NEWS:25864 -#: ../NEWS:29566 ../NEWS:31523 ../NEWS:32239 ../NEWS:32670 ../NEWS:32916 -#: ../NEWS:33558 ../NEWS:34148 ../NEWS:34504 ../NEWS:35758 ../NEWS:36111 -#: ../NEWS:36563 ../NEWS:37069 ../NEWS:37770 ../NEWS:38155 ../NEWS:40108 -#: ../NEWS:40866 ../NEWS:41410 ../NEWS:41941 ../NEWS:45471 ../NEWS:45689 -#: ../NEWS:47417 ../NEWS:49870 ../NEWS:50637 ../NEWS:51101 ../NEWS:51128 -#: ../NEWS:53172 ../NEWS:53383 ../NEWS:53674 ../NEWS:54970 ../NEWS:55029 -#: ../NEWS:55446 ../NEWS:56149 +#: ../NEWS:38 +msgid "" +":gh:`157159`: The usage message printed by ``python -m tabnanny`` when no " +"arguments are given now suggests ``python -m`` instead of the source file." +msgstr "" + +#: ../NEWS:41 +msgid "" +":gh:`157058`: :func:`asyncio.wait_for` with a non-positive timeout now " +"records the waiter in the call graph." +msgstr "" + +#: ../NEWS:44 +msgid "" +":gh:`156988`: :func:`asyncio.print_call_graph` no longer truncates the call " +"stack at a synchronous generator." +msgstr "" + +#: ../NEWS:47 +msgid "" +":gh:`156970`: Set the docstring of :attr:`unittest.mock.Mock.return_value`." +msgstr "" + +#: ../NEWS:49 +msgid "" +":gh:`156924`: :meth:`annotationlib.ForwardRef.evaluate` now resolves :ref:" +"`lazy import ` proxies found in the namespace. With :attr:" +"`~annotationlib.Format.FORWARDREF`, a lazy import that fails to resolve now " +"results in a :class:`~annotationlib.ForwardRef` instead of the :class:`lazy " +"import proxy `, and with :attr:`~annotationlib.Format." +"VALUE` the underlying exception is propagated." +msgstr "" + +#: ../NEWS:57 +msgid "" +":gh:`127057`: Fix :class:`asyncio.ProactorEventLoop` UDP transports so that " +"a :exc:`ConnectionResetError` raised by ``WSARecvFrom`` no longer stops the " +"read loop." +msgstr "" + +#: ../NEWS:61 +msgid "" +":gh:`156512`: Fix :mod:`asyncio` losing a connection twice when " +"``resume_writing()`` closes the transport." +msgstr "" + +#: ../NEWS:64 +msgid "" +":gh:`155418`: Fix :class:`asyncio.TaskGroup` hang when a task created by :" +"func:`asyncio.eager_task_factory` cancels the group before suspending." +msgstr "" + +#: ../NEWS:67 +msgid "" +":gh:`155143`: Fix :func:`asyncio.shield` leaking the calling task via the " +"await-graph and callbacks when called on a future that never resolves." +msgstr "" + +#: ../NEWS:70 +msgid "" +":gh:`151179`: Fix a pidfd leak in ``_PidfdChildWatcher`` on Linux: the " +"watcher no longer leaks the process file descriptor when ``waitpid()`` fails " +"with an error other than :exc:`ChildProcessError`." +msgstr "" + +#: ../NEWS:76 +msgid "Python 3.15.0 release candidate 2" +msgstr "" + +#: ../NEWS:78 +msgid "*Release date: 2026-09-01*" +msgstr "" + +#: ../NEWS:81 ../NEWS:319 ../NEWS:662 ../NEWS:1292 ../NEWS:1603 ../NEWS:1930 +#: ../NEWS:2795 ../NEWS:3438 ../NEWS:3895 ../NEWS:4792 ../NEWS:5415 +#: ../NEWS:6204 ../NEWS:8462 ../NEWS:9276 ../NEWS:9662 ../NEWS:10225 +#: ../NEWS:11124 ../NEWS:11586 ../NEWS:12326 ../NEWS:14606 ../NEWS:15756 +#: ../NEWS:16212 ../NEWS:16768 ../NEWS:18287 ../NEWS:20766 ../NEWS:21984 +#: ../NEWS:22305 ../NEWS:22999 ../NEWS:23341 ../NEWS:23783 ../NEWS:26056 +#: ../NEWS:29758 ../NEWS:31715 ../NEWS:32431 ../NEWS:32862 ../NEWS:33108 +#: ../NEWS:33750 ../NEWS:34340 ../NEWS:34696 ../NEWS:35950 ../NEWS:36303 +#: ../NEWS:36755 ../NEWS:37261 ../NEWS:37962 ../NEWS:38347 ../NEWS:40300 +#: ../NEWS:41058 ../NEWS:41602 ../NEWS:42133 ../NEWS:45663 ../NEWS:45881 +#: ../NEWS:47609 ../NEWS:50062 ../NEWS:50829 ../NEWS:51293 ../NEWS:51320 +#: ../NEWS:53364 ../NEWS:53575 ../NEWS:53866 ../NEWS:55162 ../NEWS:55221 +#: ../NEWS:55638 ../NEWS:56341 msgid "Security" msgstr "" -#: ../NEWS:17 +#: ../NEWS:83 +msgid "" +":gh:`156723`: Update bundled `libexpat `_ to " +"version 2.8.4." +msgstr "" + +#: ../NEWS:86 +msgid "" +":gh:`156002`: Bound the amount of data :mod:`zipfile` decompresses per read " +"for members compressed with bzip2, LZMA, or Zstandard, matching the existing " +"limit for deflate. A small archive member could previously expand into an " +"unbounded allocation even when read in small chunks." +msgstr "" + +#: ../NEWS:91 msgid "" -":gh:`155558`: Update bundled `libexpat `_ to " -"version 2.8.3 for the fix to :cve:`2026-72522`." +":gh:`155999`: Fix the :mod:`tarfile` ``tar`` and ``data`` extraction filters " +"creating directories outside the destination for members whose name leaves " +"the destination and returns to it, such as ``../evil/../dest/sub/file``. The " +"containment check used the resolved path, but intermediate directories were " +"created from the name as given." msgstr "" -#: ../NEWS:20 +#: ../NEWS:97 msgid "" ":gh:`155292`: Change the :mod:`stringprep` module and :mod:`encodings.idna` " "codec to not consider Unicode codepoint attributes beyond those defined in :" "rfc:`3454`." msgstr "" -#: ../NEWS:24 +#: ../NEWS:101 msgid "" ":gh:`155694`: Fix :cve:`2026-15806` by scoping :class:`~urllib.request." "HTTPPasswordMgr` credentials to the URL scheme, preventing credentials " @@ -92,60 +292,176 @@ msgid "" "without a scheme continue to match any scheme." msgstr "" -#: ../NEWS:31 ../NEWS:187 ../NEWS:610 ../NEWS:1209 ../NEWS:1514 ../NEWS:1995 -#: ../NEWS:2800 ../NEWS:3257 ../NEWS:3730 ../NEWS:4122 ../NEWS:4451 -#: ../NEWS:4622 ../NEWS:5235 ../NEWS:5588 ../NEWS:5603 ../NEWS:5615 -#: ../NEWS:5656 ../NEWS:5681 ../NEWS:6092 ../NEWS:7420 ../NEWS:7463 -#: ../NEWS:7493 ../NEWS:7512 ../NEWS:7638 ../NEWS:7655 ../NEWS:7668 -#: ../NEWS:7785 ../NEWS:7823 ../NEWS:7841 ../NEWS:7873 ../NEWS:7980 -#: ../NEWS:8009 ../NEWS:8280 ../NEWS:8731 ../NEWS:8793 ../NEWS:8940 -#: ../NEWS:9099 ../NEWS:9360 ../NEWS:9478 ../NEWS:9851 ../NEWS:9909 -#: ../NEWS:10061 ../NEWS:10354 ../NEWS:10454 ../NEWS:10468 ../NEWS:10574 -#: ../NEWS:10769 ../NEWS:10801 ../NEWS:10940 ../NEWS:11202 ../NEWS:11399 -#: ../NEWS:11807 ../NEWS:11824 ../NEWS:11927 ../NEWS:12185 ../NEWS:13429 -#: ../NEWS:13524 ../NEWS:13697 ../NEWS:13768 ../NEWS:13831 ../NEWS:13849 -#: ../NEWS:14017 ../NEWS:14445 ../NEWS:14623 ../NEWS:15168 ../NEWS:15183 -#: ../NEWS:15616 ../NEWS:15629 ../NEWS:15652 ../NEWS:16138 ../NEWS:16744 -#: ../NEWS:17631 ../NEWS:18756 ../NEWS:20592 ../NEWS:20718 ../NEWS:20814 -#: ../NEWS:21529 ../NEWS:21578 ../NEWS:21893 ../NEWS:22183 ../NEWS:22414 -#: ../NEWS:22480 ../NEWS:22492 ../NEWS:22850 ../NEWS:22896 ../NEWS:23327 -#: ../NEWS:23657 ../NEWS:23736 ../NEWS:23779 ../NEWS:23973 ../NEWS:23990 -#: ../NEWS:24003 ../NEWS:24129 ../NEWS:24257 ../NEWS:24272 ../NEWS:24299 -#: ../NEWS:26007 ../NEWS:26079 ../NEWS:26700 ../NEWS:26726 ../NEWS:26762 -#: ../NEWS:27322 ../NEWS:27372 ../NEWS:27395 ../NEWS:27419 ../NEWS:27788 -#: ../NEWS:27811 ../NEWS:27828 ../NEWS:28144 ../NEWS:28169 ../NEWS:28233 -#: ../NEWS:28265 ../NEWS:28604 ../NEWS:28684 ../NEWS:29149 ../NEWS:29618 -#: ../NEWS:29632 ../NEWS:29691 ../NEWS:29710 ../NEWS:29744 ../NEWS:29873 -#: ../NEWS:29923 ../NEWS:29944 ../NEWS:30043 ../NEWS:30167 ../NEWS:31608 -#: ../NEWS:31701 ../NEWS:31721 ../NEWS:32276 ../NEWS:32359 ../NEWS:32709 -#: ../NEWS:32738 ../NEWS:32754 ../NEWS:32968 ../NEWS:32984 ../NEWS:33220 -#: ../NEWS:33234 ../NEWS:33270 ../NEWS:33611 ../NEWS:33657 ../NEWS:33668 -#: ../NEWS:33685 ../NEWS:34231 ../NEWS:34245 ../NEWS:34541 ../NEWS:34557 -#: ../NEWS:34582 ../NEWS:34600 ../NEWS:34617 ../NEWS:34632 ../NEWS:34643 -#: ../NEWS:34661 ../NEWS:34703 ../NEWS:34720 ../NEWS:34771 ../NEWS:34800 -#: ../NEWS:34913 ../NEWS:34932 ../NEWS:34949 ../NEWS:35822 ../NEWS:36210 -#: ../NEWS:36697 ../NEWS:37157 ../NEWS:37519 ../NEWS:37865 ../NEWS:38521 -#: ../NEWS:40287 ../NEWS:40954 ../NEWS:41497 ../NEWS:41792 ../NEWS:42543 -#: ../NEWS:44951 ../NEWS:44984 ../NEWS:45112 ../NEWS:45320 ../NEWS:45511 -#: ../NEWS:45716 ../NEWS:46014 ../NEWS:46335 ../NEWS:46660 ../NEWS:47250 -#: ../NEWS:47910 ../NEWS:49580 ../NEWS:49926 ../NEWS:50292 ../NEWS:50616 -#: ../NEWS:50719 ../NEWS:51182 ../NEWS:51569 ../NEWS:51872 ../NEWS:51954 -#: ../NEWS:52057 ../NEWS:52227 ../NEWS:52562 ../NEWS:52980 ../NEWS:53198 -#: ../NEWS:53435 ../NEWS:53972 ../NEWS:54999 ../NEWS:55017 ../NEWS:55105 -#: ../NEWS:55586 ../NEWS:56301 ../NEWS:56965 ../NEWS:57403 ../NEWS:57430 -#: ../NEWS:57468 ../NEWS:57488 ../NEWS:57595 ../NEWS:57689 ../NEWS:57785 -#: ../NEWS:57860 ../NEWS:58118 ../NEWS:58341 ../NEWS:58514 ../NEWS:58872 -msgid "Library" +#: ../NEWS:110 +msgid "" +":gh:`155725`: :mod:`tracemalloc` no longer acquires the :term:`GIL` nor " +"creates a temporary thread state to trace memory allocations: traceback " +"frames now store plain UTF-8 strings instead of Python str objects, and " +"tracebacks are captured using the Python thread state already associated " +"with the calling thread, even if it is not attached. Threads without a " +"Python thread state record the traceback as ````." +msgstr "" + +#: ../NEWS:117 +msgid "" +":gh:`148750`: :mod:`encodings` is no longer frozen, due to issues importing " +"submodules when using a zipped standard library." +msgstr "" + +#: ../NEWS:120 +msgid "" +":gh:`155254`: Avoid warning about missing standard library when using :ref:" +"`sys-path-init-_pth-files`." +msgstr "" + +#: ../NEWS:123 +msgid "" +":gh:`155978`: Fix a memory leak in the free-threaded build when setting or " +"deleting a special method (such as ``__repr__``) on a class that has many " +"subclasses." +msgstr "" + +#: ../NEWS:127 +msgid "" +":gh:`155752`: Fix a crash when a :class:`types.GenericAlias` argument gains " +"a ``__typing_subst__`` hook after the alias parameters have been cached." +msgstr "" + +#: ../NEWS:130 +msgid "" +":gh:`129752`: Don't update adaptive counters in the free-threaded build when " +"thread-local bytecode is disabled (``-X tlbc=0``). Patch by Donghee Na." +msgstr "" + +#: ../NEWS:133 +msgid "" +":gh:`155515`: Track the internal HAMT iterators, which back iteration over " +"a :class:`contextvars.Context`, with the garbage collector. A reference " +"cycle running through such an iterator was never collected, leaking the " +"whole context it iterated over." +msgstr "" + +#: ../NEWS:138 +msgid "" +":gh:`155400`: Fix a deadlock in the free-threaded build between two threads " +"assigning to a special method of the same class. While applying the type " +"slot updates with the world stopped, only the type lock was prevented from " +"being released; the type dict mutex could still be released and re-acquired, " +"in the wrong order, if the thread blocked on the stop-the-world mutex." +msgstr "" + +#: ../NEWS:145 +msgid "" +":gh:`155363`: Fix a leak in the :term:`free-threaded build` when creating a " +"thread state fails after an internal QSBR slot has been reserved for it. The " +"slot could never be reclaimed, so the QSBR array grew without bound across " +"repeated failures." +msgstr "" + +#: ../NEWS:150 +msgid "" +":gh:`154701`: Fix an infinite loop in JIT when a ``FOR_ITER`` side exit " +"links an executor back to itself." +msgstr "" + +#: ../NEWS:153 +msgid "" +":gh:`154196`: Improve :exc:`AttributeError` messages from unresolved lazy " +"imports. Patch by Bartosz Sławecki." +msgstr "" + +#: ../NEWS:156 +msgid "" +":gh:`151377`: Fix races in free-threaded builds when updating type slots for " +"newly created classes and when removing entries from a base type's " +"subclasses dictionary." +msgstr "" + +#: ../NEWS:160 +msgid "" +":gh:`148817`: Fold large constant list and set literals used as the iterable " +"of a :keyword:`for` loop or ``in``/``not in`` test into a constant :class:" +"`tuple` or :class:`frozenset`, restoring an optimization previously done by " +"the AST optimizer that was lost when constant folding moved to the CFG." +msgstr "" + +#: ../NEWS:166 +msgid "" +":gh:`85260`: :func:`compile` now raises :exc:`ValueError` instead of " +"crashing on a debug build if an identifier field of an AST node (such as the " +"name of a function, a class, an imported module or a caught exception) is " +"``\"None\"``, ``\"True\"`` or ``\"False\"``." +msgstr "" + +#: ../NEWS:174 +msgid "" +":gh:`156523`: Fix :func:`asyncio.as_completed` not recording the awaiting " +"task in the call graph." +msgstr "" + +#: ../NEWS:177 +msgid "" +":gh:`156408`: Fix :func:`asyncio.print_call_graph` raising :exc:" +"`AttributeError` when called on a task that has already finished." msgstr "" -#: ../NEWS:33 +#: ../NEWS:180 +msgid "" +":gh:`156404`: Restore compatibility with :file:`.pth` files generated before " +"Python 3.15 in the :mod:`site` module. Inject the ``fullname`` variable in " +"the frame which executes pth code." +msgstr "" + +#: ../NEWS:184 +msgid "" +":gh:`156353`: Fix :mod:`configparser` parsing when using whitespace in " +"*delimiters*." +msgstr "" + +#: ../NEWS:187 +msgid "" +":gh:`156112`: :mod:`!_ios_support` no longer fails to import when :func:" +"`ctypes.util.find_library` cannot resolve the ObjC runtime through the dyld " +"shared cache, as is the case on iOS 13. The runtime is now loaded by name, " +"which dyld resolves against the cache directly." +msgstr "" + +#: ../NEWS:192 +msgid "" +":gh:`155974`: Fix a regression in Python 3.15: :meth:`~curses.window." +"addstr`, :meth:`~curses.window.addnstr`, :meth:`~curses.window.insstr` and :" +"meth:`~curses.window.insnstr` again restore the window attributes when the " +"write fails, instead of leaving the temporary *attr* applied." +msgstr "" + +#: ../NEWS:197 +msgid "" +":gh:`155952`: Fix the signatures of :meth:`sqlite3.Connection.execute`, :" +"func:`warnings.warn` and :func:`locale.setlocale` which rendered " +"```` instead of the correct defaults for parameters." +msgstr "" + +#: ../NEWS:201 +msgid "" +":gh:`155888`: Fix :meth:`asyncio.WriteTransport.writelines` hanging the " +"transport when the last data chunk is empty." +msgstr "" + +#: ../NEWS:204 msgid "" ":gh:`155869`: Fix :meth:`!reorganize` in :mod:`dbm.dumb` failing to persist " "updated value offsets, which could cause data loss after reopening the " "database." msgstr "" -#: ../NEWS:37 +#: ../NEWS:208 +msgid "" +":gh:`155781`: Fix a possible crash in free-threaded builds when the :mod:" +"`sqlite3` converter registry is modified concurrently while a cursor builds " +"its row cast map." +msgstr "" + +#: ../NEWS:212 msgid "" ":gh:`155702`: Fix :class:`sqlite3.Blob` slice assignment with a step. It " "patched the bytes object read from the blob, which for a single byte is an " @@ -153,25 +469,32 @@ msgid "" "process." msgstr "" -#: ../NEWS:42 +#: ../NEWS:217 +msgid "" +":gh:`155468`: Fix :mod:`netrc` to distinguish empty quoted tokens from end-" +"of-file, so malformed files no longer cause the remaining content to be " +"silently ignored." +msgstr "" + +#: ../NEWS:221 msgid "" ":gh:`155519`: Avoid a data-race in free-threaded builds when reading and " "writing context variables from different threads." msgstr "" -#: ../NEWS:45 +#: ../NEWS:224 msgid "" ":gh:`155009`: Fix :class:`argparse.ArgumentParser` to preserve the program " "name from ``sys.argv[0]`` when a named module is executed as the main " "program without replacing ``sys.argv[0]``." msgstr "" -#: ../NEWS:49 +#: ../NEWS:228 msgid "" ":gh:`155063`: Bump the version of pip bundled in ensurepip to version 26.2.1" msgstr "" -#: ../NEWS:51 +#: ../NEWS:230 msgid "" ":gh:`153711`: On macOS, add run-time checks around the syscalls :manpage:" "`pipe2 (2)` and :manpage:`dup3 (2)`, in addition to the existing build-time " @@ -179,17 +502,17 @@ msgid "" "available) can run on macOS 26 (where they aren't)." msgstr "" -#: ../NEWS:56 +#: ../NEWS:235 msgid "" ":gh:`154871`: Fixed a crash in :meth:`asyncio.Task.get_context` when called " "on an uninitialized task." msgstr "" -#: ../NEWS:59 +#: ../NEWS:238 msgid ":gh:`154568`: Fix :mod:`array` unpickling of little-endian float16." msgstr "" -#: ../NEWS:61 +#: ../NEWS:240 msgid "" ":gh:`154566`: Fix :meth:`array.array.byteswap` corrupting data for ``'Zd'`` " "(complex double) arrays with more than one element: the 16-byte item loop " @@ -197,139 +520,203 @@ msgid "" "after the first to be scrambled." msgstr "" -#: ../NEWS:66 +#: ../NEWS:245 +msgid "" +":gh:`154467`: Fixed :mod:`pdb` remote attaching (``python -m pdb -p PID``) " +"sending an empty prompt to the client instead of ``(Pdb)`` when the target " +"process has an interactive terminal." +msgstr "" + +#: ../NEWS:249 +msgid "" +":gh:`153772`: :func:`isinstance` checks against :mod:`collections.abc` " +"classes such as :class:`~collections.abc.Mapping` no longer raise :exc:" +"`AttributeError` when the instance has no ``__class__``. The abstract base " +"class machinery now falls back to the object's type in that case, matching " +"the behaviour of the built-in :func:`isinstance`." +msgstr "" + +#: ../NEWS:255 msgid "" ":gh:`154086`: Store per-thread sample counts in Tachyon flamegraphs so " "filtering a thread updates frame widths and totals." msgstr "" -#: ../NEWS:69 +#: ../NEWS:258 +msgid "" +":gh:`154060`: Store measured duration and sampling rate in Tachyon binary " +"profiles so they remain available in replayed flamegraphs." +msgstr "" + +#: ../NEWS:261 +msgid "" +":gh:`154085`: Prevent differential flamegraphs from duplicating self time " +"across line nodes for the same function." +msgstr "" + +#: ../NEWS:264 +msgid "" +":gh:`154088`: Make Tachyon count and render elided stacks consistently in " +"differential flamegraphs." +msgstr "" + +#: ../NEWS:267 +msgid "" +":gh:`154089`: Do not show unavailable sampling efficiency statistics in " +"replayed Tachyon flamegraphs." +msgstr "" + +#: ../NEWS:270 msgid "" ":gh:`153158`: Remove the erroneous *width* argument of :meth:`!calendar." "HTMLCalendar.formatmonthpage`, which could drop the year from the heading." msgstr "" -#: ../NEWS:73 +#: ../NEWS:274 msgid "" ":gh:`113329`: Fix :exc:`OSError` being raised when trying to run doctests on " "a class objects in the REPL. Patch by Sten Wessel." msgstr "" -#: ../NEWS:77 ../NEWS:134 ../NEWS:501 ../NEWS:1120 ../NEWS:1448 ../NEWS:1795 -#: ../NEWS:2619 ../NEWS:3485 ../NEWS:3930 ../NEWS:4316 ../NEWS:4534 -#: ../NEWS:4954 ../NEWS:5564 ../NEWS:5594 ../NEWS:5609 ../NEWS:5622 -#: ../NEWS:5665 ../NEWS:5689 ../NEWS:7382 ../NEWS:7426 ../NEWS:7469 -#: ../NEWS:7499 ../NEWS:7522 ../NEWS:7647 ../NEWS:7660 ../NEWS:7674 -#: ../NEWS:7795 ../NEWS:7829 ../NEWS:7847 ../NEWS:7879 ../NEWS:7986 -#: ../NEWS:8015 ../NEWS:8696 ../NEWS:8737 ../NEWS:8799 ../NEWS:9282 -#: ../NEWS:9366 ../NEWS:9748 ../NEWS:9856 ../NEWS:9916 ../NEWS:10324 -#: ../NEWS:10360 ../NEWS:10461 ../NEWS:10751 ../NEWS:10776 ../NEWS:10808 -#: ../NEWS:11167 ../NEWS:11213 ../NEWS:11794 ../NEWS:11814 ../NEWS:11831 -#: ../NEWS:13411 ../NEWS:13435 ../NEWS:13530 ../NEWS:13703 ../NEWS:13775 -#: ../NEWS:13838 ../NEWS:13856 ../NEWS:14023 ../NEWS:14424 ../NEWS:14452 -#: ../NEWS:15066 ../NEWS:15177 ../NEWS:15581 ../NEWS:15623 ../NEWS:15636 -#: ../NEWS:16028 ../NEWS:16585 ../NEWS:17459 ../NEWS:18120 ../NEWS:20598 -#: ../NEWS:20728 ../NEWS:21495 ../NEWS:21536 ../NEWS:21572 ../NEWS:21813 -#: ../NEWS:22122 ../NEWS:22371 ../NEWS:22420 ../NEWS:22485 ../NEWS:22821 -#: ../NEWS:22859 ../NEWS:23169 ../NEWS:23302 ../NEWS:23629 ../NEWS:23665 -#: ../NEWS:23741 ../NEWS:23786 ../NEWS:23979 ../NEWS:23997 ../NEWS:24014 -#: ../NEWS:24139 ../NEWS:24262 ../NEWS:24277 ../NEWS:25871 ../NEWS:26016 -#: ../NEWS:26061 ../NEWS:26631 ../NEWS:26707 ../NEWS:26732 ../NEWS:27244 -#: ../NEWS:27327 ../NEWS:27379 ../NEWS:27404 ../NEWS:27703 ../NEWS:27794 -#: ../NEWS:27821 ../NEWS:28100 ../NEWS:28150 ../NEWS:28174 ../NEWS:28239 -#: ../NEWS:28552 ../NEWS:28610 ../NEWS:29040 ../NEWS:29593 ../NEWS:29627 -#: ../NEWS:29639 ../NEWS:29698 ../NEWS:29718 ../NEWS:29750 ../NEWS:29880 -#: ../NEWS:29931 ../NEWS:29951 ../NEWS:30050 ../NEWS:31579 ../NEWS:31616 -#: ../NEWS:31707 ../NEWS:32261 ../NEWS:32282 ../NEWS:32677 ../NEWS:32722 -#: ../NEWS:32747 ../NEWS:32922 ../NEWS:32975 ../NEWS:33185 ../NEWS:33227 -#: ../NEWS:33260 ../NEWS:33565 ../NEWS:33617 ../NEWS:33662 ../NEWS:33673 -#: ../NEWS:34159 ../NEWS:34238 ../NEWS:34525 ../NEWS:34547 ../NEWS:34575 -#: ../NEWS:34594 ../NEWS:34607 ../NEWS:34623 ../NEWS:34637 ../NEWS:34649 -#: ../NEWS:34667 ../NEWS:34708 ../NEWS:34727 ../NEWS:34776 ../NEWS:34806 -#: ../NEWS:34920 ../NEWS:34940 ../NEWS:35764 ../NEWS:36126 ../NEWS:36570 -#: ../NEWS:37080 ../NEWS:37421 ../NEWS:37788 ../NEWS:38204 ../NEWS:40123 -#: ../NEWS:40884 ../NEWS:41422 ../NEWS:41728 ../NEWS:41989 ../NEWS:44969 -#: ../NEWS:45081 ../NEWS:45294 ../NEWS:45485 ../NEWS:45695 ../NEWS:45939 -#: ../NEWS:46258 ../NEWS:46562 ../NEWS:47162 ../NEWS:47451 ../NEWS:49543 -#: ../NEWS:49880 ../NEWS:50197 ../NEWS:50646 ../NEWS:51135 ../NEWS:51477 -#: ../NEWS:51501 ../NEWS:51825 ../NEWS:51855 ../NEWS:51919 ../NEWS:52033 -#: ../NEWS:52157 ../NEWS:52425 ../NEWS:52934 ../NEWS:53181 ../NEWS:53395 -#: ../NEWS:53687 ../NEWS:54993 ../NEWS:55054 ../NEWS:55455 ../NEWS:56128 -#: ../NEWS:56171 ../NEWS:56879 ../NEWS:56897 ../NEWS:57420 ../NEWS:57455 -#: ../NEWS:57483 ../NEWS:57575 ../NEWS:57662 ../NEWS:57767 ../NEWS:57810 -#: ../NEWS:58086 ../NEWS:58321 ../NEWS:58507 ../NEWS:58646 -msgid "Core and Builtins" +#: ../NEWS:278 ../NEWS:619 ../NEWS:1187 ../NEWS:1553 ../NEWS:1872 ../NEWS:2659 +#: ../NEWS:3321 ../NEWS:3845 ../NEWS:4255 ../NEWS:5327 ../NEWS:6016 +#: ../NEWS:8340 ../NEWS:9196 ../NEWS:9583 ../NEWS:10163 ../NEWS:10731 +#: ../NEWS:11051 ../NEWS:11516 ../NEWS:12151 ../NEWS:14496 ../NEWS:15150 +#: ../NEWS:15646 ../NEWS:16127 ../NEWS:16648 ../NEWS:17493 ../NEWS:18079 +#: ../NEWS:20257 ../NEWS:21531 ../NEWS:21758 ../NEWS:21950 ../NEWS:22227 +#: ../NEWS:22497 ../NEWS:22921 ../NEWS:23262 ../NEWS:23488 ../NEWS:23680 +#: ../NEWS:25616 ../NEWS:26248 ../NEWS:26721 ../NEWS:27309 ../NEWS:27814 +#: ../NEWS:28008 ../NEWS:28199 ../NEWS:28653 ../NEWS:29062 ../NEWS:29592 +#: ../NEWS:31428 ../NEWS:32296 ../NEWS:32742 ../NEWS:33025 ../NEWS:33305 +#: ../NEWS:33682 ../NEWS:34158 ../NEWS:34620 ../NEWS:35720 ../NEWS:36201 +#: ../NEWS:36659 ../NEWS:37112 ../NEWS:37515 ../NEWS:37917 ../NEWS:38288 +#: ../NEWS:39838 ../NEWS:40955 ../NEWS:41426 ../NEWS:41842 ../NEWS:44573 +#: ../NEWS:45229 ../NEWS:45451 ../NEWS:45602 ../NEWS:45822 ../NEWS:46069 +#: ../NEWS:46398 ../NEWS:47221 ../NEWS:47541 ../NEWS:49252 ../NEWS:49941 +#: ../NEWS:50051 ../NEWS:50286 ../NEWS:50678 ../NEWS:50814 ../NEWS:51075 +#: ../NEWS:51596 ../NEWS:51680 ../NEWS:51971 ../NEWS:52036 ../NEWS:52208 +#: ../NEWS:52326 ../NEWS:52595 ../NEWS:53050 ../NEWS:53336 ../NEWS:53524 +#: ../NEWS:53837 ../NEWS:55033 ../NEWS:55588 ../NEWS:56250 ../NEWS:56971 +#: ../NEWS:57523 ../NEWS:57583 ../NEWS:57600 ../NEWS:57842 ../NEWS:57947 +#: ../NEWS:58460 ../NEWS:58674 ../NEWS:58809 ../NEWS:60341 +msgid "Build" msgstr "" -#: ../NEWS:79 +#: ../NEWS:280 msgid "" -":gh:`155752`: Fix a crash when a :class:`types.GenericAlias` argument gains " -"a ``__typing_subst__`` hook after the alias parameters have been cached." +":gh:`156369`: Update Android and iOS build scripts to use OpenSSL 3.5.8." msgstr "" -#: ../NEWS:82 +#: ../NEWS:282 msgid "" -":gh:`155515`: Track the internal HAMT iterators, which back iteration over " -"a :class:`contextvars.Context`, with the garbage collector. A reference " -"cycle running through such an iterator was never collected, leaking the " -"whole context it iterated over." +":gh:`156115`: iOS simulator builds are now configured with ``-mios-simulator-" +"version-min`` instead of the device's ``-mios-version-min``. The device flag " +"made the linker reject libraries resolved from the simulator SDK, so library " +"detection silently failed." msgstr "" -#: ../NEWS:87 -msgid "" -":gh:`155400`: Fix a deadlock in the free-threaded build between two threads " -"assigning to a special method of the same class. While applying the type " -"slot updates with the world stopped, only the type lock was prevented from " -"being released; the type dict mutex could still be released and re-acquired, " -"in the wrong order, if the thread blocked on the stop-the-world mutex." +#: ../NEWS:288 ../NEWS:629 ../NEWS:1213 ../NEWS:1558 ../NEWS:1882 ../NEWS:2712 +#: ../NEWS:3359 ../NEWS:3416 ../NEWS:3877 ../NEWS:4287 ../NEWS:5384 +#: ../NEWS:6059 ../NEWS:8423 ../NEWS:9241 ../NEWS:9616 ../NEWS:11091 +#: ../NEWS:11537 ../NEWS:12207 ../NEWS:15172 ../NEWS:15656 ../NEWS:16153 +#: ../NEWS:16663 ../NEWS:17522 ../NEWS:18103 ../NEWS:20344 ../NEWS:21569 +#: ../NEWS:21958 ../NEWS:22244 ../NEWS:22530 ../NEWS:22939 ../NEWS:23284 +#: ../NEWS:23716 ../NEWS:25730 ../NEWS:26736 ../NEWS:27341 ../NEWS:27844 +#: ../NEWS:28239 ../NEWS:28700 ../NEWS:29190 ../NEWS:29647 ../NEWS:31474 +#: ../NEWS:32305 ../NEWS:32764 ../NEWS:33048 ../NEWS:33331 ../NEWS:34182 +#: ../NEWS:34627 ../NEWS:35741 ../NEWS:36211 ../NEWS:36671 ../NEWS:37129 +#: ../NEWS:37520 ../NEWS:38298 ../NEWS:39910 ../NEWS:40978 ../NEWS:41487 +#: ../NEWS:41856 ../NEWS:42101 ../NEWS:44691 ../NEWS:45236 ../NEWS:45619 +#: ../NEWS:45827 ../NEWS:46074 ../NEWS:46413 ../NEWS:46719 ../NEWS:47254 +#: ../NEWS:49364 ../NEWS:49961 ../NEWS:50292 ../NEWS:50703 ../NEWS:51081 +#: ../NEWS:51652 ../NEWS:51901 ../NEWS:52031 ../NEWS:52321 ../NEWS:52562 +#: ../NEWS:53092 ../NEWS:53324 ../NEWS:53827 ../NEWS:55096 ../NEWS:55601 +#: ../NEWS:56235 ../NEWS:57030 ../NEWS:57077 ../NEWS:57534 ../NEWS:58823 +#: ../NEWS:60637 +msgid "Windows" msgstr "" -#: ../NEWS:94 -msgid "" -":gh:`155363`: Fix a leak in the :term:`free-threaded build` when creating a " -"thread state fails after an internal QSBR slot has been reserved for it. The " -"slot could never be reclaimed, so the QSBR array grew without bound across " -"repeated failures." +#: ../NEWS:290 +msgid ":gh:`156369`: Updated Windows builds to use OpenSSL 3.5.8." +msgstr "" + +#: ../NEWS:293 ../NEWS:1221 ../NEWS:1568 ../NEWS:1897 ../NEWS:2724 ../NEWS:3365 +#: ../NEWS:3867 ../NEWS:6044 ../NEWS:9231 ../NEWS:9610 ../NEWS:10195 +#: ../NEWS:10746 ../NEWS:12197 ../NEWS:15197 ../NEWS:16174 ../NEWS:16685 +#: ../NEWS:17563 ../NEWS:18115 ../NEWS:20394 ../NEWS:21590 ../NEWS:22270 +#: ../NEWS:22962 ../NEWS:23299 ../NEWS:23734 ../NEWS:25827 ../NEWS:26752 +#: ../NEWS:27367 ../NEWS:28253 ../NEWS:28706 ../NEWS:29215 ../NEWS:29661 +#: ../NEWS:31502 ../NEWS:32335 ../NEWS:33053 ../NEWS:33338 ../NEWS:33705 +#: ../NEWS:34191 ../NEWS:34642 ../NEWS:35784 ../NEWS:36223 ../NEWS:36678 +#: ../NEWS:37152 ../NEWS:38305 ../NEWS:40029 ../NEWS:40992 ../NEWS:41540 +#: ../NEWS:44801 ../NEWS:45464 ../NEWS:45624 ../NEWS:45836 ../NEWS:46093 +#: ../NEWS:46424 ../NEWS:47269 ../NEWS:49966 ../NEWS:50317 ../NEWS:50712 +msgid "macOS" msgstr "" -#: ../NEWS:99 -msgid "" -":gh:`154196`: Improve :exc:`AttributeError` messages from unresolved lazy " -"imports. Patch by Bartosz Sławecki." +#: ../NEWS:295 +msgid ":gh:`156369`: Update macOS installer to use OpenSSL 3.5.8." msgstr "" -#: ../NEWS:102 -msgid "" -":gh:`151377`: Fix races in free-threaded builds when updating type slots for " -"newly created classes and when removing entries from a base type's " -"subclasses dictionary." +#: ../NEWS:298 ../NEWS:634 ../NEWS:1907 ../NEWS:3371 ../NEWS:4296 ../NEWS:4774 +#: ../NEWS:5389 ../NEWS:6116 ../NEWS:8432 ../NEWS:9256 ../NEWS:9622 +#: ../NEWS:10200 ../NEWS:10752 ../NEWS:11101 ../NEWS:11566 ../NEWS:12254 +#: ../NEWS:16185 ../NEWS:16707 ../NEWS:18144 ../NEWS:20409 ../NEWS:21620 +#: ../NEWS:21967 ../NEWS:22970 ../NEWS:23307 ../NEWS:25859 ../NEWS:26757 +#: ../NEWS:27376 ../NEWS:31562 ../NEWS:33715 ../NEWS:34226 ../NEWS:36236 +#: ../NEWS:36698 ../NEWS:37171 ../NEWS:40153 ../NEWS:41016 ../NEWS:41555 +#: ../NEWS:41897 ../NEWS:45020 ../NEWS:45642 ../NEWS:45859 ../NEWS:46119 +#: ../NEWS:46725 ../NEWS:47313 ../NEWS:49628 ../NEWS:50016 ../NEWS:50357 +#: ../NEWS:50780 ../NEWS:51267 ../NEWS:51632 ../NEWS:52026 ../NEWS:52100 +#: ../NEWS:53085 ../NEWS:53546 ../NEWS:53854 ../NEWS:55114 ../NEWS:56223 +#: ../NEWS:57049 ../NEWS:57572 ../NEWS:58259 ../NEWS:58478 ../NEWS:58686 +#: ../NEWS:60598 +msgid "Tools/Demos" msgstr "" -#: ../NEWS:106 +#: ../NEWS:300 msgid "" -":gh:`148817`: Fold large constant list and set literals used as the iterable " -"of a :keyword:`for` loop or ``in``/``not in`` test into a constant :class:" -"`tuple` or :class:`frozenset`, restoring an optimization previously done by " -"the AST optimizer that was lost when constant folding moved to the CFG." +":gh:`154059`: Fix the time units in Tachyon flame graph tooltips by " +"accounting for the sampling interval when converting samples to milliseconds." +msgstr "" + +#: ../NEWS:305 ../NEWS:650 ../NEWS:1272 ../NEWS:1578 ../NEWS:1913 ../NEWS:2745 +#: ../NEWS:3383 ../NEWS:3811 ../NEWS:4242 ../NEWS:4624 ../NEWS:5290 +#: ../NEWS:5982 ../NEWS:8213 ../NEWS:9137 ../NEWS:9575 ../NEWS:10114 +#: ../NEWS:10666 ../NEWS:11033 ../NEWS:11466 ../NEWS:12128 ../NEWS:14241 +#: ../NEWS:15216 ../NEWS:15685 ../NEWS:16193 ../NEWS:16721 ../NEWS:17628 +#: ../NEWS:18152 ../NEWS:20469 ../NEWS:21627 ../NEWS:21972 ../NEWS:22275 +#: ../NEWS:22979 ../NEWS:23317 ../NEWS:23739 ../NEWS:25894 ../NEWS:26770 +#: ../NEWS:27382 ../NEWS:27868 ../NEWS:28266 ../NEWS:28712 ../NEWS:29220 +#: ../NEWS:29673 ../NEWS:31583 ../NEWS:32381 ../NEWS:32777 ../NEWS:33065 +#: ../NEWS:33359 ../NEWS:33724 ../NEWS:34236 ../NEWS:34660 ../NEWS:35838 +#: ../NEWS:36249 ../NEWS:36710 ../NEWS:37183 ../NEWS:37554 ../NEWS:37941 +#: ../NEWS:38328 ../NEWS:40178 ../NEWS:41022 ../NEWS:41560 ../NEWS:41904 +#: ../NEWS:45059 ../NEWS:45149 ../NEWS:45865 ../NEWS:46435 ../NEWS:46732 +#: ../NEWS:47325 ../NEWS:47587 ../NEWS:49659 ../NEWS:50034 ../NEWS:50367 +#: ../NEWS:50787 ../NEWS:51590 ../NEWS:51919 ../NEWS:52087 ../NEWS:52588 +#: ../NEWS:53027 ../NEWS:53517 ../NEWS:53846 ../NEWS:55135 ../NEWS:55610 +#: ../NEWS:56190 ../NEWS:58502 ../NEWS:58817 ../NEWS:60421 +msgid "C API" msgstr "" -#: ../NEWS:112 +#: ../NEWS:307 msgid "" -":gh:`85260`: :func:`compile` now raises :exc:`ValueError` instead of " -"crashing on a debug build if an identifier field of an AST node (such as the " -"name of a function, a class, an imported module or a caught exception) is " -"``\"None\"``, ``\"True\"`` or ``\"False\"``." +":gh:`131740`: On the free-threaded build, :c:func:" +"`PyUnstable_GC_VisitObjects` now also visits frozen objects (objects moved " +"to the permanent generation by :func:`gc.freeze`), matching the behavior of " +"the default build." msgstr "" -#: ../NEWS:119 +#: ../NEWS:314 msgid "Python 3.15.0 release candidate 1" msgstr "" -#: ../NEWS:121 +#: ../NEWS:316 msgid "*Release date: 2026-08-04*" msgstr "" -#: ../NEWS:126 +#: ../NEWS:321 msgid "" ":gh:`152674`: The :class:`xml.etree.ElementTree.Element` methods :meth:`~xml." "etree.ElementTree.Element.findall`, :meth:`~xml.etree.ElementTree.Element." @@ -338,120 +725,120 @@ msgid "" "N]``) on XML documents with many same-tag siblings." msgstr "" -#: ../NEWS:136 +#: ../NEWS:331 msgid "" ":gh:`154902`: Fix a crash when ``__conditional_annotations__`` is rebound to " "a non-set object." msgstr "" -#: ../NEWS:139 +#: ../NEWS:334 msgid "" ":gh:`133931`: Fix data races when setting attributes of function objects on " "the :term:`free threaded ` build." msgstr "" -#: ../NEWS:142 +#: ../NEWS:337 msgid "" ":gh:`154775`: When matching a complex literal in :keyword:`case` statements, " "an extraneous ``+`` sign (for example, ``1++1j`` or ``1-+1j``) is no longer " "allowed." msgstr "" -#: ../NEWS:146 +#: ../NEWS:341 msgid "" ":gh:`154709`: Fix an out-of-bounds access in reverse dictionary iterators " "when the underlying dictionary is cleared and modified after the iterator is " "created." msgstr "" -#: ../NEWS:150 +#: ../NEWS:345 msgid "" ":gh:`154695`: Fix :class:`asyncio.Task` raising :exc:`AttributeError` when " "created with ``eager_start=True`` and no explicit *loop* argument." msgstr "" -#: ../NEWS:153 +#: ../NEWS:348 msgid "" ":gh:`153809`: Fix interpreter crash while deallocating objects of :class:" "`asyncio.Task` on free-threaded builds. Contributed by Sergey Miryanov." msgstr "" -#: ../NEWS:157 +#: ../NEWS:352 msgid "" ":gh:`154275`: Fix a crash when getting deeply nested ``__parameters__`` from " "a :class:`types.GenericAlias` objects." msgstr "" -#: ../NEWS:160 +#: ../NEWS:355 msgid "" ":gh:`154014`: Fix a JIT assertion during interpreter shutdown by " "initializing ``vm_data`` fields for cold executors that bypass " "``_Py_ExecutorInit()``." msgstr "" -#: ../NEWS:163 +#: ../NEWS:358 msgid "" ":gh:`153932`: Fix thread safety issue in the ``__reduce__`` method of :py:" "class:`enumerate`." msgstr "" -#: ../NEWS:166 +#: ../NEWS:361 msgid "" ":gh:`153881`: Fix potential data race when calling :meth:`~object." "__getstate__` under the :term:`free-threaded build`." msgstr "" -#: ../NEWS:169 +#: ../NEWS:364 msgid "" ":gh:`153570`: Fix a use-after-free in :meth:`bytearray.take_bytes` when the " "argument's :meth:`~object.__index__` method resizes the bytearray. Patch by " "tonghuaroot." msgstr "" -#: ../NEWS:173 +#: ../NEWS:368 msgid "" ":gh:`153419`: Fix multiple :class:`bytearray` crashes and reference leaks " "caused by skipping :meth:`~object.__init__` and broken state setup code." msgstr "" -#: ../NEWS:176 +#: ../NEWS:371 msgid "" ":gh:`153236`: Propagate exceptions raised while importing lazy submodules " "instead of reporting them as missing attributes." msgstr "" -#: ../NEWS:179 +#: ../NEWS:374 msgid "" ":gh:`148874`: Ignore interrupts immediately after calling the ``__enter__`` " "method of a context menager in a ``with`` statement. This ensures that the " "``__exit__`` method is always called in a ``with`` statement." msgstr "" -#: ../NEWS:183 +#: ../NEWS:378 msgid "" ":gh:`150208`: Avoid double-quoting string values from ``pyconfig.h`` in " "``sysconfigdata`` variables." msgstr "" -#: ../NEWS:189 +#: ../NEWS:384 msgid "" ":gh:`155063`: Bump the version of pip bundled in ensurepip to version 26.2" msgstr "" -#: ../NEWS:191 +#: ../NEWS:386 msgid "" ":gh:`154936`: Fix the pure Python :mod:`json` decoder to report the correct " "position for invalid literal control characters in JSON strings." msgstr "" -#: ../NEWS:194 +#: ../NEWS:389 msgid "" ":gh:`154892`: Fix a bug in the C accelerator for :mod:`zoneinfo` where :" "class:`datetime.datetime` subclasses returning ``-1`` for ``hour``, " "``minute``, or ``second`` could incorrectly raise a :exc:`SystemError`." msgstr "" -#: ../NEWS:198 +#: ../NEWS:393 msgid "" ":gh:`154848`: The :mod:`pickle` C accelerator now enforces frame boundaries " "when unpickling, as the pure Python implementation already did. An argument " @@ -461,27 +848,27 @@ msgid "" "diverging from the :mod:`pickletools` disassembly of the same pickle." msgstr "" -#: ../NEWS:206 +#: ../NEWS:401 msgid "" ":gh:`154885`: :func:`os.get_terminal_size` now checks ``isatty`` before " "calling ``ioctl``, which reduces log noise on Android." msgstr "" -#: ../NEWS:209 +#: ../NEWS:404 msgid "" ":gh:`109638`: Fix exponential time in :meth:`csv.Sniffer.sniff` for a sample " "which contains many quote characters. A doubled quote character is now also " "detected in a field which contains the delimiter or a line break." msgstr "" -#: ../NEWS:213 +#: ../NEWS:408 msgid "" ":gh:`98820`: Fix quadratic time in :meth:`csv.Sniffer.sniff` for a sample " "which contains quoted fields, in particular for a single column of quoted " "fields." msgstr "" -#: ../NEWS:217 +#: ../NEWS:412 msgid "" ":gh:`154738`: Fix :meth:`!ExternalEntityParserCreate` not propagating the " "reparse-deferral setting to the subparser, which left :meth:`!" @@ -489,7 +876,7 @@ msgid "" "tonghuaroot." msgstr "" -#: ../NEWS:222 +#: ../NEWS:417 msgid "" ":gh:`93251`: Fix :exc:`UnicodeDecodeError` in :mod:`socket` functions (such " "as :func:`~socket.getaddrinfo` and :func:`~socket.gethostbyaddr`) when the " @@ -497,39 +884,39 @@ msgid "" "locale encoding." msgstr "" -#: ../NEWS:227 +#: ../NEWS:422 msgid "" ":gh:`148468`: Fix a regression in :mod:`argparse` where colorized argument " "help containing format specifiers did not accept string-like proxy objects." msgstr "" -#: ../NEWS:231 +#: ../NEWS:426 msgid "" ":gh:`142035`: Fix incorrect wrapping of :mod:`argparse` help text when color " "is enabled." msgstr "" -#: ../NEWS:234 +#: ../NEWS:429 msgid "" ":gh:`135736`: Fix ::class:`asyncio.TaskGroup` to not wrap a :exc:" "`GeneratorExit` into a :exc:`BaseExceptionGroup` if it was raised by the " "body of the task group and none of the tasks in the group raised exceptions." msgstr "" -#: ../NEWS:239 +#: ../NEWS:434 msgid "" ":gh:`154551`: Fix :func:`ctypes.util.find_library` returning ``None`` in non-" "UTF-8 locales." msgstr "" -#: ../NEWS:242 +#: ../NEWS:437 msgid "" ":gh:`79366`: Fixed a race condition in :mod:`logging`: if a handler was " "removed while a record was being emitted, the following handlers of the same " "logger could be skipped." msgstr "" -#: ../NEWS:246 +#: ../NEWS:441 msgid "" ":gh:`154189`: Fixed a potential use-after-free when calling :func:`functools." "partial`. Now, when invoking a :func:`~functools.partial` object, the stored " @@ -537,7 +924,7 @@ msgid "" "duration of the call in case of reentrancy." msgstr "" -#: ../NEWS:251 +#: ../NEWS:446 msgid "" ":gh:`73458`: Fix :func:`logging.config.listen`: it left the caller waiting " "for the ``ready`` event forever if the server could not be started, for " @@ -546,66 +933,66 @@ msgid "" "is only aliased to ``::1``." msgstr "" -#: ../NEWS:257 +#: ../NEWS:452 msgid "" ":gh:`154460`: Fix :func:`time.strftime` and :meth:`datetime.datetime." "strftime` returning a wrong ISO 8601 week number (``%V``) on OpenBSD." msgstr "" -#: ../NEWS:261 +#: ../NEWS:456 msgid "" ":gh:`154435`: Fix :func:`os.posix_fadvise` and :func:`os.posix_fallocate` on " "DragonFly BSD: they raised :exc:`OSError` with a meaningless error code, " "because these functions return -1 and set ``errno`` there." msgstr "" -#: ../NEWS:265 +#: ../NEWS:460 msgid "" ":gh:`154399`: Fix :mod:`venv` activation in a non-interactive csh: " "``activate.csh`` no longer fails when the ``prompt`` variable is not set." msgstr "" -#: ../NEWS:268 +#: ../NEWS:463 msgid "" ":gh:`154389`: Fix :func:`uuid.uuid1` on OpenBSD: it returned a version 4 " "UUID, because ``uuid_create()`` generates random UUIDs on this platform." msgstr "" -#: ../NEWS:271 +#: ../NEWS:466 msgid "" ":gh:`154324`: Fix :func:`os.sendfile` on illumos: it no longer reports a " "successful transfer when the underlying system call failed without writing " "any data." msgstr "" -#: ../NEWS:275 +#: ../NEWS:470 msgid "" ":gh:`154307`: Fix :meth:`tempfile.TemporaryDirectory.cleanup` on DragonFly " "BSD, where removing a file with the ``UF_NOUNLINK`` flag failed with " "``EISDIR`` instead of ``EPERM``." msgstr "" -#: ../NEWS:279 +#: ../NEWS:474 msgid "" ":gh:`154291`: Fix :func:`socket.has_dualstack_ipv6` to return ``False`` on " "platforms such as DragonFly BSD where setting ``IPV6_V6ONLY`` to 0 silently " "has no effect." msgstr "" -#: ../NEWS:283 +#: ../NEWS:478 msgid "" ":gh:`154283`: On DragonFly BSD, :func:`threading.get_native_id` now returns " "a value that is unique across processes, matching the other platforms." msgstr "" -#: ../NEWS:286 +#: ../NEWS:481 msgid "" ":gh:`154258`: Fix a crash in :meth:`mmap.mmap.resize` on NetBSD when growing " "a shared anonymous mapping. :meth:`!resize` now raises :exc:`ValueError` in " "this case, as it already did on Linux." msgstr "" -#: ../NEWS:290 +#: ../NEWS:485 msgid "" ":gh:`131565`: :func:`ctypes.util.dllist` now works on NetBSD. It is " "implemented in the :mod:`!_ctypes` extension module so that " @@ -614,20 +1001,20 @@ msgid "" "called through ctypes." msgstr "" -#: ../NEWS:296 +#: ../NEWS:491 msgid "" ":gh:`154225`: Fix :func:`os.openpty` on Solaris and illumos: it no longer " "leaves the pseudo-terminal as the controlling terminal of the calling " "process." msgstr "" -#: ../NEWS:300 +#: ../NEWS:495 msgid "" ":gh:`154227`: Fix :func:`os.posix_openpt` on OpenBSD, where it rejected the :" "data:`~os.O_CLOEXEC` flag." msgstr "" -#: ../NEWS:303 +#: ../NEWS:498 msgid "" ":gh:`145030`: Fix :mod:`asyncio` write pipe transports for named FIFOs on " "macOS and Solaris. Unread data sitting in the FIFO made the transport " @@ -635,13 +1022,13 @@ msgid "" "transport." msgstr "" -#: ../NEWS:308 +#: ../NEWS:503 msgid "" ":gh:`154176`: Fix a crash in :func:`locale.strxfrm` on DragonFly BSD, whose " "``wcsxfrm()`` does not support the zero size." msgstr "" -#: ../NEWS:311 +#: ../NEWS:506 msgid "" ":gh:`154836`: Fix :meth:`subprocess.Popen.wait` raising :exc:`TypeError` " "(macOS and other BSDs) or :exc:`OverflowError` (Linux) for very large " @@ -650,7 +1037,7 @@ msgid "" "`OverflowError` for out-of-range timeouts as :exc:`TypeError`." msgstr "" -#: ../NEWS:317 +#: ../NEWS:512 msgid "" ":gh:`154053`: Fix compilation of the :mod:`ssl` module against LibreSSL, " "which does not provide ``SSL_CTX_set1_sigalgs_list()`` and " @@ -659,23 +1046,23 @@ msgid "" "`NotImplementedError` on LibreSSL." msgstr "" -#: ../NEWS:323 +#: ../NEWS:518 msgid "" ":gh:`154001`: Fix :func:`random.binomialvariate` raising :exc:" "`ZeroDivisionError` when :func:`random.random` returns zero." msgstr "" -#: ../NEWS:326 +#: ../NEWS:521 msgid "" ":gh:`153908`: Fix data race when calling :func:`repr` on :class:`itertools." "count` under the :term:`free-threaded build`." msgstr "" -#: ../NEWS:329 +#: ../NEWS:524 msgid ":gh:`153896`: Deduplicate unhashable args in :data:`typing.Literal`." msgstr "" -#: ../NEWS:331 +#: ../NEWS:526 msgid "" ":gh:`153864`: On a wide :mod:`curses` build, :meth:`curses.window.insch` now " "inserts a non-ASCII byte as the character it encodes in the window's " @@ -683,27 +1070,27 @@ msgid "" "code point." msgstr "" -#: ../NEWS:336 +#: ../NEWS:531 msgid "" ":gh:`153862`: On a wide :mod:`curses` build, :meth:`curses.window.inch` now " "returns the locale-encoded byte of a non-ASCII character, matching :meth:" "`~curses.window.instr`, instead of the low byte of its code point." msgstr "" -#: ../NEWS:340 +#: ../NEWS:535 msgid "" ":gh:`146011`: Fix a heap-use-after-free in the C implementation of :mod:" "`decimal` when calling :func:`repr` after deleting the :class:`~decimal." "Context`." msgstr "" -#: ../NEWS:344 +#: ../NEWS:539 msgid "" ":gh:`153761`: Fix cancelling :meth:`asyncio.loop.sock_accept` dropping a " "pending connection." msgstr "" -#: ../NEWS:347 +#: ../NEWS:542 msgid "" ":gh:`127049`: Fix a race condition in :mod:`asyncio` on Unix where :meth:" "`asyncio.subprocess.Process.send_signal`, :meth:`~asyncio.subprocess.Process." @@ -712,7 +1099,7 @@ msgid "" "when ThreadedChildWatcher is used. Patch by Kumar Aditya." msgstr "" -#: ../NEWS:354 +#: ../NEWS:549 msgid "" ":gh:`153404`: :class:`urllib.robotparser.RobotFileParser` now silently " "ignores a ``Crawl-delay`` or ``Request-rate`` value written with non-decimal " @@ -720,7 +1107,7 @@ msgid "" "`ValueError` and aborting the parse of the whole ``robots.txt`` file." msgstr "" -#: ../NEWS:359 +#: ../NEWS:554 msgid "" ":gh:`153291`: Fix a data race in :func:`readline.get_completer` and :func:" "`readline.get_pre_input_hook` on the :term:`free-threaded ` " @@ -728,25 +1115,25 @@ msgid "" "the corresponding setters hold." msgstr "" -#: ../NEWS:364 +#: ../NEWS:559 msgid "" ":gh:`153133`: Fix a socket leak in :meth:`asyncio.loop.create_connection` " "when the transport cannot be created." msgstr "" -#: ../NEWS:367 +#: ../NEWS:562 msgid "" ":gh:`152431`: Fix ``asyncio.StreamWriter.start_tls()`` to keep the linked " "``StreamReader`` transport in sync with the upgraded transport." msgstr "" -#: ../NEWS:370 +#: ../NEWS:565 msgid "" ":gh:`151955`: Allow more types to be used in the ``bound`` argument to :" "class:`typing.ParamSpec` and :class:`typing.TypeVarTuple`." msgstr "" -#: ../NEWS:373 +#: ../NEWS:568 msgid "" ":gh:`119710`: Fix :mod:`asyncio` subprocess :meth:`~asyncio.subprocess." "Process.wait` hanging when the process has exited but one of its pipes is " @@ -755,142 +1142,118 @@ msgid "" "pipes' state." msgstr "" -#: ../NEWS:379 +#: ../NEWS:574 msgid "" ":gh:`151022`: Fix ``_remote_debugging`` stack traces for code objects with " "large line tables." msgstr "" -#: ../NEWS:382 +#: ../NEWS:577 msgid "" ":gh:`149319`: The :mod:`asyncio` REPL now ignores :envvar:`PYTHONSTARTUP` " "and :envvar:`PYTHON_BASIC_REPL` when :option:`-E` or :option:`-I` is used. " "Patch by Jonathan Dung." msgstr "" -#: ../NEWS:386 +#: ../NEWS:581 msgid "" ":gh:`148665`: socket.shutdown function is now enabled for Emscripten builds. " "However, if the runtime does not implement the shutdown syscall, it will " "show \"Function not implemented\" error." msgstr "" -#: ../NEWS:390 +#: ../NEWS:585 msgid "" ":gh:`140326`: Fix the :mod:`asyncio` REPL namespace so that relative imports " "no longer resolve against the :mod:`asyncio` package and ``__file__`` is no " "longer set." msgstr "" -#: ../NEWS:394 +#: ../NEWS:589 msgid "" ":gh:`103925`: Fix :meth:`csv.Sniffer.sniff` for a sample with ``\\r\\n`` " "line endings in which a quoted field ends a line: a letter could be detected " "as the delimiter." msgstr "" -#: ../NEWS:399 ../NEWS:1335 ../NEWS:2449 ../NEWS:3108 ../NEWS:3471 ../NEWS:4311 -#: ../NEWS:4945 ../NEWS:7371 ../NEWS:8687 ../NEWS:9276 ../NEWS:9736 -#: ../NEWS:10314 ../NEWS:11161 ../NEWS:11781 ../NEWS:13357 ../NEWS:14952 -#: ../NEWS:15417 ../NEWS:15895 ../NEWS:16432 ../NEWS:17247 ../NEWS:19770 -#: ../NEWS:21297 ../NEWS:21742 ../NEWS:22013 ../NEWS:22292 ../NEWS:22703 -#: ../NEWS:23028 ../NEWS:23460 ../NEWS:25216 ../NEWS:26461 ../NEWS:27067 -#: ../NEWS:27594 ../NEWS:27957 ../NEWS:28421 ../NEWS:28817 ../NEWS:29316 -#: ../NEWS:30979 ../NEWS:32058 ../NEWS:32526 ../NEWS:32818 ../NEWS:33094 -#: ../NEWS:33459 ../NEWS:33919 ../NEWS:34391 ../NEWS:35435 ../NEWS:35983 -#: ../NEWS:36427 ../NEWS:36885 ../NEWS:37289 ../NEWS:37712 ../NEWS:38027 -#: ../NEWS:39372 ../NEWS:40678 ../NEWS:41145 ../NEWS:41623 ../NEWS:41865 -#: ../NEWS:44049 ../NEWS:45025 ../NEWS:45235 ../NEWS:45385 ../NEWS:45603 -#: ../NEWS:45848 ../NEWS:46173 ../NEWS:46513 ../NEWS:46996 ../NEWS:47339 -#: ../NEWS:48949 ../NEWS:49703 ../NEWS:50059 ../NEWS:50456 ../NEWS:50855 -#: ../NEWS:51424 ../NEWS:51744 ../NEWS:51900 ../NEWS:52003 ../NEWS:53362 -#: ../NEWS:53613 ../NEWS:54780 ../NEWS:55340 ../NEWS:56007 ../NEWS:56733 -#: ../NEWS:57294 ../NEWS:57547 ../NEWS:57746 ../NEWS:58057 ../NEWS:60258 +#: ../NEWS:594 ../NEWS:1527 ../NEWS:2641 ../NEWS:3300 ../NEWS:3663 ../NEWS:4503 +#: ../NEWS:5137 ../NEWS:7563 ../NEWS:8879 ../NEWS:9468 ../NEWS:9928 +#: ../NEWS:10506 ../NEWS:11353 ../NEWS:11973 ../NEWS:13549 ../NEWS:15144 +#: ../NEWS:15609 ../NEWS:16087 ../NEWS:16624 ../NEWS:17439 ../NEWS:19962 +#: ../NEWS:21489 ../NEWS:21934 ../NEWS:22205 ../NEWS:22484 ../NEWS:22895 +#: ../NEWS:23220 ../NEWS:23652 ../NEWS:25408 ../NEWS:26653 ../NEWS:27259 +#: ../NEWS:27786 ../NEWS:28149 ../NEWS:28613 ../NEWS:29009 ../NEWS:29508 +#: ../NEWS:31171 ../NEWS:32250 ../NEWS:32718 ../NEWS:33010 ../NEWS:33286 +#: ../NEWS:33651 ../NEWS:34111 ../NEWS:34583 ../NEWS:35627 ../NEWS:36175 +#: ../NEWS:36619 ../NEWS:37077 ../NEWS:37481 ../NEWS:37904 ../NEWS:38219 +#: ../NEWS:39564 ../NEWS:40870 ../NEWS:41337 ../NEWS:41815 ../NEWS:42057 +#: ../NEWS:44241 ../NEWS:45217 ../NEWS:45427 ../NEWS:45577 ../NEWS:45795 +#: ../NEWS:46040 ../NEWS:46365 ../NEWS:46705 ../NEWS:47188 ../NEWS:47531 +#: ../NEWS:49141 ../NEWS:49895 ../NEWS:50251 ../NEWS:50648 ../NEWS:51047 +#: ../NEWS:51616 ../NEWS:51936 ../NEWS:52092 ../NEWS:52195 ../NEWS:53554 +#: ../NEWS:53805 ../NEWS:54972 ../NEWS:55532 ../NEWS:56199 ../NEWS:56925 +#: ../NEWS:57486 ../NEWS:57739 ../NEWS:57938 ../NEWS:58249 ../NEWS:60450 msgid "Documentation" msgstr "" -#: ../NEWS:401 +#: ../NEWS:596 msgid "" ":gh:`118150`: Clarify in the :mod:`difflib` documentation what *junk* " "actually does, its drawbacks, and how to control it." msgstr "" -#: ../NEWS:405 ../NEWS:983 ../NEWS:1350 ../NEWS:1668 ../NEWS:2459 ../NEWS:3118 -#: ../NEWS:3235 ../NEWS:3691 ../NEWS:4110 ../NEWS:4445 ../NEWS:4590 -#: ../NEWS:5210 ../NEWS:5969 ../NEWS:8249 ../NEWS:9073 ../NEWS:9453 -#: ../NEWS:10017 ../NEWS:10567 ../NEWS:10915 ../NEWS:11383 ../NEWS:12068 -#: ../NEWS:15428 ../NEWS:15903 ../NEWS:16446 ../NEWS:17261 ../NEWS:17853 -#: ../NEWS:19817 ../NEWS:21317 ../NEWS:21748 ../NEWS:22022 ../NEWS:22299 -#: ../NEWS:22717 ../NEWS:23049 ../NEWS:23468 ../NEWS:25302 ../NEWS:26498 -#: ../NEWS:27093 ../NEWS:27600 ../NEWS:27963 ../NEWS:28434 ../NEWS:28848 -#: ../NEWS:29351 ../NEWS:31114 ../NEWS:32081 ../NEWS:32541 ../NEWS:32827 -#: ../NEWS:33103 ../NEWS:33468 ../NEWS:33931 ../NEWS:34412 ../NEWS:35477 -#: ../NEWS:36000 ../NEWS:36441 ../NEWS:36904 ../NEWS:37314 ../NEWS:38041 -#: ../NEWS:39476 ../NEWS:40727 ../NEWS:41180 ../NEWS:41637 ../NEWS:41876 -#: ../NEWS:44214 ../NEWS:45250 ../NEWS:45404 ../NEWS:45620 ../NEWS:45872 -#: ../NEWS:46186 ../NEWS:46518 ../NEWS:47002 ../NEWS:48997 ../NEWS:49741 -#: ../NEWS:49854 ../NEWS:50079 ../NEWS:50469 ../NEWS:50867 ../NEWS:51446 -#: ../NEWS:51757 ../NEWS:52008 ../NEWS:52143 ../NEWS:52414 ../NEWS:52844 -#: ../NEWS:53117 ../NEWS:53371 ../NEWS:53625 ../NEWS:54798 ../NEWS:55358 -#: ../NEWS:56012 ../NEWS:56133 ../NEWS:56756 ../NEWS:57318 ../NEWS:57562 -#: ../NEWS:57739 ../NEWS:58048 ../NEWS:58277 ../NEWS:58487 ../NEWS:60298 +#: ../NEWS:600 ../NEWS:1175 ../NEWS:1542 ../NEWS:1860 ../NEWS:2651 ../NEWS:3310 +#: ../NEWS:3427 ../NEWS:3883 ../NEWS:4302 ../NEWS:4637 ../NEWS:4782 +#: ../NEWS:5402 ../NEWS:6161 ../NEWS:8441 ../NEWS:9265 ../NEWS:9645 +#: ../NEWS:10209 ../NEWS:10759 ../NEWS:11107 ../NEWS:11575 ../NEWS:12260 +#: ../NEWS:15620 ../NEWS:16095 ../NEWS:16638 ../NEWS:17453 ../NEWS:18045 +#: ../NEWS:20009 ../NEWS:21509 ../NEWS:21940 ../NEWS:22214 ../NEWS:22491 +#: ../NEWS:22909 ../NEWS:23241 ../NEWS:23660 ../NEWS:25494 ../NEWS:26690 +#: ../NEWS:27285 ../NEWS:27792 ../NEWS:28155 ../NEWS:28626 ../NEWS:29040 +#: ../NEWS:29543 ../NEWS:31306 ../NEWS:32273 ../NEWS:32733 ../NEWS:33019 +#: ../NEWS:33295 ../NEWS:33660 ../NEWS:34123 ../NEWS:34604 ../NEWS:35669 +#: ../NEWS:36192 ../NEWS:36633 ../NEWS:37096 ../NEWS:37506 ../NEWS:38233 +#: ../NEWS:39668 ../NEWS:40919 ../NEWS:41372 ../NEWS:41829 ../NEWS:42068 +#: ../NEWS:44406 ../NEWS:45442 ../NEWS:45596 ../NEWS:45812 ../NEWS:46064 +#: ../NEWS:46378 ../NEWS:46710 ../NEWS:47194 ../NEWS:49189 ../NEWS:49933 +#: ../NEWS:50046 ../NEWS:50271 ../NEWS:50661 ../NEWS:51059 ../NEWS:51638 +#: ../NEWS:51949 ../NEWS:52200 ../NEWS:52335 ../NEWS:52606 ../NEWS:53036 +#: ../NEWS:53309 ../NEWS:53563 ../NEWS:53817 ../NEWS:54990 ../NEWS:55550 +#: ../NEWS:56204 ../NEWS:56325 ../NEWS:56948 ../NEWS:57510 ../NEWS:57754 +#: ../NEWS:57931 ../NEWS:58240 ../NEWS:58469 ../NEWS:58679 ../NEWS:60490 msgid "Tests" msgstr "" -#: ../NEWS:407 +#: ../NEWS:602 msgid ":gh:`76595`: Add C API tests for :c:func:`PyCapsule_Import`." msgstr "" -#: ../NEWS:409 +#: ../NEWS:604 msgid "" ":gh:`154211`: Add ``test.support.skip_if_huge_c_stack()`` and use it to skip " "tests that exhaust the C stack if the stack limit is very large (e.g. on " "DragonFly BSD or with ``ulimit -s unlimited``)." msgstr "" -#: ../NEWS:413 +#: ../NEWS:608 msgid "" ":gh:`154167`: The test runner (regrtest) now restores the default SIGINT " "handler if it was inherited as ignored, so the test suite no longer hangs " "when run as a shell background job." msgstr "" -#: ../NEWS:417 +#: ../NEWS:612 msgid ":gh:`154144`: Fix building the :mod:`!_testcapi` module on NetBSD." msgstr "" -#: ../NEWS:419 +#: ../NEWS:614 msgid "" ":gh:`152548`: Add the :func:`test.support.isolation.runInSubprocess` " "decorator to run a test method or ``TestCase`` subclass in a fresh " "interpreter subprocess, isolated from the rest of the test run." msgstr "" -#: ../NEWS:424 ../NEWS:995 ../NEWS:1361 ../NEWS:1680 ../NEWS:2467 ../NEWS:3129 -#: ../NEWS:3653 ../NEWS:4063 ../NEWS:5135 ../NEWS:5824 ../NEWS:8148 -#: ../NEWS:9004 ../NEWS:9391 ../NEWS:9971 ../NEWS:10539 ../NEWS:10859 -#: ../NEWS:11324 ../NEWS:11959 ../NEWS:14304 ../NEWS:14958 ../NEWS:15454 -#: ../NEWS:15935 ../NEWS:16456 ../NEWS:17301 ../NEWS:17887 ../NEWS:20065 -#: ../NEWS:21339 ../NEWS:21566 ../NEWS:21758 ../NEWS:22035 ../NEWS:22305 -#: ../NEWS:22729 ../NEWS:23070 ../NEWS:23296 ../NEWS:23488 ../NEWS:25424 -#: ../NEWS:26056 ../NEWS:26529 ../NEWS:27117 ../NEWS:27622 ../NEWS:27816 -#: ../NEWS:28007 ../NEWS:28461 ../NEWS:28870 ../NEWS:29400 ../NEWS:31236 -#: ../NEWS:32104 ../NEWS:32550 ../NEWS:32833 ../NEWS:33113 ../NEWS:33490 -#: ../NEWS:33966 ../NEWS:34428 ../NEWS:35528 ../NEWS:36009 ../NEWS:36467 -#: ../NEWS:36920 ../NEWS:37323 ../NEWS:37725 ../NEWS:38096 ../NEWS:39646 -#: ../NEWS:40763 ../NEWS:41234 ../NEWS:41650 ../NEWS:44381 ../NEWS:45037 -#: ../NEWS:45259 ../NEWS:45410 ../NEWS:45630 ../NEWS:45877 ../NEWS:46206 -#: ../NEWS:47029 ../NEWS:47349 ../NEWS:49060 ../NEWS:49749 ../NEWS:49859 -#: ../NEWS:50094 ../NEWS:50486 ../NEWS:50622 ../NEWS:50883 ../NEWS:51404 -#: ../NEWS:51488 ../NEWS:51779 ../NEWS:51844 ../NEWS:52016 ../NEWS:52134 -#: ../NEWS:52403 ../NEWS:52858 ../NEWS:53144 ../NEWS:53332 ../NEWS:53645 -#: ../NEWS:54841 ../NEWS:55396 ../NEWS:56058 ../NEWS:56779 ../NEWS:57331 -#: ../NEWS:57391 ../NEWS:57408 ../NEWS:57650 ../NEWS:57755 ../NEWS:58268 -#: ../NEWS:58482 ../NEWS:58617 ../NEWS:60149 -msgid "Build" -msgstr "" - -#: ../NEWS:426 +#: ../NEWS:621 msgid "" ":gh:`154070`: Build the :mod:`curses` module against a wide-character " "capable ncurses even when it is not named ``ncursesw`` -- for example the " @@ -898,42 +1261,22 @@ msgid "" "a library previously produced a narrow build." msgstr "" -#: ../NEWS:431 +#: ../NEWS:626 msgid ":gh:`138800`: Fix library name in python3.pc on Android." msgstr "" -#: ../NEWS:434 ../NEWS:1021 ../NEWS:1366 ../NEWS:1690 ../NEWS:2520 ../NEWS:3167 -#: ../NEWS:3224 ../NEWS:3685 ../NEWS:4095 ../NEWS:5192 ../NEWS:5867 -#: ../NEWS:8231 ../NEWS:9049 ../NEWS:9424 ../NEWS:10899 ../NEWS:11345 -#: ../NEWS:12015 ../NEWS:14980 ../NEWS:15464 ../NEWS:15961 ../NEWS:16471 -#: ../NEWS:17330 ../NEWS:17911 ../NEWS:20152 ../NEWS:21377 ../NEWS:21766 -#: ../NEWS:22052 ../NEWS:22338 ../NEWS:22747 ../NEWS:23092 ../NEWS:23524 -#: ../NEWS:25538 ../NEWS:26544 ../NEWS:27149 ../NEWS:27652 ../NEWS:28047 -#: ../NEWS:28508 ../NEWS:28998 ../NEWS:29455 ../NEWS:31282 ../NEWS:32113 -#: ../NEWS:32572 ../NEWS:32856 ../NEWS:33139 ../NEWS:33990 ../NEWS:34435 -#: ../NEWS:35549 ../NEWS:36019 ../NEWS:36479 ../NEWS:36937 ../NEWS:37328 -#: ../NEWS:38106 ../NEWS:39718 ../NEWS:40786 ../NEWS:41295 ../NEWS:41664 -#: ../NEWS:41909 ../NEWS:44499 ../NEWS:45044 ../NEWS:45427 ../NEWS:45635 -#: ../NEWS:45882 ../NEWS:46221 ../NEWS:46527 ../NEWS:47062 ../NEWS:49172 -#: ../NEWS:49769 ../NEWS:50100 ../NEWS:50511 ../NEWS:50889 ../NEWS:51460 -#: ../NEWS:51709 ../NEWS:51839 ../NEWS:52129 ../NEWS:52370 ../NEWS:52900 -#: ../NEWS:53132 ../NEWS:53635 ../NEWS:54904 ../NEWS:55409 ../NEWS:56043 -#: ../NEWS:56838 ../NEWS:56885 ../NEWS:57342 ../NEWS:58631 ../NEWS:60445 -msgid "Windows" -msgstr "" - -#: ../NEWS:436 +#: ../NEWS:631 msgid ":gh:`124111`: Updated Windows builds to use Tcl/Tk 9.0.4." msgstr "" -#: ../NEWS:441 +#: ../NEWS:636 msgid "" ":gh:`154580`: Fix ``python-gdb.py`` raising :exc:`UnicodeEncodeError` when " "pretty-printing a non-ASCII :class:`str` in a locale whose host charset " "cannot encode it, such as any non-ASCII string in the C locale." msgstr "" -#: ../NEWS:445 +#: ../NEWS:640 msgid "" ":gh:`152384`: The CPython Pixi packages are now all accessible at the same " "``Tools/pixi-packages`` subdirectory, rather than at ``Tools/pixi-packages/" @@ -945,66 +1288,46 @@ msgid "" "previous names." msgstr "" -#: ../NEWS:455 ../NEWS:1080 ../NEWS:1386 ../NEWS:1721 ../NEWS:2553 ../NEWS:3191 -#: ../NEWS:3619 ../NEWS:4050 ../NEWS:4432 ../NEWS:5098 ../NEWS:5790 -#: ../NEWS:8021 ../NEWS:8945 ../NEWS:9383 ../NEWS:9922 ../NEWS:10474 -#: ../NEWS:10841 ../NEWS:11274 ../NEWS:11936 ../NEWS:14049 ../NEWS:15024 -#: ../NEWS:15493 ../NEWS:16001 ../NEWS:16529 ../NEWS:17436 ../NEWS:17960 -#: ../NEWS:20277 ../NEWS:21435 ../NEWS:21780 ../NEWS:22083 ../NEWS:22787 -#: ../NEWS:23125 ../NEWS:23547 ../NEWS:25702 ../NEWS:26578 ../NEWS:27190 -#: ../NEWS:27676 ../NEWS:28074 ../NEWS:28520 ../NEWS:29028 ../NEWS:29481 -#: ../NEWS:31391 ../NEWS:32189 ../NEWS:32585 ../NEWS:32873 ../NEWS:33167 -#: ../NEWS:33532 ../NEWS:34044 ../NEWS:34468 ../NEWS:35646 ../NEWS:36057 -#: ../NEWS:36518 ../NEWS:36991 ../NEWS:37362 ../NEWS:37749 ../NEWS:38136 -#: ../NEWS:39986 ../NEWS:40830 ../NEWS:41368 ../NEWS:41712 ../NEWS:44867 -#: ../NEWS:44957 ../NEWS:45673 ../NEWS:46243 ../NEWS:46540 ../NEWS:47133 -#: ../NEWS:47395 ../NEWS:49467 ../NEWS:49842 ../NEWS:50175 ../NEWS:50595 -#: ../NEWS:51398 ../NEWS:51727 ../NEWS:51895 ../NEWS:52396 ../NEWS:52835 -#: ../NEWS:53325 ../NEWS:53654 ../NEWS:54943 ../NEWS:55418 ../NEWS:55998 -#: ../NEWS:58310 ../NEWS:58625 ../NEWS:60229 -msgid "C API" -msgstr "" - -#: ../NEWS:457 +#: ../NEWS:652 msgid "" ":gh:`122931`: Allow importing stable ABI C extensions that include a " "multiarch tuple in their filename, e.g. ``foo.abi3-x86-64-linux-gnu.so``." msgstr "" -#: ../NEWS:462 +#: ../NEWS:657 msgid "Python 3.15.0 beta 4" msgstr "" -#: ../NEWS:464 +#: ../NEWS:659 msgid "*Release date: 2026-07-18*" msgstr "" -#: ../NEWS:469 +#: ../NEWS:664 msgid "" ":gh:`153030`: Fixed quadratic complexity in incremental parsing of long " "unterminated constructs (such as tags or comments) in :class:`html.parser." "HTMLParser`, which could be exploited for a denial of service." msgstr "" -#: ../NEWS:474 +#: ../NEWS:669 msgid "" ":gh:`152216`: Update bundled `libexpat `_ to " "version 2.8.2." msgstr "" -#: ../NEWS:477 +#: ../NEWS:672 msgid "" ":gh:`151987`: The :meth:`tarfile.TarFile.extract` method now applies the " "given filter when it extracts a link target from the archive as a fallback." msgstr "" -#: ../NEWS:481 +#: ../NEWS:676 msgid "" ":gh:`151981`: In :mod:`tarfile`, seeking a stream now stops when end of the " "stream is reached." msgstr "" -#: ../NEWS:484 +#: ../NEWS:679 msgid "" ":gh:`151558`: Fixed an vulnerability in the :mod:`tarfile` ``data`` and " "``tar`` extraction filters where crafted archives could create a symlink " @@ -1012,7 +1335,7 @@ msgid "" "`2025-4330`." msgstr "" -#: ../NEWS:489 +#: ../NEWS:684 msgid "" ":gh:`150743`: :mod:`http.client` now limits the number of chunked-response " "trailer lines it will read to :attr:`~http.client.HTTPConnection." @@ -1023,38 +1346,38 @@ msgid "" "``@YLChen-007`` via GHSA-w4q2-g22w-6fr4." msgstr "" -#: ../NEWS:497 +#: ../NEWS:692 msgid "" ":gh:`143927`: Normalize all line endings (CR, CRLF, and LF) to LF+TAB when " "writing multi-line configparser values." msgstr "" -#: ../NEWS:503 +#: ../NEWS:698 msgid "" ":gh:`153298`: Fixes a data race in :class:`types.GenericAlias` " "``__parameters__`` initialization on free-threading builds." msgstr "" -#: ../NEWS:506 +#: ../NEWS:701 msgid "" ":gh:`153205`: Fix a potential :exc:`SystemError` during vector calls when " "memory allocation fails. A :exc:`MemoryError` is now raised instead." msgstr "" -#: ../NEWS:509 +#: ../NEWS:704 msgid "" ":gh:`152682`: Fix NULL pointer dereference in :func:`compile` when a " "reserved name (e.g. ``__classdict__``) is used as a type parameter name and " "memory allocation fails while formatting the error message." msgstr "" -#: ../NEWS:513 +#: ../NEWS:708 msgid "" ":gh:`152635`: Fix a crash caused when running out of memory creating a :mod:" "`!_interpchannels` channel. Now a :exc:`MemoryError` is correctly raised." msgstr "" -#: ../NEWS:517 +#: ../NEWS:712 msgid "" ":gh:`152405`: Do not expose the internal mapping of :class:`types." "MappingProxyType` when performing rich-compare operations with non-stdlib " @@ -1063,98 +1386,98 @@ msgid "" "when dealing with custom types." msgstr "" -#: ../NEWS:523 +#: ../NEWS:718 msgid "" ":gh:`152492`: :type:`collections.OrderedDict` ``update`` method can now " "accept :type:`frozendict` as an argument." msgstr "" -#: ../NEWS:526 +#: ../NEWS:721 msgid "" ":gh:`152375`: Fix undefined behaviour when a :mod:`sys.monitoring` callback " "raised an exception while the program was following a branch or loop." msgstr "" -#: ../NEWS:529 +#: ../NEWS:724 msgid "" ":gh:`152235`: Defer GC tracking of :meth:`set.intersection`, :meth:`set." "difference`, :meth:`set.symmetric_difference`, :meth:`set.union` and ``set." "__sub__``. Patch by Donghee Na." msgstr "" -#: ../NEWS:533 +#: ../NEWS:728 msgid "" ":gh:`152235`: Defer GC tracking of a :class:`set` or :class:`frozenset` to " "the end of its construction from iterable. Patch by Donghee Na." msgstr "" -#: ../NEWS:536 +#: ../NEWS:731 msgid "" ":gh:`152228`: Fix an assertion failure when python is built in a debug mode " "that happened in :meth:`str.replace` under a limited memory situation." msgstr "" -#: ../NEWS:539 +#: ../NEWS:734 msgid "" ":gh:`151722`: :meth:`!frozendict.fromkeys` now only tracks the :class:" "`frozendict` in the garbage collector once the dictionary is fully " "initialized. Patch by Donghee Na and Victor Stinner." msgstr "" -#: ../NEWS:543 +#: ../NEWS:738 msgid "" ":gh:`151763`: Fixes possible crash on :class:`types.CodeType` deallocation." msgstr "" -#: ../NEWS:545 +#: ../NEWS:740 msgid "" ":gh:`152020`: On the free-threaded build, :func:`asyncio.all_tasks` no " "longer loses eager-started tasks when called from a thread other than the " "one running the event loop." msgstr "" -#: ../NEWS:549 +#: ../NEWS:744 msgid "" ":gh:`151763`: Fix a potential crash in :func:`compile`, :func:`exec`, :func:" "`eval` and :func:`ast.parse` when an allocation fails: the parser or " "compiler could return without setting an exception." msgstr "" -#: ../NEWS:553 +#: ../NEWS:748 msgid "" ":gh:`151912`: Fixed a crash in ``type()`` when selecting a metaclass whose " "``tp_new`` slot is ``NULL``. Such metaclasses are now rejected with " "``TypeError`` instead of causing a NULL pointer dereference." msgstr "" -#: ../NEWS:557 +#: ../NEWS:752 msgid "" ":gh:`151773`: Fix a crash in :func:`contextvars.ContextVar.set` when memory " "allocation fails." msgstr "" -#: ../NEWS:560 +#: ../NEWS:755 msgid "" ":gh:`151672`: Fix an inconsistency where calling ``__lazy_import__`` with a " "string ``fromlist`` would return a :class:`types.LazyImportType` that " "resolves to the named member, rather than the module being imported." msgstr "" -#: ../NEWS:564 +#: ../NEWS:759 msgid "" ":gh:`151619`: Fix an issue where using non-module global or builtin " "namespaces (such as dictionaries passed to :func:`exec`) could cause cached " "global loads to produce unresolved :ref:`lazy imports `." msgstr "" -#: ../NEWS:569 +#: ../NEWS:764 msgid "" ":gh:`151126`: Fix a crash when sharing :class:`memoryview` objects between " "interpreters fails due to running out of memory. It now raises a proper :exc:" "`MemoryError`." msgstr "" -#: ../NEWS:573 +#: ../NEWS:768 msgid "" ":gh:`151644`: Fix a data race in :func:`sys.setdlopenflags` and :func:`sys." "getdlopenflags` when called concurrently in the free-threaded build. The " @@ -1162,76 +1485,76 @@ msgid "" "functions now use atomic load/store operations." msgstr "" -#: ../NEWS:579 +#: ../NEWS:774 msgid "" ":gh:`151126`: Avoid possible crash in ``_winapi.c`` where a device has no " "memory left. Now it properly raises a :exc:`MemoryError`. Patch by Ivy Xu." msgstr "" -#: ../NEWS:582 +#: ../NEWS:777 msgid "" ":gh:`151029`: On Linux, fix :func:`sys.remote_exec` unable to find remote " "writable memory when ``libpython`` replaced on disk." msgstr "" -#: ../NEWS:585 +#: ../NEWS:780 msgid "" ":gh:`150459`: Fix :exc:`SyntaxError` error message for ``from x lazy import " "y``. Raise :exc:`SyntaxWarning` on ``from . lazy import x`` (with whitespace " "between the dots and a module named ``lazy``)." msgstr "" -#: ../NEWS:589 +#: ../NEWS:784 msgid "" ":gh:`150858`: Fix a data race while changing ``__qualname__`` of a type " "concurrently on free-threaded builds." msgstr "" -#: ../NEWS:592 +#: ../NEWS:787 msgid "" ":gh:`144774`: Fix data race in :class:`BaseException` when an exception is " "copied while being mutated." msgstr "" -#: ../NEWS:595 +#: ../NEWS:790 msgid "" ":gh:`150411`: Fix a data race in the free-threaded build when :func:`gc." "get_count` reads the young generation allocation count while another thread " "updates it." msgstr "" -#: ../NEWS:599 +#: ../NEWS:794 msgid "" ":gh:`149689`: Fix missing error propagation in parser action helpers when " "memory allocation fails. Patch by Thomas Kowalski." msgstr "" -#: ../NEWS:602 +#: ../NEWS:797 msgid "" ":gh:`149162`: Fix a potential deadlock in :c:func:" "`PyUnicode_InternFromString` and other interning functions in the :term:" "`free-threaded build` when called from C++ static local initializers." msgstr "" -#: ../NEWS:607 +#: ../NEWS:802 msgid ":gh:`148825`: Fix build error if specialization is disabled." msgstr "" -#: ../NEWS:612 +#: ../NEWS:807 msgid "" ":gh:`153695`: Hashing a :class:`sqlite3.Row` that contains an unhashable " "value now raises :exc:`TypeError` instead of :exc:`SystemError`. Patch by " "tonghuaroot." msgstr "" -#: ../NEWS:616 +#: ../NEWS:811 msgid "" ":gh:`153658`: Fix :meth:`sqlite3.Connection.iterdump` raising :exc:`sqlite3." "OperationalError` when a table name contains a single quote. Patch by " "tonghuaroot." msgstr "" -#: ../NEWS:620 +#: ../NEWS:815 msgid "" ":gh:`85943`: Fix :mod:`struct` functions raising :exc:`BytesWarning` under " "the ``-bb`` command line option when a :class:`str` format is used after an " @@ -1239,7 +1562,7 @@ msgid "" "longer mixes :class:`str` and :class:`bytes` keys." msgstr "" -#: ../NEWS:625 +#: ../NEWS:820 msgid "" ":gh:`151292`: Store the sample count in :mod:`profiling.sampling` binary " "format, as a 64-bit integer, widening from previously used 32-bit integer. " @@ -1248,46 +1571,46 @@ msgid "" "Pawłowski-Wieroński." msgstr "" -#: ../NEWS:631 +#: ../NEWS:826 msgid "" ":gh:`153417`: Error messages from :meth:`imaplib.IMAP4.select` and :meth:" "`imaplib.IMAP4.uid` no longer raise :exc:`BytesWarning` under :option:`!-bb` " "when the mailbox or command argument is :class:`bytes`." msgstr "" -#: ../NEWS:635 +#: ../NEWS:830 msgid "" ":gh:`153406`: :func:`email.utils.parsedate_to_datetime` now raises :exc:" "`ValueError` instead of :exc:`OverflowError` when the parsed year or " "timezone offset is out of range, matching its documented behavior." msgstr "" -#: ../NEWS:639 +#: ../NEWS:834 msgid "" ":gh:`153333`: The ``readprofile`` method of :class:`tkinter.Tk` now reads " "the user's profile scripts using the encoding declared in the file, instead " "of the locale encoding." msgstr "" -#: ../NEWS:643 +#: ../NEWS:838 msgid "" ":gh:`153083`: Defer GC tracking of an :class:`array.array` to the end of its " "construction. Patch by Donghee Na." msgstr "" -#: ../NEWS:646 +#: ../NEWS:841 msgid "" ":gh:`153292`: Fix data race in repr of :class:`threading.RLock` in free-" "threading build." msgstr "" -#: ../NEWS:649 +#: ../NEWS:844 msgid "" ":gh:`153293`: Fix the live sampling profiler TUI keeping stale aggregated " "opcode statistics after a stats reset." msgstr "" -#: ../NEWS:652 +#: ../NEWS:847 msgid "" ":gh:`143990`: A :class:`tkinter.font.Font` created from a named font, " "including by :meth:`~tkinter.font.Font.copy`, now copies its configured " @@ -1295,37 +1618,37 @@ msgid "" "preserving a size specified in pixels (a negative size)." msgstr "" -#: ../NEWS:657 +#: ../NEWS:852 msgid "" ":gh:`148286`: Fix undefined behavior in :attr:`compression.zstd." "ZstdDecompressor.unused_data` when a complete frame was decompressed in a " "single call." msgstr "" -#: ../NEWS:661 +#: ../NEWS:856 msgid ":gh:`153210`: Fix crash on :mod:`array` import under a memory pressure." msgstr "" -#: ../NEWS:663 +#: ../NEWS:858 msgid "" ":gh:`153200`: Fix :func:`math.isqrt` returning an incorrect result for " "arguments not less than 2**64 that are instances of an :class:`int` subclass " "with an overridden comparison operator." msgstr "" -#: ../NEWS:667 +#: ../NEWS:862 msgid "" ":gh:`153068`: Fix :meth:`!cProfile.Profile.enable` to no longer overwrite " "errors from :mod:`sys.monitoring`." msgstr "" -#: ../NEWS:670 +#: ../NEWS:865 msgid "" ":gh:`153062`: Fix a crash when concurrently iterating an :func:`itertools." "tee` iterator on the free-threaded build." msgstr "" -#: ../NEWS:673 +#: ../NEWS:868 msgid "" ":gh:`153056`: Fix :class:`string.Template` raising a spurious :exc:" "`ValueError` when the *pattern* attribute is a compiled regular expression " @@ -1333,7 +1656,7 @@ msgid "" "also occurred as a data race on the first concurrent use." msgstr "" -#: ../NEWS:678 +#: ../NEWS:873 msgid "" ":gh:`143921`: Narrow the control character check in :mod:`imaplib` commands: " "only NUL, CR and LF are now rejected. Other control characters are valid in " @@ -1341,27 +1664,27 @@ msgid "" "they are now accepted and sent quoted." msgstr "" -#: ../NEWS:683 +#: ../NEWS:878 msgid "" ":gh:`153037`: Fix :class:`~compression.zstd.ZstdFile` raising :exc:" "`AttributeError` instead of :exc:`io.UnsupportedOperation` when iterating " "over a file that is not open for reading." msgstr "" -#: ../NEWS:687 +#: ../NEWS:882 msgid "" ":gh:`135661`: Fix :class:`html.parser.HTMLParser`: an abruptly closed empty " "comment (```` or ````) no longer extends up to a later ``-->`` in " "the same :meth:`~html.parser.HTMLParser.feed` call." msgstr "" -#: ../NEWS:691 +#: ../NEWS:886 msgid "" ":gh:`152851`: Prevent a crash when allocation fails while copying a :func:" "`BLAKE-2s/2b ` object. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:694 +#: ../NEWS:889 msgid "" ":gh:`54930`: Error responses of :class:`http.server.BaseHTTPRequestHandler` " "to malformed request lines now include a status line and headers instead of " @@ -1369,7 +1692,7 @@ msgid "" "word ``GET`` request line) now receives an HTTP/0.9 style response." msgstr "" -#: ../NEWS:699 +#: ../NEWS:894 msgid "" ":gh:`119592`: Fix :class:`concurrent.futures.ProcessPoolExecutor` stranding " "submitted work forever when a worker process exited upon reaching its " @@ -1383,26 +1706,26 @@ msgid "" "crash the executor management thread." msgstr "" -#: ../NEWS:711 +#: ../NEWS:906 msgid "" ":gh:`150579`: :mod:`concurrent.futures` now uses lazy imports for its " "executor submodules instead of a module ``__getattr__`` hook." msgstr "" -#: ../NEWS:714 +#: ../NEWS:909 msgid "" ":gh:`152951`: :class:`collections.deque` prevent rare crash when calling " "``extend`` under high memory pressure conditions." msgstr "" -#: ../NEWS:717 +#: ../NEWS:912 msgid "" ":gh:`150880`: Normalize non-extended Windows paths before appending the " "wildcard used by ``os.listdir()`` and ``os.scandir()``, making paths with " "trailing spaces behave consistently with other filesystem APIs." msgstr "" -#: ../NEWS:721 +#: ../NEWS:916 msgid "" ":gh:`152068`: Fixes a bug when a line was split (particularly on macOS " "Terminal.app) in the middle of a colorized keyword, causing the ANSI Color " @@ -1410,27 +1733,27 @@ msgid "" "colored when it shouldn't" msgstr "" -#: ../NEWS:726 +#: ../NEWS:921 msgid "" ":gh:`152849`: Out-of-range float and integer timestamps now raise :exc:" "`OverflowError` with the same message. Patch by tonghuaroot." msgstr "" -#: ../NEWS:729 +#: ../NEWS:924 msgid "" ":gh:`152847`: Reject a POSIX TZ transition rule with non-digit characters in " "the day-of-year field in the pure-Python :mod:`zoneinfo` parser. Patch by " "tonghuaroot." msgstr "" -#: ../NEWS:733 +#: ../NEWS:928 msgid "" ":gh:`152718`: Fix unbounded memory allocation in the :mod:`profiling." "sampling` binary profile reader when a file declares more string or frame " "entries than it contains." msgstr "" -#: ../NEWS:737 +#: ../NEWS:932 msgid "" ":gh:`108280`: Connecting :mod:`imaplib` to a server that does not send a " "valid IMAP4 greeting (for example a POP3 server answering on the IMAP port) " @@ -1438,7 +1761,7 @@ msgid "" "IMAP4.error: None``." msgstr "" -#: ../NEWS:742 +#: ../NEWS:937 msgid "" ":gh:`63121`: :mod:`imaplib` now refreshes the cached capability list after a " "successful :meth:`~imaplib.IMAP4.login` or :meth:`~imaplib.IMAP4." @@ -1449,7 +1772,7 @@ msgid "" "redundant ``CAPABILITY`` command." msgstr "" -#: ../NEWS:751 +#: ../NEWS:946 msgid "" ":gh:`88574`: :mod:`imaplib` no longer fails when a server sends a spurious " "blank line after the counted data of a literal, including after a literal " @@ -1457,7 +1780,7 @@ msgid "" "Such blank lines are now skipped without swallowing the following line." msgstr "" -#: ../NEWS:756 +#: ../NEWS:951 msgid "" ":gh:`152502`: Detect the :mod:`curses` mouse interface (:func:`~curses." "getmouse`, the ``BUTTON*`` constants, and others) with a configure " @@ -1467,13 +1790,13 @@ msgid "" "``windows-curses``)." msgstr "" -#: ../NEWS:763 +#: ../NEWS:958 msgid "" ":gh:`151842`: Fix a crash in :func:`!_interpreters.capture_exception` when :" "exc:`MemoryError` happens. Patch by Amrutha Modela." msgstr "" -#: ../NEWS:766 +#: ../NEWS:961 msgid "" ":gh:`40038`: :mod:`imaplib` now again quotes command arguments when " "necessary, for example mailbox names containing a space. Such quoting was " @@ -1483,7 +1806,7 @@ msgid "" "unchanged, so code that quotes arguments itself keeps working." msgstr "" -#: ../NEWS:773 +#: ../NEWS:968 msgid "" ":gh:`50966`: Fix unbounded recursion in :mod:`turtle` when a mouse event " "handler that moves the turtle is reentered while the screen is being " @@ -1491,7 +1814,7 @@ msgid "" "previously crash the interpreter." msgstr "" -#: ../NEWS:778 +#: ../NEWS:973 msgid "" ":gh:`152569`: Fix :func:`asyncio.wait` leaking waiting tasks via the await-" "graph when racing a future that never resolves. The waiting task is now " @@ -1499,7 +1822,7 @@ msgid "" "returns, even for pending futures." msgstr "" -#: ../NEWS:783 +#: ../NEWS:978 msgid "" ":gh:`110357`: Importing :mod:`hashlib` no longer logs an error to stderr " "when a normally guaranteed hash algorithm is unavailable in the current " @@ -1509,14 +1832,14 @@ msgid "" "`ValueError`." msgstr "" -#: ../NEWS:790 +#: ../NEWS:985 msgid "" ":gh:`152356`: Fix a hang in ``profiling.sampling run --blocking`` on Windows " "when the target process exits. The profiler now finalizes binary profiles " "instead of continuing to sample the exited process." msgstr "" -#: ../NEWS:794 +#: ../NEWS:989 msgid "" ":gh:`78335`: Update the docstrings of :mod:`tkinter` and :mod:`tkinter.ttk` " "widget classes to list all supported widget options, including options added " @@ -1524,20 +1847,20 @@ msgid "" "previously had no option list at all." msgstr "" -#: ../NEWS:799 +#: ../NEWS:994 msgid "" ":gh:`151126`: Fix two crashes in :mod:`tkinter` and :mod:`socket` modules " "initialization under a memory pressure. Sets missing :exc:`MemoryError`." msgstr "" -#: ../NEWS:802 +#: ../NEWS:997 msgid "" ":gh:`133031`: :class:`curses.textpad.Textbox` now enters and reads back the " "non-ASCII characters of an 8-bit locale encoding, instead of mangling them " "with a 7-bit mask." msgstr "" -#: ../NEWS:806 +#: ../NEWS:1001 msgid "" ":gh:`71880`: :class:`curses.textpad.Textbox` now lets the lower-right cell " "of the window be edited. Writing it with :meth:`~curses.window.addch` would " @@ -1546,7 +1869,7 @@ msgid "" "which keeps the cursor in place." msgstr "" -#: ../NEWS:812 +#: ../NEWS:1007 msgid "" ":gh:`83274`: Deallocating a :mod:`tkinter` application from a thread other " "than the one it was created in no longer crashes the interpreter. The " @@ -1554,14 +1877,14 @@ msgid "" "reported." msgstr "" -#: ../NEWS:817 +#: ../NEWS:1012 msgid "" ":gh:`152305`: Fix the pure-Python :meth:`datetime.time.strftime` " "implementation raising :exc:`AttributeError` for the year directives. Patch " "by tonghuaroot." msgstr "" -#: ../NEWS:821 +#: ../NEWS:1016 msgid "" ":gh:`88758`: :meth:`!tkinter.Misc.focus_get`, :meth:`!focus_displayof`, :" "meth:`!focus_lastfor` and :meth:`!winfo_containing` now return ``None`` " @@ -1569,21 +1892,21 @@ msgid "" "`tkinter` (for example a torn-off menu)." msgstr "" -#: ../NEWS:826 +#: ../NEWS:1021 msgid "" ":gh:`38464`: :meth:`!tkinter.Misc.nametowidget` now resolves the auto-" "generated names of cloned menus (a menu used as a menubar or a cascade) back " "to the original widget." msgstr "" -#: ../NEWS:830 +#: ../NEWS:1025 msgid "" ":gh:`152248`: Make the C and pure-Python :mod:`zoneinfo` parsers validate " "POSIX TZ abbreviations consistently, rejecting unquoted abbreviations with " "non-letter characters and empty quoted abbreviations. Patch by tonghuaroot." msgstr "" -#: ../NEWS:835 +#: ../NEWS:1030 msgid "" ":gh:`80937`: Fix a memory leak in :mod:`tkinter` when a Tcl command created " "with ``createcommand`` was not explicitly removed before the interpreter was " @@ -1591,14 +1914,14 @@ msgid "" "reference cycle." msgstr "" -#: ../NEWS:840 +#: ../NEWS:1035 msgid "" ":gh:`152246`: Fix the pure-Python :mod:`zoneinfo` parser accepting an " "invalid POSIX TZ transition rule with a non-period separator. Patch by " "tonghuaroot." msgstr "" -#: ../NEWS:844 +#: ../NEWS:1039 msgid "" ":gh:`151496`: Fixed ``profiling.sampling --gecko`` with ``--async-aware`` by " "flattening async task stacks before generating Gecko samples. ``--binary`` " @@ -1606,7 +1929,7 @@ msgid "" "data." msgstr "" -#: ../NEWS:849 +#: ../NEWS:1044 msgid "" ":gh:`139816`: Fix a hang in :mod:`tkinter` on interactive Python built " "without :mod:`readline`. An exception raised in a callback no longer causes " @@ -1614,7 +1937,7 @@ msgid "" "callbacks now keep running until input is actually available on stdin." msgstr "" -#: ../NEWS:855 +#: ../NEWS:1050 msgid "" ":gh:`139145`: Fix a busy loop in :mod:`tkinter` on interactive Python. When " "a Tcl command running its own event loop (such as ``vwait`` or :meth:`!" @@ -1623,7 +1946,7 @@ msgid "" "is available. Based on a patch by Michiel de Hoon." msgstr "" -#: ../NEWS:861 +#: ../NEWS:1056 msgid "" ":gh:`152212`: Fix the pure-Python :mod:`zoneinfo` parser accepting a POSIX " "TZ string with a ``std`` abbreviation but no offset. This is invalid per " @@ -1631,13 +1954,13 @@ msgid "" "tonghuaroot." msgstr "" -#: ../NEWS:866 +#: ../NEWS:1061 msgid "" ":gh:`152156`: Fix a possible crash in :func:`concurrent.interpreters.create` " "under limited memory conditions." msgstr "" -#: ../NEWS:869 +#: ../NEWS:1064 msgid "" ":gh:`152157`: The C implementations of :meth:`~datetime.datetime." "fromisoformat` and :meth:`~datetime.time.fromisoformat` now reject a decimal " @@ -1645,107 +1968,107 @@ msgid "" "designator." msgstr "" -#: ../NEWS:874 +#: ../NEWS:1069 msgid "" ":gh:`151763`: Fix crash in :func:`!_interpqueues.create` whe :exc:" "`MemoryError` happens on queue creation." msgstr "" -#: ../NEWS:877 +#: ../NEWS:1072 msgid "" ":gh:`151669`: On Windows, when populating tar archives from filesystem " "content, to conform to the tar format standard, backslashes in symlink " "targets are be replaced by slashes." msgstr "" -#: ../NEWS:881 +#: ../NEWS:1076 msgid "" ":gh:`105895`: Add :keyword:`match` and :keyword:`case` to the list of " "supported topics by :func:`help`." msgstr "" -#: ../NEWS:884 +#: ../NEWS:1079 msgid "" ":gh:`151378`: Fix a bug in the binary collector in Tachyon that caused " "unbounded memory growth while profiling a thread that stayed asleep. Patch " "by Maurycy Pawłowski-Wieroński." msgstr "" -#: ../NEWS:888 +#: ../NEWS:1083 msgid "" ":gh:`152079`: Fix :meth:`datetime.datetime.fromisoformat` in the C " "implementation dropping the sub-second part of a UTC offset whose whole-" "second part is zero, matching the pure-Python implementation." msgstr "" -#: ../NEWS:892 +#: ../NEWS:1087 msgid "" ":gh:`152052`: The :mod:`json` C accelerator now correctly reports an " "unterminated string for a ``\\uXXXX`` escape at the end of the input." msgstr "" -#: ../NEWS:895 +#: ../NEWS:1090 msgid "" ":gh:`152060`: Fix :meth:`datetime.datetime.fromisoformat` raising :exc:" "`AssertionError` instead of :exc:`ValueError` for some malformed strings in " "the pure-Python implementation, matching the C implementation." msgstr "" -#: ../NEWS:899 +#: ../NEWS:1094 msgid "" ":gh:`127802`: The deprecated :class:`tkinter.Variable` methods :meth:`!" "trace_variable`, :meth:`!trace`, :meth:`!trace_vdelete` and :meth:`!" "trace_vinfo` are now scheduled for removal in Python 3.17." msgstr "" -#: ../NEWS:903 +#: ../NEWS:1098 msgid "" ":gh:`126219`: Fixed a crash in :class:`tkinter.Tk` when *className* contains " "a non-BMP character and tkinter is built against Tcl/Tk 8.x. Such a name is " "now rejected with a :exc:`ValueError`." msgstr "" -#: ../NEWS:907 +#: ../NEWS:1102 msgid "" ":gh:`86165`: Fix :func:`imaplib.Time2Internaldate` to use the local timezone " "offset for ``time.struct_time`` values with ``tm_gmtoff`` set to ``None``, " "as returned by ``datetime.datetime.timetuple()``. Contributed by Xiao Yuan." msgstr "" -#: ../NEWS:912 +#: ../NEWS:1107 msgid "" ":gh:`151814`: Fix unbounded memory growth in :class:`io.TextIOWrapper` when " "repeatedly writing an empty string." msgstr "" -#: ../NEWS:915 +#: ../NEWS:1110 msgid "" ":gh:`151596`: Add missing ``size`` positional argument to the pure-Python " "implementation of :meth:`io.TextIOBase.readline`." msgstr "" -#: ../NEWS:918 +#: ../NEWS:1113 msgid "" ":gh:`151640`: Fix a data race in :class:`io.BytesIO` in free-threaded builds " "when whole-buffer reads or peeks, or :meth:`~io.BytesIO.getvalue`, share the " "internal buffer with concurrent writes." msgstr "" -#: ../NEWS:922 +#: ../NEWS:1117 msgid "" ":gh:`151613`: Fix another way the Tachyon profiler frame cache could produce " "impossible mixed stack traces when ``_PyInterpreterFrame`` addresses are " "reused, by validating cached frame anchors with a sequence counter." msgstr "" -#: ../NEWS:926 +#: ../NEWS:1121 msgid "" ":gh:`148660`: Fix a crash in :meth:`!collections.OrderedDict.copy` when a " "key's ``__eq__`` or a subclass method mutates the dict during the copy. Now " "raises :exc:`RuntimeError` instead, as iteration does." msgstr "" -#: ../NEWS:930 +#: ../NEWS:1125 msgid "" ":gh:`151497`: Opening a :mod:`tarfile` archive no longer attempts to pre-" "allocate a huge buffer when a crafted or truncated member claims an " @@ -1754,7 +2077,7 @@ msgid "" "longer trigger memory exhaustion." msgstr "" -#: ../NEWS:936 +#: ../NEWS:1131 msgid "" ":gh:`151416`: Fix a crash in :func:`os.spawnv` and :func:`os.spawnve` when " "an *argv* item's :meth:`~os.PathLike.__fspath__` method mutates the *argv* " @@ -1763,37 +2086,31 @@ msgid "" "embedded null, are no longer replaced with a generic :exc:`TypeError`." msgstr "" -#: ../NEWS:942 -msgid "" -":gh:`150994`: Make type annotations in the private ``_colorize`` module " -"resolvable." -msgstr "" - -#: ../NEWS:945 +#: ../NEWS:1137 msgid "" ":gh:`150994`: Make the type annotations in the private ``_colorize`` module " "resolvable." msgstr "" -#: ../NEWS:948 +#: ../NEWS:1140 msgid "" ":gh:`150583`: Correctly set the default compression level in :mod:" "`compression.zstd` when passing a digested dictionary during compression." msgstr "" -#: ../NEWS:952 +#: ../NEWS:1144 msgid "" ":gh:`150641`: Fix bug where :func:`typing.evaluate_forward_ref` with the " "``STRING`` format could leak internal names used by the annotation machinery." msgstr "" -#: ../NEWS:956 +#: ../NEWS:1148 msgid "" ":gh:`149816`: Fix a potential use after free condition in :func:`pickle." "dumps` in free-threaded mode when serializing lists." msgstr "" -#: ../NEWS:959 +#: ../NEWS:1151 msgid "" ":gh:`47005`: Fix :meth:`!urllib.request.AbstractHTTPHandler.do_open` to give " "regular headers set via :meth:`~urllib.request.Request.add_header` priority " @@ -1801,14 +2118,14 @@ msgid "" "get_header` and :meth:`~urllib.request.Request.header_items`." msgstr "" -#: ../NEWS:965 +#: ../NEWS:1157 msgid "" ":gh:`140729`: Fix a pickling error in the ``cProfile`` module when profiling " "a script that uses :class:`multiprocessing.Process` with the ``spawn`` and " "``forkserver`` start methods." msgstr "" -#: ../NEWS:969 +#: ../NEWS:1161 msgid "" ":gh:`115634`: Fix a deadlock in :class:`concurrent.futures." "ProcessPoolExecutor` when using ``max_tasks_per_child``, present since the " @@ -1817,19 +2134,19 @@ msgid "" "Based on a fix proposed by Tabrez Mohammed." msgstr "" -#: ../NEWS:976 +#: ../NEWS:1168 msgid "" ":gh:`79638`: Disallow all access in :mod:`urllib.robotparser` if the " "``robots.txt`` file is unreachable due to server or network errors." msgstr "" -#: ../NEWS:979 +#: ../NEWS:1171 msgid "" ":gh:`105708`: Accept an uppercase V prefix in IPvFuture addresses in :func:" "`urllib.parse.urlsplit`." msgstr "" -#: ../NEWS:985 +#: ../NEWS:1177 msgid "" ":gh:`151626`: Fix several tests in ``test.test_inspect``, ``test." "test_import``, ``test.test_importlib``, ``test.test_py_compile`` and ``test." @@ -1838,25 +2155,25 @@ msgid "" "where they assume the default ``__pycache__`` bytecode layout." msgstr "" -#: ../NEWS:991 +#: ../NEWS:1183 msgid "" ":gh:`151096`: Fix ``test_embed`` failing when CPython is configured with a " "split exec prefix (``--exec-prefix`` differing from ``--prefix``)." msgstr "" -#: ../NEWS:997 +#: ../NEWS:1189 msgid "" ":gh:`126877`: Fix the :program:`configure` check for Tcl/Tk which could " "wrongly succeed with optimizing compilers when the libraries are missing." msgstr "" -#: ../NEWS:1000 +#: ../NEWS:1192 msgid "" ":gh:`153438`: Update Windows build and installer tooling and documentation " "to use the current download URL for ``nuget.exe``." msgstr "" -#: ../NEWS:1003 +#: ../NEWS:1195 msgid "" ":gh:`152870`: Fix a compilation error in the :mod:`decimal` C extension " "(``_decimal``) when it is built with ``EXTRA_FUNCTIONALITY``. ``Context." @@ -1865,7 +2182,7 @@ msgid "" "function." msgstr "" -#: ../NEWS:1009 +#: ../NEWS:1201 msgid "" ":gh:`152769`: Enable the :ref:`perf profiler ` trampoline on " "Alpine Linux with the musl C library on ``x86_64`` and ``aarch64``. The " @@ -1873,7 +2190,7 @@ msgid "" "the same assembly trampoline used for glibc is reused for musl." msgstr "" -#: ../NEWS:1014 +#: ../NEWS:1206 msgid "" ":gh:`152502`: The :mod:`curses` module now detects ``set_escdelay()``, " "``set_tabsize()`` and the ``ESCDELAY`` and ``TABSIZE`` variables with :" @@ -1882,7 +2199,7 @@ msgid "" "curses implementations such as NetBSD curses that provide them." msgstr "" -#: ../NEWS:1023 +#: ../NEWS:1215 msgid "" ":gh:`140146`: Prevent :mod:`tkinter` from hanging on Windows if stdin is " "redirected to a pipe in an interactive session. This is helpful for testing " @@ -1890,109 +2207,95 @@ msgid "" "cpython test suite." msgstr "" -#: ../NEWS:1029 ../NEWS:1376 ../NEWS:1705 ../NEWS:2532 ../NEWS:3173 -#: ../NEWS:3675 ../NEWS:5852 ../NEWS:9039 ../NEWS:9418 ../NEWS:10003 -#: ../NEWS:10554 ../NEWS:12005 ../NEWS:15005 ../NEWS:15982 ../NEWS:16493 -#: ../NEWS:17371 ../NEWS:17923 ../NEWS:20202 ../NEWS:21398 ../NEWS:22078 -#: ../NEWS:22770 ../NEWS:23107 ../NEWS:23542 ../NEWS:25635 ../NEWS:26560 -#: ../NEWS:27175 ../NEWS:28061 ../NEWS:28514 ../NEWS:29023 ../NEWS:29469 -#: ../NEWS:31310 ../NEWS:32143 ../NEWS:32861 ../NEWS:33146 ../NEWS:33513 -#: ../NEWS:33999 ../NEWS:34450 ../NEWS:35592 ../NEWS:36031 ../NEWS:36486 -#: ../NEWS:36960 ../NEWS:38113 ../NEWS:39837 ../NEWS:40800 ../NEWS:41348 -#: ../NEWS:44609 ../NEWS:45272 ../NEWS:45432 ../NEWS:45644 ../NEWS:45901 -#: ../NEWS:46232 ../NEWS:47077 ../NEWS:49774 ../NEWS:50125 ../NEWS:50520 -msgid "macOS" -msgstr "" - -#: ../NEWS:1031 +#: ../NEWS:1223 msgid ":gh:`124111`: Update macOS installer to use Tcl/Tk 9.0.4." msgstr "" -#: ../NEWS:1033 +#: ../NEWS:1225 msgid "" ":gh:`152023`: Update macOS installer builds to SQLite 3.53.3. Enable " "median() and percentile() functions." msgstr "" -#: ../NEWS:1037 ../NEWS:1381 ../NEWS:2541 ../NEWS:3925 ../NEWS:7362 -#: ../NEWS:8682 ../NEWS:10308 ../NEWS:13336 ../NEWS:15019 ../NEWS:15987 -#: ../NEWS:16506 ../NEWS:17420 ../NEWS:17944 ../NEWS:20211 ../NEWS:21418 -#: ../NEWS:25645 ../NEWS:27667 ../NEWS:28066 ../NEWS:29476 ../NEWS:31336 -#: ../NEWS:32170 ../NEWS:32578 ../NEWS:32866 ../NEWS:33153 ../NEWS:34022 -#: ../NEWS:34455 ../NEWS:35613 ../NEWS:36496 ../NEWS:36965 ../NEWS:37347 -#: ../NEWS:37738 ../NEWS:38120 ../NEWS:39858 ../NEWS:40807 ../NEWS:41356 -#: ../NEWS:41676 ../NEWS:41925 ../NEWS:44645 ../NEWS:45049 ../NEWS:45279 -#: ../NEWS:45437 ../NEWS:45653 ../NEWS:45906 ../NEWS:47082 ../NEWS:47368 -#: ../NEWS:49239 ../NEWS:49779 ../NEWS:50133 ../NEWS:50525 ../NEWS:50903 -#: ../NEWS:51375 ../NEWS:51701 ../NEWS:52815 ../NEWS:53088 ../NEWS:53290 -#: ../NEWS:53551 ../NEWS:54670 ../NEWS:55970 ../NEWS:56138 ../NEWS:56680 -#: ../NEWS:57197 ../NEWS:57530 ../NEWS:58042 ../NEWS:60066 +#: ../NEWS:1229 ../NEWS:1573 ../NEWS:2733 ../NEWS:4117 ../NEWS:7554 +#: ../NEWS:8874 ../NEWS:10500 ../NEWS:13528 ../NEWS:15211 ../NEWS:16179 +#: ../NEWS:16698 ../NEWS:17612 ../NEWS:18136 ../NEWS:20403 ../NEWS:21610 +#: ../NEWS:25837 ../NEWS:27859 ../NEWS:28258 ../NEWS:29668 ../NEWS:31528 +#: ../NEWS:32362 ../NEWS:32770 ../NEWS:33058 ../NEWS:33345 ../NEWS:34214 +#: ../NEWS:34647 ../NEWS:35805 ../NEWS:36688 ../NEWS:37157 ../NEWS:37539 +#: ../NEWS:37930 ../NEWS:38312 ../NEWS:40050 ../NEWS:40999 ../NEWS:41548 +#: ../NEWS:41868 ../NEWS:42117 ../NEWS:44837 ../NEWS:45241 ../NEWS:45471 +#: ../NEWS:45629 ../NEWS:45845 ../NEWS:46098 ../NEWS:47274 ../NEWS:47560 +#: ../NEWS:49431 ../NEWS:49971 ../NEWS:50325 ../NEWS:50717 ../NEWS:51095 +#: ../NEWS:51567 ../NEWS:51893 ../NEWS:53007 ../NEWS:53280 ../NEWS:53482 +#: ../NEWS:53743 ../NEWS:54862 ../NEWS:56162 ../NEWS:56330 ../NEWS:56872 +#: ../NEWS:57389 ../NEWS:57722 ../NEWS:58234 ../NEWS:60258 msgid "IDLE" msgstr "" -#: ../NEWS:1039 +#: ../NEWS:1231 msgid "" ":gh:`82183`: When the shell is busy running code, using \"Run... " "Customized\" with \"Restart shell\" unchecked now reports that the shell is " "executing instead of restarting it anyway." msgstr "" -#: ../NEWS:1043 +#: ../NEWS:1235 msgid "" ":gh:`83653`: Blanking an integer entry in IDLE's Settings dialog, such as " "\"Auto squeeze min lines\", no longer saves an empty string as an invalid " "configuration value." msgstr "" -#: ../NEWS:1047 +#: ../NEWS:1239 msgid "" ":gh:`65339`: Saving the IDLE Shell or an Output window now defaults to a ``." "txt`` extension and lists text files before Python files, since their " "content is not Python source." msgstr "" -#: ../NEWS:1051 +#: ../NEWS:1243 msgid "" ":gh:`80504`: The \"In files:\" field of IDLE's Find in Files dialog now " "always contains a full directory path, even for an unsaved editor or the " "Shell. This shows in the grep output which directory was searched." msgstr "" -#: ../NEWS:1055 +#: ../NEWS:1247 msgid "" ":gh:`134300`: Do not add the ``idlelib`` directory to the path of the IDLE " "user process. User code run in IDLE can no longer import ``idlelib`` " "submodules as top-level modules, such as ``import help``." msgstr "" -#: ../NEWS:1059 +#: ../NEWS:1251 msgid "" ":gh:`89360`: Fix a rare crash in the IDLE editor when the completion window " "is closed: deleting a key binding for a sequence that is not bound to the " "virtual event is now ignored instead of raising a ``ValueError``." msgstr "" -#: ../NEWS:1063 +#: ../NEWS:1255 msgid "" ":gh:`71956`: Fix Replace All in the IDLE editor's Replace dialog when the " "search direction is \"Up\" and \"Wrap around\" is off: it now replaces all " "matches above the current position instead of only the first one." msgstr "" -#: ../NEWS:1067 +#: ../NEWS:1259 msgid "" ":gh:`152728`: Move functions run.fix_scaling, editor.fixwordbreaks (as " "fix_word_breaks) and pyshell.fix_x11_paste to idlelib.util." msgstr "" -#: ../NEWS:1070 +#: ../NEWS:1262 msgid "" ":gh:`66331`: Set the ``WM_CLASS`` window property of IDLE's windows to " "``Idle`` on X11, so that window managers group and label them correctly " "instead of using the default ``Toplevel``." msgstr "" -#: ../NEWS:1074 +#: ../NEWS:1266 msgid "" ":gh:`85320`: IDLE now reads and writes its configuration files and the " "breakpoints file using UTF-8 instead of the locale encoding. This keeps non-" @@ -2000,35 +2303,35 @@ msgid "" "files portable between environments." msgstr "" -#: ../NEWS:1082 +#: ../NEWS:1274 msgid "" ":gh:`152132`: Fix :c:func:`Py_RunMain` to return an exit code, rather than " "calling :c:func:`Py_Exit`, when running a script, a command, or the REPL. " "Patch by Victor Stinner." msgstr "" -#: ../NEWS:1086 +#: ../NEWS:1278 msgid "" ":gh:`145633`: :c:func:`PyFloat_Pack8` and ``PyFloat_Unpack*`` functions are " "no longer guaranteed to always succeed on CPython." msgstr "" -#: ../NEWS:1089 +#: ../NEWS:1281 msgid "" ":gh:`153300`: :c:func:`PyConfig_Set()` now also set global configuration " "variables. For example, ``PyConfig_Set(\"inspect\", value)`` now also sets :" "c:var:`Py_InspectFlag`. Patch by Victor Stinner." msgstr "" -#: ../NEWS:1095 +#: ../NEWS:1287 msgid "Python 3.15.0 beta 3" msgstr "" -#: ../NEWS:1097 +#: ../NEWS:1289 msgid "*Release date: 2026-06-23*" msgstr "" -#: ../NEWS:1102 +#: ../NEWS:1294 msgid "" ":gh:`151544`: :file:`Modules/Setup.local` is no longer used as a landmark to " "discover whether Python is running in a source tree, as it could potentially " @@ -2036,68 +2339,68 @@ msgid "" "indicator of running in a source tree." msgstr "" -#: ../NEWS:1107 +#: ../NEWS:1299 msgid ":gh:`151159`: Update macOS installer to use OpenSSL 3.5.7." msgstr "" -#: ../NEWS:1109 +#: ../NEWS:1301 msgid ":gh:`151159`: Update Android and iOS installers to use OpenSSL 3.5.7." msgstr "" -#: ../NEWS:1111 +#: ../NEWS:1303 msgid "" ":gh:`150599`: Fix a possible stack buffer overflow in :mod:`bz2` when a :" "class:`bz2.BZ2Decompressor` is reused after a decompression error. The " "decompressor now becomes unusable after libbz2 reports an error." msgstr "" -#: ../NEWS:1115 +#: ../NEWS:1307 msgid "" ":gh:`149835`: :func:`shutil.move` now resolves symlinks via :func:`os.path." "realpath` when checking whether the destination is inside the source " "directory, preventing a symlink-based bypass of that guard." msgstr "" -#: ../NEWS:1122 +#: ../NEWS:1314 msgid "" ":gh:`151905`: Fix OOM error handling in :c:func:`PyFrame_GetBack` to " "propagate exceptions instead of masking them as None." msgstr "" -#: ../NEWS:1125 +#: ../NEWS:1317 msgid "" ":gh:`151722`: Defer GC tracking of :class:`frozendict` to end of " "construction. Patch by Donghee Na." msgstr "" -#: ../NEWS:1128 +#: ../NEWS:1320 msgid "" ":gh:`151546`: Fix the stack limit check if Python is linked to musl (ex: " "Alpine Linux). Use the stack size set by the linker to compute the stack " "limits. Patch by Victor Stinner." msgstr "" -#: ../NEWS:1132 +#: ../NEWS:1324 msgid "" ":gh:`151510`: Fix a crash in :func:`!__lazy_import__` when called without an " "explicit ``globals`` argument and without a current Python frame." msgstr "" -#: ../NEWS:1135 +#: ../NEWS:1327 msgid "" ":gh:`151461`: Fix direct execution of files with invalid source encodings to " "report the underlying codec lookup or decoding error instead of the generic " "``SyntaxError: encoding problem`` message. Patch by Bartosz Sławecki." msgstr "" -#: ../NEWS:1140 +#: ../NEWS:1332 msgid "" ":gh:`151218`: :c:func:`PyConfig_Set` and :func:`sys.set_int_max_str_digits` " "now replace :data:`sys.flags` (create a new object), instead of modifying :" "data:`sys.flags` in-place. Patch by Victor Stinner." msgstr "" -#: ../NEWS:1144 +#: ../NEWS:1336 msgid "" ":gh:`151297`: Fix an invalid pointer dereference that could occur when " "calling :c:func:`PyObject_Realloc` with a NULL pointer in :term:`free-" @@ -2105,56 +2408,56 @@ msgid "" "``mimalloc``." msgstr "" -#: ../NEWS:1149 +#: ../NEWS:1341 msgid "" ":gh:`151253`: If ``import encodings`` (first import) fails at Python " "startup, dump the Python path configuration to help users debugging their " "configuration. Patch by Victor Stinner." msgstr "" -#: ../NEWS:1153 +#: ../NEWS:1345 msgid "" ":gh:`151238`: Fix a crash when compiling a concatenated f-string or t-string " "if an error occurs when processing one of it's parts." msgstr "" -#: ../NEWS:1156 +#: ../NEWS:1348 msgid "" ":gh:`151112`: Fix a crash in the compiler that could occur when running out " "of memory." msgstr "" -#: ../NEWS:1159 +#: ../NEWS:1351 msgid "" ":gh:`151126`: Fix a crash, when there's no memory left on a device, which " "happened in: code compilation, :mod:`!_interpchannels` module, :func:`!" "_winapi.CreateProcess` function." msgstr "" -#: ../NEWS:1163 +#: ../NEWS:1355 msgid "Now these places raise proper :exc:`MemoryError` errors." msgstr "" -#: ../NEWS:1165 +#: ../NEWS:1357 msgid "" ":gh:`150902`: Apply an existing optimization of PyCriticalSection (single " "mutex) to PyCriticalSection2: avoid acquiring the same locks that the " "current CS has already acquired." msgstr "" -#: ../NEWS:1169 +#: ../NEWS:1361 msgid "" ":gh:`151065`: Fix memory leak when using the :ref:`mimalloc memory allocator " "`." msgstr "" -#: ../NEWS:1172 +#: ../NEWS:1364 msgid "" ":gh:`150988`: Fix a reference leak in :exc:`OSError` when attributes are set " "before ``super().__init__()``." msgstr "" -#: ../NEWS:1175 +#: ../NEWS:1367 msgid "" ":gh:`150723`: Fix perf jitdump timestamps on macOS. Events were stamped " "using ``CLOCK_MONOTONIC``, but macOS profilers timestamp their samples with " @@ -2162,7 +2465,7 @@ msgid "" "lining up with the samples, so no Python frame could be resolved." msgstr "" -#: ../NEWS:1180 +#: ../NEWS:1372 msgid "" ":gh:`150723`: Fix malformed perf jitdump thread ids on macOS. The " "``thread_id`` field of the ``JR_CODE_LOAD`` record was written as a 64-bit " @@ -2171,7 +2474,7 @@ msgid "" "frames." msgstr "" -#: ../NEWS:1186 +#: ../NEWS:1378 msgid "" ":gh:`150700`: Fix a :exc:`SystemError` when compiling a class-scope " "comprehension containing a ``lambda`` that references ``__class__``, " @@ -2179,57 +2482,57 @@ msgid "" "Sławecki." msgstr "" -#: ../NEWS:1191 +#: ../NEWS:1383 msgid "" ":gh:`150633`: Fix the frozen importer accepting module names with embedded " "null bytes, which caused it to bypass the :data:`sys.modules` cache and " "create duplicate module objects." msgstr "" -#: ../NEWS:1195 +#: ../NEWS:1387 msgid "" ":gh:`148613`: Fix a data race in the free-threaded build between :func:`gc." "set_threshold` and garbage collection scheduling during object allocation." msgstr "" -#: ../NEWS:1199 +#: ../NEWS:1391 msgid "" ":gh:`150207`: Fix a crash when a memory allocation fails during tokenizer " "initialization. A proper :exc:`MemoryError` is now raised instead." msgstr "" -#: ../NEWS:1202 +#: ../NEWS:1394 msgid "" ":gh:`149805`: Fix a :exc:`SystemError` when compiling a compiling " "``__classdict__`` class annotation. Found by OSS-Fuzz in :oss-fuzz:" "`512907042`." msgstr "" -#: ../NEWS:1206 +#: ../NEWS:1398 msgid ":gh:`149321`: Do not support ``none`` as a lazy imports mode." msgstr "" -#: ../NEWS:1211 +#: ../NEWS:1403 msgid "" ":gh:`75666`: Fix a reference leak in :mod:`tkinter`: the Tcl commands " "created for event callbacks are now deleted when a binding is replaced or " "unbound." msgstr "" -#: ../NEWS:1214 +#: ../NEWS:1406 msgid "" ":gh:`151770`: Fix :meth:`datetime.datetime.fromisoformat` raising :exc:" "`AssertionError` instead of :exc:`ValueError` for an out-of-range month " "combined with a ``24:00`` time." msgstr "" -#: ../NEWS:1218 +#: ../NEWS:1410 msgid "" ":gh:`151665`: :func:`inspect.signature` now works on the lazy evaluators of " "type aliases and type parameters instead of raising :exc:`ValueError`." msgstr "" -#: ../NEWS:1221 +#: ../NEWS:1413 msgid "" ":gh:`151695`: Fix a use-after-free in the :mod:`curses` module. The " "encoding of the initial screen, used by :func:`curses.unctrl` and :func:" @@ -2238,7 +2541,7 @@ msgid "" "deallocated." msgstr "" -#: ../NEWS:1227 +#: ../NEWS:1419 msgid "" ":gh:`151436`: Fix skewed stack trackes in the Tachyon profiler when caching " "is enabled and when generators and coroutines are profiled, by updating " @@ -2247,7 +2550,7 @@ msgid "" "Wieroński." msgstr "" -#: ../NEWS:1233 +#: ../NEWS:1425 msgid "" ":gh:`151426`: Fix impossible stack traces (callers and callees cross called, " "orphans and incorrect lines) in the Tachyon profiler when caching frames, by " @@ -2255,43 +2558,43 @@ msgid "" "miss. Patch by Maurycy Pawłowski-Wieroński." msgstr "" -#: ../NEWS:1238 +#: ../NEWS:1430 msgid "" ":gh:`151403`: Fixed a crash in :class:`subprocess.Popen` (and " "``_posixsubprocess.fork_exec``) when an ``argv`` item's :meth:`~os.PathLike." "__fspath__` concurrently mutates the ``args`` sequence being converted." msgstr "" -#: ../NEWS:1243 +#: ../NEWS:1435 msgid "" ":gh:`151390`: Colorize ``match`` in the :term:`REPL` when followed by a " "unary ``+`` or ``-`` operator. Patch by Bartosz Sławecki." msgstr "" -#: ../NEWS:1246 +#: ../NEWS:1438 msgid "" ":gh:`151126`: Fix crash on unset :exc:`MemoryError` on allocation failure " "in :func:`ctypes.get_errno`." msgstr "" -#: ../NEWS:1249 +#: ../NEWS:1441 msgid ":gh:`151337`: Avoid possible memory leak in ``tkinter.c`` on Windows." msgstr "" -#: ../NEWS:1251 +#: ../NEWS:1443 msgid "" ":gh:`151126`: Fix a crash when :exc:`MemoryError` in :func:`!os." "_path_splitroot` was not set properly." msgstr "" -#: ../NEWS:1254 +#: ../NEWS:1446 msgid "" ":gh:`149671`: Restore compatibility with setuptools ``-nspkg.pth`` files in " "the :mod:`site` module. Inject ``sitedir`` variable in the frame which " "executes pth code. Patch by Victor Stinner." msgstr "" -#: ../NEWS:1258 +#: ../NEWS:1450 msgid "" ":gh:`151295`: Fixed a crash (use-after-free) in :meth:`bytes.join` and :meth:" "`bytearray.join` that could occur if an item's :meth:`~object.__buffer__` " @@ -2299,13 +2602,13 @@ msgid "" "as a :exc:`RuntimeError` instead." msgstr "" -#: ../NEWS:1263 +#: ../NEWS:1455 msgid "" ":gh:`109940`: Fix Windows :mod:`venv` activation in ``cmd.exe`` to respect " "``VIRTUAL_ENV_DISABLE_PROMPT``." msgstr "" -#: ../NEWS:1266 +#: ../NEWS:1458 msgid "" ":gh:`150771`: Fix :mod:`email` messages created with ``shift_jis`` or ``euc-" "jp`` charsets. ``set_content()`` now stores the payload using the output " @@ -2313,39 +2616,39 @@ msgid "" "`UnicodeEncodeError`." msgstr "" -#: ../NEWS:1271 +#: ../NEWS:1463 msgid "" ":gh:`151039`: Fix a crash when static :mod:`datetime` types outlive the " "``_datetime`` module." msgstr "" -#: ../NEWS:1274 +#: ../NEWS:1466 msgid "" ":gh:`151021`: Fix :meth:`mmap.mmap.find` and :meth:`~mmap.mmap.rfind` to " "return ``-1`` when searching for an empty subsequence with a start position " "past the end of the mapping." msgstr "" -#: ../NEWS:1278 +#: ../NEWS:1470 msgid "" ":gh:`62825`: Encodings \"KS_C_5601-1987\", \"KS X 1001\", etc are now " "aliases of \"CP949\" instead of \"EUC-KR\"." msgstr "" -#: ../NEWS:1281 +#: ../NEWS:1473 msgid "" ":gh:`150913`: Fix :class:`sqlite3.Blob` slice assignment to raise :exc:" "`TypeError` and :exc:`IndexError` for type and size mismatches respectively, " "even when the target slice is empty." msgstr "" -#: ../NEWS:1285 +#: ../NEWS:1477 msgid "" ":gh:`143008`: Fix race conditions when re-initializing a :class:`io." "TextIOWrapper` object." msgstr "" -#: ../NEWS:1288 +#: ../NEWS:1480 msgid "" ":gh:`150662`: Fix the ``--gecko`` collector in :mod:`profiling.sampling` " "that kept every sample in memory. It now writes sample and marker data to " @@ -2353,69 +2656,69 @@ msgid "" "the end. Patch by Pablo Galindo and Maurycy Pawłowski-Wieroński." msgstr "" -#: ../NEWS:1293 +#: ../NEWS:1485 msgid "" ":gh:`150750`: Fix a race condition in :meth:`collections.deque.index` with " "free-threading." msgstr "" -#: ../NEWS:1296 +#: ../NEWS:1488 msgid "" ":gh:`148932`: Fix ``profiling.sampling`` on Windows virtual environments to " "resolve the actual Python PID from a virtual environment shim." msgstr "" -#: ../NEWS:1299 +#: ../NEWS:1491 msgid ":gh:`149816`: Fix race condition in :attr:`ssl.SSLContext.sni_callback`" msgstr "" -#: ../NEWS:1301 +#: ../NEWS:1493 msgid "" ":gh:`53144`: The :mod:`email` package now supports all aliases of Python " "codecs and uses MIME/IANA names for all IANA registered charsets." msgstr "" -#: ../NEWS:1304 +#: ../NEWS:1496 msgid "" ":gh:`149891`: Add support for more encoding aliases `officially registered " "in IANA `__." msgstr "" -#: ../NEWS:1308 +#: ../NEWS:1500 msgid "" ":gh:`149473`: Calling ``os.environ.clear()`` now emits ``os._clearenv`` " "auditing event. Patch by Victor Stinner." msgstr "" -#: ../NEWS:1311 +#: ../NEWS:1503 msgid "" ":gh:`148954`: Fix XML injection vulnerability in :func:`xmlrpc.client.dumps` " "where the ``methodname`` was not being escaped before interpolation into the " "XML body." msgstr "" -#: ../NEWS:1315 +#: ../NEWS:1507 msgid "" ":gh:`143988`: Fixed crashes in :meth:`socket.socket.sendmsg` and :meth:" "`socket.socket.recvmsg_into` that could occur if buffer sequences are " "concurrently mutated." msgstr "" -#: ../NEWS:1319 +#: ../NEWS:1511 msgid "" ":gh:`120665`: Fixed an issue where ``unittest`` loaders would load and " "instantiate :class:`unittest.TestCase`-derived subclasses that are also " "abstract base classes, which can't be instantiated." msgstr "" -#: ../NEWS:1323 +#: ../NEWS:1515 msgid "" ":gh:`91099`: :meth:`imaplib.IMAP4.login` now raises exceptions with :class:" "`str` instead of :class:`bytes`. Patch by Florian Best." msgstr "" -#: ../NEWS:1326 +#: ../NEWS:1518 msgid "" ":gh:`101267`: When a worker process terminates unexpectedly, :class:" "`concurrent.futures.ProcessPoolExecutor` now sets a separate :exc:" @@ -2426,7 +2729,7 @@ msgid "" "appending another copy of the traceback to it." msgstr "" -#: ../NEWS:1337 +#: ../NEWS:1529 msgid "" ":gh:`86726`: Greatly expand the :mod:`tkinter` documentation to cover the " "full public API of the package and its submodules. The descriptions are " @@ -2434,104 +2737,104 @@ msgid "" "``versionadded``/``versionchanged`` information." msgstr "" -#: ../NEWS:1342 +#: ../NEWS:1534 msgid "" ":gh:`150319`: Generic builtin and standard library types now document the " "meaning of their type parameters." msgstr "" -#: ../NEWS:1345 +#: ../NEWS:1537 msgid "" ":gh:`109503`: Fix documentation for :func:`shutil.move` on usage of :func:" "`os.rename` since nonatomic move might be used even if the files are on the " "same filesystem. Patch by Fang Li" msgstr "" -#: ../NEWS:1352 +#: ../NEWS:1544 msgid ":gh:`151130`: Add more tests for ``PyWeakref_*`` C API." msgstr "" -#: ../NEWS:1354 +#: ../NEWS:1546 msgid "" ":gh:`150966`: Avoid prematurely terminating failing live sampling profiler " "test targets, which made stderr assertions flaky on ASAN buildbots." msgstr "" -#: ../NEWS:1357 +#: ../NEWS:1549 msgid "" ":gh:`148853`: Fix tests failing on FreeBSD in test.support's " "in_systemd_nspawn_sync_suppressed() due to unreadable /run directory." msgstr "" -#: ../NEWS:1363 +#: ../NEWS:1555 msgid ":gh:`151163`: Updated Android build to include SQLite version 3.53.2." msgstr "" -#: ../NEWS:1368 +#: ../NEWS:1560 msgid ":gh:`151163`: Updated Windows builds to include SQLite version 3.53.2." msgstr "" -#: ../NEWS:1370 +#: ../NEWS:1562 msgid ":gh:`151159`: Updated bundled version of OpenSSL to 3.5.7." msgstr "" -#: ../NEWS:1372 +#: ../NEWS:1564 msgid "" ":gh:`150836`: Make installed tkinter work with Tcl/Tk 9 builds that embed " "the Tk script library in the Tk DLL on Windows." msgstr "" -#: ../NEWS:1378 +#: ../NEWS:1570 msgid ":gh:`151163`: Updated macOS installer to include SQLite version 3.53.2." msgstr "" -#: ../NEWS:1383 +#: ../NEWS:1575 msgid ":issue:`6699`: Warn the user if a file will be overwritten when saving." msgstr "" -#: ../NEWS:1388 +#: ../NEWS:1580 msgid "" ":gh:`141510`: Add :class:`frozendict` to the fast paths of :c:func:" "`PyMapping_GetOptionalItem`, :c:func:`PyMapping_Keys`, :c:func:" "`PyMapping_Values`, and :c:func:`PyMapping_Items`." msgstr "" -#: ../NEWS:1392 +#: ../NEWS:1584 msgid "" ":gh:`123619`: :c:func:`PyUnstable_Object_EnableDeferredRefcount` now returns " "``0`` if the object is not tracked by the garbage collector: if :func:`gc." "is_tracked` is false. Patch by Victor Stinner." msgstr "" -#: ../NEWS:1396 +#: ../NEWS:1588 msgid "" ":gh:`149044`: Improved error message when specifying non-type base classes " "in :c:macro:`Py_tp_bases`, :c:macro:`Py_tp_base`, and *bases* argument to :c:" "func:`PyType_FromMetaclass` and other ``PyType_From*`` functions." msgstr "" -#: ../NEWS:1400 +#: ../NEWS:1592 msgid "" ":gh:`150907`: Fix ``dynamic_annotations.h`` header file when built with C++ " "and Valgrind: add ``extern \"C++\" scope`` for the C++ template. Patch by " "Victor Stinner." msgstr "" -#: ../NEWS:1406 +#: ../NEWS:1598 msgid "Python 3.15.0 beta 2" msgstr "" -#: ../NEWS:1408 +#: ../NEWS:1600 msgid "*Release date: 2026-06-02*" msgstr "" -#: ../NEWS:1413 +#: ../NEWS:1605 msgid "" ":gh:`149698`: Update bundled `libexpat `_ to " "version 2.8.1 for the fix for :cve:`2026-45186`." msgstr "" -#: ../NEWS:1416 +#: ../NEWS:1608 msgid "" ":gh:`87451`: The :mod:`ftplib` module's undocumented ``ftpcp`` function no " "longer trusts the IPv4 address value returned from the source server in " @@ -2542,14 +2845,14 @@ msgid "" "Aurascape AI for the report." msgstr "" -#: ../NEWS:1424 +#: ../NEWS:1616 msgid "" ":gh:`149474`: Fix the binary writer in :mod:`profiling.sampling` not firing " "the audit (:pep:`578`) when creating the output file. The writer and the " "reader now accept any path-like object. Patch by Maurycy Pawłowski-Wieroński." msgstr "" -#: ../NEWS:1429 +#: ../NEWS:1621 msgid "" ":gh:`149486`: :func:`tarfile.data_filter` now validates link targets using " "the same normalised value that is written to disk, strips trailing " @@ -2559,7 +2862,7 @@ msgid "" "filter." msgstr "" -#: ../NEWS:1436 +#: ../NEWS:1628 msgid "" ":gh:`149079`: Fix a potential denial of service in :func:`unicodedata." "normalize`. The canonical ordering step of Unicode normalization used a " @@ -2569,27 +2872,27 @@ msgid "" "runs." msgstr "" -#: ../NEWS:1443 +#: ../NEWS:1635 msgid "" ":gh:`149018`: Improved protection against XML hash-flooding attacks in :mod:" "`xml.parsers.expat` and :mod:`xml.etree.ElementTree` when Python is compiled " "with libExpat 2.8.0 or later." msgstr "" -#: ../NEWS:1450 +#: ../NEWS:1642 msgid "" ":gh:`150374`: Fix double release of the import lock on lazy import " "reification errors." msgstr "" -#: ../NEWS:1453 +#: ../NEWS:1645 msgid "" ":gh:`149156`: Fix an intermittent crash after :func:`os.fork` when perf " "trampoline profiling is enabled and the child returns through trampoline " "frames inherited from the parent process." msgstr "" -#: ../NEWS:1457 +#: ../NEWS:1649 msgid "" ":gh:`149449`: Fix a use-after-free crash when the :mod:`unicodedata` module " "was removed from :data:`sys.modules` and garbage-collected between calls " @@ -2597,110 +2900,110 @@ msgid "" "handler." msgstr "" -#: ../NEWS:1462 +#: ../NEWS:1654 msgid "" ":gh:`150107`: :mod:`asyncio`: ``sendfile()`` and ``sock_sendfile()`` event " "loop methods now call ``file.seek(offset)`` if *file* has a ``seek()`` " "method, even if *offset* is ``0`` (default value)." msgstr "" -#: ../NEWS:1466 +#: ../NEWS:1658 msgid ":gh:`150146`: Fix a crash on a complex type variable substitution." msgstr "" -#: ../NEWS:1468 +#: ../NEWS:1660 msgid "" "``from typing import TypeVar; memoryview[TypeVar(\"\")][*typing." "Mapping[..., ...]]`` used to fail due to missing ``NULL`` check on " "``_unpack_args`` C function call." msgstr "" -#: ../NEWS:1472 +#: ../NEWS:1664 msgid "" ":gh:`148587`: :py:attr:`sys.lazy_modules` is now a set instead of a dict as " "initially spelled out in PEP 810." msgstr "" -#: ../NEWS:1475 +#: ../NEWS:1667 msgid "" ":gh:`150042`: Fix refleak in queue.SimpleQueue.put if memory allocation " "fails." msgstr "" -#: ../NEWS:1478 +#: ../NEWS:1670 msgid ":gh:`149590`: Fix crash when faulthandler is imported more than once." msgstr "" -#: ../NEWS:1480 +#: ../NEWS:1672 msgid "" ":gh:`149816`: Fix a race condition in ``_PyBytes_FromList`` in free-" "threading mode." msgstr "" -#: ../NEWS:1483 +#: ../NEWS:1675 msgid "" ":gh:`149816`: Fix a race condition in :class:`memoryview` with free-" "threading." msgstr "" -#: ../NEWS:1486 +#: ../NEWS:1678 msgid "" ":gh:`149807`: Fix ``hash(frozendict)``: compute the hash of each ``(key, " "value)`` pair correctly. Patch by Victor Stinner." msgstr "" -#: ../NEWS:1489 +#: ../NEWS:1681 msgid "" ":gh:`149738`: :mod:`sqlite3`: Disallow removing ``row_factory`` and " "``text_factory`` attributes of a connection to prevent a crash on a query." msgstr "" -#: ../NEWS:1492 +#: ../NEWS:1684 msgid "" ":gh:`139808`: Add branch protections for AArch64 (BTI/PAC) in assembly code " "used by :option:`-X perf_jit <-X>` (Linux perf profiler integration)." msgstr "" -#: ../NEWS:1495 +#: ../NEWS:1687 msgid ":gh:`149676`: Fix ``frozendict | frozendict`` hash." msgstr "" -#: ../NEWS:1497 +#: ../NEWS:1689 msgid "" ":gh:`148829`: :class:`sentinel` objects now support a ``repr=`` argument and " "their :attr:`~sentinel.__module__` attribute is writable." msgstr "" -#: ../NEWS:1500 +#: ../NEWS:1692 msgid "" ":gh:`149642`: Allow imports inside ``exec()`` calls within functions under " "``PYTHON_LAZY_IMPORTS=all``." msgstr "" -#: ../NEWS:1503 +#: ../NEWS:1695 msgid "" ":gh:`144957`: Fix lazy ``from`` imports of module attributes provided by " "module-level ``__getattr__``." msgstr "" -#: ../NEWS:1506 +#: ../NEWS:1698 msgid "" ":gh:`149459`: Fix a crash in the JIT optimizer when a specialized " "``LOAD_SPECIAL`` guard deoptimized after inserting the synthetic ``NULL`` " "stack entry." msgstr "" -#: ../NEWS:1510 +#: ../NEWS:1702 msgid "" ":gh:`148450`: Fix ``abc.register()`` so it invalidates type version tags for " "registered classes." msgstr "" -#: ../NEWS:1516 +#: ../NEWS:1708 msgid ":gh:`150685`: Update bundled pip to 26.1.2" msgstr "" -#: ../NEWS:1518 +#: ../NEWS:1710 msgid "" ":gh:`150228`: The new :class:`site.StartupState` class lets callers batch-" "process :pep:`829` startup configuration files across multiple site " @@ -2713,34 +3016,34 @@ msgid "" "have been removed; use :class:`!site.StartupState` instead." msgstr "" -#: ../NEWS:1530 +#: ../NEWS:1722 msgid "" ":gh:`150406`: Fix a possible crash occurring during :mod:`socket` module " "initialization when the system is out of memory on platforms without a " "reentrant ``gethostbyname``." msgstr "" -#: ../NEWS:1534 +#: ../NEWS:1726 msgid "" ":gh:`150372`: :mod:`readline`: Fix a potential crash during tab completion " "caused by an out-of-memory error during module initialization." msgstr "" -#: ../NEWS:1537 +#: ../NEWS:1729 msgid "" ":gh:`150157`: Fix a crash in free-threaded builds that occurs when pickling " "by name objects without a ``__module__`` attribute while :data:`sys.modules` " "is concurrently being modified." msgstr "" -#: ../NEWS:1541 +#: ../NEWS:1733 msgid "" ":gh:`150175`: Fix race condition in :class:`unittest.mock.ThreadingMock` " "where concurrent calls could lose increments to ``call_count`` and other " "attributes due to a missing lock in ``_increment_mock_call``." msgstr "" -#: ../NEWS:1545 +#: ../NEWS:1737 msgid "" ":gh:`84353`: Preserve non-UTF-8 encoded filenames when appending to a :class:" "`zipfile.ZipFile`. Previously, non-ASCII names stored in a legacy encoding " @@ -2749,43 +3052,43 @@ msgid "" "UTF-8." msgstr "" -#: ../NEWS:1551 +#: ../NEWS:1743 msgid "" ":gh:`149189`: Revert the changes to :mod:`pprint` defaults. Patch by Hugo " "van Kemenade." msgstr "" -#: ../NEWS:1554 +#: ../NEWS:1746 msgid ":gh:`149995`: Update various docstrings in :mod:`typing`." msgstr "" -#: ../NEWS:1556 +#: ../NEWS:1748 msgid "" ":gh:`88726`: The :mod:`email` package now uses standard MIME charset names " "\"gb2312\" and \"big5\" instead of non-standard names \"eucgb2312_cn\" and " "\"big5_tw\"." msgstr "" -#: ../NEWS:1560 +#: ../NEWS:1752 msgid "" ":gh:`149571`: Fix the C implementation of :meth:`xml.etree.ElementTree." "Element.itertext`: it no longer emits text for comments and processing " "instructions." msgstr "" -#: ../NEWS:1564 +#: ../NEWS:1756 msgid "" ":gh:`149921`: Fix reference leaks in error paths of the :mod:`!" "_interpchannels` and :mod:`!_interpqueues` extension modules." msgstr "" -#: ../NEWS:1567 +#: ../NEWS:1759 msgid "" ":gh:`142349`: Add :keyword:`lazy` to the list of support topic by :func:" "`help`." msgstr "" -#: ../NEWS:1570 +#: ../NEWS:1762 msgid "" ":gh:`149819`: Fix regression in :func:`site.addsitedir` where ``.pth`` files " "were no longer processed in Python subprocesses. This happened because :func:" @@ -2793,20 +3096,20 @@ msgid "" "process, causing ``addsitedir`` to skip ``.pth`` processing." msgstr "" -#: ../NEWS:1575 +#: ../NEWS:1767 msgid "" ":gh:`149816`: Fix a race condition in ``_random.Random.__init__`` method in " "free-threading mode." msgstr "" -#: ../NEWS:1578 +#: ../NEWS:1770 msgid "" ":gh:`149801`: Add IANA registered names and aliases with leading zeros " "before number (like IBM00858, CP00858, IBM01140, CP01140) for corresponding " "codecs." msgstr "" -#: ../NEWS:1582 +#: ../NEWS:1774 msgid "" ":gh:`149718`: Coalesce consecutive identical stack frames in Tachyon, so " "aggregating collectors (pstats, collapsed, flamegraph, gecko) receive one " @@ -2814,13 +3117,13 @@ msgid "" "Patch by Maurycy Pawłowski-Wieroński." msgstr "" -#: ../NEWS:1587 +#: ../NEWS:1779 msgid "" ":gh:`149701`: Fix bad return code from Lib/venv/bin/activate if hashing is " "disabled" msgstr "" -#: ../NEWS:1590 +#: ../NEWS:1782 msgid "" ":gh:`149504`: Fix :func:`site.addsitedir` to allow re-entrant calls from " "within startup files. Previously, a ``.pth`` file containing an ``import`` " @@ -2830,7 +3133,7 @@ msgid "" "with``." msgstr "" -#: ../NEWS:1597 +#: ../NEWS:1789 msgid "" ":gh:`149584`: Fix excessive overhead in the Tachyon profiler when inspecting " "a remote process by avoiding repeated remote page-cache scans, batching " @@ -2838,17 +3141,17 @@ msgid "" "Pablo Galindo and Maurycy Pawłowski-Wieroński." msgstr "" -#: ../NEWS:1602 +#: ../NEWS:1794 msgid ":gh:`139489`: Add :func:`xml.is_valid_text` to ``xml.__all__``." msgstr "" -#: ../NEWS:1604 +#: ../NEWS:1796 msgid "" ":gh:`149614`: Fix a regression that broke the ability to deepcopy :class:" "`argparse.ArgumentParser` instances." msgstr "" -#: ../NEWS:1607 +#: ../NEWS:1799 msgid "" ":gh:`112821`: In the REPL, autocompletion might run arbitrary code in the " "getter of a descriptor. If that getter raised an exception, autocompletion " @@ -2856,19 +3159,19 @@ msgid "" "works as expected for these objects." msgstr "" -#: ../NEWS:1612 +#: ../NEWS:1804 msgid "" ":gh:`149534`: Fix merging of :class:`collections.defaultdict` and :class:" "`frozendict`." msgstr "" -#: ../NEWS:1615 +#: ../NEWS:1807 msgid "" ":gh:`149388`: Make :class:`!asyncio.windows_utils.PipeHandle` closing " "idempotent." msgstr "" -#: ../NEWS:1618 +#: ../NEWS:1810 msgid "" ":gh:`149489`: Fix :mod:`~xml.etree.ElementTree` serialization to HTML. The " "content of comments, processing instructions and elements \"xmp\", " @@ -2877,19 +3180,19 @@ msgid "" "support of empty attributes (with value ``None``)." msgstr "" -#: ../NEWS:1624 +#: ../NEWS:1816 msgid "" ":gh:`149056`: Fix :func:`json.load` not forwarding the *array_hook* argument " "to :func:`json.loads`. Patch by Thomas Kowalski." msgstr "" -#: ../NEWS:1627 +#: ../NEWS:1819 msgid "" ":gh:`149046`: :mod:`io`: Fix :class:`io.StringIO` serialization: no longer " "call ``str(obj)`` on :class:`str` subclasses. Patch by Thomas Kowalski." msgstr "" -#: ../NEWS:1630 +#: ../NEWS:1822 msgid "" ":gh:`148441`: :mod:`xml.parsers.expat`: prevent a crash in :meth:`~xml." "parsers.expat.xmlparser.CharacterDataHandler` when the character data size " @@ -2897,13 +3200,13 @@ msgid "" "buffer_size>`." msgstr "" -#: ../NEWS:1635 +#: ../NEWS:1827 msgid "" ":gh:`146452`: Fix segfault in :mod:`pickle` when pickling a dictionary " "concurrently mutated by another thread in the free-threaded build." msgstr "" -#: ../NEWS:1638 +#: ../NEWS:1830 msgid "" ":gh:`86533`: The :func:`os.makedirs` function and :meth:`pathlib.Path.mkdir` " "method now have a *parent_mode* parameter to specify the mode for " @@ -2911,13 +3214,13 @@ msgid "" "to match the behavior from Python 3.6 and earlier for :func:`os.makedirs`." msgstr "" -#: ../NEWS:1643 +#: ../NEWS:1835 msgid "" ":gh:`134261`: zip: On reproducible builds, ZipFile uses UTC instead of the " "local time when writing file datetimes to avoid underflows." msgstr "" -#: ../NEWS:1646 +#: ../NEWS:1838 msgid "" ":gh:`133998`: Fix :exc:`struct.error` exception when creating a file with :" "class:`gzip.GzipFile` or compressing data with :func:`gzip.compress` if the " @@ -2926,7 +3229,7 @@ msgid "" "outside the range ``0`` to ``2**32-1``." msgstr "" -#: ../NEWS:1652 +#: ../NEWS:1844 msgid "" ":gh:`128110`: Fix bug in the parsing of :mod:`email` address headers that " "could result in extraneous spaces in the decoded text when using a modern " @@ -2935,25 +3238,25 @@ msgid "" "unstructured headers like *Subject*)." msgstr "" -#: ../NEWS:1658 +#: ../NEWS:1850 msgid "" ":gh:`107398`: Fix :mod:`tarfile` stream mode exception when process the file " "with the gzip extra field." msgstr "" -#: ../NEWS:1661 +#: ../NEWS:1853 msgid "" ":gh:`121109`: Fix :mod:`tarfile` performance issue when reading archives in " "streaming mode (e.g. ``r|*``)." msgstr "" -#: ../NEWS:1664 +#: ../NEWS:1856 msgid "" ":issue:`45509`: Gzip headers are now checked for corrupted NAME, COMMENT and " "HCRC fields." msgstr "" -#: ../NEWS:1670 +#: ../NEWS:1862 msgid "" ":gh:`150387`: Fix hang in ``test.test_profiling.test_sampling_profiler." "test_live_collector_ui.TestLiveModeErrors.test_run_failed_script_live`` on " @@ -2962,36 +3265,36 @@ msgid "" "the post-finished input loop." msgstr "" -#: ../NEWS:1676 +#: ../NEWS:1868 msgid "" ":gh:`149776`: Fix test_socket on Linux kernel 7.1 and newer: skip UDP Lite " "tests if it's not supported. Patch by Victor Stinner." msgstr "" -#: ../NEWS:1682 +#: ../NEWS:1874 msgid "" ":gh:`148294`: Corrected the use of ``AC_PATH_TOOL`` in ``configure.ac`` to " "allow a C++ compiler to be found on :envvar:`!PATH`." msgstr "" -#: ../NEWS:1685 +#: ../NEWS:1877 msgid "" ":gh:`148260`: On Linux when Python is linked to the musl C library, use a " "thread stack size of at least 1 MiB instead of musl default which is 128 " "kiB. Patch by Victor Stinner." msgstr "" -#: ../NEWS:1692 +#: ../NEWS:1884 msgid "" ":gh:`149786`: Fixes virtual environment launchers on Windows free-threaded " "builds." msgstr "" -#: ../NEWS:1695 +#: ../NEWS:1887 msgid ":gh:`124111`: Updated Windows builds to use Tcl/Tk 9.0.3." msgstr "" -#: ../NEWS:1697 +#: ../NEWS:1889 msgid "" ":gh:`138489`: Windows distributions now include a :file:`build-details.json` " "file (see :pep:`739`). The legacy installer does not install it, but all " @@ -2999,81 +3302,81 @@ msgid "" "``PC\\layout`` script will include one." msgstr "" -#: ../NEWS:1702 +#: ../NEWS:1894 msgid ":gh:`149029`: Update Windows installer to ship with SQLite 3.53.1." msgstr "" -#: ../NEWS:1707 +#: ../NEWS:1899 msgid "" ":gh:`150644`: When system logging is enabled (with ``config." "use_system_logger``, messages are now tagged as public. This allows the " "macOS 26 system logger to view messages without special configuration." msgstr "" -#: ../NEWS:1712 +#: ../NEWS:1904 msgid "" ":gh:`149029`: Update macOS installer to ship with SQLite version 3.53.1." msgstr "" -#: ../NEWS:1717 +#: ../NEWS:1909 msgid "" ":gh:`150258`: Update the tooltip on the Tachyon flame graph to show both " "absolute and relative percentages." msgstr "" -#: ../NEWS:1723 +#: ../NEWS:1915 msgid "" ":gh:`149725`: Add :c:func:`PySentinel_CheckExact` for exact :class:" "`sentinel` type tests to accompany the existing :c:func:`PySentinel_Check`." msgstr "" -#: ../NEWS:1726 +#: ../NEWS:1918 msgid "" ":gh:`145235`: Made :c:func:`PyDict_AddWatcher`, :c:func:" "`PyDict_ClearWatcher`, :c:func:`PyDict_Watch`, and :c:func:`PyDict_Unwatch` " "thread-safe on the :term:`free threaded ` build." msgstr "" -#: ../NEWS:1733 +#: ../NEWS:1925 msgid "Python 3.15.0 beta 1" msgstr "" -#: ../NEWS:1735 +#: ../NEWS:1927 msgid "*Release date: 2026-05-07*" msgstr "" -#: ../NEWS:1740 +#: ../NEWS:1932 msgid ":gh:`149254`: Update Android and iOS installer to use OpenSSL 3.5.6." msgstr "" -#: ../NEWS:1742 +#: ../NEWS:1934 msgid "" ":gh:`149017`: Update bundled `libexpat `_ to " "version 2.8.0." msgstr "" -#: ../NEWS:1745 +#: ../NEWS:1937 msgid "" ":gh:`148252`: Fixed string table and sample record bounds checks in :mod:`!" "_remote_debugging` when decoding certain ``.pyb`` inputs on 32-bit builds. " "Patch by Maurycy Pawłowski-Wieroński." msgstr "" -#: ../NEWS:1749 +#: ../NEWS:1941 msgid "" ":gh:`90309`: Base64-encode values when embedding cookies to JavaScript using " "the :meth:`http.cookies.BaseCookie.js_output` method to avoid injection and " "escaping." msgstr "" -#: ../NEWS:1753 +#: ../NEWS:1945 msgid "" ":gh:`148808`: Added buffer boundary check when using ``nbytes`` parameter " "with :meth:`!asyncio.AbstractEventLoop.sock_recvfrom_into`. Only relevant " "for Windows and the :class:`asyncio.ProactorEventLoop`." msgstr "" -#: ../NEWS:1757 +#: ../NEWS:1949 msgid "" ":gh:`148395`: Fix a dangling input pointer in :class:`lzma." "LZMADecompressor`, :class:`bz2.BZ2Decompressor`, and internal :class:`!zlib." @@ -3082,27 +3385,27 @@ msgid "" "a stale pointer to the already-released caller buffer." msgstr "" -#: ../NEWS:1764 +#: ../NEWS:1956 msgid "" ":gh:`148252`: Fixed stack depth calculation in :mod:`!_remote_debugging` " "when decoding certain ``.pyb`` inputs on 32-bit builds. Issue originally " "identified and diagnosed by Tristan Madani (@TristanInSec on GitHub)." msgstr "" -#: ../NEWS:1768 +#: ../NEWS:1960 msgid "" ":gh:`148178`: Hardened :mod:`!_remote_debugging` by validating remote debug " "offset tables before using them to size memory reads or interpret remote " "layouts." msgstr "" -#: ../NEWS:1772 +#: ../NEWS:1964 msgid "" ":gh:`148169`: A bypass in :mod:`webbrowser` allowed URLs prefixed with " "``%action`` to pass the dash-prefix safety check." msgstr "" -#: ../NEWS:1775 +#: ../NEWS:1967 msgid "" ":gh:`146581`: Fix vulnerability in :func:`shutil.unpack_archive` for ZIP " "files on Windows which allowed to write files outside of the destination " @@ -3111,7 +3414,7 @@ msgid "" "\"foo..bar\") are no longer skipped." msgstr "" -#: ../NEWS:1781 +#: ../NEWS:1973 msgid "" ":gh:`137586`: Fix a PATH-injection vulnerability in :mod:`webbrowser` on " "macOS where ``osascript`` was invoked without an absolute path. The new :" @@ -3119,7 +3422,7 @@ msgid "" "dependency on ``osascript`` entirely." msgstr "" -#: ../NEWS:1786 +#: ../NEWS:1978 msgid "" ":gh:`146333`: Fix quadratic backtracking in :class:`configparser." "RawConfigParser` option parsing regexes (``OPTCRE`` and ``OPTCRE_NV``). A " @@ -3127,13 +3430,13 @@ msgid "" "excessive CPU usage." msgstr "" -#: ../NEWS:1791 +#: ../NEWS:1983 msgid "" ":gh:`146211`: Reject CR/LF characters in tunnel request headers for the " "HTTPConnection.set_tunnel() method." msgstr "" -#: ../NEWS:1797 +#: ../NEWS:1989 msgid "" ":gh:`148940`: Revert the process size based deferral of garbage collection (:" "gh:`133464`). The performance issue this change resolves is also fixed by :" @@ -3143,25 +3446,25 @@ msgid "" "This change applies to the free-threaded GC only." msgstr "" -#: ../NEWS:1804 +#: ../NEWS:1996 msgid "" ":gh:`149243`: Check for recursion limits in ``CALL_ALLOC_AND_ENTER_INIT`` " "opcode." msgstr "" -#: ../NEWS:1807 +#: ../NEWS:1999 msgid "" ":gh:`126910`: Add support for unwinding JIT frames using GNU backtrace. " "Patch by Diego Russo and Pablo Galindo" msgstr "" -#: ../NEWS:1810 +#: ../NEWS:2002 msgid "" ":gh:`149171`: Allow assignment to the ``__module__`` attribute of :class:" "`typing.TypeAliasType` instances." msgstr "" -#: ../NEWS:1813 +#: ../NEWS:2005 msgid "" ":gh:`149122`: Fix a crash in optimized calls to :func:`all`, :func:`any`, :" "func:`tuple`, :func:`list`, and :func:`set` with an async generator " @@ -3169,11 +3472,11 @@ msgid "" "calls now correctly raise ``TypeError`` instead of crashing." msgstr "" -#: ../NEWS:1818 +#: ../NEWS:2010 msgid ":gh:`149049`: Fix stack underflow for ``BINARY_OP`` in tier 2." msgstr "" -#: ../NEWS:1820 +#: ../NEWS:2012 msgid "" ":gh:`83065`: Fix a deadlock that could occur when one thread is importing a " "submodule (for example ``import pkg.sub.mod``) while another thread is " @@ -3183,7 +3486,7 @@ msgid "" "so the two threads serialise instead of raising ``_DeadlockError``." msgstr "" -#: ../NEWS:1827 +#: ../NEWS:2019 msgid "" ":gh:`113956`: Fix a data race in :func:`sys.intern` in the free-threaded " "build when interning a string owned by another thread. An interned copy " @@ -3191,13 +3494,13 @@ msgid "" "immortalize the original." msgstr "" -#: ../NEWS:1832 +#: ../NEWS:2024 msgid "" ":gh:`148850`: Fix the memory sanitizer false positive in :func:`os." "getrandom`." msgstr "" -#: ../NEWS:1835 +#: ../NEWS:2027 msgid "" ":gh:`148820`: Fix a race in :c:type:`!_PyRawMutex` on the free-threaded " "build where a ``Py_PARK_INTR`` return from ``_PySemaphore_Wait`` could let " @@ -3206,43 +3509,43 @@ msgid "" "error." msgstr "" -#: ../NEWS:1841 +#: ../NEWS:2033 msgid "" ":gh:`148829`: Add :class:`sentinel`, implementing :pep:`661`. PEP by Tal " "Einat; patch by Jelle Zijlstra." msgstr "" -#: ../NEWS:1844 +#: ../NEWS:2036 msgid ":gh:`146270`: Fix a sequential consistency bug in ``structmember.c``." msgstr "" -#: ../NEWS:1846 +#: ../NEWS:2038 msgid "" ":gh:`148766`: The interpreter help (such as ``python --help``) is now in " "color. Patch by Hugo van Kemenade." msgstr "" -#: ../NEWS:1849 +#: ../NEWS:2041 msgid "" ":gh:`148571`: Fix a crash in the JIT optimizer when specialized opcode " "families inherited incompatible recorded operand layouts." msgstr "" -#: ../NEWS:1852 +#: ../NEWS:2044 msgid "" ":gh:`148653`: Forbid :mod:`marshalling ` recursive code objects, :" "class:`slice` and :class:`frozendict` objects which cannot be correctly " "unmarshalled." msgstr "" -#: ../NEWS:1856 +#: ../NEWS:2048 msgid "" ":gh:`142516`: Forward-port the generational cycle garbage collector to the " "default 3.15 build, replacing the incremental collector while leaving the " "free-threaded collector unchanged." msgstr "" -#: ../NEWS:1860 +#: ../NEWS:2052 msgid "" ":gh:`146462`: Added ``PyTypeObject.tp_basicsize``, ``PyTypeObject." "tp_dictoffset``, and ``PyHeapTypeObject.ht_cached_keys`` offsets to :c:type:" @@ -3250,20 +3553,20 @@ msgid "" "introspection tools." msgstr "" -#: ../NEWS:1865 +#: ../NEWS:2057 msgid "" ":gh:`145239`: Unary plus is now accepted in :keyword:`match` literal " "patterns, mirroring the existing support for unary minus. Patch by Bartosz " "Sławecki." msgstr "" -#: ../NEWS:1869 +#: ../NEWS:2061 msgid "" ":gh:`148515`: Fix a bug in the JIT optimizer reading operands for uops with " "multiple caches." msgstr "" -#: ../NEWS:1872 +#: ../NEWS:2064 msgid "" ":gh:`148390`: Fix an undefined behavior in :class:`memoryview` when using " "the native boolean format (``?``) in :meth:`~memoryview.cast`. Previously, " @@ -3272,26 +3575,26 @@ msgid "" "*b*. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:1878 +#: ../NEWS:2070 msgid "" ":gh:`148418`: Fix a possible reference leak in a corrupted ``TYPE_CODE`` " "marshal stream." msgstr "" -#: ../NEWS:1881 +#: ../NEWS:2073 msgid "" ":gh:`148393`: Fix data races between :c:func:`PyDict_Watch` / :c:func:" "`PyDict_Unwatch` and concurrent dict mutation in the :term:`free-threaded " "build`." msgstr "" -#: ../NEWS:1885 +#: ../NEWS:2077 msgid "" ":gh:`148398`: Fix a bug in the JIT optimizer where class attribute loads " "were not invalidated after type mutation." msgstr "" -#: ../NEWS:1888 +#: ../NEWS:2080 msgid "" ":gh:`146527`: Add a ``GCMonitor`` class with a ``get_gc_stats`` method to " "the :mod:`!_remote_debugging` module to allow reading GC statistics from an " @@ -3299,33 +3602,33 @@ msgid "" "functionality. Patch by Sergey Miryanov and Pablo Galindo." msgstr "" -#: ../NEWS:1893 +#: ../NEWS:2085 msgid "" ":gh:`148284`: Fix high stack consumption in Python's interpreter loop on " "Clang 22 by setting function limits for inlining when building with computed " "gotos." msgstr "" -#: ../NEWS:1897 +#: ../NEWS:2089 msgid "" ":gh:`148037`: Remove critical section from :c:func:`!PyCode_Addr2Line` in " "free-threading." msgstr "" -#: ../NEWS:1900 +#: ../NEWS:2092 msgid "" ":gh:`115802`: Improve JIT code generation on Linux AArch64 by reducing the " "indirect call to external symbols. Patch by Diego Russo." msgstr "" -#: ../NEWS:1903 +#: ../NEWS:2095 msgid "" ":gh:`148189`: Repaired undercount of bytes in type-specific free lists " "reported by sys._debugmallocstats(). For types that participate in cyclic " "garbage collection, it was missing two pointers used by GC." msgstr "" -#: ../NEWS:1907 +#: ../NEWS:2099 msgid "" ":gh:`148222`: Fix vectorcall support in :class:`types.GenericAlias` when the " "underlying type does not support the vectorcall protocol. Fix possible leaks " @@ -3333,18 +3636,18 @@ msgid "" "memory error." msgstr "" -#: ../NEWS:1912 +#: ../NEWS:2104 msgid ":gh:`148208`: Fix recursion depth leak in :c:func:`PyObject_Print`" msgstr "" -#: ../NEWS:1914 +#: ../NEWS:2106 msgid "" ":gh:`95004`: The specializing interpreter now specializes for :class:`enum." "Enum` improving performance and scaling in free-threading. Patch by Kumar " "Aditya." msgstr "" -#: ../NEWS:1918 +#: ../NEWS:2110 msgid "" ":gh:`149202`: Enable frame pointers by default for GCC-compatible CPython " "builds, including ``-mno-omit-leaf-frame-pointer``, ``-marm`` on 32-bit ARM, " @@ -3354,46 +3657,46 @@ msgid "" "configure`` to opt out." msgstr "" -#: ../NEWS:1925 +#: ../NEWS:2117 msgid "" ":gh:`148014`: Accept a function name in :option:`-X presite <-X>` command " "line option and :envvar:`PYTHON_PRESITE` environment variable. Patch by " "Victor Stinner." msgstr "" -#: ../NEWS:1929 +#: ../NEWS:2121 msgid "" ":gh:`147998`: Fixed a memory leak in interpreter helper calls so cleanup " "works when an operation falls across interpreter boundaries. Patch by " "Maurycy Pawłowski-Wieroński." msgstr "" -#: ../NEWS:1933 +#: ../NEWS:2125 msgid "" ":gh:`146455`: Fix O(N²) compile-time regression in constant folding after it " "was moved from AST to CFG optimizer." msgstr "" -#: ../NEWS:1936 +#: ../NEWS:2128 msgid "" ":gh:`146306`: Specialize float true division in the tier 2 optimizer with " "inplace mutation for uniquely-referenced operands." msgstr "" -#: ../NEWS:1939 +#: ../NEWS:2131 msgid "" ":gh:`142186`: Global :mod:`sys.monitoring` events can now be turned on and " "disabled on a per code object basis. Returning ``DISABLE`` from a callback " "disables the event for the entire code object (for the current tool)." msgstr "" -#: ../NEWS:1943 +#: ../NEWS:2135 msgid "" ":gh:`126910`: Add support for unwinding JIT frames using GDB. Patch by Diego " "Russo and Pablo Galindo." msgstr "" -#: ../NEWS:1946 +#: ../NEWS:2138 msgid "" ":gh:`146031`: The unstable API _PyInterpreterState_SetEvalFrameFunc has a " "companion function _PyInterpreterState_SetEvalFrameAllowSpecialization to " @@ -3403,49 +3706,49 @@ msgid "" "inlined dispatch." msgstr "" -#: ../NEWS:1953 +#: ../NEWS:2145 msgid "" ":gh:`145278`: The :mod:`encodings` is now partially frozen, including the " "``aliases`` and ``utf_8`` submodules." msgstr "" -#: ../NEWS:1956 +#: ../NEWS:2148 msgid "The :mod:`linecache` is now frozen." msgstr "" -#: ../NEWS:1958 +#: ../NEWS:2150 msgid "" ":gh:`134584`: Optimize and eliminate redundant ref-counting for " "``MAKE_FUNCTION`` in the JIT." msgstr "" -#: ../NEWS:1961 +#: ../NEWS:2153 msgid "" ":gh:`143886`: Reorder function annotations so positional-only arguments are " "returned before other arguments. This fixes how :func:`functools." "singledispatch` registers functions with positional-only arguments." msgstr "" -#: ../NEWS:1966 +#: ../NEWS:2158 msgid "" ":gh:`98894`: Restore ``function__entry`` and ``function__return`` DTrace/" "SystemTap probes that were broken since Python 3.11." msgstr "" -#: ../NEWS:1969 +#: ../NEWS:2161 msgid "" ":gh:`116021`: Support for creating instances of abstract AST nodes from the :" "mod:`ast` module is deprecated and scheduled for removal in Python 3.20. " "Patch by Brian Schubert." msgstr "" -#: ../NEWS:1973 +#: ../NEWS:2165 msgid "" ":gh:`137814`: Fix the ``__qualname__`` attribute of ``__annotate__`` " "functions on functions." msgstr "" -#: ../NEWS:1976 +#: ../NEWS:2168 msgid "" ":gh:`137600`: :mod:`ast`: The constructors of AST nodes now raise a :exc:" "`TypeError` when a required argument is omitted or when a keyword argument " @@ -3454,71 +3757,71 @@ msgid "" "Brian Schubert." msgstr "" -#: ../NEWS:1982 +#: ../NEWS:2174 msgid "" ":gh:`137293`: Fix :exc:`SystemError` when searching ELF Files in :func:`sys." "remote_exec`." msgstr "" -#: ../NEWS:1985 +#: ../NEWS:2177 msgid ":gh:`135357`: Add support for :data:`!socket.SO_PASSRIGHTS` on Linux." msgstr "" -#: ../NEWS:1987 +#: ../NEWS:2179 msgid "" ":gh:`134690`: Removed deprecated in :pep:`626` since Python 3.12 :attr:`!" "codeobject.co_lnotab` from :class:`types.CodeType`." msgstr "" -#: ../NEWS:1990 +#: ../NEWS:2182 msgid "" ":gh:`100239`: Specialize ``BINARY_OP`` for concatenation of lists and " "tuples, and propagate the result type through ``_BINARY_OP_EXTEND`` in the " "tier 2 optimizer so that follow-up type guards can be eliminated." msgstr "" -#: ../NEWS:1997 +#: ../NEWS:2189 msgid "" ":gh:`148823`: Defer the import of ``_colorize`` in ``argparse`` until needed " "for coloring output." msgstr "" -#: ../NEWS:2000 +#: ../NEWS:2192 msgid "" ":gh:`141560`: Add an *annotation_format* parameter to :func:`inspect." "getfullargspec`." msgstr "" -#: ../NEWS:2003 +#: ../NEWS:2195 msgid "" ":gh:`139489`: Add the :func:`xml.is_valid_text` function, which allows to " "check whether a string can be used in the XML document." msgstr "" -#: ../NEWS:2006 +#: ../NEWS:2198 msgid "" ":gh:`142389`: Add backticks to stdlib argparse help to display in colour. " "Patch by Hugo van Kemenade." msgstr "" -#: ../NEWS:2009 +#: ../NEWS:2201 msgid ":gh:`149377`: Update bundled pip to 26.1.1" msgstr "" -#: ../NEWS:2011 +#: ../NEWS:2203 msgid "" ":gh:`142389`: Add backtick markup support in :mod:`argparse` option help " "text to highlight inline code when color output is enabled. Patch by Hugo " "van Kemenade." msgstr "" -#: ../NEWS:2015 +#: ../NEWS:2207 msgid "" ":gh:`148675`: Remove ``F`` and ``D`` formats from :mod:`array` and :class:" "`memoryview`. Patch by Victor Stinner." msgstr "" -#: ../NEWS:2018 +#: ../NEWS:2210 msgid "" ":gh:`149342`: Fix :mod:`!_remote_debugging` binary writing so that sampling " "a thread whose Python frame stack is empty (for example while it is in a C " @@ -3528,7 +3831,7 @@ msgid "" "buffer. Patch by Maurycy Pawłowski-Wieroński." msgstr "" -#: ../NEWS:2025 +#: ../NEWS:2217 msgid "" ":gh:`149010`: The ``inspect`` module CLI now reports as much information as " "it has available for non-source modules when ``--details`` is specified, and " @@ -3538,36 +3841,36 @@ msgid "" "value rather than a class or function definition." msgstr "" -#: ../NEWS:2032 +#: ../NEWS:2224 msgid "" ":gh:`146609`: Use :mod:`argparse` for colour help :mod:`timeit` CLI. Patch " "by Hugo van Kemenade." msgstr "" -#: ../NEWS:2035 +#: ../NEWS:2227 msgid "" ":gh:`142389`: Add backticks for colour to regrtest and pdb's help " "description. Patch by Hugo van Kemenade." msgstr "" -#: ../NEWS:2038 +#: ../NEWS:2230 msgid "" ":gh:`144384`: Lazily import :mod:`!_colorize`. Patch by Hugo van Kemenade." msgstr "" -#: ../NEWS:2040 +#: ../NEWS:2232 msgid "" ":gh:`149321`: Fix import cycles exposed by running standard library modules " "with ``-X lazy_imports=none``." msgstr "" -#: ../NEWS:2043 +#: ../NEWS:2235 msgid "" ":gh:`145378`: Generate consistent colors for :mod:`pdb` commands in :mod:" "`pdb` REPL." msgstr "" -#: ../NEWS:2046 +#: ../NEWS:2238 msgid "" ":gh:`149296`: Add a ``dump`` subcommand to :mod:`profiling.sampling` that " "prints a single traceback-style snapshot of a running process's Python " @@ -3576,13 +3879,13 @@ msgid "" "Galindo." msgstr "" -#: ../NEWS:2052 +#: ../NEWS:2244 msgid "" ":gh:`143231`: A *module* attribute has been added to :class:`!warnings." "WarningMessage`." msgstr "" -#: ../NEWS:2055 +#: ../NEWS:2247 msgid "" ":gh:`148675`: :mod:`ctypes`: Change the :py:attr:`~ctypes._SimpleCData." "_type_` of :class:`~ctypes.c_float_complex`, :class:`~ctypes." @@ -3591,33 +3894,33 @@ msgid "" "Patch by Victor Stinner." msgstr "" -#: ../NEWS:2062 +#: ../NEWS:2254 msgid "" ":gh:`148675`: The :data:`array.typecodes` type changed from :class:`str` to :" "class:`tuple` to support type codes longer than 1 character (``Zf`` and " "``Zd``). Patch by Victor Stinner." msgstr "" -#: ../NEWS:2066 +#: ../NEWS:2258 msgid "" ":gh:`149221`: Catch rare math domain error for :func:`random." "binomialvariate`." msgstr "" -#: ../NEWS:2069 +#: ../NEWS:2261 msgid "" ":gh:`149231`: In :mod:`tomllib`, the number of parts in TOML keys is now " "limited." msgstr "" -#: ../NEWS:2072 +#: ../NEWS:2264 msgid "" ":gh:`143231`: :func:`unittest.TestCase.assertWarns` and :func:`unittest." "TestCase.assertWarnsRegex` no longer swallow warnings that do not match the " "specified category or regex. Nested context managers are now supported." msgstr "" -#: ../NEWS:2077 +#: ../NEWS:2269 msgid "" ":gh:`149214`: Fix :mod:`!_remote_debugging` misreading non-ASCII Unicode " "strings (Latin-1, BMP and non-BMP) from a remote process. Filenames and " @@ -3626,7 +3929,7 @@ msgid "" "introspection." msgstr "" -#: ../NEWS:2083 +#: ../NEWS:2275 msgid "" ":gh:`149189`: :mod:`pprint` now uses modern defaults: ``indent=4`` and " "``width=88``, and the default ``compact=False`` output is now formatted " @@ -3637,32 +3940,32 @@ msgid "" "van Kemenade." msgstr "" -#: ../NEWS:2091 +#: ../NEWS:2283 msgid "" ":gh:`149173`: Fix inverted :envvar:`PYTHON_BASIC_REPL` environment check in " "``pdb._pyrepl_available``." msgstr "" -#: ../NEWS:2094 +#: ../NEWS:2286 msgid "" ":gh:`149117`: Fix :func:`runpy.run_module` and :func:`runpy.run_path` to set " "the :attr:`~ImportError.name` attribute on the :exc:`ImportError` they raise." msgstr "" -#: ../NEWS:2098 +#: ../NEWS:2290 msgid "" ":gh:`149148`: :mod:`ensurepip`: Upgrade bundled pip to 26.1. This version " "fixes the :cve:`2026-3219` vulnerability. Patch by Victor Stinner." msgstr "" -#: ../NEWS:2101 +#: ../NEWS:2293 msgid "" ":gh:`149009`: Validate that :mod:`profiling.sampling` binary profiles do not " "contain more unique (thread, interpreter) pairs than declared in the header. " "Patch by Maurycy Pawłowski-Wieroński." msgstr "" -#: ../NEWS:2105 +#: ../NEWS:2297 msgid "" ":gh:`148292`: :mod:`ssl`: Update :class:`ssl.SSLSocket` and :class:`ssl." "SSLObject` for OpenSSL 4. The classes now remember if they get a :exc:`ssl." @@ -3673,33 +3976,33 @@ msgid "" "the same on all OpenSSL versions on EOF. Patch by Victor Stinner." msgstr "" -#: ../NEWS:2114 +#: ../NEWS:2306 msgid "" ":gh:`149085`: Add a *max_threads* keyword argument to :func:`faulthandler." "dump_traceback`, :func:`faulthandler.dump_traceback_later`, :func:" "`faulthandler.enable`, and :func:`faulthandler.register`." msgstr "" -#: ../NEWS:2119 +#: ../NEWS:2311 msgid "" ":gh:`148641`: :func:`pkgutil.resolve_name` gets a new optional, keyword-only " "argument called ``strict``. The default is ``False`` for backward " "compatibility." msgstr "" -#: ../NEWS:2123 +#: ../NEWS:2315 msgid "" ":gh:`148093`: Fix an out-of-bounds read of one byte in :func:`binascii." "a2b_uu`. Raise :exc:`binascii.Error`, instead of reading past the buffer end." msgstr "" -#: ../NEWS:2127 +#: ../NEWS:2319 msgid "" ":gh:`149083`: :data:`dataclasses.MISSING` and :data:`dataclasses.KW_ONLY` " "are now instances of :class:`sentinel`." msgstr "" -#: ../NEWS:2130 +#: ../NEWS:2322 msgid "" ":gh:`148914`: Fix memoization of in-band :class:`~pickle.PickleBuffer` in " "the Python implementation of :mod:`pickle`. Previously, identical :class:`!" @@ -3708,27 +4011,27 @@ msgid "" "following references to ``b''`` were unpickled as an empty bytearray object." msgstr "" -#: ../NEWS:2137 +#: ../NEWS:2329 msgid "" ":gh:`149026`: Add colour to :mod:`pickletools` CLI output. Patch by Hugo van " "Kemenade." msgstr "" -#: ../NEWS:2140 +#: ../NEWS:2332 msgid "" ":gh:`148991`: Add colour to :mod:`tokenize` CLI output. Patch by Hugo van " "Kemenade." msgstr "" -#: ../NEWS:2143 +#: ../NEWS:2335 msgid ":gh:`138907`: Support :rfc:`9309` in :mod:`urllib.robotparser`." msgstr "" -#: ../NEWS:2145 +#: ../NEWS:2337 msgid ":gh:`148981`: Add *color* parameter to :func:`ast.dump`." msgstr "" -#: ../NEWS:2147 +#: ../NEWS:2339 msgid "" ":gh:`148849`: Deprecate :meth:`http.cookies.Morsel.js_output` and :meth:" "`http.cookies.BaseCookie.js_output`, which will be removed in Python 3.19. " @@ -3736,25 +4039,25 @@ msgid "" "output` instead." msgstr "" -#: ../NEWS:2152 +#: ../NEWS:2344 msgid "" -":gh:`146311`: Add a *canonical* keyword-only parameter to the base16, " -"base32, base64, base85, ascii85, and Z85 decoders in :mod:`base64` and :mod:" -"`binascii`. When true, encodings with non-zero padding bits (base16/32/64) " -"or non-canonical encodings (base85/ascii85) are rejected. Single-character " +":gh:`146311`: Add a *canonical* keyword-only parameter to the base32, " +"base64, base85, ascii85, and Z85 decoders in :mod:`base64` and :mod:" +"`binascii`. When true, encodings with non-zero padding bits (base32/64) or " +"non-canonical encodings (base85/ascii85) are rejected. Single-character " "final groups in :func:`binascii.a2b_ascii85` and :func:`binascii.a2b_base85` " "are now always rejected as encoding violations, regardless of *canonical*; " "previously they were silently ignored and produced no output bytes." msgstr "" -#: ../NEWS:2161 +#: ../NEWS:2353 msgid "" ":gh:`148947`: Fix crash in :deco:`dataclasses.dataclass` with ``slots=True`` " "that occurred when a function found within the class had an empty " "``__class__`` cell." msgstr "" -#: ../NEWS:2165 +#: ../NEWS:2357 msgid "" ":gh:`148680`: ``ForwardRef`` objects that contain internal names to " "represent known objects now show the ``type_repr`` of the known object " @@ -3762,88 +4065,88 @@ msgid "" "strings." msgstr "" -#: ../NEWS:2169 +#: ../NEWS:2361 msgid "" ":gh:`124397`: The threading module added tooling to support concurrent " "iterator access: :class:`threading.serialize_iterator`, :func:`threading." "synchronized_iterator`, and :func:`threading.concurrent_tee`." msgstr "" -#: ../NEWS:2174 +#: ../NEWS:2366 msgid "" ":gh:`148801`: :mod:`xml.etree.ElementTree`: Fix a crash in :meth:`Element." "__deepcopy__ ` on deeply nested trees." msgstr "" -#: ../NEWS:2177 +#: ../NEWS:2369 msgid "" ":gh:`148735`: :mod:`xml.etree.ElementTree`: Fix a use-after-free in :meth:" "`Element.findtext ` when the element " "tree is mutated concurrently during the search." msgstr "" -#: ../NEWS:2181 +#: ../NEWS:2373 msgid "" ":gh:`148740`: Fix usage for :mod:`uuid` command-line interface to support a " "custom namespace be provided for uuid3 and uuid5." msgstr "" -#: ../NEWS:2184 +#: ../NEWS:2376 msgid "" ":gh:`148688`: :mod:`bz2`, :mod:`compression.zstd`, :mod:`lzma`, :mod:`zlib`: " "Fix a double free on memory allocation failure. Patch by Victor Stinner." msgstr "" -#: ../NEWS:2187 +#: ../NEWS:2379 msgid "" ":gh:`148675`: :mod:`array`, :mod:`struct`: Add support for ``Zd`` and ``Zf`` " "formats for double complex and float complex. Patch by Victor Stinner." msgstr "" -#: ../NEWS:2190 +#: ../NEWS:2382 msgid "" ":gh:`148651`: Fix reference leak in :class:`compression.zstd." "ZstdDecompressor` when an invalid option key is passed." msgstr "" -#: ../NEWS:2194 +#: ../NEWS:2386 msgid "" ":gh:`148641`: :pep:`829` (package startup configuration files) implements a " "new format ``.start`` parallel to ``.pth`` files, to replace " "``import`` lines in the latter." msgstr "" -#: ../NEWS:2198 +#: ../NEWS:2390 msgid "" ":gh:`148639`: Implement :pep:`800`, adding the :deco:`typing.disjoint_base` " "decorator. Patch by Jelle Zijlstra." msgstr "" -#: ../NEWS:2201 +#: ../NEWS:2393 msgid "" ":gh:`148615`: Fix :mod:`pdb` to accept standard -- end of options separator. " "Reported by haampie. Patched by Shrey Naithani." msgstr "" -#: ../NEWS:2204 +#: ../NEWS:2396 msgid "" ":gh:`146553`: Fix infinite loop in :func:`typing.get_type_hints` when " "``__wrapped__`` forms a cycle. Patch by Shamil Abdulaev." msgstr "" -#: ../NEWS:2207 +#: ../NEWS:2399 msgid "" ":gh:`148599`: Update the :mod:`socket` module's WSA error messages to match " "official documentation." msgstr "" -#: ../NEWS:2210 +#: ../NEWS:2402 msgid "" ":gh:`148508`: An intermittent timing error when running SSL tests on iOS has " "been resolved." msgstr "" -#: ../NEWS:2213 +#: ../NEWS:2405 msgid "" ":gh:`144881`: :mod:`asyncio` debugging tools (``python -m asyncio ps`` and " "``pstree``) now retry automatically on transient errors that can occur when " @@ -3851,7 +4154,7 @@ msgid "" "can be controlled with the ``--retries`` flag. Patch by Bartosz Sławecki." msgstr "" -#: ../NEWS:2219 +#: ../NEWS:2411 msgid "" ":gh:`148518`: If an email containing an address header that ended in an open " "double quote was parsed with a non-``compat32`` policy, accessing the " @@ -3860,76 +4163,76 @@ msgid "" "as the result." msgstr "" -#: ../NEWS:2225 +#: ../NEWS:2417 msgid "" ":gh:`148464`: Add missing ``__ctype_le/be__`` attributes for :class:`~ctypes." "c_float_complex` and :class:`~ctypes.c_double_complex`. Patch by Sergey B " "Kirpichev." msgstr "" -#: ../NEWS:2229 +#: ../NEWS:2421 msgid "" ":gh:`148370`: :mod:`configparser`: prevent quadratic behavior when a :exc:" "`~configparser.ParsingError` is raised after a parser fails to parse " "multiple lines. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:2233 +#: ../NEWS:2425 msgid "" ":gh:`121190`: ``importlib.resources.files()`` now emits a more meaningful " "error message when module spec is None (as found in some ``__main__`` " "modules)." msgstr "" -#: ../NEWS:2237 +#: ../NEWS:2429 msgid "" ":gh:`127012`: ``importlib.abc.Traversable.read_text`` now allows/solicits an " "``errors`` parameter." msgstr "" -#: ../NEWS:2240 +#: ../NEWS:2432 msgid "" ":gh:`137855`: Improve import time of :mod:`dataclasses` module by lazy " "importing :mod:`re` and :mod:`copy` modules." msgstr "" -#: ../NEWS:2243 +#: ../NEWS:2435 msgid "" ":gh:`148352`: Add more color to :mod:`calendar`'s CLI output. Patch by Hugo " "van Kemenade." msgstr "" -#: ../NEWS:2246 +#: ../NEWS:2438 msgid "" ":gh:`148254`: Use singular \"sec\" instead of \"secs\" in :mod:`timeit` " "verbose output for consistency with other time units." msgstr "" -#: ../NEWS:2249 +#: ../NEWS:2441 msgid ":gh:`130472`: Integrate fancycompleter with import completions." msgstr "" -#: ../NEWS:2251 +#: ../NEWS:2443 msgid "" ":gh:`148241`: :mod:`json`: Fix serialization: no longer call ``str(obj)`` " "on :class:`str` subclasses. Patch by Victor Stinner." msgstr "" -#: ../NEWS:2254 +#: ../NEWS:2446 msgid "" ":gh:`148225`: The :mod:`profiling.sampling` ``replay`` command now rejects " "non-binary profile files with a clear error explaining that replay only " "accepts files created with ``--binary``." msgstr "" -#: ../NEWS:2258 +#: ../NEWS:2450 msgid "" ":gh:`148192`: ``email.generator.Generator._make_boundary`` could fail to " "detect a duplicate boundary string if linesep was not \\n. It now correctly " "detects boundary strings when linesep is \\r\\n as well." msgstr "" -#: ../NEWS:2262 +#: ../NEWS:2454 msgid "" ":gh:`148207`: :class:`typing.TypeVarTuple` now accepts ``bound``, " "``covariant``, ``contravariant``, and ``infer_variance`` parameters, " @@ -3937,26 +4240,26 @@ msgid "" "ParamSpec`." msgstr "" -#: ../NEWS:2267 +#: ../NEWS:2459 msgid "" ":gh:`148100`: :term:`Soft deprecate ` :func:`re.match` and :" "meth:`re.Pattern.match` in favour of :func:`re.prefixmatch` and :meth:`re." "Pattern.prefixmatch`. Patch by Hugo van Kemenade." msgstr "" -#: ../NEWS:2271 +#: ../NEWS:2463 msgid "" ":gh:`147991`: Improve :mod:`tomllib` import time (up to 10x faster). Patch " "by Victor Stinner." msgstr "" -#: ../NEWS:2274 +#: ../NEWS:2466 msgid "" ":gh:`147957`: Guarantees that :meth:`collections.UserDict.popitem` will pop " "in the same order as the wrapped dictionary rather than an arbitrary order." msgstr "" -#: ../NEWS:2278 +#: ../NEWS:2470 msgid "" ":gh:`146256`: The ``profiling.sampling`` module now supports JSONL output " "format via ``--jsonl``. Each run emits a newline-delimited JSON file that is " @@ -3964,20 +4267,20 @@ msgid "" "consumers. Patch by Maurycy Pawłowski-Wieroński." msgstr "" -#: ../NEWS:2283 +#: ../NEWS:2475 msgid "" ":gh:`146609`: Add colour to :mod:`timeit` CLI output. Patch by Hugo van " "Kemenade." msgstr "" -#: ../NEWS:2286 +#: ../NEWS:2478 msgid "" ":gh:`146563`: :mod:`xml.parsers.expat`: add an exception note when a custom " "Expat handler return value cannot be properly interpreted. Patch by Bénédikt " "Tran." msgstr "" -#: ../NEWS:2290 +#: ../NEWS:2482 msgid "" ":gh:`137586`: Add :class:`!MacOS` to :mod:`webbrowser` for macOS, which " "opens URLs via ``/usr/bin/open`` instead of piping AppleScript to " @@ -3985,7 +4288,7 @@ msgid "" "MacOS`." msgstr "" -#: ../NEWS:2294 +#: ../NEWS:2486 msgid "" ":gh:`146406`: Cross-language method suggestions are now shown for :exc:" "`AttributeError` on builtin types and their subclasses. For example, ``[]." @@ -3994,7 +4297,7 @@ msgid "" "using an ``int``." msgstr "" -#: ../NEWS:2300 +#: ../NEWS:2492 msgid "" ":gh:`146313`: Fix a deadlock in :mod:`multiprocessing`'s resource tracker " "where the parent process could hang indefinitely in :func:`os.waitpid` " @@ -4002,19 +4305,19 @@ msgid "" "held the resource tracker's pipe open." msgstr "" -#: ../NEWS:2305 +#: ../NEWS:2497 msgid "" ":gh:`146292`: Add colour to :mod:`~http.server.BaseHTTPRequestHandler` logs, " "as used by the :mod:`http.server` CLI. Patch by Hugo van Kemenade." msgstr "" -#: ../NEWS:2308 +#: ../NEWS:2500 msgid "" ":gh:`145917`: Add MIME types for TTC and Haptics formats to :mod:" "`mimetypes`. (Contributed by Charlie Lin in :gh:`145918`.)" msgstr "" -#: ../NEWS:2311 +#: ../NEWS:2503 msgid "" ":gh:`145846`: Fix memory leak in ``_lsprof`` when ``clear()`` is called " "during active profiling with nested calls. ``clearEntries()`` now walks the " @@ -4022,69 +4325,69 @@ msgid "" "top context." msgstr "" -#: ../NEWS:2316 +#: ../NEWS:2508 msgid "" ":gh:`145831`: Fix :func:`!email.quoprimime.decode` leaving a stray ``\\r`` " "when ``eol='\\r\\n'`` by stripping the full *eol* string instead of one " "character." msgstr "" -#: ../NEWS:2320 +#: ../NEWS:2512 msgid "" ":gh:`145378`: Use ``PyREPL`` as the default input console for :mod:`pdb`" msgstr "" -#: ../NEWS:2322 +#: ../NEWS:2514 msgid "" ":gh:`145244`: Fixed a use-after-free in :mod:`json` encoder when a " "``default`` callback mutates the dictionary being serialized." msgstr "" -#: ../NEWS:2325 +#: ../NEWS:2517 msgid "" ":gh:`117716`: Fix :mod:`wave` writing of odd-sized ``data`` chunks by " "appending the required RIFF pad byte and correcting the RIFF chunk size " "field accordingly." msgstr "" -#: ../NEWS:2329 +#: ../NEWS:2521 msgid "" ":gh:`145200`: :mod:`hashlib`: fix a memory leak when allocating or " "initializing an OpenSSL HMAC context fails." msgstr "" -#: ../NEWS:2332 +#: ../NEWS:2524 msgid "" ":gh:`145056`: Add support for :class:`frozendict` in :meth:`dataclasses." "asdict` and :meth:`dataclasses.astuple`." msgstr "" -#: ../NEWS:2335 +#: ../NEWS:2527 msgid "" ":gh:`145105`: Fix crash in :mod:`csv` reader when iterating with a re-" "entrant iterator that calls :func:`next` on the same reader from within " "``__next__``." msgstr "" -#: ../NEWS:2339 +#: ../NEWS:2531 msgid "" ":gh:`130750`: Restore quoting of choices in :mod:`argparse` error messages " "for improved clarity and consistency with documentation." msgstr "" -#: ../NEWS:2342 +#: ../NEWS:2534 msgid "" ":gh:`137855`: Reduce the import time of :mod:`dataclasses` module by ~20%." msgstr "" -#: ../NEWS:2344 +#: ../NEWS:2536 msgid "" ":gh:`70647`: :meth:`~datetime.datetime.strptime` now raises :exc:" "`ValueError` when the format string contains ``%d`` without a year " "directive. Using ``%e`` without a year now emits a :exc:`DeprecationWarning`." msgstr "" -#: ../NEWS:2348 +#: ../NEWS:2540 msgid "" ":gh:`105936`: Attempting to mutate non-field attributes of :mod:" "`dataclasses` with both *frozen* and *slots* being ``True`` now raises :" @@ -4093,23 +4396,23 @@ msgid "" "and the original non-slotted class can be garbage collected." msgstr "" -#: ../NEWS:2354 +#: ../NEWS:2546 msgid "" ":gh:`142831`: Fix a crash in the :mod:`json` module where a use-after-free " "could occur if the object being encoded is modified during serialization." msgstr "" -#: ../NEWS:2357 +#: ../NEWS:2549 msgid "" ":gh:`108411`: ``typing.IO`` and ``typing.BinaryIO`` method arguments are now " "positional-only." msgstr "" -#: ../NEWS:2360 +#: ../NEWS:2552 msgid ":gh:`130273`: Fix traceback color output with Unicode characters." msgstr "" -#: ../NEWS:2362 +#: ../NEWS:2554 msgid "" ":gh:`142307`: :mod:`imaplib`: deprecate support for :attr:`IMAP4.file " "`. This attribute was never meant to be part of the " @@ -4118,31 +4421,31 @@ msgid "" "Tran." msgstr "" -#: ../NEWS:2368 +#: ../NEWS:2560 msgid "" ":gh:`141449`: Improve tests and documentation for non-function callables as :" "term:`annotate functions `." msgstr "" -#: ../NEWS:2371 +#: ../NEWS:2563 msgid "" ":gh:`140287`: The :mod:`asyncio` REPL now handles exceptions when executing :" "envvar:`PYTHONSTARTUP` scripts. Patch by Bartosz Sławecki." msgstr "" -#: ../NEWS:2374 +#: ../NEWS:2566 msgid "" ":gh:`139489`: Add the :func:`xml.is_valid_name` function, which allows to " "check whether a string can be used as an element or attribute name in XML." msgstr "" -#: ../NEWS:2377 +#: ../NEWS:2569 msgid "" ":gh:`75707`: Add optional ``mtime`` argument to :func:`tarfile.open`, for " "setting the ``mtime`` header field in ``.tar.gz`` archives." msgstr "" -#: ../NEWS:2380 +#: ../NEWS:2572 msgid "" ":gh:`125862`: The :func:`contextlib.contextmanager` and :func:`contextlib." "asynccontextmanager` decorators now work correctly with generators, " @@ -4150,51 +4453,51 @@ msgid "" "used as decorators." msgstr "" -#: ../NEWS:2385 +#: ../NEWS:2577 msgid "" ":gh:`135528`: :mod:`http.cookiejar`: add \"tv\", \"or\", \"nom\", \"sch\", " "and \"web\" to the default list of supported country code second-level " "domains." msgstr "" -#: ../NEWS:2388 +#: ../NEWS:2580 msgid "" ":gh:`135056`: Add a ``-H`` or ``--header`` CLI option to :program:`python -m " "http.server`. Contributed by Anton I. Sipos." msgstr "" -#: ../NEWS:2391 +#: ../NEWS:2583 msgid ":gh:`134551`: Add t-strings support to pprint functions" msgstr "" -#: ../NEWS:2393 +#: ../NEWS:2585 msgid "" ":gh:`133956`: Fix bug where :func:`@dataclass ` " "wouldn't detect ``ClassVar`` fields if ``ClassVar`` was re-exported from a " "module other than :mod:`typing`." msgstr "" -#: ../NEWS:2397 +#: ../NEWS:2589 msgid "" ":gh:`132631`: Fix \"I/O operation on closed file\" when parsing JSON Lines " "file with :mod:`JSON CLI `." msgstr "" -#: ../NEWS:2400 +#: ../NEWS:2592 msgid "" ":gh:`108951`: :mod:`asyncio`: Add :meth:`TaskGroup.cancel ` which cancels unfinished tasks and exits the group without raising :" "exc:`asyncio.CancelledError`." msgstr "" -#: ../NEWS:2404 +#: ../NEWS:2596 msgid "" ":gh:`123853`: Update the table of Windows language code identifiers (LCIDs) " "used by :func:`locale.getdefaultlocale` on Windows to protocol version 16.0 " "(2024-04-23)." msgstr "" -#: ../NEWS:2408 +#: ../NEWS:2600 msgid "" ":gh:`122476`: The :mod:`email` module no longer incorrectly uses :rfc:`2047` " "encoding for a mailbox with non-ASCII characters in its local-part. Under a " @@ -4206,7 +4509,7 @@ msgid "" "characters." msgstr "" -#: ../NEWS:2417 +#: ../NEWS:2609 msgid "" ":gh:`83938`: The :mod:`email` module no longer incorrectly uses :rfc:`2047` " "encoding for a mailbox with non-ASCII characters in its domain. Under a " @@ -4218,7 +4521,7 @@ msgid "" "internationalized domain name as Unicode characters." msgstr "" -#: ../NEWS:2427 +#: ../NEWS:2619 msgid "" ":gh:`81074`: The :mod:`email` module no longer treats email addresses with " "non-ASCII characters as defects when parsing a Unicode string or in the " @@ -4227,76 +4530,76 @@ msgid "" "bytes and in the Address ``username`` parameter." msgstr "" -#: ../NEWS:2433 +#: ../NEWS:2625 msgid "" "The (undocumented) :exc:`!email.errors.NonASCIILocalPartDefect` is no longer " "used and should be considered deprecated." msgstr "" -#: ../NEWS:2436 +#: ../NEWS:2628 msgid "" ":gh:`70039`: Fixed bug where :meth:`smtplib.SMTP.starttls` could fail if :" "meth:`smtplib.SMTP.connect` is called explicitly rather than implicitly." msgstr "" -#: ../NEWS:2439 +#: ../NEWS:2631 msgid "" ":gh:`113471`: Allow :mod:`http.server` to set a default content-type when " "serving files with an unknown or missing extension." msgstr "" -#: ../NEWS:2442 +#: ../NEWS:2634 msgid "" ":gh:`83281`: :mod:`email`: improve handling trailing garbage in address " "lists to avoid throwing AttributeError in certain edge cases" msgstr "" -#: ../NEWS:2445 +#: ../NEWS:2637 msgid "" ":gh:`96894`: Do not turn echo off for subsequent commands in batch " "activators (``activate.bat`` and ``deactivate.bat``) of :mod:`venv`." msgstr "" -#: ../NEWS:2451 +#: ../NEWS:2643 msgid "" ":gh:`148663`: Document that :class:`calendar.IllegalMonthError` is a " "subclass of both :exc:`ValueError` and :exc:`IndexError` since Python 3.12." msgstr "" -#: ../NEWS:2454 +#: ../NEWS:2646 msgid "" ":gh:`146646`: Document that :func:`glob.glob`, :func:`glob.iglob`, :meth:" "`pathlib.Path.glob`, and :meth:`pathlib.Path.rglob` silently suppress :exc:" "`OSError` exceptions raised from scanning the filesystem." msgstr "" -#: ../NEWS:2461 +#: ../NEWS:2653 msgid "" ":gh:`149425`: Increase time delta in ``test.test_zipfile.test_core." "OtherTests.test_write_without_source_date_epoch``" msgstr "" -#: ../NEWS:2464 +#: ../NEWS:2656 msgid ":gh:`148600`: Add OpenSSL 4.0.0 support to test configurations." msgstr "" -#: ../NEWS:2469 +#: ../NEWS:2661 msgid "" ":gh:`149353`: Avoid unnecessary JIT-related rebuilds during ``make install`` " "after ``--enable-optimizations`` builds." msgstr "" -#: ../NEWS:2472 +#: ../NEWS:2664 msgid "" ":gh:`149351`: Avoid possible broken macOS framework install names when " "DESTDIR is specified during builds." msgstr "" -#: ../NEWS:2475 +#: ../NEWS:2667 msgid ":gh:`149252`: Update to WASI SDK 33." msgstr "" -#: ../NEWS:2477 +#: ../NEWS:2669 msgid "" ":gh:`148690`: Windows free-threaded builds now output to a different default " "path with default filenames, for example, ``PCbuild/amd64t/python.exe`` " @@ -4304,19 +4607,19 @@ msgid "" "been updated to ensure compatibility of generated layouts." msgstr "" -#: ../NEWS:2482 +#: ../NEWS:2674 msgid "" ":gh:`146475`: Block Apple Clang from being used to build the JIT as it ships " "without required LLVM tools." msgstr "" -#: ../NEWS:2485 +#: ../NEWS:2677 msgid "" ":gh:`148644`: Errors during the PGO training job on Windows are no longer " "ignored, and a non-zero return code will cause the build to fail." msgstr "" -#: ../NEWS:2488 +#: ../NEWS:2680 msgid "" ":gh:`148535`: No longer use the ``gcc -fprofile-update=atomic`` flag on " "i686. The flag has been added to fix a random GCC internal error on PGO " @@ -4326,36 +4629,36 @@ msgid "" "fprofile-update=atomic`` on i686 anymore. Patch by Victor Stinner." msgstr "" -#: ../NEWS:2495 +#: ../NEWS:2687 msgid ":gh:`148483`: Use ``Py_GCC_ATTRIBUTE(unused)`` for stop_tracing label." msgstr "" -#: ../NEWS:2497 +#: ../NEWS:2689 msgid "" ":gh:`148474`: Fixed compilation of :file:`Python/pystrhex.c` with older " "clang versions." msgstr "" -#: ../NEWS:2500 +#: ../NEWS:2692 msgid "" ":gh:`146445`: The Android build tools have been moved to the Platforms " "folder." msgstr "" -#: ../NEWS:2503 +#: ../NEWS:2695 msgid "" ":gh:`146264`: Fix static module builds on non-WASI targets by linking HACL " "dependencies as static libraries when ``MODULE_BUILDTYPE=static``, " "preventing duplicate ``_Py_LibHacl_*`` symbol errors at link time." msgstr "" -#: ../NEWS:2507 +#: ../NEWS:2699 msgid "" ":gh:`138451`: Allow for custom LLVM path using ``LLVM_TOOLS_INSTALL_DIR`` " "during JIT build." msgstr "" -#: ../NEWS:2510 +#: ../NEWS:2702 msgid "" ":gh:`133312`: Add a new ``./configure`` option :option:`--enable-static-" "libpython-for-interpreter` which, when used with :option:`--enable-shared`, " @@ -4366,58 +4669,58 @@ msgid "" "library but also get a shared library for use by other programs." msgstr "" -#: ../NEWS:2522 +#: ../NEWS:2714 msgid ":gh:`149254`: Updated bundled version of OpenSSL to 3.5.6." msgstr "" -#: ../NEWS:2524 +#: ../NEWS:2716 msgid "" ":gh:`148690`: Non-freethreaded builds on Windows now support extensions " "linked to ``python3t.dll``, and will include a copy of that library in " "normal installs that references the non-freethreaded runtime." msgstr "" -#: ../NEWS:2528 +#: ../NEWS:2720 msgid "" ":gh:`146458`: Fix incorrect REPL height and width tracking on console window " "resize on Windows." msgstr "" -#: ../NEWS:2534 +#: ../NEWS:2726 msgid "" ":gh:`142295`: For Python macOS framework builds, update Info.plist files to " "be more compliant with current Apple guidelines. Original patch contributed " "by Martinus Verburg." msgstr "" -#: ../NEWS:2538 +#: ../NEWS:2730 msgid ":gh:`149254`: Update macOS installer to use OpenSSL 3.5.6." msgstr "" -#: ../NEWS:2543 +#: ../NEWS:2735 msgid "" ":gh:`94523`: Detect file if modified at local disk and prompt to ask " "refresh. Patch by Shixian Li." msgstr "" -#: ../NEWS:2546 +#: ../NEWS:2738 msgid ":gh:`139551`: Support rendering :exc:`BaseExceptionGroup` in IDLE." msgstr "" -#: ../NEWS:2548 +#: ../NEWS:2740 msgid "" ":gh:`89520`: Make IDLE extension configuration look at user config files, " "allowing user-installed extensions to have settings and key bindings defined " "in ~/.idlerc." msgstr "" -#: ../NEWS:2555 +#: ../NEWS:2747 msgid "" ":gh:`149225`: :c:type:`PyCriticalSection` and related functions are added to " "the Stable ABI." msgstr "" -#: ../NEWS:2558 +#: ../NEWS:2750 msgid "" ":gh:`149216`: :c:type:`PyType_WatchCallback` callbacks registered via :c:" "func:`PyType_AddWatcher` are now also invoked when a watched heap type is " @@ -4426,47 +4729,47 @@ msgid "" "reused." msgstr "" -#: ../NEWS:2564 +#: ../NEWS:2756 msgid ":gh:`149101`: Implement :pep:`788`." msgstr "" -#: ../NEWS:2566 +#: ../NEWS:2758 msgid ":gh:`149044`: Implement :pep:`820`: Unified slot system for the C API." msgstr "" -#: ../NEWS:2568 +#: ../NEWS:2760 msgid "" ":gh:`148267`: Using :c:macro:`Py_LIMITED_API` on a non-Windows free-threaded " "build no longer needs an extra :c:macro:`Py_GIL_DISABLED`." msgstr "" -#: ../NEWS:2571 +#: ../NEWS:2763 msgid "" ":gh:`145559`: Rename ``_Py_DumpTraceback`` and ``_Py_DumpTracebackThreads`` " "to :c:func:`PyUnstable_DumpTraceback` and :c:func:" "`PyUnstable_DumpTracebackThreads`." msgstr "" -#: ../NEWS:2575 +#: ../NEWS:2767 msgid "" ":gh:`146636`: Implement :pep:`803` -- ``abi3t``: Stable ABI for Free-" "Threaded Builds." msgstr "" -#: ../NEWS:2578 +#: ../NEWS:2770 msgid "" ":gh:`146302`: :c:func:`Py_IsInitialized` no longer returns true until " "initialization has fully completed, including import of the :mod:`site` " "module. The underlying runtime flags now use atomic operations." msgstr "" -#: ../NEWS:2582 +#: ../NEWS:2774 msgid "" ":gh:`146063`: Add :c:func:`PyObject_CallFinalizerFromDealloc` function to " "the limited C API. Patch by Victor Stinner." msgstr "" -#: ../NEWS:2585 +#: ../NEWS:2777 msgid "" ":gh:`145921`: Add functions that are guaranteed to be safe for use in :c:" "member:`~PyTypeObject.tp_traverse` handlers: :c:func:" @@ -4477,55 +4780,55 @@ msgid "" "func:`PyType_GetModuleByToken_DuringGC`." msgstr "" -#: ../NEWS:2598 +#: ../NEWS:2790 msgid "Python 3.15.0 alpha 8" msgstr "" -#: ../NEWS:2600 +#: ../NEWS:2792 msgid "*Release date: 2026-04-07*" msgstr "" -#: ../NEWS:2605 +#: ../NEWS:2797 msgid "" ":gh:`145986`: :mod:`xml.parsers.expat`: Fixed a crash caused by unbounded C " "recursion when converting deeply nested XML content models with :meth:`~xml." "parsers.expat.xmlparser.ElementDeclHandler`. This addresses :cve:`2026-4224`." msgstr "" -#: ../NEWS:2610 +#: ../NEWS:2802 msgid "" ":gh:`145599`: Reject control characters in :class:`http.cookies.Morsel` :" "meth:`~http.cookies.Morsel.update` and :meth:`~http.cookies.BaseCookie." "js_output`. This addresses :cve:`2026-3644`." msgstr "" -#: ../NEWS:2615 +#: ../NEWS:2807 msgid "" ":gh:`143930`: Reject leading dashes in URLs passed to :func:`webbrowser." "open`." msgstr "" -#: ../NEWS:2621 +#: ../NEWS:2813 msgid "" ":gh:`148157`: Fix an unlikely crash when parsing an invalid type comments " "for function parameters. Found by OSS Fuzz in :oss-fuzz:`492782951`." msgstr "" -#: ../NEWS:2624 +#: ../NEWS:2816 msgid "" ":gh:`100239`: Propagate result type and uniqueness information through " "``_BINARY_OP_EXTEND`` in the tier 2 optimizer, enabling elimination of " "downstream type guards and selection of inplace float operations." msgstr "" -#: ../NEWS:2628 +#: ../NEWS:2820 msgid "" ":gh:`148144`: Initialize ``_PyInterpreterFrame.visited`` when copying " "interpreter frames so incremental GC does not read an uninitialized byte " "from generator and frame-object copies." msgstr "" -#: ../NEWS:2632 +#: ../NEWS:2824 msgid "" ":gh:`148072`: Cache ``pickle.dumps`` and ``pickle.loads`` per interpreter in " "the XIData framework, avoiding repeated module lookups on every cross-" @@ -4534,73 +4837,73 @@ msgid "" "1.7x--3.3x." msgstr "" -#: ../NEWS:2638 +#: ../NEWS:2830 msgid "" ":gh:`148110`: Fix :func:`sys.set_lazy_imports_filter` so relative lazy " "imports pass the resolved imported module name to the filter callback. Patch " "by Pablo Galindo." msgstr "" -#: ../NEWS:2642 +#: ../NEWS:2834 msgid "" ":gh:`148083`: Constant-fold ``_CONTAINS_OP_SET`` for :class:`frozenset`. " "Patch by Donghee Na." msgstr "" -#: ../NEWS:2645 +#: ../NEWS:2837 msgid "" ":gh:`144319`: Fix a bug that could cause applications with specific " "allocation patterns to leak memory via Huge Pages if compiled with Huge Page " "support. Patch by Pablo Galindo" msgstr "" -#: ../NEWS:2649 +#: ../NEWS:2841 msgid "" ":gh:`147985`: Make :c:func:`PySet_Contains` attempt a lock-free lookup, " "similar to :meth:`!set.__contains__`. This avoids acquiring the set object " "mutex in the normal case." msgstr "" -#: ../NEWS:2653 +#: ../NEWS:2845 msgid "" ":gh:`147856`: Allow the *count* argument of :meth:`bytes.replace` to be a " "keyword." msgstr "" -#: ../NEWS:2656 +#: ../NEWS:2848 msgid "" ":gh:`146615`: Fix a crash in :meth:`~object.__get__` for :c:expr:" "`METH_METHOD` descriptors when an invalid (non-type) object is passed as the " "second argument. Patch by Steven Sun." msgstr "" -#: ../NEWS:2660 +#: ../NEWS:2852 msgid "" ":gh:`146306`: Optimize compact integer arithmetic in the JIT by mutating " "uniquely-referenced operands in place, avoiding allocation of a new int " "object. Speeds up the pyperformance ``spectral_norm`` benchmark by ~10%." msgstr "" -#: ../NEWS:2664 +#: ../NEWS:2856 msgid "" ":gh:`146587`: Fix type slot assignment incase of multiple slots for same " "name in type object implementation. Patch by Kumar Aditya." msgstr "" -#: ../NEWS:2667 +#: ../NEWS:2859 msgid "" ":gh:`126910`: Set frame pointers in ``aarch64-unknown-linux-gnu`` JIT code, " "allowing most native profilers and debuggers to unwind through them. Patch " "by Diego Russo" msgstr "" -#: ../NEWS:2671 +#: ../NEWS:2863 msgid "" ":gh:`146388`: Adds a null check to handle when the JIT optimizer runs out of " "space when dealing with contradictions in ``make_bottom``." msgstr "" -#: ../NEWS:2674 +#: ../NEWS:2866 msgid "" ":gh:`146308`: Fixed multiple error handling issues in the :mod:`!" "_remote_debugging` module including a double-free in code object caching, " @@ -4610,118 +4913,118 @@ msgid "" "Patch by Pablo Galindo." msgstr "" -#: ../NEWS:2681 +#: ../NEWS:2873 msgid "" ":gh:`146306`: Optimize float arithmetic in the JIT by mutating uniquely-" "referenced operands in place, avoiding allocation of a new float object. " "Speeds up the pyperformance ``nbody`` benchmark by ~19%." msgstr "" -#: ../NEWS:2685 +#: ../NEWS:2877 msgid "" ":gh:`146128`: Fix a bug which could cause constant values to be partially " "corrupted in AArch64 JIT code. This issue is theoretical, and hasn't " "actually been observed in unmodified Python interpreters." msgstr "" -#: ../NEWS:2689 +#: ../NEWS:2881 msgid "" ":gh:`146250`: Fixed a memory leak in :exc:`SyntaxError` when re-initializing " "it." msgstr "" -#: ../NEWS:2692 +#: ../NEWS:2884 msgid "" ":gh:`146245`: Fixed reference leaks in :mod:`socket` when audit hooks raise " "exceptions in :func:`socket.getaddrinfo` and :meth:`!socket.sendto`." msgstr "" -#: ../NEWS:2695 +#: ../NEWS:2887 msgid "" ":gh:`146151`: :class:`memoryview` now supports the :c:expr:`float complex` " "and :c:expr:`double complex` C types: formatting characters ``'F'`` and " "``'D'`` respectively. Patch by Sergey B Kirpichev." msgstr "" -#: ../NEWS:2699 +#: ../NEWS:2891 msgid "" ":gh:`146196`: Fix potential Undefined Behavior in :c:func:" "`PyUnicodeWriter_WriteASCII` by adding a zero-length check. Patch by Shamil " "Abdulaev." msgstr "" -#: ../NEWS:2703 +#: ../NEWS:2895 msgid "" ":gh:`146227`: Fix wrong type in ``_Py_atomic_load_uint16`` in the C11 " "atomics backend (``pyatomic_std.h``), which used a 32-bit atomic load " "instead of 16-bit. Found by Mohammed Zuhaib." msgstr "" -#: ../NEWS:2707 +#: ../NEWS:2899 msgid "" ":gh:`146205`: Fixed a bug where :meth:`select.epoll.close`, :meth:`select." "kqueue.close`, and :meth:`select.devpoll.close` silently ignored errors." msgstr "" -#: ../NEWS:2711 +#: ../NEWS:2903 msgid ":gh:`146199`: Comparison of code objects now handles errors correctly." msgstr "" -#: ../NEWS:2713 +#: ../NEWS:2905 msgid "" ":gh:`145667`: Remove the ``GET_ITER_YIELD_FROM`` instruction, modifying " "``SEND`` to pair with ``GET_ITER`` when compiling ``yield from`` expressions." msgstr "" -#: ../NEWS:2717 +#: ../NEWS:2909 msgid "" ":gh:`146192`: Add Base32 support to :mod:`binascii` and improve the " "performance of the Base32 converters in :mod:`base64`. Patch by James Seo." msgstr "" -#: ../NEWS:2720 +#: ../NEWS:2912 msgid "" ":gh:`135871`: Improve multithreaded scaling of PyMutex in low-contention " "scenarios by reloading the lock's internal state, without slowing down high-" "contention scenarios." msgstr "" -#: ../NEWS:2724 +#: ../NEWS:2916 msgid "" ":gh:`146096`: Fixed segmentation fault when called repr for " "BaseExceptionGroup with empty or 1-size tuple args." msgstr "" -#: ../NEWS:2727 +#: ../NEWS:2919 msgid "" ":gh:`146056`: Fix :func:`repr` for lists and tuples containing ``NULL``\\ s." msgstr "" -#: ../NEWS:2729 +#: ../NEWS:2921 msgid "" ":gh:`145059`: Fixed :py:attr:`sys.lazy_modules` to include lazy modules " "without submodules. Patch by Bartosz Sławecki." msgstr "" -#: ../NEWS:2732 +#: ../NEWS:2924 msgid "" ":gh:`146041`: Fix free-threading scaling bottleneck in :func:`sys.intern` " "and :c:func:`PyObject_SetAttr` by avoiding the interpreter-wide lock when " "the string is already interned and immortalized." msgstr "" -#: ../NEWS:2736 +#: ../NEWS:2928 msgid "" ":gh:`145990`: ``python --help-env`` sections are now sorted by environment " "variable name." msgstr "" -#: ../NEWS:2739 +#: ../NEWS:2931 msgid "" ":gh:`145990`: ``python --help-xoptions`` is now sorted by ``-X`` option name." msgstr "" -#: ../NEWS:2741 +#: ../NEWS:2933 msgid "" ":gh:`145876`: :exc:`AttributeError`\\ s and :exc:`KeyError`\\ s raised in :" "meth:`!keys` or :meth:`!__getitem__` during dictionary unpacking " @@ -4729,108 +5032,108 @@ msgid "" "`TypeError`." msgstr "" -#: ../NEWS:2746 +#: ../NEWS:2938 msgid "" ":gh:`127958`: Support tracing from function entrypoints in the JIT. Patch by " "Ken Jin." msgstr "" -#: ../NEWS:2749 +#: ../NEWS:2941 msgid ":gh:`145376`: Fix GC tracking in ``structseq.__replace__()``." msgstr "" -#: ../NEWS:2751 +#: ../NEWS:2943 msgid "" ":gh:`145792`: Fix out-of-bounds access when invoking faulthandler on a " "CPython build compiled without support for VLAs." msgstr "" -#: ../NEWS:2754 +#: ../NEWS:2946 msgid "" ":gh:`142183`: Avoid a pathological case where repeated calls at a specific " "stack depth could be significantly slower." msgstr "" -#: ../NEWS:2757 +#: ../NEWS:2949 msgid "" ":gh:`145779`: Improve scaling of :func:`classmethod` and :func:" "`staticmethod` calls in the free-threaded build by avoiding the descriptor " "``__get__`` call." msgstr "" -#: ../NEWS:2761 +#: ../NEWS:2953 msgid "" ":gh:`145783`: Fix an unlikely crash in the parser when certain errors were " "erroneously not propagated. Found by OSS Fuzz in :oss-fuzz:`491369109`." msgstr "" -#: ../NEWS:2764 +#: ../NEWS:2956 msgid "" ":gh:`145685`: Improve scaling of type attribute lookups in the :term:`free-" "threaded build` by avoiding contention on the internal type lock." msgstr "" -#: ../NEWS:2768 +#: ../NEWS:2960 msgid "" ":gh:`145713`: Make :meth:`bytearray.resize` thread-safe in the free-threaded " "build by using a critical section and calling the lock-held variant of the " "resize function." msgstr "" -#: ../NEWS:2772 +#: ../NEWS:2964 msgid "" ":gh:`145036`: In free-threaded build, fix race condition when calling :meth:" "`!__sizeof__` on a :class:`list`" msgstr "" -#: ../NEWS:2775 +#: ../NEWS:2967 msgid "" ":gh:`134584`: Eliminate redundant refcounting for ``MATCH_CLASS`` in the JIT." msgstr "" -#: ../NEWS:2777 +#: ../NEWS:2969 msgid "" ":gh:`69605`: Add :mod:`math.integer` to :term:`REPL` auto-completion of " "imports." msgstr "" -#: ../NEWS:2780 +#: ../NEWS:2972 msgid "" ":gh:`131798`: Optimize ``_ITER_CHECK_RANGE`` and ``_ITER_CHECK_LIST`` in the " "JIT" msgstr "" -#: ../NEWS:2783 +#: ../NEWS:2975 msgid "" ":gh:`143414`: Add tracking to the JIT optimizer to determine whether a " "reference is uniquely owned or shared" msgstr "" -#: ../NEWS:2786 +#: ../NEWS:2978 msgid "" ":gh:`143636`: Fix a crash when calling :class:`SimpleNamespace.__replace__() " "` on non-namespace instances. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:2790 +#: ../NEWS:2982 msgid "" ":gh:`126910`: Set frame pointers in ``x86_64-unknown-linux-gnu`` JIT code, " "allowing most native profilers and debuggers to unwind through them." msgstr "" -#: ../NEWS:2793 +#: ../NEWS:2985 msgid "" ":gh:`140594`: Fix an out of bounds read when a single NUL character is read " "from the standard input. Patch by Shamil Abdulaev." msgstr "" -#: ../NEWS:2796 +#: ../NEWS:2988 msgid "" ":gh:`140870`: Add support for module attributes in the :term:`REPL` auto-" "completion of imports." msgstr "" -#: ../NEWS:2802 +#: ../NEWS:2994 msgid "" ":gh:`144503`: Fix a regression introduced in 3.14.3 and 3.13.12 where the :" "mod:`multiprocessing` ``forkserver`` start method would fail with :exc:" @@ -4840,14 +5143,14 @@ msgid "" "the operating system's per-argument length limit." msgstr "" -#: ../NEWS:2809 +#: ../NEWS:3001 msgid "" ":gh:`148153`: :func:`base64.b32encode` now always raises :exc:`ValueError` " "instead of :exc:`AssertionError` for the value of *map01* with invalid " "length." msgstr "" -#: ../NEWS:2813 +#: ../NEWS:3005 msgid "" ":gh:`73613`: Add the *padded* parameter in functions related to Base32 and " "Base64 codecs in the :mod:`binascii` and :mod:`base64` modules. In the " @@ -4857,13 +5160,13 @@ msgid "" "urlsafe_b64decode` by default." msgstr "" -#: ../NEWS:2820 +#: ../NEWS:3012 msgid "" ":gh:`146613`: :mod:`itertools`: Fix a crash in :func:`itertools.groupby` " "when the grouper iterator is concurrently mutated." msgstr "" -#: ../NEWS:2823 +#: ../NEWS:3015 msgid "" ":gh:`147944`: Accepted range for the *bytes_per_sep* argument of :meth:" "`bytes.hex`, :meth:`bytearray.hex`, :meth:`memoryview.hex`, and :func:" @@ -4871,13 +5174,13 @@ msgid "" "maxsize`` is now valid." msgstr "" -#: ../NEWS:2828 +#: ../NEWS:3020 msgid "" ":gh:`146080`: :mod:`ssl`: fix a crash when an SNI callback tries to use an " "SSL object that has already been garbage-collected. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:2832 +#: ../NEWS:3024 msgid "" ":gh:`146556`: Fix :func:`annotationlib.get_annotations` hanging indefinitely " "when called with ``eval_str=True`` on a callable that has a circular " @@ -4886,47 +5189,47 @@ msgid "" "found so far, mirroring the approach of :func:`inspect.unwrap`." msgstr "" -#: ../NEWS:2838 +#: ../NEWS:3030 msgid "" ":gh:`146090`: :mod:`sqlite3`: fix a crash when :meth:`sqlite3.Connection." "create_collation` fails with `SQLITE_BUSY `__. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:2842 +#: ../NEWS:3034 msgid "" ":gh:`146090`: :mod:`sqlite3`: properly raise :exc:`MemoryError` instead of :" "exc:`SystemError` when a context callback fails to be allocated. Patch by " "Bénédikt Tran." msgstr "" -#: ../NEWS:2846 +#: ../NEWS:3038 msgid "" ":gh:`146507`: Make :meth:`asyncio.SelectorEventLoop` stream transport's :" "meth:`~asyncio.WriteTransport.get_write_buffer_size` O(1) by maintaining a " "running byte counter instead of iterating the buffer on every call." msgstr "" -#: ../NEWS:2850 +#: ../NEWS:3042 msgid "" ":gh:`145056`: Fix merging of :class:`collections.OrderedDict` and :class:" "`frozendict`." msgstr "" -#: ../NEWS:2853 +#: ../NEWS:3045 msgid "" ":gh:`145056`: Add support for merging :class:`collections.UserDict` and :" "class:`frozendict`." msgstr "" -#: ../NEWS:2856 +#: ../NEWS:3048 msgid "" ":gh:`145633`: Fix ``struct.pack('f', float)``: use :c:func:`PyFloat_Pack4` " "to raise :exc:`OverflowError`. Patch by Sergey B Kirpichev and Victor " "Stinner." msgstr "" -#: ../NEWS:2860 +#: ../NEWS:3052 msgid "" ":gh:`146440`: :mod:`json`: Add the *array_hook* parameter to :func:`~json." "load` and :func:`~json.loads` functions: allow a callback for JSON literal " @@ -4936,7 +5239,7 @@ msgid "" "structure representing the JSON data." msgstr "" -#: ../NEWS:2867 +#: ../NEWS:3059 msgid "" ":gh:`146431`: Add the *wrapcol* parameter to :mod:`base64` functions :func:" "`~base64.b16encode`, :func:`~base64.b32encode`, :func:`~base64." @@ -4949,38 +5252,38 @@ msgid "" "unhexlify`, :func:`~binascii.a2b_base32` and :func:`~binascii.a2b_base85`." msgstr "" -#: ../NEWS:2879 +#: ../NEWS:3071 msgid "" ":gh:`146310`: The :mod:`ensurepip` module no longer looks for ``pip-*.whl`` " "wheel packages in the current directory." msgstr "" -#: ../NEWS:2882 +#: ../NEWS:3074 msgid "" ":gh:`141510`: Support :class:`frozendict` in :mod:`plistlib`, for " "serialization only. Patch by Hugo van Kemenade." msgstr "" -#: ../NEWS:2885 +#: ../NEWS:3077 msgid "" ":gh:`146238`: Support half-floats (type code ``'e'`` of the :mod:`struct` " "module) in the :mod:`array` module. Patch by Sergey B Kirpichev." msgstr "" -#: ../NEWS:2888 +#: ../NEWS:3080 msgid "" ":gh:`140947`: Fix incorrect contextvars handling in server tasks created by :" "mod:`asyncio`. Patch by Kumar Aditya." msgstr "" -#: ../NEWS:2891 +#: ../NEWS:3083 msgid "" ":gh:`146151`: Support the :c:expr:`float complex` and :c:expr:`double " "complex` C types in the :mod:`array` module: formatting characters ``'F'`` " "and ``'D'`` respectively. Patch by Sergey B Kirpichev." msgstr "" -#: ../NEWS:2895 +#: ../NEWS:3087 msgid "" ":gh:`143387`: In importlib.metadata, when a distribution file is corrupt and " "there is no metadata file, calls to ``Distribution.metadata()`` (including " @@ -4991,63 +5294,63 @@ msgid "" "returned and would be indistinguishable from the presence of an empty file." msgstr "" -#: ../NEWS:2904 +#: ../NEWS:3096 msgid "" ":gh:`146228`: Cached FastPath objects in importlib.metadata are now cleared " "on fork, avoiding broken references to zip files during fork." msgstr "" -#: ../NEWS:2907 +#: ../NEWS:3099 msgid "" ":gh:`146171`: Nested :exc:`AttributeError` suggestions now include property-" "backed attributes on nested objects without executing the property getter." msgstr "" -#: ../NEWS:2911 +#: ../NEWS:3103 msgid "" ":gh:`145410`: On Windows, :func:`sysconfig.get_platform` now gets the " "platform from the ``_sysconfig`` module instead of parsing :data:`sys." "version` string. Patch by Victor Stinner." msgstr "" -#: ../NEWS:2915 +#: ../NEWS:3107 msgid "" ":gh:`146091`: Fix a bug in :func:`termios.tcsetwinsize` where passing a " "sequence that raises an exception in ``__getitem__`` would cause a :exc:" "`SystemError` instead of propagating the original exception." msgstr "" -#: ../NEWS:2919 +#: ../NEWS:3111 msgid "" ":gh:`146083`: Update bundled `libexpat `_ to " "version 2.7.5." msgstr "" -#: ../NEWS:2922 +#: ../NEWS:3114 msgid "" ":gh:`146076`: :mod:`zoneinfo`: fix crashes when deleting ``_weak_cache`` " "from a :class:`zoneinfo.ZoneInfo` subclass." msgstr "" -#: ../NEWS:2925 +#: ../NEWS:3117 msgid "" ":gh:`123471`: Make concurrent iteration over :class:`itertools.zip_longest` " "safe under free-threading." msgstr "" -#: ../NEWS:2928 +#: ../NEWS:3120 msgid "" ":gh:`146075`: Errors when calling :func:`functools.partial` with a malformed " "keyword will no longer crash the interpreter." msgstr "" -#: ../NEWS:2931 +#: ../NEWS:3123 msgid "" ":gh:`146054`: Limit the size of :func:`encodings.search_function` cache. " "Found by OSS Fuzz in :oss-fuzz:`493449985`." msgstr "" -#: ../NEWS:2934 +#: ../NEWS:3126 msgid "" ":gh:`146004`: All :option:`-X` options from the Python command line are now " "propagated to child processes spawned by :mod:`multiprocessing`, not just a " @@ -5061,7 +5364,7 @@ msgid "" "``warn_default_encoding``." msgstr "" -#: ../NEWS:2945 +#: ../NEWS:3137 msgid "" ":gh:`145980`: Added the *alphabet* parameter in :func:`~binascii." "b2a_base64`, :func:`~binascii.a2b_base64`, :func:`~binascii.b2a_base85` and :" @@ -5069,26 +5372,26 @@ msgid "" "mod:`binascii` module. Removed :func:`!b2a_z85` and :func:`!a2b_z85`." msgstr "" -#: ../NEWS:2950 +#: ../NEWS:3142 msgid "" ":gh:`145968`: Fix translation in :func:`base64.b64decode` when altchars " "overlaps with the standard ones." msgstr "" -#: ../NEWS:2953 +#: ../NEWS:3145 msgid "" ":gh:`145966`: Non-:exc:`AttributeError` exceptions raised during dialect " "attribute lookup in :mod:`csv` are no longer silently suppressed." msgstr "" -#: ../NEWS:2956 +#: ../NEWS:3148 msgid "" ":gh:`145883`: :mod:`zoneinfo`: Fix heap buffer overflow reads from malformed " "TZif data. Found by OSS Fuzz, issues :oss-fuzz:`492245058` and :oss-fuzz:" "`492230068`." msgstr "" -#: ../NEWS:2960 +#: ../NEWS:3152 msgid "" ":gh:`145850`: Changed some implementation details in :class:`struct.Struct`: " "calling it with non-ASCII string format will now raise a :exc:`ValueError` " @@ -5098,7 +5401,7 @@ msgid "" "`AttributeError` instead of :exc:`RuntimeError`." msgstr "" -#: ../NEWS:2967 +#: ../NEWS:3159 msgid "" ":gh:`123720`: asyncio: Fix :func:`asyncio.Server.serve_forever` shutdown " "regression. Since 3.12, cancelling ``serve_forever()`` could hang waiting " @@ -5108,7 +5411,7 @@ msgid "" "observe EOF." msgstr "" -#: ../NEWS:2974 +#: ../NEWS:3166 msgid "" ":gh:`138122`: The ``profiling.sampling`` module now supports differential " "flamegraph visualization via ``--diff-flamegraph`` to compare two profiling " @@ -5117,56 +5420,56 @@ msgid "" "between runs." msgstr "" -#: ../NEWS:2980 +#: ../NEWS:3172 msgid "" ":gh:`145754`: Request signature during mock autospec with ``FORWARDREF`` " "annotation format. This prevents runtime errors when an annotation uses a " "name that is not defined at runtime." msgstr "" -#: ../NEWS:2984 +#: ../NEWS:3176 msgid "" ":gh:`145750`: Avoid undefined behaviour from signed integer overflow when " "parsing format strings in the :mod:`struct` module. Found by OSS Fuzz in :" "oss-fuzz:`488466741`." msgstr "" -#: ../NEWS:2988 +#: ../NEWS:3180 msgid ":gh:`145719`: Add ``application/efi`` MIME type to :mod:`mimetypes`." msgstr "" -#: ../NEWS:2990 +#: ../NEWS:3182 msgid ":gh:`145717`: Add a few Microsoft-specific MIME types." msgstr "" -#: ../NEWS:2992 +#: ../NEWS:3184 msgid "" ":gh:`145703`: :mod:`asyncio`: Make sure that :meth:`loop.call_at ` and :meth:`loop.call_later ` trigger " "scheduled events on time when the clock resolution becomes too small." msgstr "" -#: ../NEWS:2997 +#: ../NEWS:3189 msgid "" ":gh:`145697`: Add ``application/sql`` and ``application/vnd.sqlite3`` into " "``mimetypes``." msgstr "" -#: ../NEWS:3000 +#: ../NEWS:3192 msgid "" ":gh:`145492`: Fix infinite recursion in :class:`collections.defaultdict` " "``__repr__`` when a ``defaultdict`` contains itself. Based on analysis by " "KowalskiThomas in :gh:`145492`." msgstr "" -#: ../NEWS:3004 +#: ../NEWS:3196 msgid "" ":gh:`145650`: Add :meth:`~object.__repr__` support to :class:`logging." "Formatter` and :class:`logging.Filter`, showing the format string and filter " "name respectively." msgstr "" -#: ../NEWS:3008 +#: ../NEWS:3200 msgid "" ":gh:`145587`: Resolved a performance regression in ``multiprocessing." "connection.wait`` on Windows that caused infinite busy loops when called " @@ -5174,25 +5477,25 @@ msgid "" "conserve CPU resources. Patch By Shrey Naithani" msgstr "" -#: ../NEWS:3013 +#: ../NEWS:3205 msgid "" ":gh:`145616`: Detect Android sysconfig ABI correctly on 32-bit ARM Android " "on 64-bit ARM kernel" msgstr "" -#: ../NEWS:3016 +#: ../NEWS:3208 msgid "" ":gh:`145546`: Fix ``unittest.util.sorted_list_difference()`` to deduplicate " "remaining elements when one input list is exhausted before the other." msgstr "" -#: ../NEWS:3019 +#: ../NEWS:3211 msgid "" ":gh:`145446`: Now :mod:`functools` is safer in free-threaded build when " "using keywords in :func:`functools.partial`" msgstr "" -#: ../NEWS:3022 +#: ../NEWS:3214 msgid "" ":gh:`145264`: Base64 decoder (see :func:`binascii.a2b_base64`, :func:`base64." "b64decode`, etc) no longer ignores excess data after the first padded quad " @@ -5201,7 +5504,7 @@ msgid "" "before the end of the encoded data." msgstr "" -#: ../NEWS:3028 +#: ../NEWS:3220 msgid "" ":gh:`145035`: Allows omitting the internal library ``_pyrepl`` with limited " "loss of functionality. This allows complete removal of the modern REPL, " @@ -5209,7 +5512,7 @@ msgid "" "distributions." msgstr "" -#: ../NEWS:3033 +#: ../NEWS:3225 msgid "" ":gh:`144270`: Made the *tag* parameter of :class:`xml.etree.ElementTree." "Element` and the *parent* and *tag* parameters of :func:`xml.etree." @@ -5217,7 +5520,7 @@ msgid "" "accelerator." msgstr "" -#: ../NEWS:3038 +#: ../NEWS:3230 msgid "" ":gh:`144984`: Fix crash in :meth:`xml.parsers.expat.xmlparser." "ExternalEntityParserCreate` when an allocation fails. The error paths could " @@ -5225,59 +5528,59 @@ msgid "" "reference count." msgstr "" -#: ../NEWS:3043 +#: ../NEWS:3235 msgid "" ":gh:`144975`: :meth:`wave.Wave_write.setframerate` now validates the frame " "rate after rounding to an integer, preventing values like ``0.5`` from being " "accepted and causing confusing errors later. Patch by Michiel Beijen." msgstr "" -#: ../NEWS:3048 +#: ../NEWS:3240 msgid "" ":gh:`140715`: Add ``%n`` and ``%t`` support to :meth:`~datetime.datetime." "strptime`." msgstr "" -#: ../NEWS:3051 +#: ../NEWS:3243 msgid "" ":gh:`144259`: Fix inconsistent display of long multiline pasted content in " "the REPL." msgstr "" -#: ../NEWS:3054 +#: ../NEWS:3246 msgid "" ":gh:`140814`: :func:`multiprocessing.freeze_support` no longer sets the " "default start method as a side effect, which previously caused a subsequent :" "func:`multiprocessing.set_start_method` call to raise :exc:`RuntimeError`." msgstr "" -#: ../NEWS:3059 +#: ../NEWS:3251 msgid "" ":gh:`123471`: Make concurrent iteration over :class:`itertools.accumulate` " "safe under free-threading." msgstr "" -#: ../NEWS:3062 +#: ../NEWS:3254 msgid "" ":gh:`143715`: Calling the ``Struct.__new__()`` without required argument now " "is deprecated. Calling :meth:`~object.__init__` method on initialized :class:" "`~struct.Struct` objects is deprecated." msgstr "" -#: ../NEWS:3066 +#: ../NEWS:3258 msgid "" ":gh:`142763`: Fix a race condition between :class:`zoneinfo.ZoneInfo` " "creation and :func:`zoneinfo.ZoneInfo.clear_cache` that could raise :exc:" "`KeyError`." msgstr "" -#: ../NEWS:3070 +#: ../NEWS:3262 msgid "" ":gh:`141707`: Don't change :class:`tarfile.TarInfo` type from ``AREGTYPE`` " "to ``DIRTYPE`` when parsing GNU long name or link headers." msgstr "" -#: ../NEWS:3073 +#: ../NEWS:3265 msgid "" ":gh:`138577`: :func:`getpass.getpass` with non-empty ``echo_char`` now " "handles keyboard shortcuts including Ctrl+A/E (cursor movement), Ctrl+K/U " @@ -5286,75 +5589,75 @@ msgid "" "non-canonical mode. Patch by Sanyam Khurana." msgstr "" -#: ../NEWS:3079 +#: ../NEWS:3271 msgid "" ":gh:`140049`: :func:`traceback.format_exception_only` now colorizes " "exception notes." msgstr "" -#: ../NEWS:3082 +#: ../NEWS:3274 msgid "" ":gh:`139933`: Improve :exc:`AttributeError` suggestions for classes with a " "custom :meth:`~object.__dir__` method returning a list of unsortable values. " "Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:3086 +#: ../NEWS:3278 msgid "" ":gh:`139633`: The :mod:`netrc` security check is now run once per parse " "rather than once per entry." msgstr "" -#: ../NEWS:3089 +#: ../NEWS:3281 msgid "" ":gh:`130472`: Add fancycompleter and enable it by default when using pyrepl. " "This gives colored tab completion." msgstr "" -#: ../NEWS:3092 +#: ../NEWS:3284 msgid "" ":gh:`112632`: Add an *expand* keyword argument for :func:`pprint.pprint`, :" "func:`pprint.pformat`, :func:`pprint.pp` by passing on all *kwargs* and :" "class:`pprint.PrettyPrinter`. Contributed by Stefan Todoran and Semyon Moroz." msgstr "" -#: ../NEWS:3097 +#: ../NEWS:3289 msgid "" ":gh:`66419`: Optional argument with :ref:`nargs` equals to ``argparse." "REMAINDER`` now consumes all remaining arguments including ``'--'``." msgstr "" -#: ../NEWS:3101 +#: ../NEWS:3293 msgid "" ":gh:`60729`: Add support for floating point audio wave files in :mod:`wave`." msgstr "" -#: ../NEWS:3103 +#: ../NEWS:3295 msgid "" ":issue:`36461`: Make the target time of :meth:`timeit.Timer.autorange` " "configurable and add ``--target-time`` option to the command-line interface " "of :mod:`timeit`." msgstr "" -#: ../NEWS:3110 +#: ../NEWS:3302 msgid "" ":gh:`126676`: Expand :mod:`argparse` documentation for ``type=bool`` with a " "demonstration of the surprising behavior and pointers to common alternatives." msgstr "" -#: ../NEWS:3114 +#: ../NEWS:3306 msgid "" ":gh:`145649`: Fix text wrapping and formatting of ``-X`` option descriptions " "in the :manpage:`python(1)` man page by using proper roff markup." msgstr "" -#: ../NEWS:3120 +#: ../NEWS:3312 msgid "" ":gh:`144418`: The Android testbed's emulator RAM has been increased from 2 " "GB to 4 GB." msgstr "" -#: ../NEWS:3123 +#: ../NEWS:3315 msgid "" ":gh:`146202`: Fix a race condition in regrtest: make sure that the temporary " "directory is created in the worker process. Previously, temp_cwd() could " @@ -5362,48 +5665,48 @@ msgid "" "Stinner." msgstr "" -#: ../NEWS:3131 +#: ../NEWS:3323 msgid "" ":gh:`146541`: The Android testbed can now be built for 32-bit ARM and x86 " "targets." msgstr "" -#: ../NEWS:3134 +#: ../NEWS:3326 msgid "" ":gh:`146498`: The iOS XCframework build script now ensures libpython isn't " "included in installed app content, and is more robust in identifying " "standard library binary content that requires processing." msgstr "" -#: ../NEWS:3138 +#: ../NEWS:3330 msgid "" ":gh:`146450`: The Android build script was modified to improve parity with " "other platform build scripts." msgstr "" -#: ../NEWS:3141 +#: ../NEWS:3333 msgid "" ":gh:`146446`: The clean target for the Apple/iOS XCframework build script is " "now more selective when targeting a single architecture." msgstr "" -#: ../NEWS:3144 +#: ../NEWS:3336 msgid "" ":gh:`146444`: The Apple/iOS build script has been moved to the Platforms " "directory." msgstr "" -#: ../NEWS:3147 +#: ../NEWS:3339 msgid "" ":gh:`146210`: Fix building the jit stencils on Windows when the interpreter " "is built with a different clang version. Patch by Chris Eibl." msgstr "" -#: ../NEWS:3150 +#: ../NEWS:3342 msgid ":gh:`145844`: Update to WASI SDK 32." msgstr "" -#: ../NEWS:3152 +#: ../NEWS:3344 msgid "" ":gh:`145801`: When Python build is optimized with GCC using PGO, use ``-" "fprofile-update=atomic`` option to use atomic operations when updating " @@ -5411,58 +5714,58 @@ msgid "" "corruption which can cause random GCC crashes. Patch by Victor Stinner." msgstr "" -#: ../NEWS:3158 +#: ../NEWS:3350 msgid ":gh:`138850`: Add :option:`--disable-epoll` to ``configure``" msgstr "" -#: ../NEWS:3160 +#: ../NEWS:3352 msgid "" ":gh:`145633`: Remove support for ancient ARM platforms (ARMv4L and ARMv5L " "OABI boards), using mixed-endian representation for doubles. Patch by " "Sergey B Kirpichev." msgstr "" -#: ../NEWS:3164 +#: ../NEWS:3356 msgid ":gh:`85277`: Fix building without ``stropts.h`` or empty ``stropts.h``" msgstr "" -#: ../NEWS:3169 +#: ../NEWS:3361 msgid "" ":gh:`140131`: Fix REPL cursor position on Windows when module completion " "suggestion line hits console width." msgstr "" -#: ../NEWS:3175 +#: ../NEWS:3367 msgid "" ":gh:`137586`: Invoke :program:`osascript` with absolute path in :mod:" "`webbrowser` and :mod:`!turtledemo`." msgstr "" -#: ../NEWS:3181 +#: ../NEWS:3373 msgid "" ":gh:`135953`: Properly identify the main thread in the Gecko profiler " "collector by using a status flag from the interpreter state instead of " "relying on :func:`threading.main_thread` in the collector process." msgstr "" -#: ../NEWS:3185 +#: ../NEWS:3377 msgid "" ":gh:`145976`: Remove :file:`Misc/indent.pro`, a configuration file for GNU :" "manpage:`indent(1)`." msgstr "" -#: ../NEWS:3188 +#: ../NEWS:3380 msgid ":gh:`145976`: Remove :file:`Misc/vgrindefs` and :file:`Misc/Porting`." msgstr "" -#: ../NEWS:3193 +#: ../NEWS:3385 msgid "" ":gh:`146636`: The :c:data:`Py_mod_abi` slot is now mandatory for modules " "created from a slots array (using :c:func:`PyModule_FromSlotsAndSpec` or " "the :c:func:`PyModExport_* ` export hook)." msgstr "" -#: ../NEWS:3197 +#: ../NEWS:3389 msgid "" ":gh:`146175`: The following macros are :term:`soft deprecated`: :c:macro:" "`Py_ALIGNED`, :c:macro:`PY_FORMAT_SIZE_T`, :c:macro:`Py_LL`, :c:macro:" @@ -5472,103 +5775,103 @@ msgid "" "`PY_SIZE_MAX`, :c:macro:`Py_UNICODE_SIZE`, :c:macro:`Py_VA_COPY`." msgstr "" -#: ../NEWS:3204 +#: ../NEWS:3396 msgid "" "The macro :c:macro:`Py_UNICODE_WIDE`, which was scheduled for removal, is :" "term:`soft deprecated` instead." msgstr "" -#: ../NEWS:3207 +#: ../NEWS:3399 msgid "" ":gh:`146143`: :c:func:`PyUnicodeWriter_WriteUCS4` now accepts a pointer to a " "constant buffer of ``Py_UCS4``." msgstr "" -#: ../NEWS:3210 +#: ../NEWS:3402 msgid "" ":gh:`146056`: :c:func:`PyUnicodeWriter_WriteRepr` now supports ``NULL`` " "argument." msgstr "" -#: ../NEWS:3213 +#: ../NEWS:3405 msgid "" ":gh:`145010`: Use GCC dialect alternatives for inline assembly in ``object." "h`` so that the Python headers compile correctly with ``-masm=intel``." msgstr "" -#: ../NEWS:3219 +#: ../NEWS:3411 msgid "Python 3.15.0 alpha 7" msgstr "" -#: ../NEWS:3221 +#: ../NEWS:3413 msgid "*Release date: 2026-03-10*" msgstr "" -#: ../NEWS:3226 +#: ../NEWS:3418 msgid "" ":gh:`145731`: Fix negative timestamp during DST on Windows. Patch by Hugo " "van Kemenade." msgstr "" -#: ../NEWS:3229 +#: ../NEWS:3421 msgid "" ":gh:`145307`: Defers loading of the ``psapi.dll`` module until it is used " "by :func:`ctypes.util.dllist`." msgstr "" -#: ../NEWS:3232 +#: ../NEWS:3424 msgid ":gh:`144551`: Updated bundled version of OpenSSL to 3.5.5." msgstr "" -#: ../NEWS:3237 +#: ../NEWS:3429 msgid "" ":gh:`144741`: Fix ``test_frame_pointer_unwind`` when Python is built with :" "option:`--enable-shared`. Classify also libpython frames as ``\"python\"``. " "Patch by Victor Stinner." msgstr "" -#: ../NEWS:3241 +#: ../NEWS:3433 msgid "" ":gh:`144739`: When Python was compiled with system expat older then 2.7.2 " "but tests run with newer expat, still skip :class:`!test.test_pyexpat." "MemoryProtectionTest`." msgstr "" -#: ../NEWS:3248 +#: ../NEWS:3440 msgid "" ":gh:`145506`: Fixes :cve:`2026-2297` by ensuring that " "``SourcelessFileLoader`` uses :func:`io.open_code` when opening ``.pyc`` " "files." msgstr "" -#: ../NEWS:3252 +#: ../NEWS:3444 msgid "" ":gh:`144370`: Disallow usage of control characters in status in :mod:" "`wsgiref.handlers` to prevent HTTP header injections. Patch by Benedikt " "Johannes." msgstr "" -#: ../NEWS:3259 +#: ../NEWS:3451 msgid "" ":gh:`145623`: Fix crash in :mod:`struct` when calling :func:`repr` or " "``__sizeof__()`` on an uninitialized :class:`struct.Struct` object created " "via ``Struct.__new__()`` without calling ``__init__()``." msgstr "" -#: ../NEWS:3263 +#: ../NEWS:3455 msgid "" ":gh:`145551`: Fix InvalidStateError when cancelling process created by :func:" "`asyncio.create_subprocess_exec` or :func:`asyncio.create_subprocess_shell`. " "Patch by Daan De Meyer." msgstr "" -#: ../NEWS:3267 +#: ../NEWS:3459 msgid "" ":gh:`141510`: :mod:`marshal` now supports :class:`frozendict` objects. The " "marshal format version was increased to 6. Patch by Victor Stinner." msgstr "" -#: ../NEWS:3270 +#: ../NEWS:3462 msgid "" ":gh:`145417`: :mod:`venv`: Prevent incorrect preservation of SELinux context " "when copying the ``Activate.ps1`` script. The script inherited the SELinux " @@ -5576,7 +5879,7 @@ msgid "" "destination project directory." msgstr "" -#: ../NEWS:3275 +#: ../NEWS:3467 msgid "" ":gh:`145335`: ``os.listdir(-1)`` and ``os.scandir(-1)`` now fail with " "``OSError(errno.EBADF)`` rather than listing the current directory. ``os." @@ -5584,158 +5887,158 @@ msgid "" "extended attributes of the current directory. Patch by Victor Stinner." msgstr "" -#: ../NEWS:3281 +#: ../NEWS:3473 msgid "" ":gh:`145376`: Fix double free and null pointer dereference in unusual error " "scenarios in :mod:`hashlib` and :mod:`hmac` modules." msgstr "" -#: ../NEWS:3284 +#: ../NEWS:3476 msgid "" ":gh:`145301`: :mod:`hmac`: fix a crash when the initialization of the " "underlying C extension module fails." msgstr "" -#: ../NEWS:3287 +#: ../NEWS:3479 msgid "" ":gh:`145301`: :mod:`hashlib`: fix a crash when the initialization of the " "underlying C extension module fails." msgstr "" -#: ../NEWS:3290 +#: ../NEWS:3482 msgid "" ":gh:`76007`: The ``version`` attribute of the :mod:`tarfile` module is " "deprecated and slated for removal in Python 3.20." msgstr "" -#: ../NEWS:3293 +#: ../NEWS:3485 msgid "" ":gh:`145158`: Avoid undefined behaviour from signed integer overflow when " "parsing format strings in the :mod:`struct` module." msgstr "" -#: ../NEWS:3296 +#: ../NEWS:3488 msgid "" ":gh:`123853`: Removed Windows 95 compatibility for :func:`locale." "getdefaultlocale`." msgstr "" -#: ../NEWS:3299 +#: ../NEWS:3491 msgid "" ":gh:`66802`: Add :func:`unicodedata.block` function to return the `Unicode " "block `_ of a character." msgstr "" -#: ../NEWS:3304 +#: ../NEWS:3496 msgid "" ":gh:`145033`: Add :data:`typing.TypeForm`, implementing :pep:`747`. Patch by " "Jelle Zijlstra." msgstr "" -#: ../NEWS:3307 +#: ../NEWS:3499 msgid "" ":gh:`141510`: :func:`dataclasses.field`: if *metadata* is ``None``, use an " "empty :class:`frozendict`, instead of a :func:`~types.MappingProxyType` of " "an empty :class:`dict`. Patch by Victor Stinner." msgstr "" -#: ../NEWS:3311 +#: ../NEWS:3503 msgid "" ":gh:`145006`: Add :exc:`ModuleNotFoundError` hints when a module for a " "different ABI exists." msgstr "" -#: ../NEWS:3314 +#: ../NEWS:3506 msgid "" ":gh:`141510`: ``ParameterizedMIMEHeader.params`` of :mod:`email." "headerregistry` is now a :class:`frozendict` instead of a :class:`types." "MappingProxyType`. Patch by Victor Stinner." msgstr "" -#: ../NEWS:3318 +#: ../NEWS:3510 msgid "" ":gh:`134872`: Add valid import name suggestions on :exc:" "`ModuleNotFoundError`." msgstr "" -#: ../NEWS:3321 +#: ../NEWS:3513 msgid "" ":gh:`88091`: Fix :func:`unicodedata.decomposition` for Hangul characters." msgstr "" -#: ../NEWS:3323 +#: ../NEWS:3515 msgid "" ":gh:`144986`: Fix a memory leak in :func:`atexit.register`. Patch by Shamil " "Abdulaev." msgstr "" -#: ../NEWS:3326 +#: ../NEWS:3518 msgid "" ":gh:`144777`: Fix data races in :class:`io.IncrementalNewlineDecoder` in " "the :term:`free-threaded build`." msgstr "" -#: ../NEWS:3329 +#: ../NEWS:3521 msgid "" ":gh:`144809`: Make :class:`collections.deque` copy atomic in the :term:`free-" "threaded build`." msgstr "" -#: ../NEWS:3332 +#: ../NEWS:3524 msgid "" ":gh:`141510`: The :mod:`copy` module now supports the :class:`frozendict` " "type. Patch by Pieter Eendebak based on work by Victor Stinner." msgstr "" -#: ../NEWS:3335 +#: ../NEWS:3527 msgid "" ":gh:`141510`: The :mod:`json` module now supports the :class:`frozendict` " "type. Patch by Victor Stinner." msgstr "" -#: ../NEWS:3338 +#: ../NEWS:3530 msgid "" ":gh:`144835`: Added missing explanations for some parameters in :func:`glob." "glob` and :func:`glob.iglob`." msgstr "" -#: ../NEWS:3341 +#: ../NEWS:3533 msgid "" ":gh:`144833`: Fixed a use-after-free in :mod:`ssl` when ``SSL_new()`` " "returns NULL in ``newPySSLSocket()``. The error was reported via a dangling " "pointer after the object had already been freed." msgstr "" -#: ../NEWS:3345 +#: ../NEWS:3537 msgid "" ":gh:`140715`: Add ``'%D'`` support to :meth:`~datetime.datetime.strptime`." msgstr "" -#: ../NEWS:3347 +#: ../NEWS:3539 msgid "" ":gh:`144782`: Fix :class:`argparse.ArgumentParser` to be :mod:`pickleable " "`." msgstr "" -#: ../NEWS:3350 +#: ../NEWS:3542 msgid "" ":gh:`144763`: Fix a race condition in :mod:`tracemalloc`: it no longer " "detaches the attached thread state to acquire its internal lock. Patch by " "Victor Stinner." msgstr "" -#: ../NEWS:3354 +#: ../NEWS:3546 msgid "" ":gh:`142224`: :func:`unicodedata.bidirectional` now return the correct " "default bidi class for unassigned code points." msgstr "" -#: ../NEWS:3357 +#: ../NEWS:3549 msgid ":gh:`117865`: Reduce the import time of :mod:`inspect` module by ~20%." msgstr "" -#: ../NEWS:3359 +#: ../NEWS:3551 msgid "" ":gh:`144156`: Fix the folding of headers by the :mod:`email` library when :" "rfc:`2047` encoded words are used. Now whitespace is correctly preserved " @@ -5744,35 +6047,35 @@ msgid "" "failures to preserve whitespace." msgstr "" -#: ../NEWS:3365 +#: ../NEWS:3557 msgid "" ":gh:`66305`: Fixed a hang on Windows in the :mod:`tempfile` module when " "trying to create a temporary file or subdirectory in a non-writable " "directory." msgstr "" -#: ../NEWS:3369 +#: ../NEWS:3561 msgid "" ":gh:`144615`: Methods directly decorated with :deco:`functools." "singledispatchmethod` now dispatch on the second argument when called after " "being accessed as class attributes. Patch by Bartosz Sławecki." msgstr "" -#: ../NEWS:3374 +#: ../NEWS:3566 msgid "" ":gh:`144321`: The functional syntax for creating :class:`typing.NamedTuple` " "classes now supports passing any :term:`iterable` of fields and types. " "Previously, only sequences were supported." msgstr "" -#: ../NEWS:3378 +#: ../NEWS:3570 msgid "" ":gh:`144475`: Calling :func:`repr` on :func:`functools.partial` is now safer " "when the partial object's internal attributes are replaced while the string " "representation is being generated." msgstr "" -#: ../NEWS:3382 +#: ../NEWS:3574 msgid "" ":gh:`144285`: Attribute suggestions in :exc:`AttributeError` tracebacks are " "now formatted differently to make them easier to understand, for example: " @@ -5780,70 +6083,70 @@ msgid "" "Sławecki." msgstr "" -#: ../NEWS:3387 +#: ../NEWS:3579 msgid "" ":gh:`144316`: Fix crash in ``_remote_debugging`` that caused " "``test_external_inspection`` to intermittently fail. Patch by Taegyun Kim." msgstr "" -#: ../NEWS:3390 +#: ../NEWS:3582 msgid "" ":gh:`143637`: Fixed a crash in socket.sendmsg() that could occur if " "ancillary data is mutated re-entrantly during argument parsing." msgstr "" -#: ../NEWS:3393 +#: ../NEWS:3585 msgid "" ":gh:`140652`: Fix a crash in :func:`!_interpchannels.list_all` after closing " "a channel." msgstr "" -#: ../NEWS:3396 +#: ../NEWS:3588 msgid "" ":gh:`143698`: Allow *scheduler* and *setpgroup* arguments to be explicitly :" "const:`None` when calling :func:`os.posix_spawn` or :func:`os.posix_spawnp`. " "Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:3400 +#: ../NEWS:3592 msgid "" ":gh:`143698`: Raise :exc:`TypeError` instead of :exc:`SystemError` when the " "*scheduler* in :func:`os.posix_spawn` or :func:`os.posix_spawnp` is not a " "tuple. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:3404 +#: ../NEWS:3596 msgid "" ":gh:`142516`: :mod:`ssl`: fix reference leaks in :class:`ssl.SSLContext` " "objects. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:3407 +#: ../NEWS:3599 msgid "" ":gh:`85809`: Added :term:`path-like object` support for :func:`shutil." "make_archive`." msgstr "" -#: ../NEWS:3410 +#: ../NEWS:3602 msgid "" ":gh:`143304`: Fix :class:`ctypes.CDLL` to honor the ``handle`` parameter on " "POSIX systems." msgstr "" -#: ../NEWS:3413 +#: ../NEWS:3605 msgid "" ":gh:`142781`: :mod:`zoneinfo`: fix a crash when instantiating :class:" "`~zoneinfo.ZoneInfo` objects for which the internal class-level cache is " "inconsistent." msgstr "" -#: ../NEWS:3417 +#: ../NEWS:3609 msgid "" ":gh:`142787`: Fix assertion failure in :mod:`sqlite3` blob subscript when " "slicing with indices that result in an empty slice." msgstr "" -#: ../NEWS:3420 +#: ../NEWS:3612 msgid "" ":gh:`142352`: Fix :meth:`asyncio.StreamWriter.start_tls` to transfer " "buffered data from :class:`~asyncio.StreamReader` to the SSL layer, " @@ -5851,7 +6154,7 @@ msgid "" "when implementing PROXY protocol support)." msgstr "" -#: ../NEWS:3425 +#: ../NEWS:3617 msgid "" ":gh:`139899`: Introduced :meth:`importlib.abc.MetaPathFinder.discover` and :" "meth:`importlib.abc.PathEntryFinder.discover` to allow module and submodule " @@ -5859,30 +6162,30 @@ msgid "" "imports." msgstr "" -#: ../NEWS:3430 +#: ../NEWS:3622 msgid "" ":gh:`137335`: Get rid of any possibility of a name conflict for named pipes " "in :mod:`multiprocessing` and :mod:`asyncio` on Windows, no matter how small." msgstr "" -#: ../NEWS:3434 +#: ../NEWS:3626 msgid "" ":gh:`135883`: Fix :mod:`sqlite3`'s :ref:`interactive shell ` " "keeping part of previous commands when scrolling history." msgstr "" -#: ../NEWS:3437 +#: ../NEWS:3629 msgid "" ":gh:`124748`: Improve :exc:`TypeError` error message when :meth:`!weakref." "WeakKeyDictionary.update` is used with keyword-only parameters." msgstr "" -#: ../NEWS:3441 +#: ../NEWS:3633 msgid "" ":gh:`80667`: Add support for Tangut Ideographs names in :mod:`unicodedata`." msgstr "" -#: ../NEWS:3443 +#: ../NEWS:3635 msgid "" ":issue:`42353`: The :mod:`re` module gains a new :func:`re.prefixmatch` " "function as an explicit spelling of what has to date always been known as :" @@ -5890,7 +6193,7 @@ msgid "" "prefixmatch` method." msgstr "" -#: ../NEWS:3448 +#: ../NEWS:3640 msgid "" "Why? Explicit is better than implicit. Other widely used languages all use " "the term \"match\" to mean what Python uses the term \"search\" for. The " @@ -5899,123 +6202,123 @@ msgid "" "industry." msgstr "" -#: ../NEWS:3454 +#: ../NEWS:3646 msgid "We do not plan to deprecate and remove the older ``match`` name." msgstr "" -#: ../NEWS:3456 +#: ../NEWS:3648 msgid "" ":issue:`40243`: Fix :meth:`!unicodedata.ucd_3_2_0.numeric` for non-decimal " "values." msgstr "" -#: ../NEWS:3459 +#: ../NEWS:3651 msgid "" ":issue:`40212`: Re-enable :func:`os.posix_fallocate` and :func:`os." "posix_fadvise` on AIX." msgstr "" -#: ../NEWS:3462 +#: ../NEWS:3654 msgid "" ":issue:`3405`: Add support for user data of Tk virtual events and detail for " "``Enter``, ``Leave``, ``FocusIn``, ``FocusOut``, and ``ConfigureRequest`` " "events to :mod:`tkinter`." msgstr "" -#: ../NEWS:3466 +#: ../NEWS:3658 msgid "" ":issue:`32234`: :class:`mailbox.Mailbox` instances can now be used as a " "context manager. The Mailbox is locked on context entry and unlocked and " "closed at context exit." msgstr "" -#: ../NEWS:3473 +#: ../NEWS:3665 msgid "" ":gh:`145450`: Document missing public :class:`wave.Wave_write` getter " "methods." msgstr "" -#: ../NEWS:3476 +#: ../NEWS:3668 msgid "" ":gh:`110937`: Document rest of full public :class:`importlib.metadata." "Distribution` API. Also add the (already documented) :class:`~importlib." "metadata.PackagePath` to ``__all__``." msgstr "" -#: ../NEWS:3480 +#: ../NEWS:3672 msgid "" ":gh:`136246`: A new \"Improve this page\" link is available in the left-hand " "sidebar of the docs, offering links to create GitHub issues, discussion " "forum posts, or pull requests." msgstr "" -#: ../NEWS:3487 +#: ../NEWS:3679 msgid "" ":gh:`145701`: Fix :exc:`SystemError` when ``__classdict__`` or " "``__conditional_annotations__`` is in a class-scope inlined comprehension. " "Found by OSS Fuzz in :oss-fuzz:`491105000`." msgstr "" -#: ../NEWS:3491 +#: ../NEWS:3683 msgid "" ":gh:`145615`: Fixed a memory leak in the :term:`free-threaded build` where " "mimalloc pages could become permanently unreclaimable until the owning " "thread exited." msgstr "" -#: ../NEWS:3495 +#: ../NEWS:3687 msgid "" ":gh:`116738`: Make :meth:`!mmap.mmap.set_name` thread-safe on the :term:" "`free threaded ` build." msgstr "" -#: ../NEWS:3498 +#: ../NEWS:3690 msgid "" ":gh:`145566`: In the free threading build, skip the stop-the-world pause " "when reassigning ``__class__`` on a newly created object." msgstr "" -#: ../NEWS:3501 +#: ../NEWS:3693 msgid "" ":gh:`143055`: Fix crash in AST unparser when unparsing dict comprehension " "unpacking. Found by OSS Fuzz in :oss-fuzz:`489790200`." msgstr "" -#: ../NEWS:3504 +#: ../NEWS:3696 msgid "" ":gh:`145335`: Fix a crash in :func:`os.pathconf` when called with ``-1`` as " "the path argument." msgstr "" -#: ../NEWS:3507 +#: ../NEWS:3699 msgid ":gh:`145376`: Fix reference leaks in various unusual error scenarios." msgstr "" -#: ../NEWS:3509 +#: ../NEWS:3701 msgid "" ":gh:`145234`: Fixed a ``SystemError`` in the parser when an encoding cookie " "(for example, UTF-7) decodes to carriage returns (``\\r``). Newlines are now " "normalized after decoding in the string tokenizer." msgstr "" -#: ../NEWS:3513 +#: ../NEWS:3705 msgid "Patch by Pablo Galindo." msgstr "" -#: ../NEWS:3515 +#: ../NEWS:3707 msgid "" ":gh:`145275`: Added the :option:`-X pathconfig_warnings<-X>` and :envvar:" "`PYTHON_PATHCONFIG_WARNINGS` options, allowing to disable warnings from :ref:" "`sys-path-init`." msgstr "" -#: ../NEWS:3519 +#: ../NEWS:3711 msgid "" ":gh:`145273`: A warning is now shown during :ref:`sys-path-init` if it can't " "find a valid standard library." msgstr "" -#: ../NEWS:3522 +#: ../NEWS:3714 msgid "" ":gh:`145241`: Specialized the parser error for when ``with`` items are " "followed by a trailing comma (for example, ``with item,:``), raising a " @@ -6023,36 +6326,36 @@ msgid "" "Sławecki." msgstr "" -#: ../NEWS:3527 +#: ../NEWS:3719 msgid "" ":gh:`130555`: Fix use-after-free in :meth:`dict.clear` when the dictionary " "values are embedded in an object and a destructor causes re-entrant mutation " "of the dictionary." msgstr "" -#: ../NEWS:3531 +#: ../NEWS:3723 msgid "" ":gh:`145197`: Fix JIT trace crash when recording function from cleared " "generator frame." msgstr "" -#: ../NEWS:3534 +#: ../NEWS:3726 msgid "" ":gh:`145187`: Fix compiler assertion fail when a type parameter bound " "contains an invalid expression in a conditional block." msgstr "" -#: ../NEWS:3537 +#: ../NEWS:3729 msgid "" ":gh:`145142`: Fix a crash in the free-threaded build when the dictionary " "argument to :meth:`str.maketrans` is concurrently modified." msgstr "" -#: ../NEWS:3540 +#: ../NEWS:3732 msgid ":gh:`145118`: :meth:`str.maketrans` now accepts :class:`frozendict`." msgstr "" -#: ../NEWS:3542 +#: ../NEWS:3734 msgid "" ":gh:`144015`: Speed up :meth:`bytes.hex`, :meth:`bytearray.hex`, :func:" "`binascii.hexlify`, and :mod:`hashlib` ``.hexdigest()`` operations with SIMD " @@ -6062,70 +6365,70 @@ msgid "" "for larger data." msgstr "" -#: ../NEWS:3549 +#: ../NEWS:3741 msgid "" ":gh:`145118`: :func:`type` now accepts :class:`frozendict` as an argument." msgstr "" -#: ../NEWS:3551 +#: ../NEWS:3743 msgid "" ":gh:`145064`: Fix JIT optimizer assertion failure during " "``CALL_ALLOC_AND_ENTER_INIT`` side exit." msgstr "" -#: ../NEWS:3554 +#: ../NEWS:3746 msgid "" ":gh:`145055`: :func:`exec` and :func:`eval` now accept :class:`frozendict` " "for *globals*. Patch by Victor Stinner." msgstr "" -#: ../NEWS:3557 +#: ../NEWS:3749 msgid "" ":gh:`145058`: Fix a crash when :func:`!__lazy_import__` is passed a non-" "string argument, by raising an :exc:`TypeError` instead." msgstr "" -#: ../NEWS:3560 +#: ../NEWS:3752 msgid "" ":gh:`144995`: Optimize :class:`memoryview` comparison: a :class:`memoryview` " "is equal to itself, there is no need to compare values. Patch by Victor " "Stinner." msgstr "" -#: ../NEWS:3564 +#: ../NEWS:3756 msgid "" ":gh:`141510`: Update specializer to support frozendict. Patch by Donghee Na." msgstr "" -#: ../NEWS:3566 +#: ../NEWS:3758 msgid "" ":gh:`141510`: Optimize :meth:`!frozendict.fromkeys` to avoid unnecessary " "thread-safety operations in frozendict cases. Patch by Donghee Na." msgstr "" -#: ../NEWS:3569 +#: ../NEWS:3761 msgid "" ":gh:`100239`: Speedup ``BINARY_OP_EXTEND`` for exact floats and medium-size " "integers by up to 15%. Patch by Chris Eibl." msgstr "" -#: ../NEWS:3572 +#: ../NEWS:3764 msgid "" ":gh:`144914`: Use ``mimalloc`` for raw memory allocations such as via :c:" "func:`PyMem_RawMalloc` for better performance on :term:`free-threaded builds " "`. Patch by Kumar Aditya." msgstr "" -#: ../NEWS:3576 +#: ../NEWS:3768 msgid ":gh:`144872`: Fix heap buffer overflow in the parser found by OSS-Fuzz." msgstr "" -#: ../NEWS:3578 +#: ../NEWS:3770 msgid "" ":gh:`144766`: Fix a crash in fork child process when perf support is enabled." msgstr "" -#: ../NEWS:3580 +#: ../NEWS:3772 msgid "" ":gh:`144759`: Fix undefined behavior in the lexer when ``start`` and " "``multi_line_start`` pointers are ``NULL`` in " @@ -6134,84 +6437,84 @@ msgid "" "(``NULL - valid_pointer``) is now guarded with explicit ``NULL`` checks." msgstr "" -#: ../NEWS:3586 +#: ../NEWS:3778 msgid "" ":gh:`141510`: Add built-in :class:`frozendict` type. Patch by Victor Stinner." msgstr "" -#: ../NEWS:3588 +#: ../NEWS:3780 msgid "" ":gh:`144681`: Fix a JIT assertion failure when a conditional branch jumps to " "the same target as the fallthrough path." msgstr "" -#: ../NEWS:3591 +#: ../NEWS:3783 msgid "" ":gh:`143300`: Add :c:func:`PyUnstable_SetImmortal` C-API function to mark " "objects as :term:`immortal`." msgstr "" -#: ../NEWS:3594 +#: ../NEWS:3786 msgid "" ":gh:`144702`: Clarify the error message raised when a class pattern is used " "to match on a non-class object." msgstr "" -#: ../NEWS:3597 +#: ../NEWS:3789 msgid "" ":gh:`144569`: Optimize ``BINARY_SLICE`` for list, tuple, and unicode by " "avoiding temporary ``slice`` object creation." msgstr "" -#: ../NEWS:3600 +#: ../NEWS:3792 msgid "" ":gh:`144438`: Align the QSBR thread state array to a 64-byte cache line " "boundary to avoid false sharing in the :term:`free-threaded build`." msgstr "" -#: ../NEWS:3603 +#: ../NEWS:3795 msgid "" ":gh:`142349`: Implement :pep:`810`. Patch by Pablo Galindo and Dino Viehland." msgstr "" -#: ../NEWS:3605 +#: ../NEWS:3797 msgid "" ":gh:`141226`: Deprecate :pep:`456` support for providing an external " "definition of the string hashing scheme. Removal is scheduled for Python " "3.19. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:3609 +#: ../NEWS:3801 msgid "" ":gh:`138912`: Improve :opcode:`MATCH_CLASS` performance by up to 52% in " "certain cases. Patch by Marc Mueller." msgstr "" -#: ../NEWS:3612 +#: ../NEWS:3804 msgid "" ":gh:`130327`: Fix erroneous clearing of an object's :attr:`~object.__dict__` " "if overwritten at runtime." msgstr "" -#: ../NEWS:3615 +#: ../NEWS:3807 msgid "" ":gh:`80667`: Literals using the ``\\N{name}`` escape syntax can now " "construct CJK ideographs and Hangul syllables using case-insensitive names." msgstr "" -#: ../NEWS:3621 +#: ../NEWS:3813 msgid "" ":gh:`142417`: Restore private provisional ``_Py_InitializeMain()`` function " "removed in Python 3.14. Patch by Victor Stinner." msgstr "" -#: ../NEWS:3624 +#: ../NEWS:3816 msgid "" ":gh:`144748`: :c:func:`PyErr_CheckSignals` now raises the exception " "scheduled by :c:func:`PyThreadState_SetAsyncExc`, if any." msgstr "" -#: ../NEWS:3627 +#: ../NEWS:3819 msgid "" ":gh:`144981`: Made :c:func:`PyUnstable_Code_SetExtra`, :c:func:" "`PyUnstable_Code_GetExtra`, and :c:func:" @@ -6219,48 +6522,48 @@ msgid "" "threaded ` build." msgstr "" -#: ../NEWS:3632 +#: ../NEWS:3824 msgid "" ":gh:`141510`: Add the following functions for the new :class:`frozendict` " "type:" msgstr "" -#: ../NEWS:3635 +#: ../NEWS:3827 msgid ":c:func:`PyAnyDict_Check`" msgstr "" -#: ../NEWS:3636 +#: ../NEWS:3828 msgid ":c:func:`PyAnyDict_CheckExact`" msgstr "" -#: ../NEWS:3637 +#: ../NEWS:3829 msgid ":c:func:`PyFrozenDict_Check`" msgstr "" -#: ../NEWS:3638 +#: ../NEWS:3830 msgid ":c:func:`PyFrozenDict_CheckExact`" msgstr "" -#: ../NEWS:3639 +#: ../NEWS:3831 msgid ":c:func:`PyFrozenDict_New`" msgstr "" -#: ../NEWS:3641 ../NEWS:8052 ../NEWS:9964 ../NEWS:10528 ../NEWS:11318 -#: ../NEWS:14098 ../NEWS:14108 ../NEWS:14179 ../NEWS:14193 ../NEWS:14223 -#: ../NEWS:15036 ../NEWS:15045 ../NEWS:16560 ../NEWS:18019 ../NEWS:20495 -#: ../NEWS:20523 ../NEWS:20534 ../NEWS:25785 ../NEWS:29517 ../NEWS:29545 -#: ../NEWS:30325 ../NEWS:31454 ../NEWS:32600 ../NEWS:32656 +#: ../NEWS:3833 ../NEWS:8244 ../NEWS:10156 ../NEWS:10720 ../NEWS:11510 +#: ../NEWS:14290 ../NEWS:14300 ../NEWS:14371 ../NEWS:14385 ../NEWS:14415 +#: ../NEWS:15228 ../NEWS:15237 ../NEWS:16752 ../NEWS:18211 ../NEWS:20687 +#: ../NEWS:20715 ../NEWS:20726 ../NEWS:25977 ../NEWS:29709 ../NEWS:29737 +#: ../NEWS:30517 ../NEWS:31646 ../NEWS:32792 ../NEWS:32848 msgid "Patch by Victor Stinner." msgstr "" -#: ../NEWS:3643 +#: ../NEWS:3835 msgid "" ":gh:`121617`: ``Python.h`` now also includes ```` in the limited C " "API version 3.11 and newer to fix the :c:macro:`Py_CLEAR` macro which uses " "``memcpy()``. Patch by Victor Stinner." msgstr "" -#: ../NEWS:3647 +#: ../NEWS:3839 msgid "" ":gh:`144175`: Add :c:func:`PyArg_ParseArray` and :c:func:" "`PyArg_ParseArrayAndKeywords` functions to parse arguments of functions " @@ -6268,62 +6571,62 @@ msgid "" "Stinner." msgstr "" -#: ../NEWS:3655 +#: ../NEWS:3847 msgid "" ":gh:`144533`: Use wasmtime's ``--argv0`` to auto-discover sysconfig in WASI " "builds" msgstr "" -#: ../NEWS:3658 +#: ../NEWS:3850 msgid "" ":gh:`145110`: Fix targets \"Clean\" and \"CLeanAll\" in case of PGO builds " "on Windows. Patch by Chris Eibl." msgstr "" -#: ../NEWS:3661 +#: ../NEWS:3853 msgid "" ":gh:`144679`: When building with Visual Studio 2026 (Version 18), use " "PlatformToolSet v145 by default. Patch by Chris Eibl." msgstr "" -#: ../NEWS:3664 +#: ../NEWS:3856 msgid ":gh:`144675`: Update to WASI SDK 30." msgstr "" -#: ../NEWS:3666 +#: ../NEWS:3858 msgid "" ":gh:`136677`: Introduce executable specific linker flags to ``./configure``." msgstr "" -#: ../NEWS:3670 +#: ../NEWS:3862 msgid "Python 3.15.0 alpha 6" msgstr "" -#: ../NEWS:3672 +#: ../NEWS:3864 msgid "*Release date: 2026-02-11*" msgstr "" -#: ../NEWS:3677 +#: ../NEWS:3869 msgid "" ":gh:`144648`: Allowed _remote_debugging to build on more OS versions by " "using proc_listpids() rather than proc_listallpids()." msgstr "" -#: ../NEWS:3680 +#: ../NEWS:3872 msgid ":gh:`124111`: Update macOS installer to use Tcl/Tk 9.0.3." msgstr "" -#: ../NEWS:3682 +#: ../NEWS:3874 msgid ":gh:`144551`: Update macOS installer to use OpenSSL 3.5.5." msgstr "" -#: ../NEWS:3687 +#: ../NEWS:3879 msgid "" ":gh:`80620`: Support negative timestamps in :func:`time.gmtime`, :func:`time." "localtime`, and various :mod:`datetime` functions." msgstr "" -#: ../NEWS:3693 +#: ../NEWS:3885 msgid "" ":gh:`144415`: The Android testbed now distinguishes between stdout/stderr " "messages which were triggered by a newline, and those triggered by a manual " @@ -6331,14 +6634,14 @@ msgid "" "content." msgstr "" -#: ../NEWS:3698 +#: ../NEWS:3890 msgid "" ":gh:`65784`: Add support for parametrized resource ``wantobjects`` in " "regrtests, which allows to run Tkinter tests with the specified value of :" "data:`!tkinter.wantobjects`, for example ``-u wantobjects=0``." msgstr "" -#: ../NEWS:3705 +#: ../NEWS:3897 msgid "" ":gh:`144125`: :mod:`~email.generator.BytesGenerator` will now refuse to " "serialize (write) headers that are unsafely folded or delimited; see :attr:" @@ -6346,7 +6649,7 @@ msgid "" "Bloemsaat and Petr Viktorin in :gh:`121650`)." msgstr "" -#: ../NEWS:3710 +#: ../NEWS:3902 msgid "" ":gh:`143935`: Fixed a bug in the folding of comments when flattening an " "email message using a modern email policy. Comments consisting of a very " @@ -6356,36 +6659,36 @@ msgid "" "enabled header injection with carefully crafted inputs." msgstr "" -#: ../NEWS:3717 +#: ../NEWS:3909 msgid ":gh:`143925`: Reject control characters in ``data:`` URL media types." msgstr "" -#: ../NEWS:3719 +#: ../NEWS:3911 msgid ":gh:`143923`: Reject control characters in POP3 commands." msgstr "" -#: ../NEWS:3721 +#: ../NEWS:3913 msgid ":gh:`143921`: Reject control characters in IMAP commands." msgstr "" -#: ../NEWS:3723 +#: ../NEWS:3915 msgid "" ":gh:`143919`: Reject control characters in :class:`http.cookies.Morsel` " "fields and values." msgstr "" -#: ../NEWS:3726 +#: ../NEWS:3918 msgid "" ":gh:`143916`: Reject C0 control characters within wsgiref.headers.Headers " "fields, values, and parameters." msgstr "" -#: ../NEWS:3732 +#: ../NEWS:3924 msgid "" ":gh:`144538`: Bump the version of pip bundled in ensurepip to version 26.0.1" msgstr "" -#: ../NEWS:3734 +#: ../NEWS:3926 msgid "" ":gh:`144493`: Improve an exception error message in ``_overlapped." "BindLocal()`` that is raised when :meth:`asyncio.loop.sock_connect` is " @@ -6393,7 +6696,7 @@ msgid "" "invalid address family." msgstr "" -#: ../NEWS:3740 +#: ../NEWS:3932 msgid "" ":gh:`144386`: Add support for arbitrary descriptors :meth:`!__enter__`, :" "meth:`!__exit__`, :meth:`!__aenter__`, and :meth:`!__aexit__` in :class:" @@ -6401,20 +6704,20 @@ msgid "" "consistency with the :keyword:`with` and :keyword:`async with` statements." msgstr "" -#: ../NEWS:3745 +#: ../NEWS:3937 msgid "" ":gh:`123471`: Make concurrent iteration over :class:`itertools." "combinations_with_replacement` and :class:`itertools.permutations` safe " "under free-threading." msgstr "" -#: ../NEWS:3749 +#: ../NEWS:3941 msgid "" ":gh:`74453`: Deprecate :func:`os.path.commonprefix` in favor of :func:`os." "path.commonpath` for path segment prefixes." msgstr "" -#: ../NEWS:3752 +#: ../NEWS:3944 msgid "" "The :func:`os.path.commonprefix` function is being deprecated due to having " "a misleading name and module. The function is not safe to use for path " @@ -6423,106 +6726,106 @@ msgid "" "Python programs by using this function." msgstr "" -#: ../NEWS:3758 +#: ../NEWS:3950 msgid "" ":gh:`144380`: Improve performance of :class:`io.BufferedReader` line " "iteration by ~49%." msgstr "" -#: ../NEWS:3761 +#: ../NEWS:3953 msgid "" ":gh:`144363`: Update bundled `libexpat `_ to " "2.7.4" msgstr "" -#: ../NEWS:3764 +#: ../NEWS:3956 msgid "" ":gh:`140824`: When :mod:`faulthandler` dumps the list of third-party " "extension modules, ignore sub-modules of stdlib packages. Patch by Victor " "Stinner." msgstr "" -#: ../NEWS:3768 +#: ../NEWS:3960 msgid "" ":gh:`144206`: Improve error messages for buffer overflow in :func:`fcntl." "fcntl` and :func:`fcntl.ioctl`." msgstr "" -#: ../NEWS:3771 +#: ../NEWS:3963 msgid "" ":gh:`144264`: Speed up Base64 decoding of data containing ignored characters " "(both in non-strict mode and with an explicit *ignorechars* argument). It is " "now up to 2 times faster for multiline Base64 data." msgstr "" -#: ../NEWS:3775 +#: ../NEWS:3967 msgid "" ":gh:`144249`: Add filename context to :exc:`OSError` exceptions raised by :" "func:`ssl.SSLContext.load_cert_chain`, allowing users to have more context." msgstr "" -#: ../NEWS:3779 +#: ../NEWS:3971 msgid "" ":gh:`132888`: Fix incorrect use of :func:`ctypes.GetLastError` and add " "missing error checks for Windows API calls in :mod:`!_pyrepl." "windows_console`." msgstr "" -#: ../NEWS:3783 +#: ../NEWS:3975 msgid ":gh:`142956`: Updated :mod:`tomllib` to parse TOML 1.1.0." msgstr "" -#: ../NEWS:3785 +#: ../NEWS:3977 msgid "" ":gh:`144217`: :mod:`mimetypes`: Add support for DICOM files (for medical " "imaging) with the official MIME type ``application/dicom``. Patch by " "Benedikt Johannes." msgstr "" -#: ../NEWS:3789 +#: ../NEWS:3981 msgid "" ":gh:`144212`: Mime type ``image/jxl`` is now supported by :mod:`mimetypes`." msgstr "" -#: ../NEWS:3791 +#: ../NEWS:3983 msgid "" ":gh:`143594`: Add :meth:`symtable.Function.get_cells` and :meth:`symtable." "Symbol.is_cell` methods." msgstr "" -#: ../NEWS:3794 +#: ../NEWS:3986 msgid "" ":gh:`144169`: Fix three crashes when non-string keyword arguments are " "supplied to objects in the :mod:`ast` module." msgstr "" -#: ../NEWS:3797 +#: ../NEWS:3989 msgid "" ":gh:`144128`: Fix a crash in :meth:`array.array.fromlist` when an element's :" "meth:`~object.__index__` method mutates the input list during conversion." msgstr "" -#: ../NEWS:3800 +#: ../NEWS:3992 msgid "" ":gh:`144100`: Fixed a crash in ctypes when using a deprecated " "``POINTER(str)`` type in ``argtypes``. Instead of aborting, ctypes now " "raises a proper Python exception when the pointer target type is unresolved." msgstr "" -#: ../NEWS:3805 +#: ../NEWS:3997 msgid "" ":gh:`143658`: :mod:`importlib.metadata`: Use :meth:`str.lower` and :meth:" "`str.replace` to further improve performance of :meth:`!importlib.metadata." "Prepared.normalize`. Patch by Hugo van Kemenade and Henry Schreiner." msgstr "" -#: ../NEWS:3810 +#: ../NEWS:4002 msgid "" ":gh:`144050`: Fix :func:`stat.filemode` in the pure-Python implementation to " "avoid misclassifying invalid mode values as block devices." msgstr "" -#: ../NEWS:3813 +#: ../NEWS:4005 msgid "" ":gh:`83069`: :meth:`subprocess.Popen.wait`: when ``timeout`` is not " "``None``, an efficient event-driven mechanism now waits for process " @@ -6534,7 +6837,7 @@ msgid "" "blocking call and short sleeps). Patch by Giampaolo Rodola." msgstr "" -#: ../NEWS:3822 +#: ../NEWS:4014 msgid "" ":gh:`144030`: The Python implementation of :func:`functools.lru_cache` " "differed from the default C implementation in that it did not check that its " @@ -6542,69 +6845,69 @@ msgid "" "`TypeError`." msgstr "" -#: ../NEWS:3827 +#: ../NEWS:4019 msgid "" ":gh:`144001`: Added the *ignorechars* parameter in :func:`binascii." "a2b_base64` and :func:`base64.b64decode`." msgstr "" -#: ../NEWS:3830 +#: ../NEWS:4022 msgid "" ":gh:`144023`: Fixed validation of file descriptor 0 in posix functions when " "used with follow_symlinks parameter." msgstr "" -#: ../NEWS:3833 +#: ../NEWS:4025 msgid "" ":gh:`143999`: Fix an issue where :func:`inspect.getgeneratorstate` and :func:" "`inspect.getcoroutinestate` could fail for generators wrapped by :func:" "`types.coroutine` in the suspended state." msgstr "" -#: ../NEWS:3837 +#: ../NEWS:4029 msgid "" ":gh:`143952`: Fixed :mod:`asyncio` debugging tools to work with new remote " "debugging API. Patch by Bartosz Sławecki." msgstr "" -#: ../NEWS:3840 +#: ../NEWS:4032 msgid "" ":gh:`143904`: :func:`struct.pack_into` now raises OverflowError instead of " "IndexError for too large *offset* argument." msgstr "" -#: ../NEWS:3843 +#: ../NEWS:4035 msgid "" ":gh:`143897`: Remove the :meth:`!isxidstart` and :meth:`!isxidcontinue` " "methods of :data:`unicodedata.ucd_3_2_0`. They are now only exposed as :func:" "`unicodedata.isxidstart` and :func:`unicodedata.isxidcontinue`." msgstr "" -#: ../NEWS:3847 +#: ../NEWS:4039 msgid "" ":gh:`143831`: :class:`annotationlib.ForwardRef` objects are now hashable " "when created from annotation scopes with closures. Previously, hashing such " "objects would throw an exception. Patch by Bartosz Sławecki." msgstr "" -#: ../NEWS:3851 +#: ../NEWS:4043 msgid "" ":gh:`143874`: Fixed a bug in :mod:`pdb` where expression results were not " "sent back to remote client." msgstr "" -#: ../NEWS:3854 +#: ../NEWS:4046 msgid "" ":gh:`143754`: Add new :mod:`tkinter` widget methods :meth:`!pack_content`, :" "meth:`!place_content` and :meth:`!grid_content` which are alternative " "spelling of old :meth:`!*_slaves` methods." msgstr "" -#: ../NEWS:3858 +#: ../NEWS:4050 msgid ":gh:`143756`: Fix potential thread safety issues in :mod:`ssl` module." msgstr "" -#: ../NEWS:3860 +#: ../NEWS:4052 msgid "" ":gh:`132604`: Previously, :class:`~typing.Protocol` classes that were not " "decorated with :deco:`~typing.runtime_checkable`, but that inherited from " @@ -6614,70 +6917,70 @@ msgid "" "Patch by Bartosz Sławecki." msgstr "" -#: ../NEWS:3867 +#: ../NEWS:4059 msgid "" ":gh:`143543`: Fix a crash in itertools.groupby that could occur when a user-" "defined :meth:`~object.__eq__` method re-enters the iterator during key " "comparison." msgstr "" -#: ../NEWS:3871 +#: ../NEWS:4063 msgid "" ":gh:`143689`: Fix :meth:`io.BufferedReader.read1` state cleanup on buffer " "allocation failure." msgstr "" -#: ../NEWS:3874 +#: ../NEWS:4066 msgid "" ":gh:`143602`: Fix a inconsistency issue in :meth:`~io.RawIOBase.write` that " "leads to unexpected buffer overwrite by deduplicating the buffer exports." msgstr "" -#: ../NEWS:3877 +#: ../NEWS:4069 msgid "" ":gh:`142434`: Use ``ppoll()`` if available in :func:`select.poll` to have a " "timeout resolution of 1 nanosecond, instead of a resolution of 1 ms. Patch " "by Victor Stinner." msgstr "" -#: ../NEWS:3881 +#: ../NEWS:4073 msgid "" ":gh:`140557`: :class:`array.array` buffers now have the same alignment when " "empty as when allocated. Unaligned buffers can still be created by slicing." msgstr "" -#: ../NEWS:3885 +#: ../NEWS:4077 msgid "" ":gh:`143423`: Fix free-threaded build detection in the sampling profiler " "when Py_GIL_DISABLED is set to 0." msgstr "" -#: ../NEWS:3888 +#: ../NEWS:4080 msgid "" ":gh:`101178`: Add Ascii85, Base85, and Z85 support to :mod:`binascii` and " "improve the performance of the base-85 converters in :mod:`base64`." msgstr "" -#: ../NEWS:3891 +#: ../NEWS:4083 msgid "" ":gh:`142966`: Fix :func:`!ctypes.POINTER.set_type` not updating the format " "string to match the type." msgstr "" -#: ../NEWS:3894 +#: ../NEWS:4086 msgid "" ":gh:`142555`: :mod:`array`: fix a crash in ``a[i] = v`` when converting *i* " "to an index via :meth:`i.__index__ ` or :meth:`i.__float__ " "` mutates the array." msgstr "" -#: ../NEWS:3898 +#: ../NEWS:4090 msgid "" ":gh:`142438`: Fix _decimal builds configured with EXTRA_FUNCTIONALITY by " "correcting the Context.apply wrapper to pass the right argument." msgstr "" -#: ../NEWS:3901 +#: ../NEWS:4093 msgid "" ":gh:`141860`: Add an ``on_error`` keyword-only parameter to :func:" "`multiprocessing.set_forkserver_preload` to control how import failures " @@ -6686,7 +6989,7 @@ msgid "" "exception). Contributed by Nick Neumann and Gregory P. Smith." msgstr "" -#: ../NEWS:3907 +#: ../NEWS:4099 msgid "" ":gh:`125346`: Accepting ``+`` and ``/`` characters with an alternative " "alphabet in :func:`base64.b64decode` and :func:`base64.urlsafe_b64decode` is " @@ -6694,12 +6997,12 @@ msgid "" "mode and discarded in the non-strict mode." msgstr "" -#: ../NEWS:3912 +#: ../NEWS:4104 msgid "" ":gh:`140715`: Add ``'%F'`` support to :meth:`~datetime.datetime.strptime`." msgstr "" -#: ../NEWS:3914 +#: ../NEWS:4106 msgid "" ":gh:`67041`: Add the *missing_as_none* parameter to :func:`~urllib.parse." "urlparse`, :func:`~urllib.parse.urlsplit` and :func:`~urllib.parse." @@ -6709,24 +7012,24 @@ msgid "" "components." msgstr "" -#: ../NEWS:3921 +#: ../NEWS:4113 msgid "" ":gh:`77188`: The :mod:`pickle` module now properly handles name-mangled " "private methods." msgstr "" -#: ../NEWS:3927 +#: ../NEWS:4119 msgid "" ":gh:`143774`: Better explain the operation of Format / Format Paragraph." msgstr "" -#: ../NEWS:3932 +#: ../NEWS:4124 msgid "" ":gh:`134584`: Optimize and eliminate ref-counting in " "``_BINARY_OP_SUBSCR_LIST_SLICE``" msgstr "" -#: ../NEWS:3935 +#: ../NEWS:4127 msgid "" ":gh:`144563`: Fix interaction of the Tachyon profiler and :mod:`ctypes` and " "other modules that load the Python shared library (if present) in an " @@ -6734,41 +7037,41 @@ msgid "" "information to be confused. Patch by Pablo Galindo" msgstr "" -#: ../NEWS:3940 +#: ../NEWS:4132 msgid "" ":gh:`144601`: Fix crash when importing a module whose ``PyInit`` function " "raises an exception from a subinterpreter." msgstr "" -#: ../NEWS:3943 +#: ../NEWS:4135 msgid "" ":gh:`144549`: Fix building the tail calling interpreter on Visual Studio " "2026 with free-threading." msgstr "" -#: ../NEWS:3946 +#: ../NEWS:4138 msgid "" ":gh:`144513`: Fix potential deadlock when using critical sections during " "stop-the-world pauses in the free-threaded build." msgstr "" -#: ../NEWS:3949 +#: ../NEWS:4141 msgid ":gh:`131798`: Optimise ``_GUARD_TOS_SLICE`` in the JIT." msgstr "" -#: ../NEWS:3951 +#: ../NEWS:4143 msgid "" ":gh:`144330`: Move ``classmethod`` and ``staticmethod`` initialization from " "``__init__()`` to ``__new__()``. Patch by Victor Stinner." msgstr "" -#: ../NEWS:3954 +#: ../NEWS:4146 msgid "" ":gh:`144446`: Fix data races in the free-threaded build when reading frame " "object attributes while another thread is executing the frame." msgstr "" -#: ../NEWS:3957 +#: ../NEWS:4149 msgid "" ":gh:`120321`: Add ``gi_state``, ``cr_state``, and ``ag_state`` attributes to " "generators, coroutines, and async generators that return the current state " @@ -6777,123 +7080,123 @@ msgid "" "func:`~inspect.getasyncgenstate` now return these attributes directly." msgstr "" -#: ../NEWS:3964 +#: ../NEWS:4156 msgid ":gh:`141563`: Fix thread safety of :c:macro:`! PyDateTime_IMPORT`." msgstr "" -#: ../NEWS:3966 +#: ../NEWS:4158 msgid "" ":gh:`144280`: Fix a bug in JIT where the predicate symbol had no truthiness" msgstr "" -#: ../NEWS:3968 +#: ../NEWS:4160 msgid "" ":gh:`140550`: In :c:member:`PyModuleDef.m_slots`, allow slots that repeat " "information present in :c:type:`PyModuleDef`." msgstr "" -#: ../NEWS:3971 +#: ../NEWS:4163 msgid "" ":gh:`139103`: Improve scaling of :func:`~collections.namedtuple` " "instantiation in the free-threaded build." msgstr "" -#: ../NEWS:3974 +#: ../NEWS:4166 msgid "" ":gh:`144307`: Prevent a reference leak in module teardown at interpreter " "finalization." msgstr "" -#: ../NEWS:3977 +#: ../NEWS:4169 msgid "" ":gh:`144319`: Add huge pages support for the pymalloc allocator. Patch by " "Pablo Galindo" msgstr "" -#: ../NEWS:3980 +#: ../NEWS:4172 msgid "" ":gh:`120321`: Made ``gi_yieldfrom`` thread-safe in the free-threading build " "by using a lightweight lock on the frame state." msgstr "" -#: ../NEWS:3983 +#: ../NEWS:4175 msgid "" ":gh:`144194`: Fix error handling in perf jitdump initialization on memory " "allocation failure." msgstr "" -#: ../NEWS:3986 +#: ../NEWS:4178 msgid "" ":gh:`143962`: Name suggestion for not normalized name suggests now the " "normalized name or the closest name to the normalized name. If the suggested " "name is not ASCII, include also its ASCII representation." msgstr "" -#: ../NEWS:3990 +#: ../NEWS:4182 msgid "" ":gh:`144157`: :meth:`bytes.translate` now allows the compiler to unroll its " "loop more usefully for a 2x speedup in the common no-deletions specified " "case." msgstr "" -#: ../NEWS:3994 +#: ../NEWS:4186 msgid "" ":gh:`144068`: Fix JIT tracer memory leak, ensure the JIT tracer state is " "freed when daemon threads are cleaned up during interpreter shutdown." msgstr "" -#: ../NEWS:3997 +#: ../NEWS:4189 msgid "" ":gh:`144012`: Check if the result is ``NULL`` in ``BINARY_OP_EXTENT`` opcode." msgstr "" -#: ../NEWS:3999 +#: ../NEWS:4191 msgid "" ":gh:`144007`: Eliminate redundant refcounting in the JIT for ``BINARY_OP``." msgstr "" -#: ../NEWS:4001 +#: ../NEWS:4193 msgid "" ":gh:`144005`: Eliminate redundant refcounting from ``BINARY_OP_EXTEND``." msgstr "" -#: ../NEWS:4003 +#: ../NEWS:4195 msgid "" ":gh:`143939`: Fix erroneous \"cannot reuse already awaited coroutine\" error " "that could occur when a generator was run during the process of clearing a " "coroutine's frame." msgstr "" -#: ../NEWS:4007 +#: ../NEWS:4199 msgid "" ":gh:`141805`: Fix crash in :class:`set` when objects with the same hash are " "concurrently added to the set after removing an element with the same hash " "while the set still contains elements with the same hash." msgstr "" -#: ../NEWS:4011 +#: ../NEWS:4203 msgid ":gh:`143670`: Fixes a crash in ``ga_repr_items_list`` function." msgstr "" -#: ../NEWS:4013 +#: ../NEWS:4205 msgid "" ":gh:`143650`: Fix race condition in :mod:`importlib` where a thread could " "receive a stale module reference when another thread's import fails." msgstr "" -#: ../NEWS:4016 +#: ../NEWS:4208 msgid "" ":gh:`143569`: Generator expressions in 3.15 now conform to the documented " "behavior when the iterable does not support iteration. This matches the " "behavior in 3.14 and earlier" msgstr "" -#: ../NEWS:4020 +#: ../NEWS:4212 msgid "" ":gh:`143192`: Improve performance of bitwise operations on multi-digit ints." msgstr "" -#: ../NEWS:4022 +#: ../NEWS:4214 msgid "" ":gh:`132657`: If we are specializing to ``LOAD_GLOBAL_MODULE`` or " "``LOAD_ATTR_MODULE``, try to enable deferred reference counting for the " @@ -6903,13 +7206,13 @@ msgid "" "will be deallocated by the GC, rather than by :c:func:`Py_DECREF`." msgstr "" -#: ../NEWS:4029 +#: ../NEWS:4221 msgid "" ":gh:`143055`: Implement :pep:`798` (Unpacking in Comprehensions). Patch by " "Adam Hartz." msgstr "" -#: ../NEWS:4032 +#: ../NEWS:4224 msgid "" ":gh:`142037`: Improve error messages for printf-style formatting. For errors " "in the format string, always include the position of the start of the format " @@ -6919,25 +7222,25 @@ msgid "" "error)." msgstr "" -#: ../NEWS:4039 +#: ../NEWS:4231 msgid "" ":gh:`140557`: :class:`bytearray` buffers now have the same alignment when " "empty as when allocated. Unaligned buffers can still be created by slicing." msgstr "" -#: ../NEWS:4043 +#: ../NEWS:4235 msgid "" ":gh:`140232`: Frozenset objects with immutable elements are no longer " "tracked by the garbage collector." msgstr "" -#: ../NEWS:4046 +#: ../NEWS:4238 msgid "" ":gh:`115231`: Setup ``__module__`` attribute for built-in static methods. " "Patch by Sergey B Kirpichev." msgstr "" -#: ../NEWS:4052 +#: ../NEWS:4244 msgid "" ":gh:`143869`: Added :c:func:`PyLong_GetNativeLayout`, :c:struct:" "`PyLongLayout`, :c:struct:`PyLongExport`, :c:func:`PyLong_Export`, :c:func:" @@ -6946,25 +7249,25 @@ msgid "" "`PyLongWriter_Discard` to the limited API." msgstr "" -#: ../NEWS:4059 +#: ../NEWS:4251 msgid "" ":gh:`141070`: Renamed :c:func:`!PyUnstable_Object_Dump` to :c:func:" "`PyObject_Dump`." msgstr "" -#: ../NEWS:4065 +#: ../NEWS:4257 msgid "" ":gh:`140421`: Disable the perf trampoline on older macOS versions where it " "cannot be built." msgstr "" -#: ../NEWS:4068 +#: ../NEWS:4260 msgid "" ":gh:`144309`: Build Python with POSIX 2024, instead of POSIX 2008. Patch by " "Victor Stinner." msgstr "" -#: ../NEWS:4071 +#: ../NEWS:4263 msgid "" ":gh:`144278`: Enables defining the ``_PY_IMPL_NAME`` and " "``_PY_IMPL_CACHE_TAG`` preprocessor definitions to override :data:`sys." @@ -6973,70 +7276,70 @@ msgid "" "effect of completely disabling automatic creation and use of ``.pyc`` files." msgstr "" -#: ../NEWS:4078 +#: ../NEWS:4270 msgid "" ":gh:`143960`: Add support for OpenSSL 3.6, drop EOL 3.2. Patch by Hugo van " "Kemenade." msgstr "" -#: ../NEWS:4081 +#: ../NEWS:4273 msgid "" ":gh:`143941`: Move WASI-related files to :file:`Platforms/WASI`. Along the " "way, leave a deprecated :file:`Tools/wasm/wasi/__main__.py` behind for " "backwards-compatibility." msgstr "" -#: ../NEWS:4085 +#: ../NEWS:4277 msgid "" ":gh:`143842`: Prevent static builds from clashing with curses by making the " "optimizer COLORS table static." msgstr "" -#: ../NEWS:4090 +#: ../NEWS:4282 msgid "Python 3.15.0 alpha 5" msgstr "" -#: ../NEWS:4092 +#: ../NEWS:4284 msgid "*Release date: 2026-01-14*" msgstr "" -#: ../NEWS:4097 +#: ../NEWS:4289 msgid "" ":gh:`143082`: Fix :mod:`pdb` arrow key history not working when ``stdin`` is " "``sys.stdin``." msgstr "" -#: ../NEWS:4100 +#: ../NEWS:4292 msgid "" ":gh:`128067`: Fix a bug in PyREPL on Windows where output without a trailing " "newline was overwritten by the next prompt." msgstr "" -#: ../NEWS:4106 +#: ../NEWS:4298 msgid "" ":gh:`142095`: Make gdb 'py-bt' command use frame from thread local state " "when available. Patch by Sam Gross and Victor Stinner." msgstr "" -#: ../NEWS:4112 +#: ../NEWS:4304 msgid "" ":gh:`143460`: Skip tests relying on infinite recusion if stack size is " "unlimited." msgstr "" -#: ../NEWS:4115 +#: ../NEWS:4307 msgid "" ":gh:`143553`: Add support for parametrized resources, such as ``-u " "xpickle=2.7``." msgstr "" -#: ../NEWS:4118 +#: ../NEWS:4310 msgid "" ":issue:`31391`: Forward-port test_xpickle from Python 2 to Python 3 and add " "the resource back to test's command line." msgstr "" -#: ../NEWS:4124 +#: ../NEWS:4316 msgid "" ":gh:`143706`: Fix :mod:`multiprocessing` forkserver so that :data:`sys.argv` " "is correctly set before ``__main__`` is preloaded. Previously, :data:`sys." @@ -7045,7 +7348,7 @@ msgid "" "Aaron Wieczorek, test provided by Thomas Watson, thanks!" msgstr "" -#: ../NEWS:4130 +#: ../NEWS:4322 msgid "" ":gh:`143638`: Forbid reentrant calls of the :class:`pickle.Pickler` and :" "class:`pickle.Unpickler` methods for the C implementation. Previously, this " @@ -7053,48 +7356,48 @@ msgid "" "same object raise :exc:`RuntimeError`." msgstr "" -#: ../NEWS:4135 +#: ../NEWS:4327 msgid "" ":gh:`143658`: :mod:`importlib.metadata`: Use :meth:`str.translate` to " "improve performance of :meth:`!importlib.metadata.Prepared.normalize`. Patch " "by Hugo van Kemenade and Henry Schreiner." msgstr "" -#: ../NEWS:4139 +#: ../NEWS:4331 msgid "" ":gh:`78724`: Raise :exc:`RuntimeError`'s when user attempts to call methods " "on half-initialized :class:`~struct.Struct` objects, For example, created by " "``Struct.__new__(Struct)``. Patch by Sergey B Kirpichev." msgstr "" -#: ../NEWS:4143 +#: ../NEWS:4335 msgid "" ":gh:`143196`: Fix crash when the internal encoder object returned by " "undocumented function :func:`!json.encoder.c_make_encoder` was called with " "non-zero second (*_current_indent_level*) argument." msgstr "" -#: ../NEWS:4147 +#: ../NEWS:4339 msgid "" ":gh:`143191`: :func:`_thread.stack_size` now raises :exc:`ValueError` if the " "stack size is too small. Patch by Victor Stinner." msgstr "" -#: ../NEWS:4150 +#: ../NEWS:4342 msgid "" ":gh:`143547`: Fix :func:`sys.unraisablehook` when the hook raises an " "exception and changes :func:`sys.unraisablehook`: hold a strong reference to " "the old hook. Patch by Victor Stinner." msgstr "" -#: ../NEWS:4154 +#: ../NEWS:4346 msgid "" ":gh:`139686`: Revert 0a97941245f1dda6d838f9aaf0512104e5253929 and " "57db12514ac686f0a752ec8fe1c08b6daa0c6219 which made importlib.reload a no-op " "for lazy modules; caused Buildbot failures." msgstr "" -#: ../NEWS:4158 +#: ../NEWS:4350 msgid "" ":gh:`143517`: :func:`annotationlib.get_annotations` no longer raises a :exc:" "`SyntaxError` when evaluating a stringified starred annotation that starts " @@ -7102,99 +7405,99 @@ msgid "" "Sławecki." msgstr "" -#: ../NEWS:4163 +#: ../NEWS:4355 msgid ":gh:`143474`: Add :data:`os.RWF_ATOMIC` constant for Linux 6.11+." msgstr "" -#: ../NEWS:4165 +#: ../NEWS:4357 msgid ":gh:`143445`: Speed up :func:`copy.deepcopy` by 1.04x." msgstr "" -#: ../NEWS:4167 +#: ../NEWS:4359 msgid "" ":gh:`143378`: Fix use-after-free crashes when a :class:`~io.BytesIO` object " "is concurrently mutated during :meth:`~io.RawIOBase.write` or :meth:`~io." "IOBase.writelines`." msgstr "" -#: ../NEWS:4171 +#: ../NEWS:4363 msgid "" ":gh:`143368`: Fix endless retry loop in :mod:`profiling.sampling` blocking " "mode when threads cannot be seized due to ``EPERM``. Such threads are now " "skipped instead of causing repeated error messages. Patch by Pablo Galindo." msgstr "" -#: ../NEWS:4176 +#: ../NEWS:4368 msgid "" ":gh:`143346`: Fix incorrect wrapping of the Base64 data in :class:`!plistlib." "_PlistWriter` when the indent contains a mix of tabs and spaces." msgstr "" -#: ../NEWS:4180 +#: ../NEWS:4372 msgid "" ":gh:`140025`: :mod:`queue`: Fix :meth:`!SimpleQueue.__sizeof__` computation." msgstr "" -#: ../NEWS:4182 +#: ../NEWS:4374 msgid "" ":gh:`143310`: :mod:`tkinter`: fix a crash when a Python :class:`list` is " "mutated during the conversion to a Tcl object (e.g., when setting a Tcl " "variable). Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:4186 +#: ../NEWS:4378 msgid "" ":gh:`143309`: Fix a crash in :func:`os.execve` on non-Windows platforms when " "given a custom environment mapping which is then mutated during parsing. " "Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:4190 +#: ../NEWS:4382 msgid "" ":gh:`143308`: :mod:`pickle`: fix use-after-free crashes when a :class:" "`~pickle.PickleBuffer` is concurrently mutated by a custom buffer callback " "during pickling. Patch by Bénédikt Tran and Aaron Wieczorek." msgstr "" -#: ../NEWS:4194 +#: ../NEWS:4386 msgid "" ":gh:`142939`: Performance optimisations for :func:`difflib.get_close_matches`" msgstr "" -#: ../NEWS:4196 +#: ../NEWS:4388 msgid "" ":gh:`124951`: The base64 implementation behind the :mod:`binascii`, :mod:" "`base64`, and related codec has been optimized for modern pipelined CPU " "architectures and now performs 2-3x faster across all platforms." msgstr "" -#: ../NEWS:4200 +#: ../NEWS:4392 msgid "" ":gh:`143237`: Fix support of named pipes in the rotating :mod:`logging` " "handlers." msgstr "" -#: ../NEWS:4203 +#: ../NEWS:4395 msgid "" ":gh:`143249`: Fix possible buffer leaks in Windows overlapped I/O on error " "handling." msgstr "" -#: ../NEWS:4206 +#: ../NEWS:4398 msgid "" ":gh:`143241`: :mod:`zoneinfo`: fix infinite loop in :meth:`ZoneInfo." "from_file ` when parsing a malformed TZif file. " "Patch by Fatih Celik." msgstr "" -#: ../NEWS:4210 +#: ../NEWS:4402 msgid "" ":gh:`142830`: :mod:`sqlite3`: fix use-after-free crashes when the " "connection's callbacks are mutated during a callback execution. Patch by " "Bénédikt Tran." msgstr "" -#: ../NEWS:4214 +#: ../NEWS:4406 msgid "" ":gh:`143200`: :mod:`xml.etree.ElementTree`: fix use-after-free crashes in :" "meth:`~object.__getitem__` and :meth:`~object.__setitem__` methods of :class:" @@ -7202,50 +7505,50 @@ msgid "" "Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:4219 +#: ../NEWS:4411 msgid "" ":gh:`143214`: Add the *wrapcol* parameter in :func:`binascii.b2a_base64` " "and :func:`base64.b64encode`." msgstr "" -#: ../NEWS:4222 +#: ../NEWS:4414 msgid "" ":gh:`142195`: Updated timeout evaluation logic in :mod:`subprocess` to be " "compatible with deterministic environments like Shadow where time moves " "exactly as requested." msgstr "" -#: ../NEWS:4226 +#: ../NEWS:4418 msgid "" ":gh:`140739`: Fix several crashes due to reading invalid memory in the new " "Tachyon sampling profiler. Patch by Pablo Galindo." msgstr "" -#: ../NEWS:4229 +#: ../NEWS:4421 msgid "" ":gh:`142164`: Fix the ctypes bitfield overflow error message to report the " "correct offset and size calculation." msgstr "" -#: ../NEWS:4232 +#: ../NEWS:4424 msgid "" ":gh:`143145`: Fixed a possible reference leak in ctypes when constructing " "results with multiple output parameters on error." msgstr "" -#: ../NEWS:4235 +#: ../NEWS:4427 msgid "" ":gh:`143103`: Add padding support to :func:`base64.z85encode` via the " "``pad`` parameter." msgstr "" -#: ../NEWS:4238 +#: ../NEWS:4430 msgid "" ":gh:`130796`: Undeprecate the :func:`locale.getdefaultlocale` function. " "Patch by Victor Stinner." msgstr "" -#: ../NEWS:4241 +#: ../NEWS:4433 msgid "" ":gh:`74902`: Add the :func:`~unicodedata.iter_graphemes` function in the :" "mod:`unicodedata` module to iterate over grapheme clusters according to " @@ -7256,43 +7559,43 @@ msgid "" "character which are related to the above algorithm." msgstr "" -#: ../NEWS:4250 +#: ../NEWS:4442 msgid "" ":gh:`143004`: Fix a potential use-after-free in :meth:`collections.Counter." "update` when user code mutates the Counter during an update." msgstr "" -#: ../NEWS:4254 +#: ../NEWS:4446 msgid "" ":gh:`140648`: The :mod:`asyncio` REPL now respects the :option:`-I` flag " "(isolated mode). Previously, it would load and execute :envvar:" "`PYTHONSTARTUP` even if the flag was set. Contributed by Bartosz Sławecki." msgstr "" -#: ../NEWS:4259 +#: ../NEWS:4451 msgid "" ":gh:`142991`: Fixed socket operations such as recvfrom() and sendto() for " "FreeBSD divert(4) socket." msgstr "" -#: ../NEWS:4262 +#: ../NEWS:4454 msgid "" ":gh:`116738`: Make the attributes in :mod:`lzma` thread-safe on the :term:" "`free threaded ` build." msgstr "" -#: ../NEWS:4265 +#: ../NEWS:4457 msgid "" ":gh:`142950`: Fix regression in :mod:`argparse` where format specifiers in " "help strings raised :exc:`ValueError`." msgstr "" -#: ../NEWS:4268 +#: ../NEWS:4460 msgid "" ":gh:`142881`: Fix concurrent and reentrant call of :func:`atexit.unregister`." msgstr "" -#: ../NEWS:4270 +#: ../NEWS:4462 msgid "" ":gh:`142615`: Fix possible crashes when initializing :class:`asyncio.Task` " "or :class:`asyncio.Future` multiple times. These classes can now be " @@ -7300,7 +7603,7 @@ msgid "" "RuntimeError. Patch by Kumar Aditya." msgstr "" -#: ../NEWS:4275 +#: ../NEWS:4467 msgid "" ":gh:`142517`: The non-``compat32`` :mod:`email` policies now correctly " "handle refolding encoded words that contain bytes that can not be decoded in " @@ -7308,7 +7611,7 @@ msgid "" "exception during folding." msgstr "" -#: ../NEWS:4280 +#: ../NEWS:4472 msgid "" ":gh:`138122`: The Tachyon profiler's live TUI now integrates with the " "experimental :mod:`!_colorize` theming system. Users can customize colors " @@ -7317,31 +7620,31 @@ msgid "" "Patch by Pablo Galindo." msgstr "" -#: ../NEWS:4286 +#: ../NEWS:4478 msgid "" ":gh:`142306`: Improve errors for :meth:`Element.remove `." msgstr "" -#: ../NEWS:4289 +#: ../NEWS:4481 msgid "" ":gh:`63016`: Add a ``flags`` parameter to :meth:`mmap.mmap.flush` to control " "synchronization behavior." msgstr "" -#: ../NEWS:4292 +#: ../NEWS:4484 msgid "" ":gh:`139262`: Some keystrokes can be swallowed in the new ``PyREPL`` on " "Windows, especially when used together with the ALT key. Fix by Chris Eibl." msgstr "" -#: ../NEWS:4296 +#: ../NEWS:4488 msgid "" ":gh:`138897`: Improved :data:`license`/:data:`copyright`/:data:`credits` " "display in the :term:`REPL`: now uses a pager." msgstr "" -#: ../NEWS:4299 +#: ../NEWS:4491 msgid "" ":gh:`135852`: Add :func:`!_winapi.RegisterEventSource`, :func:`!_winapi." "DeregisterEventSource` and :func:`!_winapi.ReportEvent`. Using these " @@ -7349,104 +7652,104 @@ msgid "" "pywin32`." msgstr "" -#: ../NEWS:4304 +#: ../NEWS:4496 msgid "" ":gh:`109263`: Starting a process from spawn context in :mod:" "`multiprocessing` no longer sets the start method globally." msgstr "" -#: ../NEWS:4307 +#: ../NEWS:4499 msgid "" ":gh:`132715`: Skip writing objects during marshalling once a failure has " "occurred." msgstr "" -#: ../NEWS:4313 +#: ../NEWS:4505 msgid ":gh:`140806`: Add documentation for :func:`enum.bin`." msgstr "" -#: ../NEWS:4318 +#: ../NEWS:4510 msgid "" ":gh:`134584`: Eliminate redundant refcounting from ``_CONTAINS_OP``, " "``_CONTAINS_OP_SET`` and ``_CONTAINS_OP_DICT``." msgstr "" -#: ../NEWS:4321 +#: ../NEWS:4513 msgid "" ":gh:`143604`: Fix a reference counting issue in the JIT tracer where the " "current executor could be prematurely freed during tracing." msgstr "" -#: ../NEWS:4324 +#: ../NEWS:4516 msgid "" ":gh:`143469`: Enable :opcode:`!LOAD_ATTR_MODULE` specialization even if :" "func:`!__getattr__` is defined in module." msgstr "" -#: ../NEWS:4327 +#: ../NEWS:4519 msgid ":gh:`134584`: Eliminate redundant refcounting from ``TO_BOOL_STR``." msgstr "" -#: ../NEWS:4329 +#: ../NEWS:4521 msgid "" ":gh:`143377`: Fix a crash in :func:`!_interpreters.capture_exception` when " "the exception is incorrectly formatted. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:4332 +#: ../NEWS:4524 msgid "" ":gh:`139757`: Add ``BINARY_OP_SUBSCR_USTR_INT`` to specialize reading an " "ASCII character from any string. Patch by Chris Eibl." msgstr "" -#: ../NEWS:4335 +#: ../NEWS:4527 msgid "" ":gh:`141504`: Factor out tracing and optimization heuristics into a single " "object. Patch by Donghee Na." msgstr "" -#: ../NEWS:4338 +#: ../NEWS:4530 msgid "" ":gh:`142982`: Specialize :opcode:`CALL_FUNCTION_EX` for Python and non-" "Python callables." msgstr "" -#: ../NEWS:4341 +#: ../NEWS:4533 msgid "" ":gh:`136924`: The interactive help mode in the :term:`REPL` no longer " "incorrectly syntax highlights text input as Python code. Contributed by Olga " "Matoula." msgstr "" -#: ../NEWS:4345 +#: ../NEWS:4537 msgid "" ":gh:`139757`: Fix unintended bytecode specialization for non-ascii string. " "Patch by Donghee Na, Ken Jin and Chris Eibl." msgstr "" -#: ../NEWS:4348 +#: ../NEWS:4540 msgid "" ":gh:`143361`: Add ``PY_VECTORCALL_ARGUMENTS_OFFSET`` to " "``_Py_CallBuiltinClass_StackRefSteal`` to avoid redundant allocations" msgstr "" -#: ../NEWS:4351 +#: ../NEWS:4543 msgid "" ":gh:`131798`: The JIT optimizer now understands more generator instructions." msgstr "" -#: ../NEWS:4353 +#: ../NEWS:4545 msgid ":gh:`134584`: Eliminate redundant refcounting from ``_LOAD_ATTR_SLOT``." msgstr "" -#: ../NEWS:4355 +#: ../NEWS:4547 msgid "" ":gh:`143189`: Fix crash when inserting a non-:class:`str` key into a split " "table dictionary when the key matches an existing key in the split table but " "has no corresponding value in the dict." msgstr "" -#: ../NEWS:4359 +#: ../NEWS:4551 msgid "" ":gh:`143228`: Fix use-after-free in perf trampoline when toggling profiling " "while threads are running or during interpreter finalization with daemon " @@ -7455,189 +7758,189 @@ msgid "" "Galindo" msgstr "" -#: ../NEWS:4365 +#: ../NEWS:4557 msgid "" ":gh:`142664`: Fix a use-after-free crash in :meth:`memoryview.__hash__ " "` when the ``__hash__`` method of the referenced object " "mutates that object or the view. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:4369 +#: ../NEWS:4561 msgid "" ":gh:`142557`: Fix a use-after-free crash in :ref:`bytearray.__mod__ ` when the :class:`!bytearray` is mutated while formatting the " "``%``-style arguments. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:4373 +#: ../NEWS:4565 msgid "" ":gh:`143195`: Fix use-after-free crashes in :meth:`bytearray.hex` and :meth:" "`memoryview.hex` when the separator's :meth:`~object.__len__` mutates the " "original object. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:4377 +#: ../NEWS:4569 msgid "" ":gh:`143183`: Fix a bug in the JIT when dealing with unsupported control-" "flow or operations." msgstr "" -#: ../NEWS:4380 +#: ../NEWS:4572 msgid "" ":gh:`142975`: Fix crash after unfreezing all objects tracked by the garbage " "collector on the :term:`free threaded ` build." msgstr "" -#: ../NEWS:4383 +#: ../NEWS:4575 msgid "" ":gh:`143135`: Set :data:`sys.flags.inspect` to ``1`` when :envvar:" "`PYTHONINSPECT` is ``0``. Previously, it was set to ``0`` in this case." msgstr "" -#: ../NEWS:4387 +#: ../NEWS:4579 msgid ":gh:`143123`: Protect the JIT against recursive tracing." msgstr "" -#: ../NEWS:4389 +#: ../NEWS:4581 msgid "" ":gh:`143092`: Fix a crash in the JIT when dealing with ``list.append(x)`` " "style code." msgstr "" -#: ../NEWS:4392 +#: ../NEWS:4584 msgid "" ":gh:`143003`: Fix an overflow of the shared empty buffer in :meth:`bytearray." "extend` when ``__length_hint__()`` returns 0 for non-empty iterator." msgstr "" -#: ../NEWS:4396 +#: ../NEWS:4588 msgid "" ":gh:`143006`: Fix a possible assertion error when comparing negative non-" "integer ``float`` and ``int`` with the same number of bits in the integer " "part." msgstr "" -#: ../NEWS:4400 +#: ../NEWS:4592 msgid ":gh:`116738`: Fix thread safety of :func:`contextvars.Context.run`." msgstr "" -#: ../NEWS:4402 +#: ../NEWS:4594 msgid "" ":gh:`142829`: Fix a use-after-free crash in :class:`contextvars.Context` " "comparison when a custom ``__eq__`` method modifies the context via :meth:" "`~contextvars.ContextVar.set`." msgstr "" -#: ../NEWS:4406 +#: ../NEWS:4598 msgid "" ":gh:`142863`: Generate optimized bytecode when calling :class:`list` or :" "class:`set` with generator expression." msgstr "" -#: ../NEWS:4409 +#: ../NEWS:4601 msgid "" ":gh:`41779`: Allowed defining any :ref:`__slots__ ` for a class " "derived from :class:`tuple` (including classes created by :func:`collections." "namedtuple`)." msgstr "" -#: ../NEWS:4413 +#: ../NEWS:4605 msgid "" ":gh:`69605`: Fix edge-cases around already imported modules in the :term:" "`REPL` auto-completion of imports." msgstr "" -#: ../NEWS:4416 +#: ../NEWS:4608 msgid "" ":gh:`138568`: Adjusted the built-in :func:`help` function so that empty " "inputs are ignored in interactive mode." msgstr "" -#: ../NEWS:4419 +#: ../NEWS:4611 msgid "" ":gh:`131798`: Remove bounds check when indexing into tuples with a constant " "index." msgstr "" -#: ../NEWS:4422 +#: ../NEWS:4614 msgid "" ":gh:`134584`: Eliminate redundant refcounting from ``_CALL_TYPE_1``. Patch " "by Tomas Roun" msgstr "" -#: ../NEWS:4425 +#: ../NEWS:4617 msgid "" ":gh:`132108`: Speed up :meth:`int.from_bytes` when passed object supports :" "ref:`buffer protocol `, like :class:`bytearray` by ~1.2x." msgstr "" -#: ../NEWS:4428 +#: ../NEWS:4620 msgid "" ":gh:`128334`: Make the :class:`slice` class subscriptable at runtime to be " "consistent with typing implementation." msgstr "" -#: ../NEWS:4434 +#: ../NEWS:4626 msgid "" ":gh:`141671`: :c:macro:`PyMODINIT_FUNC` (and the new :c:macro:" "`PyMODEXPORT_FUNC`) now adds a linkage declaration " "(``__declspec(dllexport)``) on Windows." msgstr "" -#: ../NEWS:4440 +#: ../NEWS:4632 msgid "Python 3.15.0 alpha 4" msgstr "" -#: ../NEWS:4442 +#: ../NEWS:4634 msgid "*Release date: 2026-01-13*" msgstr "" -#: ../NEWS:4447 +#: ../NEWS:4639 msgid "" ":gh:`142836`: Accommodated Solaris in ``test_pdb." "test_script_target_anonymous_pipe``." msgstr "" -#: ../NEWS:4453 +#: ../NEWS:4645 msgid "" ":gh:`122431`: Corrected the error message in :func:`readline." "append_history_file` to state that ``nelements`` must be non-negative " "instead of positive." msgstr "" -#: ../NEWS:4457 +#: ../NEWS:4649 msgid "" ":gh:`143046`: The :mod:`asyncio` REPL no longer prints copyright and version " "messages in the quiet mode (:option:`-q`). Patch by Bartosz Sławecki." msgstr "" -#: ../NEWS:4460 +#: ../NEWS:4652 msgid "" ":gh:`80744`: Fix issue where ``pdb`` would read a ``.pdbrc`` twice if " "launched from the home directory" msgstr "" -#: ../NEWS:4463 +#: ../NEWS:4655 msgid "" ":gh:`138122`: Add blocking mode to Tachyon for accurate stack traces in " "applications with many generators or fast-changing call stacks. Patch by " "Pablo Galindo." msgstr "" -#: ../NEWS:4467 +#: ../NEWS:4659 msgid "" ":gh:`143010`: Fixed a bug in :mod:`mailbox` where the precise timing of an " "external event could result in the library opening an existing file instead " "of a file it expected to create." msgstr "" -#: ../NEWS:4471 +#: ../NEWS:4663 msgid "" ":gh:`112127`: Fix possible use-after-free in :func:`atexit.unregister` when " "the callback is unregistered during comparison." msgstr "" -#: ../NEWS:4474 +#: ../NEWS:4666 msgid "" ":gh:`138122`: Fix incomplete stack traces in the Tachyon profiler's frame " "cache when profiling code with deeply nested generators. The frame cache now " @@ -7645,35 +7948,35 @@ msgid "" "broken flamegraphs. Patch by Pablo Galindo." msgstr "" -#: ../NEWS:4479 +#: ../NEWS:4671 msgid "" ":gh:`142834`: Change the :mod:`pdb` ``commands`` command to use the last " "available breakpoint instead of failing when the most recently created " "breakpoint was deleted." msgstr "" -#: ../NEWS:4483 +#: ../NEWS:4675 msgid "" ":gh:`142783`: Fix zoneinfo use-after-free with descriptor _weak_cache. a " "descriptor as _weak_cache could cause crashes during object creation. The " "fix ensures proper reference counting for descriptor-provided objects." msgstr "" -#: ../NEWS:4487 +#: ../NEWS:4679 msgid "" ":gh:`76007`: Deprecate ``VERSION`` from :mod:`xml.etree.ElementTree` and " "``version`` from :mod:`!xml.sax.expatreader` and :mod:`xml.sax.handler`. " "Patch by Hugo van Kemenade." msgstr "" -#: ../NEWS:4491 +#: ../NEWS:4683 msgid "" ":gh:`142784`: The :mod:`asyncio` REPL now properly closes the loop upon the " "end of interactive session. Previously, it could cause surprising warnings. " "Contributed by Bartosz Sławecki." msgstr "" -#: ../NEWS:4495 +#: ../NEWS:4687 msgid "" ":gh:`138122`: Add binary output format to :mod:`profiling.sampling` for " "compact storage of profiling data. The new ``--binary`` option captures " @@ -7681,7 +7984,7 @@ msgid "" "``replay`` command. Patch by Pablo Galindo" msgstr "" -#: ../NEWS:4500 +#: ../NEWS:4692 msgid "" ":gh:`142495`: :class:`collections.defaultdict` now prioritizes :meth:" "`~object.__setitem__` when inserting default values from " @@ -7689,13 +7992,13 @@ msgid "" "would overwrite a value set before ``default_factory`` returns." msgstr "" -#: ../NEWS:4505 +#: ../NEWS:4697 msgid "" ":gh:`142654`: Show the clearer error message when using ``profiling." "sampling`` on an unknown PID." msgstr "" -#: ../NEWS:4508 +#: ../NEWS:4700 msgid "" ":gh:`142560`: Fix use-after-free in :class:`bytearray` search-like methods (:" "meth:`~bytearray.find`, :meth:`~bytearray.count`, :meth:`~bytearray.index`, :" @@ -7706,20 +8009,20 @@ msgid "" "used for this." msgstr "" -#: ../NEWS:4517 +#: ../NEWS:4709 msgid "" ":gh:`142419`: :meth:`mmap.mmap.set_name` method added to annotate an " "anonymous memory map if Linux kernel supports ``PR_SET_VMA_ANON_NAME`` " "(Linux 5.17 or newer). Patch by Donghee Na." msgstr "" -#: ../NEWS:4521 +#: ../NEWS:4713 msgid "" ":gh:`139971`: :mod:`pydoc`: Ensure that the link to the online documentation " "of a :term:`stdlib` module is correct." msgstr "" -#: ../NEWS:4524 +#: ../NEWS:4716 msgid "" ":gh:`124098`: Fix issue where methods in handlers that lacked the protocol " "name but matched a valid base handler method (e.g., ``_open()`` or " @@ -7727,83 +8030,83 @@ msgid "" "OpenerDirector`'s handlers. Contributed by Andrea Mattei." msgstr "" -#: ../NEWS:4530 +#: ../NEWS:4722 msgid "" ":gh:`136282`: Add support for :const:`~configparser.UNNAMED_SECTION` when " "creating a section via the mapping protocol access" msgstr "" -#: ../NEWS:4536 +#: ../NEWS:4728 msgid "" ":gh:`143057`: Avoid locking in :c:func:`PyTraceMalloc_Track` and :c:func:" "`PyTraceMalloc_Untrack` when :mod:`tracemalloc` is not enabled." msgstr "" -#: ../NEWS:4539 +#: ../NEWS:4731 msgid "" ":gh:`139109`: Add missing terminator in certain cases when tracing in the " "new JIT compiler." msgstr "" -#: ../NEWS:4542 +#: ../NEWS:4734 msgid "" ":gh:`142961`: Fix a segfault in the JIT when constant folding ``len(tuple)``." msgstr "" -#: ../NEWS:4544 +#: ../NEWS:4736 msgid ":gh:`142776`: Fix a file descriptor leak in import.c" msgstr "" -#: ../NEWS:4546 +#: ../NEWS:4738 msgid ":gh:`139757`: Fix building JIT stencils on free-threaded builds." msgstr "" -#: ../NEWS:4548 +#: ../NEWS:4740 msgid "" ":gh:`129068`: Make concurrent iteration over the same range iterator thread-" "safe in the free threading build." msgstr "" -#: ../NEWS:4551 +#: ../NEWS:4743 msgid "" ":gh:`142543`: Fix a stack overflow on Clang JIT build configurations with " "full LTO." msgstr "" -#: ../NEWS:4554 +#: ../NEWS:4746 msgid ":gh:`142448`: Fix a bug when using monitoring with the JIT." msgstr "" -#: ../NEWS:4556 +#: ../NEWS:4748 msgid "" ":gh:`142766`: Clear the frame of a generator when :meth:`generator.close` is " "called." msgstr "" -#: ../NEWS:4559 +#: ../NEWS:4751 msgid "" ":gh:`134584`: Eliminate redundant refcounting from " "``_LOAD_ATTR_INSTANCE_VALUE``." msgstr "" -#: ../NEWS:4562 +#: ../NEWS:4754 msgid "" ":gh:`134584`: Eliminate redundant refcounting from ``_STORE_ATTR_WITH_HINT``." msgstr "" -#: ../NEWS:4564 +#: ../NEWS:4756 msgid "" ":gh:`142476`: Fix a memory leak in the experimental Tier 2 optimizer when " "creating executors. Patched by Shamil Abdulaev." msgstr "" -#: ../NEWS:4567 +#: ../NEWS:4759 msgid "" ":gh:`100964`: Fix reference cycle in exhausted generator frames. Patch by " "Savannah Ostrowski." msgstr "" -#: ../NEWS:4570 +#: ../NEWS:4762 msgid "" ":gh:`139922`: Allow building CPython with the tail calling interpreter on " "Visual Studio 2026 MSVC. This provides a performance gain over the prior " @@ -7811,15 +8114,15 @@ msgid "" "help from the MSVC team including Hulon Jenkins." msgstr "" -#: ../NEWS:4577 +#: ../NEWS:4769 msgid "Python 3.15.0 alpha 3" msgstr "" -#: ../NEWS:4579 +#: ../NEWS:4771 msgid "*Release date: 2025-12-16*" msgstr "" -#: ../NEWS:4584 +#: ../NEWS:4776 msgid "" ":gh:`141692`: Each slice of an iOS XCframework now contains a ``lib`` folder " "that contains a symlink to the libpython dylib. This allows binary modules " @@ -7827,33 +8130,33 @@ msgid "" "linking." msgstr "" -#: ../NEWS:4592 +#: ../NEWS:4784 msgid "" ":gh:`140381`: Fix flaky test_profiling tests on i686 and s390x architectures " "by increasing slow_fibonacci call frequency from every 5th iteration to " "every 2nd iteration." msgstr "" -#: ../NEWS:4596 +#: ../NEWS:4788 msgid "" ":gh:`140210`: Make ``test_sysconfig.test_parse_makefile_renamed_vars`` less " "fragile by clearing the environment variables before parsing the Makefile." msgstr "" -#: ../NEWS:4602 +#: ../NEWS:4794 msgid "" ":gh:`142145`: Remove quadratic behavior in ``xml.minidom`` node ID cache " "clearing." msgstr "" -#: ../NEWS:4605 +#: ../NEWS:4797 msgid "" ":gh:`42400`: Fix buffer overflow in ``_Py_wrealpath()`` for paths exceeding " "``MAXPATHLEN`` bytes by using dynamic memory allocation instead of fixed-" "size buffer. Patch by Shamil Abdulaev." msgstr "" -#: ../NEWS:4609 +#: ../NEWS:4801 msgid "" ":gh:`119451`: Fix a potential memory denial of service in the :mod:`http." "client` module. When connecting to a malicious server, it could cause an " @@ -7862,7 +8165,7 @@ msgid "" "processes or containers, or even system crashes." msgstr "" -#: ../NEWS:4615 +#: ../NEWS:4807 msgid "" ":gh:`119342`: Fix a potential memory denial of service in the :mod:" "`plistlib` module. When reading a Plist file received from untrusted source, " @@ -7871,7 +8174,7 @@ msgid "" "(OOM) killed processes or containers, or even system crashes." msgstr "" -#: ../NEWS:4624 +#: ../NEWS:4816 msgid "" ":gh:`142754`: Add the *ownerDocument* attribute to :mod:`xml.dom.minidom` " "elements and attributes created by directly instantiating the ``Element`` or " @@ -7880,38 +8183,38 @@ msgid "" "used instead." msgstr "" -#: ../NEWS:4630 +#: ../NEWS:4822 msgid "" ":gh:`142594`: Fix crash in ``TextIOWrapper.close()`` when the underlying " "buffer's ``closed`` property calls :meth:`~io.TextIOBase.detach`." msgstr "" -#: ../NEWS:4633 +#: ../NEWS:4825 msgid "" ":gh:`76007`: Deprecate ``__version__`` from :mod:`ctypes`. Patch by Hugo van " "Kemenade." msgstr "" -#: ../NEWS:4636 +#: ../NEWS:4828 msgid "" ":gh:`76007`: Deprecate ``__version__`` from :mod:`wsgiref.simple_server`. " "Patch by Hugo van Kemenade." msgstr "" -#: ../NEWS:4639 +#: ../NEWS:4831 msgid "" ":gh:`142651`: :mod:`unittest.mock`: fix a thread safety issue where :attr:" "`Mock.call_count ` may return inaccurate " "values when the mock is called concurrently from multiple threads." msgstr "" -#: ../NEWS:4644 +#: ../NEWS:4836 msgid "" ":gh:`76007`: Deprecate ``__version__`` from :mod:`http.server`. Patch by " "Hugo van Kemenade." msgstr "" -#: ../NEWS:4647 +#: ../NEWS:4839 msgid "" ":gh:`138122`: Add ``--subprocesses`` flag to :mod:`profiling.sampling` CLI " "to automatically profile subprocesses spawned by the target. When enabled, " @@ -7922,46 +8225,46 @@ msgid "" "by Pablo Galindo." msgstr "" -#: ../NEWS:4655 +#: ../NEWS:4847 msgid "" ":gh:`142595`: Added type check during initialization of the :mod:`decimal` " "module to prevent a crash in case of broken stdlib. Patch by Sergey B " "Kirpichev." msgstr "" -#: ../NEWS:4659 +#: ../NEWS:4851 msgid "" ":gh:`142556`: Fix crash when a task gets re-registered during finalization " "in :mod:`asyncio`. Patch by Kumar Aditya." msgstr "" -#: ../NEWS:4662 +#: ../NEWS:4854 msgid "" ":gh:`138122`: Add ``--mode=exception`` to the sampling profiler to capture " "samples only from threads with an active exception, useful for analyzing " "exception handling overhead. Patch by Pablo Galindo." msgstr "" -#: ../NEWS:4666 +#: ../NEWS:4858 msgid "" ":gh:`142539`: :mod:`traceback`: Fix location of carets in :exc:" "`SyntaxError`\\s when the source contains wide characters." msgstr "" -#: ../NEWS:4669 +#: ../NEWS:4861 msgid "" ":gh:`123241`: Avoid reference count operations in garbage collection of :mod:" "`ctypes` objects." msgstr "" -#: ../NEWS:4672 +#: ../NEWS:4864 msgid "" ":gh:`142451`: :mod:`hmac`: correctly copy :class:`~hmac.HMAC` attributes for " "objects copied through :meth:`HMAC.copy() `. Patch by " "Bénédikt Tran." msgstr "" -#: ../NEWS:4676 +#: ../NEWS:4868 msgid "" ":gh:`138122`: The ``profiling.sampling`` flamegraph profiler now supports " "inverted flamegraph view that aggregates all leaf nodes. In a standard " @@ -7974,17 +8277,17 @@ msgid "" "called from." msgstr "" -#: ../NEWS:4686 +#: ../NEWS:4878 msgid "" ":gh:`112527`: The help text for required options in :mod:`argparse` no " "longer extended with \" (default: None)\"." msgstr "" -#: ../NEWS:4689 +#: ../NEWS:4881 msgid ":gh:`142438`: Fixed a possible leaked GIL in _PySSL_keylog_callback." msgstr "" -#: ../NEWS:4691 +#: ../NEWS:4883 msgid "" ":gh:`138122`: Add bytecode-level instruction profiling to the sampling " "profiler via the new ``--opcodes`` flag. When enabled, the profiler captures " @@ -7993,20 +8296,20 @@ msgid "" "flamegraph, gecko, and live output formats. Patch by Pablo Galindo" msgstr "" -#: ../NEWS:4698 +#: ../NEWS:4890 msgid "" ":gh:`142389`: Add backtick markup support in :mod:`argparse` description and " "epilog text to highlight inline code when color output is enabled." msgstr "" -#: ../NEWS:4701 +#: ../NEWS:4893 msgid "" ":gh:`142346`: Fix usage formatting for mutually exclusive groups in :mod:" "`argparse` when they are preceded by positional arguments or followed or " "intermixed with other optional arguments." msgstr "" -#: ../NEWS:4705 +#: ../NEWS:4897 msgid "" ":gh:`142374`: Fix cumulative percentage calculation for recursive functions " "in the new sampling profiler. When profiling recursive functions, cumulative " @@ -8018,70 +8321,70 @@ msgid "" "Patch by Pablo Galindo." msgstr "" -#: ../NEWS:4714 +#: ../NEWS:4906 msgid "" ":gh:`142315`: Pdb can now run scripts from anonymous pipes used in process " "substitution. Patch by Bartosz Sławecki." msgstr "" -#: ../NEWS:4717 +#: ../NEWS:4909 msgid "" ":gh:`64532`: Subparser help now includes required optional arguments from " "the parent parser in the usage, making it clearer what arguments are needed " "to run a subcommand. Patch by Savannah Ostrowski." msgstr "" -#: ../NEWS:4721 +#: ../NEWS:4913 msgid "" ":gh:`142207`: Fix: profiling.sampling may cause assertion ``!(has_gil && " "gil_requested)``" msgstr "" -#: ../NEWS:4724 +#: ../NEWS:4916 msgid "" ":gh:`142332`: Fix usage formatting for positional arguments in mutually " "exclusive groups in :mod:`argparse`. in :mod:`argparse`." msgstr "" -#: ../NEWS:4727 +#: ../NEWS:4919 msgid "" ":gh:`142282`: Fix :func:`winreg.QueryValueEx` to not accidentally read " "garbage buffer under race condition." msgstr "" -#: ../NEWS:4730 +#: ../NEWS:4922 msgid "" ":gh:`142318`: Fix typing ``'q'`` at the help of the interactive tachyon " "profiler exiting the profiler." msgstr "" -#: ../NEWS:4733 +#: ../NEWS:4925 msgid "" ":gh:`75949`: Fix :mod:`argparse` to preserve ``|`` separators in mutually " "exclusive groups when the usage line wraps due to length." msgstr "" -#: ../NEWS:4736 +#: ../NEWS:4928 msgid "" ":gh:`142267`: Improve :mod:`argparse` performance by caching the formatter " "used for argument validation." msgstr "" -#: ../NEWS:4739 +#: ../NEWS:4931 msgid "" ":gh:`139862`: Remove ``color`` parameter from :class:`!argparse." "HelpFormatter` constructor. Color is controlled by :class:`~argparse." "ArgumentParser`." msgstr "" -#: ../NEWS:4743 +#: ../NEWS:4935 msgid "" ":gh:`68552`: ``MisplacedEnvelopeHeaderDefect`` and ``Missing header name`` " "defects are now correctly passed to the ``handle_defect`` method of " "``policy`` in :class:`~email.parser.FeedParser`." msgstr "" -#: ../NEWS:4747 +#: ../NEWS:4939 msgid "" ":gh:`142206`: The resource tracker in the :mod:`multiprocessing` module can " "now understand messages from older versions of itself. This avoids issues " @@ -8089,37 +8392,37 @@ msgid "" "upgrades are not tested.)" msgstr "" -#: ../NEWS:4752 +#: ../NEWS:4944 msgid "" ":gh:`142214`: Fix two regressions in :mod:`dataclasses` in Python 3.14.1 " "related to annotations." msgstr "" -#: ../NEWS:4755 +#: ../NEWS:4947 msgid "" "An exception is no longer raised if ``slots=True`` is used and the " "``__init__`` method does not have an ``__annotate__`` attribute (likely " "because ``init=False`` was used)." msgstr "" -#: ../NEWS:4759 +#: ../NEWS:4951 msgid "" "An exception is no longer raised if annotations are requested on the " "``__init__`` method and one of the fields is not present in the class " "annotations. This can occur in certain dynamic scenarios." msgstr "" -#: ../NEWS:4763 ../NEWS:31943 +#: ../NEWS:4955 ../NEWS:32135 msgid "Patch by Jelle Zijlstra." msgstr "" -#: ../NEWS:4765 +#: ../NEWS:4957 msgid "" ":gh:`142203`: Remove the *debug_override* parameter from :func:`importlib." "util.cache_from_source` which has been deprecated since Python 3.5." msgstr "" -#: ../NEWS:4769 +#: ../NEWS:4961 msgid "" ":gh:`138122`: The ``_remote_debugging`` module now implements frame caching " "in the ``RemoteUnwinder`` class to reduce memory reads when profiling remote " @@ -8128,26 +8431,26 @@ msgid "" "performance for deep call stacks." msgstr "" -#: ../NEWS:4775 +#: ../NEWS:4967 msgid "" ":gh:`116738`: Fix :mod:`cmath` data race when initializing trigonometric " "tables with subinterpreters." msgstr "" -#: ../NEWS:4778 +#: ../NEWS:4970 msgid "" ":gh:`141982`: Allow :mod:`pdb` to set breakpoints on async functions with " "function names." msgstr "" -#: ../NEWS:4781 +#: ../NEWS:4973 msgid "" ":gh:`74389`: When the stdin being used by a :class:`subprocess.Popen` " "instance is closed, this is now ignored in :meth:`subprocess.Popen." "communicate` instead of leaving the class in an inconsistent state." msgstr "" -#: ../NEWS:4786 +#: ../NEWS:4978 msgid "" ":gh:`87512`: Fix :func:`subprocess.Popen.communicate` timeout handling on " "Windows when writing large input. Previously, the timeout was ignored during " @@ -8156,13 +8459,13 @@ msgid "" "background thread, allowing the timeout to be properly enforced." msgstr "" -#: ../NEWS:4793 +#: ../NEWS:4985 msgid "" ":gh:`141939`: Add color to all interpolated values in :mod:`argparse` help, " "like ``%(default)s`` or ``%(choices)s``. Patch by Alex Prengère." msgstr "" -#: ../NEWS:4796 +#: ../NEWS:4988 msgid "" ":gh:`141473`: When :meth:`subprocess.Popen.communicate` was called with " "*input* and a *timeout* and is called for a second time after a :exc:" @@ -8170,63 +8473,63 @@ msgid "" "should no longer hang." msgstr "" -#: ../NEWS:4801 +#: ../NEWS:4993 msgid "" ":gh:`141999`: Correctly allow :exc:`KeyboardInterrupt` to stop the process " "when using :mod:`!profiling.sampling`." msgstr "" -#: ../NEWS:4804 +#: ../NEWS:4996 msgid "" ":gh:`142006`: Fix a bug in the :mod:`email.policy.default` folding algorithm " "which incorrectly resulted in a doubled newline when a line ending at " "exactly max_line_length was followed by an unfoldable token." msgstr "" -#: ../NEWS:4808 +#: ../NEWS:5000 msgid "" ":gh:`141968`: Remove data copy from :mod:`re` compilation of regexes with " "large charsets by using :meth:`bytearray.take_bytes`." msgstr "" -#: ../NEWS:4811 +#: ../NEWS:5003 msgid "" ":gh:`141968`: Remove data copy from :mod:`encodings.idna` :meth:`~codecs." "Codec.encode` and :meth:`~codecs.IncrementalEncoder.encode` by using :meth:" "`bytearray.take_bytes`." msgstr "" -#: ../NEWS:4815 +#: ../NEWS:5007 msgid "" ":gh:`141968`: Remove data copy from :mod:`codecs` ``punycode`` encoding by " "using :meth:`bytearray.take_bytes`." msgstr "" -#: ../NEWS:4818 +#: ../NEWS:5010 msgid "" ":gh:`141968`: Remove data copy from :func:`wave.Wave_read.readframes` and :" "func:`wave.Wave_write.writeframes` by using :meth:`bytearray.take_bytes`." msgstr "" -#: ../NEWS:4821 +#: ../NEWS:5013 msgid "" ":gh:`141968`: Remove a data copy from :func:`base64.b32decode` and :func:" "`base64.b32encode` by using :meth:`bytearray.take_bytes`." msgstr "" -#: ../NEWS:4824 +#: ../NEWS:5016 msgid "" ":gh:`59000`: Fix :mod:`pdb` breakpoint resolution for class methods when the " "module defining the class is not imported." msgstr "" -#: ../NEWS:4827 +#: ../NEWS:5019 msgid "" ":gh:`116738`: Fix thread safety issue with :mod:`re` scanner objects in free-" "threaded builds." msgstr "" -#: ../NEWS:4830 +#: ../NEWS:5022 msgid "" ":gh:`138122`: The ``profiling.sampling`` flamegraph profiler now displays " "thread status statistics showing the percentage of time threads spend " @@ -8236,55 +8539,55 @@ msgid "" "per-thread metrics." msgstr "" -#: ../NEWS:4837 +#: ../NEWS:5029 msgid "" ":gh:`141781`: Fixed an issue where pdb.line_prefix assignment was ignored if " "assigned after the module was imported." msgstr "" -#: ../NEWS:4840 +#: ../NEWS:5032 msgid "" ":gh:`141863`: Update :ref:`asyncio-streams` to use :meth:`bytearray." "take_bytes` for a over 10% performance improvement on pyperformance " "asyncio_tcp benchmark." msgstr "" -#: ../NEWS:4844 +#: ../NEWS:5036 msgid ":gh:`141817`: Add :data:`!socket.IPV6_HDRINCL` constant." msgstr "" -#: ../NEWS:4846 +#: ../NEWS:5038 msgid "" ":gh:`105836`: Fix :meth:`asyncio.run_coroutine_threadsafe` leaving " "underlying cancelled asyncio task running." msgstr "" -#: ../NEWS:4849 +#: ../NEWS:5041 msgid "" ":gh:`141570`: Support :term:`file-like object` raising :exc:`OSError` from :" "meth:`~io.IOBase.fileno` in color detection (``_colorize.can_colorize()``). " "This can occur when ``sys.stdout`` is redirected." msgstr "" -#: ../NEWS:4854 +#: ../NEWS:5046 msgid "" ":gh:`141679`: Add colour to defaults in :mod:`argparse` help. Patch by Hugo " "van Kemenade." msgstr "" -#: ../NEWS:4857 +#: ../NEWS:5049 msgid "" ":gh:`141686`: Break reference cycles created by each call to :func:`json." "dump` or :meth:`json.JSONEncoder.iterencode`." msgstr "" -#: ../NEWS:4860 +#: ../NEWS:5052 msgid "" ":gh:`141659`: Fix bad file descriptor errors from ``_posixsubprocess`` on " "AIX." msgstr "" -#: ../NEWS:4863 +#: ../NEWS:5055 msgid "" ":gh:`141645`: Add a new ``--live`` mode to the tachyon profiler in :mod:`!" "profiling.sampling` module. This mode consist of a live TUI that displays " @@ -8292,31 +8595,31 @@ msgid "" "``top``. Patch by Pablo Galindo" msgstr "" -#: ../NEWS:4868 +#: ../NEWS:5060 msgid "" ":gh:`141615`: Check ``stdin`` instead of ``stdout`` for ``use_rawinput`` in :" "mod:`pdb`." msgstr "" -#: ../NEWS:4871 +#: ../NEWS:5063 msgid "" ":gh:`69113`: Fix :mod:`doctest` to correctly report line numbers for " "doctests in ``__test__`` dictionary when formatted as triple-quoted strings " "by finding unique lines in the string and matching them in the source file." msgstr "" -#: ../NEWS:4875 +#: ../NEWS:5067 msgid ":gh:`141600`: Fix musl version detection on Void Linux." msgstr "" -#: ../NEWS:4877 +#: ../NEWS:5069 msgid "" ":gh:`48752`: Add :func:`readline.get_pre_input_hook` function to retrieve " "the current pre-input hook. This allows applications to save and restore the " "hook without overwriting user settings. Patch by Sanyam Khurana." msgstr "" -#: ../NEWS:4881 +#: ../NEWS:5073 msgid "" ":gh:`141565`: Add async-aware profiling to the Tachyon sampling profiler. " "The profiler now reconstructs and displays async task hierarchies in " @@ -8324,34 +8627,34 @@ msgid "" "Ostrowski and Pablo Galindo Salgado." msgstr "" -#: ../NEWS:4886 +#: ../NEWS:5078 msgid "" ":gh:`60107`: Remove a copy from :meth:`io.RawIOBase.read`. If the underlying " "I/O class keeps a reference to the mutable memory, raise a :exc:" "`BufferError`." msgstr "" -#: ../NEWS:4890 +#: ../NEWS:5082 msgid "" ":gh:`116738`: Make csv module thread-safe on the :term:`free threaded ` build." msgstr "" -#: ../NEWS:4893 +#: ../NEWS:5085 msgid "" ":gh:`140911`: :mod:`collections`: Ensure that the methods ``UserString." "rindex()`` and ``UserString.index()`` accept :class:`collections.UserString` " "instances as the sub argument." msgstr "" -#: ../NEWS:4897 +#: ../NEWS:5089 msgid "" ":gh:`140875`: Fix handling of unclosed character references (named and " "numerical) followed by the end of file in :class:`html.parser.HTMLParser` " "with ``convert_charrefs=False``." msgstr "" -#: ../NEWS:4901 +#: ../NEWS:5093 msgid "" ":gh:`140677`: Add heatmap visualization mode to the Tachyon sampling " "profiler. The new ``--heatmap`` output format provides a line-by-line view " @@ -8359,19 +8662,19 @@ msgid "" "interactive call graph navigation between callers and callees." msgstr "" -#: ../NEWS:4906 +#: ../NEWS:5098 msgid "" ":gh:`139946`: Distinguish stdout and stderr when colorizing output in " "argparse module." msgstr "" -#: ../NEWS:4909 +#: ../NEWS:5101 msgid "" ":gh:`76007`: :mod:`pydoc`: Fix :exc:`DeprecationWarning` being raised when " "generating doc for :term:`stdlib` modules." msgstr "" -#: ../NEWS:4912 +#: ../NEWS:5104 msgid "" ":gh:`138697`: Fix inferring *dest* from a single-dash long option in :mod:" "`argparse`. If a short option and a single-dash long option are passed to :" @@ -8379,26 +8682,26 @@ msgid "" "option." msgstr "" -#: ../NEWS:4917 +#: ../NEWS:5109 msgid "" ":gh:`138525`: Add support for single-dash long options and alternate prefix " "characters in :class:`argparse.BooleanOptionalAction`." msgstr "" -#: ../NEWS:4920 +#: ../NEWS:5112 msgid "" ":gh:`79986`: Add parsing for ``References`` and ``In-Reply-To`` headers to " "the :mod:`email` library that parses the header content as lists of message " "id tokens. This prevents them from being folded incorrectly." msgstr "" -#: ../NEWS:4924 +#: ../NEWS:5116 msgid "" ":gh:`135559`: Flag: a ``dir()`` on a ``Flag`` enumeration now shows non-" "canonical members. (i.e. aliases)." msgstr "" -#: ../NEWS:4927 +#: ../NEWS:5119 msgid "" ":gh:`134453`: Fixed :func:`subprocess.Popen.communicate` ``input=`` handling " "of :class:`memoryview` instances that were non-byte shaped on POSIX " @@ -8406,11 +8709,11 @@ msgid "" "truncating the input. Windows platforms did not have this bug." msgstr "" -#: ../NEWS:4932 +#: ../NEWS:5124 msgid ":gh:`127930`: Add ``__all__`` to :mod:`tkinter.simpledialog`." msgstr "" -#: ../NEWS:4934 +#: ../NEWS:5126 msgid "" ":gh:`115952`: Fix a potential memory denial of service in the :mod:`pickle` " "module. When reading a pickled data received from untrusted source, it could " @@ -8421,12 +8724,12 @@ msgid "" "containers, or even system crashes." msgstr "" -#: ../NEWS:4942 +#: ../NEWS:5134 msgid "" ":issue:`40350`: Fix support for namespace packages in :mod:`modulefinder`." msgstr "" -#: ../NEWS:4947 +#: ../NEWS:5139 msgid "" ":gh:`141994`: :mod:`xml.sax.handler`: Make Documentation of :data:`xml.sax." "handler.feature_external_ges` warn of opening up to `external entity attacks " @@ -8434,43 +8737,43 @@ msgid "" "Sebastian Pipping." msgstr "" -#: ../NEWS:4956 +#: ../NEWS:5148 msgid "" ":gh:`134584`: Eliminate redundant refcounting from " "``_STORE_ATTR_INSTANCE_VALUE``." msgstr "" -#: ../NEWS:4959 +#: ../NEWS:5151 msgid "" ":gh:`142718`: JIT: Fix segfault caused by not flushing the stack to memory " "at side exits." msgstr "" -#: ../NEWS:4962 +#: ../NEWS:5154 msgid "" ":gh:`142737`: Tracebacks will be displayed in fallback mode even if :func:" "`io.open` is lost. Previously, this would crash the interpreter. Patch by " "Bartosz Sławecki." msgstr "" -#: ../NEWS:4966 +#: ../NEWS:5158 msgid "" ":gh:`116738`: Make the attributes in :mod:`bz2` thread-safe on the :term:" "`free threaded ` build." msgstr "" -#: ../NEWS:4969 +#: ../NEWS:5161 msgid "" ":gh:`134584`: Eliminate redundant refcounting from ``_CALL_LIST_APPEND``." msgstr "" -#: ../NEWS:4971 +#: ../NEWS:5163 msgid "" ":gh:`142554`: Fix a crash in :func:`divmod` when :func:`!_pylong.int_divmod` " "does not return a tuple of length two exactly. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:4974 +#: ../NEWS:5166 msgid "" ":gh:`142531`: Fix a free-threaded GC performance regression. If there are " "many untracked tuples, the GC will run too often, resulting in poor " @@ -8479,25 +8782,25 @@ msgid "" "free-threaded GC must scan those too." msgstr "" -#: ../NEWS:4980 +#: ../NEWS:5172 msgid "" ":gh:`142402`: Fix reference counting when adjacent literal parts are merged " "while constructing :class:`string.templatelib.Template`, preventing the " "displaced string object from leaking." msgstr "" -#: ../NEWS:4984 +#: ../NEWS:5176 msgid "" ":gh:`116738`: Make the attributes in :mod:`zlib` thread-safe on the :term:" "`free threaded ` build." msgstr "" -#: ../NEWS:4987 +#: ../NEWS:5179 msgid "" ":gh:`142343`: Fix SIGILL crash on m68k due to incorrect assembly constraint." msgstr "" -#: ../NEWS:4989 +#: ../NEWS:5181 msgid "" ":gh:`142236`: Improve the \"Perhaps you forgot a comma?\" syntax error for " "multi-line string concatenations to point to the last string instead of the " @@ -8505,7 +8808,7 @@ msgid "" "Galindo." msgstr "" -#: ../NEWS:4994 +#: ../NEWS:5186 msgid "" ":gh:`142236`: Fix incorrect keyword suggestions for syntax errors in :mod:" "`traceback`. The keyword typo suggestion mechanism would incorrectly suggest " @@ -8513,13 +8816,13 @@ msgid "" "containing an actual typo. Patch by Pablo Galindo." msgstr "" -#: ../NEWS:4999 +#: ../NEWS:5191 msgid "" ":gh:`142305`: Decrease the size of the generated stencils and the runtime " "JIT code. Patch by Diego Russo." msgstr "" -#: ../NEWS:5002 +#: ../NEWS:5194 msgid "" ":gh:`135379`: Implement a limited form of register allocation known as \"top " "of stack caching\" in the JIT. It works by keeping 0-3 of the top items in " @@ -8529,78 +8832,78 @@ msgid "" "spilling or reloading values when needed." msgstr "" -#: ../NEWS:5009 +#: ../NEWS:5201 msgid "" ":gh:`142276`: Fix missing type watcher when promoting attribute loads to " "constants in the JIT. Patch by Ken Jin. Reproducer by Yuancheng Jiang." msgstr "" -#: ../NEWS:5012 +#: ../NEWS:5204 msgid "" ":gh:`142218`: Fix crash when inserting into a split table dictionary with a " "non :class:`str` key that matches an existing key." msgstr "" -#: ../NEWS:5015 +#: ../NEWS:5207 msgid "" ":gh:`141976`: Check against abstract stack overflow in the JIT optimizer." msgstr "" -#: ../NEWS:5017 +#: ../NEWS:5209 msgid "" ":gh:`97850`: Remove all ``*.load_module()`` usage and definitions from the " "import system and importlib. The method has been deprecated in favor of " "``importlib.abc.Loader.exec_module()`` since Python 3.4." msgstr "" -#: ../NEWS:5021 +#: ../NEWS:5213 msgid "" ":gh:`142048`: Fix quadratically increasing garbage collection delays in free-" "threaded build." msgstr "" -#: ../NEWS:5024 +#: ../NEWS:5216 msgid ":gh:`65961`: Stop setting ``__cached__`` on modules." msgstr "" -#: ../NEWS:5026 +#: ../NEWS:5218 msgid "" ":gh:`141770`: Annotate anonymous mmap usage only when supported by the Linux " "kernel and if ``-X dev`` is used or Python is built in debug mode. Patch by " "Donghee Na." msgstr "" -#: ../NEWS:5030 +#: ../NEWS:5222 msgid "" ":gh:`142029`: Raise :exc:`ModuleNotFoundError` instead of crashing when a " "nonexistent module is used as a name in ``_imp.create_builtin()``." msgstr "" -#: ../NEWS:5033 +#: ../NEWS:5225 msgid "" ":gh:`142029`: Raise :exc:`ValueError` instead of crashing when empty string " "is used as a name in ``_imp.create_builtin()``." msgstr "" -#: ../NEWS:5036 +#: ../NEWS:5228 msgid "" ":gh:`141976`: Protect against specialization failures in the tracing JIT " "compiler for performance reasons." msgstr "" -#: ../NEWS:5039 +#: ../NEWS:5231 msgid "" ":gh:`141861`: Fix invalid memory read in the ``ENTER_EXECUTOR`` instruction." msgstr "" -#: ../NEWS:5041 +#: ../NEWS:5233 msgid "" ":gh:`141930`: When importing a module, use Python's regular file object to " "ensure that writes to ``.pyc`` files are complete or an appropriate error is " "raised." msgstr "" -#: ../NEWS:5045 +#: ../NEWS:5237 msgid "" ":gh:`138122`: Add incomplete sample detection to prevent corrupted profiling " "data. Each thread state now contains an embedded base frame (sentinel at the " @@ -8611,38 +8914,38 @@ msgid "" "included as spurious data." msgstr "" -#: ../NEWS:5053 +#: ../NEWS:5245 msgid "" ":gh:`120158`: Fix inconsistent state when enabling or disabling monitoring " "events too many times." msgstr "" -#: ../NEWS:5056 +#: ../NEWS:5248 msgid "" ":gh:`140638`: Expose a ``\"candidates\"`` stat in :func:`gc.get_stats` and :" "data:`gc.callbacks`." msgstr "" -#: ../NEWS:5059 +#: ../NEWS:5251 msgid "" ":gh:`141780`: Fix :c:macro:`Py_mod_gil` with API added in :pep:`793`: :c:" "func:`!PyModule_FromSlotsAndSpec` and ``PyModExport`` hooks" msgstr "" -#: ../NEWS:5062 +#: ../NEWS:5254 msgid "" ":gh:`141732`: Ensure the :meth:`~object.__repr__` for :exc:`ExceptionGroup` " "and :exc:`BaseExceptionGroup` does not change when the exception sequence " "that was original passed in to its constructor is subsequently mutated." msgstr "" -#: ../NEWS:5066 +#: ../NEWS:5258 msgid "" ":gh:`140638`: Expose a ``\"duration\"`` stat in :func:`gc.get_stats` and :" "data:`gc.callbacks`." msgstr "" -#: ../NEWS:5069 +#: ../NEWS:5261 msgid "" ":gh:`139653`: Only raise a ``RecursionError`` or trigger a fatal error if " "the stack pointer is both below the limit pointer *and* above the stack " @@ -8650,68 +8953,68 @@ msgid "" "positives when user-space threads swap stacks." msgstr "" -#: ../NEWS:5074 +#: ../NEWS:5266 msgid "" ":gh:`41779`: Allowed defining the *__dict__* and *__weakref__* :ref:" "`__slots__ ` for any class." msgstr "" -#: ../NEWS:5077 +#: ../NEWS:5269 msgid "" ":gh:`139103`: Improve multithreaded scaling of dataclasses on the free-" "threaded build." msgstr "" -#: ../NEWS:5080 +#: ../NEWS:5272 msgid "" ":gh:`141589`: Change ``backoff counter`` to use prime numbers instead of " "powers of 2. Use only 3 bits for ``counter`` and 13 bits for ``value``. This " "allows to support values up to 8191. Patch by Mikhail Efimov." msgstr "" -#: ../NEWS:5084 +#: ../NEWS:5276 msgid "" ":gh:`137007`: Fix a bug during JIT compilation failure which caused garbage " "collection debug assertions to fail." msgstr "" -#: ../NEWS:5087 +#: ../NEWS:5279 msgid "" ":gh:`132657`: For the free-threaded build, avoid locking the :class:`set` " "object for the ``__contains__`` method." msgstr "" -#: ../NEWS:5090 +#: ../NEWS:5282 msgid ":gh:`134584`: Eliminate redundant refcounting from ``_CALL_STR_1``." msgstr "" -#: ../NEWS:5092 +#: ../NEWS:5284 msgid ":gh:`134584`: Eliminate redundant refcounting from ``_CALL_BUILTIN_O``." msgstr "" -#: ../NEWS:5094 +#: ../NEWS:5286 msgid "" ":gh:`134584`: Eliminate redundant refcounting from ``_CALL_TUPLE_1``. Patch " "by Noam Cohen" msgstr "" -#: ../NEWS:5100 +#: ../NEWS:5292 msgid "" ":gh:`142589`: Fix :c:func:`PyUnstable_Object_IsUniqueReferencedTemporary()` " "handling of tagged ints on the interpreter stack." msgstr "" -#: ../NEWS:5103 +#: ../NEWS:5295 msgid "" ":gh:`142571`: :c:func:`!PyUnstable_CopyPerfMapFile` now checks that opening " "the file succeeded before flushing." msgstr "" -#: ../NEWS:5106 +#: ../NEWS:5298 msgid ":gh:`142225`: Fixed the :c:macro:`PyABIInfo_VAR` macro." msgstr "" -#: ../NEWS:5108 +#: ../NEWS:5300 msgid "" ":gh:`141049`: :c:func:`!_PyObject_CallMethodId`, :c:func:`!" "_PyObject_GetAttrId` and :c:func:`!_PyUnicode_FromId` are deprecated since " @@ -8721,13 +9024,13 @@ msgid "" "by Victor Stinner." msgstr "" -#: ../NEWS:5115 +#: ../NEWS:5307 msgid "" ":gh:`142163`: Fix the ``HAVE_THREAD_LOCAL`` macro being defined without the " "``Py_BUILD_CORE`` macro set after including :file:`Python.h`." msgstr "" -#: ../NEWS:5118 +#: ../NEWS:5310 msgid "" ":gh:`137422`: Fix :term:`free threading` race condition in :c:func:" "`PyImport_AddModuleRef`. It was previously possible for two calls to the " @@ -8735,35 +9038,35 @@ msgid "" "`sys.modules`." msgstr "" -#: ../NEWS:5123 +#: ../NEWS:5315 msgid ":gh:`141726`: Add :c:func:`PyDict_SetDefaultRef` to the Stable ABI." msgstr "" -#: ../NEWS:5125 +#: ../NEWS:5317 msgid "" ":gh:`140042`: Removed the sqlite3_shutdown call that could cause closing " "connections for sqlite when used with multiple sub interpreters." msgstr "" -#: ../NEWS:5128 +#: ../NEWS:5320 msgid "" ":gh:`141070`: Add :c:func:`!PyUnstable_Object_Dump` to dump an object to " "``stderr``. It should only be used for debugging. Patch by Victor Stinner." msgstr "" -#: ../NEWS:5131 +#: ../NEWS:5323 msgid "" ":gh:`139165`: Expose the functions :c:func:`Py_SIZE`, :c:func:`Py_IS_TYPE` " "and :c:func:`Py_SET_SIZE` in the Stable ABI." msgstr "" -#: ../NEWS:5137 +#: ../NEWS:5329 msgid "" ":gh:`131372`: Add ``LDVERSION`` and ``EXE`` to the ``base_interpreter`` " "value of ``build-details.json``." msgstr "" -#: ../NEWS:5140 +#: ../NEWS:5332 msgid "" ":gh:`142454`: When calculating the digest of the JIT stencils input, sort " "the hashed files by filenames before adding their content to the hasher. " @@ -8771,33 +9074,33 @@ msgid "" "independent on filesystem order." msgstr "" -#: ../NEWS:5145 +#: ../NEWS:5337 msgid "" ":gh:`131372`: ``build-details.py`` will only be installed as part of the " "main install (``make install``). ``make altinstall`` will no longer include " "it." msgstr "" -#: ../NEWS:5148 +#: ../NEWS:5340 msgid "" ":gh:`142234`: Allow ``--enable-wasm-dynamic-linking`` for WASI. While " "CPython doesn't directly support it so external/downstream users do not have " "to patch in support for the flag." msgstr "" -#: ../NEWS:5152 +#: ../NEWS:5344 msgid "" ":gh:`142050`: Fixed a bug where JIT stencils produced on Windows contained " "debug data. Patch by Chris Eibl." msgstr "" -#: ../NEWS:5155 +#: ../NEWS:5347 msgid "" ":gh:`141808`: Do not generate the jit stencils twice in case of PGO builds " "on Windows." msgstr "" -#: ../NEWS:5158 +#: ../NEWS:5350 msgid "" ":gh:`141926`: ``RUNSHARED`` is no longer cleared when cross-compiling. " "Previously, ``RUNSHARED`` was cleared when cross-compiling, which breaks PGO " @@ -8805,7 +9108,7 @@ msgid "" "is otherwise executable (e.g., via transparent emulation)." msgstr "" -#: ../NEWS:5163 +#: ../NEWS:5355 msgid "" ":gh:`141808`: When running ``make clean-retain-profile``, keep the generated " "JIT stencils. That way, the stencils are not generated twice when Profile-" @@ -8813,7 +9116,7 @@ msgid "" "their own pre-built JIT stencils." msgstr "" -#: ../NEWS:5168 +#: ../NEWS:5360 msgid "" ":gh:`141784`: Fix ``_remote_debugging_module.c`` compilation on 32-bit " "Linux. Include Python.h before system headers to make sure that " @@ -8821,11 +9124,11 @@ msgid "" "by Victor Stinner." msgstr "" -#: ../NEWS:5173 +#: ../NEWS:5365 msgid ":gh:`141172`: Update to WASI SDK 29." msgstr "" -#: ../NEWS:5175 +#: ../NEWS:5367 msgid "" ":gh:`139707`: Add configure option :option:`--with-missing-stdlib-" "config=FILE` allows which distributors to pass a `JSON ` and :meth:`IPv6Network.hosts() " "` always return an iterator." msgstr "" -#: ../NEWS:5242 +#: ../NEWS:5434 msgid "" ":gh:`140938`: The :func:`statistics.stdev` and :func:`statistics.pstdev` " "functions now raise a :exc:`ValueError` when the input contains an infinity " "or a NaN." msgstr "" -#: ../NEWS:5246 +#: ../NEWS:5438 msgid "" ":gh:`124111`: Updated Tcl threading configuration in :mod:`_tkinter` to " "assume that threads are always available in Tcl 9 and later." msgstr "" -#: ../NEWS:5249 +#: ../NEWS:5441 msgid "" ":gh:`137109`: The :mod:`os.fork` and related forking APIs will no longer " "warn in the common case where Linux or macOS platform APIs return the number " @@ -8936,26 +9239,26 @@ msgid "" "register_at_fork` ``after_in_parent=`` callback (re)starts a thread." msgstr "" -#: ../NEWS:5255 +#: ../NEWS:5447 msgid "" ":gh:`141314`: Fix assertion failure in :meth:`io.TextIOWrapper.tell` when " "reading files with standalone carriage return (``\\r``) line endings." msgstr "" -#: ../NEWS:5258 +#: ../NEWS:5450 msgid "" ":gh:`141311`: Fix assertion failure in :func:`!io.BytesIO.readinto` and " "undefined behavior arising when read position is above capcity in :class:`io." "BytesIO`." msgstr "" -#: ../NEWS:5262 +#: ../NEWS:5454 msgid "" ":gh:`87710`: :mod:`mimetypes`: Update mime type for ``.ai`` files to " "``application/pdf``." msgstr "" -#: ../NEWS:5265 +#: ../NEWS:5457 msgid "" ":gh:`85524`: Update ``io.FileIO.readall``, an implementation of :meth:`io." "RawIOBase.readall`, to follow :class:`io.IOBase` guidelines and raise :exc:" @@ -8963,31 +9266,31 @@ msgid "" "`OSError`" msgstr "" -#: ../NEWS:5270 +#: ../NEWS:5462 msgid "" ":gh:`141141`: Fix a thread safety issue with :func:`base64.b85decode`. " "Contributed by Benel Tayar." msgstr "" -#: ../NEWS:5273 +#: ../NEWS:5465 msgid "" ":gh:`141018`: :mod:`mimetypes`: Update ``.exe``, ``.dll``, ``.rtf`` and " "(when ``strict=False``) ``.jpg`` to their correct IANA mime type." msgstr "" -#: ../NEWS:5276 +#: ../NEWS:5468 msgid "" ":gh:`137969`: Fix :meth:`annotationlib.ForwardRef.evaluate` returning :class:" "`~annotationlib.ForwardRef` objects which don't update with new globals." msgstr "" -#: ../NEWS:5280 +#: ../NEWS:5472 msgid "" ":gh:`75593`: Add support of :term:`path-like objects ` " "and :term:`bytes-like objects ` in :func:`wave.open`." msgstr "" -#: ../NEWS:5283 +#: ../NEWS:5475 msgid "" ":gh:`140797`: The undocumented :class:`!re.Scanner` class now forbids " "regular expressions containing capturing groups in its lexicon patterns. " @@ -8995,103 +9298,103 @@ msgid "" "segmentation fault. Use non-capturing groups (?:...) instead." msgstr "" -#: ../NEWS:5288 +#: ../NEWS:5480 msgid "" ":gh:`125115`: Refactor the :mod:`pdb` parsing issue so positional arguments " "can pass through intuitively." msgstr "" -#: ../NEWS:5291 +#: ../NEWS:5483 msgid "" ":gh:`140815`: :mod:`faulthandler` now detects if a frame or a code object is " "invalid or freed. Patch by Victor Stinner." msgstr "" -#: ../NEWS:5294 +#: ../NEWS:5486 msgid "" ":gh:`100218`: Correctly set :attr:`~OSError.errno` when :func:`socket." "if_nametoindex` or :func:`socket.if_indextoname` raise an :exc:`OSError`. " "Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:5298 +#: ../NEWS:5490 msgid "" ":gh:`140734`: :mod:`multiprocessing`: fix off-by-one error when checking the " "length of a temporary socket file path. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:5301 +#: ../NEWS:5493 msgid "" ":gh:`140873`: Add support of non-:term:`descriptor` callables in :func:" "`functools.singledispatchmethod`." msgstr "" -#: ../NEWS:5304 +#: ../NEWS:5496 msgid "" ":gh:`140874`: Bump the version of pip bundled in ensurepip to version 25.3" msgstr "" -#: ../NEWS:5306 +#: ../NEWS:5498 msgid "" ":gh:`140826`: Now :class:`!winreg.HKEYType` objects are compared by their " "underlying Windows registry handle value instead of their object identity." msgstr "" -#: ../NEWS:5309 +#: ../NEWS:5501 msgid "" ":gh:`140808`: The internal class ``mailbox._ProxyFile`` is no longer a " "parameterized generic." msgstr "" -#: ../NEWS:5312 +#: ../NEWS:5504 msgid "" ":gh:`140691`: In :mod:`urllib.request`, when opening a FTP URL fails because " "a data connection cannot be made, the control connection's socket is now " "closed to avoid a :exc:`ResourceWarning`." msgstr "" -#: ../NEWS:5316 +#: ../NEWS:5508 msgid "" ":gh:`103847`: Fix hang when cancelling process created by :func:`asyncio." "create_subprocess_exec` or :func:`asyncio.create_subprocess_shell`. Patch by " "Kumar Aditya." msgstr "" -#: ../NEWS:5320 +#: ../NEWS:5512 msgid "" ":gh:`137821`: Convert ``_json`` module to use Argument Clinic. Patched by " "Yoonho Hann." msgstr "" -#: ../NEWS:5323 +#: ../NEWS:5515 msgid "" ":gh:`140790`: Initialize all Pdb's instance variables in ``__init__``, " "remove some hasattr/getattr" msgstr "" -#: ../NEWS:5326 +#: ../NEWS:5518 msgid "" ":gh:`140766`: Add :func:`enum.show_flag_values` and ``enum.bin`` to ``enum." "__all__``." msgstr "" -#: ../NEWS:5329 +#: ../NEWS:5521 msgid ":gh:`120057`: Add :func:`os.reload_environ` to ``os.__all__``." msgstr "" -#: ../NEWS:5331 +#: ../NEWS:5523 msgid "" ":gh:`140741`: Fix ``profiling.sampling.sample()`` incorrectly handling a :" "exc:`FileNotFoundError` or :exc:`PermissionError`." msgstr "" -#: ../NEWS:5334 +#: ../NEWS:5526 msgid "" ":gh:`140228`: Avoid making unnecessary filesystem calls for frozen modules " "in :mod:`linecache` when the global module cache is not present." msgstr "" -#: ../NEWS:5337 +#: ../NEWS:5529 msgid "" ":gh:`139946`: Error and warning keywords in ``argparse.ArgumentParser`` " "messages are now colorized when color output is enabled, fixing a visual " @@ -9099,40 +9402,40 @@ msgid "" "colorized." msgstr "" -#: ../NEWS:5342 +#: ../NEWS:5534 msgid "" ":gh:`140590`: Fix arguments checking for the :meth:`!functools.partial." "__setstate__` that may lead to internal state corruption and crash. Patch by " "Sergey Miryanov." msgstr "" -#: ../NEWS:5346 +#: ../NEWS:5538 msgid "" ":gh:`125434`: Display thread name in :mod:`faulthandler` on Windows. Patch " "by Victor Stinner." msgstr "" -#: ../NEWS:5349 +#: ../NEWS:5541 msgid "" ":gh:`140634`: Fix a reference counting bug in :meth:`!os.sched_param." "__reduce__`." msgstr "" -#: ../NEWS:5352 +#: ../NEWS:5544 msgid "" ":gh:`140650`: Fix an issue where closing :class:`io.BufferedWriter` could " "crash if the closed attribute raised an exception on access or could not be " "converted to a boolean." msgstr "" -#: ../NEWS:5356 +#: ../NEWS:5548 msgid "" ":gh:`140633`: Ignore :exc:`AttributeError` when setting a module's " "``__file__`` attribute when loading an extension module packaged as Apple " "Framework." msgstr "" -#: ../NEWS:5360 +#: ../NEWS:5552 msgid "" ":gh:`140601`: :func:`xml.etree.ElementTree.iterparse` now emits a :exc:" "`ResourceWarning` when the iterator is not explicitly closed and was opened " @@ -9140,84 +9443,84 @@ msgid "" "Patch by Osama Abdelkader." msgstr "" -#: ../NEWS:5365 +#: ../NEWS:5557 msgid "" ":gh:`140593`: :mod:`xml.parsers.expat`: Fix a memory leak that could affect " "users with :meth:`~xml.parsers.expat.xmlparser.ElementDeclHandler` set to a " "custom element declaration handler. Patch by Sebastian Pipping." msgstr "" -#: ../NEWS:5369 +#: ../NEWS:5561 msgid "" ":gh:`140607`: Inside :meth:`io.RawIOBase.read`, validate that the count of " "bytes returned by :meth:`io.RawIOBase.readinto` is valid (inside the " "provided buffer)." msgstr "" -#: ../NEWS:5373 +#: ../NEWS:5565 msgid "" ":gh:`138162`: Fix :class:`logging.LoggerAdapter` with ``merge_extra=True`` " "and without the *extra* argument." msgstr "" -#: ../NEWS:5376 +#: ../NEWS:5568 msgid "" ":gh:`140481`: Improve error message when trying to iterate a Tk widget, " "image or font." msgstr "" -#: ../NEWS:5379 +#: ../NEWS:5571 msgid "" ":gh:`138774`: :func:`ast.unparse` now generates full source code when " "handling :class:`ast.Interpolation` nodes that do not have a specified " "source." msgstr "" -#: ../NEWS:5383 +#: ../NEWS:5575 msgid "" ":gh:`140474`: Fix memory leak in :class:`array.array` when creating arrays " "from an empty :class:`str` and the ``u`` type code." msgstr "" -#: ../NEWS:5386 +#: ../NEWS:5578 msgid "" ":gh:`140448`: Change the default of ``suggest_on_error`` to ``True`` in " "``argparse.ArgumentParser``." msgstr "" -#: ../NEWS:5389 +#: ../NEWS:5581 msgid "" ":gh:`137530`: :mod:`dataclasses` Fix annotations for generated ``__init__`` " "methods by replacing the annotations that were in-line in the generated " "source code with ``__annotate__`` functions attached to the methods." msgstr "" -#: ../NEWS:5393 +#: ../NEWS:5585 msgid "" ":gh:`140348`: Fix regression in Python 3.14.0 where using the ``|`` operator " "on a :class:`typing.Union` object combined with an object that is not a type " "would raise an error." msgstr "" -#: ../NEWS:5397 +#: ../NEWS:5589 msgid "" ":gh:`76007`: :mod:`decimal`: Deprecate ``__version__`` and replace with :" "data:`decimal.SPEC_VERSION`." msgstr "" -#: ../NEWS:5400 +#: ../NEWS:5592 msgid "" ":gh:`76007`: Deprecate ``__version__`` from :mod:`imaplib`. Patch by Hugo " "van Kemenade." msgstr "" -#: ../NEWS:5403 +#: ../NEWS:5595 msgid "" ":gh:`140272`: Fix memory leak in the :meth:`!clear` method of the :mod:`dbm." "gnu` database." msgstr "" -#: ../NEWS:5406 +#: ../NEWS:5598 msgid "" ":gh:`129117`: :mod:`unicodedata`: Add :func:`~unicodedata.isxidstart` and :" "func:`~unicodedata.isxidcontinue` functions to check whether a character can " @@ -9225,13 +9528,13 @@ msgid "" "reports/tr31/>`_ identifier." msgstr "" -#: ../NEWS:5411 +#: ../NEWS:5603 msgid "" ":gh:`140251`: Colorize the default import statement ``import asyncio`` in " "asyncio REPL." msgstr "" -#: ../NEWS:5414 +#: ../NEWS:5606 msgid "" ":gh:`140212`: Calendar's HTML formatting now accepts year and month as " "options. Previously, running ``python -m calendar -t html 2025 10`` would " @@ -9239,7 +9542,7 @@ msgid "" "calendar for the specified month. Contributed by Pål Grønås Drange." msgstr "" -#: ../NEWS:5419 +#: ../NEWS:5611 msgid "" ":gh:`135801`: Improve filtering by module in :func:`warnings.warn_explicit` " "if no *module* argument is passed. It now tests the module regular " @@ -9249,25 +9552,25 @@ msgid "" "Windows, ``.pyw`` stripped)." msgstr "" -#: ../NEWS:5426 +#: ../NEWS:5618 msgid "" ":gh:`139707`: Improve :exc:`ModuleNotFoundError` error message when a :term:" "`standard library` module is missing." msgstr "" -#: ../NEWS:5429 +#: ../NEWS:5621 msgid "" ":gh:`140041`: Fix import of :mod:`ctypes` on Android and Cygwin when ABI " "flags are present." msgstr "" -#: ../NEWS:5432 +#: ../NEWS:5624 msgid "" ":gh:`140120`: Fixed a memory leak in :mod:`hmac` when it was using the hacl-" "star backend. Discovered by ``@ashm-dev`` using AddressSanitizer." msgstr "" -#: ../NEWS:5435 +#: ../NEWS:5627 msgid "" ":gh:`140141`: The :py:class:`importlib.metadata.PackageNotFoundError` " "traceback raised when ``importlib.metadata.Distribution.from_name`` cannot " @@ -9275,11 +9578,11 @@ msgid "" "exception trace." msgstr "" -#: ../NEWS:5440 +#: ../NEWS:5632 msgid "Contributed by Bartosz Sławecki in :gh:`140142`." msgstr "" -#: ../NEWS:5442 +#: ../NEWS:5634 msgid "" ":gh:`140166`: :mod:`mimetypes`: Per the `IANA assignment `_, update the MIME type for " @@ -9287,32 +9590,32 @@ msgid "" "instead of ``application/x-texinfo``." msgstr "" -#: ../NEWS:5447 +#: ../NEWS:5639 msgid "" ":gh:`140135`: Speed up :meth:`io.RawIOBase.readall` by using PyBytesWriter " "API (about 4x faster)" msgstr "" -#: ../NEWS:5450 +#: ../NEWS:5642 msgid "" ":gh:`76007`: :mod:`zlib`: Deprecate ``__version__`` and schedule for removal " "in Python 3.20." msgstr "" -#: ../NEWS:5453 +#: ../NEWS:5645 msgid "" ":gh:`136702`: :mod:`encodings`: Deprecate passing a non-ascii *encoding* " "name to :func:`encodings.normalize_encoding` and schedule removal of support " "for Python 3.17." msgstr "" -#: ../NEWS:5457 +#: ../NEWS:5649 msgid "" ":gh:`139940`: Print clearer error message when using ``pdb`` to attach to a " "non-existing process." msgstr "" -#: ../NEWS:5460 +#: ../NEWS:5652 msgid "" ":gh:`139462`: When a child process in a :class:`concurrent.futures." "ProcessPoolExecutor` terminates abruptly, the resulting traceback will now " @@ -9320,97 +9623,97 @@ msgid "" "Jonathan Berg." msgstr "" -#: ../NEWS:5465 +#: ../NEWS:5657 msgid "" ":gh:`63161`: Fix :func:`tokenize.detect_encoding`. Support non-UTF-8 shebang " "and comments if non-UTF-8 encoding is specified. Detect decoding error for " "non-UTF-8 encoding. Detect null bytes in source code." msgstr "" -#: ../NEWS:5469 +#: ../NEWS:5661 msgid "" ":gh:`101828`: Fix ``'shift_jisx0213'``, ``'shift_jis_2004'``, " "``'euc_jisx0213'`` and ``'euc_jis_2004'`` codecs truncating null chars as " "they were treated as part of multi-character sequences." msgstr "" -#: ../NEWS:5473 +#: ../NEWS:5665 msgid ":gh:`139246`: fix: paste zero-width in default repl width is wrong." msgstr "" -#: ../NEWS:5475 +#: ../NEWS:5667 msgid "" ":gh:`83714`: Implement :func:`os.statx` on Linux kernel versions 4.11 and " "later with glibc versions 2.28 and later. Contributed by Jeffrey Bosboom " "and Victor Stinner." msgstr "" -#: ../NEWS:5479 +#: ../NEWS:5671 msgid "" ":gh:`138891`: Fix ``SyntaxError`` when ``inspect.get_annotations(f, " "eval_str=True)`` is called on a function annotated with a :pep:`646` " "``star_expression``" msgstr "" -#: ../NEWS:5483 +#: ../NEWS:5675 msgid "" ":gh:`138859`: Fix generic type parameterization raising a :exc:`TypeError` " "when omitting a :class:`ParamSpec` that has a default which is not a list of " "types." msgstr "" -#: ../NEWS:5487 +#: ../NEWS:5679 msgid "" ":gh:`138764`: Prevent :func:`annotationlib.call_annotate_function` from " "calling ``__annotate__`` functions that don't support " "``VALUE_WITH_FAKE_GLOBALS`` in a fake globals namespace with empty globals." msgstr "" -#: ../NEWS:5492 +#: ../NEWS:5684 msgid "" "Make ``FORWARDREF`` and ``STRING`` annotations fall back to using ``VALUE`` " "annotations in the case that neither their own format, nor " "``VALUE_WITH_FAKE_GLOBALS`` are supported." msgstr "" -#: ../NEWS:5496 +#: ../NEWS:5688 msgid "" ":gh:`138775`: Use of ``python -m`` with :mod:`base64` has been fixed to " "detect input from a terminal so that it properly notices EOF." msgstr "" -#: ../NEWS:5499 +#: ../NEWS:5691 msgid "" ":gh:`98896`: Fix a failure in multiprocessing resource_tracker when " "SharedMemory names contain colons. Patch by Rani Pinchuk." msgstr "" -#: ../NEWS:5502 +#: ../NEWS:5694 msgid "" ":gh:`138425`: Fix partial evaluation of :class:`annotationlib.ForwardRef` " "objects which rely on names defined as globals." msgstr "" -#: ../NEWS:5505 +#: ../NEWS:5697 msgid "" ":gh:`138151`: In :mod:`annotationlib`, improve evaluation of forward " "references to nonlocal variables that are not yet defined when the " "annotations are initially evaluated." msgstr "" -#: ../NEWS:5509 +#: ../NEWS:5701 msgid "" ":gh:`69528`: The :attr:`~io.FileIO.mode` attribute of files opened in the " "``'wb+'`` mode is now ``'wb+'`` instead of ``'rb+'``." msgstr "" -#: ../NEWS:5512 +#: ../NEWS:5704 msgid "" ":gh:`137627`: Speed up :meth:`csv.Sniffer.sniff` delimiter detection by up " "to 1.6x." msgstr "" -#: ../NEWS:5515 +#: ../NEWS:5707 msgid "" ":gh:`55531`: :mod:`encodings`: Improve :func:`~encodings.normalize_encoding` " "performance by implementing the function in C using the private " @@ -9418,57 +9721,57 @@ msgid "" "conversion optional." msgstr "" -#: ../NEWS:5520 +#: ../NEWS:5712 msgid "" ":gh:`136057`: Fixed the bug in :mod:`pdb` and :mod:`bdb` where ``next`` and " "``step`` can't go over the line if a loop exists in the line." msgstr "" -#: ../NEWS:5523 +#: ../NEWS:5715 msgid "" ":gh:`133390`: Support table, index, trigger, view, column, function, and " "schema completion for :mod:`sqlite3`'s :ref:`command-line interface `." msgstr "" -#: ../NEWS:5527 +#: ../NEWS:5719 msgid "" ":gh:`135307`: :mod:`email`: Fix exception in ``set_content()`` when encoding " "text and max_line_length is set to ``0`` or ``None`` (unlimited)." msgstr "" -#: ../NEWS:5530 +#: ../NEWS:5722 msgid "" ":gh:`133789`: Fix unpickling of :mod:`pathlib` objects that were pickled in " "Python 3.13." msgstr "" -#: ../NEWS:5533 +#: ../NEWS:5725 msgid "" ":gh:`133601`: Remove deprecated :func:`!typing.no_type_check_decorator`." msgstr "" -#: ../NEWS:5535 +#: ../NEWS:5727 msgid "" ":gh:`132686`: Add parameters *inherit_class_doc* and *fallback_to_class_doc* " "for :func:`inspect.getdoc`." msgstr "" -#: ../NEWS:5538 +#: ../NEWS:5730 msgid "" ":gh:`131116`: :func:`inspect.getdoc` now correctly returns an inherited " "docstring on :class:`~functools.cached_property` objects if none is given in " "a subclass." msgstr "" -#: ../NEWS:5542 +#: ../NEWS:5734 msgid "" ":gh:`130693`: Add support for ``-nolinestop``, and ``-strictlimits`` options " "to :meth:`!tkinter.Text.search`. Also add the :meth:`!tkinter.Text." "search_all` method for ``-all`` and ``-overlap`` options." msgstr "" -#: ../NEWS:5547 +#: ../NEWS:5739 msgid "" ":gh:`122255`: In the :mod:`linecache` module and in the Python " "implementation of the :mod:`warnings` module, a ``DeprecationWarning`` is " @@ -9476,162 +9779,162 @@ msgid "" "the C implementation of the :mod:`!warnings` module)." msgstr "" -#: ../NEWS:5552 +#: ../NEWS:5744 msgid "" ":gh:`121011`: :func:`math.log` now supports arbitrary large integer-like " "arguments in the same way as arbitrary large integer arguments." msgstr "" -#: ../NEWS:5555 +#: ../NEWS:5747 msgid "" ":gh:`119668`: Publicly expose and document :class:`importlib.machinery." "NamespacePath`." msgstr "" -#: ../NEWS:5558 +#: ../NEWS:5750 msgid "" ":gh:`102431`: Clarify constraints for \"logical\" arguments in methods of :" "class:`decimal.Context`." msgstr "" -#: ../NEWS:5561 +#: ../NEWS:5753 msgid ":gh:`81313`: Add the :mod:`math.integer` module (:pep:`791`)." msgstr "" -#: ../NEWS:5566 +#: ../NEWS:5758 msgid "" ":gh:`141579`: Fix :func:`sys.activate_stack_trampoline` to properly support " "the ``perf_jit`` backend. Patch by Pablo Galindo." msgstr "" -#: ../NEWS:5569 +#: ../NEWS:5761 msgid "" ":gh:`114203`: Skip locking if object is already locked by two-mutex critical " "section." msgstr "" -#: ../NEWS:5572 +#: ../NEWS:5764 msgid "" ":gh:`141528`: Suggest using :meth:`concurrent.interpreters.Interpreter." "close` instead of the private ``_interpreters.destroy`` function when " "warning about remaining subinterpreters. Patch by Sergey Miryanov." msgstr "" -#: ../NEWS:5576 +#: ../NEWS:5768 msgid "" ":gh:`141367`: Specialize ``CALL_LIST_APPEND`` instruction only for lists, " "not for list subclasses, to avoid unnecessary deopt. Patch by Mikhail Efimov." msgstr "" -#: ../NEWS:5579 +#: ../NEWS:5771 msgid "" ":gh:`141312`: Fix the assertion failure in the ``__setstate__`` method of " "the range iterator when a non-integer argument is passed. Patch by Sergey " "Miryanov." msgstr "" -#: ../NEWS:5583 +#: ../NEWS:5775 msgid "" ":gh:`140643`: Add support for ```` and ```` frames to :mod:`!" "profiling.sampling` output to denote active garbage collection and calls to " "native code." msgstr "" -#: ../NEWS:5590 +#: ../NEWS:5782 msgid "" ":gh:`140942`: Add ``.cjs`` to :mod:`mimetypes` to give CommonJS modules a " "MIME type of ``application/node``." msgstr "" -#: ../NEWS:5596 +#: ../NEWS:5788 msgid ":gh:`140479`: Update JIT compilation to use LLVM 21 at build time." msgstr "" -#: ../NEWS:5598 +#: ../NEWS:5790 msgid "" ":gh:`140939`: Fix memory leak when :class:`bytearray` or :class:`bytes` is " "formated with the ``%*b`` format with a large width that results in a :exc:" "`MemoryError`." msgstr "" -#: ../NEWS:5605 +#: ../NEWS:5797 msgid "" ":gh:`140260`: Fix :mod:`struct` data race in endian table initialization " "with subinterpreters. Patch by Shamil Abdulaev." msgstr "" -#: ../NEWS:5611 +#: ../NEWS:5803 msgid "" ":gh:`140530`: Fix a reference leak when ``raise exc from cause`` fails. " "Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:5617 +#: ../NEWS:5809 msgid "" ":gh:`90344`: Replace :class:`io.IncrementalNewlineDecoder` with non " "incremental newline decoders in codebase where :meth:`!io." "IncrementalNewlineDecoder.decode` was being called once." msgstr "" -#: ../NEWS:5624 +#: ../NEWS:5816 msgid "" ":gh:`140373`: Correctly emit ``PY_UNWIND`` event when generator object is " "closed. Patch by Mikhail Efimov." msgstr "" -#: ../NEWS:5627 +#: ../NEWS:5819 msgid "" ":gh:`140729`: Fix pickling error in the sampling profiler when using " "``concurrent.futures.ProcessPoolExecutor`` script can not be properly " "pickled and executed in worker processes." msgstr "" -#: ../NEWS:5631 +#: ../NEWS:5823 msgid "" ":gh:`131527`: Dynamic borrow checking for stackrefs is added to " "``Py_STACKREF_DEBUG`` mode. Patch by Mikhail Efimov." msgstr "" -#: ../NEWS:5634 +#: ../NEWS:5826 msgid "" ":gh:`140576`: Fixed crash in :func:`tokenize.generate_tokens` in case of " "specific incorrect input. Patch by Mikhail Efimov." msgstr "" -#: ../NEWS:5637 +#: ../NEWS:5829 msgid "" ":gh:`140544`: Speed up accessing interpreter state by caching it in a thread " "local variable. Patch by Kumar Aditya." msgstr "" -#: ../NEWS:5640 +#: ../NEWS:5832 msgid "" ":gh:`140551`: Fixed crash in :class:`dict` if :meth:`dict.clear` is called " "at the lookup stage. Patch by Mikhail Efimov and Inada Naoki." msgstr "" -#: ../NEWS:5643 +#: ../NEWS:5835 msgid "" ":gh:`140517`: Fixed a reference leak when iterating over the result of :func:" "`map` with ``strict=True`` when the input iterables have different lengths. " "Patch by Mikhail Efimov." msgstr "" -#: ../NEWS:5647 +#: ../NEWS:5839 msgid "" ":gh:`133467`: Fix race when updating :attr:`!type.__bases__` that could " "allow a read of :attr:`!type.__base__` to observe an inconsistent value on " "the free threaded build." msgstr "" -#: ../NEWS:5651 +#: ../NEWS:5843 msgid "" ":gh:`140471`: Fix potential buffer overflow in :class:`ast.AST` node " "initialization when encountering malformed :attr:`~ast.AST._fields` " "containing non-:class:`str`." msgstr "" -#: ../NEWS:5658 +#: ../NEWS:5850 msgid "" ":gh:`140443`: The logarithm functions (such as :func:`math.log10` and :func:" "`math.log`) may now produce slightly different results for extremely large " @@ -9640,7 +9943,7 @@ msgid "" "overall error distribution." msgstr "" -#: ../NEWS:5667 +#: ../NEWS:5859 msgid "" ":gh:`140431`: Fix a crash in Python's :term:`garbage collector ` due to partially initialized :term:`coroutine` objects when " @@ -9648,20 +9951,20 @@ msgid "" "set_coroutine_origin_tracking_depth`)." msgstr "" -#: ../NEWS:5672 +#: ../NEWS:5864 msgid "" ":gh:`140476`: Optimize :c:func:`PySet_Add` for :class:`frozenset` in :term:" "`free threaded ` build." msgstr "" -#: ../NEWS:5675 +#: ../NEWS:5867 msgid "" ":gh:`135904`: Add special labels to the assembly created during stencil " "creation to support relocations that the native object file format does not " "support. Specifically, 19 bit branches for AArch64 in Mach-O object files." msgstr "" -#: ../NEWS:5683 +#: ../NEWS:5875 msgid "" ":gh:`140398`: Fix memory leaks in :mod:`readline` functions :func:`~readline." "read_init_file`, :func:`~readline.read_history_file`, :func:`~readline." @@ -9669,13 +9972,13 @@ msgid "" "`PySys_Audit` fails." msgstr "" -#: ../NEWS:5691 +#: ../NEWS:5883 msgid "" ":gh:`140406`: Fix memory leak when an object's :meth:`~object.__hash__` " "method returns an object that isn't an :class:`int`." msgstr "" -#: ../NEWS:5694 +#: ../NEWS:5886 msgid "" ":gh:`140358`: Restore elapsed time and unreachable object count in GC debug " "output. These were inadvertently removed during a refactor of ``gc.c``. The " @@ -9683,112 +9986,112 @@ msgid "" "unreachable objects. Contributed by Pål Grønås Drange." msgstr "" -#: ../NEWS:5699 +#: ../NEWS:5891 msgid ":gh:`136895`: Update JIT compilation to use LLVM 20 at build time." msgstr "" -#: ../NEWS:5701 +#: ../NEWS:5893 msgid "" ":gh:`139109`: A new tracing frontend for the JIT compiler has been " "implemented. Patch by Ken Jin. Design for CPython by Ken Jin, Mark Shannon " "and Brandt Bucher." msgstr "" -#: ../NEWS:5705 +#: ../NEWS:5897 msgid "" ":gh:`140306`: Fix memory leaks in cross-interpreter channel operations and " "shared namespace handling." msgstr "" -#: ../NEWS:5708 +#: ../NEWS:5900 msgid "" ":gh:`116738`: Make _suggestions module thread-safe on the :term:`free " "threaded ` build." msgstr "" -#: ../NEWS:5711 +#: ../NEWS:5903 msgid ":gh:`140301`: Fix memory leak of ``PyConfig`` in subinterpreters." msgstr "" -#: ../NEWS:5713 +#: ../NEWS:5905 msgid "" ":gh:`140257`: Fix data race between interpreter_clear() and take_gil() on " "eval_breaker during finalization with daemon threads." msgstr "" -#: ../NEWS:5716 +#: ../NEWS:5908 msgid "" ":gh:`139951`: Fixes a regression in GC performance for a growing heap " "composed mostly of small tuples." msgstr "" -#: ../NEWS:5719 +#: ../NEWS:5911 msgid "" "Counts number of actually tracked objects, instead of trackable objects. " "This ensures that untracking tuples has the desired effect of reducing GC " "overhead." msgstr "" -#: ../NEWS:5721 +#: ../NEWS:5913 msgid "" "Does not track most untrackable tuples during creation. This prevents large " "numbers of small tuples causing excessive GCs." msgstr "" -#: ../NEWS:5724 +#: ../NEWS:5916 msgid "" ":gh:`140253`: Wrong placement of a double-star pattern inside a mapping " "pattern now throws a specialized syntax error. Contributed by Bartosz " "Sławecki in :gh:`140253`." msgstr "" -#: ../NEWS:5728 +#: ../NEWS:5920 msgid "" ":gh:`140104`: Fix a bug with exception handling in the JIT. Patch by Ken " "Jin. Bug reported by Daniel Diniz." msgstr "" -#: ../NEWS:5731 +#: ../NEWS:5923 msgid "" ":gh:`140149`: Speed up parsing bytes literals concatenation by using " "PyBytesWriter API and a single memory allocation (about 3x faster)." msgstr "" -#: ../NEWS:5734 +#: ../NEWS:5926 msgid "" ":gh:`140061`: Fixing the checking of whether an object is uniquely " "referenced to ensure free-threaded compatibility. Patch by Sergey Miryanov." msgstr "" -#: ../NEWS:5737 +#: ../NEWS:5929 msgid "" ":gh:`140080`: Fix hang during finalization when attempting to call :mod:" "`atexit` handlers under no memory." msgstr "" -#: ../NEWS:5740 +#: ../NEWS:5932 msgid "" ":gh:`139871`: Update :class:`bytearray` to use a :class:`bytes` under the " "hood as its buffer and add :meth:`bytearray.take_bytes` to take it out." msgstr "" -#: ../NEWS:5743 +#: ../NEWS:5935 msgid ":gh:`140067`: Fix memory leak in sub-interpreter creation." msgstr "" -#: ../NEWS:5745 +#: ../NEWS:5937 msgid "" ":gh:`139914`: Restore support for HP PA-RISC, which has an upwards-growing " "stack." msgstr "" -#: ../NEWS:5748 +#: ../NEWS:5940 msgid "" ":gh:`139817`: Attribute ``__qualname__`` is added to :class:`typing." "TypeAliasType`. Patch by Mikhail Efimov." msgstr "" -#: ../NEWS:5751 +#: ../NEWS:5943 msgid "" ":gh:`135801`: Many functions related to compiling or parsing Python code, " "such as :func:`compile`, :func:`ast.parse`, :func:`symtable.symtable`, and :" @@ -9797,78 +10100,78 @@ msgid "" "syntax warnings by module name." msgstr "" -#: ../NEWS:5757 +#: ../NEWS:5949 msgid "" ":gh:`139640`: :func:`ast.parse` no longer emits syntax warnings for " "``return``/``break``/``continue`` in ``finally`` (see :pep:`765`) -- they " "are only emitted during compilation." msgstr "" -#: ../NEWS:5761 +#: ../NEWS:5953 msgid "" ":gh:`139640`: Fix swallowing some syntax warnings in different modules if " "they accidentally have the same message and are emitted from the same line. " "Fix duplicated warnings in the ``finally`` block." msgstr "" -#: ../NEWS:5765 +#: ../NEWS:5957 msgid "" ":gh:`139475`: Changes in stackref debugging mode when ``Py_STACKREF_DEBUG`` " "is set. We use the same pattern of refcounting for stackrefs as in " "production build." msgstr "" -#: ../NEWS:5769 +#: ../NEWS:5961 msgid "" ":gh:`139269`: Fix undefined behavior when using unaligned store in JIT's " "``patch_*`` functions." msgstr "" -#: ../NEWS:5772 +#: ../NEWS:5964 msgid "" ":gh:`138944`: Fix :exc:`SyntaxError` message when invalid syntax appears on " "the same line as a valid ``import ... as ...`` or ``from ... import ... " "as ...`` statement. Patch by Brian Schubert." msgstr "" -#: ../NEWS:5776 +#: ../NEWS:5968 msgid "" ":gh:`138857`: Improve :exc:`SyntaxError` message for ``case`` keyword placed " "outside :keyword:`match` body." msgstr "" -#: ../NEWS:5779 +#: ../NEWS:5971 msgid "" ":gh:`131253`: Support the ``--enable-pystats`` build option for the free-" "threaded build." msgstr "" -#: ../NEWS:5782 +#: ../NEWS:5974 msgid "" ":gh:`136327`: Errors when calling functions with invalid values after ``*`` " "and ``**`` now do not include the function name. Patch by Ilia Solin." msgstr "" -#: ../NEWS:5785 +#: ../NEWS:5977 msgid "" ":gh:`134786`: If :c:macro:`Py_TPFLAGS_MANAGED_DICT` and :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` are used, then :c:macro:`Py_TPFLAGS_HAVE_GC` " "must be used as well." msgstr "" -#: ../NEWS:5792 +#: ../NEWS:5984 msgid "" ":gh:`141341`: On Windows, rename the ``COMPILER`` macro to ``_Py_COMPILER`` " "to avoid name conflicts. Patch by Victor Stinner." msgstr "" -#: ../NEWS:5795 +#: ../NEWS:5987 msgid "" ":gh:`116146`: Add a new :c:func:`PyImport_CreateModuleFromInitfunc` C-API " "for creating a module from a *spec* and *initfunc*. Patch by Itamar Oren." msgstr "" -#: ../NEWS:5798 +#: ../NEWS:5990 msgid "" ":gh:`141042`: Make qNaN in :c:func:`PyFloat_Pack2` and :c:func:" "`PyFloat_Pack4`, if while conversion to a narrower precision floating-point " @@ -9876,37 +10179,37 @@ msgid "" "Sergey B Kirpichev." msgstr "" -#: ../NEWS:5803 +#: ../NEWS:5995 msgid "" ":gh:`141004`: :c:macro:`!Py_MATH_El` and :c:macro:`!Py_MATH_PIl` are " "deprecated." msgstr "" -#: ../NEWS:5806 +#: ../NEWS:5998 msgid "" ":gh:`141004`: The :c:macro:`!Py_INFINITY` macro is :term:`soft deprecated`." msgstr "" -#: ../NEWS:5808 +#: ../NEWS:6000 msgid "" ":gh:`140556`: :pep:`793`: Add a new entry point for C extension modules, " "``PyModExport_``." msgstr "" -#: ../NEWS:5811 +#: ../NEWS:6003 msgid "" ":gh:`140487`: Fix :c:macro:`Py_RETURN_NOTIMPLEMENTED` in limited C API 3.11 " "and older: don't treat ``Py_NotImplemented`` as immortal. Patch by Victor " "Stinner." msgstr "" -#: ../NEWS:5815 +#: ../NEWS:6007 msgid "" ":gh:`140153`: Fix :c:func:`Py_REFCNT` definition on limited C API 3.11-3.13. " "Patch by Victor Stinner." msgstr "" -#: ../NEWS:5818 +#: ../NEWS:6010 msgid "" ":gh:`139653`: Add :c:func:`PyUnstable_ThreadState_SetStackProtection` and :c:" "func:`PyUnstable_ThreadState_ResetStackProtection` functions to set the " @@ -9914,125 +10217,125 @@ msgid "" "state. Patch by Victor Stinner." msgstr "" -#: ../NEWS:5826 +#: ../NEWS:6018 msgid "" ":gh:`140454`: When building the JIT, match the jit_stencils filename " "expectations in Makefile with the generator script. This avoid needless JIT " "recompilation during ``make install``." msgstr "" -#: ../NEWS:5830 +#: ../NEWS:6022 msgid "" ":gh:`140768`: Warn when the WASI SDK version doesn't match what's supported." msgstr "" -#: ../NEWS:5832 +#: ../NEWS:6024 msgid "" ":gh:`140513`: Generate a clear compilation error when " "``_Py_TAIL_CALL_INTERP`` is enabled but either ``preserve_none`` or " "``musttail`` is not supported." msgstr "" -#: ../NEWS:5836 +#: ../NEWS:6028 msgid ":gh:`140475`: Support WASI SDK 25." msgstr "" -#: ../NEWS:5838 +#: ../NEWS:6030 msgid "" ":gh:`140239`: Check ``statx`` availability only on Linux (including Android)." msgstr "" -#: ../NEWS:5840 +#: ../NEWS:6032 msgid ":gh:`140189`: iOS builds were added to CI." msgstr "" -#: ../NEWS:5842 +#: ../NEWS:6034 msgid "" ":gh:`137618`: ``PYTHON_FOR_REGEN`` now requires Python 3.10 to Python 3.15. " "Patch by Adam Turner." msgstr "" -#: ../NEWS:5847 +#: ../NEWS:6039 msgid "Python 3.15.0 alpha 1" msgstr "" -#: ../NEWS:5849 +#: ../NEWS:6041 msgid "*Release date: 2025-10-14*" msgstr "" -#: ../NEWS:5854 +#: ../NEWS:6046 msgid ":gh:`115119`: Update macOS installer to use libmpdecimal 4.0.1." msgstr "" -#: ../NEWS:5856 +#: ../NEWS:6048 msgid ":gh:`124111`: Update macOS installer to use Tcl/Tk 9.0.2." msgstr "" -#: ../NEWS:5858 +#: ../NEWS:6050 msgid ":gh:`132339`: Update macOS installer version of OpenSSL to 3.5.4." msgstr "" -#: ../NEWS:5860 +#: ../NEWS:6052 msgid "" ":gh:`137450`: macOS installer shell path management improvements: separate " "the installer ``Shell profile updater`` postinstall script from the ``Update " "Shell Profile.command`` to enable more robust error handling." msgstr "" -#: ../NEWS:5864 +#: ../NEWS:6056 msgid "" ":gh:`137134`: Update macOS installer to ship with SQLite version 3.50.4." msgstr "" -#: ../NEWS:5869 +#: ../NEWS:6061 msgid "" ":gh:`139810`: Installing with ``py install 3[.x]-dev`` will now select final " "versions as well as prereleases." msgstr "" -#: ../NEWS:5872 +#: ../NEWS:6064 msgid ":gh:`139573`: Updated bundled version of OpenSSL to 3.0.18." msgstr "" -#: ../NEWS:5874 +#: ../NEWS:6066 msgid "" ":gh:`138896`: Fix error installing C runtime on non-updated Windows machines" msgstr "" -#: ../NEWS:5876 +#: ../NEWS:6068 msgid ":gh:`138314`: Add :func:`winreg.DeleteTree`." msgstr "" -#: ../NEWS:5878 +#: ../NEWS:6070 msgid "" ":gh:`137136`: Suppress build warnings when build on Windows with ``--" "experimental-jit-interpreter``." msgstr "" -#: ../NEWS:5881 +#: ../NEWS:6073 msgid ":gh:`137134`: Update Windows installer to ship with SQLite 3.50.4." msgstr "" -#: ../NEWS:5883 +#: ../NEWS:6075 msgid "" ":gh:`135099`: Fix a crash that could occur on Windows when a background " "thread waits on a :c:type:`PyMutex` while the main thread is shutting down " "the interpreter." msgstr "" -#: ../NEWS:5887 +#: ../NEWS:6079 msgid "" ":gh:`130727`: Fix a race in internal calls into WMI that can result in an " "\"invalid handle\" exception under high load. Patch by Chris Eibl." msgstr "" -#: ../NEWS:5890 +#: ../NEWS:6082 msgid "" ":gh:`76023`: Make :func:`os.path.realpath` ignore Windows error 1005 when in " "non-strict mode." msgstr "" -#: ../NEWS:5893 +#: ../NEWS:6085 msgid "" ":gh:`133779`: Reverts the change to generate different :file:`pyconfig.h` " "files based on compiler settings, as it was frequently causing extension " @@ -10043,113 +10346,113 @@ msgid "" "with that flag or not." msgstr "" -#: ../NEWS:5901 +#: ../NEWS:6093 msgid "" ":gh:`133626`: Ensures packages are not accidentally bundled into the " "traditional installer." msgstr "" -#: ../NEWS:5904 +#: ../NEWS:6096 msgid "" ":gh:`133580`: Fix :func:`sys.getwindowsversion` failing without setting an " "exception when called on some WinAPI partitions." msgstr "" -#: ../NEWS:5907 +#: ../NEWS:6099 msgid "" ":gh:`133572`: Avoid LsaNtStatus to WinError conversion on unsupported WinAPI " "partitions." msgstr "" -#: ../NEWS:5910 +#: ../NEWS:6102 msgid "" ":gh:`133568`: Fix compile error when using a WinAPI partition that doesn't " "support the RPC runtime library." msgstr "" -#: ../NEWS:5913 +#: ../NEWS:6105 msgid "" ":gh:`133562`: Disable handling of security descriptors by :func:`os.mkdir` " "with mode ``0o700`` on WinAPI partitions that do not support it. This only " "affects custom builds for specialized targets." msgstr "" -#: ../NEWS:5917 +#: ../NEWS:6109 msgid "" ":gh:`133537`: Avoid using console I/O in WinAPI partitions that don’t " "support it" msgstr "" -#: ../NEWS:5920 +#: ../NEWS:6112 msgid "" ":gh:`131942`: Use the Python-specific :c:macro:`Py_DEBUG` macro rather than :" "c:macro:`!_DEBUG` in Windows-related C code. Patch by Xuehai Pan." msgstr "" -#: ../NEWS:5926 +#: ../NEWS:6118 msgid "" ":gh:`139330`: SBOM generation tool didn't cross-check the version and " "checksum values against the ``Modules/expat/refresh.sh`` script, leading to " "the values becoming out-of-date during routine updates." msgstr "" -#: ../NEWS:5930 +#: ../NEWS:6122 msgid "" ":gh:`132006`: XCframeworks now include privacy manifests to satisfy Apple " "App Store submission requirements." msgstr "" -#: ../NEWS:5933 +#: ../NEWS:6125 msgid "" ":gh:`138171`: A script for building an iOS XCframework was added. As part of " "this change, the top level ``iOS`` folder has been moved to be a " "subdirectory of the ``Apple`` folder." msgstr "" -#: ../NEWS:5937 +#: ../NEWS:6129 msgid "" ":gh:`137873`: The iOS test runner has been simplified, resolving some issues " "that have been observed using the runner in GitHub Actions and Azure " "Pipelines test environments." msgstr "" -#: ../NEWS:5941 +#: ../NEWS:6133 msgid "" ":gh:`137484`: Have ``Tools/wasm/wasi`` put the build Python into a directory " "named after the build triple instead of \"build\"." msgstr "" -#: ../NEWS:5944 +#: ../NEWS:6136 msgid "" ":gh:`137025`: The ``wasm_build.py`` script has been removed. ``Tools/wasm/" "emscripten`` and ``Tools/wasm/wasi`` should be used instead, as described in " "the `Dev Guide `__." msgstr "" -#: ../NEWS:5949 +#: ../NEWS:6141 msgid "" ":gh:`137248`: Add a ``--logdir`` option to ``Tools/wasm/wasi`` for " "specifying where to write log files." msgstr "" -#: ../NEWS:5952 +#: ../NEWS:6144 msgid "" ":gh:`137243`: Have Tools/wasm/wasi detect a WASI SDK install in /opt when it " "was directly extracted from a release tarball." msgstr "" -#: ../NEWS:5955 +#: ../NEWS:6147 msgid "" ":gh:`136251`: Fixes and usability improvements for ``Tools/wasm/emscripten/" "web_example``" msgstr "" -#: ../NEWS:5958 +#: ../NEWS:6150 msgid "" ":gh:`135968`: Stubs for ``strip`` are now provided as part of an iOS install." msgstr "" -#: ../NEWS:5960 +#: ../NEWS:6152 msgid "" ":gh:`135379`: The cases generator no longer accepts type annotations on " "stack items. Conversions to non-default types are now done explicitly in " @@ -10157,94 +10460,94 @@ msgid "" "for top-of-stack caching and other future features." msgstr "" -#: ../NEWS:5965 +#: ../NEWS:6157 msgid "" ":gh:`134215`: :term:`REPL` import autocomplete only suggests private modules " "when explicitly specified." msgstr "" -#: ../NEWS:5971 +#: ../NEWS:6163 msgid "" ":gh:`139208`: Fix regrtest ``--fast-ci --verbose``: don't ignore the ``--" "verbose`` option anymore. Patch by Victor Stinner." msgstr "" -#: ../NEWS:5974 +#: ../NEWS:6166 msgid "" ":gh:`138313`: Restore skipped test and add janky workaround to prevent " "select buildbots from failing with a ResourceWarning." msgstr "" -#: ../NEWS:5977 +#: ../NEWS:6169 msgid "" ":gh:`135966`: The iOS testbed now handles the ``app_packages`` folder as a " "site directory." msgstr "" -#: ../NEWS:5980 +#: ../NEWS:6172 msgid "" ":gh:`135494`: Fix regrtest to support excluding tests from ``--pgo`` tests. " "Patch by Victor Stinner." msgstr "" -#: ../NEWS:5983 +#: ../NEWS:6175 msgid "" ":gh:`132815`: Fix test__opcode: add ``JUMP_BACKWARD`` to specialization " "stats." msgstr "" -#: ../NEWS:5986 +#: ../NEWS:6178 msgid "" ":gh:`135489`: Show verbose output for failing tests during PGO profiling " "step with --enable-optimizations." msgstr "" -#: ../NEWS:5989 +#: ../NEWS:6181 msgid "" ":gh:`135401`: Add a new GitHub CI job to test the :mod:`ssl` module with " "`AWS-LC `_ as the backing cryptography and " "TLS library." msgstr "" -#: ../NEWS:5993 +#: ../NEWS:6185 msgid ":gh:`135120`: Add :func:`!test.support.subTests`." msgstr "" -#: ../NEWS:5995 +#: ../NEWS:6187 msgid "" ":gh:`134567`: Expose log formatter to users in TestCase.assertLogs. :func:" "`unittest.TestCase.assertLogs` will now optionally accept a formatter that " "will be used to format the strings in output if provided." msgstr "" -#: ../NEWS:5999 +#: ../NEWS:6191 msgid "" ":gh:`133744`: Fix multiprocessing interrupt test. Add an event to " "synchronize the parent process with the child process: wait until the child " "process starts sleeping. Patch by Victor Stinner." msgstr "" -#: ../NEWS:6003 +#: ../NEWS:6195 msgid "" ":gh:`133682`: Fixed test case ``test.test_annotationlib.TestStringFormat." "test_displays`` which ensures proper handling of complex data structures " "(lists, sets, dictionaries, and tuples) in string annotations." msgstr "" -#: ../NEWS:6008 +#: ../NEWS:6200 msgid "" ":gh:`133639`: Fix ``TestPyReplAutoindent.test_auto_indent_default()`` " "doesn't run ``input_code``." msgstr "" -#: ../NEWS:6014 +#: ../NEWS:6206 msgid "" ":gh:`139700`: Check consistency of the zip64 end of central directory " "record. Support records with \"zip64 extensible data\" if there are no bytes " "prepended to the ZIP file." msgstr "" -#: ../NEWS:6018 +#: ../NEWS:6210 msgid "" ":gh:`139400`: :mod:`xml.parsers.expat`: Make sure that parent Expat parsers " "are only garbage-collected once they are no longer referenced by subparsers " @@ -10252,7 +10555,7 @@ msgid "" "Patch by Sebastian Pipping." msgstr "" -#: ../NEWS:6024 +#: ../NEWS:6216 msgid "" ":gh:`139283`: :mod:`sqlite3`: correctly handle maximum number of rows to " "fetch in :meth:`Cursor.fetchmany ` and reject " @@ -10260,54 +10563,54 @@ msgid "" "Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6029 +#: ../NEWS:6221 msgid "" ":gh:`136053`: :mod:`marshal`: fix a possible crash when deserializing :class:" "`slice` objects." msgstr "" -#: ../NEWS:6032 +#: ../NEWS:6224 msgid "" ":gh:`135661`: Fix parsing start and end tags in :class:`html.parser." "HTMLParser` according to the HTML5 standard." msgstr "" -#: ../NEWS:6035 +#: ../NEWS:6227 msgid "" "Whitespaces no longer accepted between ```` does not end the script section." msgstr "" -#: ../NEWS:6038 +#: ../NEWS:6230 msgid "" "Vertical tabulation (``\\v``) and non-ASCII whitespaces no longer recognized " "as whitespaces. The only whitespaces are ``\\t\\n\\r\\f`` and space." msgstr "" -#: ../NEWS:6041 +#: ../NEWS:6233 msgid "Null character (U+0000) no longer ends the tag name." msgstr "" -#: ../NEWS:6043 +#: ../NEWS:6235 msgid "" "Attributes and slashes after the tag name in end tags are now ignored, " "instead of terminating after the first ``>`` in quoted attribute value. E.g. " "``\"/>``." msgstr "" -#: ../NEWS:6047 +#: ../NEWS:6239 msgid "" "Multiple slashes and whitespaces between the last attribute and closing " "``>`` are now ignored in both start and end tags. E.g. ````." msgstr "" -#: ../NEWS:6050 +#: ../NEWS:6242 msgid "" "Multiple ``=`` between attribute name and value are no longer collapsed. E." "g. ```` produces attribute \"foo\" with value \"=bar\"." msgstr "" -#: ../NEWS:6053 +#: ../NEWS:6245 msgid "" ":gh:`135661`: Fix CDATA section parsing in :class:`html.parser.HTMLParser` " "according to the HTML5 standard: ``] ]>`` and ``]] >`` no longer end the " @@ -10316,7 +10619,7 @@ msgid "" "content (SVG or MathML) or as a bogus comment in the HTML namespace." msgstr "" -#: ../NEWS:6060 +#: ../NEWS:6252 msgid "" ":gh:`102555`: Fix comment parsing in :class:`html.parser.HTMLParser` " "according to the HTML5 standard. ``--!>`` now ends the comment. ``-- >`` no " @@ -10324,7 +10627,7 @@ msgid "" "and ``<--->``." msgstr "" -#: ../NEWS:6065 +#: ../NEWS:6257 msgid "" ":gh:`135462`: Fix quadratic complexity in processing specially crafted input " "in :class:`html.parser.HTMLParser`. End-of-file errors are now handled " @@ -10332,65 +10635,65 @@ msgid "" "closed, tags are ignored." msgstr "" -#: ../NEWS:6070 +#: ../NEWS:6262 msgid "" ":gh:`118350`: Fix support of escapable raw text mode (elements \"textarea\" " "and \"title\") in :class:`html.parser.HTMLParser`." msgstr "" -#: ../NEWS:6073 +#: ../NEWS:6265 msgid "" ":gh:`135034`: Fixes multiple issues that allowed ``tarfile`` extraction " "filters (``filter=\"data\"`` and ``filter=\"tar\"``) to be bypassed using " "crafted symlinks and hard links." msgstr "" -#: ../NEWS:6077 +#: ../NEWS:6269 msgid "" "Addresses :cve:`2024-12718`, :cve:`2025-4138`, :cve:`2025-4330`, and :cve:" "`2025-4517`." msgstr "" -#: ../NEWS:6080 +#: ../NEWS:6272 msgid "" ":gh:`133767`: Fix use-after-free in the \"unicode-escape\" decoder with a " "non-\"strict\" error handler." msgstr "" -#: ../NEWS:6083 +#: ../NEWS:6275 msgid "" ":gh:`133623`: Indicate through :data:`ssl.HAS_PSK_TLS13` whether the :mod:" "`ssl` module supports \"External PSKs\" in TLSv1.3, as described in RFC " "9258. Patch by Will Childs-Klein." msgstr "" -#: ../NEWS:6087 +#: ../NEWS:6279 msgid "" ":gh:`128840`: Short-circuit the processing of long IPv6 addresses early in :" "mod:`ipaddress` to prevent excessive memory consumption and a minor denial-" "of-service." msgstr "" -#: ../NEWS:6094 +#: ../NEWS:6286 msgid "" ":gh:`139482`: Optimize :data:`os.environ.clear() ` by calling :" "manpage:`clearenv(3)` when this function is available. Patch by Victor " "Stinner." msgstr "" -#: ../NEWS:6098 +#: ../NEWS:6290 msgid "" ":gh:`139958`: The ``application/toml`` mime type is now supported by :mod:" "`mimetypes`. Patch by Gil Forcada." msgstr "" -#: ../NEWS:6101 +#: ../NEWS:6293 msgid "" ":gh:`139823`: :mod:`ensurepip` now fails with a nicer error message when " "the :mod:`zlib` module is not available." msgstr "" -#: ../NEWS:6104 +#: ../NEWS:6296 msgid "" ":gh:`139905`: Add suggestion to error message for :class:`typing.Generic` " "subclasses when ``cls.__parameters__`` is missing due to a parent class " @@ -10398,38 +10701,38 @@ msgid "" "__init_subclass__>` in its ``__init_subclass__``." msgstr "" -#: ../NEWS:6109 +#: ../NEWS:6301 msgid "" ":gh:`139894`: Fix incorrect sharing of current task with the child process " "while forking in :mod:`asyncio`. Patch by Kumar Aditya." msgstr "" -#: ../NEWS:6112 +#: ../NEWS:6304 msgid "" ":gh:`139845`: Fix to not print KeyboardInterrupt twice in default asyncio " "REPL." msgstr "" -#: ../NEWS:6115 +#: ../NEWS:6307 msgid "" ":gh:`139783`: Fix :func:`inspect.getsourcelines` for the case when a " "decorator is followed by a comment or an empty line." msgstr "" -#: ../NEWS:6118 +#: ../NEWS:6310 msgid "" ":gh:`139809`: Prevent premature colorization of subparser ``prog`` in :meth:" "`argparse.ArgumentParser.add_subparsers` to respect color environment " "variable changes after parser creation." msgstr "" -#: ../NEWS:6122 +#: ../NEWS:6314 msgid "" ":gh:`139736`: Fix excessive indentation in the default :mod:`argparse` :" "class:`!HelpFormatter`. Patch by Alexander Edland." msgstr "" -#: ../NEWS:6125 +#: ../NEWS:6317 msgid "" ":gh:`70765`: :mod:`http.server`: fix default handling of HTTP/0.9 requests " "in :class:`~http.server.BaseHTTPRequestHandler`. Previously, :meth:`!" @@ -10437,36 +10740,36 @@ msgid "" "request although those are not supported in HTTP/0.9. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6131 +#: ../NEWS:6323 msgid "" ":gh:`139322`: Fix :func:`os.getlogin` error handling: fix the error number. " "Patch by Victor Stinner." msgstr "" -#: ../NEWS:6134 +#: ../NEWS:6326 msgid "" ":gh:`135953`: Add a Gecko format output to the tachyon profiler via ``--" "gecko``." msgstr "" -#: ../NEWS:6137 +#: ../NEWS:6329 msgid "" ":gh:`139184`: :func:`os.forkpty` does now make the returned file descriptor " "non-inheritable." msgstr "" -#: ../NEWS:6140 +#: ../NEWS:6332 msgid "" ":gh:`139391`: Fix an issue when, on non-Windows platforms, it was not " "possible to gracefully exit a ``python -m asyncio`` process suspended by " "Ctrl+Z and later resumed by :manpage:`fg` other than with :manpage:`kill`." msgstr "" -#: ../NEWS:6144 +#: ../NEWS:6336 msgid ":gh:`139374`: :mod:`timeit`: Add color to error tracebacks." msgstr "" -#: ../NEWS:6146 +#: ../NEWS:6338 msgid "" ":gh:`90949`: Add :meth:`~xml.parsers.expat.xmlparser." "SetBillionLaughsAttackProtectionActivationThreshold` and :meth:`~xml.parsers." @@ -10476,17 +10779,17 @@ msgid "" "attacks. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6155 +#: ../NEWS:6347 msgid ":gh:`139312`: Upgrade bundled libexpat to 2.7.3" msgstr "" -#: ../NEWS:6157 +#: ../NEWS:6349 msgid "" ":gh:`139289`: Do a real lazy-import on :mod:`rlcompleter` in :mod:`pdb` and " "restore the existing completer after importing :mod:`rlcompleter`." msgstr "" -#: ../NEWS:6160 +#: ../NEWS:6352 msgid "" ":gh:`90949`: Add :meth:`~xml.parsers.expat.xmlparser." "SetAllocTrackerActivationThreshold` and :meth:`~xml.parsers.expat.xmlparser." @@ -10495,7 +10798,7 @@ msgid "" "memory usage from within an Expat parser. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6168 +#: ../NEWS:6360 msgid "" ":gh:`67795`: Functions that take timestamp or timeout arguments now accept " "any real numbers (such as :class:`~decimal.Decimal` and :class:`~fractions." @@ -10503,38 +10806,38 @@ msgid "" "precision." msgstr "" -#: ../NEWS:6173 +#: ../NEWS:6365 msgid "" ":gh:`95953`: A CSS class, ``diff_changed``, was added to the changed lines " "in the ``make_table`` output of :class:`difflib.HtmlDiff`. Patch by Katie " "Gardner." msgstr "" -#: ../NEWS:6177 +#: ../NEWS:6369 msgid "" ":gh:`139210`: Fix use-after-free when reporting unknown event in :func:`xml." "etree.ElementTree.iterparse`. Patch by Ken Jin." msgstr "" -#: ../NEWS:6180 +#: ../NEWS:6372 msgid "" ":gh:`138860`: Lazy import :mod:`rlcompleter` in :mod:`pdb` to avoid deadlock " "in subprocess." msgstr "" -#: ../NEWS:6183 +#: ../NEWS:6375 msgid "" ":gh:`112729`: Fix crash when calling :func:`concurrent.interpreters.create` " "when the process is out of memory." msgstr "" -#: ../NEWS:6186 +#: ../NEWS:6378 msgid "" ":gh:`126016`: Fix an assertion failure when sending :exc:`KeyboardInterrupt` " "to a Python process running a subinterpreter in a separate thread." msgstr "" -#: ../NEWS:6189 +#: ../NEWS:6381 msgid "" ":gh:`118803`: :class:`collections.abc.ByteString` has been removed from " "``collections.abc.__all__``, and :class:`typing.ByteString` has been removed " @@ -10543,7 +10846,7 @@ msgid "" "scheduled for removal in Python 3.17." msgstr "" -#: ../NEWS:6195 +#: ../NEWS:6387 msgid "" "Additionally, the following statements now cause ``DeprecationWarning``\\ s " "to be emitted at runtime: ``from collections.abc import ByteString``, ``from " @@ -10555,50 +10858,50 @@ msgid "" "merely imported or accessed from their respective modules." msgstr "" -#: ../NEWS:6205 +#: ../NEWS:6397 msgid "" ":gh:`135729`: Fix unraisable exception during finalization when using :mod:" "`concurrent.interpreters` in the REPL." msgstr "" -#: ../NEWS:6208 +#: ../NEWS:6400 msgid "" ":gh:`139076`: Fix a bug in the :mod:`pydoc` module that was hiding functions " "in a Python module if they were implemented in an extension module and the " "module did not have ``__all__``." msgstr "" -#: ../NEWS:6212 +#: ../NEWS:6404 msgid ":gh:`139090`: Add :data:`os.RWF_DONTCACHE` constant for Linux 6.14+." msgstr "" -#: ../NEWS:6214 +#: ../NEWS:6406 msgid "" ":gh:`139065`: Fix trailing space before a wrapped long word if the line " "length is exactly *width* in :mod:`textwrap`." msgstr "" -#: ../NEWS:6217 +#: ../NEWS:6409 msgid "" ":gh:`139001`: Fix race condition in :class:`pathlib.Path` on the internal " "``_raw_paths`` field." msgstr "" -#: ../NEWS:6220 +#: ../NEWS:6412 msgid "" ":gh:`138813`: :class:`!multiprocessing.BaseProcess` defaults ``kwargs`` to " "``None`` instead of a shared dictionary." msgstr "" -#: ../NEWS:6223 +#: ../NEWS:6415 msgid ":gh:`138998`: Update bundled libexpat to 2.7.2" msgstr "" -#: ../NEWS:6225 +#: ../NEWS:6417 msgid ":gh:`138993`: Dedent :data:`credits` text." msgstr "" -#: ../NEWS:6227 +#: ../NEWS:6419 msgid "" ":gh:`118803`: Add back :class:`collections.abc.ByteString` and :class:" "`typing.ByteString`. Both had been removed in prior alpha, beta and release " @@ -10606,55 +10909,55 @@ msgid "" "Python 3.17." msgstr "" -#: ../NEWS:6232 +#: ../NEWS:6424 msgid "" ":gh:`130567`: Fix possible crash in :func:`locale.strxfrm` due to a platform " "bug on macOS." msgstr "" -#: ../NEWS:6235 +#: ../NEWS:6427 msgid "" ":gh:`137226`: Fix :func:`typing.get_type_hints` calls on generic :class:" "`typing.TypedDict` classes defined with string annotations." msgstr "" -#: ../NEWS:6238 +#: ../NEWS:6430 msgid "" ":gh:`138899`: Executing ``quit`` command in :mod:`pdb` will raise :exc:`bdb." "BdbQuit` when :mod:`pdb` is started from an asyncio console using :func:" "`breakpoint` or :func:`pdb.set_trace`." msgstr "" -#: ../NEWS:6242 +#: ../NEWS:6434 msgid "" ":gh:`138804`: Raise :exc:`TypeError` instead of :exc:`AttributeError` when " "an argument of incorrect type is passed to :func:`shlex.quote`. This " "restores the behavior of the function prior to 3.14." msgstr "" -#: ../NEWS:6246 +#: ../NEWS:6438 msgid "" ":gh:`138779`: Support device numbers larger than ``2**63-1`` for the :attr:" "`~os.stat_result.st_rdev` field of the :class:`os.stat_result` structure." msgstr "" -#: ../NEWS:6250 +#: ../NEWS:6442 msgid "" ":gh:`138682`: Added symmetric difference support to :class:`collections." "Counter` objects." msgstr "" -#: ../NEWS:6253 +#: ../NEWS:6445 msgid ":gh:`138712`: Add :const:`os.NODEV`." msgstr "" -#: ../NEWS:6255 +#: ../NEWS:6447 msgid "" ":gh:`128636`: Fix crash in PyREPL when os.environ is overwritten with an " "invalid value for mac" msgstr "" -#: ../NEWS:6258 +#: ../NEWS:6450 msgid "" ":gh:`138720`: Fix an issue where :class:`io.BufferedWriter` and :class:`io." "BufferedRandom` had different definitions of \"closed\" for :meth:`~io." @@ -10662,41 +10965,41 @@ msgid "" "when close called flush but flush thought the file was already closed." msgstr "" -#: ../NEWS:6264 +#: ../NEWS:6456 msgid ":gh:`138706`: Update :mod:`unicodedata` database to Unicode 17.0.0." msgstr "" -#: ../NEWS:6266 +#: ../NEWS:6458 msgid "" ":gh:`76007`: Deprecate ``__version__`` from a number of standard library " "modules. Patch by Hugo van Kemenade." msgstr "" -#: ../NEWS:6269 +#: ../NEWS:6461 msgid "" ":gh:`138535`: Speed up :func:`os.stat` for files with reasonable timestamps. " "Contributed by Jeffrey Bosboom." msgstr "" -#: ../NEWS:6272 +#: ../NEWS:6464 msgid "" ":gh:`116946`: :mod:`curses.panel`: the type of :func:`curses.panel." "new_panel` is now immutable. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6275 +#: ../NEWS:6467 msgid "" ":gh:`116946`: :mod:`zlib`: the types of :func:`zlib.compressobj` and :func:" "`zlib.decompressobj` are now immutable. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6278 +#: ../NEWS:6470 msgid "" ":gh:`116946`: :mod:`os`: the :class:`os.DirEntry` type and the type of :func:" "`os.scandir` are now immutable. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6281 +#: ../NEWS:6473 msgid "" ":gh:`116946`: :mod:`tkinter`: the types :class:`!_tkinter.Tcl_Obj` (wrapper " "for Tcl objects), :class:`!_tkinter.tktimertoken` (obtained by calling " @@ -10705,20 +11008,20 @@ msgid "" "immutable. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6287 +#: ../NEWS:6479 msgid "" ":gh:`138514`: Raise :exc:`ValueError` when a multi-character string is " "passed to the *echo_char* parameter of :func:`getpass.getpass`. Patch by " "Benjamin Johnson." msgstr "" -#: ../NEWS:6291 +#: ../NEWS:6483 msgid "" ":gh:`137706`: Fix the partial evaluation of annotations that use ``typing." "Annotated[T, x]`` where ``T`` is a forward reference." msgstr "" -#: ../NEWS:6294 +#: ../NEWS:6486 msgid "" ":gh:`88375`: Fix normalization of the ``robots.txt`` rules and URLs in the :" "mod:`urllib.robotparser` module. No longer ignore trailing ``?``. " @@ -10726,23 +11029,23 @@ msgid "" "encoded ones." msgstr "" -#: ../NEWS:6299 +#: ../NEWS:6491 msgid ":gh:`138515`: :mod:`email` is added to Emscripten build." msgstr "" -#: ../NEWS:6301 +#: ../NEWS:6493 msgid "" ":gh:`99948`: :func:`ctypes.util.find_library` now works in Emscripten build." msgstr "" -#: ../NEWS:6303 +#: ../NEWS:6495 msgid "" ":gh:`111788`: Fix parsing errors in the :mod:`urllib.robotparser` module. " "Don't fail trying to parse weird paths. Don't fail trying to decode non-" "UTF-8 ``robots.txt`` files." msgstr "" -#: ../NEWS:6307 +#: ../NEWS:6499 msgid "" ":gh:`138432`: :meth:`zoneinfo.reset_tzpath` will now convert any :class:`os." "PathLike` objects it receives into strings before adding them to ``TZPATH``. " @@ -10752,44 +11055,44 @@ msgid "" "and present a more informative error message." msgstr "" -#: ../NEWS:6314 +#: ../NEWS:6506 msgid "" ":gh:`132657`: Improve the scaling of :func:`copy.copy` and :func:`copy." "deepcopy` in the free-threading build." msgstr "" -#: ../NEWS:6317 +#: ../NEWS:6509 msgid "" ":gh:`116946`: The types of :func:`select.poll` and :func:`select.epoll` " "objects are now immutable. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6320 +#: ../NEWS:6512 msgid "" ":gh:`116946`: The :class:`!_random.Random` C type is now immutable. Patch by " "Bénédikt Tran." msgstr "" -#: ../NEWS:6323 +#: ../NEWS:6515 msgid "" ":gh:`57911`: When extracting tar files on Windows, slashes in symlink " "targets will be replaced by backslashes to prevent corrupted links." msgstr "" -#: ../NEWS:6326 +#: ../NEWS:6518 msgid "" ":gh:`138205`: Removed the :meth:`~mmap.mmap.resize` method on platforms that " "don't support the underlying syscall, instead of raising a :exc:" "`SystemError`." msgstr "" -#: ../NEWS:6330 +#: ../NEWS:6522 msgid "" ":gh:`138008`: Fix segmentation faults in the :mod:`ctypes` module due to " "invalid :attr:`~ctypes._CFuncPtr.argtypes`. Patch by Dung Nguyen." msgstr "" -#: ../NEWS:6333 +#: ../NEWS:6525 msgid "" ":gh:`138252`: :mod:`ssl`: :class:`~ssl.SSLContext` objects can now set " "client and server TLS signature algorithms. If Python has been built with " @@ -10797,39 +11100,39 @@ msgid "" "signature algorithms selected on a connection." msgstr "" -#: ../NEWS:6338 +#: ../NEWS:6530 msgid "" ":gh:`138253`: Add the *block* parameter in the :meth:`!put` and :meth:`!get` " "methods of the :mod:`concurrent.interpreters` queues for compatibility with " "the :class:`queue.Queue` interface." msgstr "" -#: ../NEWS:6342 +#: ../NEWS:6534 msgid "" ":gh:`60462`: Fix :func:`locale.strxfrm` on Solaris (and possibly other " "platforms)." msgstr "" -#: ../NEWS:6345 +#: ../NEWS:6537 msgid "" ":gh:`138239`: The REPL now highlights :keyword:`type` as a soft keyword in :" "ref:`type statements `." msgstr "" -#: ../NEWS:6348 +#: ../NEWS:6540 msgid "" ":gh:`78502`: :class:`mmap.mmap` now has a *trackfd* parameter on Windows; if " "it is ``False``, the file handle corresponding to *fileno* will not be " "duplicated." msgstr "" -#: ../NEWS:6352 +#: ../NEWS:6544 msgid "" ":gh:`138204`: Forbid expansion of shared anonymous :mod:`memory maps ` " "on Linux, which caused a bus error." msgstr "" -#: ../NEWS:6355 +#: ../NEWS:6547 msgid "" ":gh:`138010`: Fix an issue where defining a class with a :deco:`warnings." "deprecated`-decorated base class may not invoke the correct :meth:`~object." @@ -10837,53 +11140,53 @@ msgid "" "Brian Schubert." msgstr "" -#: ../NEWS:6360 +#: ../NEWS:6552 msgid "" ":gh:`134716`: Add support of regular expressions in the :option:`-W` option " "and the :envvar:`PYTHONWARNINGS` environment variable." msgstr "" -#: ../NEWS:6363 +#: ../NEWS:6555 msgid "" ":gh:`138133`: Prevent infinite traceback loop when sending CTRL^C to Python " "through ``strace``." msgstr "" -#: ../NEWS:6366 +#: ../NEWS:6558 msgid "" ":gh:`138122`: Implement :pep:`799` -- A dedicated profiling package for " "organizing Python profiling tools. Patch by Pablo Galindo." msgstr "" -#: ../NEWS:6369 +#: ../NEWS:6561 msgid "" ":gh:`138092`: Fixed a bug in :meth:`mmap.mmap.flush` where calling with only " "an offset parameter would fail." msgstr "" -#: ../NEWS:6372 +#: ../NEWS:6564 msgid "" ":gh:`138044`: Remove compatibility shim for deprecated parameter *package* " "in :func:`importlib.resources.files`. Patch by Semyon Moroz." msgstr "" -#: ../NEWS:6375 +#: ../NEWS:6567 msgid ":gh:`86819`: :mod:`socket`: Add missing constants for ISO-TP sockets." msgstr "" -#: ../NEWS:6377 +#: ../NEWS:6569 msgid "" ":gh:`137884`: Add :func:`threading.get_native_id` support for Illumos/" "Solaris. Patch by Yüce Tekol." msgstr "" -#: ../NEWS:6380 +#: ../NEWS:6572 msgid "" ":gh:`134869`: Fix an issue where pressing Ctrl+C during tab completion in " "the REPL would leave the autocompletion menu in a corrupted state." msgstr "" -#: ../NEWS:6383 +#: ../NEWS:6575 msgid "" ":gh:`137840`: :class:`typing.TypedDict` now supports the ``closed`` and " "``extra_items`` keyword arguments (as described in :pep:`728`) to control " @@ -10891,7 +11194,7 @@ msgid "" "type." msgstr "" -#: ../NEWS:6388 +#: ../NEWS:6580 msgid "" ":gh:`132947`: Applied changes to ``importlib.metadata`` from " "`importlib_metadata 8.7 ` was blocked in one thread, and then " @@ -10962,26 +11265,26 @@ msgid "" "socket.send>`) was subsequently called in another thread." msgstr "" -#: ../NEWS:6429 +#: ../NEWS:6621 msgid "" ":gh:`92936`: Update regex used by ``http.cookies.SimpleCookie`` to handle " "values containing double quotes." msgstr "" -#: ../NEWS:6432 +#: ../NEWS:6624 msgid "" ":gh:`137426`: Remove the code deprecation of ``importlib.abc." "ResourceLoader``. It is documented as deprecated, but left for backwards " "compatibility with other classes in ``importlib.abc``." msgstr "" -#: ../NEWS:6436 +#: ../NEWS:6628 msgid "" ":gh:`137490`: Handle :data:`~errno.ECANCELED` in the same way as :data:" "`~errno.EINTR` in :func:`signal.sigwaitinfo` on NetBSD." msgstr "" -#: ../NEWS:6439 +#: ../NEWS:6631 msgid "" ":gh:`137512`: Add new constants in the :mod:`resource` module: :data:" "`~resource.RLIMIT_NTHR`, :data:`~resource.RLIMIT_UMTXP`, :data:`~resource." @@ -10989,7 +11292,7 @@ msgid "" "RLIM_SAVED_CUR`, and :data:`~resource.RLIM_SAVED_MAX`." msgstr "" -#: ../NEWS:6444 +#: ../NEWS:6636 msgid "" ":gh:`137044`: :data:`resource.RLIM_INFINITY` is now always a positive " "integer. On all supported platforms, it is larger than any limited resource " @@ -10997,26 +11300,26 @@ msgid "" "could be negative, such as -1 or -3, depending on platform." msgstr "" -#: ../NEWS:6449 +#: ../NEWS:6641 msgid "" ":gh:`137477`: Fix :func:`!inspect.getblock`, :func:`inspect.getsourcelines` " "and :func:`inspect.getsource` for generator expressions." msgstr "" -#: ../NEWS:6452 +#: ../NEWS:6644 msgid "" ":gh:`137481`: Calendar uses the lengths of the locale's weekdays to decide " "if the width requires abbreviation." msgstr "" -#: ../NEWS:6455 +#: ../NEWS:6647 msgid "" ":gh:`137466`: Remove undocumented :func:`!glob.glob0` and :func:`!glob." "glob1` functions, which have been deprecated since Python 3.13. Use :func:" "`glob.glob` and pass a directory to its *root_dir* argument instead." msgstr "" -#: ../NEWS:6459 +#: ../NEWS:6651 msgid "" ":gh:`137044`: Return large limit values as positive integers instead of " "negative integers in :func:`resource.getrlimit`. Accept large values and " @@ -11024,18 +11327,18 @@ msgid "" "in :func:`resource.setrlimit`." msgstr "" -#: ../NEWS:6464 +#: ../NEWS:6656 msgid ":gh:`115766`: Fix :attr:`!ipaddress.IPv4Interface.is_unspecified`." msgstr "" -#: ../NEWS:6466 +#: ../NEWS:6658 msgid "" ":gh:`75989`: :func:`tarfile.TarFile.extractall` and :func:`tarfile.TarFile." "extract` now overwrite symlinks when extracting hardlinks. (Contributed by " "Alexander Enrique Urieles Nieto in :gh:`75989`.)" msgstr "" -#: ../NEWS:6471 +#: ../NEWS:6663 msgid "" ":gh:`137017`: Fix :obj:`threading.Thread.is_alive` to remain ``True`` until " "the underlying OS thread is fully cleaned up. This avoids false negatives in " @@ -11043,13 +11346,13 @@ msgid "" "is_alive` calls." msgstr "" -#: ../NEWS:6476 +#: ../NEWS:6668 msgid "" ":gh:`137273`: Fix debug assertion failure in :func:`locale.setlocale` on " "Windows." msgstr "" -#: ../NEWS:6479 +#: ../NEWS:6671 msgid "" ":gh:`137191`: Fix how type parameters are collected, when :class:`typing." "Protocol` are specified with explicit parameters. Now, :class:`typing." @@ -11057,87 +11360,87 @@ msgid "" "and parameter ordering of types. Previous behavior was a bug." msgstr "" -#: ../NEWS:6485 +#: ../NEWS:6677 msgid "" ":gh:`137282`: Fix tab completion and :func:`dir` on :mod:`concurrent." "futures`." msgstr "" -#: ../NEWS:6488 +#: ../NEWS:6680 msgid "" ":gh:`137257`: Bump the version of pip bundled in ensurepip to version 25.2" msgstr "" -#: ../NEWS:6490 +#: ../NEWS:6682 msgid "" ":gh:`137239`: :mod:`heapq`: Update :data:`!heapq.__all__` with ``*_max`` " "functions." msgstr "" -#: ../NEWS:6493 +#: ../NEWS:6685 msgid "" ":gh:`124503`: :func:`ast.literal_eval` is 10-20% faster for small inputs." msgstr "" -#: ../NEWS:6495 +#: ../NEWS:6687 msgid "" ":gh:`137226`: Fix behavior of :meth:`annotationlib.ForwardRef.evaluate` when " "the *type_params* parameter is passed and the name of a type param is also " "present in an enclosing scope." msgstr "" -#: ../NEWS:6499 +#: ../NEWS:6691 msgid "" ":gh:`137197`: :class:`~ssl.SSLContext` objects can now set TLS 1.3 cipher " "suites via :meth:`~ssl.SSLContext.set_ciphersuites`." msgstr "" -#: ../NEWS:6502 +#: ../NEWS:6694 msgid "" ":gh:`81325`: :class:`tarfile.TarFile` now accepts a :term:`path-like ` when working on a tar archive. (Contributed by Alexander " "Enrique Urieles Nieto in :gh:`81325`.)" msgstr "" -#: ../NEWS:6506 +#: ../NEWS:6698 msgid "" ":gh:`137185`: Fix a potential async-signal-safety issue in :mod:" "`faulthandler` when printing C stack traces." msgstr "" -#: ../NEWS:6509 +#: ../NEWS:6701 msgid "" ":gh:`133951`: Remove lib64-lib symlink creation when creating new virtual " "environments in :mod:`venv` module" msgstr "" -#: ../NEWS:6512 +#: ../NEWS:6704 msgid "" ":gh:`130522`: Fix unraisable :exc:`TypeError` raised during :term:" "`interpreter shutdown` in the :mod:`threading` module." msgstr "" -#: ../NEWS:6515 +#: ../NEWS:6707 msgid "" ":gh:`137059`: Fix handling of file URLs with a Windows drive letter in the " "URL authority by :func:`urllib.request.url2pathname`. This fixes a " "regression in earlier pre-releases of Python 3.14." msgstr "" -#: ../NEWS:6519 +#: ../NEWS:6711 msgid "" ":gh:`136980`: Remove unused C tracing code in bdb for event type ``c_call``, " "``c_return`` and ``c_exception``" msgstr "" -#: ../NEWS:6522 +#: ../NEWS:6714 msgid "" ":gh:`130577`: :mod:`tarfile` now validates archives to ensure member offsets " "are non-negative. (Contributed by Alexander Enrique Urieles Nieto in :gh:" "`130577`.)" msgstr "" -#: ../NEWS:6526 +#: ../NEWS:6718 msgid "" ":gh:`136170`: Removed the unreleased ``zipfile.ZipFile.data_offset`` " "property added in 3.14.0a7 as it wasn't fully clear which behavior it should " @@ -11145,14 +11448,14 @@ msgid "" "expect." msgstr "" -#: ../NEWS:6530 +#: ../NEWS:6722 msgid "" ":gh:`121237`: Support ``%:z`` directive for :meth:`datetime.datetime." "strptime`, :meth:`datetime.time.strptime` and :func:`time.strptime`. Patch " "by Lucas Esposito and Semyon Moroz." msgstr "" -#: ../NEWS:6534 +#: ../NEWS:6726 msgid "" ":gh:`136929`: Ensure that hash functions guaranteed to be always *available* " "exist as attributes of :mod:`hashlib` even if they will not work at runtime " @@ -11161,30 +11464,30 @@ msgid "" "has been built without MD5 support. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6541 +#: ../NEWS:6733 msgid ":gh:`124621`: pyrepl now works in Emscripten." msgstr "" -#: ../NEWS:6543 +#: ../NEWS:6735 msgid "" ":gh:`136914`: Fix retrieval of :attr:`doctest.DocTest.lineno` for objects " "decorated with :func:`functools.cache` or :class:`functools.cached_property`." msgstr "" -#: ../NEWS:6547 +#: ../NEWS:6739 msgid "" ":gh:`136912`: :func:`hmac.digest` now properly handles large keys and " "messages by falling back to the pure Python implementation when necessary. " "Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6551 +#: ../NEWS:6743 msgid "" ":gh:`83424`: Allows creating a :class:`ctypes.CDLL` without name when " "passing a handle as an argument." msgstr "" -#: ../NEWS:6554 +#: ../NEWS:6746 msgid "" ":gh:`135228`: When :mod:`dataclasses` replaces a class with a slotted " "dataclass, the original class can now be garbage collected again. Earlier " @@ -11192,13 +11495,13 @@ msgid "" "together with the replacement class synthesized by :mod:`dataclasses`." msgstr "" -#: ../NEWS:6559 +#: ../NEWS:6751 msgid "" ":gh:`136874`: Discard URL query and fragment in :func:`urllib.request." "url2pathname`." msgstr "" -#: ../NEWS:6562 +#: ../NEWS:6754 msgid "" ":gh:`136787`: :mod:`hashlib`: improve exception messages when a hash " "algorithm is not recognized, blocked by the current security policy or " @@ -11206,11 +11509,11 @@ msgid "" "SHAKE). Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6567 +#: ../NEWS:6759 msgid ":gh:`130645`: Enable color help by default in :mod:`argparse`." msgstr "" -#: ../NEWS:6569 +#: ../NEWS:6761 msgid "" ":gh:`131724`: In :mod:`http.client`, a new *max_response_headers* keyword-" "only parameter has been added to :class:`~http.client.HTTPConnection` and :" @@ -11219,7 +11522,7 @@ msgid "" "service attacks." msgstr "" -#: ../NEWS:6576 +#: ../NEWS:6768 msgid "" ":gh:`135427`: With :option:`-Werror <-W>`, the DeprecationWarning emitted " "by :py:func:`os.fork` and :py:func:`os.forkpty` in mutli-threaded processes " @@ -11227,24 +11530,24 @@ msgid "" "Rani Pinchuk." msgstr "" -#: ../NEWS:6581 +#: ../NEWS:6773 msgid "" ":gh:`136234`: Fix :meth:`asyncio.WriteTransport.writelines` to be robust to " "connection failure, by using the same behavior as :meth:`~asyncio." "WriteTransport.write`." msgstr "" -#: ../NEWS:6585 +#: ../NEWS:6777 msgid ":gh:`53144`: :mod:`!encodings.aliases`: Add ``latin_N`` aliases" msgstr "" -#: ../NEWS:6587 +#: ../NEWS:6779 msgid "" ":gh:`136669`: :mod:`!_asyncio` is now statically linked for improved " "performance." msgstr "" -#: ../NEWS:6590 +#: ../NEWS:6782 msgid "" ":gh:`136134`: :meth:`!SMTP.auth_cram_md5` now raises an :exc:`~smtplib." "SMTPException` instead of a :exc:`ValueError` if Python has been built " @@ -11253,88 +11556,88 @@ msgid "" "it. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6596 +#: ../NEWS:6788 msgid "" ":gh:`136134`: :meth:`IMAP4.login_cram_md5 ` " "now raises an :exc:`IMAP4.error ` if CRAM-MD5 " "authentication is not supported. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6600 +#: ../NEWS:6792 msgid "" ":gh:`136591`: :mod:`!_hashlib`: avoid using deprecated functions :manpage:" "`ERR_func_error_string` and :manpage:`EVP_MD_CTX_md` when using OpenSSL 3.0 " "and later. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6604 +#: ../NEWS:6796 msgid "" ":gh:`136571`: :meth:`datetime.date.fromisocalendar` can now raise " "OverflowError for out of range arguments." msgstr "" -#: ../NEWS:6607 +#: ../NEWS:6799 msgid ":gh:`136549`: Fix signature of :func:`threading.excepthook`." msgstr "" -#: ../NEWS:6609 +#: ../NEWS:6801 msgid "" ":gh:`136492`: Expose :pep:`667`'s :data:`~types.FrameLocalsProxyType` in " "the :mod:`types` module." msgstr "" -#: ../NEWS:6612 +#: ../NEWS:6804 msgid ":gh:`83336`: ``utf8_sig`` is now aliased to :mod:`encodings.utf_8_sig`" msgstr "" -#: ../NEWS:6614 +#: ../NEWS:6806 msgid "" ":gh:`136523`: Fix :class:`wave.Wave_write` emitting an unraisable when open " "raises." msgstr "" -#: ../NEWS:6617 +#: ../NEWS:6809 msgid ":gh:`136507`: Fix mimetypes CLI to handle multiple file parameters." msgstr "" -#: ../NEWS:6619 +#: ../NEWS:6811 msgid "" ":gh:`52876`: Add missing ``keepends`` (default ``True``) parameter to :meth:" "`!codecs.StreamReaderWriter.readline` and :meth:`!codecs.StreamReaderWriter." "readlines`." msgstr "" -#: ../NEWS:6623 +#: ../NEWS:6815 msgid "" ":gh:`136470`: Correct :class:`concurrent.futures.InterpreterPoolExecutor`'s " "default thread name." msgstr "" -#: ../NEWS:6626 +#: ../NEWS:6818 msgid "" ":gh:`136476`: Fix a bug that was causing the ``get_async_stack_trace`` " "function to miss some frames in the stack trace." msgstr "" -#: ../NEWS:6629 +#: ../NEWS:6821 msgid "" ":gh:`136434`: Fix docs generation of ``UnboundItem`` in :mod:`concurrent." "interpreters` when running with :option:`-OO`." msgstr "" -#: ../NEWS:6632 +#: ../NEWS:6824 msgid "" ":gh:`136380`: Raises :exc:`AttributeError` when accessing :class:`concurrent." "futures.InterpreterPoolExecutor` and subinterpreters are not available." msgstr "" -#: ../NEWS:6636 +#: ../NEWS:6828 msgid "" ":gh:`72327`: Suggest using the system command prompt when ``pip install`` is " "typed into the REPL. Patch by Tom Viner, Richard Si, and Brian Schubert." msgstr "" -#: ../NEWS:6639 +#: ../NEWS:6831 msgid "" ":gh:`135953`: Implement a new high-frequency runtime profiler that leverages " "the existing remote debugging functionality to collect detailed execution " @@ -11347,142 +11650,142 @@ msgid "" "applications." msgstr "" -#: ../NEWS:6649 +#: ../NEWS:6841 msgid "" ":gh:`136021`: Make ``type_params`` parameter required in :func:`!typing." "_eval_type` after a deprecation period for not providing this parameter. " "Also remove the :exc:`DeprecationWarning` for the old behavior." msgstr "" -#: ../NEWS:6654 +#: ../NEWS:6846 msgid "" ":gh:`136286`: Fix pickling failures for protocols 0 and 1 for many objects " "related to subinterpreters." msgstr "" -#: ../NEWS:6657 +#: ../NEWS:6849 msgid "" ":gh:`136047`: Fix issues with :mod:`typing` when the C implementation of :" "mod:`abc` is not available." msgstr "" -#: ../NEWS:6660 +#: ../NEWS:6852 msgid "" ":gh:`136316`: Improve support for evaluating nested forward references in :" "func:`typing.evaluate_forward_ref`." msgstr "" -#: ../NEWS:6663 +#: ../NEWS:6855 msgid "" ":gh:`136306`: :mod:`ssl` can now get and set groups used for key agreement." msgstr "" -#: ../NEWS:6665 +#: ../NEWS:6857 msgid "" ":gh:`136156`: :func:`tempfile.TemporaryFile` no longer uses :data:`os." "O_EXCL` with :data:`os.O_TMPFILE`, so it's possible to use ``linkat()`` on " "the file descriptor. Patch by Victor Stinner." msgstr "" -#: ../NEWS:6669 +#: ../NEWS:6861 msgid "" ":gh:`133982`: Update Python implementation of :class:`io.BytesIO` to be " "thread safe." msgstr "" -#: ../NEWS:6672 +#: ../NEWS:6864 msgid "" ":gh:`136193`: Improve :exc:`TypeError` error message, when richcomparing " "two :class:`types.SimpleNamespace` objects." msgstr "" -#: ../NEWS:6675 +#: ../NEWS:6867 msgid "" ":gh:`136097`: Fix potential infinite recursion and KeyError in ``sysconfig --" "generate-posix-vars``." msgstr "" -#: ../NEWS:6678 +#: ../NEWS:6870 msgid "" ":gh:`85702`: If ``zoneinfo._common.load_tzdata`` is given a package without " "a resource a :exc:`zoneinfo.ZoneInfoNotFoundError` is raised rather than a :" "exc:`PermissionError`. Patch by Victor Stinner." msgstr "" -#: ../NEWS:6682 +#: ../NEWS:6874 msgid "" ":gh:`90733`: Improve error messages when reporting invalid parameters in :" "func:`hashlib.scrypt`. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6685 +#: ../NEWS:6877 msgid "" ":gh:`134759`: Fix :exc:`UnboundLocalError` in :func:`email.message.Message." "get_payload` when the payload to decode is a :class:`bytes` object. Patch by " "Kliment Lamonov." msgstr "" -#: ../NEWS:6689 +#: ../NEWS:6881 msgid "" ":gh:`136028`: Fix parsing month names containing \"İ\" (U+0130, LATIN " "CAPITAL LETTER I WITH DOT ABOVE) in :func:`time.strptime`. This affects " "locales az_AZ, ber_DZ, ber_MA and crh_UA." msgstr "" -#: ../NEWS:6693 +#: ../NEWS:6885 msgid "" ":gh:`87135`: Acquiring a :class:`threading.Lock` or :class:`threading.RLock` " "at interpreter shutdown will raise :exc:`PythonFinalizationError` if Python " "can determine that it would otherwise deadlock." msgstr "" -#: ../NEWS:6697 +#: ../NEWS:6889 msgid "" ":gh:`135995`: In the palmos encoding, make byte ``0x9b`` decode to ``›`` " "(U+203A - SINGLE RIGHT-POINTING ANGLE QUOTATION MARK)." msgstr "" -#: ../NEWS:6700 +#: ../NEWS:6892 msgid "" ":gh:`105456`: Removed :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!" "sre_parse` modules." msgstr "" -#: ../NEWS:6703 +#: ../NEWS:6895 msgid "" ":gh:`53203`: Fix :func:`time.strptime` for ``%c`` and ``%x`` formats on " "locales byn_ER, wal_ET and lzh_TW, and for ``%X`` format on locales ar_SA, " "bg_BG and lzh_TW." msgstr "" -#: ../NEWS:6707 +#: ../NEWS:6899 msgid "" ":gh:`135878`: Fixes a crash of :class:`types.SimpleNamespace` on :term:`free " "threading` builds, when several threads were calling its :meth:`~object." "__repr__` method at the same time." msgstr "" -#: ../NEWS:6711 +#: ../NEWS:6903 msgid "" ":gh:`135853`: Add :func:`math.fmax` and :func:`math.fmin` to get the larger " "and smaller of two floating-point values. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6714 +#: ../NEWS:6906 msgid "" ":gh:`135836`: Fix :exc:`IndexError` in :meth:`asyncio.loop." "create_connection` that could occur when non-\\ :exc:`OSError` exception is " "raised during connection and socket's ``close()`` raises :exc:`!OSError`." msgstr "" -#: ../NEWS:6718 +#: ../NEWS:6910 msgid "" ":gh:`135853`: :mod:`math`: expose C99 :func:`~math.signbit` function to " "determine whether the sign bit of a floating-point value is set. Patch by " "Bénédikt Tran." msgstr "" -#: ../NEWS:6722 +#: ../NEWS:6914 msgid "" ":gh:`134531`: :mod:`hmac`: use the :manpage:`EVP_MAC(3ssl)` interface for " "HMAC when Python is built with OpenSSL 3.0 and later instead of the " @@ -11490,34 +11793,34 @@ msgid "" "Tran." msgstr "" -#: ../NEWS:6727 +#: ../NEWS:6919 msgid "" ":gh:`135836`: Fix :exc:`IndexError` in :meth:`asyncio.loop." "create_connection` that could occur when the Happy Eyeballs algorithm " "resulted in an empty exceptions list during connection attempts." msgstr "" -#: ../NEWS:6731 +#: ../NEWS:6923 msgid "" ":gh:`135855`: Raise :exc:`TypeError` instead of :exc:`SystemError` when :" "func:`!_interpreters.set___main___attrs` is passed a non-dict object. Patch " "by Brian Schubert." msgstr "" -#: ../NEWS:6735 +#: ../NEWS:6927 msgid "" ":gh:`135823`: :mod:`netrc`: improve the error message when the security " "check for the ownership of the default configuration file ``~/.netrc`` " "fails. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6739 +#: ../NEWS:6931 msgid "" ":gh:`135815`: :mod:`netrc`: skip security checks if :func:`os.getuid` is " "missing. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6742 +#: ../NEWS:6934 msgid "" ":gh:`135640`: Address bug where it was possible to call :func:`xml.etree." "ElementTree.ElementTree.write` on an ElementTree object with an invalid root " @@ -11525,12 +11828,12 @@ msgid "" "existed." msgstr "" -#: ../NEWS:6747 +#: ../NEWS:6939 msgid "" ":gh:`90117`: Speed up :mod:`pprint` for :class:`list` and :class:`tuple`." msgstr "" -#: ../NEWS:6749 +#: ../NEWS:6941 msgid "" ":gh:`135759`: :mod:`hashlib`: reject negative digest lengths in OpenSSL-" "based SHAKE objects by raising a :exc:`ValueError`. Previously, negative " @@ -11538,128 +11841,128 @@ msgid "" "`SystemError`. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6754 +#: ../NEWS:6946 msgid "" ":gh:`123471`: Make concurrent iterations over :class:`itertools.chain` safe " "under :term:`free threading`." msgstr "" -#: ../NEWS:6757 +#: ../NEWS:6949 msgid "" ":gh:`135645`: Added ``supports_isolated_interpreters`` field to :data:`sys." "implementation`." msgstr "" -#: ../NEWS:6760 +#: ../NEWS:6952 msgid "" ":gh:`135646`: Raise consistent :exc:`NameError` exceptions in :func:" "`annotationlib.ForwardRef.evaluate`" msgstr "" -#: ../NEWS:6763 +#: ../NEWS:6955 msgid "" ":gh:`135557`: Fix races on :mod:`heapq` updates and :class:`list` reads on " "the :term:`free threaded ` build." msgstr "" -#: ../NEWS:6766 +#: ../NEWS:6958 msgid "" ":gh:`119180`: Only fetch globals and locals if necessary in :func:" "`annotationlib.get_annotations`" msgstr "" -#: ../NEWS:6769 +#: ../NEWS:6961 msgid "" ":gh:`135561`: Fix a crash on DEBUG builds when an HACL* HMAC routine fails. " "Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6772 +#: ../NEWS:6964 msgid "" ":gh:`135386`: Fix opening a :mod:`dbm.sqlite3` database for reading from " "read-only file or directory." msgstr "" -#: ../NEWS:6775 +#: ../NEWS:6967 msgid "" ":gh:`135444`: Fix :meth:`asyncio.DatagramTransport.sendto` to account for " "datagram header size when data cannot be sent." msgstr "" -#: ../NEWS:6778 +#: ../NEWS:6970 msgid "" ":gh:`65697`: :class:`configparser`'s error message when attempting to write " "an invalid key is now more helpful." msgstr "" -#: ../NEWS:6781 +#: ../NEWS:6973 msgid "" ":gh:`135497`: Fix :func:`os.getlogin` failing for longer usernames on BSD-" "based platforms." msgstr "" -#: ../NEWS:6784 +#: ../NEWS:6976 msgid "" ":gh:`135487`: Fix :meth:`!reprlib.Repr.repr_int` when given integers with " "more than :func:`sys.get_int_max_str_digits` digits. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6788 +#: ../NEWS:6980 msgid "" ":gh:`135429`: Fix the argument mismatch in ``_lsprof`` for ``PY_THROW`` " "event." msgstr "" -#: ../NEWS:6791 +#: ../NEWS:6983 msgid "" ":gh:`135368`: Fix :class:`unittest.mock.Mock` generation on :func:" "`dataclasses.dataclass` objects. Now all special attributes are set as it " "was before :gh:`124429`." msgstr "" -#: ../NEWS:6795 +#: ../NEWS:6987 msgid "" ":gh:`135336`: :mod:`json` now encodes strings up to 2.2x faster if they " "consist solely of characters that don’t require escaping." msgstr "" -#: ../NEWS:6798 +#: ../NEWS:6990 msgid "" ":gh:`135335`: :mod:`multiprocessing`: Flush ``stdout`` and ``stderr`` after " "preloading modules in the ``forkserver``." msgstr "" -#: ../NEWS:6801 +#: ../NEWS:6993 msgid "" ":gh:`126631`: Fix :mod:`multiprocessing` ``forkserver`` bug which prevented " "``__main__`` from being preloaded." msgstr "" -#: ../NEWS:6804 +#: ../NEWS:6996 msgid "" ":gh:`133967`: Do not normalize :mod:`locale` name 'C.UTF-8' to 'en_US.UTF-8'." msgstr "" -#: ../NEWS:6806 +#: ../NEWS:6998 msgid "" ":gh:`130870`: Preserve :class:`types.GenericAlias` subclasses in :func:" "`typing.get_type_hints`" msgstr "" -#: ../NEWS:6809 +#: ../NEWS:7001 msgid "" ":gh:`135321`: Raise a correct exception for values greater than 0x7fffffff " "for the ``BINSTRING`` opcode in the C implementation of :mod:`pickle`." msgstr "" -#: ../NEWS:6812 +#: ../NEWS:7004 msgid "" ":gh:`121914`: Changed the names of the symbol tables for lambda expressions " "and generator expressions to \"\" and \"\" respectively to " "avoid conflicts with user-defined names." msgstr "" -#: ../NEWS:6816 +#: ../NEWS:7008 msgid "" ":gh:`135276`: Synchronized zipfile.Path with zipp 3.23, including improved " "performance of :meth:`zipfile.Path.open` for non-reading modes, rely on :" @@ -11669,7 +11972,7 @@ msgid "" "working with a zipfile on disk." msgstr "" -#: ../NEWS:6823 +#: ../NEWS:7015 msgid "" ":gh:`135234`: :mod:`hashlib`: improve exception messages when an OpenSSL " "function failed. When memory allocation fails on OpenSSL's side, a :exc:" @@ -11677,7 +11980,7 @@ msgid "" "Tran." msgstr "" -#: ../NEWS:6828 +#: ../NEWS:7020 msgid "" ":gh:`135244`: :mod:`uuid`: when the MAC address cannot be determined, the 48-" "bit node ID is now generated with a cryptographically-secure pseudo-random " @@ -11686,52 +11989,52 @@ msgid "" "uuid6`." msgstr "" -#: ../NEWS:6834 +#: ../NEWS:7026 msgid "" ":gh:`135241`: The :code:`INT` opcode of the C accelerator :mod:`!_pickle` " "module was updated to look only for \"00\" and \"01\" to push booleans onto " "the stack, aligning with the Python :mod:`pickle` module." msgstr "" -#: ../NEWS:6838 +#: ../NEWS:7030 msgid ":gh:`133934`: Improve :mod:`sqlite3` CLI's ``.help`` message." msgstr "" -#: ../NEWS:6840 +#: ../NEWS:7032 msgid "" ":gh:`135069`: Fix the \"Invalid error handling\" exception in :class:`!" "encodings.idna.IncrementalDecoder` to correctly replace the 'errors' " "parameter." msgstr "" -#: ../NEWS:6844 +#: ../NEWS:7036 msgid "" ":gh:`130662`: +Accept leading zeros in precision and width fields for +:" "class:`~decimal.Decimal` formatting, for example ``format(Decimal(1.25), " "'.016f')``." msgstr "" -#: ../NEWS:6848 +#: ../NEWS:7040 msgid "" ":gh:`130662`: Accept leading zeros in precision and width fields for :class:" "`~fractions.Fraction` formatting, for example ``format(Fraction(1, 3), " "'.016f')``." msgstr "" -#: ../NEWS:6852 +#: ../NEWS:7044 msgid "" ":gh:`135004`: Rewrite and cleanup the internal :mod:`!_blake2` module. Some " "exception messages were changed but their types were left untouched. Patch " "by Bénédikt Tran." msgstr "" -#: ../NEWS:6856 +#: ../NEWS:7048 msgid "" ":gh:`134953`: Expand ``_colorize`` theme with ``keyword_constant`` and " "implement in :term:`repl`." msgstr "" -#: ../NEWS:6859 +#: ../NEWS:7051 msgid "" ":gh:`134978`: :mod:`hashlib`: Supporting the ``string`` keyword parameter in " "hash function constructors such as :func:`~hashlib.new` or the direct hash-" @@ -11741,55 +12044,55 @@ msgid "" "Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6866 +#: ../NEWS:7058 msgid "" ":gh:`134970`: Fix the \"unknown action\" exception in :meth:`argparse." "ArgumentParser.add_argument_group` to correctly replace the action class." msgstr "" -#: ../NEWS:6870 +#: ../NEWS:7062 msgid "" ":gh:`134718`: By default, omit optional ``Load()`` values in :func:`ast." "dump`." msgstr "" -#: ../NEWS:6873 +#: ../NEWS:7065 msgid "" ":gh:`134718`: :func:`ast.dump` now only omits ``None`` and ``[]`` values if " "they are default values." msgstr "" -#: ../NEWS:6876 +#: ../NEWS:7068 msgid "" ":gh:`134939`: Add the :mod:`concurrent.interpreters` module. See :pep:`734`." msgstr "" -#: ../NEWS:6878 +#: ../NEWS:7070 msgid "" ":gh:`108885`: Run each example as a subtest in unit tests synthesized by :" "func:`doctest.DocFileSuite` and :func:`doctest.DocTestSuite`. Add the :meth:" "`doctest.DocTestRunner.report_skip` method." msgstr "" -#: ../NEWS:6882 +#: ../NEWS:7074 msgid "" ":gh:`134885`: Fix possible crash in the :mod:`compression.zstd` module " "related to setting parameter types. Patch by Jelle Zijlstra." msgstr "" -#: ../NEWS:6885 +#: ../NEWS:7077 msgid "" ":gh:`134857`: Improve error report for :mod:`doctest`\\ s run with :mod:" "`unittest`. Remove :mod:`!doctest` module frames from tracebacks and " "redundant newline character from a failure message." msgstr "" -#: ../NEWS:6889 +#: ../NEWS:7081 msgid "" ":gh:`128840`: Fix parsing long IPv6 addresses with embedded IPv4 address." msgstr "" -#: ../NEWS:6891 +#: ../NEWS:7083 msgid "" ":gh:`133579`: :mod:`curses`: Consistently report failures of curses C API " "calls in module-level methods by raising a :exc:`curses.error`. This " @@ -11800,7 +12103,7 @@ msgid "" "Bénédikt Tran." msgstr "" -#: ../NEWS:6899 +#: ../NEWS:7091 msgid "" ":gh:`133579`: :meth:`curses.window.refresh` and :meth:`curses.window." "noutrefresh` now raise a :exc:`TypeError` instead of :exc:`curses.error` " @@ -11808,7 +12111,7 @@ msgid "" "and-pads>`. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6904 +#: ../NEWS:7096 msgid "" ":gh:`133579`: :ref:`curses.window `: Consistently " "report failures of curses C API calls in Window methods by raising a :exc:" @@ -11819,19 +12122,19 @@ msgid "" "insstr` and :meth:`~curses.window.insnstr`. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6913 +#: ../NEWS:7105 msgid "" ":gh:`134771`: The ``time_clockid_converter()`` function now selects correct " "type for ``clockid_t`` on Cygwin which fixes a build error." msgstr "" -#: ../NEWS:6916 +#: ../NEWS:7108 msgid "" ":gh:`134637`: Fix performance regression in calling a :mod:`ctypes` function " "pointer in :term:`free threading`." msgstr "" -#: ../NEWS:6919 +#: ../NEWS:7111 msgid "" ":gh:`134696`: Built-in HACL* and OpenSSL implementations of hash function " "constructors now correctly accept the same *documented* named arguments. For " @@ -11840,127 +12143,127 @@ msgid "" "implementation but these calls were not compatible. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6926 +#: ../NEWS:7118 msgid "" ":gh:`132710`: If possible, ensure that :func:`uuid.getnode` returns the same " "result even across different processes. Previously, the result was constant " "only within the same process. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6930 +#: ../NEWS:7122 msgid "" ":gh:`134531`: :mod:`!_hashlib`: Rename internal C functions for :class:`!" "_hashlib.HASH` and :class:`!_hashlib.HASHXOF` objects. Patch by Bénédikt " "Tran." msgstr "" -#: ../NEWS:6934 +#: ../NEWS:7126 msgid "" ":gh:`134698`: Fix a crash when calling methods of :class:`ssl.SSLContext` " "or :class:`ssl.SSLSocket` across multiple threads." msgstr "" -#: ../NEWS:6937 +#: ../NEWS:7129 msgid "" ":gh:`134151`: :mod:`email`: Fix :exc:`TypeError` in :func:`email.utils." "decode_params` when sorting :rfc:`2231` continuations that contain an " "unnumbered section." msgstr "" -#: ../NEWS:6941 +#: ../NEWS:7133 msgid "" ":gh:`134635`: :mod:`zlib`: Allow to combine Adler-32 and CRC-32 checksums " "via :func:`~zlib.adler32_combine` and :func:`~zlib.crc32_combine`. Patch by " "Callum Attryde and Bénédikt Tran." msgstr "" -#: ../NEWS:6945 +#: ../NEWS:7137 msgid "" ":gh:`134657`: :mod:`asyncio`: Remove some private names from ``asyncio." "__all__``." msgstr "" -#: ../NEWS:6948 +#: ../NEWS:7140 msgid "" ":gh:`134210`: :func:`curses.window.getch` now correctly handles signals. " "Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:6951 +#: ../NEWS:7143 msgid "" ":gh:`80334`: :func:`multiprocessing.freeze_support` now checks for work on " "any \"spawn\" start method platform rather than only on Windows." msgstr "" -#: ../NEWS:6954 +#: ../NEWS:7146 msgid "" ":gh:`134582`: Fix tokenize.untokenize() round-trip errors related to t-" "strings braces escaping" msgstr "" -#: ../NEWS:6957 +#: ../NEWS:7149 msgid "" ":gh:`134580`: Improved the styling of HTML diff pages generated by the :" "class:`difflib.HtmlDiff` class, and migrated the output to the HTML5 " "standard." msgstr "" -#: ../NEWS:6961 +#: ../NEWS:7153 msgid "" ":gh:`134565`: :func:`unittest.doModuleCleanups` no longer swallows all but " "first exception raised in the cleanup code, but raises a :exc:" "`ExceptionGroup` if multiple errors occurred." msgstr "" -#: ../NEWS:6965 +#: ../NEWS:7157 msgid "" ":gh:`134546`: Ensure :mod:`pdb` remote debugging script is readable by " "remote Python process." msgstr "" -#: ../NEWS:6968 +#: ../NEWS:7160 msgid "" ":gh:`134451`: Converted ``asyncio.tools.CycleFoundException`` from dataclass " "to a regular exception type." msgstr "" -#: ../NEWS:6971 +#: ../NEWS:7163 msgid "" ":gh:`114177`: Fix :mod:`asyncio` to not close subprocess pipes which would " "otherwise error out when the event loop is already closed." msgstr "" -#: ../NEWS:6974 +#: ../NEWS:7166 msgid "" ":gh:`90871`: Fixed an off by one error concerning the backlog parameter in :" "meth:`~asyncio.loop.create_unix_server`. Contributed by Christian Harries." msgstr "" -#: ../NEWS:6978 +#: ../NEWS:7170 msgid ":gh:`134323`: Fix the :meth:`threading.RLock.locked` method." msgstr "" -#: ../NEWS:6980 +#: ../NEWS:7172 msgid "" ":gh:`86802`: Fixed asyncio memory leak in cancelled shield tasks. For " "shielded tasks where the shield was cancelled, log potential exceptions " "through the exception handler. Contributed by Christian Harries." msgstr "" -#: ../NEWS:6984 +#: ../NEWS:7176 msgid "" ":gh:`71189`: Add support of the all-but-last mode in :func:`os.path." "realpath`." msgstr "" -#: ../NEWS:6987 +#: ../NEWS:7179 msgid "" ":gh:`72902`: Improve speed (x1.1-1.8) of the :class:`~fractions.Fraction` " "constructor for typical inputs (:class:`float`'s, :class:`~decimal." "Decimal`'s or strings)." msgstr "" -#: ../NEWS:6991 +#: ../NEWS:7183 msgid "" ":gh:`134209`: :mod:`curses`: The :meth:`curses.window.instr` and :meth:" "`curses.window.getstr` methods now allocate their internal buffer on the " @@ -11968,104 +12271,104 @@ msgid "" "from 1023 to 2047." msgstr "" -#: ../NEWS:6996 +#: ../NEWS:7188 msgid "" ":gh:`88994`: Change :func:`datetime.datetime.now` to half-even rounding for " "consistency with :func:`datetime.datetime.fromtimestamp`. Patch by John " "Keith Hohm." msgstr "" -#: ../NEWS:7000 +#: ../NEWS:7192 msgid "" ":gh:`80184`: The default queue size is now ``socket.SOMAXCONN`` for :class:" "`socketserver.TCPServer`." msgstr "" -#: ../NEWS:7003 +#: ../NEWS:7195 msgid "" ":gh:`132983`: Add :mod:`!compression.zstd` version information to ``test." "pythoninfo``." msgstr "" -#: ../NEWS:7006 +#: ../NEWS:7198 msgid "" ":gh:`134235`: Updated tab completion on REPL to include builtin modules. " "Contributed by Tom Wang, Hunter Young" msgstr "" -#: ../NEWS:7009 +#: ../NEWS:7201 msgid "" ":gh:`134152`: Fixed :exc:`UnboundLocalError` that could occur during :mod:" "`email` header parsing if an expected trailing delimiter is missing in some " "contexts." msgstr "" -#: ../NEWS:7013 +#: ../NEWS:7205 msgid "" ":gh:`134152`: :mod:`email`: Fix parsing of email message ID with invalid " "domain." msgstr "" -#: ../NEWS:7016 +#: ../NEWS:7208 msgid "" ":gh:`134168`: :mod:`http.server`: Fix IPv6 address binding and :option:`--" "directory ` handling when using HTTPS." msgstr "" -#: ../NEWS:7019 +#: ../NEWS:7211 msgid "" ":gh:`62184`: Remove import of C implementation of :class:`io.FileIO` from " "Python implementation which has its own implementation" msgstr "" -#: ../NEWS:7022 +#: ../NEWS:7214 msgid "" ":gh:`134087`: Remove support for arbitrary positional or keyword arguments " "in the C implementation of :class:`threading.RLock` objects. This was " "deprecated since Python 3.14. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:7026 +#: ../NEWS:7218 msgid "" ":gh:`134173`: Speed up :mod:`asyncio` performance of transferring state from " "thread pool :class:`concurrent.futures.Future` by up to 4.4x. Patch by J. " "Nick Koston." msgstr "" -#: ../NEWS:7030 +#: ../NEWS:7222 msgid "" ":gh:`133982`: Emit :exc:`RuntimeWarning` in the Python implementation of :" "mod:`io` when the :term:`file-like object ` is not closed " "explicitly in the presence of multiple I/O layers." msgstr "" -#: ../NEWS:7034 +#: ../NEWS:7226 msgid "" ":gh:`133890`: The :mod:`tarfile` module now handles :exc:" "`UnicodeEncodeError` in the same way as :exc:`OSError` when cannot extract a " "member." msgstr "" -#: ../NEWS:7037 +#: ../NEWS:7229 msgid "" ":gh:`134097`: Fix interaction of the new :term:`REPL` and :option:`-X " "showrefcount <-X>` command line option." msgstr "" -#: ../NEWS:7040 +#: ../NEWS:7232 msgid "" ":gh:`133889`: The generated directory listing page in :class:`http.server." "SimpleHTTPRequestHandler` now only shows the decoded path component of the " "requested URL, and not the query and fragment." msgstr "" -#: ../NEWS:7044 +#: ../NEWS:7236 msgid "" ":gh:`134098`: Fix handling paths that end with a percent-encoded slash " "(``%2f`` or ``%2F``) in :class:`http.server.SimpleHTTPRequestHandler`." msgstr "" -#: ../NEWS:7047 +#: ../NEWS:7239 msgid "" ":gh:`132124`: On POSIX-compliant systems, :func:`!multiprocessing.util." "get_temp_dir` now ignores :envvar:`TMPDIR` (and similar environment " @@ -12075,34 +12378,34 @@ msgid "" "Tran." msgstr "" -#: ../NEWS:7054 +#: ../NEWS:7246 msgid "" ":gh:`134062`: :mod:`ipaddress`: fix collisions in :meth:`~object.__hash__` " "for :class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` " "objects." msgstr "" -#: ../NEWS:7058 +#: ../NEWS:7250 msgid "" ":gh:`134004`: :mod:`shelve` as well as underlying :mod:`!dbm.dumb` and :mod:" "`!dbm.sqlite` now have :meth:`!reorganize` methods to recover unused free " "space previously occupied by deleted entries." msgstr "" -#: ../NEWS:7062 +#: ../NEWS:7254 msgid "" ":gh:`133970`: Make :class:`!string.templatelib.Template` and :class:`!string." "templatelib.Interpolation` generic." msgstr "" -#: ../NEWS:7065 +#: ../NEWS:7257 msgid "" ":gh:`71253`: Raise :exc:`ValueError` in :func:`open` if *opener* returns a " "negative file-descriptor in the Python implementation of :mod:`io` to match " "the C implementation." msgstr "" -#: ../NEWS:7069 +#: ../NEWS:7261 msgid "" ":gh:`133960`: Simplify and improve :func:`typing.evaluate_forward_ref`. It " "now no longer raises errors on certain invalid types. In several situations, " @@ -12110,24 +12413,24 @@ msgid "" "unsupported." msgstr "" -#: ../NEWS:7074 +#: ../NEWS:7266 msgid "" ":gh:`133925`: Make the private class ``typing._UnionGenericAlias`` hashable." msgstr "" -#: ../NEWS:7076 +#: ../NEWS:7268 msgid "" ":gh:`133604`: Remove :func:`!platform.java_ver` which was deprecated since " "Python 3.13." msgstr "" -#: ../NEWS:7079 +#: ../NEWS:7271 msgid "" ":gh:`133875`: Removed deprecated :meth:`!pathlib.PurePath.is_reserved`. Use :" "func:`os.path.isreserved` to detect reserved paths on Windows." msgstr "" -#: ../NEWS:7082 +#: ../NEWS:7274 msgid "" ":gh:`133873`: Remove the deprecated ``getmark()``, ``setmark()`` and " "``getmarkers()`` methods of the :class:`~wave.Wave_read` and :class:`~wave." @@ -12135,33 +12438,33 @@ msgid "" "Bénédikt Tran." msgstr "" -#: ../NEWS:7087 +#: ../NEWS:7279 msgid "" ":gh:`133866`: Remove the undocumented function :func:`!ctypes." "SetPointerType`, which has been deprecated since Python 3.13. Patch by " "Bénédikt Tran." msgstr "" -#: ../NEWS:7091 +#: ../NEWS:7283 msgid "" ":gh:`133823`: Remove support for ``TD = TypedDict(\"TD\")`` and ``TD = " "TypedDict(\"TD\", None)`` calls for constructing :class:`typing.TypedDict` " "objects with zero field. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:7095 +#: ../NEWS:7287 msgid "" ":gh:`125996`: Fix thread safety of :class:`collections.OrderedDict`. Patch " "by Kumar Aditya." msgstr "" -#: ../NEWS:7098 +#: ../NEWS:7290 msgid "" ":gh:`133817`: Remove support for creating :class:`~typing.NamedTuple` " "classes via the undocumented keyword argument syntax. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:7101 +#: ../NEWS:7293 msgid "" ":gh:`133653`: Fix :class:`argparse.ArgumentParser` with the " "*formatter_class* argument. Fix TypeError when *formatter_class* is a custom " @@ -12171,71 +12474,71 @@ msgid "" "class:`!HelpFormatter`." msgstr "" -#: ../NEWS:7108 +#: ../NEWS:7300 msgid "" ":gh:`133810`: Remove :class:`!http.server.CGIHTTPRequestHandler` and ``--" "cgi`` flag from the :program:`python -m http.server` command-line interface. " "They were deprecated in Python 3.13. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:7112 +#: ../NEWS:7304 msgid "" ":gh:`132641`: Fixed a race in :func:`functools.lru_cache` under free-" "threading." msgstr "" -#: ../NEWS:7115 +#: ../NEWS:7307 msgid "" ":gh:`133783`: Fix bug with applying :func:`copy.replace` to :mod:`ast` " "objects. Attributes that default to ``None`` were incorrectly treated as " "required for manually created AST nodes." msgstr "" -#: ../NEWS:7119 +#: ../NEWS:7311 msgid "" ":gh:`133684`: Fix bug where :func:`annotationlib.get_annotations` would " "return the wrong result for certain classes that are part of a class " "hierarchy where ``from __future__ import annotations`` is used." msgstr "" -#: ../NEWS:7123 +#: ../NEWS:7315 msgid "" ":gh:`77057`: Fix handling of invalid markup declarations in :class:`html." "parser.HTMLParser`." msgstr "" -#: ../NEWS:7126 +#: ../NEWS:7318 msgid "" ":gh:`130328`: Speedup pasting in ``PyREPL`` on Windows in a legacy console. " "Patch by Chris Eibl." msgstr "" -#: ../NEWS:7129 +#: ../NEWS:7321 msgid "" ":gh:`133701`: Fix bug where :class:`typing.TypedDict` classes defined under " "``from __future__ import annotations`` and inheriting from another " "``TypedDict`` had an incorrect ``__annotations__`` attribute." msgstr "" -#: ../NEWS:7133 +#: ../NEWS:7325 msgid "" ":gh:`133656`: Remove deprecated :meth:`!zipimport.zipimporter.load_module`. " "Use :meth:`zipimport.zipimporter.exec_module` instead." msgstr "" -#: ../NEWS:7136 +#: ../NEWS:7328 msgid "" ":gh:`133722`: Added a *color* option to :func:`difflib.unified_diff` that " "colors output similar to :program:`git diff`." msgstr "" -#: ../NEWS:7139 +#: ../NEWS:7331 msgid "" -":gh:`133489`: :func:`random.getrandbits` can now generate more that 2\\ :sup:" +":gh:`133489`: :func:`random.getrandbits` can now generate more that 2 :sup:" "`31` bits. :func:`random.randbytes` can now generate more that 256 MiB." msgstr "" -#: ../NEWS:7143 +#: ../NEWS:7335 msgid "" ":gh:`133595`: Clean up :class:`sqlite3.Connection` APIs. All parameters of :" "func:`sqlite3.connect` except *database* are now keyword-only. The first " @@ -12246,7 +12549,7 @@ msgid "" "set_trace_callback` is now positional-only." msgstr "" -#: ../NEWS:7151 +#: ../NEWS:7343 msgid "" ":gh:`133581`: Improve unparsing of t-strings in :func:`ast.unparse` and " "``from __future__ import annotations``. Empty t-strings now round-trip " @@ -12254,57 +12557,57 @@ msgid "" "Zijlstra." msgstr "" -#: ../NEWS:7156 +#: ../NEWS:7348 msgid "" ":gh:`133577`: Add parameter ``formatter`` to :func:`logging.basicConfig`." msgstr "" -#: ../NEWS:7158 +#: ../NEWS:7350 msgid "" ":gh:`92897`: Removed the ``check_home`` parameter from :func:`sysconfig." "is_python_build`, deprecated since Python 3.12." msgstr "" -#: ../NEWS:7161 +#: ../NEWS:7353 msgid "" ":gh:`133551`: Support t-strings (:pep:`750`) in :mod:`annotationlib`. Patch " "by Jelle Zijlstra." msgstr "" -#: ../NEWS:7164 +#: ../NEWS:7356 msgid "" ":gh:`133517`: Remove :func:`os.listdrives`, :func:`os.listvolumes` and :func:" "`os.listmounts` in non Windows desktop builds since the underlying " "functionality is missing." msgstr "" -#: ../NEWS:7168 +#: ../NEWS:7360 msgid "" ":gh:`133439`: Fix dot commands with trailing spaces are mistaken for multi-" "line SQL statements in the sqlite3 command-line interface." msgstr "" -#: ../NEWS:7171 +#: ../NEWS:7363 msgid ":gh:`133447`: Add basic color to :mod:`sqlite3` CLI interface." msgstr "" -#: ../NEWS:7173 +#: ../NEWS:7365 msgid ":gh:`133253`: Fix thread-safety issues in :mod:`linecache`." msgstr "" -#: ../NEWS:7175 +#: ../NEWS:7367 msgid "" ":gh:`133390`: Support keyword completion in the :mod:`sqlite3` command-line " "interface and add :data:`sqlite3.SQLITE_KEYWORDS` constant." msgstr "" -#: ../NEWS:7178 +#: ../NEWS:7370 msgid "" ":gh:`132493`: Avoid accessing ``__annotations__`` unnecessarily in :func:" "`inspect.signature`." msgstr "" -#: ../NEWS:7181 +#: ../NEWS:7373 msgid "" ":gh:`133017`: Improve the error message of :func:`multiprocessing." "sharedctypes.Array`, :func:`multiprocessing.sharedctypes.RawArray`, :func:" @@ -12312,13 +12615,13 @@ msgid "" "RawValue` when an invalid typecode is passed. Patch by Tomas Roun" msgstr "" -#: ../NEWS:7188 +#: ../NEWS:7380 msgid "" ":gh:`132813`: Improve error messages for incorrect types and values of :" "class:`csv.Dialect` attributes." msgstr "" -#: ../NEWS:7191 +#: ../NEWS:7383 msgid "" ":gh:`132969`: Prevent the :class:`~concurrent.futures.ProcessPoolExecutor` " "executor thread, which remains running when :meth:`shutdown(wait=False) " @@ -12330,7 +12633,7 @@ msgid "" "pool." msgstr "" -#: ../NEWS:7200 +#: ../NEWS:7392 msgid "" ":gh:`132876`: ``ldexp()`` on Windows doesn't round subnormal results before " "Windows 11, but should. Python's :func:`math.ldexp` wrapper now does round " @@ -12338,62 +12641,62 @@ msgid "" "on Windows versions before 11." msgstr "" -#: ../NEWS:7205 +#: ../NEWS:7397 msgid "" ":gh:`133009`: :mod:`xml.etree.ElementTree`: Fix a crash in :meth:`Element." "__deepcopy__ ` when the element is concurrently " "mutated. Patch by Bénédikt Tran." msgstr "" -#: ../NEWS:7209 +#: ../NEWS:7401 msgid "" ":gh:`132908`: Add :func:`math.isnormal` and :func:`math.issubnormal` " "functions. Patch by Sergey B Kirpichev." msgstr "" -#: ../NEWS:7212 +#: ../NEWS:7404 msgid "" ":gh:`95380`: :func:`fcntl.fcntl` and :func:`fcntl.ioctl`: Remove the 1024 " "bytes limit on the size of not mutated bytes-like argument." msgstr "" -#: ../NEWS:7215 +#: ../NEWS:7407 msgid "" ":gh:`122781`: Fix ``%z`` directive in :func:`datetime.datetime.strptime` to " "allow for no provided offset as was documented." msgstr "" -#: ../NEWS:7218 +#: ../NEWS:7410 msgid "" ":gh:`123471`: Make concurrent iterations over :class:`itertools." "combinations` and :class:`itertools.product` safe under free-threading." msgstr "" -#: ../NEWS:7221 +#: ../NEWS:7413 msgid "" ":gh:`127081`: Fix libc thread safety issues with :mod:`dbm` by performing " "stateful operations in critical sections." msgstr "" -#: ../NEWS:7224 +#: ../NEWS:7416 msgid "" ":gh:`127081`: Fix libc thread safety issues with :mod:`os` by replacing " "``getlogin`` with ``getlogin_r`` re-entrant version." msgstr "" -#: ../NEWS:7227 +#: ../NEWS:7419 msgid "" ":gh:`127081`: Fix libc thread safety issues with :mod:`pwd` by locking " "access to ``getpwall``." msgstr "" -#: ../NEWS:7230 +#: ../NEWS:7422 msgid "" ":gh:`132551`: Make :class:`io.BytesIO` safe in :term:`free-threaded ` build." msgstr "" -#: ../NEWS:7233 +#: ../NEWS:7425 msgid "" ":gh:`107583`: Fix :class:`!Flag` inversion when flag set has missing values " "(:class:`!IntFlag` still flips all bits); fix negative assigned values " @@ -12401,40 +12704,40 @@ msgid "" "missing values)." msgstr "" -#: ../NEWS:7238 +#: ../NEWS:7430 msgid "" ":gh:`87790`: Support underscore and comma as thousands separators in the " "fractional part for :class:`~fractions.Fraction`'s formatting. Patch by " "Sergey B Kirpichev." msgstr "" -#: ../NEWS:7242 +#: ../NEWS:7434 msgid "" ":gh:`87790`: Support underscore and comma as thousands separators in the " "fractional part for :class:`~decimal.Decimal`'s formatting. Patch by Sergey " "B Kirpichev." msgstr "" -#: ../NEWS:7246 +#: ../NEWS:7438 msgid "" ":gh:`131884`: Fix formatting issues in :func:`json.dump` when both *indent* " "and *skipkeys* are used." msgstr "" -#: ../NEWS:7249 +#: ../NEWS:7441 msgid "" ":gh:`131788`: Make ``ResourceTracker.send`` from :mod:`multiprocessing` re-" "entrant safe" msgstr "" -#: ../NEWS:7252 +#: ../NEWS:7444 msgid "" ":gh:`91349`: Adjust default ``compressionlevel=`` to 6 (down from 9) in :mod:" "`gzip` and :mod:`tarfile`. It is the default level used by most compression " "tools and a better tradeoff between speed and performance." msgstr "" -#: ../NEWS:7256 +#: ../NEWS:7448 msgid "" ":gh:`131146`: Fix :class:`calendar.TextCalendar`, :class:`calendar." "HTMLCalendar`, and the :mod:`calendar` CLI to display month names in the " @@ -12444,13 +12747,13 @@ msgid "" "itself, if the locale supports it." msgstr "" -#: ../NEWS:7264 +#: ../NEWS:7456 msgid "" ":gh:`123471`: Make concurrent iterations over :class:`itertools.cycle` safe " "under free-threading." msgstr "" -#: ../NEWS:7267 +#: ../NEWS:7459 msgid "" ":gh:`130664`: Handle corner-case for :class:`~fractions.Fraction`'s " "formatting: treat zero-padding (preceding the width field by a zero " @@ -12458,76 +12761,76 @@ msgid "" "alignment type of ``'='``, just as in case of :class:`float`'s." msgstr "" -#: ../NEWS:7272 +#: ../NEWS:7464 msgid "" ":gh:`130999`: Avoid exiting the new REPL and offer suggestions even if there " "are non-string candidates when errors occur." msgstr "" -#: ../NEWS:7275 +#: ../NEWS:7467 msgid "" ":gh:`88473`: Implement a fast path for :class:`datetime.date` objects in :" "func:`datetime.date.today` which results in a 5x performance gain while " "proper subclasses retain their previous performance." msgstr "" -#: ../NEWS:7279 +#: ../NEWS:7471 msgid "" ":gh:`126883`: Add check that timezone fields are in range for :meth:" "`datetime.datetime.fromisoformat` and :meth:`datetime.time.fromisoformat`. " "Patch by Semyon Moroz." msgstr "" -#: ../NEWS:7283 +#: ../NEWS:7475 msgid "" ":gh:`125028`: :data:`functools.Placeholder` cannot be passed to :func:" "`functools.partial` as a keyword argument." msgstr "" -#: ../NEWS:7286 +#: ../NEWS:7478 msgid "" ":gh:`125843`: If possible, indicate which :mod:`curses` C function or macro " "is responsible for raising a :exc:`curses.error` exception. Patch by " "Bénédikt Tran." msgstr "" -#: ../NEWS:7290 +#: ../NEWS:7482 msgid "" ":gh:`119109`: :func:`functools.partial` calls are now faster when keyword " "arguments are used." msgstr "" -#: ../NEWS:7293 +#: ../NEWS:7485 msgid "" ":gh:`124033`: ``SimplePath`` is now presented in ``importlib.metadata." "__all__``." msgstr "" -#: ../NEWS:7296 +#: ../NEWS:7488 msgid "" ":gh:`91216`: ``importlib.metadata`` now raises a ``KeyError`` instead of " "returning ``None`` when a key is missing from the metadata." msgstr "" -#: ../NEWS:7299 +#: ../NEWS:7491 msgid "" ":gh:`120492`: ``importlib.metadata`` now prioritizes valid dists to invalid " "dists when retrieving by name." msgstr "" -#: ../NEWS:7302 +#: ../NEWS:7494 msgid "" ":gh:`99631`: The :mod:`shelve` module now accepts custom serialization and " "deserialization functions." msgstr "" -#: ../NEWS:7305 +#: ../NEWS:7497 msgid "" ":gh:`119186`: Slightly speed up :func:`os.walk` by calling :func:`os.path." "join` less often." msgstr "" -#: ../NEWS:7308 +#: ../NEWS:7500 msgid "" ":gh:`120170`: Fix an issue in the :mod:`!_pickle` extension module in which " "importing :mod:`multiprocessing` could change how pickle identifies which " @@ -12535,18 +12838,18 @@ msgid "" "objects." msgstr "" -#: ../NEWS:7313 +#: ../NEWS:7505 msgid "" ":gh:`118981`: Fix potential hang in ``multiprocessing.popen_spawn_posix`` " "that can happen when the child proc dies early by closing the child fds " "right away." msgstr "" -#: ../NEWS:7317 ../NEWS:19281 +#: ../NEWS:7509 ../NEWS:19473 msgid ":gh:`105497`: Fix flag mask inversion when unnamed flags exist." msgstr "" -#: ../NEWS:7319 +#: ../NEWS:7511 msgid "" ":gh:`99813`: :mod:`ssl` now uses ``SSL_sendfile`` internally when it is " "possible (see :data:`~ssl.OP_ENABLE_KTLS`). The function sends a file more " @@ -12554,54 +12857,54 @@ msgid "" "additional context switches. Patch by Illia Volochii." msgstr "" -#: ../NEWS:7324 +#: ../NEWS:7516 msgid "" ":gh:`62824`: Fix aliases for ``iso8859_8`` encoding. Patch by Dave Goncalves." msgstr "" -#: ../NEWS:7326 +#: ../NEWS:7518 msgid "" ":gh:`86155`: :meth:`html.parser.HTMLParser.close` no longer loses data when " "the ``\"/>``." +msgstr "" + +#: ../NEWS:6047 +msgid "" +"Multiple slashes and whitespaces between the last attribute and closing " +"``>`` are now ignored in both start and end tags. E.g. ````." +msgstr "" + +#: ../NEWS:6050 +msgid "" +"Multiple ``=`` between attribute name and value are no longer collapsed. E." +"g. ```` produces attribute \"foo\" with value \"=bar\"." +msgstr "" + +#: ../NEWS:6053 +msgid "" +":gh:`135661`: Fix CDATA section parsing in :class:`html.parser.HTMLParser` " +"according to the HTML5 standard: ``] ]>`` and ``]] >`` no longer end the " +"CDATA section. Add private method ``_set_support_cdata()`` which can be used " +"to specify how to parse ``<[CDATA[`` --- as a CDATA section in foreign " +"content (SVG or MathML) or as a bogus comment in the HTML namespace." +msgstr "" + +#: ../NEWS:6060 +msgid "" +":gh:`102555`: Fix comment parsing in :class:`html.parser.HTMLParser` " +"according to the HTML5 standard. ``--!>`` now ends the comment. ``-- >`` no " +"longer ends the comment. Support abnormally ended empty comments ``<-->`` " +"and ``<--->``." +msgstr "" + +#: ../NEWS:6065 +msgid "" +":gh:`135462`: Fix quadratic complexity in processing specially crafted input " +"in :class:`html.parser.HTMLParser`. End-of-file errors are now handled " +"according to the HTML5 specs -- comments and declarations are automatically " +"closed, tags are ignored." +msgstr "" + +#: ../NEWS:6070 +msgid "" +":gh:`118350`: Fix support of escapable raw text mode (elements \"textarea\" " +"and \"title\") in :class:`html.parser.HTMLParser`." +msgstr "" + +#: ../NEWS:6073 +msgid "" +":gh:`135034`: Fixes multiple issues that allowed ``tarfile`` extraction " +"filters (``filter=\"data\"`` and ``filter=\"tar\"``) to be bypassed using " +"crafted symlinks and hard links." +msgstr "" + +#: ../NEWS:6077 +msgid "" +"Addresses :cve:`2024-12718`, :cve:`2025-4138`, :cve:`2025-4330`, and :cve:" +"`2025-4517`." +msgstr "" + +#: ../NEWS:6080 +msgid "" +":gh:`133767`: Fix use-after-free in the \"unicode-escape\" decoder with a " +"non-\"strict\" error handler." +msgstr "" + +#: ../NEWS:6083 +msgid "" +":gh:`133623`: Indicate through :data:`ssl.HAS_PSK_TLS13` whether the :mod:" +"`ssl` module supports \"External PSKs\" in TLSv1.3, as described in RFC " +"9258. Patch by Will Childs-Klein." +msgstr "" + +#: ../NEWS:6087 +msgid "" +":gh:`128840`: Short-circuit the processing of long IPv6 addresses early in :" +"mod:`ipaddress` to prevent excessive memory consumption and a minor denial-" +"of-service." +msgstr "" + +#: ../NEWS:6094 +msgid "" +":gh:`139482`: Optimize :data:`os.environ.clear() ` by calling :" +"manpage:`clearenv(3)` when this function is available. Patch by Victor " +"Stinner." +msgstr "" + +#: ../NEWS:6098 +msgid "" +":gh:`139958`: The ``application/toml`` mime type is now supported by :mod:" +"`mimetypes`. Patch by Gil Forcada." +msgstr "" + +#: ../NEWS:6101 +msgid "" +":gh:`139823`: :mod:`ensurepip` now fails with a nicer error message when " +"the :mod:`zlib` module is not available." +msgstr "" + +#: ../NEWS:6104 +msgid "" +":gh:`139905`: Add suggestion to error message for :class:`typing.Generic` " +"subclasses when ``cls.__parameters__`` is missing due to a parent class " +"failing to call :meth:`super().__init_subclass__() ` in its ``__init_subclass__``." +msgstr "" + +#: ../NEWS:6109 +msgid "" +":gh:`139894`: Fix incorrect sharing of current task with the child process " +"while forking in :mod:`asyncio`. Patch by Kumar Aditya." +msgstr "" + +#: ../NEWS:6112 +msgid "" +":gh:`139845`: Fix to not print KeyboardInterrupt twice in default asyncio " +"REPL." +msgstr "" + +#: ../NEWS:6115 +msgid "" +":gh:`139783`: Fix :func:`inspect.getsourcelines` for the case when a " +"decorator is followed by a comment or an empty line." +msgstr "" + +#: ../NEWS:6118 +msgid "" +":gh:`139809`: Prevent premature colorization of subparser ``prog`` in :meth:" +"`argparse.ArgumentParser.add_subparsers` to respect color environment " +"variable changes after parser creation." +msgstr "" + +#: ../NEWS:6122 +msgid "" +":gh:`139736`: Fix excessive indentation in the default :mod:`argparse` :" +"class:`!HelpFormatter`. Patch by Alexander Edland." +msgstr "" + +#: ../NEWS:6125 +msgid "" +":gh:`70765`: :mod:`http.server`: fix default handling of HTTP/0.9 requests " +"in :class:`~http.server.BaseHTTPRequestHandler`. Previously, :meth:`!" +"BaseHTTPRequestHandler.parse_request` incorrectly waited for headers in the " +"request although those are not supported in HTTP/0.9. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6131 +msgid "" +":gh:`139322`: Fix :func:`os.getlogin` error handling: fix the error number. " +"Patch by Victor Stinner." +msgstr "" + +#: ../NEWS:6134 +msgid "" +":gh:`135953`: Add a Gecko format output to the tachyon profiler via ``--" +"gecko``." +msgstr "" + +#: ../NEWS:6137 +msgid "" +":gh:`139184`: :func:`os.forkpty` does now make the returned file descriptor " +"non-inheritable." +msgstr "" + +#: ../NEWS:6140 +msgid "" +":gh:`139391`: Fix an issue when, on non-Windows platforms, it was not " +"possible to gracefully exit a ``python -m asyncio`` process suspended by " +"Ctrl+Z and later resumed by :manpage:`fg` other than with :manpage:`kill`." +msgstr "" + +#: ../NEWS:6144 +msgid ":gh:`139374`: :mod:`timeit`: Add color to error tracebacks." +msgstr "" + +#: ../NEWS:6146 +msgid "" +":gh:`90949`: Add :meth:`~xml.parsers.expat.xmlparser." +"SetBillionLaughsAttackProtectionActivationThreshold` and :meth:`~xml.parsers." +"expat.xmlparser.SetBillionLaughsAttackProtectionMaximumAmplification` to :" +"ref:`xmlparser ` objects to tune protections against " +"`billion laughs `_ " +"attacks. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6155 +msgid ":gh:`139312`: Upgrade bundled libexpat to 2.7.3" +msgstr "" + +#: ../NEWS:6157 +msgid "" +":gh:`139289`: Do a real lazy-import on :mod:`rlcompleter` in :mod:`pdb` and " +"restore the existing completer after importing :mod:`rlcompleter`." +msgstr "" + +#: ../NEWS:6160 +msgid "" +":gh:`90949`: Add :meth:`~xml.parsers.expat.xmlparser." +"SetAllocTrackerActivationThreshold` and :meth:`~xml.parsers.expat.xmlparser." +"SetAllocTrackerMaximumAmplification` to :ref:`xmlparser ` " +"objects to tune protections against disproportional amounts of dynamic " +"memory usage from within an Expat parser. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6168 +msgid "" +":gh:`67795`: Functions that take timestamp or timeout arguments now accept " +"any real numbers (such as :class:`~decimal.Decimal` and :class:`~fractions." +"Fraction`), not only integers or floats, although this does not improve " +"precision." +msgstr "" + +#: ../NEWS:6173 +msgid "" +":gh:`95953`: A CSS class, ``diff_changed``, was added to the changed lines " +"in the ``make_table`` output of :class:`difflib.HtmlDiff`. Patch by Katie " +"Gardner." +msgstr "" + +#: ../NEWS:6177 +msgid "" +":gh:`139210`: Fix use-after-free when reporting unknown event in :func:`xml." +"etree.ElementTree.iterparse`. Patch by Ken Jin." +msgstr "" + +#: ../NEWS:6180 +msgid "" +":gh:`138860`: Lazy import :mod:`rlcompleter` in :mod:`pdb` to avoid deadlock " +"in subprocess." +msgstr "" + +#: ../NEWS:6183 +msgid "" +":gh:`112729`: Fix crash when calling :func:`concurrent.interpreters.create` " +"when the process is out of memory." +msgstr "" + +#: ../NEWS:6186 +msgid "" +":gh:`126016`: Fix an assertion failure when sending :exc:`KeyboardInterrupt` " +"to a Python process running a subinterpreter in a separate thread." +msgstr "" + +#: ../NEWS:6189 +msgid "" +":gh:`118803`: :class:`collections.abc.ByteString` has been removed from " +"``collections.abc.__all__``, and :class:`typing.ByteString` has been removed " +"from ``typing.__all__``. The former has been deprecated since Python 3.12, " +"and the latter has been deprecated since Python 3.9. Both classes are " +"scheduled for removal in Python 3.17." +msgstr "" + +#: ../NEWS:6195 +msgid "" +"Additionally, the following statements now cause ``DeprecationWarning``\\ s " +"to be emitted at runtime: ``from collections.abc import ByteString``, ``from " +"typing import ByteString``, ``import collections.abc; collections.abc." +"ByteString`` and ``import typing; typing.ByteString``. Both classes already " +"caused ``DeprecationWarning``\\ s to be emitted if they were subclassed or " +"used as the second argument to ``isinstance()`` or ``issubclass()``, but " +"they did not previously lead to ``DeprecationWarning``\\ s if they were " +"merely imported or accessed from their respective modules." +msgstr "" + +#: ../NEWS:6205 +msgid "" +":gh:`135729`: Fix unraisable exception during finalization when using :mod:" +"`concurrent.interpreters` in the REPL." +msgstr "" + +#: ../NEWS:6208 +msgid "" +":gh:`139076`: Fix a bug in the :mod:`pydoc` module that was hiding functions " +"in a Python module if they were implemented in an extension module and the " +"module did not have ``__all__``." +msgstr "" + +#: ../NEWS:6212 +msgid ":gh:`139090`: Add :data:`os.RWF_DONTCACHE` constant for Linux 6.14+." +msgstr "" + +#: ../NEWS:6214 +msgid "" +":gh:`139065`: Fix trailing space before a wrapped long word if the line " +"length is exactly *width* in :mod:`textwrap`." +msgstr "" + +#: ../NEWS:6217 +msgid "" +":gh:`139001`: Fix race condition in :class:`pathlib.Path` on the internal " +"``_raw_paths`` field." +msgstr "" + +#: ../NEWS:6220 +msgid "" +":gh:`138813`: :class:`!multiprocessing.BaseProcess` defaults ``kwargs`` to " +"``None`` instead of a shared dictionary." +msgstr "" + +#: ../NEWS:6223 +msgid ":gh:`138998`: Update bundled libexpat to 2.7.2" +msgstr "" + +#: ../NEWS:6225 +msgid ":gh:`138993`: Dedent :data:`credits` text." +msgstr "" + +#: ../NEWS:6227 +msgid "" +":gh:`118803`: Add back :class:`collections.abc.ByteString` and :class:" +"`typing.ByteString`. Both had been removed in prior alpha, beta and release " +"candidates for Python 3.14, but their removal has now been postponed to " +"Python 3.17." +msgstr "" + +#: ../NEWS:6232 +msgid "" +":gh:`130567`: Fix possible crash in :func:`locale.strxfrm` due to a platform " +"bug on macOS." +msgstr "" + +#: ../NEWS:6235 +msgid "" +":gh:`137226`: Fix :func:`typing.get_type_hints` calls on generic :class:" +"`typing.TypedDict` classes defined with string annotations." +msgstr "" + +#: ../NEWS:6238 +msgid "" +":gh:`138899`: Executing ``quit`` command in :mod:`pdb` will raise :exc:`bdb." +"BdbQuit` when :mod:`pdb` is started from an asyncio console using :func:" +"`breakpoint` or :func:`pdb.set_trace`." +msgstr "" + +#: ../NEWS:6242 +msgid "" +":gh:`138804`: Raise :exc:`TypeError` instead of :exc:`AttributeError` when " +"an argument of incorrect type is passed to :func:`shlex.quote`. This " +"restores the behavior of the function prior to 3.14." +msgstr "" + +#: ../NEWS:6246 +msgid "" +":gh:`138779`: Support device numbers larger than ``2**63-1`` for the :attr:" +"`~os.stat_result.st_rdev` field of the :class:`os.stat_result` structure." +msgstr "" + +#: ../NEWS:6250 +msgid "" +":gh:`138682`: Added symmetric difference support to :class:`collections." +"Counter` objects." +msgstr "" + +#: ../NEWS:6253 +msgid ":gh:`138712`: Add :const:`os.NODEV`." +msgstr "" + +#: ../NEWS:6255 +msgid "" +":gh:`128636`: Fix crash in PyREPL when os.environ is overwritten with an " +"invalid value for mac" +msgstr "" + +#: ../NEWS:6258 +msgid "" +":gh:`138720`: Fix an issue where :class:`io.BufferedWriter` and :class:`io." +"BufferedRandom` had different definitions of \"closed\" for :meth:`~io." +"IOBase.close` and :meth:`~io.IOBase.flush` which resulted in an exception " +"when close called flush but flush thought the file was already closed." +msgstr "" + +#: ../NEWS:6264 +msgid ":gh:`138706`: Update :mod:`unicodedata` database to Unicode 17.0.0." +msgstr "" + +#: ../NEWS:6266 +msgid "" +":gh:`76007`: Deprecate ``__version__`` from a number of standard library " +"modules. Patch by Hugo van Kemenade." +msgstr "" + +#: ../NEWS:6269 +msgid "" +":gh:`138535`: Speed up :func:`os.stat` for files with reasonable timestamps. " +"Contributed by Jeffrey Bosboom." +msgstr "" + +#: ../NEWS:6272 +msgid "" +":gh:`116946`: :mod:`curses.panel`: the type of :func:`curses.panel." +"new_panel` is now immutable. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6275 +msgid "" +":gh:`116946`: :mod:`zlib`: the types of :func:`zlib.compressobj` and :func:" +"`zlib.decompressobj` are now immutable. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6278 +msgid "" +":gh:`116946`: :mod:`os`: the :class:`os.DirEntry` type and the type of :func:" +"`os.scandir` are now immutable. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6281 +msgid "" +":gh:`116946`: :mod:`tkinter`: the types :class:`!_tkinter.Tcl_Obj` (wrapper " +"for Tcl objects), :class:`!_tkinter.tktimertoken` (obtained by calling " +"``createtimerhandler()`` on a :attr:`Tk ` application) and :" +"class:`!_tkinter.tkapp` (the runtime type of Tk applications) are now " +"immutable. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6287 +msgid "" +":gh:`138514`: Raise :exc:`ValueError` when a multi-character string is " +"passed to the *echo_char* parameter of :func:`getpass.getpass`. Patch by " +"Benjamin Johnson." +msgstr "" + +#: ../NEWS:6291 +msgid "" +":gh:`137706`: Fix the partial evaluation of annotations that use ``typing." +"Annotated[T, x]`` where ``T`` is a forward reference." +msgstr "" + +#: ../NEWS:6294 +msgid "" +":gh:`88375`: Fix normalization of the ``robots.txt`` rules and URLs in the :" +"mod:`urllib.robotparser` module. No longer ignore trailing ``?``. " +"Distinguish raw special characters ``?``, ``=`` and ``&`` from the percent-" +"encoded ones." +msgstr "" + +#: ../NEWS:6299 +msgid ":gh:`138515`: :mod:`email` is added to Emscripten build." +msgstr "" + +#: ../NEWS:6301 +msgid "" +":gh:`99948`: :func:`ctypes.util.find_library` now works in Emscripten build." +msgstr "" + +#: ../NEWS:6303 +msgid "" +":gh:`111788`: Fix parsing errors in the :mod:`urllib.robotparser` module. " +"Don't fail trying to parse weird paths. Don't fail trying to decode non-" +"UTF-8 ``robots.txt`` files." +msgstr "" + +#: ../NEWS:6307 +msgid "" +":gh:`138432`: :meth:`zoneinfo.reset_tzpath` will now convert any :class:`os." +"PathLike` objects it receives into strings before adding them to ``TZPATH``. " +"It will raise ``TypeError`` if anything other than a string is found after " +"this conversion. If given an :class:`os.PathLike` object that represents a " +"relative path, it will now raise ``ValueError`` instead of ``TypeError``, " +"and present a more informative error message." +msgstr "" + +#: ../NEWS:6314 +msgid "" +":gh:`132657`: Improve the scaling of :func:`copy.copy` and :func:`copy." +"deepcopy` in the free-threading build." +msgstr "" + +#: ../NEWS:6317 +msgid "" +":gh:`116946`: The types of :func:`select.poll` and :func:`select.epoll` " +"objects are now immutable. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6320 +msgid "" +":gh:`116946`: The :class:`!_random.Random` C type is now immutable. Patch by " +"Bénédikt Tran." +msgstr "" + +#: ../NEWS:6323 +msgid "" +":gh:`57911`: When extracting tar files on Windows, slashes in symlink " +"targets will be replaced by backslashes to prevent corrupted links." +msgstr "" + +#: ../NEWS:6326 +msgid "" +":gh:`138205`: Removed the :meth:`~mmap.mmap.resize` method on platforms that " +"don't support the underlying syscall, instead of raising a :exc:" +"`SystemError`." +msgstr "" + +#: ../NEWS:6330 +msgid "" +":gh:`138008`: Fix segmentation faults in the :mod:`ctypes` module due to " +"invalid :attr:`~ctypes._CFuncPtr.argtypes`. Patch by Dung Nguyen." +msgstr "" + +#: ../NEWS:6333 +msgid "" +":gh:`138252`: :mod:`ssl`: :class:`~ssl.SSLContext` objects can now set " +"client and server TLS signature algorithms. If Python has been built with " +"OpenSSL 3.5 or later, :class:`~ssl.SSLSocket` objects can return the " +"signature algorithms selected on a connection." +msgstr "" + +#: ../NEWS:6338 +msgid "" +":gh:`138253`: Add the *block* parameter in the :meth:`!put` and :meth:`!get` " +"methods of the :mod:`concurrent.interpreters` queues for compatibility with " +"the :class:`queue.Queue` interface." +msgstr "" + +#: ../NEWS:6342 +msgid "" +":gh:`60462`: Fix :func:`locale.strxfrm` on Solaris (and possibly other " +"platforms)." +msgstr "" + +#: ../NEWS:6345 +msgid "" +":gh:`138239`: The REPL now highlights :keyword:`type` as a soft keyword in :" +"ref:`type statements `." +msgstr "" + +#: ../NEWS:6348 +msgid "" +":gh:`78502`: :class:`mmap.mmap` now has a *trackfd* parameter on Windows; if " +"it is ``False``, the file handle corresponding to *fileno* will not be " +"duplicated." +msgstr "" + +#: ../NEWS:6352 +msgid "" +":gh:`138204`: Forbid expansion of shared anonymous :mod:`memory maps ` " +"on Linux, which caused a bus error." +msgstr "" + +#: ../NEWS:6355 +msgid "" +":gh:`138010`: Fix an issue where defining a class with a :deco:`warnings." +"deprecated`-decorated base class may not invoke the correct :meth:`~object." +"__init_subclass__` method in cases involving multiple inheritance. Patch by " +"Brian Schubert." +msgstr "" + +#: ../NEWS:6360 +msgid "" +":gh:`134716`: Add support of regular expressions in the :option:`-W` option " +"and the :envvar:`PYTHONWARNINGS` environment variable." +msgstr "" + +#: ../NEWS:6363 +msgid "" +":gh:`138133`: Prevent infinite traceback loop when sending CTRL^C to Python " +"through ``strace``." +msgstr "" + +#: ../NEWS:6366 +msgid "" +":gh:`138122`: Implement :pep:`799` -- A dedicated profiling package for " +"organizing Python profiling tools. Patch by Pablo Galindo." +msgstr "" + +#: ../NEWS:6369 +msgid "" +":gh:`138092`: Fixed a bug in :meth:`mmap.mmap.flush` where calling with only " +"an offset parameter would fail." +msgstr "" + +#: ../NEWS:6372 +msgid "" +":gh:`138044`: Remove compatibility shim for deprecated parameter *package* " +"in :func:`importlib.resources.files`. Patch by Semyon Moroz." +msgstr "" + +#: ../NEWS:6375 +msgid ":gh:`86819`: :mod:`socket`: Add missing constants for ISO-TP sockets." +msgstr "" + +#: ../NEWS:6377 +msgid "" +":gh:`137884`: Add :func:`threading.get_native_id` support for Illumos/" +"Solaris. Patch by Yüce Tekol." +msgstr "" + +#: ../NEWS:6380 +msgid "" +":gh:`134869`: Fix an issue where pressing Ctrl+C during tab completion in " +"the REPL would leave the autocompletion menu in a corrupted state." +msgstr "" + +#: ../NEWS:6383 +msgid "" +":gh:`137840`: :class:`typing.TypedDict` now supports the ``closed`` and " +"``extra_items`` keyword arguments (as described in :pep:`728`) to control " +"whether additional non-required keys are allowed and to specify their value " +"type." +msgstr "" + +#: ../NEWS:6388 +msgid "" +":gh:`132947`: Applied changes to ``importlib.metadata`` from " +"`importlib_metadata 8.7 `_, including ``dist`` now disallowed for ``EntryPoints." +"select``; deferred imports for faster import times; added support for " +"metadata with newlines (python/cpython#119650); and ``metadata()`` function " +"now returns ``None`` when a metadata directory is present but no metadata is " +"present." +msgstr "" + +#: ../NEWS:6396 +msgid "" +":gh:`90548`: Fix ``musl`` detection for :func:`platform.libc_ver` on Alpine " +"Linux if compiled with --strip-all." +msgstr "" + +#: ../NEWS:6399 +msgid "" +":gh:`137317`: :func:`inspect.signature` now correctly handles classes that " +"use a descriptor on a wrapped :meth:`!__init__` or :meth:`!__new__` method. " +"Contributed by Yongyu Yan." +msgstr "" + +#: ../NEWS:6403 +msgid "" +":gh:`137754`: Fix import of the :mod:`zoneinfo` module if the C " +"implementation of the :mod:`datetime` module is not available." +msgstr "" + +#: ../NEWS:6406 +msgid "" +":gh:`125854`: Improve error messages for invalid category in :func:`warnings." +"warn`." +msgstr "" + +#: ../NEWS:6409 +msgid "" +":gh:`137729`: :func:`locale.setlocale` now supports language codes with " +"``@``-modifiers. ``@``-modifier are no longer silently removed in :func:" +"`locale.getlocale`, but included in the language code." +msgstr "" + +#: ../NEWS:6413 +msgid "" +":gh:`73487`: Speedup processing arguments (up to 1.5x) in the :mod:`decimal` " +"module methods, that now using :c:macro:`METH_FASTCALL` calling convention. " +"Patch by Sergey B Kirpichev." +msgstr "" + +#: ../NEWS:6417 +msgid "" +":gh:`137634`: Calendar pages generated by the :class:`calendar.HTMLCalendar` " +"class now support dark mode and have been migrated to the HTML5 standard for " +"improved accessibility." +msgstr "" + +#: ../NEWS:6421 +msgid "" +":gh:`137630`: The :mod:`!_interpreters` module now uses Argument Clinic to " +"parse arguments. Patch by Adam Turner." +msgstr "" + +#: ../NEWS:6424 +msgid "" +":gh:`137583`: Fix a deadlock introduced in 3.13.6 when a call to :meth:`ssl." +"SSLSocket.recv ` was blocked in one thread, and then " +"another method on the object (such as :meth:`ssl.SSLSocket.send `) was subsequently called in another thread." +msgstr "" + +#: ../NEWS:6429 +msgid "" +":gh:`92936`: Update regex used by ``http.cookies.SimpleCookie`` to handle " +"values containing double quotes." +msgstr "" + +#: ../NEWS:6432 +msgid "" +":gh:`137426`: Remove the code deprecation of ``importlib.abc." +"ResourceLoader``. It is documented as deprecated, but left for backwards " +"compatibility with other classes in ``importlib.abc``." +msgstr "" + +#: ../NEWS:6436 +msgid "" +":gh:`137490`: Handle :data:`~errno.ECANCELED` in the same way as :data:" +"`~errno.EINTR` in :func:`signal.sigwaitinfo` on NetBSD." +msgstr "" + +#: ../NEWS:6439 +msgid "" +":gh:`137512`: Add new constants in the :mod:`resource` module: :data:" +"`~resource.RLIMIT_NTHR`, :data:`~resource.RLIMIT_UMTXP`, :data:`~resource." +"RLIMIT_PIPEBUF`, :data:`~resource.RLIMIT_THREADS`, :data:`~resource." +"RLIM_SAVED_CUR`, and :data:`~resource.RLIM_SAVED_MAX`." +msgstr "" + +#: ../NEWS:6444 +msgid "" +":gh:`137044`: :data:`resource.RLIM_INFINITY` is now always a positive " +"integer. On all supported platforms, it is larger than any limited resource " +"value, which simplifies comparison of the resource values. Previously, it " +"could be negative, such as -1 or -3, depending on platform." +msgstr "" + +#: ../NEWS:6449 +msgid "" +":gh:`137477`: Fix :func:`!inspect.getblock`, :func:`inspect.getsourcelines` " +"and :func:`inspect.getsource` for generator expressions." +msgstr "" + +#: ../NEWS:6452 +msgid "" +":gh:`137481`: Calendar uses the lengths of the locale's weekdays to decide " +"if the width requires abbreviation." +msgstr "" + +#: ../NEWS:6455 +msgid "" +":gh:`137466`: Remove undocumented :func:`!glob.glob0` and :func:`!glob." +"glob1` functions, which have been deprecated since Python 3.13. Use :func:" +"`glob.glob` and pass a directory to its *root_dir* argument instead." +msgstr "" + +#: ../NEWS:6459 +msgid "" +":gh:`137044`: Return large limit values as positive integers instead of " +"negative integers in :func:`resource.getrlimit`. Accept large values and " +"reject negative values (except :data:`~resource.RLIM_INFINITY`) for limits " +"in :func:`resource.setrlimit`." +msgstr "" + +#: ../NEWS:6464 +msgid ":gh:`115766`: Fix :attr:`!ipaddress.IPv4Interface.is_unspecified`." +msgstr "" + +#: ../NEWS:6466 +msgid "" +":gh:`75989`: :func:`tarfile.TarFile.extractall` and :func:`tarfile.TarFile." +"extract` now overwrite symlinks when extracting hardlinks. (Contributed by " +"Alexander Enrique Urieles Nieto in :gh:`75989`.)" +msgstr "" + +#: ../NEWS:6471 +msgid "" +":gh:`137017`: Fix :obj:`threading.Thread.is_alive` to remain ``True`` until " +"the underlying OS thread is fully cleaned up. This avoids false negatives in " +"edge cases involving thread monitoring or premature :obj:`threading.Thread." +"is_alive` calls." +msgstr "" + +#: ../NEWS:6476 +msgid "" +":gh:`137273`: Fix debug assertion failure in :func:`locale.setlocale` on " +"Windows." +msgstr "" + +#: ../NEWS:6479 +msgid "" +":gh:`137191`: Fix how type parameters are collected, when :class:`typing." +"Protocol` are specified with explicit parameters. Now, :class:`typing." +"Generic` and :class:`typing.Protocol` always dictate the parameter number " +"and parameter ordering of types. Previous behavior was a bug." +msgstr "" + +#: ../NEWS:6485 +msgid "" +":gh:`137282`: Fix tab completion and :func:`dir` on :mod:`concurrent." +"futures`." +msgstr "" + +#: ../NEWS:6488 +msgid "" +":gh:`137257`: Bump the version of pip bundled in ensurepip to version 25.2" +msgstr "" + +#: ../NEWS:6490 +msgid "" +":gh:`137239`: :mod:`heapq`: Update :data:`!heapq.__all__` with ``*_max`` " +"functions." +msgstr "" + +#: ../NEWS:6493 +msgid "" +":gh:`124503`: :func:`ast.literal_eval` is 10-20% faster for small inputs." +msgstr "" + +#: ../NEWS:6495 +msgid "" +":gh:`137226`: Fix behavior of :meth:`annotationlib.ForwardRef.evaluate` when " +"the *type_params* parameter is passed and the name of a type param is also " +"present in an enclosing scope." +msgstr "" + +#: ../NEWS:6499 +msgid "" +":gh:`137197`: :class:`~ssl.SSLContext` objects can now set TLS 1.3 cipher " +"suites via :meth:`~ssl.SSLContext.set_ciphersuites`." +msgstr "" + +#: ../NEWS:6502 +msgid "" +":gh:`81325`: :class:`tarfile.TarFile` now accepts a :term:`path-like ` when working on a tar archive. (Contributed by Alexander " +"Enrique Urieles Nieto in :gh:`81325`.)" +msgstr "" + +#: ../NEWS:6506 +msgid "" +":gh:`137185`: Fix a potential async-signal-safety issue in :mod:" +"`faulthandler` when printing C stack traces." +msgstr "" + +#: ../NEWS:6509 +msgid "" +":gh:`133951`: Remove lib64-lib symlink creation when creating new virtual " +"environments in :mod:`venv` module" +msgstr "" + +#: ../NEWS:6512 +msgid "" +":gh:`130522`: Fix unraisable :exc:`TypeError` raised during :term:" +"`interpreter shutdown` in the :mod:`threading` module." +msgstr "" + +#: ../NEWS:6515 +msgid "" +":gh:`137059`: Fix handling of file URLs with a Windows drive letter in the " +"URL authority by :func:`urllib.request.url2pathname`. This fixes a " +"regression in earlier pre-releases of Python 3.14." +msgstr "" + +#: ../NEWS:6519 +msgid "" +":gh:`136980`: Remove unused C tracing code in bdb for event type ``c_call``, " +"``c_return`` and ``c_exception``" +msgstr "" + +#: ../NEWS:6522 +msgid "" +":gh:`130577`: :mod:`tarfile` now validates archives to ensure member offsets " +"are non-negative. (Contributed by Alexander Enrique Urieles Nieto in :gh:" +"`130577`.)" +msgstr "" + +#: ../NEWS:6526 +msgid "" +":gh:`136170`: Removed the unreleased ``zipfile.ZipFile.data_offset`` " +"property added in 3.14.0a7 as it wasn't fully clear which behavior it should " +"have in some situations so the result was not always what a user might " +"expect." +msgstr "" + +#: ../NEWS:6530 +msgid "" +":gh:`121237`: Support ``%:z`` directive for :meth:`datetime.datetime." +"strptime`, :meth:`datetime.time.strptime` and :func:`time.strptime`. Patch " +"by Lucas Esposito and Semyon Moroz." +msgstr "" + +#: ../NEWS:6534 +msgid "" +":gh:`136929`: Ensure that hash functions guaranteed to be always *available* " +"exist as attributes of :mod:`hashlib` even if they will not work at runtime " +"due to missing backend implementations. For instance, ``hashlib.md5`` will " +"no longer raise :exc:`AttributeError` if OpenSSL is not available and Python " +"has been built without MD5 support. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6541 +msgid ":gh:`124621`: pyrepl now works in Emscripten." +msgstr "" + +#: ../NEWS:6543 +msgid "" +":gh:`136914`: Fix retrieval of :attr:`doctest.DocTest.lineno` for objects " +"decorated with :func:`functools.cache` or :class:`functools.cached_property`." +msgstr "" + +#: ../NEWS:6547 +msgid "" +":gh:`136912`: :func:`hmac.digest` now properly handles large keys and " +"messages by falling back to the pure Python implementation when necessary. " +"Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6551 +msgid "" +":gh:`83424`: Allows creating a :class:`ctypes.CDLL` without name when " +"passing a handle as an argument." +msgstr "" + +#: ../NEWS:6554 +msgid "" +":gh:`135228`: When :mod:`dataclasses` replaces a class with a slotted " +"dataclass, the original class can now be garbage collected again. Earlier " +"changes in Python 3.14 caused this class to always remain in existence " +"together with the replacement class synthesized by :mod:`dataclasses`." +msgstr "" + +#: ../NEWS:6559 +msgid "" +":gh:`136874`: Discard URL query and fragment in :func:`urllib.request." +"url2pathname`." +msgstr "" + +#: ../NEWS:6562 +msgid "" +":gh:`136787`: :mod:`hashlib`: improve exception messages when a hash " +"algorithm is not recognized, blocked by the current security policy or " +"incompatible with the desired operation (for instance, using HMAC with " +"SHAKE). Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6567 +msgid ":gh:`130645`: Enable color help by default in :mod:`argparse`." +msgstr "" + +#: ../NEWS:6569 +msgid "" +":gh:`131724`: In :mod:`http.client`, a new *max_response_headers* keyword-" +"only parameter has been added to :class:`~http.client.HTTPConnection` and :" +"class:`~http.client.HTTPSConnection` constructors. This parameter sets the " +"maximum number of allowed response headers, helping to prevent denial-of-" +"service attacks." +msgstr "" + +#: ../NEWS:6576 +msgid "" +":gh:`135427`: With :option:`-Werror <-W>`, the DeprecationWarning emitted " +"by :py:func:`os.fork` and :py:func:`os.forkpty` in mutli-threaded processes " +"is now raised as an exception. Previously it was silently ignored. Patch by " +"Rani Pinchuk." +msgstr "" + +#: ../NEWS:6581 +msgid "" +":gh:`136234`: Fix :meth:`asyncio.WriteTransport.writelines` to be robust to " +"connection failure, by using the same behavior as :meth:`~asyncio." +"WriteTransport.write`." +msgstr "" + +#: ../NEWS:6585 +msgid ":gh:`53144`: :mod:`!encodings.aliases`: Add ``latin_N`` aliases" +msgstr "" + +#: ../NEWS:6587 +msgid "" +":gh:`136669`: :mod:`!_asyncio` is now statically linked for improved " +"performance." +msgstr "" + +#: ../NEWS:6590 +msgid "" +":gh:`136134`: :meth:`!SMTP.auth_cram_md5` now raises an :exc:`~smtplib." +"SMTPException` instead of a :exc:`ValueError` if Python has been built " +"without MD5 support. In particular, :class:`~smtplib.SMTP` clients will not " +"attempt to use this method even if the remote server is assumed to support " +"it. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6596 +msgid "" +":gh:`136134`: :meth:`IMAP4.login_cram_md5 ` " +"now raises an :exc:`IMAP4.error ` if CRAM-MD5 " +"authentication is not supported. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6600 +msgid "" +":gh:`136591`: :mod:`!_hashlib`: avoid using deprecated functions :manpage:" +"`ERR_func_error_string` and :manpage:`EVP_MD_CTX_md` when using OpenSSL 3.0 " +"and later. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6604 +msgid "" +":gh:`136571`: :meth:`datetime.date.fromisocalendar` can now raise " +"OverflowError for out of range arguments." +msgstr "" + +#: ../NEWS:6607 +msgid ":gh:`136549`: Fix signature of :func:`threading.excepthook`." +msgstr "" + +#: ../NEWS:6609 +msgid "" +":gh:`136492`: Expose :pep:`667`'s :data:`~types.FrameLocalsProxyType` in " +"the :mod:`types` module." +msgstr "" + +#: ../NEWS:6612 +msgid ":gh:`83336`: ``utf8_sig`` is now aliased to :mod:`encodings.utf_8_sig`" +msgstr "" + +#: ../NEWS:6614 +msgid "" +":gh:`136523`: Fix :class:`wave.Wave_write` emitting an unraisable when open " +"raises." +msgstr "" + +#: ../NEWS:6617 +msgid ":gh:`136507`: Fix mimetypes CLI to handle multiple file parameters." +msgstr "" + +#: ../NEWS:6619 +msgid "" +":gh:`52876`: Add missing ``keepends`` (default ``True``) parameter to :meth:" +"`!codecs.StreamReaderWriter.readline` and :meth:`!codecs.StreamReaderWriter." +"readlines`." +msgstr "" + +#: ../NEWS:6623 +msgid "" +":gh:`136470`: Correct :class:`concurrent.futures.InterpreterPoolExecutor`'s " +"default thread name." +msgstr "" + +#: ../NEWS:6626 +msgid "" +":gh:`136476`: Fix a bug that was causing the ``get_async_stack_trace`` " +"function to miss some frames in the stack trace." +msgstr "" + +#: ../NEWS:6629 +msgid "" +":gh:`136434`: Fix docs generation of ``UnboundItem`` in :mod:`concurrent." +"interpreters` when running with :option:`-OO`." +msgstr "" + +#: ../NEWS:6632 +msgid "" +":gh:`136380`: Raises :exc:`AttributeError` when accessing :class:`concurrent." +"futures.InterpreterPoolExecutor` and subinterpreters are not available." +msgstr "" + +#: ../NEWS:6636 +msgid "" +":gh:`72327`: Suggest using the system command prompt when ``pip install`` is " +"typed into the REPL. Patch by Tom Viner, Richard Si, and Brian Schubert." +msgstr "" + +#: ../NEWS:6639 +msgid "" +":gh:`135953`: Implement a new high-frequency runtime profiler that leverages " +"the existing remote debugging functionality to collect detailed execution " +"statistics from running Python processes. This tool is exposed in the " +"``profile.sample`` module and enables non-intrusive observation of " +"production applications by attaching to already-running processes without " +"requiring any code modifications, restarts, or special startup flags. The " +"observer can perform extremely high-frequency sampling of stack traces and " +"interpreter state, providing detailed runtime execution analysis of live " +"applications." +msgstr "" + +#: ../NEWS:6649 +msgid "" +":gh:`136021`: Make ``type_params`` parameter required in :func:`!typing." +"_eval_type` after a deprecation period for not providing this parameter. " +"Also remove the :exc:`DeprecationWarning` for the old behavior." +msgstr "" + +#: ../NEWS:6654 +msgid "" +":gh:`136286`: Fix pickling failures for protocols 0 and 1 for many objects " +"related to subinterpreters." +msgstr "" + +#: ../NEWS:6657 +msgid "" +":gh:`136047`: Fix issues with :mod:`typing` when the C implementation of :" +"mod:`abc` is not available." +msgstr "" + +#: ../NEWS:6660 +msgid "" +":gh:`136316`: Improve support for evaluating nested forward references in :" +"func:`typing.evaluate_forward_ref`." +msgstr "" + +#: ../NEWS:6663 +msgid "" +":gh:`136306`: :mod:`ssl` can now get and set groups used for key agreement." +msgstr "" + +#: ../NEWS:6665 +msgid "" +":gh:`136156`: :func:`tempfile.TemporaryFile` no longer uses :data:`os." +"O_EXCL` with :data:`os.O_TMPFILE`, so it's possible to use ``linkat()`` on " +"the file descriptor. Patch by Victor Stinner." +msgstr "" + +#: ../NEWS:6669 +msgid "" +":gh:`133982`: Update Python implementation of :class:`io.BytesIO` to be " +"thread safe." +msgstr "" + +#: ../NEWS:6672 +msgid "" +":gh:`136193`: Improve :exc:`TypeError` error message, when richcomparing " +"two :class:`types.SimpleNamespace` objects." +msgstr "" + +#: ../NEWS:6675 +msgid "" +":gh:`136097`: Fix potential infinite recursion and KeyError in ``sysconfig --" +"generate-posix-vars``." +msgstr "" + +#: ../NEWS:6678 +msgid "" +":gh:`85702`: If ``zoneinfo._common.load_tzdata`` is given a package without " +"a resource a :exc:`zoneinfo.ZoneInfoNotFoundError` is raised rather than a :" +"exc:`PermissionError`. Patch by Victor Stinner." +msgstr "" + +#: ../NEWS:6682 +msgid "" +":gh:`90733`: Improve error messages when reporting invalid parameters in :" +"func:`hashlib.scrypt`. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6685 +msgid "" +":gh:`134759`: Fix :exc:`UnboundLocalError` in :func:`email.message.Message." +"get_payload` when the payload to decode is a :class:`bytes` object. Patch by " +"Kliment Lamonov." +msgstr "" + +#: ../NEWS:6689 +msgid "" +":gh:`136028`: Fix parsing month names containing \"İ\" (U+0130, LATIN " +"CAPITAL LETTER I WITH DOT ABOVE) in :func:`time.strptime`. This affects " +"locales az_AZ, ber_DZ, ber_MA and crh_UA." +msgstr "" + +#: ../NEWS:6693 +msgid "" +":gh:`87135`: Acquiring a :class:`threading.Lock` or :class:`threading.RLock` " +"at interpreter shutdown will raise :exc:`PythonFinalizationError` if Python " +"can determine that it would otherwise deadlock." +msgstr "" + +#: ../NEWS:6697 +msgid "" +":gh:`135995`: In the palmos encoding, make byte ``0x9b`` decode to ``›`` " +"(U+203A - SINGLE RIGHT-POINTING ANGLE QUOTATION MARK)." +msgstr "" + +#: ../NEWS:6700 +msgid "" +":gh:`105456`: Removed :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!" +"sre_parse` modules." +msgstr "" + +#: ../NEWS:6703 +msgid "" +":gh:`53203`: Fix :func:`time.strptime` for ``%c`` and ``%x`` formats on " +"locales byn_ER, wal_ET and lzh_TW, and for ``%X`` format on locales ar_SA, " +"bg_BG and lzh_TW." +msgstr "" + +#: ../NEWS:6707 +msgid "" +":gh:`135878`: Fixes a crash of :class:`types.SimpleNamespace` on :term:`free " +"threading` builds, when several threads were calling its :meth:`~object." +"__repr__` method at the same time." +msgstr "" + +#: ../NEWS:6711 +msgid "" +":gh:`135853`: Add :func:`math.fmax` and :func:`math.fmin` to get the larger " +"and smaller of two floating-point values. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6714 +msgid "" +":gh:`135836`: Fix :exc:`IndexError` in :meth:`asyncio.loop." +"create_connection` that could occur when non-\\ :exc:`OSError` exception is " +"raised during connection and socket's ``close()`` raises :exc:`!OSError`." +msgstr "" + +#: ../NEWS:6718 +msgid "" +":gh:`135853`: :mod:`math`: expose C99 :func:`~math.signbit` function to " +"determine whether the sign bit of a floating-point value is set. Patch by " +"Bénédikt Tran." +msgstr "" + +#: ../NEWS:6722 +msgid "" +":gh:`134531`: :mod:`hmac`: use the :manpage:`EVP_MAC(3ssl)` interface for " +"HMAC when Python is built with OpenSSL 3.0 and later instead of the " +"deprecated :manpage:`HMAC_CTX(3ssl) ` interface. Patch by Bénédikt " +"Tran." +msgstr "" + +#: ../NEWS:6727 +msgid "" +":gh:`135836`: Fix :exc:`IndexError` in :meth:`asyncio.loop." +"create_connection` that could occur when the Happy Eyeballs algorithm " +"resulted in an empty exceptions list during connection attempts." +msgstr "" + +#: ../NEWS:6731 +msgid "" +":gh:`135855`: Raise :exc:`TypeError` instead of :exc:`SystemError` when :" +"func:`!_interpreters.set___main___attrs` is passed a non-dict object. Patch " +"by Brian Schubert." +msgstr "" + +#: ../NEWS:6735 +msgid "" +":gh:`135823`: :mod:`netrc`: improve the error message when the security " +"check for the ownership of the default configuration file ``~/.netrc`` " +"fails. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6739 +msgid "" +":gh:`135815`: :mod:`netrc`: skip security checks if :func:`os.getuid` is " +"missing. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6742 +msgid "" +":gh:`135640`: Address bug where it was possible to call :func:`xml.etree." +"ElementTree.ElementTree.write` on an ElementTree object with an invalid root " +"element. This behavior blanked the file passed to ``write`` if it already " +"existed." +msgstr "" + +#: ../NEWS:6747 +msgid "" +":gh:`90117`: Speed up :mod:`pprint` for :class:`list` and :class:`tuple`." +msgstr "" + +#: ../NEWS:6749 +msgid "" +":gh:`135759`: :mod:`hashlib`: reject negative digest lengths in OpenSSL-" +"based SHAKE objects by raising a :exc:`ValueError`. Previously, negative " +"lengths were implicitly rejected by raising a :exc:`MemoryError` or a :exc:" +"`SystemError`. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6754 +msgid "" +":gh:`123471`: Make concurrent iterations over :class:`itertools.chain` safe " +"under :term:`free threading`." +msgstr "" + +#: ../NEWS:6757 +msgid "" +":gh:`135645`: Added ``supports_isolated_interpreters`` field to :data:`sys." +"implementation`." +msgstr "" + +#: ../NEWS:6760 +msgid "" +":gh:`135646`: Raise consistent :exc:`NameError` exceptions in :func:" +"`annotationlib.ForwardRef.evaluate`" +msgstr "" + +#: ../NEWS:6763 +msgid "" +":gh:`135557`: Fix races on :mod:`heapq` updates and :class:`list` reads on " +"the :term:`free threaded ` build." +msgstr "" + +#: ../NEWS:6766 +msgid "" +":gh:`119180`: Only fetch globals and locals if necessary in :func:" +"`annotationlib.get_annotations`" +msgstr "" + +#: ../NEWS:6769 +msgid "" +":gh:`135561`: Fix a crash on DEBUG builds when an HACL* HMAC routine fails. " +"Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6772 +msgid "" +":gh:`135386`: Fix opening a :mod:`dbm.sqlite3` database for reading from " +"read-only file or directory." +msgstr "" + +#: ../NEWS:6775 +msgid "" +":gh:`135444`: Fix :meth:`asyncio.DatagramTransport.sendto` to account for " +"datagram header size when data cannot be sent." +msgstr "" + +#: ../NEWS:6778 +msgid "" +":gh:`65697`: :class:`configparser`'s error message when attempting to write " +"an invalid key is now more helpful." +msgstr "" + +#: ../NEWS:6781 +msgid "" +":gh:`135497`: Fix :func:`os.getlogin` failing for longer usernames on BSD-" +"based platforms." +msgstr "" + +#: ../NEWS:6784 +msgid "" +":gh:`135487`: Fix :meth:`!reprlib.Repr.repr_int` when given integers with " +"more than :func:`sys.get_int_max_str_digits` digits. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6788 +msgid "" +":gh:`135429`: Fix the argument mismatch in ``_lsprof`` for ``PY_THROW`` " +"event." +msgstr "" + +#: ../NEWS:6791 +msgid "" +":gh:`135368`: Fix :class:`unittest.mock.Mock` generation on :func:" +"`dataclasses.dataclass` objects. Now all special attributes are set as it " +"was before :gh:`124429`." +msgstr "" + +#: ../NEWS:6795 +msgid "" +":gh:`135336`: :mod:`json` now encodes strings up to 2.2x faster if they " +"consist solely of characters that don’t require escaping." +msgstr "" + +#: ../NEWS:6798 +msgid "" +":gh:`135335`: :mod:`multiprocessing`: Flush ``stdout`` and ``stderr`` after " +"preloading modules in the ``forkserver``." +msgstr "" + +#: ../NEWS:6801 +msgid "" +":gh:`126631`: Fix :mod:`multiprocessing` ``forkserver`` bug which prevented " +"``__main__`` from being preloaded." +msgstr "" + +#: ../NEWS:6804 +msgid "" +":gh:`133967`: Do not normalize :mod:`locale` name 'C.UTF-8' to 'en_US.UTF-8'." +msgstr "" + +#: ../NEWS:6806 +msgid "" +":gh:`130870`: Preserve :class:`types.GenericAlias` subclasses in :func:" +"`typing.get_type_hints`" +msgstr "" + +#: ../NEWS:6809 +msgid "" +":gh:`135321`: Raise a correct exception for values greater than 0x7fffffff " +"for the ``BINSTRING`` opcode in the C implementation of :mod:`pickle`." +msgstr "" + +#: ../NEWS:6812 +msgid "" +":gh:`121914`: Changed the names of the symbol tables for lambda expressions " +"and generator expressions to \"\" and \"\" respectively to " +"avoid conflicts with user-defined names." +msgstr "" + +#: ../NEWS:6816 +msgid "" +":gh:`135276`: Synchronized zipfile.Path with zipp 3.23, including improved " +"performance of :meth:`zipfile.Path.open` for non-reading modes, rely on :" +"func:`functools.cached_property` to cache values on the instance. Rely on " +"``save_method_args`` to save the initialization method arguments. Fixed ``." +"name``, ``.stem`` and other basename-based properties on Windows when " +"working with a zipfile on disk." +msgstr "" + +#: ../NEWS:6823 +msgid "" +":gh:`135234`: :mod:`hashlib`: improve exception messages when an OpenSSL " +"function failed. When memory allocation fails on OpenSSL's side, a :exc:" +"`MemoryError` is raised instead of a :exc:`ValueError`. Patch by Bénédikt " +"Tran." +msgstr "" + +#: ../NEWS:6828 +msgid "" +":gh:`135244`: :mod:`uuid`: when the MAC address cannot be determined, the 48-" +"bit node ID is now generated with a cryptographically-secure pseudo-random " +"number generator (CSPRNG) as per :rfc:`RFC 9562, §6.10.3 " +"<9562#section-6.10-3>`. This affects :func:`~uuid.uuid1` and :func:`~uuid." +"uuid6`." +msgstr "" + +#: ../NEWS:6834 +msgid "" +":gh:`135241`: The :code:`INT` opcode of the C accelerator :mod:`!_pickle` " +"module was updated to look only for \"00\" and \"01\" to push booleans onto " +"the stack, aligning with the Python :mod:`pickle` module." +msgstr "" + +#: ../NEWS:6838 +msgid ":gh:`133934`: Improve :mod:`sqlite3` CLI's ``.help`` message." +msgstr "" + +#: ../NEWS:6840 +msgid "" +":gh:`135069`: Fix the \"Invalid error handling\" exception in :class:`!" +"encodings.idna.IncrementalDecoder` to correctly replace the 'errors' " +"parameter." +msgstr "" + +#: ../NEWS:6844 +msgid "" +":gh:`130662`: +Accept leading zeros in precision and width fields for +:" +"class:`~decimal.Decimal` formatting, for example ``format(Decimal(1.25), " +"'.016f')``." +msgstr "" + +#: ../NEWS:6848 +msgid "" +":gh:`130662`: Accept leading zeros in precision and width fields for :class:" +"`~fractions.Fraction` formatting, for example ``format(Fraction(1, 3), " +"'.016f')``." +msgstr "" + +#: ../NEWS:6852 +msgid "" +":gh:`135004`: Rewrite and cleanup the internal :mod:`!_blake2` module. Some " +"exception messages were changed but their types were left untouched. Patch " +"by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6856 +msgid "" +":gh:`134953`: Expand ``_colorize`` theme with ``keyword_constant`` and " +"implement in :term:`repl`." +msgstr "" + +#: ../NEWS:6859 +msgid "" +":gh:`134978`: :mod:`hashlib`: Supporting the ``string`` keyword parameter in " +"hash function constructors such as :func:`~hashlib.new` or the direct hash-" +"named constructors such as :func:`~hashlib.md5` and :func:`~hashlib.sha256` " +"is now deprecated and slated for removal in Python 3.19. Prefer passing the " +"initial data as a positional argument for maximum backwards compatibility. " +"Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6866 +msgid "" +":gh:`134970`: Fix the \"unknown action\" exception in :meth:`argparse." +"ArgumentParser.add_argument_group` to correctly replace the action class." +msgstr "" + +#: ../NEWS:6870 +msgid "" +":gh:`134718`: By default, omit optional ``Load()`` values in :func:`ast." +"dump`." +msgstr "" + +#: ../NEWS:6873 +msgid "" +":gh:`134718`: :func:`ast.dump` now only omits ``None`` and ``[]`` values if " +"they are default values." +msgstr "" + +#: ../NEWS:6876 +msgid "" +":gh:`134939`: Add the :mod:`concurrent.interpreters` module. See :pep:`734`." +msgstr "" + +#: ../NEWS:6878 +msgid "" +":gh:`108885`: Run each example as a subtest in unit tests synthesized by :" +"func:`doctest.DocFileSuite` and :func:`doctest.DocTestSuite`. Add the :meth:" +"`doctest.DocTestRunner.report_skip` method." +msgstr "" + +#: ../NEWS:6882 +msgid "" +":gh:`134885`: Fix possible crash in the :mod:`compression.zstd` module " +"related to setting parameter types. Patch by Jelle Zijlstra." +msgstr "" + +#: ../NEWS:6885 +msgid "" +":gh:`134857`: Improve error report for :mod:`doctest`\\ s run with :mod:" +"`unittest`. Remove :mod:`!doctest` module frames from tracebacks and " +"redundant newline character from a failure message." +msgstr "" + +#: ../NEWS:6889 +msgid "" +":gh:`128840`: Fix parsing long IPv6 addresses with embedded IPv4 address." +msgstr "" + +#: ../NEWS:6891 +msgid "" +":gh:`133579`: :mod:`curses`: Consistently report failures of curses C API " +"calls in module-level methods by raising a :exc:`curses.error`. This " +"affects :func:`~curses.assume_default_colors`, :func:`~curses.baudrate`, :" +"func:`~curses.cbreak`, :func:`~curses.echo`, :func:`~curses.longname`, :func:" +"`~curses.initscr`, :func:`~curses.nl`, :func:`~curses.raw`, :func:`~curses." +"termattrs`, :func:`~curses.termname` and :func:`~curses.unctrl`. Patch by " +"Bénédikt Tran." +msgstr "" + +#: ../NEWS:6899 +msgid "" +":gh:`133579`: :meth:`curses.window.refresh` and :meth:`curses.window." +"noutrefresh` now raise a :exc:`TypeError` instead of :exc:`curses.error` " +"when called with an incorrect number of arguments for :ref:`pads `. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6904 +msgid "" +":gh:`133579`: :ref:`curses.window `: Consistently " +"report failures of curses C API calls in Window methods by raising a :exc:" +"`curses.error`. This affects :meth:`~curses.window.addch`, :meth:`~curses." +"window.addnstr`, :meth:`~curses.window.addstr`, :meth:`~curses.window." +"border`, :meth:`~curses.window.box`, :meth:`~curses.window.chgat`, :meth:" +"`~curses.window.getbkgd`, :meth:`~curses.window.inch`, :meth:`~curses.window." +"insstr` and :meth:`~curses.window.insnstr`. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6913 +msgid "" +":gh:`134771`: The ``time_clockid_converter()`` function now selects correct " +"type for ``clockid_t`` on Cygwin which fixes a build error." +msgstr "" + +#: ../NEWS:6916 +msgid "" +":gh:`134637`: Fix performance regression in calling a :mod:`ctypes` function " +"pointer in :term:`free threading`." +msgstr "" + +#: ../NEWS:6919 +msgid "" +":gh:`134696`: Built-in HACL* and OpenSSL implementations of hash function " +"constructors now correctly accept the same *documented* named arguments. For " +"instance, :func:`~hashlib.md5` could be previously invoked as " +"``md5(data=data)`` or ``md5(string=string)`` depending on the underlying " +"implementation but these calls were not compatible. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6926 +msgid "" +":gh:`132710`: If possible, ensure that :func:`uuid.getnode` returns the same " +"result even across different processes. Previously, the result was constant " +"only within the same process. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6930 +msgid "" +":gh:`134531`: :mod:`!_hashlib`: Rename internal C functions for :class:`!" +"_hashlib.HASH` and :class:`!_hashlib.HASHXOF` objects. Patch by Bénédikt " +"Tran." +msgstr "" + +#: ../NEWS:6934 +msgid "" +":gh:`134698`: Fix a crash when calling methods of :class:`ssl.SSLContext` " +"or :class:`ssl.SSLSocket` across multiple threads." +msgstr "" + +#: ../NEWS:6937 +msgid "" +":gh:`134151`: :mod:`email`: Fix :exc:`TypeError` in :func:`email.utils." +"decode_params` when sorting :rfc:`2231` continuations that contain an " +"unnumbered section." +msgstr "" + +#: ../NEWS:6941 +msgid "" +":gh:`134635`: :mod:`zlib`: Allow to combine Adler-32 and CRC-32 checksums " +"via :func:`~zlib.adler32_combine` and :func:`~zlib.crc32_combine`. Patch by " +"Callum Attryde and Bénédikt Tran." +msgstr "" + +#: ../NEWS:6945 +msgid "" +":gh:`134657`: :mod:`asyncio`: Remove some private names from ``asyncio." +"__all__``." +msgstr "" + +#: ../NEWS:6948 +msgid "" +":gh:`134210`: :func:`curses.window.getch` now correctly handles signals. " +"Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:6951 +msgid "" +":gh:`80334`: :func:`multiprocessing.freeze_support` now checks for work on " +"any \"spawn\" start method platform rather than only on Windows." +msgstr "" + +#: ../NEWS:6954 +msgid "" +":gh:`134582`: Fix tokenize.untokenize() round-trip errors related to t-" +"strings braces escaping" +msgstr "" + +#: ../NEWS:6957 +msgid "" +":gh:`134580`: Improved the styling of HTML diff pages generated by the :" +"class:`difflib.HtmlDiff` class, and migrated the output to the HTML5 " +"standard." +msgstr "" + +#: ../NEWS:6961 +msgid "" +":gh:`134565`: :func:`unittest.doModuleCleanups` no longer swallows all but " +"first exception raised in the cleanup code, but raises a :exc:" +"`ExceptionGroup` if multiple errors occurred." +msgstr "" + +#: ../NEWS:6965 +msgid "" +":gh:`134546`: Ensure :mod:`pdb` remote debugging script is readable by " +"remote Python process." +msgstr "" + +#: ../NEWS:6968 +msgid "" +":gh:`134451`: Converted ``asyncio.tools.CycleFoundException`` from dataclass " +"to a regular exception type." +msgstr "" + +#: ../NEWS:6971 +msgid "" +":gh:`114177`: Fix :mod:`asyncio` to not close subprocess pipes which would " +"otherwise error out when the event loop is already closed." +msgstr "" + +#: ../NEWS:6974 +msgid "" +":gh:`90871`: Fixed an off by one error concerning the backlog parameter in :" +"meth:`~asyncio.loop.create_unix_server`. Contributed by Christian Harries." +msgstr "" + +#: ../NEWS:6978 +msgid ":gh:`134323`: Fix the :meth:`threading.RLock.locked` method." +msgstr "" + +#: ../NEWS:6980 +msgid "" +":gh:`86802`: Fixed asyncio memory leak in cancelled shield tasks. For " +"shielded tasks where the shield was cancelled, log potential exceptions " +"through the exception handler. Contributed by Christian Harries." +msgstr "" + +#: ../NEWS:6984 +msgid "" +":gh:`71189`: Add support of the all-but-last mode in :func:`os.path." +"realpath`." +msgstr "" + +#: ../NEWS:6987 +msgid "" +":gh:`72902`: Improve speed (x1.1-1.8) of the :class:`~fractions.Fraction` " +"constructor for typical inputs (:class:`float`'s, :class:`~decimal." +"Decimal`'s or strings)." +msgstr "" + +#: ../NEWS:6991 +msgid "" +":gh:`134209`: :mod:`curses`: The :meth:`curses.window.instr` and :meth:" +"`curses.window.getstr` methods now allocate their internal buffer on the " +"heap instead of the stack; in addition, the max buffer size is increased " +"from 1023 to 2047." +msgstr "" + +#: ../NEWS:6996 +msgid "" +":gh:`88994`: Change :func:`datetime.datetime.now` to half-even rounding for " +"consistency with :func:`datetime.datetime.fromtimestamp`. Patch by John " +"Keith Hohm." +msgstr "" + +#: ../NEWS:7000 +msgid "" +":gh:`80184`: The default queue size is now ``socket.SOMAXCONN`` for :class:" +"`socketserver.TCPServer`." +msgstr "" + +#: ../NEWS:7003 +msgid "" +":gh:`132983`: Add :mod:`!compression.zstd` version information to ``test." +"pythoninfo``." +msgstr "" + +#: ../NEWS:7006 +msgid "" +":gh:`134235`: Updated tab completion on REPL to include builtin modules. " +"Contributed by Tom Wang, Hunter Young" +msgstr "" + +#: ../NEWS:7009 +msgid "" +":gh:`134152`: Fixed :exc:`UnboundLocalError` that could occur during :mod:" +"`email` header parsing if an expected trailing delimiter is missing in some " +"contexts." +msgstr "" + +#: ../NEWS:7013 +msgid "" +":gh:`134152`: :mod:`email`: Fix parsing of email message ID with invalid " +"domain." +msgstr "" + +#: ../NEWS:7016 +msgid "" +":gh:`134168`: :mod:`http.server`: Fix IPv6 address binding and :option:`--" +"directory ` handling when using HTTPS." +msgstr "" + +#: ../NEWS:7019 +msgid "" +":gh:`62184`: Remove import of C implementation of :class:`io.FileIO` from " +"Python implementation which has its own implementation" +msgstr "" + +#: ../NEWS:7022 +msgid "" +":gh:`134087`: Remove support for arbitrary positional or keyword arguments " +"in the C implementation of :class:`threading.RLock` objects. This was " +"deprecated since Python 3.14. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:7026 +msgid "" +":gh:`134173`: Speed up :mod:`asyncio` performance of transferring state from " +"thread pool :class:`concurrent.futures.Future` by up to 4.4x. Patch by J. " +"Nick Koston." +msgstr "" + +#: ../NEWS:7030 +msgid "" +":gh:`133982`: Emit :exc:`RuntimeWarning` in the Python implementation of :" +"mod:`io` when the :term:`file-like object ` is not closed " +"explicitly in the presence of multiple I/O layers." +msgstr "" + +#: ../NEWS:7034 +msgid "" +":gh:`133890`: The :mod:`tarfile` module now handles :exc:" +"`UnicodeEncodeError` in the same way as :exc:`OSError` when cannot extract a " +"member." +msgstr "" + +#: ../NEWS:7037 +msgid "" +":gh:`134097`: Fix interaction of the new :term:`REPL` and :option:`-X " +"showrefcount <-X>` command line option." +msgstr "" + +#: ../NEWS:7040 +msgid "" +":gh:`133889`: The generated directory listing page in :class:`http.server." +"SimpleHTTPRequestHandler` now only shows the decoded path component of the " +"requested URL, and not the query and fragment." +msgstr "" + +#: ../NEWS:7044 +msgid "" +":gh:`134098`: Fix handling paths that end with a percent-encoded slash " +"(``%2f`` or ``%2F``) in :class:`http.server.SimpleHTTPRequestHandler`." +msgstr "" + +#: ../NEWS:7047 +msgid "" +":gh:`132124`: On POSIX-compliant systems, :func:`!multiprocessing.util." +"get_temp_dir` now ignores :envvar:`TMPDIR` (and similar environment " +"variables) if the path length of ``AF_UNIX`` socket files exceeds the " +"platform-specific maximum length when using the :ref:`forkserver " +"` start method. Patch by Bénédikt " +"Tran." +msgstr "" + +#: ../NEWS:7054 +msgid "" +":gh:`134062`: :mod:`ipaddress`: fix collisions in :meth:`~object.__hash__` " +"for :class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` " +"objects." +msgstr "" + +#: ../NEWS:7058 +msgid "" +":gh:`134004`: :mod:`shelve` as well as underlying :mod:`!dbm.dumb` and :mod:" +"`!dbm.sqlite` now have :meth:`!reorganize` methods to recover unused free " +"space previously occupied by deleted entries." +msgstr "" + +#: ../NEWS:7062 +msgid "" +":gh:`133970`: Make :class:`!string.templatelib.Template` and :class:`!string." +"templatelib.Interpolation` generic." +msgstr "" + +#: ../NEWS:7065 +msgid "" +":gh:`71253`: Raise :exc:`ValueError` in :func:`open` if *opener* returns a " +"negative file-descriptor in the Python implementation of :mod:`io` to match " +"the C implementation." +msgstr "" + +#: ../NEWS:7069 +msgid "" +":gh:`133960`: Simplify and improve :func:`typing.evaluate_forward_ref`. It " +"now no longer raises errors on certain invalid types. In several situations, " +"it is now able to evaluate forward references that were previously " +"unsupported." +msgstr "" + +#: ../NEWS:7074 +msgid "" +":gh:`133925`: Make the private class ``typing._UnionGenericAlias`` hashable." +msgstr "" + +#: ../NEWS:7076 +msgid "" +":gh:`133604`: Remove :func:`!platform.java_ver` which was deprecated since " +"Python 3.13." +msgstr "" + +#: ../NEWS:7079 +msgid "" +":gh:`133875`: Removed deprecated :meth:`!pathlib.PurePath.is_reserved`. Use :" +"func:`os.path.isreserved` to detect reserved paths on Windows." +msgstr "" + +#: ../NEWS:7082 +msgid "" +":gh:`133873`: Remove the deprecated ``getmark()``, ``setmark()`` and " +"``getmarkers()`` methods of the :class:`~wave.Wave_read` and :class:`~wave." +"Wave_write` classes, which were deprecated since Python 3.13. Patch by " +"Bénédikt Tran." +msgstr "" + +#: ../NEWS:7087 +msgid "" +":gh:`133866`: Remove the undocumented function :func:`!ctypes." +"SetPointerType`, which has been deprecated since Python 3.13. Patch by " +"Bénédikt Tran." +msgstr "" + +#: ../NEWS:7091 +msgid "" +":gh:`133823`: Remove support for ``TD = TypedDict(\"TD\")`` and ``TD = " +"TypedDict(\"TD\", None)`` calls for constructing :class:`typing.TypedDict` " +"objects with zero field. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:7095 +msgid "" +":gh:`125996`: Fix thread safety of :class:`collections.OrderedDict`. Patch " +"by Kumar Aditya." +msgstr "" + +#: ../NEWS:7098 +msgid "" +":gh:`133817`: Remove support for creating :class:`~typing.NamedTuple` " +"classes via the undocumented keyword argument syntax. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:7101 +msgid "" +":gh:`133653`: Fix :class:`argparse.ArgumentParser` with the " +"*formatter_class* argument. Fix TypeError when *formatter_class* is a custom " +"subclass of :class:`!HelpFormatter`. Fix TypeError when *formatter_class* is " +"not a subclass of :class:`!HelpFormatter` and non-standard *prefix_char* is " +"used. Fix support of colorizing when *formatter_class* is not a subclass of :" +"class:`!HelpFormatter`." +msgstr "" + +#: ../NEWS:7108 +msgid "" +":gh:`133810`: Remove :class:`!http.server.CGIHTTPRequestHandler` and ``--" +"cgi`` flag from the :program:`python -m http.server` command-line interface. " +"They were deprecated in Python 3.13. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:7112 +msgid "" +":gh:`132641`: Fixed a race in :func:`functools.lru_cache` under free-" +"threading." +msgstr "" + +#: ../NEWS:7115 +msgid "" +":gh:`133783`: Fix bug with applying :func:`copy.replace` to :mod:`ast` " +"objects. Attributes that default to ``None`` were incorrectly treated as " +"required for manually created AST nodes." +msgstr "" + +#: ../NEWS:7119 +msgid "" +":gh:`133684`: Fix bug where :func:`annotationlib.get_annotations` would " +"return the wrong result for certain classes that are part of a class " +"hierarchy where ``from __future__ import annotations`` is used." +msgstr "" + +#: ../NEWS:7123 +msgid "" +":gh:`77057`: Fix handling of invalid markup declarations in :class:`html." +"parser.HTMLParser`." +msgstr "" + +#: ../NEWS:7126 +msgid "" +":gh:`130328`: Speedup pasting in ``PyREPL`` on Windows in a legacy console. " +"Patch by Chris Eibl." +msgstr "" + +#: ../NEWS:7129 +msgid "" +":gh:`133701`: Fix bug where :class:`typing.TypedDict` classes defined under " +"``from __future__ import annotations`` and inheriting from another " +"``TypedDict`` had an incorrect ``__annotations__`` attribute." +msgstr "" + +#: ../NEWS:7133 +msgid "" +":gh:`133656`: Remove deprecated :meth:`!zipimport.zipimporter.load_module`. " +"Use :meth:`zipimport.zipimporter.exec_module` instead." +msgstr "" + +#: ../NEWS:7136 +msgid "" +":gh:`133722`: Added a *color* option to :func:`difflib.unified_diff` that " +"colors output similar to :program:`git diff`." +msgstr "" + +#: ../NEWS:7139 +msgid "" +":gh:`133489`: :func:`random.getrandbits` can now generate more that 2\\ :sup:" +"`31` bits. :func:`random.randbytes` can now generate more that 256 MiB." +msgstr "" + +#: ../NEWS:7143 +msgid "" +":gh:`133595`: Clean up :class:`sqlite3.Connection` APIs. All parameters of :" +"func:`sqlite3.connect` except *database* are now keyword-only. The first " +"three parameters of methods :meth:`~sqlite3.Connection.create_function` and :" +"meth:`~sqlite3.Connection.create_aggregate` are now positional-only. The " +"first parameter of methods :meth:`~sqlite3.Connection.set_authorizer`, :meth:" +"`~sqlite3.Connection.set_progress_handler` and :meth:`~sqlite3.Connection." +"set_trace_callback` is now positional-only." +msgstr "" + +#: ../NEWS:7151 +msgid "" +":gh:`133581`: Improve unparsing of t-strings in :func:`ast.unparse` and " +"``from __future__ import annotations``. Empty t-strings now round-trip " +"correctly and formatting in interpolations is preserved. Patch by Jelle " +"Zijlstra." +msgstr "" + +#: ../NEWS:7156 +msgid "" +":gh:`133577`: Add parameter ``formatter`` to :func:`logging.basicConfig`." +msgstr "" + +#: ../NEWS:7158 +msgid "" +":gh:`92897`: Removed the ``check_home`` parameter from :func:`sysconfig." +"is_python_build`, deprecated since Python 3.12." +msgstr "" + +#: ../NEWS:7161 +msgid "" +":gh:`133551`: Support t-strings (:pep:`750`) in :mod:`annotationlib`. Patch " +"by Jelle Zijlstra." +msgstr "" + +#: ../NEWS:7164 +msgid "" +":gh:`133517`: Remove :func:`os.listdrives`, :func:`os.listvolumes` and :func:" +"`os.listmounts` in non Windows desktop builds since the underlying " +"functionality is missing." +msgstr "" + +#: ../NEWS:7168 +msgid "" +":gh:`133439`: Fix dot commands with trailing spaces are mistaken for multi-" +"line SQL statements in the sqlite3 command-line interface." +msgstr "" + +#: ../NEWS:7171 +msgid ":gh:`133447`: Add basic color to :mod:`sqlite3` CLI interface." +msgstr "" + +#: ../NEWS:7173 +msgid ":gh:`133253`: Fix thread-safety issues in :mod:`linecache`." +msgstr "" + +#: ../NEWS:7175 +msgid "" +":gh:`133390`: Support keyword completion in the :mod:`sqlite3` command-line " +"interface and add :data:`sqlite3.SQLITE_KEYWORDS` constant." +msgstr "" + +#: ../NEWS:7178 +msgid "" +":gh:`132493`: Avoid accessing ``__annotations__`` unnecessarily in :func:" +"`inspect.signature`." +msgstr "" + +#: ../NEWS:7181 +msgid "" +":gh:`133017`: Improve the error message of :func:`multiprocessing." +"sharedctypes.Array`, :func:`multiprocessing.sharedctypes.RawArray`, :func:" +"`multiprocessing.sharedctypes.Value` and :func:`multiprocessing.sharedctypes." +"RawValue` when an invalid typecode is passed. Patch by Tomas Roun" +msgstr "" + +#: ../NEWS:7188 +msgid "" +":gh:`132813`: Improve error messages for incorrect types and values of :" +"class:`csv.Dialect` attributes." +msgstr "" + +#: ../NEWS:7191 +msgid "" +":gh:`132969`: Prevent the :class:`~concurrent.futures.ProcessPoolExecutor` " +"executor thread, which remains running when :meth:`shutdown(wait=False) " +"`, from attempting to adjust the " +"pool's worker processes after the object state has already been reset during " +"shutdown. A combination of conditions, including a worker process having " +"terminated abormally, resulted in an exception and a potential hang when the " +"still-running executor thread attempted to replace dead workers within the " +"pool." +msgstr "" + +#: ../NEWS:7200 +msgid "" +":gh:`132876`: ``ldexp()`` on Windows doesn't round subnormal results before " +"Windows 11, but should. Python's :func:`math.ldexp` wrapper now does round " +"them, so results may change slightly, in rare cases of very small results, " +"on Windows versions before 11." +msgstr "" + +#: ../NEWS:7205 +msgid "" +":gh:`133009`: :mod:`xml.etree.ElementTree`: Fix a crash in :meth:`Element." +"__deepcopy__ ` when the element is concurrently " +"mutated. Patch by Bénédikt Tran." +msgstr "" + +#: ../NEWS:7209 +msgid "" +":gh:`132908`: Add :func:`math.isnormal` and :func:`math.issubnormal` " +"functions. Patch by Sergey B Kirpichev." +msgstr "" + +#: ../NEWS:7212 +msgid "" +":gh:`95380`: :func:`fcntl.fcntl` and :func:`fcntl.ioctl`: Remove the 1024 " +"bytes limit on the size of not mutated bytes-like argument." +msgstr "" + +#: ../NEWS:7215 +msgid "" +":gh:`122781`: Fix ``%z`` directive in :func:`datetime.datetime.strptime` to " +"allow for no provided offset as was documented." +msgstr "" + +#: ../NEWS:7218 +msgid "" +":gh:`123471`: Make concurrent iterations over :class:`itertools." +"combinations` and :class:`itertools.product` safe under free-threading." +msgstr "" + +#: ../NEWS:7221 +msgid "" +":gh:`127081`: Fix libc thread safety issues with :mod:`dbm` by performing " +"stateful operations in critical sections." +msgstr "" + +#: ../NEWS:7224 +msgid "" +":gh:`127081`: Fix libc thread safety issues with :mod:`os` by replacing " +"``getlogin`` with ``getlogin_r`` re-entrant version." +msgstr "" + +#: ../NEWS:7227 +msgid "" +":gh:`127081`: Fix libc thread safety issues with :mod:`pwd` by locking " +"access to ``getpwall``." +msgstr "" + +#: ../NEWS:7230 +msgid "" +":gh:`132551`: Make :class:`io.BytesIO` safe in :term:`free-threaded ` build." +msgstr "" + +#: ../NEWS:7233 +msgid "" +":gh:`107583`: Fix :class:`!Flag` inversion when flag set has missing values " +"(:class:`!IntFlag` still flips all bits); fix negative assigned values " +"during flag creation (both :class:`!Flag` and :class:`!IntFlag` ignore " +"missing values)." +msgstr "" + +#: ../NEWS:7238 +msgid "" +":gh:`87790`: Support underscore and comma as thousands separators in the " +"fractional part for :class:`~fractions.Fraction`'s formatting. Patch by " +"Sergey B Kirpichev." +msgstr "" + +#: ../NEWS:7242 +msgid "" +":gh:`87790`: Support underscore and comma as thousands separators in the " +"fractional part for :class:`~decimal.Decimal`'s formatting. Patch by Sergey " +"B Kirpichev." +msgstr "" + +#: ../NEWS:7246 +msgid "" +":gh:`131884`: Fix formatting issues in :func:`json.dump` when both *indent* " +"and *skipkeys* are used." +msgstr "" + +#: ../NEWS:7249 +msgid "" +":gh:`131788`: Make ``ResourceTracker.send`` from :mod:`multiprocessing` re-" +"entrant safe" +msgstr "" + +#: ../NEWS:7252 +msgid "" +":gh:`91349`: Adjust default ``compressionlevel=`` to 6 (down from 9) in :mod:" +"`gzip` and :mod:`tarfile`. It is the default level used by most compression " +"tools and a better tradeoff between speed and performance." +msgstr "" + +#: ../NEWS:7256 +msgid "" +":gh:`131146`: Fix :class:`calendar.TextCalendar`, :class:`calendar." +"HTMLCalendar`, and the :mod:`calendar` CLI to display month names in the " +"nominative case by adding :data:`calendar.standalone_month_name` and :data:" +"`calendar.standalone_month_abbr`, which provide month names and " +"abbreviations in the grammatical form used when a month name stands by " +"itself, if the locale supports it." +msgstr "" + +#: ../NEWS:7264 +msgid "" +":gh:`123471`: Make concurrent iterations over :class:`itertools.cycle` safe " +"under free-threading." +msgstr "" + +#: ../NEWS:7267 +msgid "" +":gh:`130664`: Handle corner-case for :class:`~fractions.Fraction`'s " +"formatting: treat zero-padding (preceding the width field by a zero " +"(``'0'``) character) as an equivalent to a fill character of ``'0'`` with an " +"alignment type of ``'='``, just as in case of :class:`float`'s." +msgstr "" + +#: ../NEWS:7272 +msgid "" +":gh:`130999`: Avoid exiting the new REPL and offer suggestions even if there " +"are non-string candidates when errors occur." +msgstr "" + +#: ../NEWS:7275 +msgid "" +":gh:`88473`: Implement a fast path for :class:`datetime.date` objects in :" +"func:`datetime.date.today` which results in a 5x performance gain while " +"proper subclasses retain their previous performance." +msgstr "" + +#: ../NEWS:7279 +msgid "" +":gh:`126883`: Add check that timezone fields are in range for :meth:" +"`datetime.datetime.fromisoformat` and :meth:`datetime.time.fromisoformat`. " +"Patch by Semyon Moroz." +msgstr "" + +#: ../NEWS:7283 +msgid "" +":gh:`125028`: :data:`functools.Placeholder` cannot be passed to :func:" +"`functools.partial` as a keyword argument." +msgstr "" + +#: ../NEWS:7286 +msgid "" +":gh:`125843`: If possible, indicate which :mod:`curses` C function or macro " +"is responsible for raising a :exc:`curses.error` exception. Patch by " +"Bénédikt Tran." +msgstr "" + +#: ../NEWS:7290 +msgid "" +":gh:`119109`: :func:`functools.partial` calls are now faster when keyword " +"arguments are used." +msgstr "" + +#: ../NEWS:7293 +msgid "" +":gh:`124033`: ``SimplePath`` is now presented in ``importlib.metadata." +"__all__``." +msgstr "" + +#: ../NEWS:7296 +msgid "" +":gh:`91216`: ``importlib.metadata`` now raises a ``KeyError`` instead of " +"returning ``None`` when a key is missing from the metadata." +msgstr "" + +#: ../NEWS:7299 +msgid "" +":gh:`120492`: ``importlib.metadata`` now prioritizes valid dists to invalid " +"dists when retrieving by name." +msgstr "" + +#: ../NEWS:7302 +msgid "" +":gh:`99631`: The :mod:`shelve` module now accepts custom serialization and " +"deserialization functions." +msgstr "" + +#: ../NEWS:7305 +msgid "" +":gh:`119186`: Slightly speed up :func:`os.walk` by calling :func:`os.path." +"join` less often." +msgstr "" + +#: ../NEWS:7308 +msgid "" +":gh:`120170`: Fix an issue in the :mod:`!_pickle` extension module in which " +"importing :mod:`multiprocessing` could change how pickle identifies which " +"module an object belongs to, potentially breaking the unpickling of those " +"objects." +msgstr "" + +#: ../NEWS:7313 +msgid "" +":gh:`118981`: Fix potential hang in ``multiprocessing.popen_spawn_posix`` " +"that can happen when the child proc dies early by closing the child fds " +"right away." +msgstr "" + +#: ../NEWS:7317 ../NEWS:19281 +msgid ":gh:`105497`: Fix flag mask inversion when unnamed flags exist." +msgstr "" + +#: ../NEWS:7319 +msgid "" +":gh:`99813`: :mod:`ssl` now uses ``SSL_sendfile`` internally when it is " +"possible (see :data:`~ssl.OP_ENABLE_KTLS`). The function sends a file more " +"efficiently because it performs TLS encryption in the kernel to avoid " +"additional context switches. Patch by Illia Volochii." +msgstr "" + +#: ../NEWS:7324 +msgid "" +":gh:`62824`: Fix aliases for ``iso8859_8`` encoding. Patch by Dave Goncalves." +msgstr "" + +#: ../NEWS:7326 +msgid "" +":gh:`86155`: :meth:`html.parser.HTMLParser.close` no longer loses data when " +"the ``