Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Antoon Pardon Newsgroups: comp.lang.python Subject: Re: Why not allow empty code blocks? Date: Fri, 29 Jul 2016 15:46:37 +0200 Lines: 33 Message-ID: References: <5792cd34$0$1587$c3e8da3$5496439d@news.astraweb.com> <87vazwppxx.fsf@elektro.pacujo.net> <579B1ABB.1070500@rece.vub.ac.be> <20160729071458.1dfa170f@imp> <579B5E3D.30308@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de +/iOBU0muVWUHMQy/wOXigq5Q4OZGEx9Q6pE3abwGvxA== 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; 'received:134': 0.05; 'debugging.': 0.07; 'seemed': 0.07; 'subject:code': 0.07; 'cc:addr :python-list': 0.09; 'behave': 0.09; 'mentions': 0.09; 'simplified': 0.09; 'subject:Why': 0.09; 'subject:not': 0.11; 'question.': 0.13; 'suggest': 0.15; '2016': 0.16; 'commented': 0.16; 'received:ac.be': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:allow': 0.16; 'wrote:': 0.16; 'debugging': 0.18; 'try:': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; '+0200': 0.20; 'fairly': 0.22; 'pass': 0.22; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; "doesn't": 0.26; 'example': 0.26; 'chris': 0.26; 'fri,': 0.27; 'really,': 0.29; 'code': 0.30; 'received:be': 0.30; 'realize': 0.32; 'statement': 0.32; 'except': 0.34; 'trouble': 0.35; 'something': 0.35; "isn't": 0.35; 'but': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'self': 0.38; 'some': 0.40; 'easy': 0.60; 'your': 0.60; 'more': 0.63; 'situation': 0.67; 'talking': 0.67; 'jul': 0.72; 'pardon': 0.84; 'schreef': 0.84 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2D5GQCBXZtX/0YPuIZdhGUBMbsEAYYcAoF4AQEBAQEBXoUDAQEEASNWBQsLGAICBSECAg8CRgYNBgICiCUIrlCKBhqDTwEBAQEBBQEBAQEBIoEBhSmETYdBgloFmTOBYI0eiUaFeowxg3hUg3xsAYdqAQEB X-IPAS-Result: A2D5GQCBXZtX/0YPuIZdhGUBMbsEAYYcAoF4AQEBAQEBXoUDAQEEASNWBQsLGAICBSECAg8CRgYNBgICiCUIrlCKBhqDTwEBAQEBBQEBAQEBIoEBhSmETYdBgloFmTOBYI0eiUaFeowxg3hUg3xsAYdqAQEB User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 In-Reply-To: <20160729071458.1dfa170f@imp> 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: <579B5E3D.30308@rece.vub.ac.be> X-Mailman-Original-References: <5792cd34$0$1587$c3e8da3$5496439d@news.astraweb.com> <87vazwppxx.fsf@elektro.pacujo.net> <579B1ABB.1070500@rece.vub.ac.be> <20160729071458.1dfa170f@imp> Xref: csiph.com comp.lang.python:112017 Op 29-07-16 om 13:14 schreef D'Arcy J.M. Cain: > On Fri, 29 Jul 2016 10:58:35 +0200 > Antoon Pardon wrote: >> 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 > I realize that that's a simplified example but really, isn't this just > as easy? > > try: > Some code > # except Some_Exception: > # Commented code for when I am debugging That code doesn't behave the same. > If your code block really is one line is "pass #" really so much more > of a hardship than "#"? If it is a large block use "pass #@#" which is > easy to remove with a search and replace. Whose talking about hardschip? I don't trouble my self with removing the pass statement when the debugging code is active. But Chris seemed to suggest a situation like above was really rare, so I answered his question. -- Antoon.