Skip to content

Commit 87f5180

Browse files
authored
gh-98832: Change wording in docstring of pathlib.Path.iterdir (GH-98833)
Found while working on #98829 Automerge-Triggered-By: GH:AlexWaygood
1 parent 283ab0e commit 87f5180

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Lib/pathlib.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,10 @@ def samefile(self, other_path):
867867
return os.path.samestat(st, other_st)
868868

869869
def iterdir(self):
870-
"""Iterate over the files in this directory. Does not yield any
871-
result for the special paths '.' and '..'.
870+
"""Yield path objects of the directory contents.
871+
872+
The children are yielded in arbitrary order, and the
873+
special entries '.' and '..' are not included.
872874
"""
873875
for name in os.listdir(self):
874876
yield self._make_child_relpath(name)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Changes wording of docstring for :func:`pathlib.Path.iterdir`.

0 commit comments

Comments
 (0)