def find_all(self, sub, ignore_case=False):
        """
        Find all occurances of the substring. Return a list of absolute
        positions in the document.
        """
        flags = re.IGNORECASE if ignore_case else 0
        return [a.start() for a in re.finditer(re.escape(sub), self.text, flags)]
def find_all ( self , sub , ignore_case = False ) : flags = re . IGNORECASE if ignore_case else 0 return [ a . start ( ) for a in re . finditer ( re . escape ( sub ) , self . text , flags ) ]
Find all occurances of the substring. Return a list of absolute
        positions in the document.