Module: sage.structure.mutability
Mutability Pyrex Implementation
Class: Mutability
Functions: is_immutable,
is_mutable,
set_immutable
) |
Return True if this object is immutable (can not be changed) and False if it is not.
To make this object immutable use self.set_immutable().
sage: v = Sequence([1,2,3,4/5]) sage: v[0] = 5 sage: v [5, 2, 3, 4/5] sage: v.is_immutable() False sage: v.set_immutable() sage: v.is_immutable() True
) |
Make this object immutable, so it can never again be changed.
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.
Special Functions: __init__,
__reduce__,
_require_mutable
) |
) |
See About this document... for information on suggesting changes.