I understand that intuitively float('inf') // 1 being equal to
infinity is nice, but it is inherently undefined. We don't really have
the concept of undefined so NaN seems most acceptable.
The most acceptable would be to have x // 1 do the same as math.floor(x) for any float x. Note that math.floor() behavior changed from 2.x to 3.x:
Python 2.7.7:
>>> math.floor(float('inf'))
inf
Python 3.4.1:
>>> math.floor(float('inf'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: cannot convert float infinity to integer
It looks like float // float case was overlooked when it was decided that math.floor() should return int.