Please see this discussion on python-list:

https://groups.google.com/forum/#!topic/comp.lang.python/maDZoc-n4bA

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?


Thanks,
Ram.