[Python-ideas] PEP 505: None-aware operators: operators ?= and ?? and OR
Jonathan Fine
jfine2358 at gmail.com
Fri Aug 3 04:16:13 EDT 2018
Hi Alexandre
Thank you for your post.
In PEP 505 the context for the example being discussed is:
> Some of these are shown below as examples before and after converting to use the new operators.
You wrote:
> So yes, *strictly speaking* the two chunks of code are not exactly the same.
I see nothing in the context that indicates that given suitable
(Python) context, the before and after expressions give different
values. I assumed the before and after values were intended to be the
same.
By the way, I think that even without your *strictly speaking*, the
two chunks of code are not exactly the same (in that they can give
different values from identical inputs).
> In practice, they'll act the same way given sensible inputs.
For me, the truth or falsity of this statement requires more than the
peep-hole view of the code supplied by the PEP. Your argument for its
truth certainly looked beyond the PEP.
I think lack of clarity can mislead, and prevents the PEP performing
properly one of its key functions
===
https://www.python.org/dev/peps/pep-0001/#what-is-a-pep
The PEP should provide a concise technical specification of the
feature and a rationale for the feature [being proposed].
===
and so is a bug in the PEP. Fixing it will help the progress of the PEP.
Where to report the bug? Either to Steve Dower, or raise an issue on github.
https://www.python.org/dev/peps/pep-0001/#reporting-pep-bugs-or-submitting-pep-updates
Steve's already been emailed on this. We're waiting to hear back from him.
--
Jonathan
More information about the Python-ideas
mailing list