[issue19266] Rename contextlib.ignore to contextlib.suppress

Nick Coghlan report at bugs.python.org
Thu Oct 17 01:18:19 CEST 2013


Nick Coghlan added the comment:

I didn't choose suppress on a whim. I actually agree with Raymond that
ignore reads better when the context manager is used correctly, but
suppress is more consistent with the terminology used in the documentation
(including even PEP 343), *and* I think it is slightly less vulnerable to
people expecting it to mean "don't even raise the exception and continue
with the next statement inside the with block" (aka the "on error resume
next" misinterpretation).

I think suppress reads *well enough* for it to be worth making the switch
in order to gain those other benefits.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19266>
_______________________________________


More information about the Python-bugs-list mailing list