[EMAIL PROTECTED] wrote:
t2 = Test(dictionary.get('a'), dictionary.get('b'),
dictionary.get('c'))
print t2

Try this:

t2 = Test(**dictionary)

This performs keyword argument expansion on the dictionary, matching the dictionary entries with the named arguments to the Test.__init__ function.

Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://boredomandlaziness.skystorm.net
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to