-
Notifications
You must be signed in to change notification settings - Fork 2
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
Surprising literal comparisons #161
Comments
Adding Updating mappings to the new behaviour of literal comparisons may require little more effort. Are there also some third party libraries that depends on tripper that we will break? |
jesper-friis
added a commit
that referenced
this issue
Jan 2, 2024
9 tasks
9 tasks
jesper-friis
added a commit
that referenced
this issue
Jan 25, 2024
jesper-friis
added a commit
that referenced
this issue
Feb 13, 2024
# Description: Closes #160 Also added `fallback_backend` option to `Triplestore.parse()` and `Triplestore.serialize()` to allow calling parse() and serialize() with the collection backend (using rdflib under the hood). **Note** that this PR builds on top of PR #161 **Note** also that this PR utilises DLite PR SINTEF/dlite#755. It is probably a good idea to merge that PR and create a new release of DLite before merging this PR to master. ## Type of change: <!-- Put an `x` in the box that applies. --> - [x] Bug fix and code cleanup. - [x] New feature. - [ ] Documentation update. - [ ] Testing. ## Checklist for the reviewer: <!-- Put an `x` in the boxes that apply. These can be filled by reviewer after the PR is created. --> This checklist should be used as a help for the reviewer. - [ ] Is the change limited to one issue? - [ ] Does this PR close the issue? - [ ] Is the code easy to read and understand? - [ ] Do all new feature have an accompanying new test? - [ ] Has the documentation been updated as necessary?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following comparisons between a Literal and another object may be surprising:
This is an unintended consequence of
Literal
being a subclass ofstr
.A suggestion is to add an
__eq__()
method toLiteral
that usestripper.utils.parse_literal()
to convert all non-literal objects to a Literal and then require that value, lang and datatype all must be equal for equality to be true.The text was updated successfully, but these errors were encountered: