summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2013-10-11 05:39:39 (GMT)
committerRaymond Hettinger <python@rcn.com>2013-10-11 05:39:39 (GMT)
commit1254b407ac6960ff2594e417d2f1c2c6a1ffc755 (patch)
treeec8d08e5216d84deb67d123a095a716fa1c29407 /Doc
parenta76795bf532169674f4e1637585ff6a52359e1c8 (diff)
downloadcpython-1254b407ac6960ff2594e417d2f1c2c6a1ffc755.zip
cpython-1254b407ac6960ff2594e417d2f1c2c6a1ffc755.tar.gz
cpython-1254b407ac6960ff2594e417d2f1c2c6a1ffc755.tar.bz2
Rename contextlib.ignored() to contextlib.ignore().
Diffstat (limited to 'Doc')
-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::