Commit a617e208 authored by Benjamin Peterson's avatar Benjamin Peterson

mention from_float() in error message

parent a43f34cc
...@@ -648,8 +648,8 @@ class Decimal(object): ...@@ -648,8 +648,8 @@ class Decimal(object):
return self return self
if isinstance(value, float): if isinstance(value, float):
raise TypeError("Cannot convert float to Decimal. " + raise TypeError("Cannot convert float in Decimal constructor. "
"First convert the float to a string") "Use from_float class method.")
raise TypeError("Cannot convert %r to Decimal" % value) raise TypeError("Cannot convert %r to Decimal" % value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment