As halirutan notes the original value of list
is retained; only its evaluation is changed by the new assignment a = 1
.
Likewise the evaluation of the Association is also changed:
assoc = <|x -> a|>;
a = 1;
assoc[x]
1
In Mathematica 10.0.2 assoc
is also printed with the evaluated form of a
:
assoc
<|x -> 1|>
Its definition remains unchanged however:
?assoc
Global`assoc
assoc=<|x->a|>
To actually update the definition of list
one could use list = list
because the RHS fully evaluates. However this is not the case with the Association
. You can force an evaluation of the values with a Map
operation:
assoc = Identity /@ assoc;
?assoc
Global`assoc
assoc=<|x->1|>
The behaviors illustrated may change as Association is further developed. See for example:
??list
and you see that it still contains the initiala
. The moment you evaluatelist
, it is replaced by its content, which is{a}
and then Mathematica tries to further evaluate this by applying rules that are associated witha
. Therefore, your question cannot simply be answered since your understanding of the behavior is not correct. What now? $\endgroup$