Your IP : 216.73.216.213
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>pyparsing.Suppress</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="pyparsing-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>pyparsing</th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="pyparsing-module.html">Module pyparsing</a> ::
Class Suppress
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="pyparsing.Suppress-class.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Suppress</h1><p class="nomargin-top"><span class="codelink"><a href="pyparsing-pysrc.html#Suppress">source code</a></span></p>
<pre class="base-tree">
object --+
|
<a href="pyparsing.ParserElement-class.html">ParserElement</a> --+
|
<a href="pyparsing.ParseElementEnhance-class.html">ParseElementEnhance</a> --+
|
<a href="pyparsing.TokenConverter-class.html">TokenConverter</a> --+
|
<strong class="uidshort">Suppress</strong>
</pre>
<hr />
<p>Converter for ignoring the results of a parsed expression.</p>
<p>Example:</p>
<pre class="literalblock">
source = "a, b, c,d"
wd = Word(alphas)
wd_list1 = wd + ZeroOrMore(',' + wd)
print(wd_list1.parseString(source))
# often, delimiters that are useful during parsing are just in the
# way afterward - use Suppress to keep them out of the parsed output
wd_list2 = wd + ZeroOrMore(Suppress(',') + wd)
print(wd_list2.parseString(source))
</pre>
<p>prints:</p>
<pre class="literalblock">
['a', ',', 'b', ',', 'c', ',', 'd']
['a', 'b', 'c', 'd']
</pre>
<p>(See also <a href="pyparsing-module.html#delimitedList"
class="link">delimitedList</a>.)</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Instance Methods</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.Suppress-class.html#postParse" class="summary-sig-name">postParse</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">instring</span>,
<span class="summary-sig-arg">loc</span>,
<span class="summary-sig-arg">tokenlist</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing-pysrc.html#Suppress.postParse">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="pyparsing.Suppress-class.html#suppress" class="summary-sig-name">suppress</a>(<span class="summary-sig-arg">self</span>)</span><br />
Suppresses the output of this <code>ParserElement</code>; useful to
keep punctuation from cluttering up returned output.</td>
<td align="right" valign="top">
<span class="codelink"><a href="pyparsing-pysrc.html#Suppress.suppress">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="pyparsing.TokenConverter-class.html">TokenConverter</a></code></b>:
<code><a href="pyparsing.TokenConverter-class.html#__init__">__init__</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="pyparsing.ParseElementEnhance-class.html">ParseElementEnhance</a></code></b>:
<code><a href="pyparsing.ParseElementEnhance-class.html#__str__">__str__</a></code>,
<code><a href="pyparsing.ParseElementEnhance-class.html#checkRecursion">checkRecursion</a></code>,
<code><a href="pyparsing.ParseElementEnhance-class.html#ignore">ignore</a></code>,
<code><a href="pyparsing.ParseElementEnhance-class.html#leaveWhitespace">leaveWhitespace</a></code>,
<code><a href="pyparsing.ParseElementEnhance-class.html#parseImpl">parseImpl</a></code>,
<code><a href="pyparsing.ParseElementEnhance-class.html#streamline">streamline</a></code>,
<code><a href="pyparsing.ParseElementEnhance-class.html#validate">validate</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="pyparsing.ParserElement-class.html">ParserElement</a></code></b>:
<code><a href="pyparsing.ParserElement-class.html#__add__">__add__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__and__">__and__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__call__">__call__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__eq__">__eq__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__hash__">__hash__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__invert__">__invert__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__mul__">__mul__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__ne__">__ne__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__or__">__or__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__radd__">__radd__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__rand__">__rand__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__repr__">__repr__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__req__">__req__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__rmul__">__rmul__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__rne__">__rne__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__ror__">__ror__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__rsub__">__rsub__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__rxor__">__rxor__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__sub__">__sub__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#__xor__">__xor__</a></code>,
<code><a href="pyparsing.ParserElement-class.html#addCondition">addCondition</a></code>,
<code><a href="pyparsing.ParserElement-class.html#addParseAction">addParseAction</a></code>,
<code><a href="pyparsing.ParserElement-class.html#canParseNext">canParseNext</a></code>,
<code><a href="pyparsing.ParserElement-class.html#copy">copy</a></code>,
<code><a href="pyparsing.ParserElement-class.html#matches">matches</a></code>,
<code><a href="pyparsing.ParserElement-class.html#parseFile">parseFile</a></code>,
<code><a href="pyparsing.ParserElement-class.html#parseString">parseString</a></code>,
<code><a href="pyparsing.ParserElement-class.html#parseWithTabs">parseWithTabs</a></code>,
<code><a href="pyparsing.ParserElement-class.html#preParse">preParse</a></code>,
<code><a href="pyparsing.ParserElement-class.html#runTests">runTests</a></code>,
<code><a href="pyparsing.ParserElement-class.html#scanString">scanString</a></code>,
<code><a href="pyparsing.ParserElement-class.html#searchString">searchString</a></code>,
<code><a href="pyparsing.ParserElement-class.html#setBreak">setBreak</a></code>,
<code><a href="pyparsing.ParserElement-class.html#setDebug">setDebug</a></code>,
<code><a href="pyparsing.ParserElement-class.html#setDebugActions">setDebugActions</a></code>,
<code><a href="pyparsing.ParserElement-class.html#setFailAction">setFailAction</a></code>,
<code><a href="pyparsing.ParserElement-class.html#setName">setName</a></code>,
<code><a href="pyparsing.ParserElement-class.html#setParseAction">setParseAction</a></code>,
<code><a href="pyparsing.ParserElement-class.html#setResultsName">setResultsName</a></code>,
<code><a href="pyparsing.ParserElement-class.html#setWhitespaceChars">setWhitespaceChars</a></code>,
<code><a href="pyparsing.ParserElement-class.html#split">split</a></code>,
<code><a href="pyparsing.ParserElement-class.html#transformString">transformString</a></code>,
<code><a href="pyparsing.ParserElement-class.html#tryParse">tryParse</a></code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__format__</code>,
<code>__getattribute__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__setattr__</code>,
<code>__sizeof__</code>,
<code>__subclasshook__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== STATIC METHODS ==================== -->
<a name="section-StaticMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Static Methods</span></td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="pyparsing.ParserElement-class.html">ParserElement</a></code></b>:
<code><a href="pyparsing.ParserElement-class.html#enablePackrat">enablePackrat</a></code>,
<code><a href="pyparsing.ParserElement-class.html#inlineLiteralsUsing">inlineLiteralsUsing</a></code>,
<code><a href="pyparsing.ParserElement-class.html#resetCache">resetCache</a></code>,
<code><a href="pyparsing.ParserElement-class.html#setDefaultWhitespaceChars">setDefaultWhitespaceChars</a></code>
</p>
</td>
</tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Class Variables</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="__slotnames__"></a><span class="summary-name">__slotnames__</span> = <code title="[]"><code class="variable-group">[</code><code class="variable-group">]</code></code>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><a href="pyparsing.ParserElement-class.html">ParserElement</a></code></b>:
<code><a href="pyparsing.ParserElement-class.html#DEFAULT_WHITE_CHARS">DEFAULT_WHITE_CHARS</a></code>,
<code><a href="pyparsing.ParserElement-class.html#packrat_cache">packrat_cache</a></code>,
<code><a href="pyparsing.ParserElement-class.html#packrat_cache_lock">packrat_cache_lock</a></code>,
<code><a href="pyparsing.ParserElement-class.html#packrat_cache_stats">packrat_cache_stats</a></code>,
<code><a href="pyparsing.ParserElement-class.html#verbose_stacktrace">verbose_stacktrace</a></code>
</p>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Properties</span></td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="postParse"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">postParse</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">instring</span>,
<span class="sig-arg">loc</span>,
<span class="sig-arg">tokenlist</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing-pysrc.html#Suppress.postParse">source code</a></span>
</td>
</tr></table>
<dl class="fields">
<dt>Overrides:
<a href="pyparsing.ParserElement-class.html#postParse">ParserElement.postParse</a>
</dt>
</dl>
</td></tr></table>
</div>
<a name="suppress"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">suppress</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="pyparsing-pysrc.html#Suppress.suppress">source code</a></span>
</td>
</tr></table>
<p>Suppresses the output of this <code>ParserElement</code>; useful to
keep punctuation from cluttering up returned output.</p>
<dl class="fields">
<dt>Overrides:
<a href="pyparsing.ParserElement-class.html#suppress">ParserElement.suppress</a>
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="pyparsing-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>pyparsing</th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Oct 06 20:32:30 2016
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>