This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients barry, belopolsky, ncoghlan, r.david.murray, rhettinger, skrah, vstinner, zero.piraeus
Date 2013-10-16.23:24:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Catch would be fine with me :)

Both "catch" and "trap" have the same problem in my view: you don't get to eat what you have caught (or trapped).  :-)

> Please note that someone *reading the thread* on python-dev
> misunderstood what ignore did after *reading the documentation*.

I question whether the confusion was genuine.  Anyone who has discovered contextlib modules should know enough about with statement, context managers and exceptions to understand how ignore() can work.  Sky is the limit when it comes to documentation improvements, but in this case code is better than a thousand words:

  def ignore(*exceptions):
    """Context manager to ignore particular exceptions"""
    except exceptions:

Here is how I understand the word "ignore" in the context of context managers. (Pun unavoidable.)  The context manager implements logic of how to exit the with block.  The logic of ignore() CM is to (drum roll, please) ignore the specified exception(s) if any is raised within the with block.

I gave my +0 to "suppress" on the list, but with more thought and considering more examples, I like "ignore" best.  It is still a close call, but "suppress" suggests more effort on the part of CM than there is.
Date User Action Args
2013-10-16 23:24:02belopolskysetrecipients: + belopolsky, barry, rhettinger, ncoghlan, vstinner, r.david.murray, skrah, zero.piraeus
2013-10-16 23:24:02belopolskysetmessageid: <>
2013-10-16 23:24:02belopolskylinkissue19266 messages
2013-10-16 23:24:02belopolskycreate