mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Added description of optional parameter to UserDict constructor.
Omission reported by Barry Warsaw.
This commit is contained in:
parent
7dcc69a979
commit
8d21243c3e
1 changed files with 5 additions and 2 deletions
|
@ -12,10 +12,13 @@ can add new behaviours to dictionaries.
|
||||||
|
|
||||||
The \module{UserDict} module defines the \class{UserDict} class:
|
The \module{UserDict} module defines the \class{UserDict} class:
|
||||||
|
|
||||||
\begin{classdesc}{UserDict}{}
|
\begin{classdesc}{UserDict}{\optional{intialdata}}
|
||||||
Return a class instance that simulates a dictionary. The instance's
|
Return a class instance that simulates a dictionary. The instance's
|
||||||
contents are kept in a regular dictionary, which is accessible via the
|
contents are kept in a regular dictionary, which is accessible via the
|
||||||
\member{data} attribute of \class{UserDict} instances.
|
\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 used for other purposes.
|
||||||
\end{classdesc}
|
\end{classdesc}
|
||||||
|
|
||||||
In addition to supporting the methods and operations of mappings (see
|
In addition to supporting the methods and operations of mappings (see
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue