diff options
author | Jörn Hees <joernhees@users.noreply.github.com> | 2017-02-08 19:14:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 19:14:30 +0100 |
commit | 8f70212d3b3894674004cc2e59c002911a30b398 (patch) | |
tree | fa4e4fd14ecaad8b25c68c2aea45cbc8c26029ad | |
parent | 279e1d1f8792f41de523da2445e0665626b4be09 (diff) | |
download | rdflib-8f70212d3b3894674004cc2e59c002911a30b398.tar.gz |
cleanups wrt. str and repr
-rw-r--r-- | rdflib/namespace.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rdflib/namespace.py b/rdflib/namespace.py index b954c9eb..80735de5 100644 --- a/rdflib/namespace.py +++ b/rdflib/namespace.py @@ -120,7 +120,7 @@ class Namespace(text_type): return self.term(name) def __repr__(self): - return "Namespace(%s)" % text_type.__repr__(self) + return "Namespace(%r)" % text_type(self) class URIPattern(text_type): @@ -150,7 +150,7 @@ class URIPattern(text_type): return URIRef(text_type.format(self, *args, **kwargs)) def __repr__(self): - return "URIPattern(%r)" % text_type.__repr__(self) + return "URIPattern(%r)" % text_type(self) class ClosedNamespace(object): @@ -185,10 +185,10 @@ class ClosedNamespace(object): return self.term(name) def __str__(self): - return str(self.uri) + return text_type(self.uri) def __repr__(self): - return """rdf.namespace.ClosedNamespace('%s')""" % str(self.uri) + return "rdf.namespace.ClosedNamespace(%r)" % text_type(self.uri) class _RDFNamespace(ClosedNamespace): |