算術演算の結果が大きすぎて表現できない場合に発生します。これは整数では発生しません (諦めるのではなく MemoryError が発生するでしょう)。ただし、歴史的な理由により、必要な範囲外の整数に対して OverflowError が発生することがあります。 C では浮動小数点例外処理が標準化されていないため、ほとんどの浮動小数点演算はチェックされません。
Google Translate · 自動翻訳です。専門用語や適用条件は英語の原文で確認してください。
公式の説明 · 原文
Raised when the result of an arithmetic operation is too large to be represented. This cannot occur for integers (which would rather raise MemoryError than give up). However, for historical reasons, OverflowError is sometimes raised for integers that are outside a required range. Because of the lack of standardization of floating-point exception handling in C, most floating-point operations are not checked.
変更内容: English prose extracted; whitespace normalized; Korean context and classified official links added. Python code examples not redistributed. 翻訳された説明には、自動翻訳であることを表示しています。