> assert assertions_working() # refuse to run in -O mode > > Can't imagine why that wouldn't work......
Why overthink this? assert not sys.flags.optimize is clearly the one, and only one, obvious way to do it. Of course, it works about as well as the rest of these solutions. Which is to say, not at all. -Nick Cash -- https://mail.python.org/mailman/listinfo/python-list