Re: [PATCH v4 11/19] qapi/expr.py: Modify check_keys to accept any Collection

2021-03-25 Thread John Snow
On 3/25/21 10:45 AM, Markus Armbruster wrote: John Snow writes: This is a minor adjustment that allows the 'required' and 'optional' keys fields to take a default value of an empty, immutable sequence (the empty tuple). This reveals a quirk of this function, which is that "a + b" is list-spec

Re: [PATCH v4 11/19] qapi/expr.py: Modify check_keys to accept any Collection

2021-03-25 Thread Markus Armbruster
John Snow writes: > This is a minor adjustment that allows the 'required' and 'optional' > keys fields to take a default value of an empty, immutable sequence (the > empty tuple). > > This reveals a quirk of this function, which is that "a + b" is > list-specific behavior. We can accept a wider v

[PATCH v4 11/19] qapi/expr.py: Modify check_keys to accept any Collection

2021-03-24 Thread John Snow
This is a minor adjustment that allows the 'required' and 'optional' keys fields to take a default value of an empty, immutable sequence (the empty tuple). This reveals a quirk of this function, which is that "a + b" is list-specific behavior. We can accept a wider variety of types if we avoid tha