On Wed, Mar 3, 2021 at 2:06 PM Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > > On 3/03/21 12:24 pm, Chris Angelico wrote: > > if PRODUCTION: > > def assert(*a, **kw): pass > > > > would work if it were a function :) > > But would cost you a useless function call for every assert > in production mode. >
A micro-optimization that would almost never actually impact your code. But considering that I'm willing to keep *the entire check* active, it's possible I'm slightly biased in favour of debuggability at the cost of CPU... ChrisA -- https://mail.python.org/mailman/listinfo/python-list