Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Jeremy Bryant <jb@jeremybryant.net>
Cc: GDB Patches <gdb-patches@sourceware.org>,
	 Simon Marchi <simon.marchi@polymtl.ca>,
	 Simon Marchi <simark@simark.ca>,  Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH] - Adapt to Python-3 print syntax
Date: Wed, 15 Oct 2025 07:44:59 -0600	[thread overview]
Message-ID: <87jz0wth2c.fsf@tromey.com> (raw)
In-Reply-To: <87frbl8724.fsf@jeremybryant.net> (Jeremy Bryant's message of "Tue, 14 Oct 2025 23:14:27 +0100")

>>>>> "Jeremy" == Jeremy Bryant <jb@jeremybryant.net> writes:

Jeremy> This change adapts doc examples to Python 3 so they work on current
Jeremy> installations.

Jeremy> python.texi uses a mixture of Python 3 and Python 2 print syntax, the
Jeremy> latter having been sunsetted several years ago.

This looks reasonable but:

Jeremy> -(@value{GDBP}) python print 23
Jeremy> +(@value{GDBP}) python print(23)

Here there's no space after the "print" -- which is standard Python
style, so seems fine; but...

Jeremy> -print gdb.string_to_argv ("1 2\ \\\"3 '4 \"5' \"6 '7\"")
Jeremy> +print (gdb.string_to_argv ("1 2\ \\\"3 '4 \"5' \"6 '7\""))

... here there's no space.  There were a few like this and I wondered
why the discrepancy.

Tom

  parent reply	other threads:[~2025-10-15 13:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 22:14 Jeremy Bryant
2025-10-15 12:01 ` Eli Zaretskii
2025-10-15 13:44 ` Tom Tromey [this message]
2025-10-15 20:19   ` [PATCH v2] " Jeremy Bryant
2025-10-15 20:32     ` Tom Tromey
2025-10-16 20:04       ` Ready for Write After Approval - " Jeremy Bryant
2025-10-17 11:25         ` Eli Zaretskii
2025-10-19 19:16           ` Contributor guidelines - " Jeremy Bryant
2025-10-20  2:25             ` Eli Zaretskii
2025-10-17 14:45         ` Tom Tromey
2025-10-19 17:02           ` Thank you - " Jeremy Bryant

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=87jz0wth2c.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jb@jeremybryant.net \
    --cc=simark@simark.ca \
    --cc=simon.marchi@polymtl.ca \
    /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