Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'syntax': 0.03; 'subject:while': 0.09; 'terry': 0.09; 'properly': 0.15; '3.3.': 0.16; 'oct': 0.16; 'subject:expression': 0.16; 'syntactic': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'yield': 0.17; 'equivalent': 0.20; '3.2': 0.22; 'exceptions': 0.22; 'idea': 0.24; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'opposed': 0.27; 'message-id:@mail.gmail.com': 0.27; 'lines': 0.28; 'actual': 0.28; 'feature,': 0.29; 'long.': 0.29; 'received:209.85.215.46': 0.30; 'sense': 0.31; 'code': 0.31; 'substantial': 0.33; 'to:addr:python- list': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'except': 0.36; 'two': 0.37; 'received:209': 0.37; 'well.': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'possible.': 0.38; 'to:addr:python.org': 0.39; 'little': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'thomas': 0.62; 'improvement': 0.84; 'rachel': 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:from:date:message-id:subject:to :content-type; bh=EfBfgM+iL0SMD0KaaQNOKEVEjjhg97DIQB0owjzfyIk=; b=eBdjOFlMHtSI8viHhJKtDW5pFtnvtabJ9CtIL/fIZgPIE7ou7NA6/cVXiUvY6064+G Txux/fMONqBVyihAp6Vt+XW20RJL+gGD1XNK+7E4b3+bVqFiGRWd3PgWXJH3od4vkPlH Vvvk87gGxqq9h5y/ezycVJtiET0K7Deo7v5OtcsaF7pKgZ+TNP07lL9Bt94+iyiACsCx IUmsalFFQ/yESka0y8sBdhGAu+Mwt6gmrzdCs3CO3yCK2vW6DlvyEF71BW1IwFalYFAM MBV7K7SpVVlBHy9xYZ99bjZQAc9XCCRN5uLguJn5Jywo1rU8gUkvrbxSptT6VG0Fmel2 lCuw== MIME-Version: 1.0 In-Reply-To: References: <50886398.5050301@tim.thechases.com> <20121024222656.GA32708@cskk.homeip.net> <5088779A.3000202@cs.wisc.edu> From: Ian Kelly Date: Thu, 25 Oct 2012 10:44:17 -0600 Subject: Re: while expression feature proposal To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351183489 news.xs4all.nl 6862 [2001:888:2000:d::a6]:33385 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32147 On Thu, Oct 25, 2012 at 3:52 AM, Thomas Rachel wrote: > Am 25.10.2012 06:50 schrieb Terry Reedy: > > >> Keep in mind that any new syntax has to be a substantial improvement in >> some sense or make something new possible. There was no new syntax in >> 3.2 and very little in 3.3. > > > I would consinder this at least as new substantial than > > yield_from it > > as opposed to > > for i in it: yield i > > - although I think that was a good idea as well. Except that those two are not exactly identical, because "yield from" also properly delegates sent data and exceptions to the sub-generator. The actual equivalent code for "yield from expr()", as given in the PEP, is 39 lines long. This is a substantial feature, not just a little syntactic sugar.