diff options
author | Raymond Hettinger <python@rcn.com> | 2013-10-10 22:39:39 -0700 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2013-10-10 22:39:39 -0700 |
commit | 1254b407ac6960ff2594e417d2f1c2c6a1ffc755 (patch) | |
tree | ec8d08e5216d84deb67d123a095a716fa1c29407 /Lib/contextlib.py | |
parent | merge 3.3 (diff) | |
download | cpython-1254b407ac6960ff2594e417d2f1c2c6a1ffc755.tar.gz cpython-1254b407ac6960ff2594e417d2f1c2c6a1ffc755.tar.bz2 cpython-1254b407ac6960ff2594e417d2f1c2c6a1ffc755.zip |
Rename contextlib.ignored() to contextlib.ignore().
Diffstat (limited to 'Lib/contextlib.py')
-rw-r--r-- | Lib/contextlib.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/contextlib.py b/Lib/contextlib.py index 868fa6c43d7..41ff9cc448c 100644 --- a/Lib/contextlib.py +++ b/Lib/contextlib.py @@ -5,7 +5,7 @@ from collections import deque from functools import wraps __all__ = ["contextmanager", "closing", "ContextDecorator", "ExitStack", - "ignored", "redirect_stdout"] + "ignore", "redirect_stdout"] class ContextDecorator(object): @@ -179,10 +179,10 @@ class redirect_stdout: sys.stdout = self.old_target @contextmanager -def ignored(*exceptions): +def ignore(*exceptions): """Context manager to ignore specified exceptions - with ignored(OSError): + with ignore(OSError): os.remove(somefile) """ |