[Python-ideas] Proposal for function expressions
Jim Jewett
jimjjewett at gmail.com
Mon Jul 13 02:31:46 CEST 2009
On Sun, Jul 12, 2009 at 4:11 PM, Chris Perkins<chrisperkins99 at gmail.com> wrote:
> First, a simple example to give the broad strokes:
> foo() do:
> BODY
> is equivalent to:
> def ANON():
> BODY
> foo(ANON)
So the named and anoymous functions don't share scope in any way?
Then what is the advantage? Is putting the call ahead of the def that
valuable for making the code clear?
> Implementation is here: http://bitbucket.org/grammati/python-trunk/
> Patch is here: http://bugs.python.org/issue6469
> To be honest, I'm not entirely sure if the patch is in the right
> format - it comes from hg, not svn.
If using hg for patches is a problem, then the conversion from svn to
hg is in for some rough sledding.
-jJ
More information about the Python-ideas
mailing list