mutable

Able to be changed in place after it is created, like most lists, arrays and objects in languages such as Python and JavaScript.

In more detail

Changing a mutable object through one name is visible through every other name that refers to it, which is the root of many aliasing surprises. Copying before changing, or using immutable values, avoids those surprises. In Python, mutable built-in types such as lists, dictionaries and sets are not hashable, so they cannot be dictionary keys or set members.

Related terms

Taught in

References

Certification courses