Mercurial > cpython-lru_cache-weakref
diff Lib/contextlib.py @ 54404:3eb522dc3337
Deprecate contextlib.nested(). The with-statement now provides this functionality directly.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Thu, 28 May 2009 22:20:03 +0000 |
| parents | 031dfe455585 |
| children | 13a9874d8f47 |
line wrap: on
line diff
--- a/Lib/contextlib.py Thu May 28 18:19:00 2009 +0000 +++ b/Lib/contextlib.py Thu May 28 22:20:03 2009 +0000 @@ -2,6 +2,7 @@ import sys from functools import wraps +from warnings import warn __all__ = ["contextmanager", "nested", "closing"] @@ -101,6 +102,8 @@ <body> """ + warn("With-statements now directly support multiple context managers", + DeprecationWarning, 2) exits = [] vars = [] exc = (None, None, None)
