Bases: _abcoll.MutableMapping
A dictionary-like object with attributes.
Initialization
Parameters : |
|
---|
CfDict methods (undocumented methods behave exactly as their counterparts in a built-in dictionary)
clear | |
copy | Return a deep copy. |
equals | True if two instances are logically equal, False otherwise. |
get | |
get_keys | Return a list of the key names which match a regular expression. |
has_key | Return true if and only if the dictionary contains the given key. |
items | |
iteritems | |
iterkeys | |
itervalues | |
keys | |
pop | |
popitem | |
setdefault | |
update | |
values |
Return a deep copy.
Equivalent to copy.deepcopy(d).
Returns : |
|
---|
Examples
>>> d.copy()
True if two instances are logically equal, False otherwise.
Parameters : |
|
---|---|
Returns : |
|
Examples
Return a list of the key names which match a regular expression.
Parameters : |
|
---|---|
Returns : |
|
Examples
>>> d.keys()
['dim2', 'dim0', 'dim1', 'aux0', 'cm0']
>>> d.get_keys()
['dim2', 'dim0', 'dim1', 'aux0', 'cm0']
>>> d.get_keys('dim')
['dim2', 'dim0', 'dim1']
>>> d.get_keys('^aux|^dim')
['dim2', 'dim0', 'dim1', 'aux0']
>>> d.get_keys('dim[1-9]')
['dim2', 'dim1']
Return true if and only if the dictionary contains the given key.
Parameters : |
|
---|---|
Returns : | out : bool |
Examples
>>> d.keys()
['key1', 3, ('a', 1)]
>>> d.has_key(3)
True
>>> d.has_key('key9')
False