cldf / pycldf

python package to read and write CLDF datasets
https://cldf.clld.org
Apache License 2.0
15 stars 7 forks source link

Enforce cardinality constraints specified in the ontology #127

Closed xrotwang closed 3 years ago

xrotwang commented 3 years ago

See https://github.com/cldf/cldf/issues/106

    card = col.common_props.get('dc:extent')
    assert (card == 'multivalued' and col.separator) or \
           (card == 'singlevalued' and not col.separator) or \
           (card is None), 'z'