Skip to content

Commit

Permalink
gh-98832: Change wording in docstring of pathlib.Path.iterdir (GH-9…
Browse files Browse the repository at this point in the history
…8833)

Found while working on #98829

Automerge-Triggered-By: GH:AlexWaygood
  • Loading branch information
sobolevn committed Nov 9, 2022
1 parent 283ab0e commit 87f5180
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,10 @@ def samefile(self, other_path):
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)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Changes wording of docstring for :func:`pathlib.Path.iterdir`.

0 comments on commit 87f5180

Please sign in to comment.