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 3ec0a4b commit 2bf57f3Copy full SHA for 2bf57f3
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
- elif not hasattr(arg, 'decode'):
+ elif str_input is False and not hasattr(arg, 'decode'):
135
if arg:
136
raise TypeError(f"Expected a string or bytes object: got {type(arg)}")
137
0 commit comments