[Python-checkins] bpo-41737: expand doc for NotADirectoryError (GH-27471)

miss-islington webhook-mailer at python.org
Tue Aug 3 08:05:09 EDT 2021


https://github.com/python/cpython/commit/84494db41902774ea6ac72e5b308b429850bbf71
commit: 84494db41902774ea6ac72e5b308b429850bbf71
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-08-03T05:05:04-07:00
summary:

bpo-41737: expand doc for NotADirectoryError (GH-27471)

(cherry picked from commit f7c23a99cd4f8179b6ba2cffaeb78b852c0f6488)

Co-authored-by: andrei kulakov <andrei.avk at gmail.com>

files:
M Doc/library/exceptions.rst

diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index d5d81dfd9e638..0e606360efae1 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -690,8 +690,10 @@ depending on the system error code.
 
 .. exception:: NotADirectoryError
 
-   Raised when a directory operation (such as :func:`os.listdir`) is requested
-   on something which is not a directory.
+   Raised when a directory operation (such as :func:`os.listdir`) is requested on
+   something which is not a directory.  On most POSIX platforms, it may also be
+   raised if an operation attempts to open or traverse a non-directory file as if
+   it were a directory.
    Corresponds to :c:data:`errno` ``ENOTDIR``.
 
 .. exception:: PermissionError



More information about the Python-checkins mailing list