diff options
| author | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2015-10-11 12:19:04 +0200 |
|---|---|---|
| committer | Gunnar Aastrand Grimnes <gromgull@gmail.com> | 2015-10-11 12:19:04 +0200 |
| commit | 13d68850fe44408da43c040f55ce23a31f1f3331 (patch) | |
| tree | ab2c3b5596310c1f44432eddf92f3bae5624babf | |
| parent | 9dac4841658942ea6bfb6ef8ad3418f078ce3b34 (diff) | |
| download | rdflib-13d68850fe44408da43c040f55ce23a31f1f3331.tar.gz | |
let Resource objects be slices with other resources directly
| -rw-r--r-- | rdflib/resource.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rdflib/resource.py b/rdflib/resource.py index b6f648b6..18fc52fd 100644 --- a/rdflib/resource.py +++ b/rdflib/resource.py @@ -455,6 +455,8 @@ class Resource(object): if item.step: raise TypeError("Resources fix the subject for slicing, and can only be sliced by predicate/object. ") p,o=item.start,item.stop + if isinstance(p, Resource): p = p._identifier + if isinstance(o, Resource): o = o._identifier if p is None and o is None: return self.predicate_objects() elif p is None: |
