Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a7bb2b9b
Commit
a7bb2b9b
authored
Apr 26, 2002
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Be more consistent, both internally and with recommended practice.
This closes SF bug #547953.
parent
38f71973
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
Doc/lib/libcgi.tex
Doc/lib/libcgi.tex
+2
-4
No files found.
Doc/lib/libcgi.tex
View file @
a7bb2b9b
...
...
@@ -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
{
typ
e()
}
built-in function to determine whether you
the
\function
{
isinstanc
e()
}
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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment