Get a CF property.
When a default argument is given, it is returned when the attribute doesn’t exist; without it, an exception is raised in that case.
Parameters : |
|
---|---|
Returns : |
|
Raises : |
|
---|
Examples
>>> f.getprop('standard_name')
>>> f.getprop('standard_name', None)
>>> f.getprop('foo')
AttributeError: Field doesn't have CF property 'foo'
>>> f.getprop('foo', 'bar')
'bar'