Getting references to obect instances into a list

parent.eric.3 at parent.eric.3 at
Wed Aug 27 17:32:52 CEST 2008

Thanks for your reply Simon.

I will read the article you told me to but first, please, have a look
at this snippet:

>>> m = [2,3,4]
>>> p = ['a','b','c']
>>> q = [m,p]
>>> q
[[2, 3, 4, 'a', 'b', 'c'], ['a', 'b', 'c']]
>>> del p
>>> q
[[2, 3, 4, 'a', 'b', 'c'], ['a', 'b', 'c']]

How come q is not updated after I deleted p?

This is my point.

More information about the Python-list mailing list