[New-bugs-announce] [issue13318] Shelve second tier array subscript "[ ]" key creation doesn't work

Chris Piekarski report at bugs.python.org
Tue Nov 1 23:54:07 CET 2011


New submission from Chris Piekarski <chris at cpiekarski.com>:

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}}

----------
components: None
messages: 146816
nosy: cpiekarski
priority: normal
severity: normal
status: open
title: Shelve second tier array subscript "[ ]" key creation doesn't work
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13318>
_______________________________________


More information about the New-bugs-announce mailing list