Possible Duplicate:
Why do Python's math.ceil() and math.floor() operations return floats instead of integers?
From the Python documentation of math.ceil
...
math.ceil(x)
Return the ceiling of x as a float, the smallest integer value greater than or equal to x.
Why did they consider float
to be better? After all, the ceil of a number is by definition an integer and operations requiring real numbers can easily convert from int
to float
, but not necessarily the other way around, like in the case of [0] * ceil(x)
.