Please see this discussion on python-list:
Currently `float('inf') //1` is equal to NaN. I think that this is really weird. If I understand correctly it's to maintain the invariant `div*y + mod == x`. The question is, do we really care more about maintaining this invariant rather than providing a mathematically reasonable value for floor division?