qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH] python: add __repr__ to ConsoleSocket to aid debugging


From: John Snow
Subject: Re: [RFC PATCH] python: add __repr__ to ConsoleSocket to aid debugging
Date: Tue, 8 Dec 2020 10:09:10 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 12/7/20 4:35 PM, Willian Rampazzo wrote:
We could use something more pythonic for this file. Instead of 3
string concatenations, my suggestion is to go with string formatting,
like:

s = "%s,  logfile=%s, drain_thread=%s>" % (s, self._logfile, self._drain_thread)

As str is immutable in Python, it avoids unnecessary copies.

Sure, this is fine too. I'm not too worried about performance of debugging methods.

Alex, use your own discretion -- feel free to keep my RB/ACK and merge alongside your other tests when ready. Thanks!

--js




reply via email to

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