Hi. I just tried this very simple function with sage 6.8 on ubuntu 14.04
obtaining a very strange output.
def pvec(p,n):
if n == 1:
return [[i] for i in range(0,p)]
l = pvec(p,n-1)
nl = []
for i in range(0,p):
for v in l:
nv = v
nv.append(i)
nl.append(nv)
return nl
pvec(2,2)
[[0, 0, 1], [1, 0, 1], [0, 0, 1], [1, 0, 1]]
It happens that the value of the list l changes for different values of i.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.