converting dict to object

rieh25 robertoedwins at gmail.com
Fri Dec 1 20:48:40 EST 2006


If I have a dictionary such as:

d = {'a' : 1, 'b' : 2}

is there a way to convert it into an object o, such as:

o.a = 1
o.b = 2

thanks
-- 
View this message in context: http://www.nabble.com/converting-dict-to-object-tf2741429.html#a7649225
Sent from the Python - python-list mailing list archive at Nabble.com.




More information about the Python-list mailing list