Digging deeper, there appears to be a problem initializing lists in Python at runtime in feature-linked annotation. For me, the following code updates the annotation text string:
def FindLabel ([SampleID],[Benzoaanthracene]):
aNames = "Benzo(a)anthracene"
SampleIDLocal = str([SampleID])
TheLabel = SampleIDLocal + ' ' + aNames + ' = ' + str([Benzoaanthracene])
return TheLabel
Whereas initializing aNames as an empty list results in static annotation:
def FindLabel ([SampleID],[Benzoaanthracene]):
aNames = []
SampleIDLocal = str([SampleID])
TheLabel = SampleIDLocal + ' Benzo(a)anthracene = ' + str([Benzoaanthracene])
return TheLabel
Even stranger, when I commented out the offending line (#aNames = []), annotation was still static. On the off chance that aNames is somehow a reserved word, I changed it to arrayNames (still static) and then gibberish (alkghowish, which worked!). Changing to aDspNam = [] also worked until I actually tried to populate the list.
Given this unpredictable behavior, I am going to return to using VBA for label expressions.