Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH]  [gdb/docs] use a clearer example for gdb lexing
@ 2026-09-28 23:21 k4lizen
  2026-09-29  5:33 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: k4lizen @ 2026-09-28 23:21 UTC (permalink / raw)
  To: gdb-patches

The old one raised a SyntaxWarning, and this one
allows the reader to focus on the GDB lexing
without having to think about what python is
doing.

Signed-off-by: k4lizen <k4lizen@proton.me>
---
 gdb/doc/python.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index d86d679c35d..ddb347361f7 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -4698,8 +4698,8 @@ Arguments are separated by spaces and may be quoted.
 Example:
 
 @smallexample
-print(gdb.string_to_argv ("1 2\ \\\"3 '4 \"5' \"6 '7\""))
-['1', '2 "3', '4 "5', "6 '7"]
+print(gdb.string_to_argv (r"""1 2\ \"3 "4 '5" '6 "7'"""))
+['1', '2 "3', "4 '5", '6 "7']
 @end smallexample
 
 @end defun
-- 
2.55.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]  [gdb/docs] use a clearer example for gdb lexing
  2026-09-28 23:21 [PATCH] [gdb/docs] use a clearer example for gdb lexing k4lizen
@ 2026-09-29  5:33 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2026-09-29  5:33 UTC (permalink / raw)
  To: k4lizen; +Cc: gdb-patches

> Date: Mon, 28 Sep 2026 23:21:40 +0000
> From: k4lizen <k4lizen@proton.me>
> 
> The old one raised a SyntaxWarning, and this one
> allows the reader to focus on the GDB lexing
> without having to think about what python is
> doing.

Thanks.  Is the new variant you suggest supported by all the versions
of Python we currently support?

Also, I think this should be reviewed by someone who knows Python
better than I do (which is close to nothing), because this is not just
a documentation issue.

The patch is okay Texinfo-wise.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-29  5:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 23:21 [PATCH] [gdb/docs] use a clearer example for gdb lexing k4lizen
2026-09-29  5:33 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox