-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
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
Incorrect handling of falsy literals in SPARQLStore #2621
Comments
a maybe little off sidenote: it maybe would be better to use "is None", "is not None" instead of using != == for None comparisons as None is an integer and things can break subtle. For example None == 0 would return True This should be considered for a proper bugfix and maybe in some other code parts too |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Failing example
... can produce ...
...
ex:a ex:b ex:c
does not match(ex.a, ex.b, Literal(""))
(
Literal("")
,Literal(0)
,Literal(False)
are treated as a variable)Solution
These lines should compare to
None
(a.k.a. ANY) instead:rdflib/rdflib/plugins/stores/sparqlstore.py
Line 298 in b0392f0
rdflib/rdflib/plugins/stores/sparqlstore.py
Line 435 in b0392f0
rdflib/rdflib/plugins/stores/sparqlstore.py
Line 794 in b0392f0
The text was updated successfully, but these errors were encountered: