Would Anonymous Functions Help in Learning Programming/Python?
Matthew Woodcraft
mattheww at chiark.greenend.org.uk
Sat Sep 22 12:57:43 EDT 2007
Cristian <super.sgt.pepper at gmail.com> wrote:
> To me, the biggest setback for new programmers is the different
> syntax Python has for creating functions. Instead of the common (and
> easy to grasp) syntax of foo = bar Python has the def foo(): syntax.
[...]
> in a program like Python there doesn't seem to be any other reason to
> have it.
One reason for the different syntax is that functions, unlike most
other objects, know their own names (which can be shown in tracebacks
and the like).
-M-
More information about the Python-list
mailing list