> I would also be very happy if 1-based permutations were not at the same > time 0-based words, i.e.: > > sage: Permutation([3,2,1])(1) > 3 > sage: Permutation([3,2,1])[1] > 2 >
I understand your concern but on the other hand, the following behavior is good: sage: Permutation([3,2,1]) [3, 2, 1] sage: list(Permutation([3,2,1])) [3, 2, 1] sage: list(Permutation([3,2,1]))[0] 3 sage: list(Permutation([3,2,1]))[0] == Permutation([3,2,1])[0] True I wouldn't want list(perm) to return something different than the permutation word itself, especially because I want to have: sage: perm = Permutation([3,2,1]) sage: Permutation(list(perm)) == perm True I'm afraid that by "fixing" this, we would just break other things and obtain very annoying behavior in practice. For me the 0-based word is not really a problem. People who want to stay strictly 1-based can use only the call perm(i) and you need perm[i] only when digging inside the structure itself. Best, Viviane -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.