[issue13318] Shelve second tier array subscript "[ ]" key creation doesn't work

2011-11-01 Thread Ned Deily
Ned Deily added the comment: shelve is behaving as documented. Because the shelve dictionary entry is mutable (a dictionary), you need to set writeback=True to get the behavior you expect. http://docs.python.org/library/shelve.html -- nosy: +ned.deily resolution: -> invalid stage:

[issue13318] Shelve second tier array subscript "[ ]" key creation doesn't work

2011-11-01 Thread Chris Piekarski
New submission from Chris Piekarski : Shelve object second tier array subscript key generation doesn't behave the same way dictionary object do. >>> import shelve >>> x = shelve.open("tst1.shelve") >>> x["one"] = {} >>> x {'one': {}} >>> x["one"]["two"] = 2 >>> x {'one': {}} Whereas with a dic