> Perhaps should we have a "mutable" argument (True by default to be consistent > with the current behaviour) in the matrix/vector constructors, so that we can > do: > > {vector(m.row(0), mutable=False) for m in blah}
That would be a "working fix", but really the problem is that operations between immutable objects stubbornly keep returning immutable objects that you don't want. I don't expect to see "immutable + immutable = mutable" become practical anytime soon. sage: M = Matrix() sage: M.set_immutable() sage: hash(M+M) ... TypeError: mutable matrices are unhashable sage: hash(tuple()+tuple()) 3527539 And of course the same happens with our clusmy "copy" policy. But when people refuse to see something, well... Nathann -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.