[Python-ideas] Long Live PEP 3150 (was: Re: Statement local functions and classes (aka PEP 3150 is dead, say 'Hi!' to PEP 403))

Antoine Pitrou solipsis at pitrou.net
Mon Oct 17 15:32:31 CEST 2011


On Mon, 17 Oct 2011 23:18:53 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
> 
> If we accept the premise that full featured anonymous functions have
> their place in life (and, over the years, I've been persuaded that
> they do),

They are nice to have. But so are switch statements, multi-line
comments, syntactic support for concurrency and other constructs that
Python doesn't have.

> 2. Adopt a symbolic syntax to allow a forward reference to a trailing
> suite that is an implicit function definition somewhat along the lines
> of Ruby block, only with Python-style namespace semantics (this
> approach was soundly demolished in the overwhelmingly negative
> reactions to PEP 403 - the assorted reactions to PEP 3150 have been
> positively welcoming by comparison)

The "postdef" keyword is arguably inelegant. You haven't answered to my
lambda-based proposal on this PEP. What do you think of it?

> 4. Add a non-whitespace delimited syntax that allows suites to be
> embedded inside expressions at arbitrary locations (I believe "from
> __future__ import braces" answers that one)

:-}

Regards

Antoine.





More information about the Python-ideas mailing list