[gdb/docs] use a clearer example for gdb lexing
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
Commit Message
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(-)
Comments
> 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>
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
>> 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.
Eli> Thanks. Is the new variant you suggest supported by all the versions
Eli> of Python we currently support?
Yeah. But also IMO it doesn't matter, Python developers generally
update and it's gdb that is weird in using obsolete versions.
Eli> Also, I think this should be reviewed by someone who knows Python
Eli> better than I do (which is close to nothing), because this is not just
Eli> a documentation issue.
It's fine, I'm going to check it in momentarily.
Tom
@@ -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