From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1A26F21F2E0E7 for ; Sun, 8 Apr 2018 23:01:24 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2018 23:01:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,426,1517904000"; d="scan'208";a="49162277" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 08 Apr 2018 23:01:24 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 8 Apr 2018 23:01:23 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 8 Apr 2018 23:01:23 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.151]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.239]) with mapi id 14.03.0319.002; Mon, 9 Apr 2018 14:01:21 +0800 From: "Zhu, Yonghong" To: "Carsey, Jaben" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [PATCH v1 1/1] BaseTools: dont make temporary dict Thread-Index: AQHTzTPOWkyeFlpYL0yEdsAIprwhT6P39eNQ Date: Mon, 9 Apr 2018 06:01:21 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v1 1/1] BaseTools: dont make temporary dict X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Apr 2018 06:01:25 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -----Original Message----- From: Carsey, Jaben=20 Sent: Friday, April 06, 2018 7:14 AM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Zhu, Yonghong Subject: [PATCH v1 1/1] BaseTools: dont make temporary dict just make the key list directly Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/Misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Pyth= on/Common/Misc.py index d1752d8a624e..15358aa5603e 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -833,7 +833,7 @@ def GuidValue(CName, PackageList, Inffile =3D None): GuidKeys =3D P.Guids.keys() if Inffile and P._PrivateGuids: if not Inffile.startswith(P.MetaFile.Dir): - GuidKeys =3D (dict.fromkeys(x for x in P.Guids if x not in= P._PrivateGuids)).keys() + GuidKeys =3D [x for x in P.Guids if x not in P._PrivateGui= ds] if CName in GuidKeys: return P.Guids[CName] return None @@ -852,7 +852,7 @@ def ProtocolValue(CName, PackageList, Inffile =3D None)= : ProtocolKeys =3D P.Protocols.keys() if Inffile and P._PrivateProtocols: if not Inffile.startswith(P.MetaFile.Dir): - ProtocolKeys =3D (dict.fromkeys(x for x in P.Protocols if = x not in P._PrivateProtocols)).keys() + ProtocolKeys =3D [x for x in P.Protocols if x not in P._Pr= ivateProtocols] if CName in ProtocolKeys: return P.Protocols[CName] return None @@ -871,7 +871,7 @@ def PpiValue(CName, PackageList, Inffile =3D None): PpiKeys =3D P.Ppis.keys() if Inffile and P._PrivatePpis: if not Inffile.startswith(P.MetaFile.Dir): - PpiKeys =3D (dict.fromkeys(x for x in P.Ppis if x not in P= ._PrivatePpis)).keys() + PpiKeys =3D [x for x in P.Ppis if x not in P._PrivatePpis] if CName in PpiKeys: return P.Ppis[CName] return None --=20 2.16.2.windows.1