Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'subject:Python': 0.06; 'debugging': 0.07; 'debugging.': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'statements': 0.09; 'language.': 0.14; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'tool.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'module': 0.19; 'print': 0.22; 'header:User-Agent:1': 0.23; 'fairly': 0.24; "i've": 0.25; 'logging': 0.26; 'switch': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'bigger': 0.30; "i'm": 0.30; 'code': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'problem': 0.35; 'but': 0.35; 'performance': 0.37; 'to:addr :python-list': 0.38; "couldn't": 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'easy': 0.60; 'effective': 0.61; 'simply': 0.61; 'our': 0.64; 'charset:windows-1252': 0.65; 'effectively': 0.66; 'hit.': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Python is going to be hard Date: Thu, 04 Sep 2014 15:04:17 +0100 References: <51acfec6-6b7b-4773-8d70-0360381bbed1@googlegroups.com> <4c873e02-93b1-4ad3-bc91-566a72b8e729@googlegroups.com> <99df9997-474e-4190-8179-6c1442b622a2@googlegroups.com> <54086b15$0$29977$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-179-184.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 In-Reply-To: <54086b15$0$29977$c3e8da3$5496439d@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409839487 news.xs4all.nl 2927 [2001:888:2000:d::a6]:40276 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77550 On 04/09/2014 14:37, Steven D'Aprano wrote: > > We often recommend using print as an easy and effective debugging tool. But > we don't (well, I don't) recommend leaving those print statements in the > code once the problem is debugged. > I've given up completely with print for debugging. I start with the logging module and change one line to effectively switch it off. Admittedly that's easy for me as I'm only writing code for my own use, I'm fairly sure that some of the bigger applications simply couldn't take the performance hit. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence