danielgtaylor / danielgtaylor/python-betterproto

ListValue is not iterable

Open
#636 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
1.8k
Forks
234
PR merge metrics
No merged PRs in 30d

Description

### Summary

ListValue is not iterable

### What is the feature request for?

The core library

### The Problem

With official protobuf_pb2, you can do:
```py
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`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.