-
Notifications
You must be signed in to change notification settings - Fork 15.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement __iter__ in Python RepeatedScalarContainer #8816
Comments
@zhangskz Are there any updates on this? |
Ping on this. |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment. This issue is labeled |
This is still a problem, and internally at Google we still have to patch Pandas in order to make it work with proto repeated fields. Any updates as to fixing this? |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment. This issue is labeled |
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it. This issue was closed and archived because there has been no new activity in the 14 days since the |
What language does this apply to?
Python
Describe the problem you are trying to solve.
The
__iter__
attribute is commonly used to check whether an object is list-like, so neglecting to include it can cause issues, for example this bug in pandas: pandas-dev/pandas#42549. This results in weird behavior wherelist(obj)
works fine even thoughhasattr(obj, '__iter__')
is False.Describe the solution you'd like
The Python
RepeatedScalarContainer
should implementtp_iter
in addition totp_as_sequence
.Describe alternatives you've considered
Manually convert to a list every time we use RepeatedScalarContainer (
list(obj)
).The text was updated successfully, but these errors were encountered: