Message392345
Just noticed the following code in urrlib.parse_qsl:
pairs = [s1 for s1 in qs.split(separator)]
for name_value in pairs:
...
see https://github.com/python/cpython/blob/088a15c49d99ecb4c3bef93f8f40dd513c6cae3b/Lib/urllib/parse.py#L755
This looks like an unnecessary list comprehension to me, probably a relic of earlier code that used a nested list comprehension for splitting with two different separators.
Can't we just do this instead now, which is faster and shorter?
for name_value qs.split(separator):
I can provide a PR if wanted. |
|
Date |
User |
Action |
Args |
2021-04-29 19:29:25 | cito | set | recipients:
+ cito |
2021-04-29 19:29:25 | cito | set | messageid: <1619724565.9.0.228522372223.issue43979@roundup.psfhosted.org> |
2021-04-29 19:29:25 | cito | link | issue43979 messages |
2021-04-29 19:29:25 | cito | create | |
|