Next / Previous / Contents / TCC Help System / NM Tech homepage

6.27. CLASS

This function is lifted straight out of Fredrik Lundh's example of XHTML generation in his original ElementTree builder proposal. It is a function that takes a list of CSS element class names and returns a dictionary that will decorate an element with those class names.

hwscan3.py
def CLASS(*nameList):
    return { 'class': " ".join(nameList) }