title: Create dictionary from/with function arguments as keys and default values as value
body: <p>I want to get a dictionary from a function that has the function arguments as keys and the default values as values.</p>
  <p>I used <code>inspect.getfullargspec()</code> to get a list of the argument and a list of the default values. Then I tried to use <code>dict(zip())</code> to create a dictionary of those lists. This works, but only if every arguments has a default value. If one has no default, everything gets mixed up (as expected).</p>
  <p>How can I for example if a argument has no default, add a <code>None</code> as value.
  Or any other ideas?</p>
  <p>Here's the code:</p>
  <pre><code>def fn(name, age=18):
      pass
  
  spec = getfullargspec(fn)
  args = spec.args
  defaults = spec.defaults
  
  zipped = dict(zip(args, defaults))
  </code></pre>