On 14 Feb, 16:23, Neil Cerutti <[EMAIL PROTECTED]> wrote:

> str.translate is what I'd do.

That's what I hope to do too, but it might not be possible (for the
live, complex example). It looks as if I have to make a test, then
process the contents of the code differently depending. There might
well be a translation inside this, but I think I still have to have an
explicit 3-way switch in there.



> How would it being a lambda help you?

I'm going to use it in a context where that would make for cleaner
code. There's not much in it though.

I still don't understand what a lambda is _for_ in Python. I know what
they are, I know what the alternatives are, but I still haven't found
an instance where it permits something novel to be done that couldn't
be done otherwise (if maybe not so neatly).

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to