summaryrefslogtreecommitdiffstats
path: root/Lib/pathlib.py
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2022-11-09 22:05:07 (GMT)
committerGitHub <noreply@github.com>2022-11-09 22:05:07 (GMT)
commit87f5180cd79617223ac513e9f45933f774134e32 (patch)
treeeefb10c8e390f0c236916e0cbec986a3d7515c7a /Lib/pathlib.py
parent283ab0e1c002f2d7459d581df6b4b8599e7d1a4d (diff)
downloadcpython-87f5180cd79617223ac513e9f45933f774134e32.zip
cpython-87f5180cd79617223ac513e9f45933f774134e32.tar.gz
cpython-87f5180cd79617223ac513e9f45933f774134e32.tar.bz2
gh-98832: Change wording in docstring of `pathlib.Path.iterdir` (GH-98833)
Found while working on https://github.com/python/cpython/issues/98829 Automerge-Triggered-By: GH:AlexWaygood
Diffstat (limited to 'Lib/pathlib.py')
-rw-r--r--Lib/pathlib.py6
1 files changed, 4 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)