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
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/462AUCCEUHKLWBTLMKWIOU6JBF2QSFF6/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to