Jacek Generowicz wrote:
[*] Funnily enough, getting them to understand that "lambda x: fn(x)"
    is just a very silly way of writing "fn", can be quite a struggle
    at times ... but that's probably a consequence of the context in
    which lambda is introduced.

If you genuinely taught them that, you may have done them a disservice:

Py> def f(x):
...    print x
...
Py> f1 = f
Py> f2 = lambda x: f(x)
Py> f1("hi")
hi
Py> f2("hi")
hi
Py> def f(x):
...   print x * 2
...
Py> f1("hi")
hi
Py> f2("hi")
hihi

Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://boredomandlaziness.skystorm.net
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to