Draft Pep (was: Re: Let's Talk About Lambda Functions!)

Paul Rubin phr-n2002b at NOSPAMnightsong.com
Tue Aug 6 05:31:13 CEST 2002


Hans Nowak <wurmy at earthlink.net> writes:
> > The above code passes 17 to a function which is not bound to any
> > name.
> 
> Really?
> 
>  >>> def define_twice():
> 	def _twice(x):
> 		return x + x
> 	return _twice
> 
>  >>> define_twice()
> <function _twice at 0x00935678>
> 
>  >>> define_twice().func_name
> '_twice'

That's not a binding.  That two people in the thread have thought it's
a binding proves Bryan's point that the current scheme confuses people
about the nature of first-class functions.



More information about the Python-list mailing list