Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
a1f75b33
Commit
a1f75b33
authored
Oct 09, 2002
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API documentation for ZConfig.Interpolation.
parent
6b7305e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
doc/ZConfig/zconfig.tex
doc/ZConfig/zconfig.tex
+49
-0
No files found.
doc/ZConfig/zconfig.tex
View file @
a1f75b33
...
...
@@ -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}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment