Re: [Python-ideas] if we were to ever shorten `A if A else B` (was: PEP 505: None-aware operators)

2018-07-21 Thread Grégory Lielens
Coming from the @ side (I was strong +1 on this), I have troubles seeing the real benefits from ?? (And even more from associates): did we really have long and complex expressions where the compactness of an operator would help? Operators are inherently obscure (except for those that are

Re: [Python-ideas] if we were to ever shorten `A if A else B` (was: PEP 505: None-aware operators)

2018-07-21 Thread Chris Barker - NOAA Federal via Python-ideas
> my vote would go to `A otherwise B` since it's unambiguous, the case you care > about the state of comes first, and it doesn't trip your brain up looking > for 'if'. :) And I’d hope “otherwise” is a rare variable name :-) - CHB > > ___ >

[Python-ideas] if we were to ever shorten `A if A else B` (was: PEP 505: None-aware operators)

2018-07-20 Thread Brett Cannon
On Thu, 19 Jul 2018 at 14:29 Steve Dower wrote: > [SNIP] > > * "We could have 'else', we don't need '??'" > > This is the "a else 'default'" rather than "a ?? 'default'" proposal, > which I do like the look of, but I think it will simultaneously mess > with operator precedence and also force me