mirror of https://github.com/python/cpython
Clarify the os.fspath() documentation.
This commit is contained in:
parent
b4f43e90d9
commit
0fa1aa1975
|
@ -188,11 +188,12 @@ process and user.
|
||||||
|
|
||||||
.. function:: fspath(path)
|
.. function:: fspath(path)
|
||||||
|
|
||||||
Return the string representation of the path.
|
Return the file system representation of the path.
|
||||||
|
|
||||||
If :class:`str` or :class:`bytes` is passed in, it is returned unchanged;
|
If :class:`str` or :class:`bytes` is passed in, it is returned unchanged;
|
||||||
otherwise, the result of calling ``type(path).__fspath__`` is returned, or an
|
otherwise, the result of calling ``type(path).__fspath__`` is returned
|
||||||
exception is raised.
|
(which is represented by :class:`os.PathLike`). All other types raise a
|
||||||
|
:exc:`TypeError`.
|
||||||
|
|
||||||
|
|
||||||
.. function:: getenv(key, default=None)
|
.. function:: getenv(key, default=None)
|
||||||
|
|
Loading…
Reference in New Issue