[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of imp
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type |
Date: |
Tue, 06 Oct 2015 15:31:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 10/06/2015 02:32 AM, Markus Armbruster wrote:
>
>>> If entity is an implicit ObjectType, return True. If it is implicit but
>>> not an object (such as an implicit enum), or is not implicit (regardless
>>> of whether it is an ObjectType), then return False.
>>>
>>> And if you don't need filtering by python type, then
>>> entity.is_implicit() (shorthand for entity.is_implicit(None)) then gives
>>> the correct answer whether entity is ObjectType or EnumType or something
>>> else.
>>
>> I find
>>
>> isinstance(entity, QAPISchemaObjectType) and entity.is_implicit()
>>
>> more obvious than
>>
>> entity.is_implicit(QAPISchemaObjectType)
>
> Well, I had already written v7 before this request of yours; do you want
> to see how it turned out, before deciding if I need a v8 that throws the
> isinstance check burden back on the caller?
>
> http://thread.gmane.org/gmane.comp.emulators.qemu/366810/focus=366809
I certainly want to review your v7 first.
- Re: [Qemu-devel] [PATCH v6 06/12] qapi: Track owner of each object member, (continued)
- [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type, Eric Blake, 2015/10/08
- Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type, Markus Armbruster, 2015/10/08
- Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type, Eric Blake, 2015/10/08
- Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type, Markus Armbruster, 2015/10/08
- Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type, Eric Blake, 2015/10/08
- Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type, Markus Armbruster, 2015/10/08
- Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type, Eric Blake, 2015/10/08
- Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type, Markus Armbruster, 2015/10/08
- Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type, Eric Blake, 2015/10/08
- Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type,
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type, Eric Blake, 2015/10/08
[Qemu-devel] [PATCH v6 05/12] qapi: Track location that created an implicit type, Eric Blake, 2015/10/08
[Qemu-devel] [PATCH v6 08/12] qapi: Defer duplicate member checks to schema check(), Eric Blake, 2015/10/08
[Qemu-devel] [PATCH v6 11/12] qapi: Detect base class loops, Eric Blake, 2015/10/08