Re: [protobuf] Clearing/Removing Repeated Fields in Python

2014-07-31 Thread 'Feng Xiao' via Protocol Buffers
On Wed, Jul 30, 2014 at 3:12 PM, Russell Holloway wrote: > I have come across an issue not quite sure how to solve in the best way > > Setting a repeated list of strings to an empty list (to start fresh). The > only solution I have > > while True: > try: > object.repeated_list.remove(object

[protobuf] Clearing/Removing Repeated Fields in Python

2014-07-30 Thread Russell Holloway
I have come across an issue not quite sure how to solve in the best way Setting a repeated list of strings to an empty list (to start fresh). The only solution I have while True: try: object.repeated_list.remove(object.repeated_list[0]) except IndexError: break; I essentially loop