Boost C++ Libraries: Ticket #7153: it is not possible to add methods in enum_ using def https://svn.boost.org/trac10/ticket/7153 <p> Sometimes it is required to add method to exported enum to Python using Boost.Python. For example, if we want to specify <span class="underline">repr</span> method to enum. But the following code wont work. </p> <p> enum_&lt;my_enum&gt;("my_enum") </p> <blockquote> <p> .def("<span class="underline">repr</span>", &amp;my_enum_to_string) ; </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7153 Trac 1.4.3 Ralf W. Grosse-Kunstleve Fri, 20 Jul 2012 15:17:41 GMT <link>https://svn.boost.org/trac10/ticket/7153#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7153#comment:1</guid> <description> <p> Is this a documented feature? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 21 Jul 2012 13:57:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7153#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7153#comment:2</guid> <description> <p> No, it is not documented feature. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ralf W. Grosse-Kunstleve</dc:creator> <pubDate>Sat, 21 Jul 2012 21:19:11 GMT</pubDate> <title>type changed https://svn.boost.org/trac10/ticket/7153#comment:3 https://svn.boost.org/trac10/ticket/7153#comment:3 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> </ul> <p> 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 </p> Ticket