Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49098

Re: Is this PEP-able? fwhile

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.021
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'syntax': 0.04; 'anyway.': 0.05; 'subject:PEP': 0.07; 'idea?': 0.09; 'language,': 0.12; '24,': 0.16; 'generators.': 0.16; 'introduces': 0.16; 'loops': 0.16; 'nesting': 0.16; 'all.': 0.16; 'wrote:': 0.18; 'adds': 0.24; 'exists': 0.24; 'mon,': 0.24; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'said,': 0.30; 'message-id:@mail.gmail.com': 0.30; 'probably': 0.32; "we're": 0.32; 'maybe': 0.34; 'point.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'there': 0.35; 'clear': 0.37; 'ahead': 0.38; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'subject:? ': 0.60; 'simply': 0.61; 'more': 0.64; 'taking': 0.65; 'benefit': 0.68; 'lack': 0.78; 'subject:this': 0.83; '2013': 0.98
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:to :content-type:content-transfer-encoding; bh=UU9trS4Qb5gfMHWmxzuddYDyr4RmNru6P/zh7in62BE=; b=K4XsSLDjY5hGGGpZO5BomJrhdywSz8m3Wz2Ep0e8DvsI2wNBgtcNVARMP66ob6eMFl 73w98gSoJdb2RFB4bN1LItQrYKRCZJBOIxNLiF0FvZBMmYlc0V/8DjTEq7FvGLIxYrbE c0HIFrPJCkaAkMmYXnKYYhm+nTgPnN67gFSRmRm8nVEhWToXNUN9T4h1JSR0U2TSJznN 9OHigrCOqu46zXkojCl6A/tcAy3uqFLeOvk7aRXfP8Lwub9OxVCZovfRiT6+lJj7ra5A jhoJcrxoUR7LpVI33VaqELNz1YfdDAGCXBdiMRWmV0BX6ZBJCtGZ7dkbm4tV8fl4feZh EVvg==
X-Received by 10.68.189.199 with SMTP id gk7mr14834412pbc.208.1372113861043; Mon, 24 Jun 2013 15:44:21 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <CAA=1kxR2JU7tbNdr9smZd9=Cy-vSCwoaAzwM=6LiAZ3edzrF8A@mail.gmail.com>
References <8D03F2B8CF0E7BE-1864-1796B@webmail-m103.sysops.aol.com> <CAA=1kxR65wqgQWQJaLvP2yx_XacEMsHiFs40rPW1UbFXYpnytA@mail.gmail.com> <CALwzidnADsCdNmfFsLChVq7bt9G87Rsr1DsD1M-jNmzqQ2Z0eA@mail.gmail.com> <CAA=1kxR2JU7tbNdr9smZd9=Cy-vSCwoaAzwM=6LiAZ3edzrF8A@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Mon, 24 Jun 2013 16:43:40 -0600
Subject Re: Is this PEP-able? fwhile
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3779.1372113865.3114.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1372113865 news.xs4all.nl 15908 [2001:888:2000:d::a6]:51617
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:49098

Show key headers only | View raw


On Mon, Jun 24, 2013 at 4:41 PM, Fábio Santos <fabiosantosart@gmail.com> wrote:
>
> On 24 Jun 2013 22:29, "Ian Kelly" <ian.g.kelly@gmail.com> wrote:
>>
>> On Mon, Jun 24, 2013 at 2:34 PM, Fábio Santos <fabiosantosart@gmail.com>
>> wrote:
>> > This can probably be best achieved by adding to the existing for loop,
>> > so maybe taking advantage of the existing for...if syntax and adding
>> > for...while would be a better idea?
>>
>> The for...if syntax only exists for comprehensions and generators.  If
>> we're going to add for...while for loops, then we might as well go
>> ahead and add for...if loops there as well.
>>
>> That said, I do like this syntax better than "fwhile".
>
> Good point. Still, I don't see why for..if doesn't exist in for loops
> anyway. It may be lack of foresight, but I don't understand why at all.

Because it adds more syntax to learn when learning the language, it
introduces more maintenance overhead, and it offers no clear benefit
over simply nesting an if inside a for.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Is this PEP-able? fwhile Ian Kelly <ian.g.kelly@gmail.com> - 2013-06-24 16:43 -0600

csiph-web