context managers inline?

Neal Becker ndbecker2 at gmail.com
Thu Mar 10 13:33:20 EST 2016


Is there a way to ensure resource cleanup with a construct such as:
x = load (open ('my file', 'rb))
Is there a way to ensure this file gets closed?


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /