qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 08/15] python/aqmp: Create MessageModel and StandaloneModel c


From: John Snow
Subject: Re: [PATCH 08/15] python/aqmp: Create MessageModel and StandaloneModel classes
Date: Fri, 17 Sep 2021 15:21:26 -0400



On Fri, Sep 17, 2021, 9:39 AM Hanna Reitz <hreitz@redhat.com> wrote:
On 17.09.21 07:40, John Snow wrote:
> This allows 'Greeting' to be subclass of 'Message'. We need the adapter
> classes to avoid some typing problems that occur if we try to put too
> much into the 'Model' class itself; the exact details of why are left as
> an exercise to the reader.
>
> Why bother? This makes 'Greeting' ⊆ 'Message', which is taxonomically
> true; but the real motivation is to be able to inherit and abuse all of
> the Mapping dunders so that we can call dict(greeting) or
> bytes(greeting), for example.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   python/qemu/aqmp/models.py | 67 ++++++++++++++++++++++++++++----------
>   1 file changed, 50 insertions(+), 17 deletions(-)

(I feel like this is a bit much outside of my scope, so this’ll have to
do without my R-b.)

It's a patch I like the least, too. I shouldn't have included it here in this series. It needs more time in the oven and it should be included ... somewhere else.

Sorry about this one.

reply via email to

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