[sage-support] Re: strange list behavior

2008-01-09 Thread benjamin antieau
This indeed fixes the problem, and clarifies some other things for me as well. Thanks for your quick response Jonathan. Ben On Jan 9, 11:59 pm, Jonathan Bober <[EMAIL PROTECTED]> wrote: > Hi. > > short answer: immediately after the line > > while i < 4: > > add the line > > P = [0,0] > > Yo

[sage-support] Re: strange list behavior

2008-01-09 Thread Jonathan Bober
Hi. short answer: immediately after the line while i < 4: add the line P = [0,0] Your problem seems to be that when you put something in a list, python does not make a copy of it, but instead stores that actual object in the list. So the line pts.append(P) appends the object P (or, rath