3 ms·
It’s a crutch. I was first burned by Python back when 2/7 == 0 and avoided numpy etc for years.
by syntaxfree 4y ago
It’s a crutch. I was first burned by Python back when 2/7 == 0 and avoided numpy etc for years.
- donkeybeer 4y agoI prefer that behavior. Integers should behave like integers, if you want the floating point division you should write 2.0/7 . Of course now that we have distinct / and // its less of a problem but then it becomes a problem of which behavior do you expect more often, integer or float.