Fix help text for "python" command

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.

gdb/ChangeLog
2018-09-10  Tom Tromey  <tom@tromey.com>

	PR python/18380:
	* python/python.c (_initialize_python): Make example in "python"
	help work in Python 3.
This commit is contained in:
Tom Tromey 2018-09-08 09:13:37 -06:00
parent 60c0454d3d
commit a154931ef1
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2018-09-10 Tom Tromey <tom@tromey.com>
PR python/18380:
* python/python.c (_initialize_python): Make example in "python"
help work in Python 3.
2018-09-10 Eli Zaretskii <eliz@gnu.org>
* Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of

View File

@ -1875,7 +1875,7 @@ Evaluate a Python command.\n\
\n\
The command can be given as an argument, for instance:\n\
\n\
python print 23\n\
python print (23)\n\
\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\