NCAS-CMS / cf-python

A CF-compliant Earth Science data analysis library
http://ncas-cms.github.io/cf-python
MIT License
125 stars 19 forks source link

`example_fields()` should return a `Fieldlist` not a regular list #725

Closed sadielbartholomew closed 5 months ago

sadielbartholomew commented 8 months ago

Unlike cfdm which has no concept of a Fieldlist, cf-python should return fields contained in a FieldList object rather than a regular Python list, which it returns at the moment:

>>> type(cfdm.example_fields())  # expect a list
<class 'list'>
>>> type(cf.example_fields())  # expect a FieldList
<class 'list'>