Tim Peters <tim.one at comcast.net> writes: > Note that assignment to __debug__ was deprecated in 2.1: > > SyntaxWarning: can not assign to __debug__ > > and removed in 2.2: > > SyntaxError: can not assign to __debug__ Of course, def foo(x): assert x globals()['__debug__'] = 0 foo(0) continues to work. Regards, Martin