From da95deae3060ecb2df8cbd26540b157755e3029c 2022-06-03 03:06:21 From: Blazej Michalik <6691643+MrMino@users.noreply.github.com> Date: 2022-06-03 03:06:21 Subject: [PATCH] Merge pull request #13689 from TenzinRabgy/master Documentation uses python2 for a code example instead of python3 --- diff --git a/IPython/lib/demo.py b/IPython/lib/demo.py index 8c9ae90..ebffd54 100644 --- a/IPython/lib/demo.py +++ b/IPython/lib/demo.py @@ -136,7 +136,7 @@ The following is a very simple example of a valid demo file. #################### EXAMPLE DEMO ############################### '''A simple interactive demo to illustrate the use of IPython's Demo class.''' - print 'Hello, welcome to an interactive IPython demo.' + print('Hello, welcome to an interactive IPython demo.') # The mark below defines a block boundary, which is a point where IPython will # stop execution and return to the interactive prompt. The dashes are actually @@ -152,21 +152,21 @@ The following is a very simple example of a valid demo file. # the mark below makes this block as silent # silent - print 'This is a silent block, which gets executed but not printed.' + print('This is a silent block, which gets executed but not printed.') # stop # auto - print 'This is an automatic block.' - print 'It is executed without asking for confirmation, but printed.' - z = x+y + print('This is an automatic block.') + print('It is executed without asking for confirmation, but printed.') + z = x + y - print 'z=',x + print('z =', x) # stop # This is just another normal block. - print 'z is now:', z + print('z is now:', z) - print 'bye!' + print('bye!') ################### END EXAMPLE DEMO ############################ """