Ejemplo n.º 1
0
 def parsestring(self, s):
     """Parse s as an N-Triples string."""
     if not isinstance(s, string_types):
         raise ParseError("Item to parse must be a string instance.")
     f = BytesIO()
     f.write(cast_bytes(s))
     f.seek(0)
     self.parse(f)
Ejemplo n.º 2
0
 def parsestring(self, s):
     """Parse s as an N-Triples string."""
     if not isinstance(s, string_types):
         raise ParseError("Item to parse must be a string instance.")
     f = BytesIO()
     f.write(cast_bytes(s))
     f.seek(0)
     self.parse(f)