Re: [PATCH v2 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-09-24 Thread John Snow
On Tue, Sep 7, 2021 at 4:28 AM Markus Armbruster wrote: > John Snow writes: > > > It simplifies the typing to say that _section is always a > > QAPIDoc.Section(). > > If you say so > > I mean, I thought so at the time. I have an aversion to making optional types and then littering isinstance

Re: [PATCH v2 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-09-07 Thread Markus Armbruster
John Snow writes: > It simplifies the typing to say that _section is always a > QAPIDoc.Section(). If you say so > To accommodate this change, we must allow for this object to evaluate to > False for functions like _end_section which behave differently based on > whether or not a Section ha

[PATCH v2 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-05-20 Thread John Snow
It simplifies the typing to say that _section is always a QAPIDoc.Section(). To accommodate this change, we must allow for this object to evaluate to False for functions like _end_section which behave differently based on whether or not a Section has been started. Signed-off-by: John Snow ---