From: Andreas Oberritter <obi@opendreambox.org>
To: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] bitbake: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
Date: Mon, 05 Mar 2012 13:16:10 +0100 [thread overview]
Message-ID: <4F54AE8A.2070403@opendreambox.org> (raw)
In-Reply-To: <1330833563.3949.1.camel@ted>
On 04.03.2012 04:59, Richard Purdie wrote:
> Using "1" with getVar is bad coding style and "True" is preferred.
Slightly OT, but wouldn't it be more convenient, especially for external
callers like OE, to make True the default for getVar? This would also
make getVar somehow more symmetric to setVar.
A rough, inexact comparison between usage of True vs. False [1]:
bitbake: 214 times True, 25 times False
openembedded-core: 1143 times True, 49 times False
meta-openembedded: 93 times True, 1 time False
Regards,
Andreas
[1]: Method used to obtain the numbers:
git grep '\<getVar\>\s*([^)]\+,\s*\(True\|1\)\s*)' | wc -l
git grep '\<getVar\>\s*([^)]\+,\s*\(False\|0\)\s*)' | wc -l
next prev parent reply other threads:[~2012-03-05 12:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-04 3:59 [PATCH] bitbake: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True) Richard Purdie
2012-03-05 12:16 ` Andreas Oberritter [this message]
2012-03-10 15:31 ` Richard Purdie
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=4F54AE8A.2070403@opendreambox.org \
--to=obi@opendreambox.org \
--cc=bitbake-devel@lists.openembedded.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.