domenic at domenicdenicola.com (2014-08-26T18:23:57.565Z)
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:
```js
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.
Andy Wingo wrote: > On Wed 20 Aug 2014 16:41, Kevin Smith<zenparsing at gmail.com> 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