This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vbrozik
Recipients andreash, ncoghlan, serhiy.storchaka, vbrozik, yselivanov
Date 2022-02-18.11:08:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645182520.08.0.761514812023.issue45184@roundup.psfhosted.org>
In-reply-to
Content
There was an interesting discussion about this problem in 2015-12:
https://mail.python.org/archives/list/python-ideas@python.org/thread/Y3SLBJHJHAMBEZJWRXEJ5LE5JBVNE7XS/
(https://groups.google.com/g/python-ideas/c/l2FcErYbjfo - for the case the link above rots)

Certainly there are use cases for this functionality when you need to dynamically open multiple resources and close them when they are not needed any more. Keeping resources open till the very end of ExitStack is a bad practice which can lead to locking problems or overuse of resources.
History
Date User Action Args
2022-02-18 11:08:40vbroziksetrecipients: + vbrozik, ncoghlan, serhiy.storchaka, yselivanov, andreash
2022-02-18 11:08:40vbroziksetmessageid: <1645182520.08.0.761514812023.issue45184@roundup.psfhosted.org>
2022-02-18 11:08:40vbroziklinkissue45184 messages
2022-02-18 11:08:39vbrozikcreate