commit | a617e208fc9fcb8022f429bca20818c472ad9a4e | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Mon Jan 25 03:52:52 2010 +0000 |
committer | Benjamin Peterson <benjamin@python.org> | Mon Jan 25 03:52:52 2010 +0000 |
tree | 056b9947739ffa1846c24e3ac3577fad7f36b244 | |
parent | a43f34cc2a7a55cea794ecb9bda2eea5c685d1f3 [diff] [blame] |
mention from_float() in error message
diff --git a/Lib/decimal.py b/Lib/decimal.py index 4caa4ce..51b87d9 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py
@@ -648,8 +648,8 @@ 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)