Hello,

I think this is normal.  Perhaps you meant the following (note the *
which expands the single argument into its components):

sage: for x in itertools.chain(*itertools.imap(Permutations,range(4))):
    print x
[]
[1]
[1, 2]
[2, 1]
[1, 2, 3]
[1, 3, 2]
[2, 1, 3]
[2, 3, 1]
[3, 1, 2]
[3, 2, 1]

Best,
Jason

William Laffin wrote:
> Hello helpful sage-support list!
> 
> Is this the following normal behavior?
> 
> sage: import itertools
> sage: for x in itertools.imap(Permutations,range(4)):
> .....:     for y in x:
> .....:         print y
> .....:
> []
> [1]
> [1, 2]
> [2, 1]
> [1, 2, 3]
> [1, 3, 2]
> [2, 1, 3]
> [2, 3, 1]
> [3, 1, 2]
> [3, 2, 1]
> sage: for x in itertools.chain(itertools.imap(Permutations,range(4))):
>     print x
> .....:
> Standard permutations of 0
> Standard permutations of 1
> Standard permutations of 2
> Standard permutations of 3
> sage:
> 
> thanks,
> William Laffin
> Michigan Tech
> 

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

To unsubscribe, reply using "remove me" as the subject.

Reply via email to