[Zope-CVS] CVS: Packages/ZConfig/doc - zconfig.tex:1.2

Fred L. Drake, Jr. fdrake@acm.org
Wed, 9 Oct 2002 14:18:04 -0400


Update of /cvs-repository/Packages/ZConfig/doc
In directory cvs.zope.org:/tmp/cvs-serv19012

Modified Files:
	zconfig.tex 
Log Message:
API documentation for ZConfig.Interpolation.


=== Packages/ZConfig/doc/zconfig.tex 1.1 => 1.2 ===
--- Packages/ZConfig/doc/zconfig.tex:1.1	Tue Oct  8 17:42:17 2002
+++ Packages/ZConfig/doc/zconfig.tex	Wed Oct  9 14:18:04 2002
@@ -66,5 +66,54 @@
 \modulesynopsis{Parser for an alternate syntax}
 
 
+\section{\module{ZConfig.Interpolation} --- String interpolation}
+
+\declaremodule{}{ZConfig.Interpolation}
+\modulesynopsis{Shell-style string interpolation helper}
+
+This module provides a basic substitution facility similar to that
+found in the Bourne shell (\program{sh} on most \UNIX{} platforms).  
+
+XXX need to explain the syntax here
+
+For these functions, the \var{mapping} argument can be a \class{dict},
+or any type that supports the \method{get()} method of the mapping
+protocol.
+
+\begin{funcdesc}{interpolate}{s, mapping}
+  Interpolate values from \var{mapping} into \var{s}.  Replacement
+  values are copied into the result without further interpretation.
+  Raises \exception{InterpolationSyntaxError} if there are malformed
+  constructs in \var{s}.
+\end{funcdesc}
+
+\begin{funcdesc}{get}{mapping, name\optional{, default}}
+  Return the value for \var{name} from \var{mapping}, interpolating
+  values recursively if needed.  Raises
+  \exception{InterpolationSyntaxError} if there are malformed
+  constructs in \var{s}, or \exception{InterpolationRecursionError} if
+  any name expands to include a reference to itself either directly or
+  indirectly.
+\end{funcdesc}
+
+
+\begin{excdesc}{InterpolationError}
+  Base class for errors raised by the \module{ZConfig.Interpolation}
+  module.  Instances provide the attributes \member{message} and
+  \member{context}.  \member{message} contains a description of the
+  error.  \member{context} is either \code{None} or a list of names
+  that have been looked up in the case of nested interpolation.
+\end{excdesc}
+
+\begin{excdesc}{InterpolationSyntaxError}
+  Raised when interpolation source text contains syntactical errors.
+\end{excdesc}
+
+\begin{excdesc}{InterpolationRecursionError}
+  Raised when a nested interpolation is recursive.  The
+  \member{context} attribute will always be a list for this
+  exception.  An additional attribute, \member{name}, gives the name
+  for which an recursive reference was detected.
+\end{excdesc}
 
 \end{document}