[MERGE] remove has_key() usage
Martin Pool
mbp at canonical.com
Wed Aug 30 03:21:10 BST 2006
On 29 Aug 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> Martin Pool wrote:
> > On 29 Aug 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
>
> >> I think my favorite is bool(file_id in self._byid)
> >
> > Why? For extra explicitness that it must be a bool, or do you really
> > expect that 'in' might return something unsuitable?
>
> Yes, for the extra explicitness. Extra parens just don't telegraph it
> to me. But I can go with John's, if you prefer that.
I'd prefer John's form, the bool() makes me wonder "why is he doing
that?"
--
Martin
More information about the bazaar
mailing list