Cast But Not A Cast¶
One frequent way to convert a string to an integer is to + 0 it. And, similarly, a frequent way to convert an integer into a string is to . '', aka concatenate the empty string.
The operators often proceed with a silent cast before running the actual operation. Hence, when using the neutral element of that operator, only the cast remains.
Note also that the silent cast is actually not silent when there is an issue with the conversion, while an actual cast silences these warnings: it is always better to use the cast.
Here are the other cases.
See Also¶
cast, cast, cast and cast [Try me]
Not so silent [Try me]