mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-42967: Fix urllib.parse docs and make logic clearer (GH-24536)
This commit is contained in:
parent
4bb2a1ebc5
commit
a2f0654b0a
5 changed files with 19 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue