RDFLib/rdflib-sparql — pull request #10 by uholzer (2013-01-31 02:26:17+00:00)
Title: INSERT containing GRAPH with variable for name

Using ```INSERT { GRAPH { ... } }``` one can instert data into a specific graph. The name of this graph can also be given by a variable, e.g. ```INSERT { GRAPH ?g { ... } }```. This fails (note that the graph has no name):

```
Python 3.2.3 (default, Jun 25 2012, 23:10:56)
[GCC 4.7.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import rdflib
>>> import rdflib_sparql.processor
>>> g = rdflib.ConjunctiveGraph()
>>> rdflib_sparql.processor.processUpdate(g, """INSERT { GRAPH ?g { ?g ?g ?g . } } WHERE { BIND( AS ?g) }""")
>>> g.serialize(format='trix')
b'\n\n \n \n http://1\n http://1\n http://1\n \n \n\n'
>>> rdflib_sparql.processor.processUpdate(g, """INSERT { GRAPH ?g { ?g ?g ?g . } } WHERE { ?g ?g ?g . }""")
```

This pullrequest fixes this problem. Note that I have not done any tests. It could be that my fix is incomplete or introduces other problems.