Re: [Tutor] passing form data into a class

2007-07-31 Thread John Fouhy
On 01/08/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > John, I spent the last two hours trying to understand what you wrote, and I > feel I'm missing something: > > >>> a_dict = {'one':1, 'two':2, 'three':3} > >>> class A(object): > def __init__(self, **kwargs): > for var in kw

Re: [Tutor] passing form data into a class

2007-07-31 Thread Eric Brunson
Dave Kuhlman wrote: > On Mon, Jul 30, 2007 at 08:32:55PM -0700, [EMAIL PROTECTED] wrote: > >> 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 clas

Re: [Tutor] passing form data into a class

2007-07-31 Thread Dave Kuhlman
On Mon, Jul 30, 2007 at 08:32:55PM -0700, [EMAIL PROTECTED] wrote: > 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

Re: [Tutor] passing form data into a class

2007-07-31 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > 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(**submitte

Re: [Tutor] passing form data into a class

2007-07-30 Thread John Fouhy
On 31/07/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > 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

[Tutor] passing form data into a class

2007-07-30 Thread tpc247
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