delattr

delattr(object, name)

Deletes a named attribute from an object.

This is a relative of setattr. The arguments are an object and a string. The string must be the name of one of the object’s attributes. The function deletes the named attribute, provided the object allows it. For example, delattr(x, 'foobar') is equivalent to del x.foobar.

 

A Django site. rendered by a django application. hosted by webfaction.