diff Doc/lib/libstdtypes.tex @ 15383:eeb7c8a5b79f legacy-trunk

Document the proper exception to be raised by I/O operations on closed files; error reported by Ng Pheng Siong <ngps@post1.com>. Make sure that various special object attributes are properly indexed.
author Fred Drake <fdrake@acm.org>
date Mon, 06 Nov 2000 20:17:37 +0000
parents 12aec3381c94
children 6b2524e9c672
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex	Mon Nov 06 18:46:09 2000 +0000
+++ b/Doc/lib/libstdtypes.tex	Mon Nov 06 20:17:37 2000 +0000
@@ -972,6 +972,7 @@
 
 It is written as \code{Ellipsis}.
 
+
 \subsubsection{File Objects\obindex{file}
                \label{bltin-file-objects}}
 
@@ -995,8 +996,8 @@
 
 \begin{methoddesc}[file]{close}{}
   Close the file.  A closed file cannot be read or written anymore.
-  Any operation which requires that the file be open will raise an
-  \exception{IOError} after the file has been closed.  Calling
+  Any operation which requires that the file be open will raise a
+  \exception{ValueError} after the file has been closed.  Calling
   \method{close()} more than once is allowed.
 \end{methoddesc}
 
@@ -1137,6 +1138,7 @@
 \keyword{print} to keep track of its internal state.
 \end{memberdesc}
 
+
 \subsubsection{Internal Objects \label{typesinternal}}
 
 See the \citetitle[../ref/ref.html]{Python Reference Manual} for this
@@ -1149,26 +1151,28 @@
 The implementation adds a few special read-only attributes to several
 object types, where they are relevant:
 
-\begin{memberdescni}{__dict__}
-A dictionary of some sort used to store an
+\begin{memberdesc}[object]{__dict__}
+A dictionary or other mapping object used to store an
 object's (writable) attributes.
-\end{memberdescni}
+\end{memberdesc}
 
-\begin{memberdescni}{__methods__}
+\begin{memberdesc}[object]{__methods__}
 List of the methods of many built-in object types,
 e.g., \code{[].__methods__} yields
 \code{['append', 'count', 'index', 'insert', 'pop', 'remove',
-'reverse', 'sort']}.
-\end{memberdescni}
-
-\begin{memberdescni}{__members__}
-Similar to \member{__methods__}, but lists data attributes.
-\end{memberdescni}
+'reverse', 'sort']}.  This usually does not need to be explicitly
+provided by the object.
+\end{memberdesc}
 
-\begin{memberdescni}{__class__}
-The class to which a class instance belongs.
-\end{memberdescni}
+\begin{memberdesc}[object]{__members__}
+Similar to \member{__methods__}, but lists data attributes.  This
+usually does not need to be explicitly provided by the object.
+\end{memberdesc}
 
-\begin{memberdescni}{__bases__}
+\begin{memberdesc}[instance]{__class__}
+The class to which a class instance belongs.
+\end{memberdesc}
+
+\begin{memberdesc}[class]{__bases__}
 The tuple of base classes of a class object.
-\end{memberdescni}
+\end{memberdesc}