summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/controlflow.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tutorial/controlflow.rst')
-rw-r--r--Doc/tutorial/controlflow.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index ebd531e..ce47164 100644
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -210,7 +210,7 @@ boundary::
... """Print a Fibonacci series up to n."""
... a, b = 0, 1
... while b < n:
- ... print(b,end=' ')
+ ... print(b, end=' ')
... a, b = b, a+b
... print()
...
@@ -389,7 +389,7 @@ Functions can also be called using keyword arguments of the form ``keyword =
value``. For instance, the following function::
def parrot(voltage, state='a stiff', action='voom', type='Norwegian Blue'):
- print("-- This parrot wouldn't", action, end= ' ')
+ print("-- This parrot wouldn't", action, end=' ')
print("if you put", voltage, "volts through it.")
print("-- Lovely plumage, the", type)
print("-- It's", state, "!")
@@ -481,7 +481,7 @@ Normally, these ``variadic`` arguments will be last in the list of formal
parameters, because they scoop up all remaining input arguments that are
passed to the function. Any formal parameters which occur after the ``*args``
parameter are 'keyword-only' arguments, meaning that they can only be used as
-keywords rather than positional arguments.::
+keywords rather than positional arguments. ::
>>> def concat(*args, sep="/"):
... return sep.join(args)
@@ -513,7 +513,7 @@ In the same fashion, dictionaries can deliver keyword arguments with the ``**``\
-operator::
>>> def parrot(voltage, state='a stiff', action='voom'):
- ... print("-- This parrot wouldn't", action,end=' ')
+ ... print("-- This parrot wouldn't", action, end=' ')
... print("if you put", voltage, "volts through it.", end=' ')
... print("E's", state, "!")
...