diff options
author | Fred Drake <fdrake@acm.org> | 1998-04-02 18:51:30 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-04-02 18:51:30 (GMT) |
commit | da70ee1faec9dd8b6db974ac99c34b9ce470fbb0 (patch) | |
tree | d11745282078404de93ae45495c3c9b01b281673 /Doc/lib/libbastion.tex | |
parent | 182bd2d176fb3b1a0e4142fe9c9572d583fb797e (diff) | |
download | cpython-da70ee1faec9dd8b6db974ac99c34b9ce470fbb0.zip cpython-da70ee1faec9dd8b6db974ac99c34b9ce470fbb0.tar.gz cpython-da70ee1faec9dd8b6db974ac99c34b9ce470fbb0.tar.bz2 |
Use methoddesc and memberdesc, as needed.
Added description of BastionClass, since it is referred to in the Bastion
description as subclassable.
Diffstat (limited to 'Doc/lib/libbastion.tex')
-rw-r--r-- | Doc/lib/libbastion.tex | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Doc/lib/libbastion.tex b/Doc/lib/libbastion.tex index c405c64..b5bec15 100644 --- a/Doc/lib/libbastion.tex +++ b/Doc/lib/libbastion.tex @@ -1,7 +1,6 @@ \section{Standard Module \sectcode{Bastion}} \label{module-Bastion} \stmodindex{Bastion} -\setindexsubitem{(in module Bastion)} % I'm concerned that the word 'bastion' won't be understood by people % for whom English is a second language, making the module name @@ -17,7 +16,8 @@ other, unsafe attributes. % I've punted on the issue of documenting keyword arguments for now. -\begin{funcdesc}{Bastion}{object\optional{, filter, name, class}} +\begin{funcdesc}{Bastion}{object\optional{, filter\optional{, + name\optional{, class}}}} Protect the object \var{object}, returning a bastion for the object. Any attempt to access one of the object's attributes will have to be approved by the \var{filter} function; if the access is @@ -32,8 +32,17 @@ will be \samp{<Bastion for \var{name}>} if a value for \var{name} is provided; otherwise, \samp{repr(\var{object})} will be used. -\var{class}, if present, would be a subclass of \class{BastionClass}; +\var{class}, if present, should be a subclass of \class{BastionClass}; see the code in \file{bastion.py} for the details. Overriding the default \class{BastionClass} will rarely be required. - \end{funcdesc} + + +\begin{classdesc}{BastionClass}{getfunc, name} +Class which actually implements bastion objects. This is the default +class used by \function{Bastion()}. The \var{getfunc} parameter is a +function which returns the value of an attribute which should be +exposed to the restricted execution environment when called with the +name of the attribute as the only parameter. \var{name} is used to +construct the \function{repr()} of the \class{BastionClass} instance. +\end{classdesc} |