summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libuserdict.tex
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2005-06-25 21:03:52 (GMT)
committerGeorg Brandl <georg@python.org>2005-06-25 21:03:52 (GMT)
commit54d8b680e0aeb8772dd42c22f41aab962b6e2182 (patch)
treec6d7267dba3a38a468ccaf0f8a8dbf18ee168cc6 /Doc/lib/libuserdict.tex
parent6df3fd379047e33a0ed09c030f2fc96a1c4f569c (diff)
downloadcpython-54d8b680e0aeb8772dd42c22f41aab962b6e2182.zip
cpython-54d8b680e0aeb8772dd42c22f41aab962b6e2182.tar.gz
cpython-54d8b680e0aeb8772dd42c22f41aab962b6e2182.tar.bz2
bug [ 1166582 ] IterableUserDict not in docs
Diffstat (limited to 'Doc/lib/libuserdict.tex')
-rw-r--r--Doc/lib/libuserdict.tex24
1 files changed, 15 insertions, 9 deletions
diff --git a/Doc/lib/libuserdict.tex b/Doc/lib/libuserdict.tex
index ef643cc..0bb57c8 100644
--- a/Doc/lib/libuserdict.tex
+++ b/Doc/lib/libuserdict.tex
@@ -21,18 +21,24 @@ existing methods or adding new ones.
The \module{UserDict} module defines the \class{UserDict} class
and \class{DictMixin}:
-\begin{classdesc}{UserDict}{\optional{initialdata}}
-Class that simulates a dictionary. The instance's
-contents are kept in a regular dictionary, which is accessible via the
-\member{data} attribute of \class{UserDict} instances. If
-\var{initialdata} is provided, \member{data} is initialized with its
-contents; note that a reference to \var{initialdata} will not be kept,
-allowing it be used for other purposes.
+\begin{classdesc}{UserDict}{\optional{initialdata}}
+Class that simulates a dictionary. The instance's contents are kept
+in a regular dictionary, which is accessible via the \member{data}
+attribute of \class{UserDict} instances. If \var{initialdata} is
+provided, \member{data} is initialized with its contents; note that a
+reference to \var{initialdata} will not be kept, allowing it be used
+for other purposes. \note{For backward compatibility, instances of
+\class{UserDict} are not iterable.}
+\end{classdesc}
+
+\begin{classdesc}{IterableUserDict}{\optional{initialdata}}
+Subclass of \class{UserDict} that supports direct iteration (e.g.
+\code{for key in myDict}).
\end{classdesc}
In addition to supporting the methods and operations of mappings (see
-section \ref{typesmapping}), \class{UserDict} instances provide the
-following attribute:
+section \ref{typesmapping}), \class{UserDict} and
+\class{IterableUserDict} instances provide the following attribute:
\begin{memberdesc}{data}
A real dictionary used to store the contents of the \class{UserDict}