qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 04/21] qapi/parser: factor parsing routine into method


From: Markus Armbruster
Subject: Re: [PATCH v2 04/21] qapi/parser: factor parsing routine into method
Date: Tue, 18 May 2021 11:57:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

John Snow <jsnow@redhat.com> writes:

> For the sake of keeping __init__ smaller (and treating it more like a
> gallery of what state variables we can expect to see), put the actual
> parsing action into a parse method. It remains invoked from the init
> method to reduce churn.

I'm kind of *shrug* about this.  Well short of "no".

>
> To accomplish this, 'previously_included' becomes the private data
> member '_included', and the filename is stashed as _fname.

Nitpick: you enclose most identifiers in quotes, but not all.

Comments and commit messages often profit from "marking up" identifiers.
Especially when the identifiers are also common words.  I like to use
function(), @variable, .attribute, and .method().

>
> Add any missing declarations to the init method, and group them by
> function so they can be understood quickly at a glance.
>
> Signed-off-by: John Snow <jsnow@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]