Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed missing punctuation in datamodel.rst #12581

Merged
merged 2 commits into from
Mar 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 | |
+-------------------------+-------------------------------+-----------+
Expand All @@ -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. | |
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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)

Expand Down