mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	mention from_float() in error message
This commit is contained in:
		
							parent
							
								
									a43f34cc2a
								
							
						
					
					
						commit
						a617e208fc
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -648,8 +648,8 @@ def __new__(cls, value="0", context=None): | ||||||
|             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) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Benjamin Peterson
						Benjamin Peterson