def delattr(self, target, name=notset, raising=True):
__tracebackhide__ = True<EOL>import inspect<EOL>if name is notset:<EOL><INDENT>if not isinstance(target, six.string_types):<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>name, target = derive_importpath(target, raising)<EOL><DEDENT>if not hasattr(target, name):<EOL><INDENT>if raising:<EOL><INDENT>raise AttributeError(name)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>oldval = getattr(target, name, notset)<EOL>if inspect.isclass(target):<EOL><INDENT>oldval = target.__dict__.get(name, notset)<EOL><DEDENT>self._setattr.append((target, name, oldval))<EOL>delattr(target, name)<EOL><DEDENT>
Delete attribute ``name`` from ``target``, by default raise
        AttributeError it the attribute did not previously exist.

        If no ``name`` is specified and ``target`` is a string
        it will be interpreted as a dotted import path with the
        last part being the attribute name.

        If ``raising`` is set to False, no exception will be raised if the
        attribute is missing.