On Sat, Jan 17, 2009 at 5:53 PM, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > Chris Rebert <c...@rebertia.com> writes: >> Rather than have a long if-elif-else chain like this, you can use a >> dictionary with functions as values. For example: >> >> def add(x, y): >> return x + y > > These functions are already defined in the operator module, and you > can also define them inline with the lambda operator.
Did you completely skip over the last sentence of my email? I specifically mentioned the `operator` module. Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com -- http://mail.python.org/mailman/listinfo/python-list