Would Anonymous Functions Help in Learning Programming/Python?

Cristian super.sgt.pepper at gmail.com
Fri Sep 21 20:08:40 EDT 2007


On Sep 21, 4:47 pm, "Sean Tierney" <seanttier... at gmail.com> wrote:
> Just tell him that "functions are like all  other variables and can
> therefore be passed by other functions or returned by other functions.
> "
>



I could """Just tell him that "functions are like all  other variables
and can
therefore be passed by other functions or returned by other functions.
" """ but wouldn't it be great if Python did this for me? It seems to
me that the ability for Python to explicitly state that functions-are-
like-other-variables is there so why not expose it?

> If your friend understands variables and functions and he can't make
> the "leap" (and assuming you're right, of course) then your friend
> doesn't understand variables and functions.

To say that you understand variables and functions is language
specific. You can't translate your knowledge of variables and
functions from Python to Java and vice-versa. They are treated
completely different. Perhaps you can translate your Python
understanding of functions and variables to Javascript but not to C.





More information about the Python-list mailing list