For review: PEP 308 - If-then-else expression

Andrew Koenig ark at research.att.com
Fri Feb 7 15:24:03 EST 2003


Harvey> What about a built-in function?

Harvey> iff(<condition>, <trueresult>, falseresult) which returns
Harvey> <trueresult> if <condition> is true, otherwise returns
Harvey> <falseresult

If it were a function, it would have to evaluate all of its arguments.
Part of the point is that only one of the two results is evaluated.

-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark




More information about the Python-list mailing list