title: python - ignore invalid keyword argument when usking **dict
body: <p>I am using django and and etree for scraping xml content into a database. I want to use etree (root.attrib) to create a dict from the xml and then Model(**dict) to create a model instance in Django. I don't necessarily want all of the xml attributes in the database model, but I don't want to have to manually construct the dict (or the comma separated keyword argument list either) or manually remove the keys from the dict that are not in the model and hence are not valid keyword arguments to the constructor of the model instance.</p>
  
  <p>So I end up getting the error below when I have a field in the xml that is not a valid field in the model. Does anyone know of a method to get python in general (django orm model constructors specifically) to ignore kwargs if the are not valid for the function when passing arguments with **dict?</p>
  
  <p>Traceback (most recent call last):
    File "./load_games.py", line 189, in 
      atbat = Atbat(**atbat_dict)
    File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 555, in <strong>init</strong>
      raise TypeError("'%s' is an invalid keyword argument for this function" % list(kwargs)[0])
  TypeError: 'des' is an invalid keyword argument for this function</p>