Python Newbie

Mark Lawrence breamoreboy at yahoo.co.uk
Sun Feb 24 19:38:27 EST 2013


On 25/02/2013 00:08, piterrr.dolinski at gmail.com wrote:
>> For example (I believe it's already been mentioned) "declaring" intX with some integer value does *nothing* to maintain
>>
>> X as an integer:
>>
>> --> intX = 32
>>
>> --> intX = intX / 3.0
>>
>> --> intX
>>
>> 10.6666666666
>>
>
> Yes I did see that it is possible to redefine the type of a variable. But I don't think I would ever do this intentionally; need to be really careful with Python.
>
> Peter
>

Yes this is a big downside with Python.  Sadly it means us poor Python 
programmers have to waste a lot of time and effort testing our code, 
unlike those who use statically typed languages which work perfectly 
once they've been compiled.

-- 
Cheers.

Mark Lawrence




More information about the Python-list mailing list