You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Of course, the closest thing to Python's try/except that we're supposed to use in Go is the defer statement. You already touch on Go's panic/recover, which is closer in spirit to Python's try/except, though the defer statement is intended as more general purpose.
In Python it would be useful to list the
with open('workfile') as f:
read_data = f.read()
f.closed
In addition to or instead of the try except.
https://docs.python.org/3/tutorial/inputoutput.html
The text was updated successfully, but these errors were encountered: