plural = len(sec) != 1
print 'W: security updates available for %d %s' % \
(len(sec), plural and 'packages' or 'package')
+for pkg in sorted(updates, key = lambda p: p.name):
+ print 'I: %s %s' % (pkg in sec and '!' or ' ', pkg.name)
###----- That's all, folks --------------------------------------------------