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