(self, nodes, results=None)
return False
Does this pattern exactly match a sequence of nodes?
Does this pattern exactly match a sequence of nodes?
Does this pattern exactly match a sequence of nodes?
def match_seq(self, nodes, results=None):
        """Does this pattern exactly match a sequence of nodes?"""
        for c, r in self.generate_matches(nodes):
            if c == len(nodes):
                if results is not None:
                    results.update(r)
                    if self.name:
                        results[self.name] = list(nodes)
                return True
        return False
def match_seq ( self , nodes , results = None ) : for c , r in self . generate_matches ( nodes ) : if c == len ( nodes ) : if results is not None : results . update ( r ) if self . name : results [ self . name ] = list ( nodes ) return True return False