]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-98832: Change wording in docstring of `pathlib.Path.iterdir` (GH-98833)
authorNikita Sobolev <mail@sobolevn.me>
Wed, 9 Nov 2022 22:05:07 +0000 (01:05 +0300)
committerGitHub <noreply@github.com>
Wed, 9 Nov 2022 22:05:07 +0000 (14:05 -0800)
Found while working on https://github.com/python/cpython/issues/98829

Automerge-Triggered-By: GH:AlexWaygood
Lib/pathlib.py
Misc/NEWS.d/next/Documentation/2022-10-29-02-33-46.gh-issue-98832.DudEIH.rst [new file with mode: 0644]

index db1c7c9618efbe8a6b109022c4f94c82eb3153e0..068d1b02f484bff9e1296981d3cbd501eb68449f 100644 (file)
@@ -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 (file)
index 0000000..c4a4566
--- /dev/null
@@ -0,0 +1 @@
+Changes wording of docstring for :func:`pathlib.Path.iterdir`.