New submission from Mark Dickinson: [Broken out of the issue 16469 discussion about infinity -> Fraction and nan -> Fraction conversions.]
Conversions from float('inf') or Decimal('inf') to int (or Fraction) currently generate an OverflowError, while conversions from nan give a ValueError. I'm of the opinion that it would make more sense for both conversions to generate ValueError, and I'm opening this issue to track discussion for that. There's also a reasonable case that the behaviour is fine as it is, and there's little to be gained by changing it. ---------- messages: 175642 nosy: mark.dickinson priority: normal severity: normal status: open title: Make int(float('inf')) raise ValueError rather than OverflowError. type: enhancement versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16483> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com