Message352084
> Python's code base never specifically handles ENOTEMPTY.
Right, so this use case looks artificial to me.
> On the other hand, in terms of basic operations on files and directories, I think implementing DirectoryNotEmptyError follows naturally from the existing set: FileNotFoundError, FileExistsError, NotADirectoryError, and IsADirectoryError.
Again, I consider that we must not add one exception per errno, since the Python errno module contains 133 error codes on Linux. Many are very rare and don't deserve to add a new symbol to the builtins module.
I suggest to close this issue.
If later someone wants to get DirectoryNotEmptyError, please open a new issue with statistics of how many 3rd party projects use ENOTEMPTY. |
|
Date |
User |
Action |
Args |
2019-09-12 09:50:46 | vstinner | set | recipients:
+ vstinner, barry, pitrou, eryksun, nanjekyejoannah |
2019-09-12 09:50:46 | vstinner | set | messageid: <1568281846.37.0.13968232377.issue32847@roundup.psfhosted.org> |
2019-09-12 09:50:46 | vstinner | link | issue32847 messages |
2019-09-12 09:50:46 | vstinner | create | |
|