summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorDennis Sweeney <36520290+sweeneyde@users.noreply.github.com>2022-08-31 01:39:51 (GMT)
committerGitHub <noreply@github.com>2022-08-31 01:39:51 (GMT)
commit8ba22b90cafdf83d26318905a021311c6932d2c0 (patch)
treec739863823f4311aedcd635909ba6af7f00692c1 /Lib
parent88671a9d6916229badc8b97a358a0f596f5aa0a1 (diff)
downloadcpython-8ba22b90cafdf83d26318905a021311c6932d2c0.zip
cpython-8ba22b90cafdf83d26318905a021311c6932d2c0.tar.gz
cpython-8ba22b90cafdf83d26318905a021311c6932d2c0.tar.bz2
gh-95865: Speed up urllib.parse.quote_from_bytes() (GH-95872)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/urllib/parse.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
index fd6d9f4..f25c770 100644
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -906,7 +906,7 @@ def quote_from_bytes(bs, safe='/'):
if not bs.rstrip(_ALWAYS_SAFE_BYTES + safe):
return bs.decode()
quoter = _byte_quoter_factory(safe)
- return ''.join([quoter(char) for char in bs])
+ return ''.join(map(quoter, bs))
def urlencode(query, doseq=False, safe='', encoding=None, errors=None,
quote_via=quote_plus):