diff --git a/library/dataclasses.po b/library/dataclasses.po index 57ec3ee643..dbe48dc215 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-09 00:10+0000\n" +"POT-Creation-Date: 2022-02-10 00:10+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -537,18 +537,18 @@ msgid "" "type is :const:`KW_ONLY`." msgstr "" -#: ../../library/dataclasses.rst:480 +#: ../../library/dataclasses.rst:482 msgid "" "Raised when an implicitly defined :meth:`__setattr__` or :meth:`__delattr__` " "is called on a dataclass which was defined with ``frozen=True``. It is a " "subclass of :exc:`AttributeError`." msgstr "" -#: ../../library/dataclasses.rst:485 +#: ../../library/dataclasses.rst:487 msgid "Post-init processing" msgstr "" -#: ../../library/dataclasses.rst:487 +#: ../../library/dataclasses.rst:489 msgid "" "The generated :meth:`__init__` code will call a method named :meth:" "`__post_init__`, if :meth:`__post_init__` is defined on the class. It will " @@ -558,13 +558,13 @@ msgid "" "generated, then :meth:`__post_init__` will not automatically be called." msgstr "" -#: ../../library/dataclasses.rst:495 +#: ../../library/dataclasses.rst:497 msgid "" "Among other uses, this allows for initializing field values that depend on " "one or more other fields. For example::" msgstr "" -#: ../../library/dataclasses.rst:507 +#: ../../library/dataclasses.rst:509 msgid "" "The :meth:`__init__` method generated by :func:`dataclass` does not call " "base class :meth:`__init__` methods. If the base class has an :meth:" @@ -572,25 +572,25 @@ msgid "" "a :meth:`__post_init__` method::" msgstr "" -#: ../../library/dataclasses.rst:524 +#: ../../library/dataclasses.rst:526 msgid "" "Note, however, that in general the dataclass-generated :meth:`__init__` " "methods don't need to be called, since the derived dataclass will take care " "of initializing all fields of any base class that is a dataclass itself." msgstr "" -#: ../../library/dataclasses.rst:528 +#: ../../library/dataclasses.rst:530 msgid "" "See the section below on init-only variables for ways to pass parameters to :" "meth:`__post_init__`. Also see the warning about how :func:`replace` " "handles ``init=False`` fields." msgstr "" -#: ../../library/dataclasses.rst:533 +#: ../../library/dataclasses.rst:535 msgid "Class variables" msgstr "" -#: ../../library/dataclasses.rst:535 +#: ../../library/dataclasses.rst:537 msgid "" "One of two places where :func:`dataclass` actually inspects the type of a " "field is to determine if a field is a class variable as defined in :pep:" @@ -600,11 +600,11 @@ msgid "" "pseudo-fields are not returned by the module-level :func:`fields` function." msgstr "" -#: ../../library/dataclasses.rst:544 +#: ../../library/dataclasses.rst:546 msgid "Init-only variables" msgstr "" -#: ../../library/dataclasses.rst:546 +#: ../../library/dataclasses.rst:548 msgid "" "The other place where :func:`dataclass` inspects a type annotation is to " "determine if a field is an init-only variable. It does this by seeing if " @@ -616,23 +616,23 @@ msgid "" "`__post_init__` method. They are not otherwise used by dataclasses." msgstr "" -#: ../../library/dataclasses.rst:556 +#: ../../library/dataclasses.rst:558 msgid "" "For example, suppose a field will be initialized from a database, if a value " "is not provided when creating the class::" msgstr "" -#: ../../library/dataclasses.rst:571 +#: ../../library/dataclasses.rst:573 msgid "" "In this case, :func:`fields` will return :class:`Field` objects for ``i`` " "and ``j``, but not for ``database``." msgstr "" -#: ../../library/dataclasses.rst:575 +#: ../../library/dataclasses.rst:577 msgid "Frozen instances" msgstr "" -#: ../../library/dataclasses.rst:577 +#: ../../library/dataclasses.rst:579 msgid "" "It is not possible to create truly immutable Python objects. However, by " "passing ``frozen=True`` to the :meth:`dataclass` decorator you can emulate " @@ -641,18 +641,18 @@ msgid "" "`FrozenInstanceError` when invoked." msgstr "" -#: ../../library/dataclasses.rst:583 +#: ../../library/dataclasses.rst:585 msgid "" "There is a tiny performance penalty when using ``frozen=True``: :meth:" "`__init__` cannot use simple assignment to initialize fields, and must use :" "meth:`object.__setattr__`." msgstr "" -#: ../../library/dataclasses.rst:588 +#: ../../library/dataclasses.rst:590 msgid "Inheritance" msgstr "" -#: ../../library/dataclasses.rst:590 +#: ../../library/dataclasses.rst:592 msgid "" "When the dataclass is being created by the :meth:`dataclass` decorator, it " "looks through all of the class's base classes in reverse MRO (that is, " @@ -664,21 +664,21 @@ msgid "" "derived classes override base classes. An example::" msgstr "" -#: ../../library/dataclasses.rst:610 +#: ../../library/dataclasses.rst:612 msgid "" "The final list of fields is, in order, ``x``, ``y``, ``z``. The final type " "of ``x`` is ``int``, as specified in class ``C``." msgstr "" -#: ../../library/dataclasses.rst:613 +#: ../../library/dataclasses.rst:615 msgid "The generated :meth:`__init__` method for ``C`` will look like::" msgstr "" -#: ../../library/dataclasses.rst:618 +#: ../../library/dataclasses.rst:620 msgid "Re-ordering of keyword-only parameters in :meth:`__init__`" msgstr "" -#: ../../library/dataclasses.rst:620 +#: ../../library/dataclasses.rst:622 msgid "" "After the parameters needed for :meth:`__init__` are computed, any keyword-" "only parameters are moved to come after all regular (non-keyword-only) " @@ -686,41 +686,41 @@ msgid "" "implemented in Python: they must come after non-keyword-only parameters." msgstr "" -#: ../../library/dataclasses.rst:626 +#: ../../library/dataclasses.rst:628 msgid "" "In this example, ``Base.y``, ``Base.w``, and ``D.t`` are keyword-only " "fields, and ``Base.x`` and ``D.z`` are regular fields::" msgstr "" -#: ../../library/dataclasses.rst:641 +#: ../../library/dataclasses.rst:643 msgid "The generated :meth:`__init__` method for ``D`` will look like::" msgstr "" -#: ../../library/dataclasses.rst:645 +#: ../../library/dataclasses.rst:647 msgid "" "Note that the parameters have been re-ordered from how they appear in the " "list of fields: parameters derived from regular fields are followed by " "parameters derived from keyword-only fields." msgstr "" -#: ../../library/dataclasses.rst:649 +#: ../../library/dataclasses.rst:651 msgid "" "The relative ordering of keyword-only parameters is maintained in the re-" "ordered :meth:`__init__` parameter list." msgstr "" -#: ../../library/dataclasses.rst:654 +#: ../../library/dataclasses.rst:656 msgid "Default factory functions" msgstr "" -#: ../../library/dataclasses.rst:656 +#: ../../library/dataclasses.rst:658 msgid "" "If a :func:`field` specifies a ``default_factory``, it is called with zero " "arguments when a default value for the field is needed. For example, to " "create a new instance of a list, use::" msgstr "" -#: ../../library/dataclasses.rst:662 +#: ../../library/dataclasses.rst:664 msgid "" "If a field is excluded from :meth:`__init__` (using ``init=False``) and the " "field also specifies ``default_factory``, then the default factory function " @@ -728,31 +728,31 @@ msgid "" "happens because there is no other way to give the field an initial value." msgstr "" -#: ../../library/dataclasses.rst:669 +#: ../../library/dataclasses.rst:671 msgid "Mutable default values" msgstr "" -#: ../../library/dataclasses.rst:671 +#: ../../library/dataclasses.rst:673 msgid "" "Python stores default member variable values in class attributes. Consider " "this example, not using dataclasses::" msgstr "" -#: ../../library/dataclasses.rst:686 +#: ../../library/dataclasses.rst:688 msgid "" "Note that the two instances of class ``C`` share the same class variable " "``x``, as expected." msgstr "" -#: ../../library/dataclasses.rst:689 +#: ../../library/dataclasses.rst:691 msgid "Using dataclasses, *if* this code was valid::" msgstr "" -#: ../../library/dataclasses.rst:697 +#: ../../library/dataclasses.rst:699 msgid "it would generate code similar to::" msgstr "" -#: ../../library/dataclasses.rst:708 +#: ../../library/dataclasses.rst:710 msgid "" "This has the same issue as the original example using class ``C``. That is, " "two instances of class ``D`` that do not specify a value for ``x`` when " @@ -765,7 +765,7 @@ msgid "" "errors." msgstr "" -#: ../../library/dataclasses.rst:719 +#: ../../library/dataclasses.rst:721 msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" diff --git a/library/stdtypes.po b/library/stdtypes.po index cbe482db0b..d34c9552ae 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-20 00:10+0000\n" +"POT-Creation-Date: 2022-02-12 00:11+0000\n" "PO-Revision-Date: 2018-05-23 16:11+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -5313,145 +5313,129 @@ msgid ":class:`os.PathLike`" msgstr ":class:`os.PathLike`" #: ../../library/stdtypes.rst:4962 -msgid ":class:`pathlib.Path`" -msgstr ":class:`pathlib.Path`" - -#: ../../library/stdtypes.rst:4963 -msgid ":class:`pathlib.PurePath`" -msgstr ":class:`pathlib.PurePath`" - -#: ../../library/stdtypes.rst:4964 -msgid ":class:`pathlib.PurePosixPath`" -msgstr ":class:`pathlib.PurePosixPath`" - -#: ../../library/stdtypes.rst:4965 -msgid ":class:`pathlib.PureWindowsPath`" -msgstr ":class:`pathlib.PureWindowsPath`" - -#: ../../library/stdtypes.rst:4966 msgid ":class:`queue.LifoQueue`" msgstr ":class:`queue.LifoQueue`" -#: ../../library/stdtypes.rst:4967 +#: ../../library/stdtypes.rst:4963 msgid ":class:`queue.Queue`" msgstr ":class:`queue.Queue`" -#: ../../library/stdtypes.rst:4968 +#: ../../library/stdtypes.rst:4964 msgid ":class:`queue.PriorityQueue`" msgstr ":class:`queue.PriorityQueue`" -#: ../../library/stdtypes.rst:4969 +#: ../../library/stdtypes.rst:4965 msgid ":class:`queue.SimpleQueue`" msgstr ":class:`queue.SimpleQueue`" -#: ../../library/stdtypes.rst:4970 +#: ../../library/stdtypes.rst:4966 msgid ":ref:`re.Pattern `" msgstr ":ref:`re.Pattern `" -#: ../../library/stdtypes.rst:4971 +#: ../../library/stdtypes.rst:4967 msgid ":ref:`re.Match `" msgstr ":ref:`re.Match `" -#: ../../library/stdtypes.rst:4972 +#: ../../library/stdtypes.rst:4968 msgid ":class:`shelve.BsdDbShelf`" msgstr ":class:`shelve.BsdDbShelf`" -#: ../../library/stdtypes.rst:4973 +#: ../../library/stdtypes.rst:4969 msgid ":class:`shelve.DbfilenameShelf`" msgstr ":class:`shelve.DbfilenameShelf`" -#: ../../library/stdtypes.rst:4974 +#: ../../library/stdtypes.rst:4970 msgid ":class:`shelve.Shelf`" msgstr ":class:`shelve.Shelf`" -#: ../../library/stdtypes.rst:4975 +#: ../../library/stdtypes.rst:4971 msgid ":class:`types.MappingProxyType`" msgstr ":class:`types.MappingProxyType`" -#: ../../library/stdtypes.rst:4976 +#: ../../library/stdtypes.rst:4972 msgid ":class:`weakref.WeakKeyDictionary`" msgstr ":class:`weakref.WeakKeyDictionary`" -#: ../../library/stdtypes.rst:4977 +#: ../../library/stdtypes.rst:4973 msgid ":class:`weakref.WeakMethod`" msgstr ":class:`weakref.WeakMethod`" -#: ../../library/stdtypes.rst:4978 +#: ../../library/stdtypes.rst:4974 msgid ":class:`weakref.WeakSet`" msgstr ":class:`weakref.WeakSet`" -#: ../../library/stdtypes.rst:4979 +#: ../../library/stdtypes.rst:4975 msgid ":class:`weakref.WeakValueDictionary`" msgstr ":class:`weakref.WeakValueDictionary`" -#: ../../library/stdtypes.rst:4984 +#: ../../library/stdtypes.rst:4980 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "" -#: ../../library/stdtypes.rst:4986 +#: ../../library/stdtypes.rst:4982 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../library/stdtypes.rst:4990 +#: ../../library/stdtypes.rst:4986 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../library/stdtypes.rst:4998 +#: ../../library/stdtypes.rst:4994 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:5008 +#: ../../library/stdtypes.rst:5004 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../library/stdtypes.rst:5019 +#: ../../library/stdtypes.rst:5015 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:5026 +#: ../../library/stdtypes.rst:5022 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../library/stdtypes.rst:5026 +#: ../../library/stdtypes.rst:5022 msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../library/stdtypes.rst:5031 +#: ../../library/stdtypes.rst:5027 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../library/stdtypes.rst:5029 +#: ../../library/stdtypes.rst:5025 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:5034 +#: ../../library/stdtypes.rst:5030 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" msgstr "" -#: ../../library/stdtypes.rst:5034 +#: ../../library/stdtypes.rst:5030 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../library/stdtypes.rst:5043 +#: ../../library/stdtypes.rst:5039 msgid "Union Type" msgstr "" -#: ../../library/stdtypes.rst:5049 +#: ../../library/stdtypes.rst:5045 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -5460,7 +5444,7 @@ msgid "" "Union`." msgstr "" -#: ../../library/stdtypes.rst:5056 +#: ../../library/stdtypes.rst:5052 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 " @@ -5468,76 +5452,76 @@ msgid "" "class:`float`::" msgstr "" -#: ../../library/stdtypes.rst:5066 +#: ../../library/stdtypes.rst:5062 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../library/stdtypes.rst:5068 +#: ../../library/stdtypes.rst:5064 msgid "Unions of unions are flattened::" msgstr "" -#: ../../library/stdtypes.rst:5072 +#: ../../library/stdtypes.rst:5068 msgid "Redundant types are removed::" msgstr "" -#: ../../library/stdtypes.rst:5076 +#: ../../library/stdtypes.rst:5072 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../library/stdtypes.rst:5080 +#: ../../library/stdtypes.rst:5076 msgid "It is compatible with :data:`typing.Union`::" msgstr "" -#: ../../library/stdtypes.rst:5084 +#: ../../library/stdtypes.rst:5080 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../library/stdtypes.rst:5091 +#: ../../library/stdtypes.rst:5087 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../library/stdtypes.rst:5097 +#: ../../library/stdtypes.rst:5093 msgid "" "However, union objects containing :ref:`parameterized generics ` cannot be used::" msgstr "" -#: ../../library/stdtypes.rst:5105 +#: ../../library/stdtypes.rst:5101 msgid "" "The user-exposed type for the union object can be accessed from :data:`types." "UnionType` and used for :func:`isinstance` checks. An object cannot be " "instantiated from the type::" msgstr "" -#: ../../library/stdtypes.rst:5118 +#: ../../library/stdtypes.rst:5114 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:5136 +#: ../../library/stdtypes.rst:5132 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../library/stdtypes.rst:5144 +#: ../../library/stdtypes.rst:5140 msgid "Other Built-in Types" msgstr "" -#: ../../library/stdtypes.rst:5146 +#: ../../library/stdtypes.rst:5142 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../library/stdtypes.rst:5153 +#: ../../library/stdtypes.rst:5149 msgid "Modules" msgstr "模組" -#: ../../library/stdtypes.rst:5155 +#: ../../library/stdtypes.rst:5151 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 " @@ -5548,7 +5532,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../library/stdtypes.rst:5162 +#: ../../library/stdtypes.rst:5158 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -5559,32 +5543,32 @@ msgid "" "recommended." msgstr "" -#: ../../library/stdtypes.rst:5170 +#: ../../library/stdtypes.rst:5166 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../library/stdtypes.rst:5178 +#: ../../library/stdtypes.rst:5174 msgid "Classes and Class Instances" msgstr "" -#: ../../library/stdtypes.rst:5180 +#: ../../library/stdtypes.rst:5176 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../library/stdtypes.rst:5186 +#: ../../library/stdtypes.rst:5182 msgid "Functions" msgstr "函式" -#: ../../library/stdtypes.rst:5188 +#: ../../library/stdtypes.rst:5184 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:5191 +#: ../../library/stdtypes.rst:5187 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -5592,15 +5576,15 @@ msgid "" "types." msgstr "" -#: ../../library/stdtypes.rst:5195 +#: ../../library/stdtypes.rst:5191 msgid "See :ref:`function` for more information." msgstr "更多資訊請見 :ref:`function`\\ 。" -#: ../../library/stdtypes.rst:5201 +#: ../../library/stdtypes.rst:5197 msgid "Methods" msgstr "" -#: ../../library/stdtypes.rst:5205 +#: ../../library/stdtypes.rst:5201 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: built-in methods (such as :meth:`append` on lists) and " @@ -5608,7 +5592,7 @@ msgid "" "support them." msgstr "" -#: ../../library/stdtypes.rst:5210 +#: ../../library/stdtypes.rst:5206 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 :dfn:" @@ -5620,7 +5604,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../library/stdtypes.rst:5219 +#: ../../library/stdtypes.rst:5215 msgid "" "Like function objects, bound method objects support getting arbitrary " "attributes. However, since method attributes are actually stored on the " @@ -5630,15 +5614,15 @@ msgid "" "attribute, you need to explicitly set it on the underlying function object::" msgstr "" -#: ../../library/stdtypes.rst:5239 ../../library/stdtypes.rst:5270 +#: ../../library/stdtypes.rst:5235 ../../library/stdtypes.rst:5266 msgid "See :ref:`types` for more information." msgstr "更多資訊請見 :ref:`types`\\ 。" -#: ../../library/stdtypes.rst:5247 +#: ../../library/stdtypes.rst:5243 msgid "Code Objects" msgstr "" -#: ../../library/stdtypes.rst:5253 +#: ../../library/stdtypes.rst:5249 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -5648,23 +5632,23 @@ msgid "" "`__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../library/stdtypes.rst:5260 +#: ../../library/stdtypes.rst:5256 msgid "" "Accessing ``__code__`` raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"__code__\"``." msgstr "" -#: ../../library/stdtypes.rst:5267 +#: ../../library/stdtypes.rst:5263 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:5276 +#: ../../library/stdtypes.rst:5272 msgid "Type Objects" msgstr "" -#: ../../library/stdtypes.rst:5282 +#: ../../library/stdtypes.rst:5278 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 " @@ -5672,30 +5656,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../library/stdtypes.rst:5287 +#: ../../library/stdtypes.rst:5283 msgid "Types are written like this: ````." msgstr "" -#: ../../library/stdtypes.rst:5293 +#: ../../library/stdtypes.rst:5289 msgid "The Null Object" msgstr "" -#: ../../library/stdtypes.rst:5295 +#: ../../library/stdtypes.rst:5291 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:5299 +#: ../../library/stdtypes.rst:5295 msgid "It is written as ``None``." msgstr "" -#: ../../library/stdtypes.rst:5306 +#: ../../library/stdtypes.rst:5302 msgid "The Ellipsis Object" msgstr "" -#: ../../library/stdtypes.rst:5308 +#: ../../library/stdtypes.rst:5304 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -5703,15 +5687,15 @@ msgid "" "`Ellipsis` singleton." msgstr "" -#: ../../library/stdtypes.rst:5313 +#: ../../library/stdtypes.rst:5309 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../library/stdtypes.rst:5319 +#: ../../library/stdtypes.rst:5315 msgid "The NotImplemented Object" msgstr "" -#: ../../library/stdtypes.rst:5321 +#: ../../library/stdtypes.rst:5317 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 " @@ -5719,15 +5703,15 @@ msgid "" "``type(NotImplemented)()`` produces the singleton instance." msgstr "" -#: ../../library/stdtypes.rst:5326 +#: ../../library/stdtypes.rst:5322 msgid "It is written as ``NotImplemented``." msgstr "" -#: ../../library/stdtypes.rst:5332 +#: ../../library/stdtypes.rst:5328 msgid "Boolean Values" msgstr "" -#: ../../library/stdtypes.rst:5334 +#: ../../library/stdtypes.rst:5330 msgid "" "Boolean values are the two constant objects ``False`` and ``True``. They " "are used to represent truth values (although other values can also be " @@ -5738,105 +5722,117 @@ msgid "" "(see section :ref:`truth` above)." msgstr "" -#: ../../library/stdtypes.rst:5347 +#: ../../library/stdtypes.rst:5343 msgid "They are written as ``False`` and ``True``, respectively." msgstr "" -#: ../../library/stdtypes.rst:5353 +#: ../../library/stdtypes.rst:5349 msgid "Internal Objects" msgstr "" -#: ../../library/stdtypes.rst:5355 +#: ../../library/stdtypes.rst:5351 msgid "" "See :ref:`types` for this information. It describes stack frame objects, " "traceback objects, and slice objects." msgstr "" -#: ../../library/stdtypes.rst:5362 +#: ../../library/stdtypes.rst:5358 msgid "Special Attributes" msgstr "" -#: ../../library/stdtypes.rst:5364 +#: ../../library/stdtypes.rst:5360 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:5371 +#: ../../library/stdtypes.rst:5367 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes." msgstr "" -#: ../../library/stdtypes.rst:5377 +#: ../../library/stdtypes.rst:5373 msgid "The class to which a class instance belongs." msgstr "" -#: ../../library/stdtypes.rst:5382 +#: ../../library/stdtypes.rst:5378 msgid "The tuple of base classes of a class object." msgstr "" -#: ../../library/stdtypes.rst:5387 +#: ../../library/stdtypes.rst:5383 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../library/stdtypes.rst:5393 +#: ../../library/stdtypes.rst:5389 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../library/stdtypes.rst:5401 +#: ../../library/stdtypes.rst:5397 msgid "" "This attribute is a tuple of classes that are considered when looking for " "base classes during method resolution." msgstr "" -#: ../../library/stdtypes.rst:5407 +#: ../../library/stdtypes.rst:5403 msgid "" "This method can be overridden by a metaclass to customize the method " "resolution order for its instances. It is called at class instantiation, " "and its result is stored in :attr:`~class.__mro__`." msgstr "" -#: ../../library/stdtypes.rst:5414 +#: ../../library/stdtypes.rst:5410 msgid "" "Each class keeps a list of weak references to its immediate subclasses. " "This method returns a list of all those references still alive. The list is " "in definition order. Example::" msgstr "" -#: ../../library/stdtypes.rst:5423 +#: ../../library/stdtypes.rst:5419 msgid "Footnotes" msgstr "註解" -#: ../../library/stdtypes.rst:5424 +#: ../../library/stdtypes.rst:5420 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../library/stdtypes.rst:5427 +#: ../../library/stdtypes.rst:5423 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../library/stdtypes.rst:5430 +#: ../../library/stdtypes.rst:5426 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../library/stdtypes.rst:5432 +#: ../../library/stdtypes.rst:5428 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:5435 +#: ../../library/stdtypes.rst:5431 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." msgstr "" + +#~ msgid ":class:`pathlib.Path`" +#~ msgstr ":class:`pathlib.Path`" + +#~ msgid ":class:`pathlib.PurePath`" +#~ msgstr ":class:`pathlib.PurePath`" + +#~ msgid ":class:`pathlib.PurePosixPath`" +#~ msgstr ":class:`pathlib.PurePosixPath`" + +#~ msgid ":class:`pathlib.PureWindowsPath`" +#~ msgstr ":class:`pathlib.PureWindowsPath`" diff --git a/library/string.po b/library/string.po index e38015ff8c..c5042dbdd4 100644 --- a/library/string.po +++ b/library/string.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-02-14 02:16+0000\n" "PO-Revision-Date: 2018-05-23 16:11+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -402,8 +402,8 @@ msgid "Option" msgstr "" #: ../../library/string.rst:339 ../../library/string.rst:370 -#: ../../library/string.rst:443 ../../library/string.rst:454 -#: ../../library/string.rst:489 +#: ../../library/string.rst:444 ../../library/string.rst:455 +#: ../../library/string.rst:490 msgid "Meaning" msgstr "" @@ -550,119 +550,119 @@ msgstr "" #: ../../library/string.rst:431 msgid "" -"The *precision* is a decimal number indicating how many digits should be " -"displayed after the decimal point for a floating point value formatted with " -"``'f'`` and ``'F'``, or before and after the decimal point for a floating " -"point value formatted with ``'g'`` or ``'G'``. For non-number types the " -"field indicates the maximum field size - in other words, how many characters " -"will be used from the field content. The *precision* is not allowed for " -"integer values." +"The *precision* is a decimal integer indicating how many digits should be " +"displayed after the decimal point for presentation types ``'f'`` and " +"``'F'``, or before and after the decimal point for presentation types " +"``'g'`` or ``'G'``. For string presentation types the field indicates the " +"maximum field size - in other words, how many characters will be used from " +"the field content. The *precision* is not allowed for integer presentation " +"types." msgstr "" -#: ../../library/string.rst:438 +#: ../../library/string.rst:439 msgid "Finally, the *type* determines how the data should be presented." msgstr "" -#: ../../library/string.rst:440 +#: ../../library/string.rst:441 msgid "The available string presentation types are:" msgstr "" -#: ../../library/string.rst:443 ../../library/string.rst:454 -#: ../../library/string.rst:489 +#: ../../library/string.rst:444 ../../library/string.rst:455 +#: ../../library/string.rst:490 msgid "Type" msgstr "" -#: ../../library/string.rst:445 +#: ../../library/string.rst:446 msgid "``'s'``" msgstr "``'s'``" -#: ../../library/string.rst:445 +#: ../../library/string.rst:446 msgid "String format. This is the default type for strings and may be omitted." msgstr "" -#: ../../library/string.rst:448 ../../library/string.rst:477 -#: ../../library/string.rst:564 +#: ../../library/string.rst:449 ../../library/string.rst:478 +#: ../../library/string.rst:565 msgid "None" msgstr "None" -#: ../../library/string.rst:448 +#: ../../library/string.rst:449 msgid "The same as ``'s'``." msgstr "" -#: ../../library/string.rst:451 +#: ../../library/string.rst:452 msgid "The available integer presentation types are:" msgstr "" -#: ../../library/string.rst:456 +#: ../../library/string.rst:457 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/string.rst:456 +#: ../../library/string.rst:457 msgid "Binary format. Outputs the number in base 2." msgstr "" -#: ../../library/string.rst:458 +#: ../../library/string.rst:459 msgid "``'c'``" msgstr "``'c'``" -#: ../../library/string.rst:458 +#: ../../library/string.rst:459 msgid "" "Character. Converts the integer to the corresponding unicode character " "before printing." msgstr "" -#: ../../library/string.rst:461 +#: ../../library/string.rst:462 msgid "``'d'``" msgstr "``'d'``" -#: ../../library/string.rst:461 +#: ../../library/string.rst:462 msgid "Decimal Integer. Outputs the number in base 10." msgstr "" -#: ../../library/string.rst:463 +#: ../../library/string.rst:464 msgid "``'o'``" msgstr "``'o'``" -#: ../../library/string.rst:463 +#: ../../library/string.rst:464 msgid "Octal format. Outputs the number in base 8." msgstr "" -#: ../../library/string.rst:465 +#: ../../library/string.rst:466 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/string.rst:465 +#: ../../library/string.rst:466 msgid "" "Hex format. Outputs the number in base 16, using lower-case letters for the " "digits above 9." msgstr "" -#: ../../library/string.rst:468 +#: ../../library/string.rst:469 msgid "``'X'``" msgstr "``'X'``" -#: ../../library/string.rst:468 +#: ../../library/string.rst:469 msgid "" "Hex format. Outputs the number in base 16, using upper-case letters for the " "digits above 9. In case ``'#'`` is specified, the prefix ``'0x'`` will be " "upper-cased to ``'0X'`` as well." msgstr "" -#: ../../library/string.rst:473 ../../library/string.rst:557 +#: ../../library/string.rst:474 ../../library/string.rst:558 msgid "``'n'``" msgstr "``'n'``" -#: ../../library/string.rst:473 +#: ../../library/string.rst:474 msgid "" "Number. This is the same as ``'d'``, except that it uses the current locale " "setting to insert the appropriate number separator characters." msgstr "" -#: ../../library/string.rst:477 +#: ../../library/string.rst:478 msgid "The same as ``'d'``." msgstr "" -#: ../../library/string.rst:480 +#: ../../library/string.rst:481 msgid "" "In addition to the above presentation types, integers can be formatted with " "the floating point presentation types listed below (except ``'n'`` and " @@ -670,17 +670,17 @@ msgid "" "floating point number before formatting." msgstr "" -#: ../../library/string.rst:485 +#: ../../library/string.rst:486 msgid "" "The available presentation types for :class:`float` and :class:`~decimal." "Decimal` values are:" msgstr "" -#: ../../library/string.rst:491 +#: ../../library/string.rst:492 msgid "``'e'``" msgstr "``'e'``" -#: ../../library/string.rst:491 +#: ../../library/string.rst:492 msgid "" "Scientific notation. For a given precision ``p``, formats the number in " "scientific notation with the letter 'e' separating the coefficient from the " @@ -692,21 +692,21 @@ msgid "" "removed unless the ``#`` option is used." msgstr "" -#: ../../library/string.rst:503 +#: ../../library/string.rst:504 msgid "``'E'``" msgstr "``'E'``" -#: ../../library/string.rst:503 +#: ../../library/string.rst:504 msgid "" "Scientific notation. Same as ``'e'`` except it uses an upper case 'E' as the " "separator character." msgstr "" -#: ../../library/string.rst:506 +#: ../../library/string.rst:507 msgid "``'f'``" msgstr "``'f'``" -#: ../../library/string.rst:506 +#: ../../library/string.rst:507 msgid "" "Fixed-point notation. For a given precision ``p``, formats the number as a " "decimal number with exactly ``p`` digits following the decimal point. With " @@ -717,21 +717,21 @@ msgid "" "used." msgstr "" -#: ../../library/string.rst:516 +#: ../../library/string.rst:517 msgid "``'F'``" msgstr "``'F'``" -#: ../../library/string.rst:516 +#: ../../library/string.rst:517 msgid "" "Fixed-point notation. Same as ``'f'``, but converts ``nan`` to ``NAN`` and " "``inf`` to ``INF``." msgstr "" -#: ../../library/string.rst:519 +#: ../../library/string.rst:520 msgid "``'g'``" msgstr "``'g'``" -#: ../../library/string.rst:519 +#: ../../library/string.rst:520 msgid "" "General format. For a given precision ``p >= 1``, this rounds the number to " "``p`` significant digits and then formats the result in either fixed-point " @@ -739,7 +739,7 @@ msgid "" "``0`` is treated as equivalent to a precision of ``1``." msgstr "" -#: ../../library/string.rst:526 +#: ../../library/string.rst:527 msgid "" "The precise rules are as follows: suppose that the result formatted with " "presentation type ``'e'`` and precision ``p-1`` would have exponent " @@ -752,7 +752,7 @@ msgid "" "unless the ``'#'`` option is used." msgstr "" -#: ../../library/string.rst:539 +#: ../../library/string.rst:540 msgid "" "With no precision given, uses a precision of ``6`` significant digits for :" "class:`float`. For :class:`~decimal.Decimal`, the coefficient of the result " @@ -762,40 +762,40 @@ msgid "" "notation is used otherwise." msgstr "" -#: ../../library/string.rst:548 +#: ../../library/string.rst:549 msgid "" "Positive and negative infinity, positive and negative zero, and nans, are " "formatted as ``inf``, ``-inf``, ``0``, ``-0`` and ``nan`` respectively, " "regardless of the precision." msgstr "" -#: ../../library/string.rst:553 +#: ../../library/string.rst:554 msgid "``'G'``" msgstr "``'G'``" -#: ../../library/string.rst:553 +#: ../../library/string.rst:554 msgid "" "General format. Same as ``'g'`` except switches to ``'E'`` if the number " "gets too large. The representations of infinity and NaN are uppercased, too." msgstr "" -#: ../../library/string.rst:557 +#: ../../library/string.rst:558 msgid "" "Number. This is the same as ``'g'``, except that it uses the current locale " "setting to insert the appropriate number separator characters." msgstr "" -#: ../../library/string.rst:561 +#: ../../library/string.rst:562 msgid "``'%'``" msgstr "``'%'``" -#: ../../library/string.rst:561 +#: ../../library/string.rst:562 msgid "" "Percentage. Multiplies the number by 100 and displays in fixed (``'f'``) " "format, followed by a percent sign." msgstr "" -#: ../../library/string.rst:564 +#: ../../library/string.rst:565 msgid "" "For :class:`float` this is the same as ``'g'``, except that when fixed-point " "notation is used to format the result, it always includes at least one digit " @@ -803,96 +803,96 @@ msgid "" "represent the given value faithfully." msgstr "" -#: ../../library/string.rst:570 +#: ../../library/string.rst:571 msgid "" "For :class:`~decimal.Decimal`, this is the same as either ``'g'`` or ``'G'`` " "depending on the value of ``context.capitals`` for the current decimal " "context." msgstr "" -#: ../../library/string.rst:574 +#: ../../library/string.rst:575 msgid "" "The overall effect is to match the output of :func:`str` as altered by the " "other format modifiers." msgstr "" -#: ../../library/string.rst:582 +#: ../../library/string.rst:583 msgid "Format examples" msgstr "" -#: ../../library/string.rst:584 +#: ../../library/string.rst:585 msgid "" "This section contains examples of the :meth:`str.format` syntax and " "comparison with the old ``%``-formatting." msgstr "" -#: ../../library/string.rst:587 +#: ../../library/string.rst:588 msgid "" "In most of the cases the syntax is similar to the old ``%``-formatting, with " "the addition of the ``{}`` and with ``:`` used instead of ``%``. For " "example, ``'%03.2f'`` can be translated to ``'{:03.2f}'``." msgstr "" -#: ../../library/string.rst:591 +#: ../../library/string.rst:592 msgid "" "The new format syntax also supports new and different options, shown in the " "following examples." msgstr "" -#: ../../library/string.rst:594 +#: ../../library/string.rst:595 msgid "Accessing arguments by position::" msgstr "" -#: ../../library/string.rst:607 +#: ../../library/string.rst:608 msgid "Accessing arguments by name::" msgstr "" -#: ../../library/string.rst:615 +#: ../../library/string.rst:616 msgid "Accessing arguments' attributes::" msgstr "" -#: ../../library/string.rst:630 +#: ../../library/string.rst:631 msgid "Accessing arguments' items::" msgstr "" -#: ../../library/string.rst:636 +#: ../../library/string.rst:637 msgid "Replacing ``%s`` and ``%r``::" msgstr "" -#: ../../library/string.rst:641 +#: ../../library/string.rst:642 msgid "Aligning the text and specifying a width::" msgstr "" -#: ../../library/string.rst:652 +#: ../../library/string.rst:653 msgid "Replacing ``%+f``, ``%-f``, and ``% f`` and specifying a sign::" msgstr "" -#: ../../library/string.rst:661 +#: ../../library/string.rst:662 msgid "" "Replacing ``%x`` and ``%o`` and converting the value to different bases::" msgstr "" -#: ../../library/string.rst:670 +#: ../../library/string.rst:671 msgid "Using the comma as a thousands separator::" msgstr "" -#: ../../library/string.rst:675 +#: ../../library/string.rst:676 msgid "Expressing a percentage::" msgstr "" -#: ../../library/string.rst:682 +#: ../../library/string.rst:683 msgid "Using type-specific formatting::" msgstr "" -#: ../../library/string.rst:689 +#: ../../library/string.rst:690 msgid "Nesting arguments and more complex examples::" msgstr "" -#: ../../library/string.rst:723 +#: ../../library/string.rst:724 msgid "Template strings" msgstr "" -#: ../../library/string.rst:725 +#: ../../library/string.rst:726 msgid "" "Template strings provide simpler string substitutions as described in :pep:" "`292`. A primary use case for template strings is for internationalization " @@ -902,17 +902,17 @@ msgid "" "the `flufl.i18n `_ package." msgstr "" -#: ../../library/string.rst:735 +#: ../../library/string.rst:736 msgid "" "Template strings support ``$``-based substitutions, using the following " "rules:" msgstr "" -#: ../../library/string.rst:737 +#: ../../library/string.rst:738 msgid "``$$`` is an escape; it is replaced with a single ``$``." msgstr "" -#: ../../library/string.rst:739 +#: ../../library/string.rst:740 msgid "" "``$identifier`` names a substitution placeholder matching a mapping key of ``" "\"identifier\"``. By default, ``\"identifier\"`` is restricted to any case-" @@ -921,30 +921,30 @@ msgid "" "after the ``$`` character terminates this placeholder specification." msgstr "" -#: ../../library/string.rst:746 +#: ../../library/string.rst:747 msgid "" "``${identifier}`` is equivalent to ``$identifier``. It is required when " "valid identifier characters follow the placeholder but are not part of the " "placeholder, such as ``\"${noun}ification\"``." msgstr "" -#: ../../library/string.rst:750 +#: ../../library/string.rst:751 msgid "" "Any other appearance of ``$`` in the string will result in a :exc:" "`ValueError` being raised." msgstr "" -#: ../../library/string.rst:753 +#: ../../library/string.rst:754 msgid "" "The :mod:`string` module provides a :class:`Template` class that implements " "these rules. The methods of :class:`Template` are:" msgstr "" -#: ../../library/string.rst:759 +#: ../../library/string.rst:760 msgid "The constructor takes a single argument which is the template string." msgstr "" -#: ../../library/string.rst:764 +#: ../../library/string.rst:765 msgid "" "Performs the template substitution, returning a new string. *mapping* is " "any dictionary-like object with keys that match the placeholders in the " @@ -953,7 +953,7 @@ msgid "" "there are duplicates, the placeholders from *kwds* take precedence." msgstr "" -#: ../../library/string.rst:773 +#: ../../library/string.rst:774 msgid "" "Like :meth:`substitute`, except that if placeholders are missing from " "*mapping* and *kwds*, instead of raising a :exc:`KeyError` exception, the " @@ -962,7 +962,7 @@ msgid "" "simply return ``$`` instead of raising :exc:`ValueError`." msgstr "" -#: ../../library/string.rst:779 +#: ../../library/string.rst:780 msgid "" "While other exceptions may still occur, this method is called \"safe\" " "because it always tries to return a usable string instead of raising an " @@ -972,21 +972,21 @@ msgid "" "Python identifiers." msgstr "" -#: ../../library/string.rst:786 +#: ../../library/string.rst:787 msgid ":class:`Template` instances also provide one public data attribute:" msgstr "" -#: ../../library/string.rst:790 +#: ../../library/string.rst:791 msgid "" "This is the object passed to the constructor's *template* argument. In " "general, you shouldn't change it, but read-only access is not enforced." msgstr "" -#: ../../library/string.rst:793 +#: ../../library/string.rst:794 msgid "Here is an example of how to use a Template::" msgstr "" -#: ../../library/string.rst:811 +#: ../../library/string.rst:812 msgid "" "Advanced usage: you can derive subclasses of :class:`Template` to customize " "the placeholder syntax, delimiter character, or the entire regular " @@ -994,7 +994,7 @@ msgid "" "these class attributes:" msgstr "" -#: ../../library/string.rst:816 +#: ../../library/string.rst:817 msgid "" "*delimiter* -- This is the literal string describing a placeholder " "introducing delimiter. The default value is ``$``. Note that this should " @@ -1004,7 +1004,7 @@ msgid "" "the subclass's class namespace)." msgstr "" -#: ../../library/string.rst:823 +#: ../../library/string.rst:824 msgid "" "*idpattern* -- This is the regular expression describing the pattern for non-" "braced placeholders. The default value is the regular expression ``(?a:[_a-" @@ -1012,19 +1012,19 @@ msgid "" "pattern will also apply to braced placeholders." msgstr "" -#: ../../library/string.rst:830 +#: ../../library/string.rst:831 msgid "" "Since default *flags* is ``re.IGNORECASE``, pattern ``[a-z]`` can match with " "some non-ASCII characters. That's why we use the local ``a`` flag here." msgstr "" -#: ../../library/string.rst:834 +#: ../../library/string.rst:835 msgid "" "*braceidpattern* can be used to define separate patterns used inside and " "outside the braces." msgstr "" -#: ../../library/string.rst:838 +#: ../../library/string.rst:839 msgid "" "*braceidpattern* -- This is like *idpattern* but describes the pattern for " "braced placeholders. Defaults to ``None`` which means to fall back to " @@ -1033,7 +1033,7 @@ msgid "" "unbraced placeholders." msgstr "" -#: ../../library/string.rst:846 +#: ../../library/string.rst:847 msgid "" "*flags* -- The regular expression flags that will be applied when compiling " "the regular expression used for recognizing substitutions. The default " @@ -1042,7 +1042,7 @@ msgid "" "regular expressions." msgstr "" -#: ../../library/string.rst:854 +#: ../../library/string.rst:855 msgid "" "Alternatively, you can provide the entire regular expression pattern by " "overriding the class attribute *pattern*. If you do this, the value must be " @@ -1051,35 +1051,35 @@ msgid "" "placeholder rule:" msgstr "" -#: ../../library/string.rst:860 +#: ../../library/string.rst:861 msgid "" "*escaped* -- This group matches the escape sequence, e.g. ``$$``, in the " "default pattern." msgstr "" -#: ../../library/string.rst:863 +#: ../../library/string.rst:864 msgid "" "*named* -- This group matches the unbraced placeholder name; it should not " "include the delimiter in capturing group." msgstr "" -#: ../../library/string.rst:866 +#: ../../library/string.rst:867 msgid "" "*braced* -- This group matches the brace enclosed placeholder name; it " "should not include either the delimiter or braces in the capturing group." msgstr "" -#: ../../library/string.rst:869 +#: ../../library/string.rst:870 msgid "" "*invalid* -- This group matches any other delimiter pattern (usually a " "single delimiter), and it should appear last in the regular expression." msgstr "" -#: ../../library/string.rst:874 +#: ../../library/string.rst:875 msgid "Helper functions" msgstr "" -#: ../../library/string.rst:878 +#: ../../library/string.rst:879 msgid "" "Split the argument into words using :meth:`str.split`, capitalize each word " "using :meth:`str.capitalize`, and join the capitalized words using :meth:" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 2f28c061b8..bc6980a5cf 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-27 00:09+0000\n" +"POT-Creation-Date: 2022-02-13 08:54+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -137,7 +137,7 @@ msgstr "" msgid ":pep:`597`, Add optional EncodingWarning" msgstr "" -#: ../../whatsnew/3.10.rst:93 ../../whatsnew/3.10.rst:2037 +#: ../../whatsnew/3.10.rst:93 ../../whatsnew/3.10.rst:2042 msgid "New Features" msgstr "" @@ -1196,8 +1196,8 @@ msgstr "" msgid "doctest" msgstr "doctest" -#: ../../whatsnew/3.10.rst:1076 ../../whatsnew/3.10.rst:1192 -#: ../../whatsnew/3.10.rst:1213 ../../whatsnew/3.10.rst:1312 +#: ../../whatsnew/3.10.rst:1076 ../../whatsnew/3.10.rst:1197 +#: ../../whatsnew/3.10.rst:1218 ../../whatsnew/3.10.rst:1317 msgid "" "When a module does not define ``__loader__``, fall back to ``__spec__." "loader``. (Contributed by Brett Cannon in :issue:`42133`.)" @@ -1318,7 +1318,7 @@ msgid "" msgstr "" #: ../../whatsnew/3.10.rst:1151 -msgid "These changes were backported to a 3.9 maintenance release." +msgid "The changes above were backported to a 3.9 maintenance release." msgstr "" #: ../../whatsnew/3.10.rst:1153 @@ -1349,17 +1349,27 @@ msgid "" "(Contributed by Tal Einat in :issue:`44010`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1174 +#: ../../whatsnew/3.10.rst:1173 +msgid "New in 3.10 maintenance releases." +msgstr "" + +#: ../../whatsnew/3.10.rst:1175 +msgid "" +"Apply syntax highlighting to `.pyi` files. (Contributed by Alex Waygood and " +"Terry Jan Reedy in :issue:`45447`.)" +msgstr "" + +#: ../../whatsnew/3.10.rst:1179 msgid "importlib.metadata" msgstr "importlib.metadata" -#: ../../whatsnew/3.10.rst:1176 +#: ../../whatsnew/3.10.rst:1181 msgid "" "Feature parity with ``importlib_metadata`` 4.6 (`history `_)." msgstr "" -#: ../../whatsnew/3.10.rst:1179 +#: ../../whatsnew/3.10.rst:1184 msgid "" ":ref:`importlib.metadata entry points ` now provide a nicer " "experience for selecting entry points by group and name through a new :class:" @@ -1367,18 +1377,18 @@ msgid "" "docs for more info on the deprecation and usage." msgstr "" -#: ../../whatsnew/3.10.rst:1185 +#: ../../whatsnew/3.10.rst:1190 msgid "" "Added :func:`importlib.metadata.packages_distributions` for resolving top-" "level Python modules and packages to their :class:`importlib.metadata." "Distribution`." msgstr "" -#: ../../whatsnew/3.10.rst:1190 +#: ../../whatsnew/3.10.rst:1195 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.10.rst:1195 +#: ../../whatsnew/3.10.rst:1200 msgid "" "Add :func:`inspect.get_annotations`, which safely computes the annotations " "defined on an object. It works around the quirks of accessing the " @@ -1396,28 +1406,28 @@ msgid "" "`43817`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1211 +#: ../../whatsnew/3.10.rst:1216 msgid "linecache" msgstr "linecache" -#: ../../whatsnew/3.10.rst:1217 +#: ../../whatsnew/3.10.rst:1222 msgid "os" msgstr "os" -#: ../../whatsnew/3.10.rst:1219 +#: ../../whatsnew/3.10.rst:1224 msgid "" "Add :func:`os.cpu_count()` support for VxWorks RTOS. (Contributed by Peixing " "Xin in :issue:`41440`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1222 +#: ../../whatsnew/3.10.rst:1227 msgid "" "Add a new function :func:`os.eventfd` and related helpers to wrap the " "``eventfd2`` syscall on Linux. (Contributed by Christian Heimes in :issue:" "`41001`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1226 +#: ../../whatsnew/3.10.rst:1231 msgid "" "Add :func:`os.splice()` that allows to move data between two file " "descriptors without copying between kernel address space and user address " @@ -1425,41 +1435,41 @@ msgid "" "by Pablo Galindo in :issue:`41625`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1231 +#: ../../whatsnew/3.10.rst:1236 msgid "" "Add :data:`~os.O_EVTONLY`, :data:`~os.O_FSYNC`, :data:`~os.O_SYMLINK` and :" "data:`~os.O_NOFOLLOW_ANY` for macOS. (Contributed by Dong-hee Na in :issue:" "`43106`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1236 +#: ../../whatsnew/3.10.rst:1241 msgid "os.path" msgstr "os.path" -#: ../../whatsnew/3.10.rst:1238 +#: ../../whatsnew/3.10.rst:1243 msgid "" ":func:`os.path.realpath` now accepts a *strict* keyword-only argument. When " "set to ``True``, :exc:`OSError` is raised if a path doesn't exist or a " "symlink loop is encountered. (Contributed by Barney Gale in :issue:`43757`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1244 +#: ../../whatsnew/3.10.rst:1249 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.10.rst:1246 +#: ../../whatsnew/3.10.rst:1251 msgid "" "Add slice support to :attr:`PurePath.parents `. " "(Contributed by Joshua Cannon in :issue:`35498`)" msgstr "" -#: ../../whatsnew/3.10.rst:1249 +#: ../../whatsnew/3.10.rst:1254 msgid "" "Add negative indexing support to :attr:`PurePath.parents `. (Contributed by Yaroslav Pankovych in :issue:`21041`)" msgstr "" -#: ../../whatsnew/3.10.rst:1253 +#: ../../whatsnew/3.10.rst:1258 msgid "" "Add :meth:`Path.hardlink_to ` method that " "supersedes :meth:`~pathlib.Path.link_to`. The new method has the same " @@ -1467,7 +1477,7 @@ msgid "" "Gale in :issue:`39950`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1258 +#: ../../whatsnew/3.10.rst:1263 msgid "" ":meth:`pathlib.Path.stat` and :meth:`~pathlib.Path.chmod` now accept a " "*follow_symlinks* keyword-only argument for consistency with corresponding " @@ -1475,11 +1485,11 @@ msgid "" "`39906`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1264 +#: ../../whatsnew/3.10.rst:1269 msgid "platform" msgstr "platform" -#: ../../whatsnew/3.10.rst:1266 +#: ../../whatsnew/3.10.rst:1271 msgid "" "Add :func:`platform.freedesktop_os_release()` to retrieve operation system " "identification from `freedesktop.org os-release ` section for " "more information." msgstr "" -#: ../../whatsnew/3.10.rst:1611 +#: ../../whatsnew/3.10.rst:1616 msgid "" "Non-integer arguments to :func:`random.randrange` are deprecated. The :exc:" "`ValueError` is deprecated in favor of a :exc:`TypeError`. (Contributed by " "Serhiy Storchaka and Raymond Hettinger in :issue:`37319`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1615 +#: ../../whatsnew/3.10.rst:1620 msgid "" "The various ``load_module()`` methods of :mod:`importlib` have been " "documented as deprecated since Python 3.6, but will now also trigger a :exc:" @@ -2005,21 +2015,21 @@ msgid "" "(Contributed by Brett Cannon in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1621 +#: ../../whatsnew/3.10.rst:1626 msgid "" ":meth:`zimport.zipimporter.load_module` has been deprecated in preference " "for :meth:`~zipimport.zipimporter.exec_module`. (Contributed by Brett Cannon " "in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1625 +#: ../../whatsnew/3.10.rst:1630 msgid "" "The use of :meth:`~importlib.abc.Loader.load_module` by the import system " "now triggers an :exc:`ImportWarning` as :meth:`~importlib.abc.Loader." "exec_module` is preferred. (Contributed by Brett Cannon in :issue:`26131`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1630 +#: ../../whatsnew/3.10.rst:1635 msgid "" "The use of :meth:`importlib.abc.MetaPathFinder.find_module` and :meth:" "`importlib.abc.PathEntryFinder.find_module` by the import system now trigger " @@ -2029,7 +2039,7 @@ msgid "" "porting. (Contributed by Brett Cannon in :issue:`42134`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1639 +#: ../../whatsnew/3.10.rst:1644 msgid "" "The use of :meth:`importlib.abc.PathEntryFinder.find_loader` by the import " "system now triggers an :exc:`ImportWarning` as :meth:`importlib.abc." @@ -2038,7 +2048,7 @@ msgid "" "`43672`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1645 +#: ../../whatsnew/3.10.rst:1650 msgid "" "The various implementations of :meth:`importlib.abc.MetaPathFinder." "find_module` ( :meth:`importlib.machinery.BuiltinImporter.find_module`, :" @@ -2053,7 +2063,7 @@ msgid "" "Python 3.4). (Contributed by Brett Cannon in :issue:`42135`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1660 +#: ../../whatsnew/3.10.rst:1665 msgid "" ":class:`importlib.abc.Finder` is deprecated (including its sole method, :" "meth:`~importlib.abc.Finder.find_module`). Both :class:`importlib.abc." @@ -2062,7 +2072,7 @@ msgid "" "appropriate instead. (Contributed by Brett Cannon in :issue:`42135`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1667 +#: ../../whatsnew/3.10.rst:1672 msgid "" "The deprecations of :mod:`imp`, :func:`importlib.find_loader`, :func:" "`importlib.util.set_package_wrapper`, :func:`importlib.util." @@ -2073,7 +2083,7 @@ msgid "" "Brett Cannon in :issue:`43720`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1677 +#: ../../whatsnew/3.10.rst:1682 msgid "" "The import system now uses the ``__spec__`` attribute on modules before " "falling back on :meth:`~importlib.abc.Loader.module_repr` for a module's " @@ -2081,7 +2091,7 @@ msgid "" "for Python 3.12. (Contributed by Brett Cannon in :issue:`42137`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1683 +#: ../../whatsnew/3.10.rst:1688 msgid "" ":meth:`importlib.abc.Loader.module_repr`, :meth:`importlib.machinery." "FrozenLoader.module_repr`, and :meth:`importlib.machinery.BuiltinLoader." @@ -2089,7 +2099,7 @@ msgid "" "(Contributed by Brett Cannon in :issue:`42136`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1689 +#: ../../whatsnew/3.10.rst:1694 msgid "" "``sqlite3.OptimizedUnicode`` has been undocumented and obsolete since Python " "3.3, when it was made an alias to :class:`str`. It is now deprecated, " @@ -2097,7 +2107,7 @@ msgid "" "issue:`42264`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1694 +#: ../../whatsnew/3.10.rst:1699 msgid "" ":func:`asyncio.get_event_loop` now emits a deprecation warning if there is " "no running event loop. In the future it will be an alias of :func:`~asyncio." @@ -2111,7 +2121,7 @@ msgid "" "(Contributed by Serhiy Storchaka in :issue:`39529`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1707 +#: ../../whatsnew/3.10.rst:1712 msgid "" "The undocumented built-in function ``sqlite3.enable_shared_cache`` is now " "deprecated, scheduled for removal in Python 3.12. Its use is strongly " @@ -2121,68 +2131,68 @@ msgid "" "query parameter. (Contributed by Erlend E. Aasland in :issue:`24464`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1715 +#: ../../whatsnew/3.10.rst:1720 msgid "The following ``threading`` methods are now deprecated:" msgstr "" -#: ../../whatsnew/3.10.rst:1717 +#: ../../whatsnew/3.10.rst:1722 msgid "``threading.currentThread`` => :func:`threading.current_thread`" msgstr "``threading.currentThread`` => :func:`threading.current_thread`" -#: ../../whatsnew/3.10.rst:1719 +#: ../../whatsnew/3.10.rst:1724 msgid "``threading.activeCount`` => :func:`threading.active_count`" msgstr "``threading.activeCount`` => :func:`threading.active_count`" -#: ../../whatsnew/3.10.rst:1721 +#: ../../whatsnew/3.10.rst:1726 msgid "" "``threading.Condition.notifyAll`` => :meth:`threading.Condition.notify_all`" msgstr "" "``threading.Condition.notifyAll`` => :meth:`threading.Condition.notify_all`" -#: ../../whatsnew/3.10.rst:1724 +#: ../../whatsnew/3.10.rst:1729 msgid "``threading.Event.isSet`` => :meth:`threading.Event.is_set`" msgstr "``threading.Event.isSet`` => :meth:`threading.Event.is_set`" -#: ../../whatsnew/3.10.rst:1726 +#: ../../whatsnew/3.10.rst:1731 msgid "``threading.Thread.setName`` => :attr:`threading.Thread.name`" msgstr "``threading.Thread.setName`` => :attr:`threading.Thread.name`" -#: ../../whatsnew/3.10.rst:1728 +#: ../../whatsnew/3.10.rst:1733 msgid "``threading.thread.getName`` => :attr:`threading.Thread.name`" msgstr "``threading.thread.getName`` => :attr:`threading.Thread.name`" -#: ../../whatsnew/3.10.rst:1730 +#: ../../whatsnew/3.10.rst:1735 msgid "``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon`" msgstr "``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon`" -#: ../../whatsnew/3.10.rst:1732 +#: ../../whatsnew/3.10.rst:1737 msgid "``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon`" msgstr "``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon`" -#: ../../whatsnew/3.10.rst:1734 +#: ../../whatsnew/3.10.rst:1739 msgid "(Contributed by Jelle Zijlstra in :issue:`21574`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1736 +#: ../../whatsnew/3.10.rst:1741 msgid "" ":meth:`pathlib.Path.link_to` is deprecated and slated for removal in Python " "3.12. Use :meth:`pathlib.Path.hardlink_to` instead. (Contributed by Barney " "Gale in :issue:`39950`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1740 +#: ../../whatsnew/3.10.rst:1745 msgid "" "``cgi.log()`` is deprecated and slated for removal in Python 3.12. " "(Contributed by Inada Naoki in :issue:`41139`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1743 +#: ../../whatsnew/3.10.rst:1748 msgid "" "The following :mod:`ssl` features have been deprecated since Python 3.6, " "Python 3.7, or OpenSSL 1.1.0 and will be removed in 3.11:" msgstr "" -#: ../../whatsnew/3.10.rst:1746 +#: ../../whatsnew/3.10.rst:1751 msgid "" ":data:`~ssl.OP_NO_SSLv2`, :data:`~ssl.OP_NO_SSLv3`, :data:`~ssl." "OP_NO_TLSv1`, :data:`~ssl.OP_NO_TLSv1_1`, :data:`~ssl.OP_NO_TLSv1_2`, and :" @@ -2190,7 +2200,7 @@ msgid "" "minimum_version` and :attr:`sslSSLContext.maximum_version`." msgstr "" -#: ../../whatsnew/3.10.rst:1752 +#: ../../whatsnew/3.10.rst:1757 msgid "" ":data:`~ssl.PROTOCOL_SSLv2`, :data:`~ssl.PROTOCOL_SSLv3`, :data:`~ssl." "PROTOCOL_SSLv23`, :data:`~ssl.PROTOCOL_TLSv1`, :data:`~ssl." @@ -2199,26 +2209,26 @@ msgid "" "and :data:`~ssl.PROTOCOL_TLS_SERVER`" msgstr "" -#: ../../whatsnew/3.10.rst:1758 +#: ../../whatsnew/3.10.rst:1763 msgid "" ":func:`~ssl.wrap_socket` is replaced by :meth:`ssl.SSLContext.wrap_socket`" msgstr "" -#: ../../whatsnew/3.10.rst:1760 +#: ../../whatsnew/3.10.rst:1765 msgid ":func:`~ssl.match_hostname`" msgstr ":func:`~ssl.match_hostname`" -#: ../../whatsnew/3.10.rst:1762 +#: ../../whatsnew/3.10.rst:1767 msgid ":func:`~ssl.RAND_pseudo_bytes`, :func:`~ssl.RAND_egd`" msgstr ":func:`~ssl.RAND_pseudo_bytes`, :func:`~ssl.RAND_egd`" -#: ../../whatsnew/3.10.rst:1764 +#: ../../whatsnew/3.10.rst:1769 msgid "" "NPN features like :meth:`ssl.SSLSocket.selected_npn_protocol` and :meth:`ssl." "SSLContext.set_npn_protocols` are replaced by ALPN." msgstr "" -#: ../../whatsnew/3.10.rst:1767 +#: ../../whatsnew/3.10.rst:1772 msgid "" "The threading debug (:envvar:`PYTHONTHREADDEBUG` environment variable) is " "deprecated in Python 3.10 and will be removed in Python 3.12. This feature " @@ -2226,7 +2236,7 @@ msgid "" "Victor Stinner in :issue:`44584`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1772 +#: ../../whatsnew/3.10.rst:1777 msgid "" "Importing from the ``typing.io`` and ``typing.re`` submodules will now emit :" "exc:`DeprecationWarning`. These submodules will be removed in a future " @@ -2235,11 +2245,11 @@ msgid "" "Rittau in :issue:`38291`)" msgstr "" -#: ../../whatsnew/3.10.rst:1781 ../../whatsnew/3.10.rst:2206 +#: ../../whatsnew/3.10.rst:1786 ../../whatsnew/3.10.rst:2211 msgid "Removed" msgstr "" -#: ../../whatsnew/3.10.rst:1783 +#: ../../whatsnew/3.10.rst:1788 msgid "" "Removed special methods ``__int__``, ``__float__``, ``__floordiv__``, " "``__mod__``, ``__divmod__``, ``__rfloordiv__``, ``__rmod__`` and " @@ -2247,7 +2257,7 @@ msgid "" "`TypeError`. (Contributed by Serhiy Storchaka in :issue:`41974`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1789 +#: ../../whatsnew/3.10.rst:1794 msgid "" "The ``ParserBase.error()`` method from the private and undocumented " "``_markupbase`` module has been removed. :class:`html.parser.HTMLParser` is " @@ -2256,7 +2266,7 @@ msgid "" "`31844`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1795 +#: ../../whatsnew/3.10.rst:1800 msgid "" "Removed the ``unicodedata.ucnhash_CAPI`` attribute which was an internal " "PyCapsule object. The related private ``_PyUnicode_Name_CAPI`` structure was " @@ -2264,7 +2274,7 @@ msgid "" "`42157`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1800 +#: ../../whatsnew/3.10.rst:1805 msgid "" "Removed the ``parser`` module, which was deprecated in 3.9 due to the switch " "to the new PEG parser, as well as all the C source and header files that " @@ -2272,7 +2282,7 @@ msgid "" "``graminit.h`` and ``grammar.h``." msgstr "" -#: ../../whatsnew/3.10.rst:1805 +#: ../../whatsnew/3.10.rst:1810 msgid "" "Removed the Public C API functions ``PyParser_SimpleParseStringFlags``, " "``PyParser_SimpleParseStringFlagsFilename``, " @@ -2280,7 +2290,7 @@ msgid "" "deprecated in 3.9 due to the switch to the new PEG parser." msgstr "" -#: ../../whatsnew/3.10.rst:1810 +#: ../../whatsnew/3.10.rst:1815 msgid "" "Removed the ``formatter`` module, which was deprecated in Python 3.4. It is " "somewhat obsolete, little used, and not tested. It was originally scheduled " @@ -2290,71 +2300,71 @@ msgid "" "`42299`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1817 +#: ../../whatsnew/3.10.rst:1822 msgid "" "Removed the :c:func:`PyModule_GetWarningsModule` function that was useless " "now due to the _warnings module was converted to a builtin module in 2.6. " "(Contributed by Hai Shi in :issue:`42599`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1821 +#: ../../whatsnew/3.10.rst:1826 msgid "" "Remove deprecated aliases to :ref:`collections-abstract-base-classes` from " "the :mod:`collections` module. (Contributed by Victor Stinner in :issue:" "`37324`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1825 +#: ../../whatsnew/3.10.rst:1830 msgid "" "The ``loop`` parameter has been removed from most of :mod:`asyncio`\\ 's :" "doc:`high-level API <../library/asyncio-api-index>` following deprecation in " "Python 3.8. The motivation behind this change is multifold:" msgstr "" -#: ../../whatsnew/3.10.rst:1829 +#: ../../whatsnew/3.10.rst:1834 msgid "This simplifies the high-level API." msgstr "" -#: ../../whatsnew/3.10.rst:1830 +#: ../../whatsnew/3.10.rst:1835 msgid "" "The functions in the high-level API have been implicitly getting the current " "thread's running event loop since Python 3.7. There isn't a need to pass " "the event loop to the API in most normal use cases." msgstr "" -#: ../../whatsnew/3.10.rst:1833 +#: ../../whatsnew/3.10.rst:1838 msgid "" "Event loop passing is error-prone especially when dealing with loops running " "in different threads." msgstr "" -#: ../../whatsnew/3.10.rst:1836 +#: ../../whatsnew/3.10.rst:1841 msgid "" "Note that the low-level API will still accept ``loop``. See :ref:`changes-" "python-api` for examples of how to replace existing code." msgstr "" -#: ../../whatsnew/3.10.rst:1839 ../../whatsnew/3.10.rst:1911 +#: ../../whatsnew/3.10.rst:1844 ../../whatsnew/3.10.rst:1916 msgid "" "(Contributed by Yurii Karabas, Andrew Svetlov, Yury Selivanov and Kyle " "Stanley in :issue:`42392`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1844 ../../whatsnew/3.10.rst:2131 +#: ../../whatsnew/3.10.rst:1849 ../../whatsnew/3.10.rst:2136 msgid "Porting to Python 3.10" msgstr "" -#: ../../whatsnew/3.10.rst:1846 +#: ../../whatsnew/3.10.rst:1851 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.10.rst:1851 +#: ../../whatsnew/3.10.rst:1856 msgid "Changes in the Python syntax" msgstr "" -#: ../../whatsnew/3.10.rst:1853 +#: ../../whatsnew/3.10.rst:1858 msgid "" "Deprecation warning is now emitted when compiling previously valid syntax if " "the numeric literal is immediately followed by a keyword (like in ``0in " @@ -2364,11 +2374,11 @@ msgid "" "following keyword. (Contributed by Serhiy Storchaka in :issue:`43833`)." msgstr "" -#: ../../whatsnew/3.10.rst:1864 +#: ../../whatsnew/3.10.rst:1869 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.10.rst:1866 +#: ../../whatsnew/3.10.rst:1871 msgid "" "The *etype* parameters of the :func:`~traceback.format_exception`, :func:" "`~traceback.format_exception_only`, and :func:`~traceback.print_exception` " @@ -2376,7 +2386,7 @@ msgid "" "(Contributed by Zackery Spytz and Matthias Bussonnier in :issue:`26389`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1872 +#: ../../whatsnew/3.10.rst:1877 msgid "" ":mod:`atexit`: At Python exit, if a callback registered with :func:`atexit." "register` fails, its exception is now logged. Previously, only some " @@ -2384,7 +2394,7 @@ msgid "" "(Contributed by Victor Stinner in :issue:`42639`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1878 +#: ../../whatsnew/3.10.rst:1883 msgid "" ":class:`collections.abc.Callable` generic now flattens type parameters, " "similar to what :data:`typing.Callable` currently does. This means that " @@ -2397,7 +2407,7 @@ msgid "" "`42195`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1888 +#: ../../whatsnew/3.10.rst:1893 msgid "" ":meth:`socket.htons` and :meth:`socket.ntohs` now raise :exc:`OverflowError` " "instead of :exc:`DeprecationWarning` if the given parameter will not fit in " @@ -2405,29 +2415,29 @@ msgid "" "`42393`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1893 +#: ../../whatsnew/3.10.rst:1898 msgid "" "The ``loop`` parameter has been removed from most of :mod:`asyncio`\\ 's :" "doc:`high-level API <../library/asyncio-api-index>` following deprecation in " "Python 3.8." msgstr "" -#: ../../whatsnew/3.10.rst:1897 +#: ../../whatsnew/3.10.rst:1902 msgid "A coroutine that currently looks like this::" msgstr "" -#: ../../whatsnew/3.10.rst:1902 +#: ../../whatsnew/3.10.rst:1907 msgid "Should be replaced with this::" msgstr "" -#: ../../whatsnew/3.10.rst:1907 +#: ../../whatsnew/3.10.rst:1912 msgid "" "If ``foo()`` was specifically designed *not* to run in the current thread's " "running event loop (e.g. running in another thread's event loop), consider " "using :func:`asyncio.run_coroutine_threadsafe` instead." msgstr "" -#: ../../whatsnew/3.10.rst:1914 +#: ../../whatsnew/3.10.rst:1919 msgid "" "The :data:`types.FunctionType` constructor now inherits the current builtins " "if the *globals* dictionary has no ``\"__builtins__\"`` key, rather than " @@ -2438,11 +2448,11 @@ msgid "" "`42990`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1923 +#: ../../whatsnew/3.10.rst:1928 msgid "Changes in the C API" msgstr "" -#: ../../whatsnew/3.10.rst:1925 +#: ../../whatsnew/3.10.rst:1930 msgid "" "The C API functions ``PyParser_SimpleParseStringFlags``, " "``PyParser_SimpleParseStringFlagsFilename``, " @@ -2451,31 +2461,31 @@ msgid "" "PEG parser." msgstr "" -#: ../../whatsnew/3.10.rst:1931 +#: ../../whatsnew/3.10.rst:1936 msgid "" "Source should be now be compiled directly to a code object using, for " "example, :c:func:`Py_CompileString`. The resulting code object can then be " "evaluated using, for example, :c:func:`PyEval_EvalCode`." msgstr "" -#: ../../whatsnew/3.10.rst:1935 +#: ../../whatsnew/3.10.rst:1940 msgid "Specifically:" msgstr "" -#: ../../whatsnew/3.10.rst:1937 +#: ../../whatsnew/3.10.rst:1942 msgid "" "A call to ``PyParser_SimpleParseStringFlags`` followed by ``PyNode_Compile`` " "can be replaced by calling :c:func:`Py_CompileString`." msgstr "" -#: ../../whatsnew/3.10.rst:1940 +#: ../../whatsnew/3.10.rst:1945 msgid "" "There is no direct replacement for ``PyParser_SimpleParseFileFlags``. To " "compile code from a ``FILE *`` argument, you will need to read the file in C " "and pass the resulting buffer to :c:func:`Py_CompileString`." msgstr "" -#: ../../whatsnew/3.10.rst:1944 +#: ../../whatsnew/3.10.rst:1949 msgid "" "To compile a file given a ``char *`` filename, explicitly open the file, " "read it and compile the result. One way to do this is using the :py:mod:`io` " @@ -2484,7 +2494,7 @@ msgid "" "(Declarations and error handling are omitted.) ::" msgstr "" -#: ../../whatsnew/3.10.rst:1957 +#: ../../whatsnew/3.10.rst:1962 msgid "" "For ``FrameObject`` objects, the ``f_lasti`` member now represents a " "wordcode offset instead of a simple offset into the bytecode string. This " @@ -2494,53 +2504,53 @@ msgid "" "considered stable: please use :c:func:`PyFrame_GetLineNumber` instead." msgstr "" -#: ../../whatsnew/3.10.rst:1965 +#: ../../whatsnew/3.10.rst:1970 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.10.rst:1967 +#: ../../whatsnew/3.10.rst:1972 msgid "" "The ``MAKE_FUNCTION`` instruction now accepts either a dict or a tuple of " "strings as the function's annotations. (Contributed by Yurii Karabas and " "Inada Naoki in :issue:`42202`)" msgstr "" -#: ../../whatsnew/3.10.rst:1972 +#: ../../whatsnew/3.10.rst:1977 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.10.rst:1974 +#: ../../whatsnew/3.10.rst:1979 msgid "" ":pep:`644`: Python now requires OpenSSL 1.1.1 or newer. OpenSSL 1.0.2 is no " "longer supported. (Contributed by Christian Heimes in :issue:`43669`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1978 +#: ../../whatsnew/3.10.rst:1983 msgid "" "The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` are now " "required to build Python. (Contributed by Victor Stinner in :issue:`36020`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1982 +#: ../../whatsnew/3.10.rst:1987 msgid "" ":mod:`sqlite3` requires SQLite 3.7.15 or higher. (Contributed by Sergey " "Fedoseev and Erlend E. Aasland in :issue:`40744` and :issue:`40810`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1985 +#: ../../whatsnew/3.10.rst:1990 msgid "" "The :mod:`atexit` module must now always be built as a built-in module. " "(Contributed by Victor Stinner in :issue:`42639`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1988 +#: ../../whatsnew/3.10.rst:1993 msgid "" "Add :option:`--disable-test-modules` option to the ``configure`` script: " "don't build nor install test modules. (Contributed by Xavier de Gaye, Thomas " "Petazzoni and Peixing Xin in :issue:`27640`.)" msgstr "" -#: ../../whatsnew/3.10.rst:1992 +#: ../../whatsnew/3.10.rst:1997 msgid "" "Add :option:`--with-wheel-pkg-dir=PATH option <--with-wheel-pkg-dir>` to the " "``./configure`` script. If specified, the :mod:`ensurepip` module looks for " @@ -2549,7 +2559,7 @@ msgid "" "packages." msgstr "" -#: ../../whatsnew/3.10.rst:1998 +#: ../../whatsnew/3.10.rst:2003 msgid "" "Some Linux distribution packaging policies recommend against bundling " "dependencies. For example, Fedora installs wheel packages in the ``/usr/" @@ -2557,22 +2567,22 @@ msgid "" "_bundled`` package." msgstr "" -#: ../../whatsnew/3.10.rst:2003 +#: ../../whatsnew/3.10.rst:2008 msgid "(Contributed by Victor Stinner in :issue:`42856`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2005 +#: ../../whatsnew/3.10.rst:2010 msgid "" "Add a new :option:`configure --without-static-libpython option <--without-" "static-libpython>` to not build the ``libpythonMAJOR.MINOR.a`` static " "library and not install the ``python.o`` object file." msgstr "" -#: ../../whatsnew/3.10.rst:2009 +#: ../../whatsnew/3.10.rst:2014 msgid "(Contributed by Victor Stinner in :issue:`43103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2011 +#: ../../whatsnew/3.10.rst:2016 msgid "" "The ``configure`` script now uses the ``pkg-config`` utility, if available, " "to detect the location of Tcl/Tk headers and libraries. As before, those " @@ -2581,7 +2591,7 @@ msgid "" "(Contributed by Manolis Stamatogiannakis in :issue:`42603`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2017 +#: ../../whatsnew/3.10.rst:2022 msgid "" "Add :option:`--with-openssl-rpath` option to ``configure`` script. The " "option simplifies building Python with a custom OpenSSL installation, e.g. " @@ -2589,15 +2599,15 @@ msgid "" "(Contributed by Christian Heimes in :issue:`43466`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2024 +#: ../../whatsnew/3.10.rst:2029 msgid "C API Changes" msgstr "" -#: ../../whatsnew/3.10.rst:2027 +#: ../../whatsnew/3.10.rst:2032 msgid "PEP 652: Maintaining the Stable ABI" msgstr "" -#: ../../whatsnew/3.10.rst:2029 +#: ../../whatsnew/3.10.rst:2034 msgid "" "The Stable ABI (Application Binary Interface) for extension modules or " "embedding Python is now explicitly defined. :ref:`stable` describes C API " @@ -2605,25 +2615,25 @@ msgid "" "ABI." msgstr "" -#: ../../whatsnew/3.10.rst:2034 +#: ../../whatsnew/3.10.rst:2039 msgid "(Contributed by Petr Viktorin in :pep:`652` and :issue:`43795`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2039 +#: ../../whatsnew/3.10.rst:2044 msgid "" "The result of :c:func:`PyNumber_Index` now always has exact type :class:" "`int`. Previously, the result could have been an instance of a subclass of " "``int``. (Contributed by Serhiy Storchaka in :issue:`40792`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2043 +#: ../../whatsnew/3.10.rst:2048 msgid "" "Add a new :c:member:`~PyConfig.orig_argv` member to the :c:type:`PyConfig` " "structure: the list of the original command line arguments passed to the " "Python executable. (Contributed by Victor Stinner in :issue:`23427`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2048 +#: ../../whatsnew/3.10.rst:2053 msgid "" "The :c:func:`PyDateTime_DATE_GET_TZINFO` and :c:func:" "`PyDateTime_TIME_GET_TZINFO` macros have been added for accessing the " @@ -2631,72 +2641,72 @@ msgid "" "time` objects. (Contributed by Zackery Spytz in :issue:`30155`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2054 +#: ../../whatsnew/3.10.rst:2059 msgid "" "Add a :c:func:`PyCodec_Unregister` function to unregister a codec search " "function. (Contributed by Hai Shi in :issue:`41842`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2058 +#: ../../whatsnew/3.10.rst:2063 msgid "" "The :c:func:`PyIter_Send` function was added to allow sending value into " "iterator without raising ``StopIteration`` exception. (Contributed by " "Vladimir Matveev in :issue:`41756`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2062 +#: ../../whatsnew/3.10.rst:2067 msgid "" "Add :c:func:`PyUnicode_AsUTF8AndSize` to the limited C API. (Contributed by " "Alex Gaynor in :issue:`41784`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2065 +#: ../../whatsnew/3.10.rst:2070 msgid "" "Add :c:func:`PyModule_AddObjectRef` function: similar to :c:func:" "`PyModule_AddObject` but don't steal a reference to the value on success. " "(Contributed by Victor Stinner in :issue:`1635741`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2070 +#: ../../whatsnew/3.10.rst:2075 msgid "" "Add :c:func:`Py_NewRef` and :c:func:`Py_XNewRef` functions to increment the " "reference count of an object and return the object. (Contributed by Victor " "Stinner in :issue:`42262`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2074 +#: ../../whatsnew/3.10.rst:2079 msgid "" "The :c:func:`PyType_FromSpecWithBases` and :c:func:" "`PyType_FromModuleAndSpec` functions now accept a single class as the " "*bases* argument. (Contributed by Serhiy Storchaka in :issue:`42423`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2078 +#: ../../whatsnew/3.10.rst:2083 msgid "" "The :c:func:`PyType_FromModuleAndSpec` function now accepts NULL ``tp_doc`` " "slot. (Contributed by Hai Shi in :issue:`41832`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2082 +#: ../../whatsnew/3.10.rst:2087 msgid "" "The :c:func:`PyType_GetSlot` function can accept :ref:`static types `. (Contributed by Hai Shi and Petr Viktorin in :issue:`41073`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2086 +#: ../../whatsnew/3.10.rst:2091 msgid "" "Add a new :c:func:`PySet_CheckExact` function to the C-API to check if an " "object is an instance of :class:`set` but not an instance of a subtype. " "(Contributed by Pablo Galindo in :issue:`43277`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2090 +#: ../../whatsnew/3.10.rst:2095 msgid "" "Add :c:func:`PyErr_SetInterruptEx` which allows passing a signal number to " "simulate. (Contributed by Antoine Pitrou in :issue:`43356`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2094 +#: ../../whatsnew/3.10.rst:2099 msgid "" "The limited C API is now supported if :ref:`Python is built in debug mode " "` (if the ``Py_DEBUG`` macro is defined). In the limited C API, " @@ -2709,14 +2719,14 @@ msgid "" "`36465`)." msgstr "" -#: ../../whatsnew/3.10.rst:2104 +#: ../../whatsnew/3.10.rst:2109 msgid "" "The limited C API is still not supported in the :option:`--with-trace-refs` " "special build (``Py_TRACE_REFS`` macro). (Contributed by Victor Stinner in :" "issue:`43688`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2108 +#: ../../whatsnew/3.10.rst:2113 msgid "" "Add the :c:func:`Py_Is(x, y) ` function to test if the *x* object is " "the *y* object, the same as ``x is y`` in Python. Add also the :c:func:" @@ -2726,7 +2736,7 @@ msgid "" "`43753`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2115 +#: ../../whatsnew/3.10.rst:2120 msgid "" "Add new functions to control the garbage collector from C code: :c:func:" "`PyGC_Enable()`, :c:func:`PyGC_Disable()`, :c:func:`PyGC_IsEnabled()`. These " @@ -2734,20 +2744,20 @@ msgid "" "collector from C code without having to import the :mod:`gc` module." msgstr "" -#: ../../whatsnew/3.10.rst:2122 +#: ../../whatsnew/3.10.rst:2127 msgid "" "Add a new :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to disallow " "creating type instances. (Contributed by Victor Stinner in :issue:`43916`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2126 +#: ../../whatsnew/3.10.rst:2131 msgid "" "Add a new :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag for creating " "immutable type objects: type attributes cannot be set nor deleted. " "(Contributed by Victor Stinner and Erlend E. Aasland in :issue:`43908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2133 +#: ../../whatsnew/3.10.rst:2138 msgid "" "The ``PY_SSIZE_T_CLEAN`` macro must now be defined to use :c:func:" "`PyArg_ParseTuple` and :c:func:`Py_BuildValue` formats which use ``#``: " @@ -2756,7 +2766,7 @@ msgid "" "`353`. (Contributed by Victor Stinner in :issue:`40943`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2140 +#: ../../whatsnew/3.10.rst:2145 msgid "" "Since :c:func:`Py_REFCNT()` is changed to the inline static function, " "``Py_REFCNT(obj) = new_refcnt`` must be replaced with ``Py_SET_REFCNT(obj, " @@ -2764,18 +2774,18 @@ msgid "" "For backward compatibility, this macro can be used::" msgstr "" -#: ../../whatsnew/3.10.rst:2149 +#: ../../whatsnew/3.10.rst:2154 msgid "(Contributed by Victor Stinner in :issue:`39573`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2151 +#: ../../whatsnew/3.10.rst:2156 msgid "" "Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had been allowed " "for historical reason. It is no longer allowed. (Contributed by Victor " "Stinner in :issue:`40839`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2155 +#: ../../whatsnew/3.10.rst:2160 msgid "" "``PyUnicode_FromUnicode(NULL, size)`` and " "``PyUnicode_FromStringAndSize(NULL, size)`` raise ``DeprecationWarning`` " @@ -2783,14 +2793,14 @@ msgid "" "data. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2160 +#: ../../whatsnew/3.10.rst:2165 msgid "" "The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule API " "``unicodedata.ucnhash_CAPI`` has been moved to the internal C API. " "(Contributed by Victor Stinner in :issue:`42157`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2164 +#: ../../whatsnew/3.10.rst:2169 msgid "" ":c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:" "func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome` and :c:func:" @@ -2801,7 +2811,7 @@ msgid "" "issue:`42260`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2172 +#: ../../whatsnew/3.10.rst:2177 msgid "" ":c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and :c:func:" "`PyCell_SET` macros can no longer be used as l-value or r-value. For " @@ -2811,7 +2821,7 @@ msgid "" "and Victor Stinner in :issue:`30459`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2179 +#: ../../whatsnew/3.10.rst:2184 msgid "" "The non-limited API files ``odictobject.h``, ``parser_interface.h``, " "``picklebufobject.h``, ``pyarena.h``, ``pyctype.h``, ``pydebug.h``, ``pyfpe." @@ -2822,7 +2832,7 @@ msgid "" "Nicholas Sim in :issue:`35134`)" msgstr "" -#: ../../whatsnew/3.10.rst:2187 +#: ../../whatsnew/3.10.rst:2192 msgid "" "Use the :c:data:`Py_TPFLAGS_IMMUTABLETYPE` type flag to create immutable " "type objects. Do not rely on :c:data:`Py_TPFLAGS_HEAPTYPE` to decide if a " @@ -2831,85 +2841,85 @@ msgid "" "issue:`43908`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2193 +#: ../../whatsnew/3.10.rst:2198 msgid "" "The undocumented function ``Py_FrozenMain`` has been removed from the " "limited API. The function is mainly useful for custom builds of Python. " "(Contributed by Petr Viktorin in :issue:`26241`)" msgstr "" -#: ../../whatsnew/3.10.rst:2200 +#: ../../whatsnew/3.10.rst:2205 msgid "" "The ``PyUnicode_InternImmortal()`` function is now deprecated and will be " "removed in Python 3.12: use :c:func:`PyUnicode_InternInPlace` instead. " "(Contributed by Victor Stinner in :issue:`41692`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2208 +#: ../../whatsnew/3.10.rst:2213 msgid "" "Removed ``Py_UNICODE_str*`` functions manipulating ``Py_UNICODE*`` strings. " "(Contributed by Inada Naoki in :issue:`41123`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2211 +#: ../../whatsnew/3.10.rst:2216 msgid "" "``Py_UNICODE_strlen``: use :c:func:`PyUnicode_GetLength` or :c:macro:" "`PyUnicode_GET_LENGTH`" msgstr "" -#: ../../whatsnew/3.10.rst:2213 +#: ../../whatsnew/3.10.rst:2218 msgid "" "``Py_UNICODE_strcat``: use :c:func:`PyUnicode_CopyCharacters` or :c:func:" "`PyUnicode_FromFormat`" msgstr "" -#: ../../whatsnew/3.10.rst:2215 +#: ../../whatsnew/3.10.rst:2220 msgid "" "``Py_UNICODE_strcpy``, ``Py_UNICODE_strncpy``: use :c:func:" "`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_Substring`" msgstr "" -#: ../../whatsnew/3.10.rst:2217 +#: ../../whatsnew/3.10.rst:2222 msgid "``Py_UNICODE_strcmp``: use :c:func:`PyUnicode_Compare`" msgstr "" -#: ../../whatsnew/3.10.rst:2218 +#: ../../whatsnew/3.10.rst:2223 msgid "``Py_UNICODE_strncmp``: use :c:func:`PyUnicode_Tailmatch`" msgstr "" -#: ../../whatsnew/3.10.rst:2219 +#: ../../whatsnew/3.10.rst:2224 msgid "" "``Py_UNICODE_strchr``, ``Py_UNICODE_strrchr``: use :c:func:" "`PyUnicode_FindChar`" msgstr "" -#: ../../whatsnew/3.10.rst:2222 +#: ../../whatsnew/3.10.rst:2227 msgid "" "Removed ``PyUnicode_GetMax()``. Please migrate to new (:pep:`393`) APIs. " "(Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2225 +#: ../../whatsnew/3.10.rst:2230 msgid "" "Removed ``PyLong_FromUnicode()``. Please migrate to :c:func:" "`PyLong_FromUnicodeObject`. (Contributed by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2228 +#: ../../whatsnew/3.10.rst:2233 msgid "" "Removed ``PyUnicode_AsUnicodeCopy()``. Please use :c:func:" "`PyUnicode_AsUCS4Copy` or :c:func:`PyUnicode_AsWideCharString` (Contributed " "by Inada Naoki in :issue:`41103`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2232 +#: ../../whatsnew/3.10.rst:2237 msgid "" "Removed ``_Py_CheckRecursionLimit`` variable: it has been replaced by " "``ceval.recursion_limit`` of the :c:type:`PyInterpreterState` structure. " "(Contributed by Victor Stinner in :issue:`41834`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2236 +#: ../../whatsnew/3.10.rst:2241 msgid "" "Removed undocumented macros ``Py_ALLOW_RECURSION`` and " "``Py_END_ALLOW_RECURSION`` and the ``recursion_critical`` field of the :c:" @@ -2917,14 +2927,14 @@ msgid "" "issue:`41936`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2241 +#: ../../whatsnew/3.10.rst:2246 msgid "" "Removed the undocumented ``PyOS_InitInterrupts()`` function. Initializing " "Python already implicitly installs signal handlers: see :c:member:`PyConfig." "install_signal_handlers`. (Contributed by Victor Stinner in :issue:`41713`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2246 +#: ../../whatsnew/3.10.rst:2251 msgid "" "Remove the ``PyAST_Validate()`` function. It is no longer possible to build " "a AST object (``mod_ty`` type) with the public C API. The function was " @@ -2932,48 +2942,48 @@ msgid "" "Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2251 +#: ../../whatsnew/3.10.rst:2256 msgid "Remove the ``symtable.h`` header file and the undocumented functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2253 +#: ../../whatsnew/3.10.rst:2258 msgid "``PyST_GetScope()``" msgstr "``PyST_GetScope()``" -#: ../../whatsnew/3.10.rst:2254 +#: ../../whatsnew/3.10.rst:2259 msgid "``PySymtable_Build()``" msgstr "``PySymtable_Build()``" -#: ../../whatsnew/3.10.rst:2255 +#: ../../whatsnew/3.10.rst:2260 msgid "``PySymtable_BuildObject()``" msgstr "``PySymtable_BuildObject()``" -#: ../../whatsnew/3.10.rst:2256 +#: ../../whatsnew/3.10.rst:2261 msgid "``PySymtable_Free()``" msgstr "``PySymtable_Free()``" -#: ../../whatsnew/3.10.rst:2257 +#: ../../whatsnew/3.10.rst:2262 msgid "``Py_SymtableString()``" msgstr "``Py_SymtableString()``" -#: ../../whatsnew/3.10.rst:2258 +#: ../../whatsnew/3.10.rst:2263 msgid "``Py_SymtableStringObject()``" msgstr "``Py_SymtableStringObject()``" -#: ../../whatsnew/3.10.rst:2260 +#: ../../whatsnew/3.10.rst:2265 msgid "" "The ``Py_SymtableString()`` function was part the stable ABI by mistake but " "it could not be used, because the ``symtable.h`` header file was excluded " "from the limited C API." msgstr "" -#: ../../whatsnew/3.10.rst:2264 +#: ../../whatsnew/3.10.rst:2269 msgid "" "Use Python :mod:`symtable` module instead. (Contributed by Victor Stinner " "in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2267 +#: ../../whatsnew/3.10.rst:2272 msgid "" "Remove :c:func:`PyOS_ReadlineFunctionPointer` from the limited C API headers " "and from ``python3.dll``, the library that provides the stable ABI on " @@ -2981,7 +2991,7 @@ msgid "" "cannot be guaranteed. (Contributed by Petr Viktorin in :issue:`43868`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2273 +#: ../../whatsnew/3.10.rst:2278 msgid "" "Remove ``ast.h``, ``asdl.h``, and ``Python-ast.h`` header files. These " "functions were undocumented and excluded from the limited C API. Most names " @@ -2992,86 +3002,86 @@ msgid "" "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2281 +#: ../../whatsnew/3.10.rst:2286 msgid "" "Remove the compiler and parser functions using ``struct _mod`` type, because " "the public AST C API was removed:" msgstr "" -#: ../../whatsnew/3.10.rst:2284 +#: ../../whatsnew/3.10.rst:2289 msgid "``PyAST_Compile()``" msgstr "``PyAST_Compile()``" -#: ../../whatsnew/3.10.rst:2285 +#: ../../whatsnew/3.10.rst:2290 msgid "``PyAST_CompileEx()``" msgstr "``PyAST_CompileEx()``" -#: ../../whatsnew/3.10.rst:2286 +#: ../../whatsnew/3.10.rst:2291 msgid "``PyAST_CompileObject()``" msgstr "``PyAST_CompileObject()``" -#: ../../whatsnew/3.10.rst:2287 +#: ../../whatsnew/3.10.rst:2292 msgid "``PyFuture_FromAST()``" msgstr "``PyFuture_FromAST()``" -#: ../../whatsnew/3.10.rst:2288 +#: ../../whatsnew/3.10.rst:2293 msgid "``PyFuture_FromASTObject()``" msgstr "``PyFuture_FromASTObject()``" -#: ../../whatsnew/3.10.rst:2289 +#: ../../whatsnew/3.10.rst:2294 msgid "``PyParser_ASTFromFile()``" msgstr "``PyParser_ASTFromFile()``" -#: ../../whatsnew/3.10.rst:2290 +#: ../../whatsnew/3.10.rst:2295 msgid "``PyParser_ASTFromFileObject()``" msgstr "``PyParser_ASTFromFileObject()``" -#: ../../whatsnew/3.10.rst:2291 +#: ../../whatsnew/3.10.rst:2296 msgid "``PyParser_ASTFromFilename()``" msgstr "``PyParser_ASTFromFilename()``" -#: ../../whatsnew/3.10.rst:2292 +#: ../../whatsnew/3.10.rst:2297 msgid "``PyParser_ASTFromString()``" msgstr "``PyParser_ASTFromString()``" -#: ../../whatsnew/3.10.rst:2293 +#: ../../whatsnew/3.10.rst:2298 msgid "``PyParser_ASTFromStringObject()``" msgstr "``PyParser_ASTFromStringObject()``" -#: ../../whatsnew/3.10.rst:2295 +#: ../../whatsnew/3.10.rst:2300 msgid "" "These functions were undocumented and excluded from the limited C API. " "(Contributed by Victor Stinner in :issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2298 +#: ../../whatsnew/3.10.rst:2303 msgid "Remove the ``pyarena.h`` header file with functions:" msgstr "" -#: ../../whatsnew/3.10.rst:2300 +#: ../../whatsnew/3.10.rst:2305 msgid "``PyArena_New()``" msgstr "``PyArena_New()``" -#: ../../whatsnew/3.10.rst:2301 +#: ../../whatsnew/3.10.rst:2306 msgid "``PyArena_Free()``" msgstr "``PyArena_Free()``" -#: ../../whatsnew/3.10.rst:2302 +#: ../../whatsnew/3.10.rst:2307 msgid "``PyArena_Malloc()``" msgstr "``PyArena_Malloc()``" -#: ../../whatsnew/3.10.rst:2303 +#: ../../whatsnew/3.10.rst:2308 msgid "``PyArena_AddPyObject()``" msgstr "``PyArena_AddPyObject()``" -#: ../../whatsnew/3.10.rst:2305 +#: ../../whatsnew/3.10.rst:2310 msgid "" "These functions were undocumented, excluded from the limited C API, and were " "only used internally by the compiler. (Contributed by Victor Stinner in :" "issue:`43244`.)" msgstr "" -#: ../../whatsnew/3.10.rst:2309 +#: ../../whatsnew/3.10.rst:2314 msgid "" "The ``PyThreadState.use_tracing`` member has been removed to optimize " "Python. (Contributed by Mark Shannon in :issue:`43760`.)" diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index 3cfd03cc97..2fa53a845f 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-27 00:09+0000\n" +"POT-Creation-Date: 2022-02-13 08:54+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -218,7 +218,7 @@ msgid "" "Python as well. Consult the :ref:`removed-in-python-39` section." msgstr "" -#: ../../whatsnew/3.9.rst:143 ../../whatsnew/3.9.rst:1273 +#: ../../whatsnew/3.9.rst:143 ../../whatsnew/3.9.rst:1276 msgid "New Features" msgstr "" @@ -273,7 +273,7 @@ msgid "" "for example ``queue.Queue``." msgstr "" -#: ../../whatsnew/3.9.rst:183 ../../whatsnew/3.9.rst:1161 +#: ../../whatsnew/3.9.rst:183 ../../whatsnew/3.9.rst:1164 msgid "Example:" msgstr "範例:" @@ -728,11 +728,17 @@ msgid "" "`33962`.)" msgstr "" -#: ../../whatsnew/3.9.rst:504 +#: ../../whatsnew/3.9.rst:503 +msgid "" +"Apply syntax highlighting to `.pyi` files. (Contributed by Alex Waygood and " +"Terry Jan Reedy in :issue:`45447`.)" +msgstr "" + +#: ../../whatsnew/3.9.rst:507 msgid "imaplib" msgstr "imaplib" -#: ../../whatsnew/3.9.rst:506 +#: ../../whatsnew/3.9.rst:509 msgid "" ":class:`~imaplib.IMAP4` and :class:`~imaplib.IMAP4_SSL` now have an optional " "*timeout* parameter for their constructors. Also, the :meth:`~imaplib.IMAP4." @@ -742,7 +748,7 @@ msgid "" "issue:`38615`.)" msgstr "" -#: ../../whatsnew/3.9.rst:513 +#: ../../whatsnew/3.9.rst:516 msgid "" ":meth:`imaplib.IMAP4.unselect` is added. :meth:`imaplib.IMAP4.unselect` " "frees server's resources associated with the selected mailbox and returns " @@ -752,11 +758,11 @@ msgid "" "Dong-hee Na in :issue:`40375`.)" msgstr "" -#: ../../whatsnew/3.9.rst:521 +#: ../../whatsnew/3.9.rst:524 msgid "importlib" msgstr "importlib" -#: ../../whatsnew/3.9.rst:523 +#: ../../whatsnew/3.9.rst:526 msgid "" "To improve consistency with import statements, :func:`importlib.util." "resolve_name` now raises :exc:`ImportError` instead of :exc:`ValueError` for " @@ -764,47 +770,47 @@ msgid "" "`37444`.)" msgstr "" -#: ../../whatsnew/3.9.rst:528 +#: ../../whatsnew/3.9.rst:531 msgid "" "Import loaders which publish immutable module objects can now publish " "immutable packages in addition to individual modules. (Contributed by Dino " "Viehland in :issue:`39336`.)" msgstr "" -#: ../../whatsnew/3.9.rst:532 +#: ../../whatsnew/3.9.rst:535 msgid "" "Added :func:`importlib.resources.files` function with support for " "subdirectories in package data, matching backport in ``importlib_resources`` " "version 1.5. (Contributed by Jason R. Coombs in :issue:`39791`.)" msgstr "" -#: ../../whatsnew/3.9.rst:537 +#: ../../whatsnew/3.9.rst:540 msgid "" "Refreshed ``importlib.metadata`` from ``importlib_metadata`` version 1.6.1." msgstr "" -#: ../../whatsnew/3.9.rst:540 +#: ../../whatsnew/3.9.rst:543 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.9.rst:542 +#: ../../whatsnew/3.9.rst:545 msgid "" ":attr:`inspect.BoundArguments.arguments` is changed from ``OrderedDict`` to " "regular dict. (Contributed by Inada Naoki in :issue:`36350` and :issue:" "`39775`.)" msgstr "" -#: ../../whatsnew/3.9.rst:546 +#: ../../whatsnew/3.9.rst:549 msgid "ipaddress" msgstr "ipaddress" -#: ../../whatsnew/3.9.rst:548 +#: ../../whatsnew/3.9.rst:551 msgid "" ":mod:`ipaddress` now supports IPv6 Scoped Addresses (IPv6 address with " "suffix ``%``)." msgstr "" -#: ../../whatsnew/3.9.rst:550 +#: ../../whatsnew/3.9.rst:553 msgid "" "Scoped IPv6 addresses can be parsed using :class:`ipaddress.IPv6Address`. If " "present, scope zone ID is available through the :attr:`~ipaddress." @@ -812,59 +818,59 @@ msgid "" "`34788`.)" msgstr "" -#: ../../whatsnew/3.9.rst:554 +#: ../../whatsnew/3.9.rst:557 msgid "" "Starting with Python 3.9.5 the :mod:`ipaddress` module no longer accepts any " "leading zeros in IPv4 address strings. (Contributed by Christian Heimes in :" "issue:`36384`)." msgstr "" -#: ../../whatsnew/3.9.rst:559 +#: ../../whatsnew/3.9.rst:562 msgid "math" msgstr "math" -#: ../../whatsnew/3.9.rst:561 +#: ../../whatsnew/3.9.rst:564 msgid "" "Expanded the :func:`math.gcd` function to handle multiple arguments. " "Formerly, it only supported two arguments. (Contributed by Serhiy Storchaka " "in :issue:`39648`.)" msgstr "" -#: ../../whatsnew/3.9.rst:565 +#: ../../whatsnew/3.9.rst:568 msgid "" "Added :func:`math.lcm`: return the least common multiple of specified " "arguments. (Contributed by Mark Dickinson, Ananthakrishnan and Serhiy " "Storchaka in :issue:`39479` and :issue:`39648`.)" msgstr "" -#: ../../whatsnew/3.9.rst:569 +#: ../../whatsnew/3.9.rst:572 msgid "" "Added :func:`math.nextafter`: return the next floating-point value after *x* " "towards *y*. (Contributed by Victor Stinner in :issue:`39288`.)" msgstr "" -#: ../../whatsnew/3.9.rst:573 +#: ../../whatsnew/3.9.rst:576 msgid "" "Added :func:`math.ulp`: return the value of the least significant bit of a " "float. (Contributed by Victor Stinner in :issue:`39310`.)" msgstr "" -#: ../../whatsnew/3.9.rst:578 +#: ../../whatsnew/3.9.rst:581 msgid "multiprocessing" msgstr "multiprocessing" -#: ../../whatsnew/3.9.rst:580 +#: ../../whatsnew/3.9.rst:583 msgid "" "The :class:`multiprocessing.SimpleQueue` class has a new :meth:" "`~multiprocessing.SimpleQueue.close` method to explicitly close the queue. " "(Contributed by Victor Stinner in :issue:`30966`.)" msgstr "" -#: ../../whatsnew/3.9.rst:586 +#: ../../whatsnew/3.9.rst:589 msgid "nntplib" msgstr "nntplib" -#: ../../whatsnew/3.9.rst:588 +#: ../../whatsnew/3.9.rst:591 msgid "" ":class:`~nntplib.NNTP` and :class:`~nntplib.NNTP_SSL` now raise a :class:" "`ValueError` if the given timeout for their constructor is zero to prevent " @@ -872,65 +878,65 @@ msgid "" "`39259`.)" msgstr "" -#: ../../whatsnew/3.9.rst:593 +#: ../../whatsnew/3.9.rst:596 msgid "os" msgstr "os" -#: ../../whatsnew/3.9.rst:595 +#: ../../whatsnew/3.9.rst:598 msgid "" "Added :data:`~os.CLD_KILLED` and :data:`~os.CLD_STOPPED` for :attr:" "`si_code`. (Contributed by Dong-hee Na in :issue:`38493`.)" msgstr "" -#: ../../whatsnew/3.9.rst:598 +#: ../../whatsnew/3.9.rst:601 msgid "" "Exposed the Linux-specific :func:`os.pidfd_open` (:issue:`38692`) and :data:" "`os.P_PIDFD` (:issue:`38713`) for process management with file descriptors." msgstr "" -#: ../../whatsnew/3.9.rst:602 +#: ../../whatsnew/3.9.rst:605 msgid "" "The :func:`os.unsetenv` function is now also available on Windows. " "(Contributed by Victor Stinner in :issue:`39413`.)" msgstr "" -#: ../../whatsnew/3.9.rst:605 +#: ../../whatsnew/3.9.rst:608 msgid "" "The :func:`os.putenv` and :func:`os.unsetenv` functions are now always " "available. (Contributed by Victor Stinner in :issue:`39395`.)" msgstr "" -#: ../../whatsnew/3.9.rst:609 +#: ../../whatsnew/3.9.rst:612 msgid "" "Added :func:`os.waitstatus_to_exitcode` function: convert a wait status to " "an exit code. (Contributed by Victor Stinner in :issue:`40094`.)" msgstr "" -#: ../../whatsnew/3.9.rst:614 +#: ../../whatsnew/3.9.rst:617 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.9.rst:616 +#: ../../whatsnew/3.9.rst:619 msgid "" "Added :meth:`pathlib.Path.readlink()` which acts similarly to :func:`os." "readlink`. (Contributed by Girts Folkmanis in :issue:`30618`)" msgstr "" -#: ../../whatsnew/3.9.rst:621 +#: ../../whatsnew/3.9.rst:624 msgid "pdb" msgstr "pdb" -#: ../../whatsnew/3.9.rst:623 +#: ../../whatsnew/3.9.rst:626 msgid "" "On Windows now :class:`~pdb.Pdb` supports ``~/.pdbrc``. (Contributed by Tim " "Hopper and Dan Lidral-Porter in :issue:`20523`.)" msgstr "" -#: ../../whatsnew/3.9.rst:627 +#: ../../whatsnew/3.9.rst:630 msgid "poplib" msgstr "poplib" -#: ../../whatsnew/3.9.rst:629 +#: ../../whatsnew/3.9.rst:632 msgid "" ":class:`~poplib.POP3` and :class:`~poplib.POP3_SSL` now raise a :class:" "`ValueError` if the given timeout for their constructor is zero to prevent " @@ -938,53 +944,53 @@ msgid "" "`39259`.)" msgstr "" -#: ../../whatsnew/3.9.rst:634 +#: ../../whatsnew/3.9.rst:637 msgid "pprint" msgstr "pprint" -#: ../../whatsnew/3.9.rst:636 +#: ../../whatsnew/3.9.rst:639 msgid "" ":mod:`pprint` can now pretty-print :class:`types.SimpleNamespace`. " "(Contributed by Carl Bordum Hansen in :issue:`37376`.)" msgstr "" -#: ../../whatsnew/3.9.rst:640 +#: ../../whatsnew/3.9.rst:643 msgid "pydoc" msgstr "pydoc" -#: ../../whatsnew/3.9.rst:642 +#: ../../whatsnew/3.9.rst:645 msgid "" "The documentation string is now shown not only for class, function, method " "etc, but for any object that has its own ``__doc__`` attribute. (Contributed " "by Serhiy Storchaka in :issue:`40257`.)" msgstr "" -#: ../../whatsnew/3.9.rst:647 +#: ../../whatsnew/3.9.rst:650 msgid "random" msgstr "random" -#: ../../whatsnew/3.9.rst:649 +#: ../../whatsnew/3.9.rst:652 msgid "" "Added a new :attr:`random.Random.randbytes` method: generate random bytes. " "(Contributed by Victor Stinner in :issue:`40286`.)" msgstr "" -#: ../../whatsnew/3.9.rst:653 +#: ../../whatsnew/3.9.rst:656 msgid "signal" msgstr "signal" -#: ../../whatsnew/3.9.rst:655 +#: ../../whatsnew/3.9.rst:658 msgid "" "Exposed the Linux-specific :func:`signal.pidfd_send_signal` for sending to " "signals to a process using a file descriptor instead of a pid. (:issue:" "`38712`)" msgstr "" -#: ../../whatsnew/3.9.rst:659 +#: ../../whatsnew/3.9.rst:662 msgid "smtplib" msgstr "smtplib" -#: ../../whatsnew/3.9.rst:661 +#: ../../whatsnew/3.9.rst:664 msgid "" ":class:`~smtplib.SMTP` and :class:`~smtplib.SMTP_SSL` now raise a :class:" "`ValueError` if the given timeout for their constructor is zero to prevent " @@ -992,41 +998,41 @@ msgid "" "`39259`.)" msgstr "" -#: ../../whatsnew/3.9.rst:665 +#: ../../whatsnew/3.9.rst:668 msgid "" ":class:`~smtplib.LMTP` constructor now has an optional *timeout* parameter. " "(Contributed by Dong-hee Na in :issue:`39329`.)" msgstr "" -#: ../../whatsnew/3.9.rst:669 +#: ../../whatsnew/3.9.rst:672 msgid "socket" msgstr "socket" -#: ../../whatsnew/3.9.rst:671 +#: ../../whatsnew/3.9.rst:674 msgid "" "The :mod:`socket` module now exports the :data:`~socket." "CAN_RAW_JOIN_FILTERS` constant on Linux 4.1 and greater. (Contributed by " "Stefan Tatschner and Zackery Spytz in :issue:`25780`.)" msgstr "" -#: ../../whatsnew/3.9.rst:675 +#: ../../whatsnew/3.9.rst:678 msgid "" "The socket module now supports the :data:`~socket.CAN_J1939` protocol on " "platforms that support it. (Contributed by Karl Ding in :issue:`40291`.)" msgstr "" -#: ../../whatsnew/3.9.rst:678 +#: ../../whatsnew/3.9.rst:681 msgid "" "The socket module now has the :func:`socket.send_fds` and :func:`socket." "recv_fds` functions. (Contributed by Joannah Nanjekye, Shinya Okano and " "Victor Stinner in :issue:`28724`.)" msgstr "" -#: ../../whatsnew/3.9.rst:684 +#: ../../whatsnew/3.9.rst:687 msgid "time" msgstr "time" -#: ../../whatsnew/3.9.rst:686 +#: ../../whatsnew/3.9.rst:689 msgid "" "On AIX, :func:`~time.thread_time` is now implemented with " "``thread_cputime()`` which has nanosecond resolution, rather than " @@ -1034,11 +1040,11 @@ msgid "" "(Contributed by Batuhan Taskaya in :issue:`40192`)" msgstr "" -#: ../../whatsnew/3.9.rst:692 +#: ../../whatsnew/3.9.rst:695 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.9.rst:694 +#: ../../whatsnew/3.9.rst:697 msgid "" "Added a new :attr:`sys.platlibdir` attribute: name of the platform-specific " "library directory. It is used to build the path of standard library and the " @@ -1048,29 +1054,29 @@ msgid "" "and Victor Stinner in :issue:`1294959`.)" msgstr "" -#: ../../whatsnew/3.9.rst:700 +#: ../../whatsnew/3.9.rst:703 msgid "" "Previously, :attr:`sys.stderr` was block-buffered when non-interactive. Now " "``stderr`` defaults to always being line-buffered. (Contributed by Jendrik " "Seipp in :issue:`13601`.)" msgstr "" -#: ../../whatsnew/3.9.rst:705 +#: ../../whatsnew/3.9.rst:708 msgid "tracemalloc" msgstr "tracemalloc" -#: ../../whatsnew/3.9.rst:707 +#: ../../whatsnew/3.9.rst:710 msgid "" "Added :func:`tracemalloc.reset_peak` to set the peak size of traced memory " "blocks to the current size, to measure the peak of specific pieces of code. " "(Contributed by Huon Wilson in :issue:`40630`.)" msgstr "" -#: ../../whatsnew/3.9.rst:712 ../../whatsnew/3.9.rst:1495 +#: ../../whatsnew/3.9.rst:715 ../../whatsnew/3.9.rst:1498 msgid "typing" msgstr "typing" -#: ../../whatsnew/3.9.rst:714 +#: ../../whatsnew/3.9.rst:717 msgid "" ":pep:`593` introduced an :data:`typing.Annotated` type to decorate existing " "types with context-specific metadata and new ``include_extras`` parameter " @@ -1078,20 +1084,20 @@ msgid "" "(Contributed by Till Varoquaux and Konstantin Kashin.)" msgstr "" -#: ../../whatsnew/3.9.rst:720 +#: ../../whatsnew/3.9.rst:723 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.9.rst:722 +#: ../../whatsnew/3.9.rst:725 msgid "" "The Unicode database has been updated to version 13.0.0. (:issue:`39926`)." msgstr "" -#: ../../whatsnew/3.9.rst:725 +#: ../../whatsnew/3.9.rst:728 msgid "venv" msgstr "venv" -#: ../../whatsnew/3.9.rst:727 +#: ../../whatsnew/3.9.rst:730 msgid "" "The activation scripts provided by :mod:`venv` now all specify their prompt " "customization consistently by always using the value specified by " @@ -1101,11 +1107,11 @@ msgid "" "Cannon in :issue:`37663`.)" msgstr "" -#: ../../whatsnew/3.9.rst:735 +#: ../../whatsnew/3.9.rst:738 msgid "xml" msgstr "xml" -#: ../../whatsnew/3.9.rst:737 +#: ../../whatsnew/3.9.rst:740 msgid "" "White space characters within attributes are now preserved when serializing :" "mod:`xml.etree.ElementTree` to XML file. EOLNs are no longer normalized to " @@ -1113,32 +1119,32 @@ msgid "" "2.11 of XML spec. (Contributed by Mefistotelis in :issue:`39011`.)" msgstr "" -#: ../../whatsnew/3.9.rst:745 +#: ../../whatsnew/3.9.rst:748 msgid "Optimizations" msgstr "" -#: ../../whatsnew/3.9.rst:747 +#: ../../whatsnew/3.9.rst:750 msgid "" "Optimized the idiom for assignment a temporary variable in comprehensions. " "Now ``for y in [expr]`` in comprehensions is as fast as a simple assignment " "``y = expr``. For example:" msgstr "" -#: ../../whatsnew/3.9.rst:751 +#: ../../whatsnew/3.9.rst:754 msgid "sums = [s for s in [0] for x in data for s in [s + x]]" msgstr "" -#: ../../whatsnew/3.9.rst:753 +#: ../../whatsnew/3.9.rst:756 msgid "" "Unlike the ``:=`` operator this idiom does not leak a variable to the outer " "scope." msgstr "" -#: ../../whatsnew/3.9.rst:756 +#: ../../whatsnew/3.9.rst:759 msgid "(Contributed by Serhiy Storchaka in :issue:`32856`.)" msgstr "" -#: ../../whatsnew/3.9.rst:758 +#: ../../whatsnew/3.9.rst:761 msgid "" "Optimized signal handling in multithreaded applications. If a thread " "different than the main thread gets a signal, the bytecode evaluation loop " @@ -1147,27 +1153,27 @@ msgid "" "interpreter can handle signals." msgstr "" -#: ../../whatsnew/3.9.rst:764 +#: ../../whatsnew/3.9.rst:767 msgid "" "Previously, the bytecode evaluation loop was interrupted at each instruction " "until the main thread handles signals. (Contributed by Victor Stinner in :" "issue:`40010`.)" msgstr "" -#: ../../whatsnew/3.9.rst:768 +#: ../../whatsnew/3.9.rst:771 msgid "" "Optimized the :mod:`subprocess` module on FreeBSD using ``closefrom()``. " "(Contributed by Ed Maste, Conrad Meyer, Kyle Evans, Kubilay Kocak and Victor " "Stinner in :issue:`38061`.)" msgstr "" -#: ../../whatsnew/3.9.rst:772 +#: ../../whatsnew/3.9.rst:775 msgid "" ":c:func:`PyLong_FromDouble` is now up to 1.87x faster for values that fit " "into :c:type:`long`. (Contributed by Sergey Fedoseev in :issue:`37986`.)" msgstr "" -#: ../../whatsnew/3.9.rst:776 +#: ../../whatsnew/3.9.rst:779 msgid "" "A number of Python builtins (:class:`range`, :class:`tuple`, :class:`set`, :" "class:`frozenset`, :class:`list`, :class:`dict`) are now sped up by using :" @@ -1175,14 +1181,14 @@ msgid "" "Jeroen Demeyer and Petr Viktorin in :issue:`37207`.)" msgstr "" -#: ../../whatsnew/3.9.rst:781 +#: ../../whatsnew/3.9.rst:784 msgid "" "Optimized :func:`~set.difference_update` for the case when the other set is " "much larger than the base set. (Suggested by Evgeny Kapun with code " "contributed by Michele Orrù in :issue:`8425`.)" msgstr "" -#: ../../whatsnew/3.9.rst:785 +#: ../../whatsnew/3.9.rst:788 msgid "" "Python's small object allocator (``obmalloc.c``) now allows (no more than) " "one empty arena to remain available for immediate reuse, without returning " @@ -1191,26 +1197,26 @@ msgid "" "in :issue:`37257`.)" msgstr "" -#: ../../whatsnew/3.9.rst:791 +#: ../../whatsnew/3.9.rst:794 msgid "" ":term:`floor division` of float operation now has a better performance. Also " "the message of :exc:`ZeroDivisionError` for this operation is updated. " "(Contributed by Dong-hee Na in :issue:`39434`.)" msgstr "" -#: ../../whatsnew/3.9.rst:795 +#: ../../whatsnew/3.9.rst:798 msgid "" "Decoding short ASCII strings with UTF-8 and ascii codecs is now about 15% " "faster. (Contributed by Inada Naoki in :issue:`37348`.)" msgstr "" -#: ../../whatsnew/3.9.rst:798 +#: ../../whatsnew/3.9.rst:801 msgid "" "Here's a summary of performance improvements from Python 3.4 through Python " "3.9:" msgstr "" -#: ../../whatsnew/3.9.rst:845 +#: ../../whatsnew/3.9.rst:848 msgid "" "These results were generated from the variable access benchmark script at: " "``Tools/scripts/var_access_benchmark.py``. The benchmark script displays " @@ -1221,18 +1227,18 @@ msgid "" "python.org/downloads/mac-osx/>`_." msgstr "" -#: ../../whatsnew/3.9.rst:855 +#: ../../whatsnew/3.9.rst:858 msgid "Deprecated" msgstr "" -#: ../../whatsnew/3.9.rst:857 +#: ../../whatsnew/3.9.rst:860 msgid "" "The distutils ``bdist_msi`` command is now deprecated, use ``bdist_wheel`` " "(wheel packages) instead. (Contributed by Hugo van Kemenade in :issue:" "`39586`.)" msgstr "" -#: ../../whatsnew/3.9.rst:861 +#: ../../whatsnew/3.9.rst:864 msgid "" "Currently :func:`math.factorial` accepts :class:`float` instances with non-" "negative integer values (like ``5.0``). It raises a :exc:`ValueError` for " @@ -1241,7 +1247,7 @@ msgid "" "Serhiy Storchaka in :issue:`37315`.)" msgstr "" -#: ../../whatsnew/3.9.rst:867 +#: ../../whatsnew/3.9.rst:870 msgid "" "The :mod:`parser` and :mod:`symbol` modules are deprecated and will be " "removed in future versions of Python. For the majority of use cases, users " @@ -1249,7 +1255,7 @@ msgid "" "stage, using the :mod:`ast` module." msgstr "" -#: ../../whatsnew/3.9.rst:872 +#: ../../whatsnew/3.9.rst:875 msgid "" "The Public C API functions :c:func:`PyParser_SimpleParseStringFlags`, :c:" "func:`PyParser_SimpleParseStringFlagsFilename`, :c:func:" @@ -1257,7 +1263,7 @@ msgid "" "and will be removed in Python 3.10 together with the old parser." msgstr "" -#: ../../whatsnew/3.9.rst:877 +#: ../../whatsnew/3.9.rst:880 msgid "" "Using :data:`NotImplemented` in a boolean context has been deprecated, as it " "is almost exclusively the result of incorrect rich comparator " @@ -1265,7 +1271,7 @@ msgid "" "Python. (Contributed by Josh Rosenberg in :issue:`35712`.)" msgstr "" -#: ../../whatsnew/3.9.rst:883 +#: ../../whatsnew/3.9.rst:886 msgid "" "The :mod:`random` module currently accepts any hashable type as a possible " "seed value. Unfortunately, some of those types are not guaranteed to have a " @@ -1274,7 +1280,7 @@ msgid "" "`bytes`, and :class:`bytearray`." msgstr "" -#: ../../whatsnew/3.9.rst:889 +#: ../../whatsnew/3.9.rst:892 msgid "" "Opening the :class:`~gzip.GzipFile` file for writing without specifying the " "*mode* argument is deprecated. In future Python versions it will always be " @@ -1283,39 +1289,39 @@ msgid "" "issue:`28286`.)" msgstr "" -#: ../../whatsnew/3.9.rst:895 +#: ../../whatsnew/3.9.rst:898 msgid "" "Deprecated the ``split()`` method of :class:`_tkinter.TkappType` in favour " "of the ``splitlist()`` method which has more consistent and predicable " "behavior. (Contributed by Serhiy Storchaka in :issue:`38371`.)" msgstr "" -#: ../../whatsnew/3.9.rst:900 +#: ../../whatsnew/3.9.rst:903 msgid "" "The explicit passing of coroutine objects to :func:`asyncio.wait` has been " "deprecated and will be removed in version 3.11. (Contributed by Yury " "Selivanov and Kyle Stanley in :issue:`34790`.)" msgstr "" -#: ../../whatsnew/3.9.rst:904 +#: ../../whatsnew/3.9.rst:907 msgid "" "binhex4 and hexbin4 standards are now deprecated. The :mod:`binhex` module " "and the following :mod:`binascii` functions are now deprecated:" msgstr "" -#: ../../whatsnew/3.9.rst:907 +#: ../../whatsnew/3.9.rst:910 msgid ":func:`~binascii.b2a_hqx`, :func:`~binascii.a2b_hqx`" msgstr ":func:`~binascii.b2a_hqx`\\ 、\\ :func:`~binascii.a2b_hqx`" -#: ../../whatsnew/3.9.rst:908 +#: ../../whatsnew/3.9.rst:911 msgid ":func:`~binascii.rlecode_hqx`, :func:`~binascii.rledecode_hqx`" msgstr ":func:`~binascii.rlecode_hqx`\\ 、\\ :func:`~binascii.rledecode_hqx`" -#: ../../whatsnew/3.9.rst:910 +#: ../../whatsnew/3.9.rst:913 msgid "(Contributed by Victor Stinner in :issue:`39353`.)" msgstr "" -#: ../../whatsnew/3.9.rst:912 +#: ../../whatsnew/3.9.rst:915 msgid "" ":mod:`ast` classes ``slice``, ``Index`` and ``ExtSlice`` are considered " "deprecated and will be removed in future Python versions. ``value`` itself " @@ -1324,7 +1330,7 @@ msgid "" "Storchaka in :issue:`34822`.)" msgstr "" -#: ../../whatsnew/3.9.rst:918 +#: ../../whatsnew/3.9.rst:921 msgid "" ":mod:`ast` classes ``Suite``, ``Param``, ``AugLoad`` and ``AugStore`` are " "considered deprecated and will be removed in future Python versions. They " @@ -1333,7 +1339,7 @@ msgid "" "`39969` and Serhiy Storchaka in :issue:`39988`.)" msgstr "" -#: ../../whatsnew/3.9.rst:925 +#: ../../whatsnew/3.9.rst:928 msgid "" "The :c:func:`PyEval_InitThreads` and :c:func:`PyEval_ThreadsInitialized` " "functions are now deprecated and will be removed in Python 3.11. Calling :c:" @@ -1342,20 +1348,20 @@ msgid "" "Stinner in :issue:`39877`.)" msgstr "" -#: ../../whatsnew/3.9.rst:931 +#: ../../whatsnew/3.9.rst:934 msgid "" "Passing ``None`` as the first argument to the :func:`shlex.split` function " "has been deprecated. (Contributed by Zackery Spytz in :issue:`33262`.)" msgstr "" -#: ../../whatsnew/3.9.rst:934 +#: ../../whatsnew/3.9.rst:937 msgid "" ":func:`smtpd.MailmanProxy` is now deprecated as it is unusable without an " "external module, ``mailman``. (Contributed by Samuel Colvin in :issue:" "`35800`.)" msgstr "" -#: ../../whatsnew/3.9.rst:937 +#: ../../whatsnew/3.9.rst:940 msgid "" "The :mod:`lib2to3` module now emits a :exc:`PendingDeprecationWarning`. " "Python 3.9 switched to a PEG parser (see :pep:`617`), and Python 3.10 may " @@ -1365,22 +1371,22 @@ msgid "" "`parso`_. (Contributed by Carl Meyer in :issue:`40360`.)" msgstr "" -#: ../../whatsnew/3.9.rst:945 +#: ../../whatsnew/3.9.rst:948 msgid "" "The *random* parameter of :func:`random.shuffle` has been deprecated. " "(Contributed by Raymond Hettinger in :issue:`40465`)" msgstr "" -#: ../../whatsnew/3.9.rst:954 ../../whatsnew/3.9.rst:1409 +#: ../../whatsnew/3.9.rst:957 ../../whatsnew/3.9.rst:1412 msgid "Removed" msgstr "" -#: ../../whatsnew/3.9.rst:956 +#: ../../whatsnew/3.9.rst:959 msgid "" "The erroneous version at :data:`unittest.mock.__version__` has been removed." msgstr "" -#: ../../whatsnew/3.9.rst:958 +#: ../../whatsnew/3.9.rst:961 msgid "" ":class:`nntplib.NNTP`: ``xpath()`` and ``xgtitle()`` methods have been " "removed. These methods are deprecated since Python 3.3. Generally, these " @@ -1390,14 +1396,14 @@ msgid "" "`39366`.)" msgstr "" -#: ../../whatsnew/3.9.rst:965 +#: ../../whatsnew/3.9.rst:968 msgid "" ":class:`array.array`: ``tostring()`` and ``fromstring()`` methods have been " "removed. They were aliases to ``tobytes()`` and ``frombytes()``, deprecated " "since Python 3.2. (Contributed by Victor Stinner in :issue:`38916`.)" msgstr "" -#: ../../whatsnew/3.9.rst:970 +#: ../../whatsnew/3.9.rst:973 msgid "" "The undocumented ``sys.callstats()`` function has been removed. Since Python " "3.7, it was deprecated and always returned :const:`None`. It required a " @@ -1405,7 +1411,7 @@ msgid "" "3.7. (Contributed by Victor Stinner in :issue:`37414`.)" msgstr "" -#: ../../whatsnew/3.9.rst:975 +#: ../../whatsnew/3.9.rst:978 msgid "" "The ``sys.getcheckinterval()`` and ``sys.setcheckinterval()`` functions have " "been removed. They were deprecated since Python 3.2. Use :func:`sys." @@ -1413,21 +1419,21 @@ msgid "" "by Victor Stinner in :issue:`37392`.)" msgstr "" -#: ../../whatsnew/3.9.rst:980 +#: ../../whatsnew/3.9.rst:983 msgid "" "The C function ``PyImport_Cleanup()`` has been removed. It was documented " "as: \"Empty the module table. For internal use only.\" (Contributed by " "Victor Stinner in :issue:`36710`.)" msgstr "" -#: ../../whatsnew/3.9.rst:984 +#: ../../whatsnew/3.9.rst:987 msgid "" "``_dummy_thread`` and ``dummy_threading`` modules have been removed. These " "modules were deprecated since Python 3.7 which requires threading support. " "(Contributed by Victor Stinner in :issue:`37312`.)" msgstr "" -#: ../../whatsnew/3.9.rst:988 +#: ../../whatsnew/3.9.rst:991 msgid "" "``aifc.openfp()`` alias to ``aifc.open()``, ``sunau.openfp()`` alias to " "``sunau.open()``, and ``wave.openfp()`` alias to :func:`wave.open()` have " @@ -1435,14 +1441,14 @@ msgid "" "Stinner in :issue:`37320`.)" msgstr "" -#: ../../whatsnew/3.9.rst:993 +#: ../../whatsnew/3.9.rst:996 msgid "" "The :meth:`~threading.Thread.isAlive()` method of :class:`threading.Thread` " "has been removed. It was deprecated since Python 3.8. Use :meth:`~threading." "Thread.is_alive()` instead. (Contributed by Dong-hee Na in :issue:`37804`.)" msgstr "" -#: ../../whatsnew/3.9.rst:998 +#: ../../whatsnew/3.9.rst:1001 msgid "" "Methods ``getchildren()`` and ``getiterator()`` of classes :class:`~xml." "etree.ElementTree.ElementTree` and :class:`~xml.etree.ElementTree.Element` " @@ -1452,7 +1458,7 @@ msgid "" "getiterator()``. (Contributed by Serhiy Storchaka in :issue:`36543`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1006 +#: ../../whatsnew/3.9.rst:1009 msgid "" "The old :mod:`plistlib` API has been removed, it was deprecated since Python " "3.4. Use the :func:`~plistlib.load`, :func:`~plistlib.loads`, :func:" @@ -1461,7 +1467,7 @@ msgid "" "are always used instead. (Contributed by Jon Janzen in :issue:`36409`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1012 +#: ../../whatsnew/3.9.rst:1015 msgid "" "The C function ``PyGen_NeedsFinalizing`` has been removed. It was not " "documented, tested, or used anywhere within CPython after the implementation " @@ -1469,7 +1475,7 @@ msgid "" "in :issue:`15088`)" msgstr "" -#: ../../whatsnew/3.9.rst:1017 +#: ../../whatsnew/3.9.rst:1020 msgid "" "``base64.encodestring()`` and ``base64.decodestring()``, aliases deprecated " "since Python 3.1, have been removed: use :func:`base64.encodebytes` and :" @@ -1477,14 +1483,14 @@ msgid "" "`39351`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1022 +#: ../../whatsnew/3.9.rst:1025 msgid "" "``fractions.gcd()`` function has been removed, it was deprecated since " "Python 3.5 (:issue:`22486`): use :func:`math.gcd` instead. (Contributed by " "Victor Stinner in :issue:`39350`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1026 +#: ../../whatsnew/3.9.rst:1029 msgid "" "The *buffering* parameter of :class:`bz2.BZ2File` has been removed. Since " "Python 3.0, it was ignored and using it emitted a :exc:`DeprecationWarning`. " @@ -1492,7 +1498,7 @@ msgid "" "Victor Stinner in :issue:`39357`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1031 +#: ../../whatsnew/3.9.rst:1034 msgid "" "The *encoding* parameter of :func:`json.loads` has been removed. As of " "Python 3.1, it was deprecated and ignored; using it has emitted a :exc:" @@ -1500,7 +1506,7 @@ msgid "" "`39377`)" msgstr "" -#: ../../whatsnew/3.9.rst:1036 +#: ../../whatsnew/3.9.rst:1039 msgid "" "``with (await asyncio.lock):`` and ``with (yield from asyncio.lock):`` " "statements are not longer supported, use ``async with lock`` instead. The " @@ -1508,7 +1514,7 @@ msgid "" "(Contributed by Andrew Svetlov in :issue:`34793`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1041 +#: ../../whatsnew/3.9.rst:1044 msgid "" "The :func:`sys.getcounts` function, the ``-X showalloccount`` command line " "option and the ``show_alloc_count`` field of the C structure :c:type:" @@ -1517,7 +1523,7 @@ msgid "" "`39489`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1047 +#: ../../whatsnew/3.9.rst:1050 msgid "" "The ``_field_types`` attribute of the :class:`typing.NamedTuple` class has " "been removed. It was deprecated since Python 3.8. Use the " @@ -1525,14 +1531,14 @@ msgid "" "issue:`40182`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1052 +#: ../../whatsnew/3.9.rst:1055 msgid "" "The :meth:`symtable.SymbolTable.has_exec` method has been removed. It was " "deprecated since 2006, and only returning ``False`` when it's called. " "(Contributed by Batuhan Taskaya in :issue:`40208`)" msgstr "" -#: ../../whatsnew/3.9.rst:1056 +#: ../../whatsnew/3.9.rst:1059 msgid "" "The :meth:`asyncio.Task.current_task` and :meth:`asyncio.Task.all_tasks` " "have been removed. They were deprecated since Python 3.7 and you can use :" @@ -1540,7 +1546,7 @@ msgid "" "(Contributed by Rémi Lapeyre in :issue:`40967`)" msgstr "" -#: ../../whatsnew/3.9.rst:1061 +#: ../../whatsnew/3.9.rst:1064 msgid "" "The ``unescape()`` method in the :class:`html.parser.HTMLParser` class has " "been removed (it was deprecated since Python 3.4). :func:`html.unescape` " @@ -1548,21 +1554,21 @@ msgid "" "unicode characters." msgstr "" -#: ../../whatsnew/3.9.rst:1068 ../../whatsnew/3.9.rst:1335 +#: ../../whatsnew/3.9.rst:1071 ../../whatsnew/3.9.rst:1338 msgid "Porting to Python 3.9" msgstr "" -#: ../../whatsnew/3.9.rst:1070 +#: ../../whatsnew/3.9.rst:1073 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.9.rst:1075 +#: ../../whatsnew/3.9.rst:1078 msgid "Changes in the Python API" msgstr "" -#: ../../whatsnew/3.9.rst:1077 +#: ../../whatsnew/3.9.rst:1080 msgid "" ":func:`__import__` and :func:`importlib.util.resolve_name` now raise :exc:" "`ImportError` where it previously raised :exc:`ValueError`. Callers catching " @@ -1570,26 +1576,26 @@ msgid "" "versions will need to catch both using ``except (ImportError, ValueError):``." msgstr "" -#: ../../whatsnew/3.9.rst:1082 +#: ../../whatsnew/3.9.rst:1085 msgid "" "The :mod:`venv` activation scripts no longer special-case when " "``__VENV_PROMPT__`` is set to ``\"\"``." msgstr "" -#: ../../whatsnew/3.9.rst:1085 +#: ../../whatsnew/3.9.rst:1088 msgid "" "The :meth:`select.epoll.unregister` method no longer ignores the :data:" "`~errno.EBADF` error. (Contributed by Victor Stinner in :issue:`39239`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1089 +#: ../../whatsnew/3.9.rst:1092 msgid "" "The *compresslevel* parameter of :class:`bz2.BZ2File` became keyword-only, " "since the *buffering* parameter has been removed. (Contributed by Victor " "Stinner in :issue:`39357`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1093 +#: ../../whatsnew/3.9.rst:1096 msgid "" "Simplified AST for subscription. Simple indices will be represented by their " "value, extended slices will be represented as tuples. ``Index(value)`` will " @@ -1597,21 +1603,21 @@ msgid "" "Load())``. (Contributed by Serhiy Storchaka in :issue:`34822`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1099 +#: ../../whatsnew/3.9.rst:1102 msgid "" "The :mod:`importlib` module now ignores the :envvar:`PYTHONCASEOK` " "environment variable when the :option:`-E` or :option:`-I` command line " "options are being used." msgstr "" -#: ../../whatsnew/3.9.rst:1103 +#: ../../whatsnew/3.9.rst:1106 msgid "" "The *encoding* parameter has been added to the classes :class:`ftplib.FTP` " "and :class:`ftplib.FTP_TLS` as a keyword-only parameter, and the default " "encoding is changed from Latin-1 to UTF-8 to follow :rfc:`2640`." msgstr "" -#: ../../whatsnew/3.9.rst:1107 +#: ../../whatsnew/3.9.rst:1110 msgid "" ":meth:`asyncio.loop.shutdown_default_executor` has been added to :class:" "`~asyncio.AbstractEventLoop`, meaning alternative event loops that inherit " @@ -1619,7 +1625,7 @@ msgid "" "issue:`34037`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1112 +#: ../../whatsnew/3.9.rst:1115 msgid "" "The constant values of future flags in the :mod:`__future__` module is " "updated in order to prevent collision with compiler flags. Previously " @@ -1627,7 +1633,7 @@ msgid "" "(Contributed by Batuhan Taskaya in :issue:`39562`)" msgstr "" -#: ../../whatsnew/3.9.rst:1117 +#: ../../whatsnew/3.9.rst:1120 msgid "" "``array('u')`` now uses ``wchar_t`` as C type instead of ``Py_UNICODE``. " "This change doesn't affect to its behavior because ``Py_UNICODE`` is alias " @@ -1635,7 +1641,7 @@ msgid "" "`34538`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1122 +#: ../../whatsnew/3.9.rst:1125 msgid "" "The :func:`logging.getLogger` API now returns the root logger when passed " "the name ``'root'``, whereas previously it returned a non-root logger named " @@ -1645,7 +1651,7 @@ msgid "" "(Contributed by Vinay Sajip in :issue:`37742`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1129 +#: ../../whatsnew/3.9.rst:1132 msgid "" "Division handling of :class:`~pathlib.PurePath` now returns " "``NotImplemented`` instead of raising a :exc:`TypeError` when passed " @@ -1654,7 +1660,7 @@ msgid "" "mentioned types. (Contributed by Roger Aiudi in :issue:`34775`)." msgstr "" -#: ../../whatsnew/3.9.rst:1135 +#: ../../whatsnew/3.9.rst:1138 msgid "" "Starting with Python 3.9.5 the :mod:`ipaddress` module no longer accepts any " "leading zeros in IPv4 address strings. Leading zeros are ambiguous and " @@ -1664,7 +1670,7 @@ msgid "" "leading zeros. (Contributed by Christian Heimes in :issue:`36384`)." msgstr "" -#: ../../whatsnew/3.9.rst:1143 +#: ../../whatsnew/3.9.rst:1146 msgid "" ":func:`codecs.lookup` now normalizes the encoding name the same way as :func:" "`encodings.normalize_encoding`, except that :func:`codecs.lookup` also " @@ -1673,11 +1679,11 @@ msgid "" "in :issue:`37751`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1151 +#: ../../whatsnew/3.9.rst:1154 msgid "Changes in the C API" msgstr "" -#: ../../whatsnew/3.9.rst:1153 +#: ../../whatsnew/3.9.rst:1156 msgid "" "Instances of :ref:`heap-allocated types ` (such as those created " "with :c:func:`PyType_FromSpec` and similar APIs) hold a reference to their " @@ -1688,7 +1694,7 @@ msgid "" "heap-allocated types visit the object's type." msgstr "" -#: ../../whatsnew/3.9.rst:1174 +#: ../../whatsnew/3.9.rst:1177 msgid "" "If your traverse function delegates to ``tp_traverse`` of its base class (or " "another type), ensure that ``Py_TYPE(self)`` is visited only once. Note that " @@ -1696,19 +1702,19 @@ msgid "" "``tp_traverse``." msgstr "" -#: ../../whatsnew/3.9.rst:1179 +#: ../../whatsnew/3.9.rst:1182 msgid "For example, if your ``tp_traverse`` function includes:" msgstr "" -#: ../../whatsnew/3.9.rst:1185 +#: ../../whatsnew/3.9.rst:1188 msgid "then add:" msgstr "" -#: ../../whatsnew/3.9.rst:1198 +#: ../../whatsnew/3.9.rst:1201 msgid "(See :issue:`35810` and :issue:`40217` for more information.)" msgstr "(更多資訊請見 :issue:`35810` 與 :issue:`40217`\\ 。)" -#: ../../whatsnew/3.9.rst:1200 +#: ../../whatsnew/3.9.rst:1203 msgid "" "The functions ``PyEval_CallObject``, ``PyEval_CallFunction``, " "``PyEval_CallMethod`` and ``PyEval_CallObjectWithKeywords`` are deprecated. " @@ -1716,11 +1722,11 @@ msgid "" "issue:`29548`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1206 +#: ../../whatsnew/3.9.rst:1209 msgid "CPython bytecode changes" msgstr "" -#: ../../whatsnew/3.9.rst:1208 +#: ../../whatsnew/3.9.rst:1211 msgid "" "The :opcode:`LOAD_ASSERTION_ERROR` opcode was added for handling the :" "keyword:`assert` statement. Previously, the assert statement would not work " @@ -1728,37 +1734,37 @@ msgid "" "(Contributed by Zackery Spytz in :issue:`34880`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1213 +#: ../../whatsnew/3.9.rst:1216 msgid "" "The :opcode:`COMPARE_OP` opcode was split into four distinct instructions:" msgstr "" -#: ../../whatsnew/3.9.rst:1215 +#: ../../whatsnew/3.9.rst:1218 msgid "``COMPARE_OP`` for rich comparisons" msgstr "" -#: ../../whatsnew/3.9.rst:1216 +#: ../../whatsnew/3.9.rst:1219 msgid "``IS_OP`` for 'is' and 'is not' tests" msgstr "" -#: ../../whatsnew/3.9.rst:1217 +#: ../../whatsnew/3.9.rst:1220 msgid "``CONTAINS_OP`` for 'in' and 'not in' tests" msgstr "" -#: ../../whatsnew/3.9.rst:1218 +#: ../../whatsnew/3.9.rst:1221 msgid "" "``JUMP_IF_NOT_EXC_MATCH`` for checking exceptions in 'try-except' statements." msgstr "" -#: ../../whatsnew/3.9.rst:1221 +#: ../../whatsnew/3.9.rst:1224 msgid "(Contributed by Mark Shannon in :issue:`39156`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1225 +#: ../../whatsnew/3.9.rst:1228 msgid "Build Changes" msgstr "" -#: ../../whatsnew/3.9.rst:1227 +#: ../../whatsnew/3.9.rst:1230 msgid "" "Added ``--with-platlibdir`` option to the ``configure`` script: name of the " "platform-specific library directory, stored in the new :attr:`sys." @@ -1767,26 +1773,26 @@ msgid "" "and Victor Stinner in :issue:`1294959`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1233 +#: ../../whatsnew/3.9.rst:1236 msgid "" "The ``COUNT_ALLOCS`` special build macro has been removed. (Contributed by " "Victor Stinner in :issue:`39489`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1236 +#: ../../whatsnew/3.9.rst:1239 msgid "" "On non-Windows platforms, the :c:func:`setenv` and :c:func:`unsetenv` " "functions are now required to build Python. (Contributed by Victor Stinner " "in :issue:`39395`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1240 +#: ../../whatsnew/3.9.rst:1243 msgid "" "On non-Windows platforms, creating ``bdist_wininst`` installers is now " "officially unsupported. (See :issue:`10945` for more details.)" msgstr "" -#: ../../whatsnew/3.9.rst:1243 +#: ../../whatsnew/3.9.rst:1246 msgid "" "When building Python on macOS from source, ``_tkinter`` now links with non-" "system Tcl and Tk frameworks if they are installed in ``/Library/" @@ -1797,13 +1803,13 @@ msgid "" "libs`. (Contributed by Ned Deily in :issue:`34956`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1252 +#: ../../whatsnew/3.9.rst:1255 msgid "" "Python can now be built for Windows 10 ARM64. (Contributed by Steve Dower " "in :issue:`33125`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1255 +#: ../../whatsnew/3.9.rst:1258 msgid "" "Some individual tests are now skipped when ``--pgo`` is used. The tests in " "question increased the PGO task time significantly and likely didn't help " @@ -1819,11 +1825,11 @@ msgid "" "details.)" msgstr "" -#: ../../whatsnew/3.9.rst:1270 +#: ../../whatsnew/3.9.rst:1273 msgid "C API Changes" msgstr "" -#: ../../whatsnew/3.9.rst:1275 +#: ../../whatsnew/3.9.rst:1278 msgid "" ":pep:`573`: Added :c:func:`PyType_FromModuleAndSpec` to associate a module " "with a class; :c:func:`PyType_GetModule` and :c:func:`PyType_GetModuleState` " @@ -1832,20 +1838,20 @@ msgid "" "(Contributed by Marcel Plch and Petr Viktorin in :issue:`38787`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1282 +#: ../../whatsnew/3.9.rst:1285 msgid "" "Added :c:func:`PyFrame_GetCode` function: get a frame code. Added :c:func:" "`PyFrame_GetBack` function: get the frame next outer frame. (Contributed by " "Victor Stinner in :issue:`40421`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1286 +#: ../../whatsnew/3.9.rst:1289 msgid "" "Added :c:func:`PyFrame_GetLineNumber` to the limited C API. (Contributed by " "Victor Stinner in :issue:`40421`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1289 +#: ../../whatsnew/3.9.rst:1292 msgid "" "Added :c:func:`PyThreadState_GetInterpreter` and :c:func:" "`PyInterpreterState_Get` functions to get the interpreter. Added :c:func:" @@ -1855,7 +1861,7 @@ msgid "" "issue:`39947`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1297 +#: ../../whatsnew/3.9.rst:1300 msgid "" "Added a new public :c:func:`PyObject_CallNoArgs` function to the C API, " "which calls a callable Python object without any arguments. It is the most " @@ -1863,11 +1869,11 @@ msgid "" "(Contributed by Victor Stinner in :issue:`37194`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1302 ../../whatsnew/3.9.rst:1420 +#: ../../whatsnew/3.9.rst:1305 ../../whatsnew/3.9.rst:1423 msgid "Changes in the limited C API (if ``Py_LIMITED_API`` macro is defined):" msgstr "" -#: ../../whatsnew/3.9.rst:1304 +#: ../../whatsnew/3.9.rst:1307 msgid "" "Provide :c:func:`Py_EnterRecursiveCall` and :c:func:`Py_LeaveRecursiveCall` " "as regular functions for the limited API. Previously, there were defined as " @@ -1876,23 +1882,23 @@ msgid "" "the limited C API)." msgstr "" -#: ../../whatsnew/3.9.rst:1310 +#: ../../whatsnew/3.9.rst:1313 msgid "" "``PyObject_INIT()`` and ``PyObject_INIT_VAR()`` become regular \"opaque\" " "function to hide implementation details." msgstr "" -#: ../../whatsnew/3.9.rst:1313 ../../whatsnew/3.9.rst:1447 +#: ../../whatsnew/3.9.rst:1316 ../../whatsnew/3.9.rst:1450 msgid "(Contributed by Victor Stinner in :issue:`38644` and :issue:`39542`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1315 +#: ../../whatsnew/3.9.rst:1318 msgid "" "The :c:func:`PyModule_AddType` function is added to help adding a type to a " "module. (Contributed by Dong-hee Na in :issue:`40024`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1319 +#: ../../whatsnew/3.9.rst:1322 msgid "" "Added the functions :c:func:`PyObject_GC_IsTracked` and :c:func:" "`PyObject_GC_IsFinalized` to the public API to allow to query if Python " @@ -1901,27 +1907,27 @@ msgid "" "issue:`40241`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1325 +#: ../../whatsnew/3.9.rst:1328 msgid "" "Added :c:func:`_PyObject_FunctionStr` to get a user-friendly string " "representation of a function-like object. (Patch by Jeroen Demeyer in :issue:" "`37645`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1329 +#: ../../whatsnew/3.9.rst:1332 msgid "" "Added :c:func:`PyObject_CallOneArg` for calling an object with one " "positional argument (Patch by Jeroen Demeyer in :issue:`37483`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1337 +#: ../../whatsnew/3.9.rst:1340 msgid "" "``PyInterpreterState.eval_frame`` (:pep:`523`) now requires a new mandatory " "*tstate* parameter (``PyThreadState*``). (Contributed by Victor Stinner in :" "issue:`38500`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1341 +#: ../../whatsnew/3.9.rst:1344 msgid "" "Extension modules: :c:member:`~PyModuleDef.m_traverse`, :c:member:" "`~PyModuleDef.m_clear` and :c:member:`~PyModuleDef.m_free` functions of :c:" @@ -1933,12 +1939,12 @@ msgid "" "`PyModule_GetState`) is ``NULL``." msgstr "" -#: ../../whatsnew/3.9.rst:1350 +#: ../../whatsnew/3.9.rst:1353 msgid "" "Extension modules without module state (``m_size <= 0``) are not affected." msgstr "" -#: ../../whatsnew/3.9.rst:1352 +#: ../../whatsnew/3.9.rst:1355 msgid "" "If :c:func:`Py_AddPendingCall` is called in a subinterpreter, the function " "is now scheduled to be called from the subinterpreter, rather than being " @@ -1946,7 +1952,7 @@ msgid "" "of scheduled calls. (Contributed by Victor Stinner in :issue:`39984`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1358 +#: ../../whatsnew/3.9.rst:1361 msgid "" "The Windows registry is no longer used to initialize :data:`sys.path` when " "the ``-E`` option is used (if :c:member:`PyConfig.use_environment` is set to " @@ -1954,21 +1960,21 @@ msgid "" "by Zackery Spytz in :issue:`8901`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1363 +#: ../../whatsnew/3.9.rst:1366 msgid "" "The global variable :c:data:`PyStructSequence_UnnamedField` is now a " "constant and refers to a constant string. (Contributed by Serhiy Storchaka " "in :issue:`38650`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1367 +#: ../../whatsnew/3.9.rst:1370 msgid "" "The :c:type:`PyGC_Head` structure is now opaque. It is only defined in the " "internal C API (``pycore_gc.h``). (Contributed by Victor Stinner in :issue:" "`40241`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1371 +#: ../../whatsnew/3.9.rst:1374 msgid "" "The ``Py_UNICODE_COPY``, ``Py_UNICODE_FILL``, ``PyUnicode_WSTR_LENGTH``, :c:" "func:`PyUnicode_FromUnicode`, :c:func:`PyUnicode_AsUnicode`, " @@ -1977,7 +1983,7 @@ msgid "" "Python 3.3. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1378 +#: ../../whatsnew/3.9.rst:1381 msgid "" "The :c:func:`Py_FatalError` function is replaced with a macro which logs " "automatically the name of the current function, unless the " @@ -1985,22 +1991,22 @@ msgid "" "issue:`39882`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1383 +#: ../../whatsnew/3.9.rst:1386 msgid "" "The vectorcall protocol now requires that the caller passes only strings as " "keyword names. (See :issue:`37540` for more information.)" msgstr "" -#: ../../whatsnew/3.9.rst:1386 +#: ../../whatsnew/3.9.rst:1389 msgid "" "Implementation details of a number of macros and functions are now hidden:" msgstr "" -#: ../../whatsnew/3.9.rst:1388 +#: ../../whatsnew/3.9.rst:1391 msgid ":c:func:`PyObject_IS_GC` macro was converted to a function." msgstr "" -#: ../../whatsnew/3.9.rst:1390 +#: ../../whatsnew/3.9.rst:1393 msgid "" "The :c:func:`PyObject_NEW` macro becomes an alias to the :c:func:" "`PyObject_New` macro, and the :c:func:`PyObject_NEW_VAR` macro becomes an " @@ -2008,38 +2014,38 @@ msgid "" "the :c:member:`PyTypeObject.tp_basicsize` member." msgstr "" -#: ../../whatsnew/3.9.rst:1395 +#: ../../whatsnew/3.9.rst:1398 msgid "" ":c:func:`PyObject_GET_WEAKREFS_LISTPTR` macro was converted to a function: " "the macro accessed directly the :c:member:`PyTypeObject.tp_weaklistoffset` " "member." msgstr "" -#: ../../whatsnew/3.9.rst:1399 +#: ../../whatsnew/3.9.rst:1402 msgid "" ":c:func:`PyObject_CheckBuffer` macro was converted to a function: the macro " "accessed directly the :c:member:`PyTypeObject.tp_as_buffer` member." msgstr "" -#: ../../whatsnew/3.9.rst:1402 +#: ../../whatsnew/3.9.rst:1405 msgid "" ":c:func:`PyIndex_Check` is now always declared as an opaque function to hide " "implementation details: removed the ``PyIndex_Check()`` macro. The macro " "accessed directly the :c:member:`PyTypeObject.tp_as_number` member." msgstr "" -#: ../../whatsnew/3.9.rst:1406 +#: ../../whatsnew/3.9.rst:1409 msgid "(See :issue:`40170` for more details.)" msgstr "(更多資訊請見 :issue:`40170`\\ 。)" -#: ../../whatsnew/3.9.rst:1411 +#: ../../whatsnew/3.9.rst:1414 msgid "" "Excluded ``PyFPE_START_PROTECT()`` and ``PyFPE_END_PROTECT()`` macros of " "``pyfpe.h`` from the limited C API. (Contributed by Victor Stinner in :issue:" "`38835`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1415 +#: ../../whatsnew/3.9.rst:1418 msgid "" "The ``tp_print`` slot of :ref:`PyTypeObject ` has been " "removed. It was used for printing objects to files in Python 2.7 and before. " @@ -2047,89 +2053,89 @@ msgid "" "Demeyer in :issue:`36974`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1422 +#: ../../whatsnew/3.9.rst:1425 msgid "Excluded the following functions from the limited C API:" msgstr "" -#: ../../whatsnew/3.9.rst:1424 +#: ../../whatsnew/3.9.rst:1427 msgid "" "``PyThreadState_DeleteCurrent()`` (Contributed by Joannah Nanjekye in :issue:" "`37878`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1426 +#: ../../whatsnew/3.9.rst:1429 msgid "``_Py_CheckRecursionLimit``" msgstr "``_Py_CheckRecursionLimit``" -#: ../../whatsnew/3.9.rst:1427 +#: ../../whatsnew/3.9.rst:1430 msgid "``_Py_NewReference()``" msgstr "``_Py_NewReference()``" -#: ../../whatsnew/3.9.rst:1428 +#: ../../whatsnew/3.9.rst:1431 msgid "``_Py_ForgetReference()``" msgstr "``_Py_ForgetReference()``" -#: ../../whatsnew/3.9.rst:1429 +#: ../../whatsnew/3.9.rst:1432 msgid "``_PyTraceMalloc_NewReference()``" msgstr "``_PyTraceMalloc_NewReference()``" -#: ../../whatsnew/3.9.rst:1430 +#: ../../whatsnew/3.9.rst:1433 msgid "``_Py_GetRefTotal()``" msgstr "``_Py_GetRefTotal()``" -#: ../../whatsnew/3.9.rst:1431 +#: ../../whatsnew/3.9.rst:1434 msgid "The trashcan mechanism which never worked in the limited C API." msgstr "" -#: ../../whatsnew/3.9.rst:1432 +#: ../../whatsnew/3.9.rst:1435 msgid "``PyTrash_UNWIND_LEVEL``" msgstr "``PyTrash_UNWIND_LEVEL``" -#: ../../whatsnew/3.9.rst:1433 +#: ../../whatsnew/3.9.rst:1436 msgid "``Py_TRASHCAN_BEGIN_CONDITION``" msgstr "``Py_TRASHCAN_BEGIN_CONDITION``" -#: ../../whatsnew/3.9.rst:1434 +#: ../../whatsnew/3.9.rst:1437 msgid "``Py_TRASHCAN_BEGIN``" msgstr "``Py_TRASHCAN_BEGIN``" -#: ../../whatsnew/3.9.rst:1435 +#: ../../whatsnew/3.9.rst:1438 msgid "``Py_TRASHCAN_END``" msgstr "``Py_TRASHCAN_END``" -#: ../../whatsnew/3.9.rst:1436 +#: ../../whatsnew/3.9.rst:1439 msgid "``Py_TRASHCAN_SAFE_BEGIN``" msgstr "``Py_TRASHCAN_SAFE_BEGIN``" -#: ../../whatsnew/3.9.rst:1437 +#: ../../whatsnew/3.9.rst:1440 msgid "``Py_TRASHCAN_SAFE_END``" msgstr "``Py_TRASHCAN_SAFE_END``" -#: ../../whatsnew/3.9.rst:1439 +#: ../../whatsnew/3.9.rst:1442 msgid "Moved following functions and definitions to the internal C API:" msgstr "" -#: ../../whatsnew/3.9.rst:1441 +#: ../../whatsnew/3.9.rst:1444 msgid "``_PyDebug_PrintTotalRefs()``" msgstr "``_PyDebug_PrintTotalRefs()``" -#: ../../whatsnew/3.9.rst:1442 +#: ../../whatsnew/3.9.rst:1445 msgid "``_Py_PrintReferences()``" msgstr "``_Py_PrintReferences()``" -#: ../../whatsnew/3.9.rst:1443 +#: ../../whatsnew/3.9.rst:1446 msgid "``_Py_PrintReferenceAddresses()``" msgstr "``_Py_PrintReferenceAddresses()``" -#: ../../whatsnew/3.9.rst:1444 +#: ../../whatsnew/3.9.rst:1447 msgid "``_Py_tracemalloc_config``" msgstr "``_Py_tracemalloc_config``" -#: ../../whatsnew/3.9.rst:1445 +#: ../../whatsnew/3.9.rst:1448 msgid "``_Py_AddToAllObjects()`` (specific to ``Py_TRACE_REFS`` build)" msgstr "" -#: ../../whatsnew/3.9.rst:1449 +#: ../../whatsnew/3.9.rst:1452 msgid "" "Removed ``_PyRuntime.getframe`` hook and removed ``_PyThreadState_GetFrame`` " "macro which was an alias to ``_PyRuntime.getframe``. They were only exposed " @@ -2137,72 +2143,72 @@ msgid "" "(Contributed by Victor Stinner in :issue:`39946`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1454 +#: ../../whatsnew/3.9.rst:1457 msgid "" "Removed the following functions from the C API. Call :c:func:`PyGC_Collect` " "explicitly to clear all free lists. (Contributed by Inada Naoki and Victor " "Stinner in :issue:`37340`, :issue:`38896` and :issue:`40428`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1459 +#: ../../whatsnew/3.9.rst:1462 msgid "``PyAsyncGen_ClearFreeLists()``" msgstr "``PyAsyncGen_ClearFreeLists()``" -#: ../../whatsnew/3.9.rst:1460 +#: ../../whatsnew/3.9.rst:1463 msgid "``PyContext_ClearFreeList()``" msgstr "``PyContext_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1461 +#: ../../whatsnew/3.9.rst:1464 msgid "``PyDict_ClearFreeList()``" msgstr "``PyDict_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1462 +#: ../../whatsnew/3.9.rst:1465 msgid "``PyFloat_ClearFreeList()``" msgstr "``PyFloat_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1463 +#: ../../whatsnew/3.9.rst:1466 msgid "``PyFrame_ClearFreeList()``" msgstr "``PyFrame_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1464 +#: ../../whatsnew/3.9.rst:1467 msgid "``PyList_ClearFreeList()``" msgstr "``PyList_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1465 +#: ../../whatsnew/3.9.rst:1468 msgid "" "``PyMethod_ClearFreeList()`` and ``PyCFunction_ClearFreeList()``: the free " "lists of bound method objects have been removed." msgstr "" -#: ../../whatsnew/3.9.rst:1467 +#: ../../whatsnew/3.9.rst:1470 msgid "" "``PySet_ClearFreeList()``: the set free list has been removed in Python 3.4." msgstr "" -#: ../../whatsnew/3.9.rst:1469 +#: ../../whatsnew/3.9.rst:1472 msgid "``PyTuple_ClearFreeList()``" msgstr "``PyTuple_ClearFreeList()``" -#: ../../whatsnew/3.9.rst:1470 +#: ../../whatsnew/3.9.rst:1473 msgid "" "``PyUnicode_ClearFreeList()``: the Unicode free list has been removed in " "Python 3.3." msgstr "" -#: ../../whatsnew/3.9.rst:1473 +#: ../../whatsnew/3.9.rst:1476 msgid "" "Removed ``_PyUnicode_ClearStaticStrings()`` function. (Contributed by Victor " "Stinner in :issue:`39465`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1476 +#: ../../whatsnew/3.9.rst:1479 msgid "" "Removed ``Py_UNICODE_MATCH``. It has been deprecated by :pep:`393`, and " "broken since Python 3.3. The :c:func:`PyUnicode_Tailmatch` function can be " "used instead. (Contributed by Inada Naoki in :issue:`36346`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1481 +#: ../../whatsnew/3.9.rst:1484 msgid "" "Cleaned header files of interfaces defined but with no implementation. The " "public API symbols being removed are: " @@ -2215,26 +2221,26 @@ msgid "" "`39372`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1492 +#: ../../whatsnew/3.9.rst:1495 msgid "Notable changes in Python 3.9.1" msgstr "" -#: ../../whatsnew/3.9.rst:1497 +#: ../../whatsnew/3.9.rst:1500 msgid "" "The behavior of :class:`typing.Literal` was changed to conform with :pep:" "`586` and to match the behavior of static type checkers specified in the PEP." msgstr "" -#: ../../whatsnew/3.9.rst:1500 +#: ../../whatsnew/3.9.rst:1503 msgid "``Literal`` now de-duplicates parameters." msgstr "" -#: ../../whatsnew/3.9.rst:1501 +#: ../../whatsnew/3.9.rst:1504 msgid "" "Equality comparisons between ``Literal`` objects are now order independent." msgstr "" -#: ../../whatsnew/3.9.rst:1502 +#: ../../whatsnew/3.9.rst:1505 msgid "" "``Literal`` comparisons now respect types. For example, ``Literal[0] == " "Literal[False]`` previously evaluated to ``True``. It is now ``False``. To " @@ -2242,7 +2248,7 @@ msgid "" "differentiating types." msgstr "" -#: ../../whatsnew/3.9.rst:1506 +#: ../../whatsnew/3.9.rst:1509 msgid "" "``Literal`` objects will now raise a :exc:`TypeError` exception during " "equality comparisons if any of their parameters are not :term:`hashable`. " @@ -2250,15 +2256,15 @@ msgid "" "error::" msgstr "" -#: ../../whatsnew/3.9.rst:1518 +#: ../../whatsnew/3.9.rst:1521 msgid "(Contributed by Yurii Karabas in :issue:`42345`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1521 +#: ../../whatsnew/3.9.rst:1524 msgid "macOS 11.0 (Big Sur) and Apple Silicon Mac support" msgstr "" -#: ../../whatsnew/3.9.rst:1523 +#: ../../whatsnew/3.9.rst:1526 msgid "" "As of 3.9.1, Python now fully supports building and running on macOS 11.0 " "(Big Sur) and on Apple Silicon Macs (based on the ``ARM64`` architecture). A " @@ -2270,19 +2276,19 @@ msgid "" "version in use at runtime (\"weaklinking\")." msgstr "" -#: ../../whatsnew/3.9.rst:1532 +#: ../../whatsnew/3.9.rst:1535 msgid "(Contributed by Ronald Oussoren and Lawrence D'Anna in :issue:`41100`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1535 +#: ../../whatsnew/3.9.rst:1538 msgid "Notable changes in Python 3.9.2" msgstr "" -#: ../../whatsnew/3.9.rst:1538 +#: ../../whatsnew/3.9.rst:1541 msgid "collections.abc" msgstr "collections.abc" -#: ../../whatsnew/3.9.rst:1540 +#: ../../whatsnew/3.9.rst:1543 msgid "" ":class:`collections.abc.Callable` generic now flattens type parameters, " "similar to what :data:`typing.Callable` currently does. This means that " @@ -2298,11 +2304,11 @@ msgid "" "Python 3.10. (Contributed by Ken Jin in :issue:`42195`.)" msgstr "" -#: ../../whatsnew/3.9.rst:1554 +#: ../../whatsnew/3.9.rst:1557 msgid "urllib.parse" msgstr "urllib.parse" -#: ../../whatsnew/3.9.rst:1556 +#: ../../whatsnew/3.9.rst:1559 msgid "" "Earlier Python versions allowed using both ``;`` and ``&`` as query " "parameter separators in :func:`urllib.parse.parse_qs` and :func:`urllib."