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 Claudiu.Popa
Recipients Claudiu.Popa, rhettinger
Date 2014-06-23.05:12:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403500320.45.0.883074945242.issue21670@psf.upfronthosting.co.za>
In-reply-to
Content
The problem is that the repr of the underlying db is not very helpful either, as seen for the dbm backend.

>>> import dbm
>>> dbm.open("test", "c")
<dbm.dumb._Database object at 0x03091FC0>
>>> f=_
>>> f[b"2"] = b"a"
>>> f
<dbm.dumb._Database object at 0x03091FC0>
>>>

But it shows the content of the underlying database, not the key / value pairs passed in the constructor:

>>> shelve.open("test1")
DbfilenameShelf({})
>>> f=_
>>> f["2"] = "4"
>>> f
DbfilenameShelf({'2': '4'})
>>> f["40"] = "50"
>>> f.dict
<dbm.dumb._Database object at 0x02ACC038>
>>> f.dict.keys()
[b'40', b'2']
>>>
History
Date User Action Args
2014-06-23 05:12:00Claudiu.Popasetrecipients: + Claudiu.Popa, rhettinger
2014-06-23 05:12:00Claudiu.Popasetmessageid: <1403500320.45.0.883074945242.issue21670@psf.upfronthosting.co.za>
2014-06-23 05:12:00Claudiu.Popalinkissue21670 messages
2014-06-23 05:12:00Claudiu.Popacreate