We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
owl.Restriction(property,graph=graph,cardinality=Literal(0)) Raises an error. assert len(validRestrProps) When cardinality value is given as 0.
owl.Restriction(property,graph=graph,cardinality=Literal(0))
assert len(validRestrProps)
This comes from:
validRestrProps = [(i, oTerm) for (i, oTerm) in restrTypes if i] assert len(validRestrProps)
I believe this is an oversight as if i == 0 returns False. However, I believe cardinality: 0 is valid.
The text was updated successfully, but these errors were encountered:
You are spot on, it's a classic example of "falsiness", offending LoC is:
rdflib/rdflib/extras/infixowl.py
Line 1652 in 6ed2ef4
and the obvious change to if i is not None fixes the issue, thanks for spotting it and nailing the cause.
if i is not None
PR #1530 raised.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
owl.Restriction(property,graph=graph,cardinality=Literal(0))
Raises an error.assert len(validRestrProps)
When cardinality value is given as 0.
This comes from:
I believe this is an oversight as if i == 0 returns False.
However, I believe cardinality: 0 is valid.
The text was updated successfully, but these errors were encountered: