ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 12 Aug 2011 12:46:40 +0200Why does @parallel change my outputs?https://ask.sagemath.org/question/8269/why-does-parallel-change-my-outputs/Can someone explain this behavior to me:
sage: @parallel
....: def foo(n):
....: return str(factor(n))
....:
sage: foo(10)
'2 * 5'
sage: for x in foo([1..10]):
....: print x[0][0][0]
....:
1
2
3
4
5
6
7
8
9
10
I expected to get the factorizations of 1 .. 10, not the numbers 1 .. 10. It seems like the output of `foo()` is getting evaluated somehow when it goes through the @parallel decorator. Is this a bug?
benjaminfjonesFri, 12 Aug 2011 12:46:40 +0200https://ask.sagemath.org/question/8269/