Secondo la documentazione pythonè effettivamente rilevato 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.
In effetti, questo errore aveva senso quando interi traboccanti non sono stati convertiti in tempo automaticamente. Allo stesso modo, float overflow su inf
. Non vedo davvero alcuna situazione in cui l'interprete standard possa ancora generare OverflowError. C'è un caso del genere da qualche parte? Solo una curiosità
ok, interessante. Mi sarei aspettato che fosse convertito in "inf" .' >>> a = 1e1000 >>> a inf' –