Author eric.araujo
Recipients Kain94, eric.araujo, georg.brandl, r.david.murray, rhettinger, terry.reedy, ysj.ray
Date 2011-02-04.00:52:19
SpamBayes Score 2.56646e-05
Marked as misclassified No
Message-id <1296780739.93.0.637434779052.issue9523@psf.upfronthosting.co.za>
In-reply-to
Content
Thank you for working on a patch, especially with such comprehensive tests.

> The object returned by :func:`.open` supports the same basic functionality as
> -dictionaries
> +:mod:`collection`.MutableMapping

The previous text was okay, I wouldn’t have changed it.

>     def items(self):
>+        return set([(key, self[key]) for key in self._index.keys()])
I don’t know if you should use a plain set or a collections.ItemsView here.  In dict objects, KeysView and ValuesView are set-like objects with added behavior, for example they yield their elements in the same order.  Raymond, can you comment?

Style remarks: you can iter without calling _index.keys(); you can avoid the intermediary list (IOW, remove enclosing [ and ]).

In the tests, you can use specialized methods like assertIn and assertIsNone, they remove some boilerplate and can give better error output.

I can’t review the C code. :)
History
Date User Action Args
2011-02-04 00:52:19eric.araujosetrecipients: + eric.araujo, georg.brandl, rhettinger, terry.reedy, r.david.murray, Kain94, ysj.ray
2011-02-04 00:52:19eric.araujosetmessageid: <1296780739.93.0.637434779052.issue9523@psf.upfronthosting.co.za>
2011-02-04 00:52:19eric.araujolinkissue9523 messages
2011-02-04 00:52:19eric.araujocreate