I want to say that the behavior is similar (and historical) to what atoi/atol do in that they read and convert as much of the string as possible. See for example atoi(3) which mentions the behavior is due to the C standard and should prossibly be replaced with strtol or the like.
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: Weird behavior of int()
by Fletch
in thread Weird behavior of int()
by cLive ;-)
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |