Jason R. Coombs <jar...@jaraco.com> added the comment:

Nice reference. Indeed, the 
[rationale](https://www.python.org/dev/peps/pep-0533/#id15) of that pep gives a 
similar example and the 
[background](https://www.python.org/dev/peps/pep-0533/#id3) describes the 
problem with the solution I've drafted above (it still depends on garbage 
collection to close the file).

I guess that means that in general, it's not possible to accomplish what I'd 
like.

As author of the PEP, I'm looping in njs.

----------
nosy: +njs

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

Reply via email to