
Sept. 28, 2015
6:37 p.m.
On Mon, Sep 28, 2015 at 06:11:45PM +0200, Sven R. Kunze wrote:
That sums it all up for me as well, though I would rather use "else" instead of "or?" (see punctuation-heavy).
`else` is ambiguous. Consider: result = spam if eggs else cheese else aardvark could be interpreted three ways: result = (spam if eggs else cheese) else aardvark result = spam if (eggs else cheese) else aardvark result = spam if eggs else (cheese else aardvark) Whichever precedence you pick, some people will get it wrong and it will silently do the wrong thing and lead to hard-to-diagnose bugs. Using "else" for this will be a bug-magnet. -- Steve