3 ms·
When would this evaluate to False ?
by reportgunner 4y ago
When would this evaluate to False ?
- planede 4y agoApparently it's False in python2. Python2 does integer division that rounds towards negative infinity. It makes the order of operations important in -1/3. (-1)/3 (and hence -1/3) evaluates to -1, and -(1/3) evaluates to 0.