]> granicus.if.org Git - python/commitdiff
Be more consistent, both internally and with recommended practice.
authorFred Drake <fdrake@acm.org>
Fri, 26 Apr 2002 20:44:14 +0000 (20:44 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 26 Apr 2002 20:44:14 +0000 (20:44 +0000)
This closes SF bug #547953.

Doc/lib/libcgi.tex

index 4ce4f5c3fb6f69ee5a8dbf7a171ac4bb01983e5b..2f590a87f4e8a1d6ecd6fb5f8813d7ea5a92d620 100644 (file)
@@ -135,16 +135,14 @@ instance but a list of such instances.  Similarly, in this situation,
 \samp{form.getvalue(\var{key})} would return a list of strings.
 If you expect this possibility
 (when your HTML form contains multiple fields with the same name), use
-the \function{type()} built-in function to determine whether you
+the \function{isinstance()} built-in function to determine whether you
 have a single instance or a list of instances.  For example, this
 code concatenates any number of username fields, separated by
 commas:
 
 \begin{verbatim}
-from types import ListType
-
 value = form.getvalue("username", "")
-if isinstance(value, ListType):
+if isinstance(value, list):
     # Multiple username fields specified
     usernames = ",".join(value)
 else: