Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Chris Larson <clarson@kergoth.com>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCH] runqueue: Only attempt to print closest matching task if there is a match
Date: Wed, 22 Jan 2014 18:05:29 +0000	[thread overview]
Message-ID: <1390413929.17424.44.camel@ted> (raw)
In-Reply-To: <CABcZANnuhcDYMcsrC=2NUxv9q=EqUYqK0uDqi+=bwE+0y71u4g@mail.gmail.com>

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@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




      reply	other threads:[~2014-01-22 18:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 22:31 [PATCH] runqueue: Only attempt to print closest matching task if there is a match Richard Purdie
2014-01-22 16:16 ` Chris Larson
2014-01-22 18:05   ` Richard Purdie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1390413929.17424.44.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=clarson@kergoth.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox