qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 08/17] trace: remove the TraceEventID and Tra


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v4 08/17] trace: remove the TraceEventID and TraceEventVCPUID enums
Date: Fri, 23 Sep 2016 15:12:07 +0100
User-agent: Mutt/1.7.0 (2016-08-17)

On Thu, Sep 22, 2016 at 08:42:23PM +0200, Lluís Vilanova wrote:
> Lluís Vilanova writes:
> > Daniel P Berrange writes:
> >> On Thu, Sep 22, 2016 at 02:35:38PM +0200, Lluís Vilanova wrote:
> >>> Daniel P Berrange writes:
> >>> Here's a more pythonic way to write it:
> >>> 
> >>> numvcpu = len([e for e in events if "vcpu" in e.properties])
> 
> >> FWIW I was tending to avoid this kind of idiom, since most of QEMU
> >> maintainers are C developers, for whom this looks rather alien.
> 
> > I dont wanna enter into a coding style discussion, since I don't know how 
> > alien
> > QEMU developers feel about this (to me, it certainly looks ugly to keep the
> > explicit for loop). Feel free to ignore it.
> 
> BTW, the pythonic one is the style used in many other places on the tracetool
> code.

I agree.  Let's write in Python, not try to write C in Python.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]