Skip to content
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

pyclass: allow #[pyo3(get, set, name = "foo")] #1651

Merged
merged 1 commit into from
Jun 4, 2021

Conversation

davidhewitt
Copy link
Member

For #1601

This implements #[pyo3(get, set, name = "...")] to set the python name of the exposed property.

This enables #[pyo3(get, set)] for tuple #[pyclass], by making name required in that case. Closes #1593

@davidhewitt davidhewitt mentioned this pull request Jun 4, 2021
7 tasks
Copy link
Member

@birkenfeld birkenfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the tuple struct addition!

Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@davidhewitt
Copy link
Member Author

👍 I'll try to add some extra coverage before merging!

@davidhewitt
Copy link
Member Author

So it looks like I've got coverage for the lines which codecov claims aren't covered, but it's in UI tests where the coverage isn't currently measured. I'd love to fix that some day, but for now I'll just merge this.

@davidhewitt davidhewitt merged commit 15366b9 into PyO3:main Jun 4, 2021
@davidhewitt davidhewitt deleted the tuple-get-set branch June 4, 2021 18:26
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.

Request: Getter/Setter support for struct/unit tuples
3 participants