On Tue, Dec 24, 2013 at 6:03 AM, Roy Smith <r...@panix.com> wrote: > [2] In which case, we would just add some middleware which did: > > assert "-O" not in sys.argv
Aside from the fact that this wouldn't work, it won't work :) By the time you see argv, the -O option has been eaten. But why stop at that? def assertions_working(): try: assert False except AssertionError: return True return False assert assertions_working() # refuse to run in -O mode Can't imagine why that wouldn't work...... ChrisA -- https://mail.python.org/mailman/listinfo/python-list