[04/14] Fix help text for "python" command

Message ID 20180908201417.13444-5-tom@tromey.com
State New
Headers show
  • Many small Python documentation fixes
Related show

Commit Message

Tom Tromey Sept. 8, 2018, 8:14 p.m.
PR python/18380 points out that the example in the "help python" text
will only work in Python 2.  This changes the example to be valid
syntax for both Python 2 and Python 3.

2018-09-08  Tom Tromey  <tom@tromey.com>

	PR python/18380:
	* python/python.c (_initialize_python): Make example in "python"
	help work in Python 3.
 gdb/ChangeLog       | 6 ++++++
 gdb/python/python.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)



diff --git a/gdb/python/python.c b/gdb/python/python.c
index 20fc674f20a..6f798a0e461 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1875,7 +1875,7 @@  Evaluate a Python command.\n\
 The command can be given as an argument, for instance:\n\
-    python print 23\n\
+    python print (23)\n\
 If no argument is given, the following lines are read and used\n\
 as the Python commands.  Type a line containing \"end\" to indicate\n\