From: Mark Wilden Date: 2008-05-22T23:34:44+09:00 Subject: Re: Why doesn't Float() work the same as Integer()? On May 22, 2008, at 12:41 AM, Sebastian Hungerecker wrote: > Mark Hubbart wrote: >> If a string is provided, then it must follow the same rules as the >> appropriate literal representation.... This is the source of the >> >> differences. So: >>>> Integer("023") #=> 19 >>>> Float("023") #=> 23.0 > > But shouldn't Float("023") return an error in this case? After all > "023" is > not a literal representation of a float (neither is "23"). Again, I think it comes down to pragmatism. It's not what these methods "should" return; it's what it's most -useful- for them to return. ///ark