We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c83d003 commit 3ec0a4bCopy full SHA for 3ec0a4b
Lib/urllib/parse.py
@@ -131,7 +131,7 @@ def _coerce_args(*args):
131
else:
132
if isinstance(arg, str) != str_input:
133
raise TypeError("Cannot mix str and non-str arguments")
134
- if not hasattr(arg, 'decode'):
+ elif not hasattr(arg, 'decode'):
135
if arg:
136
raise TypeError(f"Expected a string or bytes object: got {type(arg)}")
137
0 commit comments