Nov. 19, 2019
12:11 a.m.
On 2019-11-18 11:24, Brendan Barnwell wrote:
I agree. I think this discussion wouldn't be necessary if there were a context manager that was like open() but opened the file in __enter__ and closed it in __exit__. I would go so far as to say I think it would be a good idea to add such a context manager to Python and deprecate open().
We could bring back file() and improve one of them. 😂 -Mike