Re: [Python-ideas] PEP 505: None-aware operators

2018-07-20 Thread Judah Levy
One of the big problems with most of the proposed spellings is that question marks to a learner will feel like truthiness tests and not None tests. I would propose adding a new default statement for the most useful part of this PEP, the ?= assignment currently: if x is None: x = blah with `?

Re: [Python-ideas] PEP 505: None-aware operators

2018-07-19 Thread Judah Levy
On Thu, Jul 19, 2018 at 8:47 AM Rhodri James wrote: > On 19/07/18 09:33, Antoine Pitrou wrote: > > There is a use case I sympathize with: the argument-is-None case. For > > that I would suggest a simpler form: "A else B" which would evaluate > > to A if A is not None, otherwise to B (parenthese