8000 Upd to python 3 in explicit code section · realpython/python-guide@9c2d09d · GitHub
[go: up one dir, main page]

Skip to content

Commit 9c2d09d

Browse files
Upd to python 3 in explicit code section
1 parent 266b4c4 commit 9c2d09d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/writing/style.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ it is bad practice to have two disjointed statements on the same line of code.
6565

6666
.. code-block:: python
6767
68-
print 'one'; print 'two'
68+
print('one'); print('two')
6969
70-
if x == 1: print 'one'
70+
if x == 1: print('one')
7171
7272
if <complex comparison> and <other complex comparison>:
7373
# do something
@@ -76,11 +76,11 @@ it is bad practice to have two disjointed statements on the same line of code.
7676

7777
.. code-block:: python
7878
79-
print 'one'
80-
print 'two'
79+
print('one')
80+
print('two')
8181
8282
if x == 1:
83-
print 'one'
83+
print('one')
8484
8585
cond1 = <complex comparison>
8686
cond2 = <other complex comparison>

0 commit comments

Comments
 (0)
0