Skip to content

Commit 8f38531

Browse files
committed
fixes
1 parent 6477766 commit 8f38531

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Doc/c-api/typeobj.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
572572
:attr:`~type.__name__` attribute.
573573

574574
If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is made accessible as the
575-
:attr:`~type.__name__` attribute, and the :attr:`~class.__module__` attribute is undefined
575+
:attr:`~type.__name__` attribute, and the :attr:`~type.__module__` attribute is undefined
576576
(unless explicitly set in the dictionary, as explained above). This means your
577577
type will be impossible to pickle. Additionally, it will not be listed in
578578
module documentations created with pydoc.

Doc/library/pickle.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ a given class::
953953
unpickled_class = pickle.loads(f.getvalue())
954954

955955
assert isinstance(unpickled_class, type)
956-
assert unpickled_type.__name__ == "MyClass"
956+
assert unpickled_class.__name__ == "MyClass"
957957
assert unpickled_class.my_attribute == 1
958958

959959

Doc/reference/datamodel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2597,7 +2597,7 @@ Preparing the class namespace
25972597

25982598
Once the appropriate metaclass has been identified, then the class namespace
25992599
is prepared. If the metaclass has a ``__prepare__`` attribute, it is called
2600-
as ``namespace = metatype.__prepare__(name, bases, **kwds)`` (where the
2600+
as ``namespace = metaclass.__prepare__(name, bases, **kwds)`` (where the
26012601
additional keyword arguments, if any, come from the class definition). The
26022602
``__prepare__`` method should be implemented as a
26032603
:func:`classmethod <classmethod>`. The

Doc/whatsnew/2.3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ Here are all of the changes that Python 2.3 makes to the core Python language.
11131113
<type '_socket.socket'>
11141114

11151115
* One of the noted incompatibilities between old- and new-style classes has been
1116-
removed: you can now assign to the :attr:`~type.__name__` and :attr:`~class.__bases__`
1116+
removed: you can now assign to the :attr:`~type.__name__` and :attr:`~type.__bases__`
11171117
attributes of new-style classes. There are some restrictions on what can be
11181118
assigned to :attr:`!__bases__` along the lines of those relating to assigning to
11191119
an instance's :attr:`~object.__class__` attribute.

0 commit comments

Comments
 (0)