t = cldf.add_component(...)
t.common_props['dc:description'] = ...
This could be written more concisely with an API that allowed passing data to be used in common_props. While this could be done in a generic way, just funneling **kwargs to common_props, arguably the most often used property is dc:description, which cannot be used as keyword argument name in Python. Thus, just adding one keyword argument description to Dataset.add_component|add_table might hit the sweet spot here.
We often use code like
This could be written more concisely with an API that allowed passing data to be used in
common_props
. While this could be done in a generic way, just funneling**kwargs
tocommon_props
, arguably the most often used property isdc:description
, which cannot be used as keyword argument name in Python. Thus, just adding one keyword argumentdescription
toDataset.add_component|add_table
might hit the sweet spot here.