summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.rst
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2016-06-02 22:06:09 (GMT)
committerEthan Furman <ethan@stoneleaf.us>2016-06-02 22:06:09 (GMT)
commitcdc0879d3a550ee7f339d149c451e2ebee1906f9 (patch)
treed2ee559bac76d8fae019310c2d5c96d0260fc24c /Doc/library/os.rst
parent1f56e5f6afa137300d655a40e00675195e0248fe (diff)
downloadcpython-cdc0879d3a550ee7f339d149c451e2ebee1906f9.zip
cpython-cdc0879d3a550ee7f339d149c451e2ebee1906f9.tar.gz
cpython-cdc0879d3a550ee7f339d149c451e2ebee1906f9.tar.bz2
issue27186 -- initial docs, tests, and python version of os.fspath
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r--Doc/library/os.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 1b0ad17..4ed01dd 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -186,6 +186,15 @@ process and user.
.. versionadded:: 3.2
+.. function:: fspath(path)
+
+ Return the string representation of the path.
+
+ 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
+ exception is raised.
+
+
.. function:: getenv(key, default=None)
Return the value of the environment variable *key* if it exists, or