On 2014-09-09, Nicolas M. Thiery <nicolas.thi...@u-psud.fr> wrote: > On Fri, Sep 05, 2014 at 05:00:29PM +0200, Nathann Cohen wrote: >> > I just had a quick look at it, and the following looks downright >> scary: >> It is one of this code's many wonders. Also, note that : >> sage: Permutation([1,2,3]) >> [1, 2, 3] >> sage: Permutation((1,2,3)) >> [2, 3, 1] >> I hate that code. > > So do I. However this has nothing to do with the ticket at hand which > is about how *permutation group elements* act on matrices: > > Permute the rows and columns of ``self`` by applying the > permutation group elements ``row_permutation`` and > ``column_permutation`` respectively. > > I'd like to have feedback on that part.
How about going all the way and permit proper GAP-like syntax for permutations? That is, the preparser should replace (1,2,3)(4,5)(7,8) with Permutation(['(1,2,3)','(4,5)','(7,8)']) It looks tricky, as ( ...) (..) pattern might make sense in Python if everything except the last (..) is a function, e.g. (lambda x,y: x+y)(x,y) is valid Python, so this needs to be tested... This should not be hard if it can only be a lambda form though. Perhaps I am missing some obvious case that makes such a feature not possible within the current perparser limitations. Dima > > Cheers, > Nicolas > -- > Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net> > http://Nicolas.Thiery.name/ > -- 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.