

def downTo(self, name, stack=None, current=None):
    'Traverse downward from current tag, until given named tag is found. Returns\n        true if found and sets stack and current tag correspondingly.'
    if (stack is None):
        stack = self.stack
        current = self.current
    if (self.name == name):
        return True
    elif (not current.hasSubtag()):
        return False
    else:
        stack.append(self)
        found = self.getSubtag(name)
        if (found is None):
            for subtag in self.tag['Icontain']:
                found = subtag.downTo(name, stack, current)
                if found:
                    return True
            stack.pop()
            return False
        else:
            current.setCurrent(found)
            return True

dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/environments/ode/tools/xmltools.py XMLstruct.downTo/VarMisuse@62/118 `self`->`current`