qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v7 04/14] qapi: Don't use info as witness of imp


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v7 04/14] qapi: Don't use info as witness of implicit object type
Date: Fri, 9 Oct 2015 16:41:55 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 10/07/2015 10:27 AM, Markus Armbruster wrote:

>>      def visit_needed(self, entity):
>>          # Visit everything except implicit objects
>> -        return not isinstance(entity, QAPISchemaObjectType) or entity.info
>> +        return not entity.is_implicit(QAPISchemaObjectType)
> 
> The alternative is something like
> 
>         return not (isinstance(entity, QAPISchemaObjectType) and
>                     entity.is_implicit())
> 
> Trades a more verbose "is this an implicit object type" check for a
> simpler is_implicit().  Shorter overall, and feels better to me.  But if
> you feel strongly about your way of doing it, I can live with it.

I'm not strongly tied to the concise form enough to stall review, so v8
will use the longer explicit form.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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