"no variable or argument declarations are necessary."

Bengt Richter bokr at oz.net
Tue Oct 4 13:40:23 EDT 2005


On Tue, 04 Oct 2005 10:18:24 -0700, Donn Cave <donn at u.washington.edu> wrote:
[...]
>In the functional language approach I'm familiar with, you
>introduce a variable into a scope with a bind -
>
>   let a = expr in
>       ... do something with a
>
>and initialization is part of the package.  Type is usually
>inferred.  The kicker though is that the variable is never
>reassigned. In the ideal case it's essentially an alias for
>the initializing expression.  That's one possibility we can
>probably not find in Python's universe.
>
how would you compare that with
    lambda a=expr: ... do something (limited to expression) with a
?

Regards,
Bengt Richter



More information about the Python-list mailing list