Re: Python List Issue

2005-03-30 Thread Greg Ewing
Nick L wrote: I noticed that with python lists, generally when you make a copy of a list (ie, List1 = List2) List1 just becomes a reference to List2 and any modifications done to List1 affects List2. Ok I can live with this but I want to make a completely seperate copy not attached to the original

Re: Python List Issue

2005-03-27 Thread Nick L
Thanks, thats a really handy function "Ron_Adam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, 27 Mar 2005 09:01:20 GMT, "Nick L" <[EMAIL PROTECTED]> > wrote: > > >I've hit a brick wall on something that I'm guessing is pretty simple but > >it's driving me nuts. > > Yes, I

Re: Python List Issue

2005-03-27 Thread Ron_Adam
On Sun, 27 Mar 2005 09:01:20 GMT, "Nick L" <[EMAIL PROTECTED]> wrote: >I've hit a brick wall on something that I'm guessing is pretty simple but >it's driving me nuts. Yes, I've ran across that too a few times. >How on earth can I make a complete seperate copy of a list with out it >being a

Re: Python List Issue

2005-03-27 Thread Nick L
> See copy.deepcopy(). It will make sure that everything gets copied and > nothing just referenced (more or less). So far copy.deepcopy() seems to be working perfectly. Thanks for the input Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: Python List Issue

2005-03-27 Thread Terry Reedy
"Nick L" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've hit a brick wall on something that I'm guessing is pretty simple but > it's driving me nuts. I noticed that with python lists, generally when > you > make a copy of a list (ie, List1 = List2) Python is not C, etc. Assi

Re: Python List Issue

2005-03-27 Thread Robert Kern
Nick L wrote: I've hit a brick wall on something that I'm guessing is pretty simple but it's driving me nuts. I noticed that with python lists, generally when you make a copy of a list (ie, List1 = List2) List1 just becomes a reference to List2 and any modifications done to List1 affects List2. Ok