diff options
author | Remi Chateauneu <remi.chateauneu@gmail.com> | 2021-05-20 07:31:00 +0100 |
---|---|---|
committer | Remi Chateauneu <remi.chateauneu@gmail.com> | 2021-05-20 07:31:00 +0100 |
commit | 42c90d97f8564e7676023a59b860c05997870eaf (patch) | |
tree | 95449942d7f8c866015a40ed55aecc3721a42084 | |
parent | 282a8b779b9974ff8f449dee8ebb8165d0555dd9 (diff) | |
download | rdflib-42c90d97f8564e7676023a59b860c05997870eaf.tar.gz |
Added comments.
-rw-r--r-- | rdflib/term.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rdflib/term.py b/rdflib/term.py index 4e7c3c82..36f84aaa 100644 --- a/rdflib/term.py +++ b/rdflib/term.py @@ -969,6 +969,7 @@ class Literal(Identifier): """ # don't use super()... for efficiency reasons, see Identifier.__hash__ res = str.__hash__(self) + # Directly accessing the member is faster than the property. if self._language: res ^= hash(self._language.lower()) if self._datatype: @@ -1015,6 +1016,7 @@ class Literal(Identifier): return True if other is None: return False + # Directly accessing the member is faster than the property. if isinstance(other, Literal): return ( self._datatype == other._datatype |