Skip to content

Conversation

@MicaelJarniac
Copy link
Contributor

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)
  • This PR is not a code change (e.g. documentation, 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 danielgtaylor#510 and danielgtaylor#358.
@MicaelJarniac
Copy link
Contributor Author

@a-khabarov could you please review and make sure I have documented it correctly?

@Gobot1234 Gobot1234 merged commit dbd3192 into danielgtaylor:master Mar 19, 2024
@Gobot1234
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants