Skip to content
Open
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
10 changes: 7 additions & 3 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,14 @@ we also call *flavours*:
>>> PurePath(Path('foo'), Path('bar'))
PurePosixPath('foo/bar')

When *pathsegments* is empty, the current directory is assumed::
When *pathsegments* is empty or a single empty string,
the current directory is assumed::

>>> PurePath()
PurePosixPath('.')
>>> PurePath(), PurePath('')
(PurePosixPath('.'), PurePosixPath('.'))

The boolean value of either expression is True.
This differs from ``os.path.exists("")``, which returns ``False``.

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