(self)
return scan(self.children)
Returns a generator of `raise_stmt`. Includes raise statements inside try-except blocks
Returns a generator of `raise_stmt`. Includes raise statements inside try-except blocks
Returns a generator of raise_stmt . Includes raise statements inside try - except blocks
def iter_raise_stmts(self):
        """
        Returns a generator of `raise_stmt`. Includes raise statements inside try-except blocks
        """
        def scan(children):
            for element in children:
                if element.type == 'raise_stmt' \
                        or element.type == 'keyword' and element.value == 'raise':
                    yield element
                if element.type in _RETURN_STMT_CONTAINERS:
                    for e in scan(element.children):
                        yield e

        return scan(self.children)
def iter_raise_stmts ( self ) : def scan ( children ) : for element in children : if element . type == 'raise_stmt' or element . type == 'keyword' and element . value == 'raise' : yield element if element . type in _RETURN_STMT_CONTAINERS : for e in scan ( element . children ) : yield e return scan ( self . children )