[issue1516078] dbhash __len__ not reliable

Gregory P. Smith report at bugs.python.org
Wed Jan 23 08:35:55 CET 2008


Gregory P. Smith added the comment:

Works for me in 2.5 and 2.4 isn't getting bug fixes anymore.

>>> import dbhash
>>> d = dbhash.open('x.db', 'w')
>>> d['e'] = 'Eee'
>>> d['f'] = 'Ffff'
>>> len(d)
2
>>> len(d)
2

It was likely fixed by this:

------------------------------------------------------------------------
r46684 | gregory.p.smith | 2006-06-05 16:59:37 -0700 (Mon, 05 Jun 2006)
| 5 line
s

- bsddb: the __len__ method of a DB object has been fixed to return correct
  results.  It could previously incorrectly return 0 in some cases.
  Fixes SF bug 1493322 (pybsddb bug 1184012).

----------
nosy: +gregory.p.smith
resolution:  -> fixed
status: open -> closed

_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1516078>
_____________________________________


More information about the Python-bugs-list mailing list