Machine Don

What is try/except?

Trying a piece of code with try and, if there's an error, handling it in except: note what failed and carry on with the rest, without hiding the error.

Also called: try and except, try / except, except.

An analogy

Three lines in the March ledger are smudged with coffee: the month-end close lists those three on a separate sheet and adds up the rest.

Where it shows up in the course

Related terms