summaryrefslogtreecommitdiffstats
path: root/Doc/library/contextlib.rst
diff options
context:
space:
mode:
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 4b86755..cac113e 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::