def ignore( self, other ):
if isinstance(other, basestring):<EOL><INDENT>other = Suppress(other)<EOL><DEDENT>if isinstance( other, Suppress ):<EOL><INDENT>if other not in self.ignoreExprs:<EOL><INDENT>self.ignoreExprs.append(other)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.ignoreExprs.append( Suppress( other.copy() ) )<EOL><DEDENT>return self<EOL>
Define expression to be ignored (e.g., comments) while doing pattern
matching; may be called repeatedly, to define multiple comment or other
ignorable patterns.

Example::

    patt = OneOrMore(Word(alphas))
    patt.parseString('ablaj /* comment */ lskjd') # -> ['ablaj']

    patt.ignore(cStyleComment)
    patt.parseString('ablaj /* comment */ lskjd') # -> ['ablaj', 'lskjd']