Re:1/0 = 0
by l_t on Friday August 10, 2018 @07:54PM
(#17737514)
Boolean operators returning values is common, especially in dynamically typed languages. The code is valid in JavaScript, for example, and in Python (except it uses "or" instead of "||").
[ Parent
| on HN ]
Re:1/0 = 0
by user5994461 on Friday August 10, 2018 @08:24PM
(#17737607)
In python, it should probably be corrected with // or 1.0 to make it either an integer division or a float division.