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

David Mertz mertz at gnosis.cx
Thu Jul 19 22:13:50 EDT 2018


On Thu, Jul 19, 2018, 9:39 AM Steven D'Aprano <steve at pearwood.info> wrote:

> *Its just spelling*. If it is a useful and well-defined feature, we'll
> get used to the spelling soon enough.
>
> That's not to say that spelling is not important *at all*, or that we
> should never prefer words to symbols. But if the only objection we have is
> "this is useful but I don't like the spelling so -1" then that's
> usually a pretty weak argument against the feature.
>

I could not disagree more. Spelling is extremely important to readability,
and that only goes away partially with familiarity. As a teaching language,
moreover, there will always be a late share of Python users who haven't
become familiar, and for whom "executable pseudo-code" is a big advantage.

I don't believe Python should be ONLY for those who do not already know it,
but neither should it be even half so arcane as this PEP would make it.

Here's are well defined features of the J programming language, for
comparison... very compact too:

For example, in the following contrived expression the exclamation point
<https://en.m.wikipedia.org/wiki/Exclamation_point> !refers to three
distinct functions:

2!!7!4

The function below can be used to list all of the prime numbers between 1
and R with:

2_&{&/x!/:2_!x}'!R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180719/432cd9a1/attachment-0001.html>


More information about the Python-ideas mailing list