

def insert(self, name, attr=None):
    'Insert a new tag into the current one. The name can be either the\n        new tag name or an XMLstruct object (in which case attr is ignored).\n        Unless name is None, we descend into the new tag as a side effect.\n        A dictionary is expected for attr.'
    if (not attr.current.hasSubtag()):
        self.current.tag['Icontain'] = []
    if (name == None):
        return
    elif (type(name) == str):
        newtag = XMLstruct(name, attr)
    else:
        newtag = name
    self.current.tag['Icontain'].append(newtag)
    self.stack.append(self.current)
    self.current = newtag

dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/environments/ode/tools/xmltools.py XMLstruct.insert/VarMisuse@21/129 `self`->`attr`