On Wed, Sep 23, 2020 at 06:11:01PM -0400, John Snow wrote: > On 9/23/20 3:14 PM, Eduardo Habkost wrote: > > I'm not sure I like this weird expression, but I believe asking > > for a 120-patch cleanup series to be respun because of a tiny > > style issue would be counterproductive, so: > > > > Reviewed-by: Eduardo Habkost<ehabk...@redhat.com> > > I was trying to reduce the indent level to accommodate the longer names, but > python ternaries *are* pretty weird. > > It'd be nice to enforce always having a variants object instead (even if > it's empty!) and then add __bool__ and __iter__ methods to > QAPISchemaVariants such that you could always do: > > "if variants" > > or > > "for variant in variants" > > but we're not there just yet... should I just put it back the way it was, > with the deep nesting?
I don't have a strong opinion. I got used to it after seeing the same pattern being used a few times. -- Eduardo