18 Nov
2019
18 Nov
'19
6:11 p.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