From 061d79e988d2ff6e044f8051c0615851272c0869 Mon Sep 17 00:00:00 2001 From: Jason Nader Date: Sun, 1 Mar 2020 19:35:05 +0900 Subject: [PATCH 1/3] pathlib.Path.stat(): document return type --- Doc/library/pathlib.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index 5906a33bdea118..f7d3c2019c9839 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -687,6 +687,7 @@ call fails (for example because the path doesn't exist). Return information about this path (similarly to :func:`os.stat`). The result is looked up at each call to this method. + Return a :class:`os.stat_result` object. :: From 9104f70bc591d3e87a1354eb31da04a2c4ab1c57 Mon Sep 17 00:00:00 2001 From: Jason Nader Date: Sun, 1 Mar 2020 19:35:16 +0900 Subject: [PATCH 2/3] pathlib.Path.stat(): reword part about os.stat() --- Doc/library/pathlib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index f7d3c2019c9839..50f4b9995ea188 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -685,7 +685,7 @@ call fails (for example because the path doesn't exist). .. method:: Path.stat() - Return information about this path (similarly to :func:`os.stat`). + Return information about this path, like :func:`os.stat`. The result is looked up at each call to this method. Return a :class:`os.stat_result` object. From 17f2662535de1afad3970cdf23a91e11deb6d5b2 Mon Sep 17 00:00:00 2001 From: Jason Nader Date: Sun, 1 Mar 2020 23:35:45 +0900 Subject: [PATCH 3/3] Reword it to be more concise --- Doc/library/pathlib.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index 50f4b9995ea188..7c0ffd50e2c794 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -685,9 +685,8 @@ call fails (for example because the path doesn't exist). .. method:: Path.stat() - Return information about this path, like :func:`os.stat`. + Return a :class:`os.stat_result` object containing information about this path, like :func:`os.stat`. The result is looked up at each call to this method. - Return a :class:`os.stat_result` object. ::