Re: Getting references to obect instances into a list

2008-08-27 Thread Timothy Grant
On Wed, Aug 27, 2008 at 8:32 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > 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'

Re: Getting references to obect instances into a list

2008-08-27 Thread [EMAIL PROTECTED]
Ok then, my mistake: I thought 'del' was deleting the object AND releasing the name for later user. Sorry! This is what I should have tried in the first place: >>> m = [2,3,4] >>> p = ['a','b','c'] >>> l = [m,p] >>> l [[2, 3, 4], ['a', 'b', 'c']] >>> p.append('w') >>> p ['a', 'b', 'c', 'w'] >>> l

Re: Getting references to obect instances into a list

2008-08-27 Thread Tim Golden
Marc 'BlackJack' Rintsch wrote: On Wed, 27 Aug 2008 08:32:52 -0700, [EMAIL PROTECTED] wrote: Thanks for your reply Simon. I will read the article you told me to but first, please, have a look at this snippet: [... snipped snippet plus Mark's comment ...] I think, in short, the best thing fo

Re: Getting references to obect instances into a list

2008-08-27 Thread Jeremy Sanders
[EMAIL PROTECTED] wrote: > 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']] >

Re: Getting references to obect instances into a list

2008-08-27 Thread Simon Brunning
2008/8/27 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > 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'], ['

Re: Getting references to obect instances into a list

2008-08-27 Thread Marc 'BlackJack' Rintsch
On Wed, 27 Aug 2008 08:32:52 -0700, [EMAIL PROTECTED] wrote: > Thanks for your reply Simon. > > I will read the article you told me to but first, please, have a look at > this snippet: Please read the article! m = [2,3,4] p = ['a','b','c'] q = [m,p] q > [[2, 3, 4, 'a', 'b',

Re: Getting references to obect instances into a list

2008-08-27 Thread [EMAIL PROTECTED]
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

Re: Getting references to obect instances into a list

2008-08-27 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Hi, I would like to get the references to objets to put in a huge data structure (like a list or a heap for example). My objective is to use as less memory as possible as I have to manage huge amount of entries in my data structure and need to use the same elsewhere.

Re: Getting references to obect instances into a list

2008-08-27 Thread Simon Brunning
2008/8/27 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > I would like to get the references to objets to put in a huge data > structure (like a list or a heap for example). My objective is to use > as less memory as possible as I have to manage huge amount of entries > in my data structure and need to us