Python doesn't like it if a kwarg has the same name as an explicitly named argument. This can cause problems when a function passes kwargs to a tag function, when the call to the tag function has a named argument like class_. For example:
from htmltools import *
def foo(text, **kwargs):
return div(text, class_="foo", **kwargs)
foo("hi")
#> <div class="foo">hi</div>
foo("hi", class_="extra_class")
#> TypeError: htmltools.tags.div() got multiple values for keyword argument 'class_'
One possibility is for the tag function to accept a dict and merge it in with its kwargs.