On Tuesday, 10 August 2021 at 20:54:02 UTC-7 Nils Bruin wrote: > > V=VectorSpace(GF(2),3) > v = V.gen(1) > w = V.gen(2) > v.set_immutable() #this is annoying, but OK > w.set_immutable() #this is again annoying > D={} > D[v]=1 > D[w]=2 > D[v+w]=3 #the error here is uncalled for! > > It's actually worse than that! The stored generators of a vector space are actually immutable! So the session really goes:
V=VectorSpace(GF(2),3) D={} D[V.1]=1 #happy D[V.2]=2 #still happy D[V.1+V.2]=3 # Error??? !@#?! Why is the sum of two vectors now suddenly mutable?? This is a very surprising scenario. It happens in real life. I know because it happened to me. -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/65f48270-2f56-4f52-b227-d2f56c773369n%40googlegroups.com.