summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2004-01-23 04:05:27 (GMT)
committerFred Drake <fdrake@acm.org>2004-01-23 04:05:27 (GMT)
commit226f697560af74985ee5ecf2fc4f6b1c991006dc (patch)
tree394ca1428d1ae91cf8baacf75ec3494f2b385a37 /Doc/lib
parent7663729ec72f5ffe44b8e7f76bdb56d8663c5e6e (diff)
downloadcpython-226f697560af74985ee5ecf2fc4f6b1c991006dc.zip
cpython-226f697560af74985ee5ecf2fc4f6b1c991006dc.tar.gz
cpython-226f697560af74985ee5ecf2fc4f6b1c991006dc.tar.bz2
fix method name in example code
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libcgi.tex4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/lib/libcgi.tex b/Doc/lib/libcgi.tex
index add322d..a14717a 100644
--- a/Doc/lib/libcgi.tex
+++ b/Doc/lib/libcgi.tex
@@ -225,7 +225,7 @@ associated with this name. So you write a script containing for
example this code:
\begin{verbatim}
-user = form.getvalue("user").toupper()
+user = form.getvalue("user").upper()
\end{verbatim}
The problem with the code is that you should never expect that a
@@ -272,7 +272,7 @@ Using these methods you can write nice compact code:
\begin{verbatim}
import cgi
form = cgi.FieldStorage()
-user = form.getfirst("user", "").toupper() # This way it's safe.
+user = form.getfirst("user", "").upper() # This way it's safe.
for item in form.getlist("item"):
do_something(item)
\end{verbatim}