Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Terry Reedy Newsgroups: comp.lang.python Subject: Re: Why not allow empty code blocks? Date: Fri, 29 Jul 2016 15:43:02 -0400 Lines: 26 Message-ID: References: <5792cd34$0$1587$c3e8da3$5496439d@news.astraweb.com> <87vazwppxx.fsf@elektro.pacujo.net> <579B1ABB.1070500@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de pnNeeb8NWMdYXxGWG+ag1AdBQ8Vf7yjVg/eq+06uHIZw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'debugging.': 0.07; 'session.': 0.07; 'subject:code': 0.07; 'added.': 0.09; 'block.': 0.09; 'header?': 0.09; 'mentions': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'runs,': 0.09; 'subject:Why': 0.09; 'whatever.': 0.09; 'jan': 0.11; 'subject:not': 0.11; '2016': 0.16; '24,': 0.16; 'commented': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'subject:allow': 0.16; 'wrote:': 0.16; 'debugging': 0.18; 'try:': 0.18; '>>>': 0.20; 'fairly': 0.22; 'pass': 0.22; 'am,': 0.23; 'code,': 0.23; 'header :In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'chris': 0.26; 'that.': 0.30; 'code': 0.30; 'certainly': 0.30; 'common': 0.33; 'except': 0.34; 'something': 0.35; 'comment': 0.35; 'there': 0.36; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'or,': 0.38; 'takes': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'entire': 0.61; 'received:96': 0.63; 'jul': 0.72; 'angelico:': 0.84; 'chrisa': 0.84; 'pardon': 0.84; 'schreef': 0.84; 'received:fios.verizon.net': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: pool-96-227-207-81.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: <579B1ABB.1070500@rece.vub.ac.be> 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: X-Mailman-Original-References: <5792cd34$0$1587$c3e8da3$5496439d@news.astraweb.com> <87vazwppxx.fsf@elektro.pacujo.net> <579B1ABB.1070500@rece.vub.ac.be> Xref: csiph.com comp.lang.python:112028 On 7/29/2016 4:58 AM, Antoon Pardon wrote: > Op 23-07-16 om 16:19 schreef Chris Angelico: >> On Sun, Jul 24, 2016 at 12:00 AM, BartC wrote: >>> Or, for debugging or other reasons, when you need to comment out the >>> contents of a block. Then pass needs to be added. >> How often do you comment out an entire block and not its header? I >> don't remember the last time I did that. It's certainly not so common >> that adding 'pass' takes up a significant part of a debugging session. >> >> ChrisA > > As BartC already mentions it happens fairly often during debugging. > Something like. > > try: > Some code > except Some_Exception: > # Commented code for when I am debugging > pass So put in 'pass' whether or not there is no debugging code, commented-out debugging code, or debugging code that runs, or whatever. -- Terry Jan Reedy