swat.cas.table.CASTable.__delattr__

CASTable.__delattr__(self, name)

Delete an attribute

When an attribute is deleted from a CASTable object, it can be deleted from one of two areas. If the name specified matches the name of a CAS table parameter, the key is deleted from the CASTable.params object dictionary which holds parameters used when the CASTable is used in a CAS action call.

If the attribute name is not a valid CAS table parameter, the attribute is deleted from the CASTable object as a standard Python attribute.

Parameters
namestring

Name of the attribute to delete.

Examples

>>> tbl = CASTable('my-table')
>>> tbl.where = 'a < 2'
>>> tbl.noattr = True
>>> print(tbl.where)
'a < 2'
>>> print(tbl.params)
{'name': 'my-table', 'where': 'a < 2'}
>>> print(tbl.noattr)
True
>>> del tbl.where
>>> del tbl.noattr
>>> print(tbl.params)
{'name': 'my-table'}