Opened 10 years ago
Last modified 10 years ago
#7153 new Feature Requests
it is not possible to add methods in enum_ using def
Reported by: | Owned by: | Ralf W. Grosse-Kunstleve | |
---|---|---|---|
Milestone: | To Be Determined | Component: | python USE GITHUB |
Version: | Boost 1.51.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Sometimes it is required to add method to exported enum to Python using Boost.Python. For example, if we want to specify repr method to enum. But the following code wont work.
enum_<my_enum>("my_enum")
.def("repr", &my_enum_to_string) ;
Change History (3)
comment:1 by , 10 years ago
comment:3 by , 10 years ago
Type: | Bugs → Feature Requests |
---|
changing to feature request; if you don't want to work on this yourself you may want to post to the Python C++-SIG to find a volunteer
Note:
See TracTickets
for help on using tickets.
Is this a documented feature?