On Sun, 05 Dec 2004 09:44:13 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote:
[snip] > > This behaviour is due to the way strings are handled. In some cases strings > are 'interned' which > lets the interpreter keep only a single copy of a string. If you try it with > a list you get a > different result: > > >>> s=list('hello') > >>> s > ['h', 'e', 'l', 'l', 'o'] > >>> m=s[:] > >>> m > ['h', 'e', 'l', 'l', 'o'] > >>> m is s > False > > Kent Thanx Kent. so for lists Python doesn't keep the same object in the cache??? So in that case it is not interned & hence any objects created will **point** to seperate area in memory as seen by your >>> m is s #( for lists) >>> False Thanx again :) [snip] -- cheers, Ishwor Gurung -- http://mail.python.org/mailman/listinfo/python-list