Code review comment for lp:~stevenk/launchpad/queue-no-changes

Revision history for this message
Robert Collins (lifeless) wrote :

On Thu, Jul 14, 2011 at 9:58 PM, Julian Edwards
<email address hidden> wrote:
> Review: Needs Fixing
> Thanks for making this fix Steve.  Just a couple of small suggestions:
>
> 8       + if not changesfile_object:
>
> This violates our coding style, using "is not None" if you mean that.

Not anymore. We fixed that in Texas.
"Truth conditionals
Remember that False, None, [], and 0 are not the same although they
all evaluate to False in a boolean context. If this matters in your
code, be sure to check explicitly for either of them.

Also, checking the length may be an expensive operation. Casting to
bool may avoid this if the object specializes by implementing
nonzero."

> 22      + if self.changesfile:
>
> Same thing here.

-Rob

« Back to merge proposal