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
c96164ac
Commit
c96164ac
authored
Feb 04, 2008
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove one use of UserDict.UserDict
parent
50dd1f92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
Lib/cgi.py
Lib/cgi.py
+11
-2
No files found.
Lib/cgi.py
View file @
c96164ac
...
@@ -40,7 +40,7 @@ import os
...
@@ -40,7 +40,7 @@ import os
import
urllib
import
urllib
import
mimetools
import
mimetools
import
rfc822
import
rfc822
import
UserDict
import
collections
from
io
import
StringIO
from
io
import
StringIO
__all__
=
[
"MiniFieldStorage"
,
"FieldStorage"
,
"FormContentDict"
,
__all__
=
[
"MiniFieldStorage"
,
"FieldStorage"
,
"FormContentDict"
,
...
@@ -781,7 +781,7 @@ class FieldStorage:
...
@@ -781,7 +781,7 @@ class FieldStorage:
# Backwards Compatibility Classes
# Backwards Compatibility Classes
# ===============================
# ===============================
class
FormContentDict
(
UserDict
.
UserDict
):
class
FormContentDict
(
collections
.
Mapping
):
"""Form content as dictionary with a list of values per field.
"""Form content as dictionary with a list of values per field.
form = FormContentDict()
form = FormContentDict()
...
@@ -800,6 +800,15 @@ class FormContentDict(UserDict.UserDict):
...
@@ -800,6 +800,15 @@ class FormContentDict(UserDict.UserDict):
strict_parsing
=
strict_parsing
)
strict_parsing
=
strict_parsing
)
self
.
query_string
=
environ
[
'QUERY_STRING'
]
self
.
query_string
=
environ
[
'QUERY_STRING'
]
def
__len__
(
self
):
return
len
(
self
.
dict
)
def
__iter__
(
self
):
return
iter
(
self
.
dict
)
def
__getitem__
(
self
,
key
):
return
self
.
dict
[
key
]
class
SvFormContentDict
(
FormContentDict
):
class
SvFormContentDict
(
FormContentDict
):
"""Form content as dictionary expecting a single value per field.
"""Form content as dictionary expecting a single value per field.
...
...
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