Remove trailing whitespace.
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index 43f2c6d..48c7bcb 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -250,7 +250,7 @@
... def __init__(self, realpart, imagpart):
... self.r = realpart
... self.i = imagpart
- ...
+ ...
>>> x = Complex(3.0, -4.5)
>>> x.r, x.i
(3.0, -4.5)
@@ -481,7 +481,7 @@
``issubclass(unicode, str)`` is ``False`` since :class:`unicode` is not a
subclass of :class:`str` (they only share a common ancestor,
:class:`basestring`).
-
+
.. _tut-multiple:
@@ -743,7 +743,7 @@
f
l
o
- g
+ g
Anything that can be done with generators can also be done with class based
iterators as described in the previous section. What makes generators so
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index afc19e9..95a6ea4 100644
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -62,7 +62,7 @@
... a = ['cat', 'window', 'defenestrate']
>>> for x in a:
... print x, len(x)
- ...
+ ...
cat 3
window 6
defenestrate 12
@@ -75,7 +75,7 @@
>>> for x in a[:]: # make a slice copy of the entire list
... if len(x) > 6: a.insert(0, x)
- ...
+ ...
>>> a
['defenestrate', 'cat', 'window', 'defenestrate']
@@ -110,7 +110,7 @@
>>> a = ['Mary', 'had', 'a', 'little', 'lamb']
>>> for i in range(len(a)):
... print i, a[i]
- ...
+ ...
0 Mary
1 had
2 a
@@ -146,7 +146,7 @@
... else:
... # loop fell through without finding a factor
... print n, 'is a prime number'
- ...
+ ...
2 is a prime number
3 is a prime number
4 equals 2 * 2
@@ -167,7 +167,7 @@
>>> while True:
... pass # Busy-wait for keyboard interrupt (Ctrl+C)
- ...
+ ...
This is commonly used for creating minimal classes::
@@ -181,7 +181,7 @@
>>> def initlog(*args):
... pass # Remember to implement this!
- ...
+ ...
.. _tut-functions:
@@ -197,7 +197,7 @@
... while b < n:
... print b,
... a, b = b, a+b
- ...
+ ...
>>> # Now call the function we just defined:
... fib(2000)
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597
@@ -268,7 +268,7 @@
... result.append(b) # see below
... a, b = b, a+b
... return result
- ...
+ ...
>>> f100 = fib2(100) # call it
>>> f100 # write the result
[1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
@@ -403,7 +403,7 @@
>>> def function(a):
... pass
- ...
+ ...
>>> function(0, a=0)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
@@ -456,7 +456,7 @@
------------------------
.. index::
- statement: *
+ statement: *
Finally, the least frequently used option is to specify that a function can be
called with an arbitrary number of arguments. These arguments will be wrapped
@@ -565,11 +565,11 @@
>>> def my_function():
... """Do nothing, but document it.
- ...
+ ...
... No, really, it doesn't do anything.
... """
... pass
- ...
+ ...
>>> print my_function.__doc__
Do nothing, but document it.
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst
index fa71870..f7e7243 100644
--- a/Doc/tutorial/datastructures.rst
+++ b/Doc/tutorial/datastructures.rst
@@ -214,7 +214,7 @@
>>> def sum(seq):
... def add(x,y): return x+y
... return reduce(add, seq, 0)
- ...
+ ...
>>> sum(range(1, 11))
55
>>> sum([])
@@ -281,7 +281,7 @@
powerful tool but -- like all powerful tools -- they need to be used carefully,
if at all.
-Consider the following example of a 3x3 matrix held as a list containing three
+Consider the following example of a 3x3 matrix held as a list containing three
lists, one list per row::
>>> mat = [
@@ -290,7 +290,7 @@
... [7, 8, 9],
... ]
-Now, if you wanted to swap rows and columns, you could use a list
+Now, if you wanted to swap rows and columns, you could use a list
comprehension::
>>> print [[row[i] for row in mat] for i in [0, 1, 2]]
@@ -308,7 +308,7 @@
print row[i],
print
-In real world, you should prefer builtin functions to complex flow statements.
+In real world, you should prefer builtin functions to complex flow statements.
The :func:`zip` function would do a great job for this use case::
>>> zip(*mat)
@@ -551,7 +551,7 @@
>>> answers = ['lancelot', 'the holy grail', 'blue']
>>> for q, a in zip(questions, answers):
... print 'What is your {0}? It is {1}.'.format(q, a)
- ...
+ ...
What is your name? It is lancelot.
What is your quest? It is the holy grail.
What is your favorite color? It is blue.
@@ -574,7 +574,7 @@
>>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
>>> for f in sorted(set(basket)):
... print f
- ...
+ ...
apple
banana
orange
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index 1740396..e1d988c 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -91,7 +91,7 @@
... break
... except ValueError:
... print "Oops! That was no valid number. Try again..."
- ...
+ ...
The :keyword:`try` statement works as follows.
@@ -199,12 +199,12 @@
>>> def this_fails():
... x = 1/0
- ...
+ ...
>>> try:
... this_fails()
... except ZeroDivisionError as detail:
... print 'Handling run-time error:', detail
- ...
+ ...
Handling run-time error: integer division or modulo by zero
@@ -256,12 +256,12 @@
... self.value = value
... def __str__(self):
... return repr(self.value)
- ...
+ ...
>>> try:
... raise MyError(2*2)
... except MyError as e:
... print 'My exception occurred, value:', e.value
- ...
+ ...
My exception occurred, value: 4
>>> raise MyError, 'oops!'
Traceback (most recent call last):
@@ -331,7 +331,7 @@
... raise KeyboardInterrupt
... finally:
... print 'Goodbye, world!'
- ...
+ ...
Goodbye, world!
Traceback (most recent call last):
File "<stdin>", line 2, in ?
diff --git a/Doc/tutorial/index.rst b/Doc/tutorial/index.rst
index 3c0d91d..dfc6ac0 100644
--- a/Doc/tutorial/index.rst
+++ b/Doc/tutorial/index.rst
@@ -1,7 +1,7 @@
.. _tutorial-index:
######################
- The Python Tutorial
+ The Python Tutorial
######################
:Release: |version|
diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst
index ef783ae..34d984a 100644
--- a/Doc/tutorial/inputoutput.rst
+++ b/Doc/tutorial/inputoutput.rst
@@ -87,7 +87,7 @@
>>> for x in range(1,11):
... print '{0:2d} {1:3d} {2:4d}'.format(x, x*x, x*x*x)
- ...
+ ...
1 1 1
2 4 8
3 9 27
@@ -162,7 +162,7 @@
>>> table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 7678}
>>> for name, phone in table.items():
... print '{0:10} ==> {1:10d}'.format(name, phone)
- ...
+ ...
Jack ==> 4098
Dcab ==> 7678
Sjoerd ==> 4127
@@ -330,7 +330,7 @@
>>> f = open('/tmp/workfile', 'r+')
>>> f.write('0123456789abcdef')
>>> f.seek(5) # Go to the 6th byte in the file
- >>> f.read(1)
+ >>> f.read(1)
'5'
>>> f.seek(-3, 2) # Go to the 3rd byte before the end
>>> f.read(1)
diff --git a/Doc/tutorial/interpreter.rst b/Doc/tutorial/interpreter.rst
index 0ac7ee1..1511584 100644
--- a/Doc/tutorial/interpreter.rst
+++ b/Doc/tutorial/interpreter.rst
@@ -112,7 +112,7 @@
>>> the_world_is_flat = 1
>>> if the_world_is_flat:
... print "Be careful not to fall off!"
- ...
+ ...
Be careful not to fall off!
@@ -180,7 +180,7 @@
best way to do it is to put one more special comment line right after the ``#!``
line to define the source file encoding::
- # -*- coding: encoding -*-
+ # -*- coding: encoding -*-
With that declaration, all characters in the source file will be treated as
diff --git a/Doc/tutorial/introduction.rst b/Doc/tutorial/introduction.rst
index 797e531..99e82a3 100644
--- a/Doc/tutorial/introduction.rst
+++ b/Doc/tutorial/introduction.rst
@@ -84,7 +84,7 @@
>>> # try to access an undefined variable
... n
- Traceback (most recent call last):
+ Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'n' is not defined
@@ -219,14 +219,14 @@
they will be included in the string. ::
print """
- Usage: thingy [OPTIONS]
+ Usage: thingy [OPTIONS]
-h Display this usage message
-H hostname Hostname to connect to
"""
produces the following output::
- Usage: thingy [OPTIONS]
+ Usage: thingy [OPTIONS]
-h Display this usage message
-H hostname Hostname to connect to
@@ -350,10 +350,10 @@
Then the right edge of the last character of a string of *n* characters has
index *n*, for example::
- +---+---+---+---+---+
+ +---+---+---+---+---+
| H | e | l | p | A |
- +---+---+---+---+---+
- 0 1 2 3 4 5
+ +---+---+---+---+---+
+ 0 1 2 3 4 5
-5 -4 -3 -2 -1
The first row of numbers gives the position of the indices 0...5 in the string;
@@ -595,7 +595,7 @@
>>> while b < 10:
... print b
... a, b = b, a+b
- ...
+ ...
1
1
2
@@ -645,7 +645,7 @@
>>> while b < 1000:
... print b,
... a, b = b, a+b
- ...
+ ...
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
Note that the interpreter inserts a newline before it prints the next prompt if
diff --git a/Doc/tutorial/modules.rst b/Doc/tutorial/modules.rst
index 7a5af4f..f147cea 100644
--- a/Doc/tutorial/modules.rst
+++ b/Doc/tutorial/modules.rst
@@ -281,7 +281,7 @@
['__name__', 'fib', 'fib2']
>>> dir(sys)
['__displayhook__', '__doc__', '__excepthook__', '__name__', '__stderr__',
- '__stdin__', '__stdout__', '_getframe', 'api_version', 'argv',
+ '__stdin__', '__stdout__', '_getframe', 'api_version', 'argv',
'builtin_module_names', 'byteorder', 'callstats', 'copyright',
'displayhook', 'exc_clear', 'exc_info', 'exc_type', 'excepthook',
'exec_prefix', 'executable', 'exit', 'getdefaultencoding', 'getdlopenflags',
@@ -314,7 +314,7 @@
'FloatingPointError', 'FutureWarning', 'IOError', 'ImportError',
'IndentationError', 'IndexError', 'KeyError', 'KeyboardInterrupt',
'LookupError', 'MemoryError', 'NameError', 'None', 'NotImplemented',
- 'NotImplementedError', 'OSError', 'OverflowError',
+ 'NotImplementedError', 'OSError', 'OverflowError',
'PendingDeprecationWarning', 'ReferenceError', 'RuntimeError',
'RuntimeWarning', 'StandardError', 'StopIteration', 'SyntaxError',
'SyntaxWarning', 'SystemError', 'SystemExit', 'TabError', 'True',
diff --git a/Doc/tutorial/stdlib.rst b/Doc/tutorial/stdlib.rst
index 38e0871..8cd5d0a 100644
--- a/Doc/tutorial/stdlib.rst
+++ b/Doc/tutorial/stdlib.rst
@@ -136,7 +136,7 @@
>>> random.random() # random float
0.17970987693706186
>>> random.randrange(6) # random integer chosen from range(6)
- 4
+ 4
.. _tut-internet-access:
diff --git a/Doc/tutorial/whatnow.rst b/Doc/tutorial/whatnow.rst
index 43b5e83..157cc9f 100644
--- a/Doc/tutorial/whatnow.rst
+++ b/Doc/tutorial/whatnow.rst
@@ -63,6 +63,6 @@
.. Postings figure based on average of last six months activity as
reported by www.egroups.com; Jan. 2000 - June 2000: 21272 msgs / 182
- days = 116.9 msgs / day and steadily increasing. (XXX up to date figures?)
+ days = 116.9 msgs / day and steadily increasing. (XXX up to date figures?)