Author serhiy.storchaka
Recipients andreash, ncoghlan, serhiy.storchaka, yselivanov
Date 2021-09-13.16:22:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:04serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, yselivanov, andreash
2021-09-13 16:22:04serhiy.storchakasetmessageid: <>
2021-09-13 16:22:04serhiy.storchakalinkissue45184 messages
2021-09-13 16:22:04serhiy.storchakacreate