On Tue, Apr 9, 2013 at 8:17 PM, Danny Yoo <d...@hashcollision.org> wrote: > > Going back to the original question: perhaps an assertion here would > be sufficient. Something like: > > assert False, "Impossible situation"
Like "if __debug__" statements, assert statements are skipped by the compiler if optimization is enabled. If you want an AssertionError here even for optimized code, then explicitly raise AssertionError('Impossible situation'). _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor