mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
Deprecate contextlib.nested(). The with-statement now provides this functionality directly.
This commit is contained in:
parent
b4d2d31874
commit
822b87f276
4 changed files with 11 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue