Compared to conditionals, programming by Exception is slow.
You can use the timeit module (or the IPython %timeit magic function) to run comparative performance benchmarks.
> Exception handling is often not handled correctly in software, especially when there are multiple sources of exceptions; data flow analysis of 5 million lines of Java code found over 1300 exception handling defects.[15] Citing multiple prior studies by others (1999–2004) and their own results, Weimer and Necula wrote that a significant problem with exceptions is that they "create hidden control-flow paths that are difficult for programmers to reason about".[15]:8:27
>
> Go was initially released with exception handling explicitly omitted, with the developers arguing that it obfuscated control flow.[16] Later, the exception-like panic/recover mechanism was added to the language, which the Go authors
> ** advise using only for unrecoverable errors that should halt the entire process.[17][18][19][20] **
>
> Exceptions, as unstructured flow, increase the risk of resource leaks (such as escaping a section locked by a mutex, or one temporarily holding a file open) or inconsistent state. There are various techniques for resource management in the presence of exceptions, most commonly combining the dispose pattern with some form of unwind protection (like a finally clause), which automatically releases the resource when control exits a section of code.
[Emphasis added]
Neither of these documents advise against using Exceptions for control flow:
One alternative to Exceptions is to return a (value, err) tuple and have conditionals for each possible value of err.
(value, err) = func()
if err is not None:
# [...]