title: Initialize Python dataclass from dictionary
body: <p>Let's say I want to initialize the below dataclass</p>
  <pre class="lang-py prettyprint-override"><code>from dataclasses import dataclass
  
  @dataclass
  class Req:
      id: int
      description: str
  </code></pre>
  <p>I can of course do it in the following way:</p>
  <pre class="lang-py prettyprint-override"><code>data = make_request() # gives me a dict with id and description as well as some other keys.
                        # {&quot;id&quot;: 123, &quot;description&quot;: &quot;hello&quot;, &quot;data_a&quot;: &quot;&quot;, ...}
  req = Req(data[&quot;id&quot;], data[&quot;description&quot;])
  </code></pre>
  <p>But, is it possible for me to do it with <em><strong>dictionary unpacking</strong></em>, given that the keys I need <em><strong>is always a subset</strong></em> of the dictionary?</p>
  <pre class="lang-py prettyprint-override"><code>req = Req(**data)  # TypeError: __init__() got an unexpected keyword argument 'data_a'
  </code></pre>