PEP308: Yet another syntax proposal

sismex01 at hebmex.com sismex01 at hebmex.com
Mon Feb 10 11:46:54 EST 2003


> From: aahz at pythoncraft.com [mailto:aahz at pythoncraft.com]
> Sent: Monday, February 10, 2003 10:44 AM
> 
> In article <YUP1a.3080$SB2.242 at nwrddc03.gnilink.net>,
> Raymond Hettinger <python at rcn.com> wrote:
> >
> >I suggest:
> >
> >    cond  ??  val1  ||  val2
> 
> +0.5
> 
> I still have yet to see a clear explanation of why short-circuit is
> necessary and therefore iif() unreasonable.
> -- 
> Aahz (aahz at pythoncraft.com)           <*>         
> http://www.pythoncraft.com/

Given that objects may now have property attributes,
where just checking the value of an attribute may ("may")
dispatch several actions to return said value, short-
circuiting expression evaluations is the correct way
to implement this.

-gustavo





More information about the Python-list mailing list