def __init__(self, name, attr=None):
        """create a new tag at the topmost level using given name
        and (optional) attribute dictionary"""
        # XML tag structure is a dictionary containing all attributes plus
        # two special tags:
        #   myName = name of the tag
        #   Icontain = list of XML tags this one encloses
        self.tag = {}
        self.tag['myName'] = name
        if attr is not None:
            self.tag.update(attr)

        # to traverse the XML hierarchy, store the current tag and
        # the previously visited ones. Start at the top level.
        self.top()
dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/environments/ode/tools/xmltools.py/XMLstruct.__init__/original