diff --git a/main/locale/pot/LC_MESSAGES/c-api/arg.pot b/main/locale/pot/LC_MESSAGES/c-api/arg.pot index 3049eac7360..a1eda44cde8 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/arg.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/arg.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-10-27 08:51+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -175,7 +175,7 @@ msgid "" "encoding." msgstr "" -#: ../../../c-api/arg.rst:113 ../../../c-api/arg.rst:621 +#: ../../../c-api/arg.rst:113 ../../../c-api/arg.rst:643 msgid "``z`` (:class:`str` or ``None``) [const char \\*]" msgstr "" @@ -442,7 +442,7 @@ msgid "" "a C :c:expr:`unsigned char`." msgstr "" -#: ../../../c-api/arg.rst:250 ../../../c-api/arg.rst:655 +#: ../../../c-api/arg.rst:250 ../../../c-api/arg.rst:677 msgid "``B`` (:class:`int`) [unsigned char]" msgstr "" @@ -453,7 +453,7 @@ msgid "" "`unsigned char`." msgstr "" -#: ../../../c-api/arg.rst:255 ../../../c-api/arg.rst:649 +#: ../../../c-api/arg.rst:255 ../../../c-api/arg.rst:671 msgid "``h`` (:class:`int`) [short int]" msgstr "" @@ -461,7 +461,7 @@ msgstr "" msgid "Convert a Python integer to a C :c:expr:`short int`." msgstr "" -#: ../../../c-api/arg.rst:258 ../../../c-api/arg.rst:658 +#: ../../../c-api/arg.rst:258 ../../../c-api/arg.rst:680 msgid "``H`` (:class:`int`) [unsigned short int]" msgstr "" @@ -469,7 +469,7 @@ msgstr "" msgid "Convert a Python integer to a C :c:expr:`unsigned short int`." msgstr "" -#: ../../../c-api/arg.rst:261 ../../../c-api/arg.rst:643 +#: ../../../c-api/arg.rst:261 ../../../c-api/arg.rst:665 msgid "``i`` (:class:`int`) [int]" msgstr "" @@ -477,7 +477,7 @@ msgstr "" msgid "Convert a Python integer to a plain C :c:expr:`int`." msgstr "" -#: ../../../c-api/arg.rst:264 ../../../c-api/arg.rst:661 +#: ../../../c-api/arg.rst:264 ../../../c-api/arg.rst:683 msgid "``I`` (:class:`int`) [unsigned int]" msgstr "" @@ -485,7 +485,7 @@ msgstr "" msgid "Convert a Python integer to a C :c:expr:`unsigned int`." msgstr "" -#: ../../../c-api/arg.rst:267 ../../../c-api/arg.rst:652 +#: ../../../c-api/arg.rst:267 ../../../c-api/arg.rst:674 msgid "``l`` (:class:`int`) [long int]" msgstr "" @@ -493,7 +493,7 @@ msgstr "" msgid "Convert a Python integer to a C :c:expr:`long int`." msgstr "" -#: ../../../c-api/arg.rst:270 ../../../c-api/arg.rst:664 +#: ../../../c-api/arg.rst:270 ../../../c-api/arg.rst:686 msgid "``k`` (:class:`int`) [unsigned long]" msgstr "" @@ -505,7 +505,7 @@ msgstr "" msgid "Use :meth:`~object.__index__` if available." msgstr "" -#: ../../../c-api/arg.rst:276 ../../../c-api/arg.rst:667 +#: ../../../c-api/arg.rst:276 ../../../c-api/arg.rst:689 msgid "``L`` (:class:`int`) [long long]" msgstr "" @@ -513,7 +513,7 @@ msgstr "" msgid "Convert a Python integer to a C :c:expr:`long long`." msgstr "" -#: ../../../c-api/arg.rst:279 ../../../c-api/arg.rst:672 +#: ../../../c-api/arg.rst:279 ../../../c-api/arg.rst:694 msgid "``K`` (:class:`int`) [unsigned long long]" msgstr "" @@ -521,7 +521,7 @@ msgstr "" msgid "Convert a Python integer to a C :c:expr:`unsigned long long`." msgstr "" -#: ../../../c-api/arg.rst:285 ../../../c-api/arg.rst:675 +#: ../../../c-api/arg.rst:285 ../../../c-api/arg.rst:697 msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" msgstr "" @@ -543,7 +543,7 @@ msgstr "" msgid "Allow :class:`bytearray` objects." msgstr "" -#: ../../../c-api/arg.rst:295 ../../../c-api/arg.rst:693 +#: ../../../c-api/arg.rst:295 ../../../c-api/arg.rst:715 msgid "``C`` (:class:`str` of length 1) [int]" msgstr "" @@ -553,7 +553,7 @@ msgid "" "1, to a C :c:expr:`int`." msgstr "" -#: ../../../c-api/arg.rst:299 ../../../c-api/arg.rst:700 +#: ../../../c-api/arg.rst:299 ../../../c-api/arg.rst:722 msgid "``f`` (:class:`float`) [float]" msgstr "" @@ -561,7 +561,7 @@ msgstr "" msgid "Convert a Python floating-point number to a C :c:expr:`float`." msgstr "" -#: ../../../c-api/arg.rst:302 ../../../c-api/arg.rst:697 +#: ../../../c-api/arg.rst:302 ../../../c-api/arg.rst:719 msgid "``d`` (:class:`float`) [double]" msgstr "" @@ -589,7 +589,7 @@ msgstr "" msgid "Other objects" msgstr "" -#: ../../../c-api/arg.rst:319 ../../../c-api/arg.rst:706 +#: ../../../c-api/arg.rst:319 ../../../c-api/arg.rst:728 msgid "``O`` (object) [PyObject \\*]" msgstr "" @@ -655,7 +655,7 @@ msgstr "" msgid ":c:macro:`!Py_CLEANUP_SUPPORTED` was added." msgstr "" -#: ../../../c-api/arg.rst:364 ../../../c-api/arg.rst:678 +#: ../../../c-api/arg.rst:364 ../../../c-api/arg.rst:700 msgid "``p`` (:class:`bool`) [int]" msgstr "" @@ -853,6 +853,23 @@ msgstr "" #: ../../../c-api/arg.rst:521 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:532 +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:543 +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 " @@ -869,19 +886,19 @@ msgid "" "if there was a failure." msgstr "" -#: ../../../c-api/arg.rst:536 +#: ../../../c-api/arg.rst:558 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:552 +#: ../../../c-api/arg.rst:574 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:559 +#: ../../../c-api/arg.rst:581 msgid "" "The value to be inserted, if any, before :c:expr:`char * const *` in the " "*keywords* parameter declaration of :c:func:`PyArg_ParseTupleAndKeywords` " @@ -890,11 +907,11 @@ msgid "" "to the desired value before including :file:`Python.h`." msgstr "" -#: ../../../c-api/arg.rst:573 +#: ../../../c-api/arg.rst:595 msgid "Building values" msgstr "" -#: ../../../c-api/arg.rst:577 +#: ../../../c-api/arg.rst:599 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 " @@ -902,7 +919,7 @@ msgid "" "``NULL`` is returned." msgstr "" -#: ../../../c-api/arg.rst:582 +#: ../../../c-api/arg.rst:604 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 " @@ -911,7 +928,7 @@ msgid "" "it to return a tuple of size 0 or one, parenthesize the format string." msgstr "" -#: ../../../c-api/arg.rst:588 +#: ../../../c-api/arg.rst:610 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. " @@ -922,7 +939,7 @@ msgid "" "`Py_BuildValue` returns." msgstr "" -#: ../../../c-api/arg.rst:596 +#: ../../../c-api/arg.rst:618 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 " @@ -930,152 +947,152 @@ msgid "" "be passed." msgstr "" -#: ../../../c-api/arg.rst:600 +#: ../../../c-api/arg.rst:622 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:604 +#: ../../../c-api/arg.rst:626 msgid "``s`` (:class:`str` or ``None``) [const char \\*]" msgstr "" -#: ../../../c-api/arg.rst:605 +#: ../../../c-api/arg.rst:627 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:608 +#: ../../../c-api/arg.rst:630 msgid "" "``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" -#: ../../../c-api/arg.rst:609 +#: ../../../c-api/arg.rst:631 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:613 +#: ../../../c-api/arg.rst:635 msgid "``y`` (:class:`bytes`) [const char \\*]" msgstr "" -#: ../../../c-api/arg.rst:614 +#: ../../../c-api/arg.rst:636 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:617 +#: ../../../c-api/arg.rst:639 msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" -#: ../../../c-api/arg.rst:618 +#: ../../../c-api/arg.rst:640 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:622 ../../../c-api/arg.rst:638 +#: ../../../c-api/arg.rst:644 ../../../c-api/arg.rst:660 msgid "Same as ``s``." msgstr "" -#: ../../../c-api/arg.rst:624 +#: ../../../c-api/arg.rst:646 msgid "" "``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" -#: ../../../c-api/arg.rst:625 ../../../c-api/arg.rst:641 +#: ../../../c-api/arg.rst:647 ../../../c-api/arg.rst:663 msgid "Same as ``s#``." msgstr "" -#: ../../../c-api/arg.rst:627 +#: ../../../c-api/arg.rst:649 msgid "``u`` (:class:`str`) [const wchar_t \\*]" msgstr "" -#: ../../../c-api/arg.rst:628 +#: ../../../c-api/arg.rst:650 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:632 +#: ../../../c-api/arg.rst:654 msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" msgstr "" -#: ../../../c-api/arg.rst:633 +#: ../../../c-api/arg.rst:655 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:637 +#: ../../../c-api/arg.rst:659 msgid "``U`` (:class:`str` or ``None``) [const char \\*]" msgstr "" -#: ../../../c-api/arg.rst:640 +#: ../../../c-api/arg.rst:662 msgid "" "``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" -#: ../../../c-api/arg.rst:644 +#: ../../../c-api/arg.rst:666 msgid "Convert a plain C :c:expr:`int` to a Python integer object." msgstr "" -#: ../../../c-api/arg.rst:646 +#: ../../../c-api/arg.rst:668 msgid "``b`` (:class:`int`) [char]" msgstr "" -#: ../../../c-api/arg.rst:647 +#: ../../../c-api/arg.rst:669 msgid "Convert a plain C :c:expr:`char` to a Python integer object." msgstr "" -#: ../../../c-api/arg.rst:650 +#: ../../../c-api/arg.rst:672 msgid "Convert a plain C :c:expr:`short int` to a Python integer object." msgstr "" -#: ../../../c-api/arg.rst:653 +#: ../../../c-api/arg.rst:675 msgid "Convert a C :c:expr:`long int` to a Python integer object." msgstr "" -#: ../../../c-api/arg.rst:656 +#: ../../../c-api/arg.rst:678 msgid "Convert a C :c:expr:`unsigned char` to a Python integer object." msgstr "" -#: ../../../c-api/arg.rst:659 +#: ../../../c-api/arg.rst:681 msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object." msgstr "" -#: ../../../c-api/arg.rst:662 +#: ../../../c-api/arg.rst:684 msgid "Convert a C :c:expr:`unsigned int` to a Python integer object." msgstr "" -#: ../../../c-api/arg.rst:665 +#: ../../../c-api/arg.rst:687 msgid "Convert a C :c:expr:`unsigned long` to a Python integer object." msgstr "" -#: ../../../c-api/arg.rst:668 +#: ../../../c-api/arg.rst:690 msgid "Convert a C :c:expr:`long long` to a Python integer object." msgstr "" -#: ../../../c-api/arg.rst:673 +#: ../../../c-api/arg.rst:695 msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object." msgstr "" -#: ../../../c-api/arg.rst:676 +#: ../../../c-api/arg.rst:698 msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." msgstr "" -#: ../../../c-api/arg.rst:679 +#: ../../../c-api/arg.rst:701 msgid "Convert a C :c:expr:`int` to a Python :class:`bool` object." msgstr "" -#: ../../../c-api/arg.rst:681 +#: ../../../c-api/arg.rst:703 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 " @@ -1083,39 +1100,39 @@ msgid "" "float) to a suitable ``int`` value using ``(x) ? 1 : 0`` or ``!!x``." msgstr "" -#: ../../../c-api/arg.rst:689 +#: ../../../c-api/arg.rst:711 msgid "``c`` (:class:`bytes` of length 1) [char]" msgstr "" -#: ../../../c-api/arg.rst:690 +#: ../../../c-api/arg.rst:712 msgid "" "Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " "object of length 1." msgstr "" -#: ../../../c-api/arg.rst:694 +#: ../../../c-api/arg.rst:716 msgid "" "Convert a C :c:expr:`int` representing a character to Python :class:`str` " "object of length 1." msgstr "" -#: ../../../c-api/arg.rst:698 +#: ../../../c-api/arg.rst:720 msgid "Convert a C :c:expr:`double` to a Python floating-point number." msgstr "" -#: ../../../c-api/arg.rst:701 +#: ../../../c-api/arg.rst:723 msgid "Convert a C :c:expr:`float` to a Python floating-point number." msgstr "" -#: ../../../c-api/arg.rst:703 +#: ../../../c-api/arg.rst:725 msgid "``D`` (:class:`complex`) [Py_complex \\*]" msgstr "" -#: ../../../c-api/arg.rst:704 +#: ../../../c-api/arg.rst:726 msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." msgstr "" -#: ../../../c-api/arg.rst:707 +#: ../../../c-api/arg.rst:729 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 " @@ -1125,30 +1142,30 @@ msgid "" "no exception has been raised yet, :exc:`SystemError` is set." msgstr "" -#: ../../../c-api/arg.rst:716 +#: ../../../c-api/arg.rst:738 msgid "``S`` (object) [PyObject \\*]" msgstr "" -#: ../../../c-api/arg.rst:717 +#: ../../../c-api/arg.rst:739 msgid "Same as ``O``." msgstr "" -#: ../../../c-api/arg.rst:719 +#: ../../../c-api/arg.rst:741 msgid "``N`` (object) [PyObject \\*]" msgstr "" -#: ../../../c-api/arg.rst:720 +#: ../../../c-api/arg.rst:742 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:724 +#: ../../../c-api/arg.rst:746 msgid "``O&`` (object) [*converter*, *anything*]" msgstr "" -#: ../../../c-api/arg.rst:725 +#: ../../../c-api/arg.rst:747 msgid "" "Convert *anything* to a Python object through a *converter* function. The " "function is called with *anything* (which should be compatible with :c:expr:" @@ -1156,44 +1173,44 @@ msgid "" "``NULL`` if an error occurred." msgstr "" -#: ../../../c-api/arg.rst:730 +#: ../../../c-api/arg.rst:752 msgid "``(items)`` (:class:`tuple`) [*matching-items*]" msgstr "" -#: ../../../c-api/arg.rst:731 +#: ../../../c-api/arg.rst:753 msgid "" "Convert a sequence of C values to a Python tuple with the same number of " "items." msgstr "" -#: ../../../c-api/arg.rst:733 +#: ../../../c-api/arg.rst:755 msgid "``[items]`` (:class:`list`) [*matching-items*]" msgstr "" -#: ../../../c-api/arg.rst:734 +#: ../../../c-api/arg.rst:756 msgid "" "Convert a sequence of C values to a Python list with the same number of " "items." msgstr "" -#: ../../../c-api/arg.rst:736 +#: ../../../c-api/arg.rst:758 msgid "``{items}`` (:class:`dict`) [*matching-items*]" msgstr "" -#: ../../../c-api/arg.rst:737 +#: ../../../c-api/arg.rst:759 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:741 +#: ../../../c-api/arg.rst:763 msgid "" "If there is an error in the format string, the :exc:`SystemError` exception " "is set and ``NULL`` returned." msgstr "" -#: ../../../c-api/arg.rst:746 +#: ../../../c-api/arg.rst:768 msgid "" "Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " "rather than a variable number of arguments." diff --git a/main/locale/pot/LC_MESSAGES/c-api/bytes.pot b/main/locale/pot/LC_MESSAGES/c-api/bytes.pot index 666b112ed20..d4a4458c142 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/bytes.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/bytes.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-01-05 09:10+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -452,11 +452,11 @@ msgid "" "func:`PyBytesWriter_GetData`. This function does not overallocate." msgstr "" -#: ../../../c-api/bytes.rst:300 ../../../c-api/bytes.rst:421 +#: ../../../c-api/bytes.rst:300 ../../../c-api/bytes.rst:425 msgid "On error, set an exception and return ``NULL``." msgstr "" -#: ../../../c-api/bytes.rst:302 ../../../c-api/bytes.rst:397 +#: ../../../c-api/bytes.rst:302 ../../../c-api/bytes.rst:401 msgid "*size* must be positive or zero." msgstr "" @@ -495,7 +495,7 @@ msgid "" "internal buffer bounds." msgstr "" -#: ../../../c-api/bytes.rst:328 ../../../c-api/bytes.rst:425 +#: ../../../c-api/bytes.rst:328 ../../../c-api/bytes.rst:429 msgid "Function pseudo-code::" msgstr "" @@ -531,7 +531,7 @@ msgid "" msgstr "" #: ../../../c-api/bytes.rst:354 ../../../c-api/bytes.rst:363 -#: ../../../c-api/bytes.rst:394 ../../../c-api/bytes.rst:407 +#: ../../../c-api/bytes.rst:398 ../../../c-api/bytes.rst:411 msgid "On success, return ``0``. On error, set an exception and return ``-1``." msgstr "" @@ -550,54 +550,58 @@ msgstr "" msgid "Get the writer size." msgstr "" -#: ../../../c-api/bytes.rst:376 -msgid "Get the writer data: start of the internal buffer." +#: ../../../c-api/bytes.rst:374 ../../../c-api/bytes.rst:383 +msgid "The function cannot fail." msgstr "" #: ../../../c-api/bytes.rst:378 +msgid "Get the writer data: start of the internal buffer." +msgstr "" + +#: ../../../c-api/bytes.rst:380 msgid "" "The pointer is valid until :c:func:`PyBytesWriter_Finish` or :c:func:" "`PyBytesWriter_Discard` is called on *writer*." msgstr "" -#: ../../../c-api/bytes.rst:383 +#: ../../../c-api/bytes.rst:387 msgid "Low-level API" msgstr "" -#: ../../../c-api/bytes.rst:387 +#: ../../../c-api/bytes.rst:391 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:392 ../../../c-api/bytes.rst:405 +#: ../../../c-api/bytes.rst:396 ../../../c-api/bytes.rst:409 msgid "Newly allocated bytes are left uninitialized." msgstr "" -#: ../../../c-api/bytes.rst:401 +#: ../../../c-api/bytes.rst:405 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:410 +#: ../../../c-api/bytes.rst:414 msgid "*size* can be negative to shrink the writer." msgstr "" -#: ../../../c-api/bytes.rst:414 +#: ../../../c-api/bytes.rst:418 msgid "" "Similar to :c:func:`PyBytesWriter_Grow`, but update also the *buf* pointer." msgstr "" -#: ../../../c-api/bytes.rst:417 +#: ../../../c-api/bytes.rst:421 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:423 +#: ../../../c-api/bytes.rst:427 msgid "*buf* must not be ``NULL``." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/dict.pot b/main/locale/pot/LC_MESSAGES/c-api/dict.pot index 74fe426a829..5c795c2e324 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/dict.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/dict.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -55,7 +55,23 @@ msgid "" "modification of the dictionary for non-dynamic class types." msgstr "" -#: ../../../c-api/dict.rst:48 +#: ../../../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:79 +#: ../../../c-api/dict.rst:93 ../../../c-api/dict.rst:145 +#: ../../../c-api/dict.rst:169 ../../../c-api/dict.rst:180 +#: ../../../c-api/dict.rst:198 ../../../c-api/dict.rst:210 +#: ../../../c-api/dict.rst:278 ../../../c-api/dict.rst:288 +#: ../../../c-api/dict.rst:299 ../../../c-api/dict.rst:312 +#: ../../../c-api/dict.rst:320 ../../../c-api/dict.rst:394 +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-" @@ -65,41 +81,42 @@ msgid "" "operations. This corresponds to :class:`types.MappingProxyType` in Python." msgstr "" -#: ../../../c-api/dict.rst:59 +#: ../../../c-api/dict.rst:65 msgid "Empty an existing dictionary of all key-value pairs." msgstr "" -#: ../../../c-api/dict.rst:61 +#: ../../../c-api/dict.rst:67 msgid "" "Do nothing if the argument is not a :class:`dict` or a :class:`!dict` " "subclass." msgstr "" -#: ../../../c-api/dict.rst:67 +#: ../../../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:74 +#: ../../../c-api/dict.rst:77 ../../../c-api/dict.rst:89 +#: ../../../c-api/dict.rst:141 ../../../c-api/dict.rst:157 +#: ../../../c-api/dict.rst:276 ../../../c-api/dict.rst:286 +#: ../../../c-api/dict.rst:297 ../../../c-api/dict.rst:337 +msgid "The first argument can be a :class:`dict` or a :class:`frozendict`." +msgstr "" + +#: ../../../c-api/dict.rst:85 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:83 +#: ../../../c-api/dict.rst:99 msgid "Return a new dictionary that contains the same key-value pairs as *p*." msgstr "" -#: ../../../c-api/dict.rst:85 -msgid "" -"If *p* is a subclass of :class:`frozendict`, the result will be a :class:" -"`frozendict` instance instead of a :class:`dict` instance." -msgstr "" - -#: ../../../c-api/dict.rst:91 +#: ../../../c-api/dict.rst:103 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`` " @@ -107,14 +124,14 @@ msgid "" "to *val*." msgstr "" -#: ../../../c-api/dict.rst:99 +#: ../../../c-api/dict.rst:111 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:106 +#: ../../../c-api/dict.rst:118 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 " @@ -122,72 +139,72 @@ msgid "" "failure." msgstr "" -#: ../../../c-api/dict.rst:114 +#: ../../../c-api/dict.rst:126 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:121 +#: ../../../c-api/dict.rst:133 msgid "" "Return a new :term:`strong reference` to the object from dictionary *p* " "which has a key *key*:" msgstr "" -#: ../../../c-api/dict.rst:124 +#: ../../../c-api/dict.rst:136 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:126 +#: ../../../c-api/dict.rst:138 msgid "If the key is missing, set *\\*result* to ``NULL`` and return ``0``." msgstr "" -#: ../../../c-api/dict.rst:127 ../../../c-api/dict.rst:224 +#: ../../../c-api/dict.rst:139 ../../../c-api/dict.rst:255 msgid "On error, raise an exception and return ``-1``." msgstr "" -#: ../../../c-api/dict.rst:131 +#: ../../../c-api/dict.rst:148 msgid "See also the :c:func:`PyObject_GetItem` function." msgstr "" -#: ../../../c-api/dict.rst:136 +#: ../../../c-api/dict.rst:153 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:142 +#: ../../../c-api/dict.rst:161 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:146 +#: ../../../c-api/dict.rst:165 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:153 +#: ../../../c-api/dict.rst:175 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:161 +#: ../../../c-api/dict.rst:186 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:167 +#: ../../../c-api/dict.rst:192 msgid "" "Exceptions that occur while this calls :meth:`~object.__hash__` and :meth:" "`~object.__eq__` methods or while creating the temporary :class:`str` object " @@ -195,13 +212,13 @@ msgid "" "function with your own :c:func:`PyUnicode_FromString` *key* instead." msgstr "" -#: ../../../c-api/dict.rst:176 +#: ../../../c-api/dict.rst:204 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:185 +#: ../../../c-api/dict.rst:216 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 " @@ -211,7 +228,7 @@ msgid "" "the insertion." msgstr "" -#: ../../../c-api/dict.rst:196 +#: ../../../c-api/dict.rst:227 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``, " @@ -223,7 +240,7 @@ msgid "" "exception, and sets ``*result`` to ``NULL``." msgstr "" -#: ../../../c-api/dict.rst:206 +#: ../../../c-api/dict.rst:237 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 " @@ -231,63 +248,67 @@ msgid "" "to the same object: in that case you hold two separate references to it." msgstr "" -#: ../../../c-api/dict.rst:217 +#: ../../../c-api/dict.rst:248 msgid "" "Remove *key* from dictionary *p* and optionally return the removed value. Do " "not raise :exc:`KeyError` if the key is missing." msgstr "" -#: ../../../c-api/dict.rst:220 +#: ../../../c-api/dict.rst:251 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:222 +#: ../../../c-api/dict.rst:253 msgid "" "If the key is missing, set *\\*result* to ``NULL`` if *result* is not " "``NULL``, and return ``0``." msgstr "" -#: ../../../c-api/dict.rst:226 +#: ../../../c-api/dict.rst:257 msgid "" "Similar to :meth:`dict.pop`, but without the default value and not raising :" "exc:`KeyError` if the key is missing." msgstr "" -#: ../../../c-api/dict.rst:234 +#: ../../../c-api/dict.rst:265 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:243 +#: ../../../c-api/dict.rst:274 msgid "" "Return a :c:type:`PyListObject` containing all the items from the dictionary." msgstr "" -#: ../../../c-api/dict.rst:248 +#: ../../../c-api/dict.rst:284 msgid "" "Return a :c:type:`PyListObject` containing all the keys from the dictionary." msgstr "" -#: ../../../c-api/dict.rst:253 +#: ../../../c-api/dict.rst:294 msgid "" "Return a :c:type:`PyListObject` containing all the values from the " "dictionary *p*." msgstr "" -#: ../../../c-api/dict.rst:261 +#: ../../../c-api/dict.rst:307 msgid "" "Return the number of items in the dictionary. This is equivalent to " "``len(p)`` on a dictionary." msgstr "" -#: ../../../c-api/dict.rst:267 +#: ../../../c-api/dict.rst:310 +msgid "The argument can be a :class:`dict` or a :class:`frozendict`." +msgstr "" + +#: ../../../c-api/dict.rst:318 msgid "Similar to :c:func:`PyDict_Size`, but without error checking." msgstr "" -#: ../../../c-api/dict.rst:272 +#: ../../../c-api/dict.rst:326 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 " @@ -301,25 +322,30 @@ msgid "" "structure is sparse, the offsets are not consecutive." msgstr "" -#: ../../../c-api/dict.rst:283 +#: ../../../c-api/dict.rst:339 msgid "For example::" msgstr "" -#: ../../../c-api/dict.rst:293 +#: ../../../c-api/dict.rst:349 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:315 +#: ../../../c-api/dict.rst:371 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:382 +msgid "The function is thread-safe on a :class:`frozendict`." msgstr "" -#: ../../../c-api/dict.rst:328 +#: ../../../c-api/dict.rst:386 msgid "" "On the free-threaded build, this function can be used safely inside a " "critical section. However, the references returned for *pkey* and *pvalue* " @@ -330,7 +356,7 @@ msgid "" "`Py_NewRef`)." msgstr "" -#: ../../../c-api/dict.rst:338 +#: ../../../c-api/dict.rst:399 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` " @@ -340,7 +366,7 @@ msgid "" "or ``-1`` if an exception was raised." msgstr "" -#: ../../../c-api/dict.rst:348 +#: ../../../c-api/dict.rst:409 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 " @@ -349,7 +375,7 @@ msgid "" "exception was raised." msgstr "" -#: ../../../c-api/dict.rst:357 +#: ../../../c-api/dict.rst:418 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, " @@ -358,7 +384,7 @@ msgid "" "if an exception was raised. Equivalent Python (except for the return value)::" msgstr "" -#: ../../../c-api/dict.rst:371 +#: ../../../c-api/dict.rst:432 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 " @@ -366,21 +392,21 @@ msgid "" "exception." msgstr "" -#: ../../../c-api/dict.rst:380 +#: ../../../c-api/dict.rst:441 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:388 +#: ../../../c-api/dict.rst:449 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:396 +#: ../../../c-api/dict.rst:457 msgid "" "Mark dictionary *dict* as no longer watched. The callback granted " "*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when " @@ -388,7 +414,7 @@ msgid "" "watched by this watcher. Return ``0`` on success or ``-1`` on error." msgstr "" -#: ../../../c-api/dict.rst:405 +#: ../../../c-api/dict.rst:466 msgid "" "Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, " "``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, " @@ -396,11 +422,11 @@ msgid "" "``PyDict_EVENT_DEALLOCATED``." msgstr "" -#: ../../../c-api/dict.rst:413 +#: ../../../c-api/dict.rst:474 msgid "Type of a dict watcher callback function." msgstr "" -#: ../../../c-api/dict.rst:415 +#: ../../../c-api/dict.rst:476 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`` " @@ -409,7 +435,7 @@ msgid "" "dictionary and *new_value* will be ``NULL``." msgstr "" -#: ../../../c-api/dict.rst:421 +#: ../../../c-api/dict.rst:482 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 " @@ -417,14 +443,14 @@ msgid "" "``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary." msgstr "" -#: ../../../c-api/dict.rst:427 +#: ../../../c-api/dict.rst:488 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:431 +#: ../../../c-api/dict.rst:492 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 " @@ -433,20 +459,20 @@ msgid "" "again." msgstr "" -#: ../../../c-api/dict.rst:437 +#: ../../../c-api/dict.rst:498 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:440 +#: ../../../c-api/dict.rst:501 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:444 +#: ../../../c-api/dict.rst:505 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 " @@ -455,204 +481,204 @@ msgid "" "it before returning." msgstr "" -#: ../../../c-api/dict.rst:454 +#: ../../../c-api/dict.rst:515 msgid "Dictionary view objects" msgstr "" -#: ../../../c-api/dict.rst:458 +#: ../../../c-api/dict.rst:519 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:465 +#: ../../../c-api/dict.rst:526 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:471 +#: ../../../c-api/dict.rst:532 msgid "" "Return true if *op* is an instance of a dictionary keys view. This function " "always succeeds." msgstr "" -#: ../../../c-api/dict.rst:477 +#: ../../../c-api/dict.rst:538 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:483 +#: ../../../c-api/dict.rst:544 msgid "" "Return true if *op* is an instance of a dictionary values view. This " "function always succeeds." msgstr "" -#: ../../../c-api/dict.rst:489 +#: ../../../c-api/dict.rst:550 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:495 +#: ../../../c-api/dict.rst:556 msgid "" "Return true if *op* is an instance of a dictionary items view. This function " "always succeeds." msgstr "" -#: ../../../c-api/dict.rst:500 +#: ../../../c-api/dict.rst:561 msgid "Frozen dictionary objects" msgstr "" -#: ../../../c-api/dict.rst:507 +#: ../../../c-api/dict.rst:568 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:514 +#: ../../../c-api/dict.rst:575 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:522 +#: ../../../c-api/dict.rst:583 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:530 +#: ../../../c-api/dict.rst:591 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:537 +#: ../../../c-api/dict.rst:598 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:544 +#: ../../../c-api/dict.rst:605 msgid "" "Return a new :class:`frozendict` from an iterable, or ``NULL`` on failure " "with an exception set." msgstr "" -#: ../../../c-api/dict.rst:547 +#: ../../../c-api/dict.rst:608 msgid "Create an empty dictionary if *iterable* is ``NULL``." msgstr "" -#: ../../../c-api/dict.rst:551 +#: ../../../c-api/dict.rst:612 msgid "Ordered dictionaries" msgstr "" -#: ../../../c-api/dict.rst:553 +#: ../../../c-api/dict.rst:614 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:560 +#: ../../../c-api/dict.rst:621 msgid "" "Type object for ordered dictionaries. This is the same object as :class:" "`collections.OrderedDict` in the Python layer." msgstr "" -#: ../../../c-api/dict.rst:566 +#: ../../../c-api/dict.rst:627 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:573 +#: ../../../c-api/dict.rst:634 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:580 +#: ../../../c-api/dict.rst:641 msgid "Analogous to :c:type:`PyDictKeys_Type` for ordered dictionaries." msgstr "" -#: ../../../c-api/dict.rst:585 +#: ../../../c-api/dict.rst:646 msgid "Analogous to :c:type:`PyDictValues_Type` for ordered dictionaries." msgstr "" -#: ../../../c-api/dict.rst:590 +#: ../../../c-api/dict.rst:651 msgid "Analogous to :c:type:`PyDictItems_Type` for ordered dictionaries." msgstr "" -#: ../../../c-api/dict.rst:595 +#: ../../../c-api/dict.rst:656 msgid "Return a new empty ordered dictionary, or ``NULL`` on failure." msgstr "" -#: ../../../c-api/dict.rst:597 +#: ../../../c-api/dict.rst:658 msgid "This is analogous to :c:func:`PyDict_New`." msgstr "" -#: ../../../c-api/dict.rst:602 +#: ../../../c-api/dict.rst:663 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:605 +#: ../../../c-api/dict.rst:666 msgid "This is analogous to :c:func:`PyDict_SetItem`." msgstr "" -#: ../../../c-api/dict.rst:610 +#: ../../../c-api/dict.rst:671 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:613 +#: ../../../c-api/dict.rst:674 msgid "This is analogous to :c:func:`PyDict_DelItem`." msgstr "" -#: ../../../c-api/dict.rst:616 +#: ../../../c-api/dict.rst:677 msgid "These are :term:`soft deprecated` aliases to ``PyDict`` APIs:" msgstr "" -#: ../../../c-api/dict.rst:623 +#: ../../../c-api/dict.rst:684 msgid "``PyODict``" msgstr "" -#: ../../../c-api/dict.rst:624 +#: ../../../c-api/dict.rst:685 msgid "``PyDict``" msgstr "" -#: ../../../c-api/dict.rst:626 +#: ../../../c-api/dict.rst:687 msgid ":c:func:`PyDict_GetItem`" msgstr "" -#: ../../../c-api/dict.rst:628 +#: ../../../c-api/dict.rst:689 msgid ":c:func:`PyDict_GetItemWithError`" msgstr "" -#: ../../../c-api/dict.rst:630 +#: ../../../c-api/dict.rst:691 msgid ":c:func:`PyDict_GetItemString`" msgstr "" -#: ../../../c-api/dict.rst:632 +#: ../../../c-api/dict.rst:693 msgid ":c:func:`PyDict_Contains`" msgstr "" -#: ../../../c-api/dict.rst:634 +#: ../../../c-api/dict.rst:695 msgid ":c:func:`PyDict_Size`" msgstr "" -#: ../../../c-api/dict.rst:636 +#: ../../../c-api/dict.rst:697 msgid ":c:func:`PyDict_GET_SIZE`" msgstr "" @@ -664,10 +690,10 @@ msgstr "" msgid "dictionary" msgstr "" -#: ../../../c-api/dict.rst:259 +#: ../../../c-api/dict.rst:305 msgid "built-in function" msgstr "" -#: ../../../c-api/dict.rst:259 +#: ../../../c-api/dict.rst:305 msgid "len" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/exceptions.pot b/main/locale/pot/LC_MESSAGES/c-api/exceptions.pot index 6d0c3404c2e..5e880749f0b 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/exceptions.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/exceptions.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -719,48 +719,56 @@ msgid "Executing a pending :ref:`remote debugger ` script." msgstr "" #: ../../../c-api/exceptions.rst:702 +msgid "Raise the exception set by :c:func:`PyThreadState_SetAsyncExc`." +msgstr "" + +#: ../../../c-api/exceptions.rst:704 msgid "" "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:707 +#: ../../../c-api/exceptions.rst:709 msgid "" "If all handlers finish successfully, or there are no handlers to run, return " "``0``." msgstr "" -#: ../../../c-api/exceptions.rst:710 +#: ../../../c-api/exceptions.rst:712 msgid "This function may now invoke the garbage collector." msgstr "" -#: ../../../c-api/exceptions.rst:713 +#: ../../../c-api/exceptions.rst:715 msgid "" "This function may now execute a remote debugger script, if remote debugging " "is enabled." msgstr "" -#: ../../../c-api/exceptions.rst:725 +#: ../../../c-api/exceptions.rst:719 +msgid "The exception set by :c:func:`PyThreadState_SetAsyncExc` is now raised." +msgstr "" + +#: ../../../c-api/exceptions.rst:730 msgid "" "Simulate the effect of a :c:macro:`!SIGINT` signal arriving. This is " "equivalent to ``PyErr_SetInterruptEx(SIGINT)``." msgstr "" -#: ../../../c-api/exceptions.rst:729 ../../../c-api/exceptions.rst:756 +#: ../../../c-api/exceptions.rst:734 ../../../c-api/exceptions.rst:761 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:739 +#: ../../../c-api/exceptions.rst:744 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:743 +#: ../../../c-api/exceptions.rst:748 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 " @@ -768,27 +776,27 @@ msgid "" "interrupt an operation)." msgstr "" -#: ../../../c-api/exceptions.rst:748 +#: ../../../c-api/exceptions.rst:753 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:751 +#: ../../../c-api/exceptions.rst:756 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:764 +#: ../../../c-api/exceptions.rst:769 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:768 +#: ../../../c-api/exceptions.rst:773 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 " @@ -796,15 +804,15 @@ msgid "" "be called from the main thread." msgstr "" -#: ../../../c-api/exceptions.rst:773 +#: ../../../c-api/exceptions.rst:778 msgid "On Windows, the function now also supports socket handles." msgstr "" -#: ../../../c-api/exceptions.rst:778 +#: ../../../c-api/exceptions.rst:783 msgid "Exception Classes" msgstr "" -#: ../../../c-api/exceptions.rst:782 +#: ../../../c-api/exceptions.rst:787 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 " @@ -813,7 +821,7 @@ msgid "" "(accessible in C as :c:data:`PyExc_Exception`)." msgstr "" -#: ../../../c-api/exceptions.rst:788 +#: ../../../c-api/exceptions.rst:793 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 " @@ -823,30 +831,30 @@ msgid "" "variables and methods." msgstr "" -#: ../../../c-api/exceptions.rst:797 +#: ../../../c-api/exceptions.rst:802 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:806 +#: ../../../c-api/exceptions.rst:811 msgid "" "Return non-zero if *ob* is an exception class, zero otherwise. This function " "always succeeds." msgstr "" -#: ../../../c-api/exceptions.rst:811 +#: ../../../c-api/exceptions.rst:816 msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." msgstr "" -#: ../../../c-api/exceptions.rst:816 +#: ../../../c-api/exceptions.rst:821 msgid "" "This is a :term:`soft deprecated` macro including the base fields for an " "exception object." msgstr "" -#: ../../../c-api/exceptions.rst:819 +#: ../../../c-api/exceptions.rst:824 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:" @@ -854,34 +862,34 @@ msgid "" "`PyExc_BaseException`." msgstr "" -#: ../../../c-api/exceptions.rst:826 +#: ../../../c-api/exceptions.rst:831 msgid "Exception Objects" msgstr "" -#: ../../../c-api/exceptions.rst:830 +#: ../../../c-api/exceptions.rst:835 msgid "" "Return true if *op* is an instance of :class:`BaseException`, false " "otherwise. This function always succeeds." msgstr "" -#: ../../../c-api/exceptions.rst:836 +#: ../../../c-api/exceptions.rst:841 msgid "Equivalent to :c:func:`Py_TYPE(op) `." msgstr "" -#: ../../../c-api/exceptions.rst:841 +#: ../../../c-api/exceptions.rst:846 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:849 +#: ../../../c-api/exceptions.rst:854 msgid "" "Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " "clear it." msgstr "" -#: ../../../c-api/exceptions.rst:855 +#: ../../../c-api/exceptions.rst:860 msgid "" "Return the context (another exception instance during whose handling *ex* " "was raised) associated with the exception as a new reference, as accessible " @@ -889,14 +897,14 @@ msgid "" "there is no context associated, this returns ``NULL``." msgstr "" -#: ../../../c-api/exceptions.rst:863 +#: ../../../c-api/exceptions.rst:868 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 "" -#: ../../../c-api/exceptions.rst:870 +#: ../../../c-api/exceptions.rst:875 msgid "" "Return the cause (either an exception instance, or ``None``, set by " "``raise ... from ...``) associated with the exception as a new reference, as " @@ -904,28 +912,28 @@ msgid "" "attribute." msgstr "" -#: ../../../c-api/exceptions.rst:878 +#: ../../../c-api/exceptions.rst:883 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 "" -#: ../../../c-api/exceptions.rst:882 +#: ../../../c-api/exceptions.rst:887 msgid "" "The :attr:`~BaseException.__suppress_context__` attribute is implicitly set " "to ``True`` by this function." msgstr "" -#: ../../../c-api/exceptions.rst:888 +#: ../../../c-api/exceptions.rst:893 msgid "Return :attr:`~BaseException.args` of exception *ex*." msgstr "" -#: ../../../c-api/exceptions.rst:893 +#: ../../../c-api/exceptions.rst:898 msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." msgstr "" -#: ../../../c-api/exceptions.rst:897 +#: ../../../c-api/exceptions.rst:902 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 " @@ -937,98 +945,98 @@ msgid "" "if there is nothing to reraise." msgstr "" -#: ../../../c-api/exceptions.rst:911 +#: ../../../c-api/exceptions.rst:916 msgid "Unicode Exception Objects" msgstr "" -#: ../../../c-api/exceptions.rst:913 +#: ../../../c-api/exceptions.rst:918 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" -#: ../../../c-api/exceptions.rst:917 +#: ../../../c-api/exceptions.rst:922 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:924 +#: ../../../c-api/exceptions.rst:929 msgid "Return the *encoding* attribute of the given exception object." msgstr "" -#: ../../../c-api/exceptions.rst:930 +#: ../../../c-api/exceptions.rst:935 msgid "Return the *object* attribute of the given exception object." msgstr "" -#: ../../../c-api/exceptions.rst:936 +#: ../../../c-api/exceptions.rst:941 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:940 +#: ../../../c-api/exceptions.rst:945 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:943 +#: ../../../c-api/exceptions.rst:948 msgid ":attr:`UnicodeError.start`" msgstr "" -#: ../../../c-api/exceptions.rst:949 +#: ../../../c-api/exceptions.rst:954 msgid "" "Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: ../../../c-api/exceptions.rst:954 +#: ../../../c-api/exceptions.rst:959 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:962 +#: ../../../c-api/exceptions.rst:967 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:966 +#: ../../../c-api/exceptions.rst:971 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:973 +#: ../../../c-api/exceptions.rst:978 msgid "" "Set the *end* attribute of the given exception object to *end*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: ../../../c-api/exceptions.rst:976 +#: ../../../c-api/exceptions.rst:981 msgid ":attr:`UnicodeError.end`" msgstr "" -#: ../../../c-api/exceptions.rst:982 +#: ../../../c-api/exceptions.rst:987 msgid "Return the *reason* attribute of the given exception object." msgstr "" -#: ../../../c-api/exceptions.rst:988 +#: ../../../c-api/exceptions.rst:993 msgid "" "Set the *reason* attribute of the given exception object to *reason*. " "Return ``0`` on success, ``-1`` on failure." msgstr "" -#: ../../../c-api/exceptions.rst:995 +#: ../../../c-api/exceptions.rst:1000 msgid "Recursion Control" msgstr "" -#: ../../../c-api/exceptions.rst:997 +#: ../../../c-api/exceptions.rst:1002 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 " @@ -1038,41 +1046,41 @@ msgid "" "recursion handling." msgstr "" -#: ../../../c-api/exceptions.rst:1006 +#: ../../../c-api/exceptions.rst:1011 msgid "Marks a point where a recursive C-level call is about to be performed." msgstr "" -#: ../../../c-api/exceptions.rst:1008 +#: ../../../c-api/exceptions.rst:1013 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:1012 +#: ../../../c-api/exceptions.rst:1017 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:1017 +#: ../../../c-api/exceptions.rst:1022 msgid "The :c:func:`PyUnstable_ThreadState_SetStackProtection` function." msgstr "" -#: ../../../c-api/exceptions.rst:1019 ../../../c-api/exceptions.rst:1027 +#: ../../../c-api/exceptions.rst:1024 ../../../c-api/exceptions.rst:1032 msgid "" "This function is now also available in the :ref:`limited API `." msgstr "" -#: ../../../c-api/exceptions.rst:1024 +#: ../../../c-api/exceptions.rst:1029 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:1030 +#: ../../../c-api/exceptions.rst:1035 msgid "" "Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " "requires special recursion handling. In addition to protecting the stack, :" @@ -1081,13 +1089,13 @@ msgid "" "Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." msgstr "" -#: ../../../c-api/exceptions.rst:1038 +#: ../../../c-api/exceptions.rst:1043 msgid "" "Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " "implementation to detect cycles." msgstr "" -#: ../../../c-api/exceptions.rst:1041 +#: ../../../c-api/exceptions.rst:1046 msgid "" "If the object has already been processed, the function returns a positive " "integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -1095,305 +1103,305 @@ msgid "" "`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." msgstr "" -#: ../../../c-api/exceptions.rst:1047 +#: ../../../c-api/exceptions.rst:1052 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:1051 +#: ../../../c-api/exceptions.rst:1056 msgid "" "Otherwise, the function returns zero and the :c:member:`~PyTypeObject." "tp_repr` implementation can continue normally." msgstr "" -#: ../../../c-api/exceptions.rst:1056 +#: ../../../c-api/exceptions.rst:1061 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:1061 +#: ../../../c-api/exceptions.rst:1066 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:1065 ../../../c-api/exceptions.rst:1075 +#: ../../../c-api/exceptions.rst:1070 ../../../c-api/exceptions.rst:1080 msgid "" "This function cannot fail, and the caller must hold an :term:`attached " "thread state`." msgstr "" -#: ../../../c-api/exceptions.rst:1069 +#: ../../../c-api/exceptions.rst:1074 msgid ":py:func:`sys.getrecursionlimit`" msgstr "" -#: ../../../c-api/exceptions.rst:1073 +#: ../../../c-api/exceptions.rst:1078 msgid "Set the recursion limit for the current interpreter." msgstr "" -#: ../../../c-api/exceptions.rst:1079 +#: ../../../c-api/exceptions.rst:1084 msgid ":py:func:`sys.setrecursionlimit`" msgstr "" -#: ../../../c-api/exceptions.rst:1084 +#: ../../../c-api/exceptions.rst:1089 msgid "Exception and warning types" msgstr "" -#: ../../../c-api/exceptions.rst:1086 +#: ../../../c-api/exceptions.rst:1091 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:1090 +#: ../../../c-api/exceptions.rst:1095 msgid "For completeness, here are all the variables:" msgstr "" -#: ../../../c-api/exceptions.rst:1093 +#: ../../../c-api/exceptions.rst:1098 msgid "Exception types" msgstr "" -#: ../../../c-api/exceptions.rst:1100 ../../../c-api/exceptions.rst:1248 -#: ../../../c-api/exceptions.rst:1278 +#: ../../../c-api/exceptions.rst:1105 ../../../c-api/exceptions.rst:1253 +#: ../../../c-api/exceptions.rst:1283 msgid "C name" msgstr "" -#: ../../../c-api/exceptions.rst:1101 ../../../c-api/exceptions.rst:1249 -#: ../../../c-api/exceptions.rst:1279 +#: ../../../c-api/exceptions.rst:1106 ../../../c-api/exceptions.rst:1254 +#: ../../../c-api/exceptions.rst:1284 msgid "Python name" msgstr "" -#: ../../../c-api/exceptions.rst:1103 +#: ../../../c-api/exceptions.rst:1108 msgid ":exc:`BaseException`" msgstr "" -#: ../../../c-api/exceptions.rst:1105 +#: ../../../c-api/exceptions.rst:1110 msgid ":exc:`BaseExceptionGroup`" msgstr "" -#: ../../../c-api/exceptions.rst:1107 +#: ../../../c-api/exceptions.rst:1112 msgid ":exc:`Exception`" msgstr "" -#: ../../../c-api/exceptions.rst:1109 +#: ../../../c-api/exceptions.rst:1114 msgid ":exc:`ArithmeticError`" msgstr "" -#: ../../../c-api/exceptions.rst:1111 +#: ../../../c-api/exceptions.rst:1116 msgid ":exc:`AssertionError`" msgstr "" -#: ../../../c-api/exceptions.rst:1113 +#: ../../../c-api/exceptions.rst:1118 msgid ":exc:`AttributeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1115 +#: ../../../c-api/exceptions.rst:1120 msgid ":exc:`BlockingIOError`" msgstr "" -#: ../../../c-api/exceptions.rst:1117 +#: ../../../c-api/exceptions.rst:1122 msgid ":exc:`BrokenPipeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1119 +#: ../../../c-api/exceptions.rst:1124 msgid ":exc:`BufferError`" msgstr "" -#: ../../../c-api/exceptions.rst:1121 +#: ../../../c-api/exceptions.rst:1126 msgid ":exc:`ChildProcessError`" msgstr "" -#: ../../../c-api/exceptions.rst:1123 +#: ../../../c-api/exceptions.rst:1128 msgid ":exc:`ConnectionAbortedError`" msgstr "" -#: ../../../c-api/exceptions.rst:1125 +#: ../../../c-api/exceptions.rst:1130 msgid ":exc:`ConnectionError`" msgstr "" -#: ../../../c-api/exceptions.rst:1127 +#: ../../../c-api/exceptions.rst:1132 msgid ":exc:`ConnectionRefusedError`" msgstr "" -#: ../../../c-api/exceptions.rst:1129 +#: ../../../c-api/exceptions.rst:1134 msgid ":exc:`ConnectionResetError`" msgstr "" -#: ../../../c-api/exceptions.rst:1131 +#: ../../../c-api/exceptions.rst:1136 msgid ":exc:`EOFError`" msgstr "" -#: ../../../c-api/exceptions.rst:1133 +#: ../../../c-api/exceptions.rst:1138 msgid ":exc:`FileExistsError`" msgstr "" -#: ../../../c-api/exceptions.rst:1135 +#: ../../../c-api/exceptions.rst:1140 msgid ":exc:`FileNotFoundError`" msgstr "" -#: ../../../c-api/exceptions.rst:1137 +#: ../../../c-api/exceptions.rst:1142 msgid ":exc:`FloatingPointError`" msgstr "" -#: ../../../c-api/exceptions.rst:1139 +#: ../../../c-api/exceptions.rst:1144 msgid ":exc:`GeneratorExit`" msgstr "" -#: ../../../c-api/exceptions.rst:1141 +#: ../../../c-api/exceptions.rst:1146 msgid ":exc:`ImportCycleError`" msgstr "" -#: ../../../c-api/exceptions.rst:1143 +#: ../../../c-api/exceptions.rst:1148 msgid ":exc:`ImportError`" msgstr "" -#: ../../../c-api/exceptions.rst:1145 +#: ../../../c-api/exceptions.rst:1150 msgid ":exc:`IndentationError`" msgstr "" -#: ../../../c-api/exceptions.rst:1147 +#: ../../../c-api/exceptions.rst:1152 msgid ":exc:`IndexError`" msgstr "" -#: ../../../c-api/exceptions.rst:1149 +#: ../../../c-api/exceptions.rst:1154 msgid ":exc:`InterruptedError`" msgstr "" -#: ../../../c-api/exceptions.rst:1151 +#: ../../../c-api/exceptions.rst:1156 msgid ":exc:`IsADirectoryError`" msgstr "" -#: ../../../c-api/exceptions.rst:1153 +#: ../../../c-api/exceptions.rst:1158 msgid ":exc:`KeyError`" msgstr "" -#: ../../../c-api/exceptions.rst:1155 +#: ../../../c-api/exceptions.rst:1160 msgid ":exc:`KeyboardInterrupt`" msgstr "" -#: ../../../c-api/exceptions.rst:1157 +#: ../../../c-api/exceptions.rst:1162 msgid ":exc:`LookupError`" msgstr "" -#: ../../../c-api/exceptions.rst:1159 +#: ../../../c-api/exceptions.rst:1164 msgid ":exc:`MemoryError`" msgstr "" -#: ../../../c-api/exceptions.rst:1161 +#: ../../../c-api/exceptions.rst:1166 msgid ":exc:`ModuleNotFoundError`" msgstr "" -#: ../../../c-api/exceptions.rst:1163 +#: ../../../c-api/exceptions.rst:1168 msgid ":exc:`NameError`" msgstr "" -#: ../../../c-api/exceptions.rst:1165 +#: ../../../c-api/exceptions.rst:1170 msgid ":exc:`NotADirectoryError`" msgstr "" -#: ../../../c-api/exceptions.rst:1167 +#: ../../../c-api/exceptions.rst:1172 msgid ":exc:`NotImplementedError`" msgstr "" -#: ../../../c-api/exceptions.rst:1169 ../../../c-api/exceptions.rst:1252 -#: ../../../c-api/exceptions.rst:1255 ../../../c-api/exceptions.rst:1258 +#: ../../../c-api/exceptions.rst:1174 ../../../c-api/exceptions.rst:1257 +#: ../../../c-api/exceptions.rst:1260 ../../../c-api/exceptions.rst:1263 msgid ":exc:`OSError`" msgstr "" -#: ../../../c-api/exceptions.rst:1171 +#: ../../../c-api/exceptions.rst:1176 msgid ":exc:`OverflowError`" msgstr "" -#: ../../../c-api/exceptions.rst:1173 +#: ../../../c-api/exceptions.rst:1178 msgid ":exc:`PermissionError`" msgstr "" -#: ../../../c-api/exceptions.rst:1175 +#: ../../../c-api/exceptions.rst:1180 msgid ":exc:`ProcessLookupError`" msgstr "" -#: ../../../c-api/exceptions.rst:1177 +#: ../../../c-api/exceptions.rst:1182 msgid ":exc:`PythonFinalizationError`" msgstr "" -#: ../../../c-api/exceptions.rst:1179 +#: ../../../c-api/exceptions.rst:1184 msgid ":exc:`RecursionError`" msgstr "" -#: ../../../c-api/exceptions.rst:1181 +#: ../../../c-api/exceptions.rst:1186 msgid ":exc:`ReferenceError`" msgstr "" -#: ../../../c-api/exceptions.rst:1183 +#: ../../../c-api/exceptions.rst:1188 msgid ":exc:`RuntimeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1185 +#: ../../../c-api/exceptions.rst:1190 msgid ":exc:`StopAsyncIteration`" msgstr "" -#: ../../../c-api/exceptions.rst:1187 +#: ../../../c-api/exceptions.rst:1192 msgid ":exc:`StopIteration`" msgstr "" -#: ../../../c-api/exceptions.rst:1189 +#: ../../../c-api/exceptions.rst:1194 msgid ":exc:`SyntaxError`" msgstr "" -#: ../../../c-api/exceptions.rst:1191 +#: ../../../c-api/exceptions.rst:1196 msgid ":exc:`SystemError`" msgstr "" -#: ../../../c-api/exceptions.rst:1193 +#: ../../../c-api/exceptions.rst:1198 msgid ":exc:`SystemExit`" msgstr "" -#: ../../../c-api/exceptions.rst:1195 +#: ../../../c-api/exceptions.rst:1200 msgid ":exc:`TabError`" msgstr "" -#: ../../../c-api/exceptions.rst:1197 +#: ../../../c-api/exceptions.rst:1202 msgid ":exc:`TimeoutError`" msgstr "" -#: ../../../c-api/exceptions.rst:1199 +#: ../../../c-api/exceptions.rst:1204 msgid ":exc:`TypeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1201 +#: ../../../c-api/exceptions.rst:1206 msgid ":exc:`UnboundLocalError`" msgstr "" -#: ../../../c-api/exceptions.rst:1203 +#: ../../../c-api/exceptions.rst:1208 msgid ":exc:`UnicodeDecodeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1205 +#: ../../../c-api/exceptions.rst:1210 msgid ":exc:`UnicodeEncodeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1207 +#: ../../../c-api/exceptions.rst:1212 msgid ":exc:`UnicodeError`" msgstr "" -#: ../../../c-api/exceptions.rst:1209 +#: ../../../c-api/exceptions.rst:1214 msgid ":exc:`UnicodeTranslateError`" msgstr "" -#: ../../../c-api/exceptions.rst:1211 +#: ../../../c-api/exceptions.rst:1216 msgid ":exc:`ValueError`" msgstr "" -#: ../../../c-api/exceptions.rst:1213 +#: ../../../c-api/exceptions.rst:1218 msgid ":exc:`ZeroDivisionError`" msgstr "" -#: ../../../c-api/exceptions.rst:1215 +#: ../../../c-api/exceptions.rst:1220 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1405,141 +1413,141 @@ msgid "" "`PyExc_TimeoutError` were introduced following :pep:`3151`." msgstr "" -#: ../../../c-api/exceptions.rst:1225 +#: ../../../c-api/exceptions.rst:1230 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr "" -#: ../../../c-api/exceptions.rst:1228 +#: ../../../c-api/exceptions.rst:1233 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr "" -#: ../../../c-api/exceptions.rst:1231 +#: ../../../c-api/exceptions.rst:1236 msgid ":c:data:`PyExc_BaseExceptionGroup`." msgstr "" -#: ../../../c-api/exceptions.rst:1236 +#: ../../../c-api/exceptions.rst:1241 msgid "OSError aliases" msgstr "" -#: ../../../c-api/exceptions.rst:1238 +#: ../../../c-api/exceptions.rst:1243 msgid "The following are a compatibility aliases to :c:data:`PyExc_OSError`." msgstr "" -#: ../../../c-api/exceptions.rst:1240 +#: ../../../c-api/exceptions.rst:1245 msgid "These aliases used to be separate exception types." msgstr "" -#: ../../../c-api/exceptions.rst:1250 +#: ../../../c-api/exceptions.rst:1255 msgid "Notes" msgstr "" -#: ../../../c-api/exceptions.rst:1259 +#: ../../../c-api/exceptions.rst:1264 msgid "[win]_" msgstr "" -#: ../../../c-api/exceptions.rst:1261 +#: ../../../c-api/exceptions.rst:1266 msgid "Notes:" msgstr "" -#: ../../../c-api/exceptions.rst:1264 +#: ../../../c-api/exceptions.rst:1269 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:1271 +#: ../../../c-api/exceptions.rst:1276 msgid "Warning types" msgstr "" -#: ../../../c-api/exceptions.rst:1281 +#: ../../../c-api/exceptions.rst:1286 msgid ":exc:`Warning`" msgstr "" -#: ../../../c-api/exceptions.rst:1283 +#: ../../../c-api/exceptions.rst:1288 msgid ":exc:`BytesWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1285 +#: ../../../c-api/exceptions.rst:1290 msgid ":exc:`DeprecationWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1287 +#: ../../../c-api/exceptions.rst:1292 msgid ":exc:`EncodingWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1289 +#: ../../../c-api/exceptions.rst:1294 msgid ":exc:`FutureWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1291 +#: ../../../c-api/exceptions.rst:1296 msgid ":exc:`ImportWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1293 +#: ../../../c-api/exceptions.rst:1298 msgid ":exc:`PendingDeprecationWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1295 +#: ../../../c-api/exceptions.rst:1300 msgid ":exc:`ResourceWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1297 +#: ../../../c-api/exceptions.rst:1302 msgid ":exc:`RuntimeWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1299 +#: ../../../c-api/exceptions.rst:1304 msgid ":exc:`SyntaxWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1301 +#: ../../../c-api/exceptions.rst:1306 msgid ":exc:`UnicodeWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1303 +#: ../../../c-api/exceptions.rst:1308 msgid ":exc:`UserWarning`" msgstr "" -#: ../../../c-api/exceptions.rst:1305 +#: ../../../c-api/exceptions.rst:1310 msgid ":c:data:`PyExc_ResourceWarning`." msgstr "" -#: ../../../c-api/exceptions.rst:1308 +#: ../../../c-api/exceptions.rst:1313 msgid ":c:data:`PyExc_EncodingWarning`." msgstr "" -#: ../../../c-api/exceptions.rst:1313 +#: ../../../c-api/exceptions.rst:1318 msgid "Tracebacks" msgstr "" -#: ../../../c-api/exceptions.rst:1317 +#: ../../../c-api/exceptions.rst:1322 msgid "" "Type object for traceback objects. This is available as :class:`types." "TracebackType` in the Python layer." msgstr "" -#: ../../../c-api/exceptions.rst:1323 +#: ../../../c-api/exceptions.rst:1328 msgid "" "Return true if *op* is a traceback object, false otherwise. This function " "does not account for subtypes." msgstr "" -#: ../../../c-api/exceptions.rst:1329 +#: ../../../c-api/exceptions.rst:1334 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:1332 +#: ../../../c-api/exceptions.rst:1337 msgid "Calling this function without an exception set is undefined behavior." msgstr "" -#: ../../../c-api/exceptions.rst:1334 ../../../c-api/exceptions.rst:1342 +#: ../../../c-api/exceptions.rst:1339 ../../../c-api/exceptions.rst:1347 msgid "" "This function returns ``0`` on success, and returns ``-1`` with an exception " "set on failure." msgstr "" -#: ../../../c-api/exceptions.rst:1340 +#: ../../../c-api/exceptions.rst:1345 msgid "Write the traceback *tb* into the file *f*." msgstr "" @@ -1547,21 +1555,21 @@ msgstr "" msgid "strerror (C function)" msgstr "" -#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:720 -#: ../../../c-api/exceptions.rst:735 +#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:725 +#: ../../../c-api/exceptions.rst:740 msgid "module" msgstr "" -#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:720 -#: ../../../c-api/exceptions.rst:735 +#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:725 +#: ../../../c-api/exceptions.rst:740 msgid "signal" msgstr "" -#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:720 +#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:725 msgid "SIGINT (C macro)" msgstr "" -#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:720 -#: ../../../c-api/exceptions.rst:735 +#: ../../../c-api/exceptions.rst:671 ../../../c-api/exceptions.rst:725 +#: ../../../c-api/exceptions.rst:740 msgid "KeyboardInterrupt (built-in exception)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/float.pot b/main/locale/pot/LC_MESSAGES/c-api/float.pot index f0ca21fa9c5..cc38d8f28e2 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/float.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/float.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -229,8 +229,8 @@ msgstr "" #: ../../../c-api/float.rst:204 msgid "" -"Note that NaNs type may not be preserved on IEEE platforms (signaling NaN " -"become quiet NaN), for example on x86 systems in 32-bit mode." +"Note that NaN type may not be preserved on IEEE platforms (signaling NaNs " +"become quiet NaNs), for example on x86 systems in 32-bit mode." msgstr "" #: ../../../c-api/float.rst:207 @@ -249,8 +249,8 @@ 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:" +"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*). 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 "" @@ -261,35 +261,23 @@ msgid "" "most likely :exc:`OverflowError`)." msgstr "" -#: ../../../c-api/float.rst:227 -msgid "There are two problems on non-IEEE platforms:" -msgstr "" - #: ../../../c-api/float.rst:229 -msgid "What this does is undefined if *x* is a NaN or infinity." -msgstr "" - -#: ../../../c-api/float.rst:230 -msgid "``-0.0`` and ``+0.0`` produce the same bytes string." -msgstr "" - -#: ../../../c-api/float.rst:234 msgid "Pack a C double as the IEEE 754 binary16 half-precision format." msgstr "" -#: ../../../c-api/float.rst:238 +#: ../../../c-api/float.rst:233 msgid "Pack a C double as the IEEE 754 binary32 single precision format." msgstr "" -#: ../../../c-api/float.rst:242 +#: ../../../c-api/float.rst:237 msgid "Pack a C double as the IEEE 754 binary64 double precision format." msgstr "" -#: ../../../c-api/float.rst:246 +#: ../../../c-api/float.rst:241 msgid "Unpack functions" msgstr "" -#: ../../../c-api/float.rst:248 +#: ../../../c-api/float.rst:243 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 " @@ -299,28 +287,22 @@ msgid "" "processor, or ``0`` on little endian processor." msgstr "" -#: ../../../c-api/float.rst:255 +#: ../../../c-api/float.rst:250 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 "" -#: ../../../c-api/float.rst:259 -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:264 +#: ../../../c-api/float.rst:256 msgid "Unpack the IEEE 754 binary16 half-precision format as a C double." msgstr "" -#: ../../../c-api/float.rst:268 +#: ../../../c-api/float.rst:260 msgid "Unpack the IEEE 754 binary32 single precision format as a C double." msgstr "" -#: ../../../c-api/float.rst:272 +#: ../../../c-api/float.rst:264 msgid "Unpack the IEEE 754 binary64 double precision format as a C double." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/init_config.pot b/main/locale/pot/LC_MESSAGES/c-api/init_config.pot index 1cf7972be09..2f6e69f2296 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/init_config.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/init_config.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3151,22 +3151,116 @@ msgstr "" msgid "See also :c:member:`PyConfig.orig_argv` member." msgstr "" -#: ../../../c-api/init_config.rst:2303 -msgid "Delaying main module execution" +#: ../../../c-api/init_config.rst:2304 +msgid "Multi-Phase Initialization Private Provisional API" msgstr "" -#: ../../../c-api/init_config.rst:2305 +#: ../../../c-api/init_config.rst:2306 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:2308 +#: ../../../c-api/init_config.rst:2309 +msgid "\"Core\" initialization phase, \"bare minimum Python\":" +msgstr "" + +#: ../../../c-api/init_config.rst:2311 +msgid "Builtin types;" +msgstr "" + +#: ../../../c-api/init_config.rst:2312 +msgid "Builtin exceptions;" +msgstr "" + +#: ../../../c-api/init_config.rst:2313 +msgid "Builtin and frozen modules;" +msgstr "" + +#: ../../../c-api/init_config.rst:2314 +msgid "" +"The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` " +"doesn't exist yet)." +msgstr "" + +#: ../../../c-api/init_config.rst:2317 +msgid "\"Main\" initialization phase, Python is fully initialized:" +msgstr "" + +#: ../../../c-api/init_config.rst:2319 +msgid "Install and configure :mod:`importlib`;" +msgstr "" + +#: ../../../c-api/init_config.rst:2320 +msgid "Apply the :ref:`Path Configuration `;" +msgstr "" + +#: ../../../c-api/init_config.rst:2321 +msgid "Install signal handlers;" +msgstr "" + +#: ../../../c-api/init_config.rst:2322 +msgid "" +"Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and :" +"data:`sys.path`);" +msgstr "" + +#: ../../../c-api/init_config.rst:2324 +msgid "" +"Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" +msgstr "" + +#: ../../../c-api/init_config.rst:2325 +msgid "Import the :mod:`site` module;" +msgstr "" + +#: ../../../c-api/init_config.rst:2326 +msgid "etc." +msgstr "" + +#: ../../../c-api/init_config.rst:2328 +msgid "Private provisional API:" +msgstr "" + +#: ../../../c-api/init_config.rst:2332 +msgid "" +"If set to ``0``, :c:func:`Py_InitializeFromConfig` stops at the \"Core\" " +"initialization phase." +msgstr "" + +#: ../../../c-api/init_config.rst:2337 +msgid "" +"Move to the \"Main\" initialization phase, finish the Python initialization." +msgstr "" + +#: ../../../c-api/init_config.rst:2339 +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:2345 +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:2349 +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:2354 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." +"Example running Python code between \"Core\" and \"Main\" initialization " +"phases::" msgstr "" #: ../../../c-api/init_config.rst:1179 diff --git a/main/locale/pot/LC_MESSAGES/c-api/interp-lifecycle.pot b/main/locale/pot/LC_MESSAGES/c-api/interp-lifecycle.pot index b7d0b7a14e2..b284df7a33c 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/interp-lifecycle.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/interp-lifecycle.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/main/locale/pot/LC_MESSAGES/c-api/memory.pot b/main/locale/pot/LC_MESSAGES/c-api/memory.pot index e587d649d06..730e80be682 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/memory.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/memory.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -191,8 +191,8 @@ msgid "" "requesting zero bytes." msgstr "" -#: ../../../c-api/memory.rst:150 ../../../c-api/memory.rst:220 -#: ../../../c-api/memory.rst:351 +#: ../../../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." @@ -205,8 +205,8 @@ msgid "" "have been initialized in any way." msgstr "" -#: ../../../c-api/memory.rst:160 ../../../c-api/memory.rst:230 -#: ../../../c-api/memory.rst:361 +#: ../../../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 " @@ -220,8 +220,8 @@ msgid "" "called instead." msgstr "" -#: ../../../c-api/memory.rst:173 ../../../c-api/memory.rst:243 -#: ../../../c-api/memory.rst:374 +#: ../../../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." @@ -255,8 +255,8 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: ../../../c-api/memory.rst:195 ../../../c-api/memory.rst:264 -#: ../../../c-api/memory.rst:395 +#: ../../../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 "" @@ -264,7 +264,7 @@ msgstr "" msgid "Memory Interface" msgstr "" -#: ../../../c-api/memory.rst:203 ../../../c-api/memory.rst:332 +#: ../../../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 " @@ -273,54 +273,62 @@ 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:212 ../../../c-api/memory.rst:347 +#: ../../../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:216 +#: ../../../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:234 +#: ../../../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:246 +#: ../../../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:250 +#: ../../../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:253 +#: ../../../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:259 +#: ../../../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:" @@ -328,20 +336,20 @@ msgid "" "undefined behavior occurs." msgstr "" -#: ../../../c-api/memory.rst:266 +#: ../../../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:272 +#: ../../../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:279 +#: ../../../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* " @@ -349,67 +357,67 @@ msgid "" "failure." msgstr "" -#: ../../../c-api/memory.rst:284 +#: ../../../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:290 +#: ../../../c-api/memory.rst:298 msgid "Same as :c:func:`PyMem_Free`." msgstr "" -#: ../../../c-api/memory.rst:294 +#: ../../../c-api/memory.rst:302 msgid "Deprecated aliases" msgstr "" -#: ../../../c-api/memory.rst:296 +#: ../../../c-api/memory.rst:304 msgid "" "These are :term:`soft deprecated` aliases to existing functions and macros. " "They exist solely for backwards compatibility." msgstr "" -#: ../../../c-api/memory.rst:303 +#: ../../../c-api/memory.rst:311 msgid "Deprecated alias" msgstr "" -#: ../../../c-api/memory.rst:304 +#: ../../../c-api/memory.rst:312 msgid "Corresponding function or macro" msgstr "" -#: ../../../c-api/memory.rst:306 +#: ../../../c-api/memory.rst:314 msgid ":c:func:`PyMem_Malloc`" msgstr "" -#: ../../../c-api/memory.rst:308 +#: ../../../c-api/memory.rst:316 msgid ":c:macro:`PyMem_New`" msgstr "" -#: ../../../c-api/memory.rst:310 ../../../c-api/memory.rst:496 +#: ../../../c-api/memory.rst:318 ../../../c-api/memory.rst:507 msgid ":c:func:`PyMem_Realloc`" msgstr "" -#: ../../../c-api/memory.rst:312 +#: ../../../c-api/memory.rst:320 msgid ":c:macro:`PyMem_Resize`" msgstr "" -#: ../../../c-api/memory.rst:314 ../../../c-api/memory.rst:316 -#: ../../../c-api/memory.rst:498 +#: ../../../c-api/memory.rst:322 ../../../c-api/memory.rst:324 +#: ../../../c-api/memory.rst:509 msgid ":c:func:`PyMem_Free`" msgstr "" -#: ../../../c-api/memory.rst:320 +#: ../../../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:330 +#: ../../../c-api/memory.rst:338 msgid "Object allocators" msgstr "" -#: ../../../c-api/memory.rst:337 +#: ../../../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 " @@ -417,47 +425,49 @@ msgid "" "Memory Allocators ` section." msgstr "" -#: ../../../c-api/memory.rst:342 +#: ../../../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:354 +#: ../../../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:365 +#: ../../../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:377 +#: ../../../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:381 +#: ../../../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:384 +#: ../../../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:390 +#: ../../../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:" @@ -465,309 +475,331 @@ msgid "" "called before, undefined behavior occurs." msgstr "" -#: ../../../c-api/memory.rst:397 +#: ../../../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:400 +#: ../../../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:405 +#: ../../../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:407 ../../../c-api/memory.rst:504 +#: ../../../c-api/memory.rst:417 ../../../c-api/memory.rst:515 msgid ":c:func:`PyObject_Malloc`" msgstr "" -#: ../../../c-api/memory.rst:408 ../../../c-api/memory.rst:505 +#: ../../../c-api/memory.rst:418 ../../../c-api/memory.rst:516 msgid ":c:func:`PyObject_Realloc`" msgstr "" -#: ../../../c-api/memory.rst:409 ../../../c-api/memory.rst:506 +#: ../../../c-api/memory.rst:419 ../../../c-api/memory.rst:517 msgid ":c:func:`PyObject_Calloc`" msgstr "" -#: ../../../c-api/memory.rst:410 +#: ../../../c-api/memory.rst:420 msgid ":c:macro:`PyObject_New`" msgstr "" -#: ../../../c-api/memory.rst:411 +#: ../../../c-api/memory.rst:421 msgid ":c:macro:`PyObject_NewVar`" msgstr "" -#: ../../../c-api/memory.rst:412 +#: ../../../c-api/memory.rst:422 msgid ":c:func:`PyType_GenericAlloc`" msgstr "" -#: ../../../c-api/memory.rst:413 +#: ../../../c-api/memory.rst:423 msgid ":c:member:`~PyTypeObject.tp_free`" msgstr "" -#: ../../../c-api/memory.rst:419 +#: ../../../c-api/memory.rst:429 msgid "Default Memory Allocators" msgstr "" -#: ../../../c-api/memory.rst:421 +#: ../../../c-api/memory.rst:431 msgid "Default memory allocators:" msgstr "" -#: ../../../c-api/memory.rst:424 +#: ../../../c-api/memory.rst:434 msgid "Configuration" msgstr "" -#: ../../../c-api/memory.rst:424 +#: ../../../c-api/memory.rst:434 msgid "Name" msgstr "" -#: ../../../c-api/memory.rst:424 +#: ../../../c-api/memory.rst:434 msgid "PyMem_RawMalloc" msgstr "" -#: ../../../c-api/memory.rst:424 +#: ../../../c-api/memory.rst:434 msgid "PyMem_Malloc" msgstr "" -#: ../../../c-api/memory.rst:424 +#: ../../../c-api/memory.rst:434 msgid "PyObject_Malloc" msgstr "" -#: ../../../c-api/memory.rst:426 +#: ../../../c-api/memory.rst:436 msgid "Release build" msgstr "" -#: ../../../c-api/memory.rst:426 +#: ../../../c-api/memory.rst:436 msgid "``\"pymalloc\"``" msgstr "" -#: ../../../c-api/memory.rst:426 ../../../c-api/memory.rst:428 +#: ../../../c-api/memory.rst:436 ../../../c-api/memory.rst:438 msgid "``malloc``" msgstr "" -#: ../../../c-api/memory.rst:426 +#: ../../../c-api/memory.rst:436 msgid "``pymalloc``" msgstr "" -#: ../../../c-api/memory.rst:427 +#: ../../../c-api/memory.rst:437 msgid "Debug build" msgstr "" -#: ../../../c-api/memory.rst:427 +#: ../../../c-api/memory.rst:437 msgid "``\"pymalloc_debug\"``" msgstr "" -#: ../../../c-api/memory.rst:427 ../../../c-api/memory.rst:429 +#: ../../../c-api/memory.rst:437 ../../../c-api/memory.rst:439 msgid "``malloc`` + debug" msgstr "" -#: ../../../c-api/memory.rst:427 +#: ../../../c-api/memory.rst:437 msgid "``pymalloc`` + debug" msgstr "" -#: ../../../c-api/memory.rst:428 +#: ../../../c-api/memory.rst:438 msgid "Release build, without pymalloc" msgstr "" -#: ../../../c-api/memory.rst:428 +#: ../../../c-api/memory.rst:438 msgid "``\"malloc\"``" msgstr "" -#: ../../../c-api/memory.rst:429 +#: ../../../c-api/memory.rst:439 msgid "Debug build, without pymalloc" msgstr "" -#: ../../../c-api/memory.rst:429 +#: ../../../c-api/memory.rst:439 msgid "``\"malloc_debug\"``" msgstr "" -#: ../../../c-api/memory.rst:432 +#: ../../../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:434 +#: ../../../c-api/memory.rst:446 msgid "Name: value for :envvar:`PYTHONMALLOC` environment variable." msgstr "" -#: ../../../c-api/memory.rst:435 +#: ../../../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:437 +#: ../../../c-api/memory.rst:449 msgid "``pymalloc``: :ref:`pymalloc memory allocator `." msgstr "" -#: ../../../c-api/memory.rst:438 -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:440 +#: ../../../c-api/memory.rst:451 msgid "" "\"+ debug\": with :ref:`debug hooks on the Python memory allocators `." msgstr "" -#: ../../../c-api/memory.rst:442 +#: ../../../c-api/memory.rst:453 msgid "\"Debug build\": :ref:`Python build in debug mode `." msgstr "" -#: ../../../c-api/memory.rst:447 +#: ../../../c-api/memory.rst:458 msgid "Customize Memory Allocators" msgstr "" -#: ../../../c-api/memory.rst:453 +#: ../../../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:457 ../../../c-api/memory.rst:712 +#: ../../../c-api/memory.rst:468 ../../../c-api/memory.rst:723 msgid "Field" msgstr "" -#: ../../../c-api/memory.rst:457 ../../../c-api/memory.rst:712 +#: ../../../c-api/memory.rst:468 ../../../c-api/memory.rst:723 msgid "Meaning" msgstr "" -#: ../../../c-api/memory.rst:459 ../../../c-api/memory.rst:714 +#: ../../../c-api/memory.rst:470 ../../../c-api/memory.rst:725 msgid "``void *ctx``" msgstr "" -#: ../../../c-api/memory.rst:459 ../../../c-api/memory.rst:714 +#: ../../../c-api/memory.rst:470 ../../../c-api/memory.rst:725 msgid "user context passed as first argument" msgstr "" -#: ../../../c-api/memory.rst:461 +#: ../../../c-api/memory.rst:472 msgid "``void* malloc(void *ctx, size_t size)``" msgstr "" -#: ../../../c-api/memory.rst:461 +#: ../../../c-api/memory.rst:472 msgid "allocate a memory block" msgstr "" -#: ../../../c-api/memory.rst:463 +#: ../../../c-api/memory.rst:474 msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``" msgstr "" -#: ../../../c-api/memory.rst:463 +#: ../../../c-api/memory.rst:474 msgid "allocate a memory block initialized with zeros" msgstr "" -#: ../../../c-api/memory.rst:466 +#: ../../../c-api/memory.rst:477 msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``" msgstr "" -#: ../../../c-api/memory.rst:466 +#: ../../../c-api/memory.rst:477 msgid "allocate or resize a memory block" msgstr "" -#: ../../../c-api/memory.rst:468 +#: ../../../c-api/memory.rst:479 msgid "``void free(void *ctx, void *ptr)``" msgstr "" -#: ../../../c-api/memory.rst:468 +#: ../../../c-api/memory.rst:479 msgid "free a memory block" msgstr "" -#: ../../../c-api/memory.rst:471 +#: ../../../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:478 +#: ../../../c-api/memory.rst:489 msgid "Enum used to identify an allocator domain. Domains:" msgstr "" -#: ../../../c-api/memory.rst:484 ../../../c-api/memory.rst:493 -#: ../../../c-api/memory.rst:502 +#: ../../../c-api/memory.rst:495 ../../../c-api/memory.rst:504 +#: ../../../c-api/memory.rst:513 msgid "Functions:" msgstr "" -#: ../../../c-api/memory.rst:486 +#: ../../../c-api/memory.rst:497 msgid ":c:func:`PyMem_RawMalloc`" msgstr "" -#: ../../../c-api/memory.rst:487 +#: ../../../c-api/memory.rst:498 msgid ":c:func:`PyMem_RawRealloc`" msgstr "" -#: ../../../c-api/memory.rst:488 +#: ../../../c-api/memory.rst:499 msgid ":c:func:`PyMem_RawCalloc`" msgstr "" -#: ../../../c-api/memory.rst:489 +#: ../../../c-api/memory.rst:500 msgid ":c:func:`PyMem_RawFree`" msgstr "" -#: ../../../c-api/memory.rst:495 +#: ../../../c-api/memory.rst:506 msgid ":c:func:`PyMem_Malloc`," msgstr "" -#: ../../../c-api/memory.rst:497 +#: ../../../c-api/memory.rst:508 msgid ":c:func:`PyMem_Calloc`" msgstr "" -#: ../../../c-api/memory.rst:507 +#: ../../../c-api/memory.rst:518 msgid ":c:func:`PyObject_Free`" msgstr "" -#: ../../../c-api/memory.rst:511 +#: ../../../c-api/memory.rst:522 msgid "Get the memory block allocator of the specified domain." msgstr "" -#: ../../../c-api/memory.rst:516 +#: ../../../c-api/memory.rst:527 msgid "Set the memory block allocator of the specified domain." msgstr "" -#: ../../../c-api/memory.rst:518 +#: ../../../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:521 +#: ../../../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:525 +#: ../../../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:529 +#: ../../../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:533 +#: ../../../c-api/memory.rst:544 msgid "" "See also :c:member:`PyPreConfig.allocator` and :ref:`Preinitialize Python " "with PyPreConfig `." msgstr "" -#: ../../../c-api/memory.rst:538 +#: ../../../c-api/memory.rst:549 msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" msgstr "" -#: ../../../c-api/memory.rst:540 +#: ../../../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 " @@ -777,7 +809,7 @@ msgid "" "allocator domains ` for more information." msgstr "" -#: ../../../c-api/memory.rst:548 +#: ../../../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 " @@ -785,21 +817,21 @@ msgid "" "arbitrary one is **not supported**." msgstr "" -#: ../../../c-api/memory.rst:553 +#: ../../../c-api/memory.rst:564 msgid "All allocators must be thread-safe." msgstr "" -#: ../../../c-api/memory.rst:559 +#: ../../../c-api/memory.rst:570 msgid "" "Setup :ref:`debug hooks in the Python memory allocators ` " "to detect memory errors." msgstr "" -#: ../../../c-api/memory.rst:566 +#: ../../../c-api/memory.rst:577 msgid "Debug hooks on the Python memory allocators" msgstr "" -#: ../../../c-api/memory.rst:568 +#: ../../../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 " @@ -807,19 +839,19 @@ msgid "" "allocators to detect memory errors." msgstr "" -#: ../../../c-api/memory.rst:573 +#: ../../../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:576 +#: ../../../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:579 +#: ../../../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 " @@ -829,25 +861,25 @@ msgid "" "these bytes are unlikely to be valid addresses, floats, or ASCII strings." msgstr "" -#: ../../../c-api/memory.rst:586 +#: ../../../c-api/memory.rst:597 msgid "Runtime checks:" msgstr "" -#: ../../../c-api/memory.rst:588 +#: ../../../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:590 +#: ../../../c-api/memory.rst:601 msgid "Detect write before the start of the buffer (buffer underflow)." msgstr "" -#: ../../../c-api/memory.rst:591 +#: ../../../c-api/memory.rst:602 msgid "Detect write after the end of the buffer (buffer overflow)." msgstr "" -#: ../../../c-api/memory.rst:592 +#: ../../../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`) " @@ -855,7 +887,7 @@ msgid "" "called." msgstr "" -#: ../../../c-api/memory.rst:597 +#: ../../../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 " @@ -863,7 +895,7 @@ msgid "" "memory block was traced." msgstr "" -#: ../../../c-api/memory.rst:602 +#: ../../../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 " @@ -873,49 +905,49 @@ msgid "" "from a Python slice):" msgstr "" -#: ../../../c-api/memory.rst:608 +#: ../../../c-api/memory.rst:619 msgid "``p[-2*S:-S]``" msgstr "" -#: ../../../c-api/memory.rst:609 +#: ../../../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:611 +#: ../../../c-api/memory.rst:622 msgid "``p[-S]``" msgstr "" -#: ../../../c-api/memory.rst:612 +#: ../../../c-api/memory.rst:623 msgid "API identifier (ASCII character):" msgstr "" -#: ../../../c-api/memory.rst:614 +#: ../../../c-api/memory.rst:625 msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`." msgstr "" -#: ../../../c-api/memory.rst:615 +#: ../../../c-api/memory.rst:626 msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`." msgstr "" -#: ../../../c-api/memory.rst:616 +#: ../../../c-api/memory.rst:627 msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." msgstr "" -#: ../../../c-api/memory.rst:618 +#: ../../../c-api/memory.rst:629 msgid "``p[-S+1:0]``" msgstr "" -#: ../../../c-api/memory.rst:619 +#: ../../../c-api/memory.rst:630 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch under- writes and reads." msgstr "" -#: ../../../c-api/memory.rst:621 +#: ../../../c-api/memory.rst:632 msgid "``p[0:N]``" msgstr "" -#: ../../../c-api/memory.rst:622 +#: ../../../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 " @@ -926,25 +958,25 @@ msgid "" "bytes are also filled with PYMEM_DEADBYTE." msgstr "" -#: ../../../c-api/memory.rst:630 +#: ../../../c-api/memory.rst:641 msgid "``p[N:N+S]``" msgstr "" -#: ../../../c-api/memory.rst:631 +#: ../../../c-api/memory.rst:642 msgid "Copies of PYMEM_FORBIDDENBYTE. Used to catch over- writes and reads." msgstr "" -#: ../../../c-api/memory.rst:633 +#: ../../../c-api/memory.rst:644 msgid "``p[N+S:N+2*S]``" msgstr "" -#: ../../../c-api/memory.rst:634 +#: ../../../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:637 +#: ../../../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 " @@ -954,7 +986,7 @@ msgid "" "number is incremented, and exists so you can set such a breakpoint easily." msgstr "" -#: ../../../c-api/memory.rst:644 +#: ../../../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, " @@ -967,7 +999,7 @@ msgid "" "getting used)." msgstr "" -#: ../../../c-api/memory.rst:653 +#: ../../../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:" @@ -977,7 +1009,7 @@ msgid "" "domains are called." msgstr "" -#: ../../../c-api/memory.rst:661 +#: ../../../c-api/memory.rst:672 msgid "" "Byte patterns ``0xCB`` (``PYMEM_CLEANBYTE``), ``0xDB`` (``PYMEM_DEADBYTE``) " "and ``0xFB`` (``PYMEM_FORBIDDENBYTE``) have been replaced with ``0xCD``, " @@ -985,11 +1017,11 @@ msgid "" "``malloc()`` and ``free()``." msgstr "" -#: ../../../c-api/memory.rst:671 +#: ../../../c-api/memory.rst:682 msgid "The pymalloc allocator" msgstr "" -#: ../../../c-api/memory.rst:673 +#: ../../../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 " @@ -1003,133 +1035,159 @@ msgid "" "512 bytes." msgstr "" -#: ../../../c-api/memory.rst:683 +#: ../../../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:687 +#: ../../../c-api/memory.rst:698 msgid "The arena allocator uses the following functions:" msgstr "" -#: ../../../c-api/memory.rst:689 +#: ../../../c-api/memory.rst:700 msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows," msgstr "" -#: ../../../c-api/memory.rst:690 +#: ../../../c-api/memory.rst:701 msgid ":c:func:`!mmap` and :c:func:`!munmap` if available," msgstr "" -#: ../../../c-api/memory.rst:691 +#: ../../../c-api/memory.rst:702 msgid ":c:func:`malloc` and :c:func:`free` otherwise." msgstr "" -#: ../../../c-api/memory.rst:693 +#: ../../../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:697 +#: ../../../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:702 +#: ../../../c-api/memory.rst:713 msgid "Customize pymalloc Arena Allocator" msgstr "" -#: ../../../c-api/memory.rst:708 +#: ../../../c-api/memory.rst:719 msgid "" "Structure used to describe an arena allocator. The structure has three " "fields:" msgstr "" -#: ../../../c-api/memory.rst:716 +#: ../../../c-api/memory.rst:727 msgid "``void* alloc(void *ctx, size_t size)``" msgstr "" -#: ../../../c-api/memory.rst:716 +#: ../../../c-api/memory.rst:727 msgid "allocate an arena of size bytes" msgstr "" -#: ../../../c-api/memory.rst:718 +#: ../../../c-api/memory.rst:729 msgid "``void free(void *ctx, void *ptr, size_t size)``" msgstr "" -#: ../../../c-api/memory.rst:718 +#: ../../../c-api/memory.rst:729 msgid "free an arena" msgstr "" -#: ../../../c-api/memory.rst:723 +#: ../../../c-api/memory.rst:734 msgid "Get the arena allocator." msgstr "" -#: ../../../c-api/memory.rst:727 +#: ../../../c-api/memory.rst:738 msgid "Set the arena allocator." msgstr "" -#: ../../../c-api/memory.rst:732 +#: ../../../c-api/memory.rst:743 msgid "The mimalloc allocator" msgstr "" -#: ../../../c-api/memory.rst:736 +#: ../../../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 "" +"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 "" -"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.\"" +"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:741 +#: ../../../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:747 +#: ../../../c-api/memory.rst:776 msgid "Track an allocated memory block in the :mod:`tracemalloc` module." msgstr "" -#: ../../../c-api/memory.rst:749 +#: ../../../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:752 +#: ../../../c-api/memory.rst:781 msgid "If memory block is already tracked, update the existing trace." msgstr "" -#: ../../../c-api/memory.rst:756 +#: ../../../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:759 +#: ../../../c-api/memory.rst:788 msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``." msgstr "" -#: ../../../c-api/memory.rst:765 +#: ../../../c-api/memory.rst:794 msgid "Examples" msgstr "" -#: ../../../c-api/memory.rst:767 +#: ../../../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:780 +#: ../../../c-api/memory.rst:809 msgid "The same code using the type-oriented function set::" msgstr "" -#: ../../../c-api/memory.rst:792 +#: ../../../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 " @@ -1139,14 +1197,14 @@ msgid "" "different allocators operating on different heaps. ::" msgstr "" -#: ../../../c-api/memory.rst:807 +#: ../../../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:811 +#: ../../../c-api/memory.rst:840 msgid "" "These will be explained in the next chapter on defining and implementing new " "object types in C." diff --git a/main/locale/pot/LC_MESSAGES/c-api/profiling.pot b/main/locale/pot/LC_MESSAGES/c-api/profiling.pot index 9bbf4b93b0b..de61310654a 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/profiling.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/profiling.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/main/locale/pot/LC_MESSAGES/c-api/structures.pot b/main/locale/pot/LC_MESSAGES/c-api/structures.pot index 2d821edfe83..6f1b6dcf52c 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/structures.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/structures.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -78,31 +78,47 @@ msgid "" "and :c:func:`Py_SET_TYPE` instead." msgstr "" -#: ../../../c-api/structures.rst:54 +#: ../../../c-api/structures.rst:53 +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:56 +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:67 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:58 +#: ../../../c-api/structures.rst:71 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:64 +#: ../../../c-api/structures.rst:77 msgid "" "A size field, whose contents should be considered an object's internal " "implementation detail." msgstr "" -#: ../../../c-api/structures.rst:67 +#: ../../../c-api/structures.rst:80 msgid "Do not use this field directly; use :c:macro:`Py_SIZE` instead." msgstr "" -#: ../../../c-api/structures.rst:69 +#: ../../../c-api/structures.rst:82 msgid "" "Object creation functions such as :c:func:`PyObject_NewVar` will generally " "set this field to the requested size (number of items). After creation, " @@ -110,140 +126,140 @@ msgid "" "`Py_SET_SIZE`." msgstr "" -#: ../../../c-api/structures.rst:74 +#: ../../../c-api/structures.rst:87 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:81 +#: ../../../c-api/structures.rst:94 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:86 +#: ../../../c-api/structures.rst:99 msgid "See documentation of :c:type:`PyObject` above." msgstr "" -#: ../../../c-api/structures.rst:91 +#: ../../../c-api/structures.rst:104 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:97 +#: ../../../c-api/structures.rst:110 msgid "See documentation of :c:type:`PyVarObject` above." msgstr "" -#: ../../../c-api/structures.rst:102 +#: ../../../c-api/structures.rst:115 msgid "" "The base class of all other objects, the same as :class:`object` in Python." msgstr "" -#: ../../../c-api/structures.rst:107 +#: ../../../c-api/structures.rst:120 msgid "" "Test if the *x* object is the *y* object, the same as ``x is y`` in Python." msgstr "" -#: ../../../c-api/structures.rst:114 +#: ../../../c-api/structures.rst:127 msgid "" "Test if an object is the ``None`` singleton, the same as ``x is None`` in " "Python." msgstr "" -#: ../../../c-api/structures.rst:122 +#: ../../../c-api/structures.rst:135 msgid "" "Test if an object is the ``True`` singleton, the same as ``x is True`` in " "Python." msgstr "" -#: ../../../c-api/structures.rst:130 +#: ../../../c-api/structures.rst:143 msgid "" "Test if an object is the ``False`` singleton, the same as ``x is False`` in " "Python." msgstr "" -#: ../../../c-api/structures.rst:138 +#: ../../../c-api/structures.rst:151 msgid "Get the type of the Python object *o*." msgstr "" -#: ../../../c-api/structures.rst:140 +#: ../../../c-api/structures.rst:153 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:143 +#: ../../../c-api/structures.rst:156 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:150 +#: ../../../c-api/structures.rst:163 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:158 +#: ../../../c-api/structures.rst:171 msgid "" "Set the type of object *o* to *type*, without any checking or reference " "counting." msgstr "" -#: ../../../c-api/structures.rst:161 +#: ../../../c-api/structures.rst:174 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:165 +#: ../../../c-api/structures.rst:178 msgid "" "Note that assigning an incompatible type can lead to undefined behavior." msgstr "" -#: ../../../c-api/structures.rst:167 +#: ../../../c-api/structures.rst:180 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:177 +#: ../../../c-api/structures.rst:190 msgid "Get the :c:member:`~PyVarObject.ob_size` field of *o*." msgstr "" -#: ../../../c-api/structures.rst:179 +#: ../../../c-api/structures.rst:192 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:186 +#: ../../../c-api/structures.rst:199 msgid "Set the :c:member:`~PyVarObject.ob_size` field of *o* to *size*." msgstr "" -#: ../../../c-api/structures.rst:193 +#: ../../../c-api/structures.rst:206 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:202 +#: ../../../c-api/structures.rst:215 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:211 +#: ../../../c-api/structures.rst:224 msgid "Implementing functions and methods" msgstr "" -#: ../../../c-api/structures.rst:215 +#: ../../../c-api/structures.rst:228 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 " @@ -253,64 +269,64 @@ msgid "" "reference." msgstr "" -#: ../../../c-api/structures.rst:222 +#: ../../../c-api/structures.rst:235 msgid "The function signature is::" msgstr "" -#: ../../../c-api/structures.rst:229 +#: ../../../c-api/structures.rst:242 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:240 +#: ../../../c-api/structures.rst:253 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:250 +#: ../../../c-api/structures.rst:263 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:261 +#: ../../../c-api/structures.rst:274 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:276 +#: ../../../c-api/structures.rst:289 msgid "" "Structure used to describe a method of an extension type. This structure " "has four fields:" msgstr "" -#: ../../../c-api/structures.rst:281 +#: ../../../c-api/structures.rst:294 msgid "Name of the method." msgstr "" -#: ../../../c-api/structures.rst:283 +#: ../../../c-api/structures.rst:296 msgid "A ``NULL`` *ml_name* marks the end of a :c:type:`!PyMethodDef` array." msgstr "" -#: ../../../c-api/structures.rst:287 +#: ../../../c-api/structures.rst:300 msgid "Pointer to the C implementation." msgstr "" -#: ../../../c-api/structures.rst:291 +#: ../../../c-api/structures.rst:304 msgid "Flags bits indicating how the call should be constructed." msgstr "" -#: ../../../c-api/structures.rst:295 +#: ../../../c-api/structures.rst:308 msgid "Points to the contents of the docstring." msgstr "" -#: ../../../c-api/structures.rst:297 +#: ../../../c-api/structures.rst:310 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 " @@ -320,18 +336,18 @@ msgid "" "implementation uses the specific C type of the *self* object." msgstr "" -#: ../../../c-api/structures.rst:305 +#: ../../../c-api/structures.rst:318 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:310 +#: ../../../c-api/structures.rst:323 msgid "There are these calling conventions:" msgstr "" -#: ../../../c-api/structures.rst:314 +#: ../../../c-api/structures.rst:327 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 " @@ -341,7 +357,7 @@ msgid "" "func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`." msgstr "" -#: ../../../c-api/structures.rst:324 +#: ../../../c-api/structures.rst:337 msgid "" "Can only be used in certain combinations with other flags: :ref:" "`METH_VARARGS | METH_KEYWORDS `, :ref:" @@ -350,11 +366,11 @@ msgid "" "METH_KEYWORDS>`." msgstr "" -#: ../../../c-api/structures.rst:332 +#: ../../../c-api/structures.rst:345 msgid ":c:expr:`METH_VARARGS | METH_KEYWORDS`" msgstr "" -#: ../../../c-api/structures.rst:333 +#: ../../../c-api/structures.rst:346 msgid "" "Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. " "The function expects three parameters: *self*, *args*, *kwargs* where " @@ -363,7 +379,7 @@ msgid "" "using :c:func:`PyArg_ParseTupleAndKeywords`." msgstr "" -#: ../../../c-api/structures.rst:342 +#: ../../../c-api/structures.rst:355 msgid "" "Fast calling convention supporting only positional arguments. The methods " "have the type :c:type:`PyCFunctionFast`. The first parameter is *self*, the " @@ -372,15 +388,15 @@ msgid "" "the array)." msgstr "" -#: ../../../c-api/structures.rst:352 +#: ../../../c-api/structures.rst:365 msgid "``METH_FASTCALL`` is now part of the :ref:`stable ABI `." msgstr "" -#: ../../../c-api/structures.rst:357 +#: ../../../c-api/structures.rst:370 msgid ":c:expr:`METH_FASTCALL | METH_KEYWORDS`" msgstr "" -#: ../../../c-api/structures.rst:358 +#: ../../../c-api/structures.rst:371 msgid "" "Extension of :c:macro:`METH_FASTCALL` supporting also keyword arguments, " "with methods of type :c:type:`PyCFunctionFastWithKeywords`. Keyword " @@ -392,17 +408,17 @@ msgid "" "the positional arguments." msgstr "" -#: ../../../c-api/structures.rst:373 +#: ../../../c-api/structures.rst:386 msgid "" "Can only be used in the combination with other flags: :ref:`METH_METHOD | " "METH_FASTCALL | METH_KEYWORDS `." msgstr "" -#: ../../../c-api/structures.rst:379 +#: ../../../c-api/structures.rst:392 msgid ":c:expr:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS`" msgstr "" -#: ../../../c-api/structures.rst:380 +#: ../../../c-api/structures.rst:393 msgid "" "Extension of :ref:`METH_FASTCALL | METH_KEYWORDS ` supporting the *defining class*, that is, the class that " @@ -410,14 +426,14 @@ msgid "" "``Py_TYPE(self)``." msgstr "" -#: ../../../c-api/structures.rst:385 +#: ../../../c-api/structures.rst:398 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:394 +#: ../../../c-api/structures.rst:407 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 " @@ -426,13 +442,13 @@ msgid "" "the second parameter will be ``NULL``." msgstr "" -#: ../../../c-api/structures.rst:400 +#: ../../../c-api/structures.rst:413 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:406 +#: ../../../c-api/structures.rst:419 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 " @@ -441,7 +457,7 @@ msgid "" "single argument." msgstr "" -#: ../../../c-api/structures.rst:412 +#: ../../../c-api/structures.rst:425 msgid "" "These two constants are not used to indicate the calling convention but the " "binding when used with methods of classes. These may not be used for " @@ -449,27 +465,27 @@ msgid "" "any given method." msgstr "" -#: ../../../c-api/structures.rst:422 +#: ../../../c-api/structures.rst:435 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 "" -#: ../../../c-api/structures.rst:432 +#: ../../../c-api/structures.rst:445 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 "" -#: ../../../c-api/structures.rst:436 +#: ../../../c-api/structures.rst:449 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:442 +#: ../../../c-api/structures.rst:455 msgid "" "The method will be loaded in place of existing definitions. Without " "*METH_COEXIST*, the default is to skip repeated definitions. Since slot " @@ -482,38 +498,38 @@ msgid "" "wrapper object calls." msgstr "" -#: ../../../c-api/structures.rst:455 +#: ../../../c-api/structures.rst:468 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:461 +#: ../../../c-api/structures.rst:474 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:467 +#: ../../../c-api/structures.rst:480 msgid "" "This is the same as :c:func:`PyCMethod_Check`, but does not account for " "subtypes." msgstr "" -#: ../../../c-api/structures.rst:473 +#: ../../../c-api/structures.rst:486 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:477 +#: ../../../c-api/structures.rst:490 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:481 +#: ../../../c-api/structures.rst:494 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 " @@ -521,86 +537,86 @@ msgid "" "can be set to :const:`None` or ``NULL``." msgstr "" -#: ../../../c-api/structures.rst:487 +#: ../../../c-api/structures.rst:500 msgid ":attr:`function.__module__`" msgstr "" -#: ../../../c-api/structures.rst:489 +#: ../../../c-api/structures.rst:502 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:498 +#: ../../../c-api/structures.rst:511 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:504 +#: ../../../c-api/structures.rst:517 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:510 +#: ../../../c-api/structures.rst:523 msgid "" "This is the same as :c:func:`PyCFunction_Check`, but does not account for " "subtypes." msgstr "" -#: ../../../c-api/structures.rst:516 +#: ../../../c-api/structures.rst:529 msgid "Equivalent to ``PyCMethod_New(ml, self, module, NULL)``." msgstr "" -#: ../../../c-api/structures.rst:521 +#: ../../../c-api/structures.rst:534 msgid "Equivalent to ``PyCMethod_New(ml, self, NULL, NULL)``." msgstr "" -#: ../../../c-api/structures.rst:526 +#: ../../../c-api/structures.rst:539 msgid "" "Get the function's flags on *func* as they were passed to :c:member:" "`~PyMethodDef.ml_flags`." msgstr "" -#: ../../../c-api/structures.rst:529 ../../../c-api/structures.rst:547 -#: ../../../c-api/structures.rst:567 +#: ../../../c-api/structures.rst:542 ../../../c-api/structures.rst:560 +#: ../../../c-api/structures.rst:580 msgid "" "If *func* is not a C function object, this fails with an exception. *func* " "must not be ``NULL``." msgstr "" -#: ../../../c-api/structures.rst:532 +#: ../../../c-api/structures.rst:545 msgid "" "This function returns the function's flags on success, and ``-1`` with an " "exception set on failure." msgstr "" -#: ../../../c-api/structures.rst:538 +#: ../../../c-api/structures.rst:551 msgid "" "This is the same as :c:func:`PyCFunction_GetFlags`, but without error or " "type checking." msgstr "" -#: ../../../c-api/structures.rst:544 +#: ../../../c-api/structures.rst:557 msgid "" "Get the function pointer on *func* as it was passed to :c:member:" "`~PyMethodDef.ml_meth`." msgstr "" -#: ../../../c-api/structures.rst:550 +#: ../../../c-api/structures.rst:563 msgid "" "This function returns the function pointer on success, and ``NULL`` with an " "exception set on failure." msgstr "" -#: ../../../c-api/structures.rst:556 +#: ../../../c-api/structures.rst:569 msgid "" "This is the same as :c:func:`PyCFunction_GetFunction`, but without error or " "type checking." msgstr "" -#: ../../../c-api/structures.rst:562 +#: ../../../c-api/structures.rst:575 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 " @@ -608,65 +624,65 @@ msgid "" "the resulting module object." msgstr "" -#: ../../../c-api/structures.rst:570 +#: ../../../c-api/structures.rst:583 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:576 +#: ../../../c-api/structures.rst:589 msgid "" "This is the same as :c:func:`PyCFunction_GetSelf`, but without error or type " "checking." msgstr "" -#: ../../../c-api/structures.rst:581 +#: ../../../c-api/structures.rst:594 msgid "Accessing attributes of extension types" msgstr "" -#: ../../../c-api/structures.rst:585 +#: ../../../c-api/structures.rst:598 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:590 +#: ../../../c-api/structures.rst:603 msgid "Its fields are, in order:" msgstr "" -#: ../../../c-api/structures.rst:594 +#: ../../../c-api/structures.rst:607 msgid "" "Name of the member. A NULL value marks the end of a ``PyMemberDef[]`` array." msgstr "" -#: ../../../c-api/structures.rst:597 +#: ../../../c-api/structures.rst:610 msgid "The string should be static, no copy is made of it." msgstr "" -#: ../../../c-api/structures.rst:601 +#: ../../../c-api/structures.rst:614 msgid "" "The type of the member in the C struct. See :ref:`PyMemberDef-types` for the " "possible values." msgstr "" -#: ../../../c-api/structures.rst:606 +#: ../../../c-api/structures.rst:619 msgid "" "The offset in bytes that the member is located on the type’s object struct." msgstr "" -#: ../../../c-api/structures.rst:610 +#: ../../../c-api/structures.rst:623 msgid "" "Zero or more of the :ref:`PyMemberDef-flags`, combined using bitwise OR." msgstr "" -#: ../../../c-api/structures.rst:614 +#: ../../../c-api/structures.rst:627 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:618 +#: ../../../c-api/structures.rst:631 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-" @@ -675,7 +691,7 @@ msgid "" "`T_OBJECT`) members can be deleted." msgstr "" -#: ../../../c-api/structures.rst:627 +#: ../../../c-api/structures.rst:640 msgid "" "For heap-allocated types (created using :c:func:`PyType_FromSpec` or " "similar), ``PyMemberDef`` may contain a definition for the special member " @@ -685,11 +701,11 @@ msgid "" "Py_RELATIVE_OFFSET``. For example::" msgstr "" -#: ../../../c-api/structures.rst:640 +#: ../../../c-api/structures.rst:653 msgid "(You may need to ``#include `` for :c:func:`!offsetof`.)" msgstr "" -#: ../../../c-api/structures.rst:642 +#: ../../../c-api/structures.rst:655 msgid "" "The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` and :c:member:" "`~PyTypeObject.tp_weaklistoffset` can be defined similarly using " @@ -698,70 +714,70 @@ msgid "" "and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead." msgstr "" -#: ../../../c-api/structures.rst:650 +#: ../../../c-api/structures.rst:663 msgid "" "``PyMemberDef`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../../c-api/structures.rst:655 +#: ../../../c-api/structures.rst:668 msgid "" ":c:macro:`Py_RELATIVE_OFFSET` is now allowed for " "``\"__vectorcalloffset__\"``, ``\"__dictoffset__\"`` and " "``\"__weaklistoffset__\"``." msgstr "" -#: ../../../c-api/structures.rst:661 +#: ../../../c-api/structures.rst:674 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:667 +#: ../../../c-api/structures.rst:680 msgid "" "``PyMember_GetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../../c-api/structures.rst:672 +#: ../../../c-api/structures.rst:685 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:678 +#: ../../../c-api/structures.rst:691 msgid "" "``PyMember_SetOne`` is always available. Previously, it required including " "``\"structmember.h\"``." msgstr "" -#: ../../../c-api/structures.rst:684 +#: ../../../c-api/structures.rst:697 msgid "Member flags" msgstr "" -#: ../../../c-api/structures.rst:686 +#: ../../../c-api/structures.rst:699 msgid "The following flags can be used with :c:member:`PyMemberDef.flags`:" msgstr "" -#: ../../../c-api/structures.rst:690 +#: ../../../c-api/structures.rst:703 msgid "Not writable." msgstr "" -#: ../../../c-api/structures.rst:694 +#: ../../../c-api/structures.rst:707 msgid "" "Emit an ``object.__getattr__`` :ref:`audit event ` before " "reading." msgstr "" -#: ../../../c-api/structures.rst:699 +#: ../../../c-api/structures.rst:712 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:703 +#: ../../../c-api/structures.rst:716 msgid "" "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." @@ -771,7 +787,7 @@ msgid "" "the ``PyObject`` struct." msgstr "" -#: ../../../c-api/structures.rst:718 +#: ../../../c-api/structures.rst:731 msgid "" "The :c:macro:`!RESTRICTED`, :c:macro:`!READ_RESTRICTED` and :c:macro:`!" "WRITE_RESTRICTED` macros available with ``#include \"structmember.h\"`` are " @@ -780,7 +796,7 @@ msgid "" "nothing." msgstr "" -#: ../../../c-api/structures.rst:729 +#: ../../../c-api/structures.rst:742 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 " @@ -789,11 +805,11 @@ msgid "" "names." msgstr "" -#: ../../../c-api/structures.rst:738 +#: ../../../c-api/structures.rst:751 msgid "Member types" msgstr "" -#: ../../../c-api/structures.rst:740 +#: ../../../c-api/structures.rst:753 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 " @@ -802,147 +818,147 @@ msgid "" "exception such as :exc:`TypeError` or :exc:`ValueError` is raised." msgstr "" -#: ../../../c-api/structures.rst:748 +#: ../../../c-api/structures.rst:761 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:752 +#: ../../../c-api/structures.rst:765 msgid "Macro name" msgstr "" -#: ../../../c-api/structures.rst:752 +#: ../../../c-api/structures.rst:765 msgid "C type" msgstr "" -#: ../../../c-api/structures.rst:752 +#: ../../../c-api/structures.rst:765 msgid "Python type" msgstr "" -#: ../../../c-api/structures.rst:754 +#: ../../../c-api/structures.rst:767 msgid ":c:expr:`char`" msgstr "" -#: ../../../c-api/structures.rst:754 ../../../c-api/structures.rst:755 -#: ../../../c-api/structures.rst:756 ../../../c-api/structures.rst:757 -#: ../../../c-api/structures.rst:758 ../../../c-api/structures.rst:759 -#: ../../../c-api/structures.rst:760 ../../../c-api/structures.rst:761 -#: ../../../c-api/structures.rst:762 ../../../c-api/structures.rst:763 -#: ../../../c-api/structures.rst:764 +#: ../../../c-api/structures.rst:767 ../../../c-api/structures.rst:768 +#: ../../../c-api/structures.rst:769 ../../../c-api/structures.rst:770 +#: ../../../c-api/structures.rst:771 ../../../c-api/structures.rst:772 +#: ../../../c-api/structures.rst:773 ../../../c-api/structures.rst:774 +#: ../../../c-api/structures.rst:775 ../../../c-api/structures.rst:776 +#: ../../../c-api/structures.rst:777 msgid ":py:class:`int`" msgstr "" -#: ../../../c-api/structures.rst:755 +#: ../../../c-api/structures.rst:768 msgid ":c:expr:`short`" msgstr "" -#: ../../../c-api/structures.rst:756 +#: ../../../c-api/structures.rst:769 msgid ":c:expr:`int`" msgstr "" -#: ../../../c-api/structures.rst:757 +#: ../../../c-api/structures.rst:770 msgid ":c:expr:`long`" msgstr "" -#: ../../../c-api/structures.rst:758 +#: ../../../c-api/structures.rst:771 msgid ":c:expr:`long long`" msgstr "" -#: ../../../c-api/structures.rst:759 +#: ../../../c-api/structures.rst:772 msgid ":c:expr:`unsigned char`" msgstr "" -#: ../../../c-api/structures.rst:760 +#: ../../../c-api/structures.rst:773 msgid ":c:expr:`unsigned int`" msgstr "" -#: ../../../c-api/structures.rst:761 +#: ../../../c-api/structures.rst:774 msgid ":c:expr:`unsigned short`" msgstr "" -#: ../../../c-api/structures.rst:762 +#: ../../../c-api/structures.rst:775 msgid ":c:expr:`unsigned long`" msgstr "" -#: ../../../c-api/structures.rst:763 +#: ../../../c-api/structures.rst:776 msgid ":c:expr:`unsigned long long`" msgstr "" -#: ../../../c-api/structures.rst:764 +#: ../../../c-api/structures.rst:777 msgid ":c:expr:`Py_ssize_t`" msgstr "" -#: ../../../c-api/structures.rst:765 +#: ../../../c-api/structures.rst:778 msgid ":c:expr:`float`" msgstr "" -#: ../../../c-api/structures.rst:765 ../../../c-api/structures.rst:766 +#: ../../../c-api/structures.rst:778 ../../../c-api/structures.rst:779 msgid ":py:class:`float`" msgstr "" -#: ../../../c-api/structures.rst:766 +#: ../../../c-api/structures.rst:779 msgid ":c:expr:`double`" msgstr "" -#: ../../../c-api/structures.rst:767 +#: ../../../c-api/structures.rst:780 msgid ":c:expr:`char` (written as 0 or 1)" msgstr "" -#: ../../../c-api/structures.rst:767 +#: ../../../c-api/structures.rst:780 msgid ":py:class:`bool`" msgstr "" -#: ../../../c-api/structures.rst:769 +#: ../../../c-api/structures.rst:782 msgid ":c:expr:`const char *` (*)" msgstr "" -#: ../../../c-api/structures.rst:769 ../../../c-api/structures.rst:770 +#: ../../../c-api/structures.rst:782 ../../../c-api/structures.rst:783 msgid ":py:class:`str` (RO)" msgstr "" -#: ../../../c-api/structures.rst:770 +#: ../../../c-api/structures.rst:783 msgid ":c:expr:`const char[]` (*)" msgstr "" -#: ../../../c-api/structures.rst:771 +#: ../../../c-api/structures.rst:784 msgid ":c:expr:`char` (0-127)" msgstr "" -#: ../../../c-api/structures.rst:771 +#: ../../../c-api/structures.rst:784 msgid ":py:class:`str` (**)" msgstr "" -#: ../../../c-api/structures.rst:772 +#: ../../../c-api/structures.rst:785 msgid ":c:expr:`PyObject *`" msgstr "" -#: ../../../c-api/structures.rst:772 +#: ../../../c-api/structures.rst:785 msgid ":py:class:`object` (D)" msgstr "" -#: ../../../c-api/structures.rst:775 +#: ../../../c-api/structures.rst:788 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:780 +#: ../../../c-api/structures.rst:793 msgid "(**): String of length 1. Only ASCII is accepted." msgstr "" -#: ../../../c-api/structures.rst:782 +#: ../../../c-api/structures.rst:795 msgid "(RO): Implies :c:macro:`Py_READONLY`." msgstr "" -#: ../../../c-api/structures.rst:784 +#: ../../../c-api/structures.rst:797 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:810 +#: ../../../c-api/structures.rst:823 msgid "" "In previous versions, the macros were only available with ``#include " "\"structmember.h\"`` and were named without the ``Py_`` prefix (e.g. as " @@ -950,174 +966,174 @@ msgid "" "with the following deprecated types:" msgstr "" -#: ../../../c-api/structures.rst:818 +#: ../../../c-api/structures.rst:831 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:824 +#: ../../../c-api/structures.rst:837 msgid "Always ``None``. Must be used with :c:macro:`Py_READONLY`." msgstr "" -#: ../../../c-api/structures.rst:827 +#: ../../../c-api/structures.rst:840 msgid "Defining Getters and Setters" msgstr "" -#: ../../../c-api/structures.rst:831 +#: ../../../c-api/structures.rst:844 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:836 +#: ../../../c-api/structures.rst:849 msgid "attribute name" msgstr "" -#: ../../../c-api/structures.rst:840 +#: ../../../c-api/structures.rst:853 msgid "C function to get the attribute." msgstr "" -#: ../../../c-api/structures.rst:844 +#: ../../../c-api/structures.rst:857 msgid "" "Optional C function to set or delete the attribute. If ``NULL``, the " "attribute is read-only." msgstr "" -#: ../../../c-api/structures.rst:849 +#: ../../../c-api/structures.rst:862 msgid "optional docstring" msgstr "" -#: ../../../c-api/structures.rst:853 +#: ../../../c-api/structures.rst:866 msgid "" "Optional user data pointer, providing additional data for getter and setter." msgstr "" -#: ../../../c-api/structures.rst:857 +#: ../../../c-api/structures.rst:870 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:860 +#: ../../../c-api/structures.rst:873 msgid "" "It should return a new reference on success or ``NULL`` with a set exception " "on failure." msgstr "" -#: ../../../c-api/structures.rst:865 +#: ../../../c-api/structures.rst:878 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:868 +#: ../../../c-api/structures.rst:881 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:420 ../../../c-api/structures.rst:430 +#: ../../../c-api/structures.rst:433 ../../../c-api/structures.rst:443 msgid "built-in function" msgstr "" -#: ../../../c-api/structures.rst:420 +#: ../../../c-api/structures.rst:433 msgid "classmethod" msgstr "" -#: ../../../c-api/structures.rst:430 +#: ../../../c-api/structures.rst:443 msgid "staticmethod" msgstr "" -#: ../../../c-api/structures.rst:711 +#: ../../../c-api/structures.rst:724 msgid "READ_RESTRICTED (C macro)" msgstr "" -#: ../../../c-api/structures.rst:711 +#: ../../../c-api/structures.rst:724 msgid "WRITE_RESTRICTED (C macro)" msgstr "" -#: ../../../c-api/structures.rst:711 +#: ../../../c-api/structures.rst:724 msgid "RESTRICTED (C macro)" msgstr "" -#: ../../../c-api/structures.rst:724 +#: ../../../c-api/structures.rst:737 msgid "READONLY (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_BYTE (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_SHORT (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_INT (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_LONG (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_LONGLONG (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_UBYTE (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_USHORT (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_UINT (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_ULONG (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_ULONGULONG (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_PYSSIZET (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_FLOAT (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_DOUBLE (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_BOOL (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_CHAR (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_STRING (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_STRING_INPLACE (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "T_OBJECT_EX (C macro)" msgstr "" -#: ../../../c-api/structures.rst:787 +#: ../../../c-api/structures.rst:800 msgid "structmember.h" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/subinterpreters.pot b/main/locale/pot/LC_MESSAGES/c-api/subinterpreters.pot index a69c82a8a50..e3e04fe0435 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/subinterpreters.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/subinterpreters.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/main/locale/pot/LC_MESSAGES/c-api/synchronization.pot b/main/locale/pot/LC_MESSAGES/c-api/synchronization.pot index 368de453608..af342704f46 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/synchronization.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/synchronization.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/main/locale/pot/LC_MESSAGES/c-api/threads.pot b/main/locale/pot/LC_MESSAGES/c-api/threads.pot index 2bd92ed9df2..749ba2235fe 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/threads.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/threads.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -22,138 +23,168 @@ msgstr "" #: ../../../c-api/threads.rst:13 msgid "" -"Unless on a :term:`free-threaded ` build of :term:`CPython`, " -"the Python interpreter is not fully thread-safe. In order to support multi-" +"Unless on a :term:`free-threaded build` of :term:`CPython`, the Python " +"interpreter is generally not 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." +"interpreter lock` or :term:`GIL`, that must be held by a thread before " +"accessing 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 "" -#: ../../../c-api/threads.rst:24 +#: ../../../c-api/threads.rst:22 +msgid "" +"As such, only a thread that holds the GIL may operate on Python objects or " +"invoke Python's C API." +msgstr "" + +#: ../../../c-api/threads.rst:27 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." +"In order to emulate concurrency, the interpreter regularly tries to switch " +"threads between bytecode instructions (see :func:`sys.setswitchinterval`). " +"This is why locks are also necessary for thread-safety in pure-Python code." msgstr "" -#: ../../../c-api/threads.rst:34 +#: ../../../c-api/threads.rst:31 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 `." +"Additionally, the global interpreter lock is released around blocking I/O " +"operations, such as reading or writing to a file. From the C API, this is " +"done by :ref:`detaching the thread state `." msgstr "" #: ../../../c-api/threads.rst:39 msgid "" +"The Python interpreter keeps some thread-local information inside a data " +"structure called :c:type:`PyThreadState`, known as a :term:`thread state`. " +"Each 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 "" + +#: ../../../c-api/threads.rst:44 +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." +"attached thread state is typically analogous with holding the GIL, except on " +"free-threaded builds. On builds with the GIL enabled, attaching a thread " +"state will block until the GIL can be acquired. However, even on builds with " +"the GIL disabled, it is still required to have an attached thread state, as " +"the interpreter needs to keep track of which threads may access Python " +"objects." +msgstr "" + +#: ../../../c-api/threads.rst:53 +msgid "" +"Even on the free-threaded build, attaching a thread state may block, as the " +"GIL can be re-enabled or threads might be temporarily suspended (such as " +"during a garbage collection)." msgstr "" -#: ../../../c-api/threads.rst:46 +#: ../../../c-api/threads.rst:57 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``." +"Generally, there will always be an attached thread state when using Python's " +"C API, including during embedding and when implementing methods, so it's " +"uncommon to need to set up a thread state on your own. Only in some specific " +"cases, such as in a :c:macro:`Py_BEGIN_ALLOW_THREADS` block or in a fresh " +"thread, will the thread not have an attached thread state. If uncertain, " +"check if :c:func:`PyThreadState_GetUnchecked` returns ``NULL``." msgstr "" -#: ../../../c-api/threads.rst:52 +#: ../../../c-api/threads.rst:64 +msgid "" +"If it turns out that you do need to create a thread state, call :c:func:" +"`PyThreadState_New` followed by :c:func:`PyThreadState_Swap`, or use the " +"dangerous :c:func:`PyGILState_Ensure` function." +msgstr "" + +#: ../../../c-api/threads.rst:72 msgid "Detaching the thread state from extension code" msgstr "" -#: ../../../c-api/threads.rst:54 +#: ../../../c-api/threads.rst:74 msgid "" "Most extension code manipulating the :term:`thread state` has the following " "simple structure::" msgstr "" -#: ../../../c-api/threads.rst:61 +#: ../../../c-api/threads.rst:81 msgid "This is so common that a pair of macros exists to simplify it::" msgstr "" -#: ../../../c-api/threads.rst:71 +#: ../../../c-api/threads.rst:91 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 "" -#: ../../../c-api/threads.rst:75 +#: ../../../c-api/threads.rst:95 msgid "The block above expands to the following code::" msgstr "" -#: ../../../c-api/threads.rst:87 +#: ../../../c-api/threads.rst:107 msgid "Here is how these functions work:" msgstr "" -#: ../../../c-api/threads.rst:89 +#: ../../../c-api/threads.rst:109 +msgid "" +"The attached thread state implies that the GIL is held for the interpreter. " +"To detach it, :c:func:`PyEval_SaveThread` is called and the result is stored " +"in a local variable." +msgstr "" + +#: ../../../c-api/threads.rst:113 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." +"By detaching the thread state, the GIL is released, which allows other " +"threads to attach to the interpreter and execute while the current thread " +"performs blocking I/O. When the I/O operation is complete, the old thread " +"state is reattached by calling :c:func:`PyEval_RestoreThread`, which will " +"wait until the GIL can be acquired." msgstr "" -#: ../../../c-api/threads.rst:99 +#: ../../../c-api/threads.rst:120 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." +"Performing blocking I/O is the most common use case for detaching the thread " +"state, but it is also useful to call it over long-running native code that " +"doesn't need access to Python objects or Python's C API. For example, the " +"standard :mod:`zlib` and :mod:`hashlib` modules detach the :term:`thread " +"state ` when compressing or hashing data." msgstr "" -#: ../../../c-api/threads.rst:105 +#: ../../../c-api/threads.rst:127 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." +"On a :term:`free-threaded build`, the :term:`GIL` is usually out of the " +"question, but **detaching the thread state is still required**, because the " +"interpreter periodically needs to block all threads to get a consistent view " +"of Python objects without the risk of race conditions. For example, CPython " +"currently suspends all threads for a short period of time while running the " +"garbage collector." msgstr "" -#: ../../../c-api/threads.rst:113 +#: ../../../c-api/threads.rst:136 +msgid "" +"Detaching the thread state can lead to unexpected behavior during " +"interpreter finalization. See :ref:`cautions-regarding-runtime-finalization` " +"for more details." +msgstr "" + +#: ../../../c-api/threads.rst:142 msgid "APIs" msgstr "" -#: ../../../c-api/threads.rst:115 +#: ../../../c-api/threads.rst:144 msgid "" "The following macros are normally used without a trailing semicolon; look " "for example usage in the Python source distribution." msgstr "" -#: ../../../c-api/threads.rst:120 +#: ../../../c-api/threads.rst:149 msgid "" "These macros are still necessary on the :term:`free-threaded build` to " "prevent deadlocks." msgstr "" -#: ../../../c-api/threads.rst:125 +#: ../../../c-api/threads.rst:154 msgid "" "This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();" "``. Note that it contains an opening brace; it must be matched with a " @@ -161,7 +192,7 @@ msgid "" "discussion of this macro." msgstr "" -#: ../../../c-api/threads.rst:133 +#: ../../../c-api/threads.rst:162 msgid "" "This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it " "contains a closing brace; it must be matched with an earlier :c:macro:" @@ -169,86 +200,99 @@ msgid "" "macro." msgstr "" -#: ../../../c-api/threads.rst:141 +#: ../../../c-api/threads.rst:170 msgid "" "This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :" "c:macro:`Py_END_ALLOW_THREADS` without the closing brace." msgstr "" -#: ../../../c-api/threads.rst:147 +#: ../../../c-api/threads.rst:176 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 "" -#: ../../../c-api/threads.rst:155 +#: ../../../c-api/threads.rst:182 msgid "Non-Python created threads" msgstr "" -#: ../../../c-api/threads.rst:157 +#: ../../../c-api/threads.rst:184 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 shown 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`." +"`threading` module), a thread state is automatically associated with them, " +"However, when a thread is created from native code (for example, by a third-" +"party library with its own thread management), it doesn't hold an attached " +"thread state." msgstr "" -#: ../../../c-api/threads.rst:164 +#: ../../../c-api/threads.rst:190 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." +"must first register these threads with the interpreter by creating a new " +"thread state and attaching it." msgstr "" -#: ../../../c-api/threads.rst:171 +#: ../../../c-api/threads.rst:195 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::" +"The most robust way to do this is through :c:func:`PyThreadState_New` " +"followed by :c:func:`PyThreadState_Swap`." msgstr "" -#: ../../../c-api/threads.rst:185 +#: ../../../c-api/threads.rst:199 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." +"``PyThreadState_New`` requires an argument pointing to the desired " +"interpreter; such a pointer can be acquired via a call to :c:func:" +"`PyInterpreterState_Get` from the code where the thread was created." msgstr "" -#: ../../../c-api/threads.rst:195 -msgid "Supporting subinterpreters in non-Python threads" +#: ../../../c-api/threads.rst:204 +msgid "For example::" msgstr "" -#: ../../../c-api/threads.rst:197 +#: ../../../c-api/threads.rst:227 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." +"If the interpreter finalized before ``PyThreadState_Swap`` was called, then " +"``interp`` will be a dangling pointer!" +msgstr "" + +#: ../../../c-api/threads.rst:233 +msgid "Legacy API" msgstr "" -#: ../../../c-api/threads.rst:201 +#: ../../../c-api/threads.rst:235 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::" +"Another common pattern to call Python code from a non-Python thread is to " +"use :c:func:`PyGILState_Ensure` followed by a call to :c:func:" +"`PyGILState_Release`." msgstr "" -#: ../../../c-api/threads.rst:224 +#: ../../../c-api/threads.rst:238 +msgid "" +"These functions do not work well when multiple interpreters exist in the " +"Python process. If no Python interpreter has ever been used in the current " +"thread (which is common for threads created outside Python), " +"``PyGILState_Ensure`` will create and attach a thread state for the \"main\" " +"interpreter (the first interpreter in the Python process)." +msgstr "" + +#: ../../../c-api/threads.rst:244 +msgid "" +"Additionally, these functions have thread-safety issues during interpreter " +"finalization. Using ``PyGILState_Ensure`` during finalization will likely " +"crash the process." +msgstr "" + +#: ../../../c-api/threads.rst:248 +msgid "Usage of these functions look like such::" +msgstr "" + +#: ../../../c-api/threads.rst:264 msgid "Cautions about fork()" msgstr "" -#: ../../../c-api/threads.rst:226 +#: ../../../c-api/threads.rst:266 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 " @@ -257,7 +301,7 @@ msgid "" "CPython's runtime." msgstr "" -#: ../../../c-api/threads.rst:232 +#: ../../../c-api/threads.rst:272 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` " @@ -274,7 +318,7 @@ msgid "" "locks, but is not always able to." msgstr "" -#: ../../../c-api/threads.rst:247 +#: ../../../c-api/threads.rst:287 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 " @@ -287,64 +331,64 @@ msgid "" "called immediately after." msgstr "" -#: ../../../c-api/threads.rst:260 +#: ../../../c-api/threads.rst:300 msgid "High-level APIs" msgstr "" -#: ../../../c-api/threads.rst:262 +#: ../../../c-api/threads.rst:302 msgid "" "These are the most commonly used types and functions when writing multi-" "threaded C extensions." msgstr "" -#: ../../../c-api/threads.rst:268 +#: ../../../c-api/threads.rst:308 msgid "" "This data structure represents the state of a single thread. The only " "public data member is:" msgstr "" -#: ../../../c-api/threads.rst:273 +#: ../../../c-api/threads.rst:313 msgid "This thread's interpreter state." msgstr "" -#: ../../../c-api/threads.rst:284 +#: ../../../c-api/threads.rst:324 msgid "Deprecated function which does nothing." msgstr "" -#: ../../../c-api/threads.rst:286 +#: ../../../c-api/threads.rst:326 msgid "" "In Python 3.6 and older, this function created the GIL if it didn't exist." msgstr "" -#: ../../../c-api/threads.rst:288 +#: ../../../c-api/threads.rst:328 msgid "The function now does nothing." msgstr "" -#: ../../../c-api/threads.rst:291 +#: ../../../c-api/threads.rst:331 msgid "" "This function is now called by :c:func:`Py_Initialize()`, so you don't have " "to call it yourself anymore." msgstr "" -#: ../../../c-api/threads.rst:295 +#: ../../../c-api/threads.rst:335 msgid "" "This function cannot be called before :c:func:`Py_Initialize()` anymore." msgstr "" -#: ../../../c-api/threads.rst:305 +#: ../../../c-api/threads.rst:345 msgid "" "Detach the :term:`attached thread state` and return it. The thread will have " "no :term:`thread state` upon returning." msgstr "" -#: ../../../c-api/threads.rst:311 +#: ../../../c-api/threads.rst:351 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 "" -#: ../../../c-api/threads.rst:316 ../../../c-api/threads.rst:600 +#: ../../../c-api/threads.rst:356 ../../../c-api/threads.rst:640 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 " @@ -352,14 +396,14 @@ msgid "" "details." msgstr "" -#: ../../../c-api/threads.rst:321 ../../../c-api/threads.rst:408 -#: ../../../c-api/threads.rst:610 +#: ../../../c-api/threads.rst:361 ../../../c-api/threads.rst:448 +#: ../../../c-api/threads.rst:650 msgid "" "Hangs the current thread, rather than terminating it, if called while the " "interpreter is finalizing." msgstr "" -#: ../../../c-api/threads.rst:327 +#: ../../../c-api/threads.rst:367 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` " @@ -367,70 +411,70 @@ msgid "" "``NULL``)." msgstr "" -#: ../../../c-api/threads.rst:332 +#: ../../../c-api/threads.rst:372 msgid "See also :c:func:`PyThreadState_GetUnchecked`." msgstr "" -#: ../../../c-api/threads.rst:336 +#: ../../../c-api/threads.rst:376 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 "" -#: ../../../c-api/threads.rst:340 +#: ../../../c-api/threads.rst:380 msgid "" "In Python 3.5 to 3.12, the function was private and known as " "``_PyThreadState_UncheckedGet()``." msgstr "" -#: ../../../c-api/threads.rst:347 +#: ../../../c-api/threads.rst:387 msgid "" "Set the :term:`attached thread state` to *tstate*, and return the :term:" "`thread state` that was attached prior to calling." msgstr "" -#: ../../../c-api/threads.rst:350 +#: ../../../c-api/threads.rst:390 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 "" -#: ../../../c-api/threads.rst:354 +#: ../../../c-api/threads.rst:394 msgid ":c:func:`PyEval_ReleaseThread`" msgstr "" -#: ../../../c-api/threads.rst:357 +#: ../../../c-api/threads.rst:397 msgid "" "Similar to :c:func:`PyGILState_Ensure`, this function will hang the thread " "if the runtime is finalizing." msgstr "" -#: ../../../c-api/threads.rst:362 +#: ../../../c-api/threads.rst:402 msgid "GIL-state APIs" msgstr "" -#: ../../../c-api/threads.rst:364 +#: ../../../c-api/threads.rst:404 msgid "" "The following functions use thread-local storage, and are not compatible " "with sub-interpreters:" msgstr "" -#: ../../../c-api/threads.rst:369 +#: ../../../c-api/threads.rst:409 msgid "" "The type of the value returned by :c:func:`PyGILState_Ensure` and passed to :" "c:func:`PyGILState_Release`." msgstr "" -#: ../../../c-api/threads.rst:374 +#: ../../../c-api/threads.rst:414 msgid "The GIL was already held when :c:func:`PyGILState_Ensure` was called." msgstr "" -#: ../../../c-api/threads.rst:378 +#: ../../../c-api/threads.rst:418 msgid "The GIL was not held when :c:func:`PyGILState_Ensure` was called." msgstr "" -#: ../../../c-api/threads.rst:382 +#: ../../../c-api/threads.rst:422 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`. " @@ -443,7 +487,7 @@ msgid "" "is acceptable." msgstr "" -#: ../../../c-api/threads.rst:392 +#: ../../../c-api/threads.rst:432 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:" @@ -453,14 +497,14 @@ msgid "" "to :c:func:`PyGILState_Release`." msgstr "" -#: ../../../c-api/threads.rst:399 +#: ../../../c-api/threads.rst:439 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 "" -#: ../../../c-api/threads.rst:403 +#: ../../../c-api/threads.rst:443 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 " @@ -468,7 +512,7 @@ msgid "" "finalization` for more details." msgstr "" -#: ../../../c-api/threads.rst:414 +#: ../../../c-api/threads.rst:454 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:" @@ -476,13 +520,13 @@ msgid "" "caller, hence the use of the GILState API)." msgstr "" -#: ../../../c-api/threads.rst:419 +#: ../../../c-api/threads.rst:459 msgid "" "Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:" "func:`PyGILState_Release` on the same thread." msgstr "" -#: ../../../c-api/threads.rst:424 +#: ../../../c-api/threads.rst:464 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 " @@ -490,18 +534,18 @@ msgid "" "been made on the main thread. This is mainly a helper/diagnostic function." msgstr "" -#: ../../../c-api/threads.rst:430 +#: ../../../c-api/threads.rst:470 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 "" -#: ../../../c-api/threads.rst:435 +#: ../../../c-api/threads.rst:475 msgid ":c:func:`PyThreadState_Get`" msgstr "" -#: ../../../c-api/threads.rst:439 +#: ../../../c-api/threads.rst:479 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 " @@ -513,120 +557,120 @@ msgid "" "differently." msgstr "" -#: ../../../c-api/threads.rst:449 +#: ../../../c-api/threads.rst:489 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 "" -#: ../../../c-api/threads.rst:457 +#: ../../../c-api/threads.rst:497 msgid "Low-level APIs" msgstr "" -#: ../../../c-api/threads.rst:461 +#: ../../../c-api/threads.rst:501 msgid "" "Create a new thread state object belonging to the given interpreter object. " "An :term:`attached thread state` is not needed." msgstr "" -#: ../../../c-api/threads.rst:466 +#: ../../../c-api/threads.rst:506 msgid "" "Reset all information in a :term:`thread state` object. *tstate* must be :" "term:`attached `" msgstr "" -#: ../../../c-api/threads.rst:469 +#: ../../../c-api/threads.rst:509 msgid "" "This function now calls the :c:member:`!PyThreadState.on_delete` callback. " "Previously, that happened in :c:func:`PyThreadState_Delete`." msgstr "" -#: ../../../c-api/threads.rst:473 +#: ../../../c-api/threads.rst:513 msgid "The :c:member:`!PyThreadState.on_delete` callback was removed." msgstr "" -#: ../../../c-api/threads.rst:479 +#: ../../../c-api/threads.rst:519 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 "" -#: ../../../c-api/threads.rst:487 +#: ../../../c-api/threads.rst:527 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 "" -#: ../../../c-api/threads.rst:490 +#: ../../../c-api/threads.rst:530 msgid "" "No :term:`thread state` will be :term:`attached ` " "upon returning." msgstr "" -#: ../../../c-api/threads.rst:495 +#: ../../../c-api/threads.rst:535 msgid "Get the current frame of the Python thread state *tstate*." msgstr "" -#: ../../../c-api/threads.rst:497 +#: ../../../c-api/threads.rst:537 msgid "" "Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " "executing." msgstr "" -#: ../../../c-api/threads.rst:500 +#: ../../../c-api/threads.rst:540 msgid "See also :c:func:`PyEval_GetFrame`." msgstr "" -#: ../../../c-api/threads.rst:502 ../../../c-api/threads.rst:511 -#: ../../../c-api/threads.rst:520 +#: ../../../c-api/threads.rst:542 ../../../c-api/threads.rst:551 +#: ../../../c-api/threads.rst:560 msgid "" "*tstate* must not be ``NULL``, and must be :term:`attached `." msgstr "" -#: ../../../c-api/threads.rst:509 +#: ../../../c-api/threads.rst:549 msgid "" "Get the unique :term:`thread state` identifier of the Python thread state " "*tstate*." msgstr "" -#: ../../../c-api/threads.rst:518 +#: ../../../c-api/threads.rst:558 msgid "Get the interpreter of the Python thread state *tstate*." msgstr "" -#: ../../../c-api/threads.rst:527 +#: ../../../c-api/threads.rst:567 msgid "Suspend tracing and profiling in the Python thread state *tstate*." msgstr "" -#: ../../../c-api/threads.rst:529 +#: ../../../c-api/threads.rst:569 msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." msgstr "" -#: ../../../c-api/threads.rst:536 +#: ../../../c-api/threads.rst:576 msgid "" "Resume tracing and profiling in the Python thread state *tstate* suspended " "by the :c:func:`PyThreadState_EnterTracing` function." msgstr "" -#: ../../../c-api/threads.rst:539 +#: ../../../c-api/threads.rst:579 msgid "" "See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." msgstr "" -#: ../../../c-api/threads.rst:547 +#: ../../../c-api/threads.rst:587 msgid "" "Set the stack protection start address and stack protection size of a Python " "thread state." msgstr "" -#: ../../../c-api/threads.rst:550 +#: ../../../c-api/threads.rst:590 msgid "" "On success, return ``0``. On failure, set an exception and return ``-1``." msgstr "" -#: ../../../c-api/threads.rst:553 +#: ../../../c-api/threads.rst:593 msgid "" "CPython implements :ref:`recursion control ` for C code by " "raising :py:exc:`RecursionError` when it notices that the machine execution " @@ -639,31 +683,31 @@ msgid "" "change." msgstr "" -#: ../../../c-api/threads.rst:562 +#: ../../../c-api/threads.rst:602 msgid "" "Call :c:func:`~PyUnstable_ThreadState_SetStackProtection` either before or " "after changing the stack. Do not call any other Python C API between the " "call and the stack change." msgstr "" -#: ../../../c-api/threads.rst:567 +#: ../../../c-api/threads.rst:607 msgid "" "See :c:func:`PyUnstable_ThreadState_ResetStackProtection` for undoing this " "operation." msgstr "" -#: ../../../c-api/threads.rst:574 +#: ../../../c-api/threads.rst:614 msgid "" "Reset the stack protection start address and stack protection size of a " "Python thread state to the operating system defaults." msgstr "" -#: ../../../c-api/threads.rst:577 +#: ../../../c-api/threads.rst:617 msgid "" "See :c:func:`PyUnstable_ThreadState_SetStackProtection` for an explanation." msgstr "" -#: ../../../c-api/threads.rst:584 +#: ../../../c-api/threads.rst:624 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 " @@ -673,62 +717,62 @@ msgid "" "thread state is attached." msgstr "" -#: ../../../c-api/threads.rst:594 +#: ../../../c-api/threads.rst:634 msgid "" ":term:`Attach ` *tstate* to the current thread, which " "must not be ``NULL`` or already :term:`attached `." msgstr "" -#: ../../../c-api/threads.rst:597 +#: ../../../c-api/threads.rst:637 msgid "" "The calling thread must not already have an :term:`attached thread state`." msgstr "" -#: ../../../c-api/threads.rst:605 +#: ../../../c-api/threads.rst:645 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 "" -#: ../../../c-api/threads.rst:614 +#: ../../../c-api/threads.rst:654 msgid "" ":c:func:`PyEval_RestoreThread` is a higher-level function which is always " "available (even when threads have not been initialized)." msgstr "" -#: ../../../c-api/threads.rst:620 +#: ../../../c-api/threads.rst:660 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 "" -#: ../../../c-api/threads.rst:625 +#: ../../../c-api/threads.rst:665 msgid "" ":c:func:`PyEval_SaveThread` is a higher-level function which is always " "available (even when threads have not been initialized)." msgstr "" -#: ../../../c-api/threads.rst:630 +#: ../../../c-api/threads.rst:670 msgid "Asynchronous notifications" msgstr "" -#: ../../../c-api/threads.rst:632 +#: ../../../c-api/threads.rst:672 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 "" -#: ../../../c-api/threads.rst:639 +#: ../../../c-api/threads.rst:679 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 "" -#: ../../../c-api/threads.rst:643 +#: ../../../c-api/threads.rst:683 msgid "" "When successfully queued, *func* will be *eventually* called from the main " "interpreter thread with the argument *arg*. It will be called " @@ -736,17 +780,17 @@ msgid "" "these conditions met:" msgstr "" -#: ../../../c-api/threads.rst:648 +#: ../../../c-api/threads.rst:688 msgid "on a :term:`bytecode` boundary;" msgstr "" -#: ../../../c-api/threads.rst:649 +#: ../../../c-api/threads.rst:689 msgid "" "with the main thread holding an :term:`attached thread state` (*func* can " "therefore use the full C API)." msgstr "" -#: ../../../c-api/threads.rst:652 +#: ../../../c-api/threads.rst:692 msgid "" "*func* must return ``0`` on success, or ``-1`` on failure with an exception " "set. *func* won't be interrupted to perform another asynchronous " @@ -754,7 +798,7 @@ msgid "" "if the :term:`thread state ` is detached." msgstr "" -#: ../../../c-api/threads.rst:657 +#: ../../../c-api/threads.rst:697 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:" @@ -762,7 +806,7 @@ msgid "" "be called from the wrong interpreter." msgstr "" -#: ../../../c-api/threads.rst:662 +#: ../../../c-api/threads.rst:702 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 " @@ -772,7 +816,7 @@ msgid "" "`PyGILState API`." msgstr "" -#: ../../../c-api/threads.rst:671 +#: ../../../c-api/threads.rst:711 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 " @@ -780,149 +824,168 @@ msgid "" "scheduled calls." msgstr "" -#: ../../../c-api/threads.rst:677 +#: ../../../c-api/threads.rst:717 msgid "" "This function now always schedules *func* to be run in the main interpreter." msgstr "" -#: ../../../c-api/threads.rst:684 +#: ../../../c-api/threads.rst:724 msgid "" "Execute all pending calls. This is usually executed automatically by the " "interpreter." msgstr "" -#: ../../../c-api/threads.rst:687 +#: ../../../c-api/threads.rst:727 msgid "" "This function returns ``0`` on success, and returns ``-1`` with an exception " "set on failure." msgstr "" -#: ../../../c-api/threads.rst:690 +#: ../../../c-api/threads.rst:730 msgid "" "If this is not called in the main thread of the main interpreter, this " "function does nothing and returns ``0``. The caller must hold an :term:" "`attached thread state`." msgstr "" -#: ../../../c-api/threads.rst:696 +#: ../../../c-api/threads.rst:736 msgid "This function only runs pending calls in the main interpreter." msgstr "" -#: ../../../c-api/threads.rst:702 +#: ../../../c-api/threads.rst:742 +msgid "" +"Schedule an exception to be raised asynchronously in a thread. If the thread " +"has a previously scheduled exception, it is overwritten." +msgstr "" + +#: ../../../c-api/threads.rst:745 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." +"The *id* argument is the thread id of the target thread, as returned by :c:" +"func:`PyThread_get_thread_ident`. *exc* is the class of the exception to be " +"raised, or ``NULL`` to clear the pending exception (if any)." msgstr "" -#: ../../../c-api/threads.rst:710 +#: ../../../c-api/threads.rst:750 +msgid "" +"Return the number of affected thread states. This is normally ``1`` if *id* " +"is found, even when no change was made (the given *exc* was already pending, " +"or *exc* is ``NULL`` but no exception is pending). If the thread id isn't " +"found, return ``0``. This raises no exceptions." +msgstr "" + +#: ../../../c-api/threads.rst:756 +msgid "" +"To prevent naive misuse, you must write your own C extension to call this. " +"This function must be called with an :term:`attached thread state`. This " +"function does not steal any references to *exc*. This function does not " +"necessarily interrupt system calls such as :py:func:`~time.sleep`." +msgstr "" + +#: ../../../c-api/threads.rst:762 msgid "" "The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" "`unsigned long`." msgstr "" -#: ../../../c-api/threads.rst:716 +#: ../../../c-api/threads.rst:768 msgid "Operating system thread APIs" msgstr "" -#: ../../../c-api/threads.rst:720 +#: ../../../c-api/threads.rst:772 msgid "Sentinel value for an invalid thread ID." msgstr "" -#: ../../../c-api/threads.rst:722 +#: ../../../c-api/threads.rst:774 msgid "This is currently equivalent to ``(unsigned long)-1``." msgstr "" -#: ../../../c-api/threads.rst:727 +#: ../../../c-api/threads.rst:779 msgid "" "Start function *func* in a new thread with argument *arg*. The resulting " "thread is not intended to be joined." msgstr "" -#: ../../../c-api/threads.rst:730 +#: ../../../c-api/threads.rst:782 msgid "*func* must not be ``NULL``, but *arg* may be ``NULL``." msgstr "" -#: ../../../c-api/threads.rst:732 +#: ../../../c-api/threads.rst:784 msgid "" "On success, this function returns the identifier of the new thread; on " "failure, this returns :c:macro:`PYTHREAD_INVALID_THREAD_ID`." msgstr "" -#: ../../../c-api/threads.rst:735 ../../../c-api/threads.rst:819 -#: ../../../c-api/threads.rst:827 +#: ../../../c-api/threads.rst:787 ../../../c-api/threads.rst:872 +#: ../../../c-api/threads.rst:880 msgid "The caller does not need to hold an :term:`attached thread state`." msgstr "" -#: ../../../c-api/threads.rst:740 +#: ../../../c-api/threads.rst:792 msgid "Return the identifier of the current thread, which will never be zero." msgstr "" -#: ../../../c-api/threads.rst:742 ../../../c-api/threads.rst:774 +#: ../../../c-api/threads.rst:794 ../../../c-api/threads.rst:827 msgid "" "This function cannot fail, and the caller does not need to hold an :term:" "`attached thread state`." msgstr "" -#: ../../../c-api/threads.rst:746 -msgid ":py:func:`threading.get_ident`" +#: ../../../c-api/threads.rst:798 +msgid "" +":py:func:`threading.get_ident` and :py:attr:`threading.Thread.ident` expose " +"this identifier to Python." msgstr "" -#: ../../../c-api/threads.rst:751 +#: ../../../c-api/threads.rst:804 msgid "" "Get general information about the current thread in the form of a :ref:" "`struct sequence ` object. This information is " "accessible as :py:attr:`sys.thread_info` in Python." msgstr "" -#: ../../../c-api/threads.rst:755 +#: ../../../c-api/threads.rst:808 msgid "" "On success, this returns a new :term:`strong reference` to the thread " "information; on failure, this returns ``NULL`` with an exception set." msgstr "" -#: ../../../c-api/threads.rst:758 +#: ../../../c-api/threads.rst:811 msgid "The caller must hold an :term:`attached thread state`." msgstr "" -#: ../../../c-api/threads.rst:763 +#: ../../../c-api/threads.rst:816 msgid "This macro is defined when the system supports native thread IDs." msgstr "" -#: ../../../c-api/threads.rst:768 +#: ../../../c-api/threads.rst:821 msgid "" "Get the native identifier of the current thread as it was assigned by the " "operating system's kernel, which will never be less than zero." msgstr "" -#: ../../../c-api/threads.rst:771 +#: ../../../c-api/threads.rst:824 msgid "" "This function is only available when :c:macro:`PY_HAVE_THREAD_NATIVE_ID` is " "defined." msgstr "" -#: ../../../c-api/threads.rst:778 +#: ../../../c-api/threads.rst:831 msgid ":py:func:`threading.get_native_id`" msgstr "" -#: ../../../c-api/threads.rst:783 +#: ../../../c-api/threads.rst:836 msgid "" "Terminate the current thread. This function is generally considered unsafe " "and should be avoided. It is kept solely for backwards compatibility." msgstr "" -#: ../../../c-api/threads.rst:786 +#: ../../../c-api/threads.rst:839 msgid "" "This function is only safe to call if all functions in the full call stack " "are written to safely allow it." msgstr "" -#: ../../../c-api/threads.rst:791 +#: ../../../c-api/threads.rst:844 msgid "" "If the current system uses POSIX threads (also known as \"pthreads\"), this " "calls :manpage:`pthread_exit(3)`, which attempts to unwind the stack and " @@ -931,34 +994,34 @@ msgid "" "systems, such as macOS, do unwinding." msgstr "" -#: ../../../c-api/threads.rst:797 +#: ../../../c-api/threads.rst:850 msgid "" "On Windows, this function calls ``_endthreadex()``, which kills the thread " "without calling C++ destructors." msgstr "" -#: ../../../c-api/threads.rst:800 +#: ../../../c-api/threads.rst:853 msgid "In any case, there is a risk of corruption on the thread's stack." msgstr "" -#: ../../../c-api/threads.rst:807 +#: ../../../c-api/threads.rst:860 msgid "" "Initialize ``PyThread*`` APIs. Python executes this function automatically, " "so there's little need to call it from an extension module." msgstr "" -#: ../../../c-api/threads.rst:813 +#: ../../../c-api/threads.rst:866 msgid "Set the stack size of the current thread to *size* bytes." msgstr "" -#: ../../../c-api/threads.rst:815 +#: ../../../c-api/threads.rst:868 msgid "" "This function returns ``0`` on success, ``-1`` if *size* is invalid, or " "``-2`` if the system does not support changing the stack size. This function " "does not set exceptions." msgstr "" -#: ../../../c-api/threads.rst:824 +#: ../../../c-api/threads.rst:877 msgid "" "Return the stack size of the current thread in bytes, or ``0`` if the " "system's default stack size is in use." @@ -976,50 +1039,50 @@ msgstr "" msgid "lock, interpreter" msgstr "" -#: ../../../c-api/threads.rst:22 +#: ../../../c-api/threads.rst:25 msgid "setswitchinterval (in module sys)" msgstr "" -#: ../../../c-api/threads.rst:31 +#: ../../../c-api/threads.rst:36 msgid "PyThreadState (C type)" msgstr "" -#: ../../../c-api/threads.rst:67 +#: ../../../c-api/threads.rst:87 msgid "Py_BEGIN_ALLOW_THREADS (C macro)" msgstr "" -#: ../../../c-api/threads.rst:67 +#: ../../../c-api/threads.rst:87 msgid "Py_END_ALLOW_THREADS (C macro)" msgstr "" -#: ../../../c-api/threads.rst:83 +#: ../../../c-api/threads.rst:103 msgid "PyEval_RestoreThread (C function)" msgstr "" -#: ../../../c-api/threads.rst:83 +#: ../../../c-api/threads.rst:103 msgid "PyEval_SaveThread (C function)" msgstr "" -#: ../../../c-api/threads.rst:278 +#: ../../../c-api/threads.rst:318 msgid "PyEval_AcquireThread()" msgstr "" -#: ../../../c-api/threads.rst:278 +#: ../../../c-api/threads.rst:318 msgid "PyEval_ReleaseThread()" msgstr "" -#: ../../../c-api/threads.rst:278 +#: ../../../c-api/threads.rst:318 msgid "PyEval_SaveThread()" msgstr "" -#: ../../../c-api/threads.rst:278 +#: ../../../c-api/threads.rst:318 msgid "PyEval_RestoreThread()" msgstr "" -#: ../../../c-api/threads.rst:300 +#: ../../../c-api/threads.rst:340 msgid "module" msgstr "" -#: ../../../c-api/threads.rst:300 +#: ../../../c-api/threads.rst:340 msgid "_thread" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/c-api/tls.pot b/main/locale/pot/LC_MESSAGES/c-api/tls.pot index 742948d64da..2e7e07945c2 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/tls.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/tls.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/main/locale/pot/LC_MESSAGES/c-api/type.pot b/main/locale/pot/LC_MESSAGES/c-api/type.pot index 82c2a1ff576..514f6c928b2 100644 --- a/main/locale/pot/LC_MESSAGES/c-api/type.pot +++ b/main/locale/pot/LC_MESSAGES/c-api/type.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-01 09:06+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -302,13 +302,20 @@ msgid "" "created using :c:func:`PyType_FromModuleAndSpec`." msgstr "" -#: ../../../c-api/type.rst:277 ../../../c-api/type.rst:298 +#: ../../../c-api/type.rst:277 ../../../c-api/type.rst:341 +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:281 ../../../c-api/type.rst:302 msgid "" "If no module is associated with the given type, sets :py:class:`TypeError` " "and returns ``NULL``." msgstr "" -#: ../../../c-api/type.rst:280 +#: ../../../c-api/type.rst:284 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 " @@ -319,31 +326,31 @@ msgid "" "type:`!PyCMethod` cannot be used." msgstr "" -#: ../../../c-api/type.rst:294 +#: ../../../c-api/type.rst:298 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:301 +#: ../../../c-api/type.rst:305 msgid "" "If the *type* has an associated module but its state is ``NULL``, returns " "``NULL`` without setting an exception." msgstr "" -#: ../../../c-api/type.rst:309 +#: ../../../c-api/type.rst:313 msgid "" "Find the first superclass whose module has the given :ref:`module token `, and return that module." msgstr "" -#: ../../../c-api/type.rst:312 +#: ../../../c-api/type.rst:316 msgid "" "If no module is found, raises a :py:class:`TypeError` and returns ``NULL``." msgstr "" -#: ../../../c-api/type.rst:314 +#: ../../../c-api/type.rst:318 msgid "" "This function is intended to be used together with :c:func:" "`PyModule_GetState()` to get module state from slot methods (such as :c:" @@ -352,122 +359,115 @@ msgid "" "type:`PyCMethod` calling convention." msgstr "" -#: ../../../c-api/type.rst:325 +#: ../../../c-api/type.rst:329 msgid "" "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:329 +#: ../../../c-api/type.rst:333 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:334 +#: ../../../c-api/type.rst:338 msgid "returns a borrowed reference, and" msgstr "" -#: ../../../c-api/type.rst:335 +#: ../../../c-api/type.rst:339 msgid "" "has a non-``void*`` argument type (which is a cosmetic difference in C)." msgstr "" -#: ../../../c-api/type.rst:337 -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:346 +#: ../../../c-api/type.rst:350 msgid "" "Find the first superclass in *type*'s :term:`method resolution order` whose :" "c:macro:`Py_tp_token` token is equal to *tp_token*." msgstr "" -#: ../../../c-api/type.rst:349 +#: ../../../c-api/type.rst:353 msgid "" "If found, set *\\*result* to a new :term:`strong reference` to it and return " "``1``." msgstr "" -#: ../../../c-api/type.rst:351 +#: ../../../c-api/type.rst:355 msgid "If not found, set *\\*result* to ``NULL`` and return ``0``." msgstr "" -#: ../../../c-api/type.rst:352 +#: ../../../c-api/type.rst:356 msgid "" "On error, set *\\*result* to ``NULL`` and return ``-1`` with an exception " "set." msgstr "" -#: ../../../c-api/type.rst:355 +#: ../../../c-api/type.rst:359 msgid "" "The *result* argument may be ``NULL``, in which case *\\*result* is not set. " "Use this if you need only the return value." msgstr "" -#: ../../../c-api/type.rst:358 +#: ../../../c-api/type.rst:362 msgid "The *tp_token* argument may not be ``NULL``." msgstr "" -#: ../../../c-api/type.rst:365 +#: ../../../c-api/type.rst:369 msgid "Attempt to assign a version tag to the given type." msgstr "" -#: ../../../c-api/type.rst:367 +#: ../../../c-api/type.rst:371 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 "" -#: ../../../c-api/type.rst:375 +#: ../../../c-api/type.rst:379 msgid "" "Return true if instances of *type* support creating weak references, false " "otherwise. This function always succeeds. *type* must not be ``NULL``." msgstr "" -#: ../../../c-api/type.rst:379 +#: ../../../c-api/type.rst:383 msgid ":ref:`weakrefobjects`" msgstr "" -#: ../../../c-api/type.rst:380 +#: ../../../c-api/type.rst:384 msgid ":py:mod:`weakref`" msgstr "" -#: ../../../c-api/type.rst:384 +#: ../../../c-api/type.rst:388 msgid "Creating Heap-Allocated Types" msgstr "" -#: ../../../c-api/type.rst:386 +#: ../../../c-api/type.rst:390 msgid "" "The following functions and structs are used to create :ref:`heap types " "`." msgstr "" -#: ../../../c-api/type.rst:391 +#: ../../../c-api/type.rst:395 msgid "" "Create and return a :ref:`heap type ` from the *spec* (see :c:" "macro:`Py_TPFLAGS_HEAPTYPE`)." msgstr "" -#: ../../../c-api/type.rst:394 +#: ../../../c-api/type.rst:398 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 "" -#: ../../../c-api/type.rst:398 +#: ../../../c-api/type.rst:402 msgid "" "Metaclasses that override :c:member:`~PyTypeObject.tp_new` are not " "supported, except if ``tp_new`` is ``NULL``." msgstr "" -#: ../../../c-api/type.rst:401 +#: ../../../c-api/type.rst:405 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 :c:data:" @@ -476,7 +476,7 @@ msgid "" "derives from :class:`object`." msgstr "" -#: ../../../c-api/type.rst:407 +#: ../../../c-api/type.rst:411 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``, " @@ -485,11 +485,11 @@ msgid "" "subclasses; it must be specified for each class individually." msgstr "" -#: ../../../c-api/type.rst:414 +#: ../../../c-api/type.rst:418 msgid "This function calls :c:func:`PyType_Ready` on the new type." msgstr "" -#: ../../../c-api/type.rst:416 +#: ../../../c-api/type.rst:420 msgid "" "Note that this function does *not* fully match the behavior of calling :py:" "class:`type() ` or using the :keyword:`class` statement. With user-" @@ -498,90 +498,90 @@ msgid "" "Specifically:" msgstr "" -#: ../../../c-api/type.rst:423 +#: ../../../c-api/type.rst:427 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:425 +#: ../../../c-api/type.rst:429 msgid ":py:meth:`~object.__init__` is not called on the new class." msgstr "" -#: ../../../c-api/type.rst:426 +#: ../../../c-api/type.rst:430 msgid ":py:meth:`~object.__init_subclass__` is not called on any bases." msgstr "" -#: ../../../c-api/type.rst:427 +#: ../../../c-api/type.rst:431 msgid ":py:meth:`~object.__set_name__` is not called on new descriptors." msgstr "" -#: ../../../c-api/type.rst:434 +#: ../../../c-api/type.rst:438 msgid "Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``." msgstr "" -#: ../../../c-api/type.rst:440 +#: ../../../c-api/type.rst:444 msgid "" "The function now accepts a single class as the *bases* argument and ``NULL`` " "as the ``tp_doc`` slot." msgstr "" -#: ../../../c-api/type.rst:445 ../../../c-api/type.rst:467 +#: ../../../c-api/type.rst:449 ../../../c-api/type.rst:471 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:448 ../../../c-api/type.rst:470 -#: ../../../c-api/type.rst:491 +#: ../../../c-api/type.rst:452 ../../../c-api/type.rst:474 +#: ../../../c-api/type.rst:495 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:455 ../../../c-api/type.rst:477 -#: ../../../c-api/type.rst:498 +#: ../../../c-api/type.rst:459 ../../../c-api/type.rst:481 +#: ../../../c-api/type.rst:502 msgid "" "Creating classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new` " "is no longer allowed." msgstr "" -#: ../../../c-api/type.rst:461 +#: ../../../c-api/type.rst:465 msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``." msgstr "" -#: ../../../c-api/type.rst:483 +#: ../../../c-api/type.rst:487 msgid "Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``." msgstr "" -#: ../../../c-api/type.rst:487 +#: ../../../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." msgstr "" -#: ../../../c-api/type.rst:504 +#: ../../../c-api/type.rst:508 msgid "" "Make a type immutable: set the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag." msgstr "" -#: ../../../c-api/type.rst:506 +#: ../../../c-api/type.rst:510 msgid "All base classes of *type* must be immutable." msgstr "" -#: ../../../c-api/type.rst:508 +#: ../../../c-api/type.rst:512 msgid "On success, return ``0``. On error, set an exception and return ``-1``." msgstr "" -#: ../../../c-api/type.rst:511 +#: ../../../c-api/type.rst:515 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 "" -#: ../../../c-api/type.rst:516 +#: ../../../c-api/type.rst:520 msgid "" "\n" "\n" @@ -591,27 +591,27 @@ msgid "" "" msgstr "" -#: ../../../c-api/type.rst:527 +#: ../../../c-api/type.rst:531 msgid "Structure defining a type's behavior." msgstr "" -#: ../../../c-api/type.rst:531 +#: ../../../c-api/type.rst:535 msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." msgstr "" -#: ../../../c-api/type.rst:535 +#: ../../../c-api/type.rst:539 msgid "" "If positive, specifies the size of the instance in bytes. It is used to set :" "c:member:`PyTypeObject.tp_basicsize`." msgstr "" -#: ../../../c-api/type.rst:538 +#: ../../../c-api/type.rst:542 msgid "" "If zero, specifies that :c:member:`~PyTypeObject.tp_basicsize` should be " "inherited." msgstr "" -#: ../../../c-api/type.rst:541 +#: ../../../c-api/type.rst:545 msgid "" "If negative, the absolute value specifies how much space instances of the " "class need *in addition* to the superclass. Use :c:func:" @@ -621,17 +621,17 @@ msgid "" "requirements." msgstr "" -#: ../../../c-api/type.rst:551 +#: ../../../c-api/type.rst:555 msgid "Previously, this field could not be negative." msgstr "" -#: ../../../c-api/type.rst:555 +#: ../../../c-api/type.rst:559 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 "" -#: ../../../c-api/type.rst:559 +#: ../../../c-api/type.rst:563 msgid "" "If zero, :c:member:`~PyTypeObject.tp_itemsize` is inherited. Extending " "arbitrary variable-sized classes is dangerous, since some types use a fixed " @@ -640,65 +640,65 @@ msgid "" "only possible in the following situations:" msgstr "" -#: ../../../c-api/type.rst:566 +#: ../../../c-api/type.rst:570 msgid "" "The base is not variable-sized (its :c:member:`~PyTypeObject.tp_itemsize`)." msgstr "" -#: ../../../c-api/type.rst:568 +#: ../../../c-api/type.rst:572 msgid "" "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:570 +#: ../../../c-api/type.rst:574 msgid "" "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:573 +#: ../../../c-api/type.rst:577 msgid "With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag." msgstr "" -#: ../../../c-api/type.rst:577 +#: ../../../c-api/type.rst:581 msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." msgstr "" -#: ../../../c-api/type.rst:579 +#: ../../../c-api/type.rst:583 msgid "" "If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:" "`PyType_FromSpecWithBases` sets it automatically." msgstr "" -#: ../../../c-api/type.rst:584 +#: ../../../c-api/type.rst:588 msgid "" "Array of :c:type:`PyType_Slot` structures. Terminated by the special slot " "value ``{0, NULL}``." msgstr "" -#: ../../../c-api/type.rst:587 +#: ../../../c-api/type.rst:591 msgid "Each slot ID should be specified at most once." msgstr "" -#: ../../../c-api/type.rst:589 +#: ../../../c-api/type.rst:593 msgid "" "\n" "\n" "" msgstr "" -#: ../../../c-api/type.rst:597 +#: ../../../c-api/type.rst:601 msgid "" "Structure defining optional functionality of a type, containing a slot ID " "and a value pointer." msgstr "" -#: ../../../c-api/type.rst:602 +#: ../../../c-api/type.rst:606 msgid "A slot ID." msgstr "" -#: ../../../c-api/type.rst:604 +#: ../../../c-api/type.rst:608 msgid "" "Slot IDs are named like the field names of the structures :c:type:" "`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:" @@ -706,52 +706,52 @@ msgid "" "prefix. For example, use:" msgstr "" -#: ../../../c-api/type.rst:610 +#: ../../../c-api/type.rst:614 msgid ":c:data:`Py_tp_dealloc` to set :c:member:`PyTypeObject.tp_dealloc`" msgstr "" -#: ../../../c-api/type.rst:611 +#: ../../../c-api/type.rst:615 msgid ":c:data:`Py_nb_add` to set :c:member:`PyNumberMethods.nb_add`" msgstr "" -#: ../../../c-api/type.rst:612 +#: ../../../c-api/type.rst:616 msgid ":c:data:`Py_sq_length` to set :c:member:`PySequenceMethods.sq_length`" msgstr "" -#: ../../../c-api/type.rst:614 +#: ../../../c-api/type.rst:618 msgid "" "An additional slot is supported that does not correspond to a :c:type:`!" "PyTypeObject` struct field:" msgstr "" -#: ../../../c-api/type.rst:617 +#: ../../../c-api/type.rst:621 msgid ":c:data:`Py_tp_token`" msgstr "" -#: ../../../c-api/type.rst:619 +#: ../../../c-api/type.rst:623 msgid "" "The following “offset” fields cannot be set using :c:type:`PyType_Slot`:" msgstr "" -#: ../../../c-api/type.rst:621 +#: ../../../c-api/type.rst:625 msgid "" ":c:member:`~PyTypeObject.tp_weaklistoffset` (use :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` instead if possible)" msgstr "" -#: ../../../c-api/type.rst:623 +#: ../../../c-api/type.rst:627 msgid "" ":c:member:`~PyTypeObject.tp_dictoffset` (use :c:macro:" "`Py_TPFLAGS_MANAGED_DICT` instead if possible)" msgstr "" -#: ../../../c-api/type.rst:625 +#: ../../../c-api/type.rst:629 msgid "" ":c:member:`~PyTypeObject.tp_vectorcall_offset` (use " "``\"__vectorcalloffset__\"`` in :ref:`PyMemberDef `)" msgstr "" -#: ../../../c-api/type.rst:629 +#: ../../../c-api/type.rst:633 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:" @@ -759,103 +759,103 @@ msgid "" "offsets>` for details." msgstr "" -#: ../../../c-api/type.rst:635 +#: ../../../c-api/type.rst:639 msgid "" "The following internal fields cannot be set at all when creating a heap type:" msgstr "" -#: ../../../c-api/type.rst:638 +#: ../../../c-api/type.rst:642 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:644 +#: ../../../c-api/type.rst:648 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 "" -#: ../../../c-api/type.rst:649 +#: ../../../c-api/type.rst:653 msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." msgstr "" -#: ../../../c-api/type.rst:652 +#: ../../../c-api/type.rst:656 msgid "" ":c:member:`~PyBufferProcs.bf_getbuffer` and :c:member:`~PyBufferProcs." "bf_releasebuffer` are now available under the :ref:`limited API `." msgstr "" -#: ../../../c-api/type.rst:657 +#: ../../../c-api/type.rst:661 msgid "" "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:664 +#: ../../../c-api/type.rst:668 msgid "" "The desired value of the slot. In most cases, this is a pointer to a " "function." msgstr "" -#: ../../../c-api/type.rst:667 +#: ../../../c-api/type.rst:671 msgid "*pfunc* values may not be ``NULL``, except for the following slots:" msgstr "" -#: ../../../c-api/type.rst:669 +#: ../../../c-api/type.rst:673 msgid ":c:data:`Py_tp_doc`" msgstr "" -#: ../../../c-api/type.rst:670 +#: ../../../c-api/type.rst:674 msgid "" ":c:data:`Py_tp_token` (for clarity, prefer :c:data:`Py_TP_USE_SPEC` rather " "than ``NULL``)" msgstr "" -#: ../../../c-api/type.rst:676 +#: ../../../c-api/type.rst:680 msgid "" "A :c:member:`~PyType_Slot.slot` that records a static memory layout ID for a " "class." msgstr "" -#: ../../../c-api/type.rst:679 +#: ../../../c-api/type.rst:683 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 "" -#: ../../../c-api/type.rst:688 +#: ../../../c-api/type.rst:692 msgid "It can also be set to an arbitrary pointer, but you must ensure that:" msgstr "" -#: ../../../c-api/type.rst:690 +#: ../../../c-api/type.rst:694 msgid "" "The pointer outlives the class, so it's not reused for something else while " "the class exists." msgstr "" -#: ../../../c-api/type.rst:692 +#: ../../../c-api/type.rst:696 msgid "" "It \"belongs\" to the extension module where the class lives, so it will not " "clash with other extensions." msgstr "" -#: ../../../c-api/type.rst:695 +#: ../../../c-api/type.rst:699 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:698 +#: ../../../c-api/type.rst:702 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:707 +#: ../../../c-api/type.rst:711 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``." diff --git a/main/locale/pot/LC_MESSAGES/deprecations/c-api-pending-removal-in-3.19.pot b/main/locale/pot/LC_MESSAGES/deprecations/c-api-pending-removal-in-3.19.pot index 3ea02d4e499..67c5f0c0872 100644 --- a/main/locale/pot/LC_MESSAGES/deprecations/c-api-pending-removal-in-3.19.pot +++ b/main/locale/pot/LC_MESSAGES/deprecations/c-api-pending-removal-in-3.19.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/main/locale/pot/LC_MESSAGES/deprecations/index.pot b/main/locale/pot/LC_MESSAGES/deprecations/index.pot index 2436965d5b3..9fe0cc705f4 100644 --- a/main/locale/pot/LC_MESSAGES/deprecations/index.pot +++ b/main/locale/pot/LC_MESSAGES/deprecations/index.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -446,10 +446,16 @@ 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:6 +#: ../../../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 " @@ -503,108 +509,121 @@ 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:8 +#: ../../../deprecations/pending-removal-in-3.20.rst:15 msgid ":mod:`argparse`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:9 +#: ../../../deprecations/pending-removal-in-3.20.rst:16 msgid ":mod:`csv`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:10 +#: ../../../deprecations/pending-removal-in-3.20.rst:17 msgid ":mod:`ctypes`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:11 +#: ../../../deprecations/pending-removal-in-3.20.rst:18 msgid ":mod:`!ctypes.macholib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:12 +#: ../../../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:13 +#: ../../../deprecations/pending-removal-in-3.20.rst:20 msgid ":mod:`http.server`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:14 +#: ../../../deprecations/pending-removal-in-3.20.rst:21 msgid ":mod:`imaplib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:15 +#: ../../../deprecations/pending-removal-in-3.20.rst:22 msgid ":mod:`ipaddress`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:16 +#: ../../../deprecations/pending-removal-in-3.20.rst:23 msgid ":mod:`json`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:17 +#: ../../../deprecations/pending-removal-in-3.20.rst:24 msgid ":mod:`logging` (``__date__`` also deprecated)" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:18 +#: ../../../deprecations/pending-removal-in-3.20.rst:25 msgid ":mod:`optparse`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:19 +#: ../../../deprecations/pending-removal-in-3.20.rst:26 msgid ":mod:`pickle`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:20 +#: ../../../deprecations/pending-removal-in-3.20.rst:27 msgid ":mod:`platform`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:21 +#: ../../../deprecations/pending-removal-in-3.20.rst:28 msgid ":mod:`re`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:22 +#: ../../../deprecations/pending-removal-in-3.20.rst:29 msgid ":mod:`socketserver`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:23 +#: ../../../deprecations/pending-removal-in-3.20.rst:30 msgid ":mod:`tabnanny`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:24 +#: ../../../deprecations/pending-removal-in-3.20.rst:31 msgid ":mod:`tarfile`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:25 +#: ../../../deprecations/pending-removal-in-3.20.rst:32 msgid ":mod:`tkinter.font`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:26 +#: ../../../deprecations/pending-removal-in-3.20.rst:33 msgid ":mod:`tkinter.ttk`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:27 +#: ../../../deprecations/pending-removal-in-3.20.rst:34 msgid ":mod:`wsgiref.simple_server`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:28 +#: ../../../deprecations/pending-removal-in-3.20.rst:35 msgid ":mod:`xml.etree.ElementTree`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:29 +#: ../../../deprecations/pending-removal-in-3.20.rst:36 msgid ":mod:`!xml.sax.expatreader`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:30 +#: ../../../deprecations/pending-removal-in-3.20.rst:37 msgid ":mod:`xml.sax.handler`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:31 +#: ../../../deprecations/pending-removal-in-3.20.rst:38 msgid ":mod:`zlib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:33 +#: ../../../deprecations/pending-removal-in-3.20.rst:40 msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.18.pot b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.18.pot index 0be7a766cd5..8ef6f73d796 100644 --- a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.18.pot +++ b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.18.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,10 +22,16 @@ 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:6 +#: ../../../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 " diff --git a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.20.pot b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.20.pot index d0d31f41eb5..c9f527ccd5b 100644 --- a/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.20.pot +++ b/main/locale/pot/LC_MESSAGES/deprecations/pending-removal-in-3.20.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -23,107 +23,120 @@ 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:8 +#: ../../../deprecations/pending-removal-in-3.20.rst:15 msgid ":mod:`argparse`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:9 +#: ../../../deprecations/pending-removal-in-3.20.rst:16 msgid ":mod:`csv`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:10 +#: ../../../deprecations/pending-removal-in-3.20.rst:17 msgid ":mod:`ctypes`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:11 +#: ../../../deprecations/pending-removal-in-3.20.rst:18 msgid ":mod:`!ctypes.macholib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:12 +#: ../../../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:13 +#: ../../../deprecations/pending-removal-in-3.20.rst:20 msgid ":mod:`http.server`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:14 +#: ../../../deprecations/pending-removal-in-3.20.rst:21 msgid ":mod:`imaplib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:15 +#: ../../../deprecations/pending-removal-in-3.20.rst:22 msgid ":mod:`ipaddress`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:16 +#: ../../../deprecations/pending-removal-in-3.20.rst:23 msgid ":mod:`json`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:17 +#: ../../../deprecations/pending-removal-in-3.20.rst:24 msgid ":mod:`logging` (``__date__`` also deprecated)" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:18 +#: ../../../deprecations/pending-removal-in-3.20.rst:25 msgid ":mod:`optparse`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:19 +#: ../../../deprecations/pending-removal-in-3.20.rst:26 msgid ":mod:`pickle`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:20 +#: ../../../deprecations/pending-removal-in-3.20.rst:27 msgid ":mod:`platform`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:21 +#: ../../../deprecations/pending-removal-in-3.20.rst:28 msgid ":mod:`re`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:22 +#: ../../../deprecations/pending-removal-in-3.20.rst:29 msgid ":mod:`socketserver`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:23 +#: ../../../deprecations/pending-removal-in-3.20.rst:30 msgid ":mod:`tabnanny`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:24 +#: ../../../deprecations/pending-removal-in-3.20.rst:31 msgid ":mod:`tarfile`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:25 +#: ../../../deprecations/pending-removal-in-3.20.rst:32 msgid ":mod:`tkinter.font`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:26 +#: ../../../deprecations/pending-removal-in-3.20.rst:33 msgid ":mod:`tkinter.ttk`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:27 +#: ../../../deprecations/pending-removal-in-3.20.rst:34 msgid ":mod:`wsgiref.simple_server`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:28 +#: ../../../deprecations/pending-removal-in-3.20.rst:35 msgid ":mod:`xml.etree.ElementTree`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:29 +#: ../../../deprecations/pending-removal-in-3.20.rst:36 msgid ":mod:`!xml.sax.expatreader`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:30 +#: ../../../deprecations/pending-removal-in-3.20.rst:37 msgid ":mod:`xml.sax.handler`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:31 +#: ../../../deprecations/pending-removal-in-3.20.rst:38 msgid ":mod:`zlib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:33 +#: ../../../deprecations/pending-removal-in-3.20.rst:40 msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/faq/programming.pot b/main/locale/pot/LC_MESSAGES/faq/programming.pot index 60da8368bfb..a0ed0f6bc6e 100644 --- a/main/locale/pot/LC_MESSAGES/faq/programming.pot +++ b/main/locale/pot/LC_MESSAGES/faq/programming.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -26,16 +26,15 @@ msgid "Contents" msgstr "" #: ../../../faq/programming.rst:12 -msgid "General Questions" +msgid "General questions" msgstr "" #: ../../../faq/programming.rst:15 msgid "" -"Is there a source code level debugger with breakpoints, single-stepping, " -"etc.?" +"Is there a source code-level debugger with breakpoints and single-stepping?" msgstr "" -#: ../../../faq/programming.rst:17 ../../../faq/programming.rst:58 +#: ../../../faq/programming.rst:17 ../../../faq/programming.rst:56 msgid "Yes." msgstr "" @@ -56,12 +55,11 @@ msgstr "" #: ../../../faq/programming.rst:27 msgid "" "The IDLE interactive development environment, which is part of the standard " -"Python distribution (normally available as `Tools/scripts/idle3 `_), includes a " +"Python distribution (normally available as :mod:`idlelib`), includes a " "graphical debugger." msgstr "" -#: ../../../faq/programming.rst:32 +#: ../../../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 " @@ -71,58 +69,55 @@ msgid "" "distribution." msgstr "" -#: ../../../faq/programming.rst:39 +#: ../../../faq/programming.rst:38 msgid "" "`Eric `_ is an IDE built on PyQt and " "the Scintilla editing component." msgstr "" -#: ../../../faq/programming.rst:42 +#: ../../../faq/programming.rst:41 msgid "" "`trepan3k `_ is a gdb-like " "debugger." msgstr "" -#: ../../../faq/programming.rst:44 +#: ../../../faq/programming.rst:43 msgid "" "`Visual Studio Code `_ is an IDE with " "debugging tools that integrates with version-control software." msgstr "" -#: ../../../faq/programming.rst:47 +#: ../../../faq/programming.rst:46 msgid "" "There are a number of commercial Python IDEs that include graphical " "debuggers. They include:" msgstr "" -#: ../../../faq/programming.rst:50 +#: ../../../faq/programming.rst:49 msgid "`Wing IDE `_" msgstr "" -#: ../../../faq/programming.rst:51 -msgid "`Komodo IDE `_" -msgstr "" - -#: ../../../faq/programming.rst:52 +#: ../../../faq/programming.rst:50 msgid "`PyCharm `_" msgstr "" -#: ../../../faq/programming.rst:56 +#: ../../../faq/programming.rst:54 msgid "Are there tools to help find bugs or perform static analysis?" msgstr "" -#: ../../../faq/programming.rst:60 +#: ../../../faq/programming.rst:58 msgid "" -"`Pylint `_ and `Pyflakes " -"`_ do basic checking that will help you " -"catch bugs sooner." +"`Ruff `__, `Pylint `__ and `Pyflakes `__ do basic " +"checking that will help you catch bugs sooner." msgstr "" -#: ../../../faq/programming.rst:64 +#: ../../../faq/programming.rst:63 msgid "" -"Static type checkers such as `Mypy `_, `Pyre " -"`_, and `Pytype `_ can check type hints in Python source code." +"Static type checkers such as `mypy `__, `ty `__, `Pyrefly `__, and `pytype " +"`__ can check type hints in Python source " +"code." msgstr "" #: ../../../faq/programming.rst:73 @@ -141,10 +136,9 @@ msgstr "" #: ../../../faq/programming.rst:81 msgid "" "One is to use the freeze tool, which is included in the Python source tree " -"as `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." +"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 @@ -192,44 +186,44 @@ msgstr "" msgid "`py2exe `_ (Windows only)" msgstr "" -#: ../../../faq/programming.rst:107 +#: ../../../faq/programming.rst:108 msgid "Are there coding standards or a style guide for Python programs?" msgstr "" -#: ../../../faq/programming.rst:109 +#: ../../../faq/programming.rst:110 msgid "" "Yes. The coding style required for standard library modules is documented " "as :pep:`8`." msgstr "" -#: ../../../faq/programming.rst:114 -msgid "Core Language" +#: ../../../faq/programming.rst:115 +msgid "Core language" msgstr "" -#: ../../../faq/programming.rst:119 +#: ../../../faq/programming.rst:120 msgid "Why am I getting an UnboundLocalError when the variable has a value?" msgstr "" -#: ../../../faq/programming.rst:121 +#: ../../../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:125 +#: ../../../faq/programming.rst:126 msgid "This code:" msgstr "" -#: ../../../faq/programming.rst:134 +#: ../../../faq/programming.rst:135 msgid "works, but this code:" msgstr "" -#: ../../../faq/programming.rst:141 +#: ../../../faq/programming.rst:142 msgid "results in an :exc:`!UnboundLocalError`:" msgstr "" -#: ../../../faq/programming.rst:148 +#: ../../../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 " @@ -239,30 +233,30 @@ msgid "" "uninitialized local variable and an error results." msgstr "" -#: ../../../faq/programming.rst:155 +#: ../../../faq/programming.rst:156 msgid "" "In the example above you can access the outer scope variable by declaring it " "global:" msgstr "" -#: ../../../faq/programming.rst:167 +#: ../../../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:174 +#: ../../../faq/programming.rst:175 msgid "" "You can do a similar thing in a nested scope using the :keyword:`nonlocal` " "keyword:" msgstr "" -#: ../../../faq/programming.rst:192 +#: ../../../faq/programming.rst:193 msgid "What are the rules for local and global variables in Python?" msgstr "" -#: ../../../faq/programming.rst:194 +#: ../../../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 " @@ -270,7 +264,7 @@ msgid "" "global." msgstr "" -#: ../../../faq/programming.rst:198 +#: ../../../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 " @@ -281,19 +275,19 @@ msgid "" "of the ``global`` declaration for identifying side-effects." msgstr "" -#: ../../../faq/programming.rst:208 +#: ../../../faq/programming.rst:209 msgid "" "Why do lambdas defined in a loop with different values all return the same " "result?" msgstr "" -#: ../../../faq/programming.rst:210 +#: ../../../faq/programming.rst:211 msgid "" "Assume you use a for loop to define a few different lambdas (or even plain " -"functions), e.g.::" +"functions), for example::" msgstr "" -#: ../../../faq/programming.rst:217 +#: ../../../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``, " @@ -301,22 +295,23 @@ msgid "" "see that they all return ``16``::" msgstr "" -#: ../../../faq/programming.rst:227 +#: ../../../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``, i.e. ``16``. You can also verify this by " -"changing the value of ``x`` and see how the results of the lambdas change::" +"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:237 +#: ../../../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:244 +#: ../../../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 " @@ -325,17 +320,17 @@ msgid "" "Therefore each lambda will now return the correct result::" msgstr "" -#: ../../../faq/programming.rst:255 +#: ../../../faq/programming.rst:256 msgid "" "Note that this behaviour is not peculiar to lambdas, but applies to regular " "functions too." msgstr "" -#: ../../../faq/programming.rst:260 +#: ../../../faq/programming.rst:261 msgid "How do I share global variables across modules?" msgstr "" -#: ../../../faq/programming.rst:262 +#: ../../../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 " @@ -345,36 +340,36 @@ msgid "" "everywhere. For example:" msgstr "" -#: ../../../faq/programming.rst:268 +#: ../../../faq/programming.rst:269 msgid "config.py::" msgstr "" -#: ../../../faq/programming.rst:272 +#: ../../../faq/programming.rst:273 msgid "mod.py::" msgstr "" -#: ../../../faq/programming.rst:277 +#: ../../../faq/programming.rst:278 msgid "main.py::" msgstr "" -#: ../../../faq/programming.rst:283 +#: ../../../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:288 +#: ../../../faq/programming.rst:289 msgid "What are the \"best practices\" for using import in a module?" msgstr "" -#: ../../../faq/programming.rst:290 +#: ../../../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:294 +#: ../../../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 " @@ -382,33 +377,33 @@ msgid "" "module imports, but using multiple imports per line uses less screen space." msgstr "" -#: ../../../faq/programming.rst:299 +#: ../../../faq/programming.rst:300 msgid "It's good practice if you import modules in the following order:" msgstr "" -#: ../../../faq/programming.rst:301 +#: ../../../faq/programming.rst:302 msgid "" -"standard library modules -- e.g. :mod:`sys`, :mod:`os`, :mod:`argparse`, :" +"standard library modules -- such as :mod:`sys`, :mod:`os`, :mod:`argparse`, :" "mod:`re`" msgstr "" -#: ../../../faq/programming.rst:302 +#: ../../../faq/programming.rst:303 msgid "" "third-party library modules (anything installed in Python's site-packages " -"directory) -- e.g. :mod:`!dateutil`, :mod:`!requests`, :mod:`!PIL.Image`" +"directory) -- such as :pypi:`dateutil`, :pypi:`requests`, :pypi:`tzdata`" msgstr "" -#: ../../../faq/programming.rst:304 +#: ../../../faq/programming.rst:305 msgid "locally developed modules" msgstr "" -#: ../../../faq/programming.rst:306 +#: ../../../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:309 +#: ../../../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 " @@ -417,7 +412,7 @@ msgid "" "module is busy importing the 2nd." msgstr "" -#: ../../../faq/programming.rst:315 +#: ../../../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 " @@ -425,7 +420,7 @@ msgid "" "module can do its import." msgstr "" -#: ../../../faq/programming.rst:320 +#: ../../../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 " @@ -434,7 +429,7 @@ msgid "" "a good option." msgstr "" -#: ../../../faq/programming.rst:325 +#: ../../../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 " @@ -448,24 +443,24 @@ msgid "" "of scope, the module is probably available in :data:`sys.modules`." msgstr "" -#: ../../../faq/programming.rst:338 +#: ../../../faq/programming.rst:339 msgid "Why are default values shared between objects?" msgstr "" -#: ../../../faq/programming.rst:340 +#: ../../../faq/programming.rst:341 msgid "" "This type of bug commonly bites neophyte programmers. Consider this " "function::" msgstr "" -#: ../../../faq/programming.rst:347 +#: ../../../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:351 +#: ../../../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, " @@ -474,14 +469,14 @@ msgid "" "this changed object." msgstr "" -#: ../../../faq/programming.rst:356 +#: ../../../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:360 +#: ../../../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 " @@ -489,11 +484,11 @@ msgid "" "list/dictionary/whatever if it is. For example, don't write::" msgstr "" -#: ../../../faq/programming.rst:368 +#: ../../../faq/programming.rst:369 msgid "but::" msgstr "" -#: ../../../faq/programming.rst:374 +#: ../../../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 " @@ -502,18 +497,18 @@ msgid "" "implemented like this::" msgstr "" -#: ../../../faq/programming.rst:389 +#: ../../../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:394 +#: ../../../faq/programming.rst:395 msgid "" "How can I pass optional or keyword parameters from one function to another?" msgstr "" -#: ../../../faq/programming.rst:396 +#: ../../../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 " @@ -521,11 +516,11 @@ msgid "" "arguments when calling another function by using ``*`` and ``**``::" msgstr "" -#: ../../../faq/programming.rst:415 +#: ../../../faq/programming.rst:416 msgid "What is the difference between arguments and parameters?" msgstr "" -#: ../../../faq/programming.rst:417 +#: ../../../faq/programming.rst:418 msgid "" ":term:`Parameters ` are defined by the names that appear in a " "function definition, whereas :term:`arguments ` are the values " @@ -534,34 +529,34 @@ msgid "" "the function definition::" msgstr "" -#: ../../../faq/programming.rst:426 +#: ../../../faq/programming.rst:427 msgid "" "*foo*, *bar* and *kwargs* are parameters of ``func``. However, when calling " "``func``, for example::" msgstr "" -#: ../../../faq/programming.rst:431 +#: ../../../faq/programming.rst:432 msgid "the values ``42``, ``314``, and ``somevar`` are arguments." msgstr "" -#: ../../../faq/programming.rst:435 +#: ../../../faq/programming.rst:436 msgid "Why did changing list 'y' also change list 'x'?" msgstr "" -#: ../../../faq/programming.rst:437 +#: ../../../faq/programming.rst:438 msgid "If you wrote code like::" msgstr "" -#: ../../../faq/programming.rst:447 +#: ../../../faq/programming.rst:448 msgid "" "you might be wondering why appending an element to ``y`` changed ``x`` too." msgstr "" -#: ../../../faq/programming.rst:449 +#: ../../../faq/programming.rst:450 msgid "There are two factors that produce this result:" msgstr "" -#: ../../../faq/programming.rst:451 +#: ../../../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 " @@ -569,23 +564,23 @@ msgid "" "(the list), and both ``x`` and ``y`` refer to it." msgstr "" -#: ../../../faq/programming.rst:455 +#: ../../../faq/programming.rst:456 msgid "" "Lists are :term:`mutable`, which means that you can change their content." msgstr "" -#: ../../../faq/programming.rst:457 +#: ../../../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:461 +#: ../../../faq/programming.rst:462 msgid "If we instead assign an immutable object to ``x``::" msgstr "" -#: ../../../faq/programming.rst:471 +#: ../../../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 " @@ -596,7 +591,7 @@ msgid "" "(``x`` now refers to ``6`` but ``y`` still refers to ``5``)." msgstr "" -#: ../../../faq/programming.rst:479 +#: ../../../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 + " @@ -608,7 +603,7 @@ msgid "" "which will likely cause your program to generate an easily diagnosed error." msgstr "" -#: ../../../faq/programming.rst:488 +#: ../../../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 " @@ -618,81 +613,81 @@ msgid "" "1`` create new objects)." msgstr "" -#: ../../../faq/programming.rst:495 +#: ../../../faq/programming.rst:496 msgid "In other words:" msgstr "" -#: ../../../faq/programming.rst:497 +#: ../../../faq/programming.rst:498 msgid "" -"If we have a mutable object (:class:`list`, :class:`dict`, :class:`set`, " -"etc.), we can use some specific operations to mutate it and all the " +"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:500 +#: ../../../faq/programming.rst:501 msgid "" -"If we have an immutable object (:class:`str`, :class:`int`, :class:`tuple`, " -"etc.), all the variables that refer to it will always see the same value, " +"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:505 +#: ../../../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:510 +#: ../../../faq/programming.rst:511 msgid "How do I write a function with output parameters (call by reference)?" msgstr "" -#: ../../../faq/programming.rst:512 +#: ../../../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 so no call-by-reference per se. " -"You can achieve the desired effect in a number of ways." +"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:517 +#: ../../../faq/programming.rst:518 msgid "By returning a tuple of the results::" msgstr "" -#: ../../../faq/programming.rst:528 +#: ../../../faq/programming.rst:529 msgid "This is almost always the clearest solution." msgstr "" -#: ../../../faq/programming.rst:530 +#: ../../../faq/programming.rst:531 msgid "" "By using global variables. This isn't thread-safe, and is not recommended." msgstr "" -#: ../../../faq/programming.rst:532 +#: ../../../faq/programming.rst:533 msgid "By passing a mutable (changeable in-place) object::" msgstr "" -#: ../../../faq/programming.rst:543 +#: ../../../faq/programming.rst:544 msgid "By passing in a dictionary that gets mutated::" msgstr "" -#: ../../../faq/programming.rst:554 +#: ../../../faq/programming.rst:555 msgid "Or bundle up values in a class instance::" msgstr "" -#: ../../../faq/programming.rst:571 +#: ../../../faq/programming.rst:572 msgid "There's almost never a good reason to get this complicated." msgstr "" -#: ../../../faq/programming.rst:573 +#: ../../../faq/programming.rst:574 msgid "Your best choice is to return a tuple containing the multiple results." msgstr "" -#: ../../../faq/programming.rst:577 +#: ../../../faq/programming.rst:578 msgid "How do you make a higher order function in Python?" msgstr "" -#: ../../../faq/programming.rst:579 +#: ../../../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 " @@ -700,71 +695,71 @@ msgid "" "scopes::" msgstr "" -#: ../../../faq/programming.rst:588 +#: ../../../faq/programming.rst:589 msgid "Or using a callable object::" msgstr "" -#: ../../../faq/programming.rst:598 +#: ../../../faq/programming.rst:599 msgid "In both cases, ::" msgstr "" -#: ../../../faq/programming.rst:602 +#: ../../../faq/programming.rst:603 msgid "gives a callable object where ``taxes(10e6) == 0.3 * 10e6 + 2``." msgstr "" -#: ../../../faq/programming.rst:604 +#: ../../../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:613 +#: ../../../faq/programming.rst:614 msgid "Object can encapsulate state for several methods::" msgstr "" -#: ../../../faq/programming.rst:631 +#: ../../../faq/programming.rst:632 msgid "" "Here ``inc()``, ``dec()`` and ``reset()`` act like functions which share the " "same counting variable." msgstr "" -#: ../../../faq/programming.rst:636 +#: ../../../faq/programming.rst:637 msgid "How do I copy an object in Python?" msgstr "" -#: ../../../faq/programming.rst:638 +#: ../../../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:641 +#: ../../../faq/programming.rst:642 msgid "" "Some objects can be copied more easily. Dictionaries have a :meth:`~dict." "copy` method::" msgstr "" -#: ../../../faq/programming.rst:646 +#: ../../../faq/programming.rst:647 msgid "Sequences can be copied by slicing::" msgstr "" -#: ../../../faq/programming.rst:652 +#: ../../../faq/programming.rst:653 msgid "How can I find the methods or attributes of an object?" msgstr "" -#: ../../../faq/programming.rst:654 +#: ../../../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:660 +#: ../../../faq/programming.rst:661 msgid "How can my code discover the name of an object?" msgstr "" -#: ../../../faq/programming.rst:662 +#: ../../../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 " @@ -772,7 +767,7 @@ msgid "" "Consider the following code::" msgstr "" -#: ../../../faq/programming.rst:678 +#: ../../../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 " @@ -781,7 +776,7 @@ msgid "" "value." msgstr "" -#: ../../../faq/programming.rst:683 +#: ../../../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 " @@ -789,13 +784,13 @@ msgid "" "approach might be beneficial." msgstr "" -#: ../../../faq/programming.rst:688 +#: ../../../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:691 +#: ../../../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 -- " @@ -803,78 +798,78 @@ msgid "" "(namespaces) if it's their cat (object)..." msgstr "" -#: ../../../faq/programming.rst:696 +#: ../../../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:701 +#: ../../../faq/programming.rst:702 msgid "What's up with the comma operator's precedence?" msgstr "" -#: ../../../faq/programming.rst:703 +#: ../../../faq/programming.rst:704 msgid "Comma is not an operator in Python. Consider this session::" msgstr "" -#: ../../../faq/programming.rst:708 +#: ../../../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:713 +#: ../../../faq/programming.rst:714 msgid "not::" msgstr "" -#: ../../../faq/programming.rst:717 +#: ../../../faq/programming.rst:718 msgid "" -"The same is true of the various assignment operators (``=``, ``+=`` etc). " -"They are not truly operators but syntactic delimiters in assignment " +"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:722 +#: ../../../faq/programming.rst:723 msgid "Is there an equivalent of C's \"?:\" ternary operator?" msgstr "" -#: ../../../faq/programming.rst:724 +#: ../../../faq/programming.rst:725 msgid "Yes, there is. The syntax is as follows::" msgstr "" -#: ../../../faq/programming.rst:731 +#: ../../../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:736 +#: ../../../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:742 +#: ../../../faq/programming.rst:743 msgid "Is it possible to write obfuscated one-liners in Python?" msgstr "" -#: ../../../faq/programming.rst:744 +#: ../../../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:771 +#: ../../../faq/programming.rst:772 msgid "Don't try this at home, kids!" msgstr "" -#: ../../../faq/programming.rst:777 +#: ../../../faq/programming.rst:778 msgid "What does the slash(/) in the parameter list of a function mean?" msgstr "" -#: ../../../faq/programming.rst:779 +#: ../../../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 " @@ -884,53 +879,53 @@ msgid "" "only parameters. Its documentation looks like this::" msgstr "" -#: ../../../faq/programming.rst:792 +#: ../../../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:803 +#: ../../../faq/programming.rst:804 msgid "Numbers and strings" msgstr "" -#: ../../../faq/programming.rst:806 +#: ../../../faq/programming.rst:807 msgid "How do I specify hexadecimal and octal integers?" msgstr "" -#: ../../../faq/programming.rst:808 +#: ../../../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:816 +#: ../../../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:829 +#: ../../../faq/programming.rst:830 msgid "Why does -22 // 10 return -3?" msgstr "" -#: ../../../faq/programming.rst:831 +#: ../../../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:836 +#: ../../../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:840 +#: ../../../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 " @@ -939,34 +934,34 @@ msgid "" "bug waiting to bite." msgstr "" -#: ../../../faq/programming.rst:848 +#: ../../../faq/programming.rst:849 msgid "How do I get int literal attribute instead of SyntaxError?" msgstr "" -#: ../../../faq/programming.rst:850 +#: ../../../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:859 +#: ../../../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:869 +#: ../../../faq/programming.rst:870 msgid "How do I convert a string to a number?" msgstr "" -#: ../../../faq/programming.rst:871 +#: ../../../faq/programming.rst:872 msgid "" -"For integers, use the built-in :func:`int` type constructor, e.g. " +"For integers, use the built-in :func:`int` type constructor, for example, " "``int('144') == 144``. Similarly, :func:`float` converts to a floating-" -"point number, e.g. ``float('144') == 144.0``." +"point number, for example, ``float('144') == 144.0``." msgstr "" -#: ../../../faq/programming.rst:875 +#: ../../../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`. " @@ -976,7 +971,7 @@ msgid "" "octal, and '0x' indicates a hex number." msgstr "" -#: ../../../faq/programming.rst:882 +#: ../../../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 " @@ -986,49 +981,49 @@ msgid "" "directory." msgstr "" -#: ../../../faq/programming.rst:889 +#: ../../../faq/programming.rst:890 msgid "" ":func:`eval` also has the effect of interpreting numbers as Python " -"expressions, so that e.g. ``eval('09')`` gives a syntax error because Python " -"does not allow leading '0' in a decimal number (except '0')." +"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:895 +#: ../../../faq/programming.rst:896 msgid "How do I convert a number to a string?" msgstr "" -#: ../../../faq/programming.rst:897 +#: ../../../faq/programming.rst:898 msgid "" -"To convert, e.g., the number ``144`` to the string ``'144'``, use the built-" -"in type constructor :func:`str`. If you want a hexadecimal or octal " +"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, e.g. ``\"{:04d}\".format(144)`` yields ``'0144'`` and ``\"{:.3f}\"." -"format(1.0/3.0)`` yields ``'0.333'``." +"sections. For example, ``\"{:04d}\".format(144)`` yields ``'0144'`` and " +"``\"{:.3f}\".format(1.0/3.0)`` yields ``'0.333'``." msgstr "" -#: ../../../faq/programming.rst:906 +#: ../../../faq/programming.rst:907 msgid "How do I modify a string in place?" msgstr "" -#: ../../../faq/programming.rst:908 +#: ../../../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` " +"Unicode data, try using an :class:`io.StringIO` object or the :mod:`array` " "module::" msgstr "" -#: ../../../faq/programming.rst:938 +#: ../../../faq/programming.rst:939 msgid "How do I use strings to call functions/methods?" msgstr "" -#: ../../../faq/programming.rst:940 +#: ../../../faq/programming.rst:941 msgid "There are various techniques." msgstr "" -#: ../../../faq/programming.rst:942 +#: ../../../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 " @@ -1036,31 +1031,31 @@ msgid "" "a case construct::" msgstr "" -#: ../../../faq/programming.rst:957 +#: ../../../faq/programming.rst:958 msgid "Use the built-in function :func:`getattr`::" msgstr "" -#: ../../../faq/programming.rst:962 +#: ../../../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:965 +#: ../../../faq/programming.rst:966 msgid "This is used in several places in the standard library, like this::" msgstr "" -#: ../../../faq/programming.rst:978 +#: ../../../faq/programming.rst:979 msgid "Use :func:`locals` to resolve the function name::" msgstr "" -#: ../../../faq/programming.rst:990 +#: ../../../faq/programming.rst:991 msgid "" "Is there an equivalent to Perl's ``chomp()`` for removing trailing newlines " "from strings?" msgstr "" -#: ../../../faq/programming.rst:992 +#: ../../../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 " @@ -1069,21 +1064,21 @@ msgid "" "removed::" msgstr "" -#: ../../../faq/programming.rst:1004 +#: ../../../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:1009 +#: ../../../faq/programming.rst:1010 msgid "Is there a ``scanf()`` or ``sscanf()`` equivalent?" msgstr "" -#: ../../../faq/programming.rst:1011 +#: ../../../faq/programming.rst:1012 msgid "Not as such." msgstr "" -#: ../../../faq/programming.rst:1013 +#: ../../../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 " @@ -1093,49 +1088,49 @@ msgid "" "as a separator." msgstr "" -#: ../../../faq/programming.rst:1019 +#: ../../../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:1024 +#: ../../../faq/programming.rst:1025 msgid "What does ``UnicodeDecodeError`` or ``UnicodeEncodeError`` error mean?" msgstr "" -#: ../../../faq/programming.rst:1026 +#: ../../../faq/programming.rst:1027 msgid "See the :ref:`unicode-howto`." msgstr "" -#: ../../../faq/programming.rst:1032 +#: ../../../faq/programming.rst:1033 msgid "Can I end a raw string with an odd number of backslashes?" msgstr "" -#: ../../../faq/programming.rst:1034 +#: ../../../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:1042 +#: ../../../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:1048 +#: ../../../faq/programming.rst:1049 msgid "" "Another is to concatenate a regular string containing an escaped backslash " "to the raw string::" msgstr "" -#: ../../../faq/programming.rst:1054 +#: ../../../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:1059 +#: ../../../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 " @@ -1143,76 +1138,76 @@ msgid "" "value of the raw string::" msgstr "" -#: ../../../faq/programming.rst:1067 +#: ../../../faq/programming.rst:1068 msgid "Also see the specification in the :ref:`language reference `." msgstr "" -#: ../../../faq/programming.rst:1070 +#: ../../../faq/programming.rst:1072 msgid "Performance" msgstr "" -#: ../../../faq/programming.rst:1073 +#: ../../../faq/programming.rst:1075 msgid "My program is too slow. How do I speed it up?" msgstr "" -#: ../../../faq/programming.rst:1075 +#: ../../../faq/programming.rst:1077 msgid "" -"That's a tough one, in general. First, here are a list of things to " -"remember before diving further:" +"That's a tough one, in general. First, here is list of things to remember " +"before diving further:" msgstr "" -#: ../../../faq/programming.rst:1078 +#: ../../../faq/programming.rst:1080 msgid "" "Performance characteristics vary across Python implementations. This FAQ " "focuses on :term:`CPython`." msgstr "" -#: ../../../faq/programming.rst:1080 +#: ../../../faq/programming.rst:1082 msgid "" "Behaviour can vary across operating systems, especially when talking about I/" "O or multi-threading." msgstr "" -#: ../../../faq/programming.rst:1082 +#: ../../../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:1084 +#: ../../../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:1086 +#: ../../../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:1090 +#: ../../../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:1094 +#: ../../../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:1098 +#: ../../../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:1101 +#: ../../../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 " @@ -1223,7 +1218,7 @@ msgid "" "advanced usage)." msgstr "" -#: ../../../faq/programming.rst:1109 +#: ../../../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, " @@ -1232,7 +1227,7 @@ msgid "" "detrimental to readability)." msgstr "" -#: ../../../faq/programming.rst:1115 +#: ../../../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 " @@ -1244,17 +1239,17 @@ msgid "" "yourself." msgstr "" -#: ../../../faq/programming.rst:1125 +#: ../../../faq/programming.rst:1127 msgid "" "The wiki page devoted to `performance tips `_." msgstr "" -#: ../../../faq/programming.rst:1131 +#: ../../../faq/programming.rst:1134 msgid "What is the most efficient way to concatenate many strings together?" msgstr "" -#: ../../../faq/programming.rst:1133 +#: ../../../faq/programming.rst:1136 msgid "" ":class:`str` and :class:`bytes` objects are immutable, therefore " "concatenating many strings together is inefficient as each concatenation " @@ -1262,38 +1257,38 @@ msgid "" "quadratic in the total string length." msgstr "" -#: ../../../faq/programming.rst:1138 +#: ../../../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:1146 -msgid "(another reasonably efficient idiom is to use :class:`io.StringIO`)" +#: ../../../faq/programming.rst:1149 +msgid "(Another reasonably efficient idiom is to use :class:`io.StringIO`.)" msgstr "" -#: ../../../faq/programming.rst:1148 +#: ../../../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:1157 -msgid "Sequences (Tuples/Lists)" +#: ../../../faq/programming.rst:1160 +msgid "Sequences (tuples/lists)" msgstr "" -#: ../../../faq/programming.rst:1160 +#: ../../../faq/programming.rst:1163 msgid "How do I convert between tuples and lists?" msgstr "" -#: ../../../faq/programming.rst:1162 +#: ../../../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:1165 +#: ../../../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 " @@ -1301,7 +1296,7 @@ msgid "" "you aren't sure that an object is already a tuple." msgstr "" -#: ../../../faq/programming.rst:1170 +#: ../../../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, " @@ -1309,11 +1304,11 @@ msgid "" "If the argument is a list, it makes a copy just like ``seq[:]`` would." msgstr "" -#: ../../../faq/programming.rst:1177 +#: ../../../faq/programming.rst:1180 msgid "What's a negative index?" msgstr "" -#: ../../../faq/programming.rst:1179 +#: ../../../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 " @@ -1322,62 +1317,62 @@ msgid "" "``seq[len(seq)-n]``." msgstr "" -#: ../../../faq/programming.rst:1184 +#: ../../../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:1190 +#: ../../../faq/programming.rst:1193 msgid "How do I iterate over a sequence in reverse order?" msgstr "" -#: ../../../faq/programming.rst:1192 +#: ../../../faq/programming.rst:1195 msgid "Use the :func:`reversed` built-in function::" msgstr "" -#: ../../../faq/programming.rst:1197 +#: ../../../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:1202 +#: ../../../faq/programming.rst:1205 msgid "How do you remove duplicates from a list?" msgstr "" -#: ../../../faq/programming.rst:1204 +#: ../../../faq/programming.rst:1207 msgid "See the Python Cookbook for a long discussion of many ways to do this:" msgstr "" -#: ../../../faq/programming.rst:1206 +#: ../../../faq/programming.rst:1209 msgid "https://code.activestate.com/recipes/52560/" msgstr "" -#: ../../../faq/programming.rst:1208 +#: ../../../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:1220 +#: ../../../faq/programming.rst:1223 msgid "" -"If all elements of the list may be used as set keys (i.e. they are all :term:" -"`hashable`) this is often faster ::" +"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:1225 +#: ../../../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:1230 +#: ../../../faq/programming.rst:1233 msgid "How do you remove multiple items from a list?" msgstr "" -#: ../../../faq/programming.rst:1232 +#: ../../../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 " @@ -1385,39 +1380,39 @@ msgid "" "variations::" msgstr "" -#: ../../../faq/programming.rst:1241 +#: ../../../faq/programming.rst:1244 msgid "The list comprehension may be fastest." msgstr "" -#: ../../../faq/programming.rst:1245 +#: ../../../faq/programming.rst:1248 msgid "How do you make an array in Python?" msgstr "" -#: ../../../faq/programming.rst:1247 +#: ../../../faq/programming.rst:1250 msgid "Use a list::" msgstr "" -#: ../../../faq/programming.rst:1251 +#: ../../../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:1254 +#: ../../../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 " +"lists. Also note that `NumPy `_ and other third-party " "packages define array-like structures with various characteristics as well." msgstr "" -#: ../../../faq/programming.rst:1260 +#: ../../../faq/programming.rst:1263 msgid "" "To get Lisp-style linked lists, you can emulate *cons cells* using tuples::" msgstr "" -#: ../../../faq/programming.rst:1264 +#: ../../../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 " @@ -1425,23 +1420,23 @@ msgid "" "it's usually a lot slower than using Python lists." msgstr "" -#: ../../../faq/programming.rst:1273 +#: ../../../faq/programming.rst:1276 msgid "How do I create a multidimensional list?" msgstr "" -#: ../../../faq/programming.rst:1275 +#: ../../../faq/programming.rst:1278 msgid "You probably tried to make a multidimensional array like this::" msgstr "" -#: ../../../faq/programming.rst:1279 +#: ../../../faq/programming.rst:1282 msgid "This looks correct if you print it:" msgstr "" -#: ../../../faq/programming.rst:1290 +#: ../../../faq/programming.rst:1293 msgid "But when you assign a value, it shows up in multiple places:" msgstr "" -#: ../../../faq/programming.rst:1302 +#: ../../../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 " @@ -1449,64 +1444,64 @@ msgid "" "will show in all rows, which is almost certainly not what you want." msgstr "" -#: ../../../faq/programming.rst:1307 +#: ../../../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:1314 +#: ../../../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 +#: ../../../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:1325 +#: ../../../faq/programming.rst:1328 msgid "How do I apply a method or function to a sequence of objects?" msgstr "" -#: ../../../faq/programming.rst:1327 +#: ../../../faq/programming.rst:1330 msgid "" -"To call a method or function and accumulate the return values is a list, a :" +"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:1334 +#: ../../../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:1346 +#: ../../../faq/programming.rst:1350 msgid "" "Why does a_tuple[i] += ['item'] raise an exception when the addition works?" msgstr "" -#: ../../../faq/programming.rst:1348 +#: ../../../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:1352 +#: ../../../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:1356 +#: ../../../faq/programming.rst:1360 msgid "If you wrote::" msgstr "" -#: ../../../faq/programming.rst:1364 +#: ../../../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, " @@ -1515,29 +1510,29 @@ msgid "" "an element of a tuple points to." msgstr "" -#: ../../../faq/programming.rst:1370 +#: ../../../faq/programming.rst:1374 msgid "" "Under the covers, what this augmented assignment statement is doing is " "approximately this::" msgstr "" -#: ../../../faq/programming.rst:1379 +#: ../../../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:1382 +#: ../../../faq/programming.rst:1386 msgid "When you write something like::" msgstr "" -#: ../../../faq/programming.rst:1390 +#: ../../../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:1396 +#: ../../../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 ``+=`` " @@ -1548,11 +1543,11 @@ msgid "" "extend`::" msgstr "" -#: ../../../faq/programming.rst:1409 +#: ../../../faq/programming.rst:1413 msgid "This is equivalent to::" msgstr "" -#: ../../../faq/programming.rst:1414 +#: ../../../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 " @@ -1560,11 +1555,11 @@ msgid "" "``a_list`` was previously pointing to, but the assignment still happens." msgstr "" -#: ../../../faq/programming.rst:1419 +#: ../../../faq/programming.rst:1423 msgid "Thus, in our tuple example what is happening is equivalent to::" msgstr "" -#: ../../../faq/programming.rst:1427 +#: ../../../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 " @@ -1572,13 +1567,13 @@ msgid "" "are immutable." msgstr "" -#: ../../../faq/programming.rst:1433 +#: ../../../faq/programming.rst:1437 msgid "" "I want to do a complicated sort: can you do a Schwartzian Transform in " "Python?" msgstr "" -#: ../../../faq/programming.rst:1435 +#: ../../../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 " @@ -1586,25 +1581,25 @@ msgid "" "method::" msgstr "" -#: ../../../faq/programming.rst:1444 +#: ../../../faq/programming.rst:1448 msgid "How can I sort one list by values from another list?" msgstr "" -#: ../../../faq/programming.rst:1446 +#: ../../../faq/programming.rst:1450 msgid "" "Merge them into an iterator of tuples, sort the resulting list, and then " -"pick out the element you want. ::" +"pick out the element you want." msgstr "" -#: ../../../faq/programming.rst:1461 +#: ../../../faq/programming.rst:1465 msgid "Objects" msgstr "" -#: ../../../faq/programming.rst:1464 +#: ../../../faq/programming.rst:1468 msgid "What is a class?" msgstr "" -#: ../../../faq/programming.rst:1466 +#: ../../../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, " @@ -1612,7 +1607,7 @@ msgid "" "datatype." msgstr "" -#: ../../../faq/programming.rst:1470 +#: ../../../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. " @@ -1622,22 +1617,22 @@ msgid "" "``OutlookMailbox`` that handle various specific mailbox formats." msgstr "" -#: ../../../faq/programming.rst:1479 +#: ../../../faq/programming.rst:1483 msgid "What is a method?" msgstr "" -#: ../../../faq/programming.rst:1481 +#: ../../../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:1491 +#: ../../../faq/programming.rst:1495 msgid "What is self?" msgstr "" -#: ../../../faq/programming.rst:1493 +#: ../../../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, " @@ -1645,35 +1640,36 @@ msgid "" "the called method will think it is called as ``meth(x, a, b, c)``." msgstr "" -#: ../../../faq/programming.rst:1498 +#: ../../../faq/programming.rst:1502 msgid "See also :ref:`why-self`." msgstr "" -#: ../../../faq/programming.rst:1502 +#: ../../../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:1504 +#: ../../../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, e.g. ``isinstance(obj, (class1, " -"class2, ...))``, and can also check whether an object is one of Python's " -"built-in types, e.g. ``isinstance(obj, str)`` or ``isinstance(obj, (int, " -"float, complex))``." +"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:1511 +#: ../../../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:`MRO` of the class:" +"To test for \"true inheritance\", scan the :term:`method resolution order` " +"(MRO) of the class:" msgstr "" -#: ../../../faq/programming.rst:1546 +#: ../../../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 " @@ -1683,33 +1679,33 @@ msgid "" "have a function that does something::" msgstr "" -#: ../../../faq/programming.rst:1560 +#: ../../../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:1575 +#: ../../../faq/programming.rst:1580 msgid "What is delegation?" msgstr "" -#: ../../../faq/programming.rst:1577 +#: ../../../faq/programming.rst:1582 msgid "" -"Delegation is an object oriented technique (also called a design pattern). " +"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:1583 +#: ../../../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:1598 +#: ../../../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." @@ -1719,7 +1715,7 @@ msgid "" "access>` for more information about controlling attribute access." msgstr "" -#: ../../../faq/programming.rst:1605 +#: ../../../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:" @@ -1728,29 +1724,29 @@ msgid "" "following::" msgstr "" -#: ../../../faq/programming.rst:1616 +#: ../../../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 +#: ../../../faq/programming.rst:1629 msgid "" "Alternatively, it is possible to set attributes by inserting entries into :" "attr:`self.__dict__ ` directly." msgstr "" -#: ../../../faq/programming.rst:1629 +#: ../../../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:1631 +#: ../../../faq/programming.rst:1636 msgid "Use the built-in :func:`super` function::" msgstr "" -#: ../../../faq/programming.rst:1637 +#: ../../../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 " @@ -1758,42 +1754,42 @@ msgid "" "line after ``Derived`` in the MRO: ``Base``." msgstr "" -#: ../../../faq/programming.rst:1644 +#: ../../../faq/programming.rst:1649 msgid "How can I organize my code to make it easier to change the base class?" msgstr "" -#: ../../../faq/programming.rst:1646 +#: ../../../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 (e.g. depending " -"on availability of resources) which base class to use. Example::" +"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:1661 +#: ../../../faq/programming.rst:1666 msgid "How do I create static class data and static class methods?" msgstr "" -#: ../../../faq/programming.rst:1663 +#: ../../../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:1666 +#: ../../../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:1678 +#: ../../../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:1682 +#: ../../../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 " @@ -1801,59 +1797,59 @@ msgid "" "whether inside a method or not::" msgstr "" -#: ../../../faq/programming.rst:1689 +#: ../../../faq/programming.rst:1694 msgid "Static methods are possible::" msgstr "" -#: ../../../faq/programming.rst:1697 +#: ../../../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:1703 +#: ../../../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:1708 +#: ../../../faq/programming.rst:1713 msgid "How can I overload constructors (or methods) in Python?" msgstr "" -#: ../../../faq/programming.rst:1710 +#: ../../../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:1713 -msgid "In C++ you'd write" +#: ../../../faq/programming.rst:1718 +msgid "In C++ you'd write:" msgstr "" -#: ../../../faq/programming.rst:1722 +#: ../../../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:1732 +#: ../../../faq/programming.rst:1737 msgid "This is not entirely equivalent, but close enough in practice." msgstr "" -#: ../../../faq/programming.rst:1734 -msgid "You could also try a variable-length argument list, e.g. ::" +#: ../../../faq/programming.rst:1739 +msgid "You could also try a variable-length argument list, for example::" msgstr "" -#: ../../../faq/programming.rst:1739 +#: ../../../faq/programming.rst:1744 msgid "The same approach works for all method definitions." msgstr "" -#: ../../../faq/programming.rst:1743 +#: ../../../faq/programming.rst:1748 msgid "I try to use __spam and I get an error about _SomeClassName__spam." msgstr "" -#: ../../../faq/programming.rst:1745 +#: ../../../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 " @@ -1863,55 +1859,55 @@ msgid "" "stripped." msgstr "" -#: ../../../faq/programming.rst:1751 +#: ../../../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:1768 +#: ../../../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:1774 +#: ../../../faq/programming.rst:1779 msgid "" "The :ref:`private name mangling specifications ` for " "details and special cases." msgstr "" -#: ../../../faq/programming.rst:1778 +#: ../../../faq/programming.rst:1784 msgid "My class defines __del__ but it is not called when I delete the object." msgstr "" -#: ../../../faq/programming.rst:1780 +#: ../../../faq/programming.rst:1786 msgid "There are several possible reasons for this." msgstr "" -#: ../../../faq/programming.rst:1782 +#: ../../../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:1786 +#: ../../../faq/programming.rst:1792 msgid "" -"If your data structures contain circular links (e.g. 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." +"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:1797 +#: ../../../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. " @@ -1921,7 +1917,7 @@ msgid "" "once for the same object." msgstr "" -#: ../../../faq/programming.rst:1804 +#: ../../../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 " @@ -1929,28 +1925,28 @@ msgid "" "references for their parent and sibling references (if they need them!)." msgstr "" -#: ../../../faq/programming.rst:1817 +#: ../../../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:1822 +#: ../../../faq/programming.rst:1828 msgid "How do I get a list of all instances of a given class?" msgstr "" -#: ../../../faq/programming.rst:1824 +#: ../../../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:1830 +#: ../../../faq/programming.rst:1836 msgid "Why does the result of ``id()`` appear to be not unique?" msgstr "" -#: ../../../faq/programming.rst:1832 +#: ../../../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 " @@ -1959,7 +1955,7 @@ msgid "" "memory. This is illustrated by this example:" msgstr "" -#: ../../../faq/programming.rst:1843 +#: ../../../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 " @@ -1967,17 +1963,17 @@ msgid "" "reference to the object:" msgstr "" -#: ../../../faq/programming.rst:1858 +#: ../../../faq/programming.rst:1864 msgid "When can I rely on identity tests with the *is* operator?" msgstr "" -#: ../../../faq/programming.rst:1860 +#: ../../../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:1863 +#: ../../../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 " @@ -1985,34 +1981,34 @@ msgid "" "tests are guaranteed to return a boolean ``True`` or ``False``." msgstr "" -#: ../../../faq/programming.rst:1868 +#: ../../../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:1872 +#: ../../../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:1875 +#: ../../../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:1879 +#: ../../../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:1883 +#: ../../../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 " @@ -2020,24 +2016,24 @@ msgid "" "guaranteed to be singletons::" msgstr "" -#: ../../../faq/programming.rst:1900 +#: ../../../faq/programming.rst:1906 msgid "Likewise, new instances of mutable containers are never identical::" msgstr "" -#: ../../../faq/programming.rst:1907 +#: ../../../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:1910 +#: ../../../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:1914 +#: ../../../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 " @@ -2045,25 +2041,25 @@ msgid "" "implement a method that behaves like :meth:`dict.pop`:" msgstr "" -#: ../../../faq/programming.rst:1932 +#: ../../../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:1936 +#: ../../../faq/programming.rst:1942 msgid "" "For example, here is the implementation of :meth:`!collections.abc.Sequence." "__contains__`::" msgstr "" -#: ../../../faq/programming.rst:1947 +#: ../../../faq/programming.rst:1953 msgid "" "How can a subclass control what data is stored in an immutable instance?" msgstr "" -#: ../../../faq/programming.rst:1949 +#: ../../../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 " @@ -2071,35 +2067,35 @@ msgid "" "immutable instance." msgstr "" -#: ../../../faq/programming.rst:1954 +#: ../../../faq/programming.rst:1960 msgid "" "All of these immutable classes have a different signature than their parent " "class:" msgstr "" -#: ../../../faq/programming.rst:1980 +#: ../../../faq/programming.rst:1986 msgid "The classes can be used like this:" msgstr "" -#: ../../../faq/programming.rst:1997 +#: ../../../faq/programming.rst:2003 msgid "How do I cache method calls?" msgstr "" -#: ../../../faq/programming.rst:1999 +#: ../../../faq/programming.rst:2005 msgid "" "The two principal tools for caching methods are :func:`functools." "cached_property` and :func:`functools.lru_cache`. The former stores results " "at the instance level and the latter at the class level." msgstr "" -#: ../../../faq/programming.rst:2004 +#: ../../../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 " +"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:2008 +#: ../../../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 " @@ -2107,47 +2103,47 @@ msgid "" "without bound." msgstr "" -#: ../../../faq/programming.rst:2013 +#: ../../../faq/programming.rst:2019 msgid "" -"The *lru_cache* approach works with methods that have :term:`hashable` " +"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:2017 +#: ../../../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:2022 +#: ../../../faq/programming.rst:2028 msgid "This example shows the various techniques::" msgstr "" -#: ../../../faq/programming.rst:2046 +#: ../../../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 " +"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:2051 +#: ../../../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." +"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:2077 +#: ../../../faq/programming.rst:2083 msgid "Modules" msgstr "" -#: ../../../faq/programming.rst:2080 +#: ../../../faq/programming.rst:2086 msgid "How do I create a .pyc file?" msgstr "" -#: ../../../faq/programming.rst:2082 +#: ../../../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 " @@ -2158,7 +2154,7 @@ msgid "" "particular ``python`` binary that created it. (See :pep:`3147` for details.)" msgstr "" -#: ../../../faq/programming.rst:2090 +#: ../../../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 " @@ -2167,18 +2163,18 @@ msgid "" "testing with a web server." msgstr "" -#: ../../../faq/programming.rst:2095 +#: ../../../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, etc...) to create a " +"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:2100 +#: ../../../faq/programming.rst:2106 msgid "" -"Running Python on a top level script is not considered an import and no ``." +"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 " @@ -2186,27 +2182,27 @@ msgid "" "for ``foo`` since ``foo.py`` isn't being imported." msgstr "" -#: ../../../faq/programming.rst:2107 +#: ../../../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:2111 +#: ../../../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:2117 +#: ../../../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``)." +"*cfile*)." msgstr "" -#: ../../../faq/programming.rst:2121 +#: ../../../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 " @@ -2214,11 +2210,11 @@ msgid "" "Python files to compile::" msgstr "" -#: ../../../faq/programming.rst:2130 +#: ../../../faq/programming.rst:2136 msgid "How do I find the current module name?" msgstr "" -#: ../../../faq/programming.rst:2132 +#: ../../../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 " @@ -2227,79 +2223,79 @@ msgid "" "only execute this code after checking ``__name__``::" msgstr "" -#: ../../../faq/programming.rst:2147 +#: ../../../faq/programming.rst:2153 msgid "How can I have modules that mutually import each other?" msgstr "" -#: ../../../faq/programming.rst:2149 +#: ../../../faq/programming.rst:2155 msgid "Suppose you have the following modules:" msgstr "" -#: ../../../faq/programming.rst:2151 +#: ../../../faq/programming.rst:2157 msgid ":file:`foo.py`::" msgstr "" -#: ../../../faq/programming.rst:2156 +#: ../../../faq/programming.rst:2162 msgid ":file:`bar.py`::" msgstr "" -#: ../../../faq/programming.rst:2161 +#: ../../../faq/programming.rst:2167 msgid "The problem is that the interpreter will perform the following steps:" msgstr "" -#: ../../../faq/programming.rst:2163 +#: ../../../faq/programming.rst:2169 msgid "main imports ``foo``" msgstr "" -#: ../../../faq/programming.rst:2164 +#: ../../../faq/programming.rst:2170 msgid "Empty globals for ``foo`` are created" msgstr "" -#: ../../../faq/programming.rst:2165 +#: ../../../faq/programming.rst:2171 msgid "``foo`` is compiled and starts executing" msgstr "" -#: ../../../faq/programming.rst:2166 +#: ../../../faq/programming.rst:2172 msgid "``foo`` imports ``bar``" msgstr "" -#: ../../../faq/programming.rst:2167 +#: ../../../faq/programming.rst:2173 msgid "Empty globals for ``bar`` are created" msgstr "" -#: ../../../faq/programming.rst:2168 +#: ../../../faq/programming.rst:2174 msgid "``bar`` is compiled and starts executing" msgstr "" -#: ../../../faq/programming.rst:2169 +#: ../../../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:2170 +#: ../../../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:2172 +#: ../../../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:2175 +#: ../../../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:2178 +#: ../../../faq/programming.rst:2184 msgid "There are (at least) three possible workarounds for this problem." msgstr "" -#: ../../../faq/programming.rst:2180 +#: ../../../faq/programming.rst:2186 msgid "" "Guido van Rossum recommends avoiding all uses of ``from import ..." "``, and placing all code inside functions. Initializations of global " @@ -2308,59 +2304,59 @@ msgid "" "``.``." msgstr "" -#: ../../../faq/programming.rst:2185 +#: ../../../faq/programming.rst:2191 msgid "" "Jim Roskind suggests performing steps in the following order in each module:" msgstr "" -#: ../../../faq/programming.rst:2187 +#: ../../../faq/programming.rst:2193 msgid "" "exports (globals, functions, and classes that don't need imported base " "classes)" msgstr "" -#: ../../../faq/programming.rst:2189 +#: ../../../faq/programming.rst:2195 msgid "``import`` statements" msgstr "" -#: ../../../faq/programming.rst:2190 +#: ../../../faq/programming.rst:2196 msgid "" "active code (including globals that are initialized from imported values)." msgstr "" -#: ../../../faq/programming.rst:2192 +#: ../../../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:2195 +#: ../../../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:2198 +#: ../../../faq/programming.rst:2204 msgid "These solutions are not mutually exclusive." msgstr "" -#: ../../../faq/programming.rst:2202 +#: ../../../faq/programming.rst:2208 msgid "__import__('x.y.z') returns ; how do I get z?" msgstr "" -#: ../../../faq/programming.rst:2204 +#: ../../../faq/programming.rst:2210 msgid "" "Consider using the convenience function :func:`~importlib.import_module` " "from :mod:`importlib` instead::" msgstr "" -#: ../../../faq/programming.rst:2211 +#: ../../../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:2213 +#: ../../../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 " @@ -2369,13 +2365,13 @@ msgid "" "re-reading of a changed module, do this::" msgstr "" -#: ../../../faq/programming.rst:2223 +#: ../../../faq/programming.rst:2229 msgid "" "Warning: this technique is not 100% fool-proof. In particular, modules " -"containing statements like ::" +"containing statements like::" msgstr "" -#: ../../../faq/programming.rst:2228 +#: ../../../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 " @@ -2383,24 +2379,24 @@ msgid "" "paradoxical behaviour::" msgstr "" -#: ../../../faq/programming.rst:2241 +#: ../../../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:408 +#: ../../../faq/programming.rst:409 msgid "argument" msgstr "" -#: ../../../faq/programming.rst:408 +#: ../../../faq/programming.rst:409 msgid "difference from parameter" msgstr "" -#: ../../../faq/programming.rst:408 +#: ../../../faq/programming.rst:409 msgid "parameter" msgstr "" -#: ../../../faq/programming.rst:408 +#: ../../../faq/programming.rst:409 msgid "difference from argument" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/howto/free-threading-extensions.pot b/main/locale/pot/LC_MESSAGES/howto/free-threading-extensions.pot index 31ae6d3dbff..499becefc88 100644 --- a/main/locale/pot/LC_MESSAGES/howto/free-threading-extensions.pot +++ b/main/locale/pot/LC_MESSAGES/howto/free-threading-extensions.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-12-01 09:06+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -555,23 +555,57 @@ msgid "" "synchronization primitives might be more appropriate." msgstr "" -#: ../../../howto/free-threading-extensions.rst:389 +#: ../../../howto/free-threading-extensions.rst:390 +msgid "Per-Object Locks (``ob_mutex``)" +msgstr "" + +#: ../../../howto/free-threading-extensions.rst:392 +msgid "" +"In the free-threaded build, each Python object contains a :c:member:" +"`~PyObject.ob_mutex` field of type :c:type:`PyMutex`. This mutex is " +"**reserved for use by the critical section API** (:c:macro:" +"`Py_BEGIN_CRITICAL_SECTION` / :c:macro:`Py_END_CRITICAL_SECTION`)." +msgstr "" + +#: ../../../howto/free-threading-extensions.rst:399 +msgid "" +"Do **not** lock ``ob_mutex`` directly with ``PyMutex_Lock(&obj->ob_mutex)``. " +"Mixing direct ``PyMutex_Lock`` calls with the critical section API on the " +"same mutex can cause deadlocks." +msgstr "" + +#: ../../../howto/free-threading-extensions.rst:403 +msgid "" +"Even if your own code never uses critical sections on a particular object " +"type, **CPython internals may use the critical section API on any Python " +"object**." +msgstr "" + +#: ../../../howto/free-threading-extensions.rst:406 +msgid "" +"If your extension type needs its own lock, add a separate :c:type:`PyMutex` " +"field (or another synchronization primitive) to your object struct. :c:type:" +"`PyMutex` is very lightweight, so there is negligible cost to having an " +"additional one." +msgstr "" + +#: ../../../howto/free-threading-extensions.rst:413 msgid "Building Extensions for the Free-Threaded Build" msgstr "" -#: ../../../howto/free-threading-extensions.rst:391 +#: ../../../howto/free-threading-extensions.rst:415 msgid "" "C API extensions need to be built specifically for the free-threaded build. " "The wheels, shared libraries, and binaries are indicated by a ``t`` suffix." msgstr "" -#: ../../../howto/free-threading-extensions.rst:394 +#: ../../../howto/free-threading-extensions.rst:418 msgid "" "`pypa/manylinux `_ supports the free-" "threaded build, with the ``t`` suffix, such as ``python3.13t``." msgstr "" -#: ../../../howto/free-threading-extensions.rst:396 +#: ../../../howto/free-threading-extensions.rst:420 msgid "" "`pypa/cibuildwheel `_ supports the " "free-threaded build on Python 3.13 and 3.14. On Python 3.14, free-threaded " @@ -580,11 +614,11 @@ msgid "" "stable/options/#enable>`_." msgstr "" -#: ../../../howto/free-threading-extensions.rst:402 +#: ../../../howto/free-threading-extensions.rst:426 msgid "Limited C API and Stable ABI" msgstr "" -#: ../../../howto/free-threading-extensions.rst:404 +#: ../../../howto/free-threading-extensions.rst:428 msgid "" "The free-threaded build does not currently support the :ref:`Limited C API " "` or the stable ABI. If you use `setuptools `_: A community-maintained porting guide for " diff --git a/main/locale/pot/LC_MESSAGES/howto/instrumentation.pot b/main/locale/pot/LC_MESSAGES/howto/instrumentation.pot index cd672ebcaea..2ad8f50036f 100644 --- a/main/locale/pot/LC_MESSAGES/howto/instrumentation.pot +++ b/main/locale/pot/LC_MESSAGES/howto/instrumentation.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-09-08 08:37+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -285,33 +285,134 @@ msgid "" msgstr "" #: ../../../howto/instrumentation.rst:345 -msgid "SystemTap Tapsets" +msgid "C Entry Points" msgstr "" #: ../../../howto/instrumentation.rst:347 msgid "" +"To simplify triggering of DTrace markers, Python's C API comes with a number " +"of helper functions that mirror each static marker. On builds of Python " +"without DTrace enabled, these do nothing." +msgstr "" + +#: ../../../howto/instrumentation.rst:351 +msgid "" +"In general, it is not necessary to call these yourself, as Python will do it " +"for you." +msgstr "" + +#: ../../../howto/instrumentation.rst:358 +msgid "C API Function" +msgstr "" + +#: ../../../howto/instrumentation.rst:359 +msgid "Static Marker" +msgstr "" + +#: ../../../howto/instrumentation.rst:360 +msgid "Notes" +msgstr "" + +#: ../../../howto/instrumentation.rst:362 +msgid ":c:func:`!line`" +msgstr "" + +#: ../../../howto/instrumentation.rst:365 +msgid ":c:func:`!function__entry`" +msgstr "" + +#: ../../../howto/instrumentation.rst:368 +msgid ":c:func:`!function__return`" +msgstr "" + +#: ../../../howto/instrumentation.rst:371 +msgid ":c:func:`!gc__start`" +msgstr "" + +#: ../../../howto/instrumentation.rst:374 +msgid ":c:func:`!gc__done`" +msgstr "" + +#: ../../../howto/instrumentation.rst:377 +msgid ":c:func:`!instance__new__start`" +msgstr "" + +#: ../../../howto/instrumentation.rst:378 +#: ../../../howto/instrumentation.rst:381 +#: ../../../howto/instrumentation.rst:384 +#: ../../../howto/instrumentation.rst:387 +msgid "Not used by Python" +msgstr "" + +#: ../../../howto/instrumentation.rst:380 +msgid ":c:func:`!instance__new__done`" +msgstr "" + +#: ../../../howto/instrumentation.rst:383 +msgid ":c:func:`!instance__delete__start`" +msgstr "" + +#: ../../../howto/instrumentation.rst:386 +msgid ":c:func:`!instance__delete__done`" +msgstr "" + +#: ../../../howto/instrumentation.rst:389 +msgid ":c:func:`!import__find__load__start`" +msgstr "" + +#: ../../../howto/instrumentation.rst:392 +msgid ":c:func:`!import__find__load__done`" +msgstr "" + +#: ../../../howto/instrumentation.rst:395 +msgid ":c:func:`!audit`" +msgstr "" + +#: ../../../howto/instrumentation.rst:400 +msgid "C Probing Checks" +msgstr "" + +#: ../../../howto/instrumentation.rst:415 +msgid "" +"All calls to ``PyDTrace`` functions must be guarded by a call to one of " +"these functions. This allows Python to minimize performance impact when " +"probing is disabled." +msgstr "" + +#: ../../../howto/instrumentation.rst:419 +msgid "" +"On builds without DTrace enabled, these functions do nothing and return " +"``0``." +msgstr "" + +#: ../../../howto/instrumentation.rst:423 +msgid "SystemTap Tapsets" +msgstr "" + +#: ../../../howto/instrumentation.rst:425 +msgid "" "The higher-level way to use the SystemTap integration is to use a " "\"tapset\": SystemTap's equivalent of a library, which hides some of the " "lower-level details of the static markers." msgstr "" -#: ../../../howto/instrumentation.rst:351 +#: ../../../howto/instrumentation.rst:429 msgid "Here is a tapset file, based on a non-shared build of CPython:" msgstr "" -#: ../../../howto/instrumentation.rst:374 +#: ../../../howto/instrumentation.rst:452 msgid "" "If this file is installed in SystemTap's tapset directory (e.g. ``/usr/share/" "systemtap/tapset``), then these additional probepoints become available:" msgstr "" -#: ../../../howto/instrumentation.rst:380 +#: ../../../howto/instrumentation.rst:458 msgid "" "This probe point indicates that execution of a Python function has begun. It " "is only triggered for pure-Python (bytecode) functions." msgstr "" -#: ../../../howto/instrumentation.rst:385 +#: ../../../howto/instrumentation.rst:463 msgid "" "This probe point is the converse of ``python.function.return``, and " "indicates that execution of a Python function has ended (either via " @@ -319,18 +420,18 @@ msgid "" "(bytecode) functions." msgstr "" -#: ../../../howto/instrumentation.rst:392 +#: ../../../howto/instrumentation.rst:470 msgid "Examples" msgstr "" -#: ../../../howto/instrumentation.rst:393 +#: ../../../howto/instrumentation.rst:471 msgid "" "This SystemTap script uses the tapset above to more cleanly implement the " "example given above of tracing the Python function-call hierarchy, without " "needing to directly name the static markers:" msgstr "" -#: ../../../howto/instrumentation.rst:412 +#: ../../../howto/instrumentation.rst:490 msgid "" "The following script uses the tapset above to provide a top-like view of all " "running CPython code, showing the top 20 most frequently entered bytecode " diff --git a/main/locale/pot/LC_MESSAGES/howto/logging.pot b/main/locale/pot/LC_MESSAGES/howto/logging.pot index c73be7de717..38bdf8e0124 100644 --- a/main/locale/pot/LC_MESSAGES/howto/logging.pot +++ b/main/locale/pot/LC_MESSAGES/howto/logging.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -57,10 +57,10 @@ msgstr "" #: ../../../howto/logging.rst:30 msgid "" "You can access logging functionality by creating a logger via ``logger = " -"getLogger(__name__)``, and then calling the logger's :meth:`~Logger.debug`, :" -"meth:`~Logger.info`, :meth:`~Logger.warning`, :meth:`~Logger.error` and :" -"meth:`~Logger.critical` methods. To determine when to use logging, and to " -"see which logger methods to use when, see the table below. It states, for " +"logging.getLogger(__name__)``, and then calling the logger's :meth:`~Logger." +"debug`, :meth:`~Logger.info`, :meth:`~Logger.warning`, :meth:`~Logger.error` " +"and :meth:`~Logger.critical` methods. To determine when to use logging, and " +"to see which logger methods to use when, see the table below. It states, for " "each of a set of common tasks, the best tool to use for that task." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/improve-page-nojs.pot b/main/locale/pot/LC_MESSAGES/improve-page-nojs.pot index 0a48ca2eb8b..324175510f3 100644 --- a/main/locale/pot/LC_MESSAGES/improve-page-nojs.pot +++ b/main/locale/pot/LC_MESSAGES/improve-page-nojs.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/main/locale/pot/LC_MESSAGES/improve-page.pot b/main/locale/pot/LC_MESSAGES/improve-page.pot index a8a3ed8bbc5..778e900bc35 100644 --- a/main/locale/pot/LC_MESSAGES/improve-page.pot +++ b/main/locale/pot/LC_MESSAGES/improve-page.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/main/locale/pot/LC_MESSAGES/installing/index.pot b/main/locale/pot/LC_MESSAGES/installing/index.pot index 1a94d4a368c..8c94aaa989f 100644 --- a/main/locale/pot/LC_MESSAGES/installing/index.pot +++ b/main/locale/pot/LC_MESSAGES/installing/index.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,22 +21,14 @@ msgstr "" msgid "Installing Python Modules" msgstr "" -#: ../../../installing/index.rst:0 -msgid "Email" -msgstr "" - #: ../../../installing/index.rst:9 -msgid "distutils-sig@python.org" -msgstr "" - -#: ../../../installing/index.rst:11 msgid "" "As a popular open source development project, Python has an active " "supporting community of contributors and users that also make their software " "available for other Python developers to use under open source license terms." msgstr "" -#: ../../../installing/index.rst:15 +#: ../../../installing/index.rst:13 msgid "" "This allows Python users to share and collaborate effectively, benefiting " "from the solutions others have already created to common (and sometimes even " @@ -44,14 +36,14 @@ msgid "" "the common pool." msgstr "" -#: ../../../installing/index.rst:20 +#: ../../../installing/index.rst:18 msgid "" "This guide covers the installation part of the process. For a guide to " "creating and sharing your own Python projects, refer to the `Python " "packaging user guide`_." msgstr "" -#: ../../../installing/index.rst:28 +#: ../../../installing/index.rst:26 msgid "" "For corporate and other institutional users, be aware that many " "organisations have their own policies around using and contributing to open " @@ -59,31 +51,31 @@ msgid "" "the distribution and installation tools provided with Python." msgstr "" -#: ../../../installing/index.rst:35 +#: ../../../installing/index.rst:33 msgid "Key terms" msgstr "" -#: ../../../installing/index.rst:37 +#: ../../../installing/index.rst:35 msgid "" "``pip`` is the preferred installer program. Starting with Python 3.4, it is " "included by default with the Python binary installers." msgstr "" -#: ../../../installing/index.rst:39 +#: ../../../installing/index.rst:37 msgid "" "A *virtual environment* is a semi-isolated Python environment that allows " "packages to be installed for use by a particular application, rather than " "being installed system wide." msgstr "" -#: ../../../installing/index.rst:42 +#: ../../../installing/index.rst:40 msgid "" "``venv`` is the standard tool for creating virtual environments, and has " "been part of Python since Python 3.3. Starting with Python 3.4, it defaults " "to installing ``pip`` into all created virtual environments." msgstr "" -#: ../../../installing/index.rst:45 +#: ../../../installing/index.rst:43 msgid "" "``virtualenv`` is a third party alternative (and predecessor) to ``venv``. " "It allows virtual environments to be used on versions of Python prior to " @@ -91,13 +83,13 @@ msgid "" "automatically install ``pip`` into created environments." msgstr "" -#: ../../../installing/index.rst:49 +#: ../../../installing/index.rst:47 msgid "" "The `Python Package Index `__ is a public repository of " "open source licensed packages made available for use by other Python users." msgstr "" -#: ../../../installing/index.rst:52 +#: ../../../installing/index.rst:50 msgid "" "the `Python Packaging Authority `__ is the group of " "developers and documentation authors responsible for the maintenance and " @@ -106,7 +98,7 @@ msgid "" "issue trackers on `GitHub `__." msgstr "" -#: ../../../installing/index.rst:58 +#: ../../../installing/index.rst:56 msgid "" "``distutils`` is the original build and distribution system first added to " "the Python standard library in 1998. While direct use of ``distutils`` is " @@ -116,47 +108,47 @@ msgid "" "mailing list used to coordinate Python packaging standards development)." msgstr "" -#: ../../../installing/index.rst:66 +#: ../../../installing/index.rst:64 msgid "" "The use of ``venv`` is now recommended for creating virtual environments." msgstr "" -#: ../../../installing/index.rst:71 +#: ../../../installing/index.rst:69 msgid "" "`Python Packaging User Guide: Creating and using virtual environments " "`__" msgstr "" -#: ../../../installing/index.rst:76 +#: ../../../installing/index.rst:74 msgid "Basic usage" msgstr "" -#: ../../../installing/index.rst:78 +#: ../../../installing/index.rst:76 msgid "" "The standard packaging tools are all designed to be used from the command " "line." msgstr "" -#: ../../../installing/index.rst:81 +#: ../../../installing/index.rst:79 msgid "" "The following command will install the latest version of a module and its " "dependencies from the Python Package Index::" msgstr "" -#: ../../../installing/index.rst:88 +#: ../../../installing/index.rst:86 msgid "" "For POSIX users (including macOS and Linux users), the examples in this " "guide assume the use of a :term:`virtual environment`." msgstr "" -#: ../../../installing/index.rst:91 +#: ../../../installing/index.rst:89 msgid "" "For Windows users, the examples in this guide assume that the option to " "adjust the system PATH environment variable was selected when installing " "Python." msgstr "" -#: ../../../installing/index.rst:95 +#: ../../../installing/index.rst:93 msgid "" "It's also possible to specify an exact or minimum version directly on the " "command line. When using comparator operators such as ``>``, ``<`` or some " @@ -164,72 +156,72 @@ msgid "" "the version should be enclosed within double quotes::" msgstr "" -#: ../../../installing/index.rst:103 +#: ../../../installing/index.rst:101 msgid "" "Normally, if a suitable module is already installed, attempting to install " "it again will have no effect. Upgrading existing modules must be requested " "explicitly::" msgstr "" -#: ../../../installing/index.rst:109 +#: ../../../installing/index.rst:107 msgid "" "More information and resources regarding ``pip`` and its capabilities can be " "found in the `Python Packaging User Guide `__." msgstr "" -#: ../../../installing/index.rst:112 +#: ../../../installing/index.rst:110 msgid "" "Creation of virtual environments is done through the :mod:`venv` module. " "Installing packages into an active virtual environment uses the commands " "shown above." msgstr "" -#: ../../../installing/index.rst:118 +#: ../../../installing/index.rst:116 msgid "" "`Python Packaging User Guide: Installing Python Distribution Packages " "`__" msgstr "" -#: ../../../installing/index.rst:123 +#: ../../../installing/index.rst:121 msgid "How do I ...?" msgstr "" -#: ../../../installing/index.rst:125 +#: ../../../installing/index.rst:123 msgid "These are quick answers or links for some common tasks." msgstr "" -#: ../../../installing/index.rst:128 +#: ../../../installing/index.rst:126 msgid "... install ``pip`` in versions of Python prior to Python 3.4?" msgstr "" -#: ../../../installing/index.rst:130 +#: ../../../installing/index.rst:128 msgid "" "Python only started bundling ``pip`` with Python 3.4. For earlier versions, " "``pip`` needs to be \"bootstrapped\" as described in the Python Packaging " "User Guide." msgstr "" -#: ../../../installing/index.rst:136 +#: ../../../installing/index.rst:134 msgid "" "`Python Packaging User Guide: Requirements for Installing Packages `__" msgstr "" -#: ../../../installing/index.rst:143 +#: ../../../installing/index.rst:141 msgid "... install packages just for the current user?" msgstr "" -#: ../../../installing/index.rst:145 +#: ../../../installing/index.rst:143 msgid "" "Passing the ``--user`` option to ``python -m pip install`` will install a " "package just for the current user, rather than for all users of the system." msgstr "" -#: ../../../installing/index.rst:150 +#: ../../../installing/index.rst:148 msgid "... install scientific Python packages?" msgstr "" -#: ../../../installing/index.rst:152 +#: ../../../installing/index.rst:150 msgid "" "A number of scientific Python packages have complex binary dependencies, and " "aren't currently easy to install using ``pip`` directly. At this point in " @@ -238,42 +230,42 @@ msgid "" "install them with ``pip``." msgstr "" -#: ../../../installing/index.rst:160 +#: ../../../installing/index.rst:158 msgid "" "`Python Packaging User Guide: Installing Scientific Packages `__" msgstr "" -#: ../../../installing/index.rst:165 +#: ../../../installing/index.rst:163 msgid "... work with multiple versions of Python installed in parallel?" msgstr "" -#: ../../../installing/index.rst:167 +#: ../../../installing/index.rst:165 msgid "" "On Linux, macOS, and other POSIX systems, use the versioned Python commands " "in combination with the ``-m`` switch to run the appropriate copy of " "``pip``::" msgstr "" -#: ../../../installing/index.rst:176 +#: ../../../installing/index.rst:174 msgid "Appropriately versioned ``pip`` commands may also be available." msgstr "" -#: ../../../installing/index.rst:178 +#: ../../../installing/index.rst:176 msgid "" "On Windows, use the ``py`` Python launcher in combination with the ``-m`` " "switch::" msgstr "" -#: ../../../installing/index.rst:195 +#: ../../../installing/index.rst:193 msgid "Common installation issues" msgstr "" -#: ../../../installing/index.rst:198 +#: ../../../installing/index.rst:196 msgid "Installing into the system Python on Linux" msgstr "" -#: ../../../installing/index.rst:200 +#: ../../../installing/index.rst:198 msgid "" "On Linux systems, a Python installation will typically be included as part " "of the distribution. Installing into this Python installation requires root " @@ -282,41 +274,41 @@ msgid "" "unexpectedly upgraded using ``pip``." msgstr "" -#: ../../../installing/index.rst:206 +#: ../../../installing/index.rst:204 msgid "" "On such systems, it is often better to use a virtual environment or a per-" "user installation when installing packages with ``pip``." msgstr "" -#: ../../../installing/index.rst:211 +#: ../../../installing/index.rst:209 msgid "Pip not installed" msgstr "" -#: ../../../installing/index.rst:213 +#: ../../../installing/index.rst:211 msgid "" "It is possible that ``pip`` does not get installed by default. One potential " "fix is::" msgstr "" -#: ../../../installing/index.rst:217 +#: ../../../installing/index.rst:215 msgid "" "There are also additional resources for `installing pip. `__" msgstr "" -#: ../../../installing/index.rst:222 +#: ../../../installing/index.rst:220 msgid "Installing binary extensions" msgstr "" -#: ../../../installing/index.rst:224 +#: ../../../installing/index.rst:222 msgid "" "Python has typically relied heavily on source based distribution, with end " "users being expected to compile extension modules from source as part of the " "installation process." msgstr "" -#: ../../../installing/index.rst:228 +#: ../../../installing/index.rst:226 msgid "" "With the introduction of support for the binary ``wheel`` format, and the " "ability to publish wheels for at least Windows and macOS through the Python " @@ -325,7 +317,7 @@ msgid "" "build them themselves." msgstr "" -#: ../../../installing/index.rst:234 +#: ../../../installing/index.rst:232 msgid "" "Some of the solutions for installing `scientific software `__ that are not yet available as pre-built ``wheel`` " @@ -333,7 +325,7 @@ msgid "" "to build them locally." msgstr "" -#: ../../../installing/index.rst:241 +#: ../../../installing/index.rst:239 msgid "" "`Python Packaging User Guide: Binary Extensions `__" diff --git a/main/locale/pot/LC_MESSAGES/library/argparse.pot b/main/locale/pot/LC_MESSAGES/library/argparse.pot index 92e677b8dee..e400a2483fb 100644 --- a/main/locale/pot/LC_MESSAGES/library/argparse.pot +++ b/main/locale/pot/LC_MESSAGES/library/argparse.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -204,7 +204,7 @@ msgstr "" msgid "*suggest_on_error* default changed to ``True``." msgstr "" -#: ../../../library/argparse.rst:137 ../../../library/argparse.rst:701 +#: ../../../library/argparse.rst:137 ../../../library/argparse.rst:703 msgid "The following sections describe how each of these are used." msgstr "" @@ -703,11 +703,15 @@ msgstr "" msgid "deprecated_ - Whether or not use of the argument is deprecated." msgstr "" -#: ../../../library/argparse.rst:707 -msgid "name or flags" +#: ../../../library/argparse.rst:701 +msgid "The method returns an :class:`Action` object representing the argument." msgstr "" #: ../../../library/argparse.rst:709 +msgid "name or flags" +msgstr "" + +#: ../../../library/argparse.rst:711 msgid "" "The :meth:`~ArgumentParser.add_argument` method must know whether an " "optional argument, like ``-f`` or ``--foo``, or a positional argument, like " @@ -716,36 +720,36 @@ msgid "" "or a simple argument name." msgstr "" -#: ../../../library/argparse.rst:715 +#: ../../../library/argparse.rst:717 msgid "For example, an optional argument could be created like::" msgstr "" -#: ../../../library/argparse.rst:719 +#: ../../../library/argparse.rst:721 msgid "while a positional argument could be created like::" msgstr "" -#: ../../../library/argparse.rst:723 +#: ../../../library/argparse.rst:725 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:738 +#: ../../../library/argparse.rst:740 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. The dest_ parameter defaults to the argument name with " -"underscores ``_`` replacing hyphens ``-`` . The metavar_ parameter defaults " -"to the upper-cased name. For example::" +"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:761 +#: ../../../library/argparse.rst:763 msgid "action" msgstr "" -#: ../../../library/argparse.rst:763 +#: ../../../library/argparse.rst:765 msgid "" ":class:`ArgumentParser` objects associate command-line arguments with " "actions. These actions can do just about anything with the command-line " @@ -755,13 +759,13 @@ msgid "" "be handled. The supplied actions are:" msgstr "" -#: ../../../library/argparse.rst:769 +#: ../../../library/argparse.rst:771 msgid "" "``'store'`` - This just stores the argument's value. This is the default " "action." msgstr "" -#: ../../../library/argparse.rst:772 +#: ../../../library/argparse.rst:774 msgid "" "``'store_const'`` - This stores the value specified by the const_ keyword " "argument; note that the const_ keyword argument defaults to ``None``. The " @@ -769,14 +773,14 @@ msgid "" "specify some sort of flag. For example::" msgstr "" -#: ../../../library/argparse.rst:782 +#: ../../../library/argparse.rst:784 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:794 +#: ../../../library/argparse.rst:796 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 " @@ -785,7 +789,7 @@ msgid "" "values. Example usage::" msgstr "" -#: ../../../library/argparse.rst:805 +#: ../../../library/argparse.rst:807 msgid "" "``'append_const'`` - This appends the value specified by the const_ keyword " "argument to a list; note that the const_ keyword argument defaults to " @@ -793,7 +797,7 @@ msgid "" "arguments need to store constants to the same list. For example::" msgstr "" -#: ../../../library/argparse.rst:817 +#: ../../../library/argparse.rst:819 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 " @@ -802,17 +806,17 @@ msgid "" "Example usage::" msgstr "" -#: ../../../library/argparse.rst:832 +#: ../../../library/argparse.rst:834 msgid "" "``'count'`` - This counts the number of times an argument occurs. For " "example, this is useful for increasing verbosity levels::" msgstr "" -#: ../../../library/argparse.rst:840 +#: ../../../library/argparse.rst:842 msgid "Note, the *default* will be ``None`` unless explicitly set to *0*." msgstr "" -#: ../../../library/argparse.rst:842 +#: ../../../library/argparse.rst:844 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 " @@ -820,14 +824,14 @@ msgid "" "output is created." msgstr "" -#: ../../../library/argparse.rst:847 +#: ../../../library/argparse.rst:849 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:857 +#: ../../../library/argparse.rst:859 msgid "" "You may also specify an arbitrary action by passing an :class:`Action` " "subclass (e.g. :class:`BooleanOptionalAction`) or other object that " @@ -836,7 +840,7 @@ msgid "" "with non-zero ``nargs``) can be used with positional arguments." msgstr "" -#: ../../../library/argparse.rst:863 +#: ../../../library/argparse.rst:865 msgid "" "The recommended way to create a custom action is to extend :class:`Action`, " "overriding the :meth:`!__call__` method and optionally the :meth:`!__init__` " @@ -845,19 +849,19 @@ msgid "" "their registered name." msgstr "" -#: ../../../library/argparse.rst:868 +#: ../../../library/argparse.rst:870 msgid "An example of a custom action::" msgstr "" -#: ../../../library/argparse.rst:888 +#: ../../../library/argparse.rst:890 msgid "For more details, see :class:`Action`." msgstr "" -#: ../../../library/argparse.rst:894 +#: ../../../library/argparse.rst:896 msgid "nargs" msgstr "" -#: ../../../library/argparse.rst:896 +#: ../../../library/argparse.rst:898 msgid "" ":class:`ArgumentParser` objects usually associate a single command-line " "argument with a single action to be taken. The ``nargs`` keyword argument " @@ -866,19 +870,19 @@ msgid "" "are:" msgstr "" -#: ../../../library/argparse.rst:901 +#: ../../../library/argparse.rst:903 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" msgstr "" -#: ../../../library/argparse.rst:910 +#: ../../../library/argparse.rst:912 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:915 +#: ../../../library/argparse.rst:917 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 " @@ -888,13 +892,13 @@ msgid "" "produced. Some examples to illustrate this::" msgstr "" -#: ../../../library/argparse.rst:932 +#: ../../../library/argparse.rst:934 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" msgstr "" -#: ../../../library/argparse.rst:947 +#: ../../../library/argparse.rst:949 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 " @@ -902,14 +906,14 @@ msgid "" "``nargs='*'`` is possible. For example::" msgstr "" -#: ../../../library/argparse.rst:961 +#: ../../../library/argparse.rst:963 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:973 +#: ../../../library/argparse.rst:975 msgid "" "If the ``nargs`` keyword argument is not provided, the number of arguments " "consumed is determined by the action_. Generally this means a single " @@ -918,11 +922,11 @@ msgid "" "``'store_const'``) set ``nargs=0``." msgstr "" -#: ../../../library/argparse.rst:983 +#: ../../../library/argparse.rst:985 msgid "const" msgstr "" -#: ../../../library/argparse.rst:985 +#: ../../../library/argparse.rst:987 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 " @@ -930,7 +934,7 @@ msgid "" "common uses of it are:" msgstr "" -#: ../../../library/argparse.rst:989 +#: ../../../library/argparse.rst:991 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='store_const'`` or ``action='append_const'``. These actions add " @@ -940,7 +944,7 @@ msgid "" "receive a default value of ``None``." msgstr "" -#: ../../../library/argparse.rst:997 +#: ../../../library/argparse.rst:999 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with option strings " "(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " @@ -950,17 +954,17 @@ msgid "" "See the nargs_ description for examples." msgstr "" -#: ../../../library/argparse.rst:1004 +#: ../../../library/argparse.rst:1006 msgid "" "``const=None`` by default, including when ``action='append_const'`` or " "``action='store_const'``." msgstr "" -#: ../../../library/argparse.rst:1011 +#: ../../../library/argparse.rst:1013 msgid "default" msgstr "" -#: ../../../library/argparse.rst:1013 +#: ../../../library/argparse.rst:1015 msgid "" "All optional arguments and some positional arguments may be omitted at the " "command line. The ``default`` keyword argument of :meth:`~ArgumentParser." @@ -970,13 +974,13 @@ msgid "" "command line::" msgstr "" -#: ../../../library/argparse.rst:1027 +#: ../../../library/argparse.rst:1029 msgid "" "If the target namespace already has an attribute set, the action *default* " "will not overwrite it::" msgstr "" -#: ../../../library/argparse.rst:1035 +#: ../../../library/argparse.rst:1037 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_ " @@ -984,30 +988,30 @@ msgid "" "`Namespace` return value. Otherwise, the parser uses the value as is::" msgstr "" -#: ../../../library/argparse.rst:1046 +#: ../../../library/argparse.rst:1048 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:1056 +#: ../../../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:1060 +#: ../../../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:1074 +#: ../../../library/argparse.rst:1076 msgid "type" msgstr "" -#: ../../../library/argparse.rst:1076 +#: ../../../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 " @@ -1016,13 +1020,13 @@ msgid "" "checking and type conversions to be performed." msgstr "" -#: ../../../library/argparse.rst:1082 +#: ../../../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:1085 +#: ../../../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 " @@ -1031,22 +1035,22 @@ msgid "" "is displayed. Other exception types are not handled." msgstr "" -#: ../../../library/argparse.rst:1091 +#: ../../../library/argparse.rst:1093 msgid "Common built-in types and functions can be used as type converters:" msgstr "" -#: ../../../library/argparse.rst:1105 +#: ../../../library/argparse.rst:1107 msgid "User defined functions can be used as well:" msgstr "" -#: ../../../library/argparse.rst:1117 +#: ../../../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:1121 +#: ../../../library/argparse.rst:1123 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 " @@ -1054,7 +1058,7 @@ msgid "" "management should be done downstream after the arguments are parsed." msgstr "" -#: ../../../library/argparse.rst:1126 +#: ../../../library/argparse.rst:1128 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." @@ -1062,7 +1066,7 @@ msgid "" "exception would not be handled at all." msgstr "" -#: ../../../library/argparse.rst:1131 +#: ../../../library/argparse.rst:1133 msgid "" "Even :class:`~argparse.FileType` has its limitations for use with the " "``type`` keyword. If one argument uses :class:`~argparse.FileType` and then " @@ -1072,17 +1076,17 @@ msgid "" "files." msgstr "" -#: ../../../library/argparse.rst:1138 +#: ../../../library/argparse.rst:1140 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." msgstr "" -#: ../../../library/argparse.rst:1145 +#: ../../../library/argparse.rst:1147 msgid "choices" msgstr "" -#: ../../../library/argparse.rst:1147 +#: ../../../library/argparse.rst:1149 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* " @@ -1091,33 +1095,33 @@ msgid "" "be displayed if the argument was not one of the acceptable values::" msgstr "" -#: ../../../library/argparse.rst:1162 +#: ../../../library/argparse.rst:1164 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:1165 +#: ../../../library/argparse.rst:1167 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:1168 +#: ../../../library/argparse.rst:1170 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:1173 +#: ../../../library/argparse.rst:1175 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:1177 +#: ../../../library/argparse.rst:1179 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 " @@ -1125,11 +1129,11 @@ msgid "" "are many choices), just specify an explicit metavar_." msgstr "" -#: ../../../library/argparse.rst:1186 +#: ../../../library/argparse.rst:1188 msgid "required" msgstr "" -#: ../../../library/argparse.rst:1188 +#: ../../../library/argparse.rst:1190 msgid "" "In general, the :mod:`!argparse` module assumes that flags like ``-f`` and " "``--bar`` indicate *optional* arguments, which can always be omitted at the " @@ -1137,24 +1141,24 @@ msgid "" "the ``required=`` keyword argument to :meth:`~ArgumentParser.add_argument`::" msgstr "" -#: ../../../library/argparse.rst:1201 +#: ../../../library/argparse.rst:1203 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:1207 +#: ../../../library/argparse.rst:1209 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:1214 +#: ../../../library/argparse.rst:1216 msgid "help" msgstr "" -#: ../../../library/argparse.rst:1216 +#: ../../../library/argparse.rst:1218 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`` " @@ -1162,7 +1166,7 @@ msgid "" "each argument." msgstr "" -#: ../../../library/argparse.rst:1221 +#: ../../../library/argparse.rst:1223 msgid "" "The ``help`` strings can include various format specifiers to avoid " "repetition of things like the program name or the argument default_. The " @@ -1171,23 +1175,23 @@ msgid "" "``%(type)s``, etc.::" msgstr "" -#: ../../../library/argparse.rst:1238 +#: ../../../library/argparse.rst:1240 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:1241 +#: ../../../library/argparse.rst:1243 msgid "" ":mod:`!argparse` supports silencing the help entry for certain options, by " "setting the ``help`` value to ``argparse.SUPPRESS``::" msgstr "" -#: ../../../library/argparse.rst:1256 +#: ../../../library/argparse.rst:1258 msgid "metavar" msgstr "" -#: ../../../library/argparse.rst:1258 +#: ../../../library/argparse.rst:1260 msgid "" "When :class:`ArgumentParser` generates help messages, it needs some way to " "refer to each expected argument. By default, :class:`!ArgumentParser` " @@ -1199,29 +1203,29 @@ msgid "" "command-line argument will be referred to as ``FOO``. An example::" msgstr "" -#: ../../../library/argparse.rst:1282 +#: ../../../library/argparse.rst:1284 msgid "An alternative name can be specified with ``metavar``::" msgstr "" -#: ../../../library/argparse.rst:1299 +#: ../../../library/argparse.rst:1301 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:1303 +#: ../../../library/argparse.rst:1305 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:1322 +#: ../../../library/argparse.rst:1324 msgid "dest" msgstr "" -#: ../../../library/argparse.rst:1324 +#: ../../../library/argparse.rst:1326 msgid "" "Most :class:`ArgumentParser` actions add some value as an attribute of the " "object returned by :meth:`~ArgumentParser.parse_args`. The name of this " @@ -1231,7 +1235,7 @@ msgid "" "add_argument`::" msgstr "" -#: ../../../library/argparse.rst:1336 +#: ../../../library/argparse.rst:1338 msgid "" "For optional argument actions, the value of ``dest`` is normally inferred " "from the option strings. :class:`ArgumentParser` generates the value of " @@ -1245,19 +1249,19 @@ msgid "" "a valid attribute name. The examples below illustrate this behavior::" msgstr "" -#: ../../../library/argparse.rst:1358 +#: ../../../library/argparse.rst:1360 msgid "``dest`` allows a custom attribute name to be provided::" msgstr "" -#: ../../../library/argparse.rst:1365 +#: ../../../library/argparse.rst:1367 msgid "Single-dash long option now takes precedence over short options." msgstr "" -#: ../../../library/argparse.rst:1372 +#: ../../../library/argparse.rst:1374 msgid "deprecated" msgstr "" -#: ../../../library/argparse.rst:1374 +#: ../../../library/argparse.rst:1376 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 " @@ -1268,11 +1272,11 @@ msgid "" "will be printed to :data:`sys.stderr` when the argument is used::" msgstr "" -#: ../../../library/argparse.rst:1397 +#: ../../../library/argparse.rst:1399 msgid "Action classes" msgstr "" -#: ../../../library/argparse.rst:1399 +#: ../../../library/argparse.rst:1401 msgid "" ":class:`!Action` classes implement the Action API, a callable which returns " "a callable which processes arguments from the command-line. Any object which " @@ -1280,7 +1284,7 @@ msgid "" "`~ArgumentParser.add_argument`." msgstr "" -#: ../../../library/argparse.rst:1408 +#: ../../../library/argparse.rst:1410 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 " @@ -1289,7 +1293,7 @@ msgid "" "`ArgumentParser.add_argument` except for the ``action`` itself." msgstr "" -#: ../../../library/argparse.rst:1414 +#: ../../../library/argparse.rst:1416 msgid "" "Instances of :class:`!Action` (or return value of any callable to the " "``action`` parameter) should have attributes :attr:`!dest`, :attr:`!" @@ -1298,46 +1302,46 @@ msgid "" "is to call :meth:`!Action.__init__`." msgstr "" -#: ../../../library/argparse.rst:1422 +#: ../../../library/argparse.rst:1424 msgid "" ":class:`!Action` instances should be callable, so subclasses must override " "the :meth:`!__call__` method, which should accept four parameters:" msgstr "" -#: ../../../library/argparse.rst:1425 +#: ../../../library/argparse.rst:1427 msgid "" "*parser* - The :class:`ArgumentParser` object which contains this action." msgstr "" -#: ../../../library/argparse.rst:1427 +#: ../../../library/argparse.rst:1429 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:1431 +#: ../../../library/argparse.rst:1433 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:1435 +#: ../../../library/argparse.rst:1437 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:1439 +#: ../../../library/argparse.rst:1441 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:1444 +#: ../../../library/argparse.rst:1446 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 " @@ -1345,7 +1349,7 @@ msgid "" "will be used." msgstr "" -#: ../../../library/argparse.rst:1450 +#: ../../../library/argparse.rst:1452 msgid "" "A subclass of :class:`Action` for handling boolean flags with positive and " "negative options. Adding a single argument such as ``--foo`` automatically " @@ -1353,85 +1357,85 @@ msgid "" "``False`` respectively::" msgstr "" -#: ../../../library/argparse.rst:1461 +#: ../../../library/argparse.rst:1463 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:1468 +#: ../../../library/argparse.rst:1470 msgid "Added support for single-dash options." msgstr "" -#: ../../../library/argparse.rst:1471 +#: ../../../library/argparse.rst:1473 msgid "Added support for alternate prefix_chars_." msgstr "" -#: ../../../library/argparse.rst:1475 +#: ../../../library/argparse.rst:1477 msgid "The parse_args() method" msgstr "" -#: ../../../library/argparse.rst:1479 +#: ../../../library/argparse.rst:1481 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." msgstr "" -#: ../../../library/argparse.rst:1482 +#: ../../../library/argparse.rst:1484 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:1486 +#: ../../../library/argparse.rst:1488 msgid "" "args_ - List of strings to parse. The default is taken from :data:`sys." "argv`." msgstr "" -#: ../../../library/argparse.rst:1489 +#: ../../../library/argparse.rst:1491 msgid "" "namespace_ - An object to take the attributes. The default is a new empty :" "class:`Namespace` object." msgstr "" -#: ../../../library/argparse.rst:1494 +#: ../../../library/argparse.rst:1496 msgid "Option value syntax" msgstr "" -#: ../../../library/argparse.rst:1496 +#: ../../../library/argparse.rst:1498 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:1508 +#: ../../../library/argparse.rst:1510 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:1515 +#: ../../../library/argparse.rst:1517 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" msgstr "" -#: ../../../library/argparse.rst:1521 +#: ../../../library/argparse.rst:1523 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:1533 +#: ../../../library/argparse.rst:1535 msgid "Invalid arguments" msgstr "" -#: ../../../library/argparse.rst:1535 +#: ../../../library/argparse.rst:1537 msgid "" "While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " "for a variety of errors, including ambiguous options, invalid types, invalid " @@ -1439,11 +1443,11 @@ msgid "" "an error, it exits and prints the error along with a usage message::" msgstr "" -#: ../../../library/argparse.rst:1561 +#: ../../../library/argparse.rst:1563 msgid "Arguments containing ``-``" msgstr "" -#: ../../../library/argparse.rst:1563 +#: ../../../library/argparse.rst:1565 msgid "" "The :meth:`~ArgumentParser.parse_args` method attempts to give errors " "whenever the user has clearly made a mistake, but some situations are " @@ -1455,7 +1459,7 @@ msgid "" "negative numbers::" msgstr "" -#: ../../../library/argparse.rst:1601 +#: ../../../library/argparse.rst:1603 msgid "" "If you have positional arguments that must begin with ``-`` and don't look " "like negative numbers, you can insert the pseudo-argument ``'--'`` which " @@ -1463,34 +1467,34 @@ msgid "" "positional argument::" msgstr "" -#: ../../../library/argparse.rst:1609 +#: ../../../library/argparse.rst:1611 msgid "" "See also :ref:`the argparse howto on ambiguous arguments ` for more details." msgstr "" -#: ../../../library/argparse.rst:1615 +#: ../../../library/argparse.rst:1617 msgid "Argument abbreviations (prefix matching)" msgstr "" -#: ../../../library/argparse.rst:1617 +#: ../../../library/argparse.rst:1619 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:1632 +#: ../../../library/argparse.rst:1634 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:1638 +#: ../../../library/argparse.rst:1640 msgid "Beyond ``sys.argv``" msgstr "" -#: ../../../library/argparse.rst:1640 +#: ../../../library/argparse.rst:1642 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 " @@ -1498,39 +1502,39 @@ msgid "" "useful for testing at the interactive prompt::" msgstr "" -#: ../../../library/argparse.rst:1660 +#: ../../../library/argparse.rst:1662 msgid "The Namespace object" msgstr "" -#: ../../../library/argparse.rst:1664 +#: ../../../library/argparse.rst:1666 msgid "" "Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " "an object holding attributes and return it." msgstr "" -#: ../../../library/argparse.rst:1667 +#: ../../../library/argparse.rst:1669 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:1677 +#: ../../../library/argparse.rst:1679 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:1693 +#: ../../../library/argparse.rst:1695 msgid "Other utilities" msgstr "" -#: ../../../library/argparse.rst:1696 +#: ../../../library/argparse.rst:1698 msgid "Subcommands" msgstr "" -#: ../../../library/argparse.rst:1703 +#: ../../../library/argparse.rst:1705 msgid "" "Many programs split up their functionality into a number of subcommands, for " "example, the ``svn`` program can invoke subcommands like ``svn checkout``, " @@ -1545,69 +1549,69 @@ msgid "" "returns an :class:`!ArgumentParser` object that can be modified as usual." msgstr "" -#: ../../../library/argparse.rst:1715 +#: ../../../library/argparse.rst:1717 msgid "Description of parameters:" msgstr "" -#: ../../../library/argparse.rst:1717 +#: ../../../library/argparse.rst:1719 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:1721 +#: ../../../library/argparse.rst:1723 msgid "" "*description* - description for the sub-parser group in help output, by " "default ``None``" msgstr "" -#: ../../../library/argparse.rst:1724 +#: ../../../library/argparse.rst:1726 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:1728 +#: ../../../library/argparse.rst:1730 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:1731 +#: ../../../library/argparse.rst:1733 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" msgstr "" -#: ../../../library/argparse.rst:1734 +#: ../../../library/argparse.rst:1736 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:1737 +#: ../../../library/argparse.rst:1739 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" msgstr "" -#: ../../../library/argparse.rst:1740 +#: ../../../library/argparse.rst:1742 msgid "help_ - help for sub-parser group in help output, by default ``None``" msgstr "" -#: ../../../library/argparse.rst:1742 +#: ../../../library/argparse.rst:1744 msgid "" "metavar_ - string presenting available subcommands in help; by default it is " "``None`` and presents subcommands in form {cmd1, cmd2, ..}" msgstr "" -#: ../../../library/argparse.rst:1745 +#: ../../../library/argparse.rst:1747 msgid "Some example usage::" msgstr "" -#: ../../../library/argparse.rst:1766 +#: ../../../library/argparse.rst:1768 msgid "" "Note that the object returned by :meth:`~ArgumentParser.parse_args` will " "only contain attributes for the main parser and the subparser that was " @@ -1617,7 +1621,7 @@ msgid "" "only the ``foo`` and ``baz`` attributes are present." msgstr "" -#: ../../../library/argparse.rst:1773 +#: ../../../library/argparse.rst:1775 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 " @@ -1626,7 +1630,7 @@ msgid "" "to :meth:`~_SubParsersAction.add_parser` as above.)" msgstr "" -#: ../../../library/argparse.rst:1809 +#: ../../../library/argparse.rst:1811 msgid "" "The :meth:`~ArgumentParser.add_subparsers` method also supports ``title`` " "and ``description`` keyword arguments. When either is present, the " @@ -1634,7 +1638,7 @@ msgid "" "example::" msgstr "" -#: ../../../library/argparse.rst:1830 +#: ../../../library/argparse.rst:1832 msgid "" "One particularly effective way of handling subcommands is to combine the use " "of the :meth:`~ArgumentParser.add_subparsers` method with calls to :meth:" @@ -1642,7 +1646,7 @@ msgid "" "function it should execute. For example::" msgstr "" -#: ../../../library/argparse.rst:1867 +#: ../../../library/argparse.rst:1869 msgid "" "This way, you can let :meth:`~ArgumentParser.parse_args` do the job of " "calling the appropriate function after argument parsing is complete. " @@ -1653,57 +1657,57 @@ msgid "" "work::" msgstr "" -#: ../../../library/argparse.rst:1883 +#: ../../../library/argparse.rst:1885 msgid "New *required* keyword-only parameter." msgstr "" -#: ../../../library/argparse.rst:1886 +#: ../../../library/argparse.rst:1888 msgid "" "Subparser's *prog* is no longer affected by a custom usage message in the " "main parser." msgstr "" -#: ../../../library/argparse.rst:1894 +#: ../../../library/argparse.rst:1896 msgid "" "Create and return a new :class:`ArgumentParser` object for the subcommand " "*name*." msgstr "" -#: ../../../library/argparse.rst:1897 +#: ../../../library/argparse.rst:1899 msgid "The *name* argument is the name of the sub-command." msgstr "" -#: ../../../library/argparse.rst:1899 +#: ../../../library/argparse.rst:1901 msgid "The *help* argument provides a short description for this sub-command." msgstr "" -#: ../../../library/argparse.rst:1901 +#: ../../../library/argparse.rst:1903 msgid "" "The *aliases* argument allows providing alternative names for this sub-" "command. For example::" msgstr "" -#: ../../../library/argparse.rst:1911 +#: ../../../library/argparse.rst:1913 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:1921 +#: ../../../library/argparse.rst:1923 msgid "" "All other keyword arguments are passed directly to the :class:`!" "ArgumentParser` constructor." msgstr "" -#: ../../../library/argparse.rst:1924 +#: ../../../library/argparse.rst:1926 msgid "Added the *deprecated* parameter." msgstr "" -#: ../../../library/argparse.rst:1929 +#: ../../../library/argparse.rst:1931 msgid "FileType objects" msgstr "" -#: ../../../library/argparse.rst:1933 +#: ../../../library/argparse.rst:1935 msgid "" "The :class:`FileType` factory creates objects that can be passed to the type " "argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" @@ -1712,14 +1716,14 @@ msgid "" "the :func:`open` function for more details)::" msgstr "" -#: ../../../library/argparse.rst:1945 +#: ../../../library/argparse.rst:1947 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:1956 +#: ../../../library/argparse.rst:1958 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 " @@ -1728,15 +1732,15 @@ msgid "" "manage the files." msgstr "" -#: ../../../library/argparse.rst:1962 +#: ../../../library/argparse.rst:1964 msgid "Added the *encodings* and *errors* parameters." msgstr "" -#: ../../../library/argparse.rst:1969 +#: ../../../library/argparse.rst:1971 msgid "Argument groups" msgstr "" -#: ../../../library/argparse.rst:1974 +#: ../../../library/argparse.rst:1976 msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " "\"positional arguments\" and \"options\" when displaying help messages. When " @@ -1745,7 +1749,7 @@ msgid "" "method::" msgstr "" -#: ../../../library/argparse.rst:1991 +#: ../../../library/argparse.rst:1993 msgid "" "The :meth:`add_argument_group` method returns an argument group object which " "has an :meth:`~ArgumentParser.add_argument` method just like a regular :" @@ -1756,7 +1760,7 @@ msgid "" "this display::" msgstr "" -#: ../../../library/argparse.rst:2017 +#: ../../../library/argparse.rst:2019 msgid "" "The optional, keyword-only parameters argument_default_ and " "conflict_handler_ allow for finer-grained control of the behavior of the " @@ -1765,42 +1769,42 @@ msgid "" "rather than the entire parser." msgstr "" -#: ../../../library/argparse.rst:2022 +#: ../../../library/argparse.rst:2024 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:2025 +#: ../../../library/argparse.rst:2027 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:2030 +#: ../../../library/argparse.rst:2032 msgid "Passing prefix_chars_ to :meth:`add_argument_group` is now deprecated." msgstr "" -#: ../../../library/argparse.rst:2036 +#: ../../../library/argparse.rst:2038 msgid "Mutual exclusion" msgstr "" -#: ../../../library/argparse.rst:2040 +#: ../../../library/argparse.rst:2042 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:2056 +#: ../../../library/argparse.rst:2058 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:2068 +#: ../../../library/argparse.rst:2070 msgid "" "Note that currently mutually exclusive argument groups do not support the " "*title* and *description* arguments of :meth:`~ArgumentParser." @@ -1808,7 +1812,7 @@ msgid "" "argument group that has a title and description. For example::" msgstr "" -#: ../../../library/argparse.rst:2091 +#: ../../../library/argparse.rst:2093 msgid "" "Calling :meth:`add_argument_group` or :meth:`add_mutually_exclusive_group` " "on a mutually exclusive group now raises an exception. This nesting was " @@ -1816,11 +1820,11 @@ msgid "" "exposed through inheritance." msgstr "" -#: ../../../library/argparse.rst:2099 +#: ../../../library/argparse.rst:2101 msgid "Parser defaults" msgstr "" -#: ../../../library/argparse.rst:2103 +#: ../../../library/argparse.rst:2105 msgid "" "Most of the time, the attributes of the object returned by :meth:" "`parse_args` will be fully determined by inspecting the command-line " @@ -1829,7 +1833,7 @@ msgid "" "command line to be added::" msgstr "" -#: ../../../library/argparse.rst:2115 +#: ../../../library/argparse.rst:2117 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 " @@ -1837,67 +1841,67 @@ msgid "" "used::" msgstr "" -#: ../../../library/argparse.rst:2125 +#: ../../../library/argparse.rst:2127 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:2131 +#: ../../../library/argparse.rst:2133 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:2142 +#: ../../../library/argparse.rst:2144 msgid "Printing help" msgstr "" -#: ../../../library/argparse.rst:2144 +#: ../../../library/argparse.rst:2146 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:2150 +#: ../../../library/argparse.rst:2152 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:2156 +#: ../../../library/argparse.rst:2158 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:2160 +#: ../../../library/argparse.rst:2162 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" msgstr "" -#: ../../../library/argparse.rst:2165 +#: ../../../library/argparse.rst:2167 msgid "" "Return a string containing a brief description of how the :class:" "`ArgumentParser` should be invoked on the command line." msgstr "" -#: ../../../library/argparse.rst:2170 +#: ../../../library/argparse.rst:2172 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:2175 +#: ../../../library/argparse.rst:2177 msgid "Partial parsing" msgstr "" -#: ../../../library/argparse.rst:2179 +#: ../../../library/argparse.rst:2181 msgid "" "Sometimes a script only needs to handle a specific set of command-line " "arguments, leaving any unrecognized arguments for another script or program. " @@ -1905,7 +1909,7 @@ msgid "" "useful." msgstr "" -#: ../../../library/argparse.rst:2184 +#: ../../../library/argparse.rst:2186 msgid "" "This method works similarly to :meth:`~ArgumentParser.parse_args`, but it " "does not raise an error for extra, unrecognized arguments. Instead, it " @@ -1913,7 +1917,7 @@ msgid "" "populated namespace and the list of any unrecognized arguments." msgstr "" -#: ../../../library/argparse.rst:2198 +#: ../../../library/argparse.rst:2200 msgid "" ":ref:`Prefix matching ` rules apply to :meth:" "`~ArgumentParser.parse_known_args`. The parser may consume an option even if " @@ -1921,11 +1925,11 @@ msgid "" "remaining arguments list." msgstr "" -#: ../../../library/argparse.rst:2205 +#: ../../../library/argparse.rst:2207 msgid "Customizing file parsing" msgstr "" -#: ../../../library/argparse.rst:2209 +#: ../../../library/argparse.rst:2211 msgid "" "Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " "argument to the :class:`ArgumentParser` constructor) are read one argument " @@ -1933,41 +1937,41 @@ msgid "" "reading." msgstr "" -#: ../../../library/argparse.rst:2214 +#: ../../../library/argparse.rst:2216 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:2218 +#: ../../../library/argparse.rst:2220 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:2227 +#: ../../../library/argparse.rst:2229 msgid "Exiting methods" msgstr "" -#: ../../../library/argparse.rst:2231 +#: ../../../library/argparse.rst:2233 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:2243 +#: ../../../library/argparse.rst:2245 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:2248 +#: ../../../library/argparse.rst:2250 msgid "Intermixed parsing" msgstr "" -#: ../../../library/argparse.rst:2253 +#: ../../../library/argparse.rst:2255 msgid "" "A number of Unix commands allow the user to intermix optional arguments with " "positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " @@ -1975,7 +1979,7 @@ msgid "" "parsing style." msgstr "" -#: ../../../library/argparse.rst:2258 +#: ../../../library/argparse.rst:2260 msgid "" "These parsers do not support all the :mod:`!argparse` features, and will " "raise exceptions if unsupported features are used. In particular, " @@ -1983,7 +1987,7 @@ msgid "" "positionals are not supported." msgstr "" -#: ../../../library/argparse.rst:2263 +#: ../../../library/argparse.rst:2265 msgid "" "The following example shows the difference between :meth:`~ArgumentParser." "parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " @@ -1991,7 +1995,7 @@ msgid "" "collects all the positionals into ``rest``. ::" msgstr "" -#: ../../../library/argparse.rst:2278 +#: ../../../library/argparse.rst:2280 msgid "" ":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " "containing the populated namespace and the list of remaining argument " @@ -1999,11 +2003,11 @@ msgid "" "there are any remaining unparsed argument strings." msgstr "" -#: ../../../library/argparse.rst:2287 +#: ../../../library/argparse.rst:2289 msgid "Registering custom types or actions" msgstr "" -#: ../../../library/argparse.rst:2291 +#: ../../../library/argparse.rst:2293 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 " @@ -2011,7 +2015,7 @@ msgid "" "the type by their registered name instead of their callable name." msgstr "" -#: ../../../library/argparse.rst:2296 +#: ../../../library/argparse.rst:2298 msgid "" "The :meth:`!register` method accepts three arguments - a *registry_name*, " "specifying the internal registry where the object will be stored (e.g., " @@ -2019,47 +2023,47 @@ msgid "" "be registered, and object, the callable to be registered." msgstr "" -#: ../../../library/argparse.rst:2301 +#: ../../../library/argparse.rst:2303 msgid "" "The following example shows how to register a custom type with a parser::" msgstr "" -#: ../../../library/argparse.rst:2315 +#: ../../../library/argparse.rst:2317 msgid "Exceptions" msgstr "" -#: ../../../library/argparse.rst:2319 +#: ../../../library/argparse.rst:2321 msgid "An error from creating or using an argument (optional or positional)." msgstr "" -#: ../../../library/argparse.rst:2321 +#: ../../../library/argparse.rst:2323 msgid "" "The string value of this exception is the message, augmented with " "information about the argument that caused it." msgstr "" -#: ../../../library/argparse.rst:2326 +#: ../../../library/argparse.rst:2328 msgid "" "Raised when something goes wrong converting a command line string to a type." msgstr "" -#: ../../../library/argparse.rst:2330 +#: ../../../library/argparse.rst:2332 msgid "Guides and Tutorials" msgstr "" -#: ../../../library/argparse.rst:913 +#: ../../../library/argparse.rst:915 msgid "? (question mark)" msgstr "" -#: ../../../library/argparse.rst:913 ../../../library/argparse.rst:945 -#: ../../../library/argparse.rst:959 +#: ../../../library/argparse.rst:915 ../../../library/argparse.rst:947 +#: ../../../library/argparse.rst:961 msgid "in argparse module" msgstr "" -#: ../../../library/argparse.rst:945 +#: ../../../library/argparse.rst:947 msgid "* (asterisk)" msgstr "" -#: ../../../library/argparse.rst:959 +#: ../../../library/argparse.rst:961 msgid "+ (plus)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/concurrent.futures.pot b/main/locale/pot/LC_MESSAGES/library/concurrent.futures.pot index 0087b8c103b..3f4583ef1c5 100644 --- a/main/locale/pot/LC_MESSAGES/library/concurrent.futures.pot +++ b/main/locale/pot/LC_MESSAGES/library/concurrent.futures.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -194,13 +194,13 @@ msgstr "" msgid "And::" msgstr "" -#: ../../../library/concurrent.futures.rst:164 +#: ../../../library/concurrent.futures.rst:166 msgid "" "An :class:`Executor` subclass that uses a pool of at most *max_workers* " "threads to execute calls asynchronously." msgstr "" -#: ../../../library/concurrent.futures.rst:167 +#: ../../../library/concurrent.futures.rst:169 msgid "" "All threads enqueued to ``ThreadPoolExecutor`` will be joined before the " "interpreter can exit. Note that the exit handler which does this is executed " @@ -210,7 +210,7 @@ msgid "" "``ThreadPoolExecutor`` not be used for long-running tasks." msgstr "" -#: ../../../library/concurrent.futures.rst:174 +#: ../../../library/concurrent.futures.rst:176 msgid "" "*initializer* is an optional callable that is called at the start of each " "worker thread; *initargs* is a tuple of arguments passed to the " @@ -219,7 +219,7 @@ msgid "" "well as any attempt to submit more jobs to the pool." msgstr "" -#: ../../../library/concurrent.futures.rst:180 +#: ../../../library/concurrent.futures.rst:182 msgid "" "If *max_workers* is ``None`` or not given, it will default to the number of " "processors on the machine, multiplied by ``5``, assuming that :class:" @@ -228,19 +228,19 @@ msgid "" "`ProcessPoolExecutor`." msgstr "" -#: ../../../library/concurrent.futures.rst:188 +#: ../../../library/concurrent.futures.rst:190 msgid "" "Added the *thread_name_prefix* parameter to allow users to control the :" "class:`threading.Thread` names for worker threads created by the pool for " "easier debugging." msgstr "" -#: ../../../library/concurrent.futures.rst:193 -#: ../../../library/concurrent.futures.rst:403 +#: ../../../library/concurrent.futures.rst:195 +#: ../../../library/concurrent.futures.rst:405 msgid "Added the *initializer* and *initargs* arguments." msgstr "" -#: ../../../library/concurrent.futures.rst:196 +#: ../../../library/concurrent.futures.rst:198 msgid "" "Default value of *max_workers* is changed to ``min(32, os.cpu_count() + " "4)``. This default value preserves at least 5 workers for I/O bound tasks. " @@ -248,27 +248,27 @@ msgid "" "And it avoids using very large resources implicitly on many-core machines." msgstr "" -#: ../../../library/concurrent.futures.rst:202 +#: ../../../library/concurrent.futures.rst:204 msgid "" "ThreadPoolExecutor now reuses idle worker threads before starting " "*max_workers* worker threads too." msgstr "" -#: ../../../library/concurrent.futures.rst:205 +#: ../../../library/concurrent.futures.rst:207 msgid "" "Default value of *max_workers* is changed to ``min(32, (os." "process_cpu_count() or 1) + 4)``." msgstr "" -#: ../../../library/concurrent.futures.rst:213 +#: ../../../library/concurrent.futures.rst:215 msgid "ThreadPoolExecutor Example" msgstr "" -#: ../../../library/concurrent.futures.rst:245 +#: ../../../library/concurrent.futures.rst:247 msgid "InterpreterPoolExecutor" msgstr "" -#: ../../../library/concurrent.futures.rst:249 +#: ../../../library/concurrent.futures.rst:251 msgid "" "The :class:`InterpreterPoolExecutor` class uses a pool of interpreters to " "execute calls asynchronously. It is a :class:`ThreadPoolExecutor` subclass, " @@ -277,7 +277,7 @@ msgid "" "interpreter." msgstr "" -#: ../../../library/concurrent.futures.rst:255 +#: ../../../library/concurrent.futures.rst:257 msgid "" "The biggest benefit to using interpreters instead of only threads is true " "multi-core parallelism. Each interpreter has its own :term:`Global " @@ -286,7 +286,7 @@ msgid "" "unblocked on a different core." msgstr "" -#: ../../../library/concurrent.futures.rst:261 +#: ../../../library/concurrent.futures.rst:263 msgid "" "The tradeoff is that writing concurrent code for use with multiple " "interpreters can take extra effort. However, this is because it forces you " @@ -299,7 +299,7 @@ msgid "" "conditions." msgstr "" -#: ../../../library/concurrent.futures.rst:271 +#: ../../../library/concurrent.futures.rst:273 msgid "" "Each worker's interpreter is isolated from all the other interpreters. " "\"Isolated\" means each interpreter has its own runtime state and operates " @@ -313,7 +313,7 @@ msgid "" "``__main__``." msgstr "" -#: ../../../library/concurrent.futures.rst:283 +#: ../../../library/concurrent.futures.rst:285 msgid "" "Isolation means a mutable object, or other data, cannot be used by more than " "one interpreter at the same time. That effectively means interpreters " @@ -323,7 +323,7 @@ msgid "" "strings, and tuples of immutable objects, don't have these limitations." msgstr "" -#: ../../../library/concurrent.futures.rst:291 +#: ../../../library/concurrent.futures.rst:293 msgid "" "Communicating and synchronizing between interpreters is most effectively " "done using dedicated tools, like those proposed in :pep:`734`. One less " @@ -331,7 +331,7 @@ msgid "" "bytes over a shared :mod:`socket ` or :func:`pipe `." msgstr "" -#: ../../../library/concurrent.futures.rst:299 +#: ../../../library/concurrent.futures.rst:301 msgid "" "A :class:`ThreadPoolExecutor` subclass that executes calls asynchronously " "using a pool of at most *max_workers* threads. Each thread runs tasks in " @@ -342,7 +342,7 @@ msgid "" "executor has true multi-core parallelism." msgstr "" -#: ../../../library/concurrent.futures.rst:307 +#: ../../../library/concurrent.futures.rst:309 msgid "" "The optional *initializer* and *initargs* arguments have the same meaning as " "for :class:`!ThreadPoolExecutor`: the initializer is run when each worker is " @@ -351,17 +351,17 @@ msgid "" "when sending them to the worker's interpreter." msgstr "" -#: ../../../library/concurrent.futures.rst:315 +#: ../../../library/concurrent.futures.rst:317 msgid "" "The executor may replace uncaught exceptions from *initializer* with :class:" "`~concurrent.interpreters.ExecutionFailed`." msgstr "" -#: ../../../library/concurrent.futures.rst:318 +#: ../../../library/concurrent.futures.rst:320 msgid "Other caveats from parent :class:`ThreadPoolExecutor` apply here." msgstr "" -#: ../../../library/concurrent.futures.rst:320 +#: ../../../library/concurrent.futures.rst:322 msgid "" ":meth:`~Executor.submit` and :meth:`~Executor.map` work like normal, except " "the worker serializes the callable and arguments using :mod:`pickle` when " @@ -369,7 +369,7 @@ msgid "" "value when sending it back." msgstr "" -#: ../../../library/concurrent.futures.rst:325 +#: ../../../library/concurrent.futures.rst:327 msgid "" "When a worker's current task raises an uncaught exception, the worker always " "tries to preserve the exception as-is. If that is successful then it also " @@ -380,11 +380,11 @@ msgid "" "`~concurrent.interpreters.ExecutionFailed` instance instead." msgstr "" -#: ../../../library/concurrent.futures.rst:337 +#: ../../../library/concurrent.futures.rst:339 msgid "ProcessPoolExecutor" msgstr "" -#: ../../../library/concurrent.futures.rst:339 +#: ../../../library/concurrent.futures.rst:341 msgid "" "The :class:`ProcessPoolExecutor` class is an :class:`Executor` subclass that " "uses a pool of processes to execute calls asynchronously. :class:" @@ -394,20 +394,20 @@ msgid "" "returned." msgstr "" -#: ../../../library/concurrent.futures.rst:346 +#: ../../../library/concurrent.futures.rst:348 msgid "" "The ``__main__`` module must be importable by worker subprocesses. This " "means that :class:`ProcessPoolExecutor` will not work in the interactive " "interpreter." msgstr "" -#: ../../../library/concurrent.futures.rst:349 +#: ../../../library/concurrent.futures.rst:351 msgid "" "Calling :class:`Executor` or :class:`Future` methods from a callable " "submitted to a :class:`ProcessPoolExecutor` will result in deadlock." msgstr "" -#: ../../../library/concurrent.futures.rst:352 +#: ../../../library/concurrent.futures.rst:354 msgid "" "Note that the restrictions on functions and arguments needing to picklable " "as per :class:`multiprocessing.Process` apply when using :meth:`~Executor." @@ -415,7 +415,7 @@ msgid "" "function defined in a REPL or a lambda should not be expected to work." msgstr "" -#: ../../../library/concurrent.futures.rst:359 +#: ../../../library/concurrent.futures.rst:361 msgid "" "An :class:`Executor` subclass that executes calls asynchronously using a " "pool of at most *max_workers* processes. If *max_workers* is ``None`` or " @@ -430,7 +430,7 @@ msgid "" "`multiprocessing-start-methods`." msgstr "" -#: ../../../library/concurrent.futures.rst:373 +#: ../../../library/concurrent.futures.rst:375 msgid "" "*initializer* is an optional callable that is called at the start of each " "worker process; *initargs* is a tuple of arguments passed to the " @@ -439,7 +439,7 @@ msgid "" "well as any attempt to submit more jobs to the pool." msgstr "" -#: ../../../library/concurrent.futures.rst:379 +#: ../../../library/concurrent.futures.rst:381 msgid "" "*max_tasks_per_child* is an optional argument that specifies the maximum " "number of tasks a single process can execute before it will exit and be " @@ -450,14 +450,14 @@ msgid "" "with the \"fork\" start method." msgstr "" -#: ../../../library/concurrent.futures.rst:388 +#: ../../../library/concurrent.futures.rst:390 msgid "" "Bugs have been reported when using the *max_tasks_per_child* feature that " "can result in the :class:`ProcessPoolExecutor` hanging in some " "circumstances. Follow its eventual resolution in :gh:`115634`." msgstr "" -#: ../../../library/concurrent.futures.rst:392 +#: ../../../library/concurrent.futures.rst:394 msgid "" "When one of the worker processes terminates abruptly, a :exc:`~concurrent." "futures.process.BrokenProcessPool` error is now raised. Previously, " @@ -465,19 +465,19 @@ msgid "" "often freeze or deadlock." msgstr "" -#: ../../../library/concurrent.futures.rst:399 +#: ../../../library/concurrent.futures.rst:401 msgid "" "The *mp_context* argument was added to allow users to control the " "start_method for worker processes created by the pool." msgstr "" -#: ../../../library/concurrent.futures.rst:405 +#: ../../../library/concurrent.futures.rst:407 msgid "" "The *max_tasks_per_child* argument was added to allow users to control the " "lifetime of workers in the pool." msgstr "" -#: ../../../library/concurrent.futures.rst:409 +#: ../../../library/concurrent.futures.rst:411 msgid "" "On POSIX systems, if your application has multiple threads and the :mod:" "`multiprocessing` context uses the ``\"fork\"`` start method: The :func:`os." @@ -486,13 +486,13 @@ msgid "" "start method. See the :func:`os.fork` documentation for further explanation." msgstr "" -#: ../../../library/concurrent.futures.rst:417 +#: ../../../library/concurrent.futures.rst:419 msgid "" "*max_workers* uses :func:`os.process_cpu_count` by default, instead of :func:" "`os.cpu_count`." msgstr "" -#: ../../../library/concurrent.futures.rst:421 +#: ../../../library/concurrent.futures.rst:423 msgid "" "The default process start method (see :ref:`multiprocessing-start-methods`) " "changed away from *fork*. If you require the *fork* start method for :class:" @@ -500,7 +500,7 @@ msgid "" "get_context(\"fork\")``." msgstr "" -#: ../../../library/concurrent.futures.rst:429 +#: ../../../library/concurrent.futures.rst:431 msgid "" "Attempt to terminate all living worker processes immediately by calling :" "meth:`Process.terminate ` on each of " @@ -508,14 +508,14 @@ msgid "" "all other resources associated with the executor are freed." msgstr "" -#: ../../../library/concurrent.futures.rst:434 -#: ../../../library/concurrent.futures.rst:446 +#: ../../../library/concurrent.futures.rst:436 +#: ../../../library/concurrent.futures.rst:448 msgid "" "After calling this method the caller should no longer submit tasks to the " "executor." msgstr "" -#: ../../../library/concurrent.futures.rst:441 +#: ../../../library/concurrent.futures.rst:443 msgid "" "Attempt to kill all living worker processes immediately by calling :meth:" "`Process.kill ` on each of them. Internally, " @@ -523,28 +523,28 @@ msgid "" "resources associated with the executor are freed." msgstr "" -#: ../../../library/concurrent.futures.rst:454 +#: ../../../library/concurrent.futures.rst:456 msgid "ProcessPoolExecutor Example" msgstr "" -#: ../../../library/concurrent.futures.rst:492 +#: ../../../library/concurrent.futures.rst:494 msgid "Future Objects" msgstr "" -#: ../../../library/concurrent.futures.rst:494 +#: ../../../library/concurrent.futures.rst:496 msgid "" "The :class:`Future` class encapsulates the asynchronous execution of a " "callable. :class:`Future` instances are created by :meth:`Executor.submit`." msgstr "" -#: ../../../library/concurrent.futures.rst:499 +#: ../../../library/concurrent.futures.rst:501 msgid "" "Encapsulates the asynchronous execution of a callable. :class:`Future` " "instances are created by :meth:`Executor.submit` and should not be created " "directly except for testing." msgstr "" -#: ../../../library/concurrent.futures.rst:505 +#: ../../../library/concurrent.futures.rst:507 msgid "" "Attempt to cancel the call. If the call is currently being executed or " "finished running and cannot be cancelled then the method will return " @@ -552,22 +552,22 @@ msgid "" "``True``." msgstr "" -#: ../../../library/concurrent.futures.rst:512 +#: ../../../library/concurrent.futures.rst:514 msgid "Return ``True`` if the call was successfully cancelled." msgstr "" -#: ../../../library/concurrent.futures.rst:516 +#: ../../../library/concurrent.futures.rst:518 msgid "" "Return ``True`` if the call is currently being executed and cannot be " "cancelled." msgstr "" -#: ../../../library/concurrent.futures.rst:521 +#: ../../../library/concurrent.futures.rst:523 msgid "" "Return ``True`` if the call was successfully cancelled or finished running." msgstr "" -#: ../../../library/concurrent.futures.rst:526 +#: ../../../library/concurrent.futures.rst:528 msgid "" "Return the value returned by the call. If the call hasn't yet completed then " "this method will wait up to *timeout* seconds. If the call hasn't completed " @@ -576,19 +576,19 @@ msgid "" "no limit to the wait time." msgstr "" -#: ../../../library/concurrent.futures.rst:533 -#: ../../../library/concurrent.futures.rst:547 +#: ../../../library/concurrent.futures.rst:535 +#: ../../../library/concurrent.futures.rst:549 msgid "" "If the future is cancelled before completing then :exc:`.CancelledError` " "will be raised." msgstr "" -#: ../../../library/concurrent.futures.rst:536 +#: ../../../library/concurrent.futures.rst:538 msgid "" "If the call raised an exception, this method will raise the same exception." msgstr "" -#: ../../../library/concurrent.futures.rst:540 +#: ../../../library/concurrent.futures.rst:542 msgid "" "Return the exception raised by the call. If the call hasn't yet completed " "then this method will wait up to *timeout* seconds. If the call hasn't " @@ -597,18 +597,18 @@ msgid "" "``None``, there is no limit to the wait time." msgstr "" -#: ../../../library/concurrent.futures.rst:550 +#: ../../../library/concurrent.futures.rst:552 msgid "If the call completed without raising, ``None`` is returned." msgstr "" -#: ../../../library/concurrent.futures.rst:554 +#: ../../../library/concurrent.futures.rst:556 msgid "" "Attaches the callable *fn* to the future. *fn* will be called, with the " "future as its only argument, when the future is cancelled or finishes " "running." msgstr "" -#: ../../../library/concurrent.futures.rst:558 +#: ../../../library/concurrent.futures.rst:560 msgid "" "Added callables are called in the order that they were added and are always " "called in a thread belonging to the process that added them. If the " @@ -617,26 +617,26 @@ msgid "" "behavior is undefined." msgstr "" -#: ../../../library/concurrent.futures.rst:564 +#: ../../../library/concurrent.futures.rst:566 msgid "" "If the future has already completed or been cancelled, *fn* will be called " "immediately." msgstr "" -#: ../../../library/concurrent.futures.rst:567 +#: ../../../library/concurrent.futures.rst:569 msgid "" "The following :class:`Future` methods are meant for use in unit tests and :" "class:`Executor` implementations." msgstr "" -#: ../../../library/concurrent.futures.rst:572 +#: ../../../library/concurrent.futures.rst:574 msgid "" "This method should only be called by :class:`Executor` implementations " "before executing the work associated with the :class:`Future` and by unit " "tests." msgstr "" -#: ../../../library/concurrent.futures.rst:576 +#: ../../../library/concurrent.futures.rst:578 msgid "" "If the method returns ``False`` then the :class:`Future` was cancelled, i." "e. :meth:`Future.cancel` was called and returned ``True``. Any threads " @@ -644,49 +644,49 @@ msgid "" "or :func:`wait`) will be woken up." msgstr "" -#: ../../../library/concurrent.futures.rst:581 +#: ../../../library/concurrent.futures.rst:583 msgid "" "If the method returns ``True`` then the :class:`Future` was not cancelled " "and has been put in the running state, i.e. calls to :meth:`Future.running` " "will return ``True``." msgstr "" -#: ../../../library/concurrent.futures.rst:585 +#: ../../../library/concurrent.futures.rst:587 msgid "" "This method can only be called once and cannot be called after :meth:`Future." "set_result` or :meth:`Future.set_exception` have been called." msgstr "" -#: ../../../library/concurrent.futures.rst:591 +#: ../../../library/concurrent.futures.rst:593 msgid "" "Sets the result of the work associated with the :class:`Future` to *result*." msgstr "" -#: ../../../library/concurrent.futures.rst:594 -#: ../../../library/concurrent.futures.rst:607 +#: ../../../library/concurrent.futures.rst:596 +#: ../../../library/concurrent.futures.rst:609 msgid "" "This method should only be used by :class:`Executor` implementations and " "unit tests." msgstr "" -#: ../../../library/concurrent.futures.rst:597 -#: ../../../library/concurrent.futures.rst:610 +#: ../../../library/concurrent.futures.rst:599 +#: ../../../library/concurrent.futures.rst:612 msgid "" "This method raises :exc:`concurrent.futures.InvalidStateError` if the :class:" "`Future` is already done." msgstr "" -#: ../../../library/concurrent.futures.rst:604 +#: ../../../library/concurrent.futures.rst:606 msgid "" "Sets the result of the work associated with the :class:`Future` to the :" "class:`Exception` *exception*." msgstr "" -#: ../../../library/concurrent.futures.rst:616 +#: ../../../library/concurrent.futures.rst:618 msgid "Module Functions" msgstr "" -#: ../../../library/concurrent.futures.rst:620 +#: ../../../library/concurrent.futures.rst:622 msgid "" "Wait for the :class:`Future` instances (possibly created by different :class:" "`Executor` instances) given by *fs* to complete. Duplicate futures given to " @@ -697,43 +697,43 @@ msgid "" "running futures)." msgstr "" -#: ../../../library/concurrent.futures.rst:628 +#: ../../../library/concurrent.futures.rst:630 msgid "" "*timeout* can be used to control the maximum number of seconds to wait " "before returning. *timeout* can be an int or float. If *timeout* is not " "specified or ``None``, there is no limit to the wait time." msgstr "" -#: ../../../library/concurrent.futures.rst:632 +#: ../../../library/concurrent.futures.rst:634 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" msgstr "" -#: ../../../library/concurrent.futures.rst:638 +#: ../../../library/concurrent.futures.rst:640 msgid "Constant" msgstr "" -#: ../../../library/concurrent.futures.rst:639 +#: ../../../library/concurrent.futures.rst:641 msgid "Description" msgstr "" -#: ../../../library/concurrent.futures.rst:642 +#: ../../../library/concurrent.futures.rst:644 msgid "The function will return when any future finishes or is cancelled." msgstr "" -#: ../../../library/concurrent.futures.rst:645 +#: ../../../library/concurrent.futures.rst:647 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/concurrent.futures.rst:650 +#: ../../../library/concurrent.futures.rst:652 msgid "The function will return when all futures finish or are cancelled." msgstr "" -#: ../../../library/concurrent.futures.rst:654 +#: ../../../library/concurrent.futures.rst:656 msgid "" "Returns an iterator over the :class:`Future` instances (possibly created by " "different :class:`Executor` instances) given by *fs* that yields futures as " @@ -746,62 +746,62 @@ msgid "" "*timeout* is not specified or ``None``, there is no limit to the wait time." msgstr "" -#: ../../../library/concurrent.futures.rst:667 +#: ../../../library/concurrent.futures.rst:669 msgid ":pep:`3148` -- futures - execute computations asynchronously" msgstr "" -#: ../../../library/concurrent.futures.rst:668 +#: ../../../library/concurrent.futures.rst:670 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: ../../../library/concurrent.futures.rst:673 +#: ../../../library/concurrent.futures.rst:675 msgid "Exception classes" msgstr "" -#: ../../../library/concurrent.futures.rst:679 +#: ../../../library/concurrent.futures.rst:681 msgid "Raised when a future is cancelled." msgstr "" -#: ../../../library/concurrent.futures.rst:683 +#: ../../../library/concurrent.futures.rst:685 msgid "" "A deprecated alias of :exc:`TimeoutError`, raised when a future operation " "exceeds the given timeout." msgstr "" -#: ../../../library/concurrent.futures.rst:688 +#: ../../../library/concurrent.futures.rst:690 msgid "This class was made an alias of :exc:`TimeoutError`." msgstr "" -#: ../../../library/concurrent.futures.rst:693 +#: ../../../library/concurrent.futures.rst:695 msgid "" "Derived from :exc:`RuntimeError`, this exception class is raised when an " "executor is broken for some reason, and cannot be used to submit or execute " "new tasks." msgstr "" -#: ../../../library/concurrent.futures.rst:701 +#: ../../../library/concurrent.futures.rst:703 msgid "" "Raised when an operation is performed on a future that is not allowed in the " "current state." msgstr "" -#: ../../../library/concurrent.futures.rst:710 +#: ../../../library/concurrent.futures.rst:712 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor`, this exception class " "is raised when one of the workers of a :class:`~concurrent.futures." "ThreadPoolExecutor` has failed initializing." msgstr "" -#: ../../../library/concurrent.futures.rst:721 +#: ../../../library/concurrent.futures.rst:723 msgid "" "Derived from :exc:`~concurrent.futures.thread.BrokenThreadPool`, this " "exception class is raised when one of the workers of a :class:`~concurrent." "futures.InterpreterPoolExecutor` has failed initializing." msgstr "" -#: ../../../library/concurrent.futures.rst:732 +#: ../../../library/concurrent.futures.rst:734 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor` (formerly :exc:" "`RuntimeError`), this exception class is raised when one of the workers of " diff --git a/main/locale/pot/LC_MESSAGES/library/contextlib.pot b/main/locale/pot/LC_MESSAGES/library/contextlib.pot index cf62e0a23cc..96e0a0c46b2 100644 --- a/main/locale/pot/LC_MESSAGES/library/contextlib.pot +++ b/main/locale/pot/LC_MESSAGES/library/contextlib.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -43,20 +43,20 @@ msgstr "" #: ../../../library/contextlib.rst:23 msgid "" -"An :term:`abstract base class` for classes that implement :meth:`object." -"__enter__` and :meth:`object.__exit__`. A default implementation for :meth:" -"`object.__enter__` is provided which returns ``self`` while :meth:`object." +"An :term:`abstract base class` for classes that implement :meth:`~object." +"__enter__` and :meth:`~object.__exit__`. A default implementation for :meth:" +"`~object.__enter__` is provided which returns ``self`` while :meth:`~object." "__exit__` is an abstract method which by default returns ``None``. See also " "the definition of :ref:`typecontextmanager`." msgstr "" #: ../../../library/contextlib.rst:34 msgid "" -"An :term:`abstract base class` for classes that implement :meth:`object." -"__aenter__` and :meth:`object.__aexit__`. A default implementation for :meth:" -"`object.__aenter__` is provided which returns ``self`` while :meth:`object." -"__aexit__` is an abstract method which by default returns ``None``. See also " -"the definition of :ref:`async-context-managers`." +"An :term:`abstract base class` for classes that implement :meth:`~object." +"__aenter__` and :meth:`~object.__aexit__`. A default implementation for :" +"meth:`~object.__aenter__` is provided which returns ``self`` while :meth:" +"`~object.__aexit__` is an abstract method which by default returns ``None``. " +"See also the definition of :ref:`async-context-managers`." msgstr "" #: ../../../library/contextlib.rst:46 @@ -210,9 +210,9 @@ msgstr "" #: ../../../library/contextlib.rst:231 msgid "" -"Return a context manager that returns *enter_result* from ``__enter__``, but " -"otherwise does nothing. It is intended to be used as a stand-in for an " -"optional context manager, for example::" +"Return a context manager that returns *enter_result* from :meth:`~object." +"__enter__`, but otherwise does nothing. It is intended to be used as a stand-" +"in for an optional context manager, for example::" msgstr "" #: ../../../library/contextlib.rst:245 @@ -289,9 +289,9 @@ msgstr "" msgid "" "For example, the output of :func:`help` normally is sent to *sys.stdout*. " "You can capture that output in a string by redirecting the output to an :" -"class:`io.StringIO` object. The replacement stream is returned from the " -"``__enter__`` method and so is available as the target of the :keyword:" -"`with` statement::" +"class:`io.StringIO` object. The replacement stream is returned from the :" +"meth:`~object.__enter__` method and so is available as the target of the :" +"keyword:`with` statement::" msgstr "" #: ../../../library/contextlib.rst:345 @@ -341,47 +341,48 @@ msgstr "" #: ../../../library/contextlib.rst:398 msgid "" -"Context managers inheriting from ``ContextDecorator`` have to implement " -"``__enter__`` and ``__exit__`` as normal. ``__exit__`` retains its optional " -"exception handling even when used as a decorator." +"Context managers inheriting from ``ContextDecorator`` have to implement :" +"meth:`~object.__enter__` and :meth:`~object.__exit__` as normal. " +"``__exit__`` retains its optional exception handling even when used as a " +"decorator." msgstr "" -#: ../../../library/contextlib.rst:402 +#: ../../../library/contextlib.rst:403 msgid "" "``ContextDecorator`` is used by :func:`contextmanager`, so you get this " "functionality automatically." msgstr "" -#: ../../../library/contextlib.rst:405 +#: ../../../library/contextlib.rst:406 msgid "Example of ``ContextDecorator``::" msgstr "" -#: ../../../library/contextlib.rst:418 ../../../library/contextlib.rst:490 +#: ../../../library/contextlib.rst:419 ../../../library/contextlib.rst:491 msgid "The class can then be used like this::" msgstr "" -#: ../../../library/contextlib.rst:436 +#: ../../../library/contextlib.rst:437 msgid "" "This change is just syntactic sugar for any construct of the following form::" msgstr "" -#: ../../../library/contextlib.rst:442 +#: ../../../library/contextlib.rst:443 msgid "``ContextDecorator`` lets you instead write::" msgstr "" -#: ../../../library/contextlib.rst:448 +#: ../../../library/contextlib.rst:449 msgid "" "It makes it clear that the ``cm`` applies to the whole function, rather than " "just a piece of it (and saving an indentation level is nice, too)." msgstr "" -#: ../../../library/contextlib.rst:451 +#: ../../../library/contextlib.rst:452 msgid "" "Existing context managers that already have a base class can be extended by " "using ``ContextDecorator`` as a mixin class::" msgstr "" -#: ../../../library/contextlib.rst:464 +#: ../../../library/contextlib.rst:465 msgid "" "As the decorated function must be able to be called multiple times, the " "underlying context manager must support use in multiple :keyword:`with` " @@ -389,35 +390,35 @@ msgid "" "explicit :keyword:`!with` statement inside the function should be used." msgstr "" -#: ../../../library/contextlib.rst:474 +#: ../../../library/contextlib.rst:475 msgid "" "Similar to :class:`ContextDecorator` but only for asynchronous functions." msgstr "" -#: ../../../library/contextlib.rst:476 +#: ../../../library/contextlib.rst:477 msgid "Example of ``AsyncContextDecorator``::" msgstr "" -#: ../../../library/contextlib.rst:515 +#: ../../../library/contextlib.rst:516 msgid "" "A context manager that is designed to make it easy to programmatically " "combine other context managers and cleanup functions, especially those that " "are optional or otherwise driven by input data." msgstr "" -#: ../../../library/contextlib.rst:519 +#: ../../../library/contextlib.rst:520 msgid "" "For example, a set of files may easily be handled in a single with statement " "as follows::" msgstr "" -#: ../../../library/contextlib.rst:528 +#: ../../../library/contextlib.rst:529 msgid "" "The :meth:`~object.__enter__` method returns the :class:`ExitStack` " "instance, and performs no additional operations." msgstr "" -#: ../../../library/contextlib.rst:531 +#: ../../../library/contextlib.rst:532 msgid "" "Each instance maintains a stack of registered callbacks that are called in " "reverse order when the instance is closed (either explicitly or implicitly " @@ -425,14 +426,14 @@ msgid "" "invoked implicitly when the context stack instance is garbage collected." msgstr "" -#: ../../../library/contextlib.rst:536 +#: ../../../library/contextlib.rst:537 msgid "" "This stack model is used so that context managers that acquire their " "resources in their ``__init__`` method (such as file objects) can be handled " "correctly." msgstr "" -#: ../../../library/contextlib.rst:540 +#: ../../../library/contextlib.rst:541 msgid "" "Since registered callbacks are invoked in the reverse order of registration, " "this ends up behaving as if multiple nested :keyword:`with` statements had " @@ -442,7 +443,7 @@ msgid "" "updated state." msgstr "" -#: ../../../library/contextlib.rst:547 +#: ../../../library/contextlib.rst:548 msgid "" "This is a relatively low level API that takes care of the details of " "correctly unwinding the stack of exit callbacks. It provides a suitable " @@ -450,86 +451,86 @@ msgid "" "in application specific ways." msgstr "" -#: ../../../library/contextlib.rst:556 +#: ../../../library/contextlib.rst:557 msgid "" "Enters a new context manager and adds its :meth:`~object.__exit__` method to " "the callback stack. The return value is the result of the context manager's " "own :meth:`~object.__enter__` method." msgstr "" -#: ../../../library/contextlib.rst:560 +#: ../../../library/contextlib.rst:561 msgid "" "These context managers may suppress exceptions just as they normally would " "if used directly as part of a :keyword:`with` statement." msgstr "" -#: ../../../library/contextlib.rst:563 +#: ../../../library/contextlib.rst:564 msgid "" "Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not a " "context manager." msgstr "" -#: ../../../library/contextlib.rst:567 +#: ../../../library/contextlib.rst:568 msgid "" "Added support for arbitrary descriptors :meth:`!__enter__` and :meth:`!" "__exit__`." msgstr "" -#: ../../../library/contextlib.rst:573 +#: ../../../library/contextlib.rst:574 msgid "" "Adds a context manager's :meth:`~object.__exit__` method to the callback " "stack." msgstr "" -#: ../../../library/contextlib.rst:575 +#: ../../../library/contextlib.rst:576 msgid "" "As ``__enter__`` is *not* invoked, this method can be used to cover part of " "an :meth:`~object.__enter__` implementation with a context manager's own :" "meth:`~object.__exit__` method." msgstr "" -#: ../../../library/contextlib.rst:579 +#: ../../../library/contextlib.rst:580 msgid "" "If passed an object that is not a context manager, this method assumes it is " "a callback with the same signature as a context manager's :meth:`~object." "__exit__` method and adds it directly to the callback stack." msgstr "" -#: ../../../library/contextlib.rst:583 +#: ../../../library/contextlib.rst:584 msgid "" "By returning true values, these callbacks can suppress exceptions the same " "way context manager :meth:`~object.__exit__` methods can." msgstr "" -#: ../../../library/contextlib.rst:586 +#: ../../../library/contextlib.rst:587 msgid "" "The passed in object is returned from the function, allowing this method to " "be used as a function decorator." msgstr "" -#: ../../../library/contextlib.rst:589 +#: ../../../library/contextlib.rst:590 msgid "Added support for arbitrary descriptors :meth:`!__exit__`." msgstr "" -#: ../../../library/contextlib.rst:594 +#: ../../../library/contextlib.rst:595 msgid "" "Accepts an arbitrary callback function and arguments and adds it to the " "callback stack." msgstr "" -#: ../../../library/contextlib.rst:597 +#: ../../../library/contextlib.rst:598 msgid "" "Unlike the other methods, callbacks added this way cannot suppress " "exceptions (as they are never passed the exception details)." msgstr "" -#: ../../../library/contextlib.rst:600 +#: ../../../library/contextlib.rst:601 msgid "" "The passed in callback is returned from the function, allowing this method " "to be used as a function decorator." msgstr "" -#: ../../../library/contextlib.rst:605 +#: ../../../library/contextlib.rst:606 msgid "" "Transfers the callback stack to a fresh :class:`ExitStack` instance and " "returns it. No callbacks are invoked by this operation - instead, they will " @@ -537,87 +538,87 @@ msgid "" "at the end of a :keyword:`with` statement)." msgstr "" -#: ../../../library/contextlib.rst:610 +#: ../../../library/contextlib.rst:611 msgid "" "For example, a group of files can be opened as an \"all or nothing\" " "operation as follows::" msgstr "" -#: ../../../library/contextlib.rst:624 +#: ../../../library/contextlib.rst:625 msgid "" "Immediately unwinds the callback stack, invoking callbacks in the reverse " "order of registration. For any context managers and exit callbacks " "registered, the arguments passed in will indicate that no exception occurred." msgstr "" -#: ../../../library/contextlib.rst:631 +#: ../../../library/contextlib.rst:632 msgid "" "An :ref:`asynchronous context manager `, similar to :" "class:`ExitStack`, that supports combining both synchronous and asynchronous " "context managers, as well as having coroutines for cleanup logic." msgstr "" -#: ../../../library/contextlib.rst:636 +#: ../../../library/contextlib.rst:637 msgid "" "The :meth:`~ExitStack.close` method is not implemented; :meth:`aclose` must " "be used instead." msgstr "" -#: ../../../library/contextlib.rst:642 +#: ../../../library/contextlib.rst:643 msgid "" "Similar to :meth:`ExitStack.enter_context` but expects an asynchronous " "context manager." msgstr "" -#: ../../../library/contextlib.rst:645 +#: ../../../library/contextlib.rst:646 msgid "" "Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not an " "asynchronous context manager." msgstr "" -#: ../../../library/contextlib.rst:649 +#: ../../../library/contextlib.rst:650 msgid "" "Added support for arbitrary descriptors :meth:`!__aenter__` and :meth:`!" "__aexit__`." msgstr "" -#: ../../../library/contextlib.rst:654 +#: ../../../library/contextlib.rst:655 msgid "" "Similar to :meth:`ExitStack.push` but expects either an asynchronous context " "manager or a coroutine function." msgstr "" -#: ../../../library/contextlib.rst:657 +#: ../../../library/contextlib.rst:658 msgid "Added support for arbitrary descriptors :meth:`!__aexit__`." msgstr "" -#: ../../../library/contextlib.rst:662 +#: ../../../library/contextlib.rst:663 msgid "Similar to :meth:`ExitStack.callback` but expects a coroutine function." msgstr "" -#: ../../../library/contextlib.rst:667 +#: ../../../library/contextlib.rst:668 msgid "Similar to :meth:`ExitStack.close` but properly handles awaitables." msgstr "" -#: ../../../library/contextlib.rst:669 +#: ../../../library/contextlib.rst:670 msgid "Continuing the example for :func:`asynccontextmanager`::" msgstr "" -#: ../../../library/contextlib.rst:681 +#: ../../../library/contextlib.rst:682 msgid "Examples and Recipes" msgstr "" -#: ../../../library/contextlib.rst:683 +#: ../../../library/contextlib.rst:684 msgid "" "This section describes some examples and recipes for making effective use of " "the tools provided by :mod:`!contextlib`." msgstr "" -#: ../../../library/contextlib.rst:688 +#: ../../../library/contextlib.rst:689 msgid "Supporting a variable number of context managers" msgstr "" -#: ../../../library/contextlib.rst:690 +#: ../../../library/contextlib.rst:691 msgid "" "The primary use case for :class:`ExitStack` is the one given in the class " "documentation: supporting a variable number of context managers and other " @@ -627,27 +628,28 @@ msgid "" "of the context managers being optional::" msgstr "" -#: ../../../library/contextlib.rst:705 +#: ../../../library/contextlib.rst:706 msgid "" "As shown, :class:`ExitStack` also makes it quite easy to use :keyword:`with` " "statements to manage arbitrary resources that don't natively support the " "context management protocol." msgstr "" -#: ../../../library/contextlib.rst:711 +#: ../../../library/contextlib.rst:712 msgid "Catching exceptions from ``__enter__`` methods" msgstr "" -#: ../../../library/contextlib.rst:713 +#: ../../../library/contextlib.rst:714 msgid "" -"It is occasionally desirable to catch exceptions from an ``__enter__`` " -"method implementation, *without* inadvertently catching exceptions from the :" -"keyword:`with` statement body or the context manager's ``__exit__`` method. " -"By using :class:`ExitStack` the steps in the context management protocol can " -"be separated slightly in order to allow this::" +"It is occasionally desirable to catch exceptions from an :meth:`~object." +"__enter__` method implementation, *without* inadvertently catching " +"exceptions from the :keyword:`with` statement body or the context manager's :" +"meth:`~object.__exit__` method. By using :class:`ExitStack` the steps in the " +"context management protocol can be separated slightly in order to allow " +"this::" msgstr "" -#: ../../../library/contextlib.rst:728 +#: ../../../library/contextlib.rst:729 msgid "" "Actually needing to do this is likely to indicate that the underlying API " "should be providing a direct resource management interface for use with :" @@ -658,29 +660,29 @@ msgid "" "`with` statement." msgstr "" -#: ../../../library/contextlib.rst:738 +#: ../../../library/contextlib.rst:739 msgid "Cleaning up in an ``__enter__`` implementation" msgstr "" -#: ../../../library/contextlib.rst:740 +#: ../../../library/contextlib.rst:741 msgid "" "As noted in the documentation of :meth:`ExitStack.push`, this method can be " "useful in cleaning up an already allocated resource if later steps in the :" "meth:`~object.__enter__` implementation fail." msgstr "" -#: ../../../library/contextlib.rst:744 +#: ../../../library/contextlib.rst:745 msgid "" "Here's an example of doing this for a context manager that accepts resource " "acquisition and release functions, along with an optional validation " "function, and maps them to the context management protocol::" msgstr "" -#: ../../../library/contextlib.rst:784 +#: ../../../library/contextlib.rst:785 msgid "Replacing any use of ``try-finally`` and flag variables" msgstr "" -#: ../../../library/contextlib.rst:786 +#: ../../../library/contextlib.rst:787 msgid "" "A pattern you will sometimes see is a ``try-finally`` statement with a flag " "variable to indicate whether or not the body of the ``finally`` clause " @@ -688,57 +690,57 @@ msgid "" "by using an ``except`` clause instead), it looks something like this::" msgstr "" -#: ../../../library/contextlib.rst:800 +#: ../../../library/contextlib.rst:801 msgid "" "As with any ``try`` statement based code, this can cause problems for " "development and review, because the setup code and the cleanup code can end " "up being separated by arbitrarily long sections of code." msgstr "" -#: ../../../library/contextlib.rst:804 +#: ../../../library/contextlib.rst:805 msgid "" ":class:`ExitStack` makes it possible to instead register a callback for " "execution at the end of a ``with`` statement, and then later decide to skip " "executing that callback::" msgstr "" -#: ../../../library/contextlib.rst:816 +#: ../../../library/contextlib.rst:817 msgid "" "This allows the intended cleanup behaviour to be made explicit up front, " "rather than requiring a separate flag variable." msgstr "" -#: ../../../library/contextlib.rst:819 +#: ../../../library/contextlib.rst:820 msgid "" "If a particular application uses this pattern a lot, it can be simplified " "even further by means of a small helper class::" msgstr "" -#: ../../../library/contextlib.rst:837 +#: ../../../library/contextlib.rst:838 msgid "" "If the resource cleanup isn't already neatly bundled into a standalone " "function, then it is still possible to use the decorator form of :meth:" "`ExitStack.callback` to declare the resource cleanup in advance::" msgstr "" -#: ../../../library/contextlib.rst:852 +#: ../../../library/contextlib.rst:853 msgid "" "Due to the way the decorator protocol works, a callback function declared " "this way cannot take any parameters. Instead, any resources to be released " "must be accessed as closure variables." msgstr "" -#: ../../../library/contextlib.rst:858 +#: ../../../library/contextlib.rst:859 msgid "Using a context manager as a function decorator" msgstr "" -#: ../../../library/contextlib.rst:860 +#: ../../../library/contextlib.rst:861 msgid "" ":class:`ContextDecorator` makes it possible to use a context manager in both " "an ordinary ``with`` statement and also as a function decorator." msgstr "" -#: ../../../library/contextlib.rst:863 +#: ../../../library/contextlib.rst:864 msgid "" "For example, it is sometimes useful to wrap functions or groups of " "statements with a logger that can track the time of entry and time of exit. " @@ -747,15 +749,15 @@ msgid "" "in a single definition::" msgstr "" -#: ../../../library/contextlib.rst:884 +#: ../../../library/contextlib.rst:885 msgid "Instances of this class can be used as both a context manager::" msgstr "" -#: ../../../library/contextlib.rst:890 +#: ../../../library/contextlib.rst:891 msgid "And also as a function decorator::" msgstr "" -#: ../../../library/contextlib.rst:897 +#: ../../../library/contextlib.rst:898 msgid "" "Note that there is one additional limitation when using context managers as " "function decorators: there's no way to access the return value of :meth:" @@ -763,21 +765,21 @@ msgid "" "use an explicit ``with`` statement." msgstr "" -#: ../../../library/contextlib.rst:904 +#: ../../../library/contextlib.rst:905 msgid ":pep:`343` - The \"with\" statement" msgstr "" -#: ../../../library/contextlib.rst:905 +#: ../../../library/contextlib.rst:906 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../../library/contextlib.rst:911 +#: ../../../library/contextlib.rst:912 msgid "Single use, reusable and reentrant context managers" msgstr "" -#: ../../../library/contextlib.rst:913 +#: ../../../library/contextlib.rst:914 msgid "" "Most context managers are written in a way that means they can only be used " "effectively in a :keyword:`with` statement once. These single use context " @@ -785,32 +787,32 @@ msgid "" "them a second time will trigger an exception or otherwise not work correctly." msgstr "" -#: ../../../library/contextlib.rst:919 +#: ../../../library/contextlib.rst:920 msgid "" "This common limitation means that it is generally advisable to create " "context managers directly in the header of the :keyword:`with` statement " "where they are used (as shown in all of the usage examples above)." msgstr "" -#: ../../../library/contextlib.rst:923 +#: ../../../library/contextlib.rst:924 msgid "" "Files are an example of effectively single use context managers, since the " "first :keyword:`with` statement will close the file, preventing any further " "IO operations using that file object." msgstr "" -#: ../../../library/contextlib.rst:927 +#: ../../../library/contextlib.rst:928 msgid "" "Context managers created using :func:`contextmanager` are also single use " "context managers, and will complain about the underlying generator failing " "to yield if an attempt is made to use them a second time::" msgstr "" -#: ../../../library/contextlib.rst:955 +#: ../../../library/contextlib.rst:956 msgid "Reentrant context managers" msgstr "" -#: ../../../library/contextlib.rst:957 +#: ../../../library/contextlib.rst:958 msgid "" "More sophisticated context managers may be \"reentrant\". These context " "managers can not only be used in multiple :keyword:`with` statements, but " @@ -818,21 +820,21 @@ msgid "" "the same context manager." msgstr "" -#: ../../../library/contextlib.rst:962 +#: ../../../library/contextlib.rst:963 msgid "" ":class:`threading.RLock` is an example of a reentrant context manager, as " "are :func:`suppress`, :func:`redirect_stdout`, and :func:`chdir`. Here's a " "very simple example of reentrant use::" msgstr "" -#: ../../../library/contextlib.rst:981 +#: ../../../library/contextlib.rst:982 msgid "" "Real world examples of reentrancy are more likely to involve multiple " "functions calling each other and hence be far more complicated than this " "example." msgstr "" -#: ../../../library/contextlib.rst:985 +#: ../../../library/contextlib.rst:986 msgid "" "Note also that being reentrant is *not* the same thing as being thread " "safe. :func:`redirect_stdout`, for example, is definitely not thread safe, " @@ -840,11 +842,11 @@ msgid "" "stdout` to a different stream." msgstr "" -#: ../../../library/contextlib.rst:994 +#: ../../../library/contextlib.rst:995 msgid "Reusable context managers" msgstr "" -#: ../../../library/contextlib.rst:996 +#: ../../../library/contextlib.rst:997 msgid "" "Distinct from both single use and reentrant context managers are " "\"reusable\" context managers (or, to be completely explicit, \"reusable, " @@ -854,21 +856,21 @@ msgid "" "manager instance has already been used in a containing with statement." msgstr "" -#: ../../../library/contextlib.rst:1003 +#: ../../../library/contextlib.rst:1004 msgid "" ":class:`threading.Lock` is an example of a reusable, but not reentrant, " "context manager (for a reentrant lock, it is necessary to use :class:" "`threading.RLock` instead)." msgstr "" -#: ../../../library/contextlib.rst:1007 +#: ../../../library/contextlib.rst:1008 msgid "" "Another example of a reusable, but not reentrant, context manager is :class:" "`ExitStack`, as it invokes *all* currently registered callbacks when leaving " "any with statement, regardless of where those callbacks were added::" msgstr "" -#: ../../../library/contextlib.rst:1038 +#: ../../../library/contextlib.rst:1039 msgid "" "As the output from the example shows, reusing a single stack object across " "multiple with statements works correctly, but attempting to nest them will " @@ -876,7 +878,7 @@ msgid "" "which is unlikely to be desirable behaviour." msgstr "" -#: ../../../library/contextlib.rst:1043 +#: ../../../library/contextlib.rst:1044 msgid "" "Using separate :class:`ExitStack` instances instead of reusing a single " "instance avoids that problem::" diff --git a/main/locale/pot/LC_MESSAGES/library/ctypes.pot b/main/locale/pot/LC_MESSAGES/library/ctypes.pot index 100045d8068..d04a702af9b 100644 --- a/main/locale/pot/LC_MESSAGES/library/ctypes.pot +++ b/main/locale/pot/LC_MESSAGES/library/ctypes.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -46,58 +46,53 @@ msgstr "" #: ../../../library/ctypes.rst:23 msgid "" -"Note: The code samples in this tutorial use :mod:`doctest` to make sure that " -"they actually work. Since some code samples behave differently under Linux, " -"Windows, or macOS, they contain doctest directives in comments." -msgstr "" - -#: ../../../library/ctypes.rst:27 -msgid "" "Note: Some code samples reference the ctypes :class:`c_int` type. On " "platforms where ``sizeof(long) == sizeof(int)`` it is an alias to :class:" "`c_long`. So, you should not be confused if :class:`c_long` is printed if " "you would expect :class:`c_int` --- they are actually the same type." msgstr "" -#: ../../../library/ctypes.rst:35 +#: ../../../library/ctypes.rst:31 msgid "Loading dynamic link libraries" msgstr "" -#: ../../../library/ctypes.rst:37 +#: ../../../library/ctypes.rst:33 msgid "" -":mod:`!ctypes` exports the *cdll*, and on Windows *windll* and *oledll* " -"objects, for loading dynamic link libraries." +":mod:`!ctypes` exports the :py:data:`~ctypes.cdll`, and on Windows :py:data:" +"`~ctypes.windll` and :py:data:`~ctypes.oledll` objects, for loading dynamic " +"link libraries." msgstr "" -#: ../../../library/ctypes.rst:40 +#: ../../../library/ctypes.rst:37 msgid "" -"You load libraries by accessing them as attributes of these objects. *cdll* " -"loads libraries which export functions using the standard ``cdecl`` calling " -"convention, while *windll* libraries call functions using the ``stdcall`` " -"calling convention. *oledll* also uses the ``stdcall`` calling convention, " -"and assumes the functions return a Windows :c:type:`!HRESULT` error code. " -"The error code is used to automatically raise an :class:`OSError` exception " -"when the function call fails." +"You load libraries by accessing them as attributes of these objects. :py:" +"data:`!cdll` loads libraries which export functions using the standard " +"``cdecl`` calling convention, while :py:data:`!windll` libraries call " +"functions using the ``stdcall`` calling convention. :py:data:`~oledll` also " +"uses the ``stdcall`` calling convention, and assumes the functions return a " +"Windows :c:type:`!HRESULT` error code. The error code is used to " +"automatically raise an :class:`OSError` exception when the function call " +"fails." msgstr "" -#: ../../../library/ctypes.rst:48 +#: ../../../library/ctypes.rst:47 msgid "" "Windows errors used to raise :exc:`WindowsError`, which is now an alias of :" "exc:`OSError`." msgstr "" -#: ../../../library/ctypes.rst:53 +#: ../../../library/ctypes.rst:52 msgid "" "Here are some examples for Windows. Note that ``msvcrt`` is the MS standard " "C library containing most standard C functions, and uses the ``cdecl`` " "calling convention::" msgstr "" -#: ../../../library/ctypes.rst:65 +#: ../../../library/ctypes.rst:64 msgid "Windows appends the usual ``.dll`` file suffix automatically." msgstr "" -#: ../../../library/ctypes.rst:68 +#: ../../../library/ctypes.rst:67 msgid "" "Accessing the standard C library through ``cdll.msvcrt`` will use an " "outdated version of the library that may be incompatible with the one being " @@ -105,24 +100,32 @@ msgid "" "import and use the ``msvcrt`` module." msgstr "" -#: ../../../library/ctypes.rst:73 +#: ../../../library/ctypes.rst:72 msgid "" -"On Linux, it is required to specify the filename *including* the extension " -"to load a library, so attribute access can not be used to load libraries. " -"Either the :meth:`~LibraryLoader.LoadLibrary` method of the dll loaders " -"should be used, or you should load the library by creating an instance of " -"CDLL by calling the constructor::" +"Other systems require the filename *including* the extension to load a " +"library, so attribute access can not be used to load libraries. Either the :" +"meth:`~LibraryLoader.LoadLibrary` method of the dll loaders should be used, " +"or you should load the library by creating an instance of :py:class:`CDLL` " +"by calling the constructor." msgstr "" -#: ../../../library/ctypes.rst:92 +#: ../../../library/ctypes.rst:78 +msgid "For example, on Linux::" +msgstr "" + +#: ../../../library/ctypes.rst:87 +msgid "On macOS::" +msgstr "" + +#: ../../../library/ctypes.rst:100 msgid "Accessing functions from loaded dlls" msgstr "" -#: ../../../library/ctypes.rst:94 +#: ../../../library/ctypes.rst:102 msgid "Functions are accessed as attributes of dll objects::" msgstr "" -#: ../../../library/ctypes.rst:108 +#: ../../../library/ctypes.rst:116 msgid "" "Note that win32 system dlls like ``kernel32`` and ``user32`` often export " "ANSI as well as UNICODE versions of a function. The UNICODE version is " @@ -133,65 +136,65 @@ msgid "" "``GetModuleHandle`` depending on whether UNICODE is defined or not::" msgstr "" -#: ../../../library/ctypes.rst:121 +#: ../../../library/ctypes.rst:129 msgid "" "*windll* does not try to select one of them by magic, you must access the " "version you need by specifying ``GetModuleHandleA`` or ``GetModuleHandleW`` " "explicitly, and then call it with bytes or string objects respectively." msgstr "" -#: ../../../library/ctypes.rst:125 +#: ../../../library/ctypes.rst:133 msgid "" "Sometimes, dlls export functions with names which aren't valid Python " "identifiers, like ``\"??2@YAPAXI@Z\"``. In this case you have to use :func:" "`getattr` to retrieve the function::" msgstr "" -#: ../../../library/ctypes.rst:133 +#: ../../../library/ctypes.rst:141 msgid "" "On Windows, some dlls export functions not by name but by ordinal. These " "functions can be accessed by indexing the dll object with the ordinal " "number::" msgstr "" -#: ../../../library/ctypes.rst:150 +#: ../../../library/ctypes.rst:158 msgid "Calling functions" msgstr "" -#: ../../../library/ctypes.rst:152 +#: ../../../library/ctypes.rst:160 msgid "" "You can call these functions like any other Python callable. This example " "uses the ``rand()`` function, which takes no arguments and returns a pseudo-" "random integer::" msgstr "" -#: ../../../library/ctypes.rst:158 +#: ../../../library/ctypes.rst:166 msgid "" "On Windows, you can call the ``GetModuleHandleA()`` function, which returns " "a win32 module handle (passing ``None`` as single argument to call it with a " "``NULL`` pointer)::" msgstr "" -#: ../../../library/ctypes.rst:165 +#: ../../../library/ctypes.rst:173 msgid "" ":exc:`ValueError` is raised when you call an ``stdcall`` function with the " "``cdecl`` calling convention, or vice versa::" msgstr "" -#: ../../../library/ctypes.rst:180 +#: ../../../library/ctypes.rst:188 msgid "" "To find out the correct calling convention you have to look into the C " "header file or the documentation for the function you want to call." msgstr "" -#: ../../../library/ctypes.rst:183 +#: ../../../library/ctypes.rst:191 msgid "" "On Windows, :mod:`!ctypes` uses win32 structured exception handling to " "prevent crashes from general protection faults when functions are called " "with invalid argument values::" msgstr "" -#: ../../../library/ctypes.rst:193 +#: ../../../library/ctypes.rst:201 msgid "" "There are, however, enough ways to crash Python with :mod:`!ctypes`, so you " "should be careful anyway. The :mod:`faulthandler` module can be helpful in " @@ -199,7 +202,7 @@ msgid "" "library calls)." msgstr "" -#: ../../../library/ctypes.rst:198 +#: ../../../library/ctypes.rst:206 msgid "" "``None``, integers, bytes objects and (unicode) strings are the only native " "Python objects that can directly be used as parameters in these function " @@ -210,74 +213,72 @@ msgid "" "the C type." msgstr "" -#: ../../../library/ctypes.rst:205 +#: ../../../library/ctypes.rst:213 msgid "" "Before we move on calling functions with other parameter types, we have to " "learn more about :mod:`!ctypes` data types." msgstr "" -#: ../../../library/ctypes.rst:212 ../../../library/ctypes.rst:2431 +#: ../../../library/ctypes.rst:220 ../../../library/ctypes.rst:2447 msgid "Fundamental data types" msgstr "" -#: ../../../library/ctypes.rst:214 +#: ../../../library/ctypes.rst:222 msgid ":mod:`!ctypes` defines a number of primitive C compatible data types:" msgstr "" -#: ../../../library/ctypes.rst:217 ../../../library/ctypes.rst:289 +#: ../../../library/ctypes.rst:225 ../../../library/ctypes.rst:297 msgid "ctypes type" msgstr "" -#: ../../../library/ctypes.rst:217 ../../../library/ctypes.rst:289 +#: ../../../library/ctypes.rst:225 ../../../library/ctypes.rst:297 msgid "C type" msgstr "" -#: ../../../library/ctypes.rst:217 ../../../library/ctypes.rst:289 +#: ../../../library/ctypes.rst:225 ../../../library/ctypes.rst:297 msgid "Python type" msgstr "" -#: ../../../library/ctypes.rst:219 +#: ../../../library/ctypes.rst:227 msgid ":class:`c_bool`" msgstr "" -#: ../../../library/ctypes.rst:219 +#: ../../../library/ctypes.rst:227 msgid ":c:expr:`_Bool`" msgstr "" -#: ../../../library/ctypes.rst:219 +#: ../../../library/ctypes.rst:227 msgid "bool (1)" msgstr "" -#: ../../../library/ctypes.rst:221 +#: ../../../library/ctypes.rst:229 msgid ":class:`c_char`" msgstr "" -#: ../../../library/ctypes.rst:221 ../../../library/ctypes.rst:225 +#: ../../../library/ctypes.rst:229 ../../../library/ctypes.rst:233 msgid ":c:expr:`char`" msgstr "" -#: ../../../library/ctypes.rst:221 +#: ../../../library/ctypes.rst:229 msgid "1-character bytes object" msgstr "" -#: ../../../library/ctypes.rst:223 +#: ../../../library/ctypes.rst:231 msgid ":class:`c_wchar`" msgstr "" -#: ../../../library/ctypes.rst:223 +#: ../../../library/ctypes.rst:231 msgid ":c:type:`wchar_t`" msgstr "" -#: ../../../library/ctypes.rst:223 +#: ../../../library/ctypes.rst:231 msgid "1-character string" msgstr "" -#: ../../../library/ctypes.rst:225 +#: ../../../library/ctypes.rst:233 msgid ":class:`c_byte`" msgstr "" -#: ../../../library/ctypes.rst:225 ../../../library/ctypes.rst:227 -#: ../../../library/ctypes.rst:229 ../../../library/ctypes.rst:231 #: ../../../library/ctypes.rst:233 ../../../library/ctypes.rst:235 #: ../../../library/ctypes.rst:237 ../../../library/ctypes.rst:239 #: ../../../library/ctypes.rst:241 ../../../library/ctypes.rst:243 @@ -285,288 +286,290 @@ msgstr "" #: ../../../library/ctypes.rst:249 ../../../library/ctypes.rst:251 #: ../../../library/ctypes.rst:253 ../../../library/ctypes.rst:255 #: ../../../library/ctypes.rst:257 ../../../library/ctypes.rst:259 -#: ../../../library/ctypes.rst:262 ../../../library/ctypes.rst:264 -#: ../../../library/ctypes.rst:267 +#: ../../../library/ctypes.rst:261 ../../../library/ctypes.rst:263 +#: ../../../library/ctypes.rst:265 ../../../library/ctypes.rst:267 +#: ../../../library/ctypes.rst:270 ../../../library/ctypes.rst:272 +#: ../../../library/ctypes.rst:275 msgid "int" msgstr "" -#: ../../../library/ctypes.rst:227 +#: ../../../library/ctypes.rst:235 msgid ":class:`c_ubyte`" msgstr "" -#: ../../../library/ctypes.rst:227 +#: ../../../library/ctypes.rst:235 msgid ":c:expr:`unsigned char`" msgstr "" -#: ../../../library/ctypes.rst:229 +#: ../../../library/ctypes.rst:237 msgid ":class:`c_short`" msgstr "" -#: ../../../library/ctypes.rst:229 +#: ../../../library/ctypes.rst:237 msgid ":c:expr:`short`" msgstr "" -#: ../../../library/ctypes.rst:231 +#: ../../../library/ctypes.rst:239 msgid ":class:`c_ushort`" msgstr "" -#: ../../../library/ctypes.rst:231 +#: ../../../library/ctypes.rst:239 msgid ":c:expr:`unsigned short`" msgstr "" -#: ../../../library/ctypes.rst:233 +#: ../../../library/ctypes.rst:241 msgid ":class:`c_int`" msgstr "" -#: ../../../library/ctypes.rst:233 +#: ../../../library/ctypes.rst:241 msgid ":c:expr:`int`" msgstr "" -#: ../../../library/ctypes.rst:235 +#: ../../../library/ctypes.rst:243 msgid ":class:`c_int8`" msgstr "" -#: ../../../library/ctypes.rst:235 +#: ../../../library/ctypes.rst:243 msgid ":c:type:`int8_t`" msgstr "" -#: ../../../library/ctypes.rst:237 +#: ../../../library/ctypes.rst:245 msgid ":class:`c_int16`" msgstr "" -#: ../../../library/ctypes.rst:237 +#: ../../../library/ctypes.rst:245 msgid ":c:type:`int16_t`" msgstr "" -#: ../../../library/ctypes.rst:239 +#: ../../../library/ctypes.rst:247 msgid ":class:`c_int32`" msgstr "" -#: ../../../library/ctypes.rst:239 +#: ../../../library/ctypes.rst:247 msgid ":c:type:`int32_t`" msgstr "" -#: ../../../library/ctypes.rst:241 +#: ../../../library/ctypes.rst:249 msgid ":class:`c_int64`" msgstr "" -#: ../../../library/ctypes.rst:241 +#: ../../../library/ctypes.rst:249 msgid ":c:type:`int64_t`" msgstr "" -#: ../../../library/ctypes.rst:243 +#: ../../../library/ctypes.rst:251 msgid ":class:`c_uint`" msgstr "" -#: ../../../library/ctypes.rst:243 +#: ../../../library/ctypes.rst:251 msgid ":c:expr:`unsigned int`" msgstr "" -#: ../../../library/ctypes.rst:245 +#: ../../../library/ctypes.rst:253 msgid ":class:`c_uint8`" msgstr "" -#: ../../../library/ctypes.rst:245 +#: ../../../library/ctypes.rst:253 msgid ":c:type:`uint8_t`" msgstr "" -#: ../../../library/ctypes.rst:247 +#: ../../../library/ctypes.rst:255 msgid ":class:`c_uint16`" msgstr "" -#: ../../../library/ctypes.rst:247 +#: ../../../library/ctypes.rst:255 msgid ":c:type:`uint16_t`" msgstr "" -#: ../../../library/ctypes.rst:249 +#: ../../../library/ctypes.rst:257 msgid ":class:`c_uint32`" msgstr "" -#: ../../../library/ctypes.rst:249 +#: ../../../library/ctypes.rst:257 msgid ":c:type:`uint32_t`" msgstr "" -#: ../../../library/ctypes.rst:251 +#: ../../../library/ctypes.rst:259 msgid ":class:`c_uint64`" msgstr "" -#: ../../../library/ctypes.rst:251 +#: ../../../library/ctypes.rst:259 msgid ":c:type:`uint64_t`" msgstr "" -#: ../../../library/ctypes.rst:253 +#: ../../../library/ctypes.rst:261 msgid ":class:`c_long`" msgstr "" -#: ../../../library/ctypes.rst:253 +#: ../../../library/ctypes.rst:261 msgid ":c:expr:`long`" msgstr "" -#: ../../../library/ctypes.rst:255 +#: ../../../library/ctypes.rst:263 msgid ":class:`c_ulong`" msgstr "" -#: ../../../library/ctypes.rst:255 +#: ../../../library/ctypes.rst:263 msgid ":c:expr:`unsigned long`" msgstr "" -#: ../../../library/ctypes.rst:257 +#: ../../../library/ctypes.rst:265 msgid ":class:`c_longlong`" msgstr "" -#: ../../../library/ctypes.rst:257 +#: ../../../library/ctypes.rst:265 msgid ":c:expr:`__int64` or :c:expr:`long long`" msgstr "" -#: ../../../library/ctypes.rst:259 +#: ../../../library/ctypes.rst:267 msgid ":class:`c_ulonglong`" msgstr "" -#: ../../../library/ctypes.rst:259 +#: ../../../library/ctypes.rst:267 msgid ":c:expr:`unsigned __int64` or :c:expr:`unsigned long long`" msgstr "" -#: ../../../library/ctypes.rst:262 +#: ../../../library/ctypes.rst:270 msgid ":class:`c_size_t`" msgstr "" -#: ../../../library/ctypes.rst:262 +#: ../../../library/ctypes.rst:270 msgid ":c:type:`size_t`" msgstr "" -#: ../../../library/ctypes.rst:264 +#: ../../../library/ctypes.rst:272 msgid ":class:`c_ssize_t`" msgstr "" -#: ../../../library/ctypes.rst:264 +#: ../../../library/ctypes.rst:272 msgid ":c:type:`ssize_t` or :c:expr:`Py_ssize_t`" msgstr "" -#: ../../../library/ctypes.rst:267 +#: ../../../library/ctypes.rst:275 msgid ":class:`c_time_t`" msgstr "" -#: ../../../library/ctypes.rst:267 +#: ../../../library/ctypes.rst:275 msgid ":c:type:`time_t`" msgstr "" -#: ../../../library/ctypes.rst:269 +#: ../../../library/ctypes.rst:277 msgid ":class:`c_float`" msgstr "" -#: ../../../library/ctypes.rst:269 +#: ../../../library/ctypes.rst:277 msgid ":c:expr:`float`" msgstr "" -#: ../../../library/ctypes.rst:269 ../../../library/ctypes.rst:271 -#: ../../../library/ctypes.rst:273 +#: ../../../library/ctypes.rst:277 ../../../library/ctypes.rst:279 +#: ../../../library/ctypes.rst:281 msgid "float" msgstr "" -#: ../../../library/ctypes.rst:271 +#: ../../../library/ctypes.rst:279 msgid ":class:`c_double`" msgstr "" -#: ../../../library/ctypes.rst:271 +#: ../../../library/ctypes.rst:279 msgid ":c:expr:`double`" msgstr "" -#: ../../../library/ctypes.rst:273 +#: ../../../library/ctypes.rst:281 msgid ":class:`c_longdouble`" msgstr "" -#: ../../../library/ctypes.rst:273 +#: ../../../library/ctypes.rst:281 msgid ":c:expr:`long double`" msgstr "" -#: ../../../library/ctypes.rst:275 +#: ../../../library/ctypes.rst:283 msgid ":class:`c_char_p`" msgstr "" -#: ../../../library/ctypes.rst:275 +#: ../../../library/ctypes.rst:283 msgid ":c:expr:`char *` (NUL terminated)" msgstr "" -#: ../../../library/ctypes.rst:275 +#: ../../../library/ctypes.rst:283 msgid "bytes object or ``None``" msgstr "" -#: ../../../library/ctypes.rst:277 +#: ../../../library/ctypes.rst:285 msgid ":class:`c_wchar_p`" msgstr "" -#: ../../../library/ctypes.rst:277 +#: ../../../library/ctypes.rst:285 msgid ":c:expr:`wchar_t *` (NUL terminated)" msgstr "" -#: ../../../library/ctypes.rst:277 +#: ../../../library/ctypes.rst:285 msgid "string or ``None``" msgstr "" -#: ../../../library/ctypes.rst:279 +#: ../../../library/ctypes.rst:287 msgid ":class:`c_void_p`" msgstr "" -#: ../../../library/ctypes.rst:279 +#: ../../../library/ctypes.rst:287 msgid ":c:expr:`void *`" msgstr "" -#: ../../../library/ctypes.rst:279 +#: ../../../library/ctypes.rst:287 msgid "int or ``None``" msgstr "" -#: ../../../library/ctypes.rst:283 +#: ../../../library/ctypes.rst:291 msgid "The constructor accepts any object with a truth value." msgstr "" -#: ../../../library/ctypes.rst:285 +#: ../../../library/ctypes.rst:293 msgid "" "Additionally, if IEC 60559 compatible complex arithmetic (Annex G) is " "supported in both C and ``libffi``, the following complex types are " "available:" msgstr "" -#: ../../../library/ctypes.rst:291 +#: ../../../library/ctypes.rst:299 msgid ":class:`c_float_complex`" msgstr "" -#: ../../../library/ctypes.rst:291 +#: ../../../library/ctypes.rst:299 msgid ":c:expr:`float complex`" msgstr "" -#: ../../../library/ctypes.rst:291 ../../../library/ctypes.rst:293 -#: ../../../library/ctypes.rst:295 +#: ../../../library/ctypes.rst:299 ../../../library/ctypes.rst:301 +#: ../../../library/ctypes.rst:303 msgid "complex" msgstr "" -#: ../../../library/ctypes.rst:293 +#: ../../../library/ctypes.rst:301 msgid ":class:`c_double_complex`" msgstr "" -#: ../../../library/ctypes.rst:293 +#: ../../../library/ctypes.rst:301 msgid ":c:expr:`double complex`" msgstr "" -#: ../../../library/ctypes.rst:295 +#: ../../../library/ctypes.rst:303 msgid ":class:`c_longdouble_complex`" msgstr "" -#: ../../../library/ctypes.rst:295 +#: ../../../library/ctypes.rst:303 msgid ":c:expr:`long double complex`" msgstr "" -#: ../../../library/ctypes.rst:299 +#: ../../../library/ctypes.rst:307 msgid "" "All these types can be created by calling them with an optional initializer " "of the correct type and value::" msgstr "" -#: ../../../library/ctypes.rst:310 +#: ../../../library/ctypes.rst:318 msgid "" "Since these types are mutable, their value can also be changed afterwards::" msgstr "" -#: ../../../library/ctypes.rst:322 +#: ../../../library/ctypes.rst:330 msgid "" "Assigning a new value to instances of the pointer types :class:`c_char_p`, :" "class:`c_wchar_p`, and :class:`c_void_p` changes the *memory location* they " @@ -574,7 +577,7 @@ msgid "" "Python string objects are immutable)::" msgstr "" -#: ../../../library/ctypes.rst:342 +#: ../../../library/ctypes.rst:350 msgid "" "You should be careful, however, not to pass them to functions expecting " "pointers to mutable memory. If you need mutable memory blocks, ctypes has a :" @@ -584,7 +587,7 @@ msgid "" "``value`` property::" msgstr "" -#: ../../../library/ctypes.rst:366 +#: ../../../library/ctypes.rst:374 msgid "" "The :func:`create_string_buffer` function replaces the old :func:`!c_buffer` " "function (which is still available as an alias). To create a mutable memory " @@ -592,29 +595,29 @@ msgid "" "the :func:`create_unicode_buffer` function." msgstr "" -#: ../../../library/ctypes.rst:375 +#: ../../../library/ctypes.rst:383 msgid "Calling functions, continued" msgstr "" -#: ../../../library/ctypes.rst:377 +#: ../../../library/ctypes.rst:385 msgid "" "Note that printf prints to the real standard output channel, *not* to :data:" "`sys.stdout`, so these examples will only work at the console prompt, not " "from within *IDLE* or *PythonWin*::" msgstr "" -#: ../../../library/ctypes.rst:397 +#: ../../../library/ctypes.rst:405 msgid "" "As has been mentioned before, all Python types except integers, strings, and " "bytes objects have to be wrapped in their corresponding :mod:`!ctypes` type, " "so that they can be converted to the required C data type::" msgstr "" -#: ../../../library/ctypes.rst:409 +#: ../../../library/ctypes.rst:417 msgid "Calling variadic functions" msgstr "" -#: ../../../library/ctypes.rst:411 +#: ../../../library/ctypes.rst:419 msgid "" "On a lot of platforms calling variadic functions through ctypes is exactly " "the same as calling functions with a fixed number of parameters. On some " @@ -623,23 +626,23 @@ msgid "" "functions." msgstr "" -#: ../../../library/ctypes.rst:416 +#: ../../../library/ctypes.rst:424 msgid "" "On those platforms it is required to specify the :attr:`~_CFuncPtr.argtypes` " "attribute for the regular, non-variadic, function arguments:" msgstr "" -#: ../../../library/ctypes.rst:423 +#: ../../../library/ctypes.rst:431 msgid "" "Because specifying the attribute does not inhibit portability it is advised " "to always specify :attr:`~_CFuncPtr.argtypes` for all variadic functions." msgstr "" -#: ../../../library/ctypes.rst:430 +#: ../../../library/ctypes.rst:438 msgid "Calling functions with your own custom data types" msgstr "" -#: ../../../library/ctypes.rst:432 +#: ../../../library/ctypes.rst:440 msgid "" "You can also customize :mod:`!ctypes` argument conversion to allow instances " "of your own classes be used as function arguments. :mod:`!ctypes` looks for " @@ -648,24 +651,24 @@ msgid "" "or an object with an :attr:`!_as_parameter_` attribute::" msgstr "" -#: ../../../library/ctypes.rst:448 +#: ../../../library/ctypes.rst:456 msgid "" "If you don't want to store the instance's data in the :attr:`!" "_as_parameter_` instance variable, you could define a :class:`property` " "which makes the attribute available on request." msgstr "" -#: ../../../library/ctypes.rst:456 +#: ../../../library/ctypes.rst:464 msgid "Specifying the required argument types (function prototypes)" msgstr "" -#: ../../../library/ctypes.rst:458 +#: ../../../library/ctypes.rst:466 msgid "" "It is possible to specify the required argument types of functions exported " "from DLLs by setting the :attr:`~_CFuncPtr.argtypes` attribute." msgstr "" -#: ../../../library/ctypes.rst:461 +#: ../../../library/ctypes.rst:469 msgid "" ":attr:`~_CFuncPtr.argtypes` must be a sequence of C data types (the :func:`!" "printf` function is probably not a good example here, because it takes a " @@ -674,14 +677,14 @@ msgid "" "feature)::" msgstr "" -#: ../../../library/ctypes.rst:472 +#: ../../../library/ctypes.rst:480 msgid "" "Specifying a format protects against incompatible argument types (just as a " "prototype for a C function), and tries to convert the arguments to valid " "types::" msgstr "" -#: ../../../library/ctypes.rst:484 +#: ../../../library/ctypes.rst:492 msgid "" "If you have defined your own classes which you pass to function calls, you " "have to implement a :meth:`~_CData.from_param` class method for them to be " @@ -695,48 +698,48 @@ msgid "" "_as_parameter_` attribute." msgstr "" -#: ../../../library/ctypes.rst:498 +#: ../../../library/ctypes.rst:506 msgid "Return types" msgstr "" -#: ../../../library/ctypes.rst:508 +#: ../../../library/ctypes.rst:516 msgid "" "By default functions are assumed to return the C :c:expr:`int` type. Other " "return types can be specified by setting the :attr:`~_CFuncPtr.restype` " "attribute of the function object." msgstr "" -#: ../../../library/ctypes.rst:512 +#: ../../../library/ctypes.rst:520 msgid "" "The C prototype of :c:func:`time` is ``time_t time(time_t *)``. Because :c:" "type:`time_t` might be of a different type than the default return type :c:" "expr:`int`, you should specify the :attr:`!restype` attribute::" msgstr "" -#: ../../../library/ctypes.rst:518 +#: ../../../library/ctypes.rst:526 msgid "The argument types can be specified using :attr:`~_CFuncPtr.argtypes`::" msgstr "" -#: ../../../library/ctypes.rst:522 +#: ../../../library/ctypes.rst:530 msgid "" "To call the function with a ``NULL`` pointer as first argument, use " "``None``::" msgstr "" -#: ../../../library/ctypes.rst:527 +#: ../../../library/ctypes.rst:535 msgid "" "Here is a more advanced example, it uses the :func:`!strchr` function, which " "expects a string pointer and a char, and returns a pointer to a string::" msgstr "" -#: ../../../library/ctypes.rst:540 +#: ../../../library/ctypes.rst:548 msgid "" "If you want to avoid the :func:`ord(\"x\") ` calls above, you can set " "the :attr:`~_CFuncPtr.argtypes` attribute, and the second argument will be " "converted from a single character Python bytes object into a C char:" msgstr "" -#: ../../../library/ctypes.rst:559 +#: ../../../library/ctypes.rst:567 msgid "" "You can also use a callable Python object (a function or a class for " "example) as the :attr:`~_CFuncPtr.restype` attribute, if the foreign " @@ -746,7 +749,7 @@ msgid "" "values and automatically raise an exception::" msgstr "" -#: ../../../library/ctypes.rst:582 +#: ../../../library/ctypes.rst:590 msgid "" "``WinError`` is a function which will call Windows ``FormatMessage()`` api " "to get the string representation of an error code, and *returns* an " @@ -754,18 +757,18 @@ msgid "" "used, it calls :func:`GetLastError` to retrieve it." msgstr "" -#: ../../../library/ctypes.rst:587 +#: ../../../library/ctypes.rst:595 msgid "" "Please note that a much more powerful error checking mechanism is available " "through the :attr:`~_CFuncPtr.errcheck` attribute; see the reference manual " "for details." msgstr "" -#: ../../../library/ctypes.rst:595 +#: ../../../library/ctypes.rst:603 msgid "Passing pointers (or: passing parameters by reference)" msgstr "" -#: ../../../library/ctypes.rst:597 +#: ../../../library/ctypes.rst:605 msgid "" "Sometimes a C api function expects a *pointer* to a data type as parameter, " "probably to write into the corresponding location, or if the data is too " @@ -773,7 +776,7 @@ msgid "" "reference*." msgstr "" -#: ../../../library/ctypes.rst:601 +#: ../../../library/ctypes.rst:609 msgid "" ":mod:`!ctypes` exports the :func:`byref` function which is used to pass " "parameters by reference. The same effect can be achieved with the :func:" @@ -782,11 +785,11 @@ msgid "" "you don't need the pointer object in Python itself::" msgstr "" -#: ../../../library/ctypes.rst:623 +#: ../../../library/ctypes.rst:631 msgid "Structures and unions" msgstr "" -#: ../../../library/ctypes.rst:625 +#: ../../../library/ctypes.rst:633 msgid "" "Structures and unions must derive from the :class:`Structure` and :class:" "`Union` base classes which are defined in the :mod:`!ctypes` module. Each " @@ -795,45 +798,45 @@ msgid "" "*field type*." msgstr "" -#: ../../../library/ctypes.rst:630 +#: ../../../library/ctypes.rst:638 msgid "" "The field type must be a :mod:`!ctypes` type like :class:`c_int`, or any " "other derived :mod:`!ctypes` type: structure, union, array, pointer." msgstr "" -#: ../../../library/ctypes.rst:633 +#: ../../../library/ctypes.rst:641 msgid "" "Here is a simple example of a POINT structure, which contains two integers " "named *x* and *y*, and also shows how to initialize a structure in the " "constructor::" msgstr "" -#: ../../../library/ctypes.rst:653 +#: ../../../library/ctypes.rst:661 msgid "" "You can, however, build much more complicated structures. A structure can " "itself contain other structures by using a structure as a field type." msgstr "" -#: ../../../library/ctypes.rst:656 +#: ../../../library/ctypes.rst:664 msgid "" "Here is a RECT structure which contains two POINTs named *upperleft* and " "*lowerright*::" msgstr "" -#: ../../../library/ctypes.rst:670 +#: ../../../library/ctypes.rst:678 msgid "" "Nested structures can also be initialized in the constructor in several " "ways::" msgstr "" -#: ../../../library/ctypes.rst:675 +#: ../../../library/ctypes.rst:683 msgid "" "Field :term:`descriptor`\\s can be retrieved from the *class*, they are " "useful for debugging because they can provide useful information. See :class:" "`CField`::" msgstr "" -#: ../../../library/ctypes.rst:690 +#: ../../../library/ctypes.rst:698 msgid "" ":mod:`!ctypes` does not support passing unions or structures with bit-fields " "to functions by value. While this may work on 32-bit x86, it's not " @@ -841,11 +844,11 @@ msgid "" "structures with bit-fields should always be passed to functions by pointer." msgstr "" -#: ../../../library/ctypes.rst:696 +#: ../../../library/ctypes.rst:704 msgid "Structure/union layout, alignment and byte order" msgstr "" -#: ../../../library/ctypes.rst:698 +#: ../../../library/ctypes.rst:706 msgid "" "By default, Structure and Union fields are laid out in the same way the C " "compiler does it. It is possible to override this behavior entirely by " @@ -853,7 +856,7 @@ msgid "" "definition; see the attribute documentation for details." msgstr "" -#: ../../../library/ctypes.rst:703 +#: ../../../library/ctypes.rst:711 msgid "" "It is possible to specify the maximum alignment for the fields and/or for " "the structure itself by setting the class attributes :attr:`~Structure." @@ -861,7 +864,7 @@ msgid "" "documentation for details." msgstr "" -#: ../../../library/ctypes.rst:708 +#: ../../../library/ctypes.rst:716 msgid "" ":mod:`!ctypes` uses the native byte order for Structures and Unions. To " "build structures with non-native byte order, you can use one of the :class:" @@ -870,18 +873,18 @@ msgid "" "classes cannot contain pointer fields." msgstr "" -#: ../../../library/ctypes.rst:718 +#: ../../../library/ctypes.rst:726 msgid "Bit fields in structures and unions" msgstr "" -#: ../../../library/ctypes.rst:720 +#: ../../../library/ctypes.rst:728 msgid "" "It is possible to create structures and unions containing bit fields. Bit " "fields are only possible for integer fields, the bit width is specified as " "the third item in the :attr:`~Structure._fields_` tuples::" msgstr "" -#: ../../../library/ctypes.rst:733 +#: ../../../library/ctypes.rst:741 msgid "" "It is important to note that bit field allocation and layout in memory are " "not defined as a C standard; their implementation is compiler-specific. By " @@ -890,80 +893,80 @@ msgid "" "details on the default behavior and how to change it." msgstr "" -#: ../../../library/ctypes.rst:744 +#: ../../../library/ctypes.rst:752 msgid "Arrays" msgstr "" -#: ../../../library/ctypes.rst:746 +#: ../../../library/ctypes.rst:754 msgid "" "Arrays are sequences, containing a fixed number of instances of the same " "type." msgstr "" -#: ../../../library/ctypes.rst:748 +#: ../../../library/ctypes.rst:756 msgid "" "The recommended way to create array types is by multiplying a data type with " "a positive integer::" msgstr "" -#: ../../../library/ctypes.rst:753 +#: ../../../library/ctypes.rst:761 msgid "" "Here is an example of a somewhat artificial data type, a structure " "containing 4 POINTs among other stuff::" msgstr "" -#: ../../../library/ctypes.rst:769 +#: ../../../library/ctypes.rst:777 msgid "Instances are created in the usual way, by calling the class::" msgstr "" -#: ../../../library/ctypes.rst:775 +#: ../../../library/ctypes.rst:783 msgid "" "The above code print a series of ``0 0`` lines, because the array contents " "is initialized to zeros." msgstr "" -#: ../../../library/ctypes.rst:778 +#: ../../../library/ctypes.rst:786 msgid "Initializers of the correct type can also be specified::" msgstr "" -#: ../../../library/ctypes.rst:794 +#: ../../../library/ctypes.rst:802 msgid "Pointers" msgstr "" -#: ../../../library/ctypes.rst:796 +#: ../../../library/ctypes.rst:804 msgid "" "Pointer instances are created by calling the :func:`pointer` function on a :" "mod:`!ctypes` type::" msgstr "" -#: ../../../library/ctypes.rst:804 +#: ../../../library/ctypes.rst:812 msgid "" "Pointer instances have a :attr:`~_Pointer.contents` attribute which returns " "the object to which the pointer points, the ``i`` object above::" msgstr "" -#: ../../../library/ctypes.rst:811 +#: ../../../library/ctypes.rst:819 msgid "" "Note that :mod:`!ctypes` does not have OOR (original object return), it " "constructs a new, equivalent object each time you retrieve an attribute::" msgstr "" -#: ../../../library/ctypes.rst:820 +#: ../../../library/ctypes.rst:828 msgid "" "Assigning another :class:`c_int` instance to the pointer's contents " "attribute would cause the pointer to point to the memory location where this " "is stored::" msgstr "" -#: ../../../library/ctypes.rst:832 +#: ../../../library/ctypes.rst:840 msgid "Pointer instances can also be indexed with integers::" msgstr "" -#: ../../../library/ctypes.rst:838 +#: ../../../library/ctypes.rst:846 msgid "Assigning to an integer index changes the pointed to value::" msgstr "" -#: ../../../library/ctypes.rst:847 +#: ../../../library/ctypes.rst:855 msgid "" "It is also possible to use indexes different from 0, but you must know what " "you're doing, just as in C: You can access or change arbitrary memory " @@ -972,7 +975,7 @@ msgid "" "instead of a single item." msgstr "" -#: ../../../library/ctypes.rst:853 +#: ../../../library/ctypes.rst:861 msgid "" "Behind the scenes, the :func:`pointer` function does more than simply create " "pointer instances, it has to create pointer *types* first. This is done with " @@ -980,30 +983,30 @@ msgid "" "returns a new type::" msgstr "" -#: ../../../library/ctypes.rst:869 +#: ../../../library/ctypes.rst:877 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" msgstr "" -#: ../../../library/ctypes.rst:877 +#: ../../../library/ctypes.rst:885 msgid "" ":mod:`!ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" msgstr "" -#: ../../../library/ctypes.rst:895 +#: ../../../library/ctypes.rst:903 msgid "Thread safety without the GIL" msgstr "" -#: ../../../library/ctypes.rst:897 +#: ../../../library/ctypes.rst:905 msgid "" "From Python 3.13 onward, the :term:`GIL` can be disabled on the :term:`free-" "threaded build`. In ctypes, reads and writes to a single object concurrently " "is safe, but not across multiple objects:" msgstr "" -#: ../../../library/ctypes.rst:906 +#: ../../../library/ctypes.rst:914 msgid "" "In the above, it's only safe for one object to read and write to the address " "at once if the GIL is disabled. So, ``pointer_a`` can be shared and written " @@ -1012,11 +1015,11 @@ msgid "" "Lock` to synchronize access to memory:" msgstr "" -#: ../../../library/ctypes.rst:926 +#: ../../../library/ctypes.rst:934 msgid "Type conversions" msgstr "" -#: ../../../library/ctypes.rst:928 +#: ../../../library/ctypes.rst:936 msgid "" "Usually, ctypes does strict type checking. This means, if you have " "``POINTER(c_int)`` in the :attr:`~_CFuncPtr.argtypes` list of a function or " @@ -1027,7 +1030,7 @@ msgid "" "ctypes accepts an array of c_int::" msgstr "" -#: ../../../library/ctypes.rst:949 +#: ../../../library/ctypes.rst:957 msgid "" "In addition, if a function argument is explicitly declared to be a pointer " "type (such as ``POINTER(c_int)``) in :attr:`~_CFuncPtr.argtypes`, an object " @@ -1036,11 +1039,11 @@ msgid "" "automatically." msgstr "" -#: ../../../library/ctypes.rst:954 +#: ../../../library/ctypes.rst:962 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" msgstr "" -#: ../../../library/ctypes.rst:961 +#: ../../../library/ctypes.rst:969 msgid "" "Sometimes you have instances of incompatible types. In C, you can cast one " "type into another type. :mod:`!ctypes` provides a :func:`cast` function " @@ -1049,11 +1052,11 @@ msgid "" "``values`` field, but not instances of other types::" msgstr "" -#: ../../../library/ctypes.rst:973 +#: ../../../library/ctypes.rst:981 msgid "For these cases, the :func:`cast` function is handy." msgstr "" -#: ../../../library/ctypes.rst:975 +#: ../../../library/ctypes.rst:983 msgid "" "The :func:`cast` function can be used to cast a ctypes instance into a " "pointer to a different ctypes data type. :func:`cast` takes two parameters, " @@ -1062,60 +1065,60 @@ msgid "" "references the same memory block as the first argument::" msgstr "" -#: ../../../library/ctypes.rst:986 +#: ../../../library/ctypes.rst:994 msgid "" "So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " "the structure::" msgstr "" -#: ../../../library/ctypes.rst:999 +#: ../../../library/ctypes.rst:1007 msgid "Incomplete Types" msgstr "" -#: ../../../library/ctypes.rst:1001 +#: ../../../library/ctypes.rst:1009 msgid "" "*Incomplete Types* are structures, unions or arrays whose members are not " "yet specified. In C, they are specified by forward declarations, which are " "defined later::" msgstr "" -#: ../../../library/ctypes.rst:1012 +#: ../../../library/ctypes.rst:1020 msgid "" "The straightforward translation into ctypes code would be this, but it does " "not work::" msgstr "" -#: ../../../library/ctypes.rst:1025 +#: ../../../library/ctypes.rst:1033 msgid "" "because the new ``class cell`` is not available in the class statement " "itself. In :mod:`!ctypes`, we can define the ``cell`` class and set the :" "attr:`~Structure._fields_` attribute later, after the class statement::" msgstr "" -#: ../../../library/ctypes.rst:1037 +#: ../../../library/ctypes.rst:1045 msgid "" "Let's try it. We create two instances of ``cell``, and let them point to " "each other, and finally follow the pointer chain a few times::" msgstr "" -#: ../../../library/ctypes.rst:1058 +#: ../../../library/ctypes.rst:1066 msgid "Callback functions" msgstr "" -#: ../../../library/ctypes.rst:1060 +#: ../../../library/ctypes.rst:1068 msgid "" ":mod:`!ctypes` allows creating C callable function pointers from Python " "callables. These are sometimes called *callback functions*." msgstr "" -#: ../../../library/ctypes.rst:1063 +#: ../../../library/ctypes.rst:1071 msgid "" "First, you must create a class for the callback function. The class knows " "the calling convention, the return type, and the number and types of " "arguments this function will receive." msgstr "" -#: ../../../library/ctypes.rst:1067 +#: ../../../library/ctypes.rst:1075 msgid "" "The :func:`CFUNCTYPE` factory function creates types for callback functions " "using the ``cdecl`` calling convention. On Windows, the :func:`WINFUNCTYPE` " @@ -1123,21 +1126,21 @@ msgid "" "calling convention." msgstr "" -#: ../../../library/ctypes.rst:1072 +#: ../../../library/ctypes.rst:1080 msgid "" "Both of these factory functions are called with the result type as first " "argument, and the callback functions expected argument types as the " "remaining arguments." msgstr "" -#: ../../../library/ctypes.rst:1076 +#: ../../../library/ctypes.rst:1084 msgid "" "I will present an example here which uses the standard C library's :c:func:`!" "qsort` function, that is used to sort items with the help of a callback " "function. :c:func:`!qsort` will be used to sort an array of integers::" msgstr "" -#: ../../../library/ctypes.rst:1086 +#: ../../../library/ctypes.rst:1094 msgid "" ":func:`!qsort` must be called with a pointer to the data to sort, the number " "of items in the data array, the size of one item, and a pointer to the " @@ -1147,44 +1150,44 @@ msgid "" "otherwise." msgstr "" -#: ../../../library/ctypes.rst:1092 +#: ../../../library/ctypes.rst:1100 msgid "" "So our callback function receives pointers to integers, and must return an " "integer. First we create the ``type`` for the callback function::" msgstr "" -#: ../../../library/ctypes.rst:1098 +#: ../../../library/ctypes.rst:1106 msgid "" "To get started, here is a simple callback that shows the values it gets " "passed::" msgstr "" -#: ../../../library/ctypes.rst:1108 +#: ../../../library/ctypes.rst:1116 msgid "The result::" msgstr "" -#: ../../../library/ctypes.rst:1118 +#: ../../../library/ctypes.rst:1126 msgid "Now we can actually compare the two items and return a useful result::" msgstr "" -#: ../../../library/ctypes.rst:1133 +#: ../../../library/ctypes.rst:1141 msgid "As we can easily check, our array is sorted now::" msgstr "" -#: ../../../library/ctypes.rst:1140 +#: ../../../library/ctypes.rst:1148 msgid "" "The function factories can be used as decorator factories, so we may as well " "write::" msgstr "" -#: ../../../library/ctypes.rst:1158 +#: ../../../library/ctypes.rst:1166 msgid "" "Make sure you keep references to :func:`CFUNCTYPE` objects as long as they " "are used from C code. :mod:`!ctypes` doesn't, and if you don't, they may be " "garbage collected, crashing your program when a callback is made." msgstr "" -#: ../../../library/ctypes.rst:1162 +#: ../../../library/ctypes.rst:1170 msgid "" "Also, note that if the callback function is called in a thread created " "outside of Python's control (e.g. by the foreign code that calls the " @@ -1194,35 +1197,35 @@ msgid "" "even when those calls are made from the same C thread." msgstr "" -#: ../../../library/ctypes.rst:1172 +#: ../../../library/ctypes.rst:1180 msgid "Accessing values exported from dlls" msgstr "" -#: ../../../library/ctypes.rst:1174 +#: ../../../library/ctypes.rst:1182 msgid "" "Some shared libraries not only export functions, they also export variables. " "An example in the Python library itself is the :c:data:`Py_Version`, Python " "runtime version number encoded in a single constant integer." msgstr "" -#: ../../../library/ctypes.rst:1178 +#: ../../../library/ctypes.rst:1186 msgid "" ":mod:`!ctypes` can access values like this with the :meth:`~_CData.in_dll` " "class methods of the type. *pythonapi* is a predefined symbol giving access " "to the Python C api::" msgstr "" -#: ../../../library/ctypes.rst:1186 +#: ../../../library/ctypes.rst:1194 msgid "" "An extended example which also demonstrates the use of pointers accesses " "the :c:data:`PyImport_FrozenModules` pointer exported by Python." msgstr "" -#: ../../../library/ctypes.rst:1189 +#: ../../../library/ctypes.rst:1197 msgid "Quoting the docs for that value:" msgstr "" -#: ../../../library/ctypes.rst:1191 +#: ../../../library/ctypes.rst:1199 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 " @@ -1231,19 +1234,19 @@ msgid "" "frozen modules." msgstr "" -#: ../../../library/ctypes.rst:1196 +#: ../../../library/ctypes.rst:1204 msgid "" "So manipulating this pointer could even prove useful. To restrict the " "example size, we show only how this table can be read with :mod:`!ctypes`::" msgstr "" -#: ../../../library/ctypes.rst:1210 +#: ../../../library/ctypes.rst:1218 msgid "" "We have defined the :c:struct:`_frozen` data type, so we can get the pointer " "to the table::" msgstr "" -#: ../../../library/ctypes.rst:1217 +#: ../../../library/ctypes.rst:1225 msgid "" "Since ``table`` is a ``pointer`` to the array of ``struct_frozen`` records, " "we can iterate over it, but we just have to make sure that our loop " @@ -1252,34 +1255,34 @@ msgid "" "the loop when we hit the ``NULL`` entry::" msgstr "" -#: ../../../library/ctypes.rst:1233 +#: ../../../library/ctypes.rst:1241 msgid "" "The fact that standard Python has a frozen module and a frozen package " "(indicated by the negative ``size`` member) is not well known, it is only " "used for testing. Try it out with ``import __hello__`` for example." msgstr "" -#: ../../../library/ctypes.rst:1241 +#: ../../../library/ctypes.rst:1249 msgid "Surprises" msgstr "" -#: ../../../library/ctypes.rst:1243 +#: ../../../library/ctypes.rst:1251 msgid "" "There are some edges in :mod:`!ctypes` where you might expect something " "other than what actually happens." msgstr "" -#: ../../../library/ctypes.rst:1246 +#: ../../../library/ctypes.rst:1254 msgid "Consider the following example::" msgstr "" -#: ../../../library/ctypes.rst:1266 +#: ../../../library/ctypes.rst:1274 msgid "" "Hm. We certainly expected the last statement to print ``3 4 1 2``. What " "happened? Here are the steps of the ``rc.a, rc.b = rc.b, rc.a`` line above::" msgstr "" -#: ../../../library/ctypes.rst:1274 +#: ../../../library/ctypes.rst:1282 msgid "" "Note that ``temp0`` and ``temp1`` are objects still using the internal " "buffer of the ``rc`` object above. So executing ``rc.a = temp0`` copies the " @@ -1288,26 +1291,26 @@ msgid "" "have the expected effect." msgstr "" -#: ../../../library/ctypes.rst:1280 +#: ../../../library/ctypes.rst:1288 msgid "" "Keep in mind that retrieving sub-objects from Structure, Unions, and Arrays " "doesn't *copy* the sub-object, instead it retrieves a wrapper object " "accessing the root-object's underlying buffer." msgstr "" -#: ../../../library/ctypes.rst:1284 +#: ../../../library/ctypes.rst:1292 msgid "" "Another example that may behave differently from what one would expect is " "this::" msgstr "" -#: ../../../library/ctypes.rst:1296 +#: ../../../library/ctypes.rst:1304 msgid "" "Objects instantiated from :class:`c_char_p` can only have their value set to " "bytes or integers." msgstr "" -#: ../../../library/ctypes.rst:1299 +#: ../../../library/ctypes.rst:1307 msgid "" "Why is it printing ``False``? ctypes instances are objects containing a " "memory block plus some :term:`descriptor`\\s accessing the contents of the " @@ -1316,17 +1319,17 @@ msgid "" "the contents again constructs a new Python object each time!" msgstr "" -#: ../../../library/ctypes.rst:1309 +#: ../../../library/ctypes.rst:1317 msgid "Variable-sized data types" msgstr "" -#: ../../../library/ctypes.rst:1311 +#: ../../../library/ctypes.rst:1319 msgid "" ":mod:`!ctypes` provides some support for variable-sized arrays and " "structures." msgstr "" -#: ../../../library/ctypes.rst:1313 +#: ../../../library/ctypes.rst:1321 msgid "" "The :func:`resize` function can be used to resize the memory buffer of an " "existing ctypes object. The function takes the object as first argument, " @@ -1335,35 +1338,35 @@ msgid "" "objects type, a :exc:`ValueError` is raised if this is tried::" msgstr "" -#: ../../../library/ctypes.rst:1333 +#: ../../../library/ctypes.rst:1341 msgid "" "This is nice and fine, but how would one access the additional elements " "contained in this array? Since the type still only knows about 4 elements, " "we get errors accessing other elements::" msgstr "" -#: ../../../library/ctypes.rst:1345 +#: ../../../library/ctypes.rst:1353 msgid "" "Another way to use variable-sized data types with :mod:`!ctypes` is to use " "the dynamic nature of Python, and (re-)define the data type after the " "required size is already known, on a case by case basis." msgstr "" -#: ../../../library/ctypes.rst:1353 +#: ../../../library/ctypes.rst:1361 msgid "ctypes reference" msgstr "" -#: ../../../library/ctypes.rst:1359 +#: ../../../library/ctypes.rst:1367 msgid "Finding shared libraries" msgstr "" -#: ../../../library/ctypes.rst:1361 +#: ../../../library/ctypes.rst:1369 msgid "" "When programming in a compiled language, shared libraries are accessed when " "compiling/linking a program, and when the program is run." msgstr "" -#: ../../../library/ctypes.rst:1364 +#: ../../../library/ctypes.rst:1372 msgid "" "The purpose of the :func:`~ctypes.util.find_library` function is to locate a " "library in a way similar to what the compiler or runtime loader does (on " @@ -1372,13 +1375,13 @@ msgid "" "and call the runtime loader directly." msgstr "" -#: ../../../library/ctypes.rst:1370 +#: ../../../library/ctypes.rst:1378 msgid "" "The :mod:`!ctypes.util` module provides a function which can help to " "determine the library to load." msgstr "" -#: ../../../library/ctypes.rst:1378 +#: ../../../library/ctypes.rst:1386 msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like *lib*, suffix like ``.so``, ``.dylib`` or version " @@ -1386,42 +1389,42 @@ msgid "" "If no library can be found, returns ``None``." msgstr "" -#: ../../../library/ctypes.rst:1383 ../../../library/ctypes.rst:2134 +#: ../../../library/ctypes.rst:1391 ../../../library/ctypes.rst:2150 msgid "The exact functionality is system dependent." msgstr "" -#: ../../../library/ctypes.rst:1385 +#: ../../../library/ctypes.rst:1393 msgid "" "On Linux, :func:`~ctypes.util.find_library` tries to run external programs " "(``/sbin/ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library " "file. It returns the filename of the library file." msgstr "" -#: ../../../library/ctypes.rst:1389 +#: ../../../library/ctypes.rst:1397 msgid "" "Note that if the output of these programs does not correspond to the dynamic " "linker used by Python, the result of this function may be misleading." msgstr "" -#: ../../../library/ctypes.rst:1392 +#: ../../../library/ctypes.rst:1400 msgid "" "On Linux, the value of the environment variable ``LD_LIBRARY_PATH`` is used " "when searching for libraries, if a library cannot be found by any other " "means." msgstr "" -#: ../../../library/ctypes.rst:1396 +#: ../../../library/ctypes.rst:1404 msgid "Here are some examples::" msgstr "" -#: ../../../library/ctypes.rst:1407 +#: ../../../library/ctypes.rst:1415 msgid "" "On macOS and Android, :func:`~ctypes.util.find_library` uses the system's " "standard naming schemes and paths to locate the library, and returns a full " "pathname if successful::" msgstr "" -#: ../../../library/ctypes.rst:1422 +#: ../../../library/ctypes.rst:1430 msgid "" "On Windows, :func:`~ctypes.util.find_library` searches along the system " "search path, and returns the full pathname, but since there is no predefined " @@ -1429,7 +1432,7 @@ msgid "" "``None``." msgstr "" -#: ../../../library/ctypes.rst:1426 +#: ../../../library/ctypes.rst:1434 msgid "" "If wrapping a shared library with :mod:`!ctypes`, it *may* be better to " "determine the shared library name at development time, and hardcode that " @@ -1437,18 +1440,18 @@ msgid "" "to locate the library at runtime." msgstr "" -#: ../../../library/ctypes.rst:1434 +#: ../../../library/ctypes.rst:1442 msgid "Listing loaded shared libraries" msgstr "" -#: ../../../library/ctypes.rst:1436 +#: ../../../library/ctypes.rst:1444 msgid "" "When writing code that relies on code loaded from shared libraries, it can " "be useful to know which shared libraries have already been loaded into the " "current process." msgstr "" -#: ../../../library/ctypes.rst:1440 +#: ../../../library/ctypes.rst:1448 msgid "" "The :mod:`!ctypes.util` module provides the :func:`~ctypes.util.dllist` " "function, which calls the different APIs provided by the various platforms " @@ -1456,7 +1459,7 @@ msgid "" "current process." msgstr "" -#: ../../../library/ctypes.rst:1444 +#: ../../../library/ctypes.rst:1452 msgid "" "The exact output of this function will be system dependent. On most " "platforms, the first entry of this list represents the current process " @@ -1464,110 +1467,77 @@ msgid "" "return may look like::" msgstr "" -#: ../../../library/ctypes.rst:1456 +#: ../../../library/ctypes.rst:1464 msgid "Loading shared libraries" msgstr "" -#: ../../../library/ctypes.rst:1458 +#: ../../../library/ctypes.rst:1466 msgid "" "There are several ways to load shared libraries into the Python process. " -"One way is to instantiate one of the following classes:" +"One way is to instantiate :py:class:`CDLL` or one of its subclasses:" msgstr "" -#: ../../../library/ctypes.rst:1464 -msgid "" -"Instances of this class represent loaded shared libraries. Functions in " -"these libraries use the standard C calling convention, and are assumed to " -"return :c:expr:`int`." +#: ../../../library/ctypes.rst:1472 +msgid "Represents a loaded shared library." msgstr "" -#: ../../../library/ctypes.rst:1468 +#: ../../../library/ctypes.rst:1474 msgid "" -"On Windows creating a :class:`CDLL` instance may fail even if the DLL name " -"exists. When a dependent DLL of the loaded DLL is not found, a :exc:" -"`OSError` error is raised with the message *\"[WinError 126] The specified " -"module could not be found\".* This error message does not contain the name " -"of the missing DLL because the Windows API does not return this information " -"making this error hard to diagnose. To resolve this error and determine " -"which DLL is not found, you need to find the list of dependent DLLs and " -"determine which one is not found using Windows debugging and tracing tools." +"Functions in this library use the standard C calling convention, and are " +"assumed to return :c:expr:`int`. The Python :term:`global interpreter lock` " +"is released before calling any function exported by these libraries, and " +"reacquired afterwards. For different function behavior, use a subclass: :py:" +"class:`~ctypes.OleDLL`, :py:class:`~ctypes.WinDLL`, or :py:class:`~ctypes." +"PyDLL`." msgstr "" -#: ../../../library/ctypes.rst:1480 ../../../library/ctypes.rst:1505 -#: ../../../library/ctypes.rst:1518 ../../../library/ctypes.rst:1536 -msgid "The *name* parameter can now be a :term:`path-like object`." -msgstr "" - -#: ../../../library/ctypes.rst:1484 +#: ../../../library/ctypes.rst:1481 msgid "" -"`Microsoft DUMPBIN tool `_ -- A tool to find DLL dependents." +"If you have an existing :py:attr:`handle ` to an " +"already loaded shared library, it can be passed as the *handle* argument to " +"wrap the opened library in a new :py:class:`!CDLL` object. In this case, " +"*name* is only used to set the :py:attr:`~ctypes.CDLL._name` attribute, but " +"it may be adjusted and/or validated." msgstr "" -#: ../../../library/ctypes.rst:1490 +#: ../../../library/ctypes.rst:1487 msgid "" -"Instances of this class represent loaded shared libraries, functions in " -"these libraries use the ``stdcall`` calling convention, and are assumed to " -"return the windows specific :class:`HRESULT` code. :class:`HRESULT` values " -"contain information specifying whether the function call failed or " -"succeeded, together with additional error code. If the return value signals " -"a failure, an :class:`OSError` is automatically raised." -msgstr "" - -#: ../../../library/ctypes.rst:1497 ../../../library/ctypes.rst:1514 -#: ../../../library/ctypes.rst:1658 ../../../library/ctypes.rst:1666 -#: ../../../library/ctypes.rst:1838 ../../../library/ctypes.rst:1890 -#: ../../../library/ctypes.rst:2042 ../../../library/ctypes.rst:2114 -#: ../../../library/ctypes.rst:2123 ../../../library/ctypes.rst:2150 -#: ../../../library/ctypes.rst:2164 ../../../library/ctypes.rst:2173 -#: ../../../library/ctypes.rst:2182 ../../../library/ctypes.rst:2197 -#: ../../../library/ctypes.rst:2264 ../../../library/ctypes.rst:2291 -#: ../../../library/ctypes.rst:2691 ../../../library/ctypes.rst:3109 -msgid "Availability" +"If *handle* is ``None``, the underlying platform's :manpage:`dlopen(3)` or :" +"c:func:`!LoadLibrary` function is used to load the library into the process, " +"and to get a handle to it." msgstr "" -#: ../../../library/ctypes.rst:1499 +#: ../../../library/ctypes.rst:1491 msgid "" -":exc:`WindowsError` used to be raised, which is now an alias of :exc:" -"`OSError`." +"*name* is the pathname of the shared library to open. If *name* does not " +"contain a path separator, the library is found in a platform-specific way." msgstr "" -#: ../../../library/ctypes.rst:1510 +#: ../../../library/ctypes.rst:1495 msgid "" -"Instances of this class represent loaded shared libraries, functions in " -"these libraries use the ``stdcall`` calling convention, and are assumed to " -"return :c:expr:`int` by default." +"On non-Windows systems, *name* can be ``None``. In this case, :c:func:`!" +"dlopen` is called with ``NULL``, which opens the main program as a " +"\"library\". (Some systems do the same is *name* is empty; ``None``/``NULL`` " +"is more portable.)" msgstr "" -#: ../../../library/ctypes.rst:1521 -msgid "" -"The Python :term:`global interpreter lock` is released before calling any " -"function exported by these libraries, and reacquired afterwards." +#: ../../../library/ctypes.rst:1501 +msgid "CPython implementation detail" msgstr "" -#: ../../../library/ctypes.rst:1527 +#: ../../../library/ctypes.rst:1503 msgid "" -"Instances of this class behave like :class:`CDLL` instances, except that the " -"Python GIL is *not* released during the function call, and after the " -"function execution the Python error flag is checked. If the error flag is " -"set, a Python exception is raised." +"Since CPython is linked to ``libc``, a ``None`` *name* is often used to " +"access the C standard library::" msgstr "" -#: ../../../library/ctypes.rst:1532 -msgid "Thus, this is only useful to call Python C api functions directly." -msgstr "" - -#: ../../../library/ctypes.rst:1538 +#: ../../../library/ctypes.rst:1512 msgid "" -"All these classes can be instantiated by calling them with at least one " -"argument, the pathname of the shared library. If you have an existing " -"handle to an already loaded shared library, it can be passed as the " -"``handle`` named parameter, otherwise the underlying platform's :c:func:`!" -"dlopen` or :c:func:`!LoadLibrary` function is used to load the library into " -"the process, and to get a handle to it." +"To access the Python C API, prefer :py:data:`ctypes.pythonapi` which works " +"across platforms." msgstr "" -#: ../../../library/ctypes.rst:1545 +#: ../../../library/ctypes.rst:1515 msgid "" "The *mode* parameter can be used to specify how the library is loaded. For " "details, consult the :manpage:`dlopen(3)` manpage. On Windows, *mode* is " @@ -1575,7 +1545,7 @@ msgid "" "configurable." msgstr "" -#: ../../../library/ctypes.rst:1550 +#: ../../../library/ctypes.rst:1520 msgid "" "The *use_errno* parameter, when set to true, enables a ctypes mechanism that " "allows accessing the system :data:`errno` error number in a safe way. :mod:`!" @@ -1585,14 +1555,14 @@ msgid "" "private copy, the same happens immediately after the function call." msgstr "" -#: ../../../library/ctypes.rst:1557 +#: ../../../library/ctypes.rst:1527 msgid "" "The function :func:`ctypes.get_errno` returns the value of the ctypes " "private copy, and the function :func:`ctypes.set_errno` changes the ctypes " "private copy to a new value and returns the former value." msgstr "" -#: ../../../library/ctypes.rst:1561 +#: ../../../library/ctypes.rst:1531 msgid "" "The *use_last_error* parameter, when set to true, enables the same mechanism " "for the Windows error code which is managed by the :func:`GetLastError` and :" @@ -1601,7 +1571,7 @@ msgid "" "private copy of the windows error code." msgstr "" -#: ../../../library/ctypes.rst:1567 +#: ../../../library/ctypes.rst:1537 msgid "" "The *winmode* parameter is used on Windows to specify how the library is " "loaded (since *mode* is ignored). It takes any value that is valid for the " @@ -1611,52 +1581,124 @@ msgid "" "ensure the correct library and dependencies are loaded." msgstr "" -#: ../../../library/ctypes.rst:1574 +#: ../../../library/ctypes.rst:1544 +msgid "" +"On Windows creating a :class:`CDLL` instance may fail even if the DLL name " +"exists. When a dependent DLL of the loaded DLL is not found, a :exc:" +"`OSError` error is raised with the message *\"[WinError 126] The specified " +"module could not be found\".* This error message does not contain the name " +"of the missing DLL because the Windows API does not return this information " +"making this error hard to diagnose. To resolve this error and determine " +"which DLL is not found, you need to find the list of dependent DLLs and " +"determine which one is not found using Windows debugging and tracing tools." +msgstr "" + +#: ../../../library/ctypes.rst:1556 +msgid "" +"`Microsoft DUMPBIN tool `_ -- A tool to find DLL " +"dependents." +msgstr "" + +#: ../../../library/ctypes.rst:1559 msgid "Added *winmode* parameter." msgstr "" -#: ../../../library/ctypes.rst:1581 +#: ../../../library/ctypes.rst:1564 +msgid "The *name* parameter can now be a :term:`path-like object`." +msgstr "" + +#: ../../../library/ctypes.rst:1566 msgid "" -"Flag to use as *mode* parameter. On platforms where this flag is not " -"available, it is defined as the integer zero." +"Instances of this class have no public methods. Functions exported by the " +"shared library can be accessed as attributes or by index. Please note that " +"accessing the function through an attribute caches the result and therefore " +"accessing it repeatedly returns the same object each time. On the other " +"hand, accessing it through an index returns a new object each time::" msgstr "" -#: ../../../library/ctypes.rst:1588 +#: ../../../library/ctypes.rst:1579 msgid "" -"Flag to use as *mode* parameter. On platforms where this is not available, " -"it is the same as *RTLD_GLOBAL*." +"The following public attributes are available. Their name starts with an " +"underscore to not clash with exported function names:" +msgstr "" + +#: ../../../library/ctypes.rst:1584 +msgid "The system handle used to access the library." msgstr "" -#: ../../../library/ctypes.rst:1595 +#: ../../../library/ctypes.rst:1588 +msgid "The name of the library passed in the constructor." +msgstr "" + +#: ../../../library/ctypes.rst:1592 ../../../library/ctypes.rst:1609 +#: ../../../library/ctypes.rst:1618 +msgid "See :py:class:`~ctypes.CDLL`, the superclass, for common information." +msgstr "" + +#: ../../../library/ctypes.rst:1594 msgid "" -"The default mode which is used to load shared libraries. On OSX 10.3, this " -"is *RTLD_GLOBAL*, otherwise it is the same as *RTLD_LOCAL*." +"Functions in this library use the ``stdcall`` calling convention, and are " +"assumed to return the windows specific :class:`HRESULT` code. :class:" +"`HRESULT` values contain information specifying whether the function call " +"failed or succeeded, together with additional error code. If the return " +"value signals a failure, an :class:`OSError` is automatically raised." msgstr "" -#: ../../../library/ctypes.rst:1598 +#: ../../../library/ctypes.rst:1600 ../../../library/ctypes.rst:1614 +#: ../../../library/ctypes.rst:1677 ../../../library/ctypes.rst:1684 +#: ../../../library/ctypes.rst:1854 ../../../library/ctypes.rst:1906 +#: ../../../library/ctypes.rst:2058 ../../../library/ctypes.rst:2130 +#: ../../../library/ctypes.rst:2139 ../../../library/ctypes.rst:2166 +#: ../../../library/ctypes.rst:2180 ../../../library/ctypes.rst:2189 +#: ../../../library/ctypes.rst:2198 ../../../library/ctypes.rst:2213 +#: ../../../library/ctypes.rst:2280 ../../../library/ctypes.rst:2307 +#: ../../../library/ctypes.rst:2707 ../../../library/ctypes.rst:3125 +msgid "Availability" +msgstr "" + +#: ../../../library/ctypes.rst:1602 msgid "" -"Instances of these classes have no public methods. Functions exported by " -"the shared library can be accessed as attributes or by index. Please note " -"that accessing the function through an attribute caches the result and " -"therefore accessing it repeatedly returns the same object each time. On the " -"other hand, accessing it through an index returns a new object each time::" +":exc:`WindowsError` used to be raised, which is now an alias of :exc:" +"`OSError`." msgstr "" #: ../../../library/ctypes.rst:1611 msgid "" -"The following public attributes are available, their name starts with an " -"underscore to not clash with exported function names:" +"Functions in these libraries use the ``stdcall`` calling convention, and are " +"assumed to return :c:expr:`int` by default." msgstr "" -#: ../../../library/ctypes.rst:1617 -msgid "The system handle used to access the library." +#: ../../../library/ctypes.rst:1620 +msgid "" +"When functions in this library are called, the Python GIL is *not* released " +"during the function call, and after the function execution the Python error " +"flag is checked. If the error flag is set, a Python exception is raised." msgstr "" -#: ../../../library/ctypes.rst:1622 -msgid "The name of the library passed in the constructor." +#: ../../../library/ctypes.rst:1625 +msgid "Thus, this is only useful to call Python C API functions directly." +msgstr "" + +#: ../../../library/ctypes.rst:1630 +msgid "" +"Flag to use as *mode* parameter. On platforms where this flag is not " +"available, it is defined as the integer zero." +msgstr "" + +#: ../../../library/ctypes.rst:1636 +msgid "" +"Flag to use as *mode* parameter. On platforms where this is not available, " +"it is the same as *RTLD_GLOBAL*." msgstr "" -#: ../../../library/ctypes.rst:1624 +#: ../../../library/ctypes.rst:1642 +msgid "" +"The default mode which is used to load shared libraries. On OSX 10.3, this " +"is *RTLD_GLOBAL*, otherwise it is the same as *RTLD_LOCAL*." +msgstr "" + +#: ../../../library/ctypes.rst:1646 msgid "" "Shared libraries can also be loaded by using one of the prefabricated " "objects, which are instances of the :class:`LibraryLoader` class, either by " @@ -1664,13 +1706,13 @@ msgid "" "library as attribute of the loader instance." msgstr "" -#: ../../../library/ctypes.rst:1632 +#: ../../../library/ctypes.rst:1653 msgid "" "Class which loads shared libraries. *dlltype* should be one of the :class:" "`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." msgstr "" -#: ../../../library/ctypes.rst:1635 +#: ../../../library/ctypes.rst:1656 msgid "" ":meth:`!__getattr__` has special behavior: It allows loading a shared " "library by accessing it as attribute of a library loader instance. The " @@ -1678,39 +1720,39 @@ msgid "" "each time." msgstr "" -#: ../../../library/ctypes.rst:1641 +#: ../../../library/ctypes.rst:1662 msgid "" "Load a shared library into the process and return it. This method always " "returns a new instance of the library." msgstr "" -#: ../../../library/ctypes.rst:1645 +#: ../../../library/ctypes.rst:1666 msgid "These prefabricated library loaders are available:" msgstr "" -#: ../../../library/ctypes.rst:1650 +#: ../../../library/ctypes.rst:1670 msgid "Creates :class:`CDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1656 +#: ../../../library/ctypes.rst:1675 msgid "Creates :class:`WinDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1664 +#: ../../../library/ctypes.rst:1682 msgid "Creates :class:`OleDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1672 +#: ../../../library/ctypes.rst:1689 msgid "Creates :class:`PyDLL` instances." msgstr "" -#: ../../../library/ctypes.rst:1675 +#: ../../../library/ctypes.rst:1692 msgid "" "For accessing the C Python api directly, a ready-to-use Python shared " "library object is available:" msgstr "" -#: ../../../library/ctypes.rst:1681 +#: ../../../library/ctypes.rst:1697 msgid "" "An instance of :class:`PyDLL` that exposes Python C API functions as " "attributes. Note that all these functions are assumed to return C :c:expr:" @@ -1718,32 +1760,32 @@ msgid "" "correct :attr:`!restype` attribute to use these functions." msgstr "" -#: ../../../library/ctypes.rst:1686 ../../../library/ctypes.rst:1688 +#: ../../../library/ctypes.rst:1702 ../../../library/ctypes.rst:1704 msgid "" "Loading a library through any of these objects raises an :ref:`auditing " "event ` ``ctypes.dlopen`` with string argument ``name``, the name " "used to load the library." msgstr "" -#: ../../../library/ctypes.rst:1692 ../../../library/ctypes.rst:1694 +#: ../../../library/ctypes.rst:1708 ../../../library/ctypes.rst:1710 msgid "" "Accessing a function on a loaded library raises an auditing event ``ctypes." "dlsym`` with arguments ``library`` (the library object) and ``name`` (the " "symbol's name as a string or integer)." msgstr "" -#: ../../../library/ctypes.rst:1698 ../../../library/ctypes.rst:1700 +#: ../../../library/ctypes.rst:1714 ../../../library/ctypes.rst:1716 msgid "" "In cases when only the library handle is available rather than the object, " "accessing a function raises an auditing event ``ctypes.dlsym/handle`` with " "arguments ``handle`` (the raw library handle) and ``name``." msgstr "" -#: ../../../library/ctypes.rst:1707 +#: ../../../library/ctypes.rst:1723 msgid "Foreign functions" msgstr "" -#: ../../../library/ctypes.rst:1709 +#: ../../../library/ctypes.rst:1725 msgid "" "As explained in the previous section, foreign functions can be accessed as " "attributes of loaded shared libraries. The function objects created in this " @@ -1752,35 +1794,35 @@ msgid "" "library loader." msgstr "" -#: ../../../library/ctypes.rst:1714 +#: ../../../library/ctypes.rst:1730 msgid "" "They are instances of a private local class :class:`!_FuncPtr` (not exposed " "in :mod:`!ctypes`) which inherits from the private :class:`_CFuncPtr` class:" msgstr "" -#: ../../../library/ctypes.rst:1728 +#: ../../../library/ctypes.rst:1744 msgid "Base class for C callable foreign functions." msgstr "" -#: ../../../library/ctypes.rst:1730 +#: ../../../library/ctypes.rst:1746 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." msgstr "" -#: ../../../library/ctypes.rst:1733 +#: ../../../library/ctypes.rst:1749 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." msgstr "" -#: ../../../library/ctypes.rst:1738 +#: ../../../library/ctypes.rst:1754 msgid "" "Assign a ctypes type to specify the result type of the foreign function. Use " "``None`` for :c:expr:`void`, a function not returning anything." msgstr "" -#: ../../../library/ctypes.rst:1741 +#: ../../../library/ctypes.rst:1757 msgid "" "It is possible to assign a callable Python object that is not a ctypes type, " "in this case the function is assumed to return a C :c:expr:`int`, and the " @@ -1790,7 +1832,7 @@ msgid "" "callable to the :attr:`errcheck` attribute." msgstr "" -#: ../../../library/ctypes.rst:1750 +#: ../../../library/ctypes.rst:1766 msgid "" "Assign a tuple of ctypes types to specify the argument types that the " "function accepts. Functions using the ``stdcall`` calling convention can " @@ -1799,7 +1841,7 @@ msgid "" "unspecified arguments as well." msgstr "" -#: ../../../library/ctypes.rst:1756 +#: ../../../library/ctypes.rst:1772 msgid "" "When a foreign function is called, each actual argument is passed to the :" "meth:`~_CData.from_param` class method of the items in the :attr:`argtypes` " @@ -1809,7 +1851,7 @@ msgid "" "object using ctypes conversion rules." msgstr "" -#: ../../../library/ctypes.rst:1763 +#: ../../../library/ctypes.rst:1779 msgid "" "New: It is now possible to put items in argtypes which are not ctypes types, " "but each item must have a :meth:`~_CData.from_param` method which returns a " @@ -1817,38 +1859,38 @@ msgid "" "defining adapters that can adapt custom objects as function parameters." msgstr "" -#: ../../../library/ctypes.rst:1770 +#: ../../../library/ctypes.rst:1786 msgid "" "Assign a Python function or another callable to this attribute. The callable " "will be called with three or more arguments:" msgstr "" -#: ../../../library/ctypes.rst:1777 +#: ../../../library/ctypes.rst:1793 msgid "" "*result* is what the foreign function returns, as specified by the :attr:`!" "restype` attribute." msgstr "" -#: ../../../library/ctypes.rst:1780 +#: ../../../library/ctypes.rst:1796 msgid "" "*func* is the foreign function object itself, this allows reusing the same " "callable object to check or post process the results of several functions." msgstr "" -#: ../../../library/ctypes.rst:1784 +#: ../../../library/ctypes.rst:1800 msgid "" "*arguments* is a tuple containing the parameters originally passed to the " "function call, this allows specializing the behavior on the arguments used." msgstr "" -#: ../../../library/ctypes.rst:1788 +#: ../../../library/ctypes.rst:1804 msgid "" "The object that this function returns will be returned from the foreign " "function call, but it can also check the result value and raise an exception " "if the foreign function call failed." msgstr "" -#: ../../../library/ctypes.rst:1793 ../../../library/ctypes.rst:1795 +#: ../../../library/ctypes.rst:1809 ../../../library/ctypes.rst:1811 msgid "" "On Windows, when a foreign function call raises a system exception (for " "example, due to an access violation), it will be captured and replaced with " @@ -1857,18 +1899,18 @@ msgid "" "hook to replace the exception with its own." msgstr "" -#: ../../../library/ctypes.rst:1801 ../../../library/ctypes.rst:1803 +#: ../../../library/ctypes.rst:1817 ../../../library/ctypes.rst:1819 msgid "" "Some ways to invoke foreign function calls as well as some of the functions " "in this module may raise an auditing event ``ctypes.call_function`` with " "arguments ``function pointer`` and ``arguments``." msgstr "" -#: ../../../library/ctypes.rst:1810 +#: ../../../library/ctypes.rst:1826 msgid "Function prototypes" msgstr "" -#: ../../../library/ctypes.rst:1812 +#: ../../../library/ctypes.rst:1828 msgid "" "Foreign functions can also be created by instantiating function prototypes. " "Function prototypes are similar to function prototypes in C; they describe a " @@ -1879,7 +1921,7 @@ msgid "" "``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples." msgstr "" -#: ../../../library/ctypes.rst:1823 +#: ../../../library/ctypes.rst:1839 msgid "" "The returned function prototype creates functions that use the standard C " "calling convention. The function will release the GIL during the call. If " @@ -1888,37 +1930,37 @@ msgid "" "after the call; *use_last_error* does the same for the Windows error code." msgstr "" -#: ../../../library/ctypes.rst:1833 +#: ../../../library/ctypes.rst:1849 msgid "" "The returned function prototype creates functions that use the ``stdcall`` " "calling convention. The function will release the GIL during the call. " "*use_errno* and *use_last_error* have the same meaning as above." msgstr "" -#: ../../../library/ctypes.rst:1843 +#: ../../../library/ctypes.rst:1859 msgid "" "The returned function prototype creates functions that use the Python " "calling convention. The function will *not* release the GIL during the call." msgstr "" -#: ../../../library/ctypes.rst:1846 +#: ../../../library/ctypes.rst:1862 msgid "" "Function prototypes created by these factory functions can be instantiated " "in different ways, depending on the type and number of the parameters in the " "call:" msgstr "" -#: ../../../library/ctypes.rst:1853 +#: ../../../library/ctypes.rst:1869 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" -#: ../../../library/ctypes.rst:1860 +#: ../../../library/ctypes.rst:1876 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" -#: ../../../library/ctypes.rst:1867 +#: ../../../library/ctypes.rst:1883 msgid "" "Returns a foreign function exported by a shared library. *func_spec* must be " "a 2-tuple ``(name_or_ordinal, library)``. The first item is the name of the " @@ -1926,7 +1968,7 @@ msgid "" "small integer. The second item is the shared library instance." msgstr "" -#: ../../../library/ctypes.rst:1877 +#: ../../../library/ctypes.rst:1893 msgid "" "Returns a foreign function that will call a COM method. *vtbl_index* is the " "index into the virtual function table, a small non-negative integer. *name* " @@ -1934,94 +1976,94 @@ msgid "" "identifier which is used in extended error reporting." msgstr "" -#: ../../../library/ctypes.rst:1882 +#: ../../../library/ctypes.rst:1898 msgid "" "If *iid* is not specified, an :exc:`OSError` is raised if the COM method " "call fails. If *iid* is specified, a :exc:`~ctypes.COMError` is raised " "instead." msgstr "" -#: ../../../library/ctypes.rst:1886 +#: ../../../library/ctypes.rst:1902 msgid "" "COM methods use a special calling convention: They require a pointer to the " "COM interface as first argument, in addition to those parameters that are " "specified in the :attr:`!argtypes` tuple." msgstr "" -#: ../../../library/ctypes.rst:1893 +#: ../../../library/ctypes.rst:1909 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" -#: ../../../library/ctypes.rst:1896 +#: ../../../library/ctypes.rst:1912 msgid "" "*paramflags* must be a tuple of the same length as :attr:`~_CFuncPtr." "argtypes`." msgstr "" -#: ../../../library/ctypes.rst:1898 +#: ../../../library/ctypes.rst:1914 msgid "" "Each item in this tuple contains further information about a parameter, it " "must be a tuple containing one, two, or three items." msgstr "" -#: ../../../library/ctypes.rst:1901 +#: ../../../library/ctypes.rst:1917 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" msgstr "" -#: ../../../library/ctypes.rst:1904 +#: ../../../library/ctypes.rst:1920 msgid "1" msgstr "" -#: ../../../library/ctypes.rst:1905 +#: ../../../library/ctypes.rst:1921 msgid "Specifies an input parameter to the function." msgstr "" -#: ../../../library/ctypes.rst:1907 +#: ../../../library/ctypes.rst:1923 msgid "2" msgstr "" -#: ../../../library/ctypes.rst:1908 +#: ../../../library/ctypes.rst:1924 msgid "Output parameter. The foreign function fills in a value." msgstr "" -#: ../../../library/ctypes.rst:1910 +#: ../../../library/ctypes.rst:1926 msgid "4" msgstr "" -#: ../../../library/ctypes.rst:1911 +#: ../../../library/ctypes.rst:1927 msgid "Input parameter which defaults to the integer zero." msgstr "" -#: ../../../library/ctypes.rst:1913 +#: ../../../library/ctypes.rst:1929 msgid "" "The optional second item is the parameter name as string. If this is " "specified, the foreign function can be called with named parameters." msgstr "" -#: ../../../library/ctypes.rst:1916 +#: ../../../library/ctypes.rst:1932 msgid "The optional third item is the default value for this parameter." msgstr "" -#: ../../../library/ctypes.rst:1919 +#: ../../../library/ctypes.rst:1935 msgid "" "The following example demonstrates how to wrap the Windows ``MessageBoxW`` " "function so that it supports default parameters and named arguments. The C " "declaration from the windows header file is this::" msgstr "" -#: ../../../library/ctypes.rst:1930 ../../../library/ctypes.rst:1953 +#: ../../../library/ctypes.rst:1946 ../../../library/ctypes.rst:1969 msgid "Here is the wrapping with :mod:`!ctypes`::" msgstr "" -#: ../../../library/ctypes.rst:1938 +#: ../../../library/ctypes.rst:1954 msgid "The ``MessageBox`` foreign function can now be called in these ways::" msgstr "" -#: ../../../library/ctypes.rst:1944 +#: ../../../library/ctypes.rst:1960 msgid "" "A second example demonstrates output parameters. The win32 " "``GetWindowRect`` function retrieves the dimensions of a specified window by " @@ -2029,7 +2071,7 @@ msgid "" "the C declaration::" msgstr "" -#: ../../../library/ctypes.rst:1962 +#: ../../../library/ctypes.rst:1978 msgid "" "Functions with output parameters will automatically return the output " "parameter value if there is a single one, or a tuple containing the output " @@ -2037,7 +2079,7 @@ msgid "" "now returns a RECT instance, when called." msgstr "" -#: ../../../library/ctypes.rst:1967 +#: ../../../library/ctypes.rst:1983 msgid "" "Output parameters can be combined with the :attr:`~_CFuncPtr.errcheck` " "protocol to do further output processing and error checking. The win32 " @@ -2046,7 +2088,7 @@ msgid "" "exception when the api call failed::" msgstr "" -#: ../../../library/ctypes.rst:1980 +#: ../../../library/ctypes.rst:1996 msgid "" "If the :attr:`~_CFuncPtr.errcheck` function returns the argument tuple it " "receives unchanged, :mod:`!ctypes` continues the normal processing it does " @@ -2056,58 +2098,58 @@ msgid "" "take place::" msgstr "" -#: ../../../library/ctypes.rst:1999 +#: ../../../library/ctypes.rst:2015 msgid "Utility functions" msgstr "" -#: ../../../library/ctypes.rst:2003 +#: ../../../library/ctypes.rst:2019 msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" -#: ../../../library/ctypes.rst:2006 +#: ../../../library/ctypes.rst:2022 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -#: ../../../library/ctypes.rst:2011 +#: ../../../library/ctypes.rst:2027 msgid "" "Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " "ctypes type or instance." msgstr "" -#: ../../../library/ctypes.rst:2017 +#: ../../../library/ctypes.rst:2033 msgid "" "Returns a light-weight pointer to *obj*, which must be an instance of a " "ctypes type. *offset* defaults to zero, and must be an integer that will be " "added to the internal pointer value." msgstr "" -#: ../../../library/ctypes.rst:2021 +#: ../../../library/ctypes.rst:2037 msgid "``byref(obj, offset)`` corresponds to this C code::" msgstr "" -#: ../../../library/ctypes.rst:2025 +#: ../../../library/ctypes.rst:2041 msgid "" "The returned object can only be used as a foreign function call parameter. " "It behaves similar to ``pointer(obj)``, but the construction is a lot faster." msgstr "" -#: ../../../library/ctypes.rst:2031 +#: ../../../library/ctypes.rst:2047 msgid "" "Copies a COM pointer from *src* to *dst* and returns the Windows specific :c:" "type:`!HRESULT` value." msgstr "" -#: ../../../library/ctypes.rst:2034 +#: ../../../library/ctypes.rst:2050 msgid "" "If *src* is not ``NULL``, its ``AddRef`` method is called, incrementing the " "reference count." msgstr "" -#: ../../../library/ctypes.rst:2037 +#: ../../../library/ctypes.rst:2053 msgid "" "In contrast, the reference count of *dst* will not be decremented before " "assigning the new value. Unless *dst* is ``NULL``, the caller is responsible " @@ -2115,7 +2157,7 @@ msgid "" "necessary." msgstr "" -#: ../../../library/ctypes.rst:2049 +#: ../../../library/ctypes.rst:2065 msgid "" "This function is similar to the cast operator in C. It returns a new " "instance of *type* which points to the same memory block as *obj*. *type* " @@ -2123,85 +2165,85 @@ msgid "" "as a pointer." msgstr "" -#: ../../../library/ctypes.rst:2058 +#: ../../../library/ctypes.rst:2074 msgid "" "This function creates a mutable character buffer. The returned object is a " "ctypes array of :class:`c_char`." msgstr "" -#: ../../../library/ctypes.rst:2061 +#: ../../../library/ctypes.rst:2077 msgid "" "If *size* is given (and not ``None``), it must be an :class:`int`. It " "specifies the size of the returned array." msgstr "" -#: ../../../library/ctypes.rst:2064 +#: ../../../library/ctypes.rst:2080 msgid "" "If the *init* argument is given, it must be :class:`bytes`. It is used to " "initialize the array items. Bytes not initialized this way are set to zero " "(NUL)." msgstr "" -#: ../../../library/ctypes.rst:2068 +#: ../../../library/ctypes.rst:2084 msgid "" "If *size* is not given (or if it is ``None``), the buffer is made one " "element larger than *init*, effectively adding a NUL terminator." msgstr "" -#: ../../../library/ctypes.rst:2071 +#: ../../../library/ctypes.rst:2087 msgid "" "If both arguments are given, *size* must not be less than ``len(init)``." msgstr "" -#: ../../../library/ctypes.rst:2075 +#: ../../../library/ctypes.rst:2091 msgid "" "If *size* is equal to ``len(init)``, a NUL terminator is not added. Do not " "treat such a buffer as a C string." msgstr "" -#: ../../../library/ctypes.rst:2078 +#: ../../../library/ctypes.rst:2094 msgid "For example::" msgstr "" -#: ../../../library/ctypes.rst:2093 +#: ../../../library/ctypes.rst:2109 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2099 +#: ../../../library/ctypes.rst:2115 msgid "" "This function creates a mutable unicode character buffer. The returned " "object is a ctypes array of :class:`c_wchar`." msgstr "" -#: ../../../library/ctypes.rst:2102 +#: ../../../library/ctypes.rst:2118 msgid "" "The function takes the same arguments as :func:`~create_string_buffer` " "except *init* must be a string and *size* counts :class:`c_wchar`." msgstr "" -#: ../../../library/ctypes.rst:2105 +#: ../../../library/ctypes.rst:2121 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2110 +#: ../../../library/ctypes.rst:2126 msgid "" "This function is a hook which allows implementing in-process COM servers " "with ctypes. It is called from the DllCanUnloadNow function that the " "_ctypes extension dll exports." msgstr "" -#: ../../../library/ctypes.rst:2119 +#: ../../../library/ctypes.rst:2135 msgid "" "This function is a hook which allows implementing in-process COM servers " "with ctypes. It is called from the DllGetClassObject function that the " "``_ctypes`` extension dll exports." msgstr "" -#: ../../../library/ctypes.rst:2129 +#: ../../../library/ctypes.rst:2145 msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like ``lib``, suffix like ``.so``, ``.dylib`` or version " @@ -2209,25 +2251,25 @@ msgid "" "If no library can be found, returns ``None``." msgstr "" -#: ../../../library/ctypes.rst:2136 +#: ../../../library/ctypes.rst:2152 msgid "See :ref:`ctypes-finding-shared-libraries` for complete documentation." msgstr "" -#: ../../../library/ctypes.rst:2142 +#: ../../../library/ctypes.rst:2158 msgid "" "Returns the filename of the VC runtime library used by Python, and by the " "extension modules. If the name of the library cannot be determined, " "``None`` is returned." msgstr "" -#: ../../../library/ctypes.rst:2146 +#: ../../../library/ctypes.rst:2162 msgid "" "If you need to free memory, for example, allocated by an extension module " "with a call to the ``free(void *)``, it is important that you use the " "function in the same library that allocated the memory." msgstr "" -#: ../../../library/ctypes.rst:2156 +#: ../../../library/ctypes.rst:2172 msgid "" "Try to provide a list of paths of the shared libraries loaded into the " "current process. These paths are not normalized or processed in any way. " @@ -2235,72 +2277,72 @@ msgid "" "The exact functionality is system dependent." msgstr "" -#: ../../../library/ctypes.rst:2161 +#: ../../../library/ctypes.rst:2177 msgid "" "On most platforms, the first element of the list represents the current " "executable file. It may be an empty string." msgstr "" -#: ../../../library/ctypes.rst:2169 +#: ../../../library/ctypes.rst:2185 msgid "" "Returns a textual description of the error code *code*. If no error code is " "specified, the last error code is used by calling the Windows API function :" "func:`GetLastError`." msgstr "" -#: ../../../library/ctypes.rst:2178 +#: ../../../library/ctypes.rst:2194 msgid "" "Returns the last error code set by Windows in the calling thread. This " "function calls the Windows ``GetLastError()`` function directly, it does not " "return the ctypes-private copy of the error code." msgstr "" -#: ../../../library/ctypes.rst:2187 +#: ../../../library/ctypes.rst:2203 msgid "" "Returns the current value of the ctypes-private copy of the system :data:" "`errno` variable in the calling thread." msgstr "" -#: ../../../library/ctypes.rst:2190 +#: ../../../library/ctypes.rst:2206 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" -#: ../../../library/ctypes.rst:2194 +#: ../../../library/ctypes.rst:2210 msgid "" "Returns the current value of the ctypes-private copy of the system :data:`!" "LastError` variable in the calling thread." msgstr "" -#: ../../../library/ctypes.rst:2199 +#: ../../../library/ctypes.rst:2215 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" -#: ../../../library/ctypes.rst:2204 +#: ../../../library/ctypes.rst:2220 msgid "" "Same as the standard C memmove library function: copies *count* bytes from " "*src* to *dst*. *dst* and *src* must be integers or ctypes instances that " "can be converted to pointers." msgstr "" -#: ../../../library/ctypes.rst:2211 +#: ../../../library/ctypes.rst:2227 msgid "" "Same as the standard C memset library function: fills the memory block at " "address *dst* with *count* bytes of value *c*. *dst* must be an integer " "specifying an address, or a ctypes instance." msgstr "" -#: ../../../library/ctypes.rst:2218 +#: ../../../library/ctypes.rst:2234 msgid "" "Create or return a ctypes pointer type. Pointer types are cached and reused " "internally, so calling this function repeatedly is cheap. *type* must be a " "ctypes type." msgstr "" -#: ../../../library/ctypes.rst:2224 +#: ../../../library/ctypes.rst:2240 msgid "" "The resulting pointer type is cached in the ``__pointer_type__`` attribute " "of *type*. It is possible to set this attribute before the first call to " @@ -2309,19 +2351,19 @@ msgid "" "relying on implementation details that may change in future Python versions." msgstr "" -#: ../../../library/ctypes.rst:2235 +#: ../../../library/ctypes.rst:2251 msgid "" "Create a new pointer instance, pointing to *obj*. The returned object is of " "the type ``POINTER(type(obj))``." msgstr "" -#: ../../../library/ctypes.rst:2238 +#: ../../../library/ctypes.rst:2254 msgid "" "Note: If you just want to pass a pointer to an object to a foreign function " "call, you should use ``byref(obj)`` which is much faster." msgstr "" -#: ../../../library/ctypes.rst:2244 +#: ../../../library/ctypes.rst:2260 msgid "" "This function resizes the internal memory buffer of *obj*, which must be an " "instance of a ctypes type. It is not possible to make the buffer smaller " @@ -2329,50 +2371,50 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" -#: ../../../library/ctypes.rst:2252 +#: ../../../library/ctypes.rst:2268 msgid "" "Set the current value of the ctypes-private copy of the system :data:`errno` " "variable in the calling thread to *value* and return the previous value." msgstr "" -#: ../../../library/ctypes.rst:2255 +#: ../../../library/ctypes.rst:2271 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -#: ../../../library/ctypes.rst:2260 +#: ../../../library/ctypes.rst:2276 msgid "" "Sets the current value of the ctypes-private copy of the system :data:`!" "LastError` variable in the calling thread to *value* and return the previous " "value." msgstr "" -#: ../../../library/ctypes.rst:2266 +#: ../../../library/ctypes.rst:2282 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" -#: ../../../library/ctypes.rst:2271 +#: ../../../library/ctypes.rst:2287 msgid "" "Returns the size in bytes of a ctypes type or instance memory buffer. Does " "the same as the C ``sizeof`` operator." msgstr "" -#: ../../../library/ctypes.rst:2277 +#: ../../../library/ctypes.rst:2293 msgid "" "Return the byte string at *void \\*ptr*. If *size* is specified, it is used " "as size, otherwise the string is assumed to be zero-terminated." msgstr "" -#: ../../../library/ctypes.rst:2281 +#: ../../../library/ctypes.rst:2297 msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``ptr``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2286 +#: ../../../library/ctypes.rst:2302 msgid "" "Creates an instance of :exc:`OSError`. If *code* is not specified, :func:" "`GetLastError` is called to determine the error code. If *descr* is not " @@ -2380,39 +2422,39 @@ msgid "" "error." msgstr "" -#: ../../../library/ctypes.rst:2293 +#: ../../../library/ctypes.rst:2309 msgid "" "An instance of :exc:`WindowsError` used to be created, which is now an alias " "of :exc:`OSError`." msgstr "" -#: ../../../library/ctypes.rst:2300 +#: ../../../library/ctypes.rst:2316 msgid "" "Return the wide-character string at *void \\*ptr*. If *size* is specified, " "it is used as the number of characters of the string, otherwise the string " "is assumed to be zero-terminated." msgstr "" -#: ../../../library/ctypes.rst:2305 +#: ../../../library/ctypes.rst:2321 msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``ptr``, ``size``." msgstr "" -#: ../../../library/ctypes.rst:2310 +#: ../../../library/ctypes.rst:2326 msgid "" "Return a :class:`memoryview` object of length *size* that references memory " "starting at *void \\*ptr*." msgstr "" -#: ../../../library/ctypes.rst:2313 +#: ../../../library/ctypes.rst:2329 msgid "" "If *readonly* is true, the returned :class:`!memoryview` object can not be " "used to modify the underlying memory. (Changes made by other means will " "still be reflected in the returned object.)" msgstr "" -#: ../../../library/ctypes.rst:2318 +#: ../../../library/ctypes.rst:2334 msgid "" "This function is similar to :func:`string_at` with the key difference of not " "making a copy of the specified memory. It is a semantically equivalent (but " @@ -2422,17 +2464,17 @@ msgid "" "`~ctypes.byref` object.)" msgstr "" -#: ../../../library/ctypes.rst:2325 +#: ../../../library/ctypes.rst:2341 msgid "" "Raises an :ref:`auditing event ` ``ctypes.memoryview_at`` with " "arguments ``address``, ``size``, ``readonly``." msgstr "" -#: ../../../library/ctypes.rst:2333 +#: ../../../library/ctypes.rst:2349 msgid "Data types" msgstr "" -#: ../../../library/ctypes.rst:2338 +#: ../../../library/ctypes.rst:2354 msgid "" "This non-public class is the common base class of all ctypes data types. " "Among other things, all ctypes type instances contain a memory block that " @@ -2442,13 +2484,13 @@ msgid "" "alive in case the memory block contains pointers." msgstr "" -#: ../../../library/ctypes.rst:2345 +#: ../../../library/ctypes.rst:2361 msgid "" "Common methods of ctypes data types, these are all class methods (to be " "exact, they are methods of the :term:`metaclass`):" msgstr "" -#: ../../../library/ctypes.rst:2350 +#: ../../../library/ctypes.rst:2366 msgid "" "This method returns a ctypes instance that shares the buffer of the *source* " "object. The *source* object must support the writeable buffer interface. " @@ -2457,13 +2499,13 @@ msgid "" "exc:`ValueError` is raised." msgstr "" -#: ../../../library/ctypes.rst:2356 ../../../library/ctypes.rst:2366 +#: ../../../library/ctypes.rst:2372 ../../../library/ctypes.rst:2382 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" -#: ../../../library/ctypes.rst:2360 +#: ../../../library/ctypes.rst:2376 msgid "" "This method creates a ctypes instance, copying the buffer from the *source* " "object buffer which must be readable. The optional *offset* parameter " @@ -2471,19 +2513,19 @@ msgid "" "If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" -#: ../../../library/ctypes.rst:2370 +#: ../../../library/ctypes.rst:2386 msgid "" "This method returns a ctypes type instance using the memory specified by " "*address* which must be an integer." msgstr "" -#: ../../../library/ctypes.rst:2373 ../../../library/ctypes.rst:2375 +#: ../../../library/ctypes.rst:2389 ../../../library/ctypes.rst:2391 msgid "" "This method, and others that indirectly call this method, raises an :ref:" "`auditing event ` ``ctypes.cdata`` with argument ``address``." msgstr "" -#: ../../../library/ctypes.rst:2381 +#: ../../../library/ctypes.rst:2397 msgid "" "This method adapts *obj* to a ctypes type. It is called with the actual " "object used in a foreign function call when the type is present in the " @@ -2491,36 +2533,36 @@ msgid "" "object that can be used as a function call parameter." msgstr "" -#: ../../../library/ctypes.rst:2386 +#: ../../../library/ctypes.rst:2402 msgid "" "All ctypes data types have a default implementation of this classmethod that " "normally returns *obj* if that is an instance of the type. Some types " "accept other objects as well." msgstr "" -#: ../../../library/ctypes.rst:2392 +#: ../../../library/ctypes.rst:2408 msgid "" "This method returns a ctypes type instance exported by a shared library. " "*name* is the name of the symbol that exports the data, *library* is the " "loaded shared library." msgstr "" -#: ../../../library/ctypes.rst:2396 +#: ../../../library/ctypes.rst:2412 msgid "Common class variables of ctypes data types:" msgstr "" -#: ../../../library/ctypes.rst:2400 +#: ../../../library/ctypes.rst:2416 msgid "" "The pointer type that was created by calling :func:`POINTER` for " "corresponding ctypes data type. If a pointer type was not yet created, the " "attribute is missing." msgstr "" -#: ../../../library/ctypes.rst:2406 +#: ../../../library/ctypes.rst:2422 msgid "Common instance variables of ctypes data types:" msgstr "" -#: ../../../library/ctypes.rst:2410 +#: ../../../library/ctypes.rst:2426 msgid "" "Sometimes ctypes data instances do not own the memory block they contain, " "instead they share part of the memory block of a base object. The :attr:" @@ -2528,13 +2570,13 @@ msgid "" "block." msgstr "" -#: ../../../library/ctypes.rst:2417 +#: ../../../library/ctypes.rst:2433 msgid "" "This read-only variable is true when the ctypes data instance has allocated " "the memory block itself, false otherwise." msgstr "" -#: ../../../library/ctypes.rst:2422 +#: ../../../library/ctypes.rst:2438 msgid "" "This member is either ``None`` or a dictionary containing Python objects " "that need to be kept alive so that the memory block contents is kept valid. " @@ -2542,7 +2584,7 @@ msgid "" "dictionary." msgstr "" -#: ../../../library/ctypes.rst:2435 +#: ../../../library/ctypes.rst:2451 msgid "" "This non-public class is the base class of all fundamental ctypes data " "types. It is mentioned here because it contains the common attributes of the " @@ -2551,11 +2593,11 @@ msgid "" "types that are not and do not contain pointers can now be pickled." msgstr "" -#: ../../../library/ctypes.rst:2441 +#: ../../../library/ctypes.rst:2457 msgid "Instances have a single attribute:" msgstr "" -#: ../../../library/ctypes.rst:2445 +#: ../../../library/ctypes.rst:2461 msgid "" "This attribute contains the actual value of the instance. For integer and " "pointer types, it is an integer, for character types, it is a single " @@ -2563,7 +2605,7 @@ msgid "" "bytes object or string." msgstr "" -#: ../../../library/ctypes.rst:2450 +#: ../../../library/ctypes.rst:2466 msgid "" "When the ``value`` attribute is retrieved from a ctypes instance, usually a " "new object is returned each time. :mod:`!ctypes` does *not* implement " @@ -2571,7 +2613,7 @@ msgid "" "true for all other ctypes object instances." msgstr "" -#: ../../../library/ctypes.rst:2456 +#: ../../../library/ctypes.rst:2472 msgid "" "Fundamental data types, when returned as foreign function call results, or, " "for example, by retrieving structure field members or array items, are " @@ -2581,7 +2623,7 @@ msgid "" "instance." msgstr "" -#: ../../../library/ctypes.rst:2464 +#: ../../../library/ctypes.rst:2480 msgid "" "Subclasses of fundamental data types do *not* inherit this behavior. So, if " "a foreign functions :attr:`!restype` is a subclass of :class:`c_void_p`, you " @@ -2589,25 +2631,25 @@ msgid "" "you can get the value of the pointer by accessing the ``value`` attribute." msgstr "" -#: ../../../library/ctypes.rst:2469 +#: ../../../library/ctypes.rst:2485 msgid "These are the fundamental ctypes data types:" msgstr "" -#: ../../../library/ctypes.rst:2473 +#: ../../../library/ctypes.rst:2489 msgid "" "Represents the C :c:expr:`signed char` datatype, and interprets the value as " "small integer. The constructor accepts an optional integer initializer; no " "overflow checking is done." msgstr "" -#: ../../../library/ctypes.rst:2480 +#: ../../../library/ctypes.rst:2496 msgid "" "Represents the C :c:expr:`char` datatype, and interprets the value as a " "single character. The constructor accepts an optional string initializer, " "the length of the string must be exactly one character." msgstr "" -#: ../../../library/ctypes.rst:2487 +#: ../../../library/ctypes.rst:2503 msgid "" "Represents the C :c:expr:`char *` datatype when it points to a zero-" "terminated string. For a general character pointer that may also point to " @@ -2615,204 +2657,204 @@ msgid "" "integer address, or a bytes object." msgstr "" -#: ../../../library/ctypes.rst:2495 +#: ../../../library/ctypes.rst:2511 msgid "" "Represents the C :c:expr:`double` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: ../../../library/ctypes.rst:2501 +#: ../../../library/ctypes.rst:2517 msgid "" "Represents the C :c:expr:`long double` datatype. The constructor accepts an " "optional float initializer. On platforms where ``sizeof(long double) == " "sizeof(double)`` it is an alias to :class:`c_double`." msgstr "" -#: ../../../library/ctypes.rst:2507 +#: ../../../library/ctypes.rst:2523 msgid "" "Represents the C :c:expr:`float` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: ../../../library/ctypes.rst:2513 +#: ../../../library/ctypes.rst:2529 msgid "" "Represents the C :c:expr:`double complex` datatype, if available. The " "constructor accepts an optional :class:`complex` initializer." msgstr "" -#: ../../../library/ctypes.rst:2521 +#: ../../../library/ctypes.rst:2537 msgid "" "Represents the C :c:expr:`float complex` datatype, if available. The " "constructor accepts an optional :class:`complex` initializer." msgstr "" -#: ../../../library/ctypes.rst:2529 +#: ../../../library/ctypes.rst:2545 msgid "" "Represents the C :c:expr:`long double complex` datatype, if available. The " "constructor accepts an optional :class:`complex` initializer." msgstr "" -#: ../../../library/ctypes.rst:2537 +#: ../../../library/ctypes.rst:2553 msgid "" "Represents the C :c:expr:`signed int` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" -#: ../../../library/ctypes.rst:2544 +#: ../../../library/ctypes.rst:2560 msgid "" "Represents the C 8-bit :c:expr:`signed int` datatype. It is an alias for :" "class:`c_byte`." msgstr "" -#: ../../../library/ctypes.rst:2550 +#: ../../../library/ctypes.rst:2566 msgid "" "Represents the C 16-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_short`." msgstr "" -#: ../../../library/ctypes.rst:2556 +#: ../../../library/ctypes.rst:2572 msgid "" "Represents the C 32-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_int`." msgstr "" -#: ../../../library/ctypes.rst:2562 +#: ../../../library/ctypes.rst:2578 msgid "" "Represents the C 64-bit :c:expr:`signed int` datatype. Usually an alias " "for :class:`c_longlong`." msgstr "" -#: ../../../library/ctypes.rst:2568 +#: ../../../library/ctypes.rst:2584 msgid "" "Represents the C :c:expr:`signed long` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done." msgstr "" -#: ../../../library/ctypes.rst:2574 +#: ../../../library/ctypes.rst:2590 msgid "" "Represents the C :c:expr:`signed long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../../library/ctypes.rst:2580 +#: ../../../library/ctypes.rst:2596 msgid "" "Represents the C :c:expr:`signed short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../../library/ctypes.rst:2586 +#: ../../../library/ctypes.rst:2602 msgid "Represents the C :c:type:`size_t` datatype." msgstr "" -#: ../../../library/ctypes.rst:2591 +#: ../../../library/ctypes.rst:2607 msgid "Represents the C :c:type:`ssize_t` datatype." msgstr "" -#: ../../../library/ctypes.rst:2598 +#: ../../../library/ctypes.rst:2614 msgid "Represents the C :c:type:`time_t` datatype." msgstr "" -#: ../../../library/ctypes.rst:2605 +#: ../../../library/ctypes.rst:2621 msgid "" "Represents the C :c:expr:`unsigned char` datatype, it interprets the value " "as small integer. The constructor accepts an optional integer initializer; " "no overflow checking is done." msgstr "" -#: ../../../library/ctypes.rst:2612 +#: ../../../library/ctypes.rst:2628 msgid "" "Represents the C :c:expr:`unsigned int` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias for :class:`c_ulong`." msgstr "" -#: ../../../library/ctypes.rst:2619 +#: ../../../library/ctypes.rst:2635 msgid "" "Represents the C 8-bit :c:expr:`unsigned int` datatype. It is an alias for :" "class:`c_ubyte`." msgstr "" -#: ../../../library/ctypes.rst:2625 +#: ../../../library/ctypes.rst:2641 msgid "" "Represents the C 16-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" -#: ../../../library/ctypes.rst:2631 +#: ../../../library/ctypes.rst:2647 msgid "" "Represents the C 32-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" -#: ../../../library/ctypes.rst:2637 +#: ../../../library/ctypes.rst:2653 msgid "" "Represents the C 64-bit :c:expr:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" -#: ../../../library/ctypes.rst:2643 +#: ../../../library/ctypes.rst:2659 msgid "" "Represents the C :c:expr:`unsigned long` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../../library/ctypes.rst:2649 +#: ../../../library/ctypes.rst:2665 msgid "" "Represents the C :c:expr:`unsigned long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../../library/ctypes.rst:2655 +#: ../../../library/ctypes.rst:2671 msgid "" "Represents the C :c:expr:`unsigned short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: ../../../library/ctypes.rst:2661 +#: ../../../library/ctypes.rst:2677 msgid "" "Represents the C :c:expr:`void *` type. The value is represented as " "integer. The constructor accepts an optional integer initializer." msgstr "" -#: ../../../library/ctypes.rst:2667 +#: ../../../library/ctypes.rst:2683 msgid "" "Represents the C :c:type:`wchar_t` datatype, and interprets the value as a " "single character unicode string. The constructor accepts an optional string " "initializer, the length of the string must be exactly one character." msgstr "" -#: ../../../library/ctypes.rst:2674 +#: ../../../library/ctypes.rst:2690 msgid "" "Represents the C :c:expr:`wchar_t *` datatype, which must be a pointer to a " "zero-terminated wide character string. The constructor accepts an integer " "address, or a string." msgstr "" -#: ../../../library/ctypes.rst:2681 +#: ../../../library/ctypes.rst:2697 msgid "" "Represent the C :c:expr:`bool` datatype (more accurately, :c:expr:`_Bool` " "from C99). Its value can be ``True`` or ``False``, and the constructor " "accepts any object that has a truth value." msgstr "" -#: ../../../library/ctypes.rst:2688 +#: ../../../library/ctypes.rst:2704 msgid "" "Represents a :c:type:`!HRESULT` value, which contains success or error " "information for a function or method call." msgstr "" -#: ../../../library/ctypes.rst:2696 +#: ../../../library/ctypes.rst:2712 msgid "" "Represents the C :c:expr:`PyObject *` datatype. Calling this without an " "argument creates a ``NULL`` :c:expr:`PyObject *` pointer." msgstr "" -#: ../../../library/ctypes.rst:2699 +#: ../../../library/ctypes.rst:2715 msgid ":class:`!py_object` is now a :term:`generic type`." msgstr "" -#: ../../../library/ctypes.rst:2702 +#: ../../../library/ctypes.rst:2718 msgid "" "The :mod:`!ctypes.wintypes` module provides quite some other Windows " "specific data types, for example :c:type:`!HWND`, :c:type:`!WPARAM`, or :c:" @@ -2820,47 +2862,47 @@ msgid "" "are also defined." msgstr "" -#: ../../../library/ctypes.rst:2710 +#: ../../../library/ctypes.rst:2726 msgid "Structured data types" msgstr "" -#: ../../../library/ctypes.rst:2715 +#: ../../../library/ctypes.rst:2731 msgid "Abstract base class for unions in native byte order." msgstr "" -#: ../../../library/ctypes.rst:2717 +#: ../../../library/ctypes.rst:2733 msgid "" "Unions share common attributes and behavior with structures; see :class:" "`Structure` documentation for details." msgstr "" -#: ../../../library/ctypes.rst:2722 +#: ../../../library/ctypes.rst:2738 msgid "Abstract base class for unions in *big endian* byte order." msgstr "" -#: ../../../library/ctypes.rst:2728 +#: ../../../library/ctypes.rst:2744 msgid "Abstract base class for unions in *little endian* byte order." msgstr "" -#: ../../../library/ctypes.rst:2734 +#: ../../../library/ctypes.rst:2750 msgid "Abstract base class for structures in *big endian* byte order." msgstr "" -#: ../../../library/ctypes.rst:2739 +#: ../../../library/ctypes.rst:2755 msgid "Abstract base class for structures in *little endian* byte order." msgstr "" -#: ../../../library/ctypes.rst:2741 +#: ../../../library/ctypes.rst:2757 msgid "" "Structures and unions with non-native byte order cannot contain pointer type " "fields, or any other data types containing pointer type fields." msgstr "" -#: ../../../library/ctypes.rst:2747 +#: ../../../library/ctypes.rst:2763 msgid "Abstract base class for structures in *native* byte order." msgstr "" -#: ../../../library/ctypes.rst:2749 +#: ../../../library/ctypes.rst:2765 msgid "" "Concrete structure and union types must be created by subclassing one of " "these types, and at least define a :attr:`_fields_` class variable. :mod:`!" @@ -2868,40 +2910,40 @@ msgid "" "the fields by direct attribute accesses. These are the" msgstr "" -#: ../../../library/ctypes.rst:2757 +#: ../../../library/ctypes.rst:2773 msgid "" "A sequence defining the structure fields. The items must be 2-tuples or 3-" "tuples. The first item is the name of the field, the second item specifies " "the type of the field; it can be any ctypes data type." msgstr "" -#: ../../../library/ctypes.rst:2761 +#: ../../../library/ctypes.rst:2777 msgid "" "For integer type fields like :class:`c_int`, a third optional item can be " "given. It must be a small positive integer defining the bit width of the " "field." msgstr "" -#: ../../../library/ctypes.rst:2765 +#: ../../../library/ctypes.rst:2781 msgid "" "Field names must be unique within one structure or union. This is not " "checked, only one field can be accessed when names are repeated." msgstr "" -#: ../../../library/ctypes.rst:2768 +#: ../../../library/ctypes.rst:2784 msgid "" "It is possible to define the :attr:`_fields_` class variable *after* the " "class statement that defines the Structure subclass, this allows creating " "data types that directly or indirectly reference themselves::" msgstr "" -#: ../../../library/ctypes.rst:2778 +#: ../../../library/ctypes.rst:2794 msgid "" "The :attr:`!_fields_` class variable can only be set once. Later assignments " "will raise an :exc:`AttributeError`." msgstr "" -#: ../../../library/ctypes.rst:2781 +#: ../../../library/ctypes.rst:2797 msgid "" "Additionally, the :attr:`!_fields_` class variable must be defined before " "the structure or union type is first used: an instance or subclass is " @@ -2911,25 +2953,25 @@ msgid "" "fields, as if :attr:`!_fields_` was empty." msgstr "" -#: ../../../library/ctypes.rst:2789 +#: ../../../library/ctypes.rst:2805 msgid "" "Sub-subclasses of structure types inherit the fields of the base class plus " "the :attr:`_fields_` defined in the sub-subclass, if any." msgstr "" -#: ../../../library/ctypes.rst:2795 +#: ../../../library/ctypes.rst:2811 msgid "" "An optional small integer that allows overriding the alignment of structure " "fields in the instance." msgstr "" -#: ../../../library/ctypes.rst:2798 +#: ../../../library/ctypes.rst:2814 msgid "" "This is only implemented for the MSVC-compatible memory layout (see :attr:" "`_layout_`)." msgstr "" -#: ../../../library/ctypes.rst:2801 +#: ../../../library/ctypes.rst:2817 msgid "" "Setting :attr:`!_pack_` to 0 is the same as not setting it at all. " "Otherwise, the value must be a positive power of two. The effect is " @@ -2937,13 +2979,13 @@ msgid "" "larger *n* than what the compiler accepts." msgstr "" -#: ../../../library/ctypes.rst:2806 +#: ../../../library/ctypes.rst:2822 msgid "" ":attr:`!_pack_` must already be defined when :attr:`_fields_` is assigned, " "otherwise it will have no effect." msgstr "" -#: ../../../library/ctypes.rst:2811 +#: ../../../library/ctypes.rst:2827 msgid "" "For historical reasons, if :attr:`!_pack_` is non-zero, the MSVC-compatible " "layout will be used by default. On non-Windows platforms, this default is " @@ -2951,57 +2993,57 @@ msgid "" "intended, set :attr:`~Structure._layout_` to ``'ms'`` explicitly." msgstr "" -#: ../../../library/ctypes.rst:2820 +#: ../../../library/ctypes.rst:2836 msgid "" "An optional small integer that allows increasing the alignment of the " "structure when being packed or unpacked to/from memory." msgstr "" -#: ../../../library/ctypes.rst:2823 +#: ../../../library/ctypes.rst:2839 msgid "" "The value must not be negative. The effect is equivalent to " "``__attribute__((aligned(N)))`` on GCC or ``#pragma align(N)`` on MSVC, " "except :mod:`!ctypes` may allow values that the compiler would reject." msgstr "" -#: ../../../library/ctypes.rst:2828 +#: ../../../library/ctypes.rst:2844 msgid "" ":attr:`!_align_` can only *increase* a structure's alignment requirements. " "Setting it to 0 or 1 has no effect." msgstr "" -#: ../../../library/ctypes.rst:2831 +#: ../../../library/ctypes.rst:2847 msgid "" "Using values that are not powers of two is discouraged and may lead to " "surprising behavior." msgstr "" -#: ../../../library/ctypes.rst:2834 +#: ../../../library/ctypes.rst:2850 msgid "" ":attr:`!_align_` must already be defined when :attr:`_fields_` is assigned, " "otherwise it will have no effect." msgstr "" -#: ../../../library/ctypes.rst:2841 +#: ../../../library/ctypes.rst:2857 msgid "" "An optional string naming the struct/union layout. It can currently be set " "to:" msgstr "" -#: ../../../library/ctypes.rst:2844 +#: ../../../library/ctypes.rst:2860 msgid "" "``\"ms\"``: the layout used by the Microsoft compiler (MSVC). On GCC and " "Clang, this layout can be selected with ``__attribute__((ms_struct))``." msgstr "" -#: ../../../library/ctypes.rst:2847 +#: ../../../library/ctypes.rst:2863 msgid "" "``\"gcc-sysv\"``: the layout used by GCC with the System V or “SysV-like” " "data model, as used on Linux and macOS. With this layout, :attr:`~Structure." "_pack_` must be unset or zero." msgstr "" -#: ../../../library/ctypes.rst:2851 +#: ../../../library/ctypes.rst:2867 msgid "" "If not set explicitly, ``ctypes`` will use a default that matches the " "platform conventions. This default may change in future Python releases (for " @@ -3009,34 +3051,34 @@ msgid "" "between similar platforms is found). Currently the default will be:" msgstr "" -#: ../../../library/ctypes.rst:2857 +#: ../../../library/ctypes.rst:2873 msgid "On Windows: ``\"ms\"``" msgstr "" -#: ../../../library/ctypes.rst:2858 +#: ../../../library/ctypes.rst:2874 msgid "" "When :attr:`~Structure._pack_` is specified: ``\"ms\"``. (This is " "deprecated; see :attr:`~Structure._pack_` documentation.)" msgstr "" -#: ../../../library/ctypes.rst:2860 +#: ../../../library/ctypes.rst:2876 msgid "Otherwise: ``\"gcc-sysv\"``" msgstr "" -#: ../../../library/ctypes.rst:2862 +#: ../../../library/ctypes.rst:2878 msgid "" ":attr:`!_layout_` must already be defined when :attr:`~Structure._fields_` " "is assigned, otherwise it will have no effect." msgstr "" -#: ../../../library/ctypes.rst:2869 +#: ../../../library/ctypes.rst:2885 msgid "" "An optional sequence that lists the names of unnamed (anonymous) fields. :" "attr:`_anonymous_` must be already defined when :attr:`_fields_` is " "assigned, otherwise it will have no effect." msgstr "" -#: ../../../library/ctypes.rst:2873 +#: ../../../library/ctypes.rst:2889 msgid "" "The fields listed in this variable must be structure or union type fields. :" "mod:`!ctypes` will create descriptors in the structure type that allows " @@ -3044,11 +3086,11 @@ msgid "" "structure or union field." msgstr "" -#: ../../../library/ctypes.rst:2878 +#: ../../../library/ctypes.rst:2894 msgid "Here is an example type (Windows)::" msgstr "" -#: ../../../library/ctypes.rst:2891 +#: ../../../library/ctypes.rst:2907 msgid "" "The ``TYPEDESC`` structure describes a COM data type, the ``vt`` field " "specifies which one of the union fields is valid. Since the ``u`` field is " @@ -3058,7 +3100,7 @@ msgid "" "temporary union instance::" msgstr "" -#: ../../../library/ctypes.rst:2903 +#: ../../../library/ctypes.rst:2919 msgid "" "It is possible to define sub-subclasses of structures, they inherit the " "fields of the base class. If the subclass definition has a separate :attr:" @@ -3066,7 +3108,7 @@ msgid "" "of the base class." msgstr "" -#: ../../../library/ctypes.rst:2908 +#: ../../../library/ctypes.rst:2924 msgid "" "Structure and union constructors accept both positional and keyword " "arguments. Positional arguments are used to initialize member fields in the " @@ -3076,106 +3118,106 @@ msgid "" "names not present in :attr:`_fields_`." msgstr "" -#: ../../../library/ctypes.rst:2918 +#: ../../../library/ctypes.rst:2934 msgid "" "Descriptor for fields of a :class:`Structure` and :class:`Union`. For " "example::" msgstr "" -#: ../../../library/ctypes.rst:2941 +#: ../../../library/ctypes.rst:2957 msgid "All attributes are read-only." msgstr "" -#: ../../../library/ctypes.rst:2943 +#: ../../../library/ctypes.rst:2959 msgid "" ":class:`!CField` objects are created via :attr:`~Structure._fields_`; do not " "instantiate the class directly." msgstr "" -#: ../../../library/ctypes.rst:2948 +#: ../../../library/ctypes.rst:2964 msgid "" "Previously, descriptors only had ``offset`` and ``size`` attributes and a " "readable string representation; the :class:`!CField` class was not available " "directly." msgstr "" -#: ../../../library/ctypes.rst:2954 +#: ../../../library/ctypes.rst:2970 msgid "Name of the field, as a string." msgstr "" -#: ../../../library/ctypes.rst:2958 +#: ../../../library/ctypes.rst:2974 msgid "Type of the field, as a :ref:`ctypes class `." msgstr "" -#: ../../../library/ctypes.rst:2963 +#: ../../../library/ctypes.rst:2979 msgid "Offset of the field, in bytes." msgstr "" -#: ../../../library/ctypes.rst:2965 +#: ../../../library/ctypes.rst:2981 msgid "" "For bitfields, this is the offset of the underlying byte-aligned *storage " "unit*; see :attr:`~CField.bit_offset`." msgstr "" -#: ../../../library/ctypes.rst:2970 +#: ../../../library/ctypes.rst:2986 msgid "Size of the field, in bytes." msgstr "" -#: ../../../library/ctypes.rst:2972 +#: ../../../library/ctypes.rst:2988 msgid "" "For bitfields, this is the size of the underlying *storage unit*. Typically, " "it has the same size as the bitfield's type." msgstr "" -#: ../../../library/ctypes.rst:2977 +#: ../../../library/ctypes.rst:2993 msgid "For non-bitfields, equivalent to :attr:`~CField.byte_size`." msgstr "" -#: ../../../library/ctypes.rst:2979 +#: ../../../library/ctypes.rst:2995 msgid "" "For bitfields, this contains a backwards-compatible bit-packed value that " "combines :attr:`~CField.bit_size` and :attr:`~CField.bit_offset`. Prefer " "using the explicit attributes instead." msgstr "" -#: ../../../library/ctypes.rst:2986 +#: ../../../library/ctypes.rst:3002 msgid "True if this is a bitfield." msgstr "" -#: ../../../library/ctypes.rst:2991 +#: ../../../library/ctypes.rst:3007 msgid "" "The location of a bitfield within its *storage unit*, that is, within :attr:" "`~CField.byte_size` bytes of memory starting at :attr:`~CField.byte_offset`." msgstr "" -#: ../../../library/ctypes.rst:2995 +#: ../../../library/ctypes.rst:3011 msgid "" "To get the field's value, read the storage unit as an integer, :ref:`shift " "left ` by :attr:`!bit_offset` and take the :attr:`!bit_size` least " "significant bits." msgstr "" -#: ../../../library/ctypes.rst:2999 +#: ../../../library/ctypes.rst:3015 msgid "" "For non-bitfields, :attr:`!bit_offset` is zero and :attr:`!bit_size` is " "equal to ``byte_size * 8``." msgstr "" -#: ../../../library/ctypes.rst:3004 +#: ../../../library/ctypes.rst:3020 msgid "" "True if this field is anonymous, that is, it contains nested sub-fields that " "should be merged into a containing structure or union." msgstr "" -#: ../../../library/ctypes.rst:3011 +#: ../../../library/ctypes.rst:3027 msgid "Arrays and pointers" msgstr "" -#: ../../../library/ctypes.rst:3015 +#: ../../../library/ctypes.rst:3031 msgid "Abstract base class for arrays." msgstr "" -#: ../../../library/ctypes.rst:3017 +#: ../../../library/ctypes.rst:3033 msgid "" "The recommended way to create concrete array types is by multiplying any :" "mod:`!ctypes` data type with a non-negative integer. Alternatively, you can " @@ -3185,46 +3227,46 @@ msgid "" "an :class:`Array`." msgstr "" -#: ../../../library/ctypes.rst:3027 +#: ../../../library/ctypes.rst:3043 msgid "" "A positive integer specifying the number of elements in the array. Out-of-" "range subscripts result in an :exc:`IndexError`. Will be returned by :func:" "`len`." msgstr "" -#: ../../../library/ctypes.rst:3034 +#: ../../../library/ctypes.rst:3050 msgid "Specifies the type of each element in the array." msgstr "" -#: ../../../library/ctypes.rst:3037 +#: ../../../library/ctypes.rst:3053 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" -#: ../../../library/ctypes.rst:3042 +#: ../../../library/ctypes.rst:3058 msgid "" "Create an array. Equivalent to ``type * length``, where *type* is a :mod:`!" "ctypes` data type and *length* an integer." msgstr "" -#: ../../../library/ctypes.rst:3046 +#: ../../../library/ctypes.rst:3062 msgid "" "This function is :term:`soft deprecated` in favor of multiplication. There " "are no plans to remove it." msgstr "" -#: ../../../library/ctypes.rst:3052 +#: ../../../library/ctypes.rst:3068 msgid "Private, abstract base class for pointers." msgstr "" -#: ../../../library/ctypes.rst:3054 +#: ../../../library/ctypes.rst:3070 msgid "" "Concrete pointer types are created by calling :func:`POINTER` with the type " "that will be pointed to; this is done automatically by :func:`pointer`." msgstr "" -#: ../../../library/ctypes.rst:3058 +#: ../../../library/ctypes.rst:3074 msgid "" "If a pointer points to an array, its elements can be read and written using " "standard subscript and slice accesses. Pointer objects have no size, so :" @@ -3233,43 +3275,43 @@ msgid "" "probably crash with an access violation (if you're lucky)." msgstr "" -#: ../../../library/ctypes.rst:3068 +#: ../../../library/ctypes.rst:3084 msgid "Specifies the type pointed to." msgstr "" -#: ../../../library/ctypes.rst:3072 +#: ../../../library/ctypes.rst:3088 msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" -#: ../../../library/ctypes.rst:3079 +#: ../../../library/ctypes.rst:3095 msgid "Exceptions" msgstr "" -#: ../../../library/ctypes.rst:3083 +#: ../../../library/ctypes.rst:3099 msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." msgstr "" -#: ../../../library/ctypes.rst:3089 +#: ../../../library/ctypes.rst:3105 msgid "This exception is raised when a COM method call failed." msgstr "" -#: ../../../library/ctypes.rst:3093 +#: ../../../library/ctypes.rst:3109 msgid "The integer value representing the error code." msgstr "" -#: ../../../library/ctypes.rst:3097 +#: ../../../library/ctypes.rst:3113 msgid "The error message." msgstr "" -#: ../../../library/ctypes.rst:3101 +#: ../../../library/ctypes.rst:3117 msgid "The 5-tuple ``(descr, source, helpfile, helpcontext, progid)``." msgstr "" -#: ../../../library/ctypes.rst:3103 +#: ../../../library/ctypes.rst:3119 msgid "" "*descr* is the textual description. *source* is the language-dependent " "``ProgID`` for the class or application that raised the error. *helpfile* " diff --git a/main/locale/pot/LC_MESSAGES/library/datetime.pot b/main/locale/pot/LC_MESSAGES/library/datetime.pot index 3fb4fa7db19..ec2ba4c21df 100644 --- a/main/locale/pot/LC_MESSAGES/library/datetime.pot +++ b/main/locale/pot/LC_MESSAGES/library/datetime.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -356,7 +356,15 @@ msgid "" "resulting attributes::" msgstr "" -#: ../../../library/datetime.rst:247 +#: ../../../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 " @@ -365,275 +373,275 @@ msgid "" "processes are exact (no information is lost)." msgstr "" -#: ../../../library/datetime.rst:254 +#: ../../../library/datetime.rst:260 msgid "" "If the normalized value of days lies outside the indicated range, :exc:" "`OverflowError` is raised." msgstr "" -#: ../../../library/datetime.rst:257 +#: ../../../library/datetime.rst:263 msgid "" "Note that normalization of negative values may be surprising at first. For " "example::" msgstr "" -#: ../../../library/datetime.rst:265 +#: ../../../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:282 ../../../library/datetime.rst:623 -#: ../../../library/datetime.rst:1197 ../../../library/datetime.rst:1846 -#: ../../../library/datetime.rst:2474 +#: ../../../library/datetime.rst:288 ../../../library/datetime.rst:629 +#: ../../../library/datetime.rst:1203 ../../../library/datetime.rst:1852 +#: ../../../library/datetime.rst:2488 msgid "Class attributes:" msgstr "" -#: ../../../library/datetime.rst:286 +#: ../../../library/datetime.rst:292 msgid "The most negative :class:`timedelta` object, ``timedelta(-999999999)``." msgstr "" -#: ../../../library/datetime.rst:291 +#: ../../../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:297 +#: ../../../library/datetime.rst:303 msgid "" "The smallest possible difference between non-equal :class:`timedelta` " "objects, ``timedelta(microseconds=1)``." msgstr "" -#: ../../../library/datetime.rst:301 +#: ../../../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:305 ../../../library/datetime.rst:641 -#: ../../../library/datetime.rst:1217 ../../../library/datetime.rst:1866 +#: ../../../library/datetime.rst:311 ../../../library/datetime.rst:647 +#: ../../../library/datetime.rst:1223 ../../../library/datetime.rst:1872 msgid "Instance attributes (read-only):" msgstr "" -#: ../../../library/datetime.rst:309 +#: ../../../library/datetime.rst:315 msgid "Between -999,999,999 and 999,999,999 inclusive." msgstr "" -#: ../../../library/datetime.rst:314 +#: ../../../library/datetime.rst:320 msgid "Between 0 and 86,399 inclusive." msgstr "" -#: ../../../library/datetime.rst:318 +#: ../../../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:334 +#: ../../../library/datetime.rst:340 msgid "Between 0 and 999,999 inclusive." msgstr "" -#: ../../../library/datetime.rst:337 ../../../library/datetime.rst:658 -#: ../../../library/datetime.rst:1271 +#: ../../../library/datetime.rst:343 ../../../library/datetime.rst:664 +#: ../../../library/datetime.rst:1277 msgid "Supported operations:" msgstr "" -#: ../../../library/datetime.rst:340 ../../../library/datetime.rst:661 -#: ../../../library/datetime.rst:1274 +#: ../../../library/datetime.rst:346 ../../../library/datetime.rst:667 +#: ../../../library/datetime.rst:1280 msgid "Operation" msgstr "" -#: ../../../library/datetime.rst:340 ../../../library/datetime.rst:661 -#: ../../../library/datetime.rst:1274 +#: ../../../library/datetime.rst:346 ../../../library/datetime.rst:667 +#: ../../../library/datetime.rst:1280 msgid "Result" msgstr "" -#: ../../../library/datetime.rst:342 +#: ../../../library/datetime.rst:348 msgid "``t1 = t2 + t3``" msgstr "" -#: ../../../library/datetime.rst:342 +#: ../../../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:346 +#: ../../../library/datetime.rst:352 msgid "``t1 = t2 - t3``" msgstr "" -#: ../../../library/datetime.rst:346 +#: ../../../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:350 +#: ../../../library/datetime.rst:356 msgid "``t1 = t2 * i or t1 = i * t2``" msgstr "" -#: ../../../library/datetime.rst:350 +#: ../../../library/datetime.rst:356 msgid "" "Delta multiplied by an integer. Afterwards ``t1 // i == t2`` is true, " "provided ``i != 0``." msgstr "" -#: ../../../library/datetime.rst:354 +#: ../../../library/datetime.rst:360 msgid "In general, ``t1 * i == t1 * (i-1) + t1`` is true. (1)" msgstr "" -#: ../../../library/datetime.rst:357 +#: ../../../library/datetime.rst:363 msgid "``t1 = t2 * f or t1 = f * t2``" msgstr "" -#: ../../../library/datetime.rst:357 +#: ../../../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:361 +#: ../../../library/datetime.rst:367 msgid "``f = t2 / t3``" msgstr "" -#: ../../../library/datetime.rst:361 +#: ../../../library/datetime.rst:367 msgid "" "Division (3) of overall duration ``t2`` by interval unit ``t3``. Returns a :" "class:`float` object." msgstr "" -#: ../../../library/datetime.rst:365 +#: ../../../library/datetime.rst:371 msgid "``t1 = t2 / f or t1 = t2 / i``" msgstr "" -#: ../../../library/datetime.rst:365 +#: ../../../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:369 +#: ../../../library/datetime.rst:375 msgid "``t1 = t2 // i`` or ``t1 = t2 // t3``" msgstr "" -#: ../../../library/datetime.rst:369 +#: ../../../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:373 +#: ../../../library/datetime.rst:379 msgid "``t1 = t2 % t3``" msgstr "" -#: ../../../library/datetime.rst:373 +#: ../../../library/datetime.rst:379 msgid "The remainder is computed as a :class:`timedelta` object. (3)" msgstr "" -#: ../../../library/datetime.rst:376 +#: ../../../library/datetime.rst:382 msgid "``q, r = divmod(t1, t2)``" msgstr "" -#: ../../../library/datetime.rst:376 +#: ../../../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:381 +#: ../../../library/datetime.rst:387 msgid "``+t1``" msgstr "" -#: ../../../library/datetime.rst:381 +#: ../../../library/datetime.rst:387 msgid "Returns a :class:`timedelta` object with the same value. (2)" msgstr "" -#: ../../../library/datetime.rst:384 +#: ../../../library/datetime.rst:390 msgid "``-t1``" msgstr "" -#: ../../../library/datetime.rst:384 +#: ../../../library/datetime.rst:390 msgid "" "Equivalent to ``timedelta(-t1.days, -t1.seconds, -t1.microseconds)``, and to " "``t1 * -1``. (1)(4)" msgstr "" -#: ../../../library/datetime.rst:388 +#: ../../../library/datetime.rst:394 msgid "``abs(t)``" msgstr "" -#: ../../../library/datetime.rst:388 +#: ../../../library/datetime.rst:394 msgid "" "Equivalent to ``+t`` when ``t.days >= 0``, and to ``-t`` when ``t.days < " "0``. (2)" msgstr "" -#: ../../../library/datetime.rst:391 +#: ../../../library/datetime.rst:397 msgid "``str(t)``" msgstr "" -#: ../../../library/datetime.rst:391 +#: ../../../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:395 +#: ../../../library/datetime.rst:401 msgid "``repr(t)``" msgstr "" -#: ../../../library/datetime.rst:395 +#: ../../../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:400 ../../../library/datetime.rst:680 -#: ../../../library/datetime.rst:2779 +#: ../../../library/datetime.rst:406 ../../../library/datetime.rst:686 +#: ../../../library/datetime.rst:2798 msgid "Notes:" msgstr "" -#: ../../../library/datetime.rst:403 +#: ../../../library/datetime.rst:409 msgid "This is exact but may overflow." msgstr "" -#: ../../../library/datetime.rst:406 +#: ../../../library/datetime.rst:412 msgid "This is exact and cannot overflow." msgstr "" -#: ../../../library/datetime.rst:409 +#: ../../../library/datetime.rst:415 msgid "Division by zero raises :exc:`ZeroDivisionError`." msgstr "" -#: ../../../library/datetime.rst:412 +#: ../../../library/datetime.rst:418 msgid "``-timedelta.max`` is not representable as a :class:`timedelta` object." msgstr "" -#: ../../../library/datetime.rst:415 +#: ../../../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 +#: ../../../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:429 +#: ../../../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:433 +#: ../../../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 " @@ -641,105 +649,105 @@ msgid "" "timedelta` object by a :class:`float` object are now supported." msgstr "" -#: ../../../library/datetime.rst:439 +#: ../../../library/datetime.rst:445 msgid ":class:`timedelta` objects support equality and order comparisons." msgstr "" -#: ../../../library/datetime.rst:441 +#: ../../../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:444 ../../../library/datetime.rst:722 -#: ../../../library/datetime.rst:1362 ../../../library/datetime.rst:1991 +#: ../../../library/datetime.rst:450 ../../../library/datetime.rst:728 +#: ../../../library/datetime.rst:1368 ../../../library/datetime.rst:1997 msgid "Instance methods:" msgstr "" -#: ../../../library/datetime.rst:448 +#: ../../../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:452 +#: ../../../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:459 +#: ../../../library/datetime.rst:465 msgid "Examples of usage: :class:`!timedelta`" msgstr "" -#: ../../../library/datetime.rst:461 +#: ../../../library/datetime.rst:467 msgid "An additional example of normalization::" msgstr "" -#: ../../../library/datetime.rst:473 +#: ../../../library/datetime.rst:479 msgid "Examples of :class:`timedelta` arithmetic::" msgstr "" -#: ../../../library/datetime.rst:493 +#: ../../../library/datetime.rst:499 msgid ":class:`!date` objects" msgstr "" -#: ../../../library/datetime.rst:495 +#: ../../../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:499 +#: ../../../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:504 +#: ../../../library/datetime.rst:510 msgid "" "All arguments are required. Arguments must be integers, in the following " "ranges:" msgstr "" -#: ../../../library/datetime.rst:507 +#: ../../../library/datetime.rst:513 msgid "``MINYEAR <= year <= MAXYEAR``" msgstr "" -#: ../../../library/datetime.rst:508 +#: ../../../library/datetime.rst:514 msgid "``1 <= month <= 12``" msgstr "" -#: ../../../library/datetime.rst:509 +#: ../../../library/datetime.rst:515 msgid "``1 <= day <= number of days in the given month and year``" msgstr "" -#: ../../../library/datetime.rst:511 ../../../library/datetime.rst:943 +#: ../../../library/datetime.rst:517 ../../../library/datetime.rst:949 msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised." msgstr "" -#: ../../../library/datetime.rst:514 ../../../library/datetime.rst:949 +#: ../../../library/datetime.rst:520 ../../../library/datetime.rst:955 msgid "Other constructors, all class methods:" msgstr "" -#: ../../../library/datetime.rst:518 +#: ../../../library/datetime.rst:524 msgid "Return the current local date." msgstr "" -#: ../../../library/datetime.rst:520 +#: ../../../library/datetime.rst:526 msgid "This is equivalent to ``date.fromtimestamp(time.time())``." msgstr "" -#: ../../../library/datetime.rst:525 +#: ../../../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:528 +#: ../../../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:" @@ -749,7 +757,7 @@ msgid "" "ignored by :meth:`fromtimestamp`." msgstr "" -#: ../../../library/datetime.rst:535 +#: ../../../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` " @@ -757,74 +765,74 @@ msgid "" "`localtime` failure." msgstr "" -#: ../../../library/datetime.rst:541 ../../../library/datetime.rst:1037 -#: ../../../library/datetime.rst:1077 +#: ../../../library/datetime.rst:547 ../../../library/datetime.rst:1043 +#: ../../../library/datetime.rst:1083 msgid "Accepts any real number as *timestamp*, not only integer or float." msgstr "" -#: ../../../library/datetime.rst:547 +#: ../../../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:550 +#: ../../../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:557 +#: ../../../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:560 ../../../library/datetime.rst:1118 +#: ../../../library/datetime.rst:566 ../../../library/datetime.rst:1124 msgid "" "Reduced precision dates are not currently supported (``YYYY-MM``, ``YYYY``)." msgstr "" -#: ../../../library/datetime.rst:562 ../../../library/datetime.rst:1120 +#: ../../../library/datetime.rst:568 ../../../library/datetime.rst:1126 msgid "" "Extended date representations are not currently supported (``±YYYYYY-MM-" "DD``)." msgstr "" -#: ../../../library/datetime.rst:564 ../../../library/datetime.rst:1122 +#: ../../../library/datetime.rst:570 ../../../library/datetime.rst:1128 msgid "Ordinal dates are not currently supported (``YYYY-OOO``)." msgstr "" -#: ../../../library/datetime.rst:566 ../../../library/datetime.rst:1124 -#: ../../../library/datetime.rst:1600 +#: ../../../library/datetime.rst:572 ../../../library/datetime.rst:1130 +#: ../../../library/datetime.rst:1606 msgid "Examples::" msgstr "" -#: ../../../library/datetime.rst:577 +#: ../../../library/datetime.rst:583 msgid "Previously, this method only supported the format ``YYYY-MM-DD``." msgstr "" -#: ../../../library/datetime.rst:583 +#: ../../../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:591 +#: ../../../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:596 +#: ../../../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:603 +#: ../../../library/datetime.rst:609 msgid "" "If *format* specifies a day of month without a year a :exc:" "`DeprecationWarning` is emitted. This is to avoid a quadrennial leap year " @@ -835,53 +843,53 @@ msgid "" "year, explicitly add a year that is a leap year before parsing:" msgstr "" -#: ../../../library/datetime.rst:627 +#: ../../../library/datetime.rst:633 msgid "The earliest representable date, ``date(MINYEAR, 1, 1)``." msgstr "" -#: ../../../library/datetime.rst:632 +#: ../../../library/datetime.rst:638 msgid "The latest representable date, ``date(MAXYEAR, 12, 31)``." msgstr "" -#: ../../../library/datetime.rst:637 +#: ../../../library/datetime.rst:643 msgid "" "The smallest possible difference between non-equal date objects, " "``timedelta(days=1)``." msgstr "" -#: ../../../library/datetime.rst:645 ../../../library/datetime.rst:1221 +#: ../../../library/datetime.rst:651 ../../../library/datetime.rst:1227 msgid "Between :const:`MINYEAR` and :const:`MAXYEAR` inclusive." msgstr "" -#: ../../../library/datetime.rst:650 ../../../library/datetime.rst:1226 +#: ../../../library/datetime.rst:656 ../../../library/datetime.rst:1232 msgid "Between 1 and 12 inclusive." msgstr "" -#: ../../../library/datetime.rst:655 ../../../library/datetime.rst:1231 +#: ../../../library/datetime.rst:661 ../../../library/datetime.rst:1237 msgid "Between 1 and the number of days in the given month of the given year." msgstr "" -#: ../../../library/datetime.rst:663 +#: ../../../library/datetime.rst:669 msgid "``date2 = date1 + timedelta``" msgstr "" -#: ../../../library/datetime.rst:663 +#: ../../../library/datetime.rst:669 msgid "``date2`` will be ``timedelta.days`` days after ``date1``. (1)" msgstr "" -#: ../../../library/datetime.rst:666 +#: ../../../library/datetime.rst:672 msgid "``date2 = date1 - timedelta``" msgstr "" -#: ../../../library/datetime.rst:666 +#: ../../../library/datetime.rst:672 msgid "Computes ``date2`` such that ``date2 + timedelta == date1``. (2)" msgstr "" -#: ../../../library/datetime.rst:669 +#: ../../../library/datetime.rst:675 msgid "``timedelta = date1 - date2``" msgstr "" -#: ../../../library/datetime.rst:669 ../../../library/datetime.rst:1280 +#: ../../../library/datetime.rst:675 ../../../library/datetime.rst:1286 msgid "\\(3)" msgstr "" @@ -893,7 +901,7 @@ msgstr "" msgid "``date1 != date2``" msgstr "" -#: ../../../library/datetime.rst:671 ../../../library/datetime.rst:1282 +#: ../../../library/datetime.rst:677 ../../../library/datetime.rst:1288 msgid "Equality comparison. (4)" msgstr "" @@ -913,11 +921,11 @@ msgstr "" msgid "``date1 >= date2``" msgstr "" -#: ../../../library/datetime.rst:674 ../../../library/datetime.rst:1285 +#: ../../../library/datetime.rst:680 ../../../library/datetime.rst:1291 msgid "Order comparison. (5)" msgstr "" -#: ../../../library/datetime.rst:683 +#: ../../../library/datetime.rst:689 msgid "" "*date2* is moved forward in time if ``timedelta.days > 0``, or backward if " "``timedelta.days < 0``. Afterward ``date2 - date1 == timedelta.days``. " @@ -926,41 +934,41 @@ msgid "" "`MINYEAR` or larger than :const:`MAXYEAR`." msgstr "" -#: ../../../library/datetime.rst:690 +#: ../../../library/datetime.rst:696 msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored." msgstr "" -#: ../../../library/datetime.rst:693 +#: ../../../library/datetime.rst:699 msgid "" "This is exact, and cannot overflow. ``timedelta.seconds`` and ``timedelta." "microseconds`` are 0, and ``date2 + timedelta == date1`` after." msgstr "" -#: ../../../library/datetime.rst:697 +#: ../../../library/datetime.rst:703 msgid ":class:`date` objects are equal if they represent the same date." msgstr "" -#: ../../../library/datetime.rst:699 +#: ../../../library/datetime.rst:705 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:704 +#: ../../../library/datetime.rst:710 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:708 +#: ../../../library/datetime.rst:714 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:712 ../../../library/datetime.rst:1353 +#: ../../../library/datetime.rst:718 ../../../library/datetime.rst:1359 msgid "" "Comparison between :class:`.datetime` object and an instance of the :class:" "`date` subclass that is not a :class:`!datetime` subclass no longer converts " @@ -969,80 +977,80 @@ msgid "" "in subclasses." msgstr "" -#: ../../../library/datetime.rst:720 +#: ../../../library/datetime.rst:726 msgid "" "In Boolean contexts, all :class:`date` objects are considered to be true." msgstr "" -#: ../../../library/datetime.rst:726 +#: ../../../library/datetime.rst:732 msgid "" "Return a new :class:`date` object with the same values, but with specified " "parameters updated." msgstr "" -#: ../../../library/datetime.rst:729 ../../../library/datetime.rst:2037 +#: ../../../library/datetime.rst:735 ../../../library/datetime.rst:2043 msgid "Example::" msgstr "" -#: ../../../library/datetime.rst:736 +#: ../../../library/datetime.rst:742 msgid "" "The generic function :func:`copy.replace` also supports :class:`date` " "objects." msgstr "" -#: ../../../library/datetime.rst:742 ../../../library/datetime.rst:1478 +#: ../../../library/datetime.rst:748 ../../../library/datetime.rst:1484 msgid "" "Return a :class:`time.struct_time` such as returned by :func:`time." "localtime`." msgstr "" -#: ../../../library/datetime.rst:744 +#: ../../../library/datetime.rst:750 msgid "The hours, minutes and seconds are 0, and the DST flag is -1." msgstr "" -#: ../../../library/datetime.rst:746 ../../../library/datetime.rst:1480 +#: ../../../library/datetime.rst:752 ../../../library/datetime.rst:1486 msgid "``d.timetuple()`` is equivalent to::" msgstr "" -#: ../../../library/datetime.rst:750 +#: ../../../library/datetime.rst:756 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:756 +#: ../../../library/datetime.rst:762 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:763 +#: ../../../library/datetime.rst:769 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:770 +#: ../../../library/datetime.rst:776 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:777 +#: ../../../library/datetime.rst:783 msgid "" "Return a :term:`named tuple` object with three components: ``year``, " "``week`` and ``weekday``." msgstr "" -#: ../../../library/datetime.rst:780 +#: ../../../library/datetime.rst:786 msgid "" "The ISO calendar is a widely used variant of the Gregorian calendar. [#]_" msgstr "" -#: ../../../library/datetime.rst:782 +#: ../../../library/datetime.rst:788 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 " @@ -1051,41 +1059,41 @@ msgid "" "Gregorian year." msgstr "" -#: ../../../library/datetime.rst:787 +#: ../../../library/datetime.rst:793 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:796 +#: ../../../library/datetime.rst:802 msgid "Result changed from a tuple to a :term:`named tuple`." msgstr "" -#: ../../../library/datetime.rst:802 +#: ../../../library/datetime.rst:808 msgid "" "Return a string representing the date in ISO 8601 format, ``YYYY-MM-DD``::" msgstr "" -#: ../../../library/datetime.rst:811 +#: ../../../library/datetime.rst:817 msgid "For a date ``d``, ``str(d)`` is equivalent to ``d.isoformat()``." msgstr "" -#: ../../../library/datetime.rst:816 +#: ../../../library/datetime.rst:822 msgid "Return a string representing the date::" msgstr "" -#: ../../../library/datetime.rst:822 ../../../library/datetime.rst:1671 +#: ../../../library/datetime.rst:828 ../../../library/datetime.rst:1677 msgid "``d.ctime()`` is equivalent to::" msgstr "" -#: ../../../library/datetime.rst:826 +#: ../../../library/datetime.rst:832 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:833 +#: ../../../library/datetime.rst:839 msgid "" "Return a string representing the date, controlled by an explicit format " "string. Format codes referring to hours, minutes or seconds will see 0 " @@ -1093,7 +1101,7 @@ msgid "" "isoformat`." msgstr "" -#: ../../../library/datetime.rst:840 +#: ../../../library/datetime.rst:846 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 = datetime2``" msgstr "" -#: ../../../library/datetime.rst:1292 +#: ../../../library/datetime.rst:1298 msgid "" "``datetime2`` is a duration of ``timedelta`` removed from ``datetime1``, " "moving forward in time if ``timedelta.days > 0``, or backward if ``timedelta." @@ -1536,7 +1544,7 @@ msgid "" "adjustments are done even if the input is an aware object." msgstr "" -#: ../../../library/datetime.rst:1301 +#: ../../../library/datetime.rst:1307 msgid "" "Computes the ``datetime2`` such that ``datetime2 + timedelta == datetime1``. " "As for addition, the result has the same :attr:`~.datetime.tzinfo` attribute " @@ -1544,14 +1552,14 @@ msgid "" "input is aware." msgstr "" -#: ../../../library/datetime.rst:1306 +#: ../../../library/datetime.rst:1312 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:1310 +#: ../../../library/datetime.rst:1316 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 " @@ -1559,7 +1567,7 @@ msgid "" "datetime1``. No time zone adjustments are done in this case." msgstr "" -#: ../../../library/datetime.rst:1315 +#: ../../../library/datetime.rst:1321 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 " @@ -1568,17 +1576,17 @@ msgid "" "overflows." msgstr "" -#: ../../../library/datetime.rst:1321 +#: ../../../library/datetime.rst:1327 msgid "" ":class:`.datetime` objects are equal if they represent the same date and " "time, taking into account the time zone." msgstr "" -#: ../../../library/datetime.rst:1324 +#: ../../../library/datetime.rst:1330 msgid "Naive and aware :class:`.datetime` objects are never equal." msgstr "" -#: ../../../library/datetime.rst:1326 +#: ../../../library/datetime.rst:1332 msgid "" "If both comparands are aware, and have the same :attr:`!tzinfo` attribute, " "the :attr:`!tzinfo` and :attr:`~.datetime.fold` attributes are ignored and " @@ -1589,19 +1597,19 @@ msgid "" "interval are never equal to :class:`!datetime` instances in other time zone." msgstr "" -#: ../../../library/datetime.rst:1336 +#: ../../../library/datetime.rst:1342 msgid "" "*datetime1* is considered less than *datetime2* when *datetime1* precedes " "*datetime2* in time, taking into account the time zone." msgstr "" -#: ../../../library/datetime.rst:1339 +#: ../../../library/datetime.rst:1345 msgid "" "Order comparison between naive and aware :class:`.datetime` objects raises :" "exc:`TypeError`." msgstr "" -#: ../../../library/datetime.rst:1342 +#: ../../../library/datetime.rst:1348 msgid "" "If both comparands are aware, and have the same :attr:`!tzinfo` attribute, " "the :attr:`!tzinfo` and :attr:`~.datetime.fold` attributes are ignored and " @@ -1611,33 +1619,33 @@ msgid "" "implementation never overflows." msgstr "" -#: ../../../library/datetime.rst:1349 +#: ../../../library/datetime.rst:1355 msgid "" "Equality comparisons between aware and naive :class:`.datetime` instances " "don't raise :exc:`TypeError`." msgstr "" -#: ../../../library/datetime.rst:1366 +#: ../../../library/datetime.rst:1372 msgid "Return :class:`date` object with same year, month and day." msgstr "" -#: ../../../library/datetime.rst:1371 +#: ../../../library/datetime.rst:1377 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:1374 ../../../library/datetime.rst:1383 +#: ../../../library/datetime.rst:1380 ../../../library/datetime.rst:1389 msgid "The fold value is copied to the returned :class:`.time` object." msgstr "" -#: ../../../library/datetime.rst:1380 +#: ../../../library/datetime.rst:1386 msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond, " "fold, and tzinfo attributes. See also method :meth:`time`." msgstr "" -#: ../../../library/datetime.rst:1391 +#: ../../../library/datetime.rst:1397 msgid "" "Return a new :class:`datetime` object with the same attributes, but with " "specified parameters updated. Note that ``tzinfo=None`` can be specified to " @@ -1645,27 +1653,27 @@ msgid "" "and time data." msgstr "" -#: ../../../library/datetime.rst:1396 +#: ../../../library/datetime.rst:1402 msgid "" ":class:`.datetime` objects are also supported by generic function :func:" "`copy.replace`." msgstr "" -#: ../../../library/datetime.rst:1405 +#: ../../../library/datetime.rst:1411 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:1409 +#: ../../../library/datetime.rst:1415 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:1413 +#: ../../../library/datetime.rst:1419 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 " @@ -1673,7 +1681,7 @@ msgid "" "with the zone name and offset obtained from the OS." msgstr "" -#: ../../../library/datetime.rst:1418 +#: ../../../library/datetime.rst:1424 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 " @@ -1682,7 +1690,7 @@ msgid "" "date and time data as ``dt - dt.utcoffset()``." msgstr "" -#: ../../../library/datetime.rst:1424 +#: ../../../library/datetime.rst:1430 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." @@ -1691,56 +1699,56 @@ msgid "" "use ``dt.replace(tzinfo=None)``." msgstr "" -#: ../../../library/datetime.rst:1429 +#: ../../../library/datetime.rst:1435 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:1441 +#: ../../../library/datetime.rst:1447 msgid "*tz* now can be omitted." msgstr "" -#: ../../../library/datetime.rst:1444 +#: ../../../library/datetime.rst:1450 msgid "" "The :meth:`astimezone` method can now be called on naive instances that are " "presumed to represent system local time." msgstr "" -#: ../../../library/datetime.rst:1451 +#: ../../../library/datetime.rst:1457 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:1455 ../../../library/datetime.rst:2077 -#: ../../../library/datetime.rst:2186 ../../../library/datetime.rst:2431 -#: ../../../library/datetime.rst:2443 ../../../library/datetime.rst:2835 +#: ../../../library/datetime.rst:1461 ../../../library/datetime.rst:2083 +#: ../../../library/datetime.rst:2192 ../../../library/datetime.rst:2445 +#: ../../../library/datetime.rst:2457 ../../../library/datetime.rst:2854 msgid "The UTC offset is not restricted to a whole number of minutes." msgstr "" -#: ../../../library/datetime.rst:1461 +#: ../../../library/datetime.rst:1467 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:1465 ../../../library/datetime.rst:2087 -#: ../../../library/datetime.rst:2240 +#: ../../../library/datetime.rst:1471 ../../../library/datetime.rst:2093 +#: ../../../library/datetime.rst:2250 msgid "The DST offset is not restricted to a whole number of minutes." msgstr "" -#: ../../../library/datetime.rst:1471 +#: ../../../library/datetime.rst:1477 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 +#: ../../../library/datetime.rst:1492 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 :" @@ -1751,7 +1759,7 @@ msgid "" "to 0." msgstr "" -#: ../../../library/datetime.rst:1497 +#: ../../../library/datetime.rst:1503 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 " @@ -1759,7 +1767,7 @@ msgid "" "time." msgstr "" -#: ../../../library/datetime.rst:1501 +#: ../../../library/datetime.rst:1507 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 " @@ -1768,7 +1776,7 @@ msgid "" "and UTC adjustment spills over a year boundary." msgstr "" -#: ../../../library/datetime.rst:1510 +#: ../../../library/datetime.rst:1516 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 " @@ -1778,20 +1786,20 @@ msgid "" "meth:`.datetime.timetuple`." msgstr "" -#: ../../../library/datetime.rst:1520 +#: ../../../library/datetime.rst:1526 msgid "" "Return the proleptic Gregorian ordinal of the date. The same as ``self." "date().toordinal()``." msgstr "" -#: ../../../library/datetime.rst:1526 +#: ../../../library/datetime.rst:1532 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:1530 +#: ../../../library/datetime.rst:1536 msgid "" "Naive :class:`.datetime` instances are assumed to represent local time and " "this method relies on platform C functions to perform the conversion. Since :" @@ -1800,12 +1808,12 @@ msgid "" "exc:`OSError` for times far in the past or far in the future." msgstr "" -#: ../../../library/datetime.rst:1537 +#: ../../../library/datetime.rst:1543 msgid "" "For aware :class:`.datetime` instances, the return value is computed as::" msgstr "" -#: ../../../library/datetime.rst:1544 +#: ../../../library/datetime.rst:1550 msgid "" "There is no method to obtain the POSIX timestamp directly from a naive :" "class:`.datetime` instance representing UTC time. If your application uses " @@ -1813,157 +1821,157 @@ msgid "" "the POSIX timestamp by supplying ``tzinfo=timezone.utc``::" msgstr "" -#: ../../../library/datetime.rst:1552 +#: ../../../library/datetime.rst:1558 msgid "or by calculating the timestamp directly::" msgstr "" -#: ../../../library/datetime.rst:1558 +#: ../../../library/datetime.rst:1564 msgid "" "The :meth:`timestamp` method uses the :attr:`.fold` attribute to " "disambiguate the times during a repeated interval." msgstr "" -#: ../../../library/datetime.rst:1562 +#: ../../../library/datetime.rst:1568 msgid "" "This method no longer relies on the platform C :c:func:`mktime` function to " "perform conversions." msgstr "" -#: ../../../library/datetime.rst:1569 +#: ../../../library/datetime.rst:1575 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:1575 +#: ../../../library/datetime.rst:1581 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:1582 +#: ../../../library/datetime.rst:1588 msgid "" "Return a :term:`named tuple` with three components: ``year``, ``week`` and " "``weekday``. The same as ``self.date().isocalendar()``." msgstr "" -#: ../../../library/datetime.rst:1588 +#: ../../../library/datetime.rst:1594 msgid "Return a string representing the date and time in ISO 8601 format:" msgstr "" -#: ../../../library/datetime.rst:1590 +#: ../../../library/datetime.rst:1596 msgid "``YYYY-MM-DDTHH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "" -#: ../../../library/datetime.rst:1591 +#: ../../../library/datetime.rst:1597 msgid "``YYYY-MM-DDTHH:MM:SS``, if :attr:`microsecond` is 0" msgstr "" -#: ../../../library/datetime.rst:1593 +#: ../../../library/datetime.rst:1599 msgid "" "If :meth:`utcoffset` does not return ``None``, a string is appended, giving " "the UTC offset:" msgstr "" -#: ../../../library/datetime.rst:1596 +#: ../../../library/datetime.rst:1602 msgid "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` " "is not 0" msgstr "" -#: ../../../library/datetime.rst:1598 +#: ../../../library/datetime.rst:1604 msgid "" "``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0" msgstr "" -#: ../../../library/datetime.rst:1608 +#: ../../../library/datetime.rst:1614 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:1622 ../../../library/datetime.rst:2017 +#: ../../../library/datetime.rst:1628 ../../../library/datetime.rst:2023 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:1626 ../../../library/datetime.rst:2021 +#: ../../../library/datetime.rst:1632 ../../../library/datetime.rst:2027 msgid "" "``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as " "``'microseconds'`` otherwise." msgstr "" -#: ../../../library/datetime.rst:1628 ../../../library/datetime.rst:2023 +#: ../../../library/datetime.rst:1634 ../../../library/datetime.rst:2029 msgid "``'hours'``: Include the :attr:`hour` in the two-digit ``HH`` format." msgstr "" -#: ../../../library/datetime.rst:1629 ../../../library/datetime.rst:2024 +#: ../../../library/datetime.rst:1635 ../../../library/datetime.rst:2030 msgid "" "``'minutes'``: Include :attr:`hour` and :attr:`minute` in ``HH:MM`` format." msgstr "" -#: ../../../library/datetime.rst:1630 ../../../library/datetime.rst:2025 +#: ../../../library/datetime.rst:1636 ../../../library/datetime.rst:2031 msgid "" "``'seconds'``: Include :attr:`hour`, :attr:`minute`, and :attr:`second` in " "``HH:MM:SS`` format." msgstr "" -#: ../../../library/datetime.rst:1632 ../../../library/datetime.rst:2027 +#: ../../../library/datetime.rst:1638 ../../../library/datetime.rst:2033 msgid "" "``'milliseconds'``: Include full time, but truncate fractional second part " "to milliseconds. ``HH:MM:SS.sss`` format." msgstr "" -#: ../../../library/datetime.rst:1634 ../../../library/datetime.rst:2029 +#: ../../../library/datetime.rst:1640 ../../../library/datetime.rst:2035 msgid "``'microseconds'``: Include full time in ``HH:MM:SS.ffffff`` format." msgstr "" -#: ../../../library/datetime.rst:1638 ../../../library/datetime.rst:2033 +#: ../../../library/datetime.rst:1644 ../../../library/datetime.rst:2039 msgid "Excluded time components are truncated, not rounded." msgstr "" -#: ../../../library/datetime.rst:1640 +#: ../../../library/datetime.rst:1646 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument::" msgstr "" -#: ../../../library/datetime.rst:1650 ../../../library/datetime.rst:2048 +#: ../../../library/datetime.rst:1656 ../../../library/datetime.rst:2054 msgid "Added the *timespec* parameter." msgstr "" -#: ../../../library/datetime.rst:1656 +#: ../../../library/datetime.rst:1662 msgid "" "For a :class:`.datetime` instance ``d``, ``str(d)`` is equivalent to ``d." "isoformat(' ')``." msgstr "" -#: ../../../library/datetime.rst:1662 +#: ../../../library/datetime.rst:1668 msgid "Return a string representing the date and time::" msgstr "" -#: ../../../library/datetime.rst:1668 +#: ../../../library/datetime.rst:1674 msgid "" "The output string will *not* include time zone information, regardless of " "whether the input is aware or naive." msgstr "" -#: ../../../library/datetime.rst:1675 +#: ../../../library/datetime.rst:1681 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:1682 +#: ../../../library/datetime.rst:1688 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:1689 +#: ../../../library/datetime.rst:1695 msgid "" "Same as :meth:`.datetime.strftime`. This makes it possible to specify a " "format string for a :class:`.datetime` object in :ref:`formatted string " @@ -1971,82 +1979,82 @@ msgid "" "`strftime-strptime-behavior` and :meth:`datetime.isoformat`." msgstr "" -#: ../../../library/datetime.rst:1696 +#: ../../../library/datetime.rst:1702 msgid "Examples of usage: :class:`!datetime`" msgstr "" -#: ../../../library/datetime.rst:1698 +#: ../../../library/datetime.rst:1704 msgid "Examples of working with :class:`.datetime` objects:" msgstr "" -#: ../../../library/datetime.rst:1751 +#: ../../../library/datetime.rst:1757 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:1798 +#: ../../../library/datetime.rst:1804 msgid "Usage of ``KabulTz`` from above::" msgstr "" -#: ../../../library/datetime.rst:1825 +#: ../../../library/datetime.rst:1831 msgid ":class:`!time` objects" msgstr "" -#: ../../../library/datetime.rst:1827 +#: ../../../library/datetime.rst:1833 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:1832 +#: ../../../library/datetime.rst:1838 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:1842 +#: ../../../library/datetime.rst:1848 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:1851 +#: ../../../library/datetime.rst:1857 msgid "The earliest representable :class:`.time`, ``time(0, 0, 0, 0)``." msgstr "" -#: ../../../library/datetime.rst:1856 +#: ../../../library/datetime.rst:1862 msgid "The latest representable :class:`.time`, ``time(23, 59, 59, 999999)``." msgstr "" -#: ../../../library/datetime.rst:1861 +#: ../../../library/datetime.rst:1867 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:1890 +#: ../../../library/datetime.rst:1896 msgid "" "The object passed as the tzinfo argument to the :class:`.time` constructor, " "or ``None`` if none was passed." msgstr "" -#: ../../../library/datetime.rst:1905 +#: ../../../library/datetime.rst:1911 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:1908 +#: ../../../library/datetime.rst:1914 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:1912 +#: ../../../library/datetime.rst:1918 msgid "" "If both comparands are aware, and have the same :attr:`~.time.tzinfo` " "attribute, the :attr:`!tzinfo` and :attr:`!fold` attributes are ignored and " @@ -2055,18 +2063,18 @@ msgid "" "subtracting their UTC offsets (obtained from ``self.utcoffset()``)." msgstr "" -#: ../../../library/datetime.rst:1918 +#: ../../../library/datetime.rst:1924 msgid "" "Equality comparisons between aware and naive :class:`.time` instances don't " "raise :exc:`TypeError`." msgstr "" -#: ../../../library/datetime.rst:1922 +#: ../../../library/datetime.rst:1928 msgid "" "In Boolean contexts, a :class:`.time` object is always considered to be true." msgstr "" -#: ../../../library/datetime.rst:1924 +#: ../../../library/datetime.rst:1930 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-" @@ -2074,51 +2082,51 @@ msgid "" "information." msgstr "" -#: ../../../library/datetime.rst:1931 +#: ../../../library/datetime.rst:1937 msgid "Other constructors:" msgstr "" -#: ../../../library/datetime.rst:1935 +#: ../../../library/datetime.rst:1941 msgid "" "Return a :class:`.time` corresponding to a *time_string* in any valid ISO " "8601 format, with the following exceptions:" msgstr "" -#: ../../../library/datetime.rst:1939 +#: ../../../library/datetime.rst:1945 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:1941 +#: ../../../library/datetime.rst:1947 msgid "" "Fractional seconds may have any number of digits (anything beyond 6 will be " "truncated)." msgstr "" -#: ../../../library/datetime.rst:1945 +#: ../../../library/datetime.rst:1951 msgid "Examples:" msgstr "" -#: ../../../library/datetime.rst:1969 +#: ../../../library/datetime.rst:1975 msgid "" "Previously, this method only supported formats that could be emitted by :" "meth:`time.isoformat`." msgstr "" -#: ../../../library/datetime.rst:1976 +#: ../../../library/datetime.rst:1982 msgid "" "Return a :class:`.time` corresponding to *date_string*, parsed according to " "*format*." msgstr "" -#: ../../../library/datetime.rst:1979 +#: ../../../library/datetime.rst:1985 msgid "" "If *format* does not contain microseconds or timezone information, this is " "equivalent to::" msgstr "" -#: ../../../library/datetime.rst:1983 +#: ../../../library/datetime.rst:1989 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 " @@ -2126,7 +2134,7 @@ msgid "" "fromisoformat`." msgstr "" -#: ../../../library/datetime.rst:1996 +#: ../../../library/datetime.rst:2002 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 " @@ -2134,52 +2142,52 @@ msgid "" "time data." msgstr "" -#: ../../../library/datetime.rst:2001 +#: ../../../library/datetime.rst:2007 msgid "" ":class:`.time` objects are also supported by generic function :func:`copy." "replace`." msgstr "" -#: ../../../library/datetime.rst:2010 +#: ../../../library/datetime.rst:2016 msgid "Return a string representing the time in ISO 8601 format, one of:" msgstr "" -#: ../../../library/datetime.rst:2012 +#: ../../../library/datetime.rst:2018 msgid "``HH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "" -#: ../../../library/datetime.rst:2013 +#: ../../../library/datetime.rst:2019 msgid "``HH:MM:SS``, if :attr:`microsecond` is 0" msgstr "" -#: ../../../library/datetime.rst:2014 +#: ../../../library/datetime.rst:2020 msgid "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :meth:`utcoffset` does not " "return ``None``" msgstr "" -#: ../../../library/datetime.rst:2015 +#: ../../../library/datetime.rst:2021 msgid "" "``HH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0 and :meth:" "`utcoffset` does not return ``None``" msgstr "" -#: ../../../library/datetime.rst:2035 +#: ../../../library/datetime.rst:2041 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument." msgstr "" -#: ../../../library/datetime.rst:2054 +#: ../../../library/datetime.rst:2060 msgid "For a time ``t``, ``str(t)`` is equivalent to ``t.isoformat()``." msgstr "" -#: ../../../library/datetime.rst:2059 +#: ../../../library/datetime.rst:2065 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:2065 +#: ../../../library/datetime.rst:2071 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 ` file there are some examples of :class:`tzinfo` classes:" msgstr "" -#: ../../../library/datetime.rst:2323 +#: ../../../library/datetime.rst:2335 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 " @@ -2448,7 +2456,7 @@ msgid "" "ends the minute after 1:59 (EDT) on the first Sunday in November::" msgstr "" -#: ../../../library/datetime.rst:2337 +#: ../../../library/datetime.rst:2349 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, " @@ -2457,7 +2465,7 @@ msgid "" "get::" msgstr "" -#: ../../../library/datetime.rst:2356 +#: ../../../library/datetime.rst:2368 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 " @@ -2472,13 +2480,13 @@ msgid "" "Fall back transition of 2016, we get::" msgstr "" -#: ../../../library/datetime.rst:2378 +#: ../../../library/datetime.rst:2392 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:2381 +#: ../../../library/datetime.rst:2395 msgid "" "Applications that can't bear wall-time ambiguities should explicitly check " "the value of the :attr:`~.datetime.fold` attribute or avoid using hybrid :" @@ -2488,28 +2496,28 @@ msgid "" "offset -4 hours))." msgstr "" -#: ../../../library/datetime.rst:2389 +#: ../../../library/datetime.rst:2403 msgid ":mod:`zoneinfo`" msgstr "" -#: ../../../library/datetime.rst:2390 +#: ../../../library/datetime.rst:2404 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:2394 +#: ../../../library/datetime.rst:2408 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:2397 +#: ../../../library/datetime.rst:2411 msgid "`IANA time zone database `_" msgstr "" -#: ../../../library/datetime.rst:2398 +#: ../../../library/datetime.rst:2412 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 " @@ -2518,24 +2526,24 @@ msgid "" "saving rules." msgstr "" -#: ../../../library/datetime.rst:2408 +#: ../../../library/datetime.rst:2422 msgid ":class:`!timezone` objects" msgstr "" -#: ../../../library/datetime.rst:2410 +#: ../../../library/datetime.rst:2424 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:2414 +#: ../../../library/datetime.rst:2428 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:2421 +#: ../../../library/datetime.rst:2435 msgid "" "The *offset* argument must be specified as a :class:`timedelta` object " "representing the difference between the local time and UTC. It must be " @@ -2543,25 +2551,25 @@ msgid "" "otherwise :exc:`ValueError` is raised." msgstr "" -#: ../../../library/datetime.rst:2426 +#: ../../../library/datetime.rst:2440 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:2437 ../../../library/datetime.rst:2449 +#: ../../../library/datetime.rst:2451 ../../../library/datetime.rst:2463 msgid "" "Return the fixed value specified when the :class:`timezone` instance is " "constructed." msgstr "" -#: ../../../library/datetime.rst:2440 +#: ../../../library/datetime.rst:2454 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:2452 +#: ../../../library/datetime.rst:2466 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 " @@ -2570,131 +2578,131 @@ msgid "" "are two digits of ``offset.hours`` and ``offset.minutes`` respectively." msgstr "" -#: ../../../library/datetime.rst:2458 +#: ../../../library/datetime.rst:2472 msgid "" "Name generated from ``offset=timedelta(0)`` is now plain ``'UTC'``, not " "``'UTC+00:00'``." msgstr "" -#: ../../../library/datetime.rst:2465 +#: ../../../library/datetime.rst:2479 msgid "Always returns ``None``." msgstr "" -#: ../../../library/datetime.rst:2470 +#: ../../../library/datetime.rst:2484 msgid "" "Return ``dt + offset``. The *dt* argument must be an aware :class:`." "datetime` instance, with ``tzinfo`` set to ``self``." msgstr "" -#: ../../../library/datetime.rst:2478 +#: ../../../library/datetime.rst:2492 msgid "The UTC time zone, ``timezone(timedelta(0))``." msgstr "" -#: ../../../library/datetime.rst:2487 +#: ../../../library/datetime.rst:2501 msgid ":meth:`!strftime` and :meth:`!strptime` behavior" msgstr "" -#: ../../../library/datetime.rst:2489 +#: ../../../library/datetime.rst:2503 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:2493 +#: ../../../library/datetime.rst:2507 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:2497 +#: ../../../library/datetime.rst:2511 msgid "" "The table below provides a high-level comparison of :meth:`~.datetime." "strftime` versus :meth:`~.datetime.strptime`:" msgstr "" -#: ../../../library/datetime.rst:2501 +#: ../../../library/datetime.rst:2515 msgid "``strftime``" msgstr "" -#: ../../../library/datetime.rst:2501 +#: ../../../library/datetime.rst:2515 msgid "``strptime``" msgstr "" -#: ../../../library/datetime.rst:2503 +#: ../../../library/datetime.rst:2517 msgid "Usage" msgstr "" -#: ../../../library/datetime.rst:2503 +#: ../../../library/datetime.rst:2517 msgid "Convert object to a string according to a given format" msgstr "" -#: ../../../library/datetime.rst:2503 +#: ../../../library/datetime.rst:2517 msgid "Parse a string into an object given a corresponding format" msgstr "" -#: ../../../library/datetime.rst:2505 +#: ../../../library/datetime.rst:2519 msgid "Type of method" msgstr "" -#: ../../../library/datetime.rst:2505 +#: ../../../library/datetime.rst:2519 msgid "Instance method" msgstr "" -#: ../../../library/datetime.rst:2505 +#: ../../../library/datetime.rst:2519 msgid "Class method" msgstr "" -#: ../../../library/datetime.rst:2507 +#: ../../../library/datetime.rst:2521 msgid "Signature" msgstr "" -#: ../../../library/datetime.rst:2507 +#: ../../../library/datetime.rst:2521 msgid "``strftime(format)``" msgstr "" -#: ../../../library/datetime.rst:2507 +#: ../../../library/datetime.rst:2521 msgid "``strptime(date_string, format)``" msgstr "" -#: ../../../library/datetime.rst:2514 +#: ../../../library/datetime.rst:2528 msgid ":meth:`!strftime` and :meth:`!strptime` format codes" msgstr "" -#: ../../../library/datetime.rst:2516 +#: ../../../library/datetime.rst:2530 msgid "" "These methods accept format codes that can be used to parse and format " "dates::" msgstr "" -#: ../../../library/datetime.rst:2524 +#: ../../../library/datetime.rst:2539 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:2528 ../../../library/datetime.rst:2680 +#: ../../../library/datetime.rst:2543 ../../../library/datetime.rst:2698 msgid "Directive" msgstr "" -#: ../../../library/datetime.rst:2528 ../../../library/datetime.rst:2680 +#: ../../../library/datetime.rst:2543 ../../../library/datetime.rst:2698 msgid "Meaning" msgstr "" -#: ../../../library/datetime.rst:2528 ../../../library/datetime.rst:2680 +#: ../../../library/datetime.rst:2543 ../../../library/datetime.rst:2698 msgid "Example" msgstr "" -#: ../../../library/datetime.rst:2528 ../../../library/datetime.rst:2680 +#: ../../../library/datetime.rst:2543 ../../../library/datetime.rst:2698 msgid "Notes" msgstr "" -#: ../../../library/datetime.rst:2531 +#: ../../../library/datetime.rst:2546 msgid "``%a``" msgstr "" -#: ../../../library/datetime.rst:2531 +#: ../../../library/datetime.rst:2546 msgid "Weekday as locale's abbreviated name." msgstr "" @@ -2706,11 +2714,11 @@ msgstr "" msgid "So, Mo, ..., Sa (de_DE)" msgstr "" -#: ../../../library/datetime.rst:2536 +#: ../../../library/datetime.rst:2551 msgid "``%A``" msgstr "" -#: ../../../library/datetime.rst:2536 +#: ../../../library/datetime.rst:2551 msgid "Weekday as locale's full name." msgstr "" @@ -2722,11 +2730,11 @@ msgstr "" msgid "Sonntag, Montag, ..., Samstag (de_DE)" msgstr "" -#: ../../../library/datetime.rst:2541 +#: ../../../library/datetime.rst:2556 msgid "``%b``" msgstr "" -#: ../../../library/datetime.rst:2541 +#: ../../../library/datetime.rst:2556 msgid "Month as locale's abbreviated name." msgstr "" @@ -2738,11 +2746,11 @@ msgstr "" msgid "Jan, Feb, ..., Dez (de_DE)" msgstr "" -#: ../../../library/datetime.rst:2546 +#: ../../../library/datetime.rst:2561 msgid "``%B``" msgstr "" -#: ../../../library/datetime.rst:2546 +#: ../../../library/datetime.rst:2561 msgid "Month as locale's full name." msgstr "" @@ -2754,11 +2762,11 @@ msgstr "" msgid "Januar, Februar, ..., Dezember (de_DE)" msgstr "" -#: ../../../library/datetime.rst:2551 +#: ../../../library/datetime.rst:2566 msgid "``%c``" msgstr "" -#: ../../../library/datetime.rst:2551 +#: ../../../library/datetime.rst:2566 msgid "Locale's appropriate date and time representation." msgstr "" @@ -2770,198 +2778,199 @@ msgstr "" msgid "Di 16 Aug 21:30:00 1988 (de_DE)" msgstr "" -#: ../../../library/datetime.rst:2556 +#: ../../../library/datetime.rst:2571 msgid "``%C``" msgstr "" -#: ../../../library/datetime.rst:2556 +#: ../../../library/datetime.rst:2571 msgid "" "The year divided by 100 and truncated to an integer as a zero-padded decimal " "number." msgstr "" -#: ../../../library/datetime.rst:2556 +#: ../../../library/datetime.rst:2571 msgid "01, 02, ..., 99" msgstr "" -#: ../../../library/datetime.rst:2556 ../../../library/datetime.rst:2572 -#: ../../../library/datetime.rst:2582 ../../../library/datetime.rst:2599 -#: ../../../library/datetime.rst:2613 +#: ../../../library/datetime.rst:2571 ../../../library/datetime.rst:2587 +#: ../../../library/datetime.rst:2597 msgid "\\(0)" msgstr "" -#: ../../../library/datetime.rst:2560 +#: ../../../library/datetime.rst:2575 msgid "``%d``" msgstr "" -#: ../../../library/datetime.rst:2560 +#: ../../../library/datetime.rst:2575 msgid "Day of the month as a zero-padded decimal number." msgstr "" -#: ../../../library/datetime.rst:2560 +#: ../../../library/datetime.rst:2575 msgid "01, 02, ..., 31" msgstr "" -#: ../../../library/datetime.rst:2560 ../../../library/datetime.rst:2563 -#: ../../../library/datetime.rst:2584 ../../../library/datetime.rst:2587 -#: ../../../library/datetime.rst:2590 ../../../library/datetime.rst:2593 -#: ../../../library/datetime.rst:2596 ../../../library/datetime.rst:2655 +#: ../../../library/datetime.rst:2575 ../../../library/datetime.rst:2578 +#: ../../../library/datetime.rst:2599 ../../../library/datetime.rst:2602 +#: ../../../library/datetime.rst:2605 ../../../library/datetime.rst:2608 +#: ../../../library/datetime.rst:2611 ../../../library/datetime.rst:2673 msgid "\\(9)" msgstr "" -#: ../../../library/datetime.rst:2563 +#: ../../../library/datetime.rst:2578 msgid "``%D``" msgstr "" -#: ../../../library/datetime.rst:2563 +#: ../../../library/datetime.rst:2578 msgid "Equivalent to ``%m/%d/%y``." msgstr "" -#: ../../../library/datetime.rst:2563 +#: ../../../library/datetime.rst:2578 msgid "11/28/25" msgstr "" -#: ../../../library/datetime.rst:2566 +#: ../../../library/datetime.rst:2581 msgid "``%e``" msgstr "" -#: ../../../library/datetime.rst:2566 +#: ../../../library/datetime.rst:2581 msgid "The day of the month as a space-padded decimal number." msgstr "" -#: ../../../library/datetime.rst:2566 +#: ../../../library/datetime.rst:2581 msgid "␣1, ␣2, ..., 31" msgstr "" -#: ../../../library/datetime.rst:2569 +#: ../../../library/datetime.rst:2584 msgid "``%F``" msgstr "" -#: ../../../library/datetime.rst:2569 +#: ../../../library/datetime.rst:2584 msgid "Equivalent to ``%Y-%m-%d``, the ISO 8601 format." msgstr "" -#: ../../../library/datetime.rst:2569 +#: ../../../library/datetime.rst:2584 msgid "2025-10-11, 1001-12-30" msgstr "" -#: ../../../library/datetime.rst:2572 +#: ../../../library/datetime.rst:2587 msgid "``%g``" msgstr "" -#: ../../../library/datetime.rst:2572 +#: ../../../library/datetime.rst:2587 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:2572 ../../../library/datetime.rst:2655 +#: ../../../library/datetime.rst:2587 ../../../library/datetime.rst:2673 msgid "00, 01, ..., 99" msgstr "" -#: ../../../library/datetime.rst:2577 +#: ../../../library/datetime.rst:2592 msgid "``%G``" msgstr "" -#: ../../../library/datetime.rst:2577 +#: ../../../library/datetime.rst:2592 msgid "" "ISO 8601 year with century representing the year that contains the greater " "part of the ISO week (``%V``)." msgstr "" -#: ../../../library/datetime.rst:2577 ../../../library/datetime.rst:2658 +#: ../../../library/datetime.rst:2592 ../../../library/datetime.rst:2676 msgid "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" msgstr "" -#: ../../../library/datetime.rst:2577 +#: ../../../library/datetime.rst:2592 msgid "\\(8)" msgstr "" -#: ../../../library/datetime.rst:2582 +#: ../../../library/datetime.rst:2597 msgid "``%h``" msgstr "" -#: ../../../library/datetime.rst:2582 +#: ../../../library/datetime.rst:2597 msgid "Equivalent to ``%b``." msgstr "" -#: ../../../library/datetime.rst:2582 +#: ../../../library/datetime.rst:2597 msgid "See ``%b``." msgstr "" -#: ../../../library/datetime.rst:2584 +#: ../../../library/datetime.rst:2599 msgid "``%H``" msgstr "" -#: ../../../library/datetime.rst:2584 +#: ../../../library/datetime.rst:2599 msgid "Hour (24-hour clock) as a zero-padded decimal number." msgstr "" -#: ../../../library/datetime.rst:2584 +#: ../../../library/datetime.rst:2599 msgid "00, 01, ..., 23" msgstr "" -#: ../../../library/datetime.rst:2587 +#: ../../../library/datetime.rst:2602 msgid "``%I``" msgstr "" -#: ../../../library/datetime.rst:2587 +#: ../../../library/datetime.rst:2602 msgid "Hour (12-hour clock) as a zero-padded decimal number." msgstr "" -#: ../../../library/datetime.rst:2587 ../../../library/datetime.rst:2593 +#: ../../../library/datetime.rst:2602 ../../../library/datetime.rst:2608 msgid "01, 02, ..., 12" msgstr "" -#: ../../../library/datetime.rst:2590 +#: ../../../library/datetime.rst:2605 msgid "``%j``" msgstr "" -#: ../../../library/datetime.rst:2590 +#: ../../../library/datetime.rst:2605 msgid "Day of the year as a zero-padded decimal number." msgstr "" -#: ../../../library/datetime.rst:2590 +#: ../../../library/datetime.rst:2605 msgid "001, 002, ..., 366" msgstr "" -#: ../../../library/datetime.rst:2593 +#: ../../../library/datetime.rst:2608 msgid "``%m``" msgstr "" -#: ../../../library/datetime.rst:2593 +#: ../../../library/datetime.rst:2608 msgid "Month as a zero-padded decimal number." msgstr "" -#: ../../../library/datetime.rst:2596 +#: ../../../library/datetime.rst:2611 msgid "``%M``" msgstr "" -#: ../../../library/datetime.rst:2596 +#: ../../../library/datetime.rst:2611 msgid "Minute as a zero-padded decimal number." msgstr "" -#: ../../../library/datetime.rst:2596 ../../../library/datetime.rst:2610 +#: ../../../library/datetime.rst:2611 ../../../library/datetime.rst:2627 msgid "00, 01, ..., 59" msgstr "" -#: ../../../library/datetime.rst:2599 +#: ../../../library/datetime.rst:2614 msgid "``%n``" msgstr "" -#: ../../../library/datetime.rst:2599 -msgid "The newline character (``'\\n'``)." +#: ../../../library/datetime.rst:2614 +msgid "" +"The newline character (``'\\n'``). For :meth:`!strptime`, zero or more " +"whitespace." msgstr "" -#: ../../../library/datetime.rst:2599 +#: ../../../library/datetime.rst:2614 msgid "``\\n``" msgstr "" -#: ../../../library/datetime.rst:2602 +#: ../../../library/datetime.rst:2619 msgid "``%p``" msgstr "" -#: ../../../library/datetime.rst:2602 +#: ../../../library/datetime.rst:2619 msgid "Locale's equivalent of either AM or PM." msgstr "" @@ -2973,151 +2982,153 @@ msgstr "" msgid "am, pm (de_DE)" msgstr "" -#: ../../../library/datetime.rst:2602 +#: ../../../library/datetime.rst:2619 msgid "\\(1), \\(3)" msgstr "" -#: ../../../library/datetime.rst:2605 +#: ../../../library/datetime.rst:2622 msgid "``%r``" msgstr "" -#: ../../../library/datetime.rst:2605 +#: ../../../library/datetime.rst:2622 msgid "Locale's 12-hour clock time." msgstr "" -#: ../../../library/datetime.rst:2605 +#: ../../../library/datetime.rst:2622 msgid "12:00:00 AM" msgstr "" -#: ../../../library/datetime.rst:2605 +#: ../../../library/datetime.rst:2622 msgid "\\(1), \\(0)" msgstr "" -#: ../../../library/datetime.rst:2608 +#: ../../../library/datetime.rst:2625 msgid "``%R``" msgstr "" -#: ../../../library/datetime.rst:2608 +#: ../../../library/datetime.rst:2625 msgid "Equivalent to ``%H:%M``." msgstr "" -#: ../../../library/datetime.rst:2608 +#: ../../../library/datetime.rst:2625 msgid "10:01" msgstr "" -#: ../../../library/datetime.rst:2610 +#: ../../../library/datetime.rst:2627 msgid "``%S``" msgstr "" -#: ../../../library/datetime.rst:2610 +#: ../../../library/datetime.rst:2627 msgid "Second as a zero-padded decimal number." msgstr "" -#: ../../../library/datetime.rst:2610 +#: ../../../library/datetime.rst:2627 msgid "\\(4), \\(9)" msgstr "" -#: ../../../library/datetime.rst:2613 +#: ../../../library/datetime.rst:2630 msgid "``%t``" msgstr "" -#: ../../../library/datetime.rst:2613 -msgid "The tab character (``'\\t'``)." +#: ../../../library/datetime.rst:2630 +msgid "" +"The tab character (``'\\t'``). For :meth:`!strptime`, zero or more " +"whitespace." msgstr "" -#: ../../../library/datetime.rst:2613 +#: ../../../library/datetime.rst:2630 msgid "``\\t``" msgstr "" -#: ../../../library/datetime.rst:2616 +#: ../../../library/datetime.rst:2634 msgid "``%T``" msgstr "" -#: ../../../library/datetime.rst:2616 +#: ../../../library/datetime.rst:2634 msgid "ISO 8601 time format, equivalent to ``%H:%M:%S``." msgstr "" -#: ../../../library/datetime.rst:2616 +#: ../../../library/datetime.rst:2634 msgid "10:01:59" msgstr "" -#: ../../../library/datetime.rst:2619 +#: ../../../library/datetime.rst:2637 msgid "``%u``" msgstr "" -#: ../../../library/datetime.rst:2619 +#: ../../../library/datetime.rst:2637 msgid "ISO 8601 weekday as a decimal number where 1 is Monday." msgstr "" -#: ../../../library/datetime.rst:2619 +#: ../../../library/datetime.rst:2637 msgid "1, 2, ..., 7" msgstr "" -#: ../../../library/datetime.rst:2622 +#: ../../../library/datetime.rst:2640 msgid "``%U``" msgstr "" -#: ../../../library/datetime.rst:2622 +#: ../../../library/datetime.rst:2640 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:2622 ../../../library/datetime.rst:2640 +#: ../../../library/datetime.rst:2640 ../../../library/datetime.rst:2658 msgid "00, 01, ..., 53" msgstr "" -#: ../../../library/datetime.rst:2622 ../../../library/datetime.rst:2640 +#: ../../../library/datetime.rst:2640 ../../../library/datetime.rst:2658 msgid "\\(7), \\(9)" msgstr "" -#: ../../../library/datetime.rst:2630 +#: ../../../library/datetime.rst:2648 msgid "``%V``" msgstr "" -#: ../../../library/datetime.rst:2630 +#: ../../../library/datetime.rst:2648 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:2630 +#: ../../../library/datetime.rst:2648 msgid "01, 02, ..., 53" msgstr "" -#: ../../../library/datetime.rst:2630 +#: ../../../library/datetime.rst:2648 msgid "\\(8), \\(9)" msgstr "" -#: ../../../library/datetime.rst:2636 +#: ../../../library/datetime.rst:2654 msgid "``%w``" msgstr "" -#: ../../../library/datetime.rst:2636 +#: ../../../library/datetime.rst:2654 msgid "Weekday as a decimal number, where 0 is Sunday and 6 is Saturday." msgstr "" -#: ../../../library/datetime.rst:2636 +#: ../../../library/datetime.rst:2654 msgid "0, 1, ..., 6" msgstr "" -#: ../../../library/datetime.rst:2640 +#: ../../../library/datetime.rst:2658 msgid "``%W``" msgstr "" -#: ../../../library/datetime.rst:2640 +#: ../../../library/datetime.rst:2658 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:2648 +#: ../../../library/datetime.rst:2666 msgid "``%x``" msgstr "" -#: ../../../library/datetime.rst:2648 +#: ../../../library/datetime.rst:2666 msgid "Locale's appropriate date representation." msgstr "" @@ -3133,11 +3144,11 @@ msgstr "" msgid "16.08.1988 (de_DE)" msgstr "" -#: ../../../library/datetime.rst:2652 +#: ../../../library/datetime.rst:2670 msgid "``%X``" msgstr "" -#: ../../../library/datetime.rst:2652 +#: ../../../library/datetime.rst:2670 msgid "Locale's appropriate time representation." msgstr "" @@ -3149,66 +3160,66 @@ msgstr "" msgid "21:30:00 (de_DE)" msgstr "" -#: ../../../library/datetime.rst:2655 +#: ../../../library/datetime.rst:2673 msgid "``%y``" msgstr "" -#: ../../../library/datetime.rst:2655 +#: ../../../library/datetime.rst:2673 msgid "Year without century as a zero-padded decimal number." msgstr "" -#: ../../../library/datetime.rst:2658 +#: ../../../library/datetime.rst:2676 msgid "``%Y``" msgstr "" -#: ../../../library/datetime.rst:2658 +#: ../../../library/datetime.rst:2676 msgid "Year with century as a decimal number." msgstr "" -#: ../../../library/datetime.rst:2661 ../../../library/datetime.rst:2823 +#: ../../../library/datetime.rst:2679 ../../../library/datetime.rst:2842 msgid "``%z``" msgstr "" -#: ../../../library/datetime.rst:2661 +#: ../../../library/datetime.rst:2679 msgid "" "UTC offset in the form ``±HHMM[SS[.ffffff]]`` (empty string if the object is " "naive)." msgstr "" -#: ../../../library/datetime.rst:2661 +#: ../../../library/datetime.rst:2679 msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" msgstr "" -#: ../../../library/datetime.rst:2661 ../../../library/datetime.rst:2666 -#: ../../../library/datetime.rst:2686 +#: ../../../library/datetime.rst:2679 ../../../library/datetime.rst:2684 +#: ../../../library/datetime.rst:2704 msgid "\\(6)" msgstr "" -#: ../../../library/datetime.rst:2666 ../../../library/datetime.rst:2855 +#: ../../../library/datetime.rst:2684 ../../../library/datetime.rst:2874 msgid "``%Z``" msgstr "" -#: ../../../library/datetime.rst:2666 +#: ../../../library/datetime.rst:2684 msgid "Time zone name (empty string if the object is naive)." msgstr "" -#: ../../../library/datetime.rst:2666 +#: ../../../library/datetime.rst:2684 msgid "(empty), UTC, GMT" msgstr "" -#: ../../../library/datetime.rst:2669 +#: ../../../library/datetime.rst:2687 msgid "``%%``" msgstr "" -#: ../../../library/datetime.rst:2669 +#: ../../../library/datetime.rst:2687 msgid "A literal ``'%'`` character." msgstr "" -#: ../../../library/datetime.rst:2669 +#: ../../../library/datetime.rst:2687 msgid "%" msgstr "" -#: ../../../library/datetime.rst:2672 +#: ../../../library/datetime.rst:2690 msgid "" "The ISO 8601 year and ISO 8601 week directives are not interchangeable with " "the year and week number directives above. Calling :meth:`~.datetime." @@ -3216,43 +3227,43 @@ msgid "" "`ValueError`." msgstr "" -#: ../../../library/datetime.rst:2676 +#: ../../../library/datetime.rst:2694 msgid "" "Several additional directives not required by the C11 standard are included " "for convenience." msgstr "" -#: ../../../library/datetime.rst:2682 +#: ../../../library/datetime.rst:2700 msgid "``%f``" msgstr "" -#: ../../../library/datetime.rst:2682 +#: ../../../library/datetime.rst:2700 msgid "Microsecond as a decimal number, zero-padded to 6 digits." msgstr "" -#: ../../../library/datetime.rst:2682 +#: ../../../library/datetime.rst:2700 msgid "000000, 000001, ..., 999999" msgstr "" -#: ../../../library/datetime.rst:2682 +#: ../../../library/datetime.rst:2700 msgid "\\(5)" msgstr "" -#: ../../../library/datetime.rst:2686 ../../../library/datetime.rst:2845 +#: ../../../library/datetime.rst:2704 ../../../library/datetime.rst:2864 msgid "``%:z``" msgstr "" -#: ../../../library/datetime.rst:2686 +#: ../../../library/datetime.rst:2704 msgid "" "UTC offset in the form ``±HH:MM[:SS[.ffffff]]`` (empty string if the object " "is naive)." msgstr "" -#: ../../../library/datetime.rst:2686 +#: ../../../library/datetime.rst:2704 msgid "(empty), +00:00, -04:00, +10:30, +06:34:15, -03:07:12.345216" msgstr "" -#: ../../../library/datetime.rst:2692 +#: ../../../library/datetime.rst:2710 msgid "" "The full set of format codes supported varies across platforms, because " "Python calls the platform C library's :c:func:`strftime` function, and " @@ -3262,37 +3273,39 @@ msgid "" "unsupported format specifiers." msgstr "" -#: ../../../library/datetime.rst:2698 +#: ../../../library/datetime.rst:2716 msgid "``%G``, ``%u`` and ``%V`` were added." msgstr "" -#: ../../../library/datetime.rst:2701 +#: ../../../library/datetime.rst:2719 msgid "``%:z`` was added for :meth:`~.datetime.strftime`." msgstr "" -#: ../../../library/datetime.rst:2704 -msgid "``%:z``, ``%F``, and ``%D`` were added for :meth:`~.datetime.strptime`." +#: ../../../library/datetime.rst:2722 +msgid "" +"``%D``, ``%F``, ``%n``, ``%t``, and ``%:z`` were added for :meth:`~.datetime." +"strptime`." msgstr "" -#: ../../../library/datetime.rst:2709 +#: ../../../library/datetime.rst:2728 msgid "Technical detail" msgstr "" -#: ../../../library/datetime.rst:2711 +#: ../../../library/datetime.rst:2730 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:2715 +#: ../../../library/datetime.rst:2734 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:2720 +#: ../../../library/datetime.rst:2739 msgid "" "Format strings without separators can be ambiguous for parsing. For example, " "with ``%Y%m%d``, the string ``2026111`` may be parsed either as " @@ -3300,7 +3313,7 @@ msgid "" "parsed as intended." msgstr "" -#: ../../../library/datetime.rst:2726 +#: ../../../library/datetime.rst:2745 msgid "" "When used to parse partial dates lacking a year, :meth:`.datetime.strptime` " "and :meth:`.date.strptime` will raise when encountering February 29 because " @@ -3308,32 +3321,32 @@ msgid "" "year to partial date strings before parsing." msgstr "" -#: ../../../library/datetime.rst:2757 +#: ../../../library/datetime.rst:2776 msgid "Using ``datetime.strptime(date_string, format)`` is equivalent to::" msgstr "" -#: ../../../library/datetime.rst:2761 +#: ../../../library/datetime.rst:2780 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:2765 +#: ../../../library/datetime.rst:2784 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:2769 +#: ../../../library/datetime.rst:2788 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:2773 +#: ../../../library/datetime.rst:2792 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 " @@ -3342,12 +3355,12 @@ msgid "" "`UnicodeError` or return an empty string instead." msgstr "" -#: ../../../library/datetime.rst:2782 +#: ../../../library/datetime.rst:2801 msgid "" "This format code is currently unsupported by :meth:`~.datetime.strptime`." msgstr "" -#: ../../../library/datetime.rst:2785 +#: ../../../library/datetime.rst:2804 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 " @@ -3355,38 +3368,38 @@ msgid "" "contain non-ASCII characters." msgstr "" -#: ../../../library/datetime.rst:2791 +#: ../../../library/datetime.rst:2810 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:2794 +#: ../../../library/datetime.rst:2813 msgid "" "In previous versions, :meth:`~.datetime.strftime` method was restricted to " "years >= 1900." msgstr "" -#: ../../../library/datetime.rst:2798 +#: ../../../library/datetime.rst:2817 msgid "" "In version 3.2, :meth:`~.datetime.strftime` method was restricted to years " ">= 1000." msgstr "" -#: ../../../library/datetime.rst:2803 +#: ../../../library/datetime.rst:2822 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:2807 +#: ../../../library/datetime.rst:2826 msgid "" "Unlike the :mod:`time` module, the :mod:`!datetime` module does not support " "leap seconds." msgstr "" -#: ../../../library/datetime.rst:2811 +#: ../../../library/datetime.rst:2830 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 " @@ -3394,17 +3407,17 @@ msgid "" "separately in datetime objects, and therefore always available)." msgstr "" -#: ../../../library/datetime.rst:2818 +#: ../../../library/datetime.rst:2837 msgid "" "For a naive object, the ``%z``, ``%:z`` and ``%Z`` format codes are replaced " "by empty strings." msgstr "" -#: ../../../library/datetime.rst:2821 +#: ../../../library/datetime.rst:2840 msgid "For an aware object:" msgstr "" -#: ../../../library/datetime.rst:2824 +#: ../../../library/datetime.rst:2843 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 " @@ -3418,7 +3431,7 @@ msgid "" "replaced with the string ``'-0330'``." msgstr "" -#: ../../../library/datetime.rst:2838 +#: ../../../library/datetime.rst:2857 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, " @@ -3427,13 +3440,13 @@ msgid "" "identical to ``'+00:00'``." msgstr "" -#: ../../../library/datetime.rst:2846 +#: ../../../library/datetime.rst:2865 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:2849 +#: ../../../library/datetime.rst:2868 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, " @@ -3441,47 +3454,47 @@ msgid "" "hour. In addition, providing ``'Z'`` is identical to ``'+00:00'``." msgstr "" -#: ../../../library/datetime.rst:2856 +#: ../../../library/datetime.rst:2875 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:2860 +#: ../../../library/datetime.rst:2879 msgid ":meth:`~.datetime.strptime` only accepts certain values for ``%Z``:" msgstr "" -#: ../../../library/datetime.rst:2862 +#: ../../../library/datetime.rst:2881 msgid "any value in ``time.tzname`` for your machine's locale" msgstr "" -#: ../../../library/datetime.rst:2863 +#: ../../../library/datetime.rst:2882 msgid "the hard-coded values ``UTC`` and ``GMT``" msgstr "" -#: ../../../library/datetime.rst:2865 +#: ../../../library/datetime.rst:2884 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:2869 +#: ../../../library/datetime.rst:2888 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:2875 +#: ../../../library/datetime.rst:2894 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:2880 +#: ../../../library/datetime.rst:2899 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:`~." @@ -3489,7 +3502,7 @@ msgid "" "interchangeable." msgstr "" -#: ../../../library/datetime.rst:2886 +#: ../../../library/datetime.rst:2905 msgid "" "When used with the :meth:`~.datetime.strptime` method, the leading zero is " "optional for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, " @@ -3497,7 +3510,7 @@ msgid "" "zero." msgstr "" -#: ../../../library/datetime.rst:2891 +#: ../../../library/datetime.rst:2910 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, " @@ -3506,7 +3519,7 @@ msgid "" "parser (1900) is not a leap year. Users run into that bug every leap year." msgstr "" -#: ../../../library/datetime.rst:2903 +#: ../../../library/datetime.rst:2922 msgid "" ":meth:`~.datetime.strptime` calls using a format string containing a day of " "month without a year now emit a :exc:`DeprecationWarning`. In 3.15 or later " @@ -3514,15 +3527,15 @@ msgid "" "See :gh:`70647`." msgstr "" -#: ../../../library/datetime.rst:2910 +#: ../../../library/datetime.rst:2929 msgid "Footnotes" msgstr "" -#: ../../../library/datetime.rst:2911 -msgid "If, that is, we ignore the effects of Relativity" +#: ../../../library/datetime.rst:2930 +msgid "If, that is, we ignore the effects of relativity." msgstr "" -#: ../../../library/datetime.rst:2913 +#: ../../../library/datetime.rst:2932 msgid "" "This matches the definition of the \"proleptic Gregorian\" calendar in " "Dershowitz and Reingold's book *Calendrical Calculations*, where it's the " @@ -3531,17 +3544,17 @@ msgid "" "systems." msgstr "" -#: ../../../library/datetime.rst:2919 +#: ../../../library/datetime.rst:2938 msgid "" "See R. H. van Gent's `guide to the mathematics of the ISO 8601 calendar " "`_ for a good explanation." msgstr "" -#: ../../../library/datetime.rst:2481 +#: ../../../library/datetime.rst:2495 msgid "% (percent)" msgstr "" -#: ../../../library/datetime.rst:2481 +#: ../../../library/datetime.rst:2495 msgid "datetime format" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/email.parser.pot b/main/locale/pot/LC_MESSAGES/library/email.parser.pot index f3d94c6b1e4..23dc439fdf3 100644 --- a/main/locale/pot/LC_MESSAGES/library/email.parser.pot +++ b/main/locale/pot/LC_MESSAGES/library/email.parser.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -206,7 +206,7 @@ msgstr "" msgid "" "Read all the data from the binary file-like object *fp*, parse the resulting " "bytes, and return the message object. *fp* must support both the :meth:`~io." -"IOBase.readline` and the :meth:`~io.IOBase.read` methods." +"IOBase.readline` and the :meth:`~io.BufferedIOBase.read` methods." msgstr "" #: ../../../library/email.parser.rst:161 diff --git a/main/locale/pot/LC_MESSAGES/library/exceptions.pot b/main/locale/pot/LC_MESSAGES/library/exceptions.pot index d2c81ceecca..de0f8a74ae9 100644 --- a/main/locale/pot/LC_MESSAGES/library/exceptions.pot +++ b/main/locale/pot/LC_MESSAGES/library/exceptions.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -258,8 +258,8 @@ msgstr "" #: ../../../library/exceptions.rst:223 msgid "" "Raised when the :func:`input` function hits an end-of-file condition (EOF) " -"without reading any data. (Note: the :meth:`!io.IOBase.read` and :meth:`io." -"IOBase.readline` methods return an empty string when they hit EOF.)" +"without reading any data. (Note: the :meth:`io.TextIOBase.read` and :meth:" +"`io.IOBase.readline` methods return an empty string when they hit EOF.)" msgstr "" #: ../../../library/exceptions.rst:230 diff --git a/main/locale/pot/LC_MESSAGES/library/functions.pot b/main/locale/pot/LC_MESSAGES/library/functions.pot index 42dd9ab1ec6..44915c78265 100644 --- a/main/locale/pot/LC_MESSAGES/library/functions.pot +++ b/main/locale/pot/LC_MESSAGES/library/functions.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -466,8 +466,8 @@ msgid "" "See also :func:`enum.bin` to represent negative values as twos-complement." msgstr "" -#: ../../../library/functions.rst:143 ../../../library/functions.rst:959 -#: ../../../library/functions.rst:1343 +#: ../../../library/functions.rst:143 ../../../library/functions.rst:969 +#: ../../../library/functions.rst:1353 msgid "See also :func:`format` for more information." msgstr "" @@ -481,7 +481,7 @@ msgid "" "``False`` and ``True`` (see :ref:`typebool`)." msgstr "" -#: ../../../library/functions.rst:158 ../../../library/functions.rst:824 +#: ../../../library/functions.rst:158 ../../../library/functions.rst:834 msgid "The parameter is now positional-only." msgstr "" @@ -791,8 +791,8 @@ msgid "" "number from real and imaginary parts." msgstr "" -#: ../../../library/functions.rst:393 ../../../library/functions.rst:767 -#: ../../../library/functions.rst:1015 +#: ../../../library/functions.rst:393 ../../../library/functions.rst:777 +#: ../../../library/functions.rst:1025 msgid "Examples:" msgstr "" @@ -846,8 +846,8 @@ msgstr "" msgid "The complex type is described in :ref:`typesnumeric`." msgstr "" -#: ../../../library/functions.rst:458 ../../../library/functions.rst:821 -#: ../../../library/functions.rst:1063 +#: ../../../library/functions.rst:458 ../../../library/functions.rst:831 +#: ../../../library/functions.rst:1073 msgid "Grouping digits with underscores as in code literals is allowed." msgstr "" @@ -1005,10 +1005,10 @@ msgstr "" msgid "Syntax errors are reported as exceptions." msgstr "" -#: ../../../library/functions.rst:608 ../../../library/functions.rst:669 +#: ../../../library/functions.rst:608 ../../../library/functions.rst:674 msgid "" -"This function executes arbitrary code. Calling it with user-supplied input " -"may lead to security vulnerabilities." +"This function executes arbitrary code. Calling it with untrusted user-" +"supplied input will lead to security vulnerabilities." msgstr "" #: ../../../library/functions.rst:611 @@ -1018,10 +1018,10 @@ msgid "" "mappings as global and local namespace. If the *globals* dictionary is " "present and does not contain a value for the key ``__builtins__``, a " "reference to the dictionary of the built-in module :mod:`builtins` is " -"inserted under that key before *source* is parsed. That way you can control " -"what builtins are available to the executed code by inserting your own " -"``__builtins__`` dictionary into *globals* before passing it to :func:" -"`eval`. If the *locals* mapping is omitted it defaults to the *globals* " +"inserted under that key before *source* is parsed. Overriding " +"``__builtins__`` can be used to restrict or change the available names, but " +"this is **not** a security mechanism: the executed code can still access all " +"builtins. If the *locals* mapping is omitted it defaults to the *globals* " "dictionary. If both mappings are omitted, the source is executed with the " "*globals* and *locals* in the environment where :func:`eval` is called. " "Note, *eval()* will only have access to the :term:`nested scopes ` ``exec`` with the code object as " "the argument. Code compilation events may also be raised." msgstr "" -#: ../../../library/functions.rst:656 ../../../library/functions.rst:733 +#: ../../../library/functions.rst:657 ../../../library/functions.rst:739 msgid "The *globals* and *locals* arguments can now be passed as keywords." msgstr "" -#: ../../../library/functions.rst:660 ../../../library/functions.rst:737 +#: ../../../library/functions.rst:661 ../../../library/functions.rst:743 msgid "" "The semantics of the default *locals* namespace have been adjusted as " "described for the :func:`locals` builtin." msgstr "" -#: ../../../library/functions.rst:672 +#: ../../../library/functions.rst:666 ../../../library/functions.rst:748 +msgid "*globals* can now be a :class:`frozendict`." +msgstr "" + +#: ../../../library/functions.rst:677 msgid "" "This function supports dynamic execution of Python code. *source* must be " "either a string or a code object. If it is a string, the string is parsed " @@ -1092,7 +1096,7 @@ msgid "" "passed to the :func:`exec` function. The return value is ``None``." msgstr "" -#: ../../../library/functions.rst:683 +#: ../../../library/functions.rst:688 msgid "" "In all cases, if the optional parts are omitted, the code is executed in the " "current scope. If only *globals* is provided, it must be a dictionary (and " @@ -1103,7 +1107,7 @@ msgid "" "are the same dictionary." msgstr "" -#: ../../../library/functions.rst:693 +#: ../../../library/functions.rst:698 msgid "" "When ``exec`` gets two separate objects as *globals* and *locals*, the code " "will be executed as if it were embedded in a class definition. This means " @@ -1112,16 +1116,16 @@ msgid "" "are treated as class variables in a class definition)." msgstr "" -#: ../../../library/functions.rst:699 +#: ../../../library/functions.rst:704 msgid "" "If the *globals* dictionary does not contain a value for the key " "``__builtins__``, a reference to the dictionary of the built-in module :mod:" -"`builtins` is inserted under that key. That way you can control what " -"builtins are available to the executed code by inserting your own " -"``__builtins__`` dictionary into *globals* before passing it to :func:`exec`." +"`builtins` is inserted under that key. Overriding ``__builtins__`` can be " +"used to restrict or change the available names, but this is **not** a " +"security mechanism: the executed code can still access all builtins." msgstr "" -#: ../../../library/functions.rst:705 +#: ../../../library/functions.rst:711 msgid "" "The *closure* argument specifies a closure--a tuple of cellvars. It's only " "valid when the *object* is a code object containing :term:`free (closure) " @@ -1129,25 +1133,25 @@ msgid "" "the length of the code object's :attr:`~codeobject.co_freevars` attribute." msgstr "" -#: ../../../library/functions.rst:718 +#: ../../../library/functions.rst:724 msgid "" "The built-in functions :func:`globals` and :func:`locals` return the current " "global and local namespace, respectively, which may be useful to pass around " "for use as the second and third argument to :func:`exec`." msgstr "" -#: ../../../library/functions.rst:724 +#: ../../../library/functions.rst:730 msgid "" "The default *locals* act as described for function :func:`locals` below. " "Pass an explicit *locals* dictionary if you need to see effects of the code " "on *locals* after function :func:`exec` returns." msgstr "" -#: ../../../library/functions.rst:728 +#: ../../../library/functions.rst:734 msgid "Added the *closure* parameter." msgstr "" -#: ../../../library/functions.rst:743 +#: ../../../library/functions.rst:753 msgid "" "Construct an iterator from those elements of *iterable* for which *function* " "is true. *iterable* may be either a sequence, a container which supports " @@ -1155,7 +1159,7 @@ msgid "" "is assumed, that is, all elements of *iterable* that are false are removed." msgstr "" -#: ../../../library/functions.rst:749 +#: ../../../library/functions.rst:759 msgid "" "Note that ``filter(function, iterable)`` is equivalent to the generator " "expression ``(item for item in iterable if function(item))`` if function is " @@ -1163,17 +1167,17 @@ msgid "" "``None``." msgstr "" -#: ../../../library/functions.rst:754 +#: ../../../library/functions.rst:764 msgid "" "See :func:`itertools.filterfalse` for the complementary function that " "returns elements of *iterable* for which *function* is false." msgstr "" -#: ../../../library/functions.rst:765 +#: ../../../library/functions.rst:775 msgid "Return a floating-point number constructed from a number or a string." msgstr "" -#: ../../../library/functions.rst:782 +#: ../../../library/functions.rst:792 msgid "" "If the argument is a string, it should contain a decimal number, optionally " "preceded by a sign, and optionally embedded in whitespace. The optional " @@ -1184,13 +1188,13 @@ msgid "" "grammar, after leading and trailing whitespace characters are removed:" msgstr "" -#: ../../../library/functions.rst:803 +#: ../../../library/functions.rst:813 msgid "" "Case is not significant, so, for example, \"inf\", \"Inf\", \"INFINITY\", " "and \"iNfINity\" are all acceptable spellings for positive infinity." msgstr "" -#: ../../../library/functions.rst:806 +#: ../../../library/functions.rst:816 msgid "" "Otherwise, if the argument is an integer or a floating-point number, a " "floating-point number with the same value (within Python's floating-point " @@ -1198,33 +1202,33 @@ msgid "" "float, an :exc:`OverflowError` will be raised." msgstr "" -#: ../../../library/functions.rst:811 +#: ../../../library/functions.rst:821 msgid "" "For a general Python object ``x``, ``float(x)`` delegates to ``x." "__float__()``. If :meth:`~object.__float__` is not defined then it falls " "back to :meth:`~object.__index__`." msgstr "" -#: ../../../library/functions.rst:815 +#: ../../../library/functions.rst:825 msgid "" "See also :meth:`float.from_number` which only accepts a numeric argument." msgstr "" -#: ../../../library/functions.rst:817 +#: ../../../library/functions.rst:827 msgid "If no argument is given, ``0.0`` is returned." msgstr "" -#: ../../../library/functions.rst:819 +#: ../../../library/functions.rst:829 msgid "The float type is described in :ref:`typesnumeric`." msgstr "" -#: ../../../library/functions.rst:827 +#: ../../../library/functions.rst:837 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not " "defined." msgstr "" -#: ../../../library/functions.rst:837 +#: ../../../library/functions.rst:847 msgid "" "Convert a *value* to a \"formatted\" representation, as controlled by " "*format_spec*. The interpretation of *format_spec* will depend on the type " @@ -1232,13 +1236,13 @@ msgid "" "is used by most built-in types: :ref:`formatspec`." msgstr "" -#: ../../../library/functions.rst:842 +#: ../../../library/functions.rst:852 msgid "" "The default *format_spec* is an empty string which usually gives the same " "effect as calling :func:`str(value) `." msgstr "" -#: ../../../library/functions.rst:845 +#: ../../../library/functions.rst:855 msgid "" "A call to ``format(value, format_spec)`` is translated to ``type(value)." "__format__(value, format_spec)`` which bypasses the instance dictionary when " @@ -1248,26 +1252,26 @@ msgid "" "return value are not strings." msgstr "" -#: ../../../library/functions.rst:852 +#: ../../../library/functions.rst:862 msgid "" "``object().__format__(format_spec)`` raises :exc:`TypeError` if " "*format_spec* is not an empty string." msgstr "" -#: ../../../library/functions.rst:861 +#: ../../../library/functions.rst:871 msgid "" "Return a new :class:`frozenset` object, optionally with elements taken from " "*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` and :" "ref:`types-set` for documentation about this class." msgstr "" -#: ../../../library/functions.rst:865 +#: ../../../library/functions.rst:875 msgid "" "For other containers see the built-in :class:`set`, :class:`list`, :class:" "`tuple`, and :class:`dict` classes, as well as the :mod:`collections` module." msgstr "" -#: ../../../library/functions.rst:873 +#: ../../../library/functions.rst:883 msgid "" "Return the value of the named attribute of *object*. *name* must be a " "string. If the string is the name of one of the object's attributes, the " @@ -1277,7 +1281,7 @@ msgid "" "raised. *name* need not be a Python identifier (see :func:`setattr`)." msgstr "" -#: ../../../library/functions.rst:882 +#: ../../../library/functions.rst:892 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -1285,14 +1289,14 @@ msgid "" "`getattr`." msgstr "" -#: ../../../library/functions.rst:890 +#: ../../../library/functions.rst:900 msgid "" "Return the dictionary implementing the current module namespace. For code " "within functions, this is set when the function is defined and remains the " "same regardless of where the function is called." msgstr "" -#: ../../../library/functions.rst:897 +#: ../../../library/functions.rst:907 msgid "" "The arguments are an object and a string. The result is ``True`` if the " "string is the name of one of the object's attributes, ``False`` if not. " @@ -1300,7 +1304,7 @@ msgid "" "it raises an :exc:`AttributeError` or not.)" msgstr "" -#: ../../../library/functions.rst:905 +#: ../../../library/functions.rst:915 msgid "" "Return the hash value of the object (if it has one). Hash values are " "integers. They are used to quickly compare dictionary keys during a " @@ -1308,13 +1312,13 @@ msgid "" "value (even if they are of different types, as is the case for 1 and 1.0)." msgstr "" -#: ../../../library/functions.rst:912 +#: ../../../library/functions.rst:922 msgid "" "For objects with custom :meth:`~object.__hash__` methods, note that :func:" "`hash` truncates the return value based on the bit width of the host machine." msgstr "" -#: ../../../library/functions.rst:919 +#: ../../../library/functions.rst:929 msgid "" "Invoke the built-in help system. (This function is intended for interactive " "use.) If no argument is given, the interactive help system starts on the " @@ -1324,7 +1328,7 @@ msgid "" "argument is any other kind of object, a help page on the object is generated." msgstr "" -#: ../../../library/functions.rst:926 +#: ../../../library/functions.rst:936 msgid "" "Note that if a slash(/) appears in the parameter list of a function when " "invoking :func:`help`, it means that the parameters prior to the slash are " @@ -1332,44 +1336,44 @@ msgid "" "parameters `." msgstr "" -#: ../../../library/functions.rst:931 +#: ../../../library/functions.rst:941 msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "" -#: ../../../library/functions.rst:933 +#: ../../../library/functions.rst:943 msgid "" "Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " "for callables are now more comprehensive and consistent." msgstr "" -#: ../../../library/functions.rst:940 +#: ../../../library/functions.rst:950 msgid "" "Convert an integer number to a lowercase hexadecimal string prefixed with " "\"0x\". If *integer* is not a Python :class:`int` object, it has to define " "an :meth:`~object.__index__` method that returns an integer. Some examples:" msgstr "" -#: ../../../library/functions.rst:949 +#: ../../../library/functions.rst:959 msgid "" "If you want to convert an integer number to an uppercase or lower " "hexadecimal string with prefix or not, you can use either of the following " "ways:" msgstr "" -#: ../../../library/functions.rst:961 +#: ../../../library/functions.rst:971 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." msgstr "" -#: ../../../library/functions.rst:966 +#: ../../../library/functions.rst:976 msgid "" "To obtain a hexadecimal string representation for a float, use the :meth:" "`float.hex` method." msgstr "" -#: ../../../library/functions.rst:972 +#: ../../../library/functions.rst:982 msgid "" "Return the \"identity\" of an object. This is an integer which is " "guaranteed to be unique and constant for this object during its lifetime. " @@ -1377,17 +1381,17 @@ msgid "" "value." msgstr "" -#: ../../../library/functions.rst:977 +#: ../../../library/functions.rst:987 msgid "This is the address of the object in memory." msgstr "" -#: ../../../library/functions.rst:979 +#: ../../../library/functions.rst:989 msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." msgstr "" -#: ../../../library/functions.rst:985 +#: ../../../library/functions.rst:995 msgid "" "If the *prompt* argument is present, it is written to standard output " "without a trailing newline. The function then reads a line from input, " @@ -1395,38 +1399,38 @@ msgid "" "When EOF is read, :exc:`EOFError` is raised. Example::" msgstr "" -#: ../../../library/functions.rst:995 +#: ../../../library/functions.rst:1005 msgid "" "If the :mod:`readline` module was loaded, then :func:`input` will use it to " "provide elaborate line editing and history features." msgstr "" -#: ../../../library/functions.rst:998 ../../../library/functions.rst:1000 +#: ../../../library/functions.rst:1008 ../../../library/functions.rst:1010 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" msgstr "" -#: ../../../library/functions.rst:1003 ../../../library/functions.rst:1005 +#: ../../../library/functions.rst:1013 ../../../library/functions.rst:1015 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "the result after successfully reading input." msgstr "" -#: ../../../library/functions.rst:1012 +#: ../../../library/functions.rst:1022 msgid "" "Return an integer object constructed from a number or a string, or return " "``0`` if no arguments are given." msgstr "" -#: ../../../library/functions.rst:1032 +#: ../../../library/functions.rst:1042 msgid "" "If the argument defines :meth:`~object.__int__`, ``int(x)`` returns ``x." "__int__()``. If the argument defines :meth:`~object.__index__`, it returns " "``x.__index__()``. For floating-point numbers, this truncates towards zero." msgstr "" -#: ../../../library/functions.rst:1037 +#: ../../../library/functions.rst:1047 msgid "" "If the argument is not a number or if *base* is given, then it must be a " "string, :class:`bytes`, or :class:`bytearray` instance representing an " @@ -1435,7 +1439,7 @@ msgid "" "whitespace, and have single underscores interspersed between digits." msgstr "" -#: ../../../library/functions.rst:1043 +#: ../../../library/functions.rst:1053 msgid "" "A base-n integer string contains digits, each representing a value from 0 to " "n-1. The values 0--9 can be represented by any Unicode decimal digit. The " @@ -1449,11 +1453,11 @@ msgid "" "while ``int('010')`` and ``int('010', 8)`` are." msgstr "" -#: ../../../library/functions.rst:1054 +#: ../../../library/functions.rst:1064 msgid "The integer type is described in :ref:`typesnumeric`." msgstr "" -#: ../../../library/functions.rst:1056 +#: ../../../library/functions.rst:1066 msgid "" "If *base* is not an instance of :class:`int` and the *base* object has a :" "meth:`base.__index__ ` method, that method is called to " @@ -1461,17 +1465,17 @@ msgid "" "` instead of :meth:`base.__index__ `." msgstr "" -#: ../../../library/functions.rst:1066 +#: ../../../library/functions.rst:1076 msgid "The first parameter is now positional-only." msgstr "" -#: ../../../library/functions.rst:1069 +#: ../../../library/functions.rst:1079 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__int__` is not " "defined." msgstr "" -#: ../../../library/functions.rst:1072 +#: ../../../library/functions.rst:1082 msgid "" ":class:`int` string inputs and string representations can be limited to help " "avoid denial of service attacks. A :exc:`ValueError` is raised when the " @@ -1481,12 +1485,12 @@ msgid "" "documentation." msgstr "" -#: ../../../library/functions.rst:1080 +#: ../../../library/functions.rst:1090 msgid "" ":func:`int` no longer delegates to the :meth:`~object.__trunc__` method." msgstr "" -#: ../../../library/functions.rst:1085 +#: ../../../library/functions.rst:1095 msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " "argument, or of a (direct, indirect, or :term:`virtual `) of *classinfo*. A class is considered a " @@ -1513,7 +1517,7 @@ msgid "" "any other case, a :exc:`TypeError` exception is raised." msgstr "" -#: ../../../library/functions.rst:1117 +#: ../../../library/functions.rst:1127 msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " @@ -1529,63 +1533,63 @@ msgid "" "raised, otherwise the value will be returned." msgstr "" -#: ../../../library/functions.rst:1131 +#: ../../../library/functions.rst:1141 msgid "See also :ref:`typeiter`." msgstr "" -#: ../../../library/functions.rst:1133 +#: ../../../library/functions.rst:1143 msgid "" "One useful application of the second form of :func:`iter` is to build a " "block-reader. For example, reading fixed-width blocks from a binary database " "file until the end of file is reached::" msgstr "" -#: ../../../library/functions.rst:1145 +#: ../../../library/functions.rst:1155 msgid "" "Return the length (the number of items) of an object. The argument may be a " "sequence (such as a string, bytes, tuple, list, or range) or a collection " "(such as a dictionary, set, or frozen set)." msgstr "" -#: ../../../library/functions.rst:1151 +#: ../../../library/functions.rst:1161 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -#: ../../../library/functions.rst:1159 +#: ../../../library/functions.rst:1169 msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " "type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." msgstr "" -#: ../../../library/functions.rst:1165 +#: ../../../library/functions.rst:1175 msgid "" "Return a mapping object representing the current local symbol table, with " "variable names as the keys, and their currently bound references as the " "values." msgstr "" -#: ../../../library/functions.rst:1169 +#: ../../../library/functions.rst:1179 msgid "" "At module scope, as well as when using :func:`exec` or :func:`eval` with a " "single namespace, this function returns the same namespace as :func:" "`globals`." msgstr "" -#: ../../../library/functions.rst:1173 +#: ../../../library/functions.rst:1183 msgid "" "At class scope, it returns the namespace that will be passed to the " "metaclass constructor." msgstr "" -#: ../../../library/functions.rst:1176 +#: ../../../library/functions.rst:1186 msgid "" "When using ``exec()`` or ``eval()`` with separate local and global " "arguments, it returns the local namespace passed in to the function call." msgstr "" -#: ../../../library/functions.rst:1179 +#: ../../../library/functions.rst:1189 msgid "" "In all of the above cases, each call to ``locals()`` in a given frame of " "execution will return the *same* mapping object. Changes made through the " @@ -1595,7 +1599,7 @@ msgid "" "returned mapping object." msgstr "" -#: ../../../library/functions.rst:1186 +#: ../../../library/functions.rst:1196 msgid "" "In an :term:`optimized scope` (including functions, generators, and " "coroutines), each call to ``locals()`` instead returns a fresh dictionary " @@ -1607,7 +1611,7 @@ msgid "" "previously returned dictionaries." msgstr "" -#: ../../../library/functions.rst:1195 +#: ../../../library/functions.rst:1205 msgid "" "Calling ``locals()`` as part of a comprehension in a function, generator, or " "coroutine is equivalent to calling it in the containing scope, except that " @@ -1616,19 +1620,19 @@ msgid "" "function." msgstr "" -#: ../../../library/functions.rst:1201 +#: ../../../library/functions.rst:1211 msgid "" "Calling ``locals()`` as part of a generator expression is equivalent to " "calling it in a nested generator function." msgstr "" -#: ../../../library/functions.rst:1204 +#: ../../../library/functions.rst:1214 msgid "" "The behaviour of ``locals()`` in a comprehension has been updated as " "described in :pep:`709`." msgstr "" -#: ../../../library/functions.rst:1208 +#: ../../../library/functions.rst:1218 msgid "" "As part of :pep:`667`, the semantics of mutating the mapping objects " "returned from this function are now defined. The behavior in :term:" @@ -1637,7 +1641,7 @@ msgid "" "versions." msgstr "" -#: ../../../library/functions.rst:1218 +#: ../../../library/functions.rst:1228 msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterables* arguments are passed, " @@ -1649,24 +1653,24 @@ msgid "" "see :func:`itertools.starmap`." msgstr "" -#: ../../../library/functions.rst:1227 +#: ../../../library/functions.rst:1237 msgid "Added the *strict* parameter." msgstr "" -#: ../../../library/functions.rst:1235 +#: ../../../library/functions.rst:1245 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." msgstr "" -#: ../../../library/functions.rst:1238 +#: ../../../library/functions.rst:1248 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The largest item in the iterable is returned. If two or more positional " "arguments are provided, the largest of the positional arguments is returned." msgstr "" -#: ../../../library/functions.rst:1243 ../../../library/functions.rst:1281 +#: ../../../library/functions.rst:1253 ../../../library/functions.rst:1291 msgid "" "There are two optional keyword-only arguments. The *key* argument specifies " "a one-argument ordering function like that used for :meth:`list.sort`. The " @@ -1675,7 +1679,7 @@ msgid "" "`ValueError` is raised." msgstr "" -#: ../../../library/functions.rst:1249 +#: ../../../library/functions.rst:1259 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1683,34 +1687,34 @@ msgid "" "nlargest(1, iterable, key=keyfunc)``." msgstr "" -#: ../../../library/functions.rst:1254 ../../../library/functions.rst:1292 +#: ../../../library/functions.rst:1264 ../../../library/functions.rst:1302 msgid "Added the *default* keyword-only parameter." msgstr "" -#: ../../../library/functions.rst:1257 ../../../library/functions.rst:1295 +#: ../../../library/functions.rst:1267 ../../../library/functions.rst:1305 msgid "The *key* can be ``None``." msgstr "" -#: ../../../library/functions.rst:1265 +#: ../../../library/functions.rst:1275 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." msgstr "" -#: ../../../library/functions.rst:1273 +#: ../../../library/functions.rst:1283 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." msgstr "" -#: ../../../library/functions.rst:1276 +#: ../../../library/functions.rst:1286 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The smallest item in the iterable is returned. If two or more positional " "arguments are provided, the smallest of the positional arguments is returned." msgstr "" -#: ../../../library/functions.rst:1287 +#: ../../../library/functions.rst:1297 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1718,14 +1722,14 @@ msgid "" "iterable, key=keyfunc)``." msgstr "" -#: ../../../library/functions.rst:1302 +#: ../../../library/functions.rst:1312 msgid "" "Retrieve the next item from the :term:`iterator` by calling its :meth:" "`~iterator.__next__` method. If *default* is given, it is returned if the " "iterator is exhausted, otherwise :exc:`StopIteration` is raised." msgstr "" -#: ../../../library/functions.rst:1309 +#: ../../../library/functions.rst:1319 msgid "" "This is the ultimate base class of all other classes. It has methods that " "are common to all instances of Python classes. When the constructor is " @@ -1733,13 +1737,13 @@ msgid "" "any arguments." msgstr "" -#: ../../../library/functions.rst:1316 +#: ../../../library/functions.rst:1326 msgid "" ":class:`object` instances do *not* have :attr:`~object.__dict__` attributes, " "so you can't assign arbitrary attributes to an instance of :class:`object`." msgstr "" -#: ../../../library/functions.rst:1323 +#: ../../../library/functions.rst:1333 msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " "result is a valid Python expression. If *integer* is not a Python :class:" @@ -1747,20 +1751,20 @@ msgid "" "returns an integer. For example:" msgstr "" -#: ../../../library/functions.rst:1333 +#: ../../../library/functions.rst:1343 msgid "" "If you want to convert an integer number to an octal string either with the " "prefix \"0o\" or not, you can use either of the following ways." msgstr "" -#: ../../../library/functions.rst:1350 +#: ../../../library/functions.rst:1360 msgid "" "Open *file* and return a corresponding :term:`file object`. If the file " "cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more " "examples of how to use this function." msgstr "" -#: ../../../library/functions.rst:1354 +#: ../../../library/functions.rst:1364 msgid "" "*file* is a :term:`path-like object` giving the pathname (absolute or " "relative to the current working directory) of the file to be opened or an " @@ -1769,7 +1773,7 @@ msgid "" "is set to ``False``.)" msgstr "" -#: ../../../library/functions.rst:1360 +#: ../../../library/functions.rst:1370 msgid "" "*mode* is an optional string that specifies the mode in which the file is " "opened. It defaults to ``'r'`` which means open for reading in text mode. " @@ -1783,78 +1787,78 @@ msgid "" "unspecified.) The available modes are:" msgstr "" -#: ../../../library/functions.rst:1377 +#: ../../../library/functions.rst:1387 msgid "Character" msgstr "" -#: ../../../library/functions.rst:1377 +#: ../../../library/functions.rst:1387 msgid "Meaning" msgstr "" -#: ../../../library/functions.rst:1379 +#: ../../../library/functions.rst:1389 msgid "``'r'``" msgstr "" -#: ../../../library/functions.rst:1379 +#: ../../../library/functions.rst:1389 msgid "open for reading (default)" msgstr "" -#: ../../../library/functions.rst:1380 +#: ../../../library/functions.rst:1390 msgid "``'w'``" msgstr "" -#: ../../../library/functions.rst:1380 +#: ../../../library/functions.rst:1390 msgid "open for writing, truncating the file first" msgstr "" -#: ../../../library/functions.rst:1381 +#: ../../../library/functions.rst:1391 msgid "``'x'``" msgstr "" -#: ../../../library/functions.rst:1381 +#: ../../../library/functions.rst:1391 msgid "open for exclusive creation, failing if the file already exists" msgstr "" -#: ../../../library/functions.rst:1382 +#: ../../../library/functions.rst:1392 msgid "``'a'``" msgstr "" -#: ../../../library/functions.rst:1382 +#: ../../../library/functions.rst:1392 msgid "open for writing, appending to the end of file if it exists" msgstr "" -#: ../../../library/functions.rst:1383 +#: ../../../library/functions.rst:1393 msgid "``'b'``" msgstr "" -#: ../../../library/functions.rst:1383 ../../../library/functions.rst:1499 +#: ../../../library/functions.rst:1393 ../../../library/functions.rst:1509 msgid "binary mode" msgstr "" -#: ../../../library/functions.rst:1384 +#: ../../../library/functions.rst:1394 msgid "``'t'``" msgstr "" -#: ../../../library/functions.rst:1384 +#: ../../../library/functions.rst:1394 msgid "text mode (default)" msgstr "" -#: ../../../library/functions.rst:1385 +#: ../../../library/functions.rst:1395 msgid "``'+'``" msgstr "" -#: ../../../library/functions.rst:1385 +#: ../../../library/functions.rst:1395 msgid "open for updating (reading and writing)" msgstr "" -#: ../../../library/functions.rst:1388 +#: ../../../library/functions.rst:1398 msgid "" "The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " "Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " "``'r+b'`` open the file with no truncation." msgstr "" -#: ../../../library/functions.rst:1392 +#: ../../../library/functions.rst:1402 msgid "" "As mentioned in the :ref:`io-overview`, Python distinguishes between binary " "and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* " @@ -1865,14 +1869,14 @@ msgid "" "specified *encoding* if given." msgstr "" -#: ../../../library/functions.rst:1402 +#: ../../../library/functions.rst:1412 msgid "" "Python doesn't depend on the underlying operating system's notion of text " "files; all the processing is done by Python itself, and is therefore " "platform-independent." msgstr "" -#: ../../../library/functions.rst:1406 +#: ../../../library/functions.rst:1416 msgid "" "*buffering* is an optional integer used to set the buffering policy. Pass 0 " "to switch buffering off (only allowed in binary mode), 1 to select line " @@ -1885,7 +1889,7 @@ msgid "" "*buffering* argument is given, the default buffering policy works as follows:" msgstr "" -#: ../../../library/functions.rst:1416 +#: ../../../library/functions.rst:1426 msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " "``max(min(blocksize, 8 MiB), DEFAULT_BUFFER_SIZE)`` when the device block " @@ -1893,14 +1897,14 @@ msgid "" "kilobytes long." msgstr "" -#: ../../../library/functions.rst:1421 +#: ../../../library/functions.rst:1431 msgid "" "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " "returns ``True``) use line buffering. Other text files use the policy " "described above for binary files." msgstr "" -#: ../../../library/functions.rst:1425 +#: ../../../library/functions.rst:1435 msgid "" "*encoding* is the name of the encoding used to decode or encode the file. " "This should only be used in text mode. The default encoding is platform " @@ -1909,7 +1913,7 @@ msgid "" "the list of supported encodings." msgstr "" -#: ../../../library/functions.rst:1431 +#: ../../../library/functions.rst:1441 msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled—this cannot be used in binary mode. A variety of " @@ -1918,14 +1922,14 @@ msgid "" "standard names can be found in :ref:`error-handlers`." msgstr "" -#: ../../../library/functions.rst:1443 +#: ../../../library/functions.rst:1453 msgid "" "*newline* determines how to parse newline characters from the stream. It can " "be ``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as " "follows:" msgstr "" -#: ../../../library/functions.rst:1447 +#: ../../../library/functions.rst:1457 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -1936,7 +1940,7 @@ msgid "" "given string, and the line ending is returned to the caller untranslated." msgstr "" -#: ../../../library/functions.rst:1455 +#: ../../../library/functions.rst:1465 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -1945,7 +1949,7 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: ../../../library/functions.rst:1461 +#: ../../../library/functions.rst:1471 msgid "" "If *closefd* is ``False`` and a file descriptor rather than a filename was " "given, the underlying file descriptor will be kept open when the file is " @@ -1953,7 +1957,7 @@ msgid "" "otherwise, an error will be raised." msgstr "" -#: ../../../library/functions.rst:1466 +#: ../../../library/functions.rst:1476 msgid "" "A custom opener can be used by passing a callable as *opener*. The " "underlying file descriptor for the file object is then obtained by calling " @@ -1962,17 +1966,17 @@ msgid "" "similar to passing ``None``)." msgstr "" -#: ../../../library/functions.rst:1472 +#: ../../../library/functions.rst:1482 msgid "The newly created file is :ref:`non-inheritable `." msgstr "" -#: ../../../library/functions.rst:1474 +#: ../../../library/functions.rst:1484 msgid "" "The following example uses the :ref:`dir_fd ` parameter of the :func:" "`os.open` function to open a file relative to a given directory::" msgstr "" -#: ../../../library/functions.rst:1487 +#: ../../../library/functions.rst:1497 msgid "" "The type of :term:`file object` returned by the :func:`open` function " "depends on the mode. When :func:`open` is used to open a file in a text " @@ -1987,77 +1991,77 @@ msgid "" "FileIO`, is returned." msgstr "" -#: ../../../library/functions.rst:1508 +#: ../../../library/functions.rst:1518 msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " "(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" "`tempfile`, and :mod:`shutil`." msgstr "" -#: ../../../library/functions.rst:1512 +#: ../../../library/functions.rst:1522 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " "``mode``, ``flags``." msgstr "" -#: ../../../library/functions.rst:1514 +#: ../../../library/functions.rst:1524 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." msgstr "" -#: ../../../library/functions.rst:1519 +#: ../../../library/functions.rst:1529 msgid "The *opener* parameter was added." msgstr "" -#: ../../../library/functions.rst:1520 +#: ../../../library/functions.rst:1530 msgid "The ``'x'`` mode was added." msgstr "" -#: ../../../library/functions.rst:1521 +#: ../../../library/functions.rst:1531 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" -#: ../../../library/functions.rst:1522 +#: ../../../library/functions.rst:1532 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." msgstr "" -#: ../../../library/functions.rst:1527 +#: ../../../library/functions.rst:1537 msgid "The file is now non-inheritable." msgstr "" -#: ../../../library/functions.rst:1531 +#: ../../../library/functions.rst:1541 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" "exc:`InterruptedError` exception (see :pep:`475` for the rationale)." msgstr "" -#: ../../../library/functions.rst:1534 +#: ../../../library/functions.rst:1544 msgid "The ``'namereplace'`` error handler was added." msgstr "" -#: ../../../library/functions.rst:1538 +#: ../../../library/functions.rst:1548 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "" -#: ../../../library/functions.rst:1539 +#: ../../../library/functions.rst:1549 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." msgstr "" -#: ../../../library/functions.rst:1542 +#: ../../../library/functions.rst:1552 msgid "The ``'U'`` mode has been removed." msgstr "" -#: ../../../library/functions.rst:1547 +#: ../../../library/functions.rst:1557 msgid "Return the ordinal value of a character." msgstr "" -#: ../../../library/functions.rst:1549 +#: ../../../library/functions.rst:1559 msgid "" "If the argument is a one-character string, return the Unicode code point of " "that character. For example, ``ord('a')`` returns the integer ``97`` and " @@ -2065,14 +2069,14 @@ msgid "" "`chr`." msgstr "" -#: ../../../library/functions.rst:1554 +#: ../../../library/functions.rst:1564 msgid "" "If the argument is a :class:`bytes` or :class:`bytearray` object of length " "1, return its single byte value. For example, ``ord(b'a')`` returns the " "integer ``97``." msgstr "" -#: ../../../library/functions.rst:1561 +#: ../../../library/functions.rst:1571 msgid "" "Return *base* to the power *exp*; if *mod* is present, return *base* to the " "power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % " @@ -2080,7 +2084,7 @@ msgid "" "power operator: ``base**exp``." msgstr "" -#: ../../../library/functions.rst:1566 +#: ../../../library/functions.rst:1576 msgid "" "When arguments are builtin numeric types with mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " @@ -2095,7 +2099,7 @@ msgid "" "``pow(-9, 2.0)`` returns ``81.0``." msgstr "" -#: ../../../library/functions.rst:1578 +#: ../../../library/functions.rst:1588 msgid "" "For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must " "also be of integer type and *mod* must be nonzero. If *mod* is present and " @@ -2104,29 +2108,29 @@ msgid "" "*base* modulo *mod*." msgstr "" -#: ../../../library/functions.rst:1584 +#: ../../../library/functions.rst:1594 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" -#: ../../../library/functions.rst:1591 +#: ../../../library/functions.rst:1601 msgid "" "For :class:`int` operands, the three-argument form of ``pow`` now allows the " "second argument to be negative, permitting computation of modular inverses." msgstr "" -#: ../../../library/functions.rst:1596 +#: ../../../library/functions.rst:1606 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" -#: ../../../library/functions.rst:1603 +#: ../../../library/functions.rst:1613 msgid "" "Print *objects* to the text stream *file*, separated by *sep* and followed " "by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as " "keyword arguments." msgstr "" -#: ../../../library/functions.rst:1607 +#: ../../../library/functions.rst:1617 msgid "" "All non-keyword arguments are converted to strings like :func:`str` does and " "written to the stream, separated by *sep* and followed by *end*. Both *sep* " @@ -2135,7 +2139,7 @@ msgid "" "*end*." msgstr "" -#: ../../../library/functions.rst:1613 +#: ../../../library/functions.rst:1623 msgid "" "The *file* argument must be an object with a ``write(string)`` method; if it " "is not present or ``None``, :data:`sys.stdout` will be used. Since printed " @@ -2143,38 +2147,38 @@ msgid "" "binary mode file objects. For these, use ``file.write(...)`` instead." msgstr "" -#: ../../../library/functions.rst:1618 +#: ../../../library/functions.rst:1628 msgid "" "Output buffering is usually determined by *file*. However, if *flush* is " "true, the stream is forcibly flushed." msgstr "" -#: ../../../library/functions.rst:1622 +#: ../../../library/functions.rst:1632 msgid "Added the *flush* keyword argument." msgstr "" -#: ../../../library/functions.rst:1628 +#: ../../../library/functions.rst:1638 msgid "Return a property attribute." msgstr "" -#: ../../../library/functions.rst:1630 +#: ../../../library/functions.rst:1640 msgid "" "*fget* is a function for getting an attribute value. *fset* is a function " "for setting an attribute value. *fdel* is a function for deleting an " "attribute value. And *doc* creates a docstring for the attribute." msgstr "" -#: ../../../library/functions.rst:1634 +#: ../../../library/functions.rst:1644 msgid "A typical use is to define a managed attribute ``x``::" msgstr "" -#: ../../../library/functions.rst:1651 +#: ../../../library/functions.rst:1661 msgid "" "If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " "value`` will invoke the setter, and ``del c.x`` the deleter." msgstr "" -#: ../../../library/functions.rst:1654 +#: ../../../library/functions.rst:1664 msgid "" "If given, *doc* will be the docstring of the property attribute. Otherwise, " "the property will copy *fget*'s docstring (if it exists). This makes it " @@ -2182,14 +2186,14 @@ msgid "" "term:`decorator`::" msgstr "" -#: ../../../library/functions.rst:1667 +#: ../../../library/functions.rst:1677 msgid "" "The ``@property`` decorator turns the :meth:`!voltage` method into a " "\"getter\" for a read-only attribute with the same name, and it sets the " "docstring for *voltage* to \"Get the current voltage.\"" msgstr "" -#: ../../../library/functions.rst:1675 +#: ../../../library/functions.rst:1685 msgid "" "A property object has ``getter``, ``setter``, and ``deleter`` methods usable " "as decorators that create a copy of the property with the corresponding " @@ -2197,36 +2201,36 @@ msgid "" "with an example:" msgstr "" -#: ../../../library/functions.rst:1699 +#: ../../../library/functions.rst:1709 msgid "" "This code is exactly equivalent to the first example. Be sure to give the " "additional functions the same name as the original property (``x`` in this " "case.)" msgstr "" -#: ../../../library/functions.rst:1703 +#: ../../../library/functions.rst:1713 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." msgstr "" -#: ../../../library/functions.rst:1706 +#: ../../../library/functions.rst:1716 msgid "The docstrings of property objects are now writeable." msgstr "" -#: ../../../library/functions.rst:1711 +#: ../../../library/functions.rst:1721 msgid "" "Attribute holding the name of the property. The name of the property can be " "changed at runtime." msgstr "" -#: ../../../library/functions.rst:1722 +#: ../../../library/functions.rst:1732 msgid "" "Rather than being a function, :class:`range` is actually an immutable " "sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." msgstr "" -#: ../../../library/functions.rst:1728 +#: ../../../library/functions.rst:1738 msgid "" "Return a string containing a printable representation of an object. For " "many types, this function makes an attempt to return a string that would " @@ -2239,11 +2243,11 @@ msgid "" "raise :exc:`RuntimeError`." msgstr "" -#: ../../../library/functions.rst:1739 +#: ../../../library/functions.rst:1749 msgid "This class has a custom representation that can be evaluated::" msgstr "" -#: ../../../library/functions.rst:1752 +#: ../../../library/functions.rst:1762 msgid "" "Return a reverse :term:`iterator`. The argument must be an object which has " "a :meth:`~object.__reversed__` method or supports the sequence protocol " @@ -2251,14 +2255,14 @@ msgid "" "method with integer arguments starting at ``0``)." msgstr "" -#: ../../../library/functions.rst:1760 +#: ../../../library/functions.rst:1770 msgid "" "Return *number* rounded to *ndigits* precision after the decimal point. If " "*ndigits* is omitted or is ``None``, it returns the nearest integer to its " "input." msgstr "" -#: ../../../library/functions.rst:1764 +#: ../../../library/functions.rst:1774 msgid "" "For the built-in types supporting :func:`round`, values are rounded to the " "closest multiple of 10 to the power minus *ndigits*; if two multiples are " @@ -2269,13 +2273,13 @@ msgid "" "``None``. Otherwise, the return value has the same type as *number*." msgstr "" -#: ../../../library/functions.rst:1773 +#: ../../../library/functions.rst:1783 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." msgstr "" -#: ../../../library/functions.rst:1778 +#: ../../../library/functions.rst:1788 msgid "" "The behavior of :func:`round` for floats can be surprising: for example, " "``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is " @@ -2284,21 +2288,21 @@ msgid "" "information." msgstr "" -#: ../../../library/functions.rst:1789 +#: ../../../library/functions.rst:1799 msgid "" "Return a new :class:`set` object, optionally with elements taken from " "*iterable*. ``set`` is a built-in class. See :class:`set` and :ref:`types-" "set` for documentation about this class." msgstr "" -#: ../../../library/functions.rst:1793 +#: ../../../library/functions.rst:1803 msgid "" "For other containers see the built-in :class:`frozenset`, :class:`list`, :" "class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " "module." msgstr "" -#: ../../../library/functions.rst:1800 +#: ../../../library/functions.rst:1810 msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " "string, and an arbitrary value. The string may name an existing attribute " @@ -2307,7 +2311,7 @@ msgid "" "is equivalent to ``x.foobar = 123``." msgstr "" -#: ../../../library/functions.rst:1806 +#: ../../../library/functions.rst:1816 msgid "" "*name* need not be a Python identifier as defined in :ref:`identifiers` " "unless the object chooses to enforce that, for example in a custom :meth:" @@ -2316,74 +2320,74 @@ msgid "" "notation, but is accessible through :func:`getattr` etc.." msgstr "" -#: ../../../library/functions.rst:1814 +#: ../../../library/functions.rst:1824 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " "with two leading underscores) name in order to set it with :func:`setattr`." msgstr "" -#: ../../../library/functions.rst:1823 +#: ../../../library/functions.rst:1833 msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " "``None``." msgstr "" -#: ../../../library/functions.rst:1827 +#: ../../../library/functions.rst:1837 msgid "" "Slice objects are also generated when :ref:`slicing syntax ` is " "used. For example: ``a[start:stop:step]`` or ``a[start:stop, i]``." msgstr "" -#: ../../../library/functions.rst:1830 +#: ../../../library/functions.rst:1840 msgid "" "See :func:`itertools.islice` for an alternate version that returns an :term:" "`iterator`." msgstr "" -#: ../../../library/functions.rst:1837 +#: ../../../library/functions.rst:1847 msgid "" "These read-only attributes are set to the argument values (or their " "default). They have no other explicit functionality; however, they are used " "by NumPy and other third-party packages." msgstr "" -#: ../../../library/functions.rst:1841 +#: ../../../library/functions.rst:1851 msgid "" "Slice objects are now :term:`hashable` (provided :attr:`~slice.start`, :attr:" "`~slice.stop`, and :attr:`~slice.step` are hashable)." msgstr "" -#: ../../../library/functions.rst:1847 +#: ../../../library/functions.rst:1857 msgid "Return a new sorted list from the items in *iterable*." msgstr "" -#: ../../../library/functions.rst:1849 +#: ../../../library/functions.rst:1859 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "" -#: ../../../library/functions.rst:1851 +#: ../../../library/functions.rst:1861 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each element in *iterable* (for example, ``key=str." "lower``). The default value is ``None`` (compare the elements directly)." msgstr "" -#: ../../../library/functions.rst:1855 +#: ../../../library/functions.rst:1865 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../../library/functions.rst:1858 +#: ../../../library/functions.rst:1868 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." msgstr "" -#: ../../../library/functions.rst:1861 +#: ../../../library/functions.rst:1871 msgid "" "The built-in :func:`sorted` function is guaranteed to be stable. A sort is " "stable if it guarantees not to change the relative order of elements that " @@ -2391,7 +2395,7 @@ msgid "" "example, sort by department, then by salary grade)." msgstr "" -#: ../../../library/functions.rst:1866 +#: ../../../library/functions.rst:1876 msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -2403,28 +2407,28 @@ msgid "" "method." msgstr "" -#: ../../../library/functions.rst:1875 +#: ../../../library/functions.rst:1885 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../../library/functions.rst:1879 +#: ../../../library/functions.rst:1889 msgid "Transform a method into a static method." msgstr "" -#: ../../../library/functions.rst:1881 +#: ../../../library/functions.rst:1891 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" msgstr "" -#: ../../../library/functions.rst:1888 +#: ../../../library/functions.rst:1898 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." msgstr "" -#: ../../../library/functions.rst:1891 +#: ../../../library/functions.rst:1901 msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``). Moreover, the static method :term:" @@ -2432,14 +2436,14 @@ msgid "" "(such as ``f()``)." msgstr "" -#: ../../../library/functions.rst:1896 +#: ../../../library/functions.rst:1906 msgid "" "Static methods in Python are similar to those found in Java or C++. Also, " "see :func:`classmethod` for a variant that is useful for creating alternate " "class constructors." msgstr "" -#: ../../../library/functions.rst:1900 +#: ../../../library/functions.rst:1910 msgid "" "Like all decorators, it is also possible to call ``staticmethod`` as a " "regular function and do something with its result. This is needed in some " @@ -2448,11 +2452,11 @@ msgid "" "cases, use this idiom::" msgstr "" -#: ../../../library/functions.rst:1912 +#: ../../../library/functions.rst:1922 msgid "For more information on static methods, see :ref:`types`." msgstr "" -#: ../../../library/functions.rst:1914 +#: ../../../library/functions.rst:1924 msgid "" "Static methods now inherit the method attributes (:attr:`~function." "__module__`, :attr:`~function.__name__`, :attr:`~function.__qualname__`, :" @@ -2460,25 +2464,25 @@ msgid "" "``__wrapped__`` attribute, and are now callable as regular functions." msgstr "" -#: ../../../library/functions.rst:1932 +#: ../../../library/functions.rst:1942 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" -#: ../../../library/functions.rst:1934 +#: ../../../library/functions.rst:1944 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." msgstr "" -#: ../../../library/functions.rst:1940 +#: ../../../library/functions.rst:1950 msgid "" "Sums *start* and the items of an *iterable* from left to right and returns " "the total. The *iterable*'s items are normally numbers, and the start value " "is not allowed to be a string." msgstr "" -#: ../../../library/functions.rst:1944 +#: ../../../library/functions.rst:1954 msgid "" "For some use cases, there are good alternatives to :func:`sum`. The " "preferred, fast way to concatenate a sequence of strings is by calling ``''." @@ -2487,43 +2491,43 @@ msgid "" "using :func:`itertools.chain`." msgstr "" -#: ../../../library/functions.rst:1950 +#: ../../../library/functions.rst:1960 msgid "The *start* parameter can be specified as a keyword argument." msgstr "" -#: ../../../library/functions.rst:1953 +#: ../../../library/functions.rst:1963 msgid "" "Summation of floats switched to an algorithm that gives higher accuracy and " "better commutativity on most builds." msgstr "" -#: ../../../library/functions.rst:1956 +#: ../../../library/functions.rst:1966 msgid "" "Added specialization for summation of complexes, using same algorithm as for " "summation of floats." msgstr "" -#: ../../../library/functions.rst:1964 +#: ../../../library/functions.rst:1974 msgid "" "Return a proxy object that delegates method calls to a parent or sibling " "class of *type*. This is useful for accessing inherited methods that have " "been overridden in a class." msgstr "" -#: ../../../library/functions.rst:1968 +#: ../../../library/functions.rst:1978 msgid "" "The *object_or_type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." msgstr "" -#: ../../../library/functions.rst:1972 +#: ../../../library/functions.rst:1982 msgid "" "For example, if :attr:`~type.__mro__` of *object_or_type* is ``D -> B -> C -" "> A -> object`` and the value of *type* is ``B``, then :func:`super` " "searches ``C -> A -> object``." msgstr "" -#: ../../../library/functions.rst:1976 +#: ../../../library/functions.rst:1986 msgid "" "The :attr:`~type.__mro__` attribute of the class corresponding to " "*object_or_type* lists the method resolution search order used by both :func:" @@ -2531,7 +2535,7 @@ msgid "" "whenever the inheritance hierarchy is updated." msgstr "" -#: ../../../library/functions.rst:1981 +#: ../../../library/functions.rst:1991 msgid "" "If the second argument is omitted, the super object returned is unbound. If " "the second argument is an object, ``isinstance(obj, type)`` must be true. " @@ -2539,7 +2543,7 @@ msgid "" "(this is useful for classmethods)." msgstr "" -#: ../../../library/functions.rst:1986 +#: ../../../library/functions.rst:1996 msgid "" "When called directly within an ordinary method of a class, both arguments " "may be omitted (\"zero-argument :func:`!super`\"). In this case, *type* will " @@ -2549,7 +2553,7 @@ msgid "" "including generator expressions, which implicitly create nested functions.)" msgstr "" -#: ../../../library/functions.rst:1993 +#: ../../../library/functions.rst:2003 msgid "" "There are two typical use cases for *super*. In a class hierarchy with " "single inheritance, *super* can be used to refer to parent classes without " @@ -2557,7 +2561,7 @@ msgid "" "closely parallels the use of *super* in other programming languages." msgstr "" -#: ../../../library/functions.rst:1998 +#: ../../../library/functions.rst:2008 msgid "" "The second use case is to support cooperative multiple inheritance in a " "dynamic execution environment. This use case is unique to Python and is not " @@ -2570,18 +2574,18 @@ msgid "" "classes that are unknown prior to runtime)." msgstr "" -#: ../../../library/functions.rst:2008 +#: ../../../library/functions.rst:2018 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" -#: ../../../library/functions.rst:2015 +#: ../../../library/functions.rst:2025 msgid "" "In addition to method lookups, :func:`super` also works for attribute " "lookups. One possible use case for this is calling :term:`descriptors " "` in a parent or sibling class." msgstr "" -#: ../../../library/functions.rst:2019 +#: ../../../library/functions.rst:2029 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -2591,7 +2595,7 @@ msgid "" "using statements or operators such as ``super()[name]``." msgstr "" -#: ../../../library/functions.rst:2027 +#: ../../../library/functions.rst:2037 msgid "" "Also note that, aside from the zero argument form, :func:`super` is not " "limited to use inside methods. The two argument form specifies the " @@ -2601,39 +2605,39 @@ msgid "" "accessing the current instance for ordinary methods." msgstr "" -#: ../../../library/functions.rst:2034 +#: ../../../library/functions.rst:2044 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." msgstr "" -#: ../../../library/functions.rst:2038 +#: ../../../library/functions.rst:2048 msgid "" ":class:`super` objects are now :mod:`pickleable ` and :mod:" "`copyable `." msgstr "" -#: ../../../library/functions.rst:2047 +#: ../../../library/functions.rst:2057 msgid "" "Rather than being a function, :class:`tuple` is actually an immutable " "sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." msgstr "" -#: ../../../library/functions.rst:2056 +#: ../../../library/functions.rst:2066 msgid "" "With one argument, return the type of an *object*. The return value is a " "type object and generally the same object as returned by :attr:`object." "__class__`." msgstr "" -#: ../../../library/functions.rst:2060 +#: ../../../library/functions.rst:2070 msgid "" "The :func:`isinstance` built-in function is recommended for testing the type " "of an object, because it takes subclasses into account." msgstr "" -#: ../../../library/functions.rst:2063 +#: ../../../library/functions.rst:2073 msgid "" "With three arguments, return a new type object. This is essentially a " "dynamic form of the :keyword:`class` statement. The *name* string is the " @@ -2646,21 +2650,21 @@ msgid "" "type` objects:" msgstr "" -#: ../../../library/functions.rst:2078 +#: ../../../library/functions.rst:2088 msgid "See also:" msgstr "" -#: ../../../library/functions.rst:2080 +#: ../../../library/functions.rst:2090 msgid "" ":ref:`Documentation on attributes and methods on classes `." msgstr "" -#: ../../../library/functions.rst:2081 +#: ../../../library/functions.rst:2091 msgid ":ref:`bltin-type-objects`" msgstr "" -#: ../../../library/functions.rst:2083 +#: ../../../library/functions.rst:2093 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -2668,23 +2672,27 @@ msgid "" "would." msgstr "" -#: ../../../library/functions.rst:2088 +#: ../../../library/functions.rst:2098 msgid "See also :ref:`class-customization`." msgstr "" -#: ../../../library/functions.rst:2090 +#: ../../../library/functions.rst:2100 msgid "" "Subclasses of :class:`!type` which don't override ``type.__new__`` may no " "longer use the one-argument form to get the type of an object." msgstr "" -#: ../../../library/functions.rst:2097 +#: ../../../library/functions.rst:2106 +msgid "*dict* can now be a :class:`frozendict`." +msgstr "" + +#: ../../../library/functions.rst:2111 msgid "" "Return the :attr:`~object.__dict__` attribute for a module, class, instance, " "or any other object with a :attr:`!__dict__` attribute." msgstr "" -#: ../../../library/functions.rst:2100 +#: ../../../library/functions.rst:2114 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -2692,54 +2700,54 @@ msgid "" "MappingProxyType` to prevent direct dictionary updates)." msgstr "" -#: ../../../library/functions.rst:2105 +#: ../../../library/functions.rst:2119 msgid "Without an argument, :func:`vars` acts like :func:`locals`." msgstr "" -#: ../../../library/functions.rst:2107 +#: ../../../library/functions.rst:2121 msgid "" "A :exc:`TypeError` exception is raised if an object is specified but it " "doesn't have a :attr:`~object.__dict__` attribute (for example, if its class " "defines the :attr:`~object.__slots__` attribute)." msgstr "" -#: ../../../library/functions.rst:2113 +#: ../../../library/functions.rst:2127 msgid "" "The result of calling this function without an argument has been updated as " "described for the :func:`locals` builtin." msgstr "" -#: ../../../library/functions.rst:2119 +#: ../../../library/functions.rst:2133 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." msgstr "" -#: ../../../library/functions.rst:2122 +#: ../../../library/functions.rst:2136 msgid "Example::" msgstr "" -#: ../../../library/functions.rst:2131 +#: ../../../library/functions.rst:2145 msgid "" "More formally: :func:`zip` returns an iterator of tuples, where the *i*-th " "tuple contains the *i*-th element from each of the argument iterables." msgstr "" -#: ../../../library/functions.rst:2134 +#: ../../../library/functions.rst:2148 msgid "" "Another way to think of :func:`zip` is that it turns rows into columns, and " "columns into rows. This is similar to `transposing a matrix `_." msgstr "" -#: ../../../library/functions.rst:2138 +#: ../../../library/functions.rst:2152 msgid "" ":func:`zip` is lazy: The elements won't be processed until the iterable is " "iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:" "`list`." msgstr "" -#: ../../../library/functions.rst:2142 +#: ../../../library/functions.rst:2156 msgid "" "One thing to consider is that the iterables passed to :func:`zip` could have " "different lengths; sometimes by design, and sometimes because of a bug in " @@ -2747,51 +2755,51 @@ msgid "" "approaches to dealing with this issue:" msgstr "" -#: ../../../library/functions.rst:2147 +#: ../../../library/functions.rst:2161 msgid "" "By default, :func:`zip` stops when the shortest iterable is exhausted. It " "will ignore the remaining items in the longer iterables, cutting off the " "result to the length of the shortest iterable::" msgstr "" -#: ../../../library/functions.rst:2154 +#: ../../../library/functions.rst:2168 msgid "" ":func:`zip` is often used in cases where the iterables are assumed to be of " "equal length. In such cases, it's recommended to use the ``strict=True`` " "option. Its output is the same as regular :func:`zip`::" msgstr "" -#: ../../../library/functions.rst:2161 +#: ../../../library/functions.rst:2175 msgid "" "Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " "is exhausted before the others:" msgstr "" -#: ../../../library/functions.rst:2179 +#: ../../../library/functions.rst:2193 msgid "" "Without the ``strict=True`` argument, any bug that results in iterables of " "different lengths will be silenced, possibly manifesting as a hard-to-find " "bug in another part of the program." msgstr "" -#: ../../../library/functions.rst:2183 +#: ../../../library/functions.rst:2197 msgid "" "Shorter iterables can be padded with a constant value to make all the " "iterables have the same length. This is done by :func:`itertools." "zip_longest`." msgstr "" -#: ../../../library/functions.rst:2187 +#: ../../../library/functions.rst:2201 msgid "" "Edge cases: With a single iterable argument, :func:`zip` returns an iterator " "of 1-tuples. With no arguments, it returns an empty iterator." msgstr "" -#: ../../../library/functions.rst:2190 +#: ../../../library/functions.rst:2204 msgid "Tips and tricks:" msgstr "" -#: ../../../library/functions.rst:2192 +#: ../../../library/functions.rst:2206 msgid "" "The left-to-right evaluation order of the iterables is guaranteed. This " "makes possible an idiom for clustering a data series into n-length groups " @@ -2800,23 +2808,23 @@ msgid "" "iterator. This has the effect of dividing the input into n-length chunks." msgstr "" -#: ../../../library/functions.rst:2198 +#: ../../../library/functions.rst:2212 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" msgstr "" -#: ../../../library/functions.rst:2209 +#: ../../../library/functions.rst:2223 msgid "Added the ``strict`` argument." msgstr "" -#: ../../../library/functions.rst:2221 +#: ../../../library/functions.rst:2235 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." msgstr "" -#: ../../../library/functions.rst:2224 +#: ../../../library/functions.rst:2238 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -2828,7 +2836,7 @@ msgid "" "discouraged in favor of :func:`importlib.import_module`." msgstr "" -#: ../../../library/functions.rst:2233 +#: ../../../library/functions.rst:2247 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -2838,7 +2846,7 @@ msgid "" "determine the package context of the :keyword:`import` statement." msgstr "" -#: ../../../library/functions.rst:2240 +#: ../../../library/functions.rst:2254 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -2847,7 +2855,7 @@ msgid "" "details)." msgstr "" -#: ../../../library/functions.rst:2246 +#: ../../../library/functions.rst:2260 msgid "" "When the *name* variable is of the form ``package.module``, normally, the " "top-level package (the name up till the first dot) is returned, *not* the " @@ -2855,58 +2863,58 @@ msgid "" "given, the module named by *name* is returned." msgstr "" -#: ../../../library/functions.rst:2251 +#: ../../../library/functions.rst:2265 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" msgstr "" -#: ../../../library/functions.rst:2256 +#: ../../../library/functions.rst:2270 msgid "The statement ``import spam.ham`` results in this call::" msgstr "" -#: ../../../library/functions.rst:2260 +#: ../../../library/functions.rst:2274 msgid "" "Note how :func:`__import__` returns the toplevel module here because this is " "the object that is bound to a name by the :keyword:`import` statement." msgstr "" -#: ../../../library/functions.rst:2263 +#: ../../../library/functions.rst:2277 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" msgstr "" -#: ../../../library/functions.rst:2270 +#: ../../../library/functions.rst:2284 msgid "" "Here, the ``spam.ham`` module is returned from :func:`__import__`. From " "this object, the names to import are retrieved and assigned to their " "respective names." msgstr "" -#: ../../../library/functions.rst:2274 +#: ../../../library/functions.rst:2288 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." msgstr "" -#: ../../../library/functions.rst:2277 +#: ../../../library/functions.rst:2291 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." msgstr "" -#: ../../../library/functions.rst:2281 +#: ../../../library/functions.rst:2295 msgid "" "When the command line options :option:`-E` or :option:`-I` are being used, " "the environment variable :envvar:`PYTHONCASEOK` is now ignored." msgstr "" -#: ../../../library/functions.rst:2286 +#: ../../../library/functions.rst:2300 msgid "Footnotes" msgstr "" -#: ../../../library/functions.rst:2287 +#: ../../../library/functions.rst:2301 msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " "you are reading the code from a file, make sure to use newline conversion " @@ -2917,106 +2925,106 @@ msgstr "" msgid "Boolean" msgstr "" -#: ../../../library/functions.rst:156 ../../../library/functions.rst:2054 +#: ../../../library/functions.rst:156 ../../../library/functions.rst:2064 msgid "type" msgstr "" -#: ../../../library/functions.rst:663 +#: ../../../library/functions.rst:668 msgid "built-in function" msgstr "" -#: ../../../library/functions.rst:663 +#: ../../../library/functions.rst:668 msgid "exec" msgstr "" -#: ../../../library/functions.rst:761 +#: ../../../library/functions.rst:771 msgid "NaN" msgstr "" -#: ../../../library/functions.rst:761 +#: ../../../library/functions.rst:771 msgid "Infinity" msgstr "" -#: ../../../library/functions.rst:831 +#: ../../../library/functions.rst:841 msgid "__format__" msgstr "" -#: ../../../library/functions.rst:831 ../../../library/functions.rst:1922 +#: ../../../library/functions.rst:841 ../../../library/functions.rst:1932 msgid "string" msgstr "" -#: ../../../library/functions.rst:831 +#: ../../../library/functions.rst:841 msgid "format() (built-in function)" msgstr "" -#: ../../../library/functions.rst:1345 +#: ../../../library/functions.rst:1355 msgid "file object" msgstr "" -#: ../../../library/functions.rst:1345 ../../../library/functions.rst:1438 +#: ../../../library/functions.rst:1355 ../../../library/functions.rst:1448 msgid "open() built-in function" msgstr "" -#: ../../../library/functions.rst:1373 +#: ../../../library/functions.rst:1383 msgid "file" msgstr "" -#: ../../../library/functions.rst:1373 +#: ../../../library/functions.rst:1383 msgid "modes" msgstr "" -#: ../../../library/functions.rst:1438 +#: ../../../library/functions.rst:1448 msgid "universal newlines" msgstr "" -#: ../../../library/functions.rst:1499 +#: ../../../library/functions.rst:1509 msgid "line-buffered I/O" msgstr "" -#: ../../../library/functions.rst:1499 +#: ../../../library/functions.rst:1509 msgid "unbuffered I/O" msgstr "" -#: ../../../library/functions.rst:1499 +#: ../../../library/functions.rst:1509 msgid "buffer size, I/O" msgstr "" -#: ../../../library/functions.rst:1499 +#: ../../../library/functions.rst:1509 msgid "I/O control" msgstr "" -#: ../../../library/functions.rst:1499 +#: ../../../library/functions.rst:1509 msgid "buffering" msgstr "" -#: ../../../library/functions.rst:1499 +#: ../../../library/functions.rst:1509 msgid "text mode" msgstr "" -#: ../../../library/functions.rst:1499 ../../../library/functions.rst:2215 +#: ../../../library/functions.rst:1509 ../../../library/functions.rst:2229 msgid "module" msgstr "" -#: ../../../library/functions.rst:1499 +#: ../../../library/functions.rst:1509 msgid "sys" msgstr "" -#: ../../../library/functions.rst:1922 +#: ../../../library/functions.rst:1932 msgid "str() (built-in function)" msgstr "" -#: ../../../library/functions.rst:2054 +#: ../../../library/functions.rst:2064 msgid "object" msgstr "" -#: ../../../library/functions.rst:2215 +#: ../../../library/functions.rst:2229 msgid "statement" msgstr "" -#: ../../../library/functions.rst:2215 +#: ../../../library/functions.rst:2229 msgid "import" msgstr "" -#: ../../../library/functions.rst:2215 +#: ../../../library/functions.rst:2229 msgid "builtins" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/marshal.pot b/main/locale/pot/LC_MESSAGES/library/marshal.pot index 0d0afb20091..8b82eddf7ee 100644 --- a/main/locale/pot/LC_MESSAGES/library/marshal.pot +++ b/main/locale/pot/LC_MESSAGES/library/marshal.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -80,50 +80,55 @@ msgstr "" #: ../../../library/marshal.rst:54 msgid "" -"Containers: :class:`tuple`, :class:`list`, :class:`set`, :class:`frozenset`, " -"and (since :data:`version` 5), :class:`slice`. It should be understood that " +"Containers: :class:`tuple`, :class:`list`, :class:`dict`, :class:" +"`frozendict` (since :data:`version` 6), :class:`set`, :class:`frozenset`, " +"and :class:`slice` (since :data:`version` 5). It should be understood that " "these are supported only if the values contained therein are themselves " "supported. Recursive containers are supported since :data:`version` 3." msgstr "" -#: ../../../library/marshal.rst:59 +#: ../../../library/marshal.rst:60 msgid "" "The singletons :const:`None`, :const:`Ellipsis` and :exc:`StopIteration`." msgstr "" -#: ../../../library/marshal.rst:60 +#: ../../../library/marshal.rst:61 msgid "" ":class:`code` objects, if *allow_code* is true. See note above about version " "dependence." msgstr "" -#: ../../../library/marshal.rst:65 +#: ../../../library/marshal.rst:66 msgid "" "Added format version 3, which supports marshalling recursive lists, sets and " "dictionaries." msgstr "" -#: ../../../library/marshal.rst:67 +#: ../../../library/marshal.rst:68 msgid "" "Added format version 4, which supports efficient representations of short " "strings." msgstr "" -#: ../../../library/marshal.rst:72 +#: ../../../library/marshal.rst:73 msgid "Added format version 5, which allows marshalling slices." msgstr "" -#: ../../../library/marshal.rst:75 -msgid "The module defines these functions:" +#: ../../../library/marshal.rst:77 +msgid "Added format version 6, which allows marshalling :class:`frozendict`." msgstr "" #: ../../../library/marshal.rst:80 +msgid "The module defines these functions:" +msgstr "" + +#: ../../../library/marshal.rst:85 msgid "" "Write the value on the open file. The value must be a supported type. The " "file must be a writeable :term:`binary file`." msgstr "" -#: ../../../library/marshal.rst:83 +#: ../../../library/marshal.rst:88 msgid "" "If the value has (or contains an object that has) an unsupported type, a :" "exc:`ValueError` exception is raised --- but garbage data will also be " @@ -132,24 +137,24 @@ msgid "" "*allow_code* is true." msgstr "" -#: ../../../library/marshal.rst:88 +#: ../../../library/marshal.rst:93 msgid "" "The *version* argument indicates the data format that ``dump`` should use " "(see below)." msgstr "" -#: ../../../library/marshal.rst:91 ../../../library/marshal.rst:131 +#: ../../../library/marshal.rst:96 ../../../library/marshal.rst:136 msgid "" "Raises an :ref:`auditing event ` ``marshal.dumps`` with arguments " "``value``, ``version``." msgstr "" -#: ../../../library/marshal.rst:93 ../../../library/marshal.rst:117 -#: ../../../library/marshal.rst:133 ../../../library/marshal.rst:151 +#: ../../../library/marshal.rst:98 ../../../library/marshal.rst:122 +#: ../../../library/marshal.rst:138 ../../../library/marshal.rst:156 msgid "Added the *allow_code* parameter." msgstr "" -#: ../../../library/marshal.rst:99 +#: ../../../library/marshal.rst:104 msgid "" "Read one value from the open file and return it. If no valid value is read " "(e.g. because the data has a different Python version's incompatible marshal " @@ -158,25 +163,25 @@ msgid "" "The file must be a readable :term:`binary file`." msgstr "" -#: ../../../library/marshal.rst:105 +#: ../../../library/marshal.rst:110 msgid "" "Raises an :ref:`auditing event ` ``marshal.load`` with no " "arguments." msgstr "" -#: ../../../library/marshal.rst:109 +#: ../../../library/marshal.rst:114 msgid "" "If an object containing an unsupported type was marshalled with :func:" "`dump`, :func:`load` will substitute ``None`` for the unmarshallable type." msgstr "" -#: ../../../library/marshal.rst:114 +#: ../../../library/marshal.rst:119 msgid "" "This call used to raise a ``code.__new__`` audit event for each code object. " "Now it raises a single ``marshal.load`` event for the entire load operation." msgstr "" -#: ../../../library/marshal.rst:123 +#: ../../../library/marshal.rst:128 msgid "" "Return the bytes object that would be written to a file by ``dump(value, " "file)``. The value must be a supported type. Raise a :exc:`ValueError` " @@ -185,13 +190,13 @@ msgid "" "is true." msgstr "" -#: ../../../library/marshal.rst:128 +#: ../../../library/marshal.rst:133 msgid "" "The *version* argument indicates the data format that ``dumps`` should use " "(see below)." msgstr "" -#: ../../../library/marshal.rst:139 +#: ../../../library/marshal.rst:144 msgid "" "Convert the :term:`bytes-like object` to a value. If no valid value is " "found, raise :exc:`EOFError`, :exc:`ValueError` or :exc:`TypeError`. :ref:" @@ -199,102 +204,114 @@ msgid "" "Extra bytes in the input are ignored." msgstr "" -#: ../../../library/marshal.rst:144 +#: ../../../library/marshal.rst:149 msgid "" "Raises an :ref:`auditing event ` ``marshal.loads`` with argument " "``bytes``." msgstr "" -#: ../../../library/marshal.rst:148 +#: ../../../library/marshal.rst:153 msgid "" "This call used to raise a ``code.__new__`` audit event for each code object. " "Now it raises a single ``marshal.loads`` event for the entire load operation." msgstr "" -#: ../../../library/marshal.rst:155 +#: ../../../library/marshal.rst:160 msgid "In addition, the following constants are defined:" msgstr "" -#: ../../../library/marshal.rst:159 +#: ../../../library/marshal.rst:164 msgid "" "Indicates the format that the module uses. Version 0 is the historical first " "version; subsequent versions add new features. Generally, a new version " "becomes the default when it is introduced." msgstr "" -#: ../../../library/marshal.rst:165 +#: ../../../library/marshal.rst:170 msgid "Version" msgstr "" -#: ../../../library/marshal.rst:165 +#: ../../../library/marshal.rst:170 msgid "Available since" msgstr "" -#: ../../../library/marshal.rst:165 +#: ../../../library/marshal.rst:170 msgid "New features" msgstr "" -#: ../../../library/marshal.rst:167 +#: ../../../library/marshal.rst:172 msgid "1" msgstr "" -#: ../../../library/marshal.rst:167 +#: ../../../library/marshal.rst:172 msgid "Python 2.4" msgstr "" -#: ../../../library/marshal.rst:167 +#: ../../../library/marshal.rst:172 msgid "Sharing interned strings" msgstr "" -#: ../../../library/marshal.rst:169 +#: ../../../library/marshal.rst:174 msgid "2" msgstr "" -#: ../../../library/marshal.rst:169 +#: ../../../library/marshal.rst:174 msgid "Python 2.5" msgstr "" -#: ../../../library/marshal.rst:169 +#: ../../../library/marshal.rst:174 msgid "Binary representation of floats" msgstr "" -#: ../../../library/marshal.rst:171 +#: ../../../library/marshal.rst:176 msgid "3" msgstr "" -#: ../../../library/marshal.rst:171 ../../../library/marshal.rst:173 +#: ../../../library/marshal.rst:176 ../../../library/marshal.rst:178 msgid "Python 3.4" msgstr "" -#: ../../../library/marshal.rst:171 +#: ../../../library/marshal.rst:176 msgid "Support for object instancing and recursion" msgstr "" -#: ../../../library/marshal.rst:173 +#: ../../../library/marshal.rst:178 msgid "4" msgstr "" -#: ../../../library/marshal.rst:173 +#: ../../../library/marshal.rst:178 msgid "Efficient representation of short strings" msgstr "" -#: ../../../library/marshal.rst:175 +#: ../../../library/marshal.rst:180 msgid "5" msgstr "" -#: ../../../library/marshal.rst:175 +#: ../../../library/marshal.rst:180 msgid "Python 3.14" msgstr "" -#: ../../../library/marshal.rst:175 +#: ../../../library/marshal.rst:180 msgid "Support for :class:`slice` objects" msgstr "" -#: ../../../library/marshal.rst:180 +#: ../../../library/marshal.rst:182 +msgid "6" +msgstr "" + +#: ../../../library/marshal.rst:182 +msgid "Python 3.15" +msgstr "" + +#: ../../../library/marshal.rst:182 +msgid "Support for :class:`frozendict` objects" +msgstr "" + +#: ../../../library/marshal.rst:187 msgid "Footnotes" msgstr "" -#: ../../../library/marshal.rst:181 +#: ../../../library/marshal.rst:188 msgid "" "The name of this module stems from a bit of terminology used by the " "designers of Modula-3 (amongst others), who use the term \"marshalling\" for " diff --git a/main/locale/pot/LC_MESSAGES/library/os.pot b/main/locale/pot/LC_MESSAGES/library/os.pot index 8f6de28c734..f8dc3fb1697 100644 --- a/main/locale/pot/LC_MESSAGES/library/os.pot +++ b/main/locale/pot/LC_MESSAGES/library/os.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -318,63 +318,63 @@ msgstr "" #: ../../../library/os.rst:2256 ../../../library/os.rst:2273 #: ../../../library/os.rst:2287 ../../../library/os.rst:2313 #: ../../../library/os.rst:2331 ../../../library/os.rst:2347 -#: ../../../library/os.rst:2364 ../../../library/os.rst:2427 -#: ../../../library/os.rst:2451 ../../../library/os.rst:2471 -#: ../../../library/os.rst:2607 ../../../library/os.rst:2629 -#: ../../../library/os.rst:2680 ../../../library/os.rst:2692 -#: ../../../library/os.rst:2714 ../../../library/os.rst:3416 -#: ../../../library/os.rst:3448 ../../../library/os.rst:3458 -#: ../../../library/os.rst:3468 ../../../library/os.rst:3478 -#: ../../../library/os.rst:3552 ../../../library/os.rst:3562 -#: ../../../library/os.rst:3572 ../../../library/os.rst:3601 -#: ../../../library/os.rst:3661 ../../../library/os.rst:3673 -#: ../../../library/os.rst:3702 ../../../library/os.rst:3712 -#: ../../../library/os.rst:3721 ../../../library/os.rst:3733 -#: ../../../library/os.rst:3745 ../../../library/os.rst:3775 -#: ../../../library/os.rst:3912 ../../../library/os.rst:3935 -#: ../../../library/os.rst:3949 ../../../library/os.rst:4173 -#: ../../../library/os.rst:4198 ../../../library/os.rst:4223 -#: ../../../library/os.rst:4277 ../../../library/os.rst:4286 -#: ../../../library/os.rst:4295 ../../../library/os.rst:4303 -#: ../../../library/os.rst:4312 ../../../library/os.rst:4321 -#: ../../../library/os.rst:4393 ../../../library/os.rst:4456 -#: ../../../library/os.rst:4466 ../../../library/os.rst:4484 -#: ../../../library/os.rst:4493 ../../../library/os.rst:4503 -#: ../../../library/os.rst:4513 ../../../library/os.rst:4523 -#: ../../../library/os.rst:4534 ../../../library/os.rst:4679 -#: ../../../library/os.rst:4748 ../../../library/os.rst:4783 -#: ../../../library/os.rst:4791 ../../../library/os.rst:4798 -#: ../../../library/os.rst:4805 ../../../library/os.rst:4812 -#: ../../../library/os.rst:4819 ../../../library/os.rst:4826 -#: ../../../library/os.rst:4833 ../../../library/os.rst:4841 -#: ../../../library/os.rst:4849 ../../../library/os.rst:4856 -#: ../../../library/os.rst:4863 ../../../library/os.rst:4872 -#: ../../../library/os.rst:4880 ../../../library/os.rst:4888 -#: ../../../library/os.rst:4895 ../../../library/os.rst:4902 -#: ../../../library/os.rst:4951 ../../../library/os.rst:4983 -#: ../../../library/os.rst:5006 ../../../library/os.rst:5022 -#: ../../../library/os.rst:5029 ../../../library/os.rst:5040 -#: ../../../library/os.rst:5050 ../../../library/os.rst:5059 -#: ../../../library/os.rst:5091 ../../../library/os.rst:5203 -#: ../../../library/os.rst:5219 ../../../library/os.rst:5252 -#: ../../../library/os.rst:5321 ../../../library/os.rst:5344 -#: ../../../library/os.rst:5355 ../../../library/os.rst:5367 -#: ../../../library/os.rst:5412 ../../../library/os.rst:5449 -#: ../../../library/os.rst:5472 ../../../library/os.rst:5493 -#: ../../../library/os.rst:5527 ../../../library/os.rst:5568 -#: ../../../library/os.rst:5588 ../../../library/os.rst:5602 -#: ../../../library/os.rst:5619 ../../../library/os.rst:5634 -#: ../../../library/os.rst:5645 ../../../library/os.rst:5657 -#: ../../../library/os.rst:5670 ../../../library/os.rst:5679 -#: ../../../library/os.rst:5689 ../../../library/os.rst:5702 -#: ../../../library/os.rst:5737 ../../../library/os.rst:5753 -#: ../../../library/os.rst:5764 ../../../library/os.rst:5776 -#: ../../../library/os.rst:5783 ../../../library/os.rst:5792 -#: ../../../library/os.rst:5801 ../../../library/os.rst:5810 -#: ../../../library/os.rst:5819 ../../../library/os.rst:5983 -#: ../../../library/os.rst:5992 ../../../library/os.rst:6016 -#: ../../../library/os.rst:6043 ../../../library/os.rst:6052 -#: ../../../library/os.rst:6175 +#: ../../../library/os.rst:2364 ../../../library/os.rst:2431 +#: ../../../library/os.rst:2455 ../../../library/os.rst:2475 +#: ../../../library/os.rst:2611 ../../../library/os.rst:2633 +#: ../../../library/os.rst:2684 ../../../library/os.rst:2696 +#: ../../../library/os.rst:2718 ../../../library/os.rst:3424 +#: ../../../library/os.rst:3456 ../../../library/os.rst:3466 +#: ../../../library/os.rst:3476 ../../../library/os.rst:3486 +#: ../../../library/os.rst:3560 ../../../library/os.rst:3570 +#: ../../../library/os.rst:3580 ../../../library/os.rst:3609 +#: ../../../library/os.rst:3669 ../../../library/os.rst:3681 +#: ../../../library/os.rst:3710 ../../../library/os.rst:3720 +#: ../../../library/os.rst:3729 ../../../library/os.rst:3741 +#: ../../../library/os.rst:3753 ../../../library/os.rst:3783 +#: ../../../library/os.rst:3920 ../../../library/os.rst:3943 +#: ../../../library/os.rst:3957 ../../../library/os.rst:4181 +#: ../../../library/os.rst:4206 ../../../library/os.rst:4231 +#: ../../../library/os.rst:4285 ../../../library/os.rst:4294 +#: ../../../library/os.rst:4303 ../../../library/os.rst:4311 +#: ../../../library/os.rst:4320 ../../../library/os.rst:4329 +#: ../../../library/os.rst:4401 ../../../library/os.rst:4464 +#: ../../../library/os.rst:4474 ../../../library/os.rst:4492 +#: ../../../library/os.rst:4501 ../../../library/os.rst:4511 +#: ../../../library/os.rst:4521 ../../../library/os.rst:4531 +#: ../../../library/os.rst:4542 ../../../library/os.rst:4691 +#: ../../../library/os.rst:4760 ../../../library/os.rst:4795 +#: ../../../library/os.rst:4803 ../../../library/os.rst:4810 +#: ../../../library/os.rst:4817 ../../../library/os.rst:4824 +#: ../../../library/os.rst:4831 ../../../library/os.rst:4838 +#: ../../../library/os.rst:4845 ../../../library/os.rst:4853 +#: ../../../library/os.rst:4861 ../../../library/os.rst:4868 +#: ../../../library/os.rst:4875 ../../../library/os.rst:4884 +#: ../../../library/os.rst:4892 ../../../library/os.rst:4900 +#: ../../../library/os.rst:4907 ../../../library/os.rst:4914 +#: ../../../library/os.rst:4963 ../../../library/os.rst:4995 +#: ../../../library/os.rst:5018 ../../../library/os.rst:5034 +#: ../../../library/os.rst:5041 ../../../library/os.rst:5052 +#: ../../../library/os.rst:5062 ../../../library/os.rst:5071 +#: ../../../library/os.rst:5103 ../../../library/os.rst:5215 +#: ../../../library/os.rst:5231 ../../../library/os.rst:5264 +#: ../../../library/os.rst:5333 ../../../library/os.rst:5356 +#: ../../../library/os.rst:5367 ../../../library/os.rst:5379 +#: ../../../library/os.rst:5424 ../../../library/os.rst:5461 +#: ../../../library/os.rst:5484 ../../../library/os.rst:5505 +#: ../../../library/os.rst:5539 ../../../library/os.rst:5580 +#: ../../../library/os.rst:5600 ../../../library/os.rst:5614 +#: ../../../library/os.rst:5631 ../../../library/os.rst:5646 +#: ../../../library/os.rst:5657 ../../../library/os.rst:5669 +#: ../../../library/os.rst:5682 ../../../library/os.rst:5691 +#: ../../../library/os.rst:5701 ../../../library/os.rst:5714 +#: ../../../library/os.rst:5749 ../../../library/os.rst:5765 +#: ../../../library/os.rst:5776 ../../../library/os.rst:5788 +#: ../../../library/os.rst:5795 ../../../library/os.rst:5804 +#: ../../../library/os.rst:5813 ../../../library/os.rst:5822 +#: ../../../library/os.rst:5831 ../../../library/os.rst:5995 +#: ../../../library/os.rst:6004 ../../../library/os.rst:6028 +#: ../../../library/os.rst:6055 ../../../library/os.rst:6064 +#: ../../../library/os.rst:6187 msgid "Availability" msgstr "" @@ -929,7 +929,7 @@ msgid "" "on iOS and Android." msgstr "" -#: ../../../library/os.rst:816 ../../../library/os.rst:5474 +#: ../../../library/os.rst:816 ../../../library/os.rst:5486 msgid "" "Return type changed from a tuple to a tuple-like object with named " "attributes." @@ -1155,7 +1155,7 @@ msgstr "" #: ../../../library/os.rst:1035 ../../../library/os.rst:1053 #: ../../../library/os.rst:1144 ../../../library/os.rst:1777 #: ../../../library/os.rst:2225 ../../../library/os.rst:2258 -#: ../../../library/os.rst:3914 +#: ../../../library/os.rst:3922 msgid "" "The function is limited on WASI, see :ref:`wasm-availability` for more " "information." @@ -1200,7 +1200,7 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../../library/os.rst:1078 ../../../library/os.rst:2672 +#: ../../../library/os.rst:1078 ../../../library/os.rst:2676 msgid "" "If *name* is a string and is not known, :exc:`ValueError` is raised. If a " "specific value for *name* is not supported by the host system, even if it is " @@ -1222,7 +1222,7 @@ msgstr "" msgid "As of Python 3.3, this is equivalent to ``os.stat(fd)``." msgstr "" -#: ../../../library/os.rst:1097 ../../../library/os.rst:2493 +#: ../../../library/os.rst:1097 ../../../library/os.rst:2497 msgid "The :func:`.stat` function." msgstr "" @@ -1260,7 +1260,7 @@ msgid "" "``fd``, ``length``." msgstr "" -#: ../../../library/os.rst:1131 ../../../library/os.rst:3953 +#: ../../../library/os.rst:1131 ../../../library/os.rst:3961 msgid "Added support for Windows" msgstr "" @@ -1457,20 +1457,20 @@ msgstr "" msgid "" "This function is intended for low-level I/O. For normal usage, use the " "built-in function :func:`open`, which returns a :term:`file object` with :" -"meth:`~file.read` and :meth:`~file.write` methods (and many more). To wrap " -"a file descriptor in a file object, use :func:`fdopen`." +"meth:`~io.BufferedIOBase.read` and :meth:`~io.BufferedIOBase.write` methods. " +"To wrap a file descriptor in a file object, use :func:`fdopen`." msgstr "" -#: ../../../library/os.rst:1300 ../../../library/os.rst:2498 -#: ../../../library/os.rst:2538 ../../../library/os.rst:2609 -#: ../../../library/os.rst:2631 ../../../library/os.rst:2719 -#: ../../../library/os.rst:2749 ../../../library/os.rst:2856 -#: ../../../library/os.rst:3969 +#: ../../../library/os.rst:1300 ../../../library/os.rst:2502 +#: ../../../library/os.rst:2542 ../../../library/os.rst:2613 +#: ../../../library/os.rst:2635 ../../../library/os.rst:2723 +#: ../../../library/os.rst:2753 ../../../library/os.rst:2860 +#: ../../../library/os.rst:3977 msgid "Added the *dir_fd* parameter." msgstr "" #: ../../../library/os.rst:1303 ../../../library/os.rst:1675 -#: ../../../library/os.rst:1910 ../../../library/os.rst:5570 +#: ../../../library/os.rst:1910 ../../../library/os.rst:5582 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" @@ -1482,16 +1482,16 @@ msgstr "" #: ../../../library/os.rst:2234 ../../../library/os.rst:2275 #: ../../../library/os.rst:2315 ../../../library/os.rst:2333 #: ../../../library/os.rst:2349 ../../../library/os.rst:2409 -#: ../../../library/os.rst:2501 ../../../library/os.rst:2541 -#: ../../../library/os.rst:2585 ../../../library/os.rst:2612 -#: ../../../library/os.rst:2634 ../../../library/os.rst:2682 -#: ../../../library/os.rst:2752 ../../../library/os.rst:2771 -#: ../../../library/os.rst:2859 ../../../library/os.rst:3149 -#: ../../../library/os.rst:3789 ../../../library/os.rst:3956 -#: ../../../library/os.rst:3972 ../../../library/os.rst:4013 -#: ../../../library/os.rst:4116 ../../../library/os.rst:4177 -#: ../../../library/os.rst:4574 ../../../library/os.rst:4754 -#: ../../../library/os.rst:5328 +#: ../../../library/os.rst:2505 ../../../library/os.rst:2545 +#: ../../../library/os.rst:2589 ../../../library/os.rst:2616 +#: ../../../library/os.rst:2638 ../../../library/os.rst:2686 +#: ../../../library/os.rst:2756 ../../../library/os.rst:2775 +#: ../../../library/os.rst:2863 ../../../library/os.rst:3157 +#: ../../../library/os.rst:3797 ../../../library/os.rst:3964 +#: ../../../library/os.rst:3980 ../../../library/os.rst:4021 +#: ../../../library/os.rst:4124 ../../../library/os.rst:4185 +#: ../../../library/os.rst:4582 ../../../library/os.rst:4766 +#: ../../../library/os.rst:5340 msgid "Accepts a :term:`path-like object`." msgstr "" @@ -1793,8 +1793,8 @@ msgid "" "This function is intended for low-level I/O and must be applied to a file " "descriptor as returned by :func:`os.open` or :func:`pipe`. To read a \"file " "object\" returned by the built-in function :func:`open` or by :func:`popen` " -"or :func:`fdopen`, or :data:`sys.stdin`, use its :meth:`~file.read` or :meth:" -"`~file.readline` methods." +"or :func:`fdopen`, or :data:`sys.stdin`, use its :meth:`~io.TextIOBase.read` " +"or :meth:`~io.IOBase.readline` methods." msgstr "" #: ../../../library/os.rst:1683 @@ -2018,7 +2018,7 @@ msgid "" "descriptor as returned by :func:`os.open` or :func:`pipe`. To write a " "\"file object\" returned by the built-in function :func:`open` or by :func:" "`popen` or :func:`fdopen`, or :data:`sys.stdout` or :data:`sys.stderr`, use " -"its :meth:`~file.write` method." +"its :meth:`~io.TextIOBase.write` method." msgstr "" #: ../../../library/os.rst:1918 @@ -2433,7 +2433,7 @@ msgid ":const:`stat.S_IXOTH`" msgstr "" #: ../../../library/os.rst:2214 ../../../library/os.rst:2247 -#: ../../../library/os.rst:4003 +#: ../../../library/os.rst:4011 msgid "" "This function can support :ref:`specifying a file descriptor `, :" "ref:`paths relative to directory descriptors ` and :ref:`not " @@ -2548,7 +2548,7 @@ msgid "" "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." msgstr "" -#: ../../../library/os.rst:2366 ../../../library/os.rst:5008 +#: ../../../library/os.rst:2366 ../../../library/os.rst:5020 msgid "Added Windows support." msgstr "" @@ -2556,8 +2556,8 @@ msgstr "" msgid "Added the *src_dir_fd*, *dst_dir_fd*, and *follow_symlinks* parameters." msgstr "" -#: ../../../library/os.rst:2372 ../../../library/os.rst:2803 -#: ../../../library/os.rst:2840 ../../../library/os.rst:3924 +#: ../../../library/os.rst:2372 ../../../library/os.rst:2807 +#: ../../../library/os.rst:2844 ../../../library/os.rst:3932 msgid "Accepts a :term:`path-like object` for *src* and *dst*." msgstr "" @@ -2578,7 +2578,7 @@ msgid "" "circumstances, they will be of type ``str``." msgstr "" -#: ../../../library/os.rst:2389 ../../../library/os.rst:2888 +#: ../../../library/os.rst:2389 ../../../library/os.rst:2892 msgid "" "This function can also support :ref:`specifying a file descriptor " "`; the file descriptor must refer to a directory." @@ -2604,15 +2604,21 @@ msgstr "" msgid "The *path* parameter became optional." msgstr "" -#: ../../../library/os.rst:2406 ../../../library/os.rst:3780 +#: ../../../library/os.rst:2406 ../../../library/os.rst:3788 msgid "Added support for specifying *path* as an open file descriptor." msgstr "" -#: ../../../library/os.rst:2415 +#: ../../../library/os.rst:2412 +msgid "" +"``os.listdir(-1)`` now fails with ``OSError(errno.EBADF)`` rather than " +"listing the current directory." +msgstr "" + +#: ../../../library/os.rst:2419 msgid "Return a list containing the names of drives on a Windows system." msgstr "" -#: ../../../library/os.rst:2417 +#: ../../../library/os.rst:2421 msgid "" "A drive name typically looks like ``'C:\\\\'``. Not every drive name will be " "associated with a volume, and some may be inaccessible for a variety of " @@ -2620,22 +2626,22 @@ msgid "" "function does not test for access." msgstr "" -#: ../../../library/os.rst:2422 +#: ../../../library/os.rst:2426 msgid "May raise :exc:`OSError` if an error occurs collecting the drive names." msgstr "" -#: ../../../library/os.rst:2425 +#: ../../../library/os.rst:2429 msgid "" "Raises an :ref:`auditing event ` ``os.listdrives`` with no " "arguments." msgstr "" -#: ../../../library/os.rst:2434 +#: ../../../library/os.rst:2438 msgid "" "Return a list containing the mount points for a volume on a Windows system." msgstr "" -#: ../../../library/os.rst:2437 +#: ../../../library/os.rst:2441 msgid "" "*volume* must be represented as a GUID path, like those returned by :func:" "`os.listvolumes`. Volumes may be mounted in multiple locations or not at " @@ -2643,29 +2649,29 @@ msgid "" "associated with a volume will not be returned by this function." msgstr "" -#: ../../../library/os.rst:2443 +#: ../../../library/os.rst:2447 msgid "" "The mount points return by this function will be absolute paths, and may be " "longer than the drive name." msgstr "" -#: ../../../library/os.rst:2446 +#: ../../../library/os.rst:2450 msgid "" "Raises :exc:`OSError` if the volume is not recognized or if an error occurs " "collecting the paths." msgstr "" -#: ../../../library/os.rst:2449 +#: ../../../library/os.rst:2453 msgid "" "Raises an :ref:`auditing event ` ``os.listmounts`` with argument " "``volume``." msgstr "" -#: ../../../library/os.rst:2458 +#: ../../../library/os.rst:2462 msgid "Return a list containing the volumes in the system." msgstr "" -#: ../../../library/os.rst:2460 +#: ../../../library/os.rst:2464 msgid "" "Volumes are typically represented as a GUID path that looks like ``\\\\?" "\\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\\``. Files can usually be " @@ -2674,49 +2680,49 @@ msgid "" "function is to retrieve mount points using :func:`os.listmounts`." msgstr "" -#: ../../../library/os.rst:2467 +#: ../../../library/os.rst:2471 msgid "May raise :exc:`OSError` if an error occurs collecting the volumes." msgstr "" -#: ../../../library/os.rst:2469 +#: ../../../library/os.rst:2473 msgid "" "Raises an :ref:`auditing event ` ``os.listvolumes`` with no " "arguments." msgstr "" -#: ../../../library/os.rst:2478 +#: ../../../library/os.rst:2482 msgid "" "Perform the equivalent of an :c:func:`!lstat` system call on the given path. " "Similar to :func:`~os.stat`, but does not follow symbolic links. Return a :" "class:`stat_result` object." msgstr "" -#: ../../../library/os.rst:2482 +#: ../../../library/os.rst:2486 msgid "" "On platforms that do not support symbolic links, this is an alias for :func:" "`~os.stat`." msgstr "" -#: ../../../library/os.rst:2485 +#: ../../../library/os.rst:2489 msgid "" "As of Python 3.3, this is equivalent to ``os.stat(path, dir_fd=dir_fd, " "follow_symlinks=False)``." msgstr "" -#: ../../../library/os.rst:2488 ../../../library/os.rst:2530 -#: ../../../library/os.rst:2598 ../../../library/os.rst:2626 -#: ../../../library/os.rst:2707 +#: ../../../library/os.rst:2492 ../../../library/os.rst:2534 +#: ../../../library/os.rst:2602 ../../../library/os.rst:2630 +#: ../../../library/os.rst:2711 msgid "" "This function can also support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: ../../../library/os.rst:2495 ../../../library/os.rst:2716 -#: ../../../library/os.rst:3917 +#: ../../../library/os.rst:2499 ../../../library/os.rst:2720 +#: ../../../library/os.rst:3925 msgid "Added support for Windows 6.0 (Vista) symbolic links." msgstr "" -#: ../../../library/os.rst:2504 +#: ../../../library/os.rst:2508 msgid "" "On Windows, now opens reparse points that represent another path (name " "surrogates), including symbolic links and directory junctions. Other kinds " @@ -2724,18 +2730,18 @@ msgid "" "stat`." msgstr "" -#: ../../../library/os.rst:2513 +#: ../../../library/os.rst:2517 msgid "Create a directory named *path* with numeric mode *mode*." msgstr "" -#: ../../../library/os.rst:2515 +#: ../../../library/os.rst:2519 msgid "" "If the directory already exists, :exc:`FileExistsError` is raised. If a " "parent directory in the path does not exist, :exc:`FileNotFoundError` is " "raised." msgstr "" -#: ../../../library/os.rst:2520 +#: ../../../library/os.rst:2524 msgid "" "On some systems, *mode* is ignored. Where it is used, the current umask " "value is first masked out. If bits other than the last 9 (i.e. the last 3 " @@ -2744,36 +2750,36 @@ msgid "" "call :func:`chmod` explicitly to set them." msgstr "" -#: ../../../library/os.rst:2526 +#: ../../../library/os.rst:2530 msgid "" "On Windows, a *mode* of ``0o700`` is specifically handled to apply access " "control to the new directory such that only the current user and " "administrators have access. Other values of *mode* are ignored." msgstr "" -#: ../../../library/os.rst:2533 +#: ../../../library/os.rst:2537 msgid "" "It is also possible to create temporary directories; see the :mod:`tempfile` " "module's :func:`tempfile.mkdtemp` function." msgstr "" -#: ../../../library/os.rst:2536 ../../../library/os.rst:2573 +#: ../../../library/os.rst:2540 ../../../library/os.rst:2577 msgid "" "Raises an :ref:`auditing event ` ``os.mkdir`` with arguments " "``path``, ``mode``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:2544 +#: ../../../library/os.rst:2548 msgid "Windows now handles a *mode* of ``0o700``." msgstr "" -#: ../../../library/os.rst:2554 +#: ../../../library/os.rst:2558 msgid "" "Recursive directory creation function. Like :func:`mkdir`, but makes all " "intermediate-level directories needed to contain the leaf directory." msgstr "" -#: ../../../library/os.rst:2557 +#: ../../../library/os.rst:2561 msgid "" "The *mode* parameter is passed to :func:`mkdir` for creating the leaf " "directory; see :ref:`the mkdir() description ` for how it is " @@ -2782,27 +2788,27 @@ msgid "" "file permission bits of existing parent directories are not changed." msgstr "" -#: ../../../library/os.rst:2563 +#: ../../../library/os.rst:2567 msgid "" "If *exist_ok* is ``False`` (the default), a :exc:`FileExistsError` is raised " "if the target directory already exists." msgstr "" -#: ../../../library/os.rst:2568 +#: ../../../library/os.rst:2572 msgid "" ":func:`makedirs` will become confused if the path elements to create " "include :data:`pardir` (eg. \"..\" on UNIX systems)." msgstr "" -#: ../../../library/os.rst:2571 +#: ../../../library/os.rst:2575 msgid "This function handles UNC paths correctly." msgstr "" -#: ../../../library/os.rst:2575 +#: ../../../library/os.rst:2579 msgid "Added the *exist_ok* parameter." msgstr "" -#: ../../../library/os.rst:2580 +#: ../../../library/os.rst:2584 msgid "" "Before Python 3.4.1, if *exist_ok* was ``True`` and the directory existed, :" "func:`makedirs` would still raise an error if *mode* did not match the mode " @@ -2810,19 +2816,19 @@ msgid "" "safely, it was removed in Python 3.4.1. See :issue:`21082`." msgstr "" -#: ../../../library/os.rst:2588 +#: ../../../library/os.rst:2592 msgid "" "The *mode* argument no longer affects the file permission bits of newly " "created intermediate-level directories." msgstr "" -#: ../../../library/os.rst:2595 +#: ../../../library/os.rst:2599 msgid "" "Create a FIFO (a named pipe) named *path* with numeric mode *mode*. The " "current umask value is first masked out from the mode." msgstr "" -#: ../../../library/os.rst:2601 +#: ../../../library/os.rst:2605 msgid "" "FIFOs are pipes that can be accessed like regular files. FIFOs exist until " "they are deleted (for example with :func:`os.unlink`). Generally, FIFOs are " @@ -2832,7 +2838,7 @@ msgid "" "rendezvous point." msgstr "" -#: ../../../library/os.rst:2618 +#: ../../../library/os.rst:2622 msgid "" "Create a filesystem node (file, device special file or named pipe) named " "*path*. *mode* specifies both the permissions to use and the type of node to " @@ -2843,29 +2849,29 @@ msgid "" "it is ignored." msgstr "" -#: ../../../library/os.rst:2640 +#: ../../../library/os.rst:2644 msgid "" "Extract the device major number from a raw device number (usually the :attr:" "`~stat_result.st_dev` or :attr:`~stat_result.st_rdev` field from :c:struct:" "`stat`)." msgstr "" -#: ../../../library/os.rst:2646 +#: ../../../library/os.rst:2650 msgid "" "Extract the device minor number from a raw device number (usually the :attr:" "`~stat_result.st_dev` or :attr:`~stat_result.st_rdev` field from :c:struct:" "`stat`)." msgstr "" -#: ../../../library/os.rst:2652 +#: ../../../library/os.rst:2656 msgid "Compose a raw device number from the major and minor device numbers." msgstr "" -#: ../../../library/os.rst:2657 +#: ../../../library/os.rst:2661 msgid "Non-existent device." msgstr "" -#: ../../../library/os.rst:2664 +#: ../../../library/os.rst:2668 msgid "" "Return system configuration information relevant to a named file. *name* " "specifies the configuration value to retrieve; it may be a string which is " @@ -2876,20 +2882,20 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../../library/os.rst:2677 ../../../library/os.rst:3773 -#: ../../../library/os.rst:3945 +#: ../../../library/os.rst:2681 ../../../library/os.rst:3781 +#: ../../../library/os.rst:3953 msgid "" "This function can support :ref:`specifying a file descriptor `." msgstr "" -#: ../../../library/os.rst:2688 +#: ../../../library/os.rst:2692 msgid "" "Dictionary mapping names accepted by :func:`pathconf` and :func:`fpathconf` " "to the integer values defined for those names by the host operating system. " "This can be used to determine the set of names known to the system." msgstr "" -#: ../../../library/os.rst:2697 +#: ../../../library/os.rst:2701 msgid "" "Return a string representing the path to which the symbolic link points. " "The result may be either an absolute or relative pathname; if it is " @@ -2897,7 +2903,7 @@ msgid "" "join(os.path.dirname(path), result)``." msgstr "" -#: ../../../library/os.rst:2702 +#: ../../../library/os.rst:2706 msgid "" "If the *path* is a string object (directly or indirectly through a :class:" "`PathLike` interface), the result will also be a string object, and the call " @@ -2905,42 +2911,42 @@ msgid "" "indirectly), the result will be a bytes object." msgstr "" -#: ../../../library/os.rst:2710 +#: ../../../library/os.rst:2714 msgid "" "When trying to resolve a path that may contain links, use :func:`~os.path." "realpath` to properly handle recursion and platform differences." msgstr "" -#: ../../../library/os.rst:2722 +#: ../../../library/os.rst:2726 msgid "Accepts a :term:`path-like object` on Unix." msgstr "" -#: ../../../library/os.rst:2725 +#: ../../../library/os.rst:2729 msgid "Accepts a :term:`path-like object` and a bytes object on Windows." msgstr "" -#: ../../../library/os.rst:2728 +#: ../../../library/os.rst:2732 msgid "" "Added support for directory junctions, and changed to return the " "substitution path (which typically includes ``\\\\?\\`` prefix) rather than " "the optional \"print name\" field that was previously returned." msgstr "" -#: ../../../library/os.rst:2734 +#: ../../../library/os.rst:2738 msgid "" "Remove (delete) the file *path*. If *path* is a directory, an :exc:" "`OSError` is raised. Use :func:`rmdir` to remove directories. If the file " "does not exist, a :exc:`FileNotFoundError` is raised." msgstr "" -#: ../../../library/os.rst:2738 ../../../library/os.rst:2851 -#: ../../../library/os.rst:3896 +#: ../../../library/os.rst:2742 ../../../library/os.rst:2855 +#: ../../../library/os.rst:3904 msgid "" "This function can support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: ../../../library/os.rst:2741 +#: ../../../library/os.rst:2745 msgid "" "On Windows, attempting to remove a file that is in use causes an exception " "to be raised; on Unix, the directory entry is removed but the storage " @@ -2948,18 +2954,18 @@ msgid "" "longer in use." msgstr "" -#: ../../../library/os.rst:2745 +#: ../../../library/os.rst:2749 msgid "This function is semantically identical to :func:`unlink`." msgstr "" -#: ../../../library/os.rst:2747 ../../../library/os.rst:2769 -#: ../../../library/os.rst:3967 +#: ../../../library/os.rst:2751 ../../../library/os.rst:2773 +#: ../../../library/os.rst:3975 msgid "" "Raises an :ref:`auditing event ` ``os.remove`` with arguments " "``path``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:2760 +#: ../../../library/os.rst:2764 msgid "" "Remove directories recursively. Works like :func:`rmdir` except that, if " "the leaf directory is successfully removed, :func:`removedirs` tries to " @@ -2971,20 +2977,20 @@ msgid "" "could not be successfully removed." msgstr "" -#: ../../../library/os.rst:2777 +#: ../../../library/os.rst:2781 msgid "" "Rename the file or directory *src* to *dst*. If *dst* exists, the operation " "will fail with an :exc:`OSError` subclass in a number of cases:" msgstr "" -#: ../../../library/os.rst:2780 +#: ../../../library/os.rst:2784 msgid "" "On Windows, if *dst* exists a :exc:`FileExistsError` is always raised. The " "operation may fail if *src* and *dst* are on different filesystems. Use :" "func:`shutil.move` to support moves to a different filesystem." msgstr "" -#: ../../../library/os.rst:2784 +#: ../../../library/os.rst:2788 msgid "" "On Unix, if *src* is a file and *dst* is a directory or vice-versa, an :exc:" "`IsADirectoryError` or a :exc:`NotADirectoryError` will be raised " @@ -2996,30 +3002,30 @@ msgid "" "operation (this is a POSIX requirement)." msgstr "" -#: ../../../library/os.rst:2793 ../../../library/os.rst:2833 +#: ../../../library/os.rst:2797 ../../../library/os.rst:2837 msgid "" "This function can support specifying *src_dir_fd* and/or *dst_dir_fd* to " "supply :ref:`paths relative to directory descriptors `." msgstr "" -#: ../../../library/os.rst:2796 +#: ../../../library/os.rst:2800 msgid "" "If you want cross-platform overwriting of the destination, use :func:" "`replace`." msgstr "" -#: ../../../library/os.rst:2798 ../../../library/os.rst:2819 -#: ../../../library/os.rst:2836 +#: ../../../library/os.rst:2802 ../../../library/os.rst:2823 +#: ../../../library/os.rst:2840 msgid "" "Raises an :ref:`auditing event ` ``os.rename`` with arguments " "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." msgstr "" -#: ../../../library/os.rst:2800 +#: ../../../library/os.rst:2804 msgid "Added the *src_dir_fd* and *dst_dir_fd* parameters." msgstr "" -#: ../../../library/os.rst:2809 +#: ../../../library/os.rst:2813 msgid "" "Recursive directory or file renaming function. Works like :func:`rename`, " "except creation of any intermediate directories needed to make the new " @@ -3028,17 +3034,17 @@ msgid "" "using :func:`removedirs`." msgstr "" -#: ../../../library/os.rst:2816 +#: ../../../library/os.rst:2820 msgid "" "This function can fail with the new directory structure made if you lack " "permissions needed to remove the leaf directory or file." msgstr "" -#: ../../../library/os.rst:2821 +#: ../../../library/os.rst:2825 msgid "Accepts a :term:`path-like object` for *old* and *new*." msgstr "" -#: ../../../library/os.rst:2827 +#: ../../../library/os.rst:2831 msgid "" "Rename the file or directory *src* to *dst*. If *dst* is a non-empty " "directory, :exc:`OSError` will be raised. If *dst* exists and is a file, it " @@ -3047,7 +3053,7 @@ msgid "" "renaming will be an atomic operation (this is a POSIX requirement)." msgstr "" -#: ../../../library/os.rst:2846 +#: ../../../library/os.rst:2850 msgid "" "Remove (delete) the directory *path*. If the directory does not exist or is " "not empty, a :exc:`FileNotFoundError` or an :exc:`OSError` is raised " @@ -3055,13 +3061,13 @@ msgid "" "rmtree` can be used." msgstr "" -#: ../../../library/os.rst:2854 +#: ../../../library/os.rst:2858 msgid "" "Raises an :ref:`auditing event ` ``os.rmdir`` with arguments " "``path``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:2865 +#: ../../../library/os.rst:2869 msgid "" "Return an iterator of :class:`os.DirEntry` objects corresponding to the " "entries in the directory given by *path*. The entries are yielded in " @@ -3071,7 +3077,7 @@ msgid "" "unspecified." msgstr "" -#: ../../../library/os.rst:2872 +#: ../../../library/os.rst:2876 msgid "" "Using :func:`scandir` instead of :func:`listdir` can significantly increase " "the performance of code that also needs file type or file attribute " @@ -3083,7 +3089,7 @@ msgid "" "Unix but only requires one for symbolic links on Windows." msgstr "" -#: ../../../library/os.rst:2882 +#: ../../../library/os.rst:2886 msgid "" "*path* may be a :term:`path-like object`. If *path* is of type ``bytes`` " "(directly or indirectly through the :class:`PathLike` interface), the type " @@ -3092,30 +3098,30 @@ msgid "" "they will be of type ``str``." msgstr "" -#: ../../../library/os.rst:2891 +#: ../../../library/os.rst:2895 msgid "" "Raises an :ref:`auditing event ` ``os.scandir`` with argument " "``path``." msgstr "" -#: ../../../library/os.rst:2893 +#: ../../../library/os.rst:2897 msgid "" "The :func:`scandir` iterator supports the :term:`context manager` protocol " "and has the following method:" msgstr "" -#: ../../../library/os.rst:2898 +#: ../../../library/os.rst:2902 msgid "Close the iterator and free acquired resources." msgstr "" -#: ../../../library/os.rst:2900 +#: ../../../library/os.rst:2904 msgid "" "This is called automatically when the iterator is exhausted or garbage " "collected, or when an error happens during iterating. However it is " "advisable to call it explicitly or use the :keyword:`with` statement." msgstr "" -#: ../../../library/os.rst:2907 +#: ../../../library/os.rst:2911 msgid "" "The following example shows a simple use of :func:`scandir` to display all " "the files (excluding directories) in the given *path* that don't start with " @@ -3123,7 +3129,7 @@ msgid "" "system call::" msgstr "" -#: ../../../library/os.rst:2919 +#: ../../../library/os.rst:2923 msgid "" "On Unix-based systems, :func:`scandir` uses the system's `opendir() `_ and " @@ -3134,7 +3140,7 @@ msgid "" "desktop/aa364428(v=vs.85).aspx>`_ functions." msgstr "" -#: ../../../library/os.rst:2931 +#: ../../../library/os.rst:2935 msgid "" "Added support for the :term:`context manager` protocol and the :func:" "`~scandir.close` method. If a :func:`scandir` iterator is neither exhausted " @@ -3142,28 +3148,34 @@ msgid "" "destructor." msgstr "" -#: ../../../library/os.rst:2937 +#: ../../../library/os.rst:2941 msgid "The function accepts a :term:`path-like object`." msgstr "" -#: ../../../library/os.rst:2939 +#: ../../../library/os.rst:2943 msgid "Added support for :ref:`file descriptors ` on Unix." msgstr "" -#: ../../../library/os.rst:2945 +#: ../../../library/os.rst:2946 +msgid "" +"``os.scandir(-1)`` now fails with ``OSError(errno.EBADF)`` rather than " +"listing the current directory." +msgstr "" + +#: ../../../library/os.rst:2953 msgid "" "Object yielded by :func:`scandir` to expose the file path and other file " "attributes of a directory entry." msgstr "" -#: ../../../library/os.rst:2948 +#: ../../../library/os.rst:2956 msgid "" ":func:`scandir` will provide as much of this information as possible without " "making additional system calls. When a ``stat()`` or ``lstat()`` system call " "is made, the ``os.DirEntry`` object will cache the result." msgstr "" -#: ../../../library/os.rst:2952 +#: ../../../library/os.rst:2960 msgid "" "``os.DirEntry`` instances are not intended to be stored in long-lived data " "structures; if you know the file metadata has changed or if a long time has " @@ -3171,7 +3183,7 @@ msgid "" "up-to-date information." msgstr "" -#: ../../../library/os.rst:2957 +#: ../../../library/os.rst:2965 msgid "" "Because the ``os.DirEntry`` methods can make operating system calls, they " "may also raise :exc:`OSError`. If you need very fine-grained control over " @@ -3179,29 +3191,29 @@ msgid "" "methods and handle as appropriate." msgstr "" -#: ../../../library/os.rst:2962 +#: ../../../library/os.rst:2970 msgid "" "To be directly usable as a :term:`path-like object`, ``os.DirEntry`` " "implements the :class:`PathLike` interface." msgstr "" -#: ../../../library/os.rst:2965 +#: ../../../library/os.rst:2973 msgid "Attributes and methods on a ``os.DirEntry`` instance are as follows:" msgstr "" -#: ../../../library/os.rst:2969 +#: ../../../library/os.rst:2977 msgid "" "The entry's base filename, relative to the :func:`scandir` *path* argument." msgstr "" -#: ../../../library/os.rst:2972 +#: ../../../library/os.rst:2980 msgid "" "The :attr:`name` attribute will be ``bytes`` if the :func:`scandir` *path* " "argument is of type ``bytes`` and ``str`` otherwise. Use :func:`~os." "fsdecode` to decode byte filenames." msgstr "" -#: ../../../library/os.rst:2978 +#: ../../../library/os.rst:2986 msgid "" "The entry's full path name: equivalent to ``os.path.join(scandir_path, entry." "name)`` where *scandir_path* is the :func:`scandir` *path* argument. The " @@ -3211,51 +3223,51 @@ msgid "" "attribute." msgstr "" -#: ../../../library/os.rst:2985 +#: ../../../library/os.rst:2993 msgid "" "The :attr:`path` attribute will be ``bytes`` if the :func:`scandir` *path* " "argument is of type ``bytes`` and ``str`` otherwise. Use :func:`~os." "fsdecode` to decode byte filenames." msgstr "" -#: ../../../library/os.rst:2991 +#: ../../../library/os.rst:2999 msgid "Return the inode number of the entry." msgstr "" -#: ../../../library/os.rst:2993 +#: ../../../library/os.rst:3001 msgid "" "The result is cached on the ``os.DirEntry`` object. Use ``os.stat(entry." "path, follow_symlinks=False).st_ino`` to fetch up-to-date information." msgstr "" -#: ../../../library/os.rst:2997 +#: ../../../library/os.rst:3005 msgid "" "On the first, uncached call, a system call is required on Windows but not on " "Unix." msgstr "" -#: ../../../library/os.rst:3002 +#: ../../../library/os.rst:3010 msgid "" "Return ``True`` if this entry is a directory or a symbolic link pointing to " "a directory; return ``False`` if the entry is or points to any other kind of " "file, or if it doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3006 +#: ../../../library/os.rst:3014 msgid "" "If *follow_symlinks* is ``False``, return ``True`` only if this entry is a " "directory (without following symlinks); return ``False`` if the entry is any " "other kind of file or if it doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3010 +#: ../../../library/os.rst:3018 msgid "" "The result is cached on the ``os.DirEntry`` object, with a separate cache " "for *follow_symlinks* ``True`` and ``False``. Call :func:`os.stat` along " "with :func:`stat.S_ISDIR` to fetch up-to-date information." msgstr "" -#: ../../../library/os.rst:3014 +#: ../../../library/os.rst:3022 msgid "" "On the first, uncached call, no system call is required in most cases. " "Specifically, for non-symlinks, neither Windows or Unix require a system " @@ -3265,46 +3277,46 @@ msgid "" "is ``False``." msgstr "" -#: ../../../library/os.rst:3021 ../../../library/os.rst:3051 +#: ../../../library/os.rst:3029 ../../../library/os.rst:3059 msgid "" "This method can raise :exc:`OSError`, such as :exc:`PermissionError`, but :" "exc:`FileNotFoundError` is caught and not raised." msgstr "" -#: ../../../library/os.rst:3026 +#: ../../../library/os.rst:3034 msgid "" "Return ``True`` if this entry is a file or a symbolic link pointing to a " "file; return ``False`` if the entry is or points to a directory or other non-" "file entry, or if it doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3030 +#: ../../../library/os.rst:3038 msgid "" "If *follow_symlinks* is ``False``, return ``True`` only if this entry is a " "file (without following symlinks); return ``False`` if the entry is a " "directory or other non-file entry, or if it doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3034 +#: ../../../library/os.rst:3042 msgid "" "The result is cached on the ``os.DirEntry`` object. Caching, system calls " "made, and exceptions raised are as per :func:`~os.DirEntry.is_dir`." msgstr "" -#: ../../../library/os.rst:3039 +#: ../../../library/os.rst:3047 msgid "" "Return ``True`` if this entry is a symbolic link (even if broken); return " "``False`` if the entry points to a directory or any kind of file, or if it " "doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3043 +#: ../../../library/os.rst:3051 msgid "" "The result is cached on the ``os.DirEntry`` object. Call :func:`os.path." "islink` to fetch up-to-date information." msgstr "" -#: ../../../library/os.rst:3046 +#: ../../../library/os.rst:3054 msgid "" "On the first, uncached call, no system call is required in most cases. " "Specifically, neither Windows or Unix require a system call, except on " @@ -3312,48 +3324,48 @@ msgid "" "``dirent.d_type == DT_UNKNOWN``." msgstr "" -#: ../../../library/os.rst:3056 +#: ../../../library/os.rst:3064 msgid "" "Return ``True`` if this entry is a junction (even if broken); return " "``False`` if the entry points to a regular directory, any kind of file, a " "symlink, or if it doesn't exist anymore." msgstr "" -#: ../../../library/os.rst:3060 +#: ../../../library/os.rst:3068 msgid "" "The result is cached on the ``os.DirEntry`` object. Call :func:`os.path." "isjunction` to fetch up-to-date information." msgstr "" -#: ../../../library/os.rst:3067 +#: ../../../library/os.rst:3075 msgid "" "Return a :class:`stat_result` object for this entry. This method follows " "symbolic links by default; to stat a symbolic link add the " "``follow_symlinks=False`` argument." msgstr "" -#: ../../../library/os.rst:3071 +#: ../../../library/os.rst:3079 msgid "" "On Unix, this method always requires a system call. On Windows, it only " "requires a system call if *follow_symlinks* is ``True`` and the entry is a " "reparse point (for example, a symbolic link or directory junction)." msgstr "" -#: ../../../library/os.rst:3076 +#: ../../../library/os.rst:3084 msgid "" "On Windows, the ``st_ino``, ``st_dev`` and ``st_nlink`` attributes of the :" "class:`stat_result` are always set to zero. Call :func:`os.stat` to get " "these attributes." msgstr "" -#: ../../../library/os.rst:3080 +#: ../../../library/os.rst:3088 msgid "" "The result is cached on the ``os.DirEntry`` object, with a separate cache " "for *follow_symlinks* ``True`` and ``False``. Call :func:`os.stat` to fetch " "up-to-date information." msgstr "" -#: ../../../library/os.rst:3084 +#: ../../../library/os.rst:3092 msgid "" "Note that there is a nice correspondence between several attributes and " "methods of ``os.DirEntry`` and of :class:`pathlib.Path`. In particular, the " @@ -3361,13 +3373,13 @@ msgid "" "``is_file()``, ``is_symlink()``, ``is_junction()``, and ``stat()`` methods." msgstr "" -#: ../../../library/os.rst:3092 +#: ../../../library/os.rst:3100 msgid "" "Added support for the :class:`~os.PathLike` interface. Added support for :" "class:`bytes` paths on Windows." msgstr "" -#: ../../../library/os.rst:3096 +#: ../../../library/os.rst:3104 msgid "" "The ``st_ctime`` attribute of a stat result is deprecated on Windows. The " "file creation time is properly available as ``st_birthtime``, and in the " @@ -3375,7 +3387,7 @@ msgid "" "time, if available." msgstr "" -#: ../../../library/os.rst:3105 +#: ../../../library/os.rst:3113 msgid "" "Get the status of a file or a file descriptor. Perform the equivalent of a :" "c:func:`stat` system call on the given path. *path* may be specified as " @@ -3384,21 +3396,21 @@ msgid "" "`stat_result` object." msgstr "" -#: ../../../library/os.rst:3111 +#: ../../../library/os.rst:3119 msgid "" "This function normally follows symlinks; to stat a symlink add the argument " "``follow_symlinks=False``, or use :func:`lstat`." msgstr "" -#: ../../../library/os.rst:3114 ../../../library/os.rst:4553 -#: ../../../library/os.rst:4569 ../../../library/os.rst:4585 -#: ../../../library/os.rst:4605 +#: ../../../library/os.rst:3122 ../../../library/os.rst:4561 +#: ../../../library/os.rst:4577 ../../../library/os.rst:4597 +#: ../../../library/os.rst:4617 msgid "" "This function can support :ref:`specifying a file descriptor ` and :" "ref:`not following symlinks `." msgstr "" -#: ../../../library/os.rst:3117 +#: ../../../library/os.rst:3125 msgid "" "On Windows, passing ``follow_symlinks=False`` will disable following all " "name-surrogate reparse points, which includes symlinks and directory " @@ -3412,21 +3424,21 @@ msgid "" "junction points, which will raise the usual exceptions." msgstr "" -#: ../../../library/os.rst:3130 ../../../library/os.rst:4260 +#: ../../../library/os.rst:3138 ../../../library/os.rst:4268 msgid "Example::" msgstr "" -#: ../../../library/os.rst:3143 +#: ../../../library/os.rst:3151 msgid ":func:`fstat` and :func:`lstat` functions." msgstr "" -#: ../../../library/os.rst:3145 +#: ../../../library/os.rst:3153 msgid "" "Added the *dir_fd* and *follow_symlinks* parameters, specifying a file " "descriptor instead of a path." msgstr "" -#: ../../../library/os.rst:3152 +#: ../../../library/os.rst:3160 msgid "" "On Windows, all reparse points that can be resolved by the operating system " "are now followed, and passing ``follow_symlinks=False`` disables following " @@ -3436,122 +3448,122 @@ msgid "" "of raising an error." msgstr "" -#: ../../../library/os.rst:3163 +#: ../../../library/os.rst:3171 msgid "" "Object whose attributes correspond roughly to the members of the :c:struct:" "`stat` structure. It is used for the result of :func:`os.stat`, :func:`os." "fstat` and :func:`os.lstat`." msgstr "" -#: ../../../library/os.rst:3167 +#: ../../../library/os.rst:3175 msgid "Attributes:" msgstr "" -#: ../../../library/os.rst:3171 ../../../library/os.rst:3606 +#: ../../../library/os.rst:3179 ../../../library/os.rst:3614 msgid "File mode: file type and file mode bits (permissions)." msgstr "" -#: ../../../library/os.rst:3175 +#: ../../../library/os.rst:3183 msgid "" "Platform dependent, but if non-zero, uniquely identifies the file for a " "given value of ``st_dev``. Typically:" msgstr "" -#: ../../../library/os.rst:3178 +#: ../../../library/os.rst:3186 msgid "the inode number on Unix," msgstr "" -#: ../../../library/os.rst:3179 +#: ../../../library/os.rst:3187 msgid "" "the `file index `_ on " "Windows" msgstr "" -#: ../../../library/os.rst:3185 ../../../library/os.rst:3535 +#: ../../../library/os.rst:3193 ../../../library/os.rst:3543 msgid "Identifier of the device on which this file resides." msgstr "" -#: ../../../library/os.rst:3189 ../../../library/os.rst:3628 +#: ../../../library/os.rst:3197 ../../../library/os.rst:3636 msgid "Number of hard links." msgstr "" -#: ../../../library/os.rst:3193 ../../../library/os.rst:3666 +#: ../../../library/os.rst:3201 ../../../library/os.rst:3674 msgid "User identifier of the file owner." msgstr "" -#: ../../../library/os.rst:3197 ../../../library/os.rst:3577 +#: ../../../library/os.rst:3205 ../../../library/os.rst:3585 msgid "Group identifier of the file owner." msgstr "" -#: ../../../library/os.rst:3201 ../../../library/os.rst:3647 +#: ../../../library/os.rst:3209 ../../../library/os.rst:3655 msgid "" "Size of the file in bytes, if it is a regular file or a symbolic link. The " "size of a symbolic link is the length of the pathname it contains, without a " "terminating null byte." msgstr "" -#: ../../../library/os.rst:3205 +#: ../../../library/os.rst:3213 msgid "Timestamps:" msgstr "" -#: ../../../library/os.rst:3209 ../../../library/os.rst:3429 +#: ../../../library/os.rst:3217 ../../../library/os.rst:3437 msgid "Time of most recent access expressed in seconds." msgstr "" -#: ../../../library/os.rst:3213 ../../../library/os.rst:3613 +#: ../../../library/os.rst:3221 ../../../library/os.rst:3621 msgid "Time of most recent content modification expressed in seconds." msgstr "" -#: ../../../library/os.rst:3217 ../../../library/os.rst:3520 +#: ../../../library/os.rst:3225 ../../../library/os.rst:3528 msgid "Time of most recent metadata change expressed in seconds." msgstr "" -#: ../../../library/os.rst:3219 +#: ../../../library/os.rst:3227 msgid "" "``st_ctime`` is deprecated on Windows. Use ``st_birthtime`` for the file " "creation time. In the future, ``st_ctime`` will contain the time of the most " "recent metadata change, as for other platforms." msgstr "" -#: ../../../library/os.rst:3226 ../../../library/os.rst:3436 +#: ../../../library/os.rst:3234 ../../../library/os.rst:3444 msgid "Time of most recent access expressed in nanoseconds as an integer." msgstr "" -#: ../../../library/os.rst:3232 ../../../library/os.rst:3620 +#: ../../../library/os.rst:3240 ../../../library/os.rst:3628 msgid "" "Time of most recent content modification expressed in nanoseconds as an " "integer." msgstr "" -#: ../../../library/os.rst:3239 ../../../library/os.rst:3527 +#: ../../../library/os.rst:3247 ../../../library/os.rst:3535 msgid "" "Time of most recent metadata change expressed in nanoseconds as an integer." msgstr "" -#: ../../../library/os.rst:3244 +#: ../../../library/os.rst:3252 msgid "" "``st_ctime_ns`` is deprecated on Windows. Use ``st_birthtime_ns`` for the " "file creation time. In the future, ``st_ctime`` will contain the time of the " "most recent metadata change, as for other platforms." msgstr "" -#: ../../../library/os.rst:3251 +#: ../../../library/os.rst:3259 msgid "" "Time of file creation expressed in seconds. This attribute is not always " "available, and may raise :exc:`AttributeError`." msgstr "" -#: ../../../library/os.rst:3254 +#: ../../../library/os.rst:3262 msgid "``st_birthtime`` is now available on Windows." msgstr "" -#: ../../../library/os.rst:3259 +#: ../../../library/os.rst:3267 msgid "" "Time of file creation expressed in nanoseconds as an integer. This attribute " "is not always available, and may raise :exc:`AttributeError`." msgstr "" -#: ../../../library/os.rst:3267 +#: ../../../library/os.rst:3275 msgid "" "The exact meaning and resolution of the :attr:`st_atime`, :attr:`st_mtime`, :" "attr:`st_ctime` and :attr:`st_birthtime` attributes depend on the operating " @@ -3561,7 +3573,7 @@ msgid "" "details." msgstr "" -#: ../../../library/os.rst:3274 +#: ../../../library/os.rst:3282 msgid "" "Similarly, although :attr:`st_atime_ns`, :attr:`st_mtime_ns`, :attr:" "`st_ctime_ns` and :attr:`st_birthtime_ns` are always expressed in " @@ -3574,74 +3586,74 @@ msgid "" "`st_birthtime_ns`." msgstr "" -#: ../../../library/os.rst:3284 +#: ../../../library/os.rst:3292 msgid "" "On some Unix systems (such as Linux), the following attributes may also be " "available:" msgstr "" -#: ../../../library/os.rst:3289 +#: ../../../library/os.rst:3297 msgid "" "Number of 512-byte blocks allocated for file. This may be smaller than :attr:" "`st_size`/512 when the file has holes." msgstr "" -#: ../../../library/os.rst:3294 ../../../library/os.rst:3493 +#: ../../../library/os.rst:3302 ../../../library/os.rst:3501 msgid "" "\"Preferred\" blocksize for efficient file system I/O. Writing to a file in " "smaller chunks may cause an inefficient read-modify-rewrite." msgstr "" -#: ../../../library/os.rst:3299 ../../../library/os.rst:3635 +#: ../../../library/os.rst:3307 ../../../library/os.rst:3643 msgid "Type of device if an inode device." msgstr "" -#: ../../../library/os.rst:3303 +#: ../../../library/os.rst:3311 msgid "User defined flags for file." msgstr "" -#: ../../../library/os.rst:3305 +#: ../../../library/os.rst:3313 msgid "" "On other Unix systems (such as FreeBSD), the following attributes may be " "available (but may be only filled out if root tries to use them):" msgstr "" -#: ../../../library/os.rst:3310 +#: ../../../library/os.rst:3318 msgid "File generation number." msgstr "" -#: ../../../library/os.rst:3312 +#: ../../../library/os.rst:3320 msgid "" "On Solaris and derivatives, the following attributes may also be available:" msgstr "" -#: ../../../library/os.rst:3317 +#: ../../../library/os.rst:3325 msgid "" "String that uniquely identifies the type of the filesystem that contains the " "file." msgstr "" -#: ../../../library/os.rst:3320 +#: ../../../library/os.rst:3328 msgid "On macOS systems, the following attributes may also be available:" msgstr "" -#: ../../../library/os.rst:3324 +#: ../../../library/os.rst:3332 msgid "Real size of the file." msgstr "" -#: ../../../library/os.rst:3328 +#: ../../../library/os.rst:3336 msgid "Creator of the file." msgstr "" -#: ../../../library/os.rst:3332 +#: ../../../library/os.rst:3340 msgid "File type." msgstr "" -#: ../../../library/os.rst:3334 +#: ../../../library/os.rst:3342 msgid "On Windows systems, the following attributes are also available:" msgstr "" -#: ../../../library/os.rst:3338 +#: ../../../library/os.rst:3346 msgid "" "Windows file attributes: ``dwFileAttributes`` member of the " "``BY_HANDLE_FILE_INFORMATION`` structure returned by :c:func:`!" @@ -3649,7 +3661,7 @@ msgid "" "FILE_ATTRIBUTE_ARCHIVE>` constants in the :mod:`stat` module." msgstr "" -#: ../../../library/os.rst:3348 +#: ../../../library/os.rst:3356 msgid "" "When :attr:`st_file_attributes` has the :const:`~stat." "FILE_ATTRIBUTE_REPARSE_POINT` set, this field contains the tag identifying " @@ -3657,14 +3669,14 @@ msgid "" "IO_REPARSE_TAG_SYMLINK>` constants in the :mod:`stat` module." msgstr "" -#: ../../../library/os.rst:3353 +#: ../../../library/os.rst:3361 msgid "" "The standard module :mod:`stat` defines functions and constants that are " "useful for extracting information from a :c:struct:`stat` structure. (On " "Windows, some items are filled with dummy values.)" msgstr "" -#: ../../../library/os.rst:3357 +#: ../../../library/os.rst:3365 msgid "" "For backward compatibility, a :class:`stat_result` instance is also " "accessible as a tuple of at least 10 integers giving the most important (and " @@ -3676,56 +3688,56 @@ msgid "" "class:`stat_result` as a tuple always returns integers." msgstr "" -#: ../../../library/os.rst:3366 +#: ../../../library/os.rst:3374 msgid "Windows now returns the file index as :attr:`st_ino` when available." msgstr "" -#: ../../../library/os.rst:3370 +#: ../../../library/os.rst:3378 msgid "Added the :attr:`st_fstype` member to Solaris/derivatives." msgstr "" -#: ../../../library/os.rst:3373 +#: ../../../library/os.rst:3381 msgid "Added the :attr:`st_reparse_tag` member on Windows." msgstr "" -#: ../../../library/os.rst:3376 +#: ../../../library/os.rst:3384 msgid "" "On Windows, the :attr:`st_mode` member now identifies special files as :" "const:`~stat.S_IFCHR`, :const:`~stat.S_IFIFO` or :const:`~stat.S_IFBLK` as " "appropriate." msgstr "" -#: ../../../library/os.rst:3381 +#: ../../../library/os.rst:3389 msgid "" "On Windows, :attr:`st_ctime` is deprecated. Eventually, it will contain the " "last metadata change time, for consistency with other platforms, but for now " "still contains creation time. Use :attr:`st_birthtime` for the creation time." msgstr "" -#: ../../../library/os.rst:3387 +#: ../../../library/os.rst:3395 msgid "" "On Windows, :attr:`st_ino` may now be up to 128 bits, depending on the file " "system. Previously it would not be above 64 bits, and larger file " "identifiers would be arbitrarily packed." msgstr "" -#: ../../../library/os.rst:3391 +#: ../../../library/os.rst:3399 msgid "" "On Windows, :attr:`st_rdev` no longer returns a value. Previously it would " "contain the same as :attr:`st_dev`, which was incorrect." msgstr "" -#: ../../../library/os.rst:3394 +#: ../../../library/os.rst:3402 msgid "Added the :attr:`st_birthtime` member on Windows." msgstr "" -#: ../../../library/os.rst:3399 +#: ../../../library/os.rst:3407 msgid "" "Get the status of a file or file descriptor by performing a :c:func:`!statx` " "system call on the given path." msgstr "" -#: ../../../library/os.rst:3402 +#: ../../../library/os.rst:3410 msgid "" "*path* is a :term:`path-like object` or an open file descriptor. *mask* is a " "combination of the module-level :const:`STATX_* ` constants " @@ -3736,231 +3748,231 @@ msgid "" "retrieved (which may differ from *mask*)." msgstr "" -#: ../../../library/os.rst:3410 +#: ../../../library/os.rst:3418 msgid "" "This function supports :ref:`specifying a file descriptor `, :ref:" "`paths relative to directory descriptors `, and :ref:`not following " "symlinks `." msgstr "" -#: ../../../library/os.rst:3414 ../../../library/os.rst:3671 +#: ../../../library/os.rst:3422 ../../../library/os.rst:3679 msgid "The :manpage:`statx(2)` man page." msgstr "" -#: ../../../library/os.rst:3423 +#: ../../../library/os.rst:3431 msgid "Information about a file returned by :func:`os.statx`." msgstr "" -#: ../../../library/os.rst:3425 +#: ../../../library/os.rst:3433 msgid ":class:`!statx_result` has the following attributes:" msgstr "" -#: ../../../library/os.rst:3431 ../../../library/os.rst:3438 +#: ../../../library/os.rst:3439 ../../../library/os.rst:3446 msgid "" "Equal to ``None`` if :data:`STATX_ATIME` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3443 +#: ../../../library/os.rst:3451 msgid "Maximum iovecs for direct I/O with torn-write protection." msgstr "" -#: ../../../library/os.rst:3445 ../../../library/os.rst:3455 -#: ../../../library/os.rst:3465 ../../../library/os.rst:3475 +#: ../../../library/os.rst:3453 ../../../library/os.rst:3463 +#: ../../../library/os.rst:3473 ../../../library/os.rst:3483 msgid "" "Equal to ``None`` if :data:`STATX_WRITE_ATOMIC` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3453 +#: ../../../library/os.rst:3461 msgid "Maximum size for direct I/O with torn-write protection." msgstr "" -#: ../../../library/os.rst:3463 +#: ../../../library/os.rst:3471 msgid "Maximum optimized size for direct I/O with torn-write protection." msgstr "" -#: ../../../library/os.rst:3473 +#: ../../../library/os.rst:3481 msgid "Minimum size for direct I/O with torn-write protection." msgstr "" -#: ../../../library/os.rst:3483 +#: ../../../library/os.rst:3491 msgid "" "Bitmask of :const:`STATX_ATTR_* ` constants " "specifying the attributes of this file." msgstr "" -#: ../../../library/os.rst:3488 +#: ../../../library/os.rst:3496 msgid "" "A mask indicating which bits in :attr:`stx_attributes` are supported by the " "VFS and the filesystem." msgstr "" -#: ../../../library/os.rst:3498 +#: ../../../library/os.rst:3506 msgid "" "Number of 512-byte blocks allocated for file. This may be smaller than :attr:" "`stx_size`/512 when the file has holes." msgstr "" -#: ../../../library/os.rst:3501 +#: ../../../library/os.rst:3509 msgid "" "Equal to ``None`` if :data:`STATX_BLOCKS` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3506 +#: ../../../library/os.rst:3514 msgid "Time of file creation expressed in seconds." msgstr "" -#: ../../../library/os.rst:3508 ../../../library/os.rst:3515 +#: ../../../library/os.rst:3516 ../../../library/os.rst:3523 msgid "" "Equal to ``None`` if :data:`STATX_BTIME` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3513 +#: ../../../library/os.rst:3521 msgid "Time of file creation expressed in nanoseconds as an integer." msgstr "" -#: ../../../library/os.rst:3522 ../../../library/os.rst:3530 +#: ../../../library/os.rst:3530 ../../../library/os.rst:3538 msgid "" "Equal to ``None`` if :data:`STATX_CTIME` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3539 +#: ../../../library/os.rst:3547 msgid "Major number of the device on which this file resides." msgstr "" -#: ../../../library/os.rst:3543 +#: ../../../library/os.rst:3551 msgid "Minor number of the device on which this file resides." msgstr "" -#: ../../../library/os.rst:3547 +#: ../../../library/os.rst:3555 msgid "Direct I/O memory buffer alignment requirement." msgstr "" -#: ../../../library/os.rst:3549 ../../../library/os.rst:3559 +#: ../../../library/os.rst:3557 ../../../library/os.rst:3567 msgid "" "Equal to ``None`` if :data:`STATX_DIOALIGN` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3557 +#: ../../../library/os.rst:3565 msgid "Direct I/O file offset alignment requirement." msgstr "" -#: ../../../library/os.rst:3567 +#: ../../../library/os.rst:3575 msgid "Direct I/O file offset alignment requirement for reads." msgstr "" -#: ../../../library/os.rst:3569 +#: ../../../library/os.rst:3577 msgid "" "Equal to ``None`` if :data:`STATX_DIO_READ_ALIGN` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3579 +#: ../../../library/os.rst:3587 msgid "" "Equal to ``None`` if :data:`STATX_GID` is missing from :attr:`~statx_result." "stx_mask`." msgstr "" -#: ../../../library/os.rst:3584 +#: ../../../library/os.rst:3592 msgid "Inode number." msgstr "" -#: ../../../library/os.rst:3586 +#: ../../../library/os.rst:3594 msgid "" "Equal to ``None`` if :data:`STATX_INO` is missing from :attr:`~statx_result." "stx_mask`." msgstr "" -#: ../../../library/os.rst:3591 +#: ../../../library/os.rst:3599 msgid "" "Bitmask of :const:`STATX_* ` constants specifying the " "information retrieved, which may differ from what was requested." msgstr "" -#: ../../../library/os.rst:3596 +#: ../../../library/os.rst:3604 msgid "Mount identifier." msgstr "" -#: ../../../library/os.rst:3598 +#: ../../../library/os.rst:3606 msgid "" "Equal to ``None`` if :data:`STATX_MNT_ID` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3608 +#: ../../../library/os.rst:3616 msgid "" "Equal to ``None`` if :data:`STATX_TYPE | STATX_MODE ` is missing " "from :attr:`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3615 ../../../library/os.rst:3623 +#: ../../../library/os.rst:3623 ../../../library/os.rst:3631 msgid "" "Equal to ``None`` if :data:`STATX_MTIME` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3630 +#: ../../../library/os.rst:3638 msgid "" "Equal to ``None`` if :data:`STATX_NLINK` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3639 +#: ../../../library/os.rst:3647 msgid "Major number of the device this file represents." msgstr "" -#: ../../../library/os.rst:3643 +#: ../../../library/os.rst:3651 msgid "Minor number of the device this file represents." msgstr "" -#: ../../../library/os.rst:3651 +#: ../../../library/os.rst:3659 msgid "" "Equal to ``None`` if :data:`STATX_SIZE` is missing from :attr:`~statx_result." "stx_mask`." msgstr "" -#: ../../../library/os.rst:3656 +#: ../../../library/os.rst:3664 msgid "Subvolume identifier." msgstr "" -#: ../../../library/os.rst:3658 +#: ../../../library/os.rst:3666 msgid "" "Equal to ``None`` if :data:`STATX_SUBVOL` is missing from :attr:" "`~statx_result.stx_mask`." msgstr "" -#: ../../../library/os.rst:3668 +#: ../../../library/os.rst:3676 msgid "" "Equal to ``None`` if :data:`STATX_UID` is missing from :attr:`~statx_result." "stx_mask`." msgstr "" -#: ../../../library/os.rst:3698 +#: ../../../library/os.rst:3706 msgid "" "Bitflags for use in the *mask* parameter to :func:`os.statx`. Some of these " "flags may be available even when their corresponding members in :class:" "`statx_result` are not available." msgstr "" -#: ../../../library/os.rst:3708 +#: ../../../library/os.rst:3716 msgid "" "A flag for the :func:`os.statx` function. Requests that the kernel return " "up-to-date information even when doing so is expensive (for example, " "requiring a round trip to the server for a file on a network filesystem)." msgstr "" -#: ../../../library/os.rst:3718 +#: ../../../library/os.rst:3726 msgid "" "A flag for the :func:`os.statx` function. Requests that the kernel return " "cached information if possible." msgstr "" -#: ../../../library/os.rst:3727 +#: ../../../library/os.rst:3735 msgid "" "A flag for the :func:`os.statx` function. This flag is defined as ``0``, so " "it has no effect, but it can be used to explicitly indicate neither :data:" @@ -3969,14 +3981,14 @@ msgid "" "as fresh as :func:`os.stat` would return." msgstr "" -#: ../../../library/os.rst:3740 +#: ../../../library/os.rst:3748 msgid "" "If the final component of a path is an automount point, operate on the " "automount point instead of performing the automount. On Linux, :func:`os." "stat`, :func:`os.fstat` and :func:`os.lstat` always behave this way." msgstr "" -#: ../../../library/os.rst:3752 +#: ../../../library/os.rst:3760 msgid "" "Perform a :c:func:`!statvfs` system call on the given path. The return " "value is an object whose attributes describe the filesystem on the given " @@ -3986,7 +3998,7 @@ msgid "" "`f_favail`, :attr:`f_flag`, :attr:`f_namemax`, :attr:`f_fsid`." msgstr "" -#: ../../../library/os.rst:3759 +#: ../../../library/os.rst:3767 msgid "" "Two module-level constants are defined for the :attr:`f_flag` attribute's " "bit-flags: if :const:`ST_RDONLY` is set, the filesystem is mounted read-" @@ -3994,7 +4006,7 @@ msgid "" "are disabled or not supported." msgstr "" -#: ../../../library/os.rst:3764 +#: ../../../library/os.rst:3772 msgid "" "Additional module-level constants are defined for GNU/glibc based systems. " "These are :const:`ST_NODEV` (disallow access to device special files), :" @@ -4007,11 +4019,11 @@ msgid "" "relative to mtime/ctime)." msgstr "" -#: ../../../library/os.rst:3777 +#: ../../../library/os.rst:3785 msgid "The :const:`ST_RDONLY` and :const:`ST_NOSUID` constants were added." msgstr "" -#: ../../../library/os.rst:3783 +#: ../../../library/os.rst:3791 msgid "" "The :const:`ST_NODEV`, :const:`ST_NOEXEC`, :const:`ST_SYNCHRONOUS`, :const:" "`ST_MANDLOCK`, :const:`ST_WRITE`, :const:`ST_APPEND`, :const:" @@ -4019,11 +4031,11 @@ msgid "" "`ST_RELATIME` constants were added." msgstr "" -#: ../../../library/os.rst:3792 +#: ../../../library/os.rst:3800 msgid "Added the :attr:`f_fsid` attribute." msgstr "" -#: ../../../library/os.rst:3798 +#: ../../../library/os.rst:3806 msgid "" "A :class:`set` object indicating which functions in the :mod:`!os` module " "accept an open file descriptor for their *dir_fd* parameter. Different " @@ -4035,7 +4047,7 @@ msgid "" "(Specifying ``None`` for *dir_fd* is always supported on all platforms.)" msgstr "" -#: ../../../library/os.rst:3808 +#: ../../../library/os.rst:3816 msgid "" "To check whether a particular function accepts an open file descriptor for " "its *dir_fd* parameter, use the ``in`` operator on ``supports_dir_fd``. As " @@ -4043,13 +4055,13 @@ msgid "" "open file descriptors for *dir_fd* on the local platform::" msgstr "" -#: ../../../library/os.rst:3815 +#: ../../../library/os.rst:3823 msgid "" "Currently *dir_fd* parameters only work on Unix platforms; none of them work " "on Windows." msgstr "" -#: ../../../library/os.rst:3823 +#: ../../../library/os.rst:3831 msgid "" "A :class:`set` object indicating whether :func:`os.access` permits " "specifying ``True`` for its *effective_ids* parameter on the local platform. " @@ -4058,19 +4070,19 @@ msgid "" "func:`os.access`; otherwise it will be empty." msgstr "" -#: ../../../library/os.rst:3829 +#: ../../../library/os.rst:3837 msgid "" "This expression evaluates to ``True`` if :func:`os.access` supports " "``effective_ids=True`` on the local platform::" msgstr "" -#: ../../../library/os.rst:3834 +#: ../../../library/os.rst:3842 msgid "" "Currently *effective_ids* is only supported on Unix platforms; it does not " "work on Windows." msgstr "" -#: ../../../library/os.rst:3842 +#: ../../../library/os.rst:3850 msgid "" "A :class:`set` object indicating which functions in the :mod:`!os` module " "permit specifying their *path* parameter as an open file descriptor on the " @@ -4079,7 +4091,7 @@ msgid "" "*path* arguments is not available on all platforms Python supports." msgstr "" -#: ../../../library/os.rst:3849 +#: ../../../library/os.rst:3857 msgid "" "To determine whether a particular function permits specifying an open file " "descriptor for its *path* parameter, use the ``in`` operator on " @@ -4088,7 +4100,7 @@ msgid "" "platform::" msgstr "" -#: ../../../library/os.rst:3862 +#: ../../../library/os.rst:3870 msgid "" "A :class:`set` object indicating which functions in the :mod:`!os` module " "accept ``False`` for their *follow_symlinks* parameter on the local " @@ -4101,7 +4113,7 @@ msgid "" "on all platforms.)" msgstr "" -#: ../../../library/os.rst:3872 +#: ../../../library/os.rst:3880 msgid "" "To check whether a particular function accepts ``False`` for its " "*follow_symlinks* parameter, use the ``in`` operator on " @@ -4110,17 +4122,17 @@ msgid "" "stat` on the local platform::" msgstr "" -#: ../../../library/os.rst:3885 +#: ../../../library/os.rst:3893 msgid "Create a symbolic link pointing to *src* named *dst*." msgstr "" -#: ../../../library/os.rst:3887 +#: ../../../library/os.rst:3895 msgid "" "The *src* parameter refers to the target of the link (the file or directory " "being linked to), and *dst* is the name of the link being created." msgstr "" -#: ../../../library/os.rst:3890 +#: ../../../library/os.rst:3898 msgid "" "On Windows, a symlink represents either a file or a directory, and does not " "morph to the target dynamically. If the target is present, the type of the " @@ -4130,7 +4142,7 @@ msgid "" "ignored." msgstr "" -#: ../../../library/os.rst:3901 +#: ../../../library/os.rst:3909 msgid "" "On newer versions of Windows 10, unprivileged accounts can create symlinks " "if Developer Mode is enabled. When Developer Mode is not available/enabled, " @@ -4138,84 +4150,84 @@ msgid "" "must be run as an administrator." msgstr "" -#: ../../../library/os.rst:3907 +#: ../../../library/os.rst:3915 msgid "" ":exc:`OSError` is raised when the function is called by an unprivileged user." msgstr "" -#: ../../../library/os.rst:3910 +#: ../../../library/os.rst:3918 msgid "" "Raises an :ref:`auditing event ` ``os.symlink`` with arguments " "``src``, ``dst``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:3920 +#: ../../../library/os.rst:3928 msgid "" "Added the *dir_fd* parameter, and now allow *target_is_directory* on non-" "Windows platforms." msgstr "" -#: ../../../library/os.rst:3927 +#: ../../../library/os.rst:3935 msgid "Added support for unelevated symlinks on Windows with Developer Mode." msgstr "" -#: ../../../library/os.rst:3933 +#: ../../../library/os.rst:3941 msgid "Force write of everything to disk." msgstr "" -#: ../../../library/os.rst:3942 +#: ../../../library/os.rst:3950 msgid "" "Truncate the file corresponding to *path*, so that it is at most *length* " "bytes in size." msgstr "" -#: ../../../library/os.rst:3947 +#: ../../../library/os.rst:3955 msgid "" "Raises an :ref:`auditing event ` ``os.truncate`` with arguments " "``path``, ``length``." msgstr "" -#: ../../../library/os.rst:3962 +#: ../../../library/os.rst:3970 msgid "" "Remove (delete) the file *path*. This function is semantically identical " "to :func:`remove`; the ``unlink`` name is its traditional Unix name. Please " "see the documentation for :func:`remove` for further information." msgstr "" -#: ../../../library/os.rst:3978 +#: ../../../library/os.rst:3986 msgid "Set the access and modified times of the file specified by *path*." msgstr "" -#: ../../../library/os.rst:3980 +#: ../../../library/os.rst:3988 msgid "" ":func:`utime` takes two optional parameters, *times* and *ns*. These specify " "the times set on *path* and are used as follows:" msgstr "" -#: ../../../library/os.rst:3983 +#: ../../../library/os.rst:3991 msgid "" "If *ns* is specified, it must be a 2-tuple of the form ``(atime_ns, " "mtime_ns)`` where each member is an int expressing nanoseconds." msgstr "" -#: ../../../library/os.rst:3986 +#: ../../../library/os.rst:3994 msgid "" "If *times* is not ``None``, it must be a 2-tuple of the form ``(atime, " "mtime)`` where each member is a real number expressing seconds, rounded down " "to nanoseconds." msgstr "" -#: ../../../library/os.rst:3990 +#: ../../../library/os.rst:3998 msgid "" "If *times* is ``None`` and *ns* is unspecified, this is equivalent to " "specifying ``ns=(atime_ns, mtime_ns)`` where both times are the current time." msgstr "" -#: ../../../library/os.rst:3994 +#: ../../../library/os.rst:4002 msgid "It is an error to specify tuples for both *times* and *ns*." msgstr "" -#: ../../../library/os.rst:3996 +#: ../../../library/os.rst:4004 msgid "" "Note that the exact times you set here may not be returned by a subsequent :" "func:`~os.stat` call, depending on the resolution with which your operating " @@ -4225,23 +4237,23 @@ msgid "" "func:`utime`." msgstr "" -#: ../../../library/os.rst:4007 +#: ../../../library/os.rst:4015 msgid "" "Raises an :ref:`auditing event ` ``os.utime`` with arguments " "``path``, ``times``, ``ns``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:4009 +#: ../../../library/os.rst:4017 msgid "" "Added support for specifying *path* as an open file descriptor, and the " "*dir_fd*, *follow_symlinks*, and *ns* parameters." msgstr "" -#: ../../../library/os.rst:4016 +#: ../../../library/os.rst:4024 msgid "Accepts any real numbers as *times*, not only integers or floats." msgstr "" -#: ../../../library/os.rst:4026 +#: ../../../library/os.rst:4034 msgid "" "Generate the file names in a directory tree by walking the tree either top-" "down or bottom-up. For each directory in the tree rooted at directory *top* " @@ -4249,7 +4261,7 @@ msgid "" "filenames)``." msgstr "" -#: ../../../library/os.rst:4031 +#: ../../../library/os.rst:4039 msgid "" "*dirpath* is a string, the path to the directory. *dirnames* is a list of " "the names of the subdirectories in *dirpath* (including symlinks to " @@ -4263,7 +4275,7 @@ msgid "" "unspecified." msgstr "" -#: ../../../library/os.rst:4042 +#: ../../../library/os.rst:4050 msgid "" "If optional argument *topdown* is ``True`` or not specified, the triple for " "a directory is generated before the triples for any of its subdirectories " @@ -4274,7 +4286,7 @@ msgid "" "its subdirectories are generated." msgstr "" -#: ../../../library/os.rst:4050 +#: ../../../library/os.rst:4058 msgid "" "When *topdown* is ``True``, the caller can modify the *dirnames* list in-" "place (perhaps using :keyword:`del` or slice assignment), and :func:`walk` " @@ -4287,7 +4299,7 @@ msgid "" "itself is generated." msgstr "" -#: ../../../library/os.rst:4059 +#: ../../../library/os.rst:4067 msgid "" "By default, errors from the :func:`scandir` call are ignored. If optional " "argument *onerror* is specified, it should be a function; it will be called " @@ -4297,66 +4309,66 @@ msgid "" "object." msgstr "" -#: ../../../library/os.rst:4065 +#: ../../../library/os.rst:4073 msgid "" "By default, :func:`walk` will not walk down into symbolic links that resolve " "to directories. Set *followlinks* to ``True`` to visit directories pointed " "to by symlinks, on systems that support them." msgstr "" -#: ../../../library/os.rst:4071 +#: ../../../library/os.rst:4079 msgid "" "Be aware that setting *followlinks* to ``True`` can lead to infinite " "recursion if a link points to a parent directory of itself. :func:`walk` " "does not keep track of the directories it visited already." msgstr "" -#: ../../../library/os.rst:4077 +#: ../../../library/os.rst:4085 msgid "" "If you pass a relative pathname, don't change the current working directory " "between resumptions of :func:`walk`. :func:`walk` never changes the current " "directory, and assumes that its caller doesn't either." msgstr "" -#: ../../../library/os.rst:4081 ../../../library/os.rst:4143 +#: ../../../library/os.rst:4089 ../../../library/os.rst:4151 msgid "" "This example displays the number of bytes taken by non-directory files in " "each directory under the starting directory, except that it doesn't look " "under any ``__pycache__`` subdirectory::" msgstr "" -#: ../../../library/os.rst:4094 +#: ../../../library/os.rst:4102 msgid "" "In the next example (simple implementation of :func:`shutil.rmtree`), " "walking the tree bottom-up is essential, :func:`rmdir` doesn't allow " "deleting a directory before the directory is empty::" msgstr "" -#: ../../../library/os.rst:4110 +#: ../../../library/os.rst:4118 msgid "" "Raises an :ref:`auditing event ` ``os.walk`` with arguments " "``top``, ``topdown``, ``onerror``, ``followlinks``." msgstr "" -#: ../../../library/os.rst:4112 +#: ../../../library/os.rst:4120 msgid "" "This function now calls :func:`os.scandir` instead of :func:`os.listdir`, " "making it faster by reducing the number of calls to :func:`os.stat`." msgstr "" -#: ../../../library/os.rst:4126 +#: ../../../library/os.rst:4134 msgid "" "This behaves exactly like :func:`walk`, except that it yields a 4-tuple " "``(dirpath, dirnames, filenames, dirfd)``, and it supports ``dir_fd``." msgstr "" -#: ../../../library/os.rst:4129 +#: ../../../library/os.rst:4137 msgid "" "*dirpath*, *dirnames* and *filenames* are identical to :func:`walk` output, " "and *dirfd* is a file descriptor referring to the directory *dirpath*." msgstr "" -#: ../../../library/os.rst:4132 +#: ../../../library/os.rst:4140 msgid "" "This function always supports :ref:`paths relative to directory descriptors " "` and :ref:`not following symlinks `. Note however " @@ -4364,30 +4376,30 @@ msgid "" "*follow_symlinks* is ``False``." msgstr "" -#: ../../../library/os.rst:4139 +#: ../../../library/os.rst:4147 msgid "" "Since :func:`fwalk` yields file descriptors, those are only valid until the " "next iteration step, so you should duplicate them (e.g. with :func:`dup`) if " "you want to keep them longer." msgstr "" -#: ../../../library/os.rst:4156 +#: ../../../library/os.rst:4164 msgid "" "In the next example, walking the tree bottom-up is essential: :func:`rmdir` " "doesn't allow deleting a directory before the directory is empty::" msgstr "" -#: ../../../library/os.rst:4171 +#: ../../../library/os.rst:4179 msgid "" "Raises an :ref:`auditing event ` ``os.fwalk`` with arguments " "``top``, ``topdown``, ``onerror``, ``follow_symlinks``, ``dir_fd``." msgstr "" -#: ../../../library/os.rst:4180 +#: ../../../library/os.rst:4188 msgid "Added support for :class:`bytes` paths." msgstr "" -#: ../../../library/os.rst:4186 +#: ../../../library/os.rst:4194 msgid "" "Create an anonymous file and return a file descriptor that refers to it. " "*flags* must be one of the ``os.MFD_*`` constants available on the system " @@ -4395,7 +4407,7 @@ msgid "" "descriptor is :ref:`non-inheritable `." msgstr "" -#: ../../../library/os.rst:4191 +#: ../../../library/os.rst:4199 msgid "" "The name supplied in *name* is used as a filename and will be displayed as " "the target of the corresponding symbolic link in the directory ``/proc/self/" @@ -4405,15 +4417,15 @@ msgid "" "side effects." msgstr "" -#: ../../../library/os.rst:4221 +#: ../../../library/os.rst:4229 msgid "These flags can be passed to :func:`memfd_create`." msgstr "" -#: ../../../library/os.rst:4225 +#: ../../../library/os.rst:4233 msgid "The ``MFD_HUGE*`` flags are only available since Linux 4.14." msgstr "" -#: ../../../library/os.rst:4232 +#: ../../../library/os.rst:4240 msgid "" "Create and return an event file descriptor. The file descriptors supports " "raw :func:`read` and :func:`write` with a buffer size of 8, :func:`~select." @@ -4422,7 +4434,7 @@ msgid "" "ref:`non-inheritable `." msgstr "" -#: ../../../library/os.rst:4238 +#: ../../../library/os.rst:4246 msgid "" "*initval* is the initial value of the event counter. The initial value must " "be a 32 bit unsigned integer. Please note that the initial value is limited " @@ -4430,96 +4442,96 @@ msgid "" "integer with a maximum value of 2\\ :sup:`64`\\ -\\ 2." msgstr "" -#: ../../../library/os.rst:4243 +#: ../../../library/os.rst:4251 msgid "" "*flags* can be constructed from :const:`EFD_CLOEXEC`, :const:`EFD_NONBLOCK`, " "and :const:`EFD_SEMAPHORE`." msgstr "" -#: ../../../library/os.rst:4246 +#: ../../../library/os.rst:4254 msgid "" "If :const:`EFD_SEMAPHORE` is specified and the event counter is non-zero, :" "func:`eventfd_read` returns 1 and decrements the counter by one." msgstr "" -#: ../../../library/os.rst:4249 +#: ../../../library/os.rst:4257 msgid "" "If :const:`EFD_SEMAPHORE` is not specified and the event counter is non-" "zero, :func:`eventfd_read` returns the current event counter value and " "resets the counter to zero." msgstr "" -#: ../../../library/os.rst:4253 +#: ../../../library/os.rst:4261 msgid "" "If the event counter is zero and :const:`EFD_NONBLOCK` is not specified, :" "func:`eventfd_read` blocks." msgstr "" -#: ../../../library/os.rst:4256 +#: ../../../library/os.rst:4264 msgid "" ":func:`eventfd_write` increments the event counter. Write blocks if the " "write operation would increment the counter to a value larger than 2\\ :sup:" "`64`\\ -\\ 2." msgstr "" -#: ../../../library/os.rst:4283 +#: ../../../library/os.rst:4291 msgid "" "Read value from an :func:`eventfd` file descriptor and return a 64 bit " "unsigned int. The function does not verify that *fd* is an :func:`eventfd`." msgstr "" -#: ../../../library/os.rst:4292 +#: ../../../library/os.rst:4300 msgid "" "Add value to an :func:`eventfd` file descriptor. *value* must be a 64 bit " "unsigned int. The function does not verify that *fd* is an :func:`eventfd`." msgstr "" -#: ../../../library/os.rst:4301 +#: ../../../library/os.rst:4309 msgid "Set close-on-exec flag for new :func:`eventfd` file descriptor." msgstr "" -#: ../../../library/os.rst:4309 +#: ../../../library/os.rst:4317 msgid "" "Set :const:`O_NONBLOCK` status flag for new :func:`eventfd` file descriptor." msgstr "" -#: ../../../library/os.rst:4318 +#: ../../../library/os.rst:4326 msgid "" "Provide semaphore-like semantics for reads from an :func:`eventfd` file " "descriptor. On read the internal counter is decremented by one." msgstr "" -#: ../../../library/os.rst:4329 +#: ../../../library/os.rst:4337 msgid "Timer File Descriptors" msgstr "" -#: ../../../library/os.rst:4333 +#: ../../../library/os.rst:4341 msgid "" "These functions provide support for Linux's *timer file descriptor* API. " "Naturally, they are all only available on Linux." msgstr "" -#: ../../../library/os.rst:4338 +#: ../../../library/os.rst:4346 msgid "Create and return a timer file descriptor (*timerfd*)." msgstr "" -#: ../../../library/os.rst:4340 +#: ../../../library/os.rst:4348 msgid "The file descriptor returned by :func:`timerfd_create` supports:" msgstr "" -#: ../../../library/os.rst:4342 +#: ../../../library/os.rst:4350 msgid ":func:`read`" msgstr "" -#: ../../../library/os.rst:4343 +#: ../../../library/os.rst:4351 msgid ":func:`~select.select`" msgstr "" -#: ../../../library/os.rst:4344 +#: ../../../library/os.rst:4352 msgid ":func:`~select.poll`" msgstr "" -#: ../../../library/os.rst:4346 +#: ../../../library/os.rst:4354 msgid "" "The file descriptor's :func:`read` method can be called with a buffer size " "of 8. If the timer has already expired one or more times, :func:`read` " @@ -4528,31 +4540,31 @@ msgid "" "byteorder)``." msgstr "" -#: ../../../library/os.rst:4351 +#: ../../../library/os.rst:4359 msgid "" ":func:`~select.select` and :func:`~select.poll` can be used to wait until " "timer expires and the file descriptor is readable." msgstr "" -#: ../../../library/os.rst:4354 +#: ../../../library/os.rst:4362 msgid "" "*clockid* must be a valid :ref:`clock ID `, as " "defined in the :py:mod:`time` module:" msgstr "" -#: ../../../library/os.rst:4357 +#: ../../../library/os.rst:4365 msgid ":const:`time.CLOCK_REALTIME`" msgstr "" -#: ../../../library/os.rst:4358 +#: ../../../library/os.rst:4366 msgid ":const:`time.CLOCK_MONOTONIC`" msgstr "" -#: ../../../library/os.rst:4359 +#: ../../../library/os.rst:4367 msgid ":const:`time.CLOCK_BOOTTIME` (Since Linux 3.15 for timerfd_create)" msgstr "" -#: ../../../library/os.rst:4361 +#: ../../../library/os.rst:4369 msgid "" "If *clockid* is :const:`time.CLOCK_REALTIME`, a settable system-wide real-" "time clock is used. If system clock is changed, timer setting need to be " @@ -4560,35 +4572,35 @@ msgid "" "`TFD_TIMER_CANCEL_ON_SET`." msgstr "" -#: ../../../library/os.rst:4366 +#: ../../../library/os.rst:4374 msgid "" "If *clockid* is :const:`time.CLOCK_MONOTONIC`, a non-settable monotonically " "increasing clock is used. Even if the system clock is changed, the timer " "setting will not be affected." msgstr "" -#: ../../../library/os.rst:4370 +#: ../../../library/os.rst:4378 msgid "" "If *clockid* is :const:`time.CLOCK_BOOTTIME`, same as :const:`time." "CLOCK_MONOTONIC` except it includes any time that the system is suspended." msgstr "" -#: ../../../library/os.rst:4373 +#: ../../../library/os.rst:4381 msgid "" "The file descriptor's behaviour can be modified by specifying a *flags* " "value. Any of the following variables may be used, combined using bitwise OR " "(the ``|`` operator):" msgstr "" -#: ../../../library/os.rst:4377 +#: ../../../library/os.rst:4385 msgid ":const:`TFD_NONBLOCK`" msgstr "" -#: ../../../library/os.rst:4378 +#: ../../../library/os.rst:4386 msgid ":const:`TFD_CLOEXEC`" msgstr "" -#: ../../../library/os.rst:4380 +#: ../../../library/os.rst:4388 msgid "" "If :const:`TFD_NONBLOCK` is not set as a flag, :func:`read` blocks until the " "timer expires. If it is set as a flag, :func:`read` doesn't block, but If " @@ -4596,46 +4608,46 @@ msgid "" "raises :class:`OSError` with ``errno`` is set to :const:`errno.EAGAIN`." msgstr "" -#: ../../../library/os.rst:4386 +#: ../../../library/os.rst:4394 msgid ":const:`TFD_CLOEXEC` is always set by Python automatically." msgstr "" -#: ../../../library/os.rst:4388 +#: ../../../library/os.rst:4396 msgid "" "The file descriptor must be closed with :func:`os.close` when it is no " "longer needed, or else the file descriptor will be leaked." msgstr "" -#: ../../../library/os.rst:4391 +#: ../../../library/os.rst:4399 msgid "The :manpage:`timerfd_create(2)` man page." msgstr "" -#: ../../../library/os.rst:4400 +#: ../../../library/os.rst:4408 msgid "" "Alter a timer file descriptor's internal timer. This function operates the " "same interval timer as :func:`timerfd_settime_ns`." msgstr "" -#: ../../../library/os.rst:4403 +#: ../../../library/os.rst:4411 msgid "*fd* must be a valid timer file descriptor." msgstr "" -#: ../../../library/os.rst:4405 +#: ../../../library/os.rst:4413 msgid "" "The timer's behaviour can be modified by specifying a *flags* value. Any of " "the following variables may be used, combined using bitwise OR (the ``|`` " "operator):" msgstr "" -#: ../../../library/os.rst:4409 +#: ../../../library/os.rst:4417 msgid ":const:`TFD_TIMER_ABSTIME`" msgstr "" -#: ../../../library/os.rst:4410 +#: ../../../library/os.rst:4418 msgid ":const:`TFD_TIMER_CANCEL_ON_SET`" msgstr "" -#: ../../../library/os.rst:4412 +#: ../../../library/os.rst:4420 msgid "" "The timer is disabled by setting *initial* to zero (``0``). If *initial* is " "equal to or greater than zero, the timer is enabled. If *initial* is less " @@ -4643,20 +4655,20 @@ msgid "" "const:`errno.EINVAL`" msgstr "" -#: ../../../library/os.rst:4417 +#: ../../../library/os.rst:4425 msgid "" "By default the timer will fire when *initial* seconds have elapsed. (If " "*initial* is zero, timer will fire immediately.)" msgstr "" -#: ../../../library/os.rst:4420 +#: ../../../library/os.rst:4428 msgid "" "However, if the :const:`TFD_TIMER_ABSTIME` flag is set, the timer will fire " "when the timer's clock (set by *clockid* in :func:`timerfd_create`) reaches " "*initial* seconds." msgstr "" -#: ../../../library/os.rst:4424 +#: ../../../library/os.rst:4432 msgid "" "The timer's interval is set by the *interval* real number. If *interval* is " "zero, the timer only fires once, on the initial expiration. If *interval* is " @@ -4665,7 +4677,7 @@ msgid "" "raises :class:`OSError` with ``errno`` set to :const:`errno.EINVAL`" msgstr "" -#: ../../../library/os.rst:4431 +#: ../../../library/os.rst:4439 msgid "" "If the :const:`TFD_TIMER_CANCEL_ON_SET` flag is set along with :const:" "`TFD_TIMER_ABSTIME` and the clock for this timer is :const:`time." @@ -4674,86 +4686,86 @@ msgid "" "ECANCELED." msgstr "" -#: ../../../library/os.rst:4437 +#: ../../../library/os.rst:4445 msgid "" "Linux manages system clock as UTC. A daylight-savings time transition is " "done by changing time offset only and doesn't cause discontinuous system " "clock change." msgstr "" -#: ../../../library/os.rst:4441 +#: ../../../library/os.rst:4449 msgid "" "Discontinuous system clock change will be caused by the following events:" msgstr "" -#: ../../../library/os.rst:4443 +#: ../../../library/os.rst:4451 msgid "``settimeofday``" msgstr "" -#: ../../../library/os.rst:4444 +#: ../../../library/os.rst:4452 msgid "``clock_settime``" msgstr "" -#: ../../../library/os.rst:4445 +#: ../../../library/os.rst:4453 msgid "set the system date and time by ``date`` command" msgstr "" -#: ../../../library/os.rst:4447 +#: ../../../library/os.rst:4455 msgid "" "Return a two-item tuple of (``next_expiration``, ``interval``) from the " "previous timer state, before this function executed." msgstr "" -#: ../../../library/os.rst:4452 +#: ../../../library/os.rst:4460 msgid "" ":manpage:`timerfd_create(2)`, :manpage:`timerfd_settime(2)`, :manpage:" "`settimeofday(2)`, :manpage:`clock_settime(2)`, and :manpage:`date(1)`." msgstr "" -#: ../../../library/os.rst:4463 +#: ../../../library/os.rst:4471 msgid "" "Similar to :func:`timerfd_settime`, but use time as nanoseconds. This " "function operates the same interval timer as :func:`timerfd_settime`." msgstr "" -#: ../../../library/os.rst:4473 +#: ../../../library/os.rst:4481 msgid "Return a two-item tuple of floats (``next_expiration``, ``interval``)." msgstr "" -#: ../../../library/os.rst:4475 +#: ../../../library/os.rst:4483 msgid "" "``next_expiration`` denotes the relative time until the timer next fires, " "regardless of if the :const:`TFD_TIMER_ABSTIME` flag is set." msgstr "" -#: ../../../library/os.rst:4478 +#: ../../../library/os.rst:4486 msgid "" "``interval`` denotes the timer's interval. If zero, the timer will only fire " "once, after ``next_expiration`` seconds have elapsed." msgstr "" -#: ../../../library/os.rst:4482 +#: ../../../library/os.rst:4490 msgid ":manpage:`timerfd_gettime(2)`" msgstr "" -#: ../../../library/os.rst:4491 +#: ../../../library/os.rst:4499 msgid "Similar to :func:`timerfd_gettime`, but return time as nanoseconds." msgstr "" -#: ../../../library/os.rst:4499 +#: ../../../library/os.rst:4507 msgid "" "A flag for the :func:`timerfd_create` function, which sets the :const:" "`O_NONBLOCK` status flag for the new timer file descriptor. If :const:" "`TFD_NONBLOCK` is not set as a flag, :func:`read` blocks." msgstr "" -#: ../../../library/os.rst:4509 +#: ../../../library/os.rst:4517 msgid "" "A flag for the :func:`timerfd_create` function, If :const:`TFD_CLOEXEC` is " "set as a flag, set close-on-exec flag for new file descriptor." msgstr "" -#: ../../../library/os.rst:4519 +#: ../../../library/os.rst:4527 msgid "" "A flag for the :func:`timerfd_settime` and :func:`timerfd_settime_ns` " "functions. If this flag is set, *initial* is interpreted as an absolute " @@ -4761,22 +4773,22 @@ msgid "" "Epoch)." msgstr "" -#: ../../../library/os.rst:4529 +#: ../../../library/os.rst:4537 msgid "" "A flag for the :func:`timerfd_settime` and :func:`timerfd_settime_ns` " "functions along with :const:`TFD_TIMER_ABSTIME`. The timer is cancelled when " "the time of the underlying clock changes discontinuously." msgstr "" -#: ../../../library/os.rst:4540 +#: ../../../library/os.rst:4548 msgid "Linux extended attributes" msgstr "" -#: ../../../library/os.rst:4544 +#: ../../../library/os.rst:4552 msgid "These functions are all available on Linux only." msgstr "" -#: ../../../library/os.rst:4548 +#: ../../../library/os.rst:4556 msgid "" "Return the value of the extended filesystem attribute *attribute* for " "*path*. *attribute* can be bytes or str (directly or indirectly through the :" @@ -4784,18 +4796,18 @@ msgid "" "encoding." msgstr "" -#: ../../../library/os.rst:4556 +#: ../../../library/os.rst:4564 msgid "" "Raises an :ref:`auditing event ` ``os.getxattr`` with arguments " "``path``, ``attribute``." msgstr "" -#: ../../../library/os.rst:4558 ../../../library/os.rst:4590 -#: ../../../library/os.rst:4615 +#: ../../../library/os.rst:4566 ../../../library/os.rst:4602 +#: ../../../library/os.rst:4627 msgid "Accepts a :term:`path-like object` for *path* and *attribute*." msgstr "" -#: ../../../library/os.rst:4564 +#: ../../../library/os.rst:4572 msgid "" "Return a list of the extended filesystem attributes on *path*. The " "attributes in the list are represented as strings decoded with the " @@ -4803,13 +4815,19 @@ msgid "" "the current directory." msgstr "" -#: ../../../library/os.rst:4572 +#: ../../../library/os.rst:4580 msgid "" "Raises an :ref:`auditing event ` ``os.listxattr`` with argument " "``path``." msgstr "" -#: ../../../library/os.rst:4580 +#: ../../../library/os.rst:4585 +msgid "" +"``os.listxattr(-1)`` now fails with ``OSError(errno.EBADF)`` rather than " +"listing extended attributes of the current directory." +msgstr "" + +#: ../../../library/os.rst:4592 msgid "" "Removes the extended filesystem attribute *attribute* from *path*. " "*attribute* should be bytes or str (directly or indirectly through the :" @@ -4817,13 +4835,13 @@ msgid "" "`filesystem encoding and error handler`." msgstr "" -#: ../../../library/os.rst:4588 +#: ../../../library/os.rst:4600 msgid "" "Raises an :ref:`auditing event ` ``os.removexattr`` with arguments " "``path``, ``attribute``." msgstr "" -#: ../../../library/os.rst:4596 +#: ../../../library/os.rst:4608 msgid "" "Set the extended filesystem attribute *attribute* on *path* to *value*. " "*attribute* must be a bytes or str with no embedded NULs (directly or " @@ -4835,45 +4853,45 @@ msgid "" "will not be created and ``EEXISTS`` will be raised." msgstr "" -#: ../../../library/os.rst:4610 +#: ../../../library/os.rst:4622 msgid "" "A bug in Linux kernel versions less than 2.6.39 caused the flags argument to " "be ignored on some filesystems." msgstr "" -#: ../../../library/os.rst:4613 +#: ../../../library/os.rst:4625 msgid "" "Raises an :ref:`auditing event ` ``os.setxattr`` with arguments " "``path``, ``attribute``, ``value``, ``flags``." msgstr "" -#: ../../../library/os.rst:4621 +#: ../../../library/os.rst:4633 msgid "" "The maximum size the value of an extended attribute can be. Currently, this " "is 64 KiB on Linux." msgstr "" -#: ../../../library/os.rst:4627 +#: ../../../library/os.rst:4639 msgid "" "This is a possible value for the flags argument in :func:`setxattr`. It " "indicates the operation must create an attribute." msgstr "" -#: ../../../library/os.rst:4633 +#: ../../../library/os.rst:4645 msgid "" "This is a possible value for the flags argument in :func:`setxattr`. It " "indicates the operation must replace an existing attribute." msgstr "" -#: ../../../library/os.rst:4640 +#: ../../../library/os.rst:4652 msgid "Process Management" msgstr "" -#: ../../../library/os.rst:4642 +#: ../../../library/os.rst:4654 msgid "These functions may be used to create and manage processes." msgstr "" -#: ../../../library/os.rst:4644 +#: ../../../library/os.rst:4656 msgid "" "The various :func:`exec\\* ` functions take a list of arguments for " "the new program loaded into the process. In each case, the first of these " @@ -4884,7 +4902,7 @@ msgid "" "standard output; ``foo`` will seem to be ignored." msgstr "" -#: ../../../library/os.rst:4655 +#: ../../../library/os.rst:4667 msgid "" "Generate a :const:`~signal.SIGABRT` signal to the current process. On Unix, " "the default behavior is to produce a core dump; on Windows, the process " @@ -4893,37 +4911,37 @@ msgid "" "`~signal.SIGABRT` with :func:`signal.signal`." msgstr "" -#: ../../../library/os.rst:4664 +#: ../../../library/os.rst:4676 msgid "Add a path to the DLL search path." msgstr "" -#: ../../../library/os.rst:4666 +#: ../../../library/os.rst:4678 msgid "" "This search path is used when resolving dependencies for imported extension " "modules (the module itself is resolved through :data:`sys.path`), and also " "by :mod:`ctypes`." msgstr "" -#: ../../../library/os.rst:4670 +#: ../../../library/os.rst:4682 msgid "" "Remove the directory by calling **close()** on the returned object or using " "it in a :keyword:`with` statement." msgstr "" -#: ../../../library/os.rst:4673 +#: ../../../library/os.rst:4685 msgid "" "See the `Microsoft documentation `_ for more information about how " "DLLs are loaded." msgstr "" -#: ../../../library/os.rst:4677 +#: ../../../library/os.rst:4689 msgid "" "Raises an :ref:`auditing event ` ``os.add_dll_directory`` with " "argument ``path``." msgstr "" -#: ../../../library/os.rst:4681 +#: ../../../library/os.rst:4693 msgid "" "Previous versions of CPython would resolve DLLs using the default behavior " "for the current process. This led to inconsistencies, such as only sometimes " @@ -4931,14 +4949,14 @@ msgid "" "such as ``AddDllDirectory`` having no effect." msgstr "" -#: ../../../library/os.rst:4688 +#: ../../../library/os.rst:4700 msgid "" "In 3.8, the two primary ways DLLs are loaded now explicitly override the " "process-wide behavior to ensure consistency. See the :ref:`porting notes " "` for information on updating libraries." msgstr "" -#: ../../../library/os.rst:4703 +#: ../../../library/os.rst:4715 msgid "" "These functions all execute a new program, replacing the current process; " "they do not return. On Unix, the new executable is loaded into the current " @@ -4946,15 +4964,15 @@ msgid "" "reported as :exc:`OSError` exceptions." msgstr "" -#: ../../../library/os.rst:4708 +#: ../../../library/os.rst:4720 msgid "" "The current process is replaced immediately. Open file objects and " "descriptors are not flushed, so if there may be data buffered on these open " -"files, you should flush them using :func:`sys.stdout.flush` or :func:`os." +"files, you should flush them using :func:`~io.IOBase.flush` or :func:`os." "fsync` before calling an :func:`exec\\* ` function." msgstr "" -#: ../../../library/os.rst:4714 +#: ../../../library/os.rst:4726 msgid "" "The \"l\" and \"v\" variants of the :func:`exec\\* ` functions differ " "in how command-line arguments are passed. The \"l\" variants are perhaps " @@ -4967,7 +4985,7 @@ msgid "" "is not enforced." msgstr "" -#: ../../../library/os.rst:4723 +#: ../../../library/os.rst:4735 msgid "" "The variants which include a \"p\" near the end (:func:`execlp`, :func:" "`execlpe`, :func:`execvp`, and :func:`execvpe`) will use the :envvar:`PATH` " @@ -4981,7 +4999,7 @@ msgid "" "even on Windows, as plain names will not be resolved." msgstr "" -#: ../../../library/os.rst:4734 +#: ../../../library/os.rst:4746 msgid "" "For :func:`execle`, :func:`execlpe`, :func:`execve`, and :func:`execvpe` " "(note that these all end in \"e\"), the *env* parameter must be a mapping " @@ -4991,7 +5009,7 @@ msgid "" "process to inherit the environment of the current process." msgstr "" -#: ../../../library/os.rst:4741 +#: ../../../library/os.rst:4753 msgid "" "For :func:`execve` on some platforms, *path* may also be specified as an " "open file descriptor. This functionality may not be supported on your " @@ -5000,31 +5018,31 @@ msgid "" "`NotImplementedError`." msgstr "" -#: ../../../library/os.rst:4746 +#: ../../../library/os.rst:4758 msgid "" "Raises an :ref:`auditing event ` ``os.exec`` with arguments " "``path``, ``args``, ``env``." msgstr "" -#: ../../../library/os.rst:4750 +#: ../../../library/os.rst:4762 msgid "" "Added support for specifying *path* as an open file descriptor for :func:" "`execve`." msgstr "" -#: ../../../library/os.rst:4759 +#: ../../../library/os.rst:4771 msgid "" "Exit the process with status *n*, without calling cleanup handlers, flushing " "stdio buffers, etc." msgstr "" -#: ../../../library/os.rst:4764 +#: ../../../library/os.rst:4776 msgid "" "The standard way to exit is :func:`sys.exit(n) `. :func:`!_exit` " "should normally only be used in the child process after a :func:`fork`." msgstr "" -#: ../../../library/os.rst:4767 +#: ../../../library/os.rst:4779 msgid "" "The following exit codes are defined and can be used with :func:`_exit`, " "although they are not required. These are typically used for system " @@ -5032,139 +5050,139 @@ msgid "" "delivery program." msgstr "" -#: ../../../library/os.rst:4773 +#: ../../../library/os.rst:4785 msgid "" "Some of these may not be available on all Unix platforms, since there is " "some variation. These constants are defined where they are defined by the " "underlying platform." msgstr "" -#: ../../../library/os.rst:4780 +#: ../../../library/os.rst:4792 msgid "" "Exit code that means no error occurred. May be taken from the defined value " "of ``EXIT_SUCCESS`` on some platforms. Generally has a value of zero." msgstr "" -#: ../../../library/os.rst:4788 +#: ../../../library/os.rst:4800 msgid "" "Exit code that means the command was used incorrectly, such as when the " "wrong number of arguments are given." msgstr "" -#: ../../../library/os.rst:4796 +#: ../../../library/os.rst:4808 msgid "Exit code that means the input data was incorrect." msgstr "" -#: ../../../library/os.rst:4803 +#: ../../../library/os.rst:4815 msgid "Exit code that means an input file did not exist or was not readable." msgstr "" -#: ../../../library/os.rst:4810 +#: ../../../library/os.rst:4822 msgid "Exit code that means a specified user did not exist." msgstr "" -#: ../../../library/os.rst:4817 +#: ../../../library/os.rst:4829 msgid "Exit code that means a specified host did not exist." msgstr "" -#: ../../../library/os.rst:4824 +#: ../../../library/os.rst:4836 msgid "Exit code that means that a required service is unavailable." msgstr "" -#: ../../../library/os.rst:4831 +#: ../../../library/os.rst:4843 msgid "Exit code that means an internal software error was detected." msgstr "" -#: ../../../library/os.rst:4838 +#: ../../../library/os.rst:4850 msgid "" "Exit code that means an operating system error was detected, such as the " "inability to fork or create a pipe." msgstr "" -#: ../../../library/os.rst:4846 +#: ../../../library/os.rst:4858 msgid "" "Exit code that means some system file did not exist, could not be opened, or " "had some other kind of error." msgstr "" -#: ../../../library/os.rst:4854 +#: ../../../library/os.rst:4866 msgid "Exit code that means a user specified output file could not be created." msgstr "" -#: ../../../library/os.rst:4861 +#: ../../../library/os.rst:4873 msgid "" "Exit code that means that an error occurred while doing I/O on some file." msgstr "" -#: ../../../library/os.rst:4868 +#: ../../../library/os.rst:4880 msgid "" "Exit code that means a temporary failure occurred. This indicates something " "that may not really be an error, such as a network connection that couldn't " "be made during a retryable operation." msgstr "" -#: ../../../library/os.rst:4877 +#: ../../../library/os.rst:4889 msgid "" "Exit code that means that a protocol exchange was illegal, invalid, or not " "understood." msgstr "" -#: ../../../library/os.rst:4885 +#: ../../../library/os.rst:4897 msgid "" "Exit code that means that there were insufficient permissions to perform the " "operation (but not intended for file system problems)." msgstr "" -#: ../../../library/os.rst:4893 +#: ../../../library/os.rst:4905 msgid "Exit code that means that some kind of configuration error occurred." msgstr "" -#: ../../../library/os.rst:4900 +#: ../../../library/os.rst:4912 msgid "Exit code that means something like \"an entry was not found\"." msgstr "" -#: ../../../library/os.rst:4907 +#: ../../../library/os.rst:4919 msgid "" "Fork a child process. Return ``0`` in the child and the child's process id " "in the parent. If an error occurs :exc:`OSError` is raised." msgstr "" -#: ../../../library/os.rst:4910 +#: ../../../library/os.rst:4922 msgid "" "Note that some platforms including FreeBSD <= 6.3 and Cygwin have known " "issues when using ``fork()`` from a thread." msgstr "" -#: ../../../library/os.rst:4913 +#: ../../../library/os.rst:4925 msgid "" "Raises an :ref:`auditing event ` ``os.fork`` with no arguments." msgstr "" -#: ../../../library/os.rst:4917 +#: ../../../library/os.rst:4929 msgid "" "If you use TLS sockets in an application calling ``fork()``, see the warning " "in the :mod:`ssl` documentation." msgstr "" -#: ../../../library/os.rst:4922 ../../../library/os.rst:4968 +#: ../../../library/os.rst:4934 ../../../library/os.rst:4980 msgid "" "On macOS the use of this function is unsafe when mixed with using higher-" "level system APIs, and that includes using :mod:`urllib.request`." msgstr "" -#: ../../../library/os.rst:4925 +#: ../../../library/os.rst:4937 msgid "" "Calling ``fork()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: ../../../library/os.rst:4929 +#: ../../../library/os.rst:4941 msgid "" "If Python is able to detect that your process has multiple threads, :func:" "`os.fork` now raises a :exc:`DeprecationWarning`." msgstr "" -#: ../../../library/os.rst:4933 +#: ../../../library/os.rst:4945 msgid "" "We chose to surface this as a warning, when detectable, to better inform " "developers of a design problem that the POSIX platform specifically notes as " @@ -5175,21 +5193,21 @@ msgid "" "``free``)." msgstr "" -#: ../../../library/os.rst:4942 +#: ../../../library/os.rst:4954 msgid "" "Users of macOS or users of libc or malloc implementations other than those " "typically found in glibc to date are among those already more likely to " "experience deadlocks running such code." msgstr "" -#: ../../../library/os.rst:4946 +#: ../../../library/os.rst:4958 msgid "" "See `this discussion on fork being incompatible with threads `_ for technical details of why we're surfacing " "this longstanding platform compatibility problem to developers." msgstr "" -#: ../../../library/os.rst:4956 +#: ../../../library/os.rst:4968 msgid "" "Fork a child process, using a new pseudo-terminal as the child's controlling " "terminal. Return a pair of ``(pid, fd)``, where *pid* is ``0`` in the child, " @@ -5198,40 +5216,40 @@ msgid "" "the :mod:`pty` module. If an error occurs :exc:`OSError` is raised." msgstr "" -#: ../../../library/os.rst:4962 +#: ../../../library/os.rst:4974 msgid "" "The returned file descriptor *fd* is :ref:`non-inheritable `." msgstr "" -#: ../../../library/os.rst:4964 +#: ../../../library/os.rst:4976 msgid "" "Raises an :ref:`auditing event ` ``os.forkpty`` with no arguments." msgstr "" -#: ../../../library/os.rst:4971 +#: ../../../library/os.rst:4983 msgid "" "Calling ``forkpty()`` in a subinterpreter is no longer supported (:exc:" "`RuntimeError` is raised)." msgstr "" -#: ../../../library/os.rst:4975 +#: ../../../library/os.rst:4987 msgid "" "If Python is able to detect that your process has multiple threads, this now " "raises a :exc:`DeprecationWarning`. See the longer explanation on :func:`os." "fork`." msgstr "" -#: ../../../library/os.rst:4980 +#: ../../../library/os.rst:4992 msgid "The returned file descriptor is now made non-inheritable." msgstr "" -#: ../../../library/os.rst:4992 +#: ../../../library/os.rst:5004 msgid "" "Send signal *sig* to the process *pid*. Constants for the specific signals " "available on the host platform are defined in the :mod:`signal` module." msgstr "" -#: ../../../library/os.rst:4995 +#: ../../../library/os.rst:5007 msgid "" "Windows: The :const:`signal.CTRL_C_EVENT` and :const:`signal." "CTRL_BREAK_EVENT` signals are special signals which can only be sent to " @@ -5241,43 +5259,43 @@ msgid "" "be set to *sig*." msgstr "" -#: ../../../library/os.rst:5002 +#: ../../../library/os.rst:5014 msgid "See also :func:`signal.pthread_kill`." msgstr "" -#: ../../../library/os.rst:5004 +#: ../../../library/os.rst:5016 msgid "" "Raises an :ref:`auditing event ` ``os.kill`` with arguments " "``pid``, ``sig``." msgstr "" -#: ../../../library/os.rst:5018 +#: ../../../library/os.rst:5030 msgid "Send the signal *sig* to the process group *pgid*." msgstr "" -#: ../../../library/os.rst:5020 +#: ../../../library/os.rst:5032 msgid "" "Raises an :ref:`auditing event ` ``os.killpg`` with arguments " "``pgid``, ``sig``." msgstr "" -#: ../../../library/os.rst:5027 +#: ../../../library/os.rst:5039 msgid "" "Add *increment* to the process's \"niceness\". Return the new niceness." msgstr "" -#: ../../../library/os.rst:5034 +#: ../../../library/os.rst:5046 msgid "" "Return a file descriptor referring to the process *pid* with *flags* set. " "This descriptor can be used to perform process management without races and " "signals." msgstr "" -#: ../../../library/os.rst:5038 +#: ../../../library/os.rst:5050 msgid "See the :manpage:`pidfd_open(2)` man page for more details." msgstr "" -#: ../../../library/os.rst:5045 +#: ../../../library/os.rst:5057 msgid "" "This flag indicates that the file descriptor will be non-blocking. If the " "process referred to by the file descriptor has not yet terminated, then an " @@ -5285,13 +5303,13 @@ msgid "" "immediately return the error :const:`~errno.EAGAIN` rather than blocking." msgstr "" -#: ../../../library/os.rst:5056 +#: ../../../library/os.rst:5068 msgid "" "Lock program segments into memory. The value of *op* (defined in ````) determines which segments are locked." msgstr "" -#: ../../../library/os.rst:5064 +#: ../../../library/os.rst:5076 msgid "" "Open a pipe to or from command *cmd*. The return value is an open file " "object connected to the pipe, which can be read or written depending on " @@ -5301,7 +5319,7 @@ msgid "" "rather than bytes." msgstr "" -#: ../../../library/os.rst:5072 +#: ../../../library/os.rst:5084 msgid "" "The ``close`` method returns :const:`None` if the subprocess exited " "successfully, or the subprocess's return code if there was an error. On " @@ -5313,63 +5331,63 @@ msgid "" "contains the signed integer return code from the child process." msgstr "" -#: ../../../library/os.rst:5082 +#: ../../../library/os.rst:5094 msgid "" "On Unix, :func:`waitstatus_to_exitcode` can be used to convert the ``close`` " "method result (exit status) into an exit code if it is not ``None``. On " "Windows, the ``close`` method result is directly the exit code (or ``None``)." msgstr "" -#: ../../../library/os.rst:5087 +#: ../../../library/os.rst:5099 msgid "" "This is implemented using :class:`subprocess.Popen`; see that class's " "documentation for more powerful ways to manage and communicate with " "subprocesses." msgstr "" -#: ../../../library/os.rst:5094 +#: ../../../library/os.rst:5106 msgid "" "The :ref:`Python UTF-8 Mode ` affects encodings used for *cmd* " "and pipe contents." msgstr "" -#: ../../../library/os.rst:5097 +#: ../../../library/os.rst:5109 msgid "" ":func:`popen` is a simple wrapper around :class:`subprocess.Popen`. Use :" "class:`subprocess.Popen` or :func:`subprocess.run` to control options like " "encodings." msgstr "" -#: ../../../library/os.rst:5101 +#: ../../../library/os.rst:5113 msgid "" "The function is :term:`soft deprecated` and should no longer be used to " "write new code. The :mod:`subprocess` module is recommended instead." msgstr "" -#: ../../../library/os.rst:5110 +#: ../../../library/os.rst:5122 msgid "Wraps the :c:func:`!posix_spawn` C library API for use from Python." msgstr "" -#: ../../../library/os.rst:5112 +#: ../../../library/os.rst:5124 msgid "" "Most users should use :func:`subprocess.run` instead of :func:`posix_spawn`." msgstr "" -#: ../../../library/os.rst:5114 +#: ../../../library/os.rst:5126 msgid "" "The positional-only arguments *path*, *args*, and *env* are similar to :func:" "`execve`. *env* is allowed to be ``None``, in which case current process' " "environment is used." msgstr "" -#: ../../../library/os.rst:5118 +#: ../../../library/os.rst:5130 msgid "" "The *path* parameter is the path to the executable file. The *path* should " "contain a directory. Use :func:`posix_spawnp` to pass an executable file " "without directory." msgstr "" -#: ../../../library/os.rst:5122 +#: ../../../library/os.rst:5134 msgid "" "The *file_actions* argument may be a sequence of tuples describing actions " "to take on specific file descriptors in the child process between the C " @@ -5378,39 +5396,39 @@ msgid "" "describing the remaining tuple elements:" msgstr "" -#: ../../../library/os.rst:5130 +#: ../../../library/os.rst:5142 msgid "(``os.POSIX_SPAWN_OPEN``, *fd*, *path*, *flags*, *mode*)" msgstr "" -#: ../../../library/os.rst:5132 +#: ../../../library/os.rst:5144 msgid "Performs ``os.dup2(os.open(path, flags, mode), fd)``." msgstr "" -#: ../../../library/os.rst:5136 +#: ../../../library/os.rst:5148 msgid "(``os.POSIX_SPAWN_CLOSE``, *fd*)" msgstr "" -#: ../../../library/os.rst:5138 +#: ../../../library/os.rst:5150 msgid "Performs ``os.close(fd)``." msgstr "" -#: ../../../library/os.rst:5142 +#: ../../../library/os.rst:5154 msgid "(``os.POSIX_SPAWN_DUP2``, *fd*, *new_fd*)" msgstr "" -#: ../../../library/os.rst:5144 +#: ../../../library/os.rst:5156 msgid "Performs ``os.dup2(fd, new_fd)``." msgstr "" -#: ../../../library/os.rst:5148 +#: ../../../library/os.rst:5160 msgid "(``os.POSIX_SPAWN_CLOSEFROM``, *fd*)" msgstr "" -#: ../../../library/os.rst:5150 +#: ../../../library/os.rst:5162 msgid "Performs ``os.closerange(fd, INF)``." msgstr "" -#: ../../../library/os.rst:5152 +#: ../../../library/os.rst:5164 msgid "" "These tuples correspond to the C library :c:func:`!" "posix_spawn_file_actions_addopen`, :c:func:`!" @@ -5420,7 +5438,7 @@ msgid "" "c:func:`!posix_spawn` call itself." msgstr "" -#: ../../../library/os.rst:5159 +#: ../../../library/os.rst:5171 msgid "" "The *setpgroup* argument will set the process group of the child to the " "value specified. If the value specified is 0, the child's process group ID " @@ -5429,7 +5447,7 @@ msgid "" "corresponds to the C library :c:macro:`!POSIX_SPAWN_SETPGROUP` flag." msgstr "" -#: ../../../library/os.rst:5165 +#: ../../../library/os.rst:5177 msgid "" "If the *resetids* argument is ``True`` it will reset the effective UID and " "GID of the child to the real UID and GID of the parent process. If the " @@ -5440,7 +5458,7 @@ msgid "" "library :c:macro:`!POSIX_SPAWN_RESETIDS` flag." msgstr "" -#: ../../../library/os.rst:5173 +#: ../../../library/os.rst:5185 msgid "" "If the *setsid* argument is ``True``, it will create a new session ID for " "``posix_spawn``. *setsid* requires :c:macro:`!POSIX_SPAWN_SETSID` or :c:" @@ -5448,7 +5466,7 @@ msgid "" "is raised." msgstr "" -#: ../../../library/os.rst:5178 +#: ../../../library/os.rst:5190 msgid "" "The *setsigmask* argument will set the signal mask to the signal set " "specified. If the parameter is not used, then the child inherits the " @@ -5456,14 +5474,14 @@ msgid "" "POSIX_SPAWN_SETSIGMASK` flag." msgstr "" -#: ../../../library/os.rst:5183 +#: ../../../library/os.rst:5195 msgid "" "The *sigdef* argument will reset the disposition of all signals in the set " "specified. This argument corresponds to the C library :c:macro:`!" "POSIX_SPAWN_SETSIGDEF` flag." msgstr "" -#: ../../../library/os.rst:5187 +#: ../../../library/os.rst:5199 msgid "" "The *scheduler* argument must be a tuple containing the (optional) scheduler " "policy and an instance of :class:`sched_param` with the scheduler " @@ -5473,85 +5491,85 @@ msgid "" "POSIX_SPAWN_SETSCHEDULER` flags." msgstr "" -#: ../../../library/os.rst:5194 ../../../library/os.rst:5215 +#: ../../../library/os.rst:5206 ../../../library/os.rst:5227 msgid "" "Raises an :ref:`auditing event ` ``os.posix_spawn`` with arguments " "``path``, ``argv``, ``env``." msgstr "" -#: ../../../library/os.rst:5198 +#: ../../../library/os.rst:5210 msgid "" "*env* parameter accepts ``None``. ``os.POSIX_SPAWN_CLOSEFROM`` is available " "on platforms where :c:func:`!posix_spawn_file_actions_addclosefrom_np` " "exists." msgstr "" -#: ../../../library/os.rst:5209 +#: ../../../library/os.rst:5221 msgid "Wraps the :c:func:`!posix_spawnp` C library API for use from Python." msgstr "" -#: ../../../library/os.rst:5211 +#: ../../../library/os.rst:5223 msgid "" "Similar to :func:`posix_spawn` except that the system searches for the " "*executable* file in the list of directories specified by the :envvar:`PATH` " "environment variable (in the same way as for ``execvp(3)``)." msgstr "" -#: ../../../library/os.rst:5221 +#: ../../../library/os.rst:5233 msgid "See :func:`posix_spawn` documentation." msgstr "" -#: ../../../library/os.rst:5227 +#: ../../../library/os.rst:5239 msgid "" "Register callables to be executed when a new child process is forked using :" "func:`os.fork` or similar process cloning APIs. The parameters are optional " "and keyword-only. Each specifies a different call point." msgstr "" -#: ../../../library/os.rst:5232 +#: ../../../library/os.rst:5244 msgid "*before* is a function called before forking a child process." msgstr "" -#: ../../../library/os.rst:5233 +#: ../../../library/os.rst:5245 msgid "" "*after_in_parent* is a function called from the parent process after forking " "a child process." msgstr "" -#: ../../../library/os.rst:5235 +#: ../../../library/os.rst:5247 msgid "*after_in_child* is a function called from the child process." msgstr "" -#: ../../../library/os.rst:5237 +#: ../../../library/os.rst:5249 msgid "" "These calls are only made if control is expected to return to the Python " "interpreter. A typical :mod:`subprocess` launch will not trigger them as " "the child is not going to re-enter the interpreter." msgstr "" -#: ../../../library/os.rst:5241 +#: ../../../library/os.rst:5253 msgid "" "Functions registered for execution before forking are called in reverse " "registration order. Functions registered for execution after forking " "(either in the parent or in the child) are called in registration order." msgstr "" -#: ../../../library/os.rst:5246 +#: ../../../library/os.rst:5258 msgid "" "Note that :c:func:`fork` calls made by third-party C code may not call those " "functions, unless it explicitly calls :c:func:`PyOS_BeforeFork`, :c:func:" "`PyOS_AfterFork_Parent` and :c:func:`PyOS_AfterFork_Child`." msgstr "" -#: ../../../library/os.rst:5250 +#: ../../../library/os.rst:5262 msgid "There is no way to unregister a function." msgstr "" -#: ../../../library/os.rst:5266 +#: ../../../library/os.rst:5278 msgid "Execute the program *path* in a new process." msgstr "" -#: ../../../library/os.rst:5268 +#: ../../../library/os.rst:5280 msgid "" "(Note that the :mod:`subprocess` module provides more powerful facilities " "for spawning new processes and retrieving their results; using that module " @@ -5559,7 +5577,7 @@ msgid "" "`subprocess-replacements` section.)" msgstr "" -#: ../../../library/os.rst:5273 +#: ../../../library/os.rst:5285 msgid "" "If *mode* is :const:`P_NOWAIT`, this function returns the process id of the " "new process; if *mode* is :const:`P_WAIT`, returns the process's exit code " @@ -5568,13 +5586,13 @@ msgid "" "handle, so can be used with the :func:`waitpid` function." msgstr "" -#: ../../../library/os.rst:5279 +#: ../../../library/os.rst:5291 msgid "" "Note on VxWorks, this function doesn't return ``-signal`` when the new " "process is killed. Instead it raises OSError exception." msgstr "" -#: ../../../library/os.rst:5282 +#: ../../../library/os.rst:5294 msgid "" "The \"l\" and \"v\" variants of the :func:`spawn\\* ` functions " "differ in how command-line arguments are passed. The \"l\" variants are " @@ -5586,7 +5604,7 @@ msgid "" "to the child process must start with the name of the command being run." msgstr "" -#: ../../../library/os.rst:5291 +#: ../../../library/os.rst:5303 msgid "" "The variants which include a second \"p\" near the end (:func:`spawnlp`, :" "func:`spawnlpe`, :func:`spawnvp`, and :func:`spawnvpe`) will use the :envvar:" @@ -5599,7 +5617,7 @@ msgid "" "appropriate absolute or relative path." msgstr "" -#: ../../../library/os.rst:5301 +#: ../../../library/os.rst:5313 msgid "" "For :func:`spawnle`, :func:`spawnlpe`, :func:`spawnve`, and :func:`spawnvpe` " "(note that these all end in \"e\"), the *env* parameter must be a mapping " @@ -5611,19 +5629,19 @@ msgid "" "values will cause the function to fail, with a return value of ``127``." msgstr "" -#: ../../../library/os.rst:5310 +#: ../../../library/os.rst:5322 msgid "" "As an example, the following calls to :func:`spawnlp` and :func:`spawnvpe` " "are equivalent::" msgstr "" -#: ../../../library/os.rst:5319 +#: ../../../library/os.rst:5331 msgid "" "Raises an :ref:`auditing event ` ``os.spawn`` with arguments " "``mode``, ``path``, ``args``, ``env``." msgstr "" -#: ../../../library/os.rst:5323 +#: ../../../library/os.rst:5335 msgid "" ":func:`spawnlp`, :func:`spawnlpe`, :func:`spawnvp` and :func:`spawnvpe` are " "not available on Windows. :func:`spawnle` and :func:`spawnve` are not " @@ -5631,13 +5649,13 @@ msgid "" "instead." msgstr "" -#: ../../../library/os.rst:5331 +#: ../../../library/os.rst:5343 msgid "" "These functions are :term:`soft deprecated` and should no longer be used to " "write new code. The :mod:`subprocess` module is recommended instead." msgstr "" -#: ../../../library/os.rst:5339 +#: ../../../library/os.rst:5351 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If either of these values is given, the :func:" @@ -5645,7 +5663,7 @@ msgid "" "been created, with the process id as the return value." msgstr "" -#: ../../../library/os.rst:5349 +#: ../../../library/os.rst:5361 msgid "" "Possible value for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If this is given as *mode*, the :func:`spawn\\* " @@ -5654,7 +5672,7 @@ msgid "" "successful, or ``-signal`` if a signal kills the process." msgstr "" -#: ../../../library/os.rst:5361 +#: ../../../library/os.rst:5373 msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. These are less portable than those listed above. :" @@ -5664,11 +5682,11 @@ msgid "" "function will not return." msgstr "" -#: ../../../library/os.rst:5372 +#: ../../../library/os.rst:5384 msgid "Start a file with its associated application." msgstr "" -#: ../../../library/os.rst:5374 +#: ../../../library/os.rst:5386 msgid "" "When *operation* is not specified, this acts like double-clicking the file " "in Windows Explorer, or giving the file name as an argument to the :program:" @@ -5676,7 +5694,7 @@ msgid "" "whatever application (if any) its extension is associated." msgstr "" -#: ../../../library/os.rst:5379 +#: ../../../library/os.rst:5391 msgid "" "When another *operation* is given, it must be a \"command verb\" that " "specifies what should be done with the file. Common verbs documented by " @@ -5684,28 +5702,28 @@ msgid "" "as well as ``'explore'`` and ``'find'`` (to be used on directories)." msgstr "" -#: ../../../library/os.rst:5384 +#: ../../../library/os.rst:5396 msgid "" "When launching an application, specify *arguments* to be passed as a single " "string. This argument may have no effect when using this function to launch " "a document." msgstr "" -#: ../../../library/os.rst:5388 +#: ../../../library/os.rst:5400 msgid "" "The default working directory is inherited, but may be overridden by the " "*cwd* argument. This should be an absolute path. A relative *path* will be " "resolved against this argument." msgstr "" -#: ../../../library/os.rst:5392 +#: ../../../library/os.rst:5404 msgid "" "Use *show_cmd* to override the default window style. Whether this has any " "effect will depend on the application being launched. Values are integers as " "supported by the Win32 :c:func:`!ShellExecute` function." msgstr "" -#: ../../../library/os.rst:5396 +#: ../../../library/os.rst:5408 msgid "" ":func:`startfile` returns as soon as the associated application is launched. " "There is no option to wait for the application to close, and no way to " @@ -5716,32 +5734,32 @@ msgid "" "encoded for Win32." msgstr "" -#: ../../../library/os.rst:5404 +#: ../../../library/os.rst:5416 msgid "" "To reduce interpreter startup overhead, the Win32 :c:func:`!ShellExecute` " "function is not resolved until this function is first called. If the " "function cannot be resolved, :exc:`NotImplementedError` will be raised." msgstr "" -#: ../../../library/os.rst:5408 +#: ../../../library/os.rst:5420 msgid "" "Raises an :ref:`auditing event ` ``os.startfile`` with arguments " "``path``, ``operation``." msgstr "" -#: ../../../library/os.rst:5410 +#: ../../../library/os.rst:5422 msgid "" "Raises an :ref:`auditing event ` ``os.startfile/2`` with arguments " "``path``, ``operation``, ``arguments``, ``cwd``, ``show_cmd``." msgstr "" -#: ../../../library/os.rst:5414 +#: ../../../library/os.rst:5426 msgid "" "Added the *arguments*, *cwd* and *show_cmd* arguments, and the ``os." "startfile/2`` audit event." msgstr "" -#: ../../../library/os.rst:5421 +#: ../../../library/os.rst:5433 msgid "" "Execute the command (a string) in a subshell. This is implemented by " "calling the Standard C function :c:func:`system`, and has the same " @@ -5752,13 +5770,13 @@ msgid "" "value of the Python function is system-dependent." msgstr "" -#: ../../../library/os.rst:5429 +#: ../../../library/os.rst:5441 msgid "" "On Unix, the return value is the exit status of the process encoded in the " "format specified for :func:`wait`." msgstr "" -#: ../../../library/os.rst:5432 +#: ../../../library/os.rst:5444 msgid "" "On Windows, the return value is that returned by the system shell after " "running *command*. The shell is given by the Windows environment variable :" @@ -5767,7 +5785,7 @@ msgid "" "shell documentation." msgstr "" -#: ../../../library/os.rst:5438 +#: ../../../library/os.rst:5450 msgid "" "The :mod:`subprocess` module provides more powerful facilities for spawning " "new processes and retrieving their results; using that module is recommended " @@ -5775,53 +5793,53 @@ msgid "" "the :mod:`subprocess` documentation for some helpful recipes." msgstr "" -#: ../../../library/os.rst:5443 +#: ../../../library/os.rst:5455 msgid "" "On Unix, :func:`waitstatus_to_exitcode` can be used to convert the result " "(exit status) into an exit code. On Windows, the result is directly the exit " "code." msgstr "" -#: ../../../library/os.rst:5447 +#: ../../../library/os.rst:5459 msgid "" "Raises an :ref:`auditing event ` ``os.system`` with argument " "``command``." msgstr "" -#: ../../../library/os.rst:5454 +#: ../../../library/os.rst:5466 msgid "" "Returns the current global process times. The return value is an object with " "five attributes:" msgstr "" -#: ../../../library/os.rst:5457 +#: ../../../library/os.rst:5469 msgid ":attr:`!user` - user time" msgstr "" -#: ../../../library/os.rst:5458 +#: ../../../library/os.rst:5470 msgid ":attr:`!system` - system time" msgstr "" -#: ../../../library/os.rst:5459 +#: ../../../library/os.rst:5471 msgid ":attr:`!children_user` - user time of all child processes" msgstr "" -#: ../../../library/os.rst:5460 +#: ../../../library/os.rst:5472 msgid ":attr:`!children_system` - system time of all child processes" msgstr "" -#: ../../../library/os.rst:5461 +#: ../../../library/os.rst:5473 msgid ":attr:`!elapsed` - elapsed real time since a fixed point in the past" msgstr "" -#: ../../../library/os.rst:5463 +#: ../../../library/os.rst:5475 msgid "" "For backwards compatibility, this object also behaves like a five-tuple " "containing :attr:`!user`, :attr:`!system`, :attr:`!children_user`, :attr:`!" "children_system`, and :attr:`!elapsed` in that order." msgstr "" -#: ../../../library/os.rst:5467 +#: ../../../library/os.rst:5479 msgid "" "See the Unix manual page :manpage:`times(2)` and `times(3) `_ manual page on Unix or `the " @@ -5831,7 +5849,7 @@ msgid "" "attributes are zero." msgstr "" -#: ../../../library/os.rst:5481 +#: ../../../library/os.rst:5493 msgid "" "Wait for completion of a child process, and return a tuple containing its " "pid and exit status indication: a 16-bit number, whose low byte is the " @@ -5840,87 +5858,87 @@ msgid "" "if a core file was produced." msgstr "" -#: ../../../library/os.rst:5487 +#: ../../../library/os.rst:5499 msgid "" "If there are no children that could be waited for, :exc:`ChildProcessError` " "is raised." msgstr "" -#: ../../../library/os.rst:5490 ../../../library/os.rst:5565 +#: ../../../library/os.rst:5502 ../../../library/os.rst:5577 msgid "" ":func:`waitstatus_to_exitcode` can be used to convert the exit status into " "an exit code." msgstr "" -#: ../../../library/os.rst:5497 +#: ../../../library/os.rst:5509 msgid "" "The other :func:`!wait*` functions documented below can be used to wait for " "the completion of a specific child process and have more options. :func:" "`waitpid` is the only one also available on Windows." msgstr "" -#: ../../../library/os.rst:5504 +#: ../../../library/os.rst:5516 msgid "Wait for the completion of a child process." msgstr "" -#: ../../../library/os.rst:5506 +#: ../../../library/os.rst:5518 msgid "" "*idtype* can be :data:`P_PID`, :data:`P_PGID`, :data:`P_ALL`, or (on Linux) :" "data:`P_PIDFD`. The interpretation of *id* depends on it; see their " "individual descriptions." msgstr "" -#: ../../../library/os.rst:5509 +#: ../../../library/os.rst:5521 msgid "" "*options* is an OR combination of flags. At least one of :data:`WEXITED`, :" "data:`WSTOPPED` or :data:`WCONTINUED` is required; :data:`WNOHANG` and :data:" "`WNOWAIT` are additional optional flags." msgstr "" -#: ../../../library/os.rst:5513 +#: ../../../library/os.rst:5525 msgid "" "The return value is an object representing the data contained in the :c:type:" "`siginfo_t` structure with the following attributes:" msgstr "" -#: ../../../library/os.rst:5516 +#: ../../../library/os.rst:5528 msgid ":attr:`!si_pid` (process ID)" msgstr "" -#: ../../../library/os.rst:5517 +#: ../../../library/os.rst:5529 msgid ":attr:`!si_uid` (real user ID of the child)" msgstr "" -#: ../../../library/os.rst:5518 +#: ../../../library/os.rst:5530 msgid ":attr:`!si_signo` (always :const:`~signal.SIGCHLD`)" msgstr "" -#: ../../../library/os.rst:5519 +#: ../../../library/os.rst:5531 msgid "" ":attr:`!si_status` (the exit status or signal number, depending on :attr:`!" "si_code`)" msgstr "" -#: ../../../library/os.rst:5520 +#: ../../../library/os.rst:5532 msgid ":attr:`!si_code` (see :data:`CLD_EXITED` for possible values)" msgstr "" -#: ../../../library/os.rst:5522 +#: ../../../library/os.rst:5534 msgid "" "If :data:`WNOHANG` is specified and there are no matching children in the " "requested state, ``None`` is returned. Otherwise, if there are no matching " "children that could be waited for, :exc:`ChildProcessError` is raised." msgstr "" -#: ../../../library/os.rst:5531 +#: ../../../library/os.rst:5543 msgid "This function is now available on macOS as well." msgstr "" -#: ../../../library/os.rst:5537 +#: ../../../library/os.rst:5549 msgid "The details of this function differ on Unix and Windows." msgstr "" -#: ../../../library/os.rst:5539 +#: ../../../library/os.rst:5551 msgid "" "On Unix: Wait for completion of a child process given by process id *pid*, " "and return a tuple containing its process id and exit status indication " @@ -5929,7 +5947,7 @@ msgid "" "operation." msgstr "" -#: ../../../library/os.rst:5544 +#: ../../../library/os.rst:5556 msgid "" "If *pid* is greater than ``0``, :func:`waitpid` requests status information " "for that specific process. If *pid* is ``0``, the request is for the status " @@ -5939,7 +5957,7 @@ msgid "" "group ``-pid`` (the absolute value of *pid*)." msgstr "" -#: ../../../library/os.rst:5551 +#: ../../../library/os.rst:5563 msgid "" "*options* is an OR combination of flags. If it contains :data:`WNOHANG` and " "there are no matching children in the requested state, ``(0, 0)`` is " @@ -5948,7 +5966,7 @@ msgid "" "are :data:`WUNTRACED` and :data:`WCONTINUED`." msgstr "" -#: ../../../library/os.rst:5557 +#: ../../../library/os.rst:5569 msgid "" "On Windows: Wait for completion of a process given by process handle *pid*, " "and return a tuple containing *pid*, and its exit status shifted left by 8 " @@ -5960,7 +5978,7 @@ msgid "" "process handles." msgstr "" -#: ../../../library/os.rst:5578 +#: ../../../library/os.rst:5590 msgid "" "Similar to :func:`waitpid`, except no process id argument is given and a 3-" "element tuple containing the child's process id, exit status indication, and " @@ -5969,13 +5987,13 @@ msgid "" "same as that provided to :func:`waitpid` and :func:`wait4`." msgstr "" -#: ../../../library/os.rst:5585 ../../../library/os.rst:5599 +#: ../../../library/os.rst:5597 ../../../library/os.rst:5611 msgid "" ":func:`waitstatus_to_exitcode` can be used to convert the exit status into " "an exitcode." msgstr "" -#: ../../../library/os.rst:5593 +#: ../../../library/os.rst:5605 msgid "" "Similar to :func:`waitpid`, except a 3-element tuple, containing the child's " "process id, exit status indication, and resource usage information is " @@ -5984,118 +6002,118 @@ msgid "" "to :func:`waitpid`." msgstr "" -#: ../../../library/os.rst:5610 +#: ../../../library/os.rst:5622 msgid "" "These are the possible values for *idtype* in :func:`waitid`. They affect " "how *id* is interpreted:" msgstr "" -#: ../../../library/os.rst:5613 +#: ../../../library/os.rst:5625 msgid ":data:`!P_PID` - wait for the child whose PID is *id*." msgstr "" -#: ../../../library/os.rst:5614 +#: ../../../library/os.rst:5626 msgid ":data:`!P_PGID` - wait for any child whose progress group ID is *id*." msgstr "" -#: ../../../library/os.rst:5615 +#: ../../../library/os.rst:5627 msgid ":data:`!P_ALL` - wait for any child; *id* is ignored." msgstr "" -#: ../../../library/os.rst:5616 +#: ../../../library/os.rst:5628 msgid "" ":data:`!P_PIDFD` - wait for the child identified by the file descriptor *id* " "(a process file descriptor created with :func:`pidfd_open`)." msgstr "" -#: ../../../library/os.rst:5621 +#: ../../../library/os.rst:5633 msgid ":data:`!P_PIDFD` is only available on Linux >= 5.4." msgstr "" -#: ../../../library/os.rst:5624 +#: ../../../library/os.rst:5636 msgid "The :data:`!P_PIDFD` constant." msgstr "" -#: ../../../library/os.rst:5630 +#: ../../../library/os.rst:5642 msgid "" "This *options* flag for :func:`waitpid`, :func:`wait3`, :func:`wait4`, and :" "func:`waitid` causes child processes to be reported if they have been " "continued from a job control stop since they were last reported." msgstr "" -#: ../../../library/os.rst:5639 +#: ../../../library/os.rst:5651 msgid "" "This *options* flag for :func:`waitid` causes child processes that have " "terminated to be reported." msgstr "" -#: ../../../library/os.rst:5642 +#: ../../../library/os.rst:5654 msgid "" "The other ``wait*`` functions always report children that have terminated, " "so this option is not available for them." msgstr "" -#: ../../../library/os.rst:5652 +#: ../../../library/os.rst:5664 msgid "" "This *options* flag for :func:`waitid` causes child processes that have been " "stopped by the delivery of a signal to be reported." msgstr "" -#: ../../../library/os.rst:5655 ../../../library/os.rst:5687 +#: ../../../library/os.rst:5667 ../../../library/os.rst:5699 msgid "This option is not available for the other ``wait*`` functions." msgstr "" -#: ../../../library/os.rst:5664 +#: ../../../library/os.rst:5676 msgid "" "This *options* flag for :func:`waitpid`, :func:`wait3`, and :func:`wait4` " "causes child processes to also be reported if they have been stopped but " "their current state has not been reported since they were stopped." msgstr "" -#: ../../../library/os.rst:5668 +#: ../../../library/os.rst:5680 msgid "This option is not available for :func:`waitid`." msgstr "" -#: ../../../library/os.rst:5675 +#: ../../../library/os.rst:5687 msgid "" "This *options* flag causes :func:`waitpid`, :func:`wait3`, :func:`wait4`, " "and :func:`waitid` to return right away if no child process status is " "available immediately." msgstr "" -#: ../../../library/os.rst:5684 +#: ../../../library/os.rst:5696 msgid "" "This *options* flag causes :func:`waitid` to leave the child in a waitable " "state, so that a later :func:`!wait*` call can be used to retrieve the child " "status information again." msgstr "" -#: ../../../library/os.rst:5699 +#: ../../../library/os.rst:5711 msgid "" "These are the possible values for :attr:`!si_code` in the result returned " "by :func:`waitid`." msgstr "" -#: ../../../library/os.rst:5706 +#: ../../../library/os.rst:5718 msgid "Added :data:`CLD_KILLED` and :data:`CLD_STOPPED` values." msgstr "" -#: ../../../library/os.rst:5712 +#: ../../../library/os.rst:5724 msgid "Convert a wait status to an exit code." msgstr "" -#: ../../../library/os.rst:5714 +#: ../../../library/os.rst:5726 msgid "On Unix:" msgstr "" -#: ../../../library/os.rst:5716 +#: ../../../library/os.rst:5728 msgid "" "If the process exited normally (if ``WIFEXITED(status)`` is true), return " "the process exit status (return ``WEXITSTATUS(status)``): result greater " "than or equal to 0." msgstr "" -#: ../../../library/os.rst:5719 +#: ../../../library/os.rst:5731 msgid "" "If the process was terminated by a signal (if ``WIFSIGNALED(status)`` is " "true), return ``-signum`` where *signum* is the number of the signal that " @@ -6103,15 +6121,15 @@ msgid "" "than 0." msgstr "" -#: ../../../library/os.rst:5723 +#: ../../../library/os.rst:5735 msgid "Otherwise, raise a :exc:`ValueError`." msgstr "" -#: ../../../library/os.rst:5725 +#: ../../../library/os.rst:5737 msgid "On Windows, return *status* shifted right by 8 bits." msgstr "" -#: ../../../library/os.rst:5727 +#: ../../../library/os.rst:5739 msgid "" "On Unix, if the process is being traced or if :func:`waitpid` was called " "with :data:`WUNTRACED` option, the caller must first check if " @@ -6119,234 +6137,234 @@ msgid "" "``WIFSTOPPED(status)`` is true." msgstr "" -#: ../../../library/os.rst:5734 +#: ../../../library/os.rst:5746 msgid "" ":func:`WIFEXITED`, :func:`WEXITSTATUS`, :func:`WIFSIGNALED`, :func:" "`WTERMSIG`, :func:`WIFSTOPPED`, :func:`WSTOPSIG` functions." msgstr "" -#: ../../../library/os.rst:5742 +#: ../../../library/os.rst:5754 msgid "" "The following functions take a process status code as returned by :func:" "`system`, :func:`wait`, or :func:`waitpid` as a parameter. They may be used " "to determine the disposition of a process." msgstr "" -#: ../../../library/os.rst:5748 +#: ../../../library/os.rst:5760 msgid "" "Return ``True`` if a core dump was generated for the process, otherwise " "return ``False``." msgstr "" -#: ../../../library/os.rst:5751 ../../../library/os.rst:5817 +#: ../../../library/os.rst:5763 ../../../library/os.rst:5829 msgid "This function should be employed only if :func:`WIFSIGNALED` is true." msgstr "" -#: ../../../library/os.rst:5758 +#: ../../../library/os.rst:5770 msgid "" "Return ``True`` if a stopped child has been resumed by delivery of :const:" "`~signal.SIGCONT` (if the process has been continued from a job control " "stop), otherwise return ``False``." msgstr "" -#: ../../../library/os.rst:5762 +#: ../../../library/os.rst:5774 msgid "See :data:`WCONTINUED` option." msgstr "" -#: ../../../library/os.rst:5769 +#: ../../../library/os.rst:5781 msgid "" "Return ``True`` if the process was stopped by delivery of a signal, " "otherwise return ``False``." msgstr "" -#: ../../../library/os.rst:5772 +#: ../../../library/os.rst:5784 msgid "" ":func:`WIFSTOPPED` only returns ``True`` if the :func:`waitpid` call was " "done using :data:`WUNTRACED` option or when the process is being traced " "(see :manpage:`ptrace(2)`)." msgstr "" -#: ../../../library/os.rst:5780 +#: ../../../library/os.rst:5792 msgid "" "Return ``True`` if the process was terminated by a signal, otherwise return " "``False``." msgstr "" -#: ../../../library/os.rst:5788 +#: ../../../library/os.rst:5800 msgid "" "Return ``True`` if the process exited terminated normally, that is, by " "calling ``exit()`` or ``_exit()``, or by returning from ``main()``; " "otherwise return ``False``." msgstr "" -#: ../../../library/os.rst:5797 +#: ../../../library/os.rst:5809 msgid "Return the process exit status." msgstr "" -#: ../../../library/os.rst:5799 +#: ../../../library/os.rst:5811 msgid "This function should be employed only if :func:`WIFEXITED` is true." msgstr "" -#: ../../../library/os.rst:5806 +#: ../../../library/os.rst:5818 msgid "Return the signal which caused the process to stop." msgstr "" -#: ../../../library/os.rst:5808 +#: ../../../library/os.rst:5820 msgid "This function should be employed only if :func:`WIFSTOPPED` is true." msgstr "" -#: ../../../library/os.rst:5815 +#: ../../../library/os.rst:5827 msgid "Return the number of the signal that caused the process to terminate." msgstr "" -#: ../../../library/os.rst:5823 +#: ../../../library/os.rst:5835 msgid "Interface to the scheduler" msgstr "" -#: ../../../library/os.rst:5825 +#: ../../../library/os.rst:5837 msgid "" "These functions control how a process is allocated CPU time by the operating " "system. They are only available on some Unix platforms. For more detailed " "information, consult your Unix manpages." msgstr "" -#: ../../../library/os.rst:5831 +#: ../../../library/os.rst:5843 msgid "" "The following scheduling policies are exposed if they are supported by the " "operating system." msgstr "" -#: ../../../library/os.rst:5838 +#: ../../../library/os.rst:5850 msgid "The default scheduling policy." msgstr "" -#: ../../../library/os.rst:5842 +#: ../../../library/os.rst:5854 msgid "" "Scheduling policy for CPU-intensive processes that tries to preserve " "interactivity on the rest of the computer." msgstr "" -#: ../../../library/os.rst:5847 +#: ../../../library/os.rst:5859 msgid "Scheduling policy for tasks with deadline constraints." msgstr "" -#: ../../../library/os.rst:5853 +#: ../../../library/os.rst:5865 msgid "Scheduling policy for extremely low priority background tasks." msgstr "" -#: ../../../library/os.rst:5857 +#: ../../../library/os.rst:5869 msgid "Alias for :data:`SCHED_OTHER`." msgstr "" -#: ../../../library/os.rst:5863 +#: ../../../library/os.rst:5875 msgid "Scheduling policy for sporadic server programs." msgstr "" -#: ../../../library/os.rst:5867 +#: ../../../library/os.rst:5879 msgid "A First In First Out scheduling policy." msgstr "" -#: ../../../library/os.rst:5871 +#: ../../../library/os.rst:5883 msgid "A round-robin scheduling policy." msgstr "" -#: ../../../library/os.rst:5875 +#: ../../../library/os.rst:5887 msgid "" "This flag can be OR'ed with any other scheduling policy. When a process with " "this flag set forks, its child's scheduling policy and priority are reset to " "the default." msgstr "" -#: ../../../library/os.rst:5882 +#: ../../../library/os.rst:5894 msgid "" "This class represents tunable scheduling parameters used in :func:" "`sched_setparam`, :func:`sched_setscheduler`, and :func:`sched_getparam`. It " "is immutable." msgstr "" -#: ../../../library/os.rst:5886 +#: ../../../library/os.rst:5898 msgid "At the moment, there is only one possible parameter:" msgstr "" -#: ../../../library/os.rst:5890 +#: ../../../library/os.rst:5902 msgid "The scheduling priority for a scheduling policy." msgstr "" -#: ../../../library/os.rst:5895 +#: ../../../library/os.rst:5907 msgid "" "Get the minimum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: ../../../library/os.rst:5901 +#: ../../../library/os.rst:5913 msgid "" "Get the maximum priority value for *policy*. *policy* is one of the " "scheduling policy constants above." msgstr "" -#: ../../../library/os.rst:5907 +#: ../../../library/os.rst:5919 msgid "" "Set the scheduling policy for the process with PID *pid*. A *pid* of 0 means " "the calling process. *policy* is one of the scheduling policy constants " "above. *param* is a :class:`sched_param` instance." msgstr "" -#: ../../../library/os.rst:5914 +#: ../../../library/os.rst:5926 msgid "" "Return the scheduling policy for the process with PID *pid*. A *pid* of 0 " "means the calling process. The result is one of the scheduling policy " "constants above." msgstr "" -#: ../../../library/os.rst:5921 +#: ../../../library/os.rst:5933 msgid "" "Set the scheduling parameters for the process with PID *pid*. A *pid* of 0 " "means the calling process. *param* is a :class:`sched_param` instance." msgstr "" -#: ../../../library/os.rst:5927 +#: ../../../library/os.rst:5939 msgid "" "Return the scheduling parameters as a :class:`sched_param` instance for the " "process with PID *pid*. A *pid* of 0 means the calling process." msgstr "" -#: ../../../library/os.rst:5933 +#: ../../../library/os.rst:5945 msgid "" "Return the round-robin quantum in seconds for the process with PID *pid*. A " "*pid* of 0 means the calling process." msgstr "" -#: ../../../library/os.rst:5939 +#: ../../../library/os.rst:5951 msgid "" "Voluntarily relinquish the CPU. See :manpage:`sched_yield(2)` for details." msgstr "" -#: ../../../library/os.rst:5944 +#: ../../../library/os.rst:5956 msgid "" "Restrict the process with PID *pid* (or the current process if zero) to a " "set of CPUs. *mask* is an iterable of integers representing the set of CPUs " "to which the process should be restricted." msgstr "" -#: ../../../library/os.rst:5951 +#: ../../../library/os.rst:5963 msgid "Return the set of CPUs the process with PID *pid* is restricted to." msgstr "" -#: ../../../library/os.rst:5953 +#: ../../../library/os.rst:5965 msgid "" "If *pid* is zero, return the set of CPUs the calling thread of the current " "process is restricted to." msgstr "" -#: ../../../library/os.rst:5956 +#: ../../../library/os.rst:5968 msgid "See also the :func:`process_cpu_count` function." msgstr "" -#: ../../../library/os.rst:5962 +#: ../../../library/os.rst:5974 msgid "Miscellaneous System Information" msgstr "" -#: ../../../library/os.rst:5967 +#: ../../../library/os.rst:5979 msgid "" "Return string-valued system configuration values. *name* specifies the " "configuration value to retrieve; it may be a string which is the name of a " @@ -6357,13 +6375,13 @@ msgid "" "included in that mapping, passing an integer for *name* is also accepted." msgstr "" -#: ../../../library/os.rst:5975 +#: ../../../library/os.rst:5987 msgid "" "If the configuration value specified by *name* isn't defined, ``None`` is " "returned." msgstr "" -#: ../../../library/os.rst:5978 +#: ../../../library/os.rst:5990 msgid "" "If *name* is a string and is not known, :exc:`ValueError` is raised. If a " "specific value for *name* is not supported by the host system, even if it is " @@ -6371,62 +6389,62 @@ msgid "" "`errno.EINVAL` for the error number." msgstr "" -#: ../../../library/os.rst:5988 +#: ../../../library/os.rst:6000 msgid "" "Dictionary mapping names accepted by :func:`confstr` to the integer values " "defined for those names by the host operating system. This can be used to " "determine the set of names known to the system." msgstr "" -#: ../../../library/os.rst:5997 +#: ../../../library/os.rst:6009 msgid "" "Return the number of logical CPUs in the **system**. Returns ``None`` if " "undetermined." msgstr "" -#: ../../../library/os.rst:6000 +#: ../../../library/os.rst:6012 msgid "" "The :func:`process_cpu_count` function can be used to get the number of " "logical CPUs usable by the calling thread of the **current process**." msgstr "" -#: ../../../library/os.rst:6005 +#: ../../../library/os.rst:6017 msgid "" "If :option:`-X cpu_count <-X>` is given or :envvar:`PYTHON_CPU_COUNT` is " "set, :func:`cpu_count` returns the override value *n*." msgstr "" -#: ../../../library/os.rst:6012 +#: ../../../library/os.rst:6024 msgid "" "Return the number of processes in the system run queue averaged over the " "last 1, 5, and 15 minutes or raises :exc:`OSError` if the load average was " "unobtainable." msgstr "" -#: ../../../library/os.rst:6021 +#: ../../../library/os.rst:6033 msgid "" "Get the number of logical CPUs usable by the calling thread of the **current " "process**. Returns ``None`` if undetermined. It can be less than :func:" "`cpu_count` depending on the CPU affinity." msgstr "" -#: ../../../library/os.rst:6025 +#: ../../../library/os.rst:6037 msgid "" "The :func:`cpu_count` function can be used to get the number of logical CPUs " "in the **system**." msgstr "" -#: ../../../library/os.rst:6028 +#: ../../../library/os.rst:6040 msgid "" "If :option:`-X cpu_count <-X>` is given or :envvar:`PYTHON_CPU_COUNT` is " "set, :func:`process_cpu_count` returns the override value *n*." msgstr "" -#: ../../../library/os.rst:6031 +#: ../../../library/os.rst:6043 msgid "See also the :func:`sched_getaffinity` function." msgstr "" -#: ../../../library/os.rst:6038 +#: ../../../library/os.rst:6050 msgid "" "Return integer-valued system configuration values. If the configuration " "value specified by *name* isn't defined, ``-1`` is returned. The comments " @@ -6435,44 +6453,44 @@ msgid "" "``sysconf_names``." msgstr "" -#: ../../../library/os.rst:6048 +#: ../../../library/os.rst:6060 msgid "" "Dictionary mapping names accepted by :func:`sysconf` to the integer values " "defined for those names by the host operating system. This can be used to " "determine the set of names known to the system." msgstr "" -#: ../../../library/os.rst:6054 +#: ../../../library/os.rst:6066 msgid "Add ``'SC_MINSIGSTKSZ'`` name." msgstr "" -#: ../../../library/os.rst:6057 +#: ../../../library/os.rst:6069 msgid "" "The following data values are used to support path manipulation operations. " "These are defined for all platforms." msgstr "" -#: ../../../library/os.rst:6060 +#: ../../../library/os.rst:6072 msgid "" "Higher-level operations on pathnames are defined in the :mod:`os.path` " "module." msgstr "" -#: ../../../library/os.rst:6066 +#: ../../../library/os.rst:6078 msgid "" "The constant string used by the operating system to refer to the current " "directory. This is ``'.'`` for Windows and POSIX. Also available via :mod:" "`os.path`." msgstr "" -#: ../../../library/os.rst:6074 +#: ../../../library/os.rst:6086 msgid "" "The constant string used by the operating system to refer to the parent " "directory. This is ``'..'`` for Windows and POSIX. Also available via :mod:" "`os.path`." msgstr "" -#: ../../../library/os.rst:6083 +#: ../../../library/os.rst:6095 msgid "" "The character used by the operating system to separate pathname components. " "This is ``'/'`` for POSIX and ``'\\\\'`` for Windows. Note that knowing " @@ -6481,7 +6499,7 @@ msgid "" "useful. Also available via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6093 +#: ../../../library/os.rst:6105 msgid "" "An alternative character used by the operating system to separate pathname " "components, or ``None`` if only one separator character exists. This is set " @@ -6489,27 +6507,27 @@ msgid "" "via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6102 +#: ../../../library/os.rst:6114 msgid "" "The character which separates the base filename from the extension; for " "example, the ``'.'`` in :file:`os.py`. Also available via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6110 +#: ../../../library/os.rst:6122 msgid "" "The character conventionally used by the operating system to separate search " "path components (as in :envvar:`PATH`), such as ``':'`` for POSIX or ``';'`` " "for Windows. Also available via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6117 +#: ../../../library/os.rst:6129 msgid "" "The default search path used by :func:`exec\\*p\\* ` and :func:" "`spawn\\*p\\* ` if the environment doesn't have a ``'PATH'`` key. " "Also available via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6124 +#: ../../../library/os.rst:6136 msgid "" "The string used to separate (or, rather, terminate) lines on the current " "platform. This may be a single character, such as ``'\\n'`` for POSIX, or " @@ -6518,36 +6536,36 @@ msgid "" "default); use a single ``'\\n'`` instead, on all platforms." msgstr "" -#: ../../../library/os.rst:6133 +#: ../../../library/os.rst:6145 msgid "" "The file path of the null device. For example: ``'/dev/null'`` for POSIX, " "``'nul'`` for Windows. Also available via :mod:`os.path`." msgstr "" -#: ../../../library/os.rst:6144 +#: ../../../library/os.rst:6156 msgid "" "Flags for use with the :func:`~sys.setdlopenflags` and :func:`~sys." "getdlopenflags` functions. See the Unix manual page :manpage:`dlopen(3)` " "for what the different flags mean." msgstr "" -#: ../../../library/os.rst:6152 +#: ../../../library/os.rst:6164 msgid "Random numbers" msgstr "" -#: ../../../library/os.rst:6157 +#: ../../../library/os.rst:6169 msgid "" "Get up to *size* random bytes. The function can return less bytes than " "requested." msgstr "" -#: ../../../library/os.rst:6160 +#: ../../../library/os.rst:6172 msgid "" "These bytes can be used to seed user-space random number generators or for " "cryptographic purposes." msgstr "" -#: ../../../library/os.rst:6163 +#: ../../../library/os.rst:6175 msgid "" "``getrandom()`` relies on entropy gathered from device drivers and other " "sources of environmental noise. Unnecessarily reading large quantities of " @@ -6555,32 +6573,32 @@ msgid "" "``/dev/urandom`` devices." msgstr "" -#: ../../../library/os.rst:6168 +#: ../../../library/os.rst:6180 msgid "" "The flags argument is a bit mask that can contain zero or more of the " "following values ORed together: :py:const:`os.GRND_RANDOM` and :py:data:" "`GRND_NONBLOCK`." msgstr "" -#: ../../../library/os.rst:6172 +#: ../../../library/os.rst:6184 msgid "" "See also the `Linux getrandom() manual page `_." msgstr "" -#: ../../../library/os.rst:6181 +#: ../../../library/os.rst:6193 msgid "" "Return a bytestring of *size* random bytes suitable for cryptographic use." msgstr "" -#: ../../../library/os.rst:6183 +#: ../../../library/os.rst:6195 msgid "" "This function returns random bytes from an OS-specific randomness source. " "The returned data should be unpredictable enough for cryptographic " "applications, though its exact quality depends on the OS implementation." msgstr "" -#: ../../../library/os.rst:6187 +#: ../../../library/os.rst:6199 msgid "" "On Linux, if the ``getrandom()`` syscall is available, it is used in " "blocking mode: block until the system urandom entropy pool is initialized " @@ -6590,63 +6608,63 @@ msgid "" "to poll until the system urandom entropy pool is initialized." msgstr "" -#: ../../../library/os.rst:6194 +#: ../../../library/os.rst:6206 msgid "" "On a Unix-like system, random bytes are read from the ``/dev/urandom`` " "device. If the ``/dev/urandom`` device is not available or not readable, " "the :exc:`NotImplementedError` exception is raised." msgstr "" -#: ../../../library/os.rst:6198 +#: ../../../library/os.rst:6210 msgid "On Windows, it will use ``BCryptGenRandom()``." msgstr "" -#: ../../../library/os.rst:6201 +#: ../../../library/os.rst:6213 msgid "" "The :mod:`secrets` module provides higher level functions. For an easy-to-" "use interface to the random number generator provided by your platform, " "please see :class:`random.SystemRandom`." msgstr "" -#: ../../../library/os.rst:6205 +#: ../../../library/os.rst:6217 msgid "" "On Linux 3.17 and newer, the ``getrandom()`` syscall is now used when " "available. On OpenBSD 5.6 and newer, the C ``getentropy()`` function is now " "used. These functions avoid the usage of an internal file descriptor." msgstr "" -#: ../../../library/os.rst:6211 +#: ../../../library/os.rst:6223 msgid "" "On Linux, if the ``getrandom()`` syscall blocks (the urandom entropy pool is " "not initialized yet), fall back on reading ``/dev/urandom``." msgstr "" -#: ../../../library/os.rst:6215 +#: ../../../library/os.rst:6227 msgid "" "On Linux, ``getrandom()`` is now used in blocking mode to increase the " "security." msgstr "" -#: ../../../library/os.rst:6219 +#: ../../../library/os.rst:6231 msgid "" "On Windows, ``BCryptGenRandom()`` is used instead of ``CryptGenRandom()`` " "which is deprecated." msgstr "" -#: ../../../library/os.rst:6225 +#: ../../../library/os.rst:6237 msgid "" "By default, when reading from ``/dev/random``, :func:`getrandom` blocks if " "no random bytes are available, and when reading from ``/dev/urandom``, it " "blocks if the entropy pool has not yet been initialized." msgstr "" -#: ../../../library/os.rst:6229 +#: ../../../library/os.rst:6241 msgid "" "If the :py:data:`GRND_NONBLOCK` flag is set, then :func:`getrandom` does not " "block in these cases, but instead immediately raises :exc:`BlockingIOError`." msgstr "" -#: ../../../library/os.rst:6236 +#: ../../../library/os.rst:6248 msgid "" "If this bit is set, then random bytes are drawn from the ``/dev/" "random`` pool instead of the ``/dev/urandom`` pool." @@ -6664,7 +6682,7 @@ msgstr "" #: ../../../library/os.rst:392 ../../../library/os.rst:458 #: ../../../library/os.rst:467 ../../../library/os.rst:476 #: ../../../library/os.rst:490 ../../../library/os.rst:688 -#: ../../../library/os.rst:4988 ../../../library/os.rst:5014 +#: ../../../library/os.rst:5000 ../../../library/os.rst:5026 msgid "process" msgstr "" @@ -6704,11 +6722,11 @@ msgstr "" msgid "gethostbyaddr() (in module socket)" msgstr "" -#: ../../../library/os.rst:823 ../../../library/os.rst:2758 +#: ../../../library/os.rst:823 ../../../library/os.rst:2762 msgid "deleting" msgstr "" -#: ../../../library/os.rst:1384 ../../../library/os.rst:3128 +#: ../../../library/os.rst:1384 ../../../library/os.rst:3136 msgid "module" msgstr "" @@ -6716,9 +6734,9 @@ msgstr "" msgid "pty" msgstr "" -#: ../../../library/os.rst:2137 ../../../library/os.rst:2550 -#: ../../../library/os.rst:2758 ../../../library/os.rst:4022 -#: ../../../library/os.rst:4122 +#: ../../../library/os.rst:2137 ../../../library/os.rst:2554 +#: ../../../library/os.rst:2762 ../../../library/os.rst:4030 +#: ../../../library/os.rst:4130 msgid "directory" msgstr "" @@ -6726,72 +6744,72 @@ msgstr "" msgid "changing" msgstr "" -#: ../../../library/os.rst:2550 +#: ../../../library/os.rst:2554 msgid "creating" msgstr "" -#: ../../../library/os.rst:2550 +#: ../../../library/os.rst:2554 msgid "UNC paths" msgstr "" -#: ../../../library/os.rst:2550 +#: ../../../library/os.rst:2554 msgid "and os.makedirs()" msgstr "" -#: ../../../library/os.rst:3128 +#: ../../../library/os.rst:3136 msgid "stat" msgstr "" -#: ../../../library/os.rst:4022 ../../../library/os.rst:4122 +#: ../../../library/os.rst:4030 ../../../library/os.rst:4130 msgid "walking" msgstr "" -#: ../../../library/os.rst:4022 ../../../library/os.rst:4122 +#: ../../../library/os.rst:4030 ../../../library/os.rst:4130 msgid "traversal" msgstr "" -#: ../../../library/os.rst:4988 ../../../library/os.rst:5014 +#: ../../../library/os.rst:5000 ../../../library/os.rst:5026 msgid "killing" msgstr "" -#: ../../../library/os.rst:4988 ../../../library/os.rst:5014 +#: ../../../library/os.rst:5000 ../../../library/os.rst:5026 msgid "signalling" msgstr "" -#: ../../../library/os.rst:6063 ../../../library/os.rst:6099 +#: ../../../library/os.rst:6075 ../../../library/os.rst:6111 msgid ". (dot)" msgstr "" -#: ../../../library/os.rst:6063 ../../../library/os.rst:6071 -#: ../../../library/os.rst:6079 ../../../library/os.rst:6090 -#: ../../../library/os.rst:6099 +#: ../../../library/os.rst:6075 ../../../library/os.rst:6083 +#: ../../../library/os.rst:6091 ../../../library/os.rst:6102 +#: ../../../library/os.rst:6111 msgid "in pathnames" msgstr "" -#: ../../../library/os.rst:6071 +#: ../../../library/os.rst:6083 msgid ".." msgstr "" -#: ../../../library/os.rst:6079 ../../../library/os.rst:6090 +#: ../../../library/os.rst:6091 ../../../library/os.rst:6102 msgid "/ (slash)" msgstr "" -#: ../../../library/os.rst:6080 +#: ../../../library/os.rst:6092 msgid "\\ (backslash)" msgstr "" -#: ../../../library/os.rst:6080 +#: ../../../library/os.rst:6092 msgid "in pathnames (Windows)" msgstr "" -#: ../../../library/os.rst:6106 +#: ../../../library/os.rst:6118 msgid ": (colon)" msgstr "" -#: ../../../library/os.rst:6106 +#: ../../../library/os.rst:6118 msgid "path separator (POSIX)" msgstr "" -#: ../../../library/os.rst:6106 +#: ../../../library/os.rst:6118 msgid "; (semicolon)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/profiling.sampling.pot b/main/locale/pot/LC_MESSAGES/library/profiling.sampling.pot index 976cab6b140..4deb68638bd 100644 --- a/main/locale/pot/LC_MESSAGES/library/profiling.sampling.pot +++ b/main/locale/pot/LC_MESSAGES/library/profiling.sampling.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1632,17 +1632,17 @@ msgid "" "profiling data, similar to the ``top`` command for system processes::" msgstr "" -#: ../../../library/profiling.sampling.rst:1197 +#: ../../../library/profiling.sampling.rst:1199 msgid "Tachyon live mode showing all threads" msgstr "" -#: ../../../library/profiling.sampling.rst:1202 +#: ../../../library/profiling.sampling.rst:1204 msgid "" "Live mode displays real-time profiling statistics, showing combined data " "from multiple threads in a multi-threaded application." msgstr "" -#: ../../../library/profiling.sampling.rst:1205 +#: ../../../library/profiling.sampling.rst:1207 msgid "" "The display updates continuously as new samples arrive, showing the current " "hottest functions. This mode requires the :mod:`curses` module, which is " @@ -1651,7 +1651,7 @@ msgid "" "columns." msgstr "" -#: ../../../library/profiling.sampling.rst:1210 +#: ../../../library/profiling.sampling.rst:1212 msgid "" "The header displays the top 3 hottest functions, sampling efficiency " "metrics, and thread status statistics (GIL held percentage, CPU usage, GC " @@ -1659,7 +1659,7 @@ msgid "" "column indicated by an arrow (▼)." msgstr "" -#: ../../../library/profiling.sampling.rst:1215 +#: ../../../library/profiling.sampling.rst:1217 msgid "" "When :option:`--opcodes` is enabled, an additional opcode panel appears " "below the main table, showing instruction-level statistics for the currently " @@ -1668,68 +1668,68 @@ msgid "" "opcodes." msgstr "" -#: ../../../library/profiling.sampling.rst:1220 +#: ../../../library/profiling.sampling.rst:1224 msgid "Tachyon live mode with opcode panel" msgstr "" -#: ../../../library/profiling.sampling.rst:1225 +#: ../../../library/profiling.sampling.rst:1229 msgid "" "Live mode with ``--opcodes`` enabled shows an opcode panel with a bytecode " "instruction breakdown for the selected function." msgstr "" -#: ../../../library/profiling.sampling.rst:1230 +#: ../../../library/profiling.sampling.rst:1234 msgid "Keyboard commands" msgstr "" -#: ../../../library/profiling.sampling.rst:1232 +#: ../../../library/profiling.sampling.rst:1236 msgid "Within live mode, keyboard commands control the display:" msgstr "" -#: ../../../library/profiling.sampling.rst:1234 +#: ../../../library/profiling.sampling.rst:1238 msgid ":kbd:`q`" msgstr "" -#: ../../../library/profiling.sampling.rst:1235 +#: ../../../library/profiling.sampling.rst:1239 msgid "Quit the profiler and return to the shell." msgstr "" -#: ../../../library/profiling.sampling.rst:1237 +#: ../../../library/profiling.sampling.rst:1241 msgid ":kbd:`s` / :kbd:`S`" msgstr "" -#: ../../../library/profiling.sampling.rst:1238 +#: ../../../library/profiling.sampling.rst:1242 msgid "" "Cycle through sort orders forward/backward (sample count, percentage, total " "time, cumulative percentage, cumulative time)." msgstr "" -#: ../../../library/profiling.sampling.rst:1241 +#: ../../../library/profiling.sampling.rst:1245 msgid ":kbd:`p`" msgstr "" -#: ../../../library/profiling.sampling.rst:1242 +#: ../../../library/profiling.sampling.rst:1246 msgid "" "Pause or resume display updates. Sampling continues in the background while " "the display is paused, so you can freeze the view to examine results without " "stopping data collection." msgstr "" -#: ../../../library/profiling.sampling.rst:1246 +#: ../../../library/profiling.sampling.rst:1250 msgid ":kbd:`r`" msgstr "" -#: ../../../library/profiling.sampling.rst:1247 +#: ../../../library/profiling.sampling.rst:1251 msgid "" "Reset all statistics and start fresh. This is disabled after profiling " "finishes to prevent accidental data loss." msgstr "" -#: ../../../library/profiling.sampling.rst:1250 +#: ../../../library/profiling.sampling.rst:1254 msgid ":kbd:`/`" msgstr "" -#: ../../../library/profiling.sampling.rst:1251 +#: ../../../library/profiling.sampling.rst:1255 msgid "" "Enter filter mode to search for functions by name. The filter uses case-" "insensitive substring matching against the filename and function name. Type " @@ -1737,77 +1737,77 @@ msgid "" "regular expressions are not supported." msgstr "" -#: ../../../library/profiling.sampling.rst:1256 +#: ../../../library/profiling.sampling.rst:1260 msgid ":kbd:`c`" msgstr "" -#: ../../../library/profiling.sampling.rst:1257 +#: ../../../library/profiling.sampling.rst:1261 msgid "Clear the current filter and show all functions again." msgstr "" -#: ../../../library/profiling.sampling.rst:1259 +#: ../../../library/profiling.sampling.rst:1263 msgid ":kbd:`t`" msgstr "" -#: ../../../library/profiling.sampling.rst:1260 +#: ../../../library/profiling.sampling.rst:1264 msgid "" "Toggle between viewing all threads combined or per-thread statistics. In per-" "thread mode, a thread counter (for example, ``1/4``) appears showing your " "position among the available threads." msgstr "" -#: ../../../library/profiling.sampling.rst:1264 +#: ../../../library/profiling.sampling.rst:1268 msgid ":kbd:`←` :kbd:`→` or :kbd:`↑` :kbd:`↓`" msgstr "" -#: ../../../library/profiling.sampling.rst:1265 +#: ../../../library/profiling.sampling.rst:1269 msgid "" "In per-thread view, navigate between threads. Navigation wraps around from " "the last thread to the first and vice versa." msgstr "" -#: ../../../library/profiling.sampling.rst:1268 +#: ../../../library/profiling.sampling.rst:1272 msgid ":kbd:`+` / :kbd:`-`" msgstr "" -#: ../../../library/profiling.sampling.rst:1269 +#: ../../../library/profiling.sampling.rst:1273 msgid "" "Increase or decrease the display refresh rate. The range is 0.05 seconds (20 " "Hz, very responsive) to 1.0 second (1 Hz, lower overhead). Faster refresh " "rates use more CPU. The default is 0.1 seconds (10 Hz)." msgstr "" -#: ../../../library/profiling.sampling.rst:1273 +#: ../../../library/profiling.sampling.rst:1277 msgid ":kbd:`x`" msgstr "" -#: ../../../library/profiling.sampling.rst:1274 +#: ../../../library/profiling.sampling.rst:1278 msgid "" "Toggle trend indicators that show whether functions are becoming hotter or " "cooler over time. When enabled, increasing metrics appear in green and " "decreasing metrics appear in red, comparing each update to the previous one." msgstr "" -#: ../../../library/profiling.sampling.rst:1278 +#: ../../../library/profiling.sampling.rst:1282 msgid ":kbd:`h` or :kbd:`?`" msgstr "" -#: ../../../library/profiling.sampling.rst:1279 +#: ../../../library/profiling.sampling.rst:1283 msgid "Show the help screen with all available commands." msgstr "" -#: ../../../library/profiling.sampling.rst:1281 +#: ../../../library/profiling.sampling.rst:1285 msgid ":kbd:`j` / :kbd:`k` (or :kbd:`Up` / :kbd:`Down`)" msgstr "" -#: ../../../library/profiling.sampling.rst:1282 +#: ../../../library/profiling.sampling.rst:1286 msgid "" "Navigate through opcode entries in the opcode panel (when ``--opcodes`` is " "enabled). These keys scroll through the instruction-level statistics for the " "currently selected function." msgstr "" -#: ../../../library/profiling.sampling.rst:1286 +#: ../../../library/profiling.sampling.rst:1290 msgid "" "When profiling finishes (duration expires or target process exits), the " "display shows a \"PROFILING COMPLETE\" banner and freezes the final results. " @@ -1815,25 +1815,25 @@ msgid "" "`q` to exit." msgstr "" -#: ../../../library/profiling.sampling.rst:1290 +#: ../../../library/profiling.sampling.rst:1294 msgid "" "Live mode is incompatible with output format options (:option:`--" "collapsed`, :option:`--flamegraph`, and so on) because it uses an " "interactive terminal interface rather than producing file output." msgstr "" -#: ../../../library/profiling.sampling.rst:1296 +#: ../../../library/profiling.sampling.rst:1300 msgid "Async-aware profiling" msgstr "" -#: ../../../library/profiling.sampling.rst:1298 +#: ../../../library/profiling.sampling.rst:1302 msgid "" "For programs using :mod:`asyncio`, the profiler offers async-aware mode (:" "option:`--async-aware`) that reconstructs call stacks based on the task " "structure rather than the raw Python frames::" msgstr "" -#: ../../../library/profiling.sampling.rst:1304 +#: ../../../library/profiling.sampling.rst:1308 msgid "" "Standard profiling of async code can be confusing because the physical call " "stack often shows event loop internals rather than the logical flow of your " @@ -1841,31 +1841,31 @@ msgid "" "running and presenting stacks that reflect the ``await`` chain." msgstr "" -#: ../../../library/profiling.sampling.rst:1330 +#: ../../../library/profiling.sampling.rst:1334 msgid "" "Async-aware profiling requires the target process to have the :mod:`asyncio` " "module loaded. If you profile a script before it imports asyncio, async-" "aware mode will not be able to capture task information." msgstr "" -#: ../../../library/profiling.sampling.rst:1336 +#: ../../../library/profiling.sampling.rst:1340 msgid "Async modes" msgstr "" -#: ../../../library/profiling.sampling.rst:1338 +#: ../../../library/profiling.sampling.rst:1342 msgid "" "The :option:`--async-mode` option controls which tasks appear in the " "profile::" msgstr "" -#: ../../../library/profiling.sampling.rst:1343 +#: ../../../library/profiling.sampling.rst:1347 msgid "" "With :option:`--async-mode`\\ ``=running`` (the default), only the task " "currently executing on the CPU is profiled. This shows where your program is " "actively spending time and is the typical choice for performance analysis." msgstr "" -#: ../../../library/profiling.sampling.rst:1347 +#: ../../../library/profiling.sampling.rst:1351 msgid "" "With :option:`--async-mode`\\ ``=all``, tasks that are suspended (awaiting I/" "O, locks, or other tasks) are also included. This mode is useful for " @@ -1873,11 +1873,11 @@ msgid "" "since every suspended task appears in each sample." msgstr "" -#: ../../../library/profiling.sampling.rst:1354 +#: ../../../library/profiling.sampling.rst:1358 msgid "Task markers and stack reconstruction" msgstr "" -#: ../../../library/profiling.sampling.rst:1356 +#: ../../../library/profiling.sampling.rst:1360 msgid "" "In async-aware profiles, you will see ```` frames that mark boundaries " "between asyncio tasks. These are synthetic frames inserted by the profiler " @@ -1885,7 +1885,7 @@ msgid "" "these frames." msgstr "" -#: ../../../library/profiling.sampling.rst:1361 +#: ../../../library/profiling.sampling.rst:1365 msgid "" "When a task awaits another task, the profiler reconstructs the logical call " "chain by following the ``await`` relationships. Only \"leaf\" tasks (tasks " @@ -1894,7 +1894,7 @@ msgid "" "instead." msgstr "" -#: ../../../library/profiling.sampling.rst:1366 +#: ../../../library/profiling.sampling.rst:1370 msgid "" "If a task has multiple awaiters (a diamond pattern in the task graph), the " "profiler deterministically selects one parent and annotates the task marker " @@ -1903,76 +1903,76 @@ msgid "" "particular stack." msgstr "" -#: ../../../library/profiling.sampling.rst:1373 +#: ../../../library/profiling.sampling.rst:1377 msgid "Option restrictions" msgstr "" -#: ../../../library/profiling.sampling.rst:1375 +#: ../../../library/profiling.sampling.rst:1379 msgid "" "Async-aware mode uses a different stack reconstruction mechanism and is " "incompatible with: :option:`--native`, :option:`--no-gc`, :option:`--all-" "threads`, and :option:`--mode`\\ ``=cpu`` or :option:`--mode`\\ ``=gil``." msgstr "" -#: ../../../library/profiling.sampling.rst:1381 +#: ../../../library/profiling.sampling.rst:1385 msgid "Command-line interface" msgstr "" -#: ../../../library/profiling.sampling.rst:1385 +#: ../../../library/profiling.sampling.rst:1389 msgid "The complete command-line interface for reference." msgstr "" -#: ../../../library/profiling.sampling.rst:1389 +#: ../../../library/profiling.sampling.rst:1393 msgid "Global options" msgstr "" -#: ../../../library/profiling.sampling.rst:1393 +#: ../../../library/profiling.sampling.rst:1397 msgid "Run and profile a Python script or module." msgstr "" -#: ../../../library/profiling.sampling.rst:1397 +#: ../../../library/profiling.sampling.rst:1401 msgid "Attach to and profile a running process by PID." msgstr "" -#: ../../../library/profiling.sampling.rst:1401 +#: ../../../library/profiling.sampling.rst:1405 msgid "Convert a binary profile file to another output format." msgstr "" -#: ../../../library/profiling.sampling.rst:1405 +#: ../../../library/profiling.sampling.rst:1409 msgid "Sampling options" msgstr "" -#: ../../../library/profiling.sampling.rst:1409 +#: ../../../library/profiling.sampling.rst:1413 msgid "" "Sampling rate (for example, ``10000``, ``10khz``, ``10k``). Default: " "``1khz``." msgstr "" -#: ../../../library/profiling.sampling.rst:1413 +#: ../../../library/profiling.sampling.rst:1417 msgid "Profiling duration in seconds. Default: run to completion." msgstr "" -#: ../../../library/profiling.sampling.rst:1417 +#: ../../../library/profiling.sampling.rst:1421 msgid "Sample all threads, not just the main thread." msgstr "" -#: ../../../library/profiling.sampling.rst:1421 +#: ../../../library/profiling.sampling.rst:1425 msgid "Display sampling statistics during profiling." msgstr "" -#: ../../../library/profiling.sampling.rst:1425 +#: ../../../library/profiling.sampling.rst:1429 msgid "Include ```` frames for non-Python code." msgstr "" -#: ../../../library/profiling.sampling.rst:1429 +#: ../../../library/profiling.sampling.rst:1433 msgid "Exclude ```` frames for garbage collection." msgstr "" -#: ../../../library/profiling.sampling.rst:1433 +#: ../../../library/profiling.sampling.rst:1437 msgid "Enable async-aware profiling for asyncio programs." msgstr "" -#: ../../../library/profiling.sampling.rst:1437 +#: ../../../library/profiling.sampling.rst:1441 msgid "" "Gather bytecode opcode information for instruction-level profiling. Shows " "which bytecode instructions are executing, including specializations. " @@ -1980,75 +1980,75 @@ msgid "" "formats only." msgstr "" -#: ../../../library/profiling.sampling.rst:1444 +#: ../../../library/profiling.sampling.rst:1448 msgid "" "Also profile subprocesses. Each subprocess gets its own profiler instance " "and output file. Incompatible with ``--live``." msgstr "" -#: ../../../library/profiling.sampling.rst:1449 +#: ../../../library/profiling.sampling.rst:1453 msgid "" "Pause the target process during each sample. This ensures consistent stack " "traces at the cost of slowing down the target. Use with longer intervals " "(1000 µs or higher) to minimize impact. See :ref:`blocking-mode` for details." msgstr "" -#: ../../../library/profiling.sampling.rst:1456 +#: ../../../library/profiling.sampling.rst:1460 msgid "Mode options" msgstr "" -#: ../../../library/profiling.sampling.rst:1460 +#: ../../../library/profiling.sampling.rst:1464 msgid "" "Sampling mode: ``wall`` (default), ``cpu``, ``gil``, or ``exception``. The " "``cpu``, ``gil``, and ``exception`` modes are incompatible with ``--async-" "aware``." msgstr "" -#: ../../../library/profiling.sampling.rst:1466 +#: ../../../library/profiling.sampling.rst:1470 msgid "" "Async profiling mode: ``running`` (default) or ``all``. Requires ``--async-" "aware``." msgstr "" -#: ../../../library/profiling.sampling.rst:1471 +#: ../../../library/profiling.sampling.rst:1475 msgid "Output options" msgstr "" -#: ../../../library/profiling.sampling.rst:1475 +#: ../../../library/profiling.sampling.rst:1479 msgid "" "Generate pstats statistics. This is the default. When written to stdout, the " "output is a text table; with :option:`-o`, it is a binary pstats file." msgstr "" -#: ../../../library/profiling.sampling.rst:1481 +#: ../../../library/profiling.sampling.rst:1485 msgid "Generate collapsed stack format for external flame graph tools." msgstr "" -#: ../../../library/profiling.sampling.rst:1485 +#: ../../../library/profiling.sampling.rst:1489 msgid "Generate self-contained HTML flame graph." msgstr "" -#: ../../../library/profiling.sampling.rst:1489 +#: ../../../library/profiling.sampling.rst:1493 msgid "Generate Gecko JSON format for Firefox Profiler." msgstr "" -#: ../../../library/profiling.sampling.rst:1493 +#: ../../../library/profiling.sampling.rst:1497 msgid "Generate HTML heatmap with line-level sample counts." msgstr "" -#: ../../../library/profiling.sampling.rst:1497 +#: ../../../library/profiling.sampling.rst:1501 msgid "" "Generate high-performance binary format for later conversion with the " "``replay`` command." msgstr "" -#: ../../../library/profiling.sampling.rst:1502 +#: ../../../library/profiling.sampling.rst:1506 msgid "" "Compression for binary format: ``auto`` (use zstd if available, default), " "``zstd``, or ``none``." msgstr "" -#: ../../../library/profiling.sampling.rst:1507 +#: ../../../library/profiling.sampling.rst:1511 msgid "" "Output file or directory path. Default behavior varies by format: :option:`--" "pstats` prints a text table to stdout, while ``-o`` writes a binary pstats " @@ -2057,7 +2057,7 @@ msgid "" "named ``heatmap_``." msgstr "" -#: ../../../library/profiling.sampling.rst:1515 +#: ../../../library/profiling.sampling.rst:1519 msgid "" "Automatically open HTML output (:option:`--flamegraph` and :option:`--" "heatmap`) in your default web browser after generation. When profiling with :" @@ -2065,79 +2065,79 @@ msgid "" "outputs are never auto-opened." msgstr "" -#: ../../../library/profiling.sampling.rst:1522 +#: ../../../library/profiling.sampling.rst:1526 msgid "pstats display options" msgstr "" -#: ../../../library/profiling.sampling.rst:1524 +#: ../../../library/profiling.sampling.rst:1528 msgid "These options apply only to pstats format output." msgstr "" -#: ../../../library/profiling.sampling.rst:1528 +#: ../../../library/profiling.sampling.rst:1532 msgid "" "Sort order: ``nsamples``, ``tottime``, ``cumtime``, ``sample-pct``, ``cumul-" "pct``, ``nsamples-cumul``, or ``name``. Default: ``nsamples``." msgstr "" -#: ../../../library/profiling.sampling.rst:1533 +#: ../../../library/profiling.sampling.rst:1537 msgid "Maximum number of entries to display. Default: 15." msgstr "" -#: ../../../library/profiling.sampling.rst:1537 +#: ../../../library/profiling.sampling.rst:1541 msgid "" "Omit the Legend and Summary of Interesting Functions sections from output." msgstr "" -#: ../../../library/profiling.sampling.rst:1541 +#: ../../../library/profiling.sampling.rst:1545 msgid "Run command options" msgstr "" -#: ../../../library/profiling.sampling.rst:1545 +#: ../../../library/profiling.sampling.rst:1549 msgid "Treat the target as a module name rather than a script path." msgstr "" -#: ../../../library/profiling.sampling.rst:1549 +#: ../../../library/profiling.sampling.rst:1553 msgid "Start interactive terminal interface instead of batch profiling." msgstr "" -#: ../../../library/profiling.sampling.rst:1554 +#: ../../../library/profiling.sampling.rst:1558 msgid ":mod:`profiling`" msgstr "" -#: ../../../library/profiling.sampling.rst:1555 +#: ../../../library/profiling.sampling.rst:1559 msgid "Overview of Python profiling tools and guidance on choosing a profiler." msgstr "" -#: ../../../library/profiling.sampling.rst:1557 +#: ../../../library/profiling.sampling.rst:1561 msgid ":mod:`profiling.tracing`" msgstr "" -#: ../../../library/profiling.sampling.rst:1558 +#: ../../../library/profiling.sampling.rst:1562 msgid "Deterministic tracing profiler for exact call counts and timing." msgstr "" -#: ../../../library/profiling.sampling.rst:1560 +#: ../../../library/profiling.sampling.rst:1564 msgid ":mod:`pstats`" msgstr "" -#: ../../../library/profiling.sampling.rst:1561 +#: ../../../library/profiling.sampling.rst:1565 msgid "Statistics analysis for profile data." msgstr "" -#: ../../../library/profiling.sampling.rst:1563 +#: ../../../library/profiling.sampling.rst:1567 msgid "`Firefox Profiler `__" msgstr "" -#: ../../../library/profiling.sampling.rst:1564 +#: ../../../library/profiling.sampling.rst:1568 msgid "" "Web-based profiler that accepts Gecko format output. See the `documentation " "`__ for usage details." msgstr "" -#: ../../../library/profiling.sampling.rst:1567 +#: ../../../library/profiling.sampling.rst:1571 msgid "`FlameGraph `__" msgstr "" -#: ../../../library/profiling.sampling.rst:1568 +#: ../../../library/profiling.sampling.rst:1572 msgid "Tools for generating flame graphs from collapsed stack format." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/site.pot b/main/locale/pot/LC_MESSAGES/library/site.pot index c6db155500f..905aecf781b 100644 --- a/main/locale/pot/LC_MESSAGES/library/site.pot +++ b/main/locale/pot/LC_MESSAGES/library/site.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-02-16 09:11+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -90,10 +90,12 @@ msgid "" "environments>`, the ``pyvenv.cfg`` file in :data:`sys.prefix` is checked for " "site-specific configurations. If the ``include-system-site-packages`` key " "exists and is set to ``true`` (case-insensitive), the system-level prefixes " -"will be searched for site-packages, otherwise they won't." +"will be searched for site-packages, otherwise they won't. If the system-" +"level prefixes are not searched then the user site prefixes are also " +"implicitly not searched for site-packages." msgstr "" -#: ../../../library/site.rst:73 +#: ../../../library/site.rst:74 msgid "" "A path configuration file is a file whose name has the form :file:`{name}." "pth` and exists in one of the four directories mentioned above; its contents " @@ -105,7 +107,7 @@ msgid "" "executed." msgstr "" -#: ../../../library/site.rst:83 +#: ../../../library/site.rst:84 msgid "" "An executable line in a :file:`.pth` file is run at every Python startup, " "regardless of whether a particular module is actually going to be used. Its " @@ -117,13 +119,13 @@ msgid "" "putting anything more complex here." msgstr "" -#: ../../../library/site.rst:94 +#: ../../../library/site.rst:95 msgid "" "The :file:`.pth` files are now decoded by UTF-8 at first and then by the :" "term:`locale encoding` if it fails." msgstr "" -#: ../../../library/site.rst:102 +#: ../../../library/site.rst:103 msgid "" "For example, suppose ``sys.prefix`` and ``sys.exec_prefix`` are set to :file:" "`/usr/local`. The Python X.Y library is then installed in :file:`/usr/local/" @@ -133,17 +135,17 @@ msgid "" "and :file:`bar.pth`. Assume :file:`foo.pth` contains the following::" msgstr "" -#: ../../../library/site.rst:116 +#: ../../../library/site.rst:117 msgid "and :file:`bar.pth` contains::" msgstr "" -#: ../../../library/site.rst:122 +#: ../../../library/site.rst:123 msgid "" "Then the following version-specific directories are added to ``sys.path``, " "in this order::" msgstr "" -#: ../../../library/site.rst:128 +#: ../../../library/site.rst:129 msgid "" "Note that :file:`bletch` is omitted because it doesn't exist; the :file:" "`bar` directory precedes the :file:`foo` directory because :file:`bar.pth` " @@ -151,11 +153,11 @@ msgid "" "because it is not mentioned in either path configuration file." msgstr "" -#: ../../../library/site.rst:134 +#: ../../../library/site.rst:135 msgid ":mod:`!sitecustomize`" msgstr "" -#: ../../../library/site.rst:138 +#: ../../../library/site.rst:139 msgid "" "After these path manipulations, an attempt is made to import a module named :" "mod:`!sitecustomize`, which can perform arbitrary site-specific " @@ -169,11 +171,11 @@ msgid "" "perhaps mysterious failure of the process." msgstr "" -#: ../../../library/site.rst:150 +#: ../../../library/site.rst:151 msgid ":mod:`!usercustomize`" msgstr "" -#: ../../../library/site.rst:154 +#: ../../../library/site.rst:155 msgid "" "After this, an attempt is made to import a module named :mod:`!" "usercustomize`, which can perform arbitrary user-specific customizations, " @@ -185,18 +187,18 @@ msgid "" "ignored." msgstr "" -#: ../../../library/site.rst:162 +#: ../../../library/site.rst:163 msgid "" "Note that for some non-Unix systems, ``sys.prefix`` and ``sys.exec_prefix`` " "are empty, and the path manipulations are skipped; however the import of :" "mod:`sitecustomize` and :mod:`!usercustomize` is still attempted." msgstr "" -#: ../../../library/site.rst:171 +#: ../../../library/site.rst:172 msgid "Readline configuration" msgstr "" -#: ../../../library/site.rst:173 +#: ../../../library/site.rst:174 msgid "" "On systems that support :mod:`readline`, this module will also import and " "configure the :mod:`rlcompleter` module, if Python is started in :ref:" @@ -208,19 +210,19 @@ msgid "" "`PYTHONSTARTUP` file." msgstr "" -#: ../../../library/site.rst:182 +#: ../../../library/site.rst:183 msgid "Activation of rlcompleter and history was made automatic." msgstr "" -#: ../../../library/site.rst:187 +#: ../../../library/site.rst:188 msgid "Module contents" msgstr "" -#: ../../../library/site.rst:191 +#: ../../../library/site.rst:192 msgid "A list of prefixes for site-packages directories." msgstr "" -#: ../../../library/site.rst:196 +#: ../../../library/site.rst:197 msgid "" "Flag showing the status of the user site-packages directory. ``True`` means " "that it is enabled and was added to ``sys.path``. ``False`` means that it " @@ -229,7 +231,7 @@ msgid "" "(mismatch between user or group id and effective id) or by an administrator." msgstr "" -#: ../../../library/site.rst:206 +#: ../../../library/site.rst:207 msgid "" "Path to the user site-packages for the running Python. Can be ``None`` if :" "func:`getusersitepackages` hasn't been called yet. Default value is :file:" @@ -241,7 +243,7 @@ msgid "" "files in it will be processed." msgstr "" -#: ../../../library/site.rst:218 +#: ../../../library/site.rst:219 msgid "" "Path to the base directory for the user site-packages. Can be ``None`` if :" "func:`getuserbase` hasn't been called yet. Default value is :file:`~/." @@ -252,35 +254,35 @@ msgid "" "scheme `. See also :envvar:`PYTHONUSERBASE`." msgstr "" -#: ../../../library/site.rst:230 +#: ../../../library/site.rst:231 msgid "" "Adds all the standard site-specific directories to the module search path. " "This function is called automatically when this module is imported, unless " "the Python interpreter was started with the :option:`-S` flag." msgstr "" -#: ../../../library/site.rst:234 +#: ../../../library/site.rst:235 msgid "This function used to be called unconditionally." msgstr "" -#: ../../../library/site.rst:240 +#: ../../../library/site.rst:241 msgid "" "Add a directory to sys.path and process its :file:`.pth` files. Typically " "used in :mod:`sitecustomize` or :mod:`usercustomize` (see above)." msgstr "" -#: ../../../library/site.rst:246 +#: ../../../library/site.rst:247 msgid "Return a list containing all global site-packages directories." msgstr "" -#: ../../../library/site.rst:253 +#: ../../../library/site.rst:254 msgid "" "Return the path of the user base directory, :data:`USER_BASE`. If it is not " "initialized yet, this function will also set it, respecting :envvar:" "`PYTHONUSERBASE`." msgstr "" -#: ../../../library/site.rst:262 +#: ../../../library/site.rst:263 msgid "" "Return the path of the user-specific site-packages directory, :data:" "`USER_SITE`. If it is not initialized yet, this function will also set it, " @@ -288,17 +290,17 @@ msgid "" "packages was added to ``sys.path`` :data:`ENABLE_USER_SITE` should be used." msgstr "" -#: ../../../library/site.rst:274 +#: ../../../library/site.rst:275 msgid "Command-line interface" msgstr "" -#: ../../../library/site.rst:278 +#: ../../../library/site.rst:279 msgid "" "The :mod:`!site` module also provides a way to get the user directories from " "the command line:" msgstr "" -#: ../../../library/site.rst:286 +#: ../../../library/site.rst:287 msgid "" "If it is called without arguments, it will print the contents of :data:`sys." "path` on the standard output, followed by the value of :data:`USER_BASE` and " @@ -306,21 +308,21 @@ msgid "" "finally the value of :data:`ENABLE_USER_SITE`." msgstr "" -#: ../../../library/site.rst:293 +#: ../../../library/site.rst:294 msgid "Print the path to the user base directory." msgstr "" -#: ../../../library/site.rst:297 +#: ../../../library/site.rst:298 msgid "Print the path to the user site-packages directory." msgstr "" -#: ../../../library/site.rst:299 +#: ../../../library/site.rst:300 msgid "" "If both options are given, user base and user site will be printed (always " "in this order), separated by :data:`os.pathsep`." msgstr "" -#: ../../../library/site.rst:302 +#: ../../../library/site.rst:303 msgid "" "If any option is given, the script will exit with one of these values: ``0`` " "if the user site-packages directory is enabled, ``1`` if it was disabled by " @@ -328,11 +330,11 @@ msgid "" "administrator, and a value greater than 2 if there is an error." msgstr "" -#: ../../../library/site.rst:309 +#: ../../../library/site.rst:310 msgid ":pep:`370` -- Per user site-packages directory" msgstr "" -#: ../../../library/site.rst:310 +#: ../../../library/site.rst:311 msgid ":ref:`sys-path-init` -- The initialization of :data:`sys.path`." msgstr "" @@ -344,7 +346,7 @@ msgstr "" msgid "search" msgstr "" -#: ../../../library/site.rst:16 ../../../library/site.rst:98 +#: ../../../library/site.rst:16 ../../../library/site.rst:99 msgid "path" msgstr "" @@ -356,30 +358,30 @@ msgstr "" msgid "directory" msgstr "" -#: ../../../library/site.rst:69 +#: ../../../library/site.rst:70 msgid "# (hash)" msgstr "" -#: ../../../library/site.rst:69 +#: ../../../library/site.rst:70 msgid "comment" msgstr "" -#: ../../../library/site.rst:69 +#: ../../../library/site.rst:70 msgid "statement" msgstr "" -#: ../../../library/site.rst:69 +#: ../../../library/site.rst:70 msgid "import" msgstr "" -#: ../../../library/site.rst:98 +#: ../../../library/site.rst:99 msgid "package" msgstr "" -#: ../../../library/site.rst:98 +#: ../../../library/site.rst:99 msgid "configuration" msgstr "" -#: ../../../library/site.rst:98 +#: ../../../library/site.rst:99 msgid "file" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/stdtypes.pot b/main/locale/pot/LC_MESSAGES/library/stdtypes.pot index 7a206f59d4d..1b856672ebb 100644 --- a/main/locale/pot/LC_MESSAGES/library/stdtypes.pot +++ b/main/locale/pot/LC_MESSAGES/library/stdtypes.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -116,8 +116,8 @@ msgstr "" #: ../../../library/stdtypes.rst:88 ../../../library/stdtypes.rst:292 #: ../../../library/stdtypes.rst:432 ../../../library/stdtypes.rst:1015 -#: ../../../library/stdtypes.rst:1237 ../../../library/stdtypes.rst:3138 -#: ../../../library/stdtypes.rst:4422 +#: ../../../library/stdtypes.rst:1237 ../../../library/stdtypes.rst:3159 +#: ../../../library/stdtypes.rst:4452 msgid "Notes" msgstr "" @@ -131,7 +131,7 @@ msgstr "" #: ../../../library/stdtypes.rst:90 ../../../library/stdtypes.rst:1017 #: ../../../library/stdtypes.rst:1020 ../../../library/stdtypes.rst:1252 -#: ../../../library/stdtypes.rst:3144 ../../../library/stdtypes.rst:4428 +#: ../../../library/stdtypes.rst:3165 ../../../library/stdtypes.rst:4458 msgid "\\(1)" msgstr "" @@ -145,8 +145,8 @@ msgstr "" #: ../../../library/stdtypes.rst:93 ../../../library/stdtypes.rst:305 #: ../../../library/stdtypes.rst:325 ../../../library/stdtypes.rst:1263 -#: ../../../library/stdtypes.rst:3148 ../../../library/stdtypes.rst:3150 -#: ../../../library/stdtypes.rst:4432 ../../../library/stdtypes.rst:4434 +#: ../../../library/stdtypes.rst:3169 ../../../library/stdtypes.rst:3171 +#: ../../../library/stdtypes.rst:4462 ../../../library/stdtypes.rst:4464 msgid "\\(2)" msgstr "" @@ -158,18 +158,18 @@ msgstr "" msgid "if *x* is false, then ``True``, else ``False``" msgstr "" -#: ../../../library/stdtypes.rst:96 ../../../library/stdtypes.rst:3152 -#: ../../../library/stdtypes.rst:3154 ../../../library/stdtypes.rst:3156 -#: ../../../library/stdtypes.rst:3158 ../../../library/stdtypes.rst:4436 -#: ../../../library/stdtypes.rst:4438 ../../../library/stdtypes.rst:4440 -#: ../../../library/stdtypes.rst:4442 +#: ../../../library/stdtypes.rst:96 ../../../library/stdtypes.rst:3173 +#: ../../../library/stdtypes.rst:3175 ../../../library/stdtypes.rst:3177 +#: ../../../library/stdtypes.rst:3179 ../../../library/stdtypes.rst:4466 +#: ../../../library/stdtypes.rst:4468 ../../../library/stdtypes.rst:4470 +#: ../../../library/stdtypes.rst:4472 msgid "\\(3)" msgstr "" #: ../../../library/stdtypes.rst:105 ../../../library/stdtypes.rst:336 #: ../../../library/stdtypes.rst:450 ../../../library/stdtypes.rst:1059 -#: ../../../library/stdtypes.rst:1267 ../../../library/stdtypes.rst:3184 -#: ../../../library/stdtypes.rst:4472 +#: ../../../library/stdtypes.rst:1267 ../../../library/stdtypes.rst:3209 +#: ../../../library/stdtypes.rst:4502 msgid "Notes:" msgstr "" @@ -208,9 +208,9 @@ msgstr "" msgid "This table summarizes the comparison operations:" msgstr "" -#: ../../../library/stdtypes.rst:146 ../../../library/stdtypes.rst:3115 -#: ../../../library/stdtypes.rst:3138 ../../../library/stdtypes.rst:4399 -#: ../../../library/stdtypes.rst:4422 +#: ../../../library/stdtypes.rst:146 ../../../library/stdtypes.rst:3136 +#: ../../../library/stdtypes.rst:3159 ../../../library/stdtypes.rst:4429 +#: ../../../library/stdtypes.rst:4452 msgid "Meaning" msgstr "" @@ -519,8 +519,8 @@ msgid "" "zero." msgstr "" -#: ../../../library/stdtypes.rst:318 ../../../library/stdtypes.rst:3146 -#: ../../../library/stdtypes.rst:4459 +#: ../../../library/stdtypes.rst:318 ../../../library/stdtypes.rst:3167 +#: ../../../library/stdtypes.rst:4489 msgid "\\(6)" msgstr "" @@ -557,9 +557,9 @@ msgid "*x* to the power *y*" msgstr "" #: ../../../library/stdtypes.rst:327 ../../../library/stdtypes.rst:329 -#: ../../../library/stdtypes.rst:3171 ../../../library/stdtypes.rst:3174 -#: ../../../library/stdtypes.rst:3177 ../../../library/stdtypes.rst:4455 -#: ../../../library/stdtypes.rst:4462 +#: ../../../library/stdtypes.rst:3192 ../../../library/stdtypes.rst:3195 +#: ../../../library/stdtypes.rst:3198 ../../../library/stdtypes.rst:4485 +#: ../../../library/stdtypes.rst:4492 msgid "\\(5)" msgstr "" @@ -697,9 +697,9 @@ msgid "bitwise :dfn:`or` of *x* and *y*" msgstr "" #: ../../../library/stdtypes.rst:434 ../../../library/stdtypes.rst:437 -#: ../../../library/stdtypes.rst:440 ../../../library/stdtypes.rst:3160 -#: ../../../library/stdtypes.rst:3164 ../../../library/stdtypes.rst:4444 -#: ../../../library/stdtypes.rst:4448 +#: ../../../library/stdtypes.rst:440 ../../../library/stdtypes.rst:3181 +#: ../../../library/stdtypes.rst:3185 ../../../library/stdtypes.rst:4474 +#: ../../../library/stdtypes.rst:4478 msgid "\\(4)" msgstr "" @@ -1662,7 +1662,7 @@ msgstr "" #: ../../../library/stdtypes.rst:1289 msgid "" -"Append *value* to the end of the sequence This is equivalent to writing " +"Append *value* to the end of the sequence. This is equivalent to writing " "``seq[len(seq):len(seq)] = [value]``." msgstr "" @@ -2612,7 +2612,7 @@ msgstr "" msgid "Return the string encoded to :class:`bytes`." msgstr "" -#: ../../../library/stdtypes.rst:1917 ../../../library/stdtypes.rst:3598 +#: ../../../library/stdtypes.rst:1917 ../../../library/stdtypes.rst:3628 msgid "" "*encoding* defaults to ``'utf-8'``; see :ref:`standard-encodings` for " "possible values." @@ -2634,11 +2634,11 @@ msgid "" "ref:`debug build ` is used. For example::" msgstr "" -#: ../../../library/stdtypes.rst:1940 ../../../library/stdtypes.rst:3617 +#: ../../../library/stdtypes.rst:1940 ../../../library/stdtypes.rst:3647 msgid "Added support for keyword arguments." msgstr "" -#: ../../../library/stdtypes.rst:1943 ../../../library/stdtypes.rst:3620 +#: ../../../library/stdtypes.rst:1943 ../../../library/stdtypes.rst:3650 msgid "" "The value of the *errors* argument is now checked in :ref:`devmode` and in :" "ref:`debug mode `." @@ -2853,28 +2853,37 @@ msgid "" "C), except the ASCII space." msgstr "" -#: ../../../library/stdtypes.rst:2241 ../../../library/stdtypes.rst:2268 -#: ../../../library/stdtypes.rst:2323 ../../../library/stdtypes.rst:2396 -#: ../../../library/stdtypes.rst:2507 ../../../library/stdtypes.rst:2528 -#: ../../../library/stdtypes.rst:2707 ../../../library/stdtypes.rst:2729 -#: ../../../library/stdtypes.rst:2743 ../../../library/stdtypes.rst:2844 +#: ../../../library/stdtypes.rst:2241 ../../../library/stdtypes.rst:2258 +#: ../../../library/stdtypes.rst:2285 ../../../library/stdtypes.rst:2340 +#: ../../../library/stdtypes.rst:2417 ../../../library/stdtypes.rst:2528 +#: ../../../library/stdtypes.rst:2549 ../../../library/stdtypes.rst:2728 +#: ../../../library/stdtypes.rst:2750 ../../../library/stdtypes.rst:2764 +#: ../../../library/stdtypes.rst:2865 msgid "For example:" msgstr "" -#: ../../../library/stdtypes.rst:2253 +#: ../../../library/stdtypes.rst:2250 +msgid "See also :meth:`isspace`." +msgstr "" + +#: ../../../library/stdtypes.rst:2255 msgid "" "Return ``True`` if there are only whitespace characters in the string and " "there is at least one character, ``False`` otherwise." msgstr "" -#: ../../../library/stdtypes.rst:2256 +#: ../../../library/stdtypes.rst:2271 msgid "" "A character is *whitespace* if in the Unicode character database (see :mod:" "`unicodedata`), either its general category is ``Zs`` (\"Separator, " "space\"), or its bidirectional class is one of ``WS``, ``B``, or ``S``." msgstr "" -#: ../../../library/stdtypes.rst:2264 +#: ../../../library/stdtypes.rst:2276 +msgid "See also :meth:`isprintable`." +msgstr "" + +#: ../../../library/stdtypes.rst:2281 msgid "" "Return ``True`` if the string is a titlecased string and there is at least " "one character, for example uppercase characters may only follow uncased " @@ -2882,17 +2891,17 @@ msgid "" "otherwise." msgstr "" -#: ../../../library/stdtypes.rst:2279 +#: ../../../library/stdtypes.rst:2296 msgid "See also :meth:`title`." msgstr "" -#: ../../../library/stdtypes.rst:2284 +#: ../../../library/stdtypes.rst:2301 msgid "" "Return ``True`` if all cased characters [4]_ in the string are uppercase and " "there is at least one cased character, ``False`` otherwise." msgstr "" -#: ../../../library/stdtypes.rst:2302 +#: ../../../library/stdtypes.rst:2319 msgid "" "Return a string which is the concatenation of the strings in *iterable*. A :" "exc:`TypeError` will be raised if there are any non-string values in " @@ -2900,35 +2909,35 @@ msgid "" "elements is the string providing this method. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2314 +#: ../../../library/stdtypes.rst:2331 msgid "See also :meth:`split`." msgstr "" -#: ../../../library/stdtypes.rst:2319 +#: ../../../library/stdtypes.rst:2336 msgid "" "Return the string left justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:2334 ../../../library/stdtypes.rst:2853 +#: ../../../library/stdtypes.rst:2351 ../../../library/stdtypes.rst:2874 msgid "See also :meth:`rjust`." msgstr "" -#: ../../../library/stdtypes.rst:2339 +#: ../../../library/stdtypes.rst:2356 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "lowercase. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2347 +#: ../../../library/stdtypes.rst:2364 msgid "" "The lowercasing algorithm used is `described in section 3.13.2 'Default Case " "Conversion' of the Unicode Standard `__." msgstr "" -#: ../../../library/stdtypes.rst:2354 +#: ../../../library/stdtypes.rst:2371 msgid "" "Return a copy of the string with leading characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -2937,19 +2946,19 @@ msgid "" "are stripped::" msgstr "" -#: ../../../library/stdtypes.rst:2364 +#: ../../../library/stdtypes.rst:2381 msgid "" "See :meth:`str.removeprefix` for a method that will remove a single prefix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../../library/stdtypes.rst:2376 +#: ../../../library/stdtypes.rst:2393 msgid "" "This static method returns a translation table usable for :meth:`str." "translate`." msgstr "" -#: ../../../library/stdtypes.rst:2378 +#: ../../../library/stdtypes.rst:2395 msgid "" "If there is only one argument, it must be a dictionary mapping Unicode " "ordinals (integers) or characters (strings of length 1) to Unicode ordinals, " @@ -2957,7 +2966,7 @@ msgid "" "converted to ordinals." msgstr "" -#: ../../../library/stdtypes.rst:2383 +#: ../../../library/stdtypes.rst:2400 msgid "" "If there are two arguments, they must be strings of equal length, and in the " "resulting dictionary, each character in *from* will be mapped to the " @@ -2965,7 +2974,11 @@ msgid "" "must be a string, whose characters will be mapped to ``None`` in the result." msgstr "" -#: ../../../library/stdtypes.rst:2391 +#: ../../../library/stdtypes.rst:2407 +msgid "*dict* can now be a :class:`frozendict`." +msgstr "" + +#: ../../../library/stdtypes.rst:2412 msgid "" "Split the string at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -2973,32 +2986,32 @@ msgid "" "containing the string itself, followed by two empty strings." msgstr "" -#: ../../../library/stdtypes.rst:2407 +#: ../../../library/stdtypes.rst:2428 msgid "See also :meth:`rpartition`." msgstr "" -#: ../../../library/stdtypes.rst:2412 +#: ../../../library/stdtypes.rst:2433 msgid "" "If the string starts with the *prefix* string, return " "``string[len(prefix):]``. Otherwise, return a copy of the original string:" msgstr "" -#: ../../../library/stdtypes.rst:2425 +#: ../../../library/stdtypes.rst:2446 msgid "See also :meth:`removesuffix` and :meth:`startswith`." msgstr "" -#: ../../../library/stdtypes.rst:2430 +#: ../../../library/stdtypes.rst:2451 msgid "" "If the string ends with the *suffix* string and that *suffix* is not empty, " "return ``string[:-len(suffix)]``. Otherwise, return a copy of the original " "string:" msgstr "" -#: ../../../library/stdtypes.rst:2443 +#: ../../../library/stdtypes.rst:2464 msgid "See also :meth:`removeprefix` and :meth:`endswith`." msgstr "" -#: ../../../library/stdtypes.rst:2448 +#: ../../../library/stdtypes.rst:2469 msgid "" "Return a copy of the string with all occurrences of substring *old* replaced " "by *new*. If *count* is given, only the first *count* occurrences are " @@ -3006,11 +3019,11 @@ msgid "" "replaced. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2460 +#: ../../../library/stdtypes.rst:2481 msgid "*count* is now supported as a keyword argument." msgstr "" -#: ../../../library/stdtypes.rst:2466 +#: ../../../library/stdtypes.rst:2487 msgid "" "Return the highest index in the string where substring *sub* is found, such " "that *sub* is contained within ``s[start:end]``. Optional arguments *start* " @@ -3018,32 +3031,32 @@ msgid "" "For example:" msgstr "" -#: ../../../library/stdtypes.rst:2478 +#: ../../../library/stdtypes.rst:2499 msgid "See also :meth:`find` and :meth:`rindex`." msgstr "" -#: ../../../library/stdtypes.rst:2483 +#: ../../../library/stdtypes.rst:2504 msgid "" "Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is " "not found. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2498 +#: ../../../library/stdtypes.rst:2519 msgid "See also :meth:`index` and :meth:`find`." msgstr "" -#: ../../../library/stdtypes.rst:2503 +#: ../../../library/stdtypes.rst:2524 msgid "" "Return the string right justified in a string of length *width*. Padding is " "done using the specified *fillchar* (default is an ASCII space). The " "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:2518 +#: ../../../library/stdtypes.rst:2539 msgid "See also :meth:`ljust` and :meth:`zfill`." msgstr "" -#: ../../../library/stdtypes.rst:2523 +#: ../../../library/stdtypes.rst:2544 msgid "" "Split the string at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself, and the part " @@ -3051,11 +3064,11 @@ msgid "" "containing two empty strings, followed by the string itself." msgstr "" -#: ../../../library/stdtypes.rst:2539 +#: ../../../library/stdtypes.rst:2560 msgid "See also :meth:`partition`." msgstr "" -#: ../../../library/stdtypes.rst:2544 +#: ../../../library/stdtypes.rst:2565 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done, the " @@ -3064,7 +3077,7 @@ msgid "" "behaves like :meth:`split` which is described in detail below." msgstr "" -#: ../../../library/stdtypes.rst:2553 +#: ../../../library/stdtypes.rst:2574 msgid "" "Return a copy of the string with trailing characters removed. The *chars* " "argument is a string specifying the set of characters to be removed. If " @@ -3073,17 +3086,17 @@ msgid "" "are stripped. For example:" msgstr "" -#: ../../../library/stdtypes.rst:2566 +#: ../../../library/stdtypes.rst:2587 msgid "" "See :meth:`removesuffix` for a method that will remove a single suffix " "string rather than all of a set of characters. For example::" msgstr "" -#: ../../../library/stdtypes.rst:2574 +#: ../../../library/stdtypes.rst:2595 msgid "See also :meth:`strip`." msgstr "" -#: ../../../library/stdtypes.rst:2579 +#: ../../../library/stdtypes.rst:2600 msgid "" "Return a list of the words in the string, using *sep* as the delimiter " "string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, " @@ -3092,7 +3105,7 @@ msgid "" "possible splits are made)." msgstr "" -#: ../../../library/stdtypes.rst:2585 +#: ../../../library/stdtypes.rst:2606 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " @@ -3102,20 +3115,20 @@ msgid "" "``['']``." msgstr "" -#: ../../../library/stdtypes.rst:2592 ../../../library/stdtypes.rst:2610 -#: ../../../library/stdtypes.rst:2622 ../../../library/stdtypes.rst:2676 -#: ../../../library/stdtypes.rst:2766 ../../../library/stdtypes.rst:2943 -#: ../../../library/stdtypes.rst:3933 ../../../library/stdtypes.rst:3951 -#: ../../../library/stdtypes.rst:4041 ../../../library/stdtypes.rst:4057 -#: ../../../library/stdtypes.rst:4082 ../../../library/stdtypes.rst:4096 -#: ../../../library/stdtypes.rst:4124 ../../../library/stdtypes.rst:4138 -#: ../../../library/stdtypes.rst:4156 ../../../library/stdtypes.rst:4183 -#: ../../../library/stdtypes.rst:4206 ../../../library/stdtypes.rst:4233 -#: ../../../library/stdtypes.rst:4275 ../../../library/stdtypes.rst:4299 +#: ../../../library/stdtypes.rst:2613 ../../../library/stdtypes.rst:2631 +#: ../../../library/stdtypes.rst:2643 ../../../library/stdtypes.rst:2697 +#: ../../../library/stdtypes.rst:2787 ../../../library/stdtypes.rst:2964 +#: ../../../library/stdtypes.rst:3963 ../../../library/stdtypes.rst:3981 +#: ../../../library/stdtypes.rst:4071 ../../../library/stdtypes.rst:4087 +#: ../../../library/stdtypes.rst:4112 ../../../library/stdtypes.rst:4126 +#: ../../../library/stdtypes.rst:4154 ../../../library/stdtypes.rst:4168 +#: ../../../library/stdtypes.rst:4186 ../../../library/stdtypes.rst:4213 +#: ../../../library/stdtypes.rst:4236 ../../../library/stdtypes.rst:4263 +#: ../../../library/stdtypes.rst:4305 ../../../library/stdtypes.rst:4329 msgid "For example::" msgstr "" -#: ../../../library/stdtypes.rst:2603 +#: ../../../library/stdtypes.rst:2624 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive whitespace are regarded as a single separator, " @@ -3125,141 +3138,141 @@ msgid "" "returns ``[]``." msgstr "" -#: ../../../library/stdtypes.rst:2619 +#: ../../../library/stdtypes.rst:2640 msgid "" "If *sep* is not specified or is ``None`` and *maxsplit* is ``0``, only " "leading runs of consecutive whitespace are considered." msgstr "" -#: ../../../library/stdtypes.rst:2631 +#: ../../../library/stdtypes.rst:2652 msgid "See also :meth:`join`." msgstr "" -#: ../../../library/stdtypes.rst:2639 +#: ../../../library/stdtypes.rst:2660 msgid "" "Return a list of the lines in the string, breaking at line boundaries. Line " "breaks are not included in the resulting list unless *keepends* is given and " "true." msgstr "" -#: ../../../library/stdtypes.rst:2643 +#: ../../../library/stdtypes.rst:2664 msgid "" "This method splits on the following line boundaries. In particular, the " "boundaries are a superset of :term:`universal newlines`." msgstr "" -#: ../../../library/stdtypes.rst:2647 +#: ../../../library/stdtypes.rst:2668 msgid "Representation" msgstr "" -#: ../../../library/stdtypes.rst:2647 +#: ../../../library/stdtypes.rst:2668 msgid "Description" msgstr "" -#: ../../../library/stdtypes.rst:2649 +#: ../../../library/stdtypes.rst:2670 msgid "``\\n``" msgstr "" -#: ../../../library/stdtypes.rst:2649 +#: ../../../library/stdtypes.rst:2670 msgid "Line Feed" msgstr "" -#: ../../../library/stdtypes.rst:2651 +#: ../../../library/stdtypes.rst:2672 msgid "``\\r``" msgstr "" -#: ../../../library/stdtypes.rst:2651 +#: ../../../library/stdtypes.rst:2672 msgid "Carriage Return" msgstr "" -#: ../../../library/stdtypes.rst:2653 +#: ../../../library/stdtypes.rst:2674 msgid "``\\r\\n``" msgstr "" -#: ../../../library/stdtypes.rst:2653 +#: ../../../library/stdtypes.rst:2674 msgid "Carriage Return + Line Feed" msgstr "" -#: ../../../library/stdtypes.rst:2655 +#: ../../../library/stdtypes.rst:2676 msgid "``\\v`` or ``\\x0b``" msgstr "" -#: ../../../library/stdtypes.rst:2655 +#: ../../../library/stdtypes.rst:2676 msgid "Line Tabulation" msgstr "" -#: ../../../library/stdtypes.rst:2657 +#: ../../../library/stdtypes.rst:2678 msgid "``\\f`` or ``\\x0c``" msgstr "" -#: ../../../library/stdtypes.rst:2657 +#: ../../../library/stdtypes.rst:2678 msgid "Form Feed" msgstr "" -#: ../../../library/stdtypes.rst:2659 +#: ../../../library/stdtypes.rst:2680 msgid "``\\x1c``" msgstr "" -#: ../../../library/stdtypes.rst:2659 +#: ../../../library/stdtypes.rst:2680 msgid "File Separator" msgstr "" -#: ../../../library/stdtypes.rst:2661 +#: ../../../library/stdtypes.rst:2682 msgid "``\\x1d``" msgstr "" -#: ../../../library/stdtypes.rst:2661 +#: ../../../library/stdtypes.rst:2682 msgid "Group Separator" msgstr "" -#: ../../../library/stdtypes.rst:2663 +#: ../../../library/stdtypes.rst:2684 msgid "``\\x1e``" msgstr "" -#: ../../../library/stdtypes.rst:2663 +#: ../../../library/stdtypes.rst:2684 msgid "Record Separator" msgstr "" -#: ../../../library/stdtypes.rst:2665 +#: ../../../library/stdtypes.rst:2686 msgid "``\\x85``" msgstr "" -#: ../../../library/stdtypes.rst:2665 +#: ../../../library/stdtypes.rst:2686 msgid "Next Line (C1 Control Code)" msgstr "" -#: ../../../library/stdtypes.rst:2667 +#: ../../../library/stdtypes.rst:2688 msgid "``\\u2028``" msgstr "" -#: ../../../library/stdtypes.rst:2667 +#: ../../../library/stdtypes.rst:2688 msgid "Line Separator" msgstr "" -#: ../../../library/stdtypes.rst:2669 +#: ../../../library/stdtypes.rst:2690 msgid "``\\u2029``" msgstr "" -#: ../../../library/stdtypes.rst:2669 +#: ../../../library/stdtypes.rst:2690 msgid "Paragraph Separator" msgstr "" -#: ../../../library/stdtypes.rst:2674 +#: ../../../library/stdtypes.rst:2695 msgid "``\\v`` and ``\\f`` added to list of line boundaries." msgstr "" -#: ../../../library/stdtypes.rst:2683 +#: ../../../library/stdtypes.rst:2704 msgid "" "Unlike :meth:`~str.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../../library/stdtypes.rst:2692 +#: ../../../library/stdtypes.rst:2713 msgid "For comparison, ``split('\\n')`` gives::" msgstr "" -#: ../../../library/stdtypes.rst:2702 +#: ../../../library/stdtypes.rst:2723 msgid "" "Return ``True`` if string starts with the *prefix*, otherwise return " "``False``. *prefix* can also be a tuple of prefixes to look for. With " @@ -3267,11 +3280,11 @@ msgid "" "*end*, stop comparing string at that position." msgstr "" -#: ../../../library/stdtypes.rst:2718 +#: ../../../library/stdtypes.rst:2739 msgid "See also :meth:`endswith` and :meth:`removeprefix`." msgstr "" -#: ../../../library/stdtypes.rst:2723 +#: ../../../library/stdtypes.rst:2744 msgid "" "Return a copy of the string with the leading and trailing characters " "removed. The *chars* argument is a string specifying the set of characters " @@ -3280,7 +3293,7 @@ msgid "" "all combinations of its values are stripped." msgstr "" -#: ../../../library/stdtypes.rst:2738 +#: ../../../library/stdtypes.rst:2759 msgid "" "The outermost leading and trailing *chars* argument values are stripped from " "the string. Characters are removed from the leading end until reaching a " @@ -3288,24 +3301,24 @@ msgid "" "A similar action takes place on the trailing end." msgstr "" -#: ../../../library/stdtypes.rst:2751 +#: ../../../library/stdtypes.rst:2772 msgid "See also :meth:`rstrip`." msgstr "" -#: ../../../library/stdtypes.rst:2756 +#: ../../../library/stdtypes.rst:2777 msgid "" "Return a copy of the string with uppercase characters converted to lowercase " "and vice versa. Note that it is not necessarily true that ``s.swapcase()." "swapcase() == s``." msgstr "" -#: ../../../library/stdtypes.rst:2763 +#: ../../../library/stdtypes.rst:2784 msgid "" "Return a titlecased version of the string where words start with an " "uppercase character and the remaining characters are lowercase." msgstr "" -#: ../../../library/stdtypes.rst:2771 ../../../library/stdtypes.rst:4243 +#: ../../../library/stdtypes.rst:2792 ../../../library/stdtypes.rst:4273 msgid "" "The algorithm uses a simple language-independent definition of a word as " "groups of consecutive letters. The definition works in many contexts but it " @@ -3313,23 +3326,23 @@ msgid "" "which may not be the desired result::" msgstr "" -#: ../../../library/stdtypes.rst:2779 +#: ../../../library/stdtypes.rst:2800 msgid "" "The :func:`string.capwords` function does not have this problem, as it " "splits words on spaces only." msgstr "" -#: ../../../library/stdtypes.rst:2782 +#: ../../../library/stdtypes.rst:2803 msgid "" "Alternatively, a workaround for apostrophes can be constructed using regular " "expressions::" msgstr "" -#: ../../../library/stdtypes.rst:2794 +#: ../../../library/stdtypes.rst:2815 msgid "See also :meth:`istitle`." msgstr "" -#: ../../../library/stdtypes.rst:2799 +#: ../../../library/stdtypes.rst:2820 msgid "" "Return a copy of the string in which each character has been mapped through " "the given translation table. The table must be an object that implements " @@ -3341,25 +3354,25 @@ msgid "" "exception, to map the character to itself." msgstr "" -#: ../../../library/stdtypes.rst:2808 +#: ../../../library/stdtypes.rst:2829 msgid "" "You can use :meth:`str.maketrans` to create a translation map from character-" "to-character mappings in different formats." msgstr "" -#: ../../../library/stdtypes.rst:2811 +#: ../../../library/stdtypes.rst:2832 msgid "" "The following example uses a mapping to replace ``'a'`` with ``'X'``, " "``'b'`` with ``'Y'``, and delete ``'c'``:" msgstr "" -#: ../../../library/stdtypes.rst:2819 +#: ../../../library/stdtypes.rst:2840 msgid "" "See also the :mod:`codecs` module for a more flexible approach to custom " "character mappings." msgstr "" -#: ../../../library/stdtypes.rst:2825 +#: ../../../library/stdtypes.rst:2846 msgid "" "Return a copy of the string with all the cased characters [4]_ converted to " "uppercase. Note that ``s.upper().isupper()`` might be ``False`` if ``s`` " @@ -3368,14 +3381,14 @@ msgid "" "titlecase)." msgstr "" -#: ../../../library/stdtypes.rst:2831 +#: ../../../library/stdtypes.rst:2852 msgid "" "The uppercasing algorithm used is `described in section 3.13.2 'Default Case " "Conversion' of the Unicode Standard `__." msgstr "" -#: ../../../library/stdtypes.rst:2838 +#: ../../../library/stdtypes.rst:2859 msgid "" "Return a copy of the string left filled with ASCII ``'0'`` digits to make a " "string of length *width*. A leading sign prefix (``'+'``/``'-'``) is handled " @@ -3383,27 +3396,27 @@ msgid "" "original string is returned if *width* is less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:2873 +#: ../../../library/stdtypes.rst:2894 msgid "Formatted String Literals (f-strings)" msgstr "" -#: ../../../library/stdtypes.rst:2876 +#: ../../../library/stdtypes.rst:2897 msgid "" "The :keyword:`await` and :keyword:`async for` can be used in expressions " "within f-strings." msgstr "" -#: ../../../library/stdtypes.rst:2879 +#: ../../../library/stdtypes.rst:2900 msgid "Added the debug specifier (``=``)" msgstr "" -#: ../../../library/stdtypes.rst:2881 +#: ../../../library/stdtypes.rst:2902 msgid "" "Many restrictions on expressions within f-strings have been removed. " "Notably, nested strings, comments, and backslashes are now permitted." msgstr "" -#: ../../../library/stdtypes.rst:2885 +#: ../../../library/stdtypes.rst:2906 msgid "" "An :dfn:`f-string` (formally a :dfn:`formatted string literal`) is a string " "literal that is prefixed with ``f`` or ``F``. This type of string literal " @@ -3412,29 +3425,29 @@ msgid "" "replacement field must contain an expression, optionally followed by:" msgstr "" -#: ../../../library/stdtypes.rst:2892 +#: ../../../library/stdtypes.rst:2913 msgid "a *debug specifier* -- an equal sign (``=``);" msgstr "" -#: ../../../library/stdtypes.rst:2893 +#: ../../../library/stdtypes.rst:2914 msgid "a *conversion specifier* -- ``!s``, ``!r`` or ``!a``; and/or" msgstr "" -#: ../../../library/stdtypes.rst:2894 +#: ../../../library/stdtypes.rst:2915 msgid "a *format specifier* prefixed with a colon (``:``)." msgstr "" -#: ../../../library/stdtypes.rst:2896 +#: ../../../library/stdtypes.rst:2917 msgid "" "See the :ref:`Lexical Analysis section on f-strings ` for details " "on the syntax of these fields." msgstr "" -#: ../../../library/stdtypes.rst:2900 +#: ../../../library/stdtypes.rst:2921 msgid "Debug specifier" msgstr "" -#: ../../../library/stdtypes.rst:2904 +#: ../../../library/stdtypes.rst:2925 msgid "" "If a debug specifier -- an equal sign (``=``) -- appears after the " "replacement field expression, the resulting f-string will contain the " @@ -3442,50 +3455,50 @@ msgid "" "is often useful for debugging::" msgstr "" -#: ../../../library/stdtypes.rst:2913 +#: ../../../library/stdtypes.rst:2934 msgid "" "Whitespace before, inside and after the expression, as well as whitespace " "after the equal sign, is significant --- it is retained in the result::" msgstr "" -#: ../../../library/stdtypes.rst:2921 +#: ../../../library/stdtypes.rst:2942 msgid "Conversion specifier" msgstr "" -#: ../../../library/stdtypes.rst:2923 +#: ../../../library/stdtypes.rst:2944 msgid "" "By default, the value of a replacement field expression is converted to a " "string using :func:`str`::" msgstr "" -#: ../../../library/stdtypes.rst:2931 +#: ../../../library/stdtypes.rst:2952 msgid "" "When a debug specifier but no format specifier is used, the default " "conversion instead uses :func:`repr`::" msgstr "" -#: ../../../library/stdtypes.rst:2937 +#: ../../../library/stdtypes.rst:2958 msgid "" "The conversion can be specified explicitly using one of these specifiers:" msgstr "" -#: ../../../library/stdtypes.rst:2939 +#: ../../../library/stdtypes.rst:2960 msgid "``!s`` for :func:`str`" msgstr "" -#: ../../../library/stdtypes.rst:2940 +#: ../../../library/stdtypes.rst:2961 msgid "``!r`` for :func:`repr`" msgstr "" -#: ../../../library/stdtypes.rst:2941 +#: ../../../library/stdtypes.rst:2962 msgid "``!a`` for :func:`ascii`" msgstr "" -#: ../../../library/stdtypes.rst:2962 +#: ../../../library/stdtypes.rst:2983 msgid "Format specifier" msgstr "" -#: ../../../library/stdtypes.rst:2964 +#: ../../../library/stdtypes.rst:2985 msgid "" "After the expression has been evaluated, and possibly converted using an " "explicit conversion specifier, it is formatted using the :func:`format` " @@ -3495,29 +3508,29 @@ msgid "" "the replacement field. For example::" msgstr "" -#: ../../../library/stdtypes.rst:2985 +#: ../../../library/stdtypes.rst:3006 msgid "Template String Literals (t-strings)" msgstr "" -#: ../../../library/stdtypes.rst:2987 +#: ../../../library/stdtypes.rst:3008 msgid "" "An :dfn:`t-string` (formally a :dfn:`template string literal`) is a string " "literal that is prefixed with ``t`` or ``T``." msgstr "" -#: ../../../library/stdtypes.rst:2990 +#: ../../../library/stdtypes.rst:3011 msgid "" "These strings follow the same syntax and evaluation rules as :ref:`formatted " "string literals `, with for the following differences:" msgstr "" -#: ../../../library/stdtypes.rst:2994 +#: ../../../library/stdtypes.rst:3015 msgid "" "Rather than evaluating to a ``str`` object, template string literals " "evaluate to a :class:`string.templatelib.Template` object." msgstr "" -#: ../../../library/stdtypes.rst:2997 +#: ../../../library/stdtypes.rst:3018 msgid "" "The :func:`format` protocol is not used. Instead, the format specifier and " "conversions (if any) are passed to a new :class:`~string.templatelib." @@ -3526,7 +3539,7 @@ msgid "" "Template` object to decide how to handle format specifiers and conversions." msgstr "" -#: ../../../library/stdtypes.rst:3004 +#: ../../../library/stdtypes.rst:3025 msgid "" "Format specifiers containing nested replacement fields are evaluated " "eagerly, prior to being passed to the :class:`~string.templatelib." @@ -3536,7 +3549,7 @@ msgid "" "to be ``2``, the resulting format specifier would be ``'.2f'``." msgstr "" -#: ../../../library/stdtypes.rst:3012 +#: ../../../library/stdtypes.rst:3033 msgid "" "When the equals sign ``'='`` is provided in an interpolation expression, the " "text of the expression is appended to the literal string that precedes the " @@ -3548,18 +3561,18 @@ msgid "" "behaviour." msgstr "" -#: ../../../library/stdtypes.rst:3026 +#: ../../../library/stdtypes.rst:3047 msgid "``printf``-style String Formatting" msgstr "" -#: ../../../library/stdtypes.rst:3039 +#: ../../../library/stdtypes.rst:3060 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " "dictionaries correctly)." msgstr "" -#: ../../../library/stdtypes.rst:3043 +#: ../../../library/stdtypes.rst:3064 msgid "" "Using :ref:`formatted string literals `, the :meth:`str.format` " "interface, or :class:`string.Template` may help avoid these errors. Each of " @@ -3567,7 +3580,7 @@ msgid "" "flexibility, and/or extensibility." msgstr "" -#: ../../../library/stdtypes.rst:3048 +#: ../../../library/stdtypes.rst:3069 msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -3577,7 +3590,7 @@ msgid "" "function in the C language. For example:" msgstr "" -#: ../../../library/stdtypes.rst:3060 +#: ../../../library/stdtypes.rst:3081 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -3585,36 +3598,36 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../../library/stdtypes.rst:3070 ../../../library/stdtypes.rst:4354 +#: ../../../library/stdtypes.rst:3091 ../../../library/stdtypes.rst:4384 msgid "" "A conversion specifier contains two or more characters and has the following " "components, which must occur in this order:" msgstr "" -#: ../../../library/stdtypes.rst:3073 ../../../library/stdtypes.rst:4357 +#: ../../../library/stdtypes.rst:3094 ../../../library/stdtypes.rst:4387 msgid "The ``'%'`` character, which marks the start of the specifier." msgstr "" -#: ../../../library/stdtypes.rst:3075 ../../../library/stdtypes.rst:4359 +#: ../../../library/stdtypes.rst:3096 ../../../library/stdtypes.rst:4389 msgid "" "Mapping key (optional), consisting of a parenthesised sequence of characters " "(for example, ``(somename)``)." msgstr "" -#: ../../../library/stdtypes.rst:3078 ../../../library/stdtypes.rst:4362 +#: ../../../library/stdtypes.rst:3099 ../../../library/stdtypes.rst:4392 msgid "" "Conversion flags (optional), which affect the result of some conversion " "types." msgstr "" -#: ../../../library/stdtypes.rst:3081 ../../../library/stdtypes.rst:4365 +#: ../../../library/stdtypes.rst:3102 ../../../library/stdtypes.rst:4395 msgid "" "Minimum field width (optional). If specified as an ``'*'`` (asterisk), the " "actual width is read from the next element of the tuple in *values*, and the " "object to convert comes after the minimum field width and optional precision." msgstr "" -#: ../../../library/stdtypes.rst:3085 ../../../library/stdtypes.rst:4369 +#: ../../../library/stdtypes.rst:3106 ../../../library/stdtypes.rst:4399 msgid "" "Precision (optional), given as a ``'.'`` (dot) followed by the precision. " "If specified as ``'*'`` (an asterisk), the actual precision is read from the " @@ -3622,15 +3635,15 @@ msgid "" "the precision." msgstr "" -#: ../../../library/stdtypes.rst:3090 ../../../library/stdtypes.rst:4374 +#: ../../../library/stdtypes.rst:3111 ../../../library/stdtypes.rst:4404 msgid "Length modifier (optional)." msgstr "" -#: ../../../library/stdtypes.rst:3092 ../../../library/stdtypes.rst:4376 +#: ../../../library/stdtypes.rst:3113 ../../../library/stdtypes.rst:4406 msgid "Conversion type." msgstr "" -#: ../../../library/stdtypes.rst:3094 +#: ../../../library/stdtypes.rst:3115 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the string *must* include a parenthesised mapping key into that " @@ -3638,279 +3651,286 @@ msgid "" "selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../../library/stdtypes.rst:3103 ../../../library/stdtypes.rst:4387 +#: ../../../library/stdtypes.rst:3124 ../../../library/stdtypes.rst:4417 msgid "" "In this case no ``*`` specifiers may occur in a format (since they require a " "sequential parameter list)." msgstr "" -#: ../../../library/stdtypes.rst:3106 ../../../library/stdtypes.rst:4390 +#: ../../../library/stdtypes.rst:3127 ../../../library/stdtypes.rst:4420 msgid "The conversion flag characters are:" msgstr "" -#: ../../../library/stdtypes.rst:3115 ../../../library/stdtypes.rst:4399 +#: ../../../library/stdtypes.rst:3136 ../../../library/stdtypes.rst:4429 msgid "Flag" msgstr "" -#: ../../../library/stdtypes.rst:3117 ../../../library/stdtypes.rst:4401 +#: ../../../library/stdtypes.rst:3138 ../../../library/stdtypes.rst:4431 msgid "``'#'``" msgstr "" -#: ../../../library/stdtypes.rst:3117 ../../../library/stdtypes.rst:4401 +#: ../../../library/stdtypes.rst:3138 ../../../library/stdtypes.rst:4431 msgid "" "The value conversion will use the \"alternate form\" (where defined below)." msgstr "" -#: ../../../library/stdtypes.rst:3120 ../../../library/stdtypes.rst:4404 +#: ../../../library/stdtypes.rst:3141 ../../../library/stdtypes.rst:4434 msgid "``'0'``" msgstr "" -#: ../../../library/stdtypes.rst:3120 ../../../library/stdtypes.rst:4404 +#: ../../../library/stdtypes.rst:3141 ../../../library/stdtypes.rst:4434 msgid "The conversion will be zero padded for numeric values." msgstr "" -#: ../../../library/stdtypes.rst:3122 ../../../library/stdtypes.rst:4406 +#: ../../../library/stdtypes.rst:3143 ../../../library/stdtypes.rst:4436 msgid "``'-'``" msgstr "" -#: ../../../library/stdtypes.rst:3122 ../../../library/stdtypes.rst:4406 +#: ../../../library/stdtypes.rst:3143 ../../../library/stdtypes.rst:4436 msgid "" "The converted value is left adjusted (overrides the ``'0'`` conversion if " "both are given)." msgstr "" -#: ../../../library/stdtypes.rst:3125 ../../../library/stdtypes.rst:4409 +#: ../../../library/stdtypes.rst:3146 ../../../library/stdtypes.rst:4439 msgid "``' '``" msgstr "" -#: ../../../library/stdtypes.rst:3125 ../../../library/stdtypes.rst:4409 +#: ../../../library/stdtypes.rst:3146 ../../../library/stdtypes.rst:4439 msgid "" "(a space) A blank should be left before a positive number (or empty string) " "produced by a signed conversion." msgstr "" -#: ../../../library/stdtypes.rst:3128 ../../../library/stdtypes.rst:4412 +#: ../../../library/stdtypes.rst:3149 ../../../library/stdtypes.rst:4442 msgid "``'+'``" msgstr "" -#: ../../../library/stdtypes.rst:3128 ../../../library/stdtypes.rst:4412 +#: ../../../library/stdtypes.rst:3149 ../../../library/stdtypes.rst:4442 msgid "" "A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides " "a \"space\" flag)." msgstr "" -#: ../../../library/stdtypes.rst:3132 ../../../library/stdtypes.rst:4416 +#: ../../../library/stdtypes.rst:3153 ../../../library/stdtypes.rst:4446 msgid "" "A length modifier (``h``, ``l``, or ``L``) may be present, but is ignored as " "it is not necessary for Python -- so e.g. ``%ld`` is identical to ``%d``." msgstr "" -#: ../../../library/stdtypes.rst:3135 ../../../library/stdtypes.rst:4419 +#: ../../../library/stdtypes.rst:3156 ../../../library/stdtypes.rst:4449 msgid "The conversion types are:" msgstr "" -#: ../../../library/stdtypes.rst:3138 ../../../library/stdtypes.rst:4422 +#: ../../../library/stdtypes.rst:3159 ../../../library/stdtypes.rst:4452 msgid "Conversion" msgstr "" -#: ../../../library/stdtypes.rst:3140 ../../../library/stdtypes.rst:4424 +#: ../../../library/stdtypes.rst:3161 ../../../library/stdtypes.rst:4454 msgid "``'d'``" msgstr "" -#: ../../../library/stdtypes.rst:3140 ../../../library/stdtypes.rst:3142 -#: ../../../library/stdtypes.rst:4424 ../../../library/stdtypes.rst:4426 +#: ../../../library/stdtypes.rst:3161 ../../../library/stdtypes.rst:3163 +#: ../../../library/stdtypes.rst:4454 ../../../library/stdtypes.rst:4456 msgid "Signed integer decimal." msgstr "" -#: ../../../library/stdtypes.rst:3142 ../../../library/stdtypes.rst:4426 +#: ../../../library/stdtypes.rst:3163 ../../../library/stdtypes.rst:4456 msgid "``'i'``" msgstr "" -#: ../../../library/stdtypes.rst:3144 ../../../library/stdtypes.rst:4428 +#: ../../../library/stdtypes.rst:3165 ../../../library/stdtypes.rst:4458 msgid "``'o'``" msgstr "" -#: ../../../library/stdtypes.rst:3144 ../../../library/stdtypes.rst:4428 +#: ../../../library/stdtypes.rst:3165 ../../../library/stdtypes.rst:4458 msgid "Signed octal value." msgstr "" -#: ../../../library/stdtypes.rst:3146 ../../../library/stdtypes.rst:4430 +#: ../../../library/stdtypes.rst:3167 ../../../library/stdtypes.rst:4460 msgid "``'u'``" msgstr "" -#: ../../../library/stdtypes.rst:3146 ../../../library/stdtypes.rst:4430 +#: ../../../library/stdtypes.rst:3167 ../../../library/stdtypes.rst:4460 msgid "Obsolete type -- it is identical to ``'d'``." msgstr "" -#: ../../../library/stdtypes.rst:3148 ../../../library/stdtypes.rst:4432 +#: ../../../library/stdtypes.rst:3169 ../../../library/stdtypes.rst:4462 msgid "``'x'``" msgstr "" -#: ../../../library/stdtypes.rst:3148 ../../../library/stdtypes.rst:4432 +#: ../../../library/stdtypes.rst:3169 ../../../library/stdtypes.rst:4462 msgid "Signed hexadecimal (lowercase)." msgstr "" -#: ../../../library/stdtypes.rst:3150 ../../../library/stdtypes.rst:4434 +#: ../../../library/stdtypes.rst:3171 ../../../library/stdtypes.rst:4464 msgid "``'X'``" msgstr "" -#: ../../../library/stdtypes.rst:3150 ../../../library/stdtypes.rst:4434 +#: ../../../library/stdtypes.rst:3171 ../../../library/stdtypes.rst:4464 msgid "Signed hexadecimal (uppercase)." msgstr "" -#: ../../../library/stdtypes.rst:3152 ../../../library/stdtypes.rst:4436 +#: ../../../library/stdtypes.rst:3173 ../../../library/stdtypes.rst:4466 msgid "``'e'``" msgstr "" -#: ../../../library/stdtypes.rst:3152 ../../../library/stdtypes.rst:4436 +#: ../../../library/stdtypes.rst:3173 ../../../library/stdtypes.rst:4466 msgid "Floating-point exponential format (lowercase)." msgstr "" -#: ../../../library/stdtypes.rst:3154 ../../../library/stdtypes.rst:4438 +#: ../../../library/stdtypes.rst:3175 ../../../library/stdtypes.rst:4468 msgid "``'E'``" msgstr "" -#: ../../../library/stdtypes.rst:3154 ../../../library/stdtypes.rst:4438 +#: ../../../library/stdtypes.rst:3175 ../../../library/stdtypes.rst:4468 msgid "Floating-point exponential format (uppercase)." msgstr "" -#: ../../../library/stdtypes.rst:3156 ../../../library/stdtypes.rst:4440 +#: ../../../library/stdtypes.rst:3177 ../../../library/stdtypes.rst:4470 msgid "``'f'``" msgstr "" -#: ../../../library/stdtypes.rst:3156 ../../../library/stdtypes.rst:3158 -#: ../../../library/stdtypes.rst:4440 ../../../library/stdtypes.rst:4442 +#: ../../../library/stdtypes.rst:3177 ../../../library/stdtypes.rst:3179 +#: ../../../library/stdtypes.rst:4470 ../../../library/stdtypes.rst:4472 msgid "Floating-point decimal format." msgstr "" -#: ../../../library/stdtypes.rst:3158 ../../../library/stdtypes.rst:4442 +#: ../../../library/stdtypes.rst:3179 ../../../library/stdtypes.rst:4472 msgid "``'F'``" msgstr "" -#: ../../../library/stdtypes.rst:3160 ../../../library/stdtypes.rst:4444 +#: ../../../library/stdtypes.rst:3181 ../../../library/stdtypes.rst:4474 msgid "``'g'``" msgstr "" -#: ../../../library/stdtypes.rst:3160 ../../../library/stdtypes.rst:4444 +#: ../../../library/stdtypes.rst:3181 ../../../library/stdtypes.rst:4474 msgid "" "Floating-point format. Uses lowercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../../library/stdtypes.rst:3164 ../../../library/stdtypes.rst:4448 +#: ../../../library/stdtypes.rst:3185 ../../../library/stdtypes.rst:4478 msgid "``'G'``" msgstr "" -#: ../../../library/stdtypes.rst:3164 ../../../library/stdtypes.rst:4448 +#: ../../../library/stdtypes.rst:3185 ../../../library/stdtypes.rst:4478 msgid "" "Floating-point format. Uses uppercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -#: ../../../library/stdtypes.rst:3168 ../../../library/stdtypes.rst:4452 +#: ../../../library/stdtypes.rst:3189 ../../../library/stdtypes.rst:4482 msgid "``'c'``" msgstr "" -#: ../../../library/stdtypes.rst:3168 +#: ../../../library/stdtypes.rst:3189 msgid "Single character (accepts integer or single character string)." msgstr "" -#: ../../../library/stdtypes.rst:3171 ../../../library/stdtypes.rst:4465 +#: ../../../library/stdtypes.rst:3192 ../../../library/stdtypes.rst:4495 msgid "``'r'``" msgstr "" -#: ../../../library/stdtypes.rst:3171 +#: ../../../library/stdtypes.rst:3192 msgid "String (converts any Python object using :func:`repr`)." msgstr "" -#: ../../../library/stdtypes.rst:3174 ../../../library/stdtypes.rst:4459 +#: ../../../library/stdtypes.rst:3195 ../../../library/stdtypes.rst:4489 msgid "``'s'``" msgstr "" -#: ../../../library/stdtypes.rst:3174 +#: ../../../library/stdtypes.rst:3195 msgid "String (converts any Python object using :func:`str`)." msgstr "" -#: ../../../library/stdtypes.rst:3177 ../../../library/stdtypes.rst:4462 +#: ../../../library/stdtypes.rst:3198 ../../../library/stdtypes.rst:4492 msgid "``'a'``" msgstr "" -#: ../../../library/stdtypes.rst:3177 +#: ../../../library/stdtypes.rst:3198 msgid "String (converts any Python object using :func:`ascii`)." msgstr "" -#: ../../../library/stdtypes.rst:3180 ../../../library/stdtypes.rst:4468 +#: ../../../library/stdtypes.rst:3201 ../../../library/stdtypes.rst:4498 msgid "``'%'``" msgstr "" -#: ../../../library/stdtypes.rst:3180 ../../../library/stdtypes.rst:4468 +#: ../../../library/stdtypes.rst:3201 ../../../library/stdtypes.rst:4498 msgid "No argument is converted, results in a ``'%'`` character in the result." msgstr "" -#: ../../../library/stdtypes.rst:3187 ../../../library/stdtypes.rst:4475 +#: ../../../library/stdtypes.rst:3205 +msgid "" +"For floating-point formats, the result should be correctly rounded to a " +"given precision ``p`` of digits after the decimal point. The rounding mode " +"matches that of the :func:`round` builtin." +msgstr "" + +#: ../../../library/stdtypes.rst:3212 ../../../library/stdtypes.rst:4505 msgid "" "The alternate form causes a leading octal specifier (``'0o'``) to be " "inserted before the first digit." msgstr "" -#: ../../../library/stdtypes.rst:3191 ../../../library/stdtypes.rst:4479 +#: ../../../library/stdtypes.rst:3216 ../../../library/stdtypes.rst:4509 msgid "" "The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on " "whether the ``'x'`` or ``'X'`` format was used) to be inserted before the " "first digit." msgstr "" -#: ../../../library/stdtypes.rst:3195 ../../../library/stdtypes.rst:4483 +#: ../../../library/stdtypes.rst:3220 ../../../library/stdtypes.rst:4513 msgid "" "The alternate form causes the result to always contain a decimal point, even " "if no digits follow it." msgstr "" -#: ../../../library/stdtypes.rst:3198 ../../../library/stdtypes.rst:4486 +#: ../../../library/stdtypes.rst:3223 ../../../library/stdtypes.rst:4516 msgid "" "The precision determines the number of digits after the decimal point and " "defaults to 6." msgstr "" -#: ../../../library/stdtypes.rst:3202 ../../../library/stdtypes.rst:4490 +#: ../../../library/stdtypes.rst:3227 ../../../library/stdtypes.rst:4520 msgid "" "The alternate form causes the result to always contain a decimal point, and " "trailing zeroes are not removed as they would otherwise be." msgstr "" -#: ../../../library/stdtypes.rst:3205 ../../../library/stdtypes.rst:4493 +#: ../../../library/stdtypes.rst:3230 ../../../library/stdtypes.rst:4523 msgid "" "The precision determines the number of significant digits before and after " "the decimal point and defaults to 6." msgstr "" -#: ../../../library/stdtypes.rst:3209 ../../../library/stdtypes.rst:4497 +#: ../../../library/stdtypes.rst:3234 ../../../library/stdtypes.rst:4527 msgid "If precision is ``N``, the output is truncated to ``N`` characters." msgstr "" -#: ../../../library/stdtypes.rst:3212 ../../../library/stdtypes.rst:4506 +#: ../../../library/stdtypes.rst:3237 ../../../library/stdtypes.rst:4536 msgid "See :pep:`237`." msgstr "" -#: ../../../library/stdtypes.rst:3214 +#: ../../../library/stdtypes.rst:3239 msgid "" "Since Python strings have an explicit length, ``%s`` conversions do not " "assume that ``'\\0'`` is the end of the string." msgstr "" -#: ../../../library/stdtypes.rst:3219 +#: ../../../library/stdtypes.rst:3244 msgid "" "``%f`` conversions for numbers whose absolute value is over 1e50 are no " "longer replaced by ``%g`` conversions." msgstr "" -#: ../../../library/stdtypes.rst:3230 +#: ../../../library/stdtypes.rst:3255 msgid "" "Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:" "`memoryview`" msgstr "" -#: ../../../library/stdtypes.rst:3238 +#: ../../../library/stdtypes.rst:3263 msgid "" "The core built-in types for manipulating binary data are :class:`bytes` and :" "class:`bytearray`. They are supported by :class:`memoryview` which uses the :" @@ -3918,17 +3938,17 @@ msgid "" "objects without needing to make a copy." msgstr "" -#: ../../../library/stdtypes.rst:3243 +#: ../../../library/stdtypes.rst:3268 msgid "" "The :mod:`array` module supports efficient storage of basic data types like " "32-bit integers and IEEE754 double-precision floating values." msgstr "" -#: ../../../library/stdtypes.rst:3249 +#: ../../../library/stdtypes.rst:3274 msgid "Bytes Objects" msgstr "" -#: ../../../library/stdtypes.rst:3253 +#: ../../../library/stdtypes.rst:3278 msgid "" "Bytes objects are immutable sequences of single bytes. Since many major " "binary protocols are based on the ASCII text encoding, bytes objects offer " @@ -3936,40 +3956,40 @@ msgid "" "and are closely related to string objects in a variety of other ways." msgstr "" -#: ../../../library/stdtypes.rst:3261 +#: ../../../library/stdtypes.rst:3286 msgid "" "Firstly, the syntax for bytes literals is largely the same as that for " "string literals, except that a ``b`` prefix is added:" msgstr "" -#: ../../../library/stdtypes.rst:3264 +#: ../../../library/stdtypes.rst:3289 msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``" msgstr "" -#: ../../../library/stdtypes.rst:3265 +#: ../../../library/stdtypes.rst:3290 msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``" msgstr "" -#: ../../../library/stdtypes.rst:3266 +#: ../../../library/stdtypes.rst:3291 msgid "" "Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``" msgstr "" -#: ../../../library/stdtypes.rst:3268 +#: ../../../library/stdtypes.rst:3293 msgid "" "Only ASCII characters are permitted in bytes literals (regardless of the " "declared source code encoding). Any binary values over 127 must be entered " "into bytes literals using the appropriate escape sequence." msgstr "" -#: ../../../library/stdtypes.rst:3272 +#: ../../../library/stdtypes.rst:3297 msgid "" "As with string literals, bytes literals may also use a ``r`` prefix to " "disable processing of escape sequences. See :ref:`strings` for more about " "the various forms of bytes literal, including supported escape sequences." msgstr "" -#: ../../../library/stdtypes.rst:3276 +#: ../../../library/stdtypes.rst:3301 msgid "" "While bytes literals and representations are based on ASCII text, bytes " "objects actually behave like immutable sequences of integers, with each " @@ -3982,29 +4002,29 @@ msgid "" "compatible will usually lead to data corruption)." msgstr "" -#: ../../../library/stdtypes.rst:3286 +#: ../../../library/stdtypes.rst:3311 msgid "" "In addition to the literal forms, bytes objects can be created in a number " "of other ways:" msgstr "" -#: ../../../library/stdtypes.rst:3289 +#: ../../../library/stdtypes.rst:3314 msgid "A zero-filled bytes object of a specified length: ``bytes(10)``" msgstr "" -#: ../../../library/stdtypes.rst:3290 +#: ../../../library/stdtypes.rst:3315 msgid "From an iterable of integers: ``bytes(range(20))``" msgstr "" -#: ../../../library/stdtypes.rst:3291 +#: ../../../library/stdtypes.rst:3316 msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``" msgstr "" -#: ../../../library/stdtypes.rst:3293 +#: ../../../library/stdtypes.rst:3318 msgid "Also see the :ref:`bytes ` built-in." msgstr "" -#: ../../../library/stdtypes.rst:3295 +#: ../../../library/stdtypes.rst:3320 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -4012,38 +4032,38 @@ msgid "" "that format:" msgstr "" -#: ../../../library/stdtypes.rst:3301 +#: ../../../library/stdtypes.rst:3326 msgid "" "This :class:`bytes` class method returns a bytes object, decoding the given " "string object. The string must contain two hexadecimal digits per byte, " "with ASCII whitespace being ignored." msgstr "" -#: ../../../library/stdtypes.rst:3308 +#: ../../../library/stdtypes.rst:3333 msgid "" ":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just " "spaces." msgstr "" -#: ../../../library/stdtypes.rst:3312 +#: ../../../library/stdtypes.rst:3337 msgid "" ":meth:`bytes.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-like " "objects ` as input." msgstr "" -#: ../../../library/stdtypes.rst:3316 +#: ../../../library/stdtypes.rst:3341 msgid "" "A reverse conversion function exists to transform a bytes object into its " "hexadecimal representation." msgstr "" -#: ../../../library/stdtypes.rst:3322 ../../../library/stdtypes.rst:3413 +#: ../../../library/stdtypes.rst:3347 ../../../library/stdtypes.rst:3438 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the instance." msgstr "" -#: ../../../library/stdtypes.rst:3328 +#: ../../../library/stdtypes.rst:3353 msgid "" "If you want to make the hex string easier to read, you can specify a single " "character separator *sep* parameter to include in the output. By default, " @@ -4052,13 +4072,13 @@ msgid "" "the separator position from the right, negative values from the left." msgstr "" -#: ../../../library/stdtypes.rst:3345 +#: ../../../library/stdtypes.rst:3370 msgid "" ":meth:`bytes.hex` now supports optional *sep* and *bytes_per_sep* parameters " "to insert separators between bytes in the hex output." msgstr "" -#: ../../../library/stdtypes.rst:3349 +#: ../../../library/stdtypes.rst:3374 msgid "" "Since bytes objects are sequences of integers (akin to a tuple), for a bytes " "object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be a bytes " @@ -4066,58 +4086,58 @@ msgid "" "and slicing will produce a string of length 1)" msgstr "" -#: ../../../library/stdtypes.rst:3354 +#: ../../../library/stdtypes.rst:3379 msgid "" "The representation of bytes objects uses the literal format (``b'...'``) " "since it is often more useful than e.g. ``bytes([46, 46, 46])``. You can " "always convert a bytes object into a list of integers using ``list(b)``." msgstr "" -#: ../../../library/stdtypes.rst:3362 +#: ../../../library/stdtypes.rst:3387 msgid "Bytearray Objects" msgstr "" -#: ../../../library/stdtypes.rst:3366 +#: ../../../library/stdtypes.rst:3391 msgid "" ":class:`bytearray` objects are a mutable counterpart to :class:`bytes` " "objects." msgstr "" -#: ../../../library/stdtypes.rst:3372 +#: ../../../library/stdtypes.rst:3397 msgid "" "There is no dedicated literal syntax for bytearray objects, instead they are " "always created by calling the constructor:" msgstr "" -#: ../../../library/stdtypes.rst:3375 +#: ../../../library/stdtypes.rst:3400 msgid "Creating an empty instance: ``bytearray()``" msgstr "" -#: ../../../library/stdtypes.rst:3376 +#: ../../../library/stdtypes.rst:3401 msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``" msgstr "" -#: ../../../library/stdtypes.rst:3377 +#: ../../../library/stdtypes.rst:3402 msgid "From an iterable of integers: ``bytearray(range(20))``" msgstr "" -#: ../../../library/stdtypes.rst:3378 +#: ../../../library/stdtypes.rst:3403 msgid "" "Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``" msgstr "" -#: ../../../library/stdtypes.rst:3380 +#: ../../../library/stdtypes.rst:3405 msgid "" "As bytearray objects are mutable, they support the :ref:`mutable ` sequence operations in addition to the common bytes and bytearray " "operations described in :ref:`bytes-methods`." msgstr "" -#: ../../../library/stdtypes.rst:3384 +#: ../../../library/stdtypes.rst:3409 msgid "Also see the :ref:`bytearray ` built-in." msgstr "" -#: ../../../library/stdtypes.rst:3386 +#: ../../../library/stdtypes.rst:3411 msgid "" "Since 2 hexadecimal digits correspond precisely to a single byte, " "hexadecimal numbers are a commonly used format for describing binary data. " @@ -4125,77 +4145,77 @@ msgid "" "in that format:" msgstr "" -#: ../../../library/stdtypes.rst:3392 +#: ../../../library/stdtypes.rst:3417 msgid "" "This :class:`bytearray` class method returns bytearray object, decoding the " "given string object. The string must contain two hexadecimal digits per " "byte, with ASCII whitespace being ignored." msgstr "" -#: ../../../library/stdtypes.rst:3399 +#: ../../../library/stdtypes.rst:3424 msgid "" ":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not " "just spaces." msgstr "" -#: ../../../library/stdtypes.rst:3403 +#: ../../../library/stdtypes.rst:3428 msgid "" ":meth:`bytearray.fromhex` now accepts ASCII :class:`bytes` and :term:`bytes-" "like objects ` as input." msgstr "" -#: ../../../library/stdtypes.rst:3407 +#: ../../../library/stdtypes.rst:3432 msgid "" "A reverse conversion function exists to transform a bytearray object into " "its hexadecimal representation." msgstr "" -#: ../../../library/stdtypes.rst:3421 +#: ../../../library/stdtypes.rst:3446 msgid "" "Similar to :meth:`bytes.hex`, :meth:`bytearray.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../../library/stdtypes.rst:3428 +#: ../../../library/stdtypes.rst:3453 msgid "" "Resize the :class:`bytearray` to contain *size* bytes. *size* must be " "greater than or equal to 0." msgstr "" -#: ../../../library/stdtypes.rst:3431 +#: ../../../library/stdtypes.rst:3456 msgid "" "If the :class:`bytearray` needs to shrink, bytes beyond *size* are truncated." msgstr "" -#: ../../../library/stdtypes.rst:3433 +#: ../../../library/stdtypes.rst:3458 msgid "" "If the :class:`bytearray` needs to grow, all new bytes, those beyond *size*, " "will be set to null bytes." msgstr "" -#: ../../../library/stdtypes.rst:3437 +#: ../../../library/stdtypes.rst:3462 msgid "This is equivalent to:" msgstr "" -#: ../../../library/stdtypes.rst:3445 +#: ../../../library/stdtypes.rst:3470 msgid "Examples:" msgstr "" -#: ../../../library/stdtypes.rst:3460 +#: ../../../library/stdtypes.rst:3485 msgid "" "Remove the first *n* bytes from the bytearray and return them as an " "immutable :class:`bytes`. By default (if *n* is ``None``), return all bytes " "and clear the bytearray." msgstr "" -#: ../../../library/stdtypes.rst:3464 +#: ../../../library/stdtypes.rst:3489 msgid "" "If *n* is negative, index from the end and take the first :func:`len` plus " "*n* bytes. If *n* is out of bounds, raise :exc:`IndexError`." msgstr "" -#: ../../../library/stdtypes.rst:3467 +#: ../../../library/stdtypes.rst:3492 msgid "" "Taking less than the full length will leave remaining bytes in the :class:" "`bytearray`, which requires a copy. If the remaining bytes should be " @@ -4203,18 +4223,18 @@ msgid "" "func:`~bytearray.take_bytes` without a size." msgstr "" -#: ../../../library/stdtypes.rst:3474 +#: ../../../library/stdtypes.rst:3499 msgid "Taking all bytes is a zero-copy operation." msgstr "" -#: ../../../library/stdtypes.rst:3478 +#: ../../../library/stdtypes.rst:3503 msgid "" "See the :ref:`What's New ` entry for " "common code patterns which can be optimized with :meth:`bytearray." "take_bytes`." msgstr "" -#: ../../../library/stdtypes.rst:3482 +#: ../../../library/stdtypes.rst:3507 msgid "" "Since bytearray objects are sequences of integers (akin to a list), for a " "bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be " @@ -4222,7 +4242,7 @@ msgid "" "both indexing and slicing will produce a string of length 1)" msgstr "" -#: ../../../library/stdtypes.rst:3487 +#: ../../../library/stdtypes.rst:3512 msgid "" "The representation of bytearray objects uses the bytes literal format " "(``bytearray(b'...')``) since it is often more useful than e.g. " @@ -4230,11 +4250,17 @@ msgid "" "a list of integers using ``list(b)``." msgstr "" -#: ../../../library/stdtypes.rst:3496 +#: ../../../library/stdtypes.rst:3519 +msgid "" +"For detailed information on thread-safety guarantees for :class:`bytearray` " +"objects, see :ref:`thread-safety-bytearray`." +msgstr "" + +#: ../../../library/stdtypes.rst:3526 msgid "Bytes and Bytearray Operations" msgstr "" -#: ../../../library/stdtypes.rst:3501 +#: ../../../library/stdtypes.rst:3531 msgid "" "Both bytes and bytearray objects support the :ref:`common ` " "sequence operations. They interoperate not just with operands of the same " @@ -4243,104 +4269,104 @@ msgid "" "return type of the result may depend on the order of operands." msgstr "" -#: ../../../library/stdtypes.rst:3509 +#: ../../../library/stdtypes.rst:3539 msgid "" "The methods on bytes and bytearray objects don't accept strings as their " "arguments, just as the methods on strings don't accept bytes as their " "arguments. For example, you have to write::" msgstr "" -#: ../../../library/stdtypes.rst:3516 +#: ../../../library/stdtypes.rst:3546 msgid "and::" msgstr "" -#: ../../../library/stdtypes.rst:3521 +#: ../../../library/stdtypes.rst:3551 msgid "" "Some bytes and bytearray operations assume the use of ASCII compatible " "binary formats, and hence should be avoided when working with arbitrary " "binary data. These restrictions are covered below." msgstr "" -#: ../../../library/stdtypes.rst:3526 +#: ../../../library/stdtypes.rst:3556 msgid "" "Using these ASCII based operations to manipulate binary data that is not " "stored in an ASCII based format may lead to data corruption." msgstr "" -#: ../../../library/stdtypes.rst:3529 +#: ../../../library/stdtypes.rst:3559 msgid "" "The following methods on bytes and bytearray objects can be used with " "arbitrary binary data." msgstr "" -#: ../../../library/stdtypes.rst:3535 +#: ../../../library/stdtypes.rst:3565 msgid "" "Return the number of non-overlapping occurrences of subsequence *sub* in the " "range [*start*, *end*]. Optional arguments *start* and *end* are " "interpreted as in slice notation." msgstr "" -#: ../../../library/stdtypes.rst:3539 ../../../library/stdtypes.rst:3644 -#: ../../../library/stdtypes.rst:3666 ../../../library/stdtypes.rst:3732 -#: ../../../library/stdtypes.rst:3745 +#: ../../../library/stdtypes.rst:3569 ../../../library/stdtypes.rst:3674 +#: ../../../library/stdtypes.rst:3696 ../../../library/stdtypes.rst:3762 +#: ../../../library/stdtypes.rst:3775 msgid "" "The subsequence to search for may be any :term:`bytes-like object` or an " "integer in the range 0 to 255." msgstr "" -#: ../../../library/stdtypes.rst:3542 +#: ../../../library/stdtypes.rst:3572 msgid "" "If *sub* is empty, returns the number of empty slices between characters " "which is the length of the bytes object plus one." msgstr "" -#: ../../../library/stdtypes.rst:3545 ../../../library/stdtypes.rst:3656 -#: ../../../library/stdtypes.rst:3669 ../../../library/stdtypes.rst:3735 -#: ../../../library/stdtypes.rst:3748 +#: ../../../library/stdtypes.rst:3575 ../../../library/stdtypes.rst:3686 +#: ../../../library/stdtypes.rst:3699 ../../../library/stdtypes.rst:3765 +#: ../../../library/stdtypes.rst:3778 msgid "Also accept an integer in the range 0 to 255 as the subsequence." msgstr "" -#: ../../../library/stdtypes.rst:3552 +#: ../../../library/stdtypes.rst:3582 msgid "" "If the binary data starts with the *prefix* string, return " "``bytes[len(prefix):]``. Otherwise, return a copy of the original binary " "data::" msgstr "" -#: ../../../library/stdtypes.rst:3561 +#: ../../../library/stdtypes.rst:3591 msgid "The *prefix* may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3565 ../../../library/stdtypes.rst:3587 -#: ../../../library/stdtypes.rst:3720 ../../../library/stdtypes.rst:3813 -#: ../../../library/stdtypes.rst:3827 ../../../library/stdtypes.rst:3857 -#: ../../../library/stdtypes.rst:3871 ../../../library/stdtypes.rst:3912 -#: ../../../library/stdtypes.rst:3982 ../../../library/stdtypes.rst:4000 -#: ../../../library/stdtypes.rst:4028 ../../../library/stdtypes.rst:4167 -#: ../../../library/stdtypes.rst:4222 ../../../library/stdtypes.rst:4265 -#: ../../../library/stdtypes.rst:4286 ../../../library/stdtypes.rst:4308 -#: ../../../library/stdtypes.rst:4510 +#: ../../../library/stdtypes.rst:3595 ../../../library/stdtypes.rst:3617 +#: ../../../library/stdtypes.rst:3750 ../../../library/stdtypes.rst:3843 +#: ../../../library/stdtypes.rst:3857 ../../../library/stdtypes.rst:3887 +#: ../../../library/stdtypes.rst:3901 ../../../library/stdtypes.rst:3942 +#: ../../../library/stdtypes.rst:4012 ../../../library/stdtypes.rst:4030 +#: ../../../library/stdtypes.rst:4058 ../../../library/stdtypes.rst:4197 +#: ../../../library/stdtypes.rst:4252 ../../../library/stdtypes.rst:4295 +#: ../../../library/stdtypes.rst:4316 ../../../library/stdtypes.rst:4338 +#: ../../../library/stdtypes.rst:4540 msgid "" "The bytearray version of this method does *not* operate in place - it always " "produces a new object, even if no changes were made." msgstr "" -#: ../../../library/stdtypes.rst:3574 +#: ../../../library/stdtypes.rst:3604 msgid "" "If the binary data ends with the *suffix* string and that *suffix* is not " "empty, return ``bytes[:-len(suffix)]``. Otherwise, return a copy of the " "original binary data::" msgstr "" -#: ../../../library/stdtypes.rst:3583 +#: ../../../library/stdtypes.rst:3613 msgid "The *suffix* may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3596 +#: ../../../library/stdtypes.rst:3626 msgid "Return the bytes decoded to a :class:`str`." msgstr "" -#: ../../../library/stdtypes.rst:3601 +#: ../../../library/stdtypes.rst:3631 msgid "" "*errors* controls how decoding errors are handled. If ``'strict'`` (the " "default), a :exc:`UnicodeError` exception is raised. Other possible values " @@ -4348,21 +4374,21 @@ msgid "" "`codecs.register_error`. See :ref:`error-handlers` for details." msgstr "" -#: ../../../library/stdtypes.rst:3607 +#: ../../../library/stdtypes.rst:3637 msgid "" "For performance reasons, the value of *errors* is not checked for validity " "unless a decoding error actually occurs, :ref:`devmode` is enabled or a :ref:" "`debug build ` is used." msgstr "" -#: ../../../library/stdtypes.rst:3613 +#: ../../../library/stdtypes.rst:3643 msgid "" "Passing the *encoding* argument to :class:`str` allows decoding any :term:" "`bytes-like object` directly, without needing to make a temporary :class:`!" "bytes` or :class:`!bytearray` object." msgstr "" -#: ../../../library/stdtypes.rst:3628 +#: ../../../library/stdtypes.rst:3658 msgid "" "Return ``True`` if the binary data ends with the specified *suffix*, " "otherwise return ``False``. *suffix* can also be a tuple of suffixes to " @@ -4370,11 +4396,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../../library/stdtypes.rst:3633 +#: ../../../library/stdtypes.rst:3663 msgid "The suffix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3639 +#: ../../../library/stdtypes.rst:3669 msgid "" "Return the lowest index in the data where the subsequence *sub* is found, " "such that *sub* is contained in the slice ``s[start:end]``. Optional " @@ -4382,20 +4408,20 @@ msgid "" "``-1`` if *sub* is not found." msgstr "" -#: ../../../library/stdtypes.rst:3649 +#: ../../../library/stdtypes.rst:3679 msgid "" "The :meth:`~bytes.find` method should be used only if you need to know the " "position of *sub*. To check if *sub* is a substring or not, use the :" "keyword:`in` operator::" msgstr "" -#: ../../../library/stdtypes.rst:3663 +#: ../../../library/stdtypes.rst:3693 msgid "" "Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence " "is not found." msgstr "" -#: ../../../library/stdtypes.rst:3676 +#: ../../../library/stdtypes.rst:3706 msgid "" "Return a bytes or bytearray object which is the concatenation of the binary " "data sequences in *iterable*. A :exc:`TypeError` will be raised if there " @@ -4405,7 +4431,7 @@ msgid "" "method." msgstr "" -#: ../../../library/stdtypes.rst:3687 +#: ../../../library/stdtypes.rst:3717 msgid "" "This static method returns a translation table usable for :meth:`bytes." "translate` that will map each character in *from* into the character at the " @@ -4413,7 +4439,7 @@ msgid "" "objects ` and have the same length." msgstr "" -#: ../../../library/stdtypes.rst:3698 +#: ../../../library/stdtypes.rst:3728 msgid "" "Split the sequence at the first occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -4422,24 +4448,24 @@ msgid "" "by two empty bytes or bytearray objects." msgstr "" -#: ../../../library/stdtypes.rst:3705 ../../../library/stdtypes.rst:3762 +#: ../../../library/stdtypes.rst:3735 ../../../library/stdtypes.rst:3792 msgid "The separator to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3711 +#: ../../../library/stdtypes.rst:3741 msgid "" "Return a copy of the sequence with all occurrences of subsequence *old* " "replaced by *new*. If the optional argument *count* is given, only the " "first *count* occurrences are replaced." msgstr "" -#: ../../../library/stdtypes.rst:3715 +#: ../../../library/stdtypes.rst:3745 msgid "" "The subsequence to search for and its replacement may be any :term:`bytes-" "like object`." msgstr "" -#: ../../../library/stdtypes.rst:3727 +#: ../../../library/stdtypes.rst:3757 msgid "" "Return the highest index in the sequence where the subsequence *sub* is " "found, such that *sub* is contained within ``s[start:end]``. Optional " @@ -4447,13 +4473,13 @@ msgid "" "``-1`` on failure." msgstr "" -#: ../../../library/stdtypes.rst:3742 +#: ../../../library/stdtypes.rst:3772 msgid "" "Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence " "*sub* is not found." msgstr "" -#: ../../../library/stdtypes.rst:3755 +#: ../../../library/stdtypes.rst:3785 msgid "" "Split the sequence at the last occurrence of *sep*, and return a 3-tuple " "containing the part before the separator, the separator itself or its " @@ -4462,7 +4488,7 @@ msgid "" "followed by a copy of the original sequence." msgstr "" -#: ../../../library/stdtypes.rst:3768 +#: ../../../library/stdtypes.rst:3798 msgid "" "Return ``True`` if the binary data starts with the specified *prefix*, " "otherwise return ``False``. *prefix* can also be a tuple of prefixes to " @@ -4470,11 +4496,11 @@ msgid "" "optional *end*, stop comparing at that position." msgstr "" -#: ../../../library/stdtypes.rst:3773 +#: ../../../library/stdtypes.rst:3803 msgid "The prefix(es) to search for may be any :term:`bytes-like object`." msgstr "" -#: ../../../library/stdtypes.rst:3779 +#: ../../../library/stdtypes.rst:3809 msgid "" "Return a copy of the bytes or bytearray object where all bytes occurring in " "the optional argument *delete* are removed, and the remaining bytes have " @@ -4482,22 +4508,22 @@ msgid "" "object of length 256." msgstr "" -#: ../../../library/stdtypes.rst:3784 +#: ../../../library/stdtypes.rst:3814 msgid "" "You can use the :func:`bytes.maketrans` method to create a translation table." msgstr "" -#: ../../../library/stdtypes.rst:3787 +#: ../../../library/stdtypes.rst:3817 msgid "" "Set the *table* argument to ``None`` for translations that only delete " "characters::" msgstr "" -#: ../../../library/stdtypes.rst:3793 +#: ../../../library/stdtypes.rst:3823 msgid "*delete* is now supported as a keyword argument." msgstr "" -#: ../../../library/stdtypes.rst:3797 +#: ../../../library/stdtypes.rst:3827 msgid "" "The following methods on bytes and bytearray objects have default behaviours " "that assume the use of ASCII compatible binary formats, but can still be " @@ -4506,7 +4532,7 @@ msgid "" "instead produce new objects." msgstr "" -#: ../../../library/stdtypes.rst:3806 +#: ../../../library/stdtypes.rst:3836 msgid "" "Return a copy of the object centered in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -4514,7 +4540,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:3820 +#: ../../../library/stdtypes.rst:3850 msgid "" "Return a copy of the object left justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -4522,7 +4548,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:3834 +#: ../../../library/stdtypes.rst:3864 msgid "" "Return a copy of the sequence with specified leading bytes removed. The " "*bytes* argument is a binary sequence specifying the set of byte values to " @@ -4531,14 +4557,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../../library/stdtypes.rst:3845 +#: ../../../library/stdtypes.rst:3875 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removeprefix` for a method that will remove a " "single prefix string rather than all of a set of characters. For example::" msgstr "" -#: ../../../library/stdtypes.rst:3864 +#: ../../../library/stdtypes.rst:3894 msgid "" "Return a copy of the object right justified in a sequence of length *width*. " "Padding is done using the specified *fillbyte* (default is an ASCII space). " @@ -4546,7 +4572,7 @@ msgid "" "less than or equal to ``len(s)``." msgstr "" -#: ../../../library/stdtypes.rst:3878 +#: ../../../library/stdtypes.rst:3908 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are " @@ -4556,7 +4582,7 @@ msgid "" "described in detail below." msgstr "" -#: ../../../library/stdtypes.rst:3889 +#: ../../../library/stdtypes.rst:3919 msgid "" "Return a copy of the sequence with specified trailing bytes removed. The " "*bytes* argument is a binary sequence specifying the set of byte values to " @@ -4565,14 +4591,14 @@ msgid "" "all combinations of its values are stripped::" msgstr "" -#: ../../../library/stdtypes.rst:3900 +#: ../../../library/stdtypes.rst:3930 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`. See :meth:`~bytes.removesuffix` for a method that will remove a " "single suffix string rather than all of a set of characters. For example::" msgstr "" -#: ../../../library/stdtypes.rst:3919 +#: ../../../library/stdtypes.rst:3949 msgid "" "Split the binary sequence into subsequences of the same type, using *sep* as " "the delimiter string. If *maxsplit* is given and non-negative, at most " @@ -4581,7 +4607,7 @@ msgid "" "limit on the number of splits (all possible splits are made)." msgstr "" -#: ../../../library/stdtypes.rst:3925 +#: ../../../library/stdtypes.rst:3955 msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` " @@ -4592,7 +4618,7 @@ msgid "" "like object`." msgstr "" -#: ../../../library/stdtypes.rst:3944 +#: ../../../library/stdtypes.rst:3974 msgid "" "If *sep* is not specified or is ``None``, a different splitting algorithm is " "applied: runs of consecutive ASCII whitespace are regarded as a single " @@ -4602,7 +4628,7 @@ msgid "" "without a specified separator returns ``[]``." msgstr "" -#: ../../../library/stdtypes.rst:3965 +#: ../../../library/stdtypes.rst:3995 msgid "" "Return a copy of the sequence with specified leading and trailing bytes " "removed. The *bytes* argument is a binary sequence specifying the set of " @@ -4611,13 +4637,13 @@ msgid "" "or suffix; rather, all combinations of its values are stripped::" msgstr "" -#: ../../../library/stdtypes.rst:3977 +#: ../../../library/stdtypes.rst:4007 msgid "" "The binary sequence of byte values to remove may be any :term:`bytes-like " "object`." msgstr "" -#: ../../../library/stdtypes.rst:3986 +#: ../../../library/stdtypes.rst:4016 msgid "" "The following methods on bytes and bytearray objects assume the use of ASCII " "compatible binary formats and should not be applied to arbitrary binary " @@ -4625,14 +4651,14 @@ msgid "" "operate in place, and instead produce new objects." msgstr "" -#: ../../../library/stdtypes.rst:3994 +#: ../../../library/stdtypes.rst:4024 msgid "" "Return a copy of the sequence with each byte interpreted as an ASCII " "character, and the first byte capitalized and the rest lowercased. Non-ASCII " "byte values are passed through unchanged." msgstr "" -#: ../../../library/stdtypes.rst:4007 +#: ../../../library/stdtypes.rst:4037 msgid "" "Return a copy of the sequence where all ASCII tab characters are replaced by " "one or more ASCII spaces, depending on the current column and the given tab " @@ -4648,7 +4674,7 @@ msgid "" "by one regardless of how the byte value is represented when printed::" msgstr "" -#: ../../../library/stdtypes.rst:4035 +#: ../../../library/stdtypes.rst:4065 msgid "" "Return ``True`` if all bytes in the sequence are alphabetical ASCII " "characters or ASCII decimal digits and the sequence is not empty, ``False`` " @@ -4657,7 +4683,7 @@ msgid "" "digits are those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../../library/stdtypes.rst:4052 +#: ../../../library/stdtypes.rst:4082 msgid "" "Return ``True`` if all bytes in the sequence are alphabetic ASCII characters " "and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII " @@ -4665,35 +4691,35 @@ msgid "" "``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../../library/stdtypes.rst:4068 +#: ../../../library/stdtypes.rst:4098 msgid "" "Return ``True`` if the sequence is empty or all bytes in the sequence are " "ASCII, ``False`` otherwise. ASCII bytes are in the range 0-0x7F." msgstr "" -#: ../../../library/stdtypes.rst:4078 +#: ../../../library/stdtypes.rst:4108 msgid "" "Return ``True`` if all bytes in the sequence are ASCII decimal digits and " "the sequence is not empty, ``False`` otherwise. ASCII decimal digits are " "those byte values in the sequence ``b'0123456789'``." msgstr "" -#: ../../../library/stdtypes.rst:4093 +#: ../../../library/stdtypes.rst:4123 msgid "" "Return ``True`` if there is at least one lowercase ASCII character in the " "sequence and no uppercase ASCII characters, ``False`` otherwise." msgstr "" -#: ../../../library/stdtypes.rst:4103 ../../../library/stdtypes.rst:4145 -#: ../../../library/stdtypes.rst:4161 ../../../library/stdtypes.rst:4211 -#: ../../../library/stdtypes.rst:4280 +#: ../../../library/stdtypes.rst:4133 ../../../library/stdtypes.rst:4175 +#: ../../../library/stdtypes.rst:4191 ../../../library/stdtypes.rst:4241 +#: ../../../library/stdtypes.rst:4310 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " "values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``." msgstr "" -#: ../../../library/stdtypes.rst:4111 +#: ../../../library/stdtypes.rst:4141 msgid "" "Return ``True`` if all bytes in the sequence are ASCII whitespace and the " "sequence is not empty, ``False`` otherwise. ASCII whitespace characters are " @@ -4701,27 +4727,27 @@ msgid "" "newline, carriage return, vertical tab, form feed)." msgstr "" -#: ../../../library/stdtypes.rst:4120 +#: ../../../library/stdtypes.rst:4150 msgid "" "Return ``True`` if the sequence is ASCII titlecase and the sequence is not " "empty, ``False`` otherwise. See :meth:`bytes.title` for more details on the " "definition of \"titlecase\"." msgstr "" -#: ../../../library/stdtypes.rst:4135 +#: ../../../library/stdtypes.rst:4165 msgid "" "Return ``True`` if there is at least one uppercase alphabetic ASCII " "character in the sequence and no lowercase ASCII characters, ``False`` " "otherwise." msgstr "" -#: ../../../library/stdtypes.rst:4153 +#: ../../../library/stdtypes.rst:4183 msgid "" "Return a copy of the sequence with all the uppercase ASCII characters " "converted to their corresponding lowercase counterpart." msgstr "" -#: ../../../library/stdtypes.rst:4178 +#: ../../../library/stdtypes.rst:4208 msgid "" "Return a list of the lines in the binary sequence, breaking at ASCII line " "boundaries. This method uses the :term:`universal newlines` approach to " @@ -4729,20 +4755,20 @@ msgid "" "*keepends* is given and true." msgstr "" -#: ../../../library/stdtypes.rst:4190 +#: ../../../library/stdtypes.rst:4220 msgid "" "Unlike :meth:`~bytes.split` when a delimiter string *sep* is given, this " "method returns an empty list for the empty string, and a terminal line break " "does not result in an extra line::" msgstr "" -#: ../../../library/stdtypes.rst:4203 +#: ../../../library/stdtypes.rst:4233 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart and vice-versa." msgstr "" -#: ../../../library/stdtypes.rst:4215 +#: ../../../library/stdtypes.rst:4245 msgid "" "Unlike :func:`str.swapcase`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " @@ -4750,14 +4776,14 @@ msgid "" "Unicode code points." msgstr "" -#: ../../../library/stdtypes.rst:4229 +#: ../../../library/stdtypes.rst:4259 msgid "" "Return a titlecased version of the binary sequence where words start with an " "uppercase ASCII character and the remaining characters are lowercase. " "Uncased byte values are left unmodified." msgstr "" -#: ../../../library/stdtypes.rst:4238 +#: ../../../library/stdtypes.rst:4268 msgid "" "Lowercase ASCII characters are those byte values in the sequence " "``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte " @@ -4765,18 +4791,18 @@ msgid "" "values are uncased." msgstr "" -#: ../../../library/stdtypes.rst:4251 +#: ../../../library/stdtypes.rst:4281 msgid "" "A workaround for apostrophes can be constructed using regular expressions::" msgstr "" -#: ../../../library/stdtypes.rst:4272 +#: ../../../library/stdtypes.rst:4302 msgid "" "Return a copy of the sequence with all the lowercase ASCII characters " "converted to their corresponding uppercase counterpart." msgstr "" -#: ../../../library/stdtypes.rst:4293 +#: ../../../library/stdtypes.rst:4323 msgid "" "Return a copy of the sequence left filled with ASCII ``b'0'`` digits to make " "a sequence of length *width*. A leading sign prefix (``b'+'``/ ``b'-'``) is " @@ -4785,11 +4811,11 @@ msgid "" "*width* is less than or equal to ``len(seq)``." msgstr "" -#: ../../../library/stdtypes.rst:4315 +#: ../../../library/stdtypes.rst:4345 msgid "``printf``-style Bytes Formatting" msgstr "" -#: ../../../library/stdtypes.rst:4332 +#: ../../../library/stdtypes.rst:4362 msgid "" "The formatting operations described here exhibit a variety of quirks that " "lead to a number of common errors (such as failing to display tuples and " @@ -4797,7 +4823,7 @@ msgid "" "dictionary, wrap it in a tuple." msgstr "" -#: ../../../library/stdtypes.rst:4337 +#: ../../../library/stdtypes.rst:4367 msgid "" "Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: " "the ``%`` operator (modulo). This is also known as the bytes *formatting* or " @@ -4807,7 +4833,7 @@ msgid "" "func:`sprintf` in the C language." msgstr "" -#: ../../../library/stdtypes.rst:4344 +#: ../../../library/stdtypes.rst:4374 msgid "" "If *format* requires a single argument, *values* may be a single non-tuple " "object. [5]_ Otherwise, *values* must be a tuple with exactly the number of " @@ -4815,7 +4841,7 @@ msgid "" "example, a dictionary)." msgstr "" -#: ../../../library/stdtypes.rst:4378 +#: ../../../library/stdtypes.rst:4408 msgid "" "When the right argument is a dictionary (or other mapping type), then the " "formats in the bytes object *must* include a parenthesised mapping key into " @@ -4823,77 +4849,77 @@ msgid "" "mapping key selects the value to be formatted from the mapping. For example:" msgstr "" -#: ../../../library/stdtypes.rst:4430 +#: ../../../library/stdtypes.rst:4460 msgid "\\(8)" msgstr "" -#: ../../../library/stdtypes.rst:4452 +#: ../../../library/stdtypes.rst:4482 msgid "Single byte (accepts integer or single byte objects)." msgstr "" -#: ../../../library/stdtypes.rst:4455 +#: ../../../library/stdtypes.rst:4485 msgid "``'b'``" msgstr "" -#: ../../../library/stdtypes.rst:4455 +#: ../../../library/stdtypes.rst:4485 msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`~object.__bytes__`)." msgstr "" -#: ../../../library/stdtypes.rst:4459 +#: ../../../library/stdtypes.rst:4489 msgid "" "``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../../library/stdtypes.rst:4462 +#: ../../../library/stdtypes.rst:4492 msgid "" "Bytes (converts any Python object using ``repr(obj).encode('ascii', " "'backslashreplace')``)." msgstr "" -#: ../../../library/stdtypes.rst:4465 +#: ../../../library/stdtypes.rst:4495 msgid "" "``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code " "bases." msgstr "" -#: ../../../library/stdtypes.rst:4465 +#: ../../../library/stdtypes.rst:4495 msgid "\\(7)" msgstr "" -#: ../../../library/stdtypes.rst:4500 +#: ../../../library/stdtypes.rst:4530 msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../../library/stdtypes.rst:4503 +#: ../../../library/stdtypes.rst:4533 msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series." msgstr "" -#: ../../../library/stdtypes.rst:4515 +#: ../../../library/stdtypes.rst:4545 msgid ":pep:`461` - Adding % formatting to bytes and bytearray" msgstr "" -#: ../../../library/stdtypes.rst:4522 +#: ../../../library/stdtypes.rst:4552 msgid "Memory Views" msgstr "" -#: ../../../library/stdtypes.rst:4524 +#: ../../../library/stdtypes.rst:4554 msgid "" ":class:`memoryview` objects allow Python code to access the internal data of " "an object that supports the :ref:`buffer protocol ` without " "copying." msgstr "" -#: ../../../library/stdtypes.rst:4530 +#: ../../../library/stdtypes.rst:4560 msgid "" "Create a :class:`memoryview` that references *object*. *object* must " "support the buffer protocol. Built-in objects that support the buffer " "protocol include :class:`bytes` and :class:`bytearray`." msgstr "" -#: ../../../library/stdtypes.rst:4534 +#: ../../../library/stdtypes.rst:4564 msgid "" "A :class:`memoryview` has the notion of an *element*, which is the atomic " "memory unit handled by the originating *object*. For many simple types such " @@ -4901,32 +4927,32 @@ msgid "" "other types such as :class:`array.array` may have bigger elements." msgstr "" -#: ../../../library/stdtypes.rst:4539 +#: ../../../library/stdtypes.rst:4569 msgid "" -"``len(view)`` is equal to the length of :class:`~memoryview.tolist`, which " -"is the nested list representation of the view. If ``view.ndim = 1``, this is " +"``len(view)`` is equal to the length of :meth:`~memoryview.tolist`, which is " +"the nested list representation of the view. If ``view.ndim = 1``, this is " "equal to the number of elements in the view." msgstr "" -#: ../../../library/stdtypes.rst:4543 +#: ../../../library/stdtypes.rst:4573 msgid "" "If ``view.ndim == 0``, ``len(view)`` now raises :exc:`TypeError` instead of " "returning 1." msgstr "" -#: ../../../library/stdtypes.rst:4546 +#: ../../../library/stdtypes.rst:4576 msgid "" "The :class:`~memoryview.itemsize` attribute will give you the number of " "bytes in a single element." msgstr "" -#: ../../../library/stdtypes.rst:4549 +#: ../../../library/stdtypes.rst:4579 msgid "" "A :class:`memoryview` supports slicing and indexing to expose its data. One-" "dimensional slicing will result in a subview::" msgstr "" -#: ../../../library/stdtypes.rst:4562 +#: ../../../library/stdtypes.rst:4592 msgid "" "If :class:`~memoryview.format` is one of the native format specifiers from " "the :mod:`struct` module, indexing with an integer or a tuple of integers is " @@ -4937,86 +4963,86 @@ msgid "" "memoryviews can be indexed with the empty tuple." msgstr "" -#: ../../../library/stdtypes.rst:4571 +#: ../../../library/stdtypes.rst:4601 msgid "Here is an example with a non-byte format::" msgstr "" -#: ../../../library/stdtypes.rst:4583 +#: ../../../library/stdtypes.rst:4613 msgid "" "If the underlying object is writable, the memoryview supports one-" "dimensional slice assignment. Resizing is not allowed::" msgstr "" -#: ../../../library/stdtypes.rst:4604 +#: ../../../library/stdtypes.rst:4634 msgid "" "One-dimensional memoryviews of :term:`hashable` (read-only) types with " "formats 'B', 'b' or 'c' are also hashable. The hash is defined as ``hash(m) " "== hash(m.tobytes())``::" msgstr "" -#: ../../../library/stdtypes.rst:4616 +#: ../../../library/stdtypes.rst:4646 msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now :term:`hashable`." msgstr "" -#: ../../../library/stdtypes.rst:4620 +#: ../../../library/stdtypes.rst:4650 msgid "" "memoryview is now registered automatically with :class:`collections.abc." "Sequence`" msgstr "" -#: ../../../library/stdtypes.rst:4624 +#: ../../../library/stdtypes.rst:4654 msgid "memoryviews can now be indexed with tuple of integers." msgstr "" -#: ../../../library/stdtypes.rst:4627 +#: ../../../library/stdtypes.rst:4657 msgid "memoryview is now a :term:`generic type`." msgstr "" -#: ../../../library/stdtypes.rst:4630 +#: ../../../library/stdtypes.rst:4660 msgid ":class:`memoryview` has several methods:" msgstr "" -#: ../../../library/stdtypes.rst:4634 +#: ../../../library/stdtypes.rst:4664 msgid "" "A memoryview and a :pep:`3118` exporter are equal if their shapes are " "equivalent and if all corresponding values are equal when the operands' " "respective format codes are interpreted using :mod:`struct` syntax." msgstr "" -#: ../../../library/stdtypes.rst:4638 +#: ../../../library/stdtypes.rst:4668 msgid "" "For the subset of :mod:`struct` format strings currently supported by :meth:" "`tolist`, ``v`` and ``w`` are equal if ``v.tolist() == w.tolist()``::" msgstr "" -#: ../../../library/stdtypes.rst:4657 +#: ../../../library/stdtypes.rst:4687 msgid "" "If either format string is not supported by the :mod:`struct` module, then " "the objects will always compare as unequal (even if the format strings and " "buffer contents are identical)::" msgstr "" -#: ../../../library/stdtypes.rst:4673 +#: ../../../library/stdtypes.rst:4703 msgid "" "Note that, as with floating-point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." msgstr "" -#: ../../../library/stdtypes.rst:4676 +#: ../../../library/stdtypes.rst:4706 msgid "" "Previous versions compared the raw memory disregarding the item format and " "the logical array structure." msgstr "" -#: ../../../library/stdtypes.rst:4682 +#: ../../../library/stdtypes.rst:4712 msgid "" "Return the data in the buffer as a bytestring. This is equivalent to " "calling the :class:`bytes` constructor on the memoryview. ::" msgstr "" -#: ../../../library/stdtypes.rst:4691 +#: ../../../library/stdtypes.rst:4721 msgid "" "For non-contiguous arrays the result is equal to the flattened list " "representation with all elements converted to bytes. :meth:`tobytes` " @@ -5024,7 +5050,7 @@ msgid "" "module syntax." msgstr "" -#: ../../../library/stdtypes.rst:4696 +#: ../../../library/stdtypes.rst:4726 msgid "" "*order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the " "original array is converted to C or Fortran order. For contiguous views, 'A' " @@ -5033,36 +5059,36 @@ msgid "" "to C first. *order=None* is the same as *order='C'*." msgstr "" -#: ../../../library/stdtypes.rst:4706 +#: ../../../library/stdtypes.rst:4736 msgid "" "Return a string object containing two hexadecimal digits for each byte in " "the buffer. ::" msgstr "" -#: ../../../library/stdtypes.rst:4715 +#: ../../../library/stdtypes.rst:4745 msgid "" "Similar to :meth:`bytes.hex`, :meth:`memoryview.hex` now supports optional " "*sep* and *bytes_per_sep* parameters to insert separators between bytes in " "the hex output." msgstr "" -#: ../../../library/stdtypes.rst:4722 +#: ../../../library/stdtypes.rst:4752 msgid "Return the data in the buffer as a list of elements. ::" msgstr "" -#: ../../../library/stdtypes.rst:4732 +#: ../../../library/stdtypes.rst:4762 msgid "" ":meth:`tolist` now supports all single character native formats in :mod:" "`struct` module syntax as well as multi-dimensional representations." msgstr "" -#: ../../../library/stdtypes.rst:4739 +#: ../../../library/stdtypes.rst:4769 msgid "" "Return a readonly version of the memoryview object. The original memoryview " "object is unchanged. ::" msgstr "" -#: ../../../library/stdtypes.rst:4758 +#: ../../../library/stdtypes.rst:4788 msgid "" "Release the underlying buffer exposed by the memoryview object. Many " "objects take special actions when a view is held on them (for example, a :" @@ -5071,20 +5097,20 @@ msgid "" "resources) as soon as possible." msgstr "" -#: ../../../library/stdtypes.rst:4764 +#: ../../../library/stdtypes.rst:4794 msgid "" "After this method has been called, any further operation on the view raises " "a :class:`ValueError` (except :meth:`release` itself which can be called " "multiple times)::" msgstr "" -#: ../../../library/stdtypes.rst:4775 +#: ../../../library/stdtypes.rst:4805 msgid "" "The context management protocol can be used for a similar effect, using the " "``with`` statement::" msgstr "" -#: ../../../library/stdtypes.rst:4792 +#: ../../../library/stdtypes.rst:4822 msgid "" "Cast a memoryview to a new format or shape. *shape* defaults to " "``[byte_length//new_itemsize]``, which means that the result view will be " @@ -5093,7 +5119,7 @@ msgid "" "contiguous -> 1D." msgstr "" -#: ../../../library/stdtypes.rst:4798 +#: ../../../library/stdtypes.rst:4828 msgid "" "The destination format is restricted to a single element native format in :" "mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or " @@ -5101,64 +5127,64 @@ msgid "" "Note that all byte lengths may depend on the operating system." msgstr "" -#: ../../../library/stdtypes.rst:4804 +#: ../../../library/stdtypes.rst:4834 msgid "Cast 1D/long to 1D/unsigned bytes::" msgstr "" -#: ../../../library/stdtypes.rst:4827 +#: ../../../library/stdtypes.rst:4857 msgid "Cast 1D/unsigned bytes to 1D/char::" msgstr "" -#: ../../../library/stdtypes.rst:4840 +#: ../../../library/stdtypes.rst:4870 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" msgstr "" -#: ../../../library/stdtypes.rst:4866 +#: ../../../library/stdtypes.rst:4896 msgid "Cast 1D/unsigned long to 2D/unsigned long::" msgstr "" -#: ../../../library/stdtypes.rst:4880 +#: ../../../library/stdtypes.rst:4910 msgid "The source format is no longer restricted when casting to a byte view." msgstr "" -#: ../../../library/stdtypes.rst:4885 +#: ../../../library/stdtypes.rst:4915 msgid "Count the number of occurrences of *value*." msgstr "" -#: ../../../library/stdtypes.rst:4891 +#: ../../../library/stdtypes.rst:4921 msgid "" "Return the index of the first occurrence of *value* (at or after index " "*start* and before index *stop*)." msgstr "" -#: ../../../library/stdtypes.rst:4894 +#: ../../../library/stdtypes.rst:4924 msgid "Raises a :exc:`ValueError` if *value* cannot be found." msgstr "" -#: ../../../library/stdtypes.rst:4898 +#: ../../../library/stdtypes.rst:4928 msgid "There are also several readonly attributes available:" msgstr "" -#: ../../../library/stdtypes.rst:4902 +#: ../../../library/stdtypes.rst:4932 msgid "The underlying object of the memoryview::" msgstr "" -#: ../../../library/stdtypes.rst:4913 +#: ../../../library/stdtypes.rst:4943 msgid "" "``nbytes == product(shape) * itemsize == len(m.tobytes())``. This is the " "amount of space in bytes that the array would use in a contiguous " "representation. It is not necessarily equal to ``len(m)``::" msgstr "" -#: ../../../library/stdtypes.rst:4932 +#: ../../../library/stdtypes.rst:4962 msgid "Multi-dimensional arrays::" msgstr "" -#: ../../../library/stdtypes.rst:4949 +#: ../../../library/stdtypes.rst:4979 msgid "A bool indicating whether the memory is read only." msgstr "" -#: ../../../library/stdtypes.rst:4953 +#: ../../../library/stdtypes.rst:4983 msgid "" "A string containing the format (in :mod:`struct` module style) for each " "element in the view. A memoryview can be created from exporters with " @@ -5166,59 +5192,59 @@ msgid "" "restricted to native single element formats." msgstr "" -#: ../../../library/stdtypes.rst:4958 +#: ../../../library/stdtypes.rst:4988 msgid "" "format ``'B'`` is now handled according to the struct module syntax. This " "means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``." msgstr "" -#: ../../../library/stdtypes.rst:4964 +#: ../../../library/stdtypes.rst:4994 msgid "The size in bytes of each element of the memoryview::" msgstr "" -#: ../../../library/stdtypes.rst:4977 +#: ../../../library/stdtypes.rst:5007 msgid "" "An integer indicating how many dimensions of a multi-dimensional array the " "memory represents." msgstr "" -#: ../../../library/stdtypes.rst:4982 +#: ../../../library/stdtypes.rst:5012 msgid "" "A tuple of integers the length of :attr:`ndim` giving the shape of the " "memory as an N-dimensional array." msgstr "" -#: ../../../library/stdtypes.rst:4985 ../../../library/stdtypes.rst:4993 +#: ../../../library/stdtypes.rst:5015 ../../../library/stdtypes.rst:5023 msgid "An empty tuple instead of ``None`` when ndim = 0." msgstr "" -#: ../../../library/stdtypes.rst:4990 +#: ../../../library/stdtypes.rst:5020 msgid "" "A tuple of integers the length of :attr:`ndim` giving the size in bytes to " "access each element for each dimension of the array." msgstr "" -#: ../../../library/stdtypes.rst:4998 +#: ../../../library/stdtypes.rst:5028 msgid "Used internally for PIL-style arrays. The value is informational only." msgstr "" -#: ../../../library/stdtypes.rst:5002 +#: ../../../library/stdtypes.rst:5032 msgid "A bool indicating whether the memory is C-:term:`contiguous`." msgstr "" -#: ../../../library/stdtypes.rst:5008 +#: ../../../library/stdtypes.rst:5038 msgid "A bool indicating whether the memory is Fortran :term:`contiguous`." msgstr "" -#: ../../../library/stdtypes.rst:5014 +#: ../../../library/stdtypes.rst:5044 msgid "A bool indicating whether the memory is :term:`contiguous`." msgstr "" -#: ../../../library/stdtypes.rst:5022 +#: ../../../library/stdtypes.rst:5052 msgid "Set Types --- :class:`set`, :class:`frozenset`" msgstr "" -#: ../../../library/stdtypes.rst:5026 +#: ../../../library/stdtypes.rst:5056 msgid "" "A :dfn:`set` object is an unordered collection of distinct :term:`hashable` " "objects. Common uses include membership testing, removing duplicates from a " @@ -5228,7 +5254,7 @@ msgid "" "`collections` module.)" msgstr "" -#: ../../../library/stdtypes.rst:5033 +#: ../../../library/stdtypes.rst:5063 msgid "" "Like other collections, sets support ``x in set``, ``len(set)``, and ``for x " "in set``. Being an unordered collection, sets do not record element " @@ -5236,7 +5262,7 @@ msgid "" "slicing, or other sequence-like behavior." msgstr "" -#: ../../../library/stdtypes.rst:5038 +#: ../../../library/stdtypes.rst:5068 msgid "" "There are currently two built-in set types, :class:`set` and :class:" "`frozenset`. The :class:`set` type is mutable --- the contents can be " @@ -5248,18 +5274,18 @@ msgid "" "of another set." msgstr "" -#: ../../../library/stdtypes.rst:5047 +#: ../../../library/stdtypes.rst:5077 msgid "" "Non-empty sets (not frozensets) can be created by placing a comma-separated " "list of elements within braces, for example: ``{'jack', 'sjoerd'}``, in " "addition to the :class:`set` constructor." msgstr "" -#: ../../../library/stdtypes.rst:5051 +#: ../../../library/stdtypes.rst:5081 msgid "The constructors for both classes work the same:" msgstr "" -#: ../../../library/stdtypes.rst:5056 +#: ../../../library/stdtypes.rst:5086 msgid "" "Return a new set or frozenset object whose elements are taken from " "*iterable*. The elements of a set must be :term:`hashable`. To represent " @@ -5267,92 +5293,92 @@ msgid "" "*iterable* is not specified, a new empty set is returned." msgstr "" -#: ../../../library/stdtypes.rst:5062 +#: ../../../library/stdtypes.rst:5092 msgid "Sets can be created by several means:" msgstr "" -#: ../../../library/stdtypes.rst:5064 +#: ../../../library/stdtypes.rst:5094 msgid "" "Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``" msgstr "" -#: ../../../library/stdtypes.rst:5065 +#: ../../../library/stdtypes.rst:5095 msgid "" "Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``" msgstr "" -#: ../../../library/stdtypes.rst:5066 +#: ../../../library/stdtypes.rst:5096 msgid "" "Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', " "'foo'])``" msgstr "" -#: ../../../library/stdtypes.rst:5068 +#: ../../../library/stdtypes.rst:5098 msgid "" "Instances of :class:`set` and :class:`frozenset` provide the following " "operations:" msgstr "" -#: ../../../library/stdtypes.rst:5073 +#: ../../../library/stdtypes.rst:5103 msgid "Return the number of elements in set *s* (cardinality of *s*)." msgstr "" -#: ../../../library/stdtypes.rst:5077 +#: ../../../library/stdtypes.rst:5107 msgid "Test *x* for membership in *s*." msgstr "" -#: ../../../library/stdtypes.rst:5081 +#: ../../../library/stdtypes.rst:5111 msgid "Test *x* for non-membership in *s*." msgstr "" -#: ../../../library/stdtypes.rst:5086 +#: ../../../library/stdtypes.rst:5116 msgid "" "Return ``True`` if the set has no elements in common with *other*. Sets are " "disjoint if and only if their intersection is the empty set." msgstr "" -#: ../../../library/stdtypes.rst:5093 +#: ../../../library/stdtypes.rst:5123 msgid "Test whether every element in the set is in *other*." msgstr "" -#: ../../../library/stdtypes.rst:5097 +#: ../../../library/stdtypes.rst:5127 msgid "" "Test whether the set is a proper subset of *other*, that is, ``set <= other " "and set != other``." msgstr "" -#: ../../../library/stdtypes.rst:5104 +#: ../../../library/stdtypes.rst:5134 msgid "Test whether every element in *other* is in the set." msgstr "" -#: ../../../library/stdtypes.rst:5108 +#: ../../../library/stdtypes.rst:5138 msgid "" "Test whether the set is a proper superset of *other*, that is, ``set >= " "other and set != other``." msgstr "" -#: ../../../library/stdtypes.rst:5115 +#: ../../../library/stdtypes.rst:5145 msgid "Return a new set with elements from the set and all others." msgstr "" -#: ../../../library/stdtypes.rst:5121 +#: ../../../library/stdtypes.rst:5151 msgid "Return a new set with elements common to the set and all others." msgstr "" -#: ../../../library/stdtypes.rst:5127 +#: ../../../library/stdtypes.rst:5157 msgid "Return a new set with elements in the set that are not in the others." msgstr "" -#: ../../../library/stdtypes.rst:5133 +#: ../../../library/stdtypes.rst:5163 msgid "" "Return a new set with elements in either the set or *other* but not both." msgstr "" -#: ../../../library/stdtypes.rst:5138 +#: ../../../library/stdtypes.rst:5168 msgid "Return a shallow copy of the set." msgstr "" -#: ../../../library/stdtypes.rst:5141 +#: ../../../library/stdtypes.rst:5171 msgid "" "Note, the non-operator versions of :meth:`~frozenset.union`, :meth:" "`~frozenset.intersection`, :meth:`~frozenset.difference`, :meth:`~frozenset." @@ -5363,7 +5389,7 @@ msgid "" "the more readable ``set('abc').intersection('cbs')``." msgstr "" -#: ../../../library/stdtypes.rst:5148 +#: ../../../library/stdtypes.rst:5178 msgid "" "Both :class:`set` and :class:`frozenset` support set to set comparisons. Two " "sets are equal if and only if every element of each set is contained in the " @@ -5373,14 +5399,14 @@ msgid "" "set is a proper superset of the second set (is a superset, but is not equal)." msgstr "" -#: ../../../library/stdtypes.rst:5155 +#: ../../../library/stdtypes.rst:5185 msgid "" "Instances of :class:`set` are compared to instances of :class:`frozenset` " "based on their members. For example, ``set('abc') == frozenset('abc')`` " "returns ``True`` and so does ``set('abc') in set([frozenset('abc')])``." msgstr "" -#: ../../../library/stdtypes.rst:5159 +#: ../../../library/stdtypes.rst:5189 msgid "" "The subset and equality comparisons do not generalize to a total ordering " "function. For example, any two nonempty disjoint sets are not equal and are " @@ -5388,78 +5414,78 @@ msgid "" "``ab``." msgstr "" -#: ../../../library/stdtypes.rst:5164 +#: ../../../library/stdtypes.rst:5194 msgid "" "Since sets only define partial ordering (subset relationships), the output " "of the :meth:`list.sort` method is undefined for lists of sets." msgstr "" -#: ../../../library/stdtypes.rst:5167 +#: ../../../library/stdtypes.rst:5197 msgid "Set elements, like dictionary keys, must be :term:`hashable`." msgstr "" -#: ../../../library/stdtypes.rst:5169 +#: ../../../library/stdtypes.rst:5199 msgid "" "Binary operations that mix :class:`set` instances with :class:`frozenset` " "return the type of the first operand. For example: ``frozenset('ab') | " "set('bc')`` returns an instance of :class:`frozenset`." msgstr "" -#: ../../../library/stdtypes.rst:5173 +#: ../../../library/stdtypes.rst:5203 msgid "" "The following table lists operations available for :class:`set` that do not " "apply to immutable instances of :class:`frozenset`:" msgstr "" -#: ../../../library/stdtypes.rst:5179 +#: ../../../library/stdtypes.rst:5209 msgid "Update the set, adding elements from all others." msgstr "" -#: ../../../library/stdtypes.rst:5184 +#: ../../../library/stdtypes.rst:5214 msgid "Update the set, keeping only elements found in it and all others." msgstr "" -#: ../../../library/stdtypes.rst:5189 +#: ../../../library/stdtypes.rst:5219 msgid "Update the set, removing elements found in others." msgstr "" -#: ../../../library/stdtypes.rst:5194 +#: ../../../library/stdtypes.rst:5224 msgid "" "Update the set, keeping only elements found in either set, but not in both." msgstr "" -#: ../../../library/stdtypes.rst:5198 +#: ../../../library/stdtypes.rst:5228 msgid "Add element *elem* to the set." msgstr "" -#: ../../../library/stdtypes.rst:5202 +#: ../../../library/stdtypes.rst:5232 msgid "" "Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not " "contained in the set." msgstr "" -#: ../../../library/stdtypes.rst:5207 +#: ../../../library/stdtypes.rst:5237 msgid "Remove element *elem* from the set if it is present." msgstr "" -#: ../../../library/stdtypes.rst:5211 +#: ../../../library/stdtypes.rst:5241 msgid "" "Remove and return an arbitrary element from the set. Raises :exc:`KeyError` " "if the set is empty." msgstr "" -#: ../../../library/stdtypes.rst:5216 +#: ../../../library/stdtypes.rst:5246 msgid "Remove all elements from the set." msgstr "" -#: ../../../library/stdtypes.rst:5219 +#: ../../../library/stdtypes.rst:5249 msgid "" "Note, the non-operator versions of the :meth:`~set.update`, :meth:`~set." "intersection_update`, :meth:`~set.difference_update`, and :meth:`~set." "symmetric_difference_update` methods will accept any iterable as an argument." msgstr "" -#: ../../../library/stdtypes.rst:5224 +#: ../../../library/stdtypes.rst:5254 msgid "" "Note, the *elem* argument to the :meth:`~object.__contains__`, :meth:`~set." "remove`, and :meth:`~set.discard` methods may be a set. To support " @@ -5467,11 +5493,17 @@ msgid "" "*elem*." msgstr "" -#: ../../../library/stdtypes.rst:5233 +#: ../../../library/stdtypes.rst:5261 +msgid "" +"For detailed information on thread-safety guarantees for :class:`set` " +"objects, see :ref:`thread-safety-set`." +msgstr "" + +#: ../../../library/stdtypes.rst:5268 msgid "Mapping types --- :class:`!dict`, :class:`!frozendict`" msgstr "" -#: ../../../library/stdtypes.rst:5243 +#: ../../../library/stdtypes.rst:5278 msgid "" "A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. " "There are currently two standard mapping types, the :dfn:`dictionary` and :" @@ -5479,7 +5511,7 @@ msgid "" "class:`set`, and :class:`tuple` classes, and the :mod:`collections` module.)" msgstr "" -#: ../../../library/stdtypes.rst:5250 +#: ../../../library/stdtypes.rst:5285 msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -5488,33 +5520,33 @@ msgid "" "and ``True``) can be used interchangeably to index the same dictionary entry." msgstr "" -#: ../../../library/stdtypes.rst:5261 +#: ../../../library/stdtypes.rst:5296 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../../library/stdtypes.rst:5264 +#: ../../../library/stdtypes.rst:5299 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../../library/stdtypes.rst:5266 +#: ../../../library/stdtypes.rst:5301 msgid "" "Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': " "4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``" msgstr "" -#: ../../../library/stdtypes.rst:5268 +#: ../../../library/stdtypes.rst:5303 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../../library/stdtypes.rst:5269 +#: ../../../library/stdtypes.rst:5304 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../../library/stdtypes.rst:5272 +#: ../../../library/stdtypes.rst:5307 msgid "" "If no positional argument is given, an empty dictionary is created. If a " "positional argument is given and it defines a ``keys()`` method, a " @@ -5527,7 +5559,7 @@ msgid "" "that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5282 +#: ../../../library/stdtypes.rst:5317 msgid "" "If keyword arguments are given, the keyword arguments and their values are " "added to the dictionary created from the positional argument. If a key " @@ -5535,7 +5567,7 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../../library/stdtypes.rst:5287 +#: ../../../library/stdtypes.rst:5322 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " @@ -5544,45 +5576,45 @@ msgid "" "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../../library/stdtypes.rst:5302 +#: ../../../library/stdtypes.rst:5337 msgid "" "Providing keyword arguments as in the first example only works for keys that " "are valid Python identifiers. Otherwise, any valid keys can be used." msgstr "" -#: ../../../library/stdtypes.rst:5305 +#: ../../../library/stdtypes.rst:5340 msgid "" "Dictionaries preserve insertion order. Note that updating a key does not " "affect the order. Keys added after deletion are inserted at the end. ::" msgstr "" -#: ../../../library/stdtypes.rst:5323 +#: ../../../library/stdtypes.rst:5358 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../../library/stdtypes.rst:5327 +#: ../../../library/stdtypes.rst:5362 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../../library/stdtypes.rst:5332 +#: ../../../library/stdtypes.rst:5367 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../../library/stdtypes.rst:5336 +#: ../../../library/stdtypes.rst:5371 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../../library/stdtypes.rst:5340 +#: ../../../library/stdtypes.rst:5375 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../../library/stdtypes.rst:5345 +#: ../../../library/stdtypes.rst:5380 msgid "" "If a subclass of dict defines a method :meth:`~object.__missing__` and *key* " "is not present, the ``d[key]`` operation calls that method with the key " @@ -5593,51 +5625,51 @@ msgid "" "__missing__` must be a method; it cannot be an instance variable::" msgstr "" -#: ../../../library/stdtypes.rst:5364 +#: ../../../library/stdtypes.rst:5399 msgid "" "The example above shows part of the implementation of :class:`collections." "Counter`. A different :meth:`!__missing__` method is used by :class:" "`collections.defaultdict`." msgstr "" -#: ../../../library/stdtypes.rst:5371 +#: ../../../library/stdtypes.rst:5406 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../../library/stdtypes.rst:5375 +#: ../../../library/stdtypes.rst:5410 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../../library/stdtypes.rst:5380 +#: ../../../library/stdtypes.rst:5415 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../../library/stdtypes.rst:5384 +#: ../../../library/stdtypes.rst:5419 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../../library/stdtypes.rst:5388 +#: ../../../library/stdtypes.rst:5423 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../../library/stdtypes.rst:5393 +#: ../../../library/stdtypes.rst:5428 msgid "Remove all items from the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5397 +#: ../../../library/stdtypes.rst:5432 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5401 +#: ../../../library/stdtypes.rst:5436 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../../library/stdtypes.rst:5403 +#: ../../../library/stdtypes.rst:5438 msgid "" ":meth:`fromkeys` is a class method that returns a new dictionary. *value* " "defaults to ``None``. All of the values refer to just a single instance, so " @@ -5646,70 +5678,70 @@ msgid "" "` instead." msgstr "" -#: ../../../library/stdtypes.rst:5411 +#: ../../../library/stdtypes.rst:5446 msgid "" "Return the value for *key* if *key* is in the dictionary, else *default*. If " "*default* is not given, it defaults to ``None``, so that this method never " "raises a :exc:`KeyError`." msgstr "" -#: ../../../library/stdtypes.rst:5417 +#: ../../../library/stdtypes.rst:5452 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../../library/stdtypes.rst:5422 +#: ../../../library/stdtypes.rst:5457 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../../library/stdtypes.rst:5428 +#: ../../../library/stdtypes.rst:5463 msgid "" "If *key* is in the dictionary, remove it and return its value, else return " "*default*. If *default* is not given and *key* is not in the dictionary, a :" "exc:`KeyError` is raised." msgstr "" -#: ../../../library/stdtypes.rst:5434 +#: ../../../library/stdtypes.rst:5469 msgid "" "Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " "returned in :abbr:`LIFO (last-in, first-out)` order." msgstr "" -#: ../../../library/stdtypes.rst:5437 +#: ../../../library/stdtypes.rst:5472 msgid "" ":meth:`popitem` is useful to destructively iterate over a dictionary, as " "often used in set algorithms. If the dictionary is empty, calling :meth:" "`popitem` raises a :exc:`KeyError`." msgstr "" -#: ../../../library/stdtypes.rst:5441 +#: ../../../library/stdtypes.rst:5476 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../../library/stdtypes.rst:5447 +#: ../../../library/stdtypes.rst:5482 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../../library/stdtypes.rst:5454 +#: ../../../library/stdtypes.rst:5489 msgid "" "If *key* is in the dictionary, return its value. If not, insert *key* with " "a value of *default* and return *default*. *default* defaults to ``None``." msgstr "" -#: ../../../library/stdtypes.rst:5462 +#: ../../../library/stdtypes.rst:5497 msgid "" "Update the dictionary with the key/value pairs from *mapping* or *iterable* " "and *kwargs*, overwriting existing keys. Return ``None``." msgstr "" -#: ../../../library/stdtypes.rst:5465 +#: ../../../library/stdtypes.rst:5500 msgid "" ":meth:`update` accepts either another object with a ``keys()`` method (in " "which case :meth:`~object.__getitem__` is called with every key returned " @@ -5718,58 +5750,58 @@ msgid "" "is then updated with those key/value pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../../library/stdtypes.rst:5473 +#: ../../../library/stdtypes.rst:5508 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../../library/stdtypes.rst:5476 +#: ../../../library/stdtypes.rst:5511 msgid "" "An equality comparison between one ``dict.values()`` view and another will " "always return ``False``. This also applies when comparing ``dict.values()`` " "to itself::" msgstr "" -#: ../../../library/stdtypes.rst:5486 +#: ../../../library/stdtypes.rst:5521 msgid "" "Create a new dictionary with the merged keys and values of *d* and *other*, " "which must both be dictionaries. The values of *other* take priority when " "*d* and *other* share keys." msgstr "" -#: ../../../library/stdtypes.rst:5494 +#: ../../../library/stdtypes.rst:5529 msgid "" "Update the dictionary *d* with keys and values from *other*, which may be " "either a :term:`mapping` or an :term:`iterable` of key/value pairs. The " "values of *other* take priority when *d* and *other* share keys." msgstr "" -#: ../../../library/stdtypes.rst:5500 +#: ../../../library/stdtypes.rst:5535 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../../library/stdtypes.rst:5512 +#: ../../../library/stdtypes.rst:5547 msgid "Dictionaries are now reversible." msgstr "" -#: ../../../library/stdtypes.rst:5517 +#: ../../../library/stdtypes.rst:5552 msgid "" ":class:`frozendict` and :class:`types.MappingProxyType` can be used to " "create a read-only view of a :class:`dict`." msgstr "" -#: ../../../library/stdtypes.rst:5522 +#: ../../../library/stdtypes.rst:5557 msgid "" "For detailed information on thread-safety guarantees for :class:`dict` " "objects, see :ref:`thread-safety-dict`." msgstr "" -#: ../../../library/stdtypes.rst:5529 +#: ../../../library/stdtypes.rst:5564 msgid "Dictionary view objects" msgstr "" -#: ../../../library/stdtypes.rst:5531 +#: ../../../library/stdtypes.rst:5566 msgid "" "The objects returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:" "`dict.items` are *view objects*. They provide a dynamic view on the " @@ -5777,23 +5809,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../../library/stdtypes.rst:5536 +#: ../../../library/stdtypes.rst:5571 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../../library/stdtypes.rst:5541 +#: ../../../library/stdtypes.rst:5576 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5545 +#: ../../../library/stdtypes.rst:5580 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5548 +#: ../../../library/stdtypes.rst:5583 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -5801,39 +5833,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../../library/stdtypes.rst:5553 +#: ../../../library/stdtypes.rst:5588 msgid "" "Iterating views while adding or deleting entries in the dictionary may raise " "a :exc:`RuntimeError` or fail to iterate over all entries." msgstr "" -#: ../../../library/stdtypes.rst:5556 +#: ../../../library/stdtypes.rst:5591 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../../library/stdtypes.rst:5561 +#: ../../../library/stdtypes.rst:5596 msgid "" "Return ``True`` if *x* is in the underlying dictionary's keys, values or " "items (in the latter case, *x* should be a ``(key, value)`` tuple)." msgstr "" -#: ../../../library/stdtypes.rst:5566 +#: ../../../library/stdtypes.rst:5601 msgid "" "Return a reverse iterator over the keys, values or items of the dictionary. " "The view will be iterated in reverse order of the insertion." msgstr "" -#: ../../../library/stdtypes.rst:5569 +#: ../../../library/stdtypes.rst:5604 msgid "Dictionary views are now reversible." msgstr "" -#: ../../../library/stdtypes.rst:5574 +#: ../../../library/stdtypes.rst:5609 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../../library/stdtypes.rst:5579 +#: ../../../library/stdtypes.rst:5614 msgid "" "Keys views are set-like since their entries are unique and :term:`hashable`. " "Items views also have set-like operations since the (key, value) pairs are " @@ -5847,81 +5879,81 @@ msgid "" "input." msgstr "" -#: ../../../library/stdtypes.rst:5591 +#: ../../../library/stdtypes.rst:5626 msgid "An example of dictionary view usage::" msgstr "" -#: ../../../library/stdtypes.rst:5633 +#: ../../../library/stdtypes.rst:5668 msgid "Frozen dictionaries" msgstr "" -#: ../../../library/stdtypes.rst:5639 +#: ../../../library/stdtypes.rst:5674 msgid "" "Return a new frozen dictionary initialized from an optional positional " "argument and a possibly empty set of keyword arguments." msgstr "" -#: ../../../library/stdtypes.rst:5642 +#: ../../../library/stdtypes.rst:5677 msgid "" "A :class:`!frozendict` has a similar API to the :class:`dict` API, with the " "following differences:" msgstr "" -#: ../../../library/stdtypes.rst:5645 +#: ../../../library/stdtypes.rst:5680 msgid ":class:`!dict` has more methods than :class:`!frozendict`:" msgstr "" -#: ../../../library/stdtypes.rst:5647 +#: ../../../library/stdtypes.rst:5682 msgid ":meth:`!__delitem__`" msgstr "" -#: ../../../library/stdtypes.rst:5648 +#: ../../../library/stdtypes.rst:5683 msgid ":meth:`!__setitem__`" msgstr "" -#: ../../../library/stdtypes.rst:5649 +#: ../../../library/stdtypes.rst:5684 msgid ":meth:`~dict.clear`" msgstr "" -#: ../../../library/stdtypes.rst:5650 +#: ../../../library/stdtypes.rst:5685 msgid ":meth:`~dict.pop`" msgstr "" -#: ../../../library/stdtypes.rst:5651 +#: ../../../library/stdtypes.rst:5686 msgid ":meth:`~dict.popitem`" msgstr "" -#: ../../../library/stdtypes.rst:5652 +#: ../../../library/stdtypes.rst:5687 msgid ":meth:`~dict.setdefault`" msgstr "" -#: ../../../library/stdtypes.rst:5653 +#: ../../../library/stdtypes.rst:5688 msgid ":meth:`~dict.update`" msgstr "" -#: ../../../library/stdtypes.rst:5655 +#: ../../../library/stdtypes.rst:5690 msgid "" "A :class:`!frozendict` can be hashed with ``hash(frozendict)`` if all keys " "and values can be hashed." msgstr "" -#: ../../../library/stdtypes.rst:5658 +#: ../../../library/stdtypes.rst:5693 msgid "" "``frozendict |= other`` does not modify the :class:`!frozendict` in-place " "but creates a new frozen dictionary." msgstr "" -#: ../../../library/stdtypes.rst:5661 +#: ../../../library/stdtypes.rst:5696 msgid "" ":class:`!frozendict` is not a :class:`!dict` subclass but inherits directly " "from ``object``." msgstr "" -#: ../../../library/stdtypes.rst:5670 +#: ../../../library/stdtypes.rst:5705 msgid "Context Manager Types" msgstr "" -#: ../../../library/stdtypes.rst:5677 +#: ../../../library/stdtypes.rst:5712 msgid "" "Python's :keyword:`with` statement supports the concept of a runtime context " "defined by a context manager. This is implemented using a pair of methods " @@ -5929,7 +5961,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../../library/stdtypes.rst:5685 +#: ../../../library/stdtypes.rst:5720 msgid "" "Enter the runtime context and return either this object or another object " "related to the runtime context. The value returned by this method is bound " @@ -5937,14 +5969,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../../library/stdtypes.rst:5690 +#: ../../../library/stdtypes.rst:5725 msgid "" "An example of a context manager that returns itself is a :term:`file " "object`. File objects return themselves from __enter__() to allow :func:" "`open` to be used as the context expression in a :keyword:`with` statement." msgstr "" -#: ../../../library/stdtypes.rst:5694 +#: ../../../library/stdtypes.rst:5729 msgid "" "An example of a context manager that returns a related object is the one " "returned by :func:`decimal.localcontext`. These managers set the active " @@ -5954,7 +5986,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../../library/stdtypes.rst:5704 +#: ../../../library/stdtypes.rst:5739 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -5963,7 +5995,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../../library/stdtypes.rst:5709 +#: ../../../library/stdtypes.rst:5744 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -5971,14 +6003,14 @@ msgid "" "the exception continues propagating after this method has finished executing." msgstr "" -#: ../../../library/stdtypes.rst:5714 +#: ../../../library/stdtypes.rst:5749 msgid "" "If this method raises an exception while handling an earlier exception from " "the :keyword:`with` block, the new exception is raised, and the original " "exception is stored in its :attr:`~BaseException.__context__` attribute." msgstr "" -#: ../../../library/stdtypes.rst:5718 +#: ../../../library/stdtypes.rst:5753 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -5987,7 +6019,7 @@ msgid "" "__exit__` method has actually failed." msgstr "" -#: ../../../library/stdtypes.rst:5724 +#: ../../../library/stdtypes.rst:5759 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -5996,7 +6028,7 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../../library/stdtypes.rst:5730 +#: ../../../library/stdtypes.rst:5765 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -6006,7 +6038,7 @@ msgid "" "rather than the iterator produced by an undecorated generator function." msgstr "" -#: ../../../library/stdtypes.rst:5737 +#: ../../../library/stdtypes.rst:5772 msgid "" "Note that there is no specific slot for any of these methods in the type " "structure for Python objects in the Python/C API. Extension types wanting to " @@ -6015,23 +6047,23 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../../library/stdtypes.rst:5745 +#: ../../../library/stdtypes.rst:5780 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../../library/stdtypes.rst:5750 +#: ../../../library/stdtypes.rst:5785 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../../library/stdtypes.rst:5757 +#: ../../../library/stdtypes.rst:5792 msgid "Generic Alias Type" msgstr "" -#: ../../../library/stdtypes.rst:5763 +#: ../../../library/stdtypes.rst:5798 msgid "" "``GenericAlias`` objects are generally created by :ref:`subscripting " "` a class. They are most often used with :ref:`container " @@ -6041,19 +6073,19 @@ msgid "" "are intended primarily for use with :term:`type annotations `." msgstr "" -#: ../../../library/stdtypes.rst:5773 +#: ../../../library/stdtypes.rst:5808 msgid "" "It is generally only possible to subscript a class if the class implements " "the special method :meth:`~object.__class_getitem__`." msgstr "" -#: ../../../library/stdtypes.rst:5776 +#: ../../../library/stdtypes.rst:5811 msgid "" "A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " "implementing *parameterized generics*." msgstr "" -#: ../../../library/stdtypes.rst:5779 +#: ../../../library/stdtypes.rst:5814 msgid "" "For a container class, the argument(s) supplied to a :ref:`subscription " "` of the class may indicate the type(s) of the elements an " @@ -6062,7 +6094,7 @@ msgid "" "`bytes`." msgstr "" -#: ../../../library/stdtypes.rst:5785 +#: ../../../library/stdtypes.rst:5820 msgid "" "For a class which defines :meth:`~object.__class_getitem__` but is not a " "container, the argument(s) supplied to a subscription of the class will " @@ -6071,7 +6103,7 @@ msgid "" "the :class:`str` data type and the :class:`bytes` data type:" msgstr "" -#: ../../../library/stdtypes.rst:5791 +#: ../../../library/stdtypes.rst:5826 msgid "" "If ``x = re.search('foo', 'foo')``, ``x`` will be a :ref:`re.Match ` object where the return values of ``x.group(0)`` and ``x[0]`` will " @@ -6079,7 +6111,7 @@ msgid "" "annotations with the ``GenericAlias`` ``re.Match[str]``." msgstr "" -#: ../../../library/stdtypes.rst:5797 +#: ../../../library/stdtypes.rst:5832 msgid "" "If ``y = re.search(b'bar', b'bar')``, (note the ``b`` for :class:`bytes`), " "``y`` will also be an instance of ``re.Match``, but the return values of ``y." @@ -6088,21 +6120,21 @@ msgid "" "objects>` objects with ``re.Match[bytes]``." msgstr "" -#: ../../../library/stdtypes.rst:5803 +#: ../../../library/stdtypes.rst:5838 msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " "directly." msgstr "" -#: ../../../library/stdtypes.rst:5809 +#: ../../../library/stdtypes.rst:5844 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` parameterized by types " "*X*, *Y*, and more depending on the ``T`` used. For example, a function " "expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: ../../../library/stdtypes.rst:5817 +#: ../../../library/stdtypes.rst:5852 msgid "" "Another example for :term:`mapping` objects, using a :class:`dict`, which is " "a generic type expecting two type parameters representing the key type and " @@ -6110,13 +6142,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../../library/stdtypes.rst:5825 +#: ../../../library/stdtypes.rst:5860 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../../library/stdtypes.rst:5833 +#: ../../../library/stdtypes.rst:5868 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating a " @@ -6125,343 +6157,343 @@ msgid "" "discouraged, but will run without errors::" msgstr "" -#: ../../../library/stdtypes.rst:5843 +#: ../../../library/stdtypes.rst:5878 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../../library/stdtypes.rst:5854 +#: ../../../library/stdtypes.rst:5889 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../../library/stdtypes.rst:5862 +#: ../../../library/stdtypes.rst:5897 msgid "" "The :meth:`~object.__getitem__` method of generic containers will raise an " "exception to disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../../library/stdtypes.rst:5870 +#: ../../../library/stdtypes.rst:5905 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " "items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::" msgstr "" -#: ../../../library/stdtypes.rst:5881 +#: ../../../library/stdtypes.rst:5916 msgid "Standard Generic Classes" msgstr "" -#: ../../../library/stdtypes.rst:5883 +#: ../../../library/stdtypes.rst:5918 msgid "" "The following standard library classes support parameterized generics. This " "list is non-exhaustive." msgstr "" -#: ../../../library/stdtypes.rst:5886 +#: ../../../library/stdtypes.rst:5921 msgid ":class:`tuple`" msgstr "" -#: ../../../library/stdtypes.rst:5887 +#: ../../../library/stdtypes.rst:5922 msgid ":class:`list`" msgstr "" -#: ../../../library/stdtypes.rst:5888 +#: ../../../library/stdtypes.rst:5923 msgid ":class:`dict`" msgstr "" -#: ../../../library/stdtypes.rst:5889 +#: ../../../library/stdtypes.rst:5924 msgid ":class:`set`" msgstr "" -#: ../../../library/stdtypes.rst:5890 +#: ../../../library/stdtypes.rst:5925 msgid ":class:`frozendict`" msgstr "" -#: ../../../library/stdtypes.rst:5891 +#: ../../../library/stdtypes.rst:5926 msgid ":class:`frozenset`" msgstr "" -#: ../../../library/stdtypes.rst:5892 +#: ../../../library/stdtypes.rst:5927 msgid ":class:`type`" msgstr "" -#: ../../../library/stdtypes.rst:5893 +#: ../../../library/stdtypes.rst:5928 msgid ":class:`asyncio.Future`" msgstr "" -#: ../../../library/stdtypes.rst:5894 +#: ../../../library/stdtypes.rst:5929 msgid ":class:`asyncio.Task`" msgstr "" -#: ../../../library/stdtypes.rst:5895 +#: ../../../library/stdtypes.rst:5930 msgid ":class:`collections.deque`" msgstr "" -#: ../../../library/stdtypes.rst:5896 +#: ../../../library/stdtypes.rst:5931 msgid ":class:`collections.defaultdict`" msgstr "" -#: ../../../library/stdtypes.rst:5897 +#: ../../../library/stdtypes.rst:5932 msgid ":class:`collections.OrderedDict`" msgstr "" -#: ../../../library/stdtypes.rst:5898 +#: ../../../library/stdtypes.rst:5933 msgid ":class:`collections.Counter`" msgstr "" -#: ../../../library/stdtypes.rst:5899 +#: ../../../library/stdtypes.rst:5934 msgid ":class:`collections.ChainMap`" msgstr "" -#: ../../../library/stdtypes.rst:5900 +#: ../../../library/stdtypes.rst:5935 msgid ":class:`collections.abc.Awaitable`" msgstr "" -#: ../../../library/stdtypes.rst:5901 +#: ../../../library/stdtypes.rst:5936 msgid ":class:`collections.abc.Coroutine`" msgstr "" -#: ../../../library/stdtypes.rst:5902 +#: ../../../library/stdtypes.rst:5937 msgid ":class:`collections.abc.AsyncIterable`" msgstr "" -#: ../../../library/stdtypes.rst:5903 +#: ../../../library/stdtypes.rst:5938 msgid ":class:`collections.abc.AsyncIterator`" msgstr "" -#: ../../../library/stdtypes.rst:5904 +#: ../../../library/stdtypes.rst:5939 msgid ":class:`collections.abc.AsyncGenerator`" msgstr "" -#: ../../../library/stdtypes.rst:5905 +#: ../../../library/stdtypes.rst:5940 msgid ":class:`collections.abc.Iterable`" msgstr "" -#: ../../../library/stdtypes.rst:5906 +#: ../../../library/stdtypes.rst:5941 msgid ":class:`collections.abc.Iterator`" msgstr "" -#: ../../../library/stdtypes.rst:5907 +#: ../../../library/stdtypes.rst:5942 msgid ":class:`collections.abc.Generator`" msgstr "" -#: ../../../library/stdtypes.rst:5908 +#: ../../../library/stdtypes.rst:5943 msgid ":class:`collections.abc.Reversible`" msgstr "" -#: ../../../library/stdtypes.rst:5909 +#: ../../../library/stdtypes.rst:5944 msgid ":class:`collections.abc.Container`" msgstr "" -#: ../../../library/stdtypes.rst:5910 +#: ../../../library/stdtypes.rst:5945 msgid ":class:`collections.abc.Collection`" msgstr "" -#: ../../../library/stdtypes.rst:5911 +#: ../../../library/stdtypes.rst:5946 msgid ":class:`collections.abc.Callable`" msgstr "" -#: ../../../library/stdtypes.rst:5912 +#: ../../../library/stdtypes.rst:5947 msgid ":class:`collections.abc.Set`" msgstr "" -#: ../../../library/stdtypes.rst:5913 +#: ../../../library/stdtypes.rst:5948 msgid ":class:`collections.abc.MutableSet`" msgstr "" -#: ../../../library/stdtypes.rst:5914 +#: ../../../library/stdtypes.rst:5949 msgid ":class:`collections.abc.Mapping`" msgstr "" -#: ../../../library/stdtypes.rst:5915 +#: ../../../library/stdtypes.rst:5950 msgid ":class:`collections.abc.MutableMapping`" msgstr "" -#: ../../../library/stdtypes.rst:5916 +#: ../../../library/stdtypes.rst:5951 msgid ":class:`collections.abc.Sequence`" msgstr "" -#: ../../../library/stdtypes.rst:5917 +#: ../../../library/stdtypes.rst:5952 msgid ":class:`collections.abc.MutableSequence`" msgstr "" -#: ../../../library/stdtypes.rst:5918 +#: ../../../library/stdtypes.rst:5953 msgid ":class:`collections.abc.ByteString`" msgstr "" -#: ../../../library/stdtypes.rst:5919 +#: ../../../library/stdtypes.rst:5954 msgid ":class:`collections.abc.MappingView`" msgstr "" -#: ../../../library/stdtypes.rst:5920 +#: ../../../library/stdtypes.rst:5955 msgid ":class:`collections.abc.KeysView`" msgstr "" -#: ../../../library/stdtypes.rst:5921 +#: ../../../library/stdtypes.rst:5956 msgid ":class:`collections.abc.ItemsView`" msgstr "" -#: ../../../library/stdtypes.rst:5922 +#: ../../../library/stdtypes.rst:5957 msgid ":class:`collections.abc.ValuesView`" msgstr "" -#: ../../../library/stdtypes.rst:5923 +#: ../../../library/stdtypes.rst:5958 msgid ":class:`contextlib.AbstractContextManager`" msgstr "" -#: ../../../library/stdtypes.rst:5924 +#: ../../../library/stdtypes.rst:5959 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr "" -#: ../../../library/stdtypes.rst:5925 +#: ../../../library/stdtypes.rst:5960 msgid ":class:`dataclasses.Field`" msgstr "" -#: ../../../library/stdtypes.rst:5926 +#: ../../../library/stdtypes.rst:5961 msgid ":class:`functools.cached_property`" msgstr "" -#: ../../../library/stdtypes.rst:5927 +#: ../../../library/stdtypes.rst:5962 msgid ":class:`functools.partialmethod`" msgstr "" -#: ../../../library/stdtypes.rst:5928 +#: ../../../library/stdtypes.rst:5963 msgid ":class:`os.PathLike`" msgstr "" -#: ../../../library/stdtypes.rst:5929 +#: ../../../library/stdtypes.rst:5964 msgid ":class:`queue.LifoQueue`" msgstr "" -#: ../../../library/stdtypes.rst:5930 +#: ../../../library/stdtypes.rst:5965 msgid ":class:`queue.Queue`" msgstr "" -#: ../../../library/stdtypes.rst:5931 +#: ../../../library/stdtypes.rst:5966 msgid ":class:`queue.PriorityQueue`" msgstr "" -#: ../../../library/stdtypes.rst:5932 +#: ../../../library/stdtypes.rst:5967 msgid ":class:`queue.SimpleQueue`" msgstr "" -#: ../../../library/stdtypes.rst:5933 +#: ../../../library/stdtypes.rst:5968 msgid ":ref:`re.Pattern `" msgstr "" -#: ../../../library/stdtypes.rst:5934 +#: ../../../library/stdtypes.rst:5969 msgid ":ref:`re.Match `" msgstr "" -#: ../../../library/stdtypes.rst:5935 +#: ../../../library/stdtypes.rst:5970 msgid ":class:`shelve.BsdDbShelf`" msgstr "" -#: ../../../library/stdtypes.rst:5936 +#: ../../../library/stdtypes.rst:5971 msgid ":class:`shelve.DbfilenameShelf`" msgstr "" -#: ../../../library/stdtypes.rst:5937 +#: ../../../library/stdtypes.rst:5972 msgid ":class:`shelve.Shelf`" msgstr "" -#: ../../../library/stdtypes.rst:5938 +#: ../../../library/stdtypes.rst:5973 msgid ":class:`types.MappingProxyType`" msgstr "" -#: ../../../library/stdtypes.rst:5939 +#: ../../../library/stdtypes.rst:5974 msgid ":class:`weakref.WeakKeyDictionary`" msgstr "" -#: ../../../library/stdtypes.rst:5940 +#: ../../../library/stdtypes.rst:5975 msgid ":class:`weakref.WeakMethod`" msgstr "" -#: ../../../library/stdtypes.rst:5941 +#: ../../../library/stdtypes.rst:5976 msgid ":class:`weakref.WeakSet`" msgstr "" -#: ../../../library/stdtypes.rst:5942 +#: ../../../library/stdtypes.rst:5977 msgid ":class:`weakref.WeakValueDictionary`" msgstr "" -#: ../../../library/stdtypes.rst:5947 +#: ../../../library/stdtypes.rst:5982 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "" -#: ../../../library/stdtypes.rst:5949 +#: ../../../library/stdtypes.rst:5984 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../../library/stdtypes.rst:5953 +#: ../../../library/stdtypes.rst:5988 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../../library/stdtypes.rst:5961 +#: ../../../library/stdtypes.rst:5996 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`~object.__class_getitem__` of the generic " "class::" msgstr "" -#: ../../../library/stdtypes.rst:5971 +#: ../../../library/stdtypes.rst:6006 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../../library/stdtypes.rst:5982 +#: ../../../library/stdtypes.rst:6017 msgid "" "A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not " "have correct ``__parameters__`` after substitution because :class:`typing." "ParamSpec` is intended primarily for static type checking." msgstr "" -#: ../../../library/stdtypes.rst:5989 +#: ../../../library/stdtypes.rst:6024 msgid "" "A boolean that is true if the alias has been unpacked using the ``*`` " "operator (see :data:`~typing.TypeVarTuple`)." msgstr "" -#: ../../../library/stdtypes.rst:5997 +#: ../../../library/stdtypes.rst:6032 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../../library/stdtypes.rst:5998 +#: ../../../library/stdtypes.rst:6033 msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../../library/stdtypes.rst:6000 +#: ../../../library/stdtypes.rst:6035 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../../library/stdtypes.rst:6001 +#: ../../../library/stdtypes.rst:6036 msgid "" "Introducing the ability to natively parameterize standard-library classes, " "provided they implement the special class method :meth:`~object." "__class_getitem__`." msgstr "" -#: ../../../library/stdtypes.rst:6005 +#: ../../../library/stdtypes.rst:6040 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" msgstr "" -#: ../../../library/stdtypes.rst:6006 +#: ../../../library/stdtypes.rst:6041 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../../library/stdtypes.rst:6015 +#: ../../../library/stdtypes.rst:6050 msgid "Union Type" msgstr "" -#: ../../../library/stdtypes.rst:6021 +#: ../../../library/stdtypes.rst:6056 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -6470,7 +6502,7 @@ msgid "" "class:`typing.Union`." msgstr "" -#: ../../../library/stdtypes.rst:6028 +#: ../../../library/stdtypes.rst:6063 msgid "" "Defines a union object which holds types *X*, *Y*, and so forth. ``X | Y`` " "means either X or Y. It is equivalent to ``typing.Union[X, Y]``. For " @@ -6478,7 +6510,7 @@ msgid "" "class:`float`::" msgstr "" -#: ../../../library/stdtypes.rst:6038 +#: ../../../library/stdtypes.rst:6073 msgid "" "The ``|`` operand cannot be used at runtime to define unions where one or " "more members is a forward reference. For example, ``int | \"Foo\"``, where " @@ -6487,82 +6519,82 @@ msgid "" "a string, e.g. ``\"int | Foo\"``." msgstr "" -#: ../../../library/stdtypes.rst:6046 +#: ../../../library/stdtypes.rst:6081 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../../library/stdtypes.rst:6048 +#: ../../../library/stdtypes.rst:6083 msgid "Unions of unions are flattened::" msgstr "" -#: ../../../library/stdtypes.rst:6052 +#: ../../../library/stdtypes.rst:6087 msgid "Redundant types are removed::" msgstr "" -#: ../../../library/stdtypes.rst:6056 +#: ../../../library/stdtypes.rst:6091 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../../library/stdtypes.rst:6060 +#: ../../../library/stdtypes.rst:6095 msgid "It creates instances of :class:`typing.Union`::" msgstr "" -#: ../../../library/stdtypes.rst:6065 +#: ../../../library/stdtypes.rst:6100 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../../library/stdtypes.rst:6072 +#: ../../../library/stdtypes.rst:6107 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../../library/stdtypes.rst:6078 +#: ../../../library/stdtypes.rst:6113 msgid "" "However, :ref:`parameterized generics ` in union objects " "cannot be checked::" msgstr "" -#: ../../../library/stdtypes.rst:6088 +#: ../../../library/stdtypes.rst:6123 msgid "" "The user-exposed type for the union object can be accessed from :class:" "`typing.Union` and used for :func:`isinstance` checks::" msgstr "" -#: ../../../library/stdtypes.rst:6100 +#: ../../../library/stdtypes.rst:6135 msgid "" "The :meth:`!__or__` method for type objects was added to support the syntax " "``X | Y``. If a metaclass implements :meth:`!__or__`, the Union may " "override it:" msgstr "" -#: ../../../library/stdtypes.rst:6120 +#: ../../../library/stdtypes.rst:6155 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../../library/stdtypes.rst:6126 +#: ../../../library/stdtypes.rst:6161 msgid "" "Union objects are now instances of :class:`typing.Union`. Previously, they " "were instances of :class:`types.UnionType`, which remains an alias for :" "class:`typing.Union`." msgstr "" -#: ../../../library/stdtypes.rst:6133 +#: ../../../library/stdtypes.rst:6168 msgid "Other Built-in Types" msgstr "" -#: ../../../library/stdtypes.rst:6135 +#: ../../../library/stdtypes.rst:6170 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../../library/stdtypes.rst:6142 +#: ../../../library/stdtypes.rst:6177 msgid "Modules" msgstr "" -#: ../../../library/stdtypes.rst:6144 +#: ../../../library/stdtypes.rst:6179 msgid "" "The only special operation on a module is attribute access: ``m.name``, " "where *m* is a module and *name* accesses a name defined in *m*'s symbol " @@ -6573,7 +6605,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../../library/stdtypes.rst:6151 +#: ../../../library/stdtypes.rst:6186 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -6584,32 +6616,32 @@ msgid "" "recommended." msgstr "" -#: ../../../library/stdtypes.rst:6159 +#: ../../../library/stdtypes.rst:6194 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../../library/stdtypes.rst:6167 +#: ../../../library/stdtypes.rst:6202 msgid "Classes and Class Instances" msgstr "" -#: ../../../library/stdtypes.rst:6169 +#: ../../../library/stdtypes.rst:6204 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../../library/stdtypes.rst:6175 +#: ../../../library/stdtypes.rst:6210 msgid "Functions" msgstr "" -#: ../../../library/stdtypes.rst:6177 +#: ../../../library/stdtypes.rst:6212 msgid "" "Function objects are created by function definitions. The only operation on " "a function object is to call it: ``func(argument-list)``." msgstr "" -#: ../../../library/stdtypes.rst:6180 +#: ../../../library/stdtypes.rst:6215 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -6617,15 +6649,15 @@ msgid "" "types." msgstr "" -#: ../../../library/stdtypes.rst:6184 +#: ../../../library/stdtypes.rst:6219 msgid "See :ref:`function` for more information." msgstr "" -#: ../../../library/stdtypes.rst:6190 +#: ../../../library/stdtypes.rst:6225 msgid "Methods" msgstr "" -#: ../../../library/stdtypes.rst:6194 +#: ../../../library/stdtypes.rst:6229 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: :ref:`built-in methods ` (such as :meth:" @@ -6633,7 +6665,7 @@ msgid "" "methods>`. Built-in methods are described with the types that support them." msgstr "" -#: ../../../library/stdtypes.rst:6200 +#: ../../../library/stdtypes.rst:6235 msgid "" "If you access a method (a function defined in a class namespace) through an " "instance, you get a special object: a :dfn:`bound method` (also called :ref:" @@ -6646,7 +6678,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../../library/stdtypes.rst:6211 +#: ../../../library/stdtypes.rst:6246 msgid "" "Like :ref:`function objects `, bound method objects " "support getting arbitrary attributes. However, since method attributes are " @@ -6657,15 +6689,15 @@ msgid "" "underlying function object:" msgstr "" -#: ../../../library/stdtypes.rst:6234 +#: ../../../library/stdtypes.rst:6269 msgid "See :ref:`instance-methods` for more information." msgstr "" -#: ../../../library/stdtypes.rst:6242 +#: ../../../library/stdtypes.rst:6277 msgid "Code Objects" msgstr "" -#: ../../../library/stdtypes.rst:6248 +#: ../../../library/stdtypes.rst:6283 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -6675,28 +6707,28 @@ msgid "" "`~function.__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../../library/stdtypes.rst:6255 +#: ../../../library/stdtypes.rst:6290 msgid "" "Accessing :attr:`~function.__code__` raises an :ref:`auditing event " "` ``object.__getattr__`` with arguments ``obj`` and " "``\"__code__\"``." msgstr "" -#: ../../../library/stdtypes.rst:6262 +#: ../../../library/stdtypes.rst:6297 msgid "" "A code object can be executed or evaluated by passing it (instead of a " "source string) to the :func:`exec` or :func:`eval` built-in functions." msgstr "" -#: ../../../library/stdtypes.rst:6265 +#: ../../../library/stdtypes.rst:6300 msgid "See :ref:`types` for more information." msgstr "" -#: ../../../library/stdtypes.rst:6271 +#: ../../../library/stdtypes.rst:6306 msgid "Type Objects" msgstr "" -#: ../../../library/stdtypes.rst:6277 +#: ../../../library/stdtypes.rst:6312 msgid "" "Type objects represent the various object types. An object's type is " "accessed by the built-in function :func:`type`. There are no special " @@ -6704,30 +6736,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../../library/stdtypes.rst:6282 +#: ../../../library/stdtypes.rst:6317 msgid "Types are written like this: ````." msgstr "" -#: ../../../library/stdtypes.rst:6288 +#: ../../../library/stdtypes.rst:6323 msgid "The Null Object" msgstr "" -#: ../../../library/stdtypes.rst:6290 +#: ../../../library/stdtypes.rst:6325 msgid "" "This object is returned by functions that don't explicitly return a value. " "It supports no special operations. There is exactly one null object, named " "``None`` (a built-in name). ``type(None)()`` produces the same singleton." msgstr "" -#: ../../../library/stdtypes.rst:6294 +#: ../../../library/stdtypes.rst:6329 msgid "It is written as ``None``." msgstr "" -#: ../../../library/stdtypes.rst:6301 +#: ../../../library/stdtypes.rst:6336 msgid "The Ellipsis Object" msgstr "" -#: ../../../library/stdtypes.rst:6303 +#: ../../../library/stdtypes.rst:6338 msgid "" "This object is commonly used to indicate that something is omitted. It " "supports no special operations. There is exactly one ellipsis object, " @@ -6735,63 +6767,63 @@ msgid "" "the :const:`Ellipsis` singleton." msgstr "" -#: ../../../library/stdtypes.rst:6308 +#: ../../../library/stdtypes.rst:6343 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../../library/stdtypes.rst:6310 +#: ../../../library/stdtypes.rst:6345 msgid "" "In typical use, ``...`` as the ``Ellipsis`` object appears in a few " "different places, for instance:" msgstr "" -#: ../../../library/stdtypes.rst:6313 +#: ../../../library/stdtypes.rst:6348 msgid "" "In type annotations, such as :ref:`callable arguments ` or :ref:`tuple elements `." msgstr "" -#: ../../../library/stdtypes.rst:6316 +#: ../../../library/stdtypes.rst:6351 msgid "" "As the body of a function instead of a :ref:`pass statement `." msgstr "" -#: ../../../library/stdtypes.rst:6318 +#: ../../../library/stdtypes.rst:6353 msgid "" "In third-party libraries, such as `Numpy's slicing and striding `_." msgstr "" -#: ../../../library/stdtypes.rst:6321 +#: ../../../library/stdtypes.rst:6356 msgid "" "Python also uses three dots in ways that are not ``Ellipsis`` objects, for " "instance:" msgstr "" -#: ../../../library/stdtypes.rst:6323 +#: ../../../library/stdtypes.rst:6358 msgid "" "Doctest's :const:`ELLIPSIS `, as a pattern for missing " "content." msgstr "" -#: ../../../library/stdtypes.rst:6325 +#: ../../../library/stdtypes.rst:6360 msgid "" "The default Python prompt of the :term:`interactive` shell when partial " "input is incomplete." msgstr "" -#: ../../../library/stdtypes.rst:6327 +#: ../../../library/stdtypes.rst:6362 msgid "" "Lastly, the Python documentation often uses three dots in conventional " "English usage to mean omitted content, even in code examples that also use " "them as the ``Ellipsis``." msgstr "" -#: ../../../library/stdtypes.rst:6335 +#: ../../../library/stdtypes.rst:6370 msgid "The NotImplemented Object" msgstr "" -#: ../../../library/stdtypes.rst:6337 +#: ../../../library/stdtypes.rst:6372 msgid "" "This object is returned from comparisons and binary operations when they are " "asked to operate on types they don't support. See :ref:`comparisons` for " @@ -6799,64 +6831,64 @@ msgid "" "`type(NotImplemented)()` produces the singleton instance." msgstr "" -#: ../../../library/stdtypes.rst:6342 +#: ../../../library/stdtypes.rst:6377 msgid "It is written as :code:`NotImplemented`." msgstr "" -#: ../../../library/stdtypes.rst:6348 +#: ../../../library/stdtypes.rst:6383 msgid "Internal Objects" msgstr "" -#: ../../../library/stdtypes.rst:6350 +#: ../../../library/stdtypes.rst:6385 msgid "" "See :ref:`types` for this information. It describes :ref:`stack frame " "objects `, :ref:`traceback objects `, and " "slice objects." msgstr "" -#: ../../../library/stdtypes.rst:6358 +#: ../../../library/stdtypes.rst:6393 msgid "Special Attributes" msgstr "" -#: ../../../library/stdtypes.rst:6360 +#: ../../../library/stdtypes.rst:6395 msgid "" "The implementation adds a few special read-only attributes to several object " "types, where they are relevant. Some of these are not reported by the :func:" "`dir` built-in function." msgstr "" -#: ../../../library/stdtypes.rst:6367 +#: ../../../library/stdtypes.rst:6402 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../../library/stdtypes.rst:6373 +#: ../../../library/stdtypes.rst:6408 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../../library/stdtypes.rst:6381 +#: ../../../library/stdtypes.rst:6416 msgid "The name of the module in which a class or function was defined." msgstr "" -#: ../../../library/stdtypes.rst:6386 +#: ../../../library/stdtypes.rst:6421 msgid "" "The documentation string of a class or function, or ``None`` if undefined." msgstr "" -#: ../../../library/stdtypes.rst:6391 +#: ../../../library/stdtypes.rst:6426 msgid "" "The :ref:`type parameters ` of generic classes, functions, and :" "ref:`type aliases `. For classes and functions that are not " "generic, this will be an empty tuple." msgstr "" -#: ../../../library/stdtypes.rst:6401 +#: ../../../library/stdtypes.rst:6436 msgid "Integer string conversion length limitation" msgstr "" -#: ../../../library/stdtypes.rst:6403 +#: ../../../library/stdtypes.rst:6438 msgid "" "CPython has a global limit for converting between :class:`int` and :class:" "`str` to mitigate denial of service attacks. This limit *only* applies to " @@ -6864,7 +6896,7 @@ msgid "" "binary conversions are unlimited. The limit can be configured." msgstr "" -#: ../../../library/stdtypes.rst:6408 +#: ../../../library/stdtypes.rst:6443 msgid "" "The :class:`int` type in CPython is an arbitrary length number stored in " "binary form (commonly known as a \"bignum\"). There exists no algorithm that " @@ -6874,24 +6906,24 @@ msgid "" "value such as ``int('1' * 500_000)`` can take over a second on a fast CPU." msgstr "" -#: ../../../library/stdtypes.rst:6415 +#: ../../../library/stdtypes.rst:6450 msgid "" "Limiting conversion size offers a practical way to avoid :cve:`2020-10735`." msgstr "" -#: ../../../library/stdtypes.rst:6417 +#: ../../../library/stdtypes.rst:6452 msgid "" "The limit is applied to the number of digit characters in the input or " "output string when a non-linear conversion algorithm would be involved. " "Underscores and the sign are not counted towards the limit." msgstr "" -#: ../../../library/stdtypes.rst:6421 +#: ../../../library/stdtypes.rst:6456 msgid "" "When an operation would exceed the limit, a :exc:`ValueError` is raised:" msgstr "" -#: ../../../library/stdtypes.rst:6443 +#: ../../../library/stdtypes.rst:6478 msgid "" "The default limit is 4300 digits as provided in :data:`sys.int_info." "default_max_str_digits `. The lowest limit that can be " @@ -6899,94 +6931,94 @@ msgid "" "str_digits_check_threshold `." msgstr "" -#: ../../../library/stdtypes.rst:6448 +#: ../../../library/stdtypes.rst:6483 msgid "Verification:" msgstr "" -#: ../../../library/stdtypes.rst:6463 +#: ../../../library/stdtypes.rst:6498 msgid "Affected APIs" msgstr "" -#: ../../../library/stdtypes.rst:6465 +#: ../../../library/stdtypes.rst:6500 msgid "" "The limitation only applies to potentially slow conversions between :class:" "`int` and :class:`str` or :class:`bytes`:" msgstr "" -#: ../../../library/stdtypes.rst:6468 +#: ../../../library/stdtypes.rst:6503 msgid "``int(string)`` with default base 10." msgstr "" -#: ../../../library/stdtypes.rst:6469 +#: ../../../library/stdtypes.rst:6504 msgid "``int(string, base)`` for all bases that are not a power of 2." msgstr "" -#: ../../../library/stdtypes.rst:6470 +#: ../../../library/stdtypes.rst:6505 msgid "``str(integer)``." msgstr "" -#: ../../../library/stdtypes.rst:6471 +#: ../../../library/stdtypes.rst:6506 msgid "``repr(integer)``." msgstr "" -#: ../../../library/stdtypes.rst:6472 +#: ../../../library/stdtypes.rst:6507 msgid "" "any other string conversion to base 10, for example ``f\"{integer}\"``, " "``\"{}\".format(integer)``, or ``b\"%d\" % integer``." msgstr "" -#: ../../../library/stdtypes.rst:6475 +#: ../../../library/stdtypes.rst:6510 msgid "The limitations do not apply to functions with a linear algorithm:" msgstr "" -#: ../../../library/stdtypes.rst:6477 +#: ../../../library/stdtypes.rst:6512 msgid "``int(string, base)`` with base 2, 4, 8, 16, or 32." msgstr "" -#: ../../../library/stdtypes.rst:6478 +#: ../../../library/stdtypes.rst:6513 msgid ":func:`int.from_bytes` and :func:`int.to_bytes`." msgstr "" -#: ../../../library/stdtypes.rst:6479 +#: ../../../library/stdtypes.rst:6514 msgid ":func:`hex`, :func:`oct`, :func:`bin`." msgstr "" -#: ../../../library/stdtypes.rst:6480 +#: ../../../library/stdtypes.rst:6515 msgid ":ref:`formatspec` for hex, octal, and binary numbers." msgstr "" -#: ../../../library/stdtypes.rst:6481 +#: ../../../library/stdtypes.rst:6516 msgid ":class:`str` to :class:`float`." msgstr "" -#: ../../../library/stdtypes.rst:6482 +#: ../../../library/stdtypes.rst:6517 msgid ":class:`str` to :class:`decimal.Decimal`." msgstr "" -#: ../../../library/stdtypes.rst:6485 +#: ../../../library/stdtypes.rst:6520 msgid "Configuring the limit" msgstr "" -#: ../../../library/stdtypes.rst:6487 +#: ../../../library/stdtypes.rst:6522 msgid "" "Before Python starts up you can use an environment variable or an " "interpreter command line flag to configure the limit:" msgstr "" -#: ../../../library/stdtypes.rst:6490 +#: ../../../library/stdtypes.rst:6525 msgid "" ":envvar:`PYTHONINTMAXSTRDIGITS`, e.g. ``PYTHONINTMAXSTRDIGITS=640 python3`` " "to set the limit to 640 or ``PYTHONINTMAXSTRDIGITS=0 python3`` to disable " "the limitation." msgstr "" -#: ../../../library/stdtypes.rst:6493 +#: ../../../library/stdtypes.rst:6528 msgid "" ":option:`-X int_max_str_digits <-X>`, e.g. ``python3 -X " "int_max_str_digits=640``" msgstr "" -#: ../../../library/stdtypes.rst:6495 +#: ../../../library/stdtypes.rst:6530 msgid "" ":data:`sys.flags.int_max_str_digits` contains the value of :envvar:" "`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`. If both the " @@ -6995,38 +7027,38 @@ msgid "" "int_info.default_max_str_digits` was used during initialization." msgstr "" -#: ../../../library/stdtypes.rst:6501 +#: ../../../library/stdtypes.rst:6536 msgid "" "From code, you can inspect the current limit and set a new one using these :" "mod:`sys` APIs:" msgstr "" -#: ../../../library/stdtypes.rst:6504 +#: ../../../library/stdtypes.rst:6539 msgid "" ":func:`sys.get_int_max_str_digits` and :func:`sys.set_int_max_str_digits` " "are a getter and setter for the interpreter-wide limit. Subinterpreters have " "their own limit." msgstr "" -#: ../../../library/stdtypes.rst:6508 +#: ../../../library/stdtypes.rst:6543 msgid "" "Information about the default and minimum can be found in :data:`sys." "int_info`:" msgstr "" -#: ../../../library/stdtypes.rst:6510 +#: ../../../library/stdtypes.rst:6545 msgid "" ":data:`sys.int_info.default_max_str_digits ` is the compiled-" "in default limit." msgstr "" -#: ../../../library/stdtypes.rst:6512 +#: ../../../library/stdtypes.rst:6547 msgid "" ":data:`sys.int_info.str_digits_check_threshold ` is the lowest " "accepted value for the limit (other than 0 which disables it)." msgstr "" -#: ../../../library/stdtypes.rst:6519 +#: ../../../library/stdtypes.rst:6554 msgid "" "Setting a low limit *can* lead to problems. While rare, code exists that " "contains integer constants in decimal in their source that exceed the " @@ -7038,7 +7070,7 @@ msgid "" "constants is to convert them to ``0x`` hexadecimal form as it has no limit." msgstr "" -#: ../../../library/stdtypes.rst:6528 +#: ../../../library/stdtypes.rst:6563 msgid "" "Test your application thoroughly if you use a low limit. Ensure your tests " "run with the limit set early via the environment or flag so that it applies " @@ -7046,11 +7078,11 @@ msgid "" "to precompile ``.py`` sources to ``.pyc`` files." msgstr "" -#: ../../../library/stdtypes.rst:6534 +#: ../../../library/stdtypes.rst:6569 msgid "Recommended configuration" msgstr "" -#: ../../../library/stdtypes.rst:6536 +#: ../../../library/stdtypes.rst:6571 msgid "" "The default :data:`sys.int_info.default_max_str_digits` is expected to be " "reasonable for most applications. If your application requires a different " @@ -7058,42 +7090,42 @@ msgid "" "as these APIs were added in security patch releases in versions before 3.12." msgstr "" -#: ../../../library/stdtypes.rst:6541 +#: ../../../library/stdtypes.rst:6576 msgid "Example::" msgstr "" -#: ../../../library/stdtypes.rst:6553 +#: ../../../library/stdtypes.rst:6588 msgid "If you need to disable it entirely, set it to ``0``." msgstr "" -#: ../../../library/stdtypes.rst:6557 +#: ../../../library/stdtypes.rst:6592 msgid "Footnotes" msgstr "" -#: ../../../library/stdtypes.rst:6558 +#: ../../../library/stdtypes.rst:6593 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../../library/stdtypes.rst:6561 +#: ../../../library/stdtypes.rst:6596 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../../library/stdtypes.rst:6564 +#: ../../../library/stdtypes.rst:6599 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../../library/stdtypes.rst:6566 +#: ../../../library/stdtypes.rst:6601 msgid "" "Cased characters are those with general category property being one of " "\"Lu\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " "titlecase)." msgstr "" -#: ../../../library/stdtypes.rst:6569 +#: ../../../library/stdtypes.rst:6604 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." @@ -7106,13 +7138,13 @@ msgstr "" #: ../../../library/stdtypes.rst:13 ../../../library/stdtypes.rst:332 #: ../../../library/stdtypes.rst:409 ../../../library/stdtypes.rst:1002 #: ../../../library/stdtypes.rst:1192 ../../../library/stdtypes.rst:1214 -#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5235 -#: ../../../library/stdtypes.rst:6273 +#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5270 +#: ../../../library/stdtypes.rst:6308 msgid "types" msgstr "" #: ../../../library/stdtypes.rst:34 ../../../library/stdtypes.rst:1229 -#: ../../../library/stdtypes.rst:5235 +#: ../../../library/stdtypes.rst:5270 msgid "statement" msgstr "" @@ -7234,11 +7266,11 @@ msgstr "" #: ../../../library/stdtypes.rst:1214 ../../../library/stdtypes.rst:1379 #: ../../../library/stdtypes.rst:1463 ../../../library/stdtypes.rst:1507 #: ../../../library/stdtypes.rst:1628 ../../../library/stdtypes.rst:1758 -#: ../../../library/stdtypes.rst:3232 ../../../library/stdtypes.rst:3251 -#: ../../../library/stdtypes.rst:3364 ../../../library/stdtypes.rst:5024 -#: ../../../library/stdtypes.rst:5235 ../../../library/stdtypes.rst:5759 -#: ../../../library/stdtypes.rst:6017 ../../../library/stdtypes.rst:6192 -#: ../../../library/stdtypes.rst:6237 +#: ../../../library/stdtypes.rst:3257 ../../../library/stdtypes.rst:3276 +#: ../../../library/stdtypes.rst:3389 ../../../library/stdtypes.rst:5054 +#: ../../../library/stdtypes.rst:5270 ../../../library/stdtypes.rst:5794 +#: ../../../library/stdtypes.rst:6052 ../../../library/stdtypes.rst:6227 +#: ../../../library/stdtypes.rst:6272 msgid "object" msgstr "" @@ -7330,9 +7362,9 @@ msgid "arithmetic" msgstr "" #: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:1002 -#: ../../../library/stdtypes.rst:1192 ../../../library/stdtypes.rst:5235 -#: ../../../library/stdtypes.rst:6244 ../../../library/stdtypes.rst:6258 -#: ../../../library/stdtypes.rst:6273 +#: ../../../library/stdtypes.rst:1192 ../../../library/stdtypes.rst:5270 +#: ../../../library/stdtypes.rst:6279 ../../../library/stdtypes.rst:6293 +#: ../../../library/stdtypes.rst:6308 msgid "built-in function" msgstr "" @@ -7348,8 +7380,8 @@ msgstr "" msgid "complex" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3108 -#: ../../../library/stdtypes.rst:4392 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3129 +#: ../../../library/stdtypes.rst:4422 msgid "+ (plus)" msgstr "" @@ -7361,13 +7393,13 @@ msgstr "" msgid "binary operator" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3108 -#: ../../../library/stdtypes.rst:4392 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3129 +#: ../../../library/stdtypes.rst:4422 msgid "- (minus)" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3065 -#: ../../../library/stdtypes.rst:4349 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3086 +#: ../../../library/stdtypes.rst:4379 msgid "* (asterisk)" msgstr "" @@ -7379,8 +7411,8 @@ msgstr "" msgid "//" msgstr "" -#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3028 -#: ../../../library/stdtypes.rst:4317 +#: ../../../library/stdtypes.rst:251 ../../../library/stdtypes.rst:3049 +#: ../../../library/stdtypes.rst:4347 msgid "% (percent)" msgstr "" @@ -7390,7 +7422,7 @@ msgstr "" #: ../../../library/stdtypes.rst:332 ../../../library/stdtypes.rst:409 #: ../../../library/stdtypes.rst:1002 ../../../library/stdtypes.rst:1229 -#: ../../../library/stdtypes.rst:5235 +#: ../../../library/stdtypes.rst:5270 msgid "operations on" msgstr "" @@ -7399,7 +7431,7 @@ msgid "conjugate() (complex number method)" msgstr "" #: ../../../library/stdtypes.rst:351 ../../../library/stdtypes.rst:1826 -#: ../../../library/stdtypes.rst:3232 ../../../library/stdtypes.rst:6273 +#: ../../../library/stdtypes.rst:3257 ../../../library/stdtypes.rst:6308 msgid "module" msgstr "" @@ -7467,7 +7499,7 @@ msgstr "" msgid "iterator protocol" msgstr "" -#: ../../../library/stdtypes.rst:899 ../../../library/stdtypes.rst:5672 +#: ../../../library/stdtypes.rst:899 ../../../library/stdtypes.rst:5707 msgid "protocol" msgstr "" @@ -7493,7 +7525,7 @@ msgstr "" msgid "iteration over" msgstr "" -#: ../../../library/stdtypes.rst:1002 ../../../library/stdtypes.rst:5235 +#: ../../../library/stdtypes.rst:1002 ../../../library/stdtypes.rst:5270 msgid "len" msgstr "" @@ -7562,14 +7594,14 @@ msgstr "" msgid "list" msgstr "" -#: ../../../library/stdtypes.rst:1214 ../../../library/stdtypes.rst:3232 -#: ../../../library/stdtypes.rst:3364 ../../../library/stdtypes.rst:3498 -#: ../../../library/stdtypes.rst:4317 +#: ../../../library/stdtypes.rst:1214 ../../../library/stdtypes.rst:3257 +#: ../../../library/stdtypes.rst:3389 ../../../library/stdtypes.rst:3528 +#: ../../../library/stdtypes.rst:4347 msgid "bytearray" msgstr "" -#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5235 -#: ../../../library/stdtypes.rst:6017 ../../../library/stdtypes.rst:6273 +#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5270 +#: ../../../library/stdtypes.rst:6052 ../../../library/stdtypes.rst:6308 msgid "type" msgstr "" @@ -7577,7 +7609,7 @@ msgstr "" msgid "assignment" msgstr "" -#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5235 +#: ../../../library/stdtypes.rst:1229 ../../../library/stdtypes.rst:5270 msgid "del" msgstr "" @@ -7586,8 +7618,8 @@ msgid "range" msgstr "" #: ../../../library/stdtypes.rst:1628 ../../../library/stdtypes.rst:1771 -#: ../../../library/stdtypes.rst:1818 ../../../library/stdtypes.rst:2856 -#: ../../../library/stdtypes.rst:3028 +#: ../../../library/stdtypes.rst:1818 ../../../library/stdtypes.rst:2877 +#: ../../../library/stdtypes.rst:3049 msgid "string" msgstr "" @@ -7608,17 +7640,17 @@ msgstr "" msgid "io.StringIO" msgstr "" -#: ../../../library/stdtypes.rst:1791 ../../../library/stdtypes.rst:3224 +#: ../../../library/stdtypes.rst:1791 ../../../library/stdtypes.rst:3249 msgid "buffer protocol" msgstr "" -#: ../../../library/stdtypes.rst:1791 ../../../library/stdtypes.rst:3232 -#: ../../../library/stdtypes.rst:3251 ../../../library/stdtypes.rst:3498 -#: ../../../library/stdtypes.rst:4317 +#: ../../../library/stdtypes.rst:1791 ../../../library/stdtypes.rst:3257 +#: ../../../library/stdtypes.rst:3276 ../../../library/stdtypes.rst:3528 +#: ../../../library/stdtypes.rst:4347 msgid "bytes" msgstr "" -#: ../../../library/stdtypes.rst:1818 ../../../library/stdtypes.rst:3498 +#: ../../../library/stdtypes.rst:1818 ../../../library/stdtypes.rst:3528 msgid "methods" msgstr "" @@ -7626,239 +7658,239 @@ msgstr "" msgid "re" msgstr "" -#: ../../../library/stdtypes.rst:2634 ../../../library/stdtypes.rst:4171 +#: ../../../library/stdtypes.rst:2655 ../../../library/stdtypes.rst:4201 msgid "universal newlines" msgstr "" -#: ../../../library/stdtypes.rst:2634 +#: ../../../library/stdtypes.rst:2655 msgid "str.splitlines method" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "! formatted string literal" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "formatted string literals" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "! f-string" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "f-strings" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "fstring" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "interpolated string literal" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "formatted literal" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "interpolated literal" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "{} (curly brackets)" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "in formatted string literal" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "! (exclamation mark)" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid ": (colon)" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "= (equals)" msgstr "" -#: ../../../library/stdtypes.rst:2856 +#: ../../../library/stdtypes.rst:2877 msgid "for help in debugging using string literals" msgstr "" -#: ../../../library/stdtypes.rst:3028 +#: ../../../library/stdtypes.rst:3049 msgid "formatting, string (%)" msgstr "" -#: ../../../library/stdtypes.rst:3028 +#: ../../../library/stdtypes.rst:3049 msgid "interpolation, string (%)" msgstr "" -#: ../../../library/stdtypes.rst:3028 +#: ../../../library/stdtypes.rst:3049 msgid "formatting, printf" msgstr "" -#: ../../../library/stdtypes.rst:3028 +#: ../../../library/stdtypes.rst:3049 msgid "interpolation, printf" msgstr "" -#: ../../../library/stdtypes.rst:3028 ../../../library/stdtypes.rst:4317 +#: ../../../library/stdtypes.rst:3049 ../../../library/stdtypes.rst:4347 msgid "printf-style formatting" msgstr "" -#: ../../../library/stdtypes.rst:3028 ../../../library/stdtypes.rst:4317 +#: ../../../library/stdtypes.rst:3049 ../../../library/stdtypes.rst:4347 msgid "sprintf-style formatting" msgstr "" -#: ../../../library/stdtypes.rst:3065 ../../../library/stdtypes.rst:4349 +#: ../../../library/stdtypes.rst:3086 ../../../library/stdtypes.rst:4379 msgid "() (parentheses)" msgstr "" -#: ../../../library/stdtypes.rst:3065 ../../../library/stdtypes.rst:3108 -#: ../../../library/stdtypes.rst:4349 ../../../library/stdtypes.rst:4392 +#: ../../../library/stdtypes.rst:3086 ../../../library/stdtypes.rst:3129 +#: ../../../library/stdtypes.rst:4379 ../../../library/stdtypes.rst:4422 msgid "in printf-style formatting" msgstr "" -#: ../../../library/stdtypes.rst:3065 ../../../library/stdtypes.rst:4349 +#: ../../../library/stdtypes.rst:3086 ../../../library/stdtypes.rst:4379 msgid ". (dot)" msgstr "" -#: ../../../library/stdtypes.rst:3108 ../../../library/stdtypes.rst:4392 +#: ../../../library/stdtypes.rst:3129 ../../../library/stdtypes.rst:4422 msgid "# (hash)" msgstr "" -#: ../../../library/stdtypes.rst:3108 ../../../library/stdtypes.rst:4392 +#: ../../../library/stdtypes.rst:3129 ../../../library/stdtypes.rst:4422 msgid "space" msgstr "" -#: ../../../library/stdtypes.rst:3224 +#: ../../../library/stdtypes.rst:3249 msgid "binary sequence types" msgstr "" -#: ../../../library/stdtypes.rst:3232 +#: ../../../library/stdtypes.rst:3257 msgid "memoryview" msgstr "" -#: ../../../library/stdtypes.rst:3232 +#: ../../../library/stdtypes.rst:3257 msgid "array" msgstr "" -#: ../../../library/stdtypes.rst:4171 +#: ../../../library/stdtypes.rst:4201 msgid "bytes.splitlines method" msgstr "" -#: ../../../library/stdtypes.rst:4171 +#: ../../../library/stdtypes.rst:4201 msgid "bytearray.splitlines method" msgstr "" -#: ../../../library/stdtypes.rst:4317 +#: ../../../library/stdtypes.rst:4347 msgid "formatting" msgstr "" -#: ../../../library/stdtypes.rst:4317 +#: ../../../library/stdtypes.rst:4347 msgid "bytes (%)" msgstr "" -#: ../../../library/stdtypes.rst:4317 +#: ../../../library/stdtypes.rst:4347 msgid "bytearray (%)" msgstr "" -#: ../../../library/stdtypes.rst:4317 +#: ../../../library/stdtypes.rst:4347 msgid "interpolation" msgstr "" -#: ../../../library/stdtypes.rst:5024 +#: ../../../library/stdtypes.rst:5054 msgid "set" msgstr "" -#: ../../../library/stdtypes.rst:5235 +#: ../../../library/stdtypes.rst:5270 msgid "mapping" msgstr "" -#: ../../../library/stdtypes.rst:5235 +#: ../../../library/stdtypes.rst:5270 msgid "dictionary" msgstr "" -#: ../../../library/stdtypes.rst:5343 +#: ../../../library/stdtypes.rst:5378 msgid "__missing__()" msgstr "" -#: ../../../library/stdtypes.rst:5672 +#: ../../../library/stdtypes.rst:5707 msgid "context manager" msgstr "" -#: ../../../library/stdtypes.rst:5672 +#: ../../../library/stdtypes.rst:5707 msgid "context management protocol" msgstr "" -#: ../../../library/stdtypes.rst:5672 +#: ../../../library/stdtypes.rst:5707 msgid "context management" msgstr "" -#: ../../../library/stdtypes.rst:5747 +#: ../../../library/stdtypes.rst:5782 msgid "annotation" msgstr "" -#: ../../../library/stdtypes.rst:5747 +#: ../../../library/stdtypes.rst:5782 msgid "type annotation; type hint" msgstr "" -#: ../../../library/stdtypes.rst:5759 +#: ../../../library/stdtypes.rst:5794 msgid "GenericAlias" msgstr "" -#: ../../../library/stdtypes.rst:5759 +#: ../../../library/stdtypes.rst:5794 msgid "Generic" msgstr "" -#: ../../../library/stdtypes.rst:5759 +#: ../../../library/stdtypes.rst:5794 msgid "Alias" msgstr "" -#: ../../../library/stdtypes.rst:6017 +#: ../../../library/stdtypes.rst:6052 msgid "Union" msgstr "" -#: ../../../library/stdtypes.rst:6017 +#: ../../../library/stdtypes.rst:6052 msgid "union" msgstr "" -#: ../../../library/stdtypes.rst:6192 +#: ../../../library/stdtypes.rst:6227 msgid "method" msgstr "" -#: ../../../library/stdtypes.rst:6237 +#: ../../../library/stdtypes.rst:6272 msgid "code" msgstr "" -#: ../../../library/stdtypes.rst:6237 +#: ../../../library/stdtypes.rst:6272 msgid "code object" msgstr "" -#: ../../../library/stdtypes.rst:6244 +#: ../../../library/stdtypes.rst:6279 msgid "compile" msgstr "" -#: ../../../library/stdtypes.rst:6244 +#: ../../../library/stdtypes.rst:6279 msgid "__code__ (function object attribute)" msgstr "" -#: ../../../library/stdtypes.rst:6258 +#: ../../../library/stdtypes.rst:6293 msgid "exec" msgstr "" -#: ../../../library/stdtypes.rst:6258 +#: ../../../library/stdtypes.rst:6293 msgid "eval" msgstr "" -#: ../../../library/stdtypes.rst:6297 +#: ../../../library/stdtypes.rst:6332 msgid "..." msgstr "" -#: ../../../library/stdtypes.rst:6297 +#: ../../../library/stdtypes.rst:6332 msgid "ellipsis literal" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/sys_path_init.pot b/main/locale/pot/LC_MESSAGES/library/sys_path_init.pot index db0579fdf77..6f61584e025 100644 --- a/main/locale/pot/LC_MESSAGES/library/sys_path_init.pot +++ b/main/locale/pot/LC_MESSAGES/library/sys_path_init.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -107,42 +107,46 @@ msgstr "" #: ../../../library/sys_path_init.rst:60 msgid "" "Finally, the :mod:`site` module is processed and :file:`site-packages` " -"directories are added to the module search path. A common way to customize " -"the search path is to create :mod:`sitecustomize` or :mod:`usercustomize` " -"modules as described in the :mod:`site` module documentation." +"directories are added to the module search path. The :envvar:" +"`PYTHONUSERBASE` environment variable controls where is searched for user " +"site-packages and the :envvar:`PYTHONNOUSERSITE` environment variable " +"prevents searching for user site-packages all together. A common way to " +"customize the search path is to create :mod:`sitecustomize` or :mod:" +"`usercustomize` modules as described in the :mod:`site` module documentation." msgstr "" -#: ../../../library/sys_path_init.rst:67 +#: ../../../library/sys_path_init.rst:70 msgid "" -"Certain command line options may further affect path calculations. See :" -"option:`-E`, :option:`-I`, :option:`-s` and :option:`-S` for further details." +"The command line options :option:`-E`, :option:`-P`, :option:`-I`, :option:`-" +"S` and :option:`-s` further affect path calculations, see their " +"documentation for details." msgstr "" -#: ../../../library/sys_path_init.rst:72 +#: ../../../library/sys_path_init.rst:76 msgid "" ":data:`sys.prefix` and :data:`sys.exec_prefix` are now set to the ``pyvenv." "cfg`` directory during the path initialization. This was previously done by :" "mod:`site`, therefore affected by :option:`-S`." msgstr "" -#: ../../../library/sys_path_init.rst:79 +#: ../../../library/sys_path_init.rst:83 msgid "Virtual Environments" msgstr "" -#: ../../../library/sys_path_init.rst:81 +#: ../../../library/sys_path_init.rst:85 msgid "" "Virtual environments place a ``pyvenv.cfg`` file in their prefix, which " "causes :data:`sys.prefix` and :data:`sys.exec_prefix` to point to them, " "instead of the base installation." msgstr "" -#: ../../../library/sys_path_init.rst:85 +#: ../../../library/sys_path_init.rst:89 msgid "" "The ``prefix`` and ``exec_prefix`` values of the base installation are " "available at :data:`sys.base_prefix` and :data:`sys.base_exec_prefix`." msgstr "" -#: ../../../library/sys_path_init.rst:88 +#: ../../../library/sys_path_init.rst:92 msgid "" "As well as being used as a marker to identify virtual environments, ``pyvenv." "cfg`` may also be used to configure the :mod:`site` initialization. Please " @@ -150,24 +154,23 @@ msgid "" "virtual-environments-configuration>`." msgstr "" -#: ../../../library/sys_path_init.rst:95 +#: ../../../library/sys_path_init.rst:99 msgid ":envvar:`PYTHONHOME` overrides the ``pyvenv.cfg`` detection." msgstr "" -#: ../../../library/sys_path_init.rst:99 +#: ../../../library/sys_path_init.rst:103 msgid "" -"There are other ways how \"virtual environments\" could be implemented, this " -"documentation refers implementations based on the ``pyvenv.cfg`` mechanism, " -"such as :mod:`venv`. Most virtual environment implementations follow the " -"model set by :mod:`venv`, but there may be exotic implementations that " -"diverge from it." +"There are other ways \"virtual environments\" could be implemented. This " +"documentation refers to implementations based on the ``pyvenv.cfg`` " +"mechanism, such as :mod:`venv`, that many virtual environment " +"implementations follow." msgstr "" -#: ../../../library/sys_path_init.rst:106 +#: ../../../library/sys_path_init.rst:109 msgid "_pth files" msgstr "" -#: ../../../library/sys_path_init.rst:108 +#: ../../../library/sys_path_init.rst:111 msgid "" "To completely override :data:`sys.path` create a ``._pth`` file with the " "same name as the shared library or executable (``python._pth`` or " @@ -178,7 +181,7 @@ msgid "" "allows paths to be restricted for any program loading the runtime if desired." msgstr "" -#: ../../../library/sys_path_init.rst:116 +#: ../../../library/sys_path_init.rst:119 msgid "" "When the file exists, all registry and environment variables are ignored, " "isolated mode is enabled, and :mod:`site` is not imported unless one line in " @@ -188,17 +191,17 @@ msgid "" "arbitrary code cannot be specified." msgstr "" -#: ../../../library/sys_path_init.rst:123 +#: ../../../library/sys_path_init.rst:126 msgid "" "Note that ``.pth`` files (without leading underscore) will be processed " "normally by the :mod:`site` module when ``import site`` has been specified." msgstr "" -#: ../../../library/sys_path_init.rst:127 +#: ../../../library/sys_path_init.rst:130 msgid "Embedded Python" msgstr "" -#: ../../../library/sys_path_init.rst:129 +#: ../../../library/sys_path_init.rst:132 msgid "" "If Python is embedded within another application :c:func:" "`Py_InitializeFromConfig` and the :c:type:`PyConfig` structure can be used " @@ -206,10 +209,10 @@ msgid "" "path-config`." msgstr "" -#: ../../../library/sys_path_init.rst:135 +#: ../../../library/sys_path_init.rst:138 msgid ":ref:`windows_finding_modules` for detailed Windows notes." msgstr "" -#: ../../../library/sys_path_init.rst:136 +#: ../../../library/sys_path_init.rst:139 msgid ":ref:`using-on-unix` for Unix details." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/threadsafety.pot b/main/locale/pot/LC_MESSAGES/library/threadsafety.pot index 073c2da2c71..94a0d669794 100644 --- a/main/locale/pot/LC_MESSAGES/library/threadsafety.pot +++ b/main/locale/pot/LC_MESSAGES/library/threadsafety.pot @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -35,79 +36,187 @@ msgid "" msgstr "" #: ../../../library/threadsafety.rst:19 -msgid "Thread safety for list objects" +msgid "Thread safety levels" msgstr "" #: ../../../library/threadsafety.rst:21 msgid "" +"The C API documentation uses the following levels to describe the thread " +"safety guarantees of each function. The levels are listed from least to most " +"safe." +msgstr "" + +#: ../../../library/threadsafety.rst:28 +msgid "Incompatible" +msgstr "" + +#: ../../../library/threadsafety.rst:30 +msgid "" +"A function or operation that cannot be made safe for concurrent use even " +"with external synchronization. Incompatible code typically accesses global " +"state in an unsynchronized way and must only be called from a single thread " +"throughout the program's lifetime." +msgstr "" + +#: ../../../library/threadsafety.rst:35 +msgid "" +"Example: a function that modifies process-wide state such as signal handlers " +"or environment variables, where concurrent calls from any threads, even with " +"external locking, can conflict with the runtime or other libraries." +msgstr "" + +#: ../../../library/threadsafety.rst:42 +msgid "Compatible" +msgstr "" + +#: ../../../library/threadsafety.rst:44 +msgid "" +"A function or operation that is safe to call from multiple threads " +"*provided* the caller supplies appropriate external synchronization, for " +"example by holding a :term:`lock` for the duration of each call. Without " +"such synchronization, concurrent calls may produce :term:`race conditions " +"` or :term:`data races `." +msgstr "" + +#: ../../../library/threadsafety.rst:50 +msgid "" +"Example: a function that reads from or writes to an object whose internal " +"state is not protected by a lock. Callers must ensure that no two threads " +"access the same object at the same time." +msgstr "" + +#: ../../../library/threadsafety.rst:57 +msgid "Safe on distinct objects" +msgstr "" + +#: ../../../library/threadsafety.rst:59 +msgid "" +"A function or operation that is safe to call from multiple threads without " +"external synchronization, as long as each thread operates on a **different** " +"object. Two threads may call the function at the same time, but they must " +"not pass the same object (or objects that share underlying state) as " +"arguments." +msgstr "" + +#: ../../../library/threadsafety.rst:65 +msgid "" +"Example: a function that modifies fields of a struct using non-atomic " +"writes. Two threads can each call the function on their own struct instance " +"safely, but concurrent calls on the *same* instance require external " +"synchronization." +msgstr "" + +#: ../../../library/threadsafety.rst:73 +msgid "Safe on shared objects" +msgstr "" + +#: ../../../library/threadsafety.rst:75 +msgid "" +"A function or operation that is safe for concurrent use on the **same** " +"object. The implementation uses internal synchronization (such as :term:`per-" +"object locks ` or :ref:`critical sections `) to protect shared mutable state, so callers do not need to " +"supply their own locking." +msgstr "" + +#: ../../../library/threadsafety.rst:81 +msgid "" +"Example: :c:func:`PyList_GetItemRef` can be called from multiple threads on " +"the same :c:type:`PyListObject` - it uses internal synchronization to " +"serialize access." +msgstr "" + +#: ../../../library/threadsafety.rst:88 +msgid "Atomic" +msgstr "" + +#: ../../../library/threadsafety.rst:90 +msgid "" +"A function or operation that appears :term:`atomic ` with " +"respect to other threads - it executes instantaneously from the perspective " +"of other threads. This is the strongest form of thread safety." +msgstr "" + +#: ../../../library/threadsafety.rst:94 +msgid "" +"Example: :c:func:`PyMutex_IsLocked` performs an atomic read of the mutex " +"state and can be called from any thread at any time." +msgstr "" + +#: ../../../library/threadsafety.rst:101 +msgid "Thread safety for list objects" +msgstr "" + +#: ../../../library/threadsafety.rst:103 +msgid "" "Reading a single element from a :class:`list` is :term:`atomic `:" msgstr "" -#: ../../../library/threadsafety.rst:29 +#: ../../../library/threadsafety.rst:111 msgid "" "The following methods traverse the list and use :term:`atomic ` reads of each item to perform their function. That means that " "they may return results affected by concurrent modifications:" msgstr "" -#: ../../../library/threadsafety.rst:40 +#: ../../../library/threadsafety.rst:122 msgid "" "All of the above operations avoid acquiring :term:`per-object locks `. They do not block concurrent modifications. Other operations " "that hold a lock will not block these from observing intermediate states." msgstr "" -#: ../../../library/threadsafety.rst:45 +#: ../../../library/threadsafety.rst:127 msgid "" "All other operations from here on block using the :term:`per-object lock`." msgstr "" -#: ../../../library/threadsafety.rst:47 +#: ../../../library/threadsafety.rst:129 msgid "" "Writing a single item via ``lst[i] = x`` is safe to call from multiple " "threads and will not corrupt the list." msgstr "" -#: ../../../library/threadsafety.rst:50 +#: ../../../library/threadsafety.rst:132 msgid "" "The following operations return new objects and appear :term:`atomic ` to other threads:" msgstr "" -#: ../../../library/threadsafety.rst:60 +#: ../../../library/threadsafety.rst:142 msgid "" "The following methods that only operate on a single element with no shifting " "required are :term:`atomic `:" msgstr "" -#: ../../../library/threadsafety.rst:69 +#: ../../../library/threadsafety.rst:151 msgid "" "The :meth:`~list.clear` method is also :term:`atomic `. " "Other threads cannot observe elements being removed." msgstr "" -#: ../../../library/threadsafety.rst:72 +#: ../../../library/threadsafety.rst:154 msgid "" "The :meth:`~list.sort` method is not :term:`atomic `. " "Other threads cannot observe intermediate states during sorting, but the " "list appears empty for the duration of the sort." msgstr "" -#: ../../../library/threadsafety.rst:76 +#: ../../../library/threadsafety.rst:158 msgid "" "The following operations may allow :term:`lock-free` operations to observe " "intermediate states since they modify multiple elements in place:" msgstr "" -#: ../../../library/threadsafety.rst:86 +#: ../../../library/threadsafety.rst:168 msgid "" "The :meth:`~list.remove` method may allow concurrent modifications since " "element comparison may execute arbitrary Python code (via :meth:`~object." "__eq__`)." msgstr "" -#: ../../../library/threadsafety.rst:90 +#: ../../../library/threadsafety.rst:172 msgid "" ":meth:`~list.extend` is safe to call from multiple threads. However, its " "guarantees depend on the iterable passed to it. If it is a :class:`list`, a :" @@ -119,30 +228,30 @@ msgid "" "other iterables when using ``lst += iterable``." msgstr "" -#: ../../../library/threadsafety.rst:99 +#: ../../../library/threadsafety.rst:181 msgid "" "Similarly, assigning to a list slice with ``lst[i:j] = iterable`` is safe to " "call from multiple threads, but ``iterable`` is only locked when it is also " "a :class:`list` (but not its subclasses)." msgstr "" -#: ../../../library/threadsafety.rst:103 +#: ../../../library/threadsafety.rst:185 msgid "" "Operations that involve multiple accesses, as well as iteration, are never " "atomic. For example:" msgstr "" -#: ../../../library/threadsafety.rst:120 +#: ../../../library/threadsafety.rst:202 msgid "" "Consider external synchronization when sharing :class:`list` instances " "across threads." msgstr "" -#: ../../../library/threadsafety.rst:127 +#: ../../../library/threadsafety.rst:209 msgid "Thread safety for dict objects" msgstr "" -#: ../../../library/threadsafety.rst:129 +#: ../../../library/threadsafety.rst:211 msgid "" "Creating a dictionary with the :class:`dict` constructor is atomic when the " "argument to it is a :class:`dict` or a :class:`tuple`. When using the :meth:" @@ -150,23 +259,23 @@ msgid "" "a :class:`dict`, :class:`tuple`, :class:`set` or :class:`frozenset`." msgstr "" -#: ../../../library/threadsafety.rst:135 +#: ../../../library/threadsafety.rst:217 msgid "" "The following operations and functions are :term:`lock-free` and :term:" "`atomic `." msgstr "" -#: ../../../library/threadsafety.rst:146 +#: ../../../library/threadsafety.rst:228 msgid "All other operations from here on hold the :term:`per-object lock`." msgstr "" -#: ../../../library/threadsafety.rst:148 +#: ../../../library/threadsafety.rst:230 msgid "" "Writing or removing a single item is safe to call from multiple threads and " "will not corrupt the dictionary:" msgstr "" -#: ../../../library/threadsafety.rst:160 +#: ../../../library/threadsafety.rst:242 msgid "" "These operations may compare keys using :meth:`~object.__eq__`, which can " "execute arbitrary Python code. During such comparisons, the dictionary may " @@ -175,19 +284,19 @@ msgid "" "underlying lock is not released during comparisons and this is not a concern." msgstr "" -#: ../../../library/threadsafety.rst:167 +#: ../../../library/threadsafety.rst:249 msgid "" "The following operations return new objects and hold the :term:`per-object " "lock` for the duration of the operation:" msgstr "" -#: ../../../library/threadsafety.rst:179 +#: ../../../library/threadsafety.rst:261 msgid "" "The :meth:`~dict.clear` method holds the lock for its duration. Other " "threads cannot observe elements being removed." msgstr "" -#: ../../../library/threadsafety.rst:182 +#: ../../../library/threadsafety.rst:264 msgid "" "The following operations lock both dictionaries. For :meth:`~dict.update` " "and ``|=``, this applies only when the other operand is a :class:`dict` that " @@ -196,45 +305,222 @@ msgid "" "subclasses:" msgstr "" -#: ../../../library/threadsafety.rst:195 +#: ../../../library/threadsafety.rst:277 msgid "" "All comparison operations also compare values using :meth:`~object.__eq__`, " "so for non-built-in types the lock may be released during comparison." msgstr "" -#: ../../../library/threadsafety.rst:198 +#: ../../../library/threadsafety.rst:280 msgid "" ":meth:`~dict.fromkeys` locks both the new dictionary and the iterable when " "the iterable is exactly a :class:`dict`, :class:`set`, or :class:`frozenset` " "(not subclasses):" msgstr "" -#: ../../../library/threadsafety.rst:209 +#: ../../../library/threadsafety.rst:291 msgid "" "When updating from a non-dict iterable, only the target dictionary is " "locked. The iterable may be concurrently modified by another thread:" msgstr "" -#: ../../../library/threadsafety.rst:219 +#: ../../../library/threadsafety.rst:301 ../../../library/threadsafety.rst:434 +#: ../../../library/threadsafety.rst:525 msgid "" "Operations that involve multiple accesses, as well as iteration, are never " "atomic:" msgstr "" -#: ../../../library/threadsafety.rst:236 +#: ../../../library/threadsafety.rst:318 msgid "" "To avoid time-of-check to time-of-use (TOCTOU) issues, use atomic operations " "or handle exceptions:" msgstr "" -#: ../../../library/threadsafety.rst:251 +#: ../../../library/threadsafety.rst:333 msgid "" "To safely iterate over a dictionary that may be modified by another thread, " "iterate over a copy:" msgstr "" -#: ../../../library/threadsafety.rst:261 +#: ../../../library/threadsafety.rst:343 msgid "" "Consider external synchronization when sharing :class:`dict` instances " "across threads." msgstr "" + +#: ../../../library/threadsafety.rst:350 +msgid "Thread safety for set objects" +msgstr "" + +#: ../../../library/threadsafety.rst:352 ../../../library/threadsafety.rst:457 +msgid "" +"The :func:`len` function is lock-free and :term:`atomic `." +msgstr "" + +#: ../../../library/threadsafety.rst:354 +msgid "" +"The following read operation is lock-free. It does not block concurrent " +"modifications and may observe intermediate states from operations that hold " +"the per-object lock:" +msgstr "" + +#: ../../../library/threadsafety.rst:363 +msgid "" +"This operation may compare elements using :meth:`~object.__eq__`, which can " +"execute arbitrary Python code. During such comparisons, the set may be " +"modified by another thread. For built-in types like :class:`str`, :class:" +"`int`, and :class:`float`, :meth:`!__eq__` does not release the underlying " +"lock during comparisons and this is not a concern." +msgstr "" + +#: ../../../library/threadsafety.rst:369 ../../../library/threadsafety.rst:470 +msgid "All other operations from here on hold the per-object lock." +msgstr "" + +#: ../../../library/threadsafety.rst:371 +msgid "" +"Adding or removing a single element is safe to call from multiple threads " +"and will not corrupt the set:" +msgstr "" + +#: ../../../library/threadsafety.rst:382 +msgid "" +"These operations also compare elements, so the same :meth:`~object.__eq__` " +"considerations as above apply." +msgstr "" + +#: ../../../library/threadsafety.rst:385 +msgid "" +"The :meth:`~set.copy` method returns a new object and holds the per-object " +"lock for the duration so that it is always atomic." +msgstr "" + +#: ../../../library/threadsafety.rst:388 +msgid "" +"The :meth:`~set.clear` method holds the lock for its duration. Other threads " +"cannot observe elements being removed." +msgstr "" + +#: ../../../library/threadsafety.rst:391 +msgid "" +"The following operations only accept :class:`set` or :class:`frozenset` as " +"operands and always lock both objects:" +msgstr "" + +#: ../../../library/threadsafety.rst:406 +msgid "" +":meth:`set.update`, :meth:`set.union`, :meth:`set.intersection` and :meth:" +"`set.difference` can take multiple iterables as arguments. They all iterate " +"through all the passed iterables and do the following:" +msgstr "" + +#: ../../../library/threadsafety.rst:410 +msgid ":meth:`set.update` and :meth:`set.union` lock both objects only when" +msgstr "" + +#: ../../../library/threadsafety.rst:411 +msgid "" +"the other operand is a :class:`set`, :class:`frozenset`, or :class:`dict`." +msgstr "" + +#: ../../../library/threadsafety.rst:412 +msgid ":meth:`set.intersection` and :meth:`set.difference` always try to lock" +msgstr "" + +#: ../../../library/threadsafety.rst:413 +msgid "all objects." +msgstr "" + +#: ../../../library/threadsafety.rst:415 +msgid ":meth:`set.symmetric_difference` tries to lock both objects." +msgstr "" + +#: ../../../library/threadsafety.rst:417 +msgid "" +"The update variants of the above methods also have some differences between " +"them:" +msgstr "" + +#: ../../../library/threadsafety.rst:420 +msgid ":meth:`set.difference_update` and :meth:`set.intersection_update` try" +msgstr "" + +#: ../../../library/threadsafety.rst:421 +msgid "to lock all objects one-by-one." +msgstr "" + +#: ../../../library/threadsafety.rst:422 +msgid "" +":meth:`set.symmetric_difference_update` only locks the arguments if it is" +msgstr "" + +#: ../../../library/threadsafety.rst:423 +msgid "of type :class:`set`, :class:`frozenset`, or :class:`dict`." +msgstr "" + +#: ../../../library/threadsafety.rst:425 +msgid "The following methods always try to lock both objects:" +msgstr "" + +#: ../../../library/threadsafety.rst:448 +msgid "" +"Consider external synchronization when sharing :class:`set` instances across " +"threads. See :ref:`freethreading-python-howto` for more information." +msgstr "" + +#: ../../../library/threadsafety.rst:455 +msgid "Thread safety for bytearray objects" +msgstr "" + +#: ../../../library/threadsafety.rst:459 +msgid "" +"Concatenation and comparisons use the buffer protocol, which prevents " +"resizing but does not hold the per-object lock. These operations may observe " +"intermediate states from concurrent modifications:" +msgstr "" + +#: ../../../library/threadsafety.rst:472 +msgid "" +"Reading a single element or slice is safe to call from multiple threads:" +msgstr "" + +#: ../../../library/threadsafety.rst:480 +msgid "" +"The following operations are safe to call from multiple threads and will not " +"corrupt the bytearray:" +msgstr "" + +#: ../../../library/threadsafety.rst:497 +msgid "" +"Slice assignment locks both objects when *values* is a :class:`bytearray`:" +msgstr "" + +#: ../../../library/threadsafety.rst:504 +msgid "" +"The following operations return new objects and hold the per-object lock for " +"the duration:" +msgstr "" + +#: ../../../library/threadsafety.rst:513 +msgid "The membership test holds the lock for its duration:" +msgstr "" + +#: ../../../library/threadsafety.rst:520 +msgid "" +"All other bytearray methods (such as :meth:`~bytearray.find`, :meth:" +"`~bytearray.replace`, :meth:`~bytearray.split`, :meth:`~bytearray.decode`, " +"etc.) hold the per-object lock for their duration." +msgstr "" + +#: ../../../library/threadsafety.rst:539 +msgid "" +"To safely iterate over a bytearray that may be modified by another thread, " +"iterate over a copy:" +msgstr "" + +#: ../../../library/threadsafety.rst:549 +msgid "" +"Consider external synchronization when sharing :class:`bytearray` instances " +"across threads. See :ref:`freethreading-python-howto` for more information." +msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/library/wave.pot b/main/locale/pot/LC_MESSAGES/library/wave.pot index b6b88ac937c..d95c05f9464 100644 --- a/main/locale/pot/LC_MESSAGES/library/wave.pot +++ b/main/locale/pot/LC_MESSAGES/library/wave.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -225,52 +225,82 @@ msgid "Set the number of channels." msgstr "" #: ../../../library/wave.rst:186 -msgid "Set the sample width to *n* bytes." +msgid "Return the number of channels." msgstr "" #: ../../../library/wave.rst:191 +msgid "Set the sample width to *n* bytes." +msgstr "" + +#: ../../../library/wave.rst:196 +msgid "Return the sample width in bytes." +msgstr "" + +#: ../../../library/wave.rst:201 msgid "Set the frame rate to *n*." msgstr "" -#: ../../../library/wave.rst:193 +#: ../../../library/wave.rst:203 msgid "A non-integral input to this method is rounded to the nearest integer." msgstr "" -#: ../../../library/wave.rst:200 +#: ../../../library/wave.rst:210 +msgid "Return the frame rate." +msgstr "" + +#: ../../../library/wave.rst:215 msgid "" "Set the number of frames to *n*. This will be changed later if the number " "of frames actually written is different (this update attempt will raise an " "error if the output stream is not seekable)." msgstr "" -#: ../../../library/wave.rst:207 +#: ../../../library/wave.rst:222 +msgid "Return the number of audio frames written so far." +msgstr "" + +#: ../../../library/wave.rst:227 msgid "" "Set the compression type and description. At the moment, only compression " "type ``NONE`` is supported, meaning no compression." msgstr "" -#: ../../../library/wave.rst:213 +#: ../../../library/wave.rst:233 +msgid "Return the compression type (``'NONE'``)." +msgstr "" + +#: ../../../library/wave.rst:238 +msgid "Return the human-readable compression type name." +msgstr "" + +#: ../../../library/wave.rst:243 msgid "" "The *tuple* should be ``(nchannels, sampwidth, framerate, nframes, comptype, " "compname)``, with values valid for the ``set*()`` methods. Sets all " "parameters." msgstr "" -#: ../../../library/wave.rst:220 +#: ../../../library/wave.rst:250 +msgid "" +"Return a :func:`~collections.namedtuple` ``(nchannels, sampwidth, framerate, " +"nframes, comptype, compname)`` containing the current output parameters." +msgstr "" + +#: ../../../library/wave.rst:257 msgid "" "Return current position in the file, with the same disclaimer for the :meth:" "`Wave_read.tell` and :meth:`Wave_read.setpos` methods." msgstr "" -#: ../../../library/wave.rst:226 +#: ../../../library/wave.rst:263 msgid "Write audio frames, without correcting *nframes*." msgstr "" -#: ../../../library/wave.rst:228 ../../../library/wave.rst:239 +#: ../../../library/wave.rst:265 ../../../library/wave.rst:276 msgid "Any :term:`bytes-like object` is now accepted." msgstr "" -#: ../../../library/wave.rst:234 +#: ../../../library/wave.rst:271 msgid "" "Write audio frames and make sure *nframes* is correct. It will raise an " "error if the output stream is not seekable and the total number of frames " @@ -278,7 +308,7 @@ msgid "" "previously set value for *nframes*." msgstr "" -#: ../../../library/wave.rst:242 +#: ../../../library/wave.rst:279 msgid "" "Note that it is invalid to set any parameters after calling :meth:" "`writeframes` or :meth:`writeframesraw`, and any attempt to do so will " diff --git a/main/locale/pot/LC_MESSAGES/library/xml.etree.elementtree.pot b/main/locale/pot/LC_MESSAGES/library/xml.etree.elementtree.pot index 1de274e2fa5..88f2f42825a 100644 --- a/main/locale/pot/LC_MESSAGES/library/xml.etree.elementtree.pot +++ b/main/locale/pot/LC_MESSAGES/library/xml.etree.elementtree.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -297,7 +297,7 @@ msgid "" msgstr "" #: ../../../library/xml.etree.elementtree.rst:380 -#: ../../../library/xml.etree.elementtree.rst:783 +#: ../../../library/xml.etree.elementtree.rst:786 msgid "Example" msgstr "" @@ -482,12 +482,12 @@ msgid "" msgstr "" #: ../../../library/xml.etree.elementtree.rst:496 -#: ../../../library/xml.etree.elementtree.rst:835 +#: ../../../library/xml.etree.elementtree.rst:838 msgid "Reference" msgstr "" #: ../../../library/xml.etree.elementtree.rst:501 -#: ../../../library/xml.etree.elementtree.rst:840 +#: ../../../library/xml.etree.elementtree.rst:843 msgid "Functions" msgstr "" @@ -676,7 +676,7 @@ msgid "" msgstr "" #: ../../../library/xml.etree.elementtree.rst:646 -#: ../../../library/xml.etree.elementtree.rst:1523 +#: ../../../library/xml.etree.elementtree.rst:1529 msgid "If you need a fully populated element, look for \"end\" events instead." msgstr "" @@ -685,7 +685,7 @@ msgid "The *parser* argument." msgstr "" #: ../../../library/xml.etree.elementtree.rst:651 -#: ../../../library/xml.etree.elementtree.rst:1527 +#: ../../../library/xml.etree.elementtree.rst:1533 msgid "The ``comment`` and ``pi`` events were added." msgstr "" @@ -747,7 +747,12 @@ msgid "" "arguments. Returns an element instance." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:710 +#: ../../../library/xml.etree.elementtree.rst:705 +#: ../../../library/xml.etree.elementtree.rst:893 +msgid "*attrib* can now be a :class:`frozendict`." +msgstr "" + +#: ../../../library/xml.etree.elementtree.rst:713 msgid "" "Generates a string representation of an XML element, including all " "subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is " @@ -759,24 +764,24 @@ msgid "" "Returns an (optionally) encoded string containing the XML data." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:719 -#: ../../../library/xml.etree.elementtree.rst:746 -#: ../../../library/xml.etree.elementtree.rst:1200 +#: ../../../library/xml.etree.elementtree.rst:722 +#: ../../../library/xml.etree.elementtree.rst:749 +#: ../../../library/xml.etree.elementtree.rst:1206 msgid "Added the *short_empty_elements* parameter." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:722 -#: ../../../library/xml.etree.elementtree.rst:749 +#: ../../../library/xml.etree.elementtree.rst:725 +#: ../../../library/xml.etree.elementtree.rst:752 msgid "Added the *xml_declaration* and *default_namespace* parameters." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:725 +#: ../../../library/xml.etree.elementtree.rst:728 msgid "" "The :func:`tostring` function now preserves the attribute order specified by " "the user." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:734 +#: ../../../library/xml.etree.elementtree.rst:737 msgid "" "Generates a string representation of an XML element, including all " "subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is " @@ -790,13 +795,13 @@ msgid "" "join(tostringlist(element)) == tostring(element)``." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:752 +#: ../../../library/xml.etree.elementtree.rst:755 msgid "" "The :func:`tostringlist` function now preserves the attribute order " "specified by the user." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:759 +#: ../../../library/xml.etree.elementtree.rst:762 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 " @@ -804,7 +809,7 @@ msgid "" "class:`XMLParser` parser is used. Returns an :class:`Element` instance." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:767 +#: ../../../library/xml.etree.elementtree.rst:770 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 " @@ -813,11 +818,11 @@ msgid "" "`Element` instance and a dictionary." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:777 +#: ../../../library/xml.etree.elementtree.rst:780 msgid "XInclude support" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:779 +#: ../../../library/xml.etree.elementtree.rst:782 msgid "" "This module provides limited support for `XInclude directives `_, via the :mod:`xml.etree.ElementInclude` helper " @@ -825,7 +830,7 @@ msgid "" "element trees, based on information in the tree." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:785 +#: ../../../library/xml.etree.elementtree.rst:788 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/" @@ -833,43 +838,43 @@ msgid "" "and use the **href** attribute to specify the document to include." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:794 +#: ../../../library/xml.etree.elementtree.rst:797 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:796 +#: ../../../library/xml.etree.elementtree.rst:799 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:807 +#: ../../../library/xml.etree.elementtree.rst:810 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 +#: ../../../library/xml.etree.elementtree.rst:818 msgid "" "If the **parse** attribute is omitted, it defaults to \"xml\". The href " "attribute is required." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:817 +#: ../../../library/xml.etree.elementtree.rst:820 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:826 +#: ../../../library/xml.etree.elementtree.rst:829 msgid "The result might look something like:" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:846 +#: ../../../library/xml.etree.elementtree.rst:849 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\". " @@ -880,7 +885,7 @@ msgid "" "``None`` or raise an exception." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:857 +#: ../../../library/xml.etree.elementtree.rst:860 msgid "" "This function expands XInclude directives in-place in tree pointed by " "*elem*. *elem* is either the root :class:`~xml.etree.ElementTree.Element` or " @@ -893,21 +898,21 @@ msgid "" "malicious content explosion. Pass ``None`` to disable the limitation." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:867 +#: ../../../library/xml.etree.elementtree.rst:870 msgid "Added the *base_url* and *max_depth* parameters." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:874 +#: ../../../library/xml.etree.elementtree.rst:877 msgid "Element Objects" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:882 +#: ../../../library/xml.etree.elementtree.rst:885 msgid "" "Element class. This class defines the Element interface, and provides a " "reference implementation of this interface." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:885 +#: ../../../library/xml.etree.elementtree.rst:888 msgid "" "The element name, attribute names, and attribute values can be either " "bytestrings or Unicode strings. *tag* is the element name. *attrib* is an " @@ -915,13 +920,13 @@ msgid "" "additional attributes, given as keyword arguments." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:893 +#: ../../../library/xml.etree.elementtree.rst:899 msgid "" "A string identifying what kind of data this element represents (the element " "type, in other words)." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:900 +#: ../../../library/xml.etree.elementtree.rst:906 msgid "" "These attributes can be used to hold additional data associated with the " "element. Their values are usually strings but may be any application-" @@ -932,7 +937,7 @@ msgid "" "the XML data" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:912 +#: ../../../library/xml.etree.elementtree.rst:918 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 " @@ -940,17 +945,17 @@ msgid "" "``None`` and *tail* ``\"3\"``." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:917 +#: ../../../library/xml.etree.elementtree.rst:923 msgid "" "To collect the inner text of an element, see :meth:`itertext`, for example " "``\"\".join(element.itertext())``." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:920 +#: ../../../library/xml.etree.elementtree.rst:926 msgid "Applications may store arbitrary objects in these attributes." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:925 +#: ../../../library/xml.etree.elementtree.rst:931 msgid "" "A dictionary containing the element's attributes. Note that while the " "*attrib* value is always a real mutable Python dictionary, an ElementTree " @@ -959,59 +964,59 @@ msgid "" "implementations, use the dictionary methods below whenever possible." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:931 +#: ../../../library/xml.etree.elementtree.rst:937 msgid "The following dictionary-like methods work on the element attributes." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:936 +#: ../../../library/xml.etree.elementtree.rst:942 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:942 +#: ../../../library/xml.etree.elementtree.rst:948 msgid "Gets the element attribute named *key*." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:944 +#: ../../../library/xml.etree.elementtree.rst:950 msgid "" "Returns the attribute value, or *default* if the attribute was not found." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:949 +#: ../../../library/xml.etree.elementtree.rst:955 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:955 +#: ../../../library/xml.etree.elementtree.rst:961 msgid "" "Returns the elements attribute names as a list. The names are returned in " "an arbitrary order." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:961 +#: ../../../library/xml.etree.elementtree.rst:967 msgid "Set the attribute *key* on the element to *value*." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:963 +#: ../../../library/xml.etree.elementtree.rst:969 msgid "The following methods work on the element's children (subelements)." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:968 +#: ../../../library/xml.etree.elementtree.rst:974 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:975 +#: ../../../library/xml.etree.elementtree.rst:981 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:983 +#: ../../../library/xml.etree.elementtree.rst:989 msgid "" "Finds the first subelement matching *match*. *match* may be a tag name or " "a :ref:`path `. Returns an element instance or " @@ -1020,7 +1025,7 @@ msgid "" "expression into the given namespace." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:992 +#: ../../../library/xml.etree.elementtree.rst:998 msgid "" "Finds all matching subelements, by tag name or :ref:`path `. Returns a list containing all matching elements in document " @@ -1029,7 +1034,7 @@ msgid "" "expression into the given namespace." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1001 +#: ../../../library/xml.etree.elementtree.rst:1007 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 " @@ -1040,13 +1045,13 @@ msgid "" "into the given namespace." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1012 +#: ../../../library/xml.etree.elementtree.rst:1018 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:1018 +#: ../../../library/xml.etree.elementtree.rst:1024 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 " @@ -1055,7 +1060,7 @@ msgid "" "structure is modified during iteration, the result is undefined." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1029 +#: ../../../library/xml.etree.elementtree.rst:1035 msgid "" "Finds all matching subelements, by tag name or :ref:`path `. Returns an iterable yielding all matching elements in document " @@ -1063,33 +1068,33 @@ msgid "" "name." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1040 +#: ../../../library/xml.etree.elementtree.rst:1046 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:1048 +#: ../../../library/xml.etree.elementtree.rst:1054 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:1054 +#: ../../../library/xml.etree.elementtree.rst:1060 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:1058 +#: ../../../library/xml.etree.elementtree.rst:1064 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:1063 +#: ../../../library/xml.etree.elementtree.rst:1069 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 " @@ -1097,11 +1102,11 @@ msgid "" "None`` tests.::" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1076 +#: ../../../library/xml.etree.elementtree.rst:1082 msgid "Testing the truth value of an Element emits :exc:`DeprecationWarning`." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1079 +#: ../../../library/xml.etree.elementtree.rst:1085 msgid "" "Prior to Python 3.8, the serialisation order of the XML attributes of " "elements was artificially made predictable by sorting the attributes by " @@ -1110,7 +1115,7 @@ msgid "" "attributes were originally parsed or created by user code." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1085 +#: ../../../library/xml.etree.elementtree.rst:1091 msgid "" "In general, user code should try not to depend on a specific ordering of " "attributes, given that the `XML Information Set `_ writer. Arguments are the " "same as for the :func:`canonicalize` function. This class does not build a " @@ -1346,11 +1351,11 @@ msgid "" "using the *write* function." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1364 +#: ../../../library/xml.etree.elementtree.rst:1370 msgid "XMLParser Objects" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1369 +#: ../../../library/xml.etree.elementtree.rst:1375 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 " @@ -1361,25 +1366,25 @@ msgid "" "XML file." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1377 +#: ../../../library/xml.etree.elementtree.rst:1383 msgid "" "Parameters are now :ref:`keyword-only `. The *html* " "argument is no longer supported." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1384 +#: ../../../library/xml.etree.elementtree.rst:1390 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:1391 +#: ../../../library/xml.etree.elementtree.rst:1397 msgid "Feeds data to the parser. *data* is encoded data." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1396 -#: ../../../library/xml.etree.elementtree.rst:1474 +#: ../../../library/xml.etree.elementtree.rst:1402 +#: ../../../library/xml.etree.elementtree.rst:1480 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 " @@ -1389,15 +1394,15 @@ msgid "" "xmlparser.SetReparseDeferralEnabled` for details." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1403 -#: ../../../library/xml.etree.elementtree.rst:1481 +#: ../../../library/xml.etree.elementtree.rst:1409 +#: ../../../library/xml.etree.elementtree.rst:1487 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:1411 +#: ../../../library/xml.etree.elementtree.rst:1417 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 " @@ -1408,11 +1413,11 @@ msgid "" "of an XML file::" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1455 +#: ../../../library/xml.etree.elementtree.rst:1461 msgid "XMLPullParser Objects" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1459 +#: ../../../library/xml.etree.elementtree.rst:1465 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 " @@ -1424,11 +1429,11 @@ msgid "" "If *events* is omitted, only ``\"end\"`` events are reported." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1470 +#: ../../../library/xml.etree.elementtree.rst:1476 msgid "Feed the given bytes data to the parser." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1490 +#: ../../../library/xml.etree.elementtree.rst:1496 msgid "" "Signal the parser that the data stream is terminated. Unlike :meth:" "`XMLParser.close`, this method always returns :const:`None`. Any events not " @@ -1436,7 +1441,7 @@ msgid "" "`read_events`." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1497 +#: ../../../library/xml.etree.elementtree.rst:1503 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 " @@ -1445,25 +1450,25 @@ msgid "" "follows." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1503 +#: ../../../library/xml.etree.elementtree.rst:1509 msgid "``start``, ``end``: the current Element." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1504 +#: ../../../library/xml.etree.elementtree.rst:1510 msgid "``comment``, ``pi``: the current comment / processing instruction" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1505 +#: ../../../library/xml.etree.elementtree.rst:1511 msgid "" "``start-ns``: a tuple ``(prefix, uri)`` naming the declared namespace " "mapping." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1507 +#: ../../../library/xml.etree.elementtree.rst:1513 msgid "``end-ns``: :const:`None` (this may change in a future version)" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1509 +#: ../../../library/xml.etree.elementtree.rst:1515 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 " @@ -1472,7 +1477,7 @@ msgid "" "results." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1517 +#: ../../../library/xml.etree.elementtree.rst:1523 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 " @@ -1481,11 +1486,11 @@ msgid "" "be present." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1532 +#: ../../../library/xml.etree.elementtree.rst:1538 msgid "Exceptions" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1536 +#: ../../../library/xml.etree.elementtree.rst:1542 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 " @@ -1493,22 +1498,22 @@ msgid "" "following attributes available:" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1543 +#: ../../../library/xml.etree.elementtree.rst:1549 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:1548 +#: ../../../library/xml.etree.elementtree.rst:1554 msgid "" "A tuple of *line*, *column* numbers, specifying where the error occurred." msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1551 +#: ../../../library/xml.etree.elementtree.rst:1557 msgid "Footnotes" msgstr "" -#: ../../../library/xml.etree.elementtree.rst:1552 +#: ../../../library/xml.etree.elementtree.rst:1558 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 " diff --git a/main/locale/pot/LC_MESSAGES/reference/datamodel.pot b/main/locale/pot/LC_MESSAGES/reference/datamodel.pot index 8cddddc70ab..65765564f9c 100644 --- a/main/locale/pot/LC_MESSAGES/reference/datamodel.pot +++ b/main/locale/pot/LC_MESSAGES/reference/datamodel.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -631,8 +631,8 @@ msgid "" "containing the same number of items as the function's formal parameter list." msgstr "" -#: ../../../reference/datamodel.rst:567 ../../../reference/datamodel.rst:1459 -#: ../../../reference/datamodel.rst:1660 +#: ../../../reference/datamodel.rst:567 ../../../reference/datamodel.rst:1475 +#: ../../../reference/datamodel.rst:1676 msgid "Special read-only attributes" msgstr "" @@ -672,7 +672,7 @@ msgid "" "the value of the cell, as well as set the value." msgstr "" -#: ../../../reference/datamodel.rst:601 ../../../reference/datamodel.rst:1708 +#: ../../../reference/datamodel.rst:601 ../../../reference/datamodel.rst:1724 msgid "Special writable attributes" msgstr "" @@ -785,7 +785,7 @@ msgid "" "callable object (normally a user-defined function)." msgstr "" -#: ../../../reference/datamodel.rst:716 ../../../reference/datamodel.rst:1804 +#: ../../../reference/datamodel.rst:716 ../../../reference/datamodel.rst:1820 msgid "Special read-only attributes:" msgstr "" @@ -1509,28 +1509,48 @@ msgstr "" #: ../../../reference/datamodel.rst:1404 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:1407 +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:1412 +#: ../../../reference/datamodel.rst:1415 +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:1420 +msgid "Store *data* to the file." +msgstr "" + +#: ../../../reference/datamodel.rst:1424 +msgid "Flush any buffers and close the underlying file." +msgstr "" + +#: ../../../reference/datamodel.rst:1428 msgid "Internal types" msgstr "" -#: ../../../reference/datamodel.rst:1418 +#: ../../../reference/datamodel.rst:1434 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:1426 +#: ../../../reference/datamodel.rst:1442 msgid "Code objects" msgstr "" -#: ../../../reference/datamodel.rst:1430 +#: ../../../reference/datamodel.rst:1446 msgid "" "Code objects represent *byte-compiled* executable Python code, or :term:" "`bytecode`. The difference between a code object and a function object is " @@ -1542,111 +1562,111 @@ msgid "" "no references (directly or indirectly) to mutable objects." msgstr "" -#: ../../../reference/datamodel.rst:1464 +#: ../../../reference/datamodel.rst:1480 msgid "The function name" msgstr "" -#: ../../../reference/datamodel.rst:1467 +#: ../../../reference/datamodel.rst:1483 msgid "The fully qualified function name" msgstr "" -#: ../../../reference/datamodel.rst:1472 +#: ../../../reference/datamodel.rst:1488 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:1477 +#: ../../../reference/datamodel.rst:1493 msgid "" "The number of positional-only :term:`parameters ` (including " "arguments with default values) that the function has" msgstr "" -#: ../../../reference/datamodel.rst:1481 +#: ../../../reference/datamodel.rst:1497 msgid "" "The number of keyword-only :term:`parameters ` (including " "arguments with default values) that the function has" msgstr "" -#: ../../../reference/datamodel.rst:1485 +#: ../../../reference/datamodel.rst:1501 msgid "" "The number of :ref:`local variables ` used by the function " "(including parameters)" msgstr "" -#: ../../../reference/datamodel.rst:1489 +#: ../../../reference/datamodel.rst:1505 msgid "" "A :class:`tuple` containing the names of the local variables in the function " "(starting with the parameter names)" msgstr "" -#: ../../../reference/datamodel.rst:1493 +#: ../../../reference/datamodel.rst:1509 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:1497 +#: ../../../reference/datamodel.rst:1513 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:1501 +#: ../../../reference/datamodel.rst:1517 msgid "Note: references to global and builtin names are *not* included." msgstr "" -#: ../../../reference/datamodel.rst:1504 +#: ../../../reference/datamodel.rst:1520 msgid "" "A string representing the sequence of :term:`bytecode` instructions in the " "function" msgstr "" -#: ../../../reference/datamodel.rst:1508 +#: ../../../reference/datamodel.rst:1524 msgid "" "A :class:`tuple` containing the literals used by the :term:`bytecode` in the " "function" msgstr "" -#: ../../../reference/datamodel.rst:1512 +#: ../../../reference/datamodel.rst:1528 msgid "" "A :class:`tuple` containing the names used by the :term:`bytecode` in the " "function" msgstr "" -#: ../../../reference/datamodel.rst:1516 +#: ../../../reference/datamodel.rst:1532 msgid "The name of the file from which the code was compiled" msgstr "" -#: ../../../reference/datamodel.rst:1519 +#: ../../../reference/datamodel.rst:1535 msgid "The line number of the first line of the function" msgstr "" -#: ../../../reference/datamodel.rst:1522 +#: ../../../reference/datamodel.rst:1538 msgid "" "A string encoding the mapping from :term:`bytecode` offsets to line numbers. " "For details, see the source code of the interpreter." msgstr "" -#: ../../../reference/datamodel.rst:1525 +#: ../../../reference/datamodel.rst:1541 msgid "" "This attribute of code objects is deprecated, and may be removed in Python " "3.15." msgstr "" -#: ../../../reference/datamodel.rst:1530 +#: ../../../reference/datamodel.rst:1546 msgid "The required stack size of the code object" msgstr "" -#: ../../../reference/datamodel.rst:1533 +#: ../../../reference/datamodel.rst:1549 msgid "" "An :class:`integer ` encoding a number of flags for the interpreter." msgstr "" -#: ../../../reference/datamodel.rst:1538 +#: ../../../reference/datamodel.rst:1554 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 " @@ -1657,7 +1677,7 @@ msgid "" "might be present." msgstr "" -#: ../../../reference/datamodel.rst:1546 +#: ../../../reference/datamodel.rst:1562 msgid "" "Future feature declarations (for example, ``from __future__ import " "division``) also use bits in :attr:`~codeobject.co_flags` to indicate " @@ -1665,12 +1685,12 @@ msgid "" "attr:`~__future__._Feature.compiler_flag`." msgstr "" -#: ../../../reference/datamodel.rst:1550 +#: ../../../reference/datamodel.rst:1566 msgid "" "Other bits in :attr:`~codeobject.co_flags` are reserved for internal use." msgstr "" -#: ../../../reference/datamodel.rst:1554 +#: ../../../reference/datamodel.rst:1570 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 " @@ -1678,17 +1698,17 @@ msgid "" "function." msgstr "" -#: ../../../reference/datamodel.rst:1560 +#: ../../../reference/datamodel.rst:1576 msgid "Methods on code objects" msgstr "" -#: ../../../reference/datamodel.rst:1564 +#: ../../../reference/datamodel.rst:1580 msgid "" "Returns an iterable over the source code positions of each :term:`bytecode` " "instruction in the code object." msgstr "" -#: ../../../reference/datamodel.rst:1567 +#: ../../../reference/datamodel.rst:1583 msgid "" "The iterator returns :class:`tuple`\\s containing the ``(start_line, " "end_line, start_column, end_column)``. The *i-th* tuple corresponds to the " @@ -1696,37 +1716,37 @@ msgid "" "information is 0-indexed utf-8 byte offsets on the given source line." msgstr "" -#: ../../../reference/datamodel.rst:1573 +#: ../../../reference/datamodel.rst:1589 msgid "" "This positional information can be missing. A non-exhaustive lists of cases " "where this may happen:" msgstr "" -#: ../../../reference/datamodel.rst:1576 +#: ../../../reference/datamodel.rst:1592 msgid "Running the interpreter with :option:`-X` ``no_debug_ranges``." msgstr "" -#: ../../../reference/datamodel.rst:1577 +#: ../../../reference/datamodel.rst:1593 msgid "" "Loading a pyc file compiled while using :option:`-X` ``no_debug_ranges``." msgstr "" -#: ../../../reference/datamodel.rst:1578 +#: ../../../reference/datamodel.rst:1594 msgid "Position tuples corresponding to artificial instructions." msgstr "" -#: ../../../reference/datamodel.rst:1579 +#: ../../../reference/datamodel.rst:1595 msgid "" "Line and column numbers that can't be represented due to implementation " "specific limitations." msgstr "" -#: ../../../reference/datamodel.rst:1582 +#: ../../../reference/datamodel.rst:1598 msgid "" "When this occurs, some or all of the tuple elements can be :const:`None`." msgstr "" -#: ../../../reference/datamodel.rst:1588 +#: ../../../reference/datamodel.rst:1604 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 " @@ -1736,161 +1756,161 @@ msgid "" "environment variable can be used." msgstr "" -#: ../../../reference/datamodel.rst:1597 +#: ../../../reference/datamodel.rst:1613 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:1601 +#: ../../../reference/datamodel.rst:1617 msgid "" "``start`` (an :class:`int`) represents the offset (inclusive) of the start " "of the :term:`bytecode` range" msgstr "" -#: ../../../reference/datamodel.rst:1603 +#: ../../../reference/datamodel.rst:1619 msgid "" "``end`` (an :class:`int`) represents the offset (exclusive) of the end of " "the :term:`bytecode` range" msgstr "" -#: ../../../reference/datamodel.rst:1605 +#: ../../../reference/datamodel.rst:1621 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:1609 +#: ../../../reference/datamodel.rst:1625 msgid "The items yielded will have the following properties:" msgstr "" -#: ../../../reference/datamodel.rst:1611 +#: ../../../reference/datamodel.rst:1627 msgid "The first range yielded will have a ``start`` of 0." msgstr "" -#: ../../../reference/datamodel.rst:1612 +#: ../../../reference/datamodel.rst:1628 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:1615 +#: ../../../reference/datamodel.rst:1631 msgid "No range will be backwards: ``end >= start`` for all triples." msgstr "" -#: ../../../reference/datamodel.rst:1616 +#: ../../../reference/datamodel.rst:1632 msgid "" "The last :class:`tuple` yielded will have ``end`` equal to the size of the :" "term:`bytecode`." msgstr "" -#: ../../../reference/datamodel.rst:1619 +#: ../../../reference/datamodel.rst:1635 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:1627 +#: ../../../reference/datamodel.rst:1643 msgid ":pep:`626` - Precise line numbers for debugging and other tools." msgstr "" -#: ../../../reference/datamodel.rst:1628 +#: ../../../reference/datamodel.rst:1644 msgid "The PEP that introduced the :meth:`!co_lines` method." msgstr "" -#: ../../../reference/datamodel.rst:1632 +#: ../../../reference/datamodel.rst:1648 msgid "" "Return a copy of the code object with new values for the specified fields." msgstr "" -#: ../../../reference/datamodel.rst:1634 +#: ../../../reference/datamodel.rst:1650 msgid "" "Code objects are also supported by the generic function :func:`copy.replace`." msgstr "" -#: ../../../reference/datamodel.rst:1642 +#: ../../../reference/datamodel.rst:1658 msgid "Frame objects" msgstr "" -#: ../../../reference/datamodel.rst:1646 +#: ../../../reference/datamodel.rst:1662 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:1665 +#: ../../../reference/datamodel.rst:1681 msgid "" "Points to the previous stack frame (towards the caller), or ``None`` if this " "is the bottom stack frame" msgstr "" -#: ../../../reference/datamodel.rst:1669 +#: ../../../reference/datamodel.rst:1685 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:1674 +#: ../../../reference/datamodel.rst:1690 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:1679 +#: ../../../reference/datamodel.rst:1695 msgid "Return a proxy for optimized scopes." msgstr "" -#: ../../../reference/datamodel.rst:1683 +#: ../../../reference/datamodel.rst:1699 msgid "" "The dictionary used by the frame to look up :ref:`global variables `" msgstr "" -#: ../../../reference/datamodel.rst:1687 +#: ../../../reference/datamodel.rst:1703 msgid "" "The dictionary used by the frame to look up :ref:`built-in (intrinsic) names " "`" msgstr "" -#: ../../../reference/datamodel.rst:1691 +#: ../../../reference/datamodel.rst:1707 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:1696 +#: ../../../reference/datamodel.rst:1712 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:1713 +#: ../../../reference/datamodel.rst:1729 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:1718 +#: ../../../reference/datamodel.rst:1734 msgid "" "Set this attribute to :const:`False` to disable triggering a tracing event " "for each source line." msgstr "" -#: ../../../reference/datamodel.rst:1722 +#: ../../../reference/datamodel.rst:1738 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:1728 +#: ../../../reference/datamodel.rst:1744 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 " @@ -1898,15 +1918,15 @@ msgid "" "this attribute." msgstr "" -#: ../../../reference/datamodel.rst:1734 +#: ../../../reference/datamodel.rst:1750 msgid "Frame object methods" msgstr "" -#: ../../../reference/datamodel.rst:1736 +#: ../../../reference/datamodel.rst:1752 msgid "Frame objects support one method:" msgstr "" -#: ../../../reference/datamodel.rst:1740 +#: ../../../reference/datamodel.rst:1756 msgid "" "This method clears all references to :ref:`local variables ` held by " "the frame. Also, if the frame belonged to a :term:`generator`, the " @@ -1915,34 +1935,34 @@ msgid "" "and storing its :ref:`traceback ` for later use)." msgstr "" -#: ../../../reference/datamodel.rst:1746 +#: ../../../reference/datamodel.rst:1762 msgid "" ":exc:`RuntimeError` is raised if the frame is currently executing or " "suspended." msgstr "" -#: ../../../reference/datamodel.rst:1751 +#: ../../../reference/datamodel.rst:1767 msgid "" "Attempting to clear a suspended frame raises :exc:`RuntimeError` (as has " "always been the case for executing frames)." msgstr "" -#: ../../../reference/datamodel.rst:1759 +#: ../../../reference/datamodel.rst:1775 msgid "Traceback objects" msgstr "" -#: ../../../reference/datamodel.rst:1772 +#: ../../../reference/datamodel.rst:1788 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:1777 +#: ../../../reference/datamodel.rst:1793 msgid "Traceback objects can now be explicitly instantiated from Python code." msgstr "" -#: ../../../reference/datamodel.rst:1780 +#: ../../../reference/datamodel.rst:1796 msgid "" "For implicitly created tracebacks, when the search for an exception handler " "unwinds the execution stack, at each unwound level a traceback object is " @@ -1953,7 +1973,7 @@ msgid "" "the caught exception." msgstr "" -#: ../../../reference/datamodel.rst:1789 +#: ../../../reference/datamodel.rst:1805 msgid "" "When the program contains no suitable handler, the stack trace is written " "(nicely formatted) to the standard error stream; if the interpreter is " @@ -1961,33 +1981,33 @@ msgid "" "last_traceback`." msgstr "" -#: ../../../reference/datamodel.rst:1794 +#: ../../../reference/datamodel.rst:1810 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:1809 +#: ../../../reference/datamodel.rst:1825 msgid "" "Points to the execution :ref:`frame ` of the current level." msgstr "" -#: ../../../reference/datamodel.rst:1812 +#: ../../../reference/datamodel.rst:1828 msgid "" "Accessing this attribute raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"tb_frame\"``." msgstr "" -#: ../../../reference/datamodel.rst:1817 +#: ../../../reference/datamodel.rst:1833 msgid "Gives the line number where the exception occurred" msgstr "" -#: ../../../reference/datamodel.rst:1820 +#: ../../../reference/datamodel.rst:1836 msgid "Indicates the \"precise instruction\"." msgstr "" -#: ../../../reference/datamodel.rst:1822 +#: ../../../reference/datamodel.rst:1838 msgid "" "The line number and last instruction in the traceback may differ from the " "line number of its :ref:`frame object ` if the exception " @@ -1995,46 +2015,46 @@ msgid "" "with a :keyword:`finally` clause." msgstr "" -#: ../../../reference/datamodel.rst:1833 +#: ../../../reference/datamodel.rst:1849 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:1837 +#: ../../../reference/datamodel.rst:1853 msgid "This attribute is now writable" msgstr "" -#: ../../../reference/datamodel.rst:1842 +#: ../../../reference/datamodel.rst:1858 msgid "Slice objects" msgstr "" -#: ../../../reference/datamodel.rst:1846 +#: ../../../reference/datamodel.rst:1862 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:1852 +#: ../../../reference/datamodel.rst:1868 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:1861 +#: ../../../reference/datamodel.rst:1877 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:1865 +#: ../../../reference/datamodel.rst:1881 msgid "Slice objects support one method:" msgstr "" -#: ../../../reference/datamodel.rst:1869 +#: ../../../reference/datamodel.rst:1885 msgid "" "This method takes a single integer argument *length* and computes " "information about the slice that the slice object would describe if applied " @@ -2044,11 +2064,11 @@ msgid "" "a manner consistent with regular slices." msgstr "" -#: ../../../reference/datamodel.rst:1878 +#: ../../../reference/datamodel.rst:1894 msgid "Static method objects" msgstr "" -#: ../../../reference/datamodel.rst:1880 +#: ../../../reference/datamodel.rst:1896 msgid "" "Static method objects provide a way of defeating the transformation of " "function objects to method objects described above. A static method object " @@ -2059,11 +2079,11 @@ msgid "" "method objects are created by the built-in :func:`staticmethod` constructor." msgstr "" -#: ../../../reference/datamodel.rst:1890 +#: ../../../reference/datamodel.rst:1906 msgid "Class method objects" msgstr "" -#: ../../../reference/datamodel.rst:1892 +#: ../../../reference/datamodel.rst:1908 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 " @@ -2073,11 +2093,11 @@ msgid "" "`classmethod` constructor." msgstr "" -#: ../../../reference/datamodel.rst:1902 +#: ../../../reference/datamodel.rst:1918 msgid "Special method names" msgstr "" -#: ../../../reference/datamodel.rst:1908 +#: ../../../reference/datamodel.rst:1924 msgid "" "A class can implement certain operations that are invoked by special syntax " "(such as arithmetic operations or subscripting and slicing) by defining " @@ -2091,7 +2111,7 @@ msgid "" "`TypeError`)." msgstr "" -#: ../../../reference/datamodel.rst:1919 +#: ../../../reference/datamodel.rst:1935 msgid "" "Setting a special method to ``None`` indicates that the corresponding " "operation is not available. For example, if a class sets :meth:`~object." @@ -2100,7 +2120,7 @@ msgid "" "`~object.__getitem__`). [#]_" msgstr "" -#: ../../../reference/datamodel.rst:1925 +#: ../../../reference/datamodel.rst:1941 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 " @@ -2110,11 +2130,11 @@ msgid "" "in the W3C's Document Object Model.)" msgstr "" -#: ../../../reference/datamodel.rst:1936 +#: ../../../reference/datamodel.rst:1952 msgid "Basic customization" msgstr "" -#: ../../../reference/datamodel.rst:1942 +#: ../../../reference/datamodel.rst:1958 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 " @@ -2124,7 +2144,7 @@ msgid "" "new object instance (usually an instance of *cls*)." msgstr "" -#: ../../../reference/datamodel.rst:1949 +#: ../../../reference/datamodel.rst:1965 msgid "" "Typical implementations create a new instance of the class by invoking the " "superclass's :meth:`__new__` method using ``super().__new__(cls[, ...])`` " @@ -2132,7 +2152,7 @@ msgid "" "necessary before returning it." msgstr "" -#: ../../../reference/datamodel.rst:1954 +#: ../../../reference/datamodel.rst:1970 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 " @@ -2141,13 +2161,13 @@ msgid "" "constructor." msgstr "" -#: ../../../reference/datamodel.rst:1959 +#: ../../../reference/datamodel.rst:1975 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:1962 +#: ../../../reference/datamodel.rst:1978 msgid "" ":meth:`__new__` is intended mainly to allow subclasses of immutable types " "(like int, str, or tuple) to customize instance creation. It is also " @@ -2155,7 +2175,7 @@ msgid "" "creation." msgstr "" -#: ../../../reference/datamodel.rst:1971 +#: ../../../reference/datamodel.rst:1987 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 " @@ -2165,7 +2185,7 @@ msgid "" "example: ``super().__init__([args...])``." msgstr "" -#: ../../../reference/datamodel.rst:1978 +#: ../../../reference/datamodel.rst:1994 msgid "" "Because :meth:`__new__` and :meth:`__init__` work together in constructing " "objects (:meth:`__new__` to create it, and :meth:`__init__` to customize " @@ -2173,7 +2193,7 @@ msgid "" "will cause a :exc:`TypeError` to be raised at runtime." msgstr "" -#: ../../../reference/datamodel.rst:1991 +#: ../../../reference/datamodel.rst:2007 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:" @@ -2182,7 +2202,7 @@ msgid "" "instance." msgstr "" -#: ../../../reference/datamodel.rst:1997 +#: ../../../reference/datamodel.rst:2013 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. " @@ -2192,7 +2212,7 @@ msgid "" "it once." msgstr "" -#: ../../../reference/datamodel.rst:2004 +#: ../../../reference/datamodel.rst:2020 msgid "" "It is not guaranteed that :meth:`__del__` methods are called for objects " "that still exist when the interpreter exits. :class:`weakref.finalize` " @@ -2200,14 +2220,14 @@ msgid "" "when an object is garbage collected." msgstr "" -#: ../../../reference/datamodel.rst:2011 +#: ../../../reference/datamodel.rst:2027 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:2016 +#: ../../../reference/datamodel.rst:2032 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 " @@ -2218,18 +2238,18 @@ msgid "" "caught in the traceback." msgstr "" -#: ../../../reference/datamodel.rst:2026 +#: ../../../reference/datamodel.rst:2042 msgid "Documentation for the :mod:`gc` module." msgstr "" -#: ../../../reference/datamodel.rst:2030 +#: ../../../reference/datamodel.rst:2046 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:2034 +#: ../../../reference/datamodel.rst:2050 msgid "" ":meth:`__del__` can be invoked when arbitrary code is being executed, " "including from any arbitrary thread. If :meth:`__del__` needs to take a " @@ -2238,7 +2258,7 @@ msgid "" "`__del__`." msgstr "" -#: ../../../reference/datamodel.rst:2040 +#: ../../../reference/datamodel.rst:2056 msgid "" ":meth:`__del__` can be executed during interpreter shutdown. As a " "consequence, the global variables it needs to access (including other " @@ -2249,7 +2269,7 @@ msgid "" "still available at the time when the :meth:`__del__` method is called." msgstr "" -#: ../../../reference/datamodel.rst:2055 +#: ../../../reference/datamodel.rst:2071 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 " @@ -2261,14 +2281,14 @@ msgid "" "an \"informal\" string representation of instances of that class is required." msgstr "" -#: ../../../reference/datamodel.rst:2064 +#: ../../../reference/datamodel.rst:2080 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:2076 +#: ../../../reference/datamodel.rst:2092 msgid "" "Called by :func:`str(object) `, the default :meth:`__format__` " "implementation, and the built-in function :func:`print`, to compute the " @@ -2276,27 +2296,27 @@ msgid "" "return value must be a :ref:`str ` object." msgstr "" -#: ../../../reference/datamodel.rst:2081 +#: ../../../reference/datamodel.rst:2097 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:2085 +#: ../../../reference/datamodel.rst:2101 msgid "" "The default implementation defined by the built-in type :class:`object` " "calls :meth:`object.__repr__`." msgstr "" -#: ../../../reference/datamodel.rst:2095 +#: ../../../reference/datamodel.rst:2111 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:2107 +#: ../../../reference/datamodel.rst:2123 msgid "" "Called by the :func:`format` built-in function, and by extension, evaluation " "of :ref:`formatted string literals ` and the :meth:`str.format` " @@ -2308,34 +2328,34 @@ msgid "" "formatting option syntax." msgstr "" -#: ../../../reference/datamodel.rst:2117 +#: ../../../reference/datamodel.rst:2133 msgid "" "See :ref:`formatspec` for a description of the standard formatting syntax." msgstr "" -#: ../../../reference/datamodel.rst:2119 +#: ../../../reference/datamodel.rst:2135 msgid "The return value must be a string object." msgstr "" -#: ../../../reference/datamodel.rst:2121 +#: ../../../reference/datamodel.rst:2137 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:2124 +#: ../../../reference/datamodel.rst:2140 msgid "" "The __format__ method of ``object`` itself raises a :exc:`TypeError` if " "passed any non-empty string." msgstr "" -#: ../../../reference/datamodel.rst:2128 +#: ../../../reference/datamodel.rst:2144 msgid "" "``object.__format__(x, '')`` is now equivalent to ``str(x)`` rather than " "``format(str(x), '')``." msgstr "" -#: ../../../reference/datamodel.rst:2144 +#: ../../../reference/datamodel.rst:2160 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:2242 +#: ../../../reference/datamodel.rst:2258 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 " @@ -2471,7 +2491,7 @@ msgid "" "``isinstance(obj, collections.abc.Hashable)`` call." msgstr "" -#: ../../../reference/datamodel.rst:2251 +#: ../../../reference/datamodel.rst:2267 msgid "" "By default, the :meth:`__hash__` values of str and bytes objects are " "\"salted\" with an unpredictable random value. Although they remain " @@ -2479,7 +2499,7 @@ msgid "" "between repeated invocations of Python." msgstr "" -#: ../../../reference/datamodel.rst:2256 +#: ../../../reference/datamodel.rst:2272 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 " @@ -2487,22 +2507,22 @@ msgid "" "advisories/ocert-2011-003.html for details." msgstr "" -#: ../../../reference/datamodel.rst:2261 +#: ../../../reference/datamodel.rst:2277 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:2265 +#: ../../../reference/datamodel.rst:2281 msgid "See also :envvar:`PYTHONHASHSEED`." msgstr "" -#: ../../../reference/datamodel.rst:2267 +#: ../../../reference/datamodel.rst:2283 msgid "Hash randomization is enabled by default." msgstr "" -#: ../../../reference/datamodel.rst:2275 +#: ../../../reference/datamodel.rst:2291 msgid "" "Called to implement truth value testing and the built-in operation " "``bool()``; should return ``False`` or ``True``. When this method is not " @@ -2512,18 +2532,18 @@ msgid "" "class itself), all its instances are considered true." msgstr "" -#: ../../../reference/datamodel.rst:2286 +#: ../../../reference/datamodel.rst:2302 msgid "Customizing attribute access" msgstr "" -#: ../../../reference/datamodel.rst:2288 +#: ../../../reference/datamodel.rst:2304 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:2296 +#: ../../../reference/datamodel.rst:2312 msgid "" "Called when the default attribute access fails with an :exc:`AttributeError` " "(either :meth:`__getattribute__` raises an :exc:`AttributeError` because " @@ -2534,7 +2554,7 @@ msgid "" "`object` class itself does not provide this method." msgstr "" -#: ../../../reference/datamodel.rst:2304 +#: ../../../reference/datamodel.rst:2320 msgid "" "Note that if the attribute is found through the normal mechanism, :meth:" "`__getattr__` is not called. (This is an intentional asymmetry between :" @@ -2547,7 +2567,7 @@ msgid "" "actually get total control over attribute access." msgstr "" -#: ../../../reference/datamodel.rst:2317 +#: ../../../reference/datamodel.rst:2333 msgid "" "Called unconditionally to implement attribute accesses for instances of the " "class. If the class also defines :meth:`__getattr__`, the latter will not be " @@ -2559,64 +2579,64 @@ msgid "" "example, ``object.__getattribute__(self, name)``." msgstr "" -#: ../../../reference/datamodel.rst:2328 +#: ../../../reference/datamodel.rst:2344 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:2333 ../../../reference/datamodel.rst:2335 +#: ../../../reference/datamodel.rst:2349 ../../../reference/datamodel.rst:2351 msgid "" "For certain sensitive attribute accesses, raises an :ref:`auditing event " "` ``object.__getattr__`` with arguments ``obj`` and ``name``." msgstr "" -#: ../../../reference/datamodel.rst:2342 +#: ../../../reference/datamodel.rst:2358 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:2346 +#: ../../../reference/datamodel.rst:2362 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:2350 ../../../reference/datamodel.rst:2352 +#: ../../../reference/datamodel.rst:2366 ../../../reference/datamodel.rst:2368 msgid "" "For certain sensitive attribute assignments, raises an :ref:`auditing event " "` ``object.__setattr__`` with arguments ``obj``, ``name``, " "``value``." msgstr "" -#: ../../../reference/datamodel.rst:2359 +#: ../../../reference/datamodel.rst:2375 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:2362 ../../../reference/datamodel.rst:2364 +#: ../../../reference/datamodel.rst:2378 ../../../reference/datamodel.rst:2380 msgid "" "For certain sensitive attribute deletions, raises an :ref:`auditing event " "` ``object.__delattr__`` with arguments ``obj`` and ``name``." msgstr "" -#: ../../../reference/datamodel.rst:2371 +#: ../../../reference/datamodel.rst:2387 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:2376 +#: ../../../reference/datamodel.rst:2392 msgid "Customizing module attribute access" msgstr "" -#: ../../../reference/datamodel.rst:2386 +#: ../../../reference/datamodel.rst:2402 msgid "" "Special names ``__getattr__`` and ``__dir__`` can be also used to customize " "access to module attributes. The ``__getattr__`` function at the module " @@ -2628,21 +2648,21 @@ msgid "" "with the attribute name and the result is returned." msgstr "" -#: ../../../reference/datamodel.rst:2395 +#: ../../../reference/datamodel.rst:2411 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:2401 +#: ../../../reference/datamodel.rst:2417 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:2419 +#: ../../../reference/datamodel.rst:2435 msgid "" "Defining module ``__getattr__`` and setting module ``__class__`` only affect " "lookups made using the attribute access syntax -- directly accessing the " @@ -2650,27 +2670,27 @@ msgid "" "module's globals dictionary) is unaffected." msgstr "" -#: ../../../reference/datamodel.rst:2424 +#: ../../../reference/datamodel.rst:2440 msgid "``__class__`` module attribute is now writable." msgstr "" -#: ../../../reference/datamodel.rst:2427 +#: ../../../reference/datamodel.rst:2443 msgid "``__getattr__`` and ``__dir__`` module attributes." msgstr "" -#: ../../../reference/datamodel.rst:2432 +#: ../../../reference/datamodel.rst:2448 msgid ":pep:`562` - Module __getattr__ and __dir__" msgstr "" -#: ../../../reference/datamodel.rst:2433 +#: ../../../reference/datamodel.rst:2449 msgid "Describes the ``__getattr__`` and ``__dir__`` functions on modules." msgstr "" -#: ../../../reference/datamodel.rst:2439 +#: ../../../reference/datamodel.rst:2455 msgid "Implementing Descriptors" msgstr "" -#: ../../../reference/datamodel.rst:2441 +#: ../../../reference/datamodel.rst:2457 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 " @@ -2681,7 +2701,7 @@ msgid "" "does not implement any of these protocols." msgstr "" -#: ../../../reference/datamodel.rst:2451 +#: ../../../reference/datamodel.rst:2467 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 " @@ -2690,13 +2710,13 @@ msgid "" "accessed through the *owner*." msgstr "" -#: ../../../reference/datamodel.rst:2457 +#: ../../../reference/datamodel.rst:2473 msgid "" "This method should return the computed attribute value or raise an :exc:" "`AttributeError` exception." msgstr "" -#: ../../../reference/datamodel.rst:2460 +#: ../../../reference/datamodel.rst:2476 msgid "" ":PEP:`252` specifies that :meth:`__get__` is callable with one or two " "arguments. Python's own built-in descriptors support this specification; " @@ -2706,31 +2726,31 @@ msgid "" "not." msgstr "" -#: ../../../reference/datamodel.rst:2469 +#: ../../../reference/datamodel.rst:2485 msgid "" "Called to set the attribute on an instance *instance* of the owner class to " "a new value, *value*." msgstr "" -#: ../../../reference/datamodel.rst:2472 +#: ../../../reference/datamodel.rst:2488 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:2478 +#: ../../../reference/datamodel.rst:2494 msgid "" "Called to delete the attribute on an instance *instance* of the owner class." msgstr "" -#: ../../../reference/datamodel.rst:2480 +#: ../../../reference/datamodel.rst:2496 msgid "" "Instances of descriptors may also have the :attr:`!__objclass__` attribute " "present:" msgstr "" -#: ../../../reference/datamodel.rst:2485 +#: ../../../reference/datamodel.rst:2501 msgid "" "The attribute :attr:`!__objclass__` is interpreted by the :mod:`inspect` " "module as specifying the class where this object was defined (setting this " @@ -2741,11 +2761,11 @@ msgid "" "are implemented in C)." msgstr "" -#: ../../../reference/datamodel.rst:2496 +#: ../../../reference/datamodel.rst:2512 msgid "Invoking Descriptors" msgstr "" -#: ../../../reference/datamodel.rst:2498 +#: ../../../reference/datamodel.rst:2514 msgid "" "In general, a descriptor is an object attribute with \"binding behavior\", " "one whose attribute access has been overridden by methods in the descriptor " @@ -2754,7 +2774,7 @@ msgid "" "is said to be a descriptor." msgstr "" -#: ../../../reference/datamodel.rst:2504 +#: ../../../reference/datamodel.rst:2520 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 " @@ -2762,7 +2782,7 @@ msgid "" "continuing through the base classes of ``type(a)`` excluding metaclasses." msgstr "" -#: ../../../reference/datamodel.rst:2509 +#: ../../../reference/datamodel.rst:2525 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 " @@ -2770,54 +2790,54 @@ msgid "" "depends on which descriptor methods were defined and how they were called." msgstr "" -#: ../../../reference/datamodel.rst:2514 +#: ../../../reference/datamodel.rst:2530 msgid "" "The starting point for descriptor invocation is a binding, ``a.x``. How the " "arguments are assembled depends on ``a``:" msgstr "" -#: ../../../reference/datamodel.rst:2517 +#: ../../../reference/datamodel.rst:2533 msgid "Direct Call" msgstr "" -#: ../../../reference/datamodel.rst:2518 +#: ../../../reference/datamodel.rst:2534 msgid "" "The simplest and least common call is when user code directly invokes a " "descriptor method: ``x.__get__(a)``." msgstr "" -#: ../../../reference/datamodel.rst:2521 +#: ../../../reference/datamodel.rst:2537 msgid "Instance Binding" msgstr "" -#: ../../../reference/datamodel.rst:2522 +#: ../../../reference/datamodel.rst:2538 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:2525 +#: ../../../reference/datamodel.rst:2541 msgid "Class Binding" msgstr "" -#: ../../../reference/datamodel.rst:2526 +#: ../../../reference/datamodel.rst:2542 msgid "" "If binding to a class, ``A.x`` is transformed into the call: ``A." "__dict__['x'].__get__(None, A)``." msgstr "" -#: ../../../reference/datamodel.rst:2529 +#: ../../../reference/datamodel.rst:2545 msgid "Super Binding" msgstr "" -#: ../../../reference/datamodel.rst:2530 +#: ../../../reference/datamodel.rst:2546 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:2567 +#: ../../../reference/datamodel.rst:2583 msgid "" "For instance bindings, the precedence of descriptor invocation depends on " "which descriptor methods are defined. A descriptor can define any " @@ -2835,7 +2855,7 @@ msgid "" "instances." msgstr "" -#: ../../../reference/datamodel.rst:2582 +#: ../../../reference/datamodel.rst:2598 msgid "" "Python methods (including those decorated with :deco:`staticmethod` and :" "deco:`classmethod`) are implemented as non-data descriptors. Accordingly, " @@ -2844,30 +2864,30 @@ msgid "" "class." msgstr "" -#: ../../../reference/datamodel.rst:2588 +#: ../../../reference/datamodel.rst:2604 msgid "" "The :func:`property` function is implemented as a data descriptor. " "Accordingly, instances cannot override the behavior of a property." msgstr "" -#: ../../../reference/datamodel.rst:2595 +#: ../../../reference/datamodel.rst:2611 msgid "__slots__" msgstr "" -#: ../../../reference/datamodel.rst:2597 +#: ../../../reference/datamodel.rst:2613 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:2601 +#: ../../../reference/datamodel.rst:2617 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:2606 +#: ../../../reference/datamodel.rst:2622 msgid "" "This class variable can be assigned a string, iterable, or sequence of " "strings with variable names used by instances. *__slots__* reserves space " @@ -2875,18 +2895,18 @@ msgid "" "`~object.__dict__` and *__weakref__* for each instance." msgstr "" -#: ../../../reference/datamodel.rst:2615 +#: ../../../reference/datamodel.rst:2631 msgid "Notes on using *__slots__*:" msgstr "" -#: ../../../reference/datamodel.rst:2617 +#: ../../../reference/datamodel.rst:2633 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:2621 +#: ../../../reference/datamodel.rst:2637 msgid "" "Without a :attr:`~object.__dict__` variable, instances cannot be assigned " "new variables not listed in the *__slots__* definition. Attempts to assign " @@ -2895,7 +2915,7 @@ msgid "" "sequence of strings in the *__slots__* declaration." msgstr "" -#: ../../../reference/datamodel.rst:2628 +#: ../../../reference/datamodel.rst:2644 msgid "" "Without a *__weakref__* variable for each instance, classes defining " "*__slots__* do not support :mod:`weak references ` to its " @@ -2903,7 +2923,7 @@ msgid "" "to the sequence of strings in the *__slots__* declaration." msgstr "" -#: ../../../reference/datamodel.rst:2634 +#: ../../../reference/datamodel.rst:2650 msgid "" "*__slots__* are implemented at the class level by creating :ref:`descriptors " "` for each variable name. As a result, class attributes cannot " @@ -2911,7 +2931,7 @@ msgid "" "otherwise, the class attribute would overwrite the descriptor assignment." msgstr "" -#: ../../../reference/datamodel.rst:2640 +#: ../../../reference/datamodel.rst:2656 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. " @@ -2920,7 +2940,7 @@ msgid "" "only contain names of any *additional* slots)." msgstr "" -#: ../../../reference/datamodel.rst:2646 +#: ../../../reference/datamodel.rst:2662 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 " @@ -2929,7 +2949,7 @@ msgid "" "prevent this." msgstr "" -#: ../../../reference/datamodel.rst:2651 +#: ../../../reference/datamodel.rst:2667 msgid "" ":exc:`TypeError` will be raised if *__slots__* other than *__dict__* and " "*__weakref__* are defined for a class derived from a :c:member:`\"variable-" @@ -2937,11 +2957,11 @@ msgid "" "class:`bytes`, and :class:`type`, except :class:`tuple`." msgstr "" -#: ../../../reference/datamodel.rst:2656 +#: ../../../reference/datamodel.rst:2672 msgid "Any non-string :term:`iterable` may be assigned to *__slots__*." msgstr "" -#: ../../../reference/datamodel.rst:2658 +#: ../../../reference/datamodel.rst:2674 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 " @@ -2949,13 +2969,13 @@ msgid "" "func:`inspect.getdoc` and displayed in the output of :func:`help`." msgstr "" -#: ../../../reference/datamodel.rst:2663 +#: ../../../reference/datamodel.rst:2679 msgid "" ":attr:`~object.__class__` assignment works only if both classes have the " "same *__slots__*." msgstr "" -#: ../../../reference/datamodel.rst:2666 +#: ../../../reference/datamodel.rst:2682 msgid "" ":ref:`Multiple inheritance ` with multiple slotted " "parent classes can be used, but only one parent is allowed to have " @@ -2963,24 +2983,24 @@ msgid "" "violations raise :exc:`TypeError`." msgstr "" -#: ../../../reference/datamodel.rst:2672 +#: ../../../reference/datamodel.rst:2688 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:2677 +#: ../../../reference/datamodel.rst:2693 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:2685 +#: ../../../reference/datamodel.rst:2701 msgid "Customizing class creation" msgstr "" -#: ../../../reference/datamodel.rst:2687 +#: ../../../reference/datamodel.rst:2703 msgid "" "Whenever a class inherits from another class, :meth:`~object." "__init_subclass__` is called on the parent class. This way, it is possible " @@ -2990,14 +3010,14 @@ msgid "" "future subclasses of the class defining the method." msgstr "" -#: ../../../reference/datamodel.rst:2696 +#: ../../../reference/datamodel.rst:2712 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:2700 +#: ../../../reference/datamodel.rst:2716 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 " @@ -3005,13 +3025,13 @@ msgid "" "pass the others over to the base class, as in::" msgstr "" -#: ../../../reference/datamodel.rst:2714 +#: ../../../reference/datamodel.rst:2730 msgid "" "The default implementation ``object.__init_subclass__`` does nothing, but " "raises an error if it is called with any arguments." msgstr "" -#: ../../../reference/datamodel.rst:2719 +#: ../../../reference/datamodel.rst:2735 msgid "" "The metaclass hint ``metaclass`` is consumed by the rest of the type " "machinery, and is never passed to ``__init_subclass__`` implementations. The " @@ -3019,41 +3039,41 @@ msgid "" "``type(cls)``." msgstr "" -#: ../../../reference/datamodel.rst:2727 +#: ../../../reference/datamodel.rst:2743 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:2732 +#: ../../../reference/datamodel.rst:2748 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:2738 +#: ../../../reference/datamodel.rst:2754 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:2749 +#: ../../../reference/datamodel.rst:2765 msgid "See :ref:`class-object-creation` for more details." msgstr "" -#: ../../../reference/datamodel.rst:2757 +#: ../../../reference/datamodel.rst:2773 msgid "Metaclasses" msgstr "" -#: ../../../reference/datamodel.rst:2764 +#: ../../../reference/datamodel.rst:2780 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:2768 +#: ../../../reference/datamodel.rst:2784 msgid "" "The class creation process can be customized by passing the ``metaclass`` " "keyword argument in the class definition line, or by inheriting from an " @@ -3061,41 +3081,41 @@ msgid "" "both ``MyClass`` and ``MySubclass`` are instances of ``Meta``::" msgstr "" -#: ../../../reference/datamodel.rst:2782 +#: ../../../reference/datamodel.rst:2798 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:2785 +#: ../../../reference/datamodel.rst:2801 msgid "When a class definition is executed, the following steps occur:" msgstr "" -#: ../../../reference/datamodel.rst:2787 +#: ../../../reference/datamodel.rst:2803 msgid "MRO entries are resolved;" msgstr "" -#: ../../../reference/datamodel.rst:2788 +#: ../../../reference/datamodel.rst:2804 msgid "the appropriate metaclass is determined;" msgstr "" -#: ../../../reference/datamodel.rst:2789 +#: ../../../reference/datamodel.rst:2805 msgid "the class namespace is prepared;" msgstr "" -#: ../../../reference/datamodel.rst:2790 +#: ../../../reference/datamodel.rst:2806 msgid "the class body is executed;" msgstr "" -#: ../../../reference/datamodel.rst:2791 +#: ../../../reference/datamodel.rst:2807 msgid "the class object is created." msgstr "" -#: ../../../reference/datamodel.rst:2795 +#: ../../../reference/datamodel.rst:2811 msgid "Resolving MRO entries" msgstr "" -#: ../../../reference/datamodel.rst:2799 +#: ../../../reference/datamodel.rst:2815 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 " @@ -3107,59 +3127,59 @@ msgid "" "is ignored." msgstr "" -#: ../../../reference/datamodel.rst:2810 +#: ../../../reference/datamodel.rst:2826 msgid ":func:`types.resolve_bases`" msgstr "" -#: ../../../reference/datamodel.rst:2811 +#: ../../../reference/datamodel.rst:2827 msgid "Dynamically resolve bases that are not instances of :class:`type`." msgstr "" -#: ../../../reference/datamodel.rst:2813 +#: ../../../reference/datamodel.rst:2829 msgid ":func:`types.get_original_bases`" msgstr "" -#: ../../../reference/datamodel.rst:2814 +#: ../../../reference/datamodel.rst:2830 msgid "" "Retrieve a class's \"original bases\" prior to modifications by :meth:" "`~object.__mro_entries__`." msgstr "" -#: ../../../reference/datamodel.rst:2817 +#: ../../../reference/datamodel.rst:2833 msgid ":pep:`560`" msgstr "" -#: ../../../reference/datamodel.rst:2818 +#: ../../../reference/datamodel.rst:2834 msgid "Core support for typing module and generic types." msgstr "" -#: ../../../reference/datamodel.rst:2824 +#: ../../../reference/datamodel.rst:2840 msgid "Determining the appropriate metaclass" msgstr "" -#: ../../../reference/datamodel.rst:2828 +#: ../../../reference/datamodel.rst:2844 msgid "" "The appropriate metaclass for a class definition is determined as follows:" msgstr "" -#: ../../../reference/datamodel.rst:2830 +#: ../../../reference/datamodel.rst:2846 msgid "" "if no bases and no explicit metaclass are given, then :func:`type` is used;" msgstr "" -#: ../../../reference/datamodel.rst:2831 +#: ../../../reference/datamodel.rst:2847 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:2833 +#: ../../../reference/datamodel.rst:2849 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:2836 +#: ../../../reference/datamodel.rst:2852 msgid "" "The most derived metaclass is selected from the explicitly specified " "metaclass (if any) and the metaclasses (i.e. ``type(cls)``) of all specified " @@ -3168,11 +3188,11 @@ msgid "" "that criterion, then the class definition will fail with ``TypeError``." msgstr "" -#: ../../../reference/datamodel.rst:2846 +#: ../../../reference/datamodel.rst:2862 msgid "Preparing the class namespace" msgstr "" -#: ../../../reference/datamodel.rst:2851 +#: ../../../reference/datamodel.rst:2867 msgid "" "Once the appropriate metaclass has been identified, then the class namespace " "is prepared. If the metaclass has a ``__prepare__`` attribute, it is called " @@ -3184,25 +3204,25 @@ msgid "" "copied into a new ``dict``." msgstr "" -#: ../../../reference/datamodel.rst:2860 +#: ../../../reference/datamodel.rst:2876 msgid "" "If the metaclass has no ``__prepare__`` attribute, then the class namespace " "is initialised as an empty ordered mapping." msgstr "" -#: ../../../reference/datamodel.rst:2865 +#: ../../../reference/datamodel.rst:2881 msgid ":pep:`3115` - Metaclasses in Python 3000" msgstr "" -#: ../../../reference/datamodel.rst:2866 +#: ../../../reference/datamodel.rst:2882 msgid "Introduced the ``__prepare__`` namespace hook" msgstr "" -#: ../../../reference/datamodel.rst:2870 +#: ../../../reference/datamodel.rst:2886 msgid "Executing the class body" msgstr "" -#: ../../../reference/datamodel.rst:2875 +#: ../../../reference/datamodel.rst:2891 msgid "" "The class body is executed (approximately) as ``exec(body, globals(), " "namespace)``. The key difference from a normal call to :func:`exec` is that " @@ -3211,7 +3231,7 @@ msgid "" "inside a function." msgstr "" -#: ../../../reference/datamodel.rst:2881 +#: ../../../reference/datamodel.rst:2897 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. " @@ -3220,11 +3240,11 @@ msgid "" "reference described in the next section." msgstr "" -#: ../../../reference/datamodel.rst:2890 +#: ../../../reference/datamodel.rst:2906 msgid "Creating the class object" msgstr "" -#: ../../../reference/datamodel.rst:2897 +#: ../../../reference/datamodel.rst:2913 msgid "" "Once the class namespace has been populated by executing the class body, the " "class object is created by calling ``metaclass(name, bases, namespace, " @@ -3232,7 +3252,7 @@ msgid "" "to ``__prepare__``)." msgstr "" -#: ../../../reference/datamodel.rst:2902 +#: ../../../reference/datamodel.rst:2918 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 " @@ -3243,7 +3263,7 @@ msgid "" "is identified based on the first argument passed to the method." msgstr "" -#: ../../../reference/datamodel.rst:2912 +#: ../../../reference/datamodel.rst:2928 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 " @@ -3252,39 +3272,39 @@ msgid "" "in Python 3.8." msgstr "" -#: ../../../reference/datamodel.rst:2918 +#: ../../../reference/datamodel.rst:2934 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:2922 +#: ../../../reference/datamodel.rst:2938 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:2924 +#: ../../../reference/datamodel.rst:2940 msgid "" "Those ``__set_name__`` methods are called with the class being defined and " "the assigned name of that particular attribute;" msgstr "" -#: ../../../reference/datamodel.rst:2926 +#: ../../../reference/datamodel.rst:2942 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:2929 +#: ../../../reference/datamodel.rst:2945 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:2933 +#: ../../../reference/datamodel.rst:2949 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 " @@ -3292,19 +3312,19 @@ msgid "" "becomes the :attr:`~type.__dict__` attribute of the class object." msgstr "" -#: ../../../reference/datamodel.rst:2940 +#: ../../../reference/datamodel.rst:2956 msgid ":pep:`3135` - New super" msgstr "" -#: ../../../reference/datamodel.rst:2941 +#: ../../../reference/datamodel.rst:2957 msgid "Describes the implicit ``__class__`` closure reference" msgstr "" -#: ../../../reference/datamodel.rst:2945 +#: ../../../reference/datamodel.rst:2961 msgid "Uses for metaclasses" msgstr "" -#: ../../../reference/datamodel.rst:2947 +#: ../../../reference/datamodel.rst:2963 msgid "" "The potential uses for metaclasses are boundless. Some ideas that have been " "explored include enum, logging, interface checking, automatic delegation, " @@ -3312,17 +3332,17 @@ msgid "" "locking/synchronization." msgstr "" -#: ../../../reference/datamodel.rst:2954 +#: ../../../reference/datamodel.rst:2970 msgid "Customizing instance and subclass checks" msgstr "" -#: ../../../reference/datamodel.rst:2956 +#: ../../../reference/datamodel.rst:2972 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:2959 +#: ../../../reference/datamodel.rst:2975 msgid "" "In particular, the metaclass :class:`abc.ABCMeta` implements these methods " "in order to allow the addition of Abstract Base Classes (ABCs) as \"virtual " @@ -3330,21 +3350,21 @@ msgid "" "other ABCs." msgstr "" -#: ../../../reference/datamodel.rst:2966 +#: ../../../reference/datamodel.rst:2982 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:2973 +#: ../../../reference/datamodel.rst:2989 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:2978 +#: ../../../reference/datamodel.rst:2994 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 " @@ -3352,11 +3372,11 @@ msgid "" "only in this case the instance is itself a class." msgstr "" -#: ../../../reference/datamodel.rst:2985 +#: ../../../reference/datamodel.rst:3001 msgid ":pep:`3119` - Introducing Abstract Base Classes" msgstr "" -#: ../../../reference/datamodel.rst:2986 +#: ../../../reference/datamodel.rst:3002 msgid "" "Includes the specification for customizing :func:`isinstance` and :func:" "`issubclass` behavior through :meth:`~type.__instancecheck__` and :meth:" @@ -3365,11 +3385,11 @@ msgid "" "language." msgstr "" -#: ../../../reference/datamodel.rst:2994 +#: ../../../reference/datamodel.rst:3010 msgid "Emulating generic types" msgstr "" -#: ../../../reference/datamodel.rst:2996 +#: ../../../reference/datamodel.rst:3012 msgid "" "When using :term:`type annotations`, it is often useful to " "*parameterize* a :term:`generic type` using Python's square-brackets " @@ -3377,65 +3397,65 @@ msgid "" "a :class:`list` in which all the elements are of type :class:`int`." msgstr "" -#: ../../../reference/datamodel.rst:3003 +#: ../../../reference/datamodel.rst:3019 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../../reference/datamodel.rst:3004 +#: ../../../reference/datamodel.rst:3020 msgid "Introducing Python's framework for type annotations" msgstr "" -#: ../../../reference/datamodel.rst:3006 +#: ../../../reference/datamodel.rst:3022 msgid ":ref:`Generic Alias Types`" msgstr "" -#: ../../../reference/datamodel.rst:3007 +#: ../../../reference/datamodel.rst:3023 msgid "Documentation for objects representing parameterized generic classes" msgstr "" -#: ../../../reference/datamodel.rst:3009 +#: ../../../reference/datamodel.rst:3025 msgid "" ":ref:`Generics`, :ref:`user-defined generics` and :" "class:`typing.Generic`" msgstr "" -#: ../../../reference/datamodel.rst:3010 +#: ../../../reference/datamodel.rst:3026 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../../reference/datamodel.rst:3013 +#: ../../../reference/datamodel.rst:3029 msgid "" "A class can *generally* only be parameterized if it defines the special " "class method ``__class_getitem__()``." msgstr "" -#: ../../../reference/datamodel.rst:3018 +#: ../../../reference/datamodel.rst:3034 msgid "" "Return an object representing the specialization of a generic class by type " "arguments found in *key*." msgstr "" -#: ../../../reference/datamodel.rst:3021 +#: ../../../reference/datamodel.rst:3037 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:3027 +#: ../../../reference/datamodel.rst:3043 msgid "The purpose of *__class_getitem__*" msgstr "" -#: ../../../reference/datamodel.rst:3029 +#: ../../../reference/datamodel.rst:3045 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:3033 +#: ../../../reference/datamodel.rst:3049 msgid "" "To implement custom generic classes that can be parameterized at runtime and " "understood by static type-checkers, users should either inherit from a " @@ -3444,7 +3464,7 @@ msgid "" "own implementation of ``__class_getitem__()``." msgstr "" -#: ../../../reference/datamodel.rst:3039 +#: ../../../reference/datamodel.rst:3055 msgid "" "Custom implementations of :meth:`~object.__class_getitem__` on classes " "defined outside of the standard library may not be understood by third-party " @@ -3452,11 +3472,11 @@ msgid "" "purposes other than type hinting is discouraged." msgstr "" -#: ../../../reference/datamodel.rst:3049 +#: ../../../reference/datamodel.rst:3065 msgid "*__class_getitem__* versus *__getitem__*" msgstr "" -#: ../../../reference/datamodel.rst:3051 +#: ../../../reference/datamodel.rst:3067 msgid "" "Usually, the :ref:`subscription` of an object using square " "brackets will call the :meth:`~object.__getitem__` instance method defined " @@ -3466,14 +3486,14 @@ msgid "" "genericalias>` object if it is properly defined." msgstr "" -#: ../../../reference/datamodel.rst:3058 +#: ../../../reference/datamodel.rst:3074 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:3086 +#: ../../../reference/datamodel.rst:3102 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 " @@ -3483,40 +3503,40 @@ msgid "" "__class_getitem__` being called::" msgstr "" -#: ../../../reference/datamodel.rst:3105 +#: ../../../reference/datamodel.rst:3121 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:3128 +#: ../../../reference/datamodel.rst:3144 msgid ":pep:`560` - Core Support for typing module and generic types" msgstr "" -#: ../../../reference/datamodel.rst:3129 +#: ../../../reference/datamodel.rst:3145 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:3137 +#: ../../../reference/datamodel.rst:3153 msgid "Emulating callable objects" msgstr "" -#: ../../../reference/datamodel.rst:3144 +#: ../../../reference/datamodel.rst:3160 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:3152 +#: ../../../reference/datamodel.rst:3168 msgid "Emulating container types" msgstr "" -#: ../../../reference/datamodel.rst:3154 +#: ../../../reference/datamodel.rst:3170 msgid "" "The following methods can be defined to implement container objects. None of " "them are provided by the :class:`object` class itself. Containers usually " @@ -3537,7 +3557,7 @@ msgid "" "__setitem__`, :meth:`~object.__delitem__`, and :meth:`!keys`." msgstr "" -#: ../../../reference/datamodel.rst:3173 +#: ../../../reference/datamodel.rst:3189 msgid "" "Mutable sequences should provide methods :meth:`~sequence.append`, :meth:" "`~sequence.clear`, :meth:`~sequence.count`, :meth:`~sequence.extend`, :meth:" @@ -3551,7 +3571,7 @@ msgid "" "numerical operators." msgstr "" -#: ../../../reference/datamodel.rst:3185 +#: ../../../reference/datamodel.rst:3201 msgid "" "It is recommended that both mappings and sequences implement the :meth:" "`~object.__contains__` method to allow efficient use of the ``in`` operator; " @@ -3563,7 +3583,7 @@ msgid "" "iterate through the values." msgstr "" -#: ../../../reference/datamodel.rst:3200 +#: ../../../reference/datamodel.rst:3216 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 " @@ -3571,7 +3591,7 @@ msgid "" "returns zero is considered to be false in a Boolean context." msgstr "" -#: ../../../reference/datamodel.rst:3207 +#: ../../../reference/datamodel.rst:3223 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:" @@ -3580,7 +3600,7 @@ msgid "" "`~object.__bool__` method." msgstr "" -#: ../../../reference/datamodel.rst:3216 +#: ../../../reference/datamodel.rst:3232 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). " @@ -3590,32 +3610,19 @@ msgid "" "never required for correctness." msgstr "" -#: ../../../reference/datamodel.rst:3230 -msgid "" -"Slicing is done exclusively with the following three methods. A call like ::" -msgstr "" - -#: ../../../reference/datamodel.rst:3234 -msgid "is translated to ::" -msgstr "" - -#: ../../../reference/datamodel.rst:3238 -msgid "and so forth. Missing slice items are always filled in with ``None``." -msgstr "" - -#: ../../../reference/datamodel.rst:3243 +#: ../../../reference/datamodel.rst:3244 msgid "" "Called to implement *subscription*, that is, ``self[subscript]``. See :ref:" "`subscriptions` for details on the syntax." msgstr "" -#: ../../../reference/datamodel.rst:3246 +#: ../../../reference/datamodel.rst:3247 msgid "" "There are two types of built-in objects that support subscription via :meth:" "`!__getitem__`:" msgstr "" -#: ../../../reference/datamodel.rst:3249 +#: ../../../reference/datamodel.rst:3250 msgid "" "**sequences**, where *subscript* (also called :term:`index`) should be an " "integer or a :class:`slice` object. See the :ref:`sequence documentation " @@ -3623,13 +3630,13 @@ msgid "" "`slice` objects and negative indices." msgstr "" -#: ../../../reference/datamodel.rst:3253 +#: ../../../reference/datamodel.rst:3254 msgid "" "**mappings**, where *subscript* is also called the :term:`key`. See :ref:" "`mapping documentation ` for the expected behavior." msgstr "" -#: ../../../reference/datamodel.rst:3257 +#: ../../../reference/datamodel.rst:3258 msgid "" "If *subscript* is of an inappropriate type, :meth:`!__getitem__` should " "raise :exc:`TypeError`. If *subscript* has an inappropriate value, :meth:`!" @@ -3637,21 +3644,35 @@ msgid "" "exc:`IndexError` for sequences; :exc:`KeyError` for mappings)." msgstr "" -#: ../../../reference/datamodel.rst:3265 +#: ../../../reference/datamodel.rst:3268 +msgid "" +"Slicing is handled by :meth:`!__getitem__`, :meth:`~object.__setitem__`, " +"and :meth:`~object.__delitem__`. A call like ::" +msgstr "" + +#: ../../../reference/datamodel.rst:3274 +msgid "is translated to ::" +msgstr "" + +#: ../../../reference/datamodel.rst:3278 +msgid "and so forth. Missing slice items are always filled in with ``None``." +msgstr "" + +#: ../../../reference/datamodel.rst:3282 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:3271 +#: ../../../reference/datamodel.rst:3288 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:3279 +#: ../../../reference/datamodel.rst:3296 msgid "" "Called to implement assignment to ``self[key]``. Same note as for :meth:" "`__getitem__`. This should only be implemented for mappings if the objects " @@ -3660,7 +3681,7 @@ msgid "" "for improper *key* values as for the :meth:`__getitem__` method." msgstr "" -#: ../../../reference/datamodel.rst:3288 +#: ../../../reference/datamodel.rst:3305 msgid "" "Called to implement deletion of ``self[key]``. Same note as for :meth:" "`__getitem__`. This should only be implemented for mappings if the objects " @@ -3669,13 +3690,13 @@ msgid "" "values as for the :meth:`__getitem__` method." msgstr "" -#: ../../../reference/datamodel.rst:3297 +#: ../../../reference/datamodel.rst:3314 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:3303 +#: ../../../reference/datamodel.rst:3320 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 " @@ -3683,14 +3704,14 @@ msgid "" "of the container." msgstr "" -#: ../../../reference/datamodel.rst:3311 +#: ../../../reference/datamodel.rst:3328 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:3315 +#: ../../../reference/datamodel.rst:3332 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 :" @@ -3699,7 +3720,7 @@ msgid "" "more efficient than the one provided by :func:`reversed`." msgstr "" -#: ../../../reference/datamodel.rst:3322 +#: ../../../reference/datamodel.rst:3339 msgid "" "The membership test operators (:keyword:`in` and :keyword:`not in`) are " "normally implemented as an iteration through a container. However, container " @@ -3707,14 +3728,14 @@ msgid "" "implementation, which also does not require the object be iterable." msgstr "" -#: ../../../reference/datamodel.rst:3329 +#: ../../../reference/datamodel.rst:3346 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:3333 +#: ../../../reference/datamodel.rst:3350 msgid "" "For objects that don't define :meth:`__contains__`, the membership test " "first tries iteration via :meth:`__iter__`, then the old sequence iteration " @@ -3722,11 +3743,11 @@ msgid "" "reference `." msgstr "" -#: ../../../reference/datamodel.rst:3342 +#: ../../../reference/datamodel.rst:3359 msgid "Emulating numeric types" msgstr "" -#: ../../../reference/datamodel.rst:3344 +#: ../../../reference/datamodel.rst:3361 msgid "" "The following methods can be defined to emulate numeric objects. Methods " "corresponding to operations that are not supported by the particular kind of " @@ -3734,7 +3755,7 @@ msgid "" "should be left undefined." msgstr "" -#: ../../../reference/datamodel.rst:3370 +#: ../../../reference/datamodel.rst:3387 msgid "" "These methods are called to implement the binary arithmetic operations " "(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:" @@ -3748,13 +3769,13 @@ msgid "" "`pow` function is to be supported." msgstr "" -#: ../../../reference/datamodel.rst:3381 +#: ../../../reference/datamodel.rst:3398 msgid "" "If one of those methods does not support the operation with the supplied " "arguments, it should return :data:`NotImplemented`." msgstr "" -#: ../../../reference/datamodel.rst:3404 +#: ../../../reference/datamodel.rst:3421 msgid "" "These methods are called to implement the binary arithmetic operations " "(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:" @@ -3768,21 +3789,21 @@ msgid "" "`NotImplemented` or ``type(y)`` is a subclass of ``type(x)``. [#]_" msgstr "" -#: ../../../reference/datamodel.rst:3415 +#: ../../../reference/datamodel.rst:3432 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:3421 +#: ../../../reference/datamodel.rst:3438 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:3427 +#: ../../../reference/datamodel.rst:3444 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 " @@ -3791,7 +3812,7 @@ msgid "" "ancestors' operations." msgstr "" -#: ../../../reference/datamodel.rst:3447 +#: ../../../reference/datamodel.rst:3464 msgid "" "These methods are called to implement the augmented arithmetic assignments " "(``+=``, ``-=``, ``*=``, ``@=``, ``/=``, ``//=``, ``%=``, ``**=``, ``<<=``, " @@ -3809,19 +3830,19 @@ msgid "" "data model." msgstr "" -#: ../../../reference/datamodel.rst:3470 +#: ../../../reference/datamodel.rst:3487 msgid "" "Called to implement the unary arithmetic operations (``-``, ``+``, :func:" "`abs` and ``~``)." msgstr "" -#: ../../../reference/datamodel.rst:3483 +#: ../../../reference/datamodel.rst:3500 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:3490 +#: ../../../reference/datamodel.rst:3507 msgid "" "Called to implement :func:`operator.index`, and whenever Python needs to " "losslessly convert the numeric object to an integer object (such as in " @@ -3830,14 +3851,14 @@ msgid "" "integer type. Must return an integer." msgstr "" -#: ../../../reference/datamodel.rst:3496 +#: ../../../reference/datamodel.rst:3513 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:3508 +#: ../../../reference/datamodel.rst:3525 msgid "" "Called to implement the built-in function :func:`round` and :mod:`math` " "functions :func:`~math.trunc`, :func:`~math.floor` and :func:`~math.ceil`. " @@ -3846,16 +3867,16 @@ msgid "" "(typically an :class:`int`)." msgstr "" -#: ../../../reference/datamodel.rst:3514 +#: ../../../reference/datamodel.rst:3531 msgid "" ":func:`int` no longer delegates to the :meth:`~object.__trunc__` method." msgstr "" -#: ../../../reference/datamodel.rst:3521 +#: ../../../reference/datamodel.rst:3538 msgid "With Statement Context Managers" msgstr "" -#: ../../../reference/datamodel.rst:3523 +#: ../../../reference/datamodel.rst:3540 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 " @@ -3865,34 +3886,34 @@ msgid "" "can also be used by directly invoking their methods." msgstr "" -#: ../../../reference/datamodel.rst:3534 +#: ../../../reference/datamodel.rst:3551 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:3537 +#: ../../../reference/datamodel.rst:3554 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:3543 +#: ../../../reference/datamodel.rst:3560 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:3550 +#: ../../../reference/datamodel.rst:3567 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:3554 +#: ../../../reference/datamodel.rst:3571 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. " @@ -3900,27 +3921,27 @@ msgid "" "method." msgstr "" -#: ../../../reference/datamodel.rst:3558 +#: ../../../reference/datamodel.rst:3575 msgid "" "Note that :meth:`~object.__exit__` methods should not reraise the passed-in " "exception; this is the caller's responsibility." msgstr "" -#: ../../../reference/datamodel.rst:3564 +#: ../../../reference/datamodel.rst:3581 msgid ":pep:`343` - The \"with\" statement" msgstr "" -#: ../../../reference/datamodel.rst:3565 +#: ../../../reference/datamodel.rst:3582 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../../reference/datamodel.rst:3572 +#: ../../../reference/datamodel.rst:3589 msgid "Customizing positional arguments in class pattern matching" msgstr "" -#: ../../../reference/datamodel.rst:3574 +#: ../../../reference/datamodel.rst:3591 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 " @@ -3928,7 +3949,7 @@ msgid "" "pattern, the class needs to define a *__match_args__* attribute." msgstr "" -#: ../../../reference/datamodel.rst:3581 +#: ../../../reference/datamodel.rst:3598 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 " @@ -3937,7 +3958,7 @@ msgid "" "to setting it to ``()``." msgstr "" -#: ../../../reference/datamodel.rst:3587 +#: ../../../reference/datamodel.rst:3604 msgid "" "For example, if ``MyClass.__match_args__`` is ``(\"left\", \"center\", " "\"right\")`` that means that ``case MyClass(x, y)`` is equivalent to ``case " @@ -3947,19 +3968,19 @@ msgid "" "exc:`TypeError`." msgstr "" -#: ../../../reference/datamodel.rst:3597 +#: ../../../reference/datamodel.rst:3614 msgid ":pep:`634` - Structural Pattern Matching" msgstr "" -#: ../../../reference/datamodel.rst:3598 +#: ../../../reference/datamodel.rst:3615 msgid "The specification for the Python ``match`` statement." msgstr "" -#: ../../../reference/datamodel.rst:3604 +#: ../../../reference/datamodel.rst:3621 msgid "Emulating buffer types" msgstr "" -#: ../../../reference/datamodel.rst:3606 +#: ../../../reference/datamodel.rst:3623 msgid "" "The :ref:`buffer protocol ` provides a way for Python objects " "to expose efficient access to a low-level memory array. This protocol is " @@ -3967,13 +3988,13 @@ msgid "" "and third-party libraries may define additional buffer types." msgstr "" -#: ../../../reference/datamodel.rst:3611 +#: ../../../reference/datamodel.rst:3628 msgid "" "While buffer types are usually implemented in C, it is also possible to " "implement the protocol in Python." msgstr "" -#: ../../../reference/datamodel.rst:3616 +#: ../../../reference/datamodel.rst:3633 msgid "" "Called when a buffer is requested from *self* (for example, by the :class:" "`memoryview` constructor). The *flags* argument is an integer representing " @@ -3983,7 +4004,7 @@ msgid "" "`memoryview` object." msgstr "" -#: ../../../reference/datamodel.rst:3625 +#: ../../../reference/datamodel.rst:3642 msgid "" "Called when a buffer is no longer needed. The *buffer* argument is a :class:" "`memoryview` object that was previously returned by :meth:`~object." @@ -3992,35 +4013,35 @@ msgid "" "to perform any cleanup are not required to implement this method." msgstr "" -#: ../../../reference/datamodel.rst:3636 +#: ../../../reference/datamodel.rst:3653 msgid ":pep:`688` - Making the buffer protocol accessible in Python" msgstr "" -#: ../../../reference/datamodel.rst:3637 +#: ../../../reference/datamodel.rst:3654 msgid "" "Introduces the Python ``__buffer__`` and ``__release_buffer__`` methods." msgstr "" -#: ../../../reference/datamodel.rst:3639 +#: ../../../reference/datamodel.rst:3656 msgid ":class:`collections.abc.Buffer`" msgstr "" -#: ../../../reference/datamodel.rst:3640 +#: ../../../reference/datamodel.rst:3657 msgid "ABC for buffer types." msgstr "" -#: ../../../reference/datamodel.rst:3643 +#: ../../../reference/datamodel.rst:3660 msgid "Annotations" msgstr "" -#: ../../../reference/datamodel.rst:3645 +#: ../../../reference/datamodel.rst:3662 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:3651 +#: ../../../reference/datamodel.rst:3668 msgid "" "This attribute contains the annotations for an object. It is :ref:`lazily " "evaluated `, so accessing the attribute may execute " @@ -4028,24 +4049,24 @@ msgid "" "attribute is set to a dictionary mapping from variable names to annotations." msgstr "" -#: ../../../reference/datamodel.rst:3656 +#: ../../../reference/datamodel.rst:3673 msgid "Annotations are now lazily evaluated." msgstr "" -#: ../../../reference/datamodel.rst:3661 +#: ../../../reference/datamodel.rst:3678 msgid "" "An :term:`annotate function`. Returns a new dictionary object mapping " "attribute/parameter names to their annotation values." msgstr "" -#: ../../../reference/datamodel.rst:3664 +#: ../../../reference/datamodel.rst:3681 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:3668 +#: ../../../reference/datamodel.rst:3685 msgid "" "If an annotate function doesn't support the requested format, it must raise :" "exc:`NotImplementedError`. Annotate functions must always support :attr:" @@ -4053,34 +4074,34 @@ msgid "" "`NotImplementedError()` when called with this format." msgstr "" -#: ../../../reference/datamodel.rst:3673 +#: ../../../reference/datamodel.rst:3690 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:3676 +#: ../../../reference/datamodel.rst:3693 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:3683 +#: ../../../reference/datamodel.rst:3700 msgid ":pep:`649` --- Deferred evaluation of annotation using descriptors" msgstr "" -#: ../../../reference/datamodel.rst:3684 +#: ../../../reference/datamodel.rst:3701 msgid "" "Introduces lazy evaluation of annotations and the ``__annotate__`` function." msgstr "" -#: ../../../reference/datamodel.rst:3690 +#: ../../../reference/datamodel.rst:3707 msgid "Special method lookup" msgstr "" -#: ../../../reference/datamodel.rst:3692 +#: ../../../reference/datamodel.rst:3709 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 " @@ -4088,7 +4109,7 @@ msgid "" "following code raises an exception::" msgstr "" -#: ../../../reference/datamodel.rst:3707 +#: ../../../reference/datamodel.rst:3724 msgid "" "The rationale behind this behaviour lies with a number of special methods " "such as :meth:`~object.__hash__` and :meth:`~object.__repr__` that are " @@ -4097,21 +4118,21 @@ msgid "" "invoked on the type object itself::" msgstr "" -#: ../../../reference/datamodel.rst:3721 +#: ../../../reference/datamodel.rst:3738 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:3730 +#: ../../../reference/datamodel.rst:3747 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:3756 +#: ../../../reference/datamodel.rst:3773 msgid "" "Bypassing the :meth:`~object.__getattribute__` machinery in this fashion " "provides significant scope for speed optimisations within the interpreter, " @@ -4120,29 +4141,29 @@ msgid "" "consistently invoked by the interpreter)." msgstr "" -#: ../../../reference/datamodel.rst:3767 +#: ../../../reference/datamodel.rst:3784 msgid "Coroutines" msgstr "" -#: ../../../reference/datamodel.rst:3771 +#: ../../../reference/datamodel.rst:3788 msgid "Awaitable Objects" msgstr "" -#: ../../../reference/datamodel.rst:3773 +#: ../../../reference/datamodel.rst:3790 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:3779 +#: ../../../reference/datamodel.rst:3796 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:3785 +#: ../../../reference/datamodel.rst:3802 msgid "" "Must return an :term:`iterator`. Should be used to implement :term:" "`awaitable` objects. For instance, :class:`asyncio.Future` implements this " @@ -4150,7 +4171,7 @@ msgid "" "`object` class itself is not awaitable and does not provide this method." msgstr "" -#: ../../../reference/datamodel.rst:3793 +#: ../../../reference/datamodel.rst:3810 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 " @@ -4158,15 +4179,15 @@ msgid "" "g. :mod:`asyncio`) that will be managing the :term:`awaitable` object." msgstr "" -#: ../../../reference/datamodel.rst:3801 +#: ../../../reference/datamodel.rst:3818 msgid ":pep:`492` for additional information about awaitable objects." msgstr "" -#: ../../../reference/datamodel.rst:3807 +#: ../../../reference/datamodel.rst:3824 msgid "Coroutine Objects" msgstr "" -#: ../../../reference/datamodel.rst:3809 +#: ../../../reference/datamodel.rst:3826 msgid "" ":term:`Coroutine objects ` are :term:`awaitable` objects. A " "coroutine's execution can be controlled by calling :meth:`~object.__await__` " @@ -4177,18 +4198,18 @@ msgid "" "should not directly raise unhandled :exc:`StopIteration` exceptions." msgstr "" -#: ../../../reference/datamodel.rst:3817 +#: ../../../reference/datamodel.rst:3834 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:3821 +#: ../../../reference/datamodel.rst:3838 msgid "It is a :exc:`RuntimeError` to await on a coroutine more than once." msgstr "" -#: ../../../reference/datamodel.rst:3827 +#: ../../../reference/datamodel.rst:3844 msgid "" "Starts or resumes execution of the coroutine. If *value* is ``None``, this " "is equivalent to advancing the iterator returned by :meth:`~object." @@ -4199,7 +4220,7 @@ msgid "" "value, described above." msgstr "" -#: ../../../reference/datamodel.rst:3838 +#: ../../../reference/datamodel.rst:3855 msgid "" "Raises the specified exception in the coroutine. This method delegates to " "the :meth:`~generator.throw` method of the iterator that caused the " @@ -4210,13 +4231,13 @@ msgid "" "not caught in the coroutine, it propagates back to the caller." msgstr "" -#: ../../../reference/datamodel.rst:3849 +#: ../../../reference/datamodel.rst:3866 msgid "" "The second signature \\(type\\[, value\\[, traceback\\]\\]\\) is deprecated " "and may be removed in a future version of Python." msgstr "" -#: ../../../reference/datamodel.rst:3854 +#: ../../../reference/datamodel.rst:3871 msgid "" "Causes the coroutine to clean itself up and exit. If the coroutine is " "suspended, this method first delegates to the :meth:`~generator.close` " @@ -4226,103 +4247,103 @@ msgid "" "is marked as having finished executing, even if it was never started." msgstr "" -#: ../../../reference/datamodel.rst:3862 +#: ../../../reference/datamodel.rst:3879 msgid "" "Coroutine objects are automatically closed using the above process when they " "are about to be destroyed." msgstr "" -#: ../../../reference/datamodel.rst:3868 +#: ../../../reference/datamodel.rst:3885 msgid "Asynchronous Iterators" msgstr "" -#: ../../../reference/datamodel.rst:3870 +#: ../../../reference/datamodel.rst:3887 msgid "" "An *asynchronous iterator* can call asynchronous code in its ``__anext__`` " "method." msgstr "" -#: ../../../reference/datamodel.rst:3873 +#: ../../../reference/datamodel.rst:3890 msgid "" "Asynchronous iterators can be used in an :keyword:`async for` statement." msgstr "" -#: ../../../reference/datamodel.rst:3875 ../../../reference/datamodel.rst:3924 +#: ../../../reference/datamodel.rst:3892 ../../../reference/datamodel.rst:3941 msgid "The :class:`object` class itself does not provide these methods." msgstr "" -#: ../../../reference/datamodel.rst:3880 +#: ../../../reference/datamodel.rst:3897 msgid "Must return an *asynchronous iterator* object." msgstr "" -#: ../../../reference/datamodel.rst:3884 +#: ../../../reference/datamodel.rst:3901 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:3887 +#: ../../../reference/datamodel.rst:3904 msgid "An example of an asynchronous iterable object::" msgstr "" -#: ../../../reference/datamodel.rst:3904 +#: ../../../reference/datamodel.rst:3921 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:3909 +#: ../../../reference/datamodel.rst:3926 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:3917 +#: ../../../reference/datamodel.rst:3934 msgid "Asynchronous Context Managers" msgstr "" -#: ../../../reference/datamodel.rst:3919 +#: ../../../reference/datamodel.rst:3936 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:3922 +#: ../../../reference/datamodel.rst:3939 msgid "" "Asynchronous context managers can be used in an :keyword:`async with` " "statement." msgstr "" -#: ../../../reference/datamodel.rst:3928 +#: ../../../reference/datamodel.rst:3945 msgid "" "Semantically similar to :meth:`~object.__enter__`, the only difference being " "that it must return an *awaitable*." msgstr "" -#: ../../../reference/datamodel.rst:3933 +#: ../../../reference/datamodel.rst:3950 msgid "" "Semantically similar to :meth:`~object.__exit__`, the only difference being " "that it must return an *awaitable*." msgstr "" -#: ../../../reference/datamodel.rst:3936 +#: ../../../reference/datamodel.rst:3953 msgid "An example of an asynchronous context manager class::" msgstr "" -#: ../../../reference/datamodel.rst:3949 +#: ../../../reference/datamodel.rst:3966 msgid "Footnotes" msgstr "" -#: ../../../reference/datamodel.rst:3950 +#: ../../../reference/datamodel.rst:3967 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:3954 +#: ../../../reference/datamodel.rst:3971 msgid "" "The :meth:`~object.__hash__`, :meth:`~object.__iter__`, :meth:`~object." "__reversed__`, :meth:`~object.__contains__`, :meth:`~object." @@ -4331,7 +4352,7 @@ msgid "" "by relying on the behavior that ``None`` is not callable." msgstr "" -#: ../../../reference/datamodel.rst:3961 +#: ../../../reference/datamodel.rst:3978 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 " @@ -4339,14 +4360,14 @@ msgid "" "instead have the opposite effect of explicitly *blocking* such fallback." msgstr "" -#: ../../../reference/datamodel.rst:3967 +#: ../../../reference/datamodel.rst:3984 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:3971 +#: ../../../reference/datamodel.rst:3988 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 " @@ -4367,9 +4388,9 @@ msgstr "" #: ../../../reference/datamodel.rst:839 ../../../reference/datamodel.rst:863 #: ../../../reference/datamodel.rst:899 ../../../reference/datamodel.rst:1161 #: ../../../reference/datamodel.rst:1329 ../../../reference/datamodel.rst:1356 -#: ../../../reference/datamodel.rst:1428 ../../../reference/datamodel.rst:1536 -#: ../../../reference/datamodel.rst:1644 ../../../reference/datamodel.rst:1761 -#: ../../../reference/datamodel.rst:2192 ../../../reference/datamodel.rst:3226 +#: ../../../reference/datamodel.rst:1444 ../../../reference/datamodel.rst:1552 +#: ../../../reference/datamodel.rst:1660 ../../../reference/datamodel.rst:1777 +#: ../../../reference/datamodel.rst:2208 ../../../reference/datamodel.rst:3264 msgid "object" msgstr "" @@ -4380,12 +4401,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:839 -#: ../../../reference/datamodel.rst:1385 ../../../reference/datamodel.rst:1844 -#: ../../../reference/datamodel.rst:2093 ../../../reference/datamodel.rst:2099 -#: ../../../reference/datamodel.rst:2192 ../../../reference/datamodel.rst:2759 -#: ../../../reference/datamodel.rst:3196 ../../../reference/datamodel.rst:3365 -#: ../../../reference/datamodel.rst:3400 ../../../reference/datamodel.rst:3468 -#: ../../../reference/datamodel.rst:3478 ../../../reference/datamodel.rst:3506 +#: ../../../reference/datamodel.rst:1385 ../../../reference/datamodel.rst:1860 +#: ../../../reference/datamodel.rst:2109 ../../../reference/datamodel.rst:2115 +#: ../../../reference/datamodel.rst:2208 ../../../reference/datamodel.rst:2775 +#: ../../../reference/datamodel.rst:3212 ../../../reference/datamodel.rst:3382 +#: ../../../reference/datamodel.rst:3417 ../../../reference/datamodel.rst:3485 +#: ../../../reference/datamodel.rst:3495 ../../../reference/datamodel.rst:3523 msgid "built-in function" msgstr "" @@ -4394,7 +4415,7 @@ msgid "id" msgstr "" #: ../../../reference/datamodel.rst:22 ../../../reference/datamodel.rst:122 -#: ../../../reference/datamodel.rst:2759 +#: ../../../reference/datamodel.rst:2775 msgid "type" msgstr "" @@ -4517,12 +4538,12 @@ msgstr "" msgid "Java" msgstr "" -#: ../../../reference/datamodel.rst:284 ../../../reference/datamodel.rst:3478 +#: ../../../reference/datamodel.rst:284 ../../../reference/datamodel.rst:3495 msgid "complex" msgstr "" #: ../../../reference/datamodel.rst:298 ../../../reference/datamodel.rst:447 -#: ../../../reference/datamodel.rst:488 ../../../reference/datamodel.rst:3196 +#: ../../../reference/datamodel.rst:488 ../../../reference/datamodel.rst:3212 msgid "len" msgstr "" @@ -4547,15 +4568,15 @@ msgstr "" msgid "slicing" msgstr "" -#: ../../../reference/datamodel.rst:316 ../../../reference/datamodel.rst:1856 +#: ../../../reference/datamodel.rst:316 ../../../reference/datamodel.rst:1872 msgid "start (slice object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:316 ../../../reference/datamodel.rst:1856 +#: ../../../reference/datamodel.rst:316 ../../../reference/datamodel.rst:1872 msgid "stop (slice object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:316 ../../../reference/datamodel.rst:1856 +#: ../../../reference/datamodel.rst:316 ../../../reference/datamodel.rst:1872 msgid "step (slice object attribute)" msgstr "" @@ -4568,7 +4589,7 @@ msgid "immutable" msgstr "" #: ../../../reference/datamodel.rst:354 ../../../reference/datamodel.rst:358 -#: ../../../reference/datamodel.rst:2068 ../../../reference/datamodel.rst:2099 +#: ../../../reference/datamodel.rst:2084 ../../../reference/datamodel.rst:2115 msgid "string" msgstr "" @@ -4608,7 +4629,7 @@ msgstr "" msgid "empty" msgstr "" -#: ../../../reference/datamodel.rst:396 ../../../reference/datamodel.rst:2093 +#: ../../../reference/datamodel.rst:396 ../../../reference/datamodel.rst:2109 msgid "bytes" msgstr "" @@ -4630,8 +4651,8 @@ msgid "assignment" msgstr "" #: ../../../reference/datamodel.rst:408 ../../../reference/datamodel.rst:899 -#: ../../../reference/datamodel.rst:1798 ../../../reference/datamodel.rst:1986 -#: ../../../reference/datamodel.rst:3530 +#: ../../../reference/datamodel.rst:1814 ../../../reference/datamodel.rst:2002 +#: ../../../reference/datamodel.rst:3547 msgid "statement" msgstr "" @@ -4668,7 +4689,7 @@ msgid "mapping" msgstr "" #: ../../../reference/datamodel.rst:505 ../../../reference/datamodel.rst:1161 -#: ../../../reference/datamodel.rst:2192 +#: ../../../reference/datamodel.rst:2208 msgid "dictionary" msgstr "" @@ -4691,7 +4712,7 @@ msgid "function" msgstr "" #: ../../../reference/datamodel.rst:541 ../../../reference/datamodel.rst:1161 -#: ../../../reference/datamodel.rst:1184 ../../../reference/datamodel.rst:3142 +#: ../../../reference/datamodel.rst:1184 ../../../reference/datamodel.rst:3158 msgid "call" msgstr "" @@ -4799,7 +4820,7 @@ msgstr "" msgid "__module__ (method attribute)" msgstr "" -#: ../../../reference/datamodel.rst:783 ../../../reference/datamodel.rst:1536 +#: ../../../reference/datamodel.rst:783 ../../../reference/datamodel.rst:1552 msgid "generator" msgstr "" @@ -4807,7 +4828,7 @@ msgstr "" msgid "iterator" msgstr "" -#: ../../../reference/datamodel.rst:801 ../../../reference/datamodel.rst:3763 +#: ../../../reference/datamodel.rst:801 ../../../reference/datamodel.rst:3780 msgid "coroutine" msgstr "" @@ -4872,8 +4893,8 @@ msgid "__dict__ (module attribute)" msgstr "" #: ../../../reference/datamodel.rst:1161 ../../../reference/datamodel.rst:1179 -#: ../../../reference/datamodel.rst:1329 ../../../reference/datamodel.rst:1969 -#: ../../../reference/datamodel.rst:2872 +#: ../../../reference/datamodel.rst:1329 ../../../reference/datamodel.rst:1985 +#: ../../../reference/datamodel.rst:2888 msgid "class" msgstr "" @@ -4883,7 +4904,7 @@ msgid "class instance" msgstr "" #: ../../../reference/datamodel.rst:1161 ../../../reference/datamodel.rst:1329 -#: ../../../reference/datamodel.rst:3142 +#: ../../../reference/datamodel.rst:3158 msgid "instance" msgstr "" @@ -4987,370 +5008,370 @@ msgstr "" msgid "stderr (in module sys)" msgstr "" -#: ../../../reference/datamodel.rst:1414 +#: ../../../reference/datamodel.rst:1430 msgid "internal type" msgstr "" -#: ../../../reference/datamodel.rst:1414 +#: ../../../reference/datamodel.rst:1430 msgid "types, internal" msgstr "" -#: ../../../reference/datamodel.rst:1428 +#: ../../../reference/datamodel.rst:1444 msgid "bytecode" msgstr "" -#: ../../../reference/datamodel.rst:1428 +#: ../../../reference/datamodel.rst:1444 msgid "code" msgstr "" -#: ../../../reference/datamodel.rst:1428 +#: ../../../reference/datamodel.rst:1444 msgid "code object" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_argcount (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_posonlyargcount (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_kwonlyargcount (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_code (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_consts (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_filename (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_firstlineno (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_flags (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_lnotab (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_name (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_names (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_nlocals (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_stacksize (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_varnames (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_cellvars (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_freevars (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1439 +#: ../../../reference/datamodel.rst:1455 msgid "co_qualname (code object attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1552 +#: ../../../reference/datamodel.rst:1568 msgid "documentation string" msgstr "" -#: ../../../reference/datamodel.rst:1644 +#: ../../../reference/datamodel.rst:1660 msgid "frame" msgstr "" -#: ../../../reference/datamodel.rst:1650 +#: ../../../reference/datamodel.rst:1666 msgid "f_back (frame attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1650 +#: ../../../reference/datamodel.rst:1666 msgid "f_code (frame attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1650 +#: ../../../reference/datamodel.rst:1666 msgid "f_globals (frame attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1650 +#: ../../../reference/datamodel.rst:1666 msgid "f_locals (frame attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1650 +#: ../../../reference/datamodel.rst:1666 msgid "f_lasti (frame attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1650 +#: ../../../reference/datamodel.rst:1666 msgid "f_builtins (frame attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1650 +#: ../../../reference/datamodel.rst:1666 msgid "f_generator (frame attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1701 +#: ../../../reference/datamodel.rst:1717 msgid "f_trace (frame attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1701 +#: ../../../reference/datamodel.rst:1717 msgid "f_trace_lines (frame attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1701 +#: ../../../reference/datamodel.rst:1717 msgid "f_trace_opcodes (frame attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1701 +#: ../../../reference/datamodel.rst:1717 msgid "f_lineno (frame attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1761 +#: ../../../reference/datamodel.rst:1777 msgid "traceback" msgstr "" -#: ../../../reference/datamodel.rst:1761 +#: ../../../reference/datamodel.rst:1777 msgid "stack" msgstr "" -#: ../../../reference/datamodel.rst:1761 +#: ../../../reference/datamodel.rst:1777 msgid "trace" msgstr "" -#: ../../../reference/datamodel.rst:1761 +#: ../../../reference/datamodel.rst:1777 msgid "exception" msgstr "" -#: ../../../reference/datamodel.rst:1761 +#: ../../../reference/datamodel.rst:1777 msgid "handler" msgstr "" -#: ../../../reference/datamodel.rst:1761 +#: ../../../reference/datamodel.rst:1777 msgid "execution" msgstr "" -#: ../../../reference/datamodel.rst:1761 +#: ../../../reference/datamodel.rst:1777 msgid "exc_info (in module sys)" msgstr "" -#: ../../../reference/datamodel.rst:1761 +#: ../../../reference/datamodel.rst:1777 msgid "last_traceback (in module sys)" msgstr "" -#: ../../../reference/datamodel.rst:1761 +#: ../../../reference/datamodel.rst:1777 msgid "sys.exc_info" msgstr "" -#: ../../../reference/datamodel.rst:1761 +#: ../../../reference/datamodel.rst:1777 msgid "sys.exception" msgstr "" -#: ../../../reference/datamodel.rst:1761 +#: ../../../reference/datamodel.rst:1777 msgid "sys.last_traceback" msgstr "" -#: ../../../reference/datamodel.rst:1798 +#: ../../../reference/datamodel.rst:1814 msgid "tb_frame (traceback attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1798 +#: ../../../reference/datamodel.rst:1814 msgid "tb_lineno (traceback attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1798 +#: ../../../reference/datamodel.rst:1814 msgid "tb_lasti (traceback attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1798 +#: ../../../reference/datamodel.rst:1814 msgid "try" msgstr "" -#: ../../../reference/datamodel.rst:1828 +#: ../../../reference/datamodel.rst:1844 msgid "tb_next (traceback attribute)" msgstr "" -#: ../../../reference/datamodel.rst:1844 ../../../reference/datamodel.rst:3226 +#: ../../../reference/datamodel.rst:1860 ../../../reference/datamodel.rst:3264 msgid "slice" msgstr "" -#: ../../../reference/datamodel.rst:1904 +#: ../../../reference/datamodel.rst:1920 msgid "operator" msgstr "" -#: ../../../reference/datamodel.rst:1904 +#: ../../../reference/datamodel.rst:1920 msgid "overloading" msgstr "" -#: ../../../reference/datamodel.rst:1904 +#: ../../../reference/datamodel.rst:1920 msgid "__getitem__() (mapping object method)" msgstr "" -#: ../../../reference/datamodel.rst:1940 +#: ../../../reference/datamodel.rst:1956 msgid "subclassing" msgstr "" -#: ../../../reference/datamodel.rst:1940 +#: ../../../reference/datamodel.rst:1956 msgid "immutable types" msgstr "" -#: ../../../reference/datamodel.rst:1969 +#: ../../../reference/datamodel.rst:1985 msgid "constructor" msgstr "" -#: ../../../reference/datamodel.rst:1986 +#: ../../../reference/datamodel.rst:2002 msgid "destructor" msgstr "" -#: ../../../reference/datamodel.rst:1986 +#: ../../../reference/datamodel.rst:2002 msgid "finalizer" msgstr "" -#: ../../../reference/datamodel.rst:1986 +#: ../../../reference/datamodel.rst:2002 msgid "del" msgstr "" -#: ../../../reference/datamodel.rst:2050 +#: ../../../reference/datamodel.rst:2066 msgid "repr() (built-in function)" msgstr "" -#: ../../../reference/datamodel.rst:2050 +#: ../../../reference/datamodel.rst:2066 msgid "__repr__() (object method)" msgstr "" -#: ../../../reference/datamodel.rst:2068 +#: ../../../reference/datamodel.rst:2084 msgid "__str__() (object method)" msgstr "" -#: ../../../reference/datamodel.rst:2068 +#: ../../../reference/datamodel.rst:2084 msgid "format() (built-in function)" msgstr "" -#: ../../../reference/datamodel.rst:2068 +#: ../../../reference/datamodel.rst:2084 msgid "print() (built-in function)" msgstr "" -#: ../../../reference/datamodel.rst:2099 +#: ../../../reference/datamodel.rst:2115 msgid "__format__() (object method)" msgstr "" -#: ../../../reference/datamodel.rst:2099 +#: ../../../reference/datamodel.rst:2115 msgid "conversion" msgstr "" -#: ../../../reference/datamodel.rst:2099 +#: ../../../reference/datamodel.rst:2115 msgid "print" msgstr "" -#: ../../../reference/datamodel.rst:2141 +#: ../../../reference/datamodel.rst:2157 msgid "comparisons" msgstr "" -#: ../../../reference/datamodel.rst:2192 +#: ../../../reference/datamodel.rst:2208 msgid "hash" msgstr "" -#: ../../../reference/datamodel.rst:2273 +#: ../../../reference/datamodel.rst:2289 msgid "__len__() (mapping object method)" msgstr "" -#: ../../../reference/datamodel.rst:2378 +#: ../../../reference/datamodel.rst:2394 msgid "__getattr__ (module attribute)" msgstr "" -#: ../../../reference/datamodel.rst:2378 +#: ../../../reference/datamodel.rst:2394 msgid "__dir__ (module attribute)" msgstr "" -#: ../../../reference/datamodel.rst:2378 +#: ../../../reference/datamodel.rst:2394 msgid "__class__ (module attribute)" msgstr "" -#: ../../../reference/datamodel.rst:2759 +#: ../../../reference/datamodel.rst:2775 msgid "metaclass" msgstr "" -#: ../../../reference/datamodel.rst:2759 +#: ../../../reference/datamodel.rst:2775 msgid "= (equals)" msgstr "" -#: ../../../reference/datamodel.rst:2759 +#: ../../../reference/datamodel.rst:2775 msgid "class definition" msgstr "" -#: ../../../reference/datamodel.rst:2825 +#: ../../../reference/datamodel.rst:2841 msgid "metaclass hint" msgstr "" -#: ../../../reference/datamodel.rst:2848 +#: ../../../reference/datamodel.rst:2864 msgid "__prepare__ (metaclass method)" msgstr "" -#: ../../../reference/datamodel.rst:2872 +#: ../../../reference/datamodel.rst:2888 msgid "body" msgstr "" -#: ../../../reference/datamodel.rst:2892 +#: ../../../reference/datamodel.rst:2908 msgid "__class__ (method cell)" msgstr "" -#: ../../../reference/datamodel.rst:2892 +#: ../../../reference/datamodel.rst:2908 msgid "__classcell__ (class namespace entry)" msgstr "" -#: ../../../reference/datamodel.rst:3196 +#: ../../../reference/datamodel.rst:3212 msgid "__bool__() (object method)" msgstr "" -#: ../../../reference/datamodel.rst:3365 ../../../reference/datamodel.rst:3400 +#: ../../../reference/datamodel.rst:3382 ../../../reference/datamodel.rst:3417 msgid "divmod" msgstr "" -#: ../../../reference/datamodel.rst:3365 ../../../reference/datamodel.rst:3400 +#: ../../../reference/datamodel.rst:3382 ../../../reference/datamodel.rst:3417 msgid "pow" msgstr "" -#: ../../../reference/datamodel.rst:3468 +#: ../../../reference/datamodel.rst:3485 msgid "abs" msgstr "" -#: ../../../reference/datamodel.rst:3478 +#: ../../../reference/datamodel.rst:3495 msgid "int" msgstr "" -#: ../../../reference/datamodel.rst:3478 +#: ../../../reference/datamodel.rst:3495 msgid "float" msgstr "" -#: ../../../reference/datamodel.rst:3506 +#: ../../../reference/datamodel.rst:3523 msgid "round" msgstr "" -#: ../../../reference/datamodel.rst:3530 +#: ../../../reference/datamodel.rst:3547 msgid "with" msgstr "" -#: ../../../reference/datamodel.rst:3530 +#: ../../../reference/datamodel.rst:3547 msgid "context manager" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/tutorial/errors.pot b/main/locale/pot/LC_MESSAGES/tutorial/errors.pot index 57aa274a52a..5dce2a8ef1d 100644 --- a/main/locale/pot/LC_MESSAGES/tutorial/errors.pot +++ b/main/locale/pot/LC_MESSAGES/tutorial/errors.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-11 08:40+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -149,8 +149,7 @@ msgid "" "specify handlers for different exceptions. At most one handler will be " "executed. Handlers only handle exceptions that occur in the corresponding " "*try clause*, not in other handlers of the same :keyword:`!try` statement. " -"An *except clause* may name multiple exceptions as a parenthesized tuple, " -"for example::" +"An *except clause* may name multiple exceptions, for example::" msgstr "" #: ../../../tutorial/errors.rst:129 diff --git a/main/locale/pot/LC_MESSAGES/using/cmdline.pot b/main/locale/pot/LC_MESSAGES/using/cmdline.pot index e8d37a53a47..b9bf2661772 100644 --- a/main/locale/pot/LC_MESSAGES/using/cmdline.pot +++ b/main/locale/pot/LC_MESSAGES/using/cmdline.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -80,7 +80,7 @@ msgstr "" msgid "" "When called with ``-c command``, it executes the Python statement(s) given " "as *command*. Here *command* may contain multiple statements separated by " -"newlines. Leading whitespace is significant in Python statements!" +"newlines." msgstr "" #: ../../../using/cmdline.rst:53 @@ -218,7 +218,7 @@ msgid "" "path`." msgstr "" -#: ../../../using/cmdline.rst:144 ../../../using/cmdline.rst:860 +#: ../../../using/cmdline.rst:144 ../../../using/cmdline.rst:867 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_stdin`` with no " "arguments." @@ -535,8 +535,8 @@ msgstr "" msgid "See also :envvar:`PYTHONNOUSERSITE`." msgstr "" -#: ../../../using/cmdline.rst:413 ../../../using/cmdline.rst:957 -#: ../../../using/cmdline.rst:969 +#: ../../../using/cmdline.rst:413 ../../../using/cmdline.rst:965 +#: ../../../using/cmdline.rst:980 msgid ":pep:`370` -- Per user site-packages directory" msgstr "" @@ -586,7 +586,7 @@ msgid "" "messages to :data:`sys.stderr`." msgstr "" -#: ../../../using/cmdline.rst:455 ../../../using/cmdline.rst:985 +#: ../../../using/cmdline.rst:455 ../../../using/cmdline.rst:996 msgid "" "The simplest settings apply a particular action unconditionally to all " "warnings emitted by a process (even those that are otherwise ignored by " @@ -663,13 +663,13 @@ msgid "" "can be used to use a regular expression on the warning message." msgstr "" -#: ../../../using/cmdline.rst:512 ../../../using/cmdline.rst:997 +#: ../../../using/cmdline.rst:512 ../../../using/cmdline.rst:1008 msgid "" "See :ref:`warning-filter` and :ref:`describing-warning-filters` for more " "details." msgstr "" -#: ../../../using/cmdline.rst:515 ../../../using/cmdline.rst:1000 +#: ../../../using/cmdline.rst:515 ../../../using/cmdline.rst:1011 msgid "Added regular expression support for *message* and *module*." msgstr "" @@ -871,13 +871,21 @@ msgstr "" #: ../../../using/cmdline.rst:690 msgid "" +":samp:`-X pathconfig_warnings={0,1}` if true (``1``) then :ref:`sys-path-" +"init` is allowed to log warnings into stderr. If false (``0``) suppress " +"these warnings. Set to true by default. See also :envvar:" +"`PYTHON_PATHCONFIG_WARNINGS`." +msgstr "" + +#: ../../../using/cmdline.rst:697 +msgid "" ":samp:`-X tlbc={0,1}` enables (1, the default) or disables (0) thread-local " "bytecode in builds configured with :option:`--disable-gil`. When disabled, " "this also disables the specializing interpreter. See also :envvar:" "`PYTHON_TLBC`." msgstr "" -#: ../../../using/cmdline.rst:697 +#: ../../../using/cmdline.rst:704 msgid "" ":samp:`-X lazy_imports={all,none,normal}` controls lazy import behavior. " "``all`` makes all imports lazy by default, ``none`` disables lazy imports " @@ -886,56 +894,56 @@ msgid "" "`PYTHON_LAZY_IMPORTS`." msgstr "" -#: ../../../using/cmdline.rst:705 +#: ../../../using/cmdline.rst:712 msgid "" "It also allows passing arbitrary values and retrieving them through the :" "data:`sys._xoptions` dictionary." msgstr "" -#: ../../../using/cmdline.rst:710 +#: ../../../using/cmdline.rst:717 msgid "Removed the ``-X showalloccount`` option." msgstr "" -#: ../../../using/cmdline.rst:713 +#: ../../../using/cmdline.rst:720 msgid "Removed the ``-X oldparser`` option." msgstr "" -#: ../../../using/cmdline.rst:718 +#: ../../../using/cmdline.rst:725 msgid "" ":option:`!-J` is no longer reserved for use by Jython_, and now has no " "special meaning." msgstr "" -#: ../../../using/cmdline.rst:726 +#: ../../../using/cmdline.rst:733 msgid "Controlling color" msgstr "" -#: ../../../using/cmdline.rst:728 +#: ../../../using/cmdline.rst:735 msgid "" "The Python interpreter is configured by default to use colors to highlight " "output in certain situations such as when displaying tracebacks. This " "behavior can be controlled by setting different environment variables." msgstr "" -#: ../../../using/cmdline.rst:732 +#: ../../../using/cmdline.rst:739 msgid "" "Setting the environment variable ``TERM`` to ``dumb`` will disable color." msgstr "" -#: ../../../using/cmdline.rst:734 +#: ../../../using/cmdline.rst:741 msgid "" "If the |FORCE_COLOR|_ environment variable is set, then color will be " "enabled regardless of the value of TERM. This is useful on CI systems which " "aren’t terminals but can still display ANSI escape sequences." msgstr "" -#: ../../../using/cmdline.rst:738 +#: ../../../using/cmdline.rst:745 msgid "" "If the |NO_COLOR|_ environment variable is set, Python will disable all " "color in the output. This takes precedence over ``FORCE_COLOR``." msgstr "" -#: ../../../using/cmdline.rst:741 +#: ../../../using/cmdline.rst:748 msgid "" "All these environment variables are used also by other tools to control " "color output. To control the color output only in the Python interpreter, " @@ -944,11 +952,11 @@ msgid "" "``FORCE_COLOR``." msgstr "" -#: ../../../using/cmdline.rst:751 +#: ../../../using/cmdline.rst:758 msgid "Environment variables" msgstr "" -#: ../../../using/cmdline.rst:753 +#: ../../../using/cmdline.rst:760 msgid "" "These environment variables influence Python's behavior, they are processed " "before the command-line switches other than -E or -I. It is customary that " @@ -956,7 +964,7 @@ msgid "" "conflict." msgstr "" -#: ../../../using/cmdline.rst:760 +#: ../../../using/cmdline.rst:767 msgid "" "Change the location of the standard Python libraries. By default, the " "libraries are searched in :file:`{prefix}/lib/python{version}` and :file:" @@ -965,14 +973,14 @@ msgid "" "file:`/usr/local`." msgstr "" -#: ../../../using/cmdline.rst:766 +#: ../../../using/cmdline.rst:773 msgid "" "When :envvar:`PYTHONHOME` is set to a single directory, its value replaces " "both :file:`{prefix}` and :file:`{exec_prefix}`. To specify different " "values for these, set :envvar:`PYTHONHOME` to :file:`{prefix}:{exec_prefix}`." msgstr "" -#: ../../../using/cmdline.rst:773 +#: ../../../using/cmdline.rst:780 msgid "" "Augment the default search path for module files. The format is the same as " "the shell's :envvar:`PATH`: one or more directory pathnames separated by :" @@ -980,21 +988,21 @@ msgid "" "existent directories are silently ignored." msgstr "" -#: ../../../using/cmdline.rst:778 +#: ../../../using/cmdline.rst:785 msgid "" "In addition to normal directories, individual :envvar:`PYTHONPATH` entries " "may refer to zipfiles containing pure Python modules (in either source or " "compiled form). Extension modules cannot be imported from zipfiles." msgstr "" -#: ../../../using/cmdline.rst:782 +#: ../../../using/cmdline.rst:789 msgid "" "The default search path is installation dependent, but generally begins " "with :file:`{prefix}/lib/python{version}` (see :envvar:`PYTHONHOME` above). " "It is *always* appended to :envvar:`PYTHONPATH`." msgstr "" -#: ../../../using/cmdline.rst:786 +#: ../../../using/cmdline.rst:793 msgid "" "An additional directory will be inserted in the search path in front of :" "envvar:`PYTHONPATH` as described above under :ref:`using-on-interface-" @@ -1002,19 +1010,19 @@ msgid "" "the variable :data:`sys.path`." msgstr "" -#: ../../../using/cmdline.rst:794 +#: ../../../using/cmdline.rst:801 msgid "" "If this is set to a non-empty string, don't prepend a potentially unsafe " "path to :data:`sys.path`: see the :option:`-P` option for details." msgstr "" -#: ../../../using/cmdline.rst:802 +#: ../../../using/cmdline.rst:809 msgid "" "If this is set to a non-empty string, it overrides the :data:`sys." "platlibdir` value." msgstr "" -#: ../../../using/cmdline.rst:810 +#: ../../../using/cmdline.rst:817 msgid "" "If this is the name of a readable file, the Python commands in that file are " "executed before the first prompt is displayed in interactive mode. The file " @@ -1025,20 +1033,20 @@ msgid "" "file." msgstr "" -#: ../../../using/cmdline.rst:817 ../../../using/cmdline.rst:819 +#: ../../../using/cmdline.rst:824 ../../../using/cmdline.rst:826 msgid "" "Raises an :ref:`auditing event ` ``cpython.run_startup`` with the " "filename as the argument when called on startup." msgstr "" -#: ../../../using/cmdline.rst:825 +#: ../../../using/cmdline.rst:832 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-O` option. If set to an integer, it is equivalent to specifying :" "option:`-O` multiple times." msgstr "" -#: ../../../using/cmdline.rst:832 +#: ../../../using/cmdline.rst:839 msgid "" "If this is set, it names a callable using dotted-path notation. The module " "containing the callable will be imported and then the callable will be run " @@ -1049,68 +1057,68 @@ msgid "" "breakpointhook` to do nothing but return immediately." msgstr "" -#: ../../../using/cmdline.rst:844 +#: ../../../using/cmdline.rst:851 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-d` option. If set to an integer, it is equivalent to specifying :" "option:`-d` multiple times." msgstr "" -#: ../../../using/cmdline.rst:848 +#: ../../../using/cmdline.rst:855 msgid "" "This environment variable requires a :ref:`debug build of Python `, otherwise it's ignored." msgstr "" -#: ../../../using/cmdline.rst:854 +#: ../../../using/cmdline.rst:861 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-i` option." msgstr "" -#: ../../../using/cmdline.rst:857 +#: ../../../using/cmdline.rst:864 msgid "" "This variable can also be modified by Python code using :data:`os.environ` " "to force inspect mode on program termination." msgstr "" -#: ../../../using/cmdline.rst:862 +#: ../../../using/cmdline.rst:869 msgid "(also 3.11.10, 3.10.15, 3.9.20, and 3.8.20) Emits audit events." msgstr "" -#: ../../../using/cmdline.rst:865 +#: ../../../using/cmdline.rst:872 msgid "" "Uses PyREPL if possible, in which case :envvar:`PYTHONSTARTUP` is also " "executed. Emits audit events." msgstr "" -#: ../../../using/cmdline.rst:872 +#: ../../../using/cmdline.rst:879 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-u` option." msgstr "" -#: ../../../using/cmdline.rst:878 +#: ../../../using/cmdline.rst:885 msgid "" "If this is set to a non-empty string it is equivalent to specifying the :" "option:`-v` option. If set to an integer, it is equivalent to specifying :" "option:`-v` multiple times." msgstr "" -#: ../../../using/cmdline.rst:885 +#: ../../../using/cmdline.rst:892 msgid "" "If this is set, Python ignores case in :keyword:`import` statements. This " "only works on Windows and macOS." msgstr "" -#: ../../../using/cmdline.rst:891 +#: ../../../using/cmdline.rst:898 msgid "" "If this is set to a non-empty string, Python won't try to write ``.pyc`` " "files on the import of source modules. This is equivalent to specifying " "the :option:`-B` option." msgstr "" -#: ../../../using/cmdline.rst:898 +#: ../../../using/cmdline.rst:905 msgid "" "If this is set, Python will write ``.pyc`` files in a mirror directory tree " "at this path, instead of in ``__pycache__`` directories within the source " @@ -1118,40 +1126,40 @@ msgid "" "``pycache_prefix=PATH`` option." msgstr "" -#: ../../../using/cmdline.rst:908 +#: ../../../using/cmdline.rst:915 msgid "" "If this variable is not set or set to ``random``, a random value is used to " "seed the hashes of str and bytes objects." msgstr "" -#: ../../../using/cmdline.rst:911 +#: ../../../using/cmdline.rst:918 msgid "" "If :envvar:`PYTHONHASHSEED` is set to an integer value, it is used as a " "fixed seed for generating the hash() of the types covered by the hash " "randomization." msgstr "" -#: ../../../using/cmdline.rst:915 +#: ../../../using/cmdline.rst:922 msgid "" "Its purpose is to allow repeatable hashing, such as for selftests for the " "interpreter itself, or to allow a cluster of python processes to share hash " "values." msgstr "" -#: ../../../using/cmdline.rst:919 +#: ../../../using/cmdline.rst:926 msgid "" "The integer must be a decimal number in the range [0,4294967295]. " "Specifying the value 0 will disable hash randomization." msgstr "" -#: ../../../using/cmdline.rst:926 +#: ../../../using/cmdline.rst:933 msgid "" "If this variable is set to an integer, it is used to configure the " "interpreter's global :ref:`integer string conversion length limitation " "`." msgstr "" -#: ../../../using/cmdline.rst:934 +#: ../../../using/cmdline.rst:941 msgid "" "If this is set before running the interpreter, it overrides the encoding " "used for stdin/stdout/stderr, in the syntax ``encodingname:errorhandler``. " @@ -1159,17 +1167,17 @@ msgid "" "have the same meaning as in :func:`str.encode`." msgstr "" -#: ../../../using/cmdline.rst:939 +#: ../../../using/cmdline.rst:946 msgid "" "For stderr, the ``:errorhandler`` part is ignored; the handler will always " "be ``'backslashreplace'``." msgstr "" -#: ../../../using/cmdline.rst:942 +#: ../../../using/cmdline.rst:949 msgid "The ``encodingname`` part is now optional." msgstr "" -#: ../../../using/cmdline.rst:945 +#: ../../../using/cmdline.rst:952 msgid "" "On Windows, the encoding specified by this variable is ignored for " "interactive console buffers unless :envvar:`PYTHONLEGACYWINDOWSSTDIO` is " @@ -1177,13 +1185,14 @@ msgid "" "not affected." msgstr "" -#: ../../../using/cmdline.rst:952 +#: ../../../using/cmdline.rst:959 msgid "" -"If this is set, Python won't add the :data:`user site-packages directory " -"` to :data:`sys.path`." +"This is equivalent to the :option:`-s` option. If this is set, Python won't " +"add the :data:`user site-packages directory ` to :data:`sys." +"path`." msgstr "" -#: ../../../using/cmdline.rst:962 +#: ../../../using/cmdline.rst:970 msgid "" "Defines the :data:`user base directory `, which is used to " "compute the path of the :data:`user site-packages directory ` of the :mod:`asyncio` module." msgstr "" -#: ../../../using/cmdline.rst:1053 +#: ../../../using/cmdline.rst:1064 msgid "Set the Python memory allocators and/or install debug hooks." msgstr "" -#: ../../../using/cmdline.rst:1055 +#: ../../../using/cmdline.rst:1066 msgid "Set the family of memory allocators used by Python:" msgstr "" -#: ../../../using/cmdline.rst:1057 +#: ../../../using/cmdline.rst:1068 msgid "" "``default``: use the :ref:`default memory allocators `." msgstr "" -#: ../../../using/cmdline.rst:1059 +#: ../../../using/cmdline.rst:1070 msgid "" "``malloc``: use the :c:func:`malloc` function of the C library for all " "domains (:c:macro:`PYMEM_DOMAIN_RAW`, :c:macro:`PYMEM_DOMAIN_MEM`, :c:macro:" "`PYMEM_DOMAIN_OBJ`)." msgstr "" -#: ../../../using/cmdline.rst:1062 +#: ../../../using/cmdline.rst:1073 msgid "" "``pymalloc``: use the :ref:`pymalloc allocator ` for :c:macro:" "`PYMEM_DOMAIN_MEM` and :c:macro:`PYMEM_DOMAIN_OBJ` domains and use the :c:" "func:`malloc` function for the :c:macro:`PYMEM_DOMAIN_RAW` domain." msgstr "" -#: ../../../using/cmdline.rst:1065 +#: ../../../using/cmdline.rst:1076 msgid "" "``mimalloc``: use the :ref:`mimalloc allocator ` for :c:macro:" "`PYMEM_DOMAIN_MEM` and :c:macro:`PYMEM_DOMAIN_OBJ` domains and use the :c:" "func:`malloc` function for the :c:macro:`PYMEM_DOMAIN_RAW` domain." msgstr "" -#: ../../../using/cmdline.rst:1069 +#: ../../../using/cmdline.rst:1080 msgid "Install :ref:`debug hooks `:" msgstr "" -#: ../../../using/cmdline.rst:1071 +#: ../../../using/cmdline.rst:1082 msgid "" "``debug``: install debug hooks on top of the :ref:`default memory allocators " "`." msgstr "" -#: ../../../using/cmdline.rst:1073 +#: ../../../using/cmdline.rst:1084 msgid "``malloc_debug``: same as ``malloc`` but also install debug hooks." msgstr "" -#: ../../../using/cmdline.rst:1074 +#: ../../../using/cmdline.rst:1085 msgid "``pymalloc_debug``: same as ``pymalloc`` but also install debug hooks." msgstr "" -#: ../../../using/cmdline.rst:1075 +#: ../../../using/cmdline.rst:1086 msgid "``mimalloc_debug``: same as ``mimalloc`` but also install debug hooks." msgstr "" -#: ../../../using/cmdline.rst:1079 +#: ../../../using/cmdline.rst:1090 +msgid "" +"In the :term:`free-threaded ` build, the ``malloc``, " +"``malloc_debug``, ``pymalloc``, and ``pymalloc_debug`` values are not " +"supported. Only ``default``, ``debug``, ``mimalloc``, and " +"``mimalloc_debug`` are accepted." +msgstr "" + +#: ../../../using/cmdline.rst:1097 msgid "Added the ``\"default\"`` allocator." msgstr "" -#: ../../../using/cmdline.rst:1085 +#: ../../../using/cmdline.rst:1103 msgid "" "If set to a non-empty string, Python will print statistics of the :ref:" -"`pymalloc memory allocator ` every time a new pymalloc object " -"arena is created, and on shutdown." +"`pymalloc memory allocator ` or the :ref:`mimalloc memory " +"allocator ` (whichever is in use) every time a new object arena is " +"created, and on shutdown." msgstr "" -#: ../../../using/cmdline.rst:1089 +#: ../../../using/cmdline.rst:1108 msgid "" "This variable is ignored if the :envvar:`PYTHONMALLOC` environment variable " "is used to force the :c:func:`malloc` allocator of the C library, or if " -"Python is configured without ``pymalloc`` support." +"Python is configured without both ``pymalloc`` and ``mimalloc`` support." msgstr "" -#: ../../../using/cmdline.rst:1093 +#: ../../../using/cmdline.rst:1112 msgid "" "This variable can now also be used on Python compiled in release mode. It " "now has no effect if set to an empty string." msgstr "" -#: ../../../using/cmdline.rst:1100 +#: ../../../using/cmdline.rst:1119 msgid "" "If set to a non-zero integer, enable huge page support for :ref:`pymalloc " "` arenas. Set to ``0`` or unset to disable. Python must be " @@ -1331,14 +1355,14 @@ msgid "" "any effect." msgstr "" -#: ../../../using/cmdline.rst:1105 +#: ../../../using/cmdline.rst:1124 msgid "" "When enabled, arena allocation uses ``MAP_HUGETLB`` (Linux) or " "``MEM_LARGE_PAGES`` (Windows) with automatic fallback to regular pages if " "huge pages are not available." msgstr "" -#: ../../../using/cmdline.rst:1111 +#: ../../../using/cmdline.rst:1130 msgid "" "On Linux, if the huge-page pool is exhausted, page faults — including copy-" "on-write faults triggered by :func:`os.fork` — deliver ``SIGBUS`` and kill " @@ -1346,7 +1370,7 @@ msgid "" "properly sized and fork-safety is not a concern." msgstr "" -#: ../../../using/cmdline.rst:1121 +#: ../../../using/cmdline.rst:1140 msgid "" "If set to a non-empty string, the default :term:`filesystem encoding and " "error handler` mode will revert to their pre-3.6 values of 'mbcs' and " @@ -1354,42 +1378,42 @@ msgid "" "'surrogatepass' are used." msgstr "" -#: ../../../using/cmdline.rst:1126 +#: ../../../using/cmdline.rst:1145 msgid "" "This may also be enabled at runtime with :func:`sys." "_enablelegacywindowsfsencoding`." msgstr "" -#: ../../../using/cmdline.rst:1129 ../../../using/cmdline.rst:1143 -#: ../../../using/cmdline.rst:1194 +#: ../../../using/cmdline.rst:1148 ../../../using/cmdline.rst:1162 +#: ../../../using/cmdline.rst:1213 msgid "Availability" msgstr "" -#: ../../../using/cmdline.rst:1131 +#: ../../../using/cmdline.rst:1150 msgid "See :pep:`529` for more details." msgstr "" -#: ../../../using/cmdline.rst:1136 +#: ../../../using/cmdline.rst:1155 msgid "" "If set to a non-empty string, does not use the new console reader and " "writer. This means that Unicode characters will be encoded according to the " "active console code page, rather than using utf-8." msgstr "" -#: ../../../using/cmdline.rst:1140 +#: ../../../using/cmdline.rst:1159 msgid "" "This variable is ignored if the standard streams are redirected (to files or " "pipes) rather than referring to console buffers." msgstr "" -#: ../../../using/cmdline.rst:1150 +#: ../../../using/cmdline.rst:1169 msgid "" "If set to the value ``0``, causes the main Python command line application " "to skip coercing the legacy ASCII-based C and POSIX locales to a more " "capable UTF-8 based alternative." msgstr "" -#: ../../../using/cmdline.rst:1154 +#: ../../../using/cmdline.rst:1173 msgid "" "If this variable is *not* set (or is set to a value other than ``0``), the " "``LC_ALL`` locale override environment variable is also not set, and the " @@ -1400,19 +1424,19 @@ msgid "" "runtime:" msgstr "" -#: ../../../using/cmdline.rst:1162 +#: ../../../using/cmdline.rst:1181 msgid "``C.UTF-8``" msgstr "" -#: ../../../using/cmdline.rst:1163 +#: ../../../using/cmdline.rst:1182 msgid "``C.utf8``" msgstr "" -#: ../../../using/cmdline.rst:1164 +#: ../../../using/cmdline.rst:1183 msgid "``UTF-8``" msgstr "" -#: ../../../using/cmdline.rst:1166 +#: ../../../using/cmdline.rst:1185 msgid "" "If setting one of these locale categories succeeds, then the ``LC_CTYPE`` " "environment variable will also be set accordingly in the current process " @@ -1425,7 +1449,7 @@ msgid "" "(such as Python's own :func:`locale.getdefaultlocale`)." msgstr "" -#: ../../../using/cmdline.rst:1176 +#: ../../../using/cmdline.rst:1195 msgid "" "Configuring one of these locales (either explicitly or via the above " "implicit locale coercion) automatically enables the ``surrogateescape`` :ref:" @@ -1435,7 +1459,7 @@ msgid "" "envvar:`PYTHONIOENCODING` as usual." msgstr "" -#: ../../../using/cmdline.rst:1183 +#: ../../../using/cmdline.rst:1202 msgid "" "For debugging purposes, setting ``PYTHONCOERCECLOCALE=warn`` will cause " "Python to emit warning messages on ``stderr`` if either the locale coercion " @@ -1443,7 +1467,7 @@ msgid "" "active when the Python runtime is initialized." msgstr "" -#: ../../../using/cmdline.rst:1188 +#: ../../../using/cmdline.rst:1207 msgid "" "Also note that even when locale coercion is disabled, or when it fails to " "find a suitable target locale, :envvar:`PYTHONUTF8` will still activate by " @@ -1452,11 +1476,11 @@ msgid "" "system interfaces." msgstr "" -#: ../../../using/cmdline.rst:1196 +#: ../../../using/cmdline.rst:1215 msgid "See :pep:`538` for more details." msgstr "" -#: ../../../using/cmdline.rst:1202 +#: ../../../using/cmdline.rst:1221 msgid "" "If this environment variable is set to a non-empty string, enable :ref:" "`Python Development Mode `, introducing additional runtime checks " @@ -1464,31 +1488,31 @@ msgid "" "setting the :option:`-X` ``dev`` option." msgstr "" -#: ../../../using/cmdline.rst:1211 +#: ../../../using/cmdline.rst:1230 msgid "If set to ``1``, enable the :ref:`Python UTF-8 Mode `." msgstr "" -#: ../../../using/cmdline.rst:1213 +#: ../../../using/cmdline.rst:1232 msgid "If set to ``0``, disable the :ref:`Python UTF-8 Mode `." msgstr "" -#: ../../../using/cmdline.rst:1215 +#: ../../../using/cmdline.rst:1234 msgid "" "Setting any other non-empty string causes an error during interpreter " "initialisation." msgstr "" -#: ../../../using/cmdline.rst:1222 +#: ../../../using/cmdline.rst:1241 msgid "" "If this environment variable is set to a non-empty string, issue a :class:" "`EncodingWarning` when the locale-specific default encoding is used." msgstr "" -#: ../../../using/cmdline.rst:1225 +#: ../../../using/cmdline.rst:1244 msgid "See :ref:`io-encoding-warning` for details." msgstr "" -#: ../../../using/cmdline.rst:1231 +#: ../../../using/cmdline.rst:1250 msgid "" "If this variable is set, it disables the inclusion of the tables mapping " "extra location information (end line, start column offset and end column " @@ -1497,36 +1521,36 @@ msgid "" "visual location indicators when the interpreter displays tracebacks." msgstr "" -#: ../../../using/cmdline.rst:1241 +#: ../../../using/cmdline.rst:1260 msgid "" "If this variable is set to a nonzero value, it enables support for the Linux " "``perf`` profiler so Python calls can be detected by it." msgstr "" -#: ../../../using/cmdline.rst:1244 ../../../using/cmdline.rst:1257 +#: ../../../using/cmdline.rst:1263 ../../../using/cmdline.rst:1276 msgid "If set to ``0``, disable Linux ``perf`` profiler support." msgstr "" -#: ../../../using/cmdline.rst:1246 +#: ../../../using/cmdline.rst:1265 msgid "" "See also the :option:`-X perf <-X>` command-line option and :ref:" "`perf_profiling`." msgstr "" -#: ../../../using/cmdline.rst:1253 +#: ../../../using/cmdline.rst:1272 msgid "" "If this variable is set to a nonzero value, it enables support for the Linux " "``perf`` profiler so Python calls can be detected by it using DWARF " "information." msgstr "" -#: ../../../using/cmdline.rst:1259 +#: ../../../using/cmdline.rst:1278 msgid "" "See also the :option:`-X perf_jit <-X>` command-line option and :ref:" "`perf_profiling`." msgstr "" -#: ../../../using/cmdline.rst:1266 +#: ../../../using/cmdline.rst:1285 msgid "" "If this variable is set to a non-empty string, it disables the remote " "debugging feature described in :pep:`768`. This includes both the " @@ -1534,21 +1558,21 @@ msgid "" "functionality to receive code for execution in the current process." msgstr "" -#: ../../../using/cmdline.rst:1271 +#: ../../../using/cmdline.rst:1290 msgid "See also the :option:`-X disable_remote_debug` command-line option." msgstr "" -#: ../../../using/cmdline.rst:1277 +#: ../../../using/cmdline.rst:1296 msgid "" "If this variable is set to a positive integer, it overrides the return " "values of :func:`os.cpu_count` and :func:`os.process_cpu_count`." msgstr "" -#: ../../../using/cmdline.rst:1280 +#: ../../../using/cmdline.rst:1299 msgid "See also the :option:`-X cpu_count <-X>` command-line option." msgstr "" -#: ../../../using/cmdline.rst:1286 +#: ../../../using/cmdline.rst:1305 msgid "" "If this variable is set to ``on`` or ``off``, it determines whether or not " "frozen modules are ignored by the import machinery. A value of ``on`` means " @@ -1559,45 +1583,45 @@ msgid "" "flag is set to ``off``." msgstr "" -#: ../../../using/cmdline.rst:1294 +#: ../../../using/cmdline.rst:1313 msgid "See also the :option:`-X frozen_modules <-X>` command-line option." msgstr "" -#: ../../../using/cmdline.rst:1300 +#: ../../../using/cmdline.rst:1319 msgid "" "If this variable is set to ``1``, the interpreter will colorize various " "kinds of output. Setting it to ``0`` deactivates this behavior. See also :" "ref:`using-on-controlling-color`." msgstr "" -#: ../../../using/cmdline.rst:1308 +#: ../../../using/cmdline.rst:1327 msgid "" "If this variable is set to any value, the interpreter will not attempt to " "load the Python-based :term:`REPL` that requires :mod:`readline`, and will " "instead use the traditional parser-based :term:`REPL`." msgstr "" -#: ../../../using/cmdline.rst:1316 +#: ../../../using/cmdline.rst:1335 msgid "" "This environment variable can be used to set the location of a ``." "python_history`` file (by default, it is ``.python_history`` in the user's " "home directory)." msgstr "" -#: ../../../using/cmdline.rst:1324 +#: ../../../using/cmdline.rst:1343 msgid "" "If this variable is set to ``1``, the global interpreter lock (GIL) will be " "forced on. Setting it to ``0`` forces the GIL off (needs Python configured " "with the :option:`--disable-gil` build option)." msgstr "" -#: ../../../using/cmdline.rst:1328 +#: ../../../using/cmdline.rst:1347 msgid "" "See also the :option:`-X gil <-X>` command-line option, which takes " "precedence over this variable, and :ref:`whatsnew313-free-threaded-cpython`." msgstr "" -#: ../../../using/cmdline.rst:1335 +#: ../../../using/cmdline.rst:1354 msgid "" "If this variable is set to ``1`` then :class:`~threading.Thread` will, by " "default, use a copy of context of the caller of ``Thread.start()`` when " @@ -1606,7 +1630,7 @@ msgid "" "otherwise. See also :option:`-X thread_inherit_context<-X>`." msgstr "" -#: ../../../using/cmdline.rst:1345 +#: ../../../using/cmdline.rst:1364 msgid "" "If set to ``1`` then the :class:`warnings.catch_warnings` context manager " "will use a :class:`~contextvars.ContextVar` to store warnings filter state. " @@ -1614,25 +1638,32 @@ msgid "" "``0`` otherwise. See :option:`-X context_aware_warnings<-X>`." msgstr "" -#: ../../../using/cmdline.rst:1355 +#: ../../../using/cmdline.rst:1374 +msgid "" +"If true (``1``) then :ref:`sys-path-init` is allowed to log warnings into " +"stderr. If false (``0``) suppress these warnings. Set to true by default. " +"See also :option:`-X pathconfig_warnings<-X>`." +msgstr "" + +#: ../../../using/cmdline.rst:1382 msgid "" "On builds where experimental just-in-time compilation is available, this " "variable can force the JIT to be disabled (``0``) or enabled (``1``) at " "interpreter startup." msgstr "" -#: ../../../using/cmdline.rst:1363 +#: ../../../using/cmdline.rst:1390 msgid "" "If set to ``1`` enables thread-local bytecode. If set to ``0`` thread-local " "bytecode and the specializing interpreter are disabled. Only applies to " "builds configured with :option:`--disable-gil`." msgstr "" -#: ../../../using/cmdline.rst:1367 +#: ../../../using/cmdline.rst:1394 msgid "See also the :option:`-X tlbc <-X>` command-line option." msgstr "" -#: ../../../using/cmdline.rst:1373 +#: ../../../using/cmdline.rst:1400 msgid "" "Controls lazy import behavior. Accepts three values: ``all`` makes all " "imports lazy by default, ``none`` disables lazy imports entirely (even " @@ -1640,33 +1671,33 @@ msgid "" "respects the ``lazy`` keyword in source code." msgstr "" -#: ../../../using/cmdline.rst:1378 +#: ../../../using/cmdline.rst:1405 msgid "See also the :option:`-X lazy_imports <-X>` command-line option." msgstr "" -#: ../../../using/cmdline.rst:1383 +#: ../../../using/cmdline.rst:1410 msgid "Debug-mode variables" msgstr "" -#: ../../../using/cmdline.rst:1387 +#: ../../../using/cmdline.rst:1414 msgid "" "If set, Python will dump objects and reference counts still alive after " "shutting down the interpreter." msgstr "" -#: ../../../using/cmdline.rst:1390 ../../../using/cmdline.rst:1398 +#: ../../../using/cmdline.rst:1417 ../../../using/cmdline.rst:1425 msgid "" "Needs Python configured with the :option:`--with-trace-refs` build option." msgstr "" -#: ../../../using/cmdline.rst:1394 +#: ../../../using/cmdline.rst:1421 msgid "" "If set, Python will dump objects and reference counts still alive after " "shutting down the interpreter into a file under the path given as the value " "to this environment variable." msgstr "" -#: ../../../using/cmdline.rst:1404 +#: ../../../using/cmdline.rst:1431 msgid "" "If this variable is set to a module, that module will be imported early in " "the interpreter lifecycle, before the :mod:`site` module is executed, and " @@ -1674,22 +1705,22 @@ msgid "" "is not treated as :mod:`__main__`." msgstr "" -#: ../../../using/cmdline.rst:1409 +#: ../../../using/cmdline.rst:1436 msgid "This can be used to execute code early during Python initialization." msgstr "" -#: ../../../using/cmdline.rst:1411 +#: ../../../using/cmdline.rst:1438 msgid "" "To import a submodule, use ``package.module`` as the value, like in an " "import statement." msgstr "" -#: ../../../using/cmdline.rst:1414 +#: ../../../using/cmdline.rst:1441 msgid "" "See also the :option:`-X presite <-X>` command-line option, which takes " "precedence over this variable." msgstr "" -#: ../../../using/cmdline.rst:1417 +#: ../../../using/cmdline.rst:1444 msgid "Needs Python configured with the :option:`--with-pydebug` build option." msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/using/configure.pot b/main/locale/pot/LC_MESSAGES/using/configure.pot index 359fd5e057c..cd1d24476f4 100644 --- a/main/locale/pot/LC_MESSAGES/using/configure.pot +++ b/main/locale/pot/LC_MESSAGES/using/configure.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -595,7 +595,7 @@ msgid "" "cleared." msgstr "" -#: ../../../using/configure.rst:360 ../../../using/configure.rst:903 +#: ../../../using/configure.rst:360 ../../../using/configure.rst:906 msgid "Effects:" msgstr "" @@ -820,11 +820,11 @@ msgstr "" msgid "C compiler options" msgstr "" -#: ../../../using/configure.rst:472 ../../../using/configure.rst:1480 +#: ../../../using/configure.rst:472 ../../../using/configure.rst:1483 msgid "C compiler command." msgstr "" -#: ../../../using/configure.rst:476 ../../../using/configure.rst:1492 +#: ../../../using/configure.rst:476 ../../../using/configure.rst:1495 msgid "C compiler flags." msgstr "" @@ -836,7 +836,7 @@ msgstr "" msgid "C preprocessor flags, e.g. :samp:`-I{include_dir}`." msgstr "" -#: ../../../using/configure.rst:488 ../../../using/configure.rst:977 +#: ../../../using/configure.rst:488 ../../../using/configure.rst:980 msgid "Linker options" msgstr "" @@ -1158,17 +1158,23 @@ msgid "" "Disable the fast :ref:`mimalloc ` allocator (enabled by default)." msgstr "" -#: ../../../using/configure.rst:777 ../../../using/configure.rst:784 +#: ../../../using/configure.rst:777 +msgid "" +"This option cannot be used together with :option:`--disable-gil` because " +"the :term:`free-threaded ` build requires mimalloc." +msgstr "" + +#: ../../../using/configure.rst:780 ../../../using/configure.rst:787 msgid "See also :envvar:`PYTHONMALLOC` environment variable." msgstr "" -#: ../../../using/configure.rst:781 +#: ../../../using/configure.rst:784 msgid "" "Disable the specialized Python memory allocator :ref:`pymalloc ` " "(enabled by default)." msgstr "" -#: ../../../using/configure.rst:788 +#: ../../../using/configure.rst:791 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 " @@ -1176,7 +1182,7 @@ msgid "" "(Windows) with automatic fallback to regular pages." msgstr "" -#: ../../../using/configure.rst:793 +#: ../../../using/configure.rst:796 msgid "" "Even when compiled with this option, huge pages are **not** used at runtime " "unless the :envvar:`PYTHON_PYMALLOC_HUGEPAGES` environment variable is set " @@ -1185,43 +1191,43 @@ msgid "" "faults after :func:`os.fork`) deliver ``SIGBUS`` and kill the process." msgstr "" -#: ../../../using/configure.rst:799 +#: ../../../using/configure.rst:802 msgid "" "The configure script checks that the platform supports ``MAP_HUGETLB`` and " "emits a warning if it is not available." msgstr "" -#: ../../../using/configure.rst:802 +#: ../../../using/configure.rst:805 msgid "" "On Windows, use the ``--pymalloc-hugepages`` flag with ``build.bat`` or set " "the ``UsePymallocHugepages`` MSBuild property." msgstr "" -#: ../../../using/configure.rst:809 +#: ../../../using/configure.rst:812 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:812 +#: ../../../using/configure.rst:815 msgid "Don't define the ``WITH_DOC_STRINGS`` macro." msgstr "" -#: ../../../using/configure.rst:814 +#: ../../../using/configure.rst:817 msgid "See the ``PyDoc_STRVAR()`` macro." msgstr "" -#: ../../../using/configure.rst:818 +#: ../../../using/configure.rst:821 msgid "Enable C-level code profiling with ``gprof`` (disabled by default)." msgstr "" -#: ../../../using/configure.rst:822 +#: ../../../using/configure.rst:825 msgid "" "Add ``-fstrict-overflow`` to the C compiler flags (by default we add ``-fno-" "strict-overflow`` instead)." msgstr "" -#: ../../../using/configure.rst:827 +#: ../../../using/configure.rst:830 msgid "" "Deactivate remote debugging support described in :pep:`768` (enabled by " "default). When this flag is provided the code that allows the interpreter to " @@ -1231,73 +1237,73 @@ msgid "" "executed." msgstr "" -#: ../../../using/configure.rst:835 +#: ../../../using/configure.rst:838 msgid "" "This macro is defined by default, unless Python is configured with :option:" "`--without-remote-debug`." msgstr "" -#: ../../../using/configure.rst:838 +#: ../../../using/configure.rst:841 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:847 +#: ../../../using/configure.rst:850 msgid "Python Debug Build" msgstr "" -#: ../../../using/configure.rst:849 +#: ../../../using/configure.rst:852 msgid "" "A debug build is Python built with the :option:`--with-pydebug` configure " "option." msgstr "" -#: ../../../using/configure.rst:852 +#: ../../../using/configure.rst:855 msgid "Effects of a debug build:" msgstr "" -#: ../../../using/configure.rst:854 +#: ../../../using/configure.rst:857 msgid "" "Display all warnings by default: the list of default warning filters is " "empty in the :mod:`warnings` module." msgstr "" -#: ../../../using/configure.rst:856 +#: ../../../using/configure.rst:859 msgid "Add ``d`` to :data:`sys.abiflags`." msgstr "" -#: ../../../using/configure.rst:857 +#: ../../../using/configure.rst:860 msgid "Add :func:`!sys.gettotalrefcount` function." msgstr "" -#: ../../../using/configure.rst:858 +#: ../../../using/configure.rst:861 msgid "Add :option:`-X showrefcount <-X>` command line option." msgstr "" -#: ../../../using/configure.rst:859 +#: ../../../using/configure.rst:862 msgid "" "Add :option:`-d` command line option and :envvar:`PYTHONDEBUG` environment " "variable to debug the parser." msgstr "" -#: ../../../using/configure.rst:861 +#: ../../../using/configure.rst:864 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:863 +#: ../../../using/configure.rst:866 msgid "" "Install :ref:`debug hooks on memory allocators ` " "to detect buffer overflow and other memory errors." msgstr "" -#: ../../../using/configure.rst:865 +#: ../../../using/configure.rst:868 msgid "Define ``Py_DEBUG`` and ``Py_REF_DEBUG`` macros." msgstr "" -#: ../../../using/configure.rst:866 +#: ../../../using/configure.rst:869 msgid "" "Add runtime checks: code surrounded by ``#ifdef Py_DEBUG`` and ``#endif``. " "Enable ``assert(...)`` and ``_PyObject_ASSERT(...)`` assertions: don't set " @@ -1305,125 +1311,125 @@ msgid "" "option). Main runtime checks:" msgstr "" -#: ../../../using/configure.rst:871 +#: ../../../using/configure.rst:874 msgid "Add sanity checks on the function arguments." msgstr "" -#: ../../../using/configure.rst:872 +#: ../../../using/configure.rst:875 msgid "" "Unicode and int objects are created with their memory filled with a pattern " "to detect usage of uninitialized objects." msgstr "" -#: ../../../using/configure.rst:874 +#: ../../../using/configure.rst:877 msgid "" "Ensure that functions which can clear or replace the current exception are " "not called with an exception raised." msgstr "" -#: ../../../using/configure.rst:876 +#: ../../../using/configure.rst:879 msgid "Check that deallocator functions don't change the current exception." msgstr "" -#: ../../../using/configure.rst:877 +#: ../../../using/configure.rst:880 msgid "" "The garbage collector (:func:`gc.collect` function) runs some basic checks " "on objects consistency." msgstr "" -#: ../../../using/configure.rst:879 +#: ../../../using/configure.rst:882 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:882 +#: ../../../using/configure.rst:885 msgid "" "See also the :ref:`Python Development Mode ` and the :option:`--" "with-trace-refs` configure option." msgstr "" -#: ../../../using/configure.rst:885 +#: ../../../using/configure.rst:888 msgid "" "Release builds and debug builds are now ABI compatible: defining the " "``Py_DEBUG`` macro no longer implies the ``Py_TRACE_REFS`` macro (see the :" "option:`--with-trace-refs` option)." msgstr "" -#: ../../../using/configure.rst:892 +#: ../../../using/configure.rst:895 msgid "Debug options" msgstr "" -#: ../../../using/configure.rst:896 +#: ../../../using/configure.rst:899 msgid "" ":ref:`Build Python in debug mode `: define the ``Py_DEBUG`` " "macro (disabled by default)." msgstr "" -#: ../../../using/configure.rst:901 +#: ../../../using/configure.rst:904 msgid "Enable tracing references for debugging purpose (disabled by default)." msgstr "" -#: ../../../using/configure.rst:905 +#: ../../../using/configure.rst:908 msgid "Define the ``Py_TRACE_REFS`` macro." msgstr "" -#: ../../../using/configure.rst:906 +#: ../../../using/configure.rst:909 msgid "Add :func:`sys.getobjects` function." msgstr "" -#: ../../../using/configure.rst:907 +#: ../../../using/configure.rst:910 msgid "Add :envvar:`PYTHONDUMPREFS` environment variable." msgstr "" -#: ../../../using/configure.rst:909 +#: ../../../using/configure.rst:912 msgid "" "The :envvar:`PYTHONDUMPREFS` environment variable can be used to dump " "objects and reference counts still alive at Python exit." msgstr "" -#: ../../../using/configure.rst:912 +#: ../../../using/configure.rst:915 msgid ":ref:`Statically allocated objects ` are not traced." msgstr "" -#: ../../../using/configure.rst:916 +#: ../../../using/configure.rst:919 msgid "" "This build is now ABI compatible with release build and :ref:`debug build " "`." msgstr "" -#: ../../../using/configure.rst:922 +#: ../../../using/configure.rst:925 msgid "" "Build with C assertions enabled (default is no): ``assert(...);`` and " "``_PyObject_ASSERT(...);``." msgstr "" -#: ../../../using/configure.rst:925 +#: ../../../using/configure.rst:928 msgid "" "If set, the ``NDEBUG`` macro is not defined in the :envvar:`OPT` compiler " "variable." msgstr "" -#: ../../../using/configure.rst:928 +#: ../../../using/configure.rst:931 msgid "" "See also the :option:`--with-pydebug` option (:ref:`debug build `) which also enables assertions." msgstr "" -#: ../../../using/configure.rst:935 +#: ../../../using/configure.rst:938 msgid "Enable Valgrind support (default is no)." msgstr "" -#: ../../../using/configure.rst:939 +#: ../../../using/configure.rst:942 msgid "Enable DTrace support (default is no)." msgstr "" -#: ../../../using/configure.rst:941 +#: ../../../using/configure.rst:944 msgid "" "See :ref:`Instrumenting CPython with DTrace and SystemTap `." msgstr "" -#: ../../../using/configure.rst:948 +#: ../../../using/configure.rst:951 msgid "" "Enable AddressSanitizer memory error detector, ``asan`` (default is no). To " "improve ASan detection capabilities you may also want to combine this with :" @@ -1431,56 +1437,56 @@ msgid "" "allocator whose allocations are not tracked by ASan." msgstr "" -#: ../../../using/configure.rst:957 +#: ../../../using/configure.rst:960 msgid "" "Enable MemorySanitizer allocation error detector, ``msan`` (default is no)." msgstr "" -#: ../../../using/configure.rst:963 +#: ../../../using/configure.rst:966 msgid "" "Enable UndefinedBehaviorSanitizer undefined behaviour detector, ``ubsan`` " "(default is no)." msgstr "" -#: ../../../using/configure.rst:970 +#: ../../../using/configure.rst:973 msgid "Enable ThreadSanitizer data race detector, ``tsan`` (default is no)." msgstr "" -#: ../../../using/configure.rst:981 +#: ../../../using/configure.rst:984 msgid "Enable building a shared Python library: ``libpython`` (default is no)." msgstr "" -#: ../../../using/configure.rst:985 +#: ../../../using/configure.rst:988 msgid "" "Do not build ``libpythonMAJOR.MINOR.a`` and do not install ``python.o`` " "(built and enabled by default)." msgstr "" -#: ../../../using/configure.rst:992 +#: ../../../using/configure.rst:995 msgid "Libraries options" msgstr "" -#: ../../../using/configure.rst:996 +#: ../../../using/configure.rst:999 msgid "Link against additional libraries (default is no)." msgstr "" -#: ../../../using/configure.rst:1000 +#: ../../../using/configure.rst:1003 msgid "" "Build the :mod:`!pyexpat` module using an installed ``expat`` library " "(default is no)." msgstr "" -#: ../../../using/configure.rst:1005 +#: ../../../using/configure.rst:1008 msgid "" "Build the ``_decimal`` extension module using an installed ``mpdecimal`` " "library, see the :mod:`decimal` module (default is yes)." msgstr "" -#: ../../../using/configure.rst:1010 +#: ../../../using/configure.rst:1013 msgid "Default to using the installed ``mpdecimal`` library." msgstr "" -#: ../../../using/configure.rst:1015 +#: ../../../using/configure.rst:1018 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 " @@ -1488,145 +1494,145 @@ msgid "" "without-system-libmpdec``." msgstr "" -#: ../../../using/configure.rst:1020 +#: ../../../using/configure.rst:1023 msgid "" "A copy of the ``mpdecimal`` library sources will no longer be distributed " "with Python 3.16." msgstr "" -#: ../../../using/configure.rst:1024 +#: ../../../using/configure.rst:1027 msgid ":option:`LIBMPDEC_CFLAGS` and :option:`LIBMPDEC_LIBS`." msgstr "" -#: ../../../using/configure.rst:1028 +#: ../../../using/configure.rst:1031 msgid "Designate a backend library for the :mod:`readline` module." msgstr "" -#: ../../../using/configure.rst:1030 +#: ../../../using/configure.rst:1033 msgid "readline: Use readline as the backend." msgstr "" -#: ../../../using/configure.rst:1031 +#: ../../../using/configure.rst:1034 msgid "editline: Use editline as the backend." msgstr "" -#: ../../../using/configure.rst:1037 +#: ../../../using/configure.rst:1040 msgid "Don't build the :mod:`readline` module (built by default)." msgstr "" -#: ../../../using/configure.rst:1039 +#: ../../../using/configure.rst:1042 msgid "Don't define the ``HAVE_LIBREADLINE`` macro." msgstr "" -#: ../../../using/configure.rst:1045 +#: ../../../using/configure.rst:1048 msgid "" "Override ``libm`` math library to *STRING* (default is system-dependent)." msgstr "" -#: ../../../using/configure.rst:1049 +#: ../../../using/configure.rst:1052 msgid "Override ``libc`` C library to *STRING* (default is system-dependent)." msgstr "" -#: ../../../using/configure.rst:1053 +#: ../../../using/configure.rst:1056 msgid "Root of the OpenSSL directory." msgstr "" -#: ../../../using/configure.rst:1059 +#: ../../../using/configure.rst:1062 msgid "Set runtime library directory (rpath) for OpenSSL libraries:" msgstr "" -#: ../../../using/configure.rst:1061 +#: ../../../using/configure.rst:1064 msgid "``no`` (default): don't set rpath;" msgstr "" -#: ../../../using/configure.rst:1062 +#: ../../../using/configure.rst:1065 msgid "" "``auto``: auto-detect rpath from :option:`--with-openssl` and ``pkg-config``;" msgstr "" -#: ../../../using/configure.rst:1064 +#: ../../../using/configure.rst:1067 msgid "*DIR*: set an explicit rpath." msgstr "" -#: ../../../using/configure.rst:1070 +#: ../../../using/configure.rst:1073 msgid "Security Options" msgstr "" -#: ../../../using/configure.rst:1074 +#: ../../../using/configure.rst:1077 msgid "Select hash algorithm for use in ``Python/pyhash.c``:" msgstr "" -#: ../../../using/configure.rst:1076 +#: ../../../using/configure.rst:1079 msgid "``siphash13`` (default);" msgstr "" -#: ../../../using/configure.rst:1077 +#: ../../../using/configure.rst:1080 msgid "``siphash24``;" msgstr "" -#: ../../../using/configure.rst:1078 +#: ../../../using/configure.rst:1081 msgid "``fnv``." msgstr "" -#: ../../../using/configure.rst:1082 +#: ../../../using/configure.rst:1085 msgid "``siphash13`` is added and it is the new default." msgstr "" -#: ../../../using/configure.rst:1087 +#: ../../../using/configure.rst:1090 msgid "Built-in hash modules:" msgstr "" -#: ../../../using/configure.rst:1089 +#: ../../../using/configure.rst:1092 msgid "``md5``;" msgstr "" -#: ../../../using/configure.rst:1090 +#: ../../../using/configure.rst:1093 msgid "``sha1``;" msgstr "" -#: ../../../using/configure.rst:1091 +#: ../../../using/configure.rst:1094 msgid "``sha256``;" msgstr "" -#: ../../../using/configure.rst:1092 +#: ../../../using/configure.rst:1095 msgid "``sha512``;" msgstr "" -#: ../../../using/configure.rst:1093 +#: ../../../using/configure.rst:1096 msgid "``sha3`` (with shake);" msgstr "" -#: ../../../using/configure.rst:1094 +#: ../../../using/configure.rst:1097 msgid "``blake2``." msgstr "" -#: ../../../using/configure.rst:1100 +#: ../../../using/configure.rst:1103 msgid "Override the OpenSSL default cipher suites string:" msgstr "" -#: ../../../using/configure.rst:1102 +#: ../../../using/configure.rst:1105 msgid "``python`` (default): use Python's preferred selection;" msgstr "" -#: ../../../using/configure.rst:1103 +#: ../../../using/configure.rst:1106 msgid "``openssl``: leave OpenSSL's defaults untouched;" msgstr "" -#: ../../../using/configure.rst:1104 +#: ../../../using/configure.rst:1107 msgid "*STRING*: use a custom string" msgstr "" -#: ../../../using/configure.rst:1106 +#: ../../../using/configure.rst:1109 msgid "See the :mod:`ssl` module." msgstr "" -#: ../../../using/configure.rst:1112 +#: ../../../using/configure.rst:1115 msgid "" "The settings ``python`` and *STRING* also set TLS 1.2 as minimum protocol " "version." msgstr "" -#: ../../../using/configure.rst:1117 +#: ../../../using/configure.rst:1120 msgid "" "Disable compiler options that are `recommended by OpenSSF`_ for security " "reasons with no performance overhead. If this option is not enabled, CPython " @@ -1635,24 +1641,24 @@ msgid "" "listed below." msgstr "" -#: ../../../using/configure.rst:1121 +#: ../../../using/configure.rst:1124 msgid "" "The following compiler options are disabled with :option:`!--disable-safety`:" msgstr "" -#: ../../../using/configure.rst:1123 +#: ../../../using/configure.rst:1126 msgid "" "`-fstack-protector-strong`_: Enable run-time checks for stack-based buffer " "overflows." msgstr "" -#: ../../../using/configure.rst:1124 +#: ../../../using/configure.rst:1127 msgid "" "`-Wtrampolines`_: Enable warnings about trampolines that require executable " "stacks." msgstr "" -#: ../../../using/configure.rst:1134 +#: ../../../using/configure.rst:1137 msgid "" "Enable compiler options that are `recommended by OpenSSF`_ for security " "reasons which require overhead. If this option is not enabled, CPython will " @@ -1661,81 +1667,81 @@ msgid "" "listed below." msgstr "" -#: ../../../using/configure.rst:1138 +#: ../../../using/configure.rst:1141 msgid "" "The following compiler options are enabled with :option:`!--enable-slower-" "safety`:" msgstr "" -#: ../../../using/configure.rst:1140 +#: ../../../using/configure.rst:1143 msgid "" "`-D_FORTIFY_SOURCE=3`_: Fortify sources with compile- and run-time checks " "for unsafe libc usage and buffer overflows." msgstr "" -#: ../../../using/configure.rst:1148 +#: ../../../using/configure.rst:1151 msgid "macOS Options" msgstr "" -#: ../../../using/configure.rst:1150 +#: ../../../using/configure.rst:1153 msgid "See :source:`Mac/README.rst`." msgstr "" -#: ../../../using/configure.rst:1155 +#: ../../../using/configure.rst:1158 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:1161 +#: ../../../using/configure.rst:1164 msgid "" "Create a Python.framework rather than a traditional Unix install. Optional " "*INSTALLDIR* specifies the installation path (default is no)." msgstr "" -#: ../../../using/configure.rst:1166 +#: ../../../using/configure.rst:1169 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:1169 +#: ../../../using/configure.rst:1172 msgid "Options:" msgstr "" -#: ../../../using/configure.rst:1171 +#: ../../../using/configure.rst:1174 msgid "``universal2`` (x86-64 and arm64);" msgstr "" -#: ../../../using/configure.rst:1172 +#: ../../../using/configure.rst:1175 msgid "``32-bit`` (PPC and i386);" msgstr "" -#: ../../../using/configure.rst:1173 +#: ../../../using/configure.rst:1176 msgid "``64-bit`` (PPC64 and x86-64);" msgstr "" -#: ../../../using/configure.rst:1174 +#: ../../../using/configure.rst:1177 msgid "``3-way`` (i386, PPC and x86-64);" msgstr "" -#: ../../../using/configure.rst:1175 +#: ../../../using/configure.rst:1178 msgid "``intel`` (i386 and x86-64);" msgstr "" -#: ../../../using/configure.rst:1176 +#: ../../../using/configure.rst:1179 msgid "``intel-32`` (i386);" msgstr "" -#: ../../../using/configure.rst:1177 +#: ../../../using/configure.rst:1180 msgid "``intel-64`` (x86-64);" msgstr "" -#: ../../../using/configure.rst:1178 +#: ../../../using/configure.rst:1181 msgid "``all`` (PPC, i386, PPC64 and x86-64)." msgstr "" -#: ../../../using/configure.rst:1180 +#: ../../../using/configure.rst:1183 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 " @@ -1744,13 +1750,13 @@ msgid "" "platform-compatibility-tags/#macos>`_" msgstr "" -#: ../../../using/configure.rst:1188 +#: ../../../using/configure.rst:1191 msgid "" "Specify the name for the python framework on macOS only valid when :option:" "`--enable-framework` is set (default: ``Python``)." msgstr "" -#: ../../../using/configure.rst:1194 +#: ../../../using/configure.rst:1197 msgid "" "The Python standard library contains strings that are known to trigger " "automated inspection tool errors when submitted for distribution by the " @@ -1759,29 +1765,29 @@ msgid "" "can also be specified. This option is disabled by default." msgstr "" -#: ../../../using/configure.rst:1203 +#: ../../../using/configure.rst:1206 msgid "iOS Options" msgstr "" -#: ../../../using/configure.rst:1205 +#: ../../../using/configure.rst:1208 msgid "See :source:`iOS/README.rst`." msgstr "" -#: ../../../using/configure.rst:1209 +#: ../../../using/configure.rst:1212 msgid "" "Create a Python.framework. Unlike macOS, the *INSTALLDIR* argument " "specifying the installation path is mandatory." msgstr "" -#: ../../../using/configure.rst:1214 +#: ../../../using/configure.rst:1217 msgid "Specify the name for the framework (default: ``Python``)." msgstr "" -#: ../../../using/configure.rst:1218 +#: ../../../using/configure.rst:1221 msgid "Cross Compiling Options" msgstr "" -#: ../../../using/configure.rst:1220 +#: ../../../using/configure.rst:1223 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 " @@ -1789,93 +1795,93 @@ msgid "" "match the version of the cross compiled host Python." msgstr "" -#: ../../../using/configure.rst:1227 +#: ../../../using/configure.rst:1230 msgid "" "configure for building on BUILD, usually guessed by :program:`config.guess`." msgstr "" -#: ../../../using/configure.rst:1231 +#: ../../../using/configure.rst:1234 msgid "cross-compile to build programs to run on HOST (target platform)" msgstr "" -#: ../../../using/configure.rst:1235 +#: ../../../using/configure.rst:1238 msgid "path to build ``python`` binary for cross compiling" msgstr "" -#: ../../../using/configure.rst:1241 +#: ../../../using/configure.rst:1244 msgid "An environment variable that points to a file with configure overrides." msgstr "" -#: ../../../using/configure.rst:1243 +#: ../../../using/configure.rst:1246 msgid "Example *config.site* file:" msgstr "" -#: ../../../using/configure.rst:1254 +#: ../../../using/configure.rst:1257 msgid "Program to run CPython for the host platform for cross-compilation." msgstr "" -#: ../../../using/configure.rst:1259 +#: ../../../using/configure.rst:1262 msgid "Cross compiling example::" msgstr "" -#: ../../../using/configure.rst:1268 +#: ../../../using/configure.rst:1271 msgid "Python Build System" msgstr "" -#: ../../../using/configure.rst:1271 +#: ../../../using/configure.rst:1274 msgid "Main files of the build system" msgstr "" -#: ../../../using/configure.rst:1273 +#: ../../../using/configure.rst:1276 msgid ":file:`configure.ac` => :file:`configure`;" msgstr "" -#: ../../../using/configure.rst:1274 +#: ../../../using/configure.rst:1277 msgid "" ":file:`Makefile.pre.in` => :file:`Makefile` (created by :file:`configure`);" msgstr "" -#: ../../../using/configure.rst:1275 +#: ../../../using/configure.rst:1278 msgid ":file:`pyconfig.h` (created by :file:`configure`);" msgstr "" -#: ../../../using/configure.rst:1276 +#: ../../../using/configure.rst:1279 msgid "" ":file:`Modules/Setup`: C extensions built by the Makefile using :file:" "`Module/makesetup` shell script;" msgstr "" -#: ../../../using/configure.rst:1280 +#: ../../../using/configure.rst:1283 msgid "Main build steps" msgstr "" -#: ../../../using/configure.rst:1282 +#: ../../../using/configure.rst:1285 msgid "C files (``.c``) are built as object files (``.o``)." msgstr "" -#: ../../../using/configure.rst:1283 +#: ../../../using/configure.rst:1286 msgid "A static ``libpython`` library (``.a``) is created from objects files." msgstr "" -#: ../../../using/configure.rst:1284 +#: ../../../using/configure.rst:1287 msgid "" "``python.o`` and the static ``libpython`` library are linked into the final " "``python`` program." msgstr "" -#: ../../../using/configure.rst:1286 +#: ../../../using/configure.rst:1289 msgid "C extensions are built by the Makefile (see :file:`Modules/Setup`)." msgstr "" -#: ../../../using/configure.rst:1289 +#: ../../../using/configure.rst:1292 msgid "Main Makefile targets" msgstr "" -#: ../../../using/configure.rst:1292 +#: ../../../using/configure.rst:1295 msgid "make" msgstr "" -#: ../../../using/configure.rst:1294 +#: ../../../using/configure.rst:1297 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 " @@ -1886,22 +1892,22 @@ msgid "" "all`` will build. The three choices are:" msgstr "" -#: ../../../using/configure.rst:1303 +#: ../../../using/configure.rst:1306 msgid "``profile-opt`` (configured with ``--enable-optimizations``)" msgstr "" -#: ../../../using/configure.rst:1304 +#: ../../../using/configure.rst:1307 msgid "" "``build_wasm`` (chosen if the host platform matches ``wasm32-wasi*`` or " "``wasm32-emscripten``)" msgstr "" -#: ../../../using/configure.rst:1306 +#: ../../../using/configure.rst:1309 msgid "" "``build_all`` (configured without explicitly using either of the others)" msgstr "" -#: ../../../using/configure.rst:1308 +#: ../../../using/configure.rst:1311 msgid "" "Depending on the most recent source file changes, Make will rebuild any " "targets (object files and executables) deemed out-of-date, including running " @@ -1914,11 +1920,11 @@ msgid "" "problems, at the expense of longer build times." msgstr "" -#: ../../../using/configure.rst:1321 +#: ../../../using/configure.rst:1324 msgid "make platform" msgstr "" -#: ../../../using/configure.rst:1323 +#: ../../../using/configure.rst:1326 msgid "" "Build the ``python`` program, but don't build the standard library extension " "modules. This generates a file named ``platform`` which contains a single " @@ -1926,91 +1932,91 @@ msgid "" "arm64-3.12`` or ``linux-x86_64-3.13``." msgstr "" -#: ../../../using/configure.rst:1330 +#: ../../../using/configure.rst:1333 msgid "make profile-opt" msgstr "" -#: ../../../using/configure.rst:1332 +#: ../../../using/configure.rst:1335 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:1340 +#: ../../../using/configure.rst:1343 msgid "make clean" msgstr "" -#: ../../../using/configure.rst:1342 +#: ../../../using/configure.rst:1345 msgid "Remove built files." msgstr "" -#: ../../../using/configure.rst:1346 +#: ../../../using/configure.rst:1349 msgid "make distclean" msgstr "" -#: ../../../using/configure.rst:1348 +#: ../../../using/configure.rst:1351 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:1354 +#: ../../../using/configure.rst:1357 msgid "make install" msgstr "" -#: ../../../using/configure.rst:1356 +#: ../../../using/configure.rst:1359 msgid "Build the ``all`` target and install Python." msgstr "" -#: ../../../using/configure.rst:1360 +#: ../../../using/configure.rst:1363 msgid "make test" msgstr "" -#: ../../../using/configure.rst:1362 +#: ../../../using/configure.rst:1365 msgid "" "Build the ``all`` target and run the Python test suite with the ``--fast-" "ci`` option without GUI tests. Variables:" msgstr "" -#: ../../../using/configure.rst:1365 +#: ../../../using/configure.rst:1368 msgid "``TESTOPTS``: additional regrtest command-line options." msgstr "" -#: ../../../using/configure.rst:1366 +#: ../../../using/configure.rst:1369 msgid "``TESTPYTHONOPTS``: additional Python command-line options." msgstr "" -#: ../../../using/configure.rst:1367 +#: ../../../using/configure.rst:1370 msgid "``TESTTIMEOUT``: timeout in seconds (default: 10 minutes)." msgstr "" -#: ../../../using/configure.rst:1371 +#: ../../../using/configure.rst:1374 msgid "make ci" msgstr "" -#: ../../../using/configure.rst:1373 +#: ../../../using/configure.rst:1376 msgid "" "This is similar to ``make test``, but uses the ``-ugui`` to also run GUI " "tests." msgstr "" -#: ../../../using/configure.rst:1379 +#: ../../../using/configure.rst:1382 msgid "make buildbottest" msgstr "" -#: ../../../using/configure.rst:1381 +#: ../../../using/configure.rst:1384 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:1386 +#: ../../../using/configure.rst:1389 msgid "make regen-all" msgstr "" -#: ../../../using/configure.rst:1388 +#: ../../../using/configure.rst:1391 msgid "" "Regenerate (almost) all generated files. These include (but are not limited " "to) bytecode cases, and parser generator file. ``make regen-stdlib-module-" @@ -2018,25 +2024,25 @@ msgid "" "files <#generated-files>`_." msgstr "" -#: ../../../using/configure.rst:1395 +#: ../../../using/configure.rst:1398 msgid "C extensions" msgstr "" -#: ../../../using/configure.rst:1397 +#: ../../../using/configure.rst:1400 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:1411 +#: ../../../using/configure.rst:1414 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:1423 +#: ../../../using/configure.rst:1426 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-" @@ -2044,330 +2050,330 @@ msgid "" "dynamic libraries." msgstr "" -#: ../../../using/configure.rst:1427 +#: ../../../using/configure.rst:1430 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:1431 +#: ../../../using/configure.rst:1434 msgid "Use ``Py_EXPORTED_SYMBOL`` if the ``Py_BUILD_CORE_MODULE`` is defined" msgstr "" -#: ../../../using/configure.rst:1432 +#: ../../../using/configure.rst:1435 msgid "Use ``Py_IMPORTED_SYMBOL`` otherwise." msgstr "" -#: ../../../using/configure.rst:1434 +#: ../../../using/configure.rst:1437 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:1440 +#: ../../../using/configure.rst:1443 msgid "Compiler and linker flags" msgstr "" -#: ../../../using/configure.rst:1442 +#: ../../../using/configure.rst:1445 msgid "" "Options set by the ``./configure`` script and environment variables and used " "by ``Makefile``." msgstr "" -#: ../../../using/configure.rst:1446 +#: ../../../using/configure.rst:1449 msgid "Preprocessor flags" msgstr "" -#: ../../../using/configure.rst:1450 +#: ../../../using/configure.rst:1453 msgid "" "Value of :envvar:`CPPFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../../using/configure.rst:1456 +#: ../../../using/configure.rst:1459 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:1459 ../../../using/configure.rst:1649 +#: ../../../using/configure.rst:1462 ../../../using/configure.rst:1652 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:1469 +#: ../../../using/configure.rst:1472 msgid "" "Extra preprocessor flags added for building the interpreter object files." msgstr "" -#: ../../../using/configure.rst:1471 +#: ../../../using/configure.rst:1474 msgid "" "Default: ``$(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) " "$(CPPFLAGS)``." msgstr "" -#: ../../../using/configure.rst:1476 +#: ../../../using/configure.rst:1479 msgid "Compiler flags" msgstr "" -#: ../../../using/configure.rst:1482 +#: ../../../using/configure.rst:1485 msgid "Example: ``gcc -pthread``." msgstr "" -#: ../../../using/configure.rst:1486 +#: ../../../using/configure.rst:1489 msgid "C++ compiler command." msgstr "" -#: ../../../using/configure.rst:1488 +#: ../../../using/configure.rst:1491 msgid "Example: ``g++ -pthread``." msgstr "" -#: ../../../using/configure.rst:1496 +#: ../../../using/configure.rst:1499 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:1500 +#: ../../../using/configure.rst:1503 msgid "In particular, :envvar:`CFLAGS` should not contain:" msgstr "" -#: ../../../using/configure.rst:1502 +#: ../../../using/configure.rst:1505 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:1507 +#: ../../../using/configure.rst:1510 msgid "" "hardening flags such as ``-Werror`` because distributions cannot control " "whether packages installed by users conform to such heightened standards." msgstr "" -#: ../../../using/configure.rst:1515 +#: ../../../using/configure.rst:1518 msgid "" "Options passed to the :mod:`compileall` command line when building PYC files " "in ``make install``. Default: ``-j0``." msgstr "" -#: ../../../using/configure.rst:1522 +#: ../../../using/configure.rst:1525 msgid "Extra C compiler flags." msgstr "" -#: ../../../using/configure.rst:1526 +#: ../../../using/configure.rst:1529 msgid "" "Value of :envvar:`CFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../../using/configure.rst:1533 +#: ../../../using/configure.rst:1536 msgid "" "Value of :envvar:`CFLAGS_NODIST` variable passed to the ``./configure`` " "script." msgstr "" -#: ../../../using/configure.rst:1540 +#: ../../../using/configure.rst:1543 msgid "Base compiler flags." msgstr "" -#: ../../../using/configure.rst:1544 +#: ../../../using/configure.rst:1547 msgid "Optimization flags." msgstr "" -#: ../../../using/configure.rst:1548 +#: ../../../using/configure.rst:1551 msgid "Strict or non-strict aliasing flags used to compile ``Python/dtoa.c``." msgstr "" -#: ../../../using/configure.rst:1554 +#: ../../../using/configure.rst:1557 msgid "Compiler flags used to build a shared library." msgstr "" -#: ../../../using/configure.rst:1556 +#: ../../../using/configure.rst:1559 msgid "For example, ``-fPIC`` is used on Linux and on BSD." msgstr "" -#: ../../../using/configure.rst:1560 +#: ../../../using/configure.rst:1563 msgid "Extra C flags added for building the interpreter object files." msgstr "" -#: ../../../using/configure.rst:1562 +#: ../../../using/configure.rst:1565 msgid "" "Default: ``$(CCSHARED)`` when :option:`--enable-shared` is used, or an empty " "string otherwise." msgstr "" -#: ../../../using/configure.rst:1567 +#: ../../../using/configure.rst:1570 msgid "" "Default: ``$(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) " "$(EXTRA_CFLAGS)``." msgstr "" -#: ../../../using/configure.rst:1571 +#: ../../../using/configure.rst:1574 msgid "" "Default: ``$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/" "internal``." msgstr "" -#: ../../../using/configure.rst:1577 +#: ../../../using/configure.rst:1580 msgid "C flags used for building the interpreter object files." msgstr "" -#: ../../../using/configure.rst:1579 +#: ../../../using/configure.rst:1582 msgid "" "Default: ``$(PY_CFLAGS) $(PY_CFLAGS_NODIST) $(PY_CPPFLAGS) " "$(CFLAGSFORSHARED)``." msgstr "" -#: ../../../using/configure.rst:1585 +#: ../../../using/configure.rst:1588 msgid "Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE``." msgstr "" -#: ../../../using/configure.rst:1591 +#: ../../../using/configure.rst:1594 msgid "" "Compiler flags to build a standard library extension module as a built-in " "module, like the :mod:`posix` module." msgstr "" -#: ../../../using/configure.rst:1594 +#: ../../../using/configure.rst:1597 msgid "Default: ``$(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN``." msgstr "" -#: ../../../using/configure.rst:1600 +#: ../../../using/configure.rst:1603 msgid "Purify command. Purify is a memory debugger program." msgstr "" -#: ../../../using/configure.rst:1602 +#: ../../../using/configure.rst:1605 msgid "Default: empty string (not used)." msgstr "" -#: ../../../using/configure.rst:1606 +#: ../../../using/configure.rst:1609 msgid "Linker flags" msgstr "" -#: ../../../using/configure.rst:1610 +#: ../../../using/configure.rst:1613 msgid "" "Linker command used to build programs like ``python`` and ``_testembed``." msgstr "" -#: ../../../using/configure.rst:1612 +#: ../../../using/configure.rst:1615 msgid "Default: ``$(PURIFY) $(CC)``." msgstr "" -#: ../../../using/configure.rst:1616 +#: ../../../using/configure.rst:1619 msgid "" "Value of :envvar:`LDFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../../using/configure.rst:1618 +#: ../../../using/configure.rst:1621 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:1626 +#: ../../../using/configure.rst:1629 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:1630 +#: ../../../using/configure.rst:1633 msgid "In particular, :envvar:`LDFLAGS` should not contain:" msgstr "" -#: ../../../using/configure.rst:1632 +#: ../../../using/configure.rst:1635 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:1639 +#: ../../../using/configure.rst:1642 msgid "" "Value of :envvar:`LDFLAGS_NODIST` variable passed to the ``./configure`` " "script." msgstr "" -#: ../../../using/configure.rst:1646 +#: ../../../using/configure.rst:1649 msgid "" "Linker flags, e.g. :samp:`-L{lib_dir}` if you have libraries in a " "nonstandard directory *lib_dir*." msgstr "" -#: ../../../using/configure.rst:1653 +#: ../../../using/configure.rst:1656 msgid "" "Please consider using ``EXE_LDFLAGS`` if the supplied linker flags are " "executable specific, e.g. GCC's ``-pie`` flag." msgstr "" -#: ../../../using/configure.rst:1658 +#: ../../../using/configure.rst:1661 msgid "" "Linker flags to pass libraries to the linker when linking the Python " "executable." msgstr "" -#: ../../../using/configure.rst:1661 +#: ../../../using/configure.rst:1664 msgid "Example: ``-lrt``." msgstr "" -#: ../../../using/configure.rst:1665 +#: ../../../using/configure.rst:1668 msgid "Command to build a shared library." msgstr "" -#: ../../../using/configure.rst:1667 +#: ../../../using/configure.rst:1670 msgid "Default: ``@LDSHARED@ $(PY_LDFLAGS)``." msgstr "" -#: ../../../using/configure.rst:1671 +#: ../../../using/configure.rst:1674 msgid "Command to build ``libpython`` shared library." msgstr "" -#: ../../../using/configure.rst:1673 +#: ../../../using/configure.rst:1676 msgid "Default: ``@BLDSHARED@ $(PY_CORE_LDFLAGS)``." msgstr "" -#: ../../../using/configure.rst:1677 +#: ../../../using/configure.rst:1680 msgid "Default: ``$(CONFIGURE_LDFLAGS) $(LDFLAGS)``." msgstr "" -#: ../../../using/configure.rst:1681 +#: ../../../using/configure.rst:1684 msgid "Default: ``$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)``." msgstr "" -#: ../../../using/configure.rst:1687 +#: ../../../using/configure.rst:1690 msgid "Linker flags used for building the interpreter object files." msgstr "" -#: ../../../using/configure.rst:1693 +#: ../../../using/configure.rst:1696 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:1701 +#: ../../../using/configure.rst:1704 msgid "" "Value of :envvar:`EXE_LDFLAGS` variable passed to the ``./configure`` script." msgstr "" -#: ../../../using/configure.rst:1708 +#: ../../../using/configure.rst:1711 msgid "Linker flags used for building the interpreter and executable targets." msgstr "" -#: ../../../using/configure.rst:1711 +#: ../../../using/configure.rst:1714 msgid "Default: ``$(PY_CORE_LDFLAGS)``" msgstr "" -#: ../../../using/configure.rst:1717 +#: ../../../using/configure.rst:1720 msgid "Footnotes" msgstr "" -#: ../../../using/configure.rst:1718 +#: ../../../using/configure.rst:1721 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 " diff --git a/main/locale/pot/LC_MESSAGES/whatsnew/3.12.pot b/main/locale/pot/LC_MESSAGES/whatsnew/3.12.pot index 261d90fcf93..e097c241be5 100644 --- a/main/locale/pot/LC_MESSAGES/whatsnew/3.12.pot +++ b/main/locale/pot/LC_MESSAGES/whatsnew/3.12.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2533,108 +2533,121 @@ 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:8 +#: ../../../deprecations/pending-removal-in-3.20.rst:15 msgid ":mod:`argparse`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:9 +#: ../../../deprecations/pending-removal-in-3.20.rst:16 msgid ":mod:`csv`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:10 +#: ../../../deprecations/pending-removal-in-3.20.rst:17 msgid ":mod:`ctypes`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:11 +#: ../../../deprecations/pending-removal-in-3.20.rst:18 msgid ":mod:`!ctypes.macholib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:12 +#: ../../../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:13 +#: ../../../deprecations/pending-removal-in-3.20.rst:20 msgid ":mod:`http.server`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:14 +#: ../../../deprecations/pending-removal-in-3.20.rst:21 msgid ":mod:`imaplib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:15 +#: ../../../deprecations/pending-removal-in-3.20.rst:22 msgid ":mod:`ipaddress`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:16 +#: ../../../deprecations/pending-removal-in-3.20.rst:23 msgid ":mod:`json`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:17 +#: ../../../deprecations/pending-removal-in-3.20.rst:24 msgid ":mod:`logging` (``__date__`` also deprecated)" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:18 +#: ../../../deprecations/pending-removal-in-3.20.rst:25 msgid ":mod:`optparse`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:19 +#: ../../../deprecations/pending-removal-in-3.20.rst:26 msgid ":mod:`pickle`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:20 +#: ../../../deprecations/pending-removal-in-3.20.rst:27 msgid ":mod:`platform`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:21 +#: ../../../deprecations/pending-removal-in-3.20.rst:28 msgid ":mod:`re`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:22 +#: ../../../deprecations/pending-removal-in-3.20.rst:29 msgid ":mod:`socketserver`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:23 +#: ../../../deprecations/pending-removal-in-3.20.rst:30 msgid ":mod:`tabnanny`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:24 +#: ../../../deprecations/pending-removal-in-3.20.rst:31 msgid ":mod:`tarfile`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:25 +#: ../../../deprecations/pending-removal-in-3.20.rst:32 msgid ":mod:`tkinter.font`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:26 +#: ../../../deprecations/pending-removal-in-3.20.rst:33 msgid ":mod:`tkinter.ttk`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:27 +#: ../../../deprecations/pending-removal-in-3.20.rst:34 msgid ":mod:`wsgiref.simple_server`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:28 +#: ../../../deprecations/pending-removal-in-3.20.rst:35 msgid ":mod:`xml.etree.ElementTree`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:29 +#: ../../../deprecations/pending-removal-in-3.20.rst:36 msgid ":mod:`!xml.sax.expatreader`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:30 +#: ../../../deprecations/pending-removal-in-3.20.rst:37 msgid ":mod:`xml.sax.handler`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:31 +#: ../../../deprecations/pending-removal-in-3.20.rst:38 msgid ":mod:`zlib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:33 +#: ../../../deprecations/pending-removal-in-3.20.rst:40 msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/whatsnew/3.13.pot b/main/locale/pot/LC_MESSAGES/whatsnew/3.13.pot index 81d1e117992..606e9900a89 100644 --- a/main/locale/pot/LC_MESSAGES/whatsnew/3.13.pot +++ b/main/locale/pot/LC_MESSAGES/whatsnew/3.13.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2630,7 +2630,7 @@ msgid "" msgstr "" #: ../../../whatsnew/3.13.rst:1859 -#: ../../../deprecations/pending-removal-in-3.18.rst:4 +#: ../../../deprecations/pending-removal-in-3.18.rst:7 msgid ":mod:`decimal`:" msgstr "" @@ -3427,7 +3427,13 @@ msgstr "" msgid "Pending removal in Python 3.18" msgstr "" -#: ../../../deprecations/pending-removal-in-3.18.rst:6 +#: ../../../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:9 msgid "" "The non-standard and undocumented :class:`~decimal.Decimal` format specifier " "``'N'``, which is only supported in the :mod:`!decimal` module's C " @@ -3479,108 +3485,121 @@ 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:8 +#: ../../../deprecations/pending-removal-in-3.20.rst:15 msgid ":mod:`argparse`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:9 +#: ../../../deprecations/pending-removal-in-3.20.rst:16 msgid ":mod:`csv`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:10 +#: ../../../deprecations/pending-removal-in-3.20.rst:17 msgid ":mod:`ctypes`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:11 +#: ../../../deprecations/pending-removal-in-3.20.rst:18 msgid ":mod:`!ctypes.macholib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:12 +#: ../../../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:13 +#: ../../../deprecations/pending-removal-in-3.20.rst:20 msgid ":mod:`http.server`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:14 +#: ../../../deprecations/pending-removal-in-3.20.rst:21 msgid ":mod:`imaplib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:15 +#: ../../../deprecations/pending-removal-in-3.20.rst:22 msgid ":mod:`ipaddress`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:16 +#: ../../../deprecations/pending-removal-in-3.20.rst:23 msgid ":mod:`json`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:17 +#: ../../../deprecations/pending-removal-in-3.20.rst:24 msgid ":mod:`logging` (``__date__`` also deprecated)" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:18 +#: ../../../deprecations/pending-removal-in-3.20.rst:25 msgid ":mod:`optparse`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:19 +#: ../../../deprecations/pending-removal-in-3.20.rst:26 msgid ":mod:`pickle`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:20 +#: ../../../deprecations/pending-removal-in-3.20.rst:27 msgid ":mod:`platform`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:21 +#: ../../../deprecations/pending-removal-in-3.20.rst:28 msgid ":mod:`re`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:22 +#: ../../../deprecations/pending-removal-in-3.20.rst:29 msgid ":mod:`socketserver`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:23 +#: ../../../deprecations/pending-removal-in-3.20.rst:30 msgid ":mod:`tabnanny`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:24 +#: ../../../deprecations/pending-removal-in-3.20.rst:31 msgid ":mod:`tarfile`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:25 +#: ../../../deprecations/pending-removal-in-3.20.rst:32 msgid ":mod:`tkinter.font`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:26 +#: ../../../deprecations/pending-removal-in-3.20.rst:33 msgid ":mod:`tkinter.ttk`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:27 +#: ../../../deprecations/pending-removal-in-3.20.rst:34 msgid ":mod:`wsgiref.simple_server`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:28 +#: ../../../deprecations/pending-removal-in-3.20.rst:35 msgid ":mod:`xml.etree.ElementTree`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:29 +#: ../../../deprecations/pending-removal-in-3.20.rst:36 msgid ":mod:`!xml.sax.expatreader`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:30 +#: ../../../deprecations/pending-removal-in-3.20.rst:37 msgid ":mod:`xml.sax.handler`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:31 +#: ../../../deprecations/pending-removal-in-3.20.rst:38 msgid ":mod:`zlib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:33 +#: ../../../deprecations/pending-removal-in-3.20.rst:40 msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" msgstr "" diff --git a/main/locale/pot/LC_MESSAGES/whatsnew/3.14.pot b/main/locale/pot/LC_MESSAGES/whatsnew/3.14.pot index 8e887e3ac9d..03ca144a738 100644 --- a/main/locale/pot/LC_MESSAGES/whatsnew/3.14.pot +++ b/main/locale/pot/LC_MESSAGES/whatsnew/3.14.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-02 09:17+0000\n" +"POT-Creation-Date: 2026-03-16 09:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1006,45 +1006,45 @@ msgstr "" #: ../../../whatsnew/3.14.rst:899 msgid "" "The command-line option :option:`-c` now automatically dedents its code " -"argument before execution. The auto-dedentation behavior mirrors :func:" -"`textwrap.dedent`. (Contributed by Jon Crall and Steven Sun in :gh:`103998`.)" +"argument before execution. (Contributed by Jon Crall and Steven Sun in :gh:" +"`103998`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:904 +#: ../../../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:914 +#: ../../../whatsnew/3.14.rst:913 msgid "PEP 758: Allow ``except`` and ``except*`` expressions without brackets" msgstr "" -#: ../../../whatsnew/3.14.rst:916 +#: ../../../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:928 +#: ../../../whatsnew/3.14.rst:927 msgid "" "(Contributed by Pablo Galindo and Brett Cannon in :pep:`758` and :gh:" "`131831`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:934 +#: ../../../whatsnew/3.14.rst:933 msgid "PEP 765: Control flow in :keyword:`finally` blocks" msgstr "" -#: ../../../whatsnew/3.14.rst:936 +#: ../../../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:941 +#: ../../../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 " @@ -1055,7 +1055,7 @@ msgid "" "``PYTHONWARNINGS=error,ignore::SyntaxWarning``)." msgstr "" -#: ../../../whatsnew/3.14.rst:949 +#: ../../../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 " @@ -1063,21 +1063,21 @@ msgid "" "example, when a module is imported) will still emit the syntax warning." msgstr "" -#: ../../../whatsnew/3.14.rst:954 +#: ../../../whatsnew/3.14.rst:953 msgid "(Contributed by Irit Katriel in :gh:`130080`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:960 +#: ../../../whatsnew/3.14.rst:959 msgid "Incremental garbage collection" msgstr "" -#: ../../../whatsnew/3.14.rst:962 +#: ../../../whatsnew/3.14.rst:961 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:966 +#: ../../../whatsnew/3.14.rst:965 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 " @@ -1085,29 +1085,29 @@ msgid "" "generation, instead of collecting one or more generations." msgstr "" -#: ../../../whatsnew/3.14.rst:972 +#: ../../../whatsnew/3.14.rst:971 msgid "The behavior of :func:`!gc.collect` changes slightly:" msgstr "" -#: ../../../whatsnew/3.14.rst:974 ../../../whatsnew/3.14.rst:3280 +#: ../../../whatsnew/3.14.rst:973 ../../../whatsnew/3.14.rst:3279 msgid "" "``gc.collect(1)``: Performs an increment of garbage collection, rather than " "collecting generation 1." msgstr "" -#: ../../../whatsnew/3.14.rst:976 ../../../whatsnew/3.14.rst:3282 +#: ../../../whatsnew/3.14.rst:975 ../../../whatsnew/3.14.rst:3281 msgid "Other calls to :func:`!gc.collect` are unchanged." msgstr "" -#: ../../../whatsnew/3.14.rst:978 ../../../whatsnew/3.14.rst:2236 +#: ../../../whatsnew/3.14.rst:977 ../../../whatsnew/3.14.rst:2235 msgid "(Contributed by Mark Shannon in :gh:`108362`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:982 +#: ../../../whatsnew/3.14.rst:981 msgid "Default interactive shell" msgstr "" -#: ../../../whatsnew/3.14.rst:986 +#: ../../../whatsnew/3.14.rst:985 msgid "" "The default :term:`interactive` shell now highlights Python syntax. The " "feature is enabled by default, save if :envvar:`PYTHON_BASIC_REPL` or any " @@ -1115,7 +1115,7 @@ msgid "" "controlling-color` for details." msgstr "" -#: ../../../whatsnew/3.14.rst:991 +#: ../../../whatsnew/3.14.rst:990 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 " @@ -1125,11 +1125,11 @@ msgid "" "and may change or be removed." msgstr "" -#: ../../../whatsnew/3.14.rst:999 +#: ../../../whatsnew/3.14.rst:998 msgid "(Contributed by Łukasz Langa in :gh:`131507`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1001 +#: ../../../whatsnew/3.14.rst:1000 msgid "" "The default :term:`interactive` shell now supports import auto-completion. " "This means that typing ``import co`` and pressing :kbd:`` will suggest " @@ -1139,18 +1139,18 @@ msgid "" "by Tomas Roun in :gh:`69605`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1010 +#: ../../../whatsnew/3.14.rst:1009 msgid "New modules" msgstr "" -#: ../../../whatsnew/3.14.rst:1012 +#: ../../../whatsnew/3.14.rst:1011 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:1017 +#: ../../../whatsnew/3.14.rst:1016 msgid "" ":mod:`compression` (including :mod:`compression.zstd`): A package for " "compression-related modules, including a new module to support the Zstandard " @@ -1159,14 +1159,14 @@ msgid "" "Tomas Roun, Victor Stinner, and Rogdham in :gh:`132983`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1024 +#: ../../../whatsnew/3.14.rst:1023 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:1029 +#: ../../../whatsnew/3.14.rst:1028 msgid "" ":mod:`string.templatelib`: Support for template string literals (t-strings). " "See :ref:`PEP 750 ` for more details. " @@ -1175,15 +1175,15 @@ msgid "" "and Pablo Galindo Salgado in :gh:`132661`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1038 +#: ../../../whatsnew/3.14.rst:1037 msgid "Improved modules" msgstr "" -#: ../../../whatsnew/3.14.rst:1041 ../../../whatsnew/3.14.rst:2310 +#: ../../../whatsnew/3.14.rst:1040 ../../../whatsnew/3.14.rst:2309 msgid "argparse" msgstr "" -#: ../../../whatsnew/3.14.rst:1043 +#: ../../../whatsnew/3.14.rst:1042 msgid "" "The default value of the :ref:`program name ` for :class:`argparse." "ArgumentParser` now reflects the way the Python interpreter was instructed " @@ -1191,7 +1191,7 @@ msgid "" "Alyssa Coghlan in :gh:`66436`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1048 +#: ../../../whatsnew/3.14.rst:1047 msgid "" "Introduced the optional *suggest_on_error* parameter to :class:`argparse." "ArgumentParser`, enabling suggestions for argument choices and subparser " @@ -1199,7 +1199,7 @@ msgid "" "`124456`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1053 +#: ../../../whatsnew/3.14.rst:1052 msgid "" "Enable color for help text, which can be disabled with the optional *color* " "parameter to :class:`argparse.ArgumentParser`. This can also be controlled " @@ -1207,42 +1207,42 @@ msgid "" "by Hugo van Kemenade in :gh:`130645`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1061 ../../../whatsnew/3.14.rst:2329 +#: ../../../whatsnew/3.14.rst:1060 ../../../whatsnew/3.14.rst:2328 msgid "ast" msgstr "" -#: ../../../whatsnew/3.14.rst:1063 +#: ../../../whatsnew/3.14.rst:1062 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:1066 +#: ../../../whatsnew/3.14.rst:1065 msgid "" "Add support for :func:`copy.replace` for AST nodes. (Contributed by Bénédikt " "Tran in :gh:`121141`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1069 +#: ../../../whatsnew/3.14.rst:1068 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:1072 +#: ../../../whatsnew/3.14.rst:1071 msgid "" "The :func:`repr` output for AST nodes now includes more information. " "(Contributed by Tomas Roun in :gh:`116022`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1075 +#: ../../../whatsnew/3.14.rst:1074 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:1079 +#: ../../../whatsnew/3.14.rst:1078 msgid "" "Add new options to the command-line interface: :option:`--feature-version " "`, :option:`--optimize `, and :option:" @@ -1250,12 +1250,12 @@ msgid "" "`133367`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1087 ../../../whatsnew/3.14.rst:2162 -#: ../../../whatsnew/3.14.rst:2360 +#: ../../../whatsnew/3.14.rst:1086 ../../../whatsnew/3.14.rst:2161 +#: ../../../whatsnew/3.14.rst:2359 msgid "asyncio" msgstr "" -#: ../../../whatsnew/3.14.rst:1089 +#: ../../../whatsnew/3.14.rst:1088 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:" @@ -1265,18 +1265,18 @@ msgid "" "``name`` keyword argument of the factory, and ``context`` may be ``None``." msgstr "" -#: ../../../whatsnew/3.14.rst:1097 +#: ../../../whatsnew/3.14.rst:1096 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:1102 +#: ../../../whatsnew/3.14.rst:1101 msgid "(Contributed by Thomas Grainger in :gh:`128307`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1104 +#: ../../../whatsnew/3.14.rst:1103 msgid "" "There are two new utility functions for introspecting and printing a " "program's call graph: :func:`~asyncio.capture_call_graph` and :func:" @@ -1285,11 +1285,11 @@ msgid "" "Selivanov, Pablo Galindo Salgado, and Łukasz Langa in :gh:`91048`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1114 +#: ../../../whatsnew/3.14.rst:1113 msgid "calendar" msgstr "" -#: ../../../whatsnew/3.14.rst:1118 +#: ../../../whatsnew/3.14.rst:1117 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:" @@ -1297,11 +1297,11 @@ msgid "" "van Kemenade in :gh:`128317`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1126 +#: ../../../whatsnew/3.14.rst:1125 msgid "concurrent.futures" msgstr "" -#: ../../../whatsnew/3.14.rst:1130 +#: ../../../whatsnew/3.14.rst:1129 msgid "" "Add a new executor class, :class:`~concurrent.futures." "InterpreterPoolExecutor`, which exposes multiple Python interpreters in the " @@ -1309,14 +1309,14 @@ msgid "" "independent Python interpreters to execute calls asynchronously." msgstr "" -#: ../../../whatsnew/3.14.rst:1136 +#: ../../../whatsnew/3.14.rst:1135 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:1142 +#: ../../../whatsnew/3.14.rst:1141 msgid "" "On Unix platforms other than macOS, :ref:`'forkserver' ` is now the default :ref:`start method " @@ -1326,14 +1326,14 @@ msgid "" "` remains the default start method." msgstr "" -#: ../../../whatsnew/3.14.rst:1150 +#: ../../../whatsnew/3.14.rst:1149 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:1154 ../../../whatsnew/3.14.rst:1604 +#: ../../../whatsnew/3.14.rst:1153 ../../../whatsnew/3.14.rst:1603 msgid "" "See :ref:`forkserver restrictions ` " "for information and differences with the *fork* method and how this change " @@ -1341,11 +1341,11 @@ msgid "" "objects that can not be automatically :mod:`pickled `." msgstr "" -#: ../../../whatsnew/3.14.rst:1159 ../../../whatsnew/3.14.rst:1609 +#: ../../../whatsnew/3.14.rst:1158 ../../../whatsnew/3.14.rst:1608 msgid "(Contributed by Gregory P. Smith in :gh:`84559`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1161 +#: ../../../whatsnew/3.14.rst:1160 msgid "" "Add two new methods to :class:`~concurrent.futures.ProcessPoolExecutor`, :" "meth:`~concurrent.futures.ProcessPoolExecutor.terminate_workers` and :meth:" @@ -1354,7 +1354,7 @@ msgid "" "Charles Machalow in :gh:`130849`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1167 +#: ../../../whatsnew/3.14.rst:1166 msgid "" "Add the optional *buffersize* parameter to :meth:`Executor.map ` to limit the number of submitted tasks whose results " @@ -1363,11 +1363,11 @@ msgid "" "by Enzo Bonnal and Josh Rosenberg in :gh:`74028`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1176 +#: ../../../whatsnew/3.14.rst:1175 msgid "configparser" msgstr "" -#: ../../../whatsnew/3.14.rst:1178 +#: ../../../whatsnew/3.14.rst:1177 msgid "" ":mod:`!configparser` will no longer write config files it cannot read, to " "improve security. Attempting to :meth:`~configparser.ConfigParser.write` " @@ -1376,21 +1376,21 @@ msgid "" "Lincoln in :gh:`129270`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1187 +#: ../../../whatsnew/3.14.rst:1186 msgid "contextvars" msgstr "" -#: ../../../whatsnew/3.14.rst:1189 +#: ../../../whatsnew/3.14.rst:1188 msgid "" "Support the :term:`context manager` protocol for :class:`~contextvars.Token` " "objects. (Contributed by Andrew Svetlov in :gh:`129889`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1195 +#: ../../../whatsnew/3.14.rst:1194 msgid "ctypes" msgstr "" -#: ../../../whatsnew/3.14.rst:1197 +#: ../../../whatsnew/3.14.rst:1196 msgid "" "The layout of :ref:`bit fields ` in :" "class:`~ctypes.Structure` and :class:`~ctypes.Union` objects is now a closer " @@ -1398,13 +1398,13 @@ msgid "" "longer overlap. (Contributed by Matthias Görgens in :gh:`97702`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1203 +#: ../../../whatsnew/3.14.rst:1202 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:1207 +#: ../../../whatsnew/3.14.rst:1206 msgid "" "The class of :class:`~ctypes.Structure`/:class:`~ctypes.Union` field " "descriptors is now available as :class:`~ctypes.CField`, and has new " @@ -1412,19 +1412,19 @@ msgid "" "in :gh:`128715`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1212 +#: ../../../whatsnew/3.14.rst:1211 msgid "" "On Windows, the :exc:`~ctypes.COMError` exception is now public. " "(Contributed by Jun Komoda in :gh:`126686`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1215 +#: ../../../whatsnew/3.14.rst:1214 msgid "" "On Windows, the :func:`~ctypes.CopyComPointer` function is now public. " "(Contributed by Jun Komoda in :gh:`127275`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1218 +#: ../../../whatsnew/3.14.rst:1217 msgid "" "Add :func:`~ctypes.memoryview_at`, a function to create a :class:" "`memoryview` object that refers to the supplied pointer and length. This " @@ -1434,7 +1434,7 @@ msgid "" "`112018`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1225 +#: ../../../whatsnew/3.14.rst:1224 msgid "" "Complex types, :class:`~ctypes.c_float_complex`, :class:`~ctypes." "c_double_complex`, and :class:`~ctypes.c_longdouble_complex`, are now " @@ -1442,13 +1442,13 @@ msgid "" "types. (Contributed by Sergey B Kirpichev in :gh:`61103`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1231 +#: ../../../whatsnew/3.14.rst:1230 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:1235 +#: ../../../whatsnew/3.14.rst:1234 msgid "" "Move :func:`ctypes.POINTER` types cache from a global internal cache " "(``_pointer_type_cache``) to the :attr:`_CData.__pointer_type__ `. " "(Contributed by Kumar Aditya and Peter Bierma in :gh:`127945`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1251 +#: ../../../whatsnew/3.14.rst:1250 msgid "curses" msgstr "" -#: ../../../whatsnew/3.14.rst:1253 +#: ../../../whatsnew/3.14.rst:1252 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:1260 +#: ../../../whatsnew/3.14.rst:1259 msgid "datetime" msgstr "" -#: ../../../whatsnew/3.14.rst:1262 +#: ../../../whatsnew/3.14.rst:1261 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:1268 +#: ../../../whatsnew/3.14.rst:1267 msgid "decimal" msgstr "" -#: ../../../whatsnew/3.14.rst:1270 +#: ../../../whatsnew/3.14.rst:1269 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:1274 +#: ../../../whatsnew/3.14.rst:1273 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:1280 ../../../whatsnew/3.14.rst:2198 +#: ../../../whatsnew/3.14.rst:1279 ../../../whatsnew/3.14.rst:2197 msgid "difflib" msgstr "" -#: ../../../whatsnew/3.14.rst:1282 +#: ../../../whatsnew/3.14.rst:1281 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:1288 +#: ../../../whatsnew/3.14.rst:1287 msgid "dis" msgstr "" -#: ../../../whatsnew/3.14.rst:1290 +#: ../../../whatsnew/3.14.rst:1289 msgid "" "Add support for rendering full source location information of :class:" "`instructions `, rather than only the line number. This " @@ -1531,49 +1531,49 @@ msgid "" "keyword argument:" msgstr "" -#: ../../../whatsnew/3.14.rst:1295 +#: ../../../whatsnew/3.14.rst:1294 msgid ":class:`dis.Bytecode`" msgstr "" -#: ../../../whatsnew/3.14.rst:1296 +#: ../../../whatsnew/3.14.rst:1295 msgid ":func:`dis.dis`" msgstr "" -#: ../../../whatsnew/3.14.rst:1297 +#: ../../../whatsnew/3.14.rst:1296 msgid ":func:`dis.distb`" msgstr "" -#: ../../../whatsnew/3.14.rst:1298 +#: ../../../whatsnew/3.14.rst:1297 msgid ":func:`dis.disassemble`" msgstr "" -#: ../../../whatsnew/3.14.rst:1300 +#: ../../../whatsnew/3.14.rst:1299 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:1303 +#: ../../../whatsnew/3.14.rst:1302 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:1309 +#: ../../../whatsnew/3.14.rst:1308 msgid "errno" msgstr "" -#: ../../../whatsnew/3.14.rst:1311 +#: ../../../whatsnew/3.14.rst:1310 msgid "" "Add the :data:`~errno.EHWPOISON` error code constant. (Contributed by James " "Roy in :gh:`126585`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1316 +#: ../../../whatsnew/3.14.rst:1315 msgid "faulthandler" msgstr "" -#: ../../../whatsnew/3.14.rst:1318 +#: ../../../whatsnew/3.14.rst:1317 msgid "" "Add support for printing the C stack trace on systems that :ref:`support it " "` via the new :func:`~faulthandler.dump_c_stack` " @@ -1581,38 +1581,38 @@ msgid "" "(Contributed by Peter Bierma in :gh:`127604`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1326 +#: ../../../whatsnew/3.14.rst:1325 msgid "fnmatch" msgstr "" -#: ../../../whatsnew/3.14.rst:1328 +#: ../../../whatsnew/3.14.rst:1327 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:1334 +#: ../../../whatsnew/3.14.rst:1333 msgid "fractions" msgstr "" -#: ../../../whatsnew/3.14.rst:1336 +#: ../../../whatsnew/3.14.rst:1335 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:1340 +#: ../../../whatsnew/3.14.rst:1339 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:1346 +#: ../../../whatsnew/3.14.rst:1345 msgid "functools" msgstr "" -#: ../../../whatsnew/3.14.rst:1348 +#: ../../../whatsnew/3.14.rst:1347 msgid "" "Add the :data:`~functools.Placeholder` sentinel. This may be used with the :" "func:`~functools.partial` or :func:`~functools.partialmethod` functions to " @@ -1621,33 +1621,33 @@ msgid "" "`119127`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1355 +#: ../../../whatsnew/3.14.rst:1354 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:1361 +#: ../../../whatsnew/3.14.rst:1360 msgid "getopt" msgstr "" -#: ../../../whatsnew/3.14.rst:1363 +#: ../../../whatsnew/3.14.rst:1362 msgid "" "Add support for options with optional arguments. (Contributed by Serhiy " "Storchaka in :gh:`126374`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1366 +#: ../../../whatsnew/3.14.rst:1365 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:1371 +#: ../../../whatsnew/3.14.rst:1370 msgid "getpass" msgstr "" -#: ../../../whatsnew/3.14.rst:1373 +#: ../../../whatsnew/3.14.rst:1372 msgid "" "Support keyboard feedback in the :func:`~getpass.getpass` function via the " "keyword-only optional argument *echo_char*. Placeholder characters are " @@ -1655,51 +1655,51 @@ msgid "" "deleted. (Contributed by Semyon Moroz in :gh:`77065`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1381 +#: ../../../whatsnew/3.14.rst:1380 msgid "graphlib" msgstr "" -#: ../../../whatsnew/3.14.rst:1383 +#: ../../../whatsnew/3.14.rst:1382 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:1389 +#: ../../../whatsnew/3.14.rst:1388 msgid "heapq" msgstr "" -#: ../../../whatsnew/3.14.rst:1391 +#: ../../../whatsnew/3.14.rst:1390 msgid "" "The :mod:`!heapq` module has improved support for working with max-heaps, " "via the following new functions:" msgstr "" -#: ../../../whatsnew/3.14.rst:1394 +#: ../../../whatsnew/3.14.rst:1393 msgid ":func:`~heapq.heapify_max`" msgstr "" -#: ../../../whatsnew/3.14.rst:1395 +#: ../../../whatsnew/3.14.rst:1394 msgid ":func:`~heapq.heappush_max`" msgstr "" -#: ../../../whatsnew/3.14.rst:1396 +#: ../../../whatsnew/3.14.rst:1395 msgid ":func:`~heapq.heappop_max`" msgstr "" -#: ../../../whatsnew/3.14.rst:1397 +#: ../../../whatsnew/3.14.rst:1396 msgid ":func:`~heapq.heapreplace_max`" msgstr "" -#: ../../../whatsnew/3.14.rst:1398 +#: ../../../whatsnew/3.14.rst:1397 msgid ":func:`~heapq.heappushpop_max`" msgstr "" -#: ../../../whatsnew/3.14.rst:1402 +#: ../../../whatsnew/3.14.rst:1401 msgid "hmac" msgstr "" -#: ../../../whatsnew/3.14.rst:1404 +#: ../../../whatsnew/3.14.rst:1403 msgid "" "Add a built-in implementation for HMAC (:rfc:`2104`) using formally verified " "code from the `HACL* `__ project. " @@ -1707,18 +1707,18 @@ msgid "" "HMAC is not available. (Contributed by Bénédikt Tran in :gh:`99108`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1412 +#: ../../../whatsnew/3.14.rst:1411 msgid "http" msgstr "" -#: ../../../whatsnew/3.14.rst:1414 +#: ../../../whatsnew/3.14.rst:1413 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:1418 +#: ../../../whatsnew/3.14.rst:1417 msgid "" "The :mod:`http.server` module now supports serving over HTTPS using the :" "class:`http.server.HTTPSServer` class. This functionality is exposed by the " @@ -1726,74 +1726,74 @@ msgid "" "options:" msgstr "" -#: ../../../whatsnew/3.14.rst:1423 +#: ../../../whatsnew/3.14.rst:1422 msgid "" ":option:`--tls-cert \\ `: Path to the TLS " "certificate file." msgstr "" -#: ../../../whatsnew/3.14.rst:1425 +#: ../../../whatsnew/3.14.rst:1424 msgid "" ":option:`--tls-key \\ `: Optional path to the " "private key file." msgstr "" -#: ../../../whatsnew/3.14.rst:1427 +#: ../../../whatsnew/3.14.rst:1426 msgid "" ":option:`--tls-password-file \\ `: " "Optional path to the password file for the private key." msgstr "" -#: ../../../whatsnew/3.14.rst:1430 +#: ../../../whatsnew/3.14.rst:1429 msgid "(Contributed by Semyon Moroz in :gh:`85162`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1434 +#: ../../../whatsnew/3.14.rst:1433 msgid "imaplib" msgstr "" -#: ../../../whatsnew/3.14.rst:1436 +#: ../../../whatsnew/3.14.rst:1435 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:1442 +#: ../../../whatsnew/3.14.rst:1441 msgid "inspect" msgstr "" -#: ../../../whatsnew/3.14.rst:1444 +#: ../../../whatsnew/3.14.rst:1443 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:1448 +#: ../../../whatsnew/3.14.rst:1447 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:1453 +#: ../../../whatsnew/3.14.rst:1452 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:1459 ../../../whatsnew/3.14.rst:2240 +#: ../../../whatsnew/3.14.rst:1458 ../../../whatsnew/3.14.rst:2239 msgid "io" msgstr "" -#: ../../../whatsnew/3.14.rst:1461 +#: ../../../whatsnew/3.14.rst:1460 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:1465 +#: ../../../whatsnew/3.14.rst:1464 msgid "" "Add the :class:`~io.Reader` and :class:`~io.Writer` protocols as simpler " "alternatives to the pseudo-protocols :class:`typing.IO`, :class:`typing." @@ -1801,17 +1801,17 @@ msgid "" "gh:`127648`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1472 +#: ../../../whatsnew/3.14.rst:1471 msgid "json" msgstr "" -#: ../../../whatsnew/3.14.rst:1474 +#: ../../../whatsnew/3.14.rst:1473 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:1478 +#: ../../../whatsnew/3.14.rst:1477 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 " @@ -1820,7 +1820,7 @@ msgid "" "Hunner in :gh:`122873`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1485 +#: ../../../whatsnew/3.14.rst:1484 msgid "" "By default, the output of the :ref:`JSON command-line interface ` is highlighted in color. This can be controlled by :ref:" @@ -1828,56 +1828,56 @@ msgid "" "Roun in :gh:`131952`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1493 +#: ../../../whatsnew/3.14.rst:1492 msgid "linecache" msgstr "" -#: ../../../whatsnew/3.14.rst:1495 +#: ../../../whatsnew/3.14.rst:1494 msgid "" ":func:`~linecache.getline` can now retrieve source code for frozen modules. " "(Contributed by Tian Gao in :gh:`131638`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1500 +#: ../../../whatsnew/3.14.rst:1499 msgid "logging.handlers" msgstr "" -#: ../../../whatsnew/3.14.rst:1502 +#: ../../../whatsnew/3.14.rst:1501 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:1506 +#: ../../../whatsnew/3.14.rst:1505 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:1512 +#: ../../../whatsnew/3.14.rst:1511 msgid "math" msgstr "" -#: ../../../whatsnew/3.14.rst:1514 +#: ../../../whatsnew/3.14.rst:1513 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:1519 +#: ../../../whatsnew/3.14.rst:1518 msgid "mimetypes" msgstr "" -#: ../../../whatsnew/3.14.rst:1521 +#: ../../../whatsnew/3.14.rst:1520 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:1525 +#: ../../../whatsnew/3.14.rst:1524 msgid "Add several new MIME types based on RFCs and common usage:" msgstr "" @@ -1885,23 +1885,23 @@ msgstr "" msgid "Microsoft and :rfc:`8081` MIME types for fonts" msgstr "" -#: ../../../whatsnew/3.14.rst:1529 +#: ../../../whatsnew/3.14.rst:1528 msgid "Embedded OpenType: ``application/vnd.ms-fontobject``" msgstr "" -#: ../../../whatsnew/3.14.rst:1530 +#: ../../../whatsnew/3.14.rst:1529 msgid "OpenType Layout (OTF) ``font/otf``" msgstr "" -#: ../../../whatsnew/3.14.rst:1531 +#: ../../../whatsnew/3.14.rst:1530 msgid "TrueType: ``font/ttf``" msgstr "" -#: ../../../whatsnew/3.14.rst:1532 +#: ../../../whatsnew/3.14.rst:1531 msgid "WOFF 1.0 ``font/woff``" msgstr "" -#: ../../../whatsnew/3.14.rst:1533 +#: ../../../whatsnew/3.14.rst:1532 msgid "WOFF 2.0 ``font/woff2``" msgstr "" @@ -1910,15 +1910,15 @@ msgid "" ":rfc:`9559` MIME types for Matroska audiovisual data container structures" msgstr "" -#: ../../../whatsnew/3.14.rst:1538 +#: ../../../whatsnew/3.14.rst:1537 msgid "audio with no video: ``audio/matroska`` (``.mka``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1539 +#: ../../../whatsnew/3.14.rst:1538 msgid "video: ``video/matroska`` (``.mkv``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1540 +#: ../../../whatsnew/3.14.rst:1539 msgid "stereoscopic video: ``video/matroska-3d`` (``.mk3d``)" msgstr "" @@ -1926,29 +1926,29 @@ msgstr "" msgid "Images with RFCs" msgstr "" -#: ../../../whatsnew/3.14.rst:1544 +#: ../../../whatsnew/3.14.rst:1543 msgid ":rfc:`1494`: CCITT Group 3 (``.g3``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1545 +#: ../../../whatsnew/3.14.rst:1544 msgid ":rfc:`3362`: Real-time Facsimile, T.38 (``.t38``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1546 +#: ../../../whatsnew/3.14.rst:1545 msgid "" ":rfc:`3745`: JPEG 2000 (``.jp2``), extension (``.jpx``) and compound (``." "jpm``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1547 +#: ../../../whatsnew/3.14.rst:1546 msgid ":rfc:`3950`: Tag Image File Format Fax eXtended, TIFF-FX (``.tfx``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1548 +#: ../../../whatsnew/3.14.rst:1547 msgid ":rfc:`4047`: Flexible Image Transport System (``.fits``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1549 +#: ../../../whatsnew/3.14.rst:1548 msgid "" ":rfc:`7903`: Enhanced Metafile (``.emf``) and Windows Metafile (``.wmf``)" msgstr "" @@ -1957,115 +1957,115 @@ msgstr "" msgid "Other MIME type additions and changes" msgstr "" -#: ../../../whatsnew/3.14.rst:1553 +#: ../../../whatsnew/3.14.rst:1552 msgid "" ":rfc:`2361`: Change type for ``.avi`` to ``video/vnd.avi`` and for ``.wav`` " "to ``audio/vnd.wave``" msgstr "" -#: ../../../whatsnew/3.14.rst:1555 +#: ../../../whatsnew/3.14.rst:1554 msgid ":rfc:`4337`: Add MPEG-4 ``audio/mp4`` (``.m4a``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1556 +#: ../../../whatsnew/3.14.rst:1555 msgid ":rfc:`5334`: Add Ogg media (``.oga``, ``.ogg`` and ``.ogx``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1557 +#: ../../../whatsnew/3.14.rst:1556 msgid ":rfc:`6713`: Add gzip ``application/gzip`` (``.gz``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1558 +#: ../../../whatsnew/3.14.rst:1557 msgid ":rfc:`9639`: Add FLAC ``audio/flac`` (``.flac``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1559 +#: ../../../whatsnew/3.14.rst:1558 msgid "" ":rfc:`9512` ``application/yaml`` MIME type for YAML files (``.yaml`` and ``." "yml``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1561 +#: ../../../whatsnew/3.14.rst:1560 msgid "Add 7z ``application/x-7z-compressed`` (``.7z``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1562 +#: ../../../whatsnew/3.14.rst:1561 msgid "" "Add Android Package ``application/vnd.android.package-archive`` (``.apk``) " "when not strict" msgstr "" -#: ../../../whatsnew/3.14.rst:1564 +#: ../../../whatsnew/3.14.rst:1563 msgid "Add deb ``application/x-debian-package`` (``.deb``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1565 +#: ../../../whatsnew/3.14.rst:1564 msgid "Add glTF binary ``model/gltf-binary`` (``.glb``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1566 +#: ../../../whatsnew/3.14.rst:1565 msgid "Add glTF JSON/ASCII ``model/gltf+json`` (``.gltf``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1567 +#: ../../../whatsnew/3.14.rst:1566 msgid "Add M4V ``video/x-m4v`` (``.m4v``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1568 +#: ../../../whatsnew/3.14.rst:1567 msgid "Add PHP ``application/x-httpd-php`` (``.php``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1569 +#: ../../../whatsnew/3.14.rst:1568 msgid "Add RAR ``application/vnd.rar`` (``.rar``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1570 +#: ../../../whatsnew/3.14.rst:1569 msgid "Add RPM ``application/x-rpm`` (``.rpm``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1571 +#: ../../../whatsnew/3.14.rst:1570 msgid "Add STL ``model/stl`` (``.stl``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1572 +#: ../../../whatsnew/3.14.rst:1571 msgid "Add Windows Media Video ``video/x-ms-wmv`` (``.wmv``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1573 +#: ../../../whatsnew/3.14.rst:1572 msgid "De facto: Add WebM ``audio/webm`` (``.weba``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1574 +#: ../../../whatsnew/3.14.rst:1573 msgid "" "`ECMA-376 `__: Add ``.docx``, ``.pptx`` and ``.xlsx`` types" msgstr "" -#: ../../../whatsnew/3.14.rst:1577 +#: ../../../whatsnew/3.14.rst:1576 msgid "" "`OASIS `__: Add OpenDocument ``.odg``, ``.odp``, ``.ods`` and " "``.odt`` types" msgstr "" -#: ../../../whatsnew/3.14.rst:1580 +#: ../../../whatsnew/3.14.rst:1579 msgid "" "`W3C `__: Add EPUB " "``application/epub+zip`` (``.epub``)" msgstr "" -#: ../../../whatsnew/3.14.rst:1583 +#: ../../../whatsnew/3.14.rst:1582 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:1589 +#: ../../../whatsnew/3.14.rst:1588 msgid "multiprocessing" msgstr "" -#: ../../../whatsnew/3.14.rst:1593 +#: ../../../whatsnew/3.14.rst:1592 msgid "" "On Unix platforms other than macOS, :ref:`'forkserver' ` is now the default :ref:`start method " @@ -2075,7 +2075,7 @@ msgid "" "method." msgstr "" -#: ../../../whatsnew/3.14.rst:1600 +#: ../../../whatsnew/3.14.rst:1599 msgid "" "If the threading incompatible *fork* method is required, you must explicitly " "request it via a context from :func:`~multiprocessing.get_context` " @@ -2083,7 +2083,7 @@ msgid "" "set_start_method`." msgstr "" -#: ../../../whatsnew/3.14.rst:1611 +#: ../../../whatsnew/3.14.rst:1610 msgid "" ":mod:`multiprocessing`'s ``'forkserver'`` start method now authenticates its " "control socket to avoid solely relying on filesystem permissions to restrict " @@ -2091,34 +2091,34 @@ msgid "" "code. (Contributed by Gregory P. Smith for :gh:`97514`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1617 +#: ../../../whatsnew/3.14.rst:1616 msgid "" "The :ref:`multiprocessing proxy objects ` for " "*list* and *dict* types gain previously overlooked missing methods:" msgstr "" -#: ../../../whatsnew/3.14.rst:1620 +#: ../../../whatsnew/3.14.rst:1619 msgid ":meth:`!clear` and :meth:`!copy` for proxies of :class:`list`" msgstr "" -#: ../../../whatsnew/3.14.rst:1621 +#: ../../../whatsnew/3.14.rst:1620 msgid "" ":meth:`~dict.fromkeys`, ``reversed(d)``, ``d | {}``, ``{} | d``, ``d |= " "{'b': 2}`` for proxies of :class:`dict`" msgstr "" -#: ../../../whatsnew/3.14.rst:1624 +#: ../../../whatsnew/3.14.rst:1623 msgid "(Contributed by Roy Hyunjin Han for :gh:`103134`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1626 +#: ../../../whatsnew/3.14.rst:1625 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:1631 +#: ../../../whatsnew/3.14.rst:1630 msgid "" "Add the :meth:`~multiprocessing.Process.interrupt` to :class:" "`multiprocessing.Process` objects, which terminates the child process by " @@ -2127,11 +2127,11 @@ msgid "" "Pulkin in :gh:`131913`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1639 +#: ../../../whatsnew/3.14.rst:1638 msgid "operator" msgstr "" -#: ../../../whatsnew/3.14.rst:1641 +#: ../../../whatsnew/3.14.rst:1640 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 " @@ -2139,11 +2139,11 @@ msgid "" "None``. (Contributed by Raymond Hettinger and Nico Mexis in :gh:`115808`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1649 +#: ../../../whatsnew/3.14.rst:1648 msgid "os" msgstr "" -#: ../../../whatsnew/3.14.rst:1651 +#: ../../../whatsnew/3.14.rst:1650 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." @@ -2151,24 +2151,24 @@ msgid "" "(Contributed by Victor Stinner in :gh:`120057`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1657 +#: ../../../whatsnew/3.14.rst:1656 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:1661 +#: ../../../whatsnew/3.14.rst:1660 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:1667 +#: ../../../whatsnew/3.14.rst:1666 msgid "os.path" msgstr "" -#: ../../../whatsnew/3.14.rst:1669 +#: ../../../whatsnew/3.14.rst:1668 msgid "" "The *strict* parameter to :func:`~os.path.realpath` accepts a new value, :" "data:`~os.path.ALLOW_MISSING`. If used, errors other than :exc:" @@ -2177,40 +2177,40 @@ msgid "" "`2025-4517`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1677 ../../../whatsnew/3.14.rst:2249 -#: ../../../whatsnew/3.14.rst:2510 +#: ../../../whatsnew/3.14.rst:1676 ../../../whatsnew/3.14.rst:2248 +#: ../../../whatsnew/3.14.rst:2509 msgid "pathlib" msgstr "" -#: ../../../whatsnew/3.14.rst:1679 +#: ../../../whatsnew/3.14.rst:1678 msgid "" "Add methods to :class:`pathlib.Path` to recursively copy or move files and " "directories:" msgstr "" -#: ../../../whatsnew/3.14.rst:1682 +#: ../../../whatsnew/3.14.rst:1681 msgid "" ":meth:`~pathlib.Path.copy` copies a file or directory tree to a destination." msgstr "" -#: ../../../whatsnew/3.14.rst:1683 +#: ../../../whatsnew/3.14.rst:1682 msgid ":meth:`~pathlib.Path.copy_into` copies *into* a destination directory." msgstr "" -#: ../../../whatsnew/3.14.rst:1684 +#: ../../../whatsnew/3.14.rst:1683 msgid "" ":meth:`~pathlib.Path.move` moves a file or directory tree to a destination." msgstr "" -#: ../../../whatsnew/3.14.rst:1685 +#: ../../../whatsnew/3.14.rst:1684 msgid ":meth:`~pathlib.Path.move_into` moves *into* a destination directory." msgstr "" -#: ../../../whatsnew/3.14.rst:1687 +#: ../../../whatsnew/3.14.rst:1686 msgid "(Contributed by Barney Gale in :gh:`73991`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1689 +#: ../../../whatsnew/3.14.rst:1688 msgid "" "Add the :attr:`~pathlib.Path.info` attribute, which stores an object " "implementing the new :class:`pathlib.types.PathInfo` protocol. The object " @@ -2220,17 +2220,17 @@ msgid "" "directory. (Contributed by Barney Gale in :gh:`125413`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1699 ../../../whatsnew/3.14.rst:2257 +#: ../../../whatsnew/3.14.rst:1698 ../../../whatsnew/3.14.rst:2256 msgid "pdb" msgstr "" -#: ../../../whatsnew/3.14.rst:1701 +#: ../../../whatsnew/3.14.rst:1700 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:1708 +#: ../../../whatsnew/3.14.rst:1707 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 " @@ -2239,18 +2239,18 @@ msgid "" "when the process receives a signal." msgstr "" -#: ../../../whatsnew/3.14.rst:1714 +#: ../../../whatsnew/3.14.rst:1713 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:1718 +#: ../../../whatsnew/3.14.rst:1717 msgid "(Contributed by Matt Wozniski and Pablo Galindo in :gh:`131591`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1720 +#: ../../../whatsnew/3.14.rst:1719 msgid "" "Hardcoded breakpoints (:func:`breakpoint` and :func:`~pdb.set_trace`) now " "reuse the most recent :class:`~pdb.Pdb` instance that calls :meth:`~pdb.Pdb." @@ -2260,14 +2260,14 @@ msgid "" "`121450`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1727 +#: ../../../whatsnew/3.14.rst:1726 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:1731 +#: ../../../whatsnew/3.14.rst:1730 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 " @@ -2275,41 +2275,41 @@ msgid "" "(Contributed by Tian Gao in :gh:`124704`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1736 +#: ../../../whatsnew/3.14.rst:1735 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:1741 +#: ../../../whatsnew/3.14.rst:1740 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:1745 +#: ../../../whatsnew/3.14.rst:1744 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:1750 +#: ../../../whatsnew/3.14.rst:1749 msgid "" "``$_asynctask`` is added to access the current asyncio task if applicable. " "(Contributed by Tian Gao in :gh:`124367`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1753 +#: ../../../whatsnew/3.14.rst:1752 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:1758 +#: ../../../whatsnew/3.14.rst:1757 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` " @@ -2317,49 +2317,49 @@ msgid "" "Pdb`. (Contributed by Tian Gao and Łukasz Langa in :gh:`133355`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1765 +#: ../../../whatsnew/3.14.rst:1764 msgid "pickle" msgstr "" -#: ../../../whatsnew/3.14.rst:1767 +#: ../../../whatsnew/3.14.rst:1766 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:1770 +#: ../../../whatsnew/3.14.rst:1769 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:1776 +#: ../../../whatsnew/3.14.rst:1775 msgid "platform" msgstr "" -#: ../../../whatsnew/3.14.rst:1778 +#: ../../../whatsnew/3.14.rst:1777 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:1784 +#: ../../../whatsnew/3.14.rst:1783 msgid "pydoc" msgstr "" -#: ../../../whatsnew/3.14.rst:1786 +#: ../../../whatsnew/3.14.rst:1785 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:1792 +#: ../../../whatsnew/3.14.rst:1791 msgid "re" msgstr "" -#: ../../../whatsnew/3.14.rst:1794 +#: ../../../whatsnew/3.14.rst:1793 msgid "" "Support ``\\z`` as a synonym for ``\\Z`` in :mod:`regular expressions `. " "It is interpreted unambiguously in many other regular expression engines, " @@ -2367,119 +2367,119 @@ msgid "" "Storchaka in :gh:`133306`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1799 +#: ../../../whatsnew/3.14.rst:1798 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:1805 +#: ../../../whatsnew/3.14.rst:1804 msgid "socket" msgstr "" -#: ../../../whatsnew/3.14.rst:1807 +#: ../../../whatsnew/3.14.rst:1806 msgid "Improve and fix support for Bluetooth sockets." msgstr "" -#: ../../../whatsnew/3.14.rst:1809 +#: ../../../whatsnew/3.14.rst:1808 msgid "" "Fix support of Bluetooth sockets on NetBSD and DragonFly BSD. (Contributed " "by Serhiy Storchaka in :gh:`132429`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1811 +#: ../../../whatsnew/3.14.rst:1810 msgid "" "Fix support for :const:`~socket.BTPROTO_HCI` on FreeBSD. (Contributed by " "Victor Stinner in :gh:`111178`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1813 +#: ../../../whatsnew/3.14.rst:1812 msgid "" "Add support for :const:`~socket.BTPROTO_SCO` on FreeBSD. (Contributed by " "Serhiy Storchaka in :gh:`85302`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1815 +#: ../../../whatsnew/3.14.rst:1814 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:1818 +#: ../../../whatsnew/3.14.rst:1817 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:1821 +#: ../../../whatsnew/3.14.rst:1820 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:1824 +#: ../../../whatsnew/3.14.rst:1823 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:1827 +#: ../../../whatsnew/3.14.rst:1826 msgid "" "Add many new constants. (Contributed by Serhiy Storchaka in :gh:`132734`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1832 +#: ../../../whatsnew/3.14.rst:1831 msgid "ssl" msgstr "" -#: ../../../whatsnew/3.14.rst:1834 +#: ../../../whatsnew/3.14.rst:1833 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:1840 +#: ../../../whatsnew/3.14.rst:1839 msgid "struct" msgstr "" -#: ../../../whatsnew/3.14.rst:1842 +#: ../../../whatsnew/3.14.rst:1841 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:1849 +#: ../../../whatsnew/3.14.rst:1848 msgid "symtable" msgstr "" -#: ../../../whatsnew/3.14.rst:1851 +#: ../../../whatsnew/3.14.rst:1850 msgid "Expose the following :class:`~symtable.Symbol` methods:" msgstr "" -#: ../../../whatsnew/3.14.rst:1853 +#: ../../../whatsnew/3.14.rst:1852 msgid ":meth:`~symtable.Symbol.is_comp_cell`" msgstr "" -#: ../../../whatsnew/3.14.rst:1854 +#: ../../../whatsnew/3.14.rst:1853 msgid ":meth:`~symtable.Symbol.is_comp_iter`" msgstr "" -#: ../../../whatsnew/3.14.rst:1855 +#: ../../../whatsnew/3.14.rst:1854 msgid ":meth:`~symtable.Symbol.is_free_class`" msgstr "" -#: ../../../whatsnew/3.14.rst:1857 +#: ../../../whatsnew/3.14.rst:1856 msgid "(Contributed by Bénédikt Tran in :gh:`120029`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1861 +#: ../../../whatsnew/3.14.rst:1860 msgid "sys" msgstr "" -#: ../../../whatsnew/3.14.rst:1863 +#: ../../../whatsnew/3.14.rst:1862 msgid "" "The previously undocumented special function :func:`sys.getobjects`, which " "only exists in specialized builds of Python, may now return objects from " @@ -2487,26 +2487,26 @@ msgid "" "in :gh:`125286`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1868 +#: ../../../whatsnew/3.14.rst:1867 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:1871 +#: ../../../whatsnew/3.14.rst:1870 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:1875 +#: ../../../whatsnew/3.14.rst:1874 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:1878 +#: ../../../whatsnew/3.14.rst:1877 msgid "" "Add :func:`sys.remote_exec` to implement the new external debugger " "interface. See :ref:`PEP 768 ` for details. " @@ -2514,52 +2514,52 @@ msgid "" "in :gh:`131591`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1883 +#: ../../../whatsnew/3.14.rst:1882 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:1889 +#: ../../../whatsnew/3.14.rst:1888 msgid "sys.monitoring" msgstr "" -#: ../../../whatsnew/3.14.rst:1891 +#: ../../../whatsnew/3.14.rst:1890 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:1898 +#: ../../../whatsnew/3.14.rst:1897 msgid "sysconfig" msgstr "" -#: ../../../whatsnew/3.14.rst:1900 +#: ../../../whatsnew/3.14.rst:1899 msgid "" "Add ``ABIFLAGS`` key to :func:`~sysconfig.get_config_vars` on Windows. " "(Contributed by Xuehai Pan in :gh:`131799`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1905 +#: ../../../whatsnew/3.14.rst:1904 msgid "tarfile" msgstr "" -#: ../../../whatsnew/3.14.rst:1907 +#: ../../../whatsnew/3.14.rst:1906 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:1911 +#: ../../../whatsnew/3.14.rst:1910 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:1915 +#: ../../../whatsnew/3.14.rst:1914 msgid "" ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` now " "(re-)apply the extraction filter when substituting a link (hard or symbolic) " @@ -2569,7 +2569,7 @@ msgid "" "cve:`2024-12718`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1922 +#: ../../../whatsnew/3.14.rst:1921 msgid "" ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` no " "longer extract rejected members when :func:`~tarfile.TarFile.errorlevel` is " @@ -2577,59 +2577,59 @@ msgid "" "cve:`2025-4435`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:1930 +#: ../../../whatsnew/3.14.rst:1929 msgid "threading" msgstr "" -#: ../../../whatsnew/3.14.rst:1932 +#: ../../../whatsnew/3.14.rst:1931 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:1938 +#: ../../../whatsnew/3.14.rst:1937 msgid "tkinter" msgstr "" -#: ../../../whatsnew/3.14.rst:1940 +#: ../../../whatsnew/3.14.rst:1939 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:1944 +#: ../../../whatsnew/3.14.rst:1943 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:1950 +#: ../../../whatsnew/3.14.rst:1949 msgid "turtle" msgstr "" -#: ../../../whatsnew/3.14.rst:1952 +#: ../../../whatsnew/3.14.rst:1951 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:1958 +#: ../../../whatsnew/3.14.rst:1957 msgid "types" msgstr "" -#: ../../../whatsnew/3.14.rst:1960 +#: ../../../whatsnew/3.14.rst:1959 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:1966 +#: ../../../whatsnew/3.14.rst:1965 msgid "typing" msgstr "" -#: ../../../whatsnew/3.14.rst:1970 +#: ../../../whatsnew/3.14.rst:1969 msgid "" "The :class:`types.UnionType` and :class:`typing.Union` types are now aliases " "for each other, meaning that both old-style unions (created with " @@ -2639,14 +2639,14 @@ msgid "" "users who introspect types at runtime:" msgstr "" -#: ../../../whatsnew/3.14.rst:1977 +#: ../../../whatsnew/3.14.rst:1976 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:1982 +#: ../../../whatsnew/3.14.rst:1981 msgid "" "Unions created using the old syntax are no longer cached. Previously, " "running ``Union[int, str]`` multiple times would return the same object " @@ -2663,7 +2663,7 @@ msgid "" "memory usage for most users." msgstr "" -#: ../../../whatsnew/3.14.rst:1998 +#: ../../../whatsnew/3.14.rst:1997 msgid "" "Previously, old-style unions were implemented using the private class " "``typing._UnionGenericAlias``. This class is no longer needed for the " @@ -2673,80 +2673,80 @@ msgid "" "of relying on private implementation details." msgstr "" -#: ../../../whatsnew/3.14.rst:2007 +#: ../../../whatsnew/3.14.rst:2006 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:2012 +#: ../../../whatsnew/3.14.rst:2011 msgid "" "The :attr:`!__args__` attribute of :class:`typing.Union` objects is no " "longer writable." msgstr "" -#: ../../../whatsnew/3.14.rst:2015 +#: ../../../whatsnew/3.14.rst:2014 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:2020 +#: ../../../whatsnew/3.14.rst:2019 msgid "(Contributed by Jelle Zijlstra in :gh:`105499`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2022 +#: ../../../whatsnew/3.14.rst:2021 msgid ":class:`~typing.TypeAliasType` now supports star unpacking." msgstr "" -#: ../../../whatsnew/3.14.rst:2026 +#: ../../../whatsnew/3.14.rst:2025 msgid "unicodedata" msgstr "" -#: ../../../whatsnew/3.14.rst:2028 +#: ../../../whatsnew/3.14.rst:2027 msgid "The Unicode database has been updated to Unicode 16.0.0." msgstr "" -#: ../../../whatsnew/3.14.rst:2032 +#: ../../../whatsnew/3.14.rst:2031 msgid "unittest" msgstr "" -#: ../../../whatsnew/3.14.rst:2036 +#: ../../../whatsnew/3.14.rst:2035 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:2041 +#: ../../../whatsnew/3.14.rst:2040 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:2045 +#: ../../../whatsnew/3.14.rst:2044 msgid "" "A number of new methods were added in the :class:`~unittest.TestCase` class " "that provide more specialized tests." msgstr "" -#: ../../../whatsnew/3.14.rst:2048 +#: ../../../whatsnew/3.14.rst:2047 msgid "" ":meth:`~unittest.TestCase.assertHasAttr` and :meth:`~unittest.TestCase." "assertNotHasAttr` check whether the object has a particular attribute." msgstr "" -#: ../../../whatsnew/3.14.rst:2051 +#: ../../../whatsnew/3.14.rst:2050 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:2054 +#: ../../../whatsnew/3.14.rst:2053 msgid "" ":meth:`~unittest.TestCase.assertStartsWith`, :meth:`~unittest.TestCase." "assertNotStartsWith`, :meth:`~unittest.TestCase.assertEndsWith` and :meth:" @@ -2754,129 +2754,129 @@ msgid "" "string starts or ends with particular strings." msgstr "" -#: ../../../whatsnew/3.14.rst:2060 +#: ../../../whatsnew/3.14.rst:2059 msgid "(Contributed by Serhiy Storchaka in :gh:`71339`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2064 ../../../whatsnew/3.14.rst:2556 +#: ../../../whatsnew/3.14.rst:2063 ../../../whatsnew/3.14.rst:2555 msgid "urllib" msgstr "" -#: ../../../whatsnew/3.14.rst:2066 +#: ../../../whatsnew/3.14.rst:2065 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:2070 +#: ../../../whatsnew/3.14.rst:2069 msgid "" "Improve ergonomics and standards compliance when parsing and emitting ``file:" "`` URLs." msgstr "" -#: ../../../whatsnew/3.14.rst:2073 +#: ../../../whatsnew/3.14.rst:2072 msgid "In :func:`~urllib.request.url2pathname`:" msgstr "" -#: ../../../whatsnew/3.14.rst:2075 +#: ../../../whatsnew/3.14.rst:2074 msgid "" "Accept a complete URL when the new *require_scheme* argument is set to true." msgstr "" -#: ../../../whatsnew/3.14.rst:2077 +#: ../../../whatsnew/3.14.rst:2076 msgid "Discard URL authority if it matches the local hostname." msgstr "" -#: ../../../whatsnew/3.14.rst:2078 +#: ../../../whatsnew/3.14.rst:2077 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:2080 +#: ../../../whatsnew/3.14.rst:2079 msgid "Discard URL query and fragment components." msgstr "" -#: ../../../whatsnew/3.14.rst:2081 +#: ../../../whatsnew/3.14.rst:2080 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:2084 +#: ../../../whatsnew/3.14.rst:2083 msgid "In :func:`~urllib.request.pathname2url`:" msgstr "" -#: ../../../whatsnew/3.14.rst:2086 +#: ../../../whatsnew/3.14.rst:2085 msgid "" "Return a complete URL when the new *add_scheme* argument is set to true." msgstr "" -#: ../../../whatsnew/3.14.rst:2087 +#: ../../../whatsnew/3.14.rst:2086 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:2090 +#: ../../../whatsnew/3.14.rst:2089 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:2094 +#: ../../../whatsnew/3.14.rst:2093 msgid "(Contributed by Barney Gale in :gh:`125866`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2098 ../../../whatsnew/3.14.rst:2278 +#: ../../../whatsnew/3.14.rst:2097 ../../../whatsnew/3.14.rst:2277 msgid "uuid" msgstr "" -#: ../../../whatsnew/3.14.rst:2100 +#: ../../../whatsnew/3.14.rst:2099 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:2105 +#: ../../../whatsnew/3.14.rst:2104 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:2109 +#: ../../../whatsnew/3.14.rst:2108 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:2115 +#: ../../../whatsnew/3.14.rst:2114 msgid "webbrowser" msgstr "" -#: ../../../whatsnew/3.14.rst:2117 +#: ../../../whatsnew/3.14.rst:2116 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:2121 +#: ../../../whatsnew/3.14.rst:2120 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:2126 +#: ../../../whatsnew/3.14.rst:2125 msgid "zipfile" msgstr "" -#: ../../../whatsnew/3.14.rst:2128 +#: ../../../whatsnew/3.14.rst:2127 msgid "" "Added :meth:`ZipInfo._for_archive `, a method " "to resolve suitable defaults for a :class:`~zipfile.ZipInfo` object as used " @@ -2884,18 +2884,18 @@ msgid "" "Bénédikt Tran in :gh:`123424`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2133 +#: ../../../whatsnew/3.14.rst:2132 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:2142 +#: ../../../whatsnew/3.14.rst:2141 msgid "Optimizations" msgstr "" -#: ../../../whatsnew/3.14.rst:2144 +#: ../../../whatsnew/3.14.rst:2143 msgid "" "The import time for several standard library modules has been improved, " "including :mod:`annotationlib`, :mod:`ast`, :mod:`asyncio`, :mod:`base64`, :" @@ -2906,13 +2906,13 @@ msgid "" "`zipfile`." msgstr "" -#: ../../../whatsnew/3.14.rst:2151 +#: ../../../whatsnew/3.14.rst:2150 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:2154 +#: ../../../whatsnew/3.14.rst:2153 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 " @@ -2920,7 +2920,7 @@ msgid "" "versions of Python. See :ref:`below ` for details." msgstr "" -#: ../../../whatsnew/3.14.rst:2164 +#: ../../../whatsnew/3.14.rst:2163 msgid "" "Standard benchmark results have improved by 10-20% following the " "implementation of a new per-thread doubly linked list for :class:`native " @@ -2930,7 +2930,7 @@ msgid "" "running in all threads. (Contributed by Kumar Aditya in :gh:`107803`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2173 +#: ../../../whatsnew/3.14.rst:2172 msgid "" "The module now has first class support for :term:`free-threading builds " "`. This enables parallel execution of multiple event loops " @@ -2938,52 +2938,52 @@ msgid "" "(Contributed by Kumar Aditya in :gh:`128002`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2181 +#: ../../../whatsnew/3.14.rst:2180 msgid "base64" msgstr "" -#: ../../../whatsnew/3.14.rst:2183 +#: ../../../whatsnew/3.14.rst:2182 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:2189 +#: ../../../whatsnew/3.14.rst:2188 msgid "bdb" msgstr "" -#: ../../../whatsnew/3.14.rst:2191 +#: ../../../whatsnew/3.14.rst:2190 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:2200 +#: ../../../whatsnew/3.14.rst:2199 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:2205 +#: ../../../whatsnew/3.14.rst:2204 msgid "gc" msgstr "" -#: ../../../whatsnew/3.14.rst:2207 +#: ../../../whatsnew/3.14.rst:2206 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:2211 +#: ../../../whatsnew/3.14.rst:2210 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:2215 +#: ../../../whatsnew/3.14.rst:2214 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 " @@ -2993,11 +2993,11 @@ msgid "" "zero." msgstr "" -#: ../../../whatsnew/3.14.rst:2223 +#: ../../../whatsnew/3.14.rst:2222 msgid ":meth:`~gc.set_threshold` now ignores any items after the second." msgstr "" -#: ../../../whatsnew/3.14.rst:2225 +#: ../../../whatsnew/3.14.rst:2224 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 " @@ -3005,28 +3005,28 @@ msgid "" "young generation and the aging and collecting spaces of the old generation." msgstr "" -#: ../../../whatsnew/3.14.rst:2232 +#: ../../../whatsnew/3.14.rst:2231 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:2242 +#: ../../../whatsnew/3.14.rst:2241 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:2251 +#: ../../../whatsnew/3.14.rst:2250 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:2259 +#: ../../../whatsnew/3.14.rst:2258 msgid "" ":mod:`pdb` now supports two backends, based on either :func:`sys.settrace` " "or :mod:`sys.monitoring`. Using the :ref:`pdb CLI ` or :func:" @@ -3036,11 +3036,11 @@ msgid "" "Tian Gao in :gh:`124533`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2269 +#: ../../../whatsnew/3.14.rst:2268 msgid "textwrap" msgstr "" -#: ../../../whatsnew/3.14.rst:2271 +#: ../../../whatsnew/3.14.rst:2270 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 " @@ -3048,24 +3048,24 @@ msgid "" "other than space and tab." msgstr "" -#: ../../../whatsnew/3.14.rst:2280 +#: ../../../whatsnew/3.14.rst:2279 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:2285 +#: ../../../whatsnew/3.14.rst:2284 msgid "" ":func:`~uuid.uuid4` is now c. 30% faster. (Contributed by Bénédikt Tran in :" "gh:`128150`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2290 +#: ../../../whatsnew/3.14.rst:2289 msgid "zlib" msgstr "" -#: ../../../whatsnew/3.14.rst:2292 +#: ../../../whatsnew/3.14.rst:2291 msgid "" "On Windows, `zlib-ng `__ is now used as " "the implementation of the :mod:`zlib` module in the default binaries. There " @@ -3074,29 +3074,29 @@ msgid "" "compression levels." msgstr "" -#: ../../../whatsnew/3.14.rst:2299 +#: ../../../whatsnew/3.14.rst:2298 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:2303 +#: ../../../whatsnew/3.14.rst:2302 msgid "(Contributed by Steve Dower in :gh:`91349`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2307 +#: ../../../whatsnew/3.14.rst:2306 msgid "Removed" msgstr "" -#: ../../../whatsnew/3.14.rst:2312 +#: ../../../whatsnew/3.14.rst:2311 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:2317 +#: ../../../whatsnew/3.14.rst:2316 msgid "" "Calling :meth:`~argparse.ArgumentParser.add_argument_group` on an argument " "group now raises a :exc:`ValueError`. Similarly, :meth:`~argparse." @@ -3108,34 +3108,34 @@ msgid "" "Savannah Ostrowski in :gh:`127186`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2331 +#: ../../../whatsnew/3.14.rst:2330 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:2335 +#: ../../../whatsnew/3.14.rst:2334 msgid ":class:`!Bytes`" msgstr "" -#: ../../../whatsnew/3.14.rst:2336 +#: ../../../whatsnew/3.14.rst:2335 msgid ":class:`!Ellipsis`" msgstr "" -#: ../../../whatsnew/3.14.rst:2337 +#: ../../../whatsnew/3.14.rst:2336 msgid ":class:`!NameConstant`" msgstr "" -#: ../../../whatsnew/3.14.rst:2338 +#: ../../../whatsnew/3.14.rst:2337 msgid ":class:`!Num`" msgstr "" -#: ../../../whatsnew/3.14.rst:2339 +#: ../../../whatsnew/3.14.rst:2338 msgid ":class:`!Str`" msgstr "" -#: ../../../whatsnew/3.14.rst:2341 +#: ../../../whatsnew/3.14.rst:2340 msgid "" "As a consequence of these removals, user-defined ``visit_Num``, " "``visit_Str``, ``visit_Bytes``, ``visit_NameConstant`` and " @@ -3144,181 +3144,181 @@ msgid "" "an AST. Define a ``visit_Constant`` method instead." msgstr "" -#: ../../../whatsnew/3.14.rst:2347 +#: ../../../whatsnew/3.14.rst:2346 msgid "(Contributed by Alex Waygood in :gh:`119562`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2349 +#: ../../../whatsnew/3.14.rst:2348 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:2352 +#: ../../../whatsnew/3.14.rst:2351 msgid ":attr:`!Constant.n`" msgstr "" -#: ../../../whatsnew/3.14.rst:2353 +#: ../../../whatsnew/3.14.rst:2352 msgid ":attr:`!Constant.s`" msgstr "" -#: ../../../whatsnew/3.14.rst:2355 +#: ../../../whatsnew/3.14.rst:2354 msgid "" "Use :attr:`!Constant.value` instead. (Contributed by Alex Waygood in :gh:" "`119562`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2362 +#: ../../../whatsnew/3.14.rst:2361 msgid "" "Remove the following classes, methods, and functions, which have been " "deprecated since Python 3.12:" msgstr "" -#: ../../../whatsnew/3.14.rst:2365 +#: ../../../whatsnew/3.14.rst:2364 msgid ":class:`!AbstractChildWatcher`" msgstr "" -#: ../../../whatsnew/3.14.rst:2366 +#: ../../../whatsnew/3.14.rst:2365 msgid ":class:`!FastChildWatcher`" msgstr "" -#: ../../../whatsnew/3.14.rst:2367 +#: ../../../whatsnew/3.14.rst:2366 msgid ":class:`!MultiLoopChildWatcher`" msgstr "" -#: ../../../whatsnew/3.14.rst:2368 +#: ../../../whatsnew/3.14.rst:2367 msgid ":class:`!PidfdChildWatcher`" msgstr "" -#: ../../../whatsnew/3.14.rst:2369 +#: ../../../whatsnew/3.14.rst:2368 msgid ":class:`!SafeChildWatcher`" msgstr "" -#: ../../../whatsnew/3.14.rst:2370 +#: ../../../whatsnew/3.14.rst:2369 msgid ":class:`!ThreadedChildWatcher`" msgstr "" -#: ../../../whatsnew/3.14.rst:2371 +#: ../../../whatsnew/3.14.rst:2370 msgid ":meth:`!AbstractEventLoopPolicy.get_child_watcher`" msgstr "" -#: ../../../whatsnew/3.14.rst:2372 +#: ../../../whatsnew/3.14.rst:2371 msgid ":meth:`!AbstractEventLoopPolicy.set_child_watcher`" msgstr "" -#: ../../../whatsnew/3.14.rst:2373 +#: ../../../whatsnew/3.14.rst:2372 msgid ":func:`!get_child_watcher`" msgstr "" -#: ../../../whatsnew/3.14.rst:2374 +#: ../../../whatsnew/3.14.rst:2373 msgid ":func:`!set_child_watcher`" msgstr "" -#: ../../../whatsnew/3.14.rst:2376 +#: ../../../whatsnew/3.14.rst:2375 msgid "(Contributed by Kumar Aditya in :gh:`120804`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2378 +#: ../../../whatsnew/3.14.rst:2377 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:2382 +#: ../../../whatsnew/3.14.rst:2381 msgid "(Contributed by Kumar Aditya in :gh:`126353`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2387 +#: ../../../whatsnew/3.14.rst:2386 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:2390 +#: ../../../whatsnew/3.14.rst:2389 msgid "If you're running an async function, simply use :func:`asyncio.run`." msgstr "" -#: ../../../whatsnew/3.14.rst:2392 ../../../whatsnew/3.14.rst:2419 -#: ../../../whatsnew/3.14.rst:2447 +#: ../../../whatsnew/3.14.rst:2391 ../../../whatsnew/3.14.rst:2418 +#: ../../../whatsnew/3.14.rst:2446 msgid "Before:" msgstr "" -#: ../../../whatsnew/3.14.rst:2406 ../../../whatsnew/3.14.rst:2432 -#: ../../../whatsnew/3.14.rst:2463 +#: ../../../whatsnew/3.14.rst:2405 ../../../whatsnew/3.14.rst:2431 +#: ../../../whatsnew/3.14.rst:2462 msgid "After:" msgstr "" -#: ../../../whatsnew/3.14.rst:2415 +#: ../../../whatsnew/3.14.rst:2414 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:2444 +#: ../../../whatsnew/3.14.rst:2443 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:2478 +#: ../../../whatsnew/3.14.rst:2477 msgid "email" msgstr "" -#: ../../../whatsnew/3.14.rst:2480 +#: ../../../whatsnew/3.14.rst:2479 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:2486 +#: ../../../whatsnew/3.14.rst:2485 msgid "importlib.abc" msgstr "" -#: ../../../whatsnew/3.14.rst:2488 +#: ../../../whatsnew/3.14.rst:2487 msgid "Remove deprecated :mod:`importlib.abc` classes:" msgstr "" -#: ../../../whatsnew/3.14.rst:2490 +#: ../../../whatsnew/3.14.rst:2489 msgid "" ":class:`!ResourceReader` (use :class:`~importlib.resources.abc." "TraversableResources`)" msgstr "" -#: ../../../whatsnew/3.14.rst:2492 +#: ../../../whatsnew/3.14.rst:2491 msgid "" ":class:`!Traversable` (use :class:`~importlib.resources.abc.Traversable`)" msgstr "" -#: ../../../whatsnew/3.14.rst:2494 +#: ../../../whatsnew/3.14.rst:2493 msgid "" ":class:`!TraversableResources` (use :class:`~importlib.resources.abc." "TraversableResources`)" msgstr "" -#: ../../../whatsnew/3.14.rst:2497 +#: ../../../whatsnew/3.14.rst:2496 msgid "(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2501 +#: ../../../whatsnew/3.14.rst:2500 msgid "itertools" msgstr "" -#: ../../../whatsnew/3.14.rst:2503 +#: ../../../whatsnew/3.14.rst:2502 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:2512 +#: ../../../whatsnew/3.14.rst:2511 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:2517 +#: ../../../whatsnew/3.14.rst:2516 msgid "" "Remove support for passing additional positional arguments to :meth:`." "PurePath.relative_to` and :meth:`~pathlib.PurePath.is_relative_to`. In " @@ -3326,33 +3326,33 @@ msgid "" "by Barney Gale in :gh:`78707`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2524 +#: ../../../whatsnew/3.14.rst:2523 msgid "pkgutil" msgstr "" -#: ../../../whatsnew/3.14.rst:2526 +#: ../../../whatsnew/3.14.rst:2525 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:2532 +#: ../../../whatsnew/3.14.rst:2531 msgid "pty" msgstr "" -#: ../../../whatsnew/3.14.rst:2534 +#: ../../../whatsnew/3.14.rst:2533 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:2541 +#: ../../../whatsnew/3.14.rst:2540 msgid "sqlite3" msgstr "" -#: ../../../whatsnew/3.14.rst:2543 +#: ../../../whatsnew/3.14.rst:2542 msgid "" "Remove :data:`!version` and :data:`!version_info` from the :mod:`sqlite3` " "module; use :data:`~sqlite3.sqlite_version` and :data:`~sqlite3." @@ -3360,27 +3360,27 @@ msgid "" "library. (Contributed by Hugo van Kemenade in :gh:`118924`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2549 +#: ../../../whatsnew/3.14.rst:2548 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:2558 +#: ../../../whatsnew/3.14.rst:2557 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:2562 +#: ../../../whatsnew/3.14.rst:2561 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:2566 +#: ../../../whatsnew/3.14.rst:2565 msgid "" "``myopener.open()`` can be replaced with :func:`~urllib.request.urlopen`. " "``myopener.retrieve()`` can be replaced with :func:`~urllib.request." @@ -3389,15 +3389,15 @@ msgid "" "(Contributed by Barney Gale in :gh:`84850`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2575 +#: ../../../whatsnew/3.14.rst:2574 msgid "Deprecated" msgstr "" -#: ../../../whatsnew/3.14.rst:2578 +#: ../../../whatsnew/3.14.rst:2577 msgid "New deprecations" msgstr "" -#: ../../../whatsnew/3.14.rst:2580 +#: ../../../whatsnew/3.14.rst:2579 msgid "" "Passing a complex number as the *real* or *imag* argument in the :func:" "`complex` constructor is now deprecated; complex numbers should only be " @@ -3405,102 +3405,102 @@ msgid "" "gh:`109218`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2585 +#: ../../../whatsnew/3.14.rst:2584 #: ../../../deprecations/pending-removal-in-future.rst:7 msgid ":mod:`argparse`:" msgstr "" -#: ../../../whatsnew/3.14.rst:2587 +#: ../../../whatsnew/3.14.rst:2586 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:2591 +#: ../../../whatsnew/3.14.rst:2590 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:2596 +#: ../../../whatsnew/3.14.rst:2595 #: ../../../deprecations/pending-removal-in-3.16.rst:19 msgid ":mod:`asyncio`:" msgstr "" -#: ../../../whatsnew/3.14.rst:2598 +#: ../../../whatsnew/3.14.rst:2597 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:2603 +#: ../../../whatsnew/3.14.rst:2602 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:2607 +#: ../../../whatsnew/3.14.rst:2606 #: ../../../deprecations/pending-removal-in-3.16.rst:29 msgid ":class:`asyncio.AbstractEventLoopPolicy`" msgstr "" -#: ../../../whatsnew/3.14.rst:2608 +#: ../../../whatsnew/3.14.rst:2607 #: ../../../deprecations/pending-removal-in-3.16.rst:30 msgid ":class:`asyncio.DefaultEventLoopPolicy`" msgstr "" -#: ../../../whatsnew/3.14.rst:2609 +#: ../../../whatsnew/3.14.rst:2608 #: ../../../deprecations/pending-removal-in-3.16.rst:31 msgid ":class:`asyncio.WindowsSelectorEventLoopPolicy`" msgstr "" -#: ../../../whatsnew/3.14.rst:2610 +#: ../../../whatsnew/3.14.rst:2609 #: ../../../deprecations/pending-removal-in-3.16.rst:32 msgid ":class:`asyncio.WindowsProactorEventLoopPolicy`" msgstr "" -#: ../../../whatsnew/3.14.rst:2611 +#: ../../../whatsnew/3.14.rst:2610 #: ../../../deprecations/pending-removal-in-3.16.rst:33 msgid ":func:`asyncio.get_event_loop_policy`" msgstr "" -#: ../../../whatsnew/3.14.rst:2612 +#: ../../../whatsnew/3.14.rst:2611 #: ../../../deprecations/pending-removal-in-3.16.rst:34 msgid ":func:`asyncio.set_event_loop_policy`" msgstr "" -#: ../../../whatsnew/3.14.rst:2614 +#: ../../../whatsnew/3.14.rst:2613 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:2617 +#: ../../../whatsnew/3.14.rst:2616 msgid "For example, to use :class:`asyncio.SelectorEventLoop` on Windows:" msgstr "" -#: ../../../whatsnew/3.14.rst:2628 +#: ../../../whatsnew/3.14.rst:2627 #: ../../../deprecations/pending-removal-in-3.16.rst:48 msgid "(Contributed by Kumar Aditya in :gh:`127949`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2630 +#: ../../../whatsnew/3.14.rst:2629 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:2636 +#: ../../../whatsnew/3.14.rst:2635 #: ../../../deprecations/pending-removal-in-3.15.rst:16 #: ../../../deprecations/pending-removal-in-3.19.rst:4 msgid ":mod:`ctypes`:" msgstr "" -#: ../../../whatsnew/3.14.rst:2638 +#: ../../../whatsnew/3.14.rst:2637 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:" @@ -3508,7 +3508,7 @@ msgid "" "(Contributed by Petr Viktorin in :gh:`131747`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2643 +#: ../../../whatsnew/3.14.rst:2642 msgid "" "Calling :func:`ctypes.POINTER` on a string is now deprecated. Use :ref:" "`incomplete types ` for self-referential " @@ -3517,7 +3517,7 @@ msgid "" "by Sergey Myrianov in :gh:`100926`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2650 +#: ../../../whatsnew/3.14.rst:2649 msgid "" ":mod:`functools`: Calling the Python implementation of :func:`functools." "reduce` with *function* or *sequence* as keyword arguments is now " @@ -3525,7 +3525,7 @@ msgid "" "(Contributed by Kirill Podoprigora in :gh:`121676`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2656 +#: ../../../whatsnew/3.14.rst:2655 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 " @@ -3533,7 +3533,7 @@ msgid "" "`115032`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2662 +#: ../../../whatsnew/3.14.rst:2661 msgid "" ":mod:`mimetypes`: Valid extensions are either empty or must start with '.' " "for :meth:`mimetypes.MimeTypes.add_type`. Undotted extensions are deprecated " @@ -3541,14 +3541,14 @@ msgid "" "Kemenade in :gh:`75223`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2669 +#: ../../../whatsnew/3.14.rst:2668 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:2674 +#: ../../../whatsnew/3.14.rst:2673 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 " @@ -3556,14 +3556,14 @@ msgid "" "Victor Stinner in :gh:`120743`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2681 +#: ../../../whatsnew/3.14.rst:2680 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:2687 +#: ../../../whatsnew/3.14.rst:2686 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 " @@ -3574,14 +3574,14 @@ msgid "" "(Contributed by Tian Gao in :gh:`124369` and :gh:`125951`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2696 +#: ../../../whatsnew/3.14.rst:2695 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:2701 +#: ../../../whatsnew/3.14.rst:2700 msgid "" ":mod:`tkinter`: The :class:`!tkinter.Variable` methods :meth:`!" "trace_variable`, :meth:`!trace_vdelete` and :meth:`!trace_vinfo` are now " @@ -3589,7 +3589,7 @@ msgid "" "trace_info` instead. (Contributed by Serhiy Storchaka in :gh:`120220`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2707 +#: ../../../whatsnew/3.14.rst:2706 msgid "" ":mod:`urllib.parse`: Accepting objects with false values (like ``0`` and " "``[]``) except empty strings, bytes-like objects and ``None`` in :func:" @@ -3985,10 +3985,16 @@ 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:6 +#: ../../../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 " @@ -4040,108 +4046,121 @@ 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:8 +#: ../../../deprecations/pending-removal-in-3.20.rst:15 msgid ":mod:`argparse`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:9 +#: ../../../deprecations/pending-removal-in-3.20.rst:16 msgid ":mod:`csv`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:10 +#: ../../../deprecations/pending-removal-in-3.20.rst:17 msgid ":mod:`ctypes`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:11 +#: ../../../deprecations/pending-removal-in-3.20.rst:18 msgid ":mod:`!ctypes.macholib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:12 +#: ../../../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:13 +#: ../../../deprecations/pending-removal-in-3.20.rst:20 msgid ":mod:`http.server`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:14 +#: ../../../deprecations/pending-removal-in-3.20.rst:21 msgid ":mod:`imaplib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:15 +#: ../../../deprecations/pending-removal-in-3.20.rst:22 msgid ":mod:`ipaddress`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:16 +#: ../../../deprecations/pending-removal-in-3.20.rst:23 msgid ":mod:`json`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:17 +#: ../../../deprecations/pending-removal-in-3.20.rst:24 msgid ":mod:`logging` (``__date__`` also deprecated)" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:18 +#: ../../../deprecations/pending-removal-in-3.20.rst:25 msgid ":mod:`optparse`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:19 +#: ../../../deprecations/pending-removal-in-3.20.rst:26 msgid ":mod:`pickle`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:20 +#: ../../../deprecations/pending-removal-in-3.20.rst:27 msgid ":mod:`platform`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:21 +#: ../../../deprecations/pending-removal-in-3.20.rst:28 msgid ":mod:`re`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:22 +#: ../../../deprecations/pending-removal-in-3.20.rst:29 msgid ":mod:`socketserver`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:23 +#: ../../../deprecations/pending-removal-in-3.20.rst:30 msgid ":mod:`tabnanny`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:24 +#: ../../../deprecations/pending-removal-in-3.20.rst:31 msgid ":mod:`tarfile`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:25 +#: ../../../deprecations/pending-removal-in-3.20.rst:32 msgid ":mod:`tkinter.font`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:26 +#: ../../../deprecations/pending-removal-in-3.20.rst:33 msgid ":mod:`tkinter.ttk`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:27 +#: ../../../deprecations/pending-removal-in-3.20.rst:34 msgid ":mod:`wsgiref.simple_server`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:28 +#: ../../../deprecations/pending-removal-in-3.20.rst:35 msgid ":mod:`xml.etree.ElementTree`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:29 +#: ../../../deprecations/pending-removal-in-3.20.rst:36 msgid ":mod:`!xml.sax.expatreader`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:30 +#: ../../../deprecations/pending-removal-in-3.20.rst:37 msgid ":mod:`xml.sax.handler`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:31 +#: ../../../deprecations/pending-removal-in-3.20.rst:38 msgid ":mod:`zlib`" msgstr "" -#: ../../../deprecations/pending-removal-in-3.20.rst:33 +#: ../../../deprecations/pending-removal-in-3.20.rst:40 msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" msgstr "" @@ -4500,18 +4519,18 @@ msgid "" "_clear_internal_caches` instead." msgstr "" -#: ../../../whatsnew/3.14.rst:2731 +#: ../../../whatsnew/3.14.rst:2730 msgid "CPython bytecode changes" msgstr "" -#: ../../../whatsnew/3.14.rst:2733 +#: ../../../whatsnew/3.14.rst:2732 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:2737 +#: ../../../whatsnew/3.14.rst:2736 msgid "" "Add the :opcode:`BUILD_INTERPOLATION` and :opcode:`BUILD_TEMPLATE` opcodes " "to construct new :class:`~string.templatelib.Interpolation` and :class:" @@ -4520,20 +4539,20 @@ msgid "" "Template strings `)." msgstr "" -#: ../../../whatsnew/3.14.rst:2743 +#: ../../../whatsnew/3.14.rst:2742 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:2747 +#: ../../../whatsnew/3.14.rst:2746 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:2751 +#: ../../../whatsnew/3.14.rst:2750 msgid "" "Add the :opcode:`LOAD_FAST_BORROW` and :opcode:" "`LOAD_FAST_BORROW_LOAD_FAST_BORROW` opcodes to reduce reference counting " @@ -4542,14 +4561,14 @@ msgid "" "gh:`130704`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2756 +#: ../../../whatsnew/3.14.rst:2755 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:2761 +#: ../../../whatsnew/3.14.rst:2760 msgid "" "Add the new :opcode:`LOAD_SPECIAL` instruction. Generate code for :keyword:" "`with` and :keyword:`async with` statements using the new instruction. " @@ -4557,17 +4576,17 @@ msgid "" "instructions. (Contributed by Mark Shannon in :gh:`120507`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2767 +#: ../../../whatsnew/3.14.rst:2766 msgid "" "Add the :opcode:`POP_ITER` opcode to support 'virtual' iterators. " "(Contributed by Mark Shannon in :gh:`132554`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2772 +#: ../../../whatsnew/3.14.rst:2771 msgid "Pseudo-instructions" msgstr "" -#: ../../../whatsnew/3.14.rst:2774 +#: ../../../whatsnew/3.14.rst:2773 msgid "" "Add the :opcode:`!ANNOTATIONS_PLACEHOLDER` pseudo instruction to support " "partially executed module-level annotations with :ref:`deferred evaluation " @@ -4575,14 +4594,14 @@ msgid "" "Zijlstra in :gh:`130907`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2779 +#: ../../../whatsnew/3.14.rst:2778 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:2784 +#: ../../../whatsnew/3.14.rst:2783 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 " @@ -4590,7 +4609,7 @@ msgid "" "(Contributed by Mark Shannon in :gh:`118093`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2790 +#: ../../../whatsnew/3.14.rst:2789 msgid "" "Add the :opcode:`JUMP_IF_TRUE` and :opcode:`JUMP_IF_FALSE` pseudo " "instructions, conditional jumps which do not impact the stack. Replaced by " @@ -4598,55 +4617,55 @@ msgid "" "(Contributed by Irit Katriel in :gh:`124285`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2795 +#: ../../../whatsnew/3.14.rst:2794 msgid "" "Add the :opcode:`!LOAD_CONST_MORTAL` pseudo instruction. (Contributed by " "Mark Shannon in :gh:`128685`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2798 +#: ../../../whatsnew/3.14.rst:2797 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:2803 +#: ../../../whatsnew/3.14.rst:2802 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:2809 +#: ../../../whatsnew/3.14.rst:2808 msgid "C API changes" msgstr "" -#: ../../../whatsnew/3.14.rst:2814 +#: ../../../whatsnew/3.14.rst:2813 msgid "Python configuration C API" msgstr "" -#: ../../../whatsnew/3.14.rst:2816 +#: ../../../whatsnew/3.14.rst:2815 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:2820 +#: ../../../whatsnew/3.14.rst:2819 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:2824 +#: ../../../whatsnew/3.14.rst:2823 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:2827 +#: ../../../whatsnew/3.14.rst:2826 msgid "" ":pep:`587` 'Python Initialization Configuration' unified all the ways to " "configure Python's initialization. This PEP also unifies the configuration " @@ -4655,7 +4674,7 @@ msgid "" "two 'Python' and 'Isolated' choices (PEP 587), to further simplify the API." msgstr "" -#: ../../../whatsnew/3.14.rst:2834 +#: ../../../whatsnew/3.14.rst:2833 msgid "" "The lower level PEP 587 PyConfig API remains available for use cases with an " "intentionally higher level of coupling to CPython implementation details " @@ -4663,20 +4682,20 @@ msgid "" "configuration mechanisms)." msgstr "" -#: ../../../whatsnew/3.14.rst:2839 ../../../whatsnew/3.14.rst:2866 -#: ../../../whatsnew/3.14.rst:2886 +#: ../../../whatsnew/3.14.rst:2838 ../../../whatsnew/3.14.rst:2865 +#: ../../../whatsnew/3.14.rst:2885 msgid "(Contributed by Victor Stinner in :gh:`107954`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2841 +#: ../../../whatsnew/3.14.rst:2840 msgid ":pep:`741` and :pep:`587`" msgstr "" -#: ../../../whatsnew/3.14.rst:2845 +#: ../../../whatsnew/3.14.rst:2844 msgid "New features in the C API" msgstr "" -#: ../../../whatsnew/3.14.rst:2847 +#: ../../../whatsnew/3.14.rst:2846 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 " @@ -4684,99 +4703,99 @@ msgid "" "(Contributed by Petr Viktorin in :gh:`128629`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2853 +#: ../../../whatsnew/3.14.rst:2852 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:2857 +#: ../../../whatsnew/3.14.rst:2856 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:2861 +#: ../../../whatsnew/3.14.rst:2860 msgid ":c:func:`PyConfig_Get`" msgstr "" -#: ../../../whatsnew/3.14.rst:2862 +#: ../../../whatsnew/3.14.rst:2861 msgid ":c:func:`PyConfig_GetInt`" msgstr "" -#: ../../../whatsnew/3.14.rst:2863 +#: ../../../whatsnew/3.14.rst:2862 msgid ":c:func:`PyConfig_Set`" msgstr "" -#: ../../../whatsnew/3.14.rst:2864 +#: ../../../whatsnew/3.14.rst:2863 msgid ":c:func:`PyConfig_Names`" msgstr "" -#: ../../../whatsnew/3.14.rst:2868 +#: ../../../whatsnew/3.14.rst:2867 msgid "" "Add functions to configure Python initialization (:ref:`PEP 741: Python " "configuration C API `):" msgstr "" -#: ../../../whatsnew/3.14.rst:2871 +#: ../../../whatsnew/3.14.rst:2870 msgid ":c:func:`Py_InitializeFromInitConfig`" msgstr "" -#: ../../../whatsnew/3.14.rst:2872 +#: ../../../whatsnew/3.14.rst:2871 msgid ":c:func:`PyInitConfig_AddModule`" msgstr "" -#: ../../../whatsnew/3.14.rst:2873 +#: ../../../whatsnew/3.14.rst:2872 msgid ":c:func:`PyInitConfig_Create`" msgstr "" -#: ../../../whatsnew/3.14.rst:2874 +#: ../../../whatsnew/3.14.rst:2873 msgid ":c:func:`PyInitConfig_Free`" msgstr "" -#: ../../../whatsnew/3.14.rst:2875 +#: ../../../whatsnew/3.14.rst:2874 msgid ":c:func:`PyInitConfig_FreeStrList`" msgstr "" -#: ../../../whatsnew/3.14.rst:2876 +#: ../../../whatsnew/3.14.rst:2875 msgid ":c:func:`PyInitConfig_GetError`" msgstr "" -#: ../../../whatsnew/3.14.rst:2877 +#: ../../../whatsnew/3.14.rst:2876 msgid ":c:func:`PyInitConfig_GetExitCode`" msgstr "" -#: ../../../whatsnew/3.14.rst:2878 +#: ../../../whatsnew/3.14.rst:2877 msgid ":c:func:`PyInitConfig_GetInt`" msgstr "" -#: ../../../whatsnew/3.14.rst:2879 +#: ../../../whatsnew/3.14.rst:2878 msgid ":c:func:`PyInitConfig_GetStr`" msgstr "" -#: ../../../whatsnew/3.14.rst:2880 +#: ../../../whatsnew/3.14.rst:2879 msgid ":c:func:`PyInitConfig_GetStrList`" msgstr "" -#: ../../../whatsnew/3.14.rst:2881 +#: ../../../whatsnew/3.14.rst:2880 msgid ":c:func:`PyInitConfig_HasOption`" msgstr "" -#: ../../../whatsnew/3.14.rst:2882 +#: ../../../whatsnew/3.14.rst:2881 msgid ":c:func:`PyInitConfig_SetInt`" msgstr "" -#: ../../../whatsnew/3.14.rst:2883 +#: ../../../whatsnew/3.14.rst:2882 msgid ":c:func:`PyInitConfig_SetStr`" msgstr "" -#: ../../../whatsnew/3.14.rst:2884 +#: ../../../whatsnew/3.14.rst:2883 msgid ":c:func:`PyInitConfig_SetStrList`" msgstr "" -#: ../../../whatsnew/3.14.rst:2888 +#: ../../../whatsnew/3.14.rst:2887 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 " @@ -4785,13 +4804,13 @@ msgid "" "(Contributed by Victor Stinner in :gh:`127350`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2896 +#: ../../../whatsnew/3.14.rst:2895 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:2899 +#: ../../../whatsnew/3.14.rst:2898 msgid "" "Add :c:func:`PyImport_ImportModuleAttr` and :c:func:" "`PyImport_ImportModuleAttrString` helper functions to import a module and " @@ -4799,20 +4818,20 @@ msgid "" "`128911`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2904 +#: ../../../whatsnew/3.14.rst:2903 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:2908 +#: ../../../whatsnew/3.14.rst:2907 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:2911 +#: ../../../whatsnew/3.14.rst:2910 msgid "" "Add :c:func:`PyLong_IsPositive`, :c:func:`PyLong_IsNegative` and :c:func:" "`PyLong_IsZero` for checking if :c:type:`PyLongObject` is positive, " @@ -4820,82 +4839,82 @@ msgid "" "Kirpichev in :gh:`126061`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2916 +#: ../../../whatsnew/3.14.rst:2915 msgid "" "Add new functions to convert C ```` numbers to/from Python :class:" "`int` objects:" msgstr "" -#: ../../../whatsnew/3.14.rst:2919 +#: ../../../whatsnew/3.14.rst:2918 msgid ":c:func:`PyLong_AsInt32`" msgstr "" -#: ../../../whatsnew/3.14.rst:2920 +#: ../../../whatsnew/3.14.rst:2919 msgid ":c:func:`PyLong_AsInt64`" msgstr "" -#: ../../../whatsnew/3.14.rst:2921 +#: ../../../whatsnew/3.14.rst:2920 msgid ":c:func:`PyLong_AsUInt32`" msgstr "" -#: ../../../whatsnew/3.14.rst:2922 +#: ../../../whatsnew/3.14.rst:2921 msgid ":c:func:`PyLong_AsUInt64`" msgstr "" -#: ../../../whatsnew/3.14.rst:2923 +#: ../../../whatsnew/3.14.rst:2922 msgid ":c:func:`PyLong_FromInt32`" msgstr "" -#: ../../../whatsnew/3.14.rst:2924 +#: ../../../whatsnew/3.14.rst:2923 msgid ":c:func:`PyLong_FromInt64`" msgstr "" -#: ../../../whatsnew/3.14.rst:2925 +#: ../../../whatsnew/3.14.rst:2924 msgid ":c:func:`PyLong_FromUInt32`" msgstr "" -#: ../../../whatsnew/3.14.rst:2926 +#: ../../../whatsnew/3.14.rst:2925 msgid ":c:func:`PyLong_FromUInt64`" msgstr "" -#: ../../../whatsnew/3.14.rst:2928 +#: ../../../whatsnew/3.14.rst:2927 msgid "(Contributed by Victor Stinner in :gh:`120389`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2930 +#: ../../../whatsnew/3.14.rst:2929 msgid "" "Add a new import and export API for Python :class:`int` objects (:pep:`757`):" msgstr "" -#: ../../../whatsnew/3.14.rst:2933 +#: ../../../whatsnew/3.14.rst:2932 msgid ":c:func:`PyLong_GetNativeLayout`" msgstr "" -#: ../../../whatsnew/3.14.rst:2934 +#: ../../../whatsnew/3.14.rst:2933 msgid ":c:func:`PyLong_Export`" msgstr "" -#: ../../../whatsnew/3.14.rst:2935 +#: ../../../whatsnew/3.14.rst:2934 msgid ":c:func:`PyLong_FreeExport`" msgstr "" -#: ../../../whatsnew/3.14.rst:2936 +#: ../../../whatsnew/3.14.rst:2935 msgid ":c:func:`PyLongWriter_Create`" msgstr "" -#: ../../../whatsnew/3.14.rst:2937 +#: ../../../whatsnew/3.14.rst:2936 msgid ":c:func:`PyLongWriter_Finish`" msgstr "" -#: ../../../whatsnew/3.14.rst:2938 +#: ../../../whatsnew/3.14.rst:2937 msgid ":c:func:`PyLongWriter_Discard`" msgstr "" -#: ../../../whatsnew/3.14.rst:2940 +#: ../../../whatsnew/3.14.rst:2939 msgid "(Contributed by Sergey B Kirpichev and Victor Stinner in :gh:`102471`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2942 +#: ../../../whatsnew/3.14.rst:2941 msgid "" "Add :c:func:`PyMonitoring_FireBranchLeftEvent` and :c:func:" "`PyMonitoring_FireBranchRightEvent` for generating :monitoring-event:" @@ -4903,13 +4922,13 @@ msgid "" "(Contributed by Mark Shannon in :gh:`122548`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2948 +#: ../../../whatsnew/3.14.rst:2947 msgid "" "Add :c:func:`PyType_Freeze` function to make a type immutable. (Contributed " "by Victor Stinner in :gh:`121654`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2951 +#: ../../../whatsnew/3.14.rst:2950 msgid "" "Add :c:func:`PyType_GetBaseByToken` and :c:data:`Py_tp_token` slot for " "easier superclass identification, which attempts to resolve the type " @@ -4917,110 +4936,110 @@ msgid "" "in :gh:`124153`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2956 +#: ../../../whatsnew/3.14.rst:2955 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:2961 +#: ../../../whatsnew/3.14.rst:2960 msgid "" "Add a new :c:type:`PyUnicodeWriter` API to create a Python :class:`str` " "object, with the following functions:" msgstr "" -#: ../../../whatsnew/3.14.rst:2964 +#: ../../../whatsnew/3.14.rst:2963 msgid ":c:func:`PyUnicodeWriter_Create`" msgstr "" -#: ../../../whatsnew/3.14.rst:2965 +#: ../../../whatsnew/3.14.rst:2964 msgid ":c:func:`PyUnicodeWriter_DecodeUTF8Stateful`" msgstr "" -#: ../../../whatsnew/3.14.rst:2966 +#: ../../../whatsnew/3.14.rst:2965 msgid ":c:func:`PyUnicodeWriter_Discard`" msgstr "" -#: ../../../whatsnew/3.14.rst:2967 +#: ../../../whatsnew/3.14.rst:2966 msgid ":c:func:`PyUnicodeWriter_Finish`" msgstr "" -#: ../../../whatsnew/3.14.rst:2968 +#: ../../../whatsnew/3.14.rst:2967 msgid ":c:func:`PyUnicodeWriter_Format`" msgstr "" -#: ../../../whatsnew/3.14.rst:2969 +#: ../../../whatsnew/3.14.rst:2968 msgid ":c:func:`PyUnicodeWriter_WriteASCII`" msgstr "" -#: ../../../whatsnew/3.14.rst:2970 +#: ../../../whatsnew/3.14.rst:2969 msgid ":c:func:`PyUnicodeWriter_WriteChar`" msgstr "" -#: ../../../whatsnew/3.14.rst:2971 +#: ../../../whatsnew/3.14.rst:2970 msgid ":c:func:`PyUnicodeWriter_WriteRepr`" msgstr "" -#: ../../../whatsnew/3.14.rst:2972 +#: ../../../whatsnew/3.14.rst:2971 msgid ":c:func:`PyUnicodeWriter_WriteStr`" msgstr "" -#: ../../../whatsnew/3.14.rst:2973 +#: ../../../whatsnew/3.14.rst:2972 msgid ":c:func:`PyUnicodeWriter_WriteSubstring`" msgstr "" -#: ../../../whatsnew/3.14.rst:2974 +#: ../../../whatsnew/3.14.rst:2973 msgid ":c:func:`PyUnicodeWriter_WriteUCS4`" msgstr "" -#: ../../../whatsnew/3.14.rst:2975 +#: ../../../whatsnew/3.14.rst:2974 msgid ":c:func:`PyUnicodeWriter_WriteUTF8`" msgstr "" -#: ../../../whatsnew/3.14.rst:2976 +#: ../../../whatsnew/3.14.rst:2975 msgid ":c:func:`PyUnicodeWriter_WriteWideChar`" msgstr "" -#: ../../../whatsnew/3.14.rst:2978 +#: ../../../whatsnew/3.14.rst:2977 msgid "(Contributed by Victor Stinner in :gh:`119182`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:2980 +#: ../../../whatsnew/3.14.rst:2979 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:2985 +#: ../../../whatsnew/3.14.rst:2984 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:2989 +#: ../../../whatsnew/3.14.rst:2988 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:2993 +#: ../../../whatsnew/3.14.rst:2992 msgid "" "Add :c:func:`PyUnstable_Object_EnableDeferredRefcount` for enabling deferred " "reference counting, as outlined in :pep:`703`." msgstr "" -#: ../../../whatsnew/3.14.rst:2996 +#: ../../../whatsnew/3.14.rst:2995 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:3001 +#: ../../../whatsnew/3.14.rst:3000 msgid "" "Add :c:func:`PyUnstable_Object_IsUniqueReferencedTemporary` to determine if " "an object is a unique temporary object on the interpreter's operand stack. " @@ -5029,11 +5048,11 @@ msgid "" "functions. (Contributed by Sam Gross in :gh:`133164`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:3011 +#: ../../../whatsnew/3.14.rst:3010 msgid "Limited C API changes" msgstr "" -#: ../../../whatsnew/3.14.rst:3013 +#: ../../../whatsnew/3.14.rst:3012 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 " @@ -5041,7 +5060,7 @@ msgid "" "gh:`124127`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:3018 +#: ../../../whatsnew/3.14.rst:3017 msgid "" "Remove the :c:macro:`PySequence_Fast_GET_SIZE`, :c:macro:" "`PySequence_Fast_GET_ITEM`, and :c:macro:`PySequence_Fast_ITEMS` macros from " @@ -5049,32 +5068,32 @@ msgid "" "(Contributed by Victor Stinner in :gh:`91417`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:3029 +#: ../../../whatsnew/3.14.rst:3028 msgid "Removed C APIs" msgstr "" -#: ../../../whatsnew/3.14.rst:3031 +#: ../../../whatsnew/3.14.rst:3030 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:3036 +#: ../../../whatsnew/3.14.rst:3035 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:3041 +#: ../../../whatsnew/3.14.rst:3040 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:3045 +#: ../../../whatsnew/3.14.rst:3044 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 " @@ -5083,18 +5102,18 @@ msgid "" "`133079`, see also :gh:`130396`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:3056 +#: ../../../whatsnew/3.14.rst:3055 msgid "Deprecated C APIs" msgstr "" -#: ../../../whatsnew/3.14.rst:3058 +#: ../../../whatsnew/3.14.rst:3057 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:3062 +#: ../../../whatsnew/3.14.rst:3061 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:`!" @@ -5102,7 +5121,7 @@ msgid "" "file:`math.h` since C99. (Contributed by Sergey B Kirpichev in :gh:`119613`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:3068 +#: ../../../whatsnew/3.14.rst:3067 msgid "" "Non-tuple sequences are now deprecated as argument for the ``(items)`` " "format unit in :c:func:`PyArg_ParseTuple` and other :ref:`argument parsing " @@ -5111,14 +5130,14 @@ msgid "" "(Contributed by Serhiy Storchaka in :gh:`50333`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:3075 +#: ../../../whatsnew/3.14.rst:3074 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:3080 +#: ../../../whatsnew/3.14.rst:3079 msgid "" "The previously undocumented function :c:func:`PySequence_In` is now :term:" "`soft deprecated`. Use :c:func:`PySequence_Contains` instead. (Contributed " @@ -5610,11 +5629,11 @@ msgstr "" msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." msgstr "" -#: ../../../whatsnew/3.14.rst:3099 +#: ../../../whatsnew/3.14.rst:3098 msgid "Build changes" msgstr "" -#: ../../../whatsnew/3.14.rst:3101 +#: ../../../whatsnew/3.14.rst:3100 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 " @@ -5624,31 +5643,31 @@ msgid "" "Chatham in :gh:`127146`, :gh:`127683`, and :gh:`136931`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:3111 +#: ../../../whatsnew/3.14.rst:3110 msgid "Official Android binary releases are now provided on python.org__." msgstr "" -#: ../../../whatsnew/3.14.rst:3115 +#: ../../../whatsnew/3.14.rst:3114 msgid "" "GNU Autoconf 2.72 is now required to generate :file:`configure`. " "(Contributed by Erlend Aasland in :gh:`115765`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:3118 +#: ../../../whatsnew/3.14.rst:3117 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:3121 +#: ../../../whatsnew/3.14.rst:3120 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:3125 +#: ../../../whatsnew/3.14.rst:3124 msgid "" "CPython now enables a set of recommended compiler options by default for " "improved security. Use the :option:`--disable-safety` :file:`configure` " @@ -5656,45 +5675,45 @@ msgid "" "larger set of compiler options, albeit with a performance cost." msgstr "" -#: ../../../whatsnew/3.14.rst:3131 +#: ../../../whatsnew/3.14.rst:3130 msgid "" "The ``WITH_FREELISTS`` macro and ``--without-freelists`` :file:`configure` " "option have been removed." msgstr "" -#: ../../../whatsnew/3.14.rst:3134 +#: ../../../whatsnew/3.14.rst:3133 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:3138 +#: ../../../whatsnew/3.14.rst:3137 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:3142 +#: ../../../whatsnew/3.14.rst:3141 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:3146 +#: ../../../whatsnew/3.14.rst:3145 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:3155 +#: ../../../whatsnew/3.14.rst:3154 msgid ":file:`build-details.json`" msgstr "" -#: ../../../whatsnew/3.14.rst:3157 +#: ../../../whatsnew/3.14.rst:3156 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 " @@ -5702,7 +5721,7 @@ msgid "" "cases such as Python launchers, cross-compilation, and so on." msgstr "" -#: ../../../whatsnew/3.14.rst:3163 +#: ../../../whatsnew/3.14.rst:3162 msgid "" ":file:`build-details.json` must be installed in the platform-independent " "standard library directory. This corresponds to the :ref:`'stdlib' " @@ -5710,17 +5729,17 @@ msgid "" "by running ``sysconfig.get_path('stdlib')``." msgstr "" -#: ../../../whatsnew/3.14.rst:3169 +#: ../../../whatsnew/3.14.rst:3168 msgid "" ":pep:`739` -- ``build-details.json`` 1.0 -- a static description file for " "Python build details" msgstr "" -#: ../../../whatsnew/3.14.rst:3176 +#: ../../../whatsnew/3.14.rst:3175 msgid "Discontinuation of PGP signatures" msgstr "" -#: ../../../whatsnew/3.14.rst:3178 +#: ../../../whatsnew/3.14.rst:3177 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 " @@ -5728,15 +5747,15 @@ msgid "" "sigstore/>`__. Releases have been signed using Sigstore_ since Python 3.11." msgstr "" -#: ../../../whatsnew/3.14.rst:3184 +#: ../../../whatsnew/3.14.rst:3183 msgid "This change in release process was specified in :pep:`761`." msgstr "" -#: ../../../whatsnew/3.14.rst:3192 +#: ../../../whatsnew/3.14.rst:3191 msgid "Free-threaded Python is officially supported" msgstr "" -#: ../../../whatsnew/3.14.rst:3194 +#: ../../../whatsnew/3.14.rst:3193 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 " @@ -5767,19 +5786,19 @@ msgid "" "and the community. This decision is for the future." msgstr "" -#: ../../../whatsnew/3.14.rst:3214 +#: ../../../whatsnew/3.14.rst:3213 msgid ":pep:`779`" msgstr "" -#: ../../../whatsnew/3.14.rst:3216 +#: ../../../whatsnew/3.14.rst:3215 msgid "`PEP 779's acceptance `__" msgstr "" -#: ../../../whatsnew/3.14.rst:3222 +#: ../../../whatsnew/3.14.rst:3221 msgid "Binary releases for the experimental just-in-time compiler" msgstr "" -#: ../../../whatsnew/3.14.rst:3224 +#: ../../../whatsnew/3.14.rst:3223 msgid "" "The official macOS and Windows release binaries now include an " "*experimental* just-in-time (JIT) compiler. Although it is **not** " @@ -5789,7 +5808,7 @@ msgid "" "off` configuration option for similar behavior." msgstr "" -#: ../../../whatsnew/3.14.rst:3231 +#: ../../../whatsnew/3.14.rst:3230 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% " @@ -5801,7 +5820,7 @@ msgid "" "current process." msgstr "" -#: ../../../whatsnew/3.14.rst:3239 +#: ../../../whatsnew/3.14.rst:3238 msgid "" "Currently, the most significant missing functionality is that native " "debuggers and profilers like ``gdb`` and ``perf`` are unable to unwind " @@ -5810,83 +5829,83 @@ msgid "" "not support JIT compilation." msgstr "" -#: ../../../whatsnew/3.14.rst:3244 +#: ../../../whatsnew/3.14.rst:3243 msgid "" "Please report any bugs or major performance regressions that you encounter!" msgstr "" -#: ../../../whatsnew/3.14.rst:3246 +#: ../../../whatsnew/3.14.rst:3245 msgid ":pep:`744`" msgstr "" -#: ../../../whatsnew/3.14.rst:3250 +#: ../../../whatsnew/3.14.rst:3249 msgid "Porting to Python 3.14" msgstr "" -#: ../../../whatsnew/3.14.rst:3252 +#: ../../../whatsnew/3.14.rst:3251 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../../whatsnew/3.14.rst:3257 +#: ../../../whatsnew/3.14.rst:3256 msgid "Changes in the Python API" msgstr "" -#: ../../../whatsnew/3.14.rst:3259 +#: ../../../whatsnew/3.14.rst:3258 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:3263 +#: ../../../whatsnew/3.14.rst:3262 msgid "" "See :ref:`(1) ` and :ref:`(2) " "` for details." msgstr "" -#: ../../../whatsnew/3.14.rst:3266 +#: ../../../whatsnew/3.14.rst:3265 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:3270 +#: ../../../whatsnew/3.14.rst:3269 msgid "" "This change does not affect Windows or macOS, where :ref:`'spawn' " "` remains the default start method." msgstr "" -#: ../../../whatsnew/3.14.rst:3273 +#: ../../../whatsnew/3.14.rst:3272 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:3277 +#: ../../../whatsnew/3.14.rst:3276 msgid "" "The :ref:`garbage collector is now incremental `, which means that the behavior of :func:`gc.collect` changes slightly:" msgstr "" -#: ../../../whatsnew/3.14.rst:3284 +#: ../../../whatsnew/3.14.rst:3283 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:3289 +#: ../../../whatsnew/3.14.rst:3288 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:3294 +#: ../../../whatsnew/3.14.rst:3293 msgid "" "The runtime behavior of annotations has changed in various ways; see :ref:" "`above ` for details. While most code that " @@ -5894,29 +5913,29 @@ msgid "" "details may behave differently." msgstr "" -#: ../../../whatsnew/3.14.rst:3299 +#: ../../../whatsnew/3.14.rst:3298 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:3304 +#: ../../../whatsnew/3.14.rst:3303 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:3307 +#: ../../../whatsnew/3.14.rst:3306 msgid "" "On FreeBSD, :data:`sys.platform` no longer contains the major version number." msgstr "" -#: ../../../whatsnew/3.14.rst:3313 +#: ../../../whatsnew/3.14.rst:3312 msgid "Changes in annotations (:pep:`649` and :pep:`749`)" msgstr "" -#: ../../../whatsnew/3.14.rst:3315 +#: ../../../whatsnew/3.14.rst:3314 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 " @@ -5924,24 +5943,24 @@ msgid "" "deferred-annotations>`." msgstr "" -#: ../../../whatsnew/3.14.rst:3320 +#: ../../../whatsnew/3.14.rst:3319 msgid "" "In the majority of cases, working code from older versions of Python will " "not require any changes." msgstr "" -#: ../../../whatsnew/3.14.rst:3325 +#: ../../../whatsnew/3.14.rst:3324 msgid "Implications for annotated code" msgstr "" -#: ../../../whatsnew/3.14.rst:3327 +#: ../../../whatsnew/3.14.rst:3326 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:3331 +#: ../../../whatsnew/3.14.rst:3330 msgid "" "You will likely be able to remove quoted strings in annotations, which are " "frequently used for forward references. Similarly, if you use ``from " @@ -5952,11 +5971,11 @@ msgid "" "annotations before they work as expected." msgstr "" -#: ../../../whatsnew/3.14.rst:3341 +#: ../../../whatsnew/3.14.rst:3340 msgid "Implications for readers of ``__annotations__``" msgstr "" -#: ../../../whatsnew/3.14.rst:3343 +#: ../../../whatsnew/3.14.rst:3342 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 " @@ -5965,7 +5984,7 @@ msgid "" "FORWARDREF` format, as the :mod:`dataclasses` module now does." msgstr "" -#: ../../../whatsnew/3.14.rst:3350 +#: ../../../whatsnew/3.14.rst:3349 msgid "" "The external :pypi:`typing_extensions` package provides partial backports of " "some of the functionality of the :mod:`annotationlib` module, such as the :" @@ -5974,11 +5993,11 @@ msgid "" "that takes advantage of the new behavior in Python 3.14." msgstr "" -#: ../../../whatsnew/3.14.rst:3359 +#: ../../../whatsnew/3.14.rst:3358 msgid "Related changes" msgstr "" -#: ../../../whatsnew/3.14.rst:3361 +#: ../../../whatsnew/3.14.rst:3360 msgid "" "The changes in Python 3.14 are designed to rework how :attr:`!" "__annotations__` works at runtime while minimizing breakage to code that " @@ -5990,7 +6009,7 @@ msgid "" "the :mod:`annotationlib` module." msgstr "" -#: ../../../whatsnew/3.14.rst:3370 +#: ../../../whatsnew/3.14.rst:3369 msgid "" "In particular, do not read annotations directly from the namespace " "dictionary attribute of type objects. Use :func:`annotationlib." @@ -5998,25 +6017,25 @@ msgid "" "`annotationlib.get_annotations` afterwards." msgstr "" -#: ../../../whatsnew/3.14.rst:3375 +#: ../../../whatsnew/3.14.rst:3374 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:3381 +#: ../../../whatsnew/3.14.rst:3380 msgid "``from __future__ import annotations``" msgstr "" -#: ../../../whatsnew/3.14.rst:3383 +#: ../../../whatsnew/3.14.rst:3382 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:3386 +#: ../../../whatsnew/3.14.rst:3385 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 " @@ -6024,17 +6043,17 @@ msgid "" "Python without support for deferred evaluation of annotations." msgstr "" -#: ../../../whatsnew/3.14.rst:3392 +#: ../../../whatsnew/3.14.rst:3391 msgid "" "In Python 3.14, the behavior of code using ``from __future__ import " "annotations`` is unchanged." msgstr "" -#: ../../../whatsnew/3.14.rst:3397 +#: ../../../whatsnew/3.14.rst:3396 msgid "Changes in the C API" msgstr "" -#: ../../../whatsnew/3.14.rst:3399 +#: ../../../whatsnew/3.14.rst:3398 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 " @@ -6047,14 +6066,14 @@ msgid "" "`113601`.)" msgstr "" -#: ../../../whatsnew/3.14.rst:3409 +#: ../../../whatsnew/3.14.rst:3408 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:3416 +#: ../../../whatsnew/3.14.rst:3415 msgid "" "The interpreter internally avoids some reference count modifications when " "loading objects onto the operands stack by :term:`borrowing \n" "Language-Team: LANGUAGE \n" @@ -52,7 +52,7 @@ msgstr "" #: ../../../whatsnew/3.15.rst:68 msgid "" ":pep:`810`: :ref:`Explicit lazy imports for faster startup times " -"`" +"`" msgstr "" #: ../../../whatsnew/3.15.rst:70 @@ -74,7 +74,7 @@ msgstr "" #: ../../../whatsnew/3.15.rst:76 msgid "" -":pep:`798`: :ref:`Unpacking in Comprehensions `" msgstr "" @@ -85,29 +85,38 @@ msgid "" msgstr "" #: ../../../whatsnew/3.15.rst:80 +msgid ":pep:`728`: ``TypedDict`` with typed extra items" +msgstr "" + +#: ../../../whatsnew/3.15.rst:81 +msgid "" +":pep:`747`: :ref:`Annotating type forms with TypeForm `" +msgstr "" + +#: ../../../whatsnew/3.15.rst:83 msgid "" ":pep:`782`: :ref:`A new PyBytesWriter C API to create a Python bytes object " -"`" +"`" msgstr "" -#: ../../../whatsnew/3.15.rst:82 +#: ../../../whatsnew/3.15.rst:85 msgid "" ":ref:`The JIT compiler has been significantly upgraded `" msgstr "" -#: ../../../whatsnew/3.15.rst:83 +#: ../../../whatsnew/3.15.rst:86 msgid ":ref:`Improved error messages `" msgstr "" -#: ../../../whatsnew/3.15.rst:87 ../../../whatsnew/3.15.rst:1601 +#: ../../../whatsnew/3.15.rst:90 ../../../whatsnew/3.15.rst:1628 msgid "New features" msgstr "" -#: ../../../whatsnew/3.15.rst:92 +#: ../../../whatsnew/3.15.rst:95 msgid ":pep:`810`: Explicit lazy imports" msgstr "" -#: ../../../whatsnew/3.15.rst:94 +#: ../../../whatsnew/3.15.rst:97 msgid "" "Large Python applications often suffer from slow startup times. A " "significant contributor to this problem is the import system: when a module " @@ -117,7 +126,7 @@ msgid "" "imported code is never actually used during a particular run." msgstr "" -#: ../../../whatsnew/3.15.rst:101 +#: ../../../whatsnew/3.15.rst:104 msgid "" "Developers have worked around this by moving imports inside functions, " "using :mod:`importlib` to load modules on demand, or restructuring code to " @@ -126,7 +135,7 @@ msgid "" "require discipline to apply consistently." msgstr "" -#: ../../../whatsnew/3.15.rst:107 +#: ../../../whatsnew/3.15.rst:110 msgid "" "Python now provides a cleaner solution through explicit :keyword:`lazy` " "imports using the new ``lazy`` soft keyword. When you mark an import as " @@ -136,7 +145,7 @@ msgid "" "modules you actually use." msgstr "" -#: ../../../whatsnew/3.15.rst:114 +#: ../../../whatsnew/3.15.rst:117 msgid "" "The ``lazy`` keyword works with both ``import`` and ``from ... import`` " "statements. When you write ``lazy import heavy_module``, Python does not " @@ -145,7 +154,7 @@ msgid "" "name:" msgstr "" -#: ../../../whatsnew/3.15.rst:130 +#: ../../../whatsnew/3.15.rst:133 msgid "" "This mechanism is particularly useful for applications that import many " "modules at the top level but may only use a subset of them in any given run. " @@ -153,7 +162,7 @@ msgid "" "restructuring or conditional imports scattered throughout the codebase." msgstr "" -#: ../../../whatsnew/3.15.rst:135 +#: ../../../whatsnew/3.15.rst:138 msgid "" "In the case where loading a lazily imported module fails (for example, if " "the module does not exist), Python raises the exception at the point of " @@ -162,7 +171,7 @@ msgid "" "making it straightforward to diagnose & debug the failure." msgstr "" -#: ../../../whatsnew/3.15.rst:141 +#: ../../../whatsnew/3.15.rst:144 msgid "" "For cases where you want to enable lazy loading globally without modifying " "source code, Python provides the :option:`-X lazy_imports <-X>` command-line " @@ -174,7 +183,7 @@ msgid "" "functions allow changing and querying this mode at runtime." msgstr "" -#: ../../../whatsnew/3.15.rst:150 +#: ../../../whatsnew/3.15.rst:153 msgid "" "For more selective control, :func:`sys.set_lazy_imports_filter` accepts a " "callable that determines whether a specific module should be loaded lazily. " @@ -186,13 +195,13 @@ msgid "" "eager:" msgstr "" -#: ../../../whatsnew/3.15.rst:171 +#: ../../../whatsnew/3.15.rst:174 msgid "" "The proxy type itself is available as :data:`types.LazyImportType` for code " "that needs to detect lazy imports programmatically." msgstr "" -#: ../../../whatsnew/3.15.rst:174 +#: ../../../whatsnew/3.15.rst:177 msgid "" "There are some restrictions on where the ``lazy`` keyword can be used. Lazy " "imports are only permitted at module scope; using ``lazy`` inside a " @@ -202,86 +211,100 @@ msgid "" "exc:`SyntaxError`)." msgstr "" -#: ../../../whatsnew/3.15.rst:181 +#: ../../../whatsnew/3.15.rst:184 msgid ":pep:`810` for the full specification and rationale." msgstr "" -#: ../../../whatsnew/3.15.rst:183 +#: ../../../whatsnew/3.15.rst:186 msgid "" "(Contributed by Pablo Galindo Salgado and Dino Viehland in :gh:`142349`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:189 +#: ../../../whatsnew/3.15.rst:192 msgid ":pep:`814`: Add frozendict built-in type" msgstr "" -#: ../../../whatsnew/3.15.rst:191 +#: ../../../whatsnew/3.15.rst:194 msgid "" "A new :term:`immutable` type, :class:`frozendict`, is added to the :mod:" -"`builtins` module. It does not allow modification after creation. A " -"``frozendict`` is not a subclass of ``dict``; it inherits directly from " -"``object``. A ``frozendict`` is :term:`hashable` as long as all of its keys " -"and values are hashable. A ``frozendict`` preserves insertion order, but " -"comparison does not take order into account." +"`builtins` module. It does not allow modification after creation. A :class:`!" +"frozendict` is not a subclass of ``dict``; it inherits directly from " +"``object``. A :class:`!frozendict` is :term:`hashable` as long as all of its " +"keys and values are hashable. A :class:`!frozendict` preserves insertion " +"order, but comparison does not take order into account." msgstr "" -#: ../../../whatsnew/3.15.rst:197 +#: ../../../whatsnew/3.15.rst:200 msgid "For example::" msgstr "" -#: ../../../whatsnew/3.15.rst:214 +#: ../../../whatsnew/3.15.rst:217 +msgid "" +"The following standard library modules have been updated to accept :class:`!" +"frozendict`: :mod:`copy`, :mod:`decimal`, :mod:`json`, :mod:`marshal`, :mod:" +"`pickle`, :mod:`pprint` and :mod:`xml.etree.ElementTree`." +msgstr "" + +#: ../../../whatsnew/3.15.rst:221 +msgid "" +":func:`eval` and :func:`exec` accept :class:`!frozendict` for *globals*, " +"and :func:`type` and :meth:`str.maketrans` accept :class:`!frozendict` for " +"*dict*." +msgstr "" + +#: ../../../whatsnew/3.15.rst:224 msgid ":pep:`814` for the full specification and rationale." msgstr "" -#: ../../../whatsnew/3.15.rst:216 +#: ../../../whatsnew/3.15.rst:226 msgid "(Contributed by Victor Stinner and Donghee Na in :gh:`141510`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:222 +#: ../../../whatsnew/3.15.rst:232 msgid ":pep:`799`: A dedicated profiling package" msgstr "" -#: ../../../whatsnew/3.15.rst:224 +#: ../../../whatsnew/3.15.rst:234 msgid "" "A new :mod:`profiling` module has been added to organize Python's built-in " "profiling tools under a single, coherent namespace. This module contains:" msgstr "" -#: ../../../whatsnew/3.15.rst:227 +#: ../../../whatsnew/3.15.rst:237 msgid "" ":mod:`profiling.tracing`: deterministic function-call tracing (relocated " "from ``cProfile``)." msgstr "" -#: ../../../whatsnew/3.15.rst:229 +#: ../../../whatsnew/3.15.rst:239 msgid "" ":mod:`profiling.sampling`: a new statistical sampling profiler (named " "Tachyon)." msgstr "" -#: ../../../whatsnew/3.15.rst:231 +#: ../../../whatsnew/3.15.rst:241 msgid "" "The ``cProfile`` module remains as an alias for backwards compatibility. " "The :mod:`profile` module is deprecated and will be removed in Python 3.17." msgstr "" -#: ../../../whatsnew/3.15.rst:234 +#: ../../../whatsnew/3.15.rst:244 msgid ":pep:`799` for further details." msgstr "" -#: ../../../whatsnew/3.15.rst:236 +#: ../../../whatsnew/3.15.rst:246 msgid "(Contributed by Pablo Galindo and László Kiss Kollár in :gh:`138122`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:242 +#: ../../../whatsnew/3.15.rst:252 msgid "Tachyon: High frequency statistical sampling profiler" msgstr "" -#: ../../../whatsnew/3.15.rst:244 +#: ../../../whatsnew/3.15.rst:254 msgid "Tachyon profiler logo" msgstr "" -#: ../../../whatsnew/3.15.rst:249 +#: ../../../whatsnew/3.15.rst:259 msgid "" "A new statistical sampling profiler (Tachyon) has been added as :mod:" "`profiling.sampling`. This profiler enables low-overhead performance " @@ -289,7 +312,7 @@ msgid "" "process restart." msgstr "" -#: ../../../whatsnew/3.15.rst:253 +#: ../../../whatsnew/3.15.rst:263 msgid "" "Unlike deterministic profilers (such as :mod:`profiling.tracing`) that " "instrument every function call, the sampling profiler periodically captures " @@ -302,53 +325,53 @@ msgid "" "approaches would be too intrusive." msgstr "" -#: ../../../whatsnew/3.15.rst:262 +#: ../../../whatsnew/3.15.rst:272 msgid "Key features include:" msgstr "" -#: ../../../whatsnew/3.15.rst:264 +#: ../../../whatsnew/3.15.rst:274 msgid "" "**Zero-overhead profiling**: Attach to any running Python process without " "affecting its performance. Ideal for production debugging where you can't " "afford to restart or slow down your application." msgstr "" -#: ../../../whatsnew/3.15.rst:268 +#: ../../../whatsnew/3.15.rst:278 msgid "" "**No code modification required**: Profile existing applications without " "restart. Simply point the profiler at a running process by PID and start " "collecting data." msgstr "" -#: ../../../whatsnew/3.15.rst:271 +#: ../../../whatsnew/3.15.rst:281 msgid "**Flexible target modes**:" msgstr "" -#: ../../../whatsnew/3.15.rst:273 +#: ../../../whatsnew/3.15.rst:283 msgid "" "Profile running processes by PID (``attach``) - attach to already-running " "applications" msgstr "" -#: ../../../whatsnew/3.15.rst:274 +#: ../../../whatsnew/3.15.rst:284 msgid "" "Run and profile scripts directly (``run``) - profile from the very start of " "execution" msgstr "" -#: ../../../whatsnew/3.15.rst:275 +#: ../../../whatsnew/3.15.rst:285 msgid "" "Execute and profile modules (``run -m``) - profile packages run as ``python -" "m module``" msgstr "" -#: ../../../whatsnew/3.15.rst:277 +#: ../../../whatsnew/3.15.rst:287 msgid "" "**Multiple profiling modes**: Choose what to measure based on your " "performance investigation:" msgstr "" -#: ../../../whatsnew/3.15.rst:279 +#: ../../../whatsnew/3.15.rst:289 msgid "" "**Wall-clock time** (``--mode wall``, default): Measures real elapsed time " "including I/O, network waits, and blocking operations. Use this to " @@ -356,55 +379,55 @@ msgid "" "for external resources." msgstr "" -#: ../../../whatsnew/3.15.rst:282 +#: ../../../whatsnew/3.15.rst:292 msgid "" "**CPU time** (``--mode cpu``): Measures only active CPU execution time, " "excluding I/O waits and blocking. Use this to identify CPU-bound bottlenecks " "and optimize computational work." msgstr "" -#: ../../../whatsnew/3.15.rst:284 +#: ../../../whatsnew/3.15.rst:294 msgid "" "**GIL-holding time** (``--mode gil``): Measures time spent holding Python's " "Global Interpreter Lock. Use this to identify which threads dominate GIL " "usage in multi-threaded applications." msgstr "" -#: ../../../whatsnew/3.15.rst:286 +#: ../../../whatsnew/3.15.rst:296 msgid "" "**Exception handling time** (``--mode exception``): Captures samples only " "from threads with an active exception. Use this to analyze exception " "handling overhead." msgstr "" -#: ../../../whatsnew/3.15.rst:289 +#: ../../../whatsnew/3.15.rst:299 msgid "" "**Thread-aware profiling**: Option to profile all threads (``-a``) or just " "the main thread, essential for understanding multi-threaded application " "behavior." msgstr "" -#: ../../../whatsnew/3.15.rst:292 +#: ../../../whatsnew/3.15.rst:302 msgid "" "**Multiple output formats**: Choose the visualization that best fits your " "workflow:" msgstr "" -#: ../../../whatsnew/3.15.rst:294 +#: ../../../whatsnew/3.15.rst:304 msgid "" "``--pstats``: Detailed tabular statistics compatible with :mod:`pstats`. " "Shows function-level timing with direct and cumulative samples. Best for " "detailed analysis and integration with existing Python profiling tools." msgstr "" -#: ../../../whatsnew/3.15.rst:297 +#: ../../../whatsnew/3.15.rst:307 msgid "" "``--collapsed``: Generates collapsed stack traces (one line per stack). This " "format is specifically designed for creating flame graphs with external " "tools like Brendan Gregg's FlameGraph scripts or speedscope." msgstr "" -#: ../../../whatsnew/3.15.rst:300 +#: ../../../whatsnew/3.15.rst:310 msgid "" "``--flamegraph``: Generates a self-contained interactive HTML flame graph " "using D3.js. Opens directly in your browser for immediate visual analysis. " @@ -412,7 +435,7 @@ msgid "" "making it easy to spot bottlenecks at a glance." msgstr "" -#: ../../../whatsnew/3.15.rst:303 +#: ../../../whatsnew/3.15.rst:313 msgid "" "``--gecko``: Generates Gecko Profiler format compatible with `Firefox " "Profiler `__. Upload the output to Firefox " @@ -420,28 +443,28 @@ msgid "" "charts, markers, and network activity." msgstr "" -#: ../../../whatsnew/3.15.rst:306 +#: ../../../whatsnew/3.15.rst:316 msgid "" "``--heatmap``: Generates an interactive HTML heatmap visualization with line-" "level sample counts. Creates a directory with per-file heatmaps showing " "exactly where time is spent at the source code level." msgstr "" -#: ../../../whatsnew/3.15.rst:310 +#: ../../../whatsnew/3.15.rst:320 msgid "" "**Live interactive mode**: Real-time TUI profiler with a top-like interface " "(``--live``). Monitor performance as your application runs with interactive " "sorting and filtering." msgstr "" -#: ../../../whatsnew/3.15.rst:313 +#: ../../../whatsnew/3.15.rst:323 msgid "" "**Async-aware profiling**: Profile async/await code with task-based stack " "reconstruction (``--async-aware``). See which coroutines are consuming time, " "with options to show only running tasks or all tasks including those waiting." msgstr "" -#: ../../../whatsnew/3.15.rst:317 +#: ../../../whatsnew/3.15.rst:327 msgid "" "**Opcode-level profiling**: Gather bytecode opcode information for " "instruction-level profiling (``--opcodes``). Shows which bytecode " @@ -449,23 +472,23 @@ msgid "" "interpreter." msgstr "" -#: ../../../whatsnew/3.15.rst:321 +#: ../../../whatsnew/3.15.rst:331 msgid "" "See :mod:`profiling.sampling` for the complete documentation, including all " "available output formats, profiling modes, and configuration options." msgstr "" -#: ../../../whatsnew/3.15.rst:324 +#: ../../../whatsnew/3.15.rst:334 msgid "" "(Contributed by Pablo Galindo and László Kiss Kollár in :gh:`135953` and :gh:" "`138122`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:330 +#: ../../../whatsnew/3.15.rst:340 msgid ":pep:`798`: Unpacking in Comprehensions" msgstr "" -#: ../../../whatsnew/3.15.rst:332 +#: ../../../whatsnew/3.15.rst:342 msgid "" "List, set, and dictionary comprehensions, as well as generator expressions, " "now support unpacking with ``*`` and ``**``. This extends the unpacking " @@ -476,32 +499,32 @@ msgid "" "from_iterable`. For example::" msgstr "" -#: ../../../whatsnew/3.15.rst:352 +#: ../../../whatsnew/3.15.rst:362 msgid "" "Generator expressions can similarly use unpacking to yield values from " "multiple iterables::" msgstr "" -#: ../../../whatsnew/3.15.rst:359 +#: ../../../whatsnew/3.15.rst:369 msgid "" "This change also extends to asynchronous generator expressions, such that, " "for example, ``(*a async for a in agen())`` is equivalent to ``(x async for " "a in agen() for x in a)``." msgstr "" -#: ../../../whatsnew/3.15.rst:363 +#: ../../../whatsnew/3.15.rst:373 msgid ":pep:`798` for further details." msgstr "" -#: ../../../whatsnew/3.15.rst:365 +#: ../../../whatsnew/3.15.rst:375 msgid "(Contributed by Adam Hartz in :gh:`143055`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:371 +#: ../../../whatsnew/3.15.rst:381 msgid "Improved error messages" msgstr "" -#: ../../../whatsnew/3.15.rst:373 +#: ../../../whatsnew/3.15.rst:383 msgid "" "The interpreter now provides more helpful suggestions in :exc:" "`AttributeError` exceptions when accessing an attribute on an object that " @@ -509,22 +532,22 @@ msgid "" "members." msgstr "" -#: ../../../whatsnew/3.15.rst:377 +#: ../../../whatsnew/3.15.rst:387 msgid "" "For example, if the object has an attribute that itself exposes the " "requested name, the error message will suggest accessing it via that inner " "attribute:" msgstr "" -#: ../../../whatsnew/3.15.rst:398 +#: ../../../whatsnew/3.15.rst:408 msgid "Running this code now produces a clearer suggestion:" msgstr "" -#: ../../../whatsnew/3.15.rst:410 +#: ../../../whatsnew/3.15.rst:420 msgid "Other language changes" msgstr "" -#: ../../../whatsnew/3.15.rst:414 +#: ../../../whatsnew/3.15.rst:424 msgid "" "Python now uses UTF-8_ as the default encoding, independent of the system's " "environment. This means that I/O operations without an explicit encoding, " @@ -534,7 +557,7 @@ msgid "" "internet, many common file formats, programming languages, and more." msgstr "" -#: ../../../whatsnew/3.15.rst:421 +#: ../../../whatsnew/3.15.rst:431 msgid "" "This only applies when no ``encoding`` argument is given. For best " "compatibility between versions of Python, ensure that an explicit " @@ -544,29 +567,29 @@ msgid "" "locale encoding, and has been supported since Python 3.10." msgstr "" -#: ../../../whatsnew/3.15.rst:428 +#: ../../../whatsnew/3.15.rst:438 msgid "" "To retain the previous behaviour, Python's UTF-8 mode may be disabled with " "the :envvar:`PYTHONUTF8=0 ` environment variable or the :option:" "`-X utf8=0 <-X>` command-line option." msgstr "" -#: ../../../whatsnew/3.15.rst:432 +#: ../../../whatsnew/3.15.rst:442 msgid ":pep:`686` for further details." msgstr "" -#: ../../../whatsnew/3.15.rst:437 +#: ../../../whatsnew/3.15.rst:447 msgid "" "(Contributed by Adam Turner in :gh:`133711`; PEP 686 written by Inada Naoki.)" msgstr "" -#: ../../../whatsnew/3.15.rst:439 +#: ../../../whatsnew/3.15.rst:449 msgid "" "Several error messages incorrectly using the term \"argument\" have been " "corrected. (Contributed by Stan Ulbrych in :gh:`133382`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:442 +#: ../../../whatsnew/3.15.rst:452 msgid "" "The interpreter now tries to provide a suggestion when :func:`delattr` fails " "due to a missing attribute. When an attribute name that closely resembles an " @@ -574,18 +597,18 @@ msgid "" "attribute name in the error message. For example:" msgstr "" -#: ../../../whatsnew/3.15.rst:459 +#: ../../../whatsnew/3.15.rst:469 msgid "(Contributed by Nikita Sobolev and Pranjal Prajapati in :gh:`136588`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:461 +#: ../../../whatsnew/3.15.rst:471 msgid "" "Unraisable exceptions are now highlighted with color by default. This can be " "controlled by :ref:`environment variables `. " "(Contributed by Peter Bierma in :gh:`134170`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:465 +#: ../../../whatsnew/3.15.rst:475 msgid "" "The :meth:`~object.__repr__` of :class:`ImportError` and :class:" "`ModuleNotFoundError` now shows \"name\" and \"path\" as ``name=`` and " @@ -594,7 +617,7 @@ msgid "" "`74185`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:470 +#: ../../../whatsnew/3.15.rst:480 msgid "" "The :attr:`~object.__dict__` and :attr:`!__weakref__` descriptors now use a " "single descriptor instance per interpreter, shared across all types that " @@ -602,7 +625,7 @@ msgid "" "(Contributed by Petr Viktorin in :gh:`135228`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:476 +#: ../../../whatsnew/3.15.rst:486 msgid "" "The :option:`-W` option and the :envvar:`PYTHONWARNINGS` environment " "variable can now specify regular expressions instead of literal strings to " @@ -611,7 +634,7 @@ msgid "" "Storchaka in :gh:`134716`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:482 +#: ../../../whatsnew/3.15.rst:492 msgid "" "Functions that take timestamp or timeout arguments now accept any real " "numbers (such as :class:`~decimal.Decimal` and :class:`~fractions." @@ -619,7 +642,7 @@ msgid "" "precision. (Contributed by Serhiy Storchaka in :gh:`67795`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:489 +#: ../../../whatsnew/3.15.rst:499 msgid "" "Added :meth:`bytearray.take_bytes(n=None, /) ` to take " "bytes out of a :class:`bytearray` without copying. This enables optimizing " @@ -629,43 +652,43 @@ msgid "" "`~bytearray.take_bytes` are listed below." msgstr "" -#: ../../../whatsnew/3.15.rst:496 +#: ../../../whatsnew/3.15.rst:506 msgid "Suggested optimizing refactors" msgstr "" -#: ../../../whatsnew/3.15.rst:499 +#: ../../../whatsnew/3.15.rst:509 msgid "Description" msgstr "" -#: ../../../whatsnew/3.15.rst:500 +#: ../../../whatsnew/3.15.rst:510 msgid "Old" msgstr "" -#: ../../../whatsnew/3.15.rst:501 +#: ../../../whatsnew/3.15.rst:511 msgid "New" msgstr "" -#: ../../../whatsnew/3.15.rst:503 +#: ../../../whatsnew/3.15.rst:513 msgid "Return :class:`bytes` after working with :class:`bytearray`" msgstr "" -#: ../../../whatsnew/3.15.rst:518 +#: ../../../whatsnew/3.15.rst:528 msgid "Empty a buffer getting the bytes" msgstr "" -#: ../../../whatsnew/3.15.rst:532 +#: ../../../whatsnew/3.15.rst:542 msgid "Split a buffer at a specific separator" msgstr "" -#: ../../../whatsnew/3.15.rst:548 +#: ../../../whatsnew/3.15.rst:558 msgid "Split a buffer at a specific separator; discard after the separator" msgstr "" -#: ../../../whatsnew/3.15.rst:565 +#: ../../../whatsnew/3.15.rst:575 msgid "(Contributed by Cody Maloney in :gh:`139871`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:567 +#: ../../../whatsnew/3.15.rst:577 msgid "" "Many functions related to compiling or parsing Python code, such as :func:" "`compile`, :func:`ast.parse`, :func:`symtable.symtable`, and :func:" @@ -675,131 +698,131 @@ msgid "" "`135801`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:574 +#: ../../../whatsnew/3.15.rst:584 msgid "" "Allowed defining the *__dict__* and *__weakref__* :ref:`__slots__ ` " "for any class. (Contributed by Serhiy Storchaka in :gh:`41779`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:578 +#: ../../../whatsnew/3.15.rst:588 msgid "" "Allowed defining any :ref:`__slots__ ` for a class derived from :" "class:`tuple` (including classes created by :func:`collections.namedtuple`). " "(Contributed by Serhiy Storchaka in :gh:`41779`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:582 +#: ../../../whatsnew/3.15.rst:592 msgid "" "The :class:`slice` type now supports subscription, making it a :term:" "`generic type`. (Contributed by James Hilton-Balfe in :gh:`128335`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:588 +#: ../../../whatsnew/3.15.rst:598 msgid "New modules" msgstr "" -#: ../../../whatsnew/3.15.rst:591 +#: ../../../whatsnew/3.15.rst:601 msgid "math.integer" msgstr "" -#: ../../../whatsnew/3.15.rst:593 +#: ../../../whatsnew/3.15.rst:603 msgid "" "This module provides access to the mathematical functions for integer " "arguments (:pep:`791`). (Contributed by Serhiy Storchaka in :gh:`81313`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:599 +#: ../../../whatsnew/3.15.rst:609 msgid "Improved modules" msgstr "" -#: ../../../whatsnew/3.15.rst:602 +#: ../../../whatsnew/3.15.rst:612 msgid "argparse" msgstr "" -#: ../../../whatsnew/3.15.rst:604 +#: ../../../whatsnew/3.15.rst:614 msgid "" "The :class:`~argparse.BooleanOptionalAction` action supports now single-dash " "long options and alternate prefix characters. (Contributed by Serhiy " "Storchaka in :gh:`138525`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:608 +#: ../../../whatsnew/3.15.rst:618 msgid "" "Changed the *suggest_on_error* parameter of :class:`argparse.ArgumentParser` " "to default to ``True``. This enables suggestions for mistyped arguments by " "default. (Contributed by Jakob Schluse in :gh:`140450`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:612 +#: ../../../whatsnew/3.15.rst:622 msgid "" "Added backtick markup support in description and epilog text to highlight " "inline code when color output is enabled. (Contributed by Savannah Ostrowski " "in :gh:`142390`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:618 +#: ../../../whatsnew/3.15.rst:628 msgid "base64" msgstr "" -#: ../../../whatsnew/3.15.rst:620 +#: ../../../whatsnew/3.15.rst:630 msgid "" "Added the *pad* parameter in :func:`~base64.z85encode`. (Contributed by " "Hauke Dämpfling in :gh:`143103`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:623 +#: ../../../whatsnew/3.15.rst:633 msgid "" "Added the *wrapcol* parameter in :func:`~base64.b64encode`. (Contributed by " "Serhiy Storchaka in :gh:`143214`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:626 +#: ../../../whatsnew/3.15.rst:636 msgid "" "Added the *ignorechars* parameter in :func:`~base64.b64decode`. (Contributed " "by Serhiy Storchaka in :gh:`144001`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:631 +#: ../../../whatsnew/3.15.rst:641 msgid "binascii" msgstr "" -#: ../../../whatsnew/3.15.rst:633 +#: ../../../whatsnew/3.15.rst:643 msgid "Added functions for Ascii85, Base85, and Z85 encoding:" msgstr "" -#: ../../../whatsnew/3.15.rst:635 +#: ../../../whatsnew/3.15.rst:645 msgid ":func:`~binascii.b2a_ascii85` and :func:`~binascii.a2b_ascii85`" msgstr "" -#: ../../../whatsnew/3.15.rst:636 +#: ../../../whatsnew/3.15.rst:646 msgid ":func:`~binascii.b2a_base85` and :func:`~binascii.a2b_base85`" msgstr "" -#: ../../../whatsnew/3.15.rst:637 +#: ../../../whatsnew/3.15.rst:647 msgid ":func:`~binascii.b2a_z85` and :func:`~binascii.a2b_z85`" msgstr "" -#: ../../../whatsnew/3.15.rst:639 +#: ../../../whatsnew/3.15.rst:649 msgid "(Contributed by James Seo and Serhiy Storchaka in :gh:`101178`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:641 +#: ../../../whatsnew/3.15.rst:651 msgid "" "Added the *wrapcol* parameter in :func:`~binascii.b2a_base64`. (Contributed " "by Serhiy Storchaka in :gh:`143214`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:644 +#: ../../../whatsnew/3.15.rst:654 msgid "" "Added the *ignorechars* parameter in :func:`~binascii.a2b_base64`. " "(Contributed by Serhiy Storchaka in :gh:`144001`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:649 +#: ../../../whatsnew/3.15.rst:659 msgid "calendar" msgstr "" -#: ../../../whatsnew/3.15.rst:651 +#: ../../../whatsnew/3.15.rst:661 msgid "" "Calendar pages generated by the :class:`calendar.HTMLCalendar` class now " "support dark mode and have been migrated to the HTML5 standard for improved " @@ -807,50 +830,50 @@ msgid "" "`137634`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:655 +#: ../../../whatsnew/3.15.rst:665 msgid "" "The :mod:`calendar`'s :ref:`command-line ` HTML output now " "accepts the year-month option: ``python -m calendar -t html 2009 06``. " "(Contributed by Pål Grønås Drange in :gh:`140212`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:661 +#: ../../../whatsnew/3.15.rst:671 msgid "collections" msgstr "" -#: ../../../whatsnew/3.15.rst:663 +#: ../../../whatsnew/3.15.rst:673 msgid "" "Added :meth:`!collections.Counter.__xor__` and :meth:`!collections.Counter." "__ixor__` to compute the symmetric difference between :class:`~collections." "Counter` objects. (Contributed by Raymond Hettinger in :gh:`138682`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:670 +#: ../../../whatsnew/3.15.rst:680 msgid "collections.abc" msgstr "" -#: ../../../whatsnew/3.15.rst:672 +#: ../../../whatsnew/3.15.rst:682 msgid "" ":class:`collections.abc.ByteString` has been removed from ``collections.abc." "__all__``. :class:`!collections.abc.ByteString` has been deprecated since " "Python 3.12, and is scheduled for removal in Python 3.17." msgstr "" -#: ../../../whatsnew/3.15.rst:676 ../../../whatsnew/3.15.rst:1478 +#: ../../../whatsnew/3.15.rst:686 ../../../whatsnew/3.15.rst:1496 msgid "" "The following statements now cause ``DeprecationWarning``\\ s to be emitted " "at runtime:" msgstr "" -#: ../../../whatsnew/3.15.rst:679 +#: ../../../whatsnew/3.15.rst:689 msgid "``from collections.abc import ByteString``" msgstr "" -#: ../../../whatsnew/3.15.rst:680 +#: ../../../whatsnew/3.15.rst:690 msgid "``import collections.abc; collections.abc.ByteString``." msgstr "" -#: ../../../whatsnew/3.15.rst:682 +#: ../../../whatsnew/3.15.rst:692 msgid "" "``DeprecationWarning``\\ s were already emitted if :class:`collections.abc." "ByteString` was subclassed or used as the second argument to :func:" @@ -859,11 +882,11 @@ msgid "" "module." msgstr "" -#: ../../../whatsnew/3.15.rst:690 +#: ../../../whatsnew/3.15.rst:700 msgid "concurrent.futures" msgstr "" -#: ../../../whatsnew/3.15.rst:692 +#: ../../../whatsnew/3.15.rst:702 msgid "" "Improved error reporting when a child process in a :class:`concurrent." "futures.ProcessPoolExecutor` terminates abruptly. The resulting traceback " @@ -871,11 +894,11 @@ msgid "" "(Contributed by Jonathan Berg in :gh:`139486`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:700 +#: ../../../whatsnew/3.15.rst:710 msgid "contextlib" msgstr "" -#: ../../../whatsnew/3.15.rst:702 +#: ../../../whatsnew/3.15.rst:712 msgid "" "Added support for arbitrary descriptors :meth:`!__enter__`, :meth:`!" "__exit__`, :meth:`!__aenter__`, and :meth:`!__aexit__` in :class:" @@ -884,32 +907,32 @@ msgid "" "(Contributed by Serhiy Storchaka in :gh:`144386`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:710 +#: ../../../whatsnew/3.15.rst:720 msgid "dataclasses" msgstr "" -#: ../../../whatsnew/3.15.rst:712 +#: ../../../whatsnew/3.15.rst:722 msgid "" "Annotations for generated ``__init__`` methods no longer include internal " "type names." msgstr "" -#: ../../../whatsnew/3.15.rst:717 +#: ../../../whatsnew/3.15.rst:727 msgid "dbm" msgstr "" -#: ../../../whatsnew/3.15.rst:719 +#: ../../../whatsnew/3.15.rst:729 msgid "" "Added new :meth:`!reorganize` methods to :mod:`dbm.dumb` and :mod:`dbm." "sqlite3` which allow to recover unused free space previously occupied by " "deleted entries. (Contributed by Andrea Oliveri in :gh:`134004`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:725 +#: ../../../whatsnew/3.15.rst:735 msgid "difflib" msgstr "" -#: ../../../whatsnew/3.15.rst:729 +#: ../../../whatsnew/3.15.rst:739 msgid "" "Introduced the optional *color* parameter to :func:`difflib.unified_diff`, " "enabling color output similar to :program:`git diff`. This can be controlled " @@ -917,35 +940,35 @@ msgid "" "by Douglas Thor in :gh:`133725`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:735 +#: ../../../whatsnew/3.15.rst:745 msgid "" "Improved the styling of HTML diff pages generated by the :class:`difflib." "HtmlDiff` class, and migrated the output to the HTML5 standard. (Contributed " "by Jiahao Li in :gh:`134580`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:741 +#: ../../../whatsnew/3.15.rst:751 msgid "functools" msgstr "" -#: ../../../whatsnew/3.15.rst:743 +#: ../../../whatsnew/3.15.rst:753 msgid "" ":func:`~functools.singledispatchmethod` now supports non-:term:`descriptor` " "callables. (Contributed by Serhiy Storchaka in :gh:`140873`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:747 +#: ../../../whatsnew/3.15.rst:757 msgid "" ":func:`~functools.singledispatchmethod` now dispatches on the second " "argument if it wraps a regular method and is called as a class attribute. " "(Contributed by Bartosz Sławecki in :gh:`143535`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:753 +#: ../../../whatsnew/3.15.rst:763 msgid "hashlib" msgstr "" -#: ../../../whatsnew/3.15.rst:755 +#: ../../../whatsnew/3.15.rst:765 msgid "" "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 " @@ -955,11 +978,11 @@ msgid "" "`136929`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:764 +#: ../../../whatsnew/3.15.rst:774 msgid "http.client" msgstr "" -#: ../../../whatsnew/3.15.rst:766 +#: ../../../whatsnew/3.15.rst:776 msgid "" "A new *max_response_headers* keyword-only parameter has been added to :class:" "`~http.client.HTTPConnection` and :class:`~http.client.HTTPSConnection` " @@ -968,31 +991,31 @@ msgid "" "`131724`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:774 +#: ../../../whatsnew/3.15.rst:784 msgid "http.cookies" msgstr "" -#: ../../../whatsnew/3.15.rst:776 +#: ../../../whatsnew/3.15.rst:786 msgid "" "Allow '``\"``' double quotes in cookie values. (Contributed by Nick Burns " "and Senthil Kumaran in :gh:`92936`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:781 +#: ../../../whatsnew/3.15.rst:791 msgid "inspect" msgstr "" -#: ../../../whatsnew/3.15.rst:783 +#: ../../../whatsnew/3.15.rst:793 msgid "" "Add parameters *inherit_class_doc* and *fallback_to_class_doc* for :func:" "`~inspect.getdoc`. (Contributed by Serhiy Storchaka in :gh:`132686`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:789 +#: ../../../whatsnew/3.15.rst:799 msgid "locale" msgstr "" -#: ../../../whatsnew/3.15.rst:791 +#: ../../../whatsnew/3.15.rst:801 msgid "" ":func:`~locale.setlocale` now supports language codes with ``@``-modifiers. " "``@``-modifiers are no longer silently removed in :func:`~locale.getlocale`, " @@ -1000,76 +1023,102 @@ msgid "" "`137729`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:796 +#: ../../../whatsnew/3.15.rst:806 msgid "" "Undeprecate the :func:`locale.getdefaultlocale` function. (Contributed by " "Victor Stinner in :gh:`130796`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:801 +#: ../../../whatsnew/3.15.rst:811 msgid "math" msgstr "" -#: ../../../whatsnew/3.15.rst:803 +#: ../../../whatsnew/3.15.rst:813 msgid "" "Add :func:`math.isnormal` and :func:`math.issubnormal` functions. " "(Contributed by Sergey B Kirpichev in :gh:`132908`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:806 +#: ../../../whatsnew/3.15.rst:816 msgid "" "Add :func:`math.fmax`, :func:`math.fmin` and :func:`math.signbit` functions. " "(Contributed by Bénédikt Tran in :gh:`135853`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:811 +#: ../../../whatsnew/3.15.rst:821 msgid "mimetypes" msgstr "" -#: ../../../whatsnew/3.15.rst:813 +#: ../../../whatsnew/3.15.rst:823 msgid "" "Add ``application/dicom`` MIME type for ``.dcm`` extension. (Contributed by " "Benedikt Johannes in :gh:`144217`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:815 +#: ../../../whatsnew/3.15.rst:825 msgid "" "Add ``application/node`` MIME type for ``.cjs`` extension. (Contributed by " "John Franey in :gh:`140937`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:817 +#: ../../../whatsnew/3.15.rst:827 msgid "Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:818 +#: ../../../whatsnew/3.15.rst:828 +msgid "" +"Add ``application/sql`` and ``application/vnd.sqlite3``. (Contributed by " +"Charlie Lin in :gh:`145698`.)" +msgstr "" + +#: ../../../whatsnew/3.15.rst:830 msgid "Add ``image/jxl``. (Contributed by Foolbar in :gh:`144213`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:819 +#: ../../../whatsnew/3.15.rst:831 +msgid "Add the following MIME types:" +msgstr "" + +#: ../../../whatsnew/3.15.rst:833 +msgid "``application/vnd.ms-cab-compressed`` for ``.cab`` extension" +msgstr "" + +#: ../../../whatsnew/3.15.rst:834 +msgid "``application/vnd.ms-htmlhelp`` for ``.chm`` extension" +msgstr "" + +#: ../../../whatsnew/3.15.rst:835 +msgid "``application/vnd.ms-officetheme`` for ``.thmx`` extension" +msgstr "" + +#: ../../../whatsnew/3.15.rst:837 +msgid "(Contributed by Charlie Lin in :gh:`145718`.)" +msgstr "" + +#: ../../../whatsnew/3.15.rst:839 msgid "" "Rename ``application/x-texinfo`` to ``application/texinfo``. (Contributed by " "Charlie Lin in :gh:`140165`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:821 +#: ../../../whatsnew/3.15.rst:841 msgid "" "Changed the MIME type for ``.ai`` files to ``application/pdf``. (Contributed " "by Stan Ulbrych in :gh:`141239`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:826 +#: ../../../whatsnew/3.15.rst:846 msgid "mmap" msgstr "" -#: ../../../whatsnew/3.15.rst:828 +#: ../../../whatsnew/3.15.rst:848 msgid "" ":class:`mmap.mmap` now has a *trackfd* parameter on Windows; if it is " "``False``, the file handle corresponding to *fileno* will not be duplicated. " "(Contributed by Serhiy Storchaka in :gh:`78502`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:833 +#: ../../../whatsnew/3.15.rst:853 msgid "" "Added the :meth:`mmap.mmap.set_name` method to annotate an anonymous memory " "mapping if Linux kernel supports :manpage:`PR_SET_VMA_ANON_NAME " @@ -1077,28 +1126,28 @@ msgid "" "gh:`142419`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:840 +#: ../../../whatsnew/3.15.rst:860 msgid "os" msgstr "" -#: ../../../whatsnew/3.15.rst:842 +#: ../../../whatsnew/3.15.rst:862 msgid "" "Add :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 " "in :gh:`83714`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:848 +#: ../../../whatsnew/3.15.rst:868 msgid "os.path" msgstr "" -#: ../../../whatsnew/3.15.rst:850 +#: ../../../whatsnew/3.15.rst:870 msgid "" "Add support of the all-but-last mode in :func:`~os.path.realpath`. " "(Contributed by Serhiy Storchaka in :gh:`71189`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:853 +#: ../../../whatsnew/3.15.rst:873 msgid "" "The *strict* parameter to :func:`os.path.realpath` accepts a new value, :" "data:`os.path.ALLOW_MISSING`. If used, errors other than :exc:" @@ -1107,21 +1156,21 @@ msgid "" "`2025-4517`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:861 +#: ../../../whatsnew/3.15.rst:881 msgid "pickle" msgstr "" -#: ../../../whatsnew/3.15.rst:863 +#: ../../../whatsnew/3.15.rst:883 msgid "" "Add support for pickling private methods and nested classes. (Contributed by " "Zackery Spytz and Serhiy Storchaka in :gh:`77188`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:868 +#: ../../../whatsnew/3.15.rst:888 msgid "re" msgstr "" -#: ../../../whatsnew/3.15.rst:870 +#: ../../../whatsnew/3.15.rst:890 msgid "" ":func:`re.prefixmatch` and a corresponding :meth:`~re.Pattern.prefixmatch` " "have been added as alternate more explicit names for the existing :func:`re." @@ -1132,11 +1181,11 @@ msgid "" "has always called *search*. (Contributed by Gregory P. Smith in :gh:`86519`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:881 +#: ../../../whatsnew/3.15.rst:901 msgid "resource" msgstr "" -#: ../../../whatsnew/3.15.rst:883 +#: ../../../whatsnew/3.15.rst:903 msgid "" "Add new constants: :data:`~resource.RLIMIT_NTHR`, :data:`~resource." "RLIMIT_UMTXP`, :data:`~resource.RLIMIT_THREADS`, :data:`~resource." @@ -1144,70 +1193,76 @@ msgid "" "Serhiy Storchaka in :gh:`137512`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:890 +#: ../../../whatsnew/3.15.rst:910 msgid "shelve" msgstr "" -#: ../../../whatsnew/3.15.rst:892 +#: ../../../whatsnew/3.15.rst:912 msgid "" "Added new :meth:`!reorganize` method to :mod:`shelve` used to recover unused " "free space previously occupied by deleted entries. (Contributed by Andrea " "Oliveri in :gh:`134004`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:898 +#: ../../../whatsnew/3.15.rst:915 +msgid "" +"Add support for custom serialization and deserialization functions in the :" +"mod:`shelve` module. (Contributed by Furkan Onder in :gh:`99631`.)" +msgstr "" + +#: ../../../whatsnew/3.15.rst:921 msgid "socket" msgstr "" -#: ../../../whatsnew/3.15.rst:900 +#: ../../../whatsnew/3.15.rst:923 msgid "" "Add constants for the ISO-TP CAN protocol. (Contributed by Patrick Menschel " "and Stefan Tatschner in :gh:`86819`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:905 +#: ../../../whatsnew/3.15.rst:928 msgid "sqlite3" msgstr "" -#: ../../../whatsnew/3.15.rst:907 +#: ../../../whatsnew/3.15.rst:930 msgid "" "The :ref:`command-line interface ` has several new features:" msgstr "" -#: ../../../whatsnew/3.15.rst:909 +#: ../../../whatsnew/3.15.rst:932 msgid "" "SQL keyword completion on . (Contributed by Long Tan in :gh:`133393`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:912 +#: ../../../whatsnew/3.15.rst:935 msgid "" "Prompts, error messages, and help text are now colored. This is enabled by " "default, see :ref:`using-on-controlling-color` for details. (Contributed by " "Stan Ulbrych and Łukasz Langa in :gh:`133461`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:917 +#: ../../../whatsnew/3.15.rst:940 msgid "" "Table, index, trigger, view, column, function, and schema completion on " ". (Contributed by Long Tan in :gh:`136101`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:922 +#: ../../../whatsnew/3.15.rst:945 msgid "ssl" msgstr "" -#: ../../../whatsnew/3.15.rst:924 +#: ../../../whatsnew/3.15.rst:947 msgid "" "Indicate through :data:`ssl.HAS_PSK_TLS13` whether the :mod:`ssl` module " "supports \"External PSKs\" in TLSv1.3, as described in RFC 9258. " "(Contributed by Will Childs-Klein in :gh:`133624`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:928 +#: ../../../whatsnew/3.15.rst:951 msgid "Added new methods for managing groups used for SSL key agreement" msgstr "" -#: ../../../whatsnew/3.15.rst:930 +#: ../../../whatsnew/3.15.rst:953 msgid "" ":meth:`ssl.SSLContext.set_groups` sets the groups allowed for doing key " "agreement, extending the previous :meth:`ssl.SSLContext.set_ecdh_curve` " @@ -1217,25 +1272,25 @@ msgid "" "handshake." msgstr "" -#: ../../../whatsnew/3.15.rst:937 +#: ../../../whatsnew/3.15.rst:960 msgid "" ":meth:`ssl.SSLSocket.group` returns the group selected for doing key " "agreement on the current connection after the TLS handshake completes. This " "call requires OpenSSL 3.2 or later." msgstr "" -#: ../../../whatsnew/3.15.rst:940 +#: ../../../whatsnew/3.15.rst:963 msgid "" ":meth:`ssl.SSLContext.get_groups` returns a list of all available key " "agreement groups compatible with the minimum and maximum TLS versions " "currently set in the context. This call requires OpenSSL 3.5 or later." msgstr "" -#: ../../../whatsnew/3.15.rst:944 +#: ../../../whatsnew/3.15.rst:967 msgid "(Contributed by Ron Frederick in :gh:`136306`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:946 +#: ../../../whatsnew/3.15.rst:969 msgid "" "Added a new method :meth:`ssl.SSLContext.set_ciphersuites` for setting TLS " "1.3 ciphers. For TLS 1.2 or earlier, :meth:`ssl.SSLContext.set_ciphers` " @@ -1244,117 +1299,117 @@ msgid "" "connection is made. (Contributed by Ron Frederick in :gh:`137197`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:953 +#: ../../../whatsnew/3.15.rst:976 msgid "Added new methods for managing signature algorithms:" msgstr "" -#: ../../../whatsnew/3.15.rst:955 +#: ../../../whatsnew/3.15.rst:978 msgid "" ":func:`ssl.get_sigalgs` returns a list of all available TLS signature " "algorithms. This call requires OpenSSL 3.4 or later." msgstr "" -#: ../../../whatsnew/3.15.rst:957 +#: ../../../whatsnew/3.15.rst:980 msgid "" ":meth:`ssl.SSLContext.set_client_sigalgs` sets the signature algorithms " "allowed for certificate-based client authentication." msgstr "" -#: ../../../whatsnew/3.15.rst:959 +#: ../../../whatsnew/3.15.rst:982 msgid "" ":meth:`ssl.SSLContext.set_server_sigalgs` sets the signature algorithms " "allowed for the server to complete the TLS handshake." msgstr "" -#: ../../../whatsnew/3.15.rst:961 +#: ../../../whatsnew/3.15.rst:984 msgid "" ":meth:`ssl.SSLSocket.client_sigalg` returns the signature algorithm selected " "for client authentication on the current connection. This call requires " "OpenSSL 3.5 or later." msgstr "" -#: ../../../whatsnew/3.15.rst:964 +#: ../../../whatsnew/3.15.rst:987 msgid "" ":meth:`ssl.SSLSocket.server_sigalg` returns the signature algorithm selected " "for the server to complete the TLS handshake on the current connection. This " "call requires OpenSSL 3.5 or later." msgstr "" -#: ../../../whatsnew/3.15.rst:968 +#: ../../../whatsnew/3.15.rst:991 msgid "(Contributed by Ron Frederick in :gh:`138252`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:972 +#: ../../../whatsnew/3.15.rst:995 msgid "subprocess" msgstr "" -#: ../../../whatsnew/3.15.rst:974 +#: ../../../whatsnew/3.15.rst:997 msgid "" ":meth:`subprocess.Popen.wait`: when ``timeout`` is not ``None`` and the " "platform supports it, an efficient event-driven mechanism is used to wait " "for process termination:" msgstr "" -#: ../../../whatsnew/3.15.rst:978 +#: ../../../whatsnew/3.15.rst:1001 msgid "Linux >= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`." msgstr "" -#: ../../../whatsnew/3.15.rst:979 +#: ../../../whatsnew/3.15.rst:1002 msgid "" "macOS and other BSD variants use :func:`select.kqueue` + ``KQ_FILTER_PROC`` " "+ ``KQ_NOTE_EXIT``." msgstr "" -#: ../../../whatsnew/3.15.rst:980 +#: ../../../whatsnew/3.15.rst:1003 msgid "Windows keeps using ``WaitForSingleObject`` (unchanged)." msgstr "" -#: ../../../whatsnew/3.15.rst:982 +#: ../../../whatsnew/3.15.rst:1005 msgid "" "If none of these mechanisms are available, the function falls back to the " "traditional busy loop (non-blocking call and short sleeps). (Contributed by " "Giampaolo Rodola in :gh:`83069`)." msgstr "" -#: ../../../whatsnew/3.15.rst:988 ../../../whatsnew/3.15.rst:995 +#: ../../../whatsnew/3.15.rst:1011 msgid "symtable" msgstr "" -#: ../../../whatsnew/3.15.rst:990 ../../../whatsnew/3.15.rst:997 +#: ../../../whatsnew/3.15.rst:1013 msgid "" "Add :meth:`symtable.Function.get_cells` and :meth:`symtable.Symbol.is_cell` " "methods. (Contributed by Yashp002 in :gh:`143504`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1002 +#: ../../../whatsnew/3.15.rst:1018 msgid "sys" msgstr "" -#: ../../../whatsnew/3.15.rst:1004 +#: ../../../whatsnew/3.15.rst:1020 msgid "" "Add :data:`sys.abi_info` namespace to improve access to ABI information. " "(Contributed by Klaus Zimmermann in :gh:`137476`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1009 +#: ../../../whatsnew/3.15.rst:1025 msgid "tarfile" msgstr "" -#: ../../../whatsnew/3.15.rst:1011 +#: ../../../whatsnew/3.15.rst:1027 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.15.rst:1014 +#: ../../../whatsnew/3.15.rst:1030 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.15.rst:1017 +#: ../../../whatsnew/3.15.rst:1033 msgid "" ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` now " "(re-)apply the extraction filter when substituting a link (hard or symbolic) " @@ -1364,7 +1419,7 @@ msgid "" "cve:`2024-12718`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1023 +#: ../../../whatsnew/3.15.rst:1039 msgid "" ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` no " "longer extract rejected members when :func:`~tarfile.TarFile.errorlevel` is " @@ -1372,7 +1427,7 @@ msgid "" "cve:`2025-4435`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1028 +#: ../../../whatsnew/3.15.rst:1044 msgid "" ":func:`~tarfile.TarFile.extract` and :func:`~tarfile.TarFile.extractall` now " "replace slashes by backslashes in symlink targets on Windows to prevent " @@ -1380,22 +1435,22 @@ msgid "" "`57911`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1035 +#: ../../../whatsnew/3.15.rst:1051 msgid "timeit" msgstr "" -#: ../../../whatsnew/3.15.rst:1037 +#: ../../../whatsnew/3.15.rst:1053 msgid "" "The command-line interface now colorizes error tracebacks by default. This " "can be controlled with :ref:`environment variables `. (Contributed by Yi Hong in :gh:`139374`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1043 +#: ../../../whatsnew/3.15.rst:1059 msgid "tkinter" msgstr "" -#: ../../../whatsnew/3.15.rst:1045 +#: ../../../whatsnew/3.15.rst:1061 msgid "" "The :meth:`!tkinter.Text.search` method now supports two additional " "arguments: *nolinestop* which allows the search to continue across line " @@ -1403,7 +1458,7 @@ msgid "" "specified range. (Contributed by Rihaan Meher in :gh:`130848`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1051 +#: ../../../whatsnew/3.15.rst:1067 msgid "" "A new method :meth:`!tkinter.Text.search_all` has been introduced. This " "method allows for searching for all matches of a pattern using Tcl's ``-" @@ -1411,7 +1466,7 @@ msgid "" "`130848`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1056 +#: ../../../whatsnew/3.15.rst:1072 msgid "" "Added new methods :meth:`!pack_content`, :meth:`!place_content` and :meth:`!" "grid_content` which use Tk commands with new names (introduced in Tk 8.6) " @@ -1419,7 +1474,7 @@ msgid "" "names. (Contributed by Serhiy Storchaka in :gh:`143754`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1062 +#: ../../../whatsnew/3.15.rst:1078 msgid "" "Added :class:`!Event` attributes :attr:`!user_data` for Tk virtual events " "and :attr:`!detail` for ``Enter``, ``Leave``, ``FocusIn``, ``FocusOut``, and " @@ -1427,67 +1482,67 @@ msgid "" "Storchaka in :gh:`47655`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1071 +#: ../../../whatsnew/3.15.rst:1087 msgid "tomllib" msgstr "" -#: ../../../whatsnew/3.15.rst:1073 +#: ../../../whatsnew/3.15.rst:1089 msgid "" "The :mod:`tomllib` module now supports TOML 1.1.0. This is a backwards " "compatible update, meaning that all valid TOML 1.0.0 documents are parsed " "the same way." msgstr "" -#: ../../../whatsnew/3.15.rst:1077 +#: ../../../whatsnew/3.15.rst:1093 msgid "The changes, according to the `official TOML changelog`_, are:" msgstr "" -#: ../../../whatsnew/3.15.rst:1079 +#: ../../../whatsnew/3.15.rst:1095 msgid "Allow newlines and trailing commas in inline tables." msgstr "" -#: ../../../whatsnew/3.15.rst:1081 +#: ../../../whatsnew/3.15.rst:1097 msgid "" "Previously an inline table had to be on a single line and couldn't end with " "a trailing comma. This is now relaxed so that the following is valid:" msgstr "" -#: ../../../whatsnew/3.15.rst:1096 +#: ../../../whatsnew/3.15.rst:1112 msgid "" "Add ``\\xHH`` notation to basic strings for codepoints under 255, and the " "``\\e`` escape for the escape character:" msgstr "" -#: ../../../whatsnew/3.15.rst:1104 +#: ../../../whatsnew/3.15.rst:1120 msgid "" "Seconds in datetime and time values are now optional. The following are now " "valid:" msgstr "" -#: ../../../whatsnew/3.15.rst:1112 +#: ../../../whatsnew/3.15.rst:1128 msgid "(Contributed by Taneli Hukkinen in :gh:`142956`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1118 +#: ../../../whatsnew/3.15.rst:1134 msgid "types" msgstr "" -#: ../../../whatsnew/3.15.rst:1120 +#: ../../../whatsnew/3.15.rst:1136 msgid "" "Expose the write-through :func:`locals` proxy type as :data:`types." "FrameLocalsProxyType`. This represents the type of the :attr:`frame." "f_locals` attribute, as described in :pep:`667`." msgstr "" -#: ../../../whatsnew/3.15.rst:1127 +#: ../../../whatsnew/3.15.rst:1143 msgid "unicodedata" msgstr "" -#: ../../../whatsnew/3.15.rst:1129 +#: ../../../whatsnew/3.15.rst:1145 msgid "The Unicode database has been updated to Unicode 17.0.0." msgstr "" -#: ../../../whatsnew/3.15.rst:1131 +#: ../../../whatsnew/3.15.rst:1147 msgid "" "Add :func:`unicodedata.isxidstart` and :func:`unicodedata.isxidcontinue` " "functions to check whether a character can start or continue a `Unicode " @@ -1495,7 +1550,7 @@ msgid "" "(Contributed by Stan Ulbrych in :gh:`129117`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1136 +#: ../../../whatsnew/3.15.rst:1152 msgid "" "Add the :func:`~unicodedata.iter_graphemes` function to iterate over " "grapheme clusters according to rules defined in `Unicode Standard Annex #29, " @@ -1507,7 +1562,7 @@ msgid "" "gh:`74902`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1146 +#: ../../../whatsnew/3.15.rst:1162 msgid "" "Add :func:`~unicodedata.block` function to return the `Unicode block " " lib`` symlink. " @@ -1552,11 +1607,11 @@ msgid "" "equal to ``lib``. (Contributed by Rui Xi in :gh:`133951`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1184 +#: ../../../whatsnew/3.15.rst:1200 msgid "warnings" msgstr "" -#: ../../../whatsnew/3.15.rst:1186 +#: ../../../whatsnew/3.15.rst:1202 msgid "" "Improve filtering by module in :func:`warnings.warn_explicit` if no *module* " "argument is passed. It now tests the module regular expression in the " @@ -1566,11 +1621,11 @@ msgid "" "``.pyw`` stripped). (Contributed by Serhiy Storchaka in :gh:`135801`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1196 +#: ../../../whatsnew/3.15.rst:1212 msgid "xml.parsers.expat" msgstr "" -#: ../../../whatsnew/3.15.rst:1198 +#: ../../../whatsnew/3.15.rst:1214 msgid "" "Add :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerActivationThreshold` " "and :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerMaximumAmplification` " @@ -1579,7 +1634,7 @@ msgid "" "(Contributed by Bénédikt Tran in :gh:`90949`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1204 +#: ../../../whatsnew/3.15.rst:1220 msgid "" "Add :meth:`~xml.parsers.expat.xmlparser." "SetBillionLaughsAttackProtectionActivationThreshold` and :meth:`~xml.parsers." @@ -1588,27 +1643,27 @@ msgid "" "`billion laughs`_ attacks. (Contributed by Bénédikt Tran in :gh:`90949`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1214 +#: ../../../whatsnew/3.15.rst:1230 msgid "zlib" msgstr "" -#: ../../../whatsnew/3.15.rst:1216 +#: ../../../whatsnew/3.15.rst:1232 msgid "" "Allow combining two Adler-32 checksums via :func:`~zlib.adler32_combine`. " "(Contributed by Callum Attryde and Bénédikt Tran in :gh:`134635`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1219 +#: ../../../whatsnew/3.15.rst:1235 msgid "" "Allow combining two CRC-32 checksums via :func:`~zlib.crc32_combine`. " "(Contributed by Bénédikt Tran in :gh:`134635`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1226 +#: ../../../whatsnew/3.15.rst:1242 msgid "Optimizations" msgstr "" -#: ../../../whatsnew/3.15.rst:1228 +#: ../../../whatsnew/3.15.rst:1244 msgid "" "Builds using Visual Studio 2026 (MSVC 18) may now use the new :ref:`tail-" "calling interpreter `. Results on Visual " @@ -1623,7 +1678,7 @@ msgid "" "Jenkins.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1240 +#: ../../../whatsnew/3.15.rst:1256 msgid "" "``mimalloc`` is now used as the default allocator for for raw memory " "allocations such as via :c:func:`PyMem_RawMalloc` for better performance on :" @@ -1631,18 +1686,18 @@ msgid "" "Aditya in :gh:`144914`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1247 +#: ../../../whatsnew/3.15.rst:1263 msgid "base64 & binascii" msgstr "" -#: ../../../whatsnew/3.15.rst:1249 +#: ../../../whatsnew/3.15.rst:1265 msgid "" "CPython's underlying base64 implementation now encodes 2x faster and decodes " "3x faster thanks to simple CPU pipelining optimizations. (Contributed by " "Gregory P. Smith and Serhiy Storchaka in :gh:`143262`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1253 +#: ../../../whatsnew/3.15.rst:1269 msgid "" "Implementation for Ascii85, Base85, and Z85 encoding has been rewritten in " "C. Encoding and decoding is now two orders of magnitude faster and consumes " @@ -1650,21 +1705,21 @@ msgid "" "Storchaka in :gh:`101178`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1260 +#: ../../../whatsnew/3.15.rst:1276 msgid "csv" msgstr "" -#: ../../../whatsnew/3.15.rst:1262 +#: ../../../whatsnew/3.15.rst:1278 msgid "" ":meth:`csv.Sniffer.sniff` delimiter detection is now up to 1.6x faster. " "(Contributed by Maurycy Pawłowski-Wieroński in :gh:`137628`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1269 +#: ../../../whatsnew/3.15.rst:1285 msgid "Upgraded JIT compiler" msgstr "" -#: ../../../whatsnew/3.15.rst:1271 +#: ../../../whatsnew/3.15.rst:1287 msgid "" "Results from the `pyperformance `__ " "benchmark suite report `4-5% `__ for all supported platforms." msgstr "" -#: ../../../whatsnew/3.15.rst:1304 +#: ../../../whatsnew/3.15.rst:1320 msgid "(Contributed by Savannah Ostrowski in :gh:`140973`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1307 +#: ../../../whatsnew/3.15.rst:1323 msgid "A new tracing frontend" msgstr "" -#: ../../../whatsnew/3.15.rst:1308 +#: ../../../whatsnew/3.15.rst:1324 msgid "" "The JIT compiler now supports significantly more bytecode operations and " "control flow than in Python 3.14, enabling speedups on a wider variety of " @@ -1740,13 +1795,13 @@ msgid "" "the previous implementation did." msgstr "" -#: ../../../whatsnew/3.15.rst:1316 +#: ../../../whatsnew/3.15.rst:1332 msgid "" "(Contributed by Ken Jin in :gh:`139109`. Support for Windows added by Mark " "Shannon in :gh:`141703`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1321 +#: ../../../whatsnew/3.15.rst:1337 msgid "" "A basic form of register allocation has been added to the JIT compiler's " "optimizer. This allows the JIT compiler to avoid certain stack operations " @@ -1754,11 +1809,11 @@ msgid "" "more efficient traces by avoiding reads and writes to memory." msgstr "" -#: ../../../whatsnew/3.15.rst:1326 +#: ../../../whatsnew/3.15.rst:1342 msgid "(Contributed by Mark Shannon in :gh:`135379`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1330 +#: ../../../whatsnew/3.15.rst:1346 msgid "" "More `constant-propagation `__ is now performed. This means when the JIT compiler " @@ -1766,24 +1821,24 @@ msgid "" "simplified by the JIT." msgstr "" -#: ../../../whatsnew/3.15.rst:1334 +#: ../../../whatsnew/3.15.rst:1350 msgid "(Contributed by Ken Jin and Savannah Ostrowski in :gh:`132732`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1336 +#: ../../../whatsnew/3.15.rst:1352 msgid "" "The JIT avoids :term:`reference count`\\ s where possible. This generally " "reduces the cost of most operations in Python." msgstr "" -#: ../../../whatsnew/3.15.rst:1339 +#: ../../../whatsnew/3.15.rst:1355 msgid "" "(Contributed by Ken Jin, Donghee Na, Zheao Li, Hai Zhu, Savannah Ostrowski, " "Reiden Ong, Noam Cohen, Tomas Roun, PuQing, and Cajetan Rodrigues in :gh:" "`134584`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1344 +#: ../../../whatsnew/3.15.rst:1360 msgid "" "The JIT compiler's machine code generator now produces better machine code " "for x86-64 and AArch64 macOS and Linux targets. In general, users should " @@ -1791,7 +1846,7 @@ msgid "" "machine code versus the old JIT." msgstr "" -#: ../../../whatsnew/3.15.rst:1349 +#: ../../../whatsnew/3.15.rst:1365 msgid "" "(Contributed by Brandt Bucher in :gh:`136528` and :gh:`136528`. " "Implementation for AArch64 contributed by Mark Shannon in :gh:`139855`. " @@ -1799,26 +1854,26 @@ msgid "" "Russo in :gh:`140683` and :gh:`142305`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1356 +#: ../../../whatsnew/3.15.rst:1372 msgid "Removed" msgstr "" -#: ../../../whatsnew/3.15.rst:1359 +#: ../../../whatsnew/3.15.rst:1375 msgid "ctypes" msgstr "" -#: ../../../whatsnew/3.15.rst:1361 +#: ../../../whatsnew/3.15.rst:1377 msgid "" "Removed the undocumented function :func:`!ctypes.SetPointerType`, which has " "been deprecated since Python 3.13. (Contributed by Bénédikt Tran in :gh:" "`133866`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1367 +#: ../../../whatsnew/3.15.rst:1383 msgid "glob" msgstr "" -#: ../../../whatsnew/3.15.rst:1369 +#: ../../../whatsnew/3.15.rst:1385 msgid "" "Removed the undocumented :func:`!glob.glob0` and :func:`!glob.glob1` " "functions, which have been deprecated since Python 3.13. Use :func:`glob." @@ -1826,84 +1881,84 @@ msgid "" "by Barney Gale in :gh:`137466`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1376 +#: ../../../whatsnew/3.15.rst:1392 msgid "http.server" msgstr "" -#: ../../../whatsnew/3.15.rst:1378 +#: ../../../whatsnew/3.15.rst:1394 msgid "" "Removed the :class:`!CGIHTTPRequestHandler` class and the ``--cgi`` flag " "from the :program:`python -m http.server` command-line interface. They were " "deprecated in Python 3.13. (Contributed by Bénédikt Tran in :gh:`133810`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1385 +#: ../../../whatsnew/3.15.rst:1401 msgid "importlib.resources" msgstr "" -#: ../../../whatsnew/3.15.rst:1387 +#: ../../../whatsnew/3.15.rst:1403 msgid "" "Removed deprecated ``package`` parameter from :func:`importlib.resources." "files` function. (Contributed by Semyon Moroz in :gh:`138044`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1393 +#: ../../../whatsnew/3.15.rst:1409 msgid "pathlib" msgstr "" -#: ../../../whatsnew/3.15.rst:1395 +#: ../../../whatsnew/3.15.rst:1411 msgid "" "Removed deprecated :meth:`!pathlib.PurePath.is_reserved`. Use :func:`os.path." "isreserved` to detect reserved paths on Windows. (Contributed by Nikita " "Sobolev in :gh:`133875`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1401 +#: ../../../whatsnew/3.15.rst:1417 msgid "platform" msgstr "" -#: ../../../whatsnew/3.15.rst:1403 +#: ../../../whatsnew/3.15.rst:1419 msgid "" "Removed the :func:`!platform.java_ver` function, which was deprecated since " "Python 3.13. (Contributed by Alexey Makridenko in :gh:`133604`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1409 +#: ../../../whatsnew/3.15.rst:1425 msgid "sre_*" msgstr "" -#: ../../../whatsnew/3.15.rst:1411 +#: ../../../whatsnew/3.15.rst:1427 msgid "" "Removed :mod:`!sre_compile`, :mod:`!sre_constants` and :mod:`!sre_parse` " "modules. (Contributed by Stan Ulbrych in :gh:`135994`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1416 +#: ../../../whatsnew/3.15.rst:1432 msgid "sysconfig" msgstr "" -#: ../../../whatsnew/3.15.rst:1418 +#: ../../../whatsnew/3.15.rst:1434 msgid "" "Removed the *check_home* parameter of :func:`sysconfig.is_python_build`. " "(Contributed by Filipe Laíns in :gh:`92897`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1423 +#: ../../../whatsnew/3.15.rst:1439 msgid "threading" msgstr "" -#: ../../../whatsnew/3.15.rst:1425 +#: ../../../whatsnew/3.15.rst:1441 msgid "" "Remove support for arbitrary positional or keyword arguments in the C " "implementation of :class:`~threading.RLock` objects. This was deprecated in " "Python 3.14. (Contributed by Bénédikt Tran in :gh:`134087`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1432 +#: ../../../whatsnew/3.15.rst:1448 msgid "typing" msgstr "" -#: ../../../whatsnew/3.15.rst:1434 +#: ../../../whatsnew/3.15.rst:1452 msgid "" ":pep:`747`: Add :data:`~typing.TypeForm`, a new special form for annotating " "values that are themselves type expressions. ``TypeForm[T]`` means \"a type " @@ -1912,18 +1967,18 @@ msgid "" "type-form values without changing behavior." msgstr "" -#: ../../../whatsnew/3.15.rst:1441 +#: ../../../whatsnew/3.15.rst:1459 msgid "" "This helps libraries that accept user-provided type expressions (for example " "``int``, ``str | None``, :class:`~typing.TypedDict` classes, or " "``list[int]``) expose precise signatures:" msgstr "" -#: ../../../whatsnew/3.15.rst:1451 +#: ../../../whatsnew/3.15.rst:1469 msgid "(Contributed by Jelle Zijlstra in :gh:`145033`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1453 +#: ../../../whatsnew/3.15.rst:1471 msgid "" "The undocumented keyword argument syntax for creating :class:`~typing." "NamedTuple` classes (for example, ``Point = NamedTuple(\"Point\", x=int, " @@ -1931,7 +1986,7 @@ msgid "" "functional syntax instead. (Contributed by Bénédikt Tran in :gh:`133817`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1459 +#: ../../../whatsnew/3.15.rst:1477 msgid "" "Using ``TD = TypedDict(\"TD\")`` or ``TD = TypedDict(\"TD\", None)`` to " "construct a :class:`~typing.TypedDict` type with zero fields is no longer " @@ -1939,14 +1994,14 @@ msgid "" "{})`` instead. (Contributed by Bénédikt Tran in :gh:`133823`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1465 +#: ../../../whatsnew/3.15.rst:1483 msgid "" "Code like ``class ExtraTypeVars(P1[S], Protocol[T, T2]): ...`` now raises a :" "exc:`TypeError`, because ``S`` is not listed in ``Protocol`` parameters. " "(Contributed by Nikita Sobolev in :gh:`137191`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1469 +#: ../../../whatsnew/3.15.rst:1487 msgid "" "Code like ``class B2(A[T2], Protocol[T1, T2]): ...`` now correctly handles " "type parameters order: it is ``(T1, T2)``, not ``(T2, T1)`` as it was " @@ -1954,22 +2009,22 @@ msgid "" "gh:`137191`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1474 +#: ../../../whatsnew/3.15.rst:1492 msgid "" ":class:`typing.ByteString` has been removed from ``typing.__all__``. :class:" "`!typing.ByteString` has been deprecated since Python 3.9, and is scheduled " "for removal in Python 3.17." msgstr "" -#: ../../../whatsnew/3.15.rst:1481 +#: ../../../whatsnew/3.15.rst:1499 msgid "``from typing import ByteString``" msgstr "" -#: ../../../whatsnew/3.15.rst:1482 +#: ../../../whatsnew/3.15.rst:1500 msgid "``import typing; typing.ByteString``." msgstr "" -#: ../../../whatsnew/3.15.rst:1484 +#: ../../../whatsnew/3.15.rst:1502 msgid "" "``DeprecationWarning``\\ s were already emitted if :class:`typing." "ByteString` was subclassed or used as the second argument to :func:" @@ -1977,17 +2032,17 @@ msgid "" "if it was merely imported or accessed from the :mod:`!typing` module." msgstr "" -#: ../../../whatsnew/3.15.rst:1489 +#: ../../../whatsnew/3.15.rst:1507 msgid "" "Deprecated :func:`!typing.no_type_check_decorator` has been removed. " "(Contributed by Nikita Sobolev in :gh:`133601`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1494 +#: ../../../whatsnew/3.15.rst:1512 msgid "wave" msgstr "" -#: ../../../whatsnew/3.15.rst:1496 +#: ../../../whatsnew/3.15.rst:1514 msgid "" "Removed the ``getmark()``, ``setmark()`` and ``getmarkers()`` methods of " "the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes, which " @@ -1995,30 +2050,30 @@ msgid "" "`133873`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1503 +#: ../../../whatsnew/3.15.rst:1521 msgid "zipimport" msgstr "" -#: ../../../whatsnew/3.15.rst:1505 +#: ../../../whatsnew/3.15.rst:1523 msgid "" "Remove deprecated :meth:`!zipimport.zipimporter.load_module`. Use :meth:" "`zipimport.zipimporter.exec_module` instead. (Contributed by Jiahao Li in :" "gh:`133656`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1511 +#: ../../../whatsnew/3.15.rst:1529 msgid "Deprecated" msgstr "" -#: ../../../whatsnew/3.15.rst:1514 +#: ../../../whatsnew/3.15.rst:1532 msgid "New deprecations" msgstr "" -#: ../../../whatsnew/3.15.rst:1516 +#: ../../../whatsnew/3.15.rst:1534 msgid ":mod:`base64`:" msgstr "" -#: ../../../whatsnew/3.15.rst:1518 +#: ../../../whatsnew/3.15.rst:1536 msgid "" "Accepting the ``+`` and ``/`` characters with an alternative alphabet in :" "func:`~base64.b64decode` and :func:`~base64.urlsafe_b64decode` is now " @@ -2027,11 +2082,11 @@ msgid "" "gh:`125346`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1525 +#: ../../../whatsnew/3.15.rst:1543 msgid "CLI:" msgstr "" -#: ../../../whatsnew/3.15.rst:1527 +#: ../../../whatsnew/3.15.rst:1545 msgid "" "Deprecate :option:`-b` and :option:`!-bb` command-line options and schedule " "them to become no-ops in Python 3.17. These were primarily helpers for the " @@ -2039,16 +2094,16 @@ msgid "" "will be raised for these cases; use a type checker instead." msgstr "" -#: ../../../whatsnew/3.15.rst:1533 +#: ../../../whatsnew/3.15.rst:1551 msgid "(Contributed by Nikita Sobolev in :gh:`136355`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1535 +#: ../../../whatsnew/3.15.rst:1553 #: ../../../deprecations/pending-removal-in-3.19.rst:10 msgid ":mod:`hashlib`:" msgstr "" -#: ../../../whatsnew/3.15.rst:1537 +#: ../../../whatsnew/3.15.rst:1555 msgid "" "In hash function constructors such as :func:`~hashlib.new` or the direct " "hash-named constructors such as :func:`~hashlib.md5` and :func:`~hashlib." @@ -2057,151 +2112,169 @@ msgid "" "implementations." msgstr "" -#: ../../../whatsnew/3.15.rst:1543 +#: ../../../whatsnew/3.15.rst:1561 msgid "" "Support for the ``string`` keyword argument name is now deprecated and is " "slated for removal in Python 3.19. Prefer passing the initial data as a " "positional argument for maximum backwards compatibility." msgstr "" -#: ../../../whatsnew/3.15.rst:1547 +#: ../../../whatsnew/3.15.rst:1565 msgid "(Contributed by Bénédikt Tran in :gh:`134978`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1549 +#: ../../../whatsnew/3.15.rst:1567 +msgid ":mod:`struct`:" +msgstr "" + +#: ../../../whatsnew/3.15.rst:1569 +msgid "" +"Calling the ``Struct.__new__()`` without required argument now 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 "" + +#: ../../../whatsnew/3.15.rst:1574 +#: ../../../deprecations/pending-removal-in-3.20.rst:9 +msgid "" +"(Contributed by Sergey B Kirpichev and Serhiy Storchaka in :gh:`143715`.)" +msgstr "" + +#: ../../../whatsnew/3.15.rst:1576 msgid "``__version__``" msgstr "" -#: ../../../whatsnew/3.15.rst:1551 -#: ../../../deprecations/pending-removal-in-3.20.rst:4 +#: ../../../whatsnew/3.15.rst:1578 +#: ../../../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 "" -#: ../../../whatsnew/3.15.rst:1555 -#: ../../../deprecations/pending-removal-in-3.20.rst:8 +#: ../../../whatsnew/3.15.rst:1582 +#: ../../../deprecations/pending-removal-in-3.20.rst:15 msgid ":mod:`argparse`" msgstr "" -#: ../../../whatsnew/3.15.rst:1556 -#: ../../../deprecations/pending-removal-in-3.20.rst:9 +#: ../../../whatsnew/3.15.rst:1583 +#: ../../../deprecations/pending-removal-in-3.20.rst:16 msgid ":mod:`csv`" msgstr "" -#: ../../../whatsnew/3.15.rst:1557 -#: ../../../deprecations/pending-removal-in-3.20.rst:10 +#: ../../../whatsnew/3.15.rst:1584 +#: ../../../deprecations/pending-removal-in-3.20.rst:17 msgid ":mod:`ctypes`" msgstr "" -#: ../../../whatsnew/3.15.rst:1558 -#: ../../../deprecations/pending-removal-in-3.20.rst:11 +#: ../../../whatsnew/3.15.rst:1585 +#: ../../../deprecations/pending-removal-in-3.20.rst:18 msgid ":mod:`!ctypes.macholib`" msgstr "" -#: ../../../whatsnew/3.15.rst:1559 -#: ../../../deprecations/pending-removal-in-3.20.rst:12 +#: ../../../whatsnew/3.15.rst:1586 +#: ../../../deprecations/pending-removal-in-3.20.rst:19 msgid ":mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)" msgstr "" -#: ../../../whatsnew/3.15.rst:1560 -#: ../../../deprecations/pending-removal-in-3.20.rst:13 +#: ../../../whatsnew/3.15.rst:1587 +#: ../../../deprecations/pending-removal-in-3.20.rst:20 msgid ":mod:`http.server`" msgstr "" -#: ../../../whatsnew/3.15.rst:1561 -#: ../../../deprecations/pending-removal-in-3.20.rst:14 +#: ../../../whatsnew/3.15.rst:1588 +#: ../../../deprecations/pending-removal-in-3.20.rst:21 msgid ":mod:`imaplib`" msgstr "" -#: ../../../whatsnew/3.15.rst:1562 -#: ../../../deprecations/pending-removal-in-3.20.rst:15 +#: ../../../whatsnew/3.15.rst:1589 +#: ../../../deprecations/pending-removal-in-3.20.rst:22 msgid ":mod:`ipaddress`" msgstr "" -#: ../../../whatsnew/3.15.rst:1563 -#: ../../../deprecations/pending-removal-in-3.20.rst:16 +#: ../../../whatsnew/3.15.rst:1590 +#: ../../../deprecations/pending-removal-in-3.20.rst:23 msgid ":mod:`json`" msgstr "" -#: ../../../whatsnew/3.15.rst:1564 -#: ../../../deprecations/pending-removal-in-3.20.rst:17 +#: ../../../whatsnew/3.15.rst:1591 +#: ../../../deprecations/pending-removal-in-3.20.rst:24 msgid ":mod:`logging` (``__date__`` also deprecated)" msgstr "" -#: ../../../whatsnew/3.15.rst:1565 -#: ../../../deprecations/pending-removal-in-3.20.rst:18 +#: ../../../whatsnew/3.15.rst:1592 +#: ../../../deprecations/pending-removal-in-3.20.rst:25 msgid ":mod:`optparse`" msgstr "" -#: ../../../whatsnew/3.15.rst:1566 -#: ../../../deprecations/pending-removal-in-3.20.rst:19 +#: ../../../whatsnew/3.15.rst:1593 +#: ../../../deprecations/pending-removal-in-3.20.rst:26 msgid ":mod:`pickle`" msgstr "" -#: ../../../whatsnew/3.15.rst:1567 -#: ../../../deprecations/pending-removal-in-3.20.rst:20 +#: ../../../whatsnew/3.15.rst:1594 +#: ../../../deprecations/pending-removal-in-3.20.rst:27 msgid ":mod:`platform`" msgstr "" -#: ../../../whatsnew/3.15.rst:1568 -#: ../../../deprecations/pending-removal-in-3.20.rst:21 +#: ../../../whatsnew/3.15.rst:1595 +#: ../../../deprecations/pending-removal-in-3.20.rst:28 msgid ":mod:`re`" msgstr "" -#: ../../../whatsnew/3.15.rst:1569 -#: ../../../deprecations/pending-removal-in-3.20.rst:22 +#: ../../../whatsnew/3.15.rst:1596 +#: ../../../deprecations/pending-removal-in-3.20.rst:29 msgid ":mod:`socketserver`" msgstr "" -#: ../../../whatsnew/3.15.rst:1570 -#: ../../../deprecations/pending-removal-in-3.20.rst:23 +#: ../../../whatsnew/3.15.rst:1597 +#: ../../../deprecations/pending-removal-in-3.20.rst:30 msgid ":mod:`tabnanny`" msgstr "" -#: ../../../whatsnew/3.15.rst:1571 -#: ../../../deprecations/pending-removal-in-3.20.rst:24 +#: ../../../whatsnew/3.15.rst:1598 +#: ../../../deprecations/pending-removal-in-3.20.rst:31 msgid ":mod:`tarfile`" msgstr "" -#: ../../../whatsnew/3.15.rst:1572 -#: ../../../deprecations/pending-removal-in-3.20.rst:25 +#: ../../../whatsnew/3.15.rst:1599 +#: ../../../deprecations/pending-removal-in-3.20.rst:32 msgid ":mod:`tkinter.font`" msgstr "" -#: ../../../whatsnew/3.15.rst:1573 -#: ../../../deprecations/pending-removal-in-3.20.rst:26 +#: ../../../whatsnew/3.15.rst:1600 +#: ../../../deprecations/pending-removal-in-3.20.rst:33 msgid ":mod:`tkinter.ttk`" msgstr "" -#: ../../../whatsnew/3.15.rst:1574 -#: ../../../deprecations/pending-removal-in-3.20.rst:27 +#: ../../../whatsnew/3.15.rst:1601 +#: ../../../deprecations/pending-removal-in-3.20.rst:34 msgid ":mod:`wsgiref.simple_server`" msgstr "" -#: ../../../whatsnew/3.15.rst:1575 -#: ../../../deprecations/pending-removal-in-3.20.rst:28 +#: ../../../whatsnew/3.15.rst:1602 +#: ../../../deprecations/pending-removal-in-3.20.rst:35 msgid ":mod:`xml.etree.ElementTree`" msgstr "" -#: ../../../whatsnew/3.15.rst:1576 -#: ../../../deprecations/pending-removal-in-3.20.rst:29 +#: ../../../whatsnew/3.15.rst:1603 +#: ../../../deprecations/pending-removal-in-3.20.rst:36 msgid ":mod:`!xml.sax.expatreader`" msgstr "" -#: ../../../whatsnew/3.15.rst:1577 -#: ../../../deprecations/pending-removal-in-3.20.rst:30 +#: ../../../whatsnew/3.15.rst:1604 +#: ../../../deprecations/pending-removal-in-3.20.rst:37 msgid ":mod:`xml.sax.handler`" msgstr "" -#: ../../../whatsnew/3.15.rst:1578 -#: ../../../deprecations/pending-removal-in-3.20.rst:31 +#: ../../../whatsnew/3.15.rst:1605 +#: ../../../deprecations/pending-removal-in-3.20.rst:38 msgid ":mod:`zlib`" msgstr "" -#: ../../../whatsnew/3.15.rst:1580 -#: ../../../deprecations/pending-removal-in-3.20.rst:33 +#: ../../../whatsnew/3.15.rst:1607 +#: ../../../deprecations/pending-removal-in-3.20.rst:40 msgid "(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)" msgstr "" @@ -2466,10 +2539,16 @@ 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:6 +#: ../../../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 " @@ -2519,6 +2598,14 @@ msgstr "" 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-future.rst:2 msgid "Pending removal in future versions" msgstr "" @@ -2881,39 +2968,46 @@ msgid "" "_clear_internal_caches` instead." msgstr "" -#: ../../../whatsnew/3.15.rst:1598 +#: ../../../whatsnew/3.15.rst:1625 msgid "C API changes" msgstr "" -#: ../../../whatsnew/3.15.rst:1603 +#: ../../../whatsnew/3.15.rst:1630 +msgid "" +"Add :c:func:`PyArg_ParseArray` and :c:func:`PyArg_ParseArrayAndKeywords` " +"functions to parse arguments of functions using the :c:macro:`METH_FASTCALL` " +"calling convention. (Contributed by Victor Stinner in :gh:`144175`.)" +msgstr "" + +#: ../../../whatsnew/3.15.rst:1635 msgid "Add the following functions for the new :class:`frozendict` type:" msgstr "" -#: ../../../whatsnew/3.15.rst:1605 +#: ../../../whatsnew/3.15.rst:1637 msgid ":c:func:`PyAnyDict_Check`" msgstr "" -#: ../../../whatsnew/3.15.rst:1606 +#: ../../../whatsnew/3.15.rst:1638 msgid ":c:func:`PyAnyDict_CheckExact`" msgstr "" -#: ../../../whatsnew/3.15.rst:1607 +#: ../../../whatsnew/3.15.rst:1639 msgid ":c:func:`PyFrozenDict_Check`" msgstr "" -#: ../../../whatsnew/3.15.rst:1608 +#: ../../../whatsnew/3.15.rst:1640 msgid ":c:func:`PyFrozenDict_CheckExact`" msgstr "" -#: ../../../whatsnew/3.15.rst:1609 +#: ../../../whatsnew/3.15.rst:1641 msgid ":c:func:`PyFrozenDict_New`" msgstr "" -#: ../../../whatsnew/3.15.rst:1611 +#: ../../../whatsnew/3.15.rst:1643 msgid "(Contributed by Victor Stinner in :gh:`141510`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1613 +#: ../../../whatsnew/3.15.rst:1645 msgid "" "Add :c:func:`PySys_GetAttr`, :c:func:`PySys_GetAttrString`, :c:func:" "`PySys_GetOptionalAttr`, and :c:func:`PySys_GetOptionalAttrString` functions " @@ -2921,98 +3015,98 @@ msgid "" "Storchaka in :gh:`108512`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1618 +#: ../../../whatsnew/3.15.rst:1650 msgid "" "Add :c:type:`PyUnstable_Unicode_GET_CACHED_HASH` to get the cached hash of a " "string. See the documentation for caveats. (Contributed by Petr Viktorin in :" "gh:`131510`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1622 +#: ../../../whatsnew/3.15.rst:1654 msgid "" "Add API for checking an extension module's ABI compatibility: :c:data:" "`Py_mod_abi`, :c:func:`PyABIInfo_Check`, :c:macro:`PyABIInfo_VAR` and :c:" "data:`Py_mod_abi`. (Contributed by Petr Viktorin in :gh:`137210`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1629 +#: ../../../whatsnew/3.15.rst:1661 msgid "" "Implement :pep:`782`, the :ref:`PyBytesWriter API `. Add " "functions:" msgstr "" -#: ../../../whatsnew/3.15.rst:1632 +#: ../../../whatsnew/3.15.rst:1664 msgid ":c:func:`PyBytesWriter_Create`" msgstr "" -#: ../../../whatsnew/3.15.rst:1633 +#: ../../../whatsnew/3.15.rst:1665 msgid ":c:func:`PyBytesWriter_Discard`" msgstr "" -#: ../../../whatsnew/3.15.rst:1634 +#: ../../../whatsnew/3.15.rst:1666 msgid ":c:func:`PyBytesWriter_FinishWithPointer`" msgstr "" -#: ../../../whatsnew/3.15.rst:1635 +#: ../../../whatsnew/3.15.rst:1667 msgid ":c:func:`PyBytesWriter_FinishWithSize`" msgstr "" -#: ../../../whatsnew/3.15.rst:1636 +#: ../../../whatsnew/3.15.rst:1668 msgid ":c:func:`PyBytesWriter_Finish`" msgstr "" -#: ../../../whatsnew/3.15.rst:1637 +#: ../../../whatsnew/3.15.rst:1669 msgid ":c:func:`PyBytesWriter_Format`" msgstr "" -#: ../../../whatsnew/3.15.rst:1638 +#: ../../../whatsnew/3.15.rst:1670 msgid ":c:func:`PyBytesWriter_GetData`" msgstr "" -#: ../../../whatsnew/3.15.rst:1639 +#: ../../../whatsnew/3.15.rst:1671 msgid ":c:func:`PyBytesWriter_GetSize`" msgstr "" -#: ../../../whatsnew/3.15.rst:1640 +#: ../../../whatsnew/3.15.rst:1672 msgid ":c:func:`PyBytesWriter_GrowAndUpdatePointer`" msgstr "" -#: ../../../whatsnew/3.15.rst:1641 +#: ../../../whatsnew/3.15.rst:1673 msgid ":c:func:`PyBytesWriter_Grow`" msgstr "" -#: ../../../whatsnew/3.15.rst:1642 +#: ../../../whatsnew/3.15.rst:1674 msgid ":c:func:`PyBytesWriter_Resize`" msgstr "" -#: ../../../whatsnew/3.15.rst:1643 +#: ../../../whatsnew/3.15.rst:1675 msgid ":c:func:`PyBytesWriter_WriteBytes`" msgstr "" -#: ../../../whatsnew/3.15.rst:1645 +#: ../../../whatsnew/3.15.rst:1677 msgid "(Contributed by Victor Stinner in :gh:`129813`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1647 +#: ../../../whatsnew/3.15.rst:1679 msgid "" "Add a new :c:func:`PyImport_CreateModuleFromInitfunc` C-API for creating a " "module from a *spec* and *initfunc*. (Contributed by Itamar Oren in :gh:" "`116146`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1651 +#: ../../../whatsnew/3.15.rst:1683 msgid "" "Add :c:func:`PyTuple_FromArray` to create a :class:`tuple` from an array. " "(Contributed by Victor Stinner in :gh:`111489`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1654 +#: ../../../whatsnew/3.15.rst:1686 msgid "" "Add :c:func:`PyObject_Dump` to dump an object to ``stderr``. It should only " "be used for debugging. (Contributed by Victor Stinner in :gh:`141070`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1658 +#: ../../../whatsnew/3.15.rst:1690 msgid "" "Add :c:func:`PyUnstable_ThreadState_SetStackProtection` and :c:func:" "`PyUnstable_ThreadState_ResetStackProtection` functions to set the stack " @@ -3020,87 +3114,93 @@ msgid "" "(Contributed by Victor Stinner in :gh:`139653`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1664 +#: ../../../whatsnew/3.15.rst:1696 msgid "" "Add :c:func:`PyUnstable_SetImmortal` C-API function to mark objects as :term:" "`immortal`. (Contributed by Kumar Aditya in :gh:`143300`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1668 +#: ../../../whatsnew/3.15.rst:1699 +msgid "" +"Restore private provisional ``_Py_InitializeMain()`` function removed in " +"Python 3.14. (Contributed by Victor Stinner in :gh:`142417`.)" +msgstr "" + +#: ../../../whatsnew/3.15.rst:1704 msgid "Changed C APIs" msgstr "" -#: ../../../whatsnew/3.15.rst:1670 +#: ../../../whatsnew/3.15.rst:1706 msgid "" "If the :c:macro:`Py_TPFLAGS_MANAGED_DICT` or :c:macro:" "`Py_TPFLAGS_MANAGED_WEAKREF` flag is set then :c:macro:`Py_TPFLAGS_HAVE_GC` " "must be set too. (Contributed by Sergey Miryanov in :gh:`134786`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1674 +#: ../../../whatsnew/3.15.rst:1710 msgid "" ":c:macro:`PyDateTime_IMPORT` is now thread safe. Code that directly checks " "``PyDateTimeAPI`` for ``NULL`` should be updated to call :c:macro:" "`PyDateTime_IMPORT` instead. (Contributed by Kumar Aditya in :gh:`141563`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1679 ../../../whatsnew/3.15.rst:1846 +#: ../../../whatsnew/3.15.rst:1715 ../../../whatsnew/3.15.rst:1882 msgid "Porting to Python 3.15" msgstr "" -#: ../../../whatsnew/3.15.rst:1681 +#: ../../../whatsnew/3.15.rst:1717 msgid "Private functions promoted to public C APIs:" msgstr "" -#: ../../../whatsnew/3.15.rst:1683 +#: ../../../whatsnew/3.15.rst:1719 msgid "" "The |pythoncapi_compat_project| can be used to get most of these new " "functions on Python 3.14 and older." msgstr "" -#: ../../../whatsnew/3.15.rst:1688 +#: ../../../whatsnew/3.15.rst:1724 msgid "Removed C APIs" msgstr "" -#: ../../../whatsnew/3.15.rst:1690 +#: ../../../whatsnew/3.15.rst:1726 msgid "Remove deprecated ``PyUnicode`` functions:" msgstr "" -#: ../../../whatsnew/3.15.rst:1692 +#: ../../../whatsnew/3.15.rst:1728 msgid "" ":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr "" -#: ../../../whatsnew/3.15.rst:1694 +#: ../../../whatsnew/3.15.rst:1730 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 "" -#: ../../../whatsnew/3.15.rst:1697 +#: ../../../whatsnew/3.15.rst:1733 msgid "" ":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." msgstr "" -#: ../../../whatsnew/3.15.rst:1699 +#: ../../../whatsnew/3.15.rst:1735 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 "" -#: ../../../whatsnew/3.15.rst:1703 +#: ../../../whatsnew/3.15.rst:1739 msgid "(Contributed by Stan Ulbrych in :gh:`133612`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1705 +#: ../../../whatsnew/3.15.rst:1741 msgid "" ":c:func:`!PyImport_ImportModuleNoBlock`: deprecated alias of :c:func:" "`PyImport_ImportModule`. (Contributed by Bénédikt Tran in :gh:`133644`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1709 +#: ../../../whatsnew/3.15.rst:1745 msgid "" ":c:func:`!PyWeakref_GetObject` and :c:macro:`!PyWeakref_GET_OBJECT`: use :c:" "func:`PyWeakref_GetRef` instead. The |pythoncapi_compat_project| can be used " @@ -3108,28 +3208,28 @@ msgid "" "Bénédikt Tran in :gh:`133644`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1714 +#: ../../../whatsnew/3.15.rst:1750 msgid "" "Remove deprecated :c:func:`!PySys_ResetWarnOptions`. Clear :data:`sys." "warnoptions` and :data:`!warnings.filters` instead." msgstr "" -#: ../../../whatsnew/3.15.rst:1717 +#: ../../../whatsnew/3.15.rst:1753 msgid "(Contributed by Nikita Sobolev in :gh:`138886`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1719 +#: ../../../whatsnew/3.15.rst:1755 msgid "" "The following functions are removed in favor of :c:func:`PyConfig_Get`. The |" "pythoncapi_compat_project| can be used to get :c:func:`!PyConfig_Get` on " "Python 3.13 and older." msgstr "" -#: ../../../whatsnew/3.15.rst:1723 +#: ../../../whatsnew/3.15.rst:1759 msgid "Python initialization functions:" msgstr "" -#: ../../../whatsnew/3.15.rst:1725 +#: ../../../whatsnew/3.15.rst:1761 msgid "" ":c:func:`!Py_GetExecPrefix`: use :c:func:`PyConfig_Get(\"base_exec_prefix\") " "` (:data:`sys.base_exec_prefix`) instead. Use :c:func:" @@ -3137,13 +3237,13 @@ msgid "" "ref:`virtual environments ` need to be handled." msgstr "" -#: ../../../whatsnew/3.15.rst:1731 +#: ../../../whatsnew/3.15.rst:1767 msgid "" ":c:func:`!Py_GetPath`: use :c:func:`PyConfig_Get(\"module_search_paths\") " "` (:data:`sys.path`) instead." msgstr "" -#: ../../../whatsnew/3.15.rst:1734 +#: ../../../whatsnew/3.15.rst:1770 msgid "" ":c:func:`!Py_GetPrefix`: use :c:func:`PyConfig_Get(\"base_prefix\") " "` (:data:`sys.base_prefix`) instead. Use :c:func:" @@ -3151,39 +3251,39 @@ msgid "" "`virtual environments ` need to be handled." msgstr "" -#: ../../../whatsnew/3.15.rst:1740 +#: ../../../whatsnew/3.15.rst:1776 msgid "" ":c:func:`!Py_GetProgramFullPath`: use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../../whatsnew/3.15.rst:1743 +#: ../../../whatsnew/3.15.rst:1779 msgid "" ":c:func:`!Py_GetProgramName`: use :c:func:`PyConfig_Get(\"executable\") " "` (:data:`sys.executable`) instead." msgstr "" -#: ../../../whatsnew/3.15.rst:1746 +#: ../../../whatsnew/3.15.rst:1782 msgid "" ":c:func:`!Py_GetPythonHome`: use :c:func:`PyConfig_Get(\"home\") " "` or the :envvar:`PYTHONHOME` environment variable instead." msgstr "" -#: ../../../whatsnew/3.15.rst:1750 +#: ../../../whatsnew/3.15.rst:1786 msgid "(Contributed by Bénédikt Tran in :gh:`133644`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1758 +#: ../../../whatsnew/3.15.rst:1794 msgid "Deprecated C APIs" msgstr "" -#: ../../../whatsnew/3.15.rst:1760 +#: ../../../whatsnew/3.15.rst:1796 msgid "" "Deprecate :pep:`456` support for providing an external definition of the " "string hashing scheme. Removal is scheduled for Python 3.19." msgstr "" -#: ../../../whatsnew/3.15.rst:1763 +#: ../../../whatsnew/3.15.rst:1799 msgid "" "Previously, embedders could define :c:macro:`Py_HASH_ALGORITHM` to be " "``Py_HASH_EXTERNAL`` to indicate that the hashing scheme was provided " @@ -3191,11 +3291,11 @@ msgid "" "unused." msgstr "" -#: ../../../whatsnew/3.15.rst:1768 +#: ../../../whatsnew/3.15.rst:1804 msgid "(Contributed by Bénédikt Tran in :gh:`141226`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1770 +#: ../../../whatsnew/3.15.rst:1806 msgid "" "For unsigned integer formats in :c:func:`PyArg_ParseTuple`, accepting Python " "integers with value that is larger than the maximal value for the C type or " @@ -3204,14 +3304,14 @@ msgid "" "`132629`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1776 +#: ../../../whatsnew/3.15.rst:1812 msgid "" ":c:func:`PyBytes_FromStringAndSize(NULL, len) ` " "and :c:func:`_PyBytes_Resize` are :term:`soft deprecated`, use the :c:type:" "`PyBytesWriter` API instead. (Contributed by Victor Stinner in :gh:`129813`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1781 +#: ../../../whatsnew/3.15.rst:1817 msgid "" ":c:func:`!_PyObject_CallMethodId`, :c:func:`!_PyObject_GetAttrId` and :c:" "func:`!_PyUnicode_FromId` are deprecated since 3.15 and will be removed in " @@ -3220,7 +3320,7 @@ msgid "" "func:`PyObject_GetAttr`. (Contributed by Victor Stinner in :gh:`141049`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1788 +#: ../../../whatsnew/3.15.rst:1824 msgid "" "Deprecate :c:member:`~PyComplexObject.cval` field of the :c:type:" "`PyComplexObject` type. Use :c:func:`PyComplex_AsCComplex` and :c:func:" @@ -3229,7 +3329,7 @@ msgid "" "`128813`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1795 +#: ../../../whatsnew/3.15.rst:1831 msgid "" "Functions :c:func:`_Py_c_sum`, :c:func:`_Py_c_diff`, :c:func:`_Py_c_neg`, :c:" "func:`_Py_c_prod`, :c:func:`_Py_c_quot`, :c:func:`_Py_c_pow` and :c:func:" @@ -3237,31 +3337,31 @@ msgid "" "in :gh:`128813`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1800 +#: ../../../whatsnew/3.15.rst:1836 msgid "" ":c:member:`~PyConfig.bytes_warning` is deprecated since 3.15 and will be " "removed in 3.17. (Contributed by Nikita Sobolev in :gh:`136355`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1804 +#: ../../../whatsnew/3.15.rst:1840 msgid "" ":c:macro:`!Py_INFINITY` macro is :term:`soft deprecated`, use the C11 " "standard ```` :c:macro:`!INFINITY` instead. (Contributed by Sergey B " "Kirpichev in :gh:`141004`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1808 +#: ../../../whatsnew/3.15.rst:1844 msgid "" ":c:macro:`!Py_MATH_El` and :c:macro:`!Py_MATH_PIl` are deprecated since 3.15 " "and will be removed in 3.20. (Contributed by Sergey B Kirpichev in :gh:" "`141004`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1817 +#: ../../../whatsnew/3.15.rst:1853 msgid "Build changes" msgstr "" -#: ../../../whatsnew/3.15.rst:1819 +#: ../../../whatsnew/3.15.rst:1855 msgid "" "Removed implicit fallback to the bundled copy of the ``libmpdec`` library. " "Now this should be explicitly enabled with :option:`--with-system-libmpdec` " @@ -3269,7 +3369,7 @@ msgid "" "Sergey B Kirpichev in :gh:`115119`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1824 +#: ../../../whatsnew/3.15.rst:1860 msgid "" "The new configure option :option:`--with-missing-stdlib-config=FILE` allows " "distributors to pass a `JSON `_ " @@ -3278,7 +3378,7 @@ msgid "" "Stan Ulbrych and Petr Viktorin in :gh:`139707`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1830 +#: ../../../whatsnew/3.15.rst:1866 msgid "" "The new configure option :option:`--with-pymalloc-hugepages` enables huge " "page support for :ref:`pymalloc ` arenas. When enabled, arena size " @@ -3289,7 +3389,7 @@ msgid "" "environment variable to ``1``." msgstr "" -#: ../../../whatsnew/3.15.rst:1838 +#: ../../../whatsnew/3.15.rst:1874 msgid "" "Annotating anonymous mmap usage is now supported if Linux kernel supports :" "manpage:`PR_SET_VMA_ANON_NAME ` (Linux 5.17 or newer). " @@ -3299,41 +3399,41 @@ msgid "" "`141770`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1848 +#: ../../../whatsnew/3.15.rst:1884 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../../whatsnew/3.15.rst:1851 +#: ../../../whatsnew/3.15.rst:1887 msgid ":class:`sqlite3.Connection` APIs have been cleaned up." msgstr "" -#: ../../../whatsnew/3.15.rst:1853 +#: ../../../whatsnew/3.15.rst:1889 msgid "" "All parameters of :func:`sqlite3.connect` except *database* are now keyword-" "only." msgstr "" -#: ../../../whatsnew/3.15.rst:1854 +#: ../../../whatsnew/3.15.rst:1890 msgid "" "The first three parameters of methods :meth:`~sqlite3.Connection." "create_function` and :meth:`~sqlite3.Connection.create_aggregate` are now " "positional-only." msgstr "" -#: ../../../whatsnew/3.15.rst:1856 +#: ../../../whatsnew/3.15.rst:1892 msgid "" "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 "" -#: ../../../whatsnew/3.15.rst:1860 +#: ../../../whatsnew/3.15.rst:1896 msgid "(Contributed by Serhiy Storchaka in :gh:`133595`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1862 +#: ../../../whatsnew/3.15.rst:1898 msgid "" ":data:`resource.RLIM_INFINITY` is now always positive. Passing a negative " "integer value that corresponded to its old value (such as ``-1`` or ``-3``, " @@ -3342,13 +3442,13 @@ msgid "" "`137044`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1868 +#: ../../../whatsnew/3.15.rst:1904 msgid "" ":meth:`mmap.mmap.resize` has been removed on platforms that don't support " "the underlying syscall, instead of raising a :exc:`SystemError`." msgstr "" -#: ../../../whatsnew/3.15.rst:1871 +#: ../../../whatsnew/3.15.rst:1907 msgid "" "A resource warning is now emitted for an unclosed :func:`xml.etree." "ElementTree.iterparse` iterator if it opened a file. Use its :meth:`!close` " @@ -3356,7 +3456,7 @@ msgid "" "(Contributed by Osama Abdelkader and Serhiy Storchaka in :gh:`140601`.)" msgstr "" -#: ../../../whatsnew/3.15.rst:1877 +#: ../../../whatsnew/3.15.rst:1913 msgid "" "If a short option and a single-dash long option are passed to :meth:" "`argparse.ArgumentParser.add_argument`, *dest* is now inferred from the " diff --git a/main/references.json b/main/references.json index 1ffcd62d23d..4554e52b4b9 100644 --- a/main/references.json +++ b/main/references.json @@ -37,9 +37,9 @@ "branch" : "main", "commit" : { - "date" : "2026-03-01 11:48:28 -0800", - "hash" : "c9a5d9aae48a9faa553a5e8137ff1b5e261f6bf6", - "title" : "gh-100538: Add workflow to verify bundled libexpat (GH-145359)" + "date" : "2026-03-16 08:53:37 +0000", + "hash" : "3a248564470075cb8c7b8a75fe7ba61f7ea341b2", + "title" : "gh-123471: make concurrent iteration over itertools.accumulate thread-safe (#144486)" } }, "type" : "branch",