Bases: _abcoll.MutableMapping
A dictionary-like object with attributes.
Initialization
Parmaters : |
---|
Return a deep copy.
Equivalent to copy.deepcopy(x)
Returns : |
|
---|
Examples
>>> x.copy()
Return True if two instances are congruent in that they have
- Equal sets of keys.
- For each key, the two values are equal.
- Both instances have equal attributes.
Equality of numbers is to within a tolerance. Refer to cf for details.
Parameters: |
|
---|---|
Returns: | True if the two objects are congruent, False otherwise. |
Return a list of the cf dictionary’s key names which match the given regular expression.
Parameters: | regex (str) – Optional. The regular expression with which to identify key names. |
---|---|
Returns: | A list of keys names. |
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[123]')
['dim2', 'dim1']