I finally figured out how to iterate an annotation feature class in arcpy to update its attributes.
You cannot use a cursor , it just generates errors. You cannot directly use SQL and bypass arcpy because the attribute columns are just for show, the real data is hidden in a binary column you can't see in ArcGIS.
But you can use CalculateField_management.
Roughly put,
codeblock = """def writekv(k, v)
# do some calculation here, put it in "newvalue'
return newvalue
"""
expression = "writekv(!%s!, !%s!)" % (keyfield, valuefield)
arcpy.CalculateField_management(layer, fieldname, expression, "PYTHON_9.3", codeblock)
where keyfield and valuefield are the names of attribute fields you want to use