[issue37791] Propose to deprecate `ignore_errors` and `onerror` parameters of `shutil.rmtree()`

Serhiy Storchaka report at bugs.python.org
Thu Aug 8 05:35:36 EDT 2019


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Passing ignore_errors=True is not the same as catching and silencing OSError outside of the function. In the former case you continue removing other files in the directory even if you can't remove some of them. In the latter case you stop after the first failure.

onerror gives you even more flexibility.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37791>
_______________________________________


More information about the Python-bugs-list mailing list