gl...@divmod.com wrote:
has anyone considered the syntax 'yield from iterable'?
That would be reasonable, too. I don't really have any
strong feelings about the syntax at the moment, except
that I'd like it to be something reasonably short so
that embedding it in an expression is a feasible th
gl...@divmod.com schrieb:
> On 01:00 am, greg.ew...@canterbury.ac.nz wrote:
>>Guido van Rossum wrote:
>>>We already have yield expressions and they mean something else...
>>
>>They don't have a "*" in them, though, and I don't
>>think the existing meaning of yield as an expression
>>would carry ove
On 01:00 am, greg.ew...@canterbury.ac.nz wrote:
Guido van Rossum wrote:
We already have yield expressions and they mean something else...
They don't have a "*" in them, though, and I don't
think the existing meaning of yield as an expression
would carry over into the "yield *" variant, so the
Guido van Rossum wrote:
We already have yield expressions and they mean something else...
They don't have a "*" in them, though, and I don't
think the existing meaning of yield as an expression
would carry over into the "yield *" variant, so there
shouldn't be any conflict.
But if you think th
Time to move to this to python-ideas, folks.
On Sat, Feb 7, 2009 at 12:26 PM, Calvin Spealman wrote:
> All of this debate is moot without the foundation of a common library
> on which we would be building these coroutines. Any proposal of a
> specific coroutine syntax is worthless without a time
All of this debate is moot without the foundation of a common library
on which we would be building these coroutines. Any proposal of a
specific coroutine syntax is worthless without a time and community
tested coroutine implementation, which would be subject to the same
rigerous inclusion requirem
Willem Broekema wrote:
Function g violates the current limitation that generators can't
return with a value. So can g only be used using "yield *" then, or
would that limitation be removed?
The limitation would be removed, in the interests
of making it easier to use generators as coroutines.
We already have yield expressions and they mean something else...
On Sat, Feb 7, 2009 at 1:04 AM, Greg Ewing wrote:
> Guido van Rossum wrote:
>
>> It would be way too confusing to have "a different form of call" with
>> totally different semantics that nevertheless used the same
>> *terminology*
On Sat, Feb 7, 2009 at 10:04 AM, Greg Ewing wrote:
> def f():
>v = yield *g()
>print v
>
> def g():
>yield 42
>return "spam"
Function g violates the current limitation that generators can't
return with a value. So can g only be used using "yield *" then, or
would that limitation
Guido van Rossum wrote:
It would be way too confusing to have "a different form of call" with
totally different semantics that nevertheless used the same
*terminology* as is used for regular calls.
I expect you're right, so I won't argue for calling
it "call" any more.
I'd still like to find
10 matches
Mail list logo