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

Roman Suzi rnd at onego.ru
Fri Feb 7 20:55:19 CET 2003


On Fri, 7 Feb 2003, Guido van Rossum wrote:

I do not like the PEP. I'd agree on syntactic support for decision tables
(with due optimization, of course), but not for individual ?:-things,
in whatever form they are presented.

If Python had lazy execution, we could have a function:

if_(cond, expr1, expr2)

and expr1 or expr2 evaluated only after cond. 

For example:

iif(x < y, ```x**y```, ```y**x```)

(where ``` mark lazily (on demand) executed things)

But this, yet again, are code the thunks Python-Dev is unhappy about :-(


-1 for the PEP 308


Sincerely yours, Roman Suzi
-- 
rnd at onego.ru =\= My AI powered by Linux RedHat 7.3






More information about the Python-list mailing list