Message221342
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']
>>> |
|
Date |
User |
Action |
Args |
2014-06-23 05:12:00 | Claudiu.Popa | set | recipients:
+ Claudiu.Popa, rhettinger |
2014-06-23 05:12:00 | Claudiu.Popa | set | messageid: <1403500320.45.0.883074945242.issue21670@psf.upfronthosting.co.za> |
2014-06-23 05:12:00 | Claudiu.Popa | link | issue21670 messages |
2014-06-23 05:12:00 | Claudiu.Popa | create | |
|