Attributes [symbol]
gives the list of attributes for a symbol.
Attributes ["symbol"]
gives the attributes for the symbol named "symbol" if it exists.
Attributes [{s1,s2,…}]
gives a list of the attributes for each of the si.
Attributes
Attributes [symbol]
gives the list of attributes for a symbol.
Attributes ["symbol"]
gives the attributes for the symbol named "symbol" if it exists.
Attributes [{s1,s2,…}]
gives a list of the attributes for each of the si.
Details
- The attributes of a symbol can be set by assigning a value to Attributes [s]. If a single attribute is assigned, it need not be in a list.
- Attributes [s]={} clears all attributes of a symbol.
- Attributes for functions must be set before any definitions that involve the functions are given.
- The complete list of possible attributes for a symbol f is:
-
Constant all derivatives of f are zeroFlat f is associativeHoldAll all the arguments of f are not evaluatedHoldAllComplete the arguments of f are completely shielded from evaluationHoldFirst the first argument of f is not evaluatedHoldRest all but the first argument of f are not evaluatedListable f is automatically "threaded" over listsLocked attributes of f cannot be changedNHoldFirst the first argument of f is not affected by NNumericFunction the value of f is assumed to be a number when its arguments are numbersOneIdentity f[a], f[f[a]], etc. are equivalent to a in pattern matchingOrderless f is commutativeProtected values of f cannot be changedReadProtected values of f cannot be readSequenceHold Sequence objects in the arguments of f are not flattened outTemporary f is a local variable, removed when no longer used
- Attributes has attributes Listable and HoldAll .
Examples
open all close allBasic Examples (2)
Attributes for an existing symbol:
Set attributes for a new symbol:
Scope (1)
Attributes of a symbol:
Attributes of several symbols in a list:
The symbol can be given as a string:
Properties & Relations (4)
Add a single attribute to the symbols f and g:
SetAttributes adds to the already existing attributes; Attributes [g]=… resets them:
An assignment to Attributes is associated with f, not with Attributes :
Protecting a symbol is equivalent to setting the Protected attribute:
Attributes has the attribute HoldAll :
This gives the attributes of the symbol syms itself:
This gives the attributes of all symbols in the list syms:
Tech Notes
Related Guides
History
Introduced in 1988 (1.0) | Updated in 1996 (3.0)
Text
Wolfram Research (1988), Attributes, Wolfram Language function, https://reference.wolfram.com/language/ref/Attributes.html (updated 1996).
CMS
Wolfram Language. 1988. "Attributes." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/Attributes.html.
APA
Wolfram Language. (1988). Attributes. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Attributes.html
BibTeX
@misc{reference.wolfram_2025_attributes, author="Wolfram Research", title="{Attributes}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/Attributes.html}", note=[Accessed: 04-January-2026]}
BibLaTeX
@online{reference.wolfram_2025_attributes, organization={Wolfram Research}, title={Attributes}, year={1996}, url={https://reference.wolfram.com/language/ref/Attributes.html}, note=[Accessed: 04-January-2026]}