Peter Otten wrote: > Ant wrote: > > >>># python 2.5 >>> >>>>>>a, b = "", 0 >>>>>>a if False else b >>> >>>0 >>> >>>>>>a if True else b >>> >>>'' >>> >>>Time to tear out that page. Really. >> >>Not quite - 2.5 hasn't been released in its final version yet, and many >>projects I should imagine will take a while to upgrade. > > > Ok, use > > if cond: > value = ... # expression that must not be evaluated unless it absolutely > # has to be > else: > value = ... # same thing > > which will withstand the test of time.
But isn't allowed in a lambda !-) -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list