[bitbake-devel] [PATCH] runqueue: Only attempt to print closest matching task if there is a match
Richard Purdie
richard.purdie at linuxfoundation.org
Wed Jan 22 18:05:29 UTC 2014
On Wed, 2014-01-22 at 09:16 -0700, Chris Larson wrote:
> On Tue, Jan 21, 2014 at 3:31 PM, Richard Purdie
> <richard.purdie at linuxfoundation.org> wrote:
> + if len(matches):
>
> Minor quibble, this could almost be considered an antipattern in
> python :) Whenever you see yourself doing this, you're almost always
> better off removing the len(). Python can test if a container is
> empty.
Sorry, I do know this too :/.
It started life as a len(x) > 1, then when I fixed something else I
didn't properly simplify it.
Cheers,
Richard
More information about the bitbake-devel
mailing list