STINNER Victor <vstin...@python.org> added the comment:

> 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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32847>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to