python - How to assign to repeated field? -


i using protocol buffers in python , have inside person message

repeated uint64 id 

but when try assign

person.id = [1, 32, 43432] 

i error assigment not allowed repeated field "id" in protocol message object how assign repeated field ?

as per documentation, aren't able directly assign repeated field. in case, can call extend add of elements in list field.

person.id.extend([1, 32, 43432]) 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -