Adjust kerning only in selected pairs

I didn’t see any method/attribute for Font.kerning that returns only the selected kerning pairs.

What is the best way to adjust (+, -, *, /) selected kernings pairs?

My scenario:

I’ve set multiple kerning pair for a glyph class then realised the metrics were too large anyway (newbie mistake!!) but don’t want to start over with the kerning.

Edit: I’ve added something to mekkablue’s script to adjust all kerning related to a given /glyphname here, it’s not for selected pairs but might help a bit.

you would need to iterate over all pairs and change the values. It is a bit complex as you have to check the class/exception status for each pair form both sides of the pair.

Ah I didn’t think about that and I didn’t think about left and right separately either…