cascading python executions only if return code is 0

Nick Cash nick.cash at npcinternational.com
Mon Dec 23 14:31:24 EST 2013


> 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



More information about the Python-list mailing list