I am working with Shelve in Python and I am having an issue:
In [391]: x
Out[391]: {'broken': {'position': 25, 'page': 1, 'letter': 'a'}}
In [392]: x['broken'].update({'page':1,'position':25,'letter':'b'})
In [393]: x
Out[393]: {'broken': {'position': 25, 'page': 1, 'letter': 'a'}}
I don’t understand why its not updating? Any thoughts?
This is covered in the documentation. Basically, the keyword parameter
writebacktoshelve.openis responsible for this:Example from the same page: