diff options
author | Jules Lasne (jlasne) <jlasne@student.42.fr> | 2019-03-27 10:10:33 (GMT) |
---|---|---|
committer | Julien Palard <julien@palard.fr> | 2019-03-27 10:10:33 (GMT) |
commit | 1fc5bf2ff27b898e8d9460d0fbc791e83009ed71 (patch) | |
tree | 0d12a90bc358872a8d89a048c39290cb6a58f0d5 /Doc | |
parent | bc284f0c7a9a7a9a4bf12c680823023a6770ce06 (diff) | |
download | cpython-1fc5bf2ff27b898e8d9460d0fbc791e83009ed71.zip cpython-1fc5bf2ff27b898e8d9460d0fbc791e83009ed71.tar.gz cpython-1fc5bf2ff27b898e8d9460d0fbc791e83009ed71.tar.bz2 |
Doc: Fixed missing punctuation in datamodel.rst (GH-12581)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/reference/datamodel.rst | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index c3e79ce..1683d25 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -475,13 +475,13 @@ Callable types | :attr:`__doc__` | The function's documentation | Writable | | | string, or ``None`` if | | | | unavailable; not inherited by | | - | | subclasses | | + | | subclasses. | | +-------------------------+-------------------------------+-----------+ - | :attr:`~definition.\ | The function's name | Writable | + | :attr:`~definition.\ | The function's name. | Writable | | __name__` | | | +-------------------------+-------------------------------+-----------+ | :attr:`~definition.\ | The function's | Writable | - | __qualname__` | :term:`qualified name` | | + | __qualname__` | :term:`qualified name`. | | | | | | | | .. versionadded:: 3.3 | | +-------------------------+-------------------------------+-----------+ @@ -493,7 +493,7 @@ Callable types | | argument values for those | | | | arguments that have defaults, | | | | or ``None`` if no arguments | | - | | have a default value | | + | | have a default value. | | +-------------------------+-------------------------------+-----------+ | :attr:`__code__` | The code object representing | Writable | | | the compiled function body. | | @@ -1857,11 +1857,11 @@ passed through to all metaclass operations described below. When a class definition is executed, the following steps occur: -* MRO entries are resolved -* the appropriate metaclass is determined -* the class namespace is prepared -* the class body is executed -* the class object is created +* MRO entries are resolved; +* the appropriate metaclass is determined; +* the class namespace is prepared; +* the class body is executed; +* the class object is created. Resolving MRO entries @@ -1885,11 +1885,11 @@ Determining the appropriate metaclass The appropriate metaclass for a class definition is determined as follows: -* if no bases and no explicit metaclass are given, then :func:`type` is used +* if no bases and no explicit metaclass are given, then :func:`type` is used; * if an explicit metaclass is given and it is *not* an instance of - :func:`type`, then it is used directly as the metaclass + :func:`type`, then it is used directly as the metaclass; * if an instance of :func:`type` is given as the explicit metaclass, or - bases are defined, then the most derived metaclass is used + bases are defined, then the most derived metaclass is used. The most derived metaclass is selected from the explicitly specified metaclass (if any) and the metaclasses (i.e. ``type(cls)``) of all specified @@ -1976,7 +1976,7 @@ invoked after creating the class object: * first, ``type.__new__`` collects all of the descriptors in the class namespace that define a :meth:`~object.__set_name__` method; * second, all of these ``__set_name__`` methods are called with the class - being defined and the assigned name of that particular descriptor; and + being defined and the assigned name of that particular descriptor; * finally, the :meth:`~object.__init_subclass__` hook is called on the immediate parent of the new class in its method resolution order. @@ -2048,7 +2048,7 @@ Emulating generic types ----------------------- One can implement the generic class syntax as specified by :pep:`484` -(for example ``List[int]``) by defining a special method +(for example ``List[int]``) by defining a special method: .. classmethod:: object.__class_getitem__(cls, key) |