TYVM Diez and Jerry
Now I understand how this works
--
http://mail.python.org/mailman/listinfo/python-list
> Because you declare myList to be a *class*-level variable, which means *all*
> instances of that class (a and b in your case) *share* it. Python does not
> declare *instance* variables the way you do.
>
> Instead, do this:
>
> class Foo(object):
> def __init__(self):
> self.myList = [
Learning python I was rewriting some of my old programs to see the
pros and cons of python when a steped in some weird (at least for me)
behavior.
Here it is simplified
The code:
>>> class Test1:
myList = [4 for n in range(4)]
myInt = 4
>>> a = Test1()
>>> b = Test1()
>>> a.myLis