python-betterproto
python-betterproto copied to clipboard
Add one-of `match` example to README
Removed the parts of the example that showed accessing an unset value, as it now raises an AttributeError, and added an example of the match way of accessing the attributes.
Related to #510 and #358.
Summary
Update documentation related to one-of fields and using a match statement to read it.
Checklist
- [ ] If code changes were made then they have been tested.
- [ ] I have updated the documentation to reflect the changes.
- [ ] This PR fixes an issue.
- [ ] This PR adds something new (e.g. new method or parameters).
- [ ] This change has an associated test.
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [x] This PR is not a code change (e.g. documentation, README, ...)
@a-khabarov could you please review and make sure I have documented it correctly?
Thanks!