Python's int(x) Rounds Towards Zero

I was surprised to learn that Python's int function rounds floats towards zero.
Here's the relevant excerpt from the official docs:

[…] For floating point numbers, this truncates towards zero.

Example
from math import floor
assert(int(-0.8) == 0)
assert(floor(-0.8) == -1)

If you want the floored result, you need to use math.floor.