the acid groups being esterified with polyhydroxy compounds or epoxy compounds during or after polymerization