2018-07-04 09:06:45 +00:00
|
|
|
# Copyright (C) 2001-2018, Python Software Foundation
|
2018-07-04 09:08:42 +00:00
|
|
|
# For licence information, see README file.
|
2016-10-30 09:46:26 +00:00
|
|
|
#
|
|
|
|
msgid ""
|
|
|
|
msgstr ""
|
2019-12-05 22:15:54 +00:00
|
|
|
"Project-Id-Version: Python 3\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
"Report-Msgid-Bugs-To: \n"
|
2019-11-15 22:57:16 +00:00
|
|
|
"POT-Creation-Date: 2019-11-15 18:54+0100\n"
|
2018-09-28 09:36:32 +00:00
|
|
|
"PO-Revision-Date: 2018-09-28 10:04+0200\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
2018-07-04 09:14:25 +00:00
|
|
|
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
2017-05-23 22:40:56 +00:00
|
|
|
"Language: fr\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
"MIME-Version: 1.0\n"
|
|
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:2
|
|
|
|
msgid ":mod:`types` --- Dynamic type creation and names for built-in types"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:7
|
|
|
|
msgid "**Source code:** :source:`Lib/types.py`"
|
|
|
|
msgstr "**Code source :** :source:`Lib/types.py`"
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:11
|
|
|
|
msgid ""
|
2019-01-03 16:00:01 +00:00
|
|
|
"This module defines utility functions to assist in dynamic creation of new "
|
2016-10-30 09:46:26 +00:00
|
|
|
"types."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:14
|
|
|
|
msgid ""
|
|
|
|
"It also defines names for some object types that are used by the standard "
|
|
|
|
"Python interpreter, but not exposed as builtins like :class:`int` or :class:"
|
|
|
|
"`str` are."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:18
|
|
|
|
msgid ""
|
|
|
|
"Finally, it provides some additional type-related utility classes and "
|
|
|
|
"functions that are not fundamental enough to be builtins."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:23
|
|
|
|
msgid "Dynamic Type Creation"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:27
|
|
|
|
msgid "Creates a class object dynamically using the appropriate metaclass."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:29
|
|
|
|
msgid ""
|
|
|
|
"The first three arguments are the components that make up a class definition "
|
|
|
|
"header: the class name, the base classes (in order), the keyword arguments "
|
|
|
|
"(such as ``metaclass``)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:33
|
|
|
|
msgid ""
|
|
|
|
"The *exec_body* argument is a callback that is used to populate the freshly "
|
|
|
|
"created class namespace. It should accept the class namespace as its sole "
|
|
|
|
"argument and update the namespace directly with the class contents. If no "
|
|
|
|
"callback is provided, it has the same effect as passing in ``lambda ns: ns``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:43
|
|
|
|
msgid "Calculates the appropriate metaclass and creates the class namespace."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:45
|
|
|
|
msgid ""
|
|
|
|
"The arguments are the components that make up a class definition header: the "
|
|
|
|
"class name, the base classes (in order) and the keyword arguments (such as "
|
|
|
|
"``metaclass``)."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:49
|
|
|
|
msgid "The return value is a 3-tuple: ``metaclass, namespace, kwds``"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:51
|
|
|
|
msgid ""
|
|
|
|
"*metaclass* is the appropriate metaclass, *namespace* is the prepared class "
|
|
|
|
"namespace and *kwds* is an updated copy of the passed in *kwds* argument "
|
|
|
|
"with any ``'metaclass'`` entry removed. If no *kwds* argument is passed in, "
|
|
|
|
"this will be an empty dict."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:60
|
|
|
|
msgid ""
|
|
|
|
"The default value for the ``namespace`` element of the returned tuple has "
|
|
|
|
"changed. Now an insertion-order-preserving mapping is used when the "
|
2018-06-28 13:32:56 +00:00
|
|
|
"metaclass does not have a ``__prepare__`` method."
|
2016-10-30 09:46:26 +00:00
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:67
|
|
|
|
msgid ":ref:`metaclasses`"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:67
|
|
|
|
msgid "Full details of the class creation process supported by these functions"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:69
|
|
|
|
msgid ":pep:`3115` - Metaclasses in Python 3000"
|
2018-10-10 16:29:20 +00:00
|
|
|
msgstr ":pep:`3115` -- Méta-classes dans Python 3000"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:70
|
|
|
|
msgid "Introduced the ``__prepare__`` namespace hook"
|
|
|
|
msgstr ""
|
2019-04-03 21:49:45 +00:00
|
|
|
"introduction de la fonction automatique ``__prepare__`` de l'espace de "
|
|
|
|
"nommage"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:74
|
2018-06-28 13:32:56 +00:00
|
|
|
msgid "Resolve MRO entries dynamically as specified by :pep:`560`."
|
2016-10-30 09:46:26 +00:00
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:76
|
|
|
|
msgid ""
|
2018-06-28 13:32:56 +00:00
|
|
|
"This function looks for items in *bases* that are not instances of :class:"
|
|
|
|
"`type`, and returns a tuple where each such object that has an "
|
|
|
|
"``__mro_entries__`` method is replaced with an unpacked result of calling "
|
|
|
|
"this method. If a *bases* item is an instance of :class:`type`, or it "
|
|
|
|
"doesn't have an ``__mro_entries__`` method, then it is included in the "
|
|
|
|
"return tuple unchanged."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:87
|
|
|
|
msgid ":pep:`560` - Core support for typing module and generic types"
|
|
|
|
msgstr ""
|
2018-10-10 16:29:20 +00:00
|
|
|
":pep:`560` -- Gestion de base pour les types modules et les types génériques"
|
2018-06-28 13:32:56 +00:00
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:91
|
|
|
|
msgid "Standard Interpreter Types"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:93
|
|
|
|
msgid ""
|
2016-10-30 09:46:26 +00:00
|
|
|
"This module provides names for many of the types that are required to "
|
|
|
|
"implement a Python interpreter. It deliberately avoids including some of the "
|
|
|
|
"types that arise only incidentally during processing such as the "
|
|
|
|
"``listiterator`` type."
|
|
|
|
msgstr ""
|
|
|
|
|
2018-06-28 13:32:56 +00:00
|
|
|
#: ../Doc/library/types.rst:98
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Typical use of these names is for :func:`isinstance` or :func:`issubclass` "
|
|
|
|
"checks."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-09-04 09:35:23 +00:00
|
|
|
#: ../Doc/library/types.rst:102
|
|
|
|
msgid ""
|
|
|
|
"If you instantiate any of these types, note that signatures may vary between "
|
|
|
|
"Python versions."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:104
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Standard names are defined for the following types:"
|
|
|
|
msgstr ""
|
|
|
|
|
2019-09-04 09:35:23 +00:00
|
|
|
#: ../Doc/library/types.rst:109
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of user-defined functions and functions created by :keyword:"
|
|
|
|
"`lambda` expressions."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-09-04 09:35:23 +00:00
|
|
|
#: ../Doc/library/types.rst:115
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of :term:`generator`-iterator objects, created by generator "
|
|
|
|
"functions."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-09-04 09:35:23 +00:00
|
|
|
#: ../Doc/library/types.rst:121
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of :term:`coroutine` objects, created by :keyword:`async def` "
|
|
|
|
"functions."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-09-04 09:35:23 +00:00
|
|
|
#: ../Doc/library/types.rst:129
|
2017-04-02 20:14:06 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of :term:`asynchronous generator`-iterator objects, created by "
|
|
|
|
"asynchronous generator functions."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-09-04 09:35:23 +00:00
|
|
|
#: ../Doc/library/types.rst:139
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "The type for code objects such as returned by :func:`compile`."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:142
|
|
|
|
msgid ""
|
|
|
|
"Raises an :ref:`auditing event <auditing>` ``code.__new__`` with arguments "
|
|
|
|
"``code``, ``filename``, ``name``, ``argcount``, ``posonlyargcount``, "
|
|
|
|
"``kwonlyargcount``, ``nlocals``, ``stacksize``, ``flags``."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:143
|
|
|
|
msgid ""
|
|
|
|
"Note that the audited arguments may not match the names or positions "
|
|
|
|
"required by the initializer."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#: ../Doc/library/types.rst:148
|
2019-09-04 09:35:23 +00:00
|
|
|
msgid ""
|
|
|
|
"The type for cell objects: such objects are used as containers for a "
|
|
|
|
"function's free variables."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:156
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "The type of methods of user-defined class instances."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:162
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of built-in functions like :func:`len` or :func:`sys.exit`, and "
|
|
|
|
"methods of built-in classes. (Here, the term \"built-in\" means \"written "
|
|
|
|
"in C\".)"
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:169
|
2018-06-28 13:32:56 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of methods of some built-in data types and base classes such as :"
|
|
|
|
"meth:`object.__init__` or :meth:`object.__lt__`."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:177
|
2018-06-28 13:32:56 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of *bound* methods of some built-in data types and base classes. "
|
|
|
|
"For example it is the type of :code:`object().__str__`."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:185
|
2018-06-28 13:32:56 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of methods of some built-in data types such as :meth:`str.join`."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:192
|
2018-06-28 13:32:56 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of *unbound* class methods of some built-in data types such as "
|
|
|
|
"``dict.__dict__['fromkeys']``."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:200
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of :term:`modules <module>`. Constructor takes the name of the "
|
|
|
|
"module to be created and optionally its :term:`docstring`."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:204
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Use :func:`importlib.util.module_from_spec` to create a new module if you "
|
|
|
|
"wish to set the various import-controlled attributes."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:209
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "The :term:`docstring` of the module. Defaults to ``None``."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:213
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "The :term:`loader` which loaded the module. Defaults to ``None``."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:215 ../Doc/library/types.rst:229
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Defaults to ``None``. Previously the attribute was optional."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:220
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "The name of the module."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:224
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Which :term:`package` a module belongs to. If the module is top-level (i.e. "
|
|
|
|
"not a part of any specific package) then the attribute should be set to "
|
|
|
|
"``''``, else it should be set to the name of the package (which can be :attr:"
|
|
|
|
"`__name__` if the module is a package itself). Defaults to ``None``."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:235
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "The type of traceback objects such as found in ``sys.exc_info()[2]``."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:237
|
2018-06-28 13:32:56 +00:00
|
|
|
msgid ""
|
|
|
|
"See :ref:`the language reference <traceback-objects>` for details of the "
|
|
|
|
"available attributes and operations, and guidance on creating tracebacks "
|
|
|
|
"dynamically."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:244
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of frame objects such as found in ``tb.tb_frame`` if ``tb`` is a "
|
|
|
|
"traceback object."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:247
|
2018-06-28 13:32:56 +00:00
|
|
|
msgid ""
|
|
|
|
"See :ref:`the language reference <frame-objects>` for details of the "
|
|
|
|
"available attributes and operations."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:253
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of objects defined in extension modules with ``PyGetSetDef``, such "
|
|
|
|
"as ``FrameType.f_locals`` or ``array.array.typecode``. This type is used as "
|
|
|
|
"descriptor for object attributes; it has the same purpose as the :class:"
|
|
|
|
"`property` type, but for classes defined in extension modules."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:261
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"The type of objects defined in extension modules with ``PyMemberDef``, such "
|
|
|
|
"as ``datetime.timedelta.days``. This type is used as descriptor for simple "
|
|
|
|
"C data members which use standard conversion functions; it has the same "
|
|
|
|
"purpose as the :class:`property` type, but for classes defined in extension "
|
|
|
|
"modules."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:268
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"In other implementations of Python, this type may be identical to "
|
|
|
|
"``GetSetDescriptorType``."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:273
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Read-only proxy of a mapping. It provides a dynamic view on the mapping's "
|
|
|
|
"entries, which means that when the mapping changes, the view reflects these "
|
|
|
|
"changes."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:281
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Return ``True`` if the underlying mapping has a key *key*, else ``False``."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:286
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Return the item of the underlying mapping with key *key*. Raises a :exc:"
|
|
|
|
"`KeyError` if *key* is not in the underlying mapping."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:291
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Return an iterator over the keys of the underlying mapping. This is a "
|
|
|
|
"shortcut for ``iter(proxy.keys())``."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:296
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Return the number of items in the underlying mapping."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:300
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Return a shallow copy of the underlying mapping."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:304
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Return the value for *key* if *key* is in the underlying mapping, else "
|
|
|
|
"*default*. If *default* is not given, it defaults to ``None``, so that this "
|
|
|
|
"method never raises a :exc:`KeyError`."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:310
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Return a new view of the underlying mapping's items (``(key, value)`` pairs)."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:315
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Return a new view of the underlying mapping's keys."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:319
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Return a new view of the underlying mapping's values."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:323
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Additional Utility Classes and Functions"
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:327
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"A simple :class:`object` subclass that provides attribute access to its "
|
|
|
|
"namespace, as well as a meaningful repr."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:330
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"Unlike :class:`object`, with ``SimpleNamespace`` you can add and remove "
|
|
|
|
"attributes. If a ``SimpleNamespace`` object is initialized with keyword "
|
|
|
|
"arguments, those are directly added to the underlying namespace."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:334
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "The type is roughly equivalent to the following code::"
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:348
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"``SimpleNamespace`` may be useful as a replacement for ``class NS: pass``. "
|
|
|
|
"However, for a structured record type use :func:`~collections.namedtuple` "
|
|
|
|
"instead."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:357
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Route attribute access on a class to __getattr__."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:359
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"This is a descriptor, used to define attributes that act differently when "
|
|
|
|
"accessed through an instance and through a class. Instance access remains "
|
|
|
|
"normal, but access to an attribute through a class will be routed to the "
|
|
|
|
"class's __getattr__ method; this is done by raising AttributeError."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:364
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"This allows one to have properties active on an instance, and have virtual "
|
|
|
|
"attributes on the class with the same name (see Enum for an example)."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:371
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "Coroutine Utility Functions"
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:375
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"This function transforms a :term:`generator` function into a :term:"
|
|
|
|
"`coroutine function` which returns a generator-based coroutine. The "
|
|
|
|
"generator-based coroutine is still a :term:`generator iterator`, but is also "
|
|
|
|
"considered to be a :term:`coroutine` object and is :term:`awaitable`. "
|
|
|
|
"However, it may not necessarily implement the :meth:`__await__` method."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:382
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid "If *gen_func* is a generator function, it will be modified in-place."
|
|
|
|
msgstr ""
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
#: ../Doc/library/types.rst:384
|
2016-10-30 09:46:26 +00:00
|
|
|
msgid ""
|
|
|
|
"If *gen_func* is not a generator function, it will be wrapped. If it returns "
|
|
|
|
"an instance of :class:`collections.abc.Generator`, the instance will be "
|
|
|
|
"wrapped in an *awaitable* proxy object. All other types of objects will be "
|
|
|
|
"returned as is."
|
|
|
|
msgstr ""
|