Replies: 1 comment
-
|
#5635 - let's try to figure out documentation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When using
#[pyclass]on a "complex" enum, PyO3 generates a sub-class for each variant, so that you can useisinstance. Is it possible to implement something similar manually, if I'm wrapping an external enum?I can define
#[classmethod]s for each variant, but sub-classes might be nicer, if they are not too terribly difficult to implement.E.g.:
Beta Was this translation helpful? Give feedback.
All reactions