Message379141
> 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:54 | danny87105 | set | recipients:
+ danny87105, eryksun, iritkatriel |
2020-10-20 15:26:54 | danny87105 | set | messageid: <1603207614.73.0.714475822959.issue41737@roundup.psfhosted.org> |
2020-10-20 15:26:54 | danny87105 | link | issue41737 messages |
2020-10-20 15:26:54 | danny87105 | create | |
|