Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,10 @@ call fails (for example because the path doesn't exist).
>>> Path.home()
PosixPath('/home/antoine')

Note that unlike :func:`os.path.expanduser`, on Posix systems a
:exc:`KeyError` or :exc:`RuntimeError` will be raised, and on Windows systems a
:exc:`RuntimeError` will be raised if home directory can't be resolved.

.. versionadded:: 3.5


Expand Down Expand Up @@ -764,6 +768,10 @@ call fails (for example because the path doesn't exist).
>>> p.expanduser()
PosixPath('/home/eric/films/Monty Python')

Note that unlike :func:`os.path.expanduser`, on Posix systems a
:exc:`KeyError` or :exc:`RuntimeError` will be raised, and on Windows systems a
:exc:`RuntimeError` will be raised if home directory can't be resolved.

.. versionadded:: 3.5


Expand Down