Re: Yielding a chain of values
- From: "Kay Schluehr" <kay.schluehr@xxxxxxx>
- Date: 31 Aug 2005 05:08:01 -0700
Reinhold Birkenfeld wrote:
> > x = [ yield r for r in iterable ]
>
> Which is quite different from
>
> x = (yield) in iterable
>
> which is currently (PEP 342) equivalent to
>
> _ = (yield)
> x = _ in iterable
>
> So, no further tinkering with yield, I'm afraid.
>
> Reinhold
Is the statement
yield from iterable
also in danger to be ambigous?
The resolution of "(yield) from iterable" into
_ = (yield)
x = _ from iterable
would not result in valid Python syntax.
Kay
.
- References:
- Yielding a chain of values
- From: Talin
- Re: Yielding a chain of values
- From: Michael Hudson
- Re: Yielding a chain of values
- From: Bengt Richter
- Re: Yielding a chain of values
- From: Reinhold Birkenfeld
- Re: Yielding a chain of values
- From: Bengt Richter
- Re: Yielding a chain of values
- From: Peter Hansen
- Re: Yielding a chain of values
- From: Bengt Richter
- Re: Yielding a chain of values
- From: Matt Hammond
- Re: Yielding a chain of values
- From: Reinhold Birkenfeld
- Yielding a chain of values
- Prev by Date: Re: change date format
- Next by Date: Re: Code run from IDLE but not via double-clicking on its *.py
- Previous by thread: Re: Yielding a chain of values
- Next by thread: aproximate a number
- Index(es):
Relevant Pages
|
|