[Python-checkins] python/dist/src/Doc/lib libcgi.tex,1.35,1.36

fdrake@sourceforge.net fdrake@sourceforge.net
Fri, 26 Apr 2002 13:44:16 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv10747/lib

Modified Files:
	libcgi.tex 
Log Message:
Be more consistent, both internally and with recommended practice.
This closes SF bug #547953.


Index: libcgi.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgi.tex,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** libcgi.tex	20 Dec 2001 17:13:09 -0000	1.35
--- libcgi.tex	26 Apr 2002 20:44:14 -0000	1.36
***************
*** 136,140 ****
  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
  have a single instance or a list of instances.  For example, this
  code concatenates any number of username fields, separated by
--- 136,140 ----
  If you expect this possibility
  (when your HTML form contains multiple fields with the same name), use
! 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
***************
*** 142,149 ****
  
  \begin{verbatim}
- from types import ListType
- 
  value = form.getvalue("username", "")
! if isinstance(value, ListType):
      # Multiple username fields specified
      usernames = ",".join(value)
--- 142,147 ----
  
  \begin{verbatim}
  value = form.getvalue("username", "")
! if isinstance(value, list):
      # Multiple username fields specified
      usernames = ",".join(value)