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.15:26:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Really? It's not obvious that finding a file would involve directory operations?

Not in some senses, and that's possibly why Windows does not raise NotADirectoryError in such case.

I agree that it's a platform-specific implementation detail. However, there are lots of platform-specific implementation details written in documentation elsewhere already, especially OS related modules such as os and os.path. I don't think mentioning platform-specific implementation details for subclasses of OSError would be any less reasonable than that.

Adding such notice for NotADirectoryError helps people who want a EAFP style code for nonexistent file by preventing them getting trapped writing a cross-platform code.
Date User Action Args
2020-10-20 15:26:54danny87105setrecipients: + danny87105, eryksun, iritkatriel
2020-10-20 15:26:54danny87105setmessageid: <>
2020-10-20 15:26:54danny87105linkissue41737 messages
2020-10-20 15:26:54danny87105create