Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f3b042

Browse files
committed
Added docs for UserDict,UserList
1 parent b6a8026 commit 7f3b042

7 files changed

Lines changed: 64 additions & 1 deletion

File tree

Doc/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ LIBFILES = lib.tex \
113113
libxdrlib.tex libimghdr.tex \
114114
librestricted.tex librexec.tex libbastion.tex \
115115
libformatter.tex liboperator.tex libsoundex.tex libresource.tex \
116-
libstat.tex libstrio.tex libundoc.tex libmailcap.tex libglob.tex
116+
libstat.tex libstrio.tex libundoc.tex libmailcap.tex libglob.tex \
117+
libuser.tex
117118

118119
# Library document
119120
lib.dvi: $(LIBFILES)

Doc/lib.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
\input{libpython} % Python Services
7878
\input{libsys}
7979
\input{libtypes2} % types is already taken :-(
80+
\input{libuser}
8081
\input{liboperator}
8182
\input{libtraceback}
8283
\input{libpickle}

Doc/lib/lib.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
\input{libpython} % Python Services
7878
\input{libsys}
7979
\input{libtypes2} % types is already taken :-(
80+
\input{libuser}
8081
\input{liboperator}
8182
\input{libtraceback}
8283
\input{libpickle}

Doc/lib/libpython.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ \chapter{Python Services}
1212
\item[types]
1313
--- Names for all built-in types.
1414

15+
\item[UserDict, UserList]
16+
--- Class wrappers for dictionary and list objects.
17+
1518
\item[traceback]
1619
--- Print or retrieve a stack traceback.
1720

Doc/lib/libuserdict.tex

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
\section{Standard Modules \sectcode{UserDict} and \sectcode{UserList}}
2+
Each of these modules defines a class that acts as a wrapper around
3+
either dictionary or list objects. They're useful base classes for
4+
your own dictionary-like or list-like classes, which can inherit from
5+
them and override existing methods or add new ones. In this way one
6+
can add new behaviours to dictionaries or lists.
7+
8+
\renewcommand{\indexsubitem}{(in module UserDict)}
9+
The \code{UserDict} module defines the \code{UserDict} class:
10+
11+
\begin{funcdesc}{UserDict}{}
12+
Return a class instance that simulates a dictionary. The instance's
13+
contents are kept in a regular dictionary, which is accessible via the
14+
\code{data} attribute of \code{UserDict} instances.
15+
\end{funcdesc}
16+
17+
\renewcommand{\indexsubitem}{(in module UserList)}
18+
The \code{UserList} module defines the \code{UserList} class:
19+
20+
\begin{funcdesc}{UserList}{\optional{list}}
21+
Return a class instance that simulates a list. The instance's
22+
contents are kept in a regular list, which is accessible via the
23+
\code{data} attribute of \code{UserList} instances. The instance's
24+
contents are initially set to c copy of \var{list}, defaulting to the
25+
empty list \code{[]}. \var{list} can be either a regular Python list,
26+
or an instance of \code{UserList} (or a subclass).
27+
\end{funcdesc}

Doc/libpython.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ \chapter{Python Services}
1212
\item[types]
1313
--- Names for all built-in types.
1414

15+
\item[UserDict, UserList]
16+
--- Class wrappers for dictionary and list objects.
17+
1518
\item[traceback]
1619
--- Print or retrieve a stack traceback.
1720

Doc/libuserdict.tex

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
\section{Standard Modules \sectcode{UserDict} and \sectcode{UserList}}
2+
Each of these modules defines a class that acts as a wrapper around
3+
either dictionary or list objects. They're useful base classes for
4+
your own dictionary-like or list-like classes, which can inherit from
5+
them and override existing methods or add new ones. In this way one
6+
can add new behaviours to dictionaries or lists.
7+
8+
\renewcommand{\indexsubitem}{(in module UserDict)}
9+
The \code{UserDict} module defines the \code{UserDict} class:
10+
11+
\begin{funcdesc}{UserDict}{}
12+
Return a class instance that simulates a dictionary. The instance's
13+
contents are kept in a regular dictionary, which is accessible via the
14+
\code{data} attribute of \code{UserDict} instances.
15+
\end{funcdesc}
16+
17+
\renewcommand{\indexsubitem}{(in module UserList)}
18+
The \code{UserList} module defines the \code{UserList} class:
19+
20+
\begin{funcdesc}{UserList}{\optional{list}}
21+
Return a class instance that simulates a list. The instance's
22+
contents are kept in a regular list, which is accessible via the
23+
\code{data} attribute of \code{UserList} instances. The instance's
24+
contents are initially set to c copy of \var{list}, defaulting to the
25+
empty list \code{[]}. \var{list} can be either a regular Python list,
26+
or an instance of \code{UserList} (or a subclass).
27+
\end{funcdesc}

0 commit comments

Comments
 (0)