Vincent, Travis, Dima : there's a new patch at #13742. It does nothing. It just checks input. It adds tests and warnings. And I lost half a day and a lunch because of very bad work.
Feel free to edit the patch as you like. I just want to be sure I can trust permutations when I build one. Honestly, for me the only good solution is to remove Permutations from Sage and let everything break. Then say "if you need it, write it". 5 years of waiting for it to happen have not done much good. Nathann On Tuesday, November 20, 2012 10:03:33 AM UTC+1, Dima Pasechnik wrote: > > On 2012-11-18, Nathann Cohen <nathan...@gmail.com <javascript:>> wrote: > > --90e6ba6e8e1cedba1504cec69dea > > Content-Type: text/plain; charset=ISO-8859-1 > > > > Hellooooooo guys. > > > > Here's how you can get an infinite loop in two lines with Permutation. > > > > sage: p = > > > Permutation([(1,10,11,13,9,3,16,0,22),(8,2,15,18,24,26,20,21,4),(5,6,17,12,25,7,23,14,19)]) > > > > sage: p.to_cycles() > > > > Of course it has to be because my permutation goes from 0 to n-1 while > the > > code expects 1-n. > > > > It is all very nice. Now, if the code does not work, we should just > refuse > > to build the corresponding permutations, and say it only works with > > integers. Otherwise it has to be fixed quicjky or all this code is > totally > > useless. > be my guest, open a ticket, propose an easy patch to > combinat/permutation.py, > cc to me :) > > -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To view this discussion on the web visit https://groups.google.com/d/msg/sage-combinat-devel/-/tRS-OnMqxiIJ. To post to this group, send email to sage-combinat-devel@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.