浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
e.g.
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")




posted on 2010-04-20 10:23  lexus  阅读(473)  评论(0编辑  收藏  举报