hmget cr00000000img:meta url
1) "http://www.test.com"
In python:
redirect = r.hmget("cr00000000img:meta", "url")
print redirect
[None, None, None]
So....where did I err? I would think the result would be [
"http://www.test.com"]
There is one more key in he hash but I only need url.
Thanks
r.hmget("cr00000000img:meta", ["url"])
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
> r.hmget("cr00000000img:meta", ["url"])
Hi Andy, this is about API, and API is about taste, but can I ask you
why Python lib does not check the type of the arguments and do the
right thing? This way you could do both:
r.hmget(key,"myfield1","myfield2") and it should work well, but also:
r.hmget(key,fields_array);
I my opinion this is an interface creating less troubles to newcomers.
Cheers,
Salvatore
--
Salvatore 'antirez' Sanfilippo
open source developer - VMware
http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele
> It was an oversight with hmset. Other methods already allow for this.
> I'll fix it when I'm in front of a computer.
Thanks for the clarification, I was just interested to understand if
it was a design issue due to some Python feature/pattern I didn't know
or just a matter of implementing it.
Cheers,
Salvatore