Hi, Is there any particular reason why when one tries to iterate over IntegerVectors(k,n) one gets the vectors represented as lists and not tuples? The only difference between the two that I can think of is that lists are mutable and tuples aren't. I cannot see why being mutable is an advantage. On the other hand, if the vectors weren't mutable one could use them as keys to a dictionary e.g.:
sage: p = MixedIntegerLinearProgram() sage: v = p.new_variable() sage: p.set_objective(sum(v[i] for i in IntegerVectors(2,3))) Now I need to write sage: p.set_objective(sum(v[tuple(i)] for i in IntegerVectors(2,3))) Thanks for the answer, Tzanko -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org