On Sun, 8 May 2016 14:21:49 +1000 Chris Angelico <ros...@gmail.com> wrote: > if verbose: > verbiage = print > else: > def verbiage(*args): pass
I have never understood why the def couldn't start on the same line as the else: if verbose: verbiage = print else: def verbiage(*args): pass The colon effectively starts a block so why not allow it? By the way, I think you meant "def verbiage(*args, **kws): pass" > Then, instead of "if verbose: print(var)", you would use > "verbiage(var)". Of course, you want something better than "verbiage" > as your name; the nature of your verbose output might give a clue as > to what name would work. How about "print"? if not verbose: def print(*args, **kws): pass -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list