Using `htmldict={}` in the arg list is a (classic) potential source of errors.  The default dict `{}` is created once at compile time and then every call uses that same object.  The code below modifies that dict in-place so subsequent calls get a different default.  Also, the code below modifies this dict, so if the user passes in something then this routine is touching the user input, which might cause confusion.

The best strategy here is probably to do `self.html = deepcopy(htmldict)` below.  You'll need a `from copy import deepcopy` import.