@@ -131,10 +131,11 @@ we also call *flavours*:
131131 >>> PurePath(Path('foo'), Path('bar'))
132132 PurePosixPath('foo/bar')
133133
134- When *pathsegments * is empty, the current directory is assumed::
134+ When *pathsegments * is empty or consists only of empty strings,
135+ the current directory is assumed::
135136
136- >>> PurePath()
137- PurePosixPath('.')
137+ >>> PurePath(), PurePath('')
138+ ( PurePosixPath('.'), PurePosixPath('.') )
138139
139140 If a segment is an absolute path, all previous segments are ignored
140141 (like :func: `os.path.join `)::
@@ -1040,15 +1041,17 @@ Querying file type and status
10401041
10411042.. method :: Path.exists(*, follow_symlinks=True)
10421043
1043- Return ``True `` if the path points to an existing file or directory.
1044- ``False `` will be returned if the path is invalid, inaccessible or missing.
1044+ Return ``True `` if the path points to an existing file or directory and
1045+ ``False `` if the path is invalid, inaccessible or missing.
10451046 Use :meth: `Path.stat ` to distinguish between these cases.
10461047
10471048 This method normally follows symlinks; to check if a symlink exists, add
10481049 the argument ``follow_symlinks=False ``.
10491050
10501051 ::
10511052
1053+ >>> Path('').exists() # The current directory.
1054+ True
10521055 >>> Path('.').exists()
10531056 True
10541057 >>> Path('setup.py').exists()
0 commit comments