2
因此到協議緩衝python generated code documentation, 我可以將對象添加到重複的消息字段是這樣的:Python和協議緩衝液:如何從一個重複的消息字段中刪除的元素
foo = Foo()
bar = foo.bars.add() # Adds a Bar then modify
bar.i = 15
foo.bars.add().i = 32 # Adds and modify at the same time
但:
如何從
bars
中刪除bar
?如何從
bars
中刪除n-th
條元素?
我不確定這是否是版本問題,但刪除的「.remove」方法不適用於我。第二個版本確實有效。 – Catskul