cf.BoundedVariable.attributes¶
-
BoundedVariable.
attributes
(attrs=None, copy=True)[source]¶ Inspect or change attributes which are not CF properties.
Examples 1: >>> f.attributes()
Parameters: - attrs:
dict
, optional Set bounded variable attributes from the dictionary of values. If the copy parameter is True then the values in the attrs dictionary are deep copied
- copy:
bool
, optional If True then the values in the returned dictionary are deep copies of the bounded variable’s attribute values. By default they are not copied.
Returns: out:
dict
Examples: >>> f.attributes() {} >>> f.foo = 'bar' >>> f.attributes() {'foo': 'bar'} >>> f.attributes().pop('foo') 'bar' >>> f.attributes() {'foo': 'bar'}
>>> f.attributes({'name': 'value'}) {'foo': 'bar', 'name': 'value'}
- attrs: