let paths be comparable against all nodes. Fixes #545 by gromgull · Pull Request #552 · RDFLib/rdflib (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation7 Commits2 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Hard to say what happens with master failing ... i'll wait for it to be fixed and rebase :)
👍 sorry for that... #550
py3.4:
TypeError: unorderable types: URIRef() < AlternativePath()
i guess this is a symmetry problem... if the first operand is not a Path
it breaks... should we maybe move the whole comparison code to Node
or Identifier
and make Path
a subclass?
also, shouldn't https://github.com/RDFLib/rdflib/blob/master/rdflib/term.py#L171 actually raise NotImplemented()
instead of return
ing it?
The missing part was adding @functools.total_ordering
- that fixes py3.4, but breaks 2.6 where it doesn't exist :(
When can we kill 2.6 support? :)
i guess with rdflib 5.0.0 but for now i just fixed it by also defining the other comps...
one other thing i noticed looking at this again though: if possible repr
is meant to return something that you can paste into a python interpreter re-creating the object... do you see an easy way to change the __repr__
methods of the current Path
objects in that way? (i didn't)
gromgull added a commit that referenced this pull request
let paths be comparable against all nodes. Fixes #545
This was referenced
Mar 16, 2017
2 participants