diff options
-rw-r--r-- | Lib/pathlib.py | 6 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Documentation/2022-10-29-02-33-46.gh-issue-98832.DudEIH.rst | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py index db1c7c9..068d1b0 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -867,8 +867,10 @@ class Path(PurePath): return os.path.samestat(st, other_st) def iterdir(self): - """Iterate over the files in this directory. Does not yield any - result for the special paths '.' and '..'. + """Yield path objects of the directory contents. + + The children are yielded in arbitrary order, and the + special entries '.' and '..' are not included. """ for name in os.listdir(self): yield self._make_child_relpath(name) diff --git a/Misc/NEWS.d/next/Documentation/2022-10-29-02-33-46.gh-issue-98832.DudEIH.rst b/Misc/NEWS.d/next/Documentation/2022-10-29-02-33-46.gh-issue-98832.DudEIH.rst new file mode 100644 index 0000000..c4a4566 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2022-10-29-02-33-46.gh-issue-98832.DudEIH.rst @@ -0,0 +1 @@ +Changes wording of docstring for :func:`pathlib.Path.iterdir`. |