Comment Comment by edflsafoiewq Python's f = open('foo.txt', 'w') is even more succinct, and the exception thrown on failure will not only contain the reason, but the filename and the whole backtrace to the line where the error occurred. parent edflsafoiewq 11 months ago