Message401708
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. |
|
Date |
User |
Action |
Args |
2021-09-13 16:22:04 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, ncoghlan, yselivanov, andreash |
2021-09-13 16:22:04 | serhiy.storchaka | set | messageid: <1631550124.9.0.636061590062.issue45184@roundup.psfhosted.org> |
2021-09-13 16:22:04 | serhiy.storchaka | link | issue45184 messages |
2021-09-13 16:22:04 | serhiy.storchaka | create | |
|