I've come up with...
cssClass=['rssLink','rssLinkNew'][hoursOld<12]
Not hideous, but:
>>> cssClass=('rssLink','rssLinkNew')[hoursOld<12]
is IMO, slightly less surprising,
and in this context:
>>> cssClass = hoursOld<12 and 'rssLinkNew' or 'rssLink' >>>
reads better too
Michael
-- http://mail.python.org/mailman/listinfo/python-list