docs tweaks

This commit is contained in:
jab 2018-03-28 02:49:22 +00:00
parent c6831d888b
commit c990197122
2 changed files with 6 additions and 6 deletions

View File

@ -137,10 +137,10 @@ Subclassing :func:`~collections.namedtuple` classes
To get the performance benefits, intrinsic sortability, etc.
of :func:`~collections.namedtuple`
but customize behavior, state, API, etc.,
you can subclass a :func:`~collections.namedtuple`-created class.
Just make sure to include ``__slots__ = ()``
or you'll lose some of the performance benefits.
while customizing behavior, state, API, etc.,
you can subclass a :func:`~collections.namedtuple` class.
Just make sure to include ``__slots__ = ()``,
or you'll lose a lot of the performance benefits.
``_marker.py`` contains a small example.
Here's a larger one:

View File

@ -24,12 +24,12 @@ by adding the
:obj:`~abc.abstractproperty`. [#fn-subclasshook]_
.. [#fn-subclasshook]
(In fact, any :class:`collections.abc.Mapping`
In fact, any :class:`collections.abc.Mapping`
that provides an ``inv`` attribute
will be considered a virtual subclass of
:class:`bidict.BidirectionalMapping`
:meth:`automatically <bidict.BidirectionalMapping.__subclasshook__>`,
enabling interoperability with external implementations.)
enabling interoperability with external implementations.
As you may have noticed,
:class:`bidict.bidict` is also