Claudiu Popa added the comment: 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'] >>> ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21670> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com