What is the cleanest way to remove data in a shelve?
<p>I have got some datas remaining when I delete an element in a shelve. I tried with <code>pop</code>, <code>del</code> and <code>clear</code> but the result is the same. Datas remaining are in file with the dat extension. So, even after using the method clear the size of the dat file isn't 0Ko.</p>

<p>That's what I tryed :</p>

<pre><code>import shelve
test = shelve.open('test')
test['a']=1
#test.pop('a')
#del test['a']
#test.clear()
test.close()
</code></pre>

<p>Is there a way to completely remove a data of a shelve ?</p>