From: Bruce S. <bas...@un...> - 2002-10-04 14:52:44
|
Many thanks for this important supplement, Arthur. I should have made this comment, but at the moment I was writing I couldn't remember how to do it! Bruce Sherwood ----- Original Message ----- From: "Arthur" <aj...@ix...> To: "Bruce Sherwood" <bas...@un...>; "vpusers" <vis...@li...> Sent: Friday, October 04, 2002 9:13 AM Subject: Re: [Visualpython-users] Re: strange output > I think it worth supplementing Bruce's analysis with the solution to what > was trying to be accomplished by > > rininitial = ball.pos > > I believe either: > > rinitial = ball.pos[:] > > or > > rinitial =copy(ball.pos) > > would get one to where one is trying to go. > > [:] returns a complete "slice" of the list. > copy, of course, a copy of the list. > > In either case rinitial is no longer an additional name for ball.pos, but an > object independant of it, which will not be modified upon the modification > of ball.pos. > > I think I have this right. Corrections welcome. > > Art |