On Friday, May 3, 2019 at 11:18:40 PM UTC-7, Daniel Krenn wrote:
>
> On 04.05.19 06:04, Andrew wrote: 
> > The `Permutation` function is more general. For example, the folllowing 
> > all work: [...] 
>
> Thank you. But sorry, this does not answer my question. Maybe I should 
> be more precise: 
>
> What is the idea behind 
> | 
> sage: Permutation([5,4,3,2,1]).parent() 
> Standard permutations 
> sage: Permutation('(1,5)(2,4)(3)').parent() 
> Standard permutations of 5 
> | 
> returning different parents? (I.e. why the diffent parent depending on 
> the input format?) 
>

Not an answer, but similar examples:

sage: Permutation([1,2,3]).parent() # list
Standard permutations
sage: Permutation((1,2,3)).parent() # tuple
Standard permutations of 3
sage: Permutation('[1,2,3]').parent() # string
Standard permutations of 3
sage: Permutation('(1,2,3)').parent() # string
Standard permutations of 3

I don't know why, but I can see in the code that if you pass a list of 
integers, it calls "Permutations()([...])", whereas the most of the other 
cases do something else.

-- 
John


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to