Skip to content
Closed
Changes from all 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 @@ -136,6 +136,14 @@ we also call *flavours*:
>>> PurePath()
PurePosixPath('.')

An empty string in *pathsegments* also refers to the current directory.
This means that ``PurePath("")`` is equivalent to ``PurePath(".")``,
and consequently ``Path("").exists()`` will always return ``True``. This
differs from ``os.path.exists("")``, which returns ``False``.

>>> PurePath("")
PurePosixPath('.')
Comment thread
terryjreedy marked this conversation as resolved.

If a segment is an absolute path, all previous segments are ignored
(like :func:`os.path.join`)::

Expand Down
Loading