Mark Dickinson added the comment:
Certainly TypeError seems inappropriate here, and using ValueError for
conversions from NaN sounds good to me.
I'm not a big fan of the OverflowError for converting infinities to an integer:
nothing's actually overflowed here. I think that should have been
New submission from Case Van Horsen:
When attempting to convert a float(nan), float(inf), or float(-inf),
fractions.Fraction() raises different exceptions than int()
int(float(nan))
Traceback (most recent call last):
File stdin, line 1, in module
ValueError: cannot convert float NaN to
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti, mark.dickinson, rhettinger, skrah
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16469
___