summaryrefslogtreecommitdiffstats
path: root/Doc/reference/compound_stmts.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/reference/compound_stmts.rst')
-rw-r--r--Doc/reference/compound_stmts.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index 045231b..bd55bc9 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -32,13 +32,13 @@ form of suite can contain nested compound statements; the following is illegal,
mostly because it wouldn't be clear to which :keyword:`if` clause a following
:keyword:`else` clause would belong: ::
- if test1: if test2: print x
+ if test1: if test2: print(x)
Also note that the semicolon binds tighter than the colon in this context, so
-that in the following example, either all or none of the :keyword:`print`
-statements are executed::
+that in the following example, either all or none of the :func:`print` calls are
+executed::
- if x < y < z: print x; print y; print z
+ if x < y < z: print(x); print(y); print(z)
Summarizing: