title: Namespace binding in RDFLib
body: <p>In the following minimal test case:</p>
  <pre class="lang-py prettyprint-override"><code>from rdflib import Graph, Namespace, Literal, RDF
  
  base = &quot;http://test.com/ns&quot;
  foobar = Namespace(&quot;http://test.com/ns#&quot;)
  g = Graph(base=base)
  g.bind('foobar', foobar)
  
  g.add((foobar.something, RDF.type, Literal('Blah')))
  g.add((foobar.something, foobar.contains, Literal('a property')))
  
  g.add((foobar.anotherthing, RDF.type, Literal('Blubb')))
  g.add((foobar.anotherthing, foobar.contains, Literal('another property')))
  
  print(g.serialize(format='turtle').decode(&quot;utf-8&quot;))
  </code></pre>
  <p>I get</p>
  <pre><code>@base &lt;http://test.com/ns&gt; .
  @prefix foobar: &lt;http://test.com/ns#&gt; .
  
  &lt;#anotherthing&gt; a &quot;Blubb&quot; ;
      ns1:contains &quot;another property&quot; .
  
  ns1:something a &quot;Blah&quot; ;
      ns1:contains &quot;a property&quot; .
  </code></pre>
  <p>what I'd expecte is more like</p>
  <pre><code>@base &lt;http://test.com/ns&gt; .
  @prefix foobar: &lt;http://test.com/ns#&gt; .
  
  &lt;#anotherthing&gt; a &quot;Blubb&quot; ;
      foobar:contains &quot;another property&quot; .
  
  &lt;#something&gt; a &quot;Blah&quot; ;
      foobar:contains &quot;a property&quot; .
  </code></pre>
  <p>So either there is something I fundamentally don't understand about RDFLib and how to use namespaces, or there's something funky going on.<br />
  Any thoughts, anyone?</p>