Can a dictionary be passed directly to instantiate another object in python
Question: I'm experimenting with parse.com as a db for my django app. I've installed
parse_rest.

I have a list of dictionaries, with each dictionary of the form:

    
    
    all_practices = {'a':value1, 'b':value2 ...}
    

according to the answer provided by Michael Otte, in [Add and save objects to
parse.com db from django](http://stackoverflow.com/questions/24900946/add-and-
save-objects-to-parse-com-db-from-django)

I can save this object by the following:

    
    
    from parse_rest.datatypes import Object
    class Profile(Object):
        pass
    
    # instantiate with parameters
    profile = Profile(name='Johnny', age=27)
    

is there a way to directly pass dictionary object as the parameters of the
profile object, so as to get:

    
    
    profile = Profile(a='value1', b='value2')
    


Answer: Yes, use the [keyword/dictionary unpacking operator
`**`](https://docs.python.org/3/tutorial/controlflow.html#unpacking-argument-
lists):

    
    
    profile = Profile(**all_practices)
    

