kazoo icon indicating copy to clipboard operation
kazoo copied to clipboard

Why return tuple ?

Open eromoe opened this issue 7 years ago • 4 comments

set

zk.set(ZK_PATH, json.dumps(config).encode('utf-8'))

get

config = zk.get(ZK_PATH)
config = config[0]

Since zk.set does't allow *args , zk.get should not return tuple.

eromoe avatar Jan 15 '19 08:01 eromoe

Hi,

I'm not sure to understand where the issue is. zk.get() is returning a tuple with the value and the associated ZnodeStat object. Are you suggesting only the value should be returned?

StephenSorriaux avatar Jan 22 '19 19:01 StephenSorriaux

Yes. I think zk.get should return value exact same as zk.set

eromoe avatar Jan 23 '19 01:01 eromoe

@eromoe why do you think so? What issues are you facing? What are you trying to do? Adding additional context makes it easier for others to understand your use case, suggest solutions and consider your request for change.

abhilash1in avatar May 16 '21 19:05 abhilash1in

@abhilash1in For consistency, like redis.set / redis.get . Because for me , zk is just a kv store , I don't need anything else I haven't asked for .

PS: I came up this when I first played with zk , just once . I nearly don't work with zk .

eromoe avatar May 19 '21 01:05 eromoe