

def _clone(self, obj, deep):
    '\n        Clone an arbitrary object; used by L{Tag.clone}.\n\n        @param obj: an object with a clone method, a list or tuple, or something\n            which should be immutable.\n\n        @param deep: whether to continue cloning child objects; i.e. the\n            contents of lists, the sub-tags within a tag.\n\n        @return: a clone of C{obj}.\n        '
    if hasattr(obj, 'clone'):
        return obj.clone(deep)
    elif isinstance(obj, (list, tuple)):
        return [self._clone(self, deep) for x in obj]
    else:
        return obj

dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/web/_stan.py Tag._clone/VarMisuse@55/206 `x`->`self`