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

James J. Besemer jb at cascade-sys.com
Sun Feb 9 05:30:15 EST 2003


Michele Simionato wrote:

> It is EXACTLY because "if" is already overloaded that I don't want to
> overload it even more! 

I think you and others exagerate the cost/danger of overloading "if".

Overall, defining a new interpretation for "if", one that may be 
unambiguously discriminated in all cases arguably is better than introducing 
a new keyword (which necessarily breaks old code).


> Anyway, (if c then e1 else e2), is better than
> nothing and better than Guido's proposal.

I tend to agree.  The middle-out form is a lot more confusing than the strict 
left to right ones.

Regards

--jb


-- 
James J. Besemer		503-280-0838 voice
2727 NE Skidmore St.		503-280-0375 fax
Portland, Oregon 97211-6557	mailto:jb at cascade-sys.com
				http://cascade-sys.com	







More information about the Python-list mailing list