[Python-ideas] PEP 505: None-aware operators: operators ?= and ?? and OR
Nathan
nathan.mugnier at wanadoo.fr
Thu Jul 19 09:20:27 EDT 2018
Hello.
Even if I'm -1 on the general idea of a None-aware, for a lot of reason already mentionned in this thread, the syntax "??" proposed (that I find much less readable than the current version) is still better IMHO.
How many programmer will read "||" or "OR" as a classic "or" operator? Programmers needs to learn the language, but making it easy for them to understand and learn is important in python.
More than that, if you use "||" or "OR" thinking you use "or", nothing will help you to understand what isn't working in your code.
So -1 on that idea even if PEP 505 were accepted.
Nathan Mugnier
> Message du 19/07/18 15:06
> De : "Pål Grønås Drange"
> A : "Jonathan Fine"
> Copie à : "Python-Ideas"
> Objet : Re: [Python-ideas] PEP 505: None-aware operators: operators ?= and ?? and OR
>
>
> I've started a subthread, just to discuss the ?= and ?? operators. And
> > something newish, that I call OR.
I would think `||` would be much better.
It could be a kind of "semantic or" which could use the aforementioned dunder has_value.
-1, though, but to the general None-awareness.
Pål
_______________________________________________
Python-ideas mailing list
Python-ideas at python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180719/ca5ef9a3/attachment.html>
More information about the Python-ideas
mailing list