Tips and Traps¶
If you need trackback information when throwing an exception use
raise ExceptionClass(msg), otherwise, usesys.exit(msg)instead.The
assertstatement (which raisesAssertionErrorif the assertion is not met) is a very good way to ensure conditions to be met.:::python assert some_condition