Bases: _abcoll.MutableMapping
A dictionary-like object (a ‘cf dictionary’) suitable for storing CF structures.
Parameters: |
|
---|
Overloaded operators:
The in (set membership) operator is overloaded to use numerically tolerant equality.
Methods:
Method | Description |
---|---|
clear | As for a built-in dict. |
copy | Create a deep copy. |
equals | Determine whether two instances are congruent with each other. |
get | As for a built-in dict. |
get_keys | Return keys which match a pattern. |
has_key | As for a built-in dict but using numerically tolerant equality. |
items | As for a built-in dict. |
iteritems | As for a built-in dict. |
iterkeys | As for a built-in dict. |
itervalues | As for a built-in dict. |
keys | As for a built-in dict. |
pop | As for a built-in dict. |
popitem | As for a built-in dict. |
setdefault | As for a built-in dict. |
update | As for a built-in dict. |
values | As for a built-in dict. |
Methods and attributes defined here:
CFD.copy() -> a deep copy of CFD
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']
CFD.has_key(k) -> True if CFD has a key k, else False