Adding an attribute to a function is easy and clearing attribute is easy also. But I don't know really how to restore the attributes of a function to its defaults. All I do is quit the kernel or close Mathematica and open again.
any idea?
Update
For example :
Log // Attributes
(* {Listable, NumericFunction, Protected} *)
ClearAttributes[Log, Listable]
Log // Attributes
(* {NumericFunction, Protected} *)
Now is there any way to restore the attributes of Log
to its defaults other than SetAttributes
or quitting Mathematica?
Thanks.
SetAttributes[f, {Listable, Orderless}]; ClearAttributes[f, Attributes@f]; Attributes@f
$\endgroup$Quit[]
, i.e.,Quit Kernel
without having to start a new front-end session. $\endgroup$Log
has the attributeProtected
. Why can we change its attributes without unprotecting it -Unprotect[Log]
- in the first place? $\endgroup$