summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorandrei kulakov <andrei.avk@gmail.com>2021-08-03 11:28:09 (GMT)
committerGitHub <noreply@github.com>2021-08-03 11:28:09 (GMT)
commitf7c23a99cd4f8179b6ba2cffaeb78b852c0f6488 (patch)
tree61c03bd4933577ceab07e782693d54fcfa9a7458 /Doc/library
parent8c9f847997196aa76500d1ae104cbe7fe2a467ed (diff)
downloadcpython-f7c23a99cd4f8179b6ba2cffaeb78b852c0f6488.zip
cpython-f7c23a99cd4f8179b6ba2cffaeb78b852c0f6488.tar.gz
cpython-f7c23a99cd4f8179b6ba2cffaeb78b852c0f6488.tar.bz2
bpo-41737: expand doc for NotADirectoryError (GH-27471)
Diffstat (limited to 'Doc/library')
-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 0a5037a..669979f 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