diff options
author | Raymond Hettinger <python@rcn.com> | 2009-05-29 01:46:48 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-05-29 01:46:48 +0000 |
commit | 822b87f276d11cbe0d45f91cbeb9e9abdf231c7e (patch) | |
tree | a8668c007a993d3b660235543a0690c923a498b4 /Lib/contextlib.py | |
parent | b4d2d3187419c3674b18b04b0208f456440b5c26 (diff) | |
download | cpython-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.py | 3 |
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) |