(self)
return prog
Return compiled cooked search pattern.
Return compiled cooked search pattern.
Return compiled cooked search pattern .
def getprog(self):
        "Return compiled cooked search pattern."
        pat = self.getpat()
        if not pat:
            self.report_error(pat, "Empty regular expression")
            return None
        pat = self.getcookedpat()
        flags = 0
        if not self.iscase():
            flags = flags | re.IGNORECASE
        try:
            prog = re.compile(pat, flags)
        except re.error as e:
            self.report_error(pat, e.msg, e.pos)
            return None
        return prog
def getprog ( self ) : pat = self . getpat ( ) if not pat : self . report_error ( pat , "Empty regular expression" ) return None pat = self . getcookedpat ( ) flags = 0 if not self . iscase ( ) : flags = flags | re . IGNORECASE try : prog = re . compile ( pat , flags ) except re . error as e : self . report_error ( pat , e . msg , e . pos ) return None return prog