This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author danny87105
Recipients danny87105, eryksun, iritkatriel
Date 2020-10-20.14:36:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I don't think a general developer would expect that open('/path/to/file/somename.txt') implies a directory operation, and it also doesn't on Windows.

I suggest that a further notice be added to NotADirectoryError, such as:

    Raised when a directory operation (such as os.listdir()) is requested on something which is not a directory. Corresponds to errno ENOTDIR. In some filesystem such as POSIX, NotADirectoryError (ENOTDIR) is raised when attempting to open a path whose ancestor is not a directory.
Date User Action Args
2020-10-20 14:36:13danny87105setrecipients: + danny87105, eryksun, iritkatriel
2020-10-20 14:36:13danny87105setmessageid: <>
2020-10-20 14:36:13danny87105linkissue41737 messages
2020-10-20 14:36:13danny87105create