[C++-sig] docstring in enum

Stefan Seefeld seefeld at sympatico.ca
Wed Jun 27 20:48:38 CEST 2007

Piotr Jaroszyński wrote:
> Hello,
> Is it somehow possible to add docstring to enum_? I tried with 
> PyObject_SetAttrString, but it doesn't work. Don't you think that docstrings 
> would be useful in enums as well?

docstrings are attached to modules, classes and functions in python, not arbitrary
objects (read: only these have a __doc__ member).

What would the document string you provide be bound to, in case of an enum ?
It just maps to an int anyway...



      ...ich hab' noch einen Koffer in Berlin...

More information about the Cplusplus-sig mailing list