De acuerdo con la documentación de Python¿Se ha producido realmente OverflowError?
exception OverflowError
Raised when the result of an arithmetic operation is too large to
be represented. This cannot occur for long integers (which would
rather raise MemoryError than give up) and for most operations with
plain integers, which return a long integer instead. Because of the
lack of standardization of floating point exception handling in C,
most floating point operations also aren’t checked.
De hecho, este error tenía sentido cuando los enteros que desbordan no se convirtieron a largo automáticamente. Del mismo modo, flotan desbordamiento a inf
. Realmente no veo ninguna situación en la que el intérprete estándar todavía pueda generar OverflowError. ¿Hay tal caso en alguna parte? Solo una curiosidad
bien, interesante. Hubiera esperado que se convirtiera a "inf" .' >>> a = 1e1000 >>> a inf' –