mention from_float() in error message

This commit is contained in:
Benjamin Peterson 2010-01-25 03:52:52 +00:00
parent a43f34cc2a
commit a617e208fc
1 changed files with 2 additions and 2 deletions

View File

@ -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)