Andy Wingo wrote:
On Wed 20 Aug 2014 16:41, Kevin Smith<[email protected]>  writes:

>  I'm still curious why we need to go through such exercises, though. It
>  seems clear to me that this is a weakness of the current design, and
>  would be easily addressed with syntax. Is there a back-story that I'm
>  not aware of?

No backstory that I'm aware of -- only something that doesn't really
fall out from the generators design.  There's just no sensible name you
could give the value (without getting "creative" with lexical scope),
and no continuation waiting to receive it.

Right. Anyone know whether this has come up as a PEP or suggestion on python-dev?

The meeting notes Kevin cited in the thread root don't mention it, but IIRC we did briefly talk about syntax that could be added in a future edition (AKA next year in a spec, next month in a browser implementation) for receiving that first-next value:

function* gen(a, b, c) first {
  ...
}

Not bikeshedding, some found it ugly or too terse, many wondered about other future syntax vying to go after the parameter list. But the idea seems good.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to