"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > Since python 2.5, it is > > <then_value> if <cond> else <else_value> > > If you want lazy evaluation, you can use lambdas: > > iif(cond, lambda: then, lambda: else_)()
Your code uses "iif" and attempts to evaluate a tuple; could you post an example that works? I ask because it's not clear what you mean by lazy evaluation in this context. The ternary "if" expression introduced in Python 2.5 only evaluates then_value or else_value depending on the outcome of cond. How is that different than using a lambda? -- http://mail.python.org/mailman/listinfo/python-list