summaryrefslogtreecommitdiffstats
path: root/Lib/contextlib.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-05-28 22:20:03 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-05-28 22:20:03 (GMT)
commit91e3b9d89d6a63149dcd9ab12223f552d1473aab (patch)
tree2d3035aaa19b15a2d5cd437a52905f66698a8c8f /Lib/contextlib.py
parentfb12391c44d9491e2d1635eb5f82af3b0da0ec29 (diff)
downloadcpython-91e3b9d89d6a63149dcd9ab12223f552d1473aab.zip
cpython-91e3b9d89d6a63149dcd9ab12223f552d1473aab.tar.gz
cpython-91e3b9d89d6a63149dcd9ab12223f552d1473aab.tar.bz2
Deprecate contextlib.nested(). The with-statement now provides this functionality directly.
Diffstat (limited to 'Lib/contextlib.py')
-rw-r--r--Lib/contextlib.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/contextlib.py b/Lib/contextlib.py
index 647efdd..0841ac3 100644
--- a/Lib/contextlib.py
+++ b/Lib/contextlib.py
@@ -2,6 +2,7 @@
import sys
from functools import wraps
+from warnings import warn
__all__ = ["contextmanager", "nested", "closing"]
@@ -101,6 +102,8 @@ def nested(*managers):
<body>
"""
+ warn("With-statements now directly support multiple context managers",
+ DeprecationWarning, 2)
exits = []
vars = []
exc = (None, None, None)