3 ms·
Unless you come from a programming background where floor behavior is expected for integers, it was strange. In Python 2: 20 / 15 = 1 In Python 3: 20 / 15 = 1
by AnIdiotOnTheNet 5y ago
Unless you come from a programming background where floor behavior is expected for integers, it was strange.
In Python 2: 20 / 15 = 1
In Python 3: 20 / 15 = 1.3333333333333333
To get the old behavior a new operator was added "//"
- guenthert 5y ago> Unless you come from a programming background where floor behavior is expected for integers, it was strange. In all fairness, the C/C++ and Java communities were and are quite substantial. Of course the rest of us ought to expect 4/3 as the result of 20/15 ;-)