title: Dynamically add fields to dataclass objects
body: <p>I'm writing a library to access REST API. It returns json with user object. I convert it to dict, and then convert it to dataclass object. The problem is that not all fields are fixed. I want to add additional fields (which are not specified in my dataclass) dynamically. I can simply assign values to my object, but they don't appear in the object representation and <code>dataclasses.asdict</code> function doesn't add them into resulting dict:</p>
  
  <pre class="lang-py prettyprint-override"><code>from dataclasses import asdict, dataclass
  
  @dataclass
  class X:
      i: int
  
  x = X(i=42)
  x.s = 'text'
  
  x
  # X(i=42)
  
  x.s
  # 'text'
  
  asdict(x)
  # {'i': 42}
  </code></pre>