From: John Snow <jsnow@redhat.com>
To: "Willian Rampazzo" <wrampazz@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Eduardo Habkost <ehabkost@redhat.com>,
Cleber Rosa <crosa@redhat.com>
Subject: Re: [RFC PATCH] python: add __repr__ to ConsoleSocket to aid debugging
Date: Tue, 8 Dec 2020 10:09:10 -0500 [thread overview]
Message-ID: <c615c623-61d1-4b8d-495d-0c4568471687@redhat.com> (raw)
In-Reply-To: <CAKJDGDbdHXPAKUXpJFXufs6ip0LNikacvBstdyxr4v3kv8ox=w@mail.gmail.com>
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
prev parent reply other threads:[~2020-12-08 15:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 20:07 [RFC PATCH] python: add __repr__ to ConsoleSocket to aid debugging Alex Bennée
2020-12-07 21:02 ` John Snow
2020-12-07 21:35 ` Willian Rampazzo
2020-12-07 22:14 ` Philippe Mathieu-Daudé
2020-12-07 23:14 ` Willian Rampazzo
2020-12-08 15:09 ` John Snow [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c615c623-61d1-4b8d-495d-0c4568471687@redhat.com \
--to=jsnow@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=crosa@redhat.com \
--cc=ehabkost@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wrampazz@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).