On Fri, May 14, 2021, 4:31 PM Jonathan Fine <jfine2...@gmail.com> wrote:

>     >>> 1/2 + 1/3
>>     5/6
>>     >>>> 1 / 2 + 1 / 3
>>     0.833333
>>
>
> I'm sighted. I can see the difference. I suspect a blind person using a
> screen reader would struggle a lot to spot the difference. (I don't know
> enough about screen readers to be sure.)
>

There's also the fact that approximately 50% of the Python code I've
written will now be broken. If you reverse the meaning, it will be the
complementary 50%.

-100 on this idea.

Actually, even though I suggested before that I liked `1F/3` before, or
perhaps `1/3F` (or either with type coercion rules), I think I've gone to
-0.5 for that also.

Basically, the fact I can do (and often have done) this makes it needless:

from fractions import Fraction as F
x = F(1, 3)

Yours, David...

P.S. A very long time ago, Python only had floor division of ints. I wrote
plenty of `1.0*x/y` code to work around that. It wasn't the worst thing,
but I understand the convenience of promotion to float.

However, the existing `/` was given a backwards incompatible meaning of
"true division" and the new `//` operator took on floor division. I still
believe that was the wrong way around. I thought the existing operator
should keep the same meaning, and a new operator could mean something else.
But so it goes; I adjusted, of course.

Nowadays I remember the distinction by thinking of the first slash as
division, and the second one as the "floor operator." It's a mnemonic, not
the actual machinery, but it works for my brain.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/XW6BM6DETD6D34D5WKRUOJVVSN4BDGO7/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to