For review: PEP 308 - If-then-else expression
Jp Calderone
exarkun at intarweb.us
Fri Feb 7 14:19:47 EST 2003
On Fri, Feb 07, 2003 at 07:05:01PM -0000, Harvey Thomas wrote:
> [snip]
>
> Agree with your comments.
>
> What about a built-in function?
>
> iff(<condition>, <trueresult>, falseresult) which returns <trueresult> if <condition> is true,
> otherwise returns <falseresult
Requires extra things. Consider:
if foo():
bar()
else:
baz()
Duplicating this with a function is tricky.
Jp
--
up 53 days, 23:50, 3 users, load average: 0.22, 0.25, 0.26
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030207/86fab9dd/attachment.sig>
More information about the Python-list
mailing list