summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/stdlib.rst
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-31 03:25:11 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-31 03:25:11 (GMT)
commit0616b792ba4115fe3bb79c446c2c6383db434490 (patch)
tree5a6c2a06d6c8aa125c0fb4fcb278020b6c585e12 /Doc/tutorial/stdlib.rst
parent8b2af27dae7c80218c9912052ac1b4c6144ce746 (diff)
downloadcpython-0616b792ba4115fe3bb79c446c2c6383db434490.zip
cpython-0616b792ba4115fe3bb79c446c2c6383db434490.tar.gz
cpython-0616b792ba4115fe3bb79c446c2c6383db434490.tar.bz2
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.
Diffstat (limited to 'Doc/tutorial/stdlib.rst')
-rw-r--r--Doc/tutorial/stdlib.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/tutorial/stdlib.rst b/Doc/tutorial/stdlib.rst
index dcd6659..a474975 100644
--- a/Doc/tutorial/stdlib.rst
+++ b/Doc/tutorial/stdlib.rst
@@ -67,7 +67,7 @@ instance the following output results from running ``python demo.py one two
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 @@ The :mod:`random` module provides tools for making random selections::
>>> 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 @@ and :mod:`smtplib` for sending mail::
>>> 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 @@ documentation::
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)