Skip to content

Commit da95dea

Browse files
authored
Merge pull request ipython#13689 from TenzinRabgy/master
Documentation uses python2 for a code example instead of python3
2 parents 7aa9145 + d09a817 commit da95dea

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

IPython/lib/demo.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
#################### EXAMPLE DEMO <ex_demo.py> ###############################
137137
'''A simple interactive demo to illustrate the use of IPython's Demo class.'''
138138
139-
print 'Hello, welcome to an interactive IPython demo.'
139+
print('Hello, welcome to an interactive IPython demo.')
140140
141141
# The mark below defines a block boundary, which is a point where IPython will
142142
# stop execution and return to the interactive prompt. The dashes are actually
@@ -152,21 +152,21 @@
152152
# the mark below makes this block as silent
153153
# <demo> silent
154154
155-
print 'This is a silent block, which gets executed but not printed.'
155+
print('This is a silent block, which gets executed but not printed.')
156156
157157
# <demo> stop
158158
# <demo> auto
159-
print 'This is an automatic block.'
160-
print 'It is executed without asking for confirmation, but printed.'
161-
z = x+y
159+
print('This is an automatic block.')
160+
print('It is executed without asking for confirmation, but printed.')
161+
z = x + y
162162
163-
print 'z=',x
163+
print('z =', x)
164164
165165
# <demo> stop
166166
# This is just another normal block.
167-
print 'z is now:', z
167+
print('z is now:', z)
168168
169-
print 'bye!'
169+
print('bye!')
170170
################### END EXAMPLE DEMO <ex_demo.py> ############################
171171
"""
172172

0 commit comments

Comments
 (0)