[poky] About the operator "??="
Scott Garman
scott.a.garman at intel.com
Mon Dec 13 08:24:26 PST 2010
On 12/10/2010 03:58 PM, Chris Larson wrote:
> On Fri, Dec 10, 2010 at 4:42 PM, Richard Purdie<rpurdie at linux.intel.com> wrote:
>> On Thu, 2010-12-09 at 22:44 +0800, Xu, Dongxiao wrote:
>>> I made the following patch (setVarFlag.patch) to move everything in
>>> setVar to setVarFlag, please help to review it.
>>>
>>> Please note one place that I modified, see the indent of
>>> "self._seen_overrides[override].add( var )", I thought it was a bug in
>>> original code.
>>
>> No, its not. Its making sure [override] exists before trying to add var
>> to it. It could also be:
>>
>> if override not in self._seen_overrides:
>> self._seen_overrides[override] = set(var)
>> else:
>> self._seen_overrides[override].add( var )
>>
>
> For master, we can use defaultdict for that sort of thing. What's
> poky's current python version requirement?
2.6, so using defaultdict should be fine.
Scott
--
Scott Garman
Embedded Linux Distro Engineer - Yocto Project
More information about the poky
mailing list