Lines Matching refs:str
104 def _add(str, fn):
105 if (fn in _globals) and (str in _have_functions):
743 if not isinstance(value, str):
744 raise TypeError("str expected, not %s" % type(value).__name__)
747 decode = str
757 if not isinstance(value, str):
758 raise TypeError("str expected, not %s" % type(value).__name__)
776 key, default and the result are str."""
807 """Encode filename (an os.PathLike, bytes, or str) to the filesystem
813 if isinstance(filename, str):
819 """Decode filename (an os.PathLike, bytes, or str) from the filesystem
820 encoding with 'surrogateescape' error handler, return str unchanged. On
979 if not isinstance(cmd, str):
1039 If str or bytes is passed in, it is returned unchanged. Otherwise the
1041 path representation is not str or bytes, TypeError is raised. If the
1042 provided path is not str, bytes, or os.PathLike, TypeError is raised.
1044 if isinstance(path, (str, bytes)):
1056 raise TypeError("expected str, bytes or os.PathLike object, "
1058 if isinstance(path_repr, (str, bytes)):
1061 raise TypeError("expected {}.__fspath__() to return str or bytes, "