diff Doc/lib/libcgi.tex @ 31416:a15115290e13 2.3

fix method name in example code
author Fred Drake <fdrake@acm.org>
date Fri, 23 Jan 2004 04:08:14 +0000
parents fe9a5a2dd2c1
children 91388c845b16
line wrap: on
line diff
--- a/Doc/lib/libcgi.tex	Wed Jan 21 18:31:16 2004 +0000
+++ b/Doc/lib/libcgi.tex	Fri Jan 23 04:08:14 2004 +0000
@@ -225,7 +225,7 @@
 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 @@
 \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}