@@ -384,9 +384,9 @@ def urlparse(url, scheme='', allow_fragments=True):
384384 Note that % escapes are not expanded.
385385 """
386386 if not isinstance (url , (str , bytes , bytearray )):
387- raise TypeError (f'Expected string or bytes: got { type (url )} ' )
387+ raise TypeError (f'Expected a string or bytes object : got { type (url )} ' )
388388 if not isinstance (scheme , (str , bytes , bytearray )):
389- raise TypeError (f'Expected string or bytes: got { type (scheme )} ' )
389+ raise TypeError (f'Expected a string or bytes object : got { type (scheme )} ' )
390390 url , scheme , _coerce_result = _coerce_args (url , scheme )
391391 splitresult = urlsplit (url , scheme , allow_fragments )
392392 scheme , netloc , url , query , fragment = splitresult
@@ -456,9 +456,9 @@ def urlsplit(url, scheme='', allow_fragments=True):
456456 Note that % escapes are not expanded.
457457 """
458458 if not isinstance (url , (str , bytes , bytearray )):
459- raise TypeError (f'Expected string or bytes: got { type (url )} ' )
459+ raise TypeError (f'Expected a string or bytes object : got { type (url )} ' )
460460 if not isinstance (scheme , (str , bytes , bytearray )):
461- raise TypeError (f'Expected string or bytes: got { type (scheme )} ' )
461+ raise TypeError (f'Expected a string or bytes object : got { type (scheme )} ' )
462462
463463 url , scheme , _coerce_result = _coerce_args (url , scheme )
464464
@@ -523,9 +523,9 @@ def urljoin(base, url, allow_fragments=True):
523523 """Join a base URL and a possibly relative URL to form an absolute
524524 interpretation of the latter."""
525525 if not isinstance (base , (str , bytes , bytearray )):
526- raise TypeError (f'Expected string or bytes: got { type (base )} ' )
526+ raise TypeError (f'Expected a string or bytes object : got { type (base )} ' )
527527 if not isinstance (url , (str , bytes , bytearray )):
528- raise TypeError (f'Expected string or bytes: got { type (url )} ' )
528+ raise TypeError (f'Expected a string or bytes object : got { type (url )} ' )
529529
530530 if not base :
531531 return url
0 commit comments