mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
bpo-43979: Remove unnecessary operation from urllib.parse.parse_qsl (GH-25756)
Automerge-Triggered-By: GH:gpshead
This commit is contained in:
parent
6689e45dfe
commit
6143fcdf8b
2 changed files with 3 additions and 2 deletions
|
@ -752,9 +752,8 @@ def parse_qsl(qs, keep_blank_values=False, strict_parsing=False,
|
||||||
if max_num_fields < num_fields:
|
if max_num_fields < num_fields:
|
||||||
raise ValueError('Max number of fields exceeded')
|
raise ValueError('Max number of fields exceeded')
|
||||||
|
|
||||||
pairs = [s1 for s1 in qs.split(separator)]
|
|
||||||
r = []
|
r = []
|
||||||
for name_value in pairs:
|
for name_value in qs.split(separator):
|
||||||
if not name_value and not strict_parsing:
|
if not name_value and not strict_parsing:
|
||||||
continue
|
continue
|
||||||
nv = name_value.split('=', 1)
|
nv = name_value.split('=', 1)
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Removed an unnecessary list comprehension before looping from
|
||||||
|
:func:`urllib.parse.parse_qsl`. Patch by Christoph Zwerschke and Dong-hee Na.
|
Loading…
Add table
Add a link
Reference in a new issue