Re: read-modify-write via python client

2012-09-29 Thread Adam Lindsay
David, Adding to what Michael said, an idiomatic pattern I've been using is: obj = kv.bucket(b).get(name) data = f.get_data() or {'my_list': []} data['my_list'].append(something) obj.set_data(data) obj.store() [usually it's `f.get_data() or {}` when I use it, but you should see the pattern.]

Re: read-modify-write via python client

2012-09-28 Thread Michael Clemmons
David, The way you're doing it is correct. As far as I can tell populate is mostly meant for internal use similar to set_siblings which has this comment in the code Set the array of siblings - used internally Not sure why they arnt using the convention of setting internal methods with _