Re: mutable member, bug or ...

2006-06-12 Thread Sambo
Bruno Desthuilliers wrote: > Sambo a écrit : > >> By accident I assigned int to a class member 'count' which was >> initialized to (empty) string and had no error till I tried to use it >> as string, obviously. Why was there no error on assignment( near the >> end ). > > > Python is dynamical

Re: mutable member, bug or ...

2006-06-04 Thread Bruno Desthuilliers
Sambo a écrit : > By accident I assigned int to a class member 'count' which was > initialized to (empty) string and had no error till I tried to use it as > string, obviously. Why was there no error on assignment( near the end ). Python is dynamically typed - which means that it's not the name

Re: mutable member, bug or ...

2006-06-04 Thread Fredrik Lundh
Sambo wrote: > By accident I assigned int to a class member 'count' which was > initialized to (empty) string and had no error till I tried to > use it as string, obviously. Why was there no error on assignment > (near the end ). Python uses dynamic typing, which means that objects have types,