
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 `?=`: x ?= blah with defalult: default x: blah This a) makes it obvious even to an amateur python-reader that x will only be changed if it does not yet exist, and b) has no similarity to the truthiness checks involved with the standard meaning of `?` as the ternary operator in many other languages. On Fri, Jul 20, 2018 at 8:30 AM Chris Angelico <rosuav@gmail.com> wrote:
On Fri, Jul 20, 2018 at 10:24 PM, Paul Moore <p.f.moore@gmail.com> wrote:
On 20 July 2018 at 13:16, Chris Angelico <rosuav@gmail.com> wrote:
On Fri, Jul 20, 2018 at 10:14 PM, Rhodri James <rhodri@kynesim.co.uk> wrote:
I go with SF fandom's traditional :-) definition: "somebody did it once." If it's been done more than once, it's an honoured tradition.
But if Shakespeare did it, it's just the way the language is.
I think Fortran is the programming world's Shakespeare.
Or maybe COBOL:
"And lo from yonder file a record doth appear"...
Hah! But I was thinking of all those uber-obvious features like "a + b" meaning addition. Those symbols, and the infix style, aren't "traditions" - they're the baseline that we measure everything else against. Also, the use of decimal digits to represent literals; if you *don't* use decimal, you're unusual. (Which makes the Shakespeare Programming Language [1] an ironic example, since it doesn't use decimal digits for numeric literals.)
ChrisA [1] http://shakespearelang.sourceforge.net/report/shakespeare/ _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/