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


Groups > comp.lang.python > #32147

Re: while expression feature proposal

References <50886398.5050301@tim.thechases.com> <20121024222656.GA32708@cskk.homeip.net> <5088779A.3000202@cs.wisc.edu> <mailman.2811.1351140683.27098.python-list@python.org> <k6b257$l8k$1@r03.glglgl.gl>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2012-10-25 10:44 -0600
Subject Re: while expression feature proposal
Newsgroups comp.lang.python
Message-ID <mailman.2856.1351183489.27098.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Oct 25, 2012 at 3:52 AM, Thomas Rachel
<nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de>
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.

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


Thread

Re: while expression feature proposal Terry Reedy <tjreedy@udel.edu> - 2012-10-25 00:50 -0400
  Re: while expression feature proposal Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-10-25 11:52 +0200
    Re: while expression feature proposal Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-25 10:50 +0000
      Re: while expression feature proposal Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-10-25 13:20 +0200
      Re: while expression feature proposal Terry Reedy <tjreedy@udel.edu> - 2012-10-25 16:09 -0400
    Re: while expression feature proposal Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-25 10:44 -0600
  Re: while expression feature proposal Grant Edwards <invalid@invalid.invalid> - 2012-10-25 14:17 +0000

csiph-web