key不能有空格
在使用redis的hash type时,如果传入的是int,取回的会是str类型
i.e.
if r1.hexists("wordcounts",keyword):
count=r1.hget("wordcounts",keyword)
print "===="
print type(count)
print count
r1.hset("wordcounts",keyword,int(count)+1)
else:
r1.hset("wordcounts",keyword,1)