Thread: float()
View Single Post
  #25  
Old 08-17-2010, 10:59 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by Riot View Post
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.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote