Would Anonymous Functions Help in Learning Programming/Python?
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Fri Sep 21 20:21:29 EDT 2007
Cristian a écrit :
> 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?
Ok, then what about classes ? They also are objects-like-any-other,
after all. So should we have this syntax too ?
MyClass = class(ParentClass):
__init__ = function (self, name):
self.name = name
?-)
More information about the Python-list
mailing list