Closed wknoben closed 1 year ago
This is to avoid a case where (1) both the numerator and denominator are integer, and (2) Python 2, not 3, is used. A typical example is, 2 / 3 = 0. This is incorrect and is NOT what we want. With float, we can get 2 / 3.0 = 0.6667, which is correct. (reference: https://riptutorial.com/python/example/2797/integer-division)
Adding this explanation as a comment in the code would be good
https://github.com/h294liu/pyviscous/blob/cb5aeef7c288ac1383dc4f06678b2b06e7bea5d4/pyviscous/pyviscous.py#L304