[docs] [issue10609] dbm documentation example doesn't work (iteritems())

Sandro Tosi report at bugs.python.org
Fri Dec 3 07:07:17 CET 2010

Sandro Tosi <sandro.tosi at gmail.com> added the comment:

Hi Eric,
on and up-to-date py3k I got this:

>>> for k, v in db.items():
...     print(k, '\t', v)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: '_dbm.dbm' object has no attribute 'items'
>>> 'items' in dir(db)

(I tried to use items() before proposing that code ;)).


Python tracker <report at bugs.python.org>

More information about the docs mailing list