diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-01-25 03:52:52 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-01-25 03:52:52 +0000 |
commit | a617e208fc9fcb8022f429bca20818c472ad9a4e (patch) | |
tree | 056b9947739ffa1846c24e3ac3577fad7f36b244 /Lib/decimal.py | |
parent | a43f34cc2a7a55cea794ecb9bda2eea5c685d1f3 (diff) | |
download | cpython-git-a617e208fc9fcb8022f429bca20818c472ad9a4e.tar.gz |
mention from_float() in error message
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r-- | Lib/decimal.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index 4caa4cea79..51b87d9ed6 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -648,8 +648,8 @@ class Decimal(object): return self if isinstance(value, float): - raise TypeError("Cannot convert float to Decimal. " + - "First convert the float to a string") + raise TypeError("Cannot convert float in Decimal constructor. " + "Use from_float class method.") raise TypeError("Cannot convert %r to Decimal" % value) |