[Python-checkins] r42480 - python/trunk/Lib/bsddb/__init__.py

Neal Norwitz nnorwitz at gmail.com
Sun Feb 19 02:07:03 CET 2006


On 2/18/06, georg.brandl <python-checkins at python.org> wrote:
> Author: georg.brandl
> Date: Sun Feb 19 01:53:54 2006
> New Revision: 42480
>> Modified:
> python/trunk/Lib/bsddb/__init__.py
> Log:
> Bug #1396678: a closed bsddb.DB raises AttributeError on repr().
>> It now returns "{}". Is that the correct solution?

iteritems() returns None. It seems like it should return an empty
iterator, such as: iter(()).
How about adding a test for this? That will help determining the
correct solution and we know there won't be a regression in the
future.
n
--
> def iteritems(self):
> try:
> - cur = self._make_iter_cursor()
> + try:
> + cur = self._make_iter_cursor()
> + except AttributeError:
> + return


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /