[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC 26/32] python//machine.py: use qmp.command
From: |
John Snow |
Subject: |
Re: [PATCH RFC 26/32] python//machine.py: use qmp.command |
Date: |
Tue, 2 Jun 2020 16:11:23 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 6/2/20 6:26 AM, Kevin Wolf wrote:
> I think I prefer the explicit Dict[str, Any] because it doesn't end up
> duplicating the default value, but I just wanted to mention that this
> option exists, too.
Oh, I see what's going on here now! Thanks, that's very helpful! In this
case, for now, I think I like your first solution, too.
Someday in the future, I want to look into strictly typed generated SDK
objects where mypy *does* know the types of every field in a QMP command
object.
That's not today, and it's probably not soon, (and it might be never,)
but until then, explicitly hinting the kwargs to be Dict[str, Any] is
reasonable enough.
Thank you so much!
--js