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
eda29f47
Commit
eda29f47
authored
Jun 29, 2012
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urllib.parse cleanup. rename keywords used as variables
parent
b8b6a68b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Lib/urllib/parse.py
Lib/urllib/parse.py
+7
-7
No files found.
Lib/urllib/parse.py
View file @
eda29f47
...
...
@@ -279,8 +279,8 @@ def urlparse(url, scheme='', allow_fragments=True):
Note that we don't break the components up in smaller bits
(e.g. netloc is a single string) and we don't expand % escapes."""
url
,
scheme
,
_coerce_result
=
_coerce_args
(
url
,
scheme
)
tuple
=
urlsplit
(
url
,
scheme
,
allow_fragments
)
scheme
,
netloc
,
url
,
query
,
fragment
=
tuple
splitresult
=
urlsplit
(
url
,
scheme
,
allow_fragments
)
scheme
,
netloc
,
url
,
query
,
fragment
=
splitresult
if
scheme
in
uses_params
and
';'
in
url
:
url
,
params
=
_splitparams
(
url
)
else
:
...
...
@@ -547,15 +547,15 @@ def parse_qs(qs, keep_blank_values=False, strict_parsing=False,
encoding and errors: specify how to decode percent-encoded sequences
into Unicode characters, as accepted by the bytes.decode() method.
"""
dic
t
=
{}
parsed_resul
t
=
{}
pairs
=
parse_qsl
(
qs
,
keep_blank_values
,
strict_parsing
,
encoding
=
encoding
,
errors
=
errors
)
for
name
,
value
in
pairs
:
if
name
in
dic
t
:
dic
t
[
name
].
append
(
value
)
if
name
in
parsed_resul
t
:
parsed_resul
t
[
name
].
append
(
value
)
else
:
dic
t
[
name
]
=
[
value
]
return
dic
t
parsed_resul
t
[
name
]
=
[
value
]
return
parsed_resul
t
def
parse_qsl
(
qs
,
keep_blank_values
=
False
,
strict_parsing
=
False
,
encoding
=
'utf-8'
,
errors
=
'replace'
):
...
...
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