(self, fpatt, rex, s)
return True
add a replacement hook.

            fpatt: a string specifying a filter pattern.
            rex: a regular expression.
            s: the replacement string

            returns true if hook was added, false if the pattern could not be
            parsed.
add a replacement hook.
add a replacement hook .
def add(self, fpatt, rex, s):
        """
            add a replacement hook.

            fpatt: a string specifying a filter pattern.
            rex: a regular expression.
            s: the replacement string

            returns true if hook was added, false if the pattern could not be
            parsed.
        """
        cpatt = filt.parse(fpatt)
        if not cpatt:
            return False
        try:
            re.compile(rex)
        except re.error:
            return False
        self.lst.append((fpatt, rex, s, cpatt))
        return True
def add ( self , fpatt , rex , s ) : cpatt = filt . parse ( fpatt ) if not cpatt : return False try : re . compile ( rex ) except re . error : return False self . lst . append ( ( fpatt , rex , s , cpatt ) ) return True