summaryrefslogtreecommitdiff
path: root/Doc/library/contextlib.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2013-10-10 22:39:39 -0700
committerRaymond Hettinger <python@rcn.com>2013-10-10 22:39:39 -0700
commit8ed567abbfd284cd85a25c3ff8b536dc8347bdae (patch)
tree2e11ebff9009bf841b9b2a678c76edb6a5240a6b /Doc/library/contextlib.rst
parent1a01dff68282978bbca2b23e7bee5369a7326d62 (diff)
downloadcpython-8ed567abbfd284cd85a25c3ff8b536dc8347bdae.tar.gz
Rename contextlib.ignored() to contextlib.ignore().
Diffstat (limited to 'Doc/library/contextlib.rst')
-rw-r--r--Doc/library/contextlib.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 4b86755bad..cac113e839 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -94,16 +94,16 @@ Functions and classes provided:
without needing to explicitly close ``page``. Even if an error occurs,
``page.close()`` will be called when the :keyword:`with` block is exited.
-.. function:: ignored(*exceptions)
+.. function:: ignore(*exceptions)
Return a context manager that ignores the specified exceptions if they
occur in the body of a with-statement.
For example::
- from contextlib import ignored
+ from contextlib import ignore
- with ignored(OSError):
+ with ignore(OSError):
os.remove('somefile.tmp')
This code is equivalent to::