Polycondensates containing more than one epoxy group per molecule of polycarboxylic acids with epihalohydrins or precursors thereof