[issue45184] Add `pop` function to remove context manager from (Async)ExitStack
Serhiy Storchaka
report at bugs.python.org
Mon Sep 13 12:22:04 EDT 2021
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
If you can remove context managers in arbitrary order it is no longer a stack.
I think that it is just a wrong tool for your problem. Just maintain a collection of opened connections. Set or dict can be better that list or deque.
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45184>
_______________________________________
More information about the Python-bugs-list
mailing list