def withClass(classname, namespace=''):
    classattr = "%s:class" % namespace if namespace else "class"
    return withAttribute(**{classattr : classname})
Simplified version of C{L{withAttribute}} when matching on a div class - made
dataset/ETHPy150Open pypa/pip/pip/_vendor/pyparsing.py/withClass