Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Debugging (was Re: Why not allow empty code blocks?) Date: Wed, 3 Aug 2016 05:18:50 +1000 Lines: 28 Message-ID: References: <579B1ABB.1070500@rece.vub.ac.be> <579c2095$0$22142$c3e8da3$5496439d@news.astraweb.com> <579ca644$0$1589$c3e8da3$5496439d@news.astraweb.com> <579ccc68$0$1583$c3e8da3$5496439d@news.astraweb.com> <579d5e2d$0$1612$c3e8da3$5496439d@news.astraweb.com> <57a0def4$0$1603$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de CsqraF8uxnPw7QBkMkLfcQvURV4E61pnQZgZ735pQkng== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'used.': 0.05; 'feature.': 0.07; 'subject:code': 0.07; 'cc:addr:python-list': 0.09; 'loop.': 0.09; 'subject:Why': 0.09; 'subject:not': 0.11; 'def': 0.13; 'ignore': 0.14; 'wed,': 0.15; 'properly': 0.15; '2016': 0.16; 'distinction.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:?)': 0.16; 'subject:allow': 0.16; 'wrote:': 0.16; 'variable': 0.18; 'language': 0.19; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; 'am,': 0.23; 'for?': 0.23; 'this:': 0.23; 'header:In-Reply-To:1': 0.24; 'feature': 0.24; 'message-id:@mail.gmail.com': 0.27; 'looks': 0.29; 'code': 0.30; "d'aprano": 0.33; 'steven': 0.33; 'though.': 0.33; 'received:google.com': 0.35; 'generic': 0.35; "isn't": 0.35; 'but': 0.36; 'should': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'means': 0.39; 'why': 0.39; 'enough': 0.39; 'where': 0.40; 'still': 0.40; 'care': 0.60; 'tracking': 0.61; 'is.': 0.63; 'fundamental': 0.66; 'special': 0.73; 'demand': 0.79; 'chrisa': 0.84; 'designed,': 0.84; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=S6H6dK21kEGcCqRZPjb3busTIC2GXvA1YYHlRJfmI8I=; b=Qkf4nm4zocIYuOFJrSFZ3lBDRxR5rWQ8YMBBuxAaFEC+GJywpD+jE64ECa38cdVIHH QKU8OLwHFmSzU3sPvG3PNE6LapK8saU1Z4lyuZKYuBoD3j6u421+KM/xLs1BdNPjTcmC JLNVHpe+hNp2EV8t9xcVydrVRfnKesH/Is1nhosVqK5oYXdoQqL0pSEtfrx4oWiiN6Qh 07LauW9M3W5DeBd/ObviPvU12s+RbWgLgNOQG4BvKTZ577mrtePqCfItMqX8d7rkoG8P mwhe2q+zegl9OdSu8gAaPN5UjL2zGi8jxwtBfHkjMwbVvPs8gJDEJCITOfraesoWW/RC 1y/Q== 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:from:date :message-id:subject:cc; bh=S6H6dK21kEGcCqRZPjb3busTIC2GXvA1YYHlRJfmI8I=; b=KFl+shMHsOvkyud2ZbISqXOGHE0XSvjVSclZgW1hcLFtI4ow8tTpujqi8ZmxeYf8Sh +3vwxkzuvavT1ZeRo83euxnLCc+rdaSVdRvYQCc+bzH7brs8Otysi4FnSWDl7dB9E9RS Mc9UcRP3irlDr6ZfNa39a1tripPIrszXjLVKKtecbFKTEq4iFkWQ/b67sOaybE39uyAy Yw6UkSUvOssUnD1uwI4gP6Vl8sHq/itFu7JHKTo8AhkJEWmBJ6esBMjamty7WqUjA4kx 2l5psUXXIfwG880nSyKrGJO2dL7t/YWESBZ2Cp7T7JrnMj2D/UNoSbRWXjnZZfHEebFR B6rg== X-Gm-Message-State: AEkoouuhRBKkxk9O9FGMCA7bQ26D48YSjaVsW54IfhFgmYMPPaEeaXh2CJBRse4PtOkSoC5EyTSumx+RNAM6XQ== X-Received: by 10.28.45.69 with SMTP id t66mr21156225wmt.41.1470165531054; Tue, 02 Aug 2016 12:18:51 -0700 (PDT) In-Reply-To: <57a0def4$0$1603$c3e8da3$5496439d@news.astraweb.com> 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: <579B1ABB.1070500@rece.vub.ac.be> <579c2095$0$22142$c3e8da3$5496439d@news.astraweb.com> <579ca644$0$1589$c3e8da3$5496439d@news.astraweb.com> <579ccc68$0$1583$c3e8da3$5496439d@news.astraweb.com> <579d5e2d$0$1612$c3e8da3$5496439d@news.astraweb.com> <57a0def4$0$1603$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:112246 On Wed, Aug 3, 2016 at 3:57 AM, Steven D'Aprano wrote: > On Wed, 3 Aug 2016 03:12 am, BartC wrote: > >> That's not a fundamental language feature. Repeat-N is. And if properly >> designed, isn't an extra feature at all but a special case of a generic >> loop. > > Which means it is NOT a fundamental language feature. > > "Repeat N without tracking the loop variable" is just a special case > of "repeat N with tracking the loop variable", where you don't actually > care what the loop variable is. To be fair, that can be an important distinction. I don't like seeing code like this: def f(): x = g() y = h(x) return 5 + x What's y for? Why not just call h(x) and ignore its return value? Should the last line say "5 + y"? It looks _wrong_ to have a local variable that's never used. It's still not a consideration strong enough to demand new loop syntax, though. ChrisA