Grant Edwards
1/21/2008 4:08:00 PM
On 2008-01-21, J. Peng <jpeng@block.duxieweb.com> wrote:
> Python's variable is dynamic type,is it?
> But why this can't work?
>
>>>> 3 + 'a'
It can't work because the compiler has no way of knowing
whether the correct answer is '3a', 0x0d, the color purple, or
to reboot.
> So I see the number 3 can't be converted to string type automacially.
Because I wanted the string 'a' to be converted to an integer
automatically.
--
Grant Edwards grante Yow! A can of ASPARAGUS,
at 73 pigeons, some LIVE ammo,
visi.com and a FROZEN DAQUIRI!!