diff options
author | Raymond Hettinger <python@rcn.com> | 2009-05-28 22:20:03 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-05-28 22:20:03 +0000 |
commit | 94c9154429ff9f502e164774572e972208b0152d (patch) | |
tree | 080ccd101b8f84a49d0424a56b13cd6eb6cf656c /Lib/contextlib.py | |
parent | 577b1993f93ecc14b494ddee6c66ff39da901b04 (diff) | |
download | cpython-94c9154429ff9f502e164774572e972208b0152d.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 647efdd26d..0841ac33ed 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) |