//
can be considered an alias to math.floor() for divisions with return value of type float
. It operates as no-op
for divisions with return value of type int
.
import math
# let's examine `float` returns
# -------------------------------------
# divide
>>> 1.0 / 2
0.5
# divide and round down
>>> math.floor(1.0/2)
0.0
# divide and round down
>>> 1.0 // 2
0.0
# now let's examine `integer` returns
# -------------------------------------
>>> 1/2
0
>>> 1//2
0