Yet another...
Apologies - haven't been able to run all of the tests in pycharm, so I'm
kind of depending on travis to figure this out
@@ -1743,6 +1743,7 @@ class RDFSink(object):
)
if not n:
return nil
+
first = self.newSymbol(
'http://www.w3.org/1999/02/22-rdf-syntax-ns#first'
)
@@ -1751,15 +1752,12 @@ class RDFSink(object):
)
af = a = self.newBlankNode(f)
- for ne in n:
+ for ne in n[:-1]:
self.makeStatement((f, first, a, ne))
an = self.newBlankNode(f)
self.makeStatement((f, rest, a, an))
a = an
-
- rest = self.newSymbol(
- 'http://www.w3.org/1999/02/22-rdf-syntax-ns#rest'
- )
+ self.makeStatement((f, first, a, n[-1]))
self.makeStatement((f, rest, a, nil))
return af
