[Python-checkins] bpo-41737: expand doc for NotADirectoryError (GH-27471)
webhook-mailer at python.org
Tue Aug 3 07:28:23 EDT 2021
author: andrei kulakov <andrei.avk at gmail.com>
committer: ambv <lukasz at langa.pl>
bpo-41737: expand doc for NotADirectoryError (GH-27471)
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index 0a5037a4b2106..669979f7c5d5d 100644
@@ -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