From: Georg Brandl Date: Sat, 25 Jun 2005 21:03:57 +0000 (+0000) Subject: backport bug [ 1166582 ] IterableUserDict not in docs X-Git-Tag: v2.4.2c1~167 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0978a134dee9b1007a8541b3886a665c69db7733;p=thirdparty%2FPython%2Fcpython.git backport bug [ 1166582 ] IterableUserDict not in docs --- diff --git a/Doc/lib/libuserdict.tex b/Doc/lib/libuserdict.tex index ef643cc50a9d..5749ebec2f0a 100644 --- a/Doc/lib/libuserdict.tex +++ b/Doc/lib/libuserdict.tex @@ -27,12 +27,18 @@ 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. +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}