[issue20539] math.factorial may throw OverflowError

Stefan Krah report at bugs.python.org
Thu Apr 10 15:08:56 CEST 2014


Stefan Krah added the comment:

Mark Dickinson <report at bugs.python.org> wrote:
> > the whole idea of OverflowError seems slightly outdated.
> 
> Well, not entirely.  It's still got a place for overflow of mathematical operations, and I think it's clearly the correct exception in that case (indeed, it's about the only case I can think of where OverflowError is clearly the correct exception).

Indeed, I was focusing on integer arithmetic and assignments. For float
operations and conversions OverflowError is quite natural.

> (3) Given the lack of clarity about which exception types are appropriate where, I think we shouldn't be changing exception types unless/until there's a clear vision of where we want to end up.  Getting that clear vision may require a python-dev discussion.

Using OverflowError for now sounds like a good plan.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20539>
_______________________________________


More information about the Python-bugs-list mailing list