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: support extending Exception types #1591

merged 1 commit into from May 4, 2021


Copy link

Implements support for #[pyclass(extends=Exception)].

I expected there to be bigger issues around doing this; it turned out to be very easy.

cc @Stranger6667 who was asking about this on Gitter just the other day.

Copy link

ravenexp commented May 4, 2021

Does this feature make create_exception!() obsolete?

Copy link
Member Author

In the long run, yes. But that'll come when we have a full #[pyexception] macro. I'll try to write the implementation still needed on #295 soon.

@davidhewitt davidhewitt merged commit 350e7b2 into PyO3:main May 4, 2021
@davidhewitt davidhewitt deleted the inherit-exceptions branch May 4, 2021 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants