[issue16469] Exceptions raised by Fraction() from those raised by int()

2012-11-14 Thread Mark Dickinson
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 V

[issue16469] Exceptions raised by Fraction() from those raised by int()

2012-11-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, mark.dickinson, rhettinger, skrah type: -> behavior ___ Python tracker ___ ___ Pyth

[issue16469] Exceptions raised by Fraction() from those raised by int()

2012-11-13 Thread Case Van Horsen
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 "", line 1, in ValueError: cannot convert float NaN to int