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

Refactor #[pyproto] Result types #996

Merged
merged 1 commit into from Jun 23, 2020

Conversation

davidhewitt
Copy link
Member

@davidhewitt davidhewitt commented Jun 23, 2020

Fixes #798

I reworked #[pyproto] result types to use the IntoPyCallbackOutput trait. This led to a couple of nice improvements:

Following up will be two new PRs which come easily from this:

  • Enable return value from __next__ / __anext__
  • Allow skipping return type completely when it is -> ()

Also the overall code is simpler, which is nice.

@davidhewitt davidhewitt mentioned this pull request Jun 23, 2020
@kngwyu
Copy link
Member

kngwyu commented Jun 23, 2020

Thanks!
Looks quite reasonable change to me.
Please merge this PR at your own time.

@davidhewitt
Copy link
Member Author

👍 I will also rebase the two new PRs now.

@davidhewitt davidhewitt merged commit 0c59b05 into PyO3:master Jun 23, 2020
@davidhewitt davidhewitt deleted the pyproto-simplifications branch December 24, 2021 02:05
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.

Cannot return option from PySequenceProtocol __getitem__
2 participants