@@ -475,13 +475,13 @@ Callable types
475
475
| :attr: `__doc__ ` | The function's documentation | Writable |
476
476
| | string, or ``None `` if | |
477
477
| | unavailable; not inherited by | |
478
- | | subclasses | |
478
+ | | subclasses. | |
479
479
+-------------------------+-------------------------------+-----------+
480
- | :attr: `~definition.\ | The function's name | Writable |
480
+ | :attr: `~definition.\ | The function's name. | Writable |
481
481
| __name__` | | |
482
482
+-------------------------+-------------------------------+-----------+
483
483
| :attr: `~definition.\ | The function's | Writable |
484
- | __qualname__` | :term: `qualified name ` | |
484
+ | __qualname__` | :term: `qualified name `. | |
485
485
| | | |
486
486
| | .. versionadded:: 3.3 | |
487
487
+-------------------------+-------------------------------+-----------+
@@ -493,7 +493,7 @@ Callable types
493
493
| | argument values for those | |
494
494
| | arguments that have defaults, | |
495
495
| | or ``None `` if no arguments | |
496
- | | have a default value | |
496
+ | | have a default value. | |
497
497
+-------------------------+-------------------------------+-----------+
498
498
| :attr: `__code__ ` | The code object representing | Writable |
499
499
| | the compiled function body. | |
@@ -1857,11 +1857,11 @@ passed through to all metaclass operations described below.
1857
1857
1858
1858
When a class definition is executed, the following steps occur:
1859
1859
1860
- * MRO entries are resolved
1861
- * the appropriate metaclass is determined
1862
- * the class namespace is prepared
1863
- * the class body is executed
1864
- * the class object is created
1860
+ * MRO entries are resolved;
1861
+ * the appropriate metaclass is determined;
1862
+ * the class namespace is prepared;
1863
+ * the class body is executed;
1864
+ * the class object is created.
1865
1865
1866
1866
1867
1867
Resolving MRO entries
@@ -1885,11 +1885,11 @@ Determining the appropriate metaclass
1885
1885
1886
1886
The appropriate metaclass for a class definition is determined as follows:
1887
1887
1888
- * if no bases and no explicit metaclass are given, then :func: `type ` is used
1888
+ * if no bases and no explicit metaclass are given, then :func: `type ` is used;
1889
1889
* if an explicit metaclass is given and it is *not * an instance of
1890
- :func: `type `, then it is used directly as the metaclass
1890
+ :func: `type `, then it is used directly as the metaclass;
1891
1891
* if an instance of :func: `type ` is given as the explicit metaclass, or
1892
- bases are defined, then the most derived metaclass is used
1892
+ bases are defined, then the most derived metaclass is used.
1893
1893
1894
1894
The most derived metaclass is selected from the explicitly specified
1895
1895
metaclass (if any) and the metaclasses (i.e. ``type(cls) ``) of all specified
@@ -1976,7 +1976,7 @@ invoked after creating the class object:
1976
1976
* first, ``type.__new__ `` collects all of the descriptors in the class
1977
1977
namespace that define a :meth: `~object.__set_name__ ` method;
1978
1978
* second, all of these ``__set_name__ `` methods are called with the class
1979
- being defined and the assigned name of that particular descriptor; and
1979
+ being defined and the assigned name of that particular descriptor;
1980
1980
* finally, the :meth: `~object.__init_subclass__ ` hook is called on the
1981
1981
immediate parent of the new class in its method resolution order.
1982
1982
@@ -2048,7 +2048,7 @@ Emulating generic types
2048
2048
-----------------------
2049
2049
2050
2050
One can implement the generic class syntax as specified by :pep: `484 `
2051
- (for example ``List[int] ``) by defining a special method
2051
+ (for example ``List[int] ``) by defining a special method:
2052
2052
2053
2053
.. classmethod :: object.__class_getitem__(cls, key)
2054
2054
0 commit comments