mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
issue27186 -- initial docs, tests, and python version of os.fspath
This commit is contained in:
parent
1f56e5f6af
commit
cdc0879d3a
3 changed files with 51 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue