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:
Simon Charette 2019-05-27 16:00:14 -04:00 committed by Mariusz Felisiak
parent b6c4766f53
commit df46b329e0
1 changed files with 1 additions and 1 deletions

View File

@ -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: