From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnRD5-0004Xw-2a for qemu-devel@nongnu.org; Fri, 23 Sep 2016 10:12:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnRCz-0006tM-Vg for qemu-devel@nongnu.org; Fri, 23 Sep 2016 10:12:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnRCz-0006tC-P9 for qemu-devel@nongnu.org; Fri, 23 Sep 2016 10:12:09 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60BA361E50 for ; Fri, 23 Sep 2016 14:12:09 +0000 (UTC) Date: Fri, 23 Sep 2016 15:12:07 +0100 From: Stefan Hajnoczi Message-ID: <20160923141207.GV8221@stefanha-x1.localdomain> References: <1474533652-31170-1-git-send-email-berrange@redhat.com> <1474533652-31170-9-git-send-email-berrange@redhat.com> <87ponwnmcl.fsf@fimbulvetr.bsc.es> <20160922124423.GL352@redhat.com> <87h997lxq3.fsf@fimbulvetr.bsc.es> <8760pnlqsw.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r+TdwuXy+OXS8TUs" Content-Disposition: inline In-Reply-To: <8760pnlqsw.fsf@fimbulvetr.bsc.es> Subject: Re: [Qemu-devel] [PATCH v4 08/17] trace: remove the TraceEventID and TraceEventVCPUID enums List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org --r+TdwuXy+OXS8TUs Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 22, 2016 at 08:42:23PM +0200, Llu=EDs Vilanova wrote: > Llu=EDs Vilanova writes: > > Daniel P Berrange writes: > >> On Thu, Sep 22, 2016 at 02:35:38PM +0200, Llu=EDs Vilanova wrote: > >>> Daniel P Berrange writes: > >>> Here's a more pythonic way to write it: > >>>=20 > >>> numvcpu =3D len([e for e in events if "vcpu" in e.properties]) >=20 > >> FWIW I was tending to avoid this kind of idiom, since most of QEMU > >> maintainers are C developers, for whom this looks rather alien. >=20 > > I dont wanna enter into a coding style discussion, since I don't know h= ow alien > > QEMU developers feel about this (to me, it certainly looks ugly to keep= the > > explicit for loop). Feel free to ignore it. >=20 > BTW, the pythonic one is the style used in many other places on the trace= tool > code. I agree. Let's write in Python, not try to write C in Python. Stefan --r+TdwuXy+OXS8TUs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJX5Tg3AAoJEJykq7OBq3PIHaEIAIiAzYxtORrBvfvHrafUbva9 9jQzzcrMyLs51d8RT4LA/33tyHJTUIk6szqF5MoLxD/adE7oCgHg75qxrLYTvm3F TfG1qG/izUkAsUg3voXA3ID4sP+UzctyICgYCFu66RdtwWPKpfOpybxAnNsVIOa2 HKDe3fPkEOfrP+gLnp4L90ICrUj2YlbCYnNwsevGad5eCzezzBOw3fIpN7R6sMIs X0K1GVfHf4Z/gqFZG6TniCAC26XS/9lX2vSHypRNNAj8tlJpkqkMmPQPRubgXALr b0bguaV1UKk69I9M0JdBK2xT6fAX3v4tBAGYTXKB6QrqwGbwh8zVxHSkGcg8EbI= =drEk -----END PGP SIGNATURE----- --r+TdwuXy+OXS8TUs--