I wouldn't advocate people supply their own incompatible object types. Similarly, if people set their own garbage values for whatever other member attributes, things will behave in unexpected ways. Also having a quiet convert-on-set is too magical IMO.

The API I'd like to advocate is 1. provide a headers dict-like in the constructor, 2. read `.headers` after it is set, 3. mutate it in-place if you want, but results could be unexpected.