On 19/11/19 3:32 pm, Random832 wrote:

For one thing, it'd have to *truly never* fail.

Even if open() itself truly never failed, there would still be
room to get yourself into trouble. E.g.

    with (open(get_filename_1()), open(get_filename_2())) as (f1, f2):
        ...

If get_filename_2() fails, the first file would be left open.

--
Greg
_______________________________________________
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/U4B4SFTZ3RIMADHNB6LI44WAJ55KYB3M/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to