| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Being able to pick the base stdlib class is nice, at least for using Flag/IntFlag which have highly readable reprs. In https://gist.github.com/anntzer/96f27c0b88634dbc61862d08bff46d10 (my own implementation of binding-to-stdlib enums), I simply pass the base class as a string, which in theory would even allow using third-party base enum classes with compatible signatures (e.g. for backporting to Py<3.4). |
Sorry, something went wrong.
|
Ooh, saw this per @bstaletic's post in #2739 (issue: #2332). Will compare notes. |
Sorry, something went wrong.
|
I spewed some text here: #2332 (comment) If y'all have a chance, might you be able to weigh in on my opinions there? (i.e. rolling all the functionality into py::enum_ proper, rather than relying on macros / type_caster specialization) |
Sorry, something went wrong.
|
Why didn't this go anywhere? This is still an issue in 2025!! |
Sorry, something went wrong.
Did you see #5555, coincidentally merged yesterday. This is a volunteer-driven community project. |
Sorry, something went wrong.
|
I'm going to close this now that we have native_enum 🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
This change is a proof of concept implementation that allows C++ enums to be exposed as enum.Enum objects on the Python side. I've decided to make this change partly to spark a design discussion about what would make the most sense when trying to expose C++ enums as standard library enums.
TODO: Properly implement name().
Currently there are no docs or tests because the design might change a lot.
Kudos to @aldanor who's design I started from.
Implemented #530
Suggested changelog entry: