While looking through some of the code I noticed the use of assert statements within the production code (for example, here). It's generally recommended to avoid the use of assert statements within production code as the Python interpreter has a mode which allows ignoring these statements when processed (using the -O flag, for example python -O <file>). These existing assert statements could be turned into try except's instead to help avoid this challenge and follow Pythonic conventions.
While looking through some of the code I noticed the use of
assert
statements within the production code (for example, here). It's generally recommended to avoid the use ofassert
statements within production code as the Python interpreter has a mode which allows ignoring these statements when processed (using the-O
flag, for examplepython -O <file>
). These existingassert
statements could be turned intotry except
's instead to help avoid this challenge and follow Pythonic conventions.