Closed jquast closed 9 years ago
Why, what's wrong with dict(sdb.items())
?
Nothing at all, only phonetics in code (and providing same method interface as dict).
One might however be mislead that a .copy() might also have sqlite side-effects or return an sqlitedict instance, so I withdraw the proposal. In such case it is better to explicitly state that this is a "dict-only" copy by dict((sdb.items())
my use case, i need an in-memory copy of the contents of the whole database for comparison, but I wouldn't like to use
my_copy = dict(sdb.items())
, but instead justmy_copy = sdb.copy()
sound ok?