Martin v. Löwis added the comment:

The description of OverflowError is that is is "raised when the result of an 
arithmetic operation is too large to be represented", so it doesn't actually 
need to overflow. Still, I see that ∞ actually isn't too large to be 
represented (and the documentation points out that integer operations will 
raise MemoryError instead of OverflowError). So yes, ValueError seems more 

+1 for fixing this in 3.4, only.

nosy: +loewis

Python tracker <>
Python-bugs-list mailing list

Reply via email to