Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ian Kelly Newsgroups: comp.lang.python Subject: Re: Why not allow empty code blocks? Date: Fri, 29 Jul 2016 07:41:49 -0600 Lines: 31 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de RmqP3cOJH852h19tSM7XHg06fRtYujzuYqVRzQjeavjQ== 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; 'debugging.': 0.07; 'subject:code': 0.07; '"if': 0.09; 'behave': 0.09; 'mentions': 0.09; 'simplified': 0.09; 'subject:Why': 0.09; 'subject:not': 0.11; '>>>': 0.15; '2016': 0.16; 'commented': 0.16; 'exception?': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:allow': 0.16; 'wrote:': 0.16; 'debugging': 0.18; 'try:': 0.18; '>': 0.18; '>>>': 0.20; '+0200': 0.20; 'fairly': 0.22; 'pass': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'example': 0.26; 'fri,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'really,': 0.29; 'code': 0.30; 'realize': 0.32; 'except': 0.34; 'that,': 0.34; 'received:google.com': 0.35; 'besides': 0.35; 'replace': 0.35; 'something': 0.35; 'comment': 0.35; "isn't": 0.35; 'but': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'skip:& 10': 0.37; 'to:addr:python.org': 0.40; 'some': 0.40; 'legal': 0.66; 'jul': 0.72; 'pardon': 0.84; 'to:name:python': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=HTSIc5lSP594y3QSskbydk5p5nVCGdcNekyRX64GIsM=; b=iVyXCWdTKl6jnSC88sE1A2aeROO3hAsU3nuyL7fkjBsfPUaKz1pYhKLDoZHj7jLvxQ MjIYtfTeMC7hQIY4/3M4bEdQucG32gPx/27HWeRkocrnDfbUUp2Uc8ZJ5wgn54z0rNrm 3sg9xKXRTD6lC03yyFAwRI9Ex8VR52zwcPeo5lC1jPSagwNUlVnEdY5XRbx4lgtHbJy0 MXX/5y7SR9yOz+MfNQwKhqTRErn41CNlGKMGGFSeeu1+xMfMhzkObMBmOsoF3xE24SXO kt9SmqDokpC2TwB8UuLt1zFTIx2SN2CP/az5kTwnpHJuoXEj3sElYEJ4vSWWB2o2t/GJ 65LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=HTSIc5lSP594y3QSskbydk5p5nVCGdcNekyRX64GIsM=; b=YFOyn5vU3Cr1yrQ//fAJLbzRNICWU5y23pgIyk7j+uTqaucMDXsyzGY26c2KKDUe4Z 2/cUfWoBjSkRVqUdAMj+Y3bnJlKOwybXylozci7ZCYYmdQnN+QUd7tRYEwd1GDptBf0e xK7poSDXNCNKArVWBDNcbhbWGCIjtp3AGGMzkWNHOJdzexbs0Xpa6/syxQcn4Q3zvW+V gCv4/UjC+ZcqcyXqgkbmGPmUFEPa2U8hNGbQ4Nd+p54kpYBYbOiSj5j3VgPiqtP5MkAt UMNAgKlNnUEKy/FPzrl+KmLe2Shj5oBcP3JEdjfk01bkqOmNQ0ZaP+CySkcp7SEMydLC Q/4g== X-Gm-Message-State: AEkooutoYChL4wbJVagDniRlkI8iQ9ULG/OR4ErFFJJsS6jXc7Bevdk8Fyg02ALbLhHX9sGWx0VGRlJs7rZIjQ== X-Received: by 10.202.97.214 with SMTP id v205mr22670936oib.54.1469799710222; Fri, 29 Jul 2016 06:41:50 -0700 (PDT) In-Reply-To: X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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> <20160729071458.1dfa170f@imp> Xref: csiph.com comp.lang.python:112015 On Jul 29, 2016 7:22 AM, "BartC" wrote: > > On 29/07/2016 12:14, D'Arcy J.M. Cain wrote: >> >> 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 > > > Will it behave the same way when there is a Some_Exception exception? Besides that, a try block on its own with no dependents blocks isn't even legal syntax. You'd have to comment the try as well and replace it with "if 1" or similar.