Re: [PATCH v6 17/19] qapi/introspect.py: Type _gen_tree variants as Sequence[str]

2021-02-16 Thread John Snow
On 2/16/21 4:10 AM, Markus Armbruster wrote: John Snow writes: Optional[List] is clunky; an empty sequence can more elegantly convey "no variants". By downgrading "List" to "Sequence", we can also accept tuples; this is useful for the empty tuple specifically, which we may use as a default

Re: [PATCH v6 17/19] qapi/introspect.py: Type _gen_tree variants as Sequence[str]

2021-02-16 Thread Markus Armbruster
John Snow writes: > Optional[List] is clunky; an empty sequence can more elegantly convey > "no variants". By downgrading "List" to "Sequence", we can also accept > tuples; this is useful for the empty tuple specifically, which we may > use as a default parameter because it is immutable. > >

[PATCH v6 17/19] qapi/introspect.py: Type _gen_tree variants as Sequence[str]

2021-02-15 Thread John Snow
Optional[List] is clunky; an empty sequence can more elegantly convey "no variants". By downgrading "List" to "Sequence", we can also accept tuples; this is useful for the empty tuple specifically, which we may use as a default parameter because it is immutable. Signed-off-by: John Snow ---