-
Notifications
You must be signed in to change notification settings - Fork 554
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
Consistency Namespace vs. ClosedNamespace #542
Comments
can you give us a use-case where you can't just compare |
gromgull
added a commit
that referenced
this issue
Nov 22, 2015
I totally agree that it's weird that they derive from different things. It also looks trivial to fix. I've tried - let me see if Travis agrees :) |
Also totally agree, thanks for addressing this! 👍 |
the change mentioned in #551 is backwards incompatible and will be moved to rdflib 5.0.0 . |
This was referenced Feb 15, 2016
joernhees
pushed a commit
to joernhees/rdflib
that referenced
this issue
Feb 15, 2016
joernhees
pushed a commit
to joernhees/rdflib
that referenced
this issue
Feb 15, 2016
joernhees
pushed a commit
to joernhees/rdflib
that referenced
this issue
Feb 15, 2016
gromgull
added a commit
to gromgull/rdflib
that referenced
this issue
Oct 27, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As I understand rdflib.Namespace and ClosedNamespace, they are both meant as auxiliaries to simplify the creation of URIRefs in Python code, e.g.
RDF.type
orOWL.Class
. In addition, ClosedNamespace provides an additional vocabulary check, e.g.,RDF.spam
will raise an exception.However, sometimes other uses of Namespace/ClosedNamespace can be useful, e.g., string comparison. At this stage, it is quite inconvenient that Namespace is derived from unicode, whereas ClosedNamespace is derived from the standard object, and the actual namespace string is an instance attribute (uri). In the interest of consistency, I propose that ClosedNamespace should also be derived from unicode (or even from Namespace).
Regards
The text was updated successfully, but these errors were encountered: