summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/controlflow.rst4
-rw-r--r--Doc/tutorial/interpreter.rst4
2 files changed, 4 insertions, 4 deletions
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index 280c028..c21e531 100644
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -475,8 +475,8 @@ called with an arbitrary number of arguments. These arguments will be wrapped
up in a tuple. Before the variable number of arguments, zero or more normal
arguments may occur. ::
- def fprintf(file, template, *args):
- file.write(template.format(args))
+ def write_multiple_items(file, separator, *args):
+ file.write(separator.join(args))
Normally, these ``variadic`` arguments will be last in the list of formal
diff --git a/Doc/tutorial/interpreter.rst b/Doc/tutorial/interpreter.rst
index 42fc6e1..27a91d0 100644
--- a/Doc/tutorial/interpreter.rst
+++ b/Doc/tutorial/interpreter.rst
@@ -51,8 +51,8 @@ and executes a *script* from that file.
A second way of starting the interpreter is ``python -c command [arg] ...``,
which executes the statement(s) in *command*, analogous to the shell's
:option:`-c` option. Since Python statements often contain spaces or other
-characters that are special to the shell, it is best to quote *command* in its
-entirety with double quotes.
+characters that are special to the shell, it is usually advised to quote
+*command* in its entirety with single quotes.
Some Python modules are also useful as scripts. These can be invoked using
``python -m module [arg] ...``, which executes the source file for *module* as