Does anyone have a standard pattern for working with allow_mult with
the Python library?  I feels a bit awkward to me.  I assume I need to
do the following:

data = {"foo": "bar"}
obj = bucket.get("mykey")

if not obj.exists():
      obj = bucket.new("mykey", data=data)
else:
   if obj.has_siblings():
       # do conflict resolution
   else:
       obj.set_data(data)

obj.store()

Is the the way to do it?  If so, that seems like a lot of boiler plating to me.

Eric.

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to