[MERGE] remove has_key() usage
Martin Pool
mbp at canonical.com
Wed Aug 30 00:40:22 BST 2006
On 29 Aug 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> John Arbash Meinel wrote:
> > I think for a return value, I prefer:
> >
> > return (file_id in self._byid)
> >
> > Because I think it makes it a little bit clearer that you aren't
> > returning the file_id.
>
> 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?
--
Martin
More information about the bazaar
mailing list