diff --git a/Lib/pathlib/_abc.py b/Lib/pathlib/_abc.py index 370c5749f74ea4..0b31dcd11d74a5 100644 --- a/Lib/pathlib/_abc.py +++ b/Lib/pathlib/_abc.py @@ -641,7 +641,7 @@ def write_text(self, data, encoding=None, errors=None, newline=None): return f.write(data) def _scandir(self): - """Yield os.DirEntry objects of the directory contents. + """Yield os.DirEntry-like objects of the directory contents. The children are yielded in arbitrary order, and the special entries '.' and '..' are not included. diff --git a/Lib/pathlib/_local.py b/Lib/pathlib/_local.py index aab117e5c2de98..4e24cfe2c93b42 100644 --- a/Lib/pathlib/_local.py +++ b/Lib/pathlib/_local.py @@ -628,7 +628,7 @@ def _filter_trailing_slash(self, paths): yield path_str def _scandir(self): - """Yield os.DirEntry objects of the directory contents. + """Yield os.DirEntry-like objects of the directory contents. The children are yielded in arbitrary order, and the special entries '.' and '..' are not included.