On Sun, Jan 9, 2011 at 8:09 AM, Volker Braun <vbraun.n...@gmail.com> wrote: > The documentation of Sequence.set_immutable() is quite clear. "Never" means > that there is no way: > > Definition: Sequence.set_immutable(self) > Docstring: > Make this object immutable, so it can never again be changed. > > EXAMPLES: > > sage: v = Sequence([1,2,3,4/5]) > sage: v[0] = 5 > sage: v > [5, 2, 3, 4/5] > sage: v.set_immutable() > sage: v[3] = 7 > Traceback (most recent call last): > ... > ValueError: object is immutable; please change a copy instead. >
And you definitely should *not* do this (continuing the above example): sage: v._is_immutable = False sage: v[3] = 7 sage: v [1, 2, 3, 7] sage: But if you for some reason needed to right now to get your own work done, I guess you might as well. William -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org