Python becoming less Lisp-like

Ville Vainio ville at
Tue Mar 15 13:23:39 CET 2005

>>>>> "Tim" == Tim Daneliuk <tundra at> writes:

    Tim> Except that in this case, removal will also complicate code
    Tim> in some cases.  Consider this fragment of Tkinter logic:

    Tim> command=lambda cmd=cmdkey: CommandMenuSelection(cmd))

    Tim> Would it not be the case that, without lambda, we will need
    Tim> to pollute the name space with a bunch of specialized little
    Tim> functions for each and every construct like this?

You can reuse the same name for all those little functions to avoid
polluting the namespace. Choose 'L' if it gives you that cozy
lambda-ish feel.

Ville Vainio

More information about the Python-list mailing list