New submission from Marco Sulla <launchpad....@marco.sulla.e4ward.com>:
I propose to mark as deprecated the parameters `ignore_errors` and `onerror` of `shutil.rmtree()`, and raise a warning if used. The reason is I feel them unpythonic. For emulating `ignore_errors=True`, the code can be written simply with a `try-except` that passes by default all `OSError`s . The `ignore_errors=True, onerror=myHandler` case can written simply with a `try-except` that handles `OSError`s. And in the handle can be code or a call to an handler with the same paramaters `myHandler` accept. ---------- components: +Library (Lib) title: Propose to deprecate ignore_errors, -> Propose to deprecate `ignore_errors` and `onerror` parameters of `shutil.rmtree()` type: -> enhancement versions: +Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37791> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com