http://qs1969.pair.com?node_id=1189599


in reply to Re^5: solve cubic equations (Python)
in thread solve cubic equations

I guess most people do, but I don't care for it. If I have an integer, I need to use // to divide, or it gets converted to a float. If I have a Fraction, I need to use /, or it gets converted to an integer. You say, "but // always produces an integer, that's so much easier." But I don't see why there has to be a special operator devoted to integers.
>>> from fractions import Fraction >>> x = Fraction(22,7) >>> y = 3 >>> print(x,x/2,x//2) 22/7 11/7 1 >>> print(y,y/2,y//2) 3 1.5 1