[C++-sig] docstring in enum

Piotr Jaroszyński p.jaroszynski at gmail.com
Wed Jun 27 21:21:10 CEST 2007

On Wednesday 27 of June 2007 20:48:38 Stefan Seefeld wrote:
> What would the document string you provide be bound to, in case of an enum
> ? It just maps to an int anyway...
I meant the "py_enum" which you get after bp::enum_<some_enum>("py_enum");
I want to add docstring to it describing its purpose and listing possible 
values. It seems to be not possible using the boost.python api as far as I 
can see, moreover bp seems to set the __doc__ as a readonlty attribute and 
hence using PyObject_SetAttrString on py_enum.ptr() doesn't work either.

Best Regards,
Piotr Jaroszyński

More information about the Cplusplus-sig mailing list