[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 13/22] qapi: add code generators for QMP command

From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 13/22] qapi: add code generators for QMP command marshaling
Date: Mon, 7 Mar 2011 14:38:33 +0000

On Mon, Mar 7, 2011 at 1:44 PM, Anthony Liguori <address@hidden> wrote:
> On 03/07/2011 07:27 AM, Stefan Hajnoczi wrote:
>> On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori<address@hidden>
>>  wrote:
>>> +def print_definition(name, required, optional, retval):
>> This function is pretty long.  Is there a logical way to split it up
>> into several smaller meaningful functions?
> It seems long because of the code generation but there's really not an awful
> lot of logic in it.
> It might be worth spending a little time looking at a template system.  I'm
> not terribly familiar with any of the popular ones and I think they usually
> focus on HTML generation but it might help readability.

There's a really simple one built into Python:


reply via email to

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