diff options
Diffstat (limited to 'Doc/library/userdict.rst')
-rw-r--r-- | Doc/library/userdict.rst | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Doc/library/userdict.rst b/Doc/library/userdict.rst index d15f518..0490118 100644 --- a/Doc/library/userdict.rst +++ b/Doc/library/userdict.rst @@ -33,7 +33,8 @@ The :mod:`UserDict` module defines the :class:`UserDict` class and .. note:: - For backward compatibility, instances of :class:`UserDict` are not iterable. + For backward compatibility, instances of :class:`UserDict` are not + iterable. .. class:: IterableUserDict([initialdata]) @@ -62,8 +63,8 @@ provide the following attribute: :meth:`__delitem__` will preclude only :meth:`pop` and :meth:`popitem` from the full interface. - In addition to the four base methods, progressively more efficiency comes with - defining :meth:`__contains__`, :meth:`__iter__`, and :meth:`iteritems`. + In addition to the four base methods, progressively more efficiency comes + with defining :meth:`__contains__` and :meth:`__iter__`. Since the mixin has no knowledge of the subclass constructor, it does not define :meth:`__init__` or :meth:`copy`. @@ -93,10 +94,11 @@ The :mod:`UserList` module defines the :class:`UserList` class: .. class:: UserList([list]) Class that simulates a list. The instance's contents are kept in a regular - list, which is accessible via the :attr:`data` attribute of :class:`UserList` + list, which is accessible via the :attr:`data` attribute of + :class:`UserList` instances. The instance's contents are initially set to a copy of *list*, - defaulting to the empty list ``[]``. *list* can be any iterable, e.g. a - real Python list or a :class:`UserList` object. + defaulting to the empty list ``[]``. *list* can be any iterable, for + example a real Python list or a :class:`UserList` object. In addition to supporting the methods and operations of mutable sequences (see section :ref:`typesseq`), :class:`UserList` instances provide the following |