A
AK
Hello,
I'm using shelve module in python 2.3 and I found that it does a very
odd thing, at least very unexpected to me. It seems that the data of a
replaced or deleted key stays in filename.dat file.
Example:
test.dat is 4100 bytes
test.dat is still 4100 bytes
If I do del s['test'], it stays the same.
I'm using shelve module in python 2.3 and I found that it does a very
odd thing, at least very unexpected to me. It seems that the data of a
replaced or deleted key stays in filename.dat file.
Example:
d = [1]*1000
from shelve import *
s = open('test')
s['test'] = d
s.close()
test.dat is 4100 bytes
d = 1
s = open('test')
s['test'] = d
s.close()
test.dat is still 4100 bytes
If I do del s['test'], it stays the same.