summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-08-03 12:05:04 (GMT)
committerGitHub <noreply@github.com>2021-08-03 12:05:04 (GMT)
commit84494db41902774ea6ac72e5b308b429850bbf71 (patch)
tree33690d4dc7cca4d0fddfa17ae596de65ac0c073a
parent8ce7f2f4ef04e19209f1dfd2a0cf50ddcd0e999f (diff)
downloadcpython-84494db41902774ea6ac72e5b308b429850bbf71.zip
cpython-84494db41902774ea6ac72e5b308b429850bbf71.tar.gz
cpython-84494db41902774ea6ac72e5b308b429850bbf71.tar.bz2
bpo-41737: expand doc for NotADirectoryError (GH-27471)
(cherry picked from commit f7c23a99cd4f8179b6ba2cffaeb78b852c0f6488) Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
-rw-r--r--Doc/library/exceptions.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index d5d81df..0e60636 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