[Python-Dev] Re: PEP 308: "then" "else" for deprecating "and" "or" side effects

Carel Fellinger carel.fellinger@chello.nl
Fri, 14 Feb 2003 16:32:21 +0100


On Fri, Feb 14, 2003 at 09:34:27AM -0500, François Pinard wrote:
...
> If I translate the keywords of our syntax back to English, it gives:
> 
>     a when b else c
> 
> with a chainable property not requiring parentheses:
> 
>     a when b else c when d else ...
...
> My opinion on PEP 308 is that, whatever is done or not done, the key to the
> final decision should be the continued legibility of the Python language,

hear hear!

> much more than the tiny bit of added functionality.  It just happens that
> for our little language, _not_ Python, the above has been received as quite
> natural and legible by the non-programmers in the project -- they used that
> language heavily for providing that knowledge base the project needed.

Does that little language of yours have an if-else statement?  If so
could you wrap it up in parens and make it an if-else expression and
try it out on those non-programmers to see how they react to it?  The
best way to do this would be to ask them in person, then it's easier
to see their reaction:)

I for one would find it very interesting whether my findings with my
twin daughters would prove more universal.  They made it clear that
statements aren't expressions, hence making an expression out of a
statement by (merily) embracing it with parens might not be such a
smart move after all.

-- 
groetjes, carel