]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added docs for delattr
authorGuido van Rossum <guido@python.org>
Tue, 16 Aug 1994 22:15:11 +0000 (22:15 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 16 Aug 1994 22:15:11 +0000 (22:15 +0000)
Doc/lib/libfuncs.tex
Doc/libfuncs.tex

index 379011da1e5cd8eecbbd4da323343beafd07c29b..923daf36019ce7a34307a6a5ef70e486810ad992 100644 (file)
@@ -51,6 +51,15 @@ exactly one argument.)
   if it consists of a single expression.
 \end{funcdesc}
 
+\begin{funcdesc}{delattr}{object\, name}
+  This is a relative of \code{setattr}.  The arguments are an
+  object and a string.  The string must be the name
+  of one of the object's attributes.  The function deletes
+  the named attribute, provided the object allows it.  For example,
+  \code{setattr(\var{x}, '\var{foobar}')} is equivalent to
+  \code{del \var{x}.\var{foobar}}.
+\end{funcdesc}
+
 \begin{funcdesc}{dir}{}
   Without arguments, return the list of names in the current local
   symbol table.  With a module, class or class instance object as
index 379011da1e5cd8eecbbd4da323343beafd07c29b..923daf36019ce7a34307a6a5ef70e486810ad992 100644 (file)
@@ -51,6 +51,15 @@ exactly one argument.)
   if it consists of a single expression.
 \end{funcdesc}
 
+\begin{funcdesc}{delattr}{object\, name}
+  This is a relative of \code{setattr}.  The arguments are an
+  object and a string.  The string must be the name
+  of one of the object's attributes.  The function deletes
+  the named attribute, provided the object allows it.  For example,
+  \code{setattr(\var{x}, '\var{foobar}')} is equivalent to
+  \code{del \var{x}.\var{foobar}}.
+\end{funcdesc}
+
 \begin{funcdesc}{dir}{}
   Without arguments, return the list of names in the current local
   symbol table.  With a module, class or class instance object as