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

Re: [libvirt] [libvirt-glib 1/2] Use 1 GB of RAM in Python example (instead of 1 TB)



On Tue, Sep 11, 2012 at 10:37:23AM +0300, Timo Juhani Lindfors wrote:
> Christophe Fergeau <cfergeau redhat com> writes:
> > Maybe a comment explicitly saying it's 1GB would be helpful?
> > +domain.set_memory(1024*1024) # 1GB
> 
> Good question. My first reaction is that if such a simple example needs
> extra comments maybe it'd be nicer if the API offered "set_memory_kb"?

The thing is, this simple example is special as people like you will be
copy and pasting from it, so better to make it crystal-clear. If we want
to add a more explicit API, I'd probably go with a function that takes an
int, and a unit as its second argument, but imo that's overkill at this point :)

Christophe

Attachment: pgpYR2kr5jIs2.pgp
Description: PGP signature


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