a=dict(a=1,b=2,c=3)
r=redis.Redis()
r.set("haha",a)
r.hget("haha","b")#this will raise a exception
the right way is as follows:
r.hmset("haha",a)#attenation:when you use this approach,if you use r.set("haha",a) first,this also will occur a exception
r.hget("haha","b")
![](http://img.zemanta.com/pixy.gif?x-id=b9c76a35-0987-8326-9f54-849b28ed8a34)