> + if (self.allowedMultipleInstalls(pkg) or > + key not in ndinst): > .. > + ndinst[key] = sorted(ipkgs)[-1] Can't we just use max(ipkgs) there? Not sure if there were any issues with min/max, and I was unable to google it atm. ACK.