On Sat, May 15, 2021 at 3:51 AM Martin Teichmann
Hi Chris,
I think you did not get my point. I do not want to allow x/y. I want to only allow literals, as in 3/2. This would then be a new kind of literal, that has the type of Fraction. Much like 2.5 is a float, but x.y means something completely different, even though it has no spaces. So x/y would mean "divide x by y" or actually call __truediv__ on x plus some details, while 2/3 would just be the constant two-thirds. 2 / 3 would then mean the same as it used to: divide 2 by 3, giving some 0.666ish.
Ahhh, I see what you mean. That's more plausible than what I was thinking of, but I think it'd still be cleaner to just adorn an integer with a letter to mark that it should be a Fraction instead (since Fraction divided by int, or int divided by Fraction, will yield the correct Fraction result). ChrisA