What is Nostr?
Eric Matthes /
npub1fsa…k599
2023-08-19 17:33:22

Eric Matthes on Nostr: Python people, do you have a clear policy about when to use exceptions vs. if blocks? ...

Python people, do you have a clear policy about when to use exceptions vs. if blocks?

For example, say you're trying to open a file that may not exist. Do you check if the file exists before opening it, or just try to open it and then catch the exception if it doesn't exist?
Author Public Key
npub1fsaqc43jncd7m7ftlc5ucv9epfjh0xzdu9t2vj6gqqqm42weyuqs5mk599