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