diff Doc/tutorial/stdlib.rst @ 43115:95d6fe2e8e0e

Tutorial update for 3.0 by Paul Dubois. I had to fix a few markup issues in controlflow.rst and modules.rst. There's a unicode issue on line 448 in introduction.rst that someone else needs to fix.
author Guido van Rossum <guido@python.org>
date Fri, 31 Aug 2007 03:25:11 +0000
parents 74446509f0f2
children 38604fa2a48f
line wrap: on
line diff
--- a/Doc/tutorial/stdlib.rst	Fri Aug 31 03:04:26 2007 +0000
+++ b/Doc/tutorial/stdlib.rst	Fri Aug 31 03:25:11 2007 +0000
@@ -67,7 +67,7 @@
 three`` at the command line::
 
    >>> import sys
-   >>> print sys.argv
+   >>> print(sys.argv)
    ['demo.py', 'one', 'two', 'three']
 
 The :mod:`getopt` module processes *sys.argv* using the conventions of the Unix
@@ -138,6 +138,8 @@
    >>> random.randrange(6)    # random integer chosen from range(6)
    4   
 
+The SciPy project <http://scipy.org> has many other modules for numerical
+computations.
 
 .. _tut-internet-access:
 
@@ -151,7 +153,7 @@
    >>> import urllib2
    >>> for line in urllib2.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl'):
    ...     if 'EST' in line or 'EDT' in line:  # look for Eastern Time
-   ...         print line
+   ...         print(line)
 
    <BR>Nov. 25, 09:43:32 PM EST
 
@@ -259,7 +261,7 @@
    def average(values):
        """Computes the arithmetic mean of a list of numbers.
 
-       >>> print average([20, 30, 70])
+       >>> print(average([20, 30, 70]))
        40.0
        """
        return sum(values, 0.0) / len(values)