python-betterproto icon indicating copy to clipboard operation
python-betterproto copied to clipboard

ListValue is not iterable

Open powellnorma opened this issue 1 year ago • 0 comments

Summary

ListValue is not iterable

What is the feature request for?

The core library

The Problem

With official protobuf_pb2, you can do:

args = ListValue()
args.extend([1,2,3])
some_function(*args)

But with betterproto this doesn't work currently https://github.com/danielgtaylor/python-betterproto/blob/335eee753734e89364135bdde829a069838ee297/src/betterproto/lib/std/google/protobuf/init.py#L2300

The Ideal Solution

Add some wrapper methods (extend, iter, ..)

The Current Solution

Always use .value

powellnorma avatar Oct 26 '24 09:10 powellnorma