Unprotect¶
Status: Stable
documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
Description¶
Unprotect[s1, s2, ...]
removes the attribute Protected from the named symbols and returns the list of their names. Unprotect[{s1, ...}] accepts a list of specs.
Notes
Unprotect has attribute HoldAll; Locked symbols are not affected.Examples (2)¶
Every input below was run against the current Mathilda build and its output recorded.
Basic examples (2)¶
Implementation notes¶
- Both have attributes
{HoldAll, Protected}and hold their arguments. - Neither affects symbols with the attribute
Locked. - The typical sequence for adding rules to an existing symbol is
Unprotect[f]; definition; Protect[f].
Attributes: HoldAll, Protected.
References¶
See also: Protect
- Source:
src/info.c - Specification:
docs/spec/builtins/assignment-and-rules.md - Tests:
tests/test_clearall_remove_protect.c