[issue13585] Add contextlib.ExitStack

2018-04-11 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Follow-up: https://bugs.python.org/issue33265 -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue13585] Add contextlib.ExitStack

2018-04-11 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Why this? _exit_wrapper.__self__ = cm It seems that you are trying to create something which is exactly like a method except that it's not a method. Is there any reason to not use an actual method? It would actually simplify the code. I ask because assignin

[issue13585] Add contextlib.ExitStack

2012-05-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8ef66c73b1e1 by Nick Coghlan in branch 'default': Close #13585: add contextlib.ExitStack to replace the ill-fated contextlib.nested API http://hg.python.org/cpython/rev/8ef66c73b1e1 -- nosy: +python-dev resolution: -> fixed stage: -> com

[issue13585] Add contextlib.ExitStack

2012-05-01 Thread Nick Coghlan
Nick Coghlan added the comment: Latest draft of API is here: http://contextlib2_dev.readthedocs.org/en/latest/index.html#contextlib2.ExitStack An updated version of the "I forgot I could use multiple context managers in a with statement" example: with ExitStack() as stack: src =