aboutsummaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>2021-02-16 01:00:20 +0800
committerGitHub <noreply@github.com>2021-02-15 09:00:20 -0800
commita2f0654b0a5b4c4f726155620002cc1f5f2d206a (patch)
tree52779bb7707f1c778e1f547656307a13020eaeee /Lib
parentbpo-43181: Convert PyObject_TypeCheck to static inline function (GH-24533) (diff)
downloadcpython-a2f0654b0a5b4c4f726155620002cc1f5f2d206a.tar.gz
cpython-a2f0654b0a5b4c4f726155620002cc1f5f2d206a.tar.bz2
cpython-a2f0654b0a5b4c4f726155620002cc1f5f2d206a.zip
bpo-42967: Fix urllib.parse docs and make logic clearer (GH-24536)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/urllib/parse.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
index 5bd067895bf..335e183498d 100644
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -734,8 +734,7 @@ def parse_qsl(qs, keep_blank_values=False, strict_parsing=False,
"""
qs, _coerce_result = _coerce_args(qs)
- if not separator or (not isinstance(separator, str)
- and not isinstance(separator, bytes)):
+ if not separator or (not isinstance(separator, (str, bytes))):
raise ValueError("Separator must be of type string or bytes.")
# If max_num_fields is defined then check that the number of fields