dear fellow Python enthusiasts, let's say I have a dictionary of keys and values obtained from a form submitted by a user.  For each submitted form I will create the Application and Candidate classes, and I want to be able to call Application(Candidate(**submitted_data)).display() to create an html representation of the user submitted data.  Depending on the applicant's preferences and location, the number of fields on the form, and thus the size of this dictionary, is variable, and not all fields are required.  I seem to recall a setargs function in Python that would take any argument passed into a class and set that argument as a member variable in a class.  A Google search turned up no such construct, so here I am asking you, is there a way for me to create a class that accepts a dictionary of submitted data and uses each key ad value to create a corresponding member variable ?  The current way I do this is with a very long argument list, and line by line:
<br><br>class Candidate(object):<br>&nbsp;&nbsp;&nbsp; def __init__(self, full_name, address_line_1, city, postal_code, email, desired_program, telephone=None, disabled=None, can_receive_media=None, media_sent_to=None, ...):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
self.full_name = full_name<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.address_line_1 = address_line_1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.city = city<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.postal_code = postal_code<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.email = email<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.desired_program = desired_program
<br><br>class Application(object):<br>&nbsp;&nbsp;&nbsp; def __init__(self, candidate):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.candidate = candidate<br><br>&nbsp;&nbsp;&nbsp; def display(self):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pass