[Python-ideas] Deprecate the round builtin
Terry Reedy
tjreedy at udel.edu
Mon Oct 1 05:17:55 CEST 2012
On 9/30/2012 6:19 PM, Joshua Landau wrote:
> >>> math.ceil("")
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> TypeError: *a float is required*
>
>
> How deceptive... I hope you forgive me for not realizing that (even
> though I must have seen the __ceil__ and __floor__ methods a thousand
> times).
> OK, carry on.
The obsolete error message should be fixed. A number is required. Or
perhaps 'float or number with __ceil__ method'.
--
Terry Jan Reedy
More information about the Python-ideas
mailing list