This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cpiekarski
Recipients cpiekarski
Date 2011-11-01.22:54:06
SpamBayes Score 0.0032139586
Marked as misclassified No
Message-id <1320188047.41.0.331815392706.issue13318@psf.upfronthosting.co.za>
In-reply-to
Content
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 dictionary it works:

>>> y = {}
>>> y["one"] = {}
>>> y["one"]["two"] = 2
>>> y
{'one': {'two': 2}}
History
Date User Action Args
2011-11-01 22:54:07cpiekarskisetrecipients: + cpiekarski
2011-11-01 22:54:07cpiekarskisetmessageid: <1320188047.41.0.331815392706.issue13318@psf.upfronthosting.co.za>
2011-11-01 22:54:06cpiekarskilinkissue13318 messages
2011-11-01 22:54:06cpiekarskicreate