summaryrefslogtreecommitdiff
path: root/Lib/contextlib.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-05-29 01:46:48 +0000
committerRaymond Hettinger <python@rcn.com>2009-05-29 01:46:48 +0000
commit822b87f276d11cbe0d45f91cbeb9e9abdf231c7e (patch)
treea8668c007a993d3b660235543a0690c923a498b4 /Lib/contextlib.py
parentb4d2d3187419c3674b18b04b0208f456440b5c26 (diff)
downloadcpython-git-822b87f276d11cbe0d45f91cbeb9e9abdf231c7e.tar.gz
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 c9793af6ef..af701d3226 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)