Feature suggestions: "Using declarations" i.e. context managers ("with" blocks) tied to scope/lifetime of the variable rather than to nesting

Thomas Jollans tjol at tjol.eu
Tue Feb 19 06:46:46 EST 2019


On 19/02/2019 05.15, mnl.post at gmail.com wrote:
> This becomes more ugly if multiple withs get nested.
> 

This is what contextlib.ExitStack is for.


More information about the Python-list mailing list