Refs #30485 -- Avoided unnecessary instance checks in urlencode.
Given doseq defaults to False it should avoid an unnecessary instance check in most cases.
This commit is contained in:
parent
b6c4766f53
commit
df46b329e0
|
@ -116,7 +116,7 @@ def urlencode(query, doseq=False):
|
|||
'Cannot encode None in a query string. Did you mean to pass '
|
||||
'an empty string or omit the value?'
|
||||
)
|
||||
elif isinstance(value, (str, bytes)) or not doseq:
|
||||
elif not doseq or isinstance(value, (str, bytes)):
|
||||
query_val = value
|
||||
else:
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue