diff options
author | Raymond Hettinger <python@rcn.com> | 2017-02-06 07:15:57 -0800 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2017-02-06 07:15:57 -0800 |
commit | 826745ba953b4ef23462fb0bc2d7b3db23b51d89 (patch) | |
tree | 7789cc87df07c2786c40e6888cbb532a94ce6334 /Lib/urllib/parse.py | |
parent | 95b272b4e0d5438a12702e51e05d03f5a5a8e505 (diff) | |
parent | 515f1cf20f4e9656b1bcda236bad8ed0e33770f0 (diff) | |
download | cpython-826745ba953b4ef23462fb0bc2d7b3db23b51d89.tar.gz |
merge
Diffstat (limited to 'Lib/urllib/parse.py')
-rw-r--r-- | Lib/urllib/parse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py index 958767a08d..1d08730a89 100644 --- a/Lib/urllib/parse.py +++ b/Lib/urllib/parse.py @@ -574,7 +574,7 @@ def unquote_to_bytes(string): # if the function is never called global _hextobyte if _hextobyte is None: - _hextobyte = {(a + b).encode(): bytes([int(a + b, 16)]) + _hextobyte = {(a + b).encode(): bytes.fromhex(a + b) for a in _hexdig for b in _hexdig} for item in bits[1:]: try: |