Attitude about new keywords

Dave Brueck dave at pythonapocrypha.com
Tue Feb 11 06:34:20 CET 2003


On Mon, 10 Feb 2003, Erik Max Francis wrote:

> Dave Brueck wrote:
>
> > Me too. I think the key to its readability is that it is enclosed in
> > brackets, so I wouldn't mind if the new expression required
> > parentheses
> > around it (I wouldn't mind because I'd probably enclose if-expressions
> > in
> > parens anyway, required or not).
>
> The require-parentheses argument leads to weird cases such as that of a
> function call:
>
> 	f(x if C else y)
>
> would be illegal, instead it would have to be written
>
> 	f((x if C else y))

Good call, you're right.

-Dave





More information about the Python-list mailing list