We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa9c3ee commit 003dd99Copy full SHA for 003dd99
Doc/library/pathlib.rst
@@ -136,6 +136,14 @@ we also call *flavours*:
136
>>> PurePath()
137
PurePosixPath('.')
138
139
+ An empty string in *pathsegments* also refers to the current directory.
140
+ This means that ``PurePath("")`` is equivalent to ``PurePath(".")``,
141
+ and consequently ``Path("").exists()`` will always return ``True``. This
142
+ differs from ``os.path.exists("")``, which returns ``False``.
143
+
144
+ >>> PurePath("")
145
+ PurePosixPath('.')
146
147
If a segment is an absolute path, all previous segments are ignored
148
(like :func:`os.path.join`)::
149
0 commit comments