Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: "D'Arcy J.M. Cain" Newsgroups: comp.lang.python Subject: Re: pylint woes Date: Sun, 8 May 2016 08:50:06 -0400 Organization: Vybe Networks Inc. Lines: 32 Message-ID: References: <572eb1c3$0$1616$c3e8da3$5496439d@news.astraweb.com> <20160508085006.020cef65@imp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de Dn7NmnPfv2wj6TQ0FcSoggZiC7I0rqyHoRNXzNrJBsFg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'else:': 0.03; 'cc:addr :python-list': 0.09; '"if': 0.09; 'output': 0.13; 'def': 0.13; '2016': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'verbose': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'meant': 0.22; 'name;': 0.22; 'pass': 0.22; 'header:In-Reply-To:1': 0.24; 'chris': 0.26; 'colon': 0.29; 'starts': 0.29; 'print': 0.30; 'work.': 0.30; 'something': 0.35; 'instead': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'why': 0.39; 'your': 0.60; 'received:98.158': 0.84; '+1000': 0.91 In-Reply-To: X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.vex.net); Sun, 08 May 2016 08:50:23 -0400 (EDT) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20160508085006.020cef65@imp> X-Mailman-Original-References: <572eb1c3$0$1616$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:108350 On Sun, 8 May 2016 14:21:49 +1000 Chris Angelico 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:darcy@Vex.Net VoIP: sip:darcy@VybeNetworks.com