shelve file space always increase!

smalltalk ttkk1024 at gmail.com
Wed Sep 17 12:17:54 CEST 2008


>>> import shelve
>>> sf = shelve.open('e:/abc.db')
>>> for i in range(10000):
... 	sf[str(i)]=i
...
>>> sf.close()
>>> sf = shelve.open('e:/abc.db')
>>> sf.clear()
>>> sf
{}
the abc.db is always 312k though i have use clear(), how can i shrink
the space?



More information about the Python-list mailing list