[OE-core] accessing variables
Joshua Lock
josh at linux.intel.com
Wed Feb 1 18:18:30 UTC 2012
On 01/02/12 10:15, Andreas Müller wrote:
> another stupid question from my side:
>
> do
>
> bb.data.getVar('foo', d, 1)
>
> and
>
> d.getVar('foo', 1)
>
> access the same data?
Yes.
The first is calling the class method and passing in an instance of a
data object, the second is calling the method on the object directly.
Either way you're using the same data object, d.
The latter is more pythonic and we've been slowly moving the code
towards that style.
Also for stylistic reasons please use True/False rather than 1/0 for the
final parameter.
Cheers,
Joshua
--
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list