Václav Brožík <vbro...@gmail.com> added the comment:

There was an interesting discussion about this problem in 2015-12:
https://mail.python.org/archives/list/python-id...@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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45184>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to