Author danny87105
Recipients danny87105, eryksun, iritkatriel
Date 2020-10-20.15:26:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1603207614.73.0.714475822959.issue41737@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2020-10-20 15:26:54danny87105setrecipients: + danny87105, eryksun, iritkatriel
2020-10-20 15:26:54danny87105setmessageid: <1603207614.73.0.714475822959.issue41737@roundup.psfhosted.org>
2020-10-20 15:26:54danny87105linkissue41737 messages
2020-10-20 15:26:54danny87105create