Quote:
Originally Posted by Riot
In my opinion, the fact that float returns -1 on error makes less sense then "123str" returning 123.
|
What doesn't make sense about float('123str') returning 123? Just look at it semantically: float() does not imply a function that checks if there are non-mathematical characters. It implies returning a float value.