diff options
Diffstat (limited to 'Lib/_pydecimal.py')
| -rw-r--r-- | Lib/_pydecimal.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/_pydecimal.py b/Lib/_pydecimal.py index eb7bba8e93..02365cad2c 100644 --- a/Lib/_pydecimal.py +++ b/Lib/_pydecimal.py @@ -1026,11 +1026,9 @@ class Decimal(object): """ if self._is_special: if self.is_nan(): - raise ValueError("Cannot pass NaN " - "to decimal.as_integer_ratio.") + raise ValueError("cannot convert NaN to integer ratio") else: - raise OverflowError("Cannot pass infinity " - "to decimal.as_integer_ratio.") + raise OverflowError("cannot convert Infinity to integer ratio") if not self: return 0, 1 |
