Maybe we should consider changing the name of the dict parameter?  I think it's better not to shadow built-ins.  In this case, the built-in function `dict()` is being shadowed by the parameter, which makes it impossible to use it inside this method.