
Oct. 29, 2011
4:22 p.m.
On 29 October 2011 15:48, Nick Coghlan <ncoghlan@gmail.com> wrote:
On Sat, Oct 29, 2011 at 8:51 PM, Paul Moore <p.f.moore@gmail.com> wrote:
I think that if the runtime support can be built in a way that allows a Lua-style function/method approach, then that should be the initial design, as it's easier to tweak a functional API than to change syntax. If experience shows that code would benefit from syntax support, add that later.
I have one specific reason I think the new yield variant should get a new keyword: it's a new kind of flow control, and Python has a history of trying to keep flow control explicit (cf. the PEP 343 with statement discussions).
That's a reasonable point, and could be explicitly noted in the PEP. Paul.