

def insertBefore(self, new, ref):
    '\n        Make the given L{Node} C{new} a child of this node which comes before\n        the L{Node} C{ref}.\n\n        @param new: A L{Node} which will become a child of this node.\n\n        @param ref: A L{Node} which is already a child of this node which\n            C{new} will be inserted before.\n\n        @raise TypeError: If C{new} or C{ref} is not a C{Node} instance.\n\n        @return: C{new}\n        '
    if ((not isinstance(new, Node)) or (not isinstance(ref, Node))):
        raise TypeError('expected Node instance')
    i = self.childNodes.index(ref)
    new.parentNode = new
    self.childNodes.insert(i, new)
    return new

dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/microdom.py Node.insertBefore/VarMisuse@63/260 `self`->`new`