That's an unfortunate side effect of the way SymPy Live is currently implemented. It reevaluates expressions every time it executes. In a real Python shell this would work as expected.
Aaron Meurer On Sat, Mar 25, 2017 at 4:56 PM, plonter99 <[email protected]> wrote: > Hi all, > I am new to Sympy. > Going through the tutorial, I tried to do the exercise at > http://docs.sympy.org/latest/tutorial/simplification.html#example-continued-fractions > I noticed that the results were not what I expected, so after exploring a > little bit, it seems that the following is happening: > >>>> import random >>>> l = [1,2,3,4,5] >>>> random.shuffle(l) >>>> l > [5,3,2,4,1] > >>>> l > [2,4,1,3,5] > >>>> l > [5,3,2,1,4] > >>>> l > [3,5,2,4,1] > >>>> l > [2,3,4,1,5] > > > It looks as though l is getting continuously shuffled in-place... > > So, my questions are: > > What can explain this behavior? > Is this a particular issue with my environment? I am running chrome > 49.0.2623.112 on Windows Vista, which is rather old... If it is a general > issue then the example in the tutorial doesn't work, unless I missed > something... > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/2b072897-8414-4cd0-99e5-126b6098cf25%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2Bh0_H0teAQuUb0vyKQFyrNHOba-FRn8sh5SREzNr8Gdw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
