Syntax across languages

Fredrik Lundh fredrik at pythonware.com
Sun Oct 23 09:27:40 EDT 2005


"beza1e1" wrote:

> It has is uses. I had some kind of parser and had a dict like this:
> {case: function, ...} It had to be a dict, because i wanted to
> dynamically add and remove cases. In some cases nothing had to be done.
> To represent this in the dict a identity function is needed.

in Python, that's spelled "lambda x: x" (or "None", in some contexts)

</F>






More information about the Python-list mailing list