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 <1631550124.9.0.636061590062.issue45184@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-09-13 16:22:04serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, yselivanov, andreash
2021-09-13 16:22:04serhiy.storchakasetmessageid: <1631550124.9.0.636061590062.issue45184@roundup.psfhosted.org>
2021-09-13 16:22:04serhiy.storchakalinkissue45184 messages
2021-09-13 16:22:04serhiy.storchakacreate