On Jun 6, 6:40 am, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > Hi Diez, > > Thanks, I thought it worked similar to C++ where a higher compound > could access a lower section.
It can 'access a lower section'; what it can't do is *change* that 'lower section'; in your example case with an int, this matters because ints are immutable. Lists, on the other hand, are mutable. You can *access* the methods of the list that mutate it. You're always working with the same list, but it has different contents when you mutate it. > But as it is not straight forward, I > think it is better to embed the functionality inside a class, and make > it a member variable .. now why didn't I think of that ;-) -- http://mail.python.org/mailman/listinfo/python-list