14.05.21 15:12, Martin Teichmann пише: > when dividing two integers, the result is a float, which means we immediately > lose precision. This is not good if you want to use code which supports > higher precision. Decimals come to mind, but also sympy. This loss of > precision could be avoided if the result of a division is a fraction instead: > a fraction is exact.
Please read http://python-history.blogspot.com/2009/03/problem-with-integer-division.html . In short, it was a feature of Python's predecessor, ABC. But it turned out to be not as good as it seemed at first glance. Fixing this mistake was one of causes of creating Python. _______________________________________________ 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/GU56CA7VEE2QFENSGO4HMZOORR22MOUX/ Code of Conduct: http://python.org/psf/codeofconduct/