Opened 22 years ago

Last modified 13 years ago

#918 closed Feature Requests (invalid)

__doc__ strings — at Version 3

Reported by: ericvrp Owned by: Dave Abrahams
Milestone: Boost 1.36.0 Component: python USE GITHUB
Version: Boost 1.34.0 Severity: Problem
Keywords: Cc: ericvrp@…

Description (last modified by Dave Abrahams)

For most Python modules and packages html 
documentation can be generated automatically by a tool 
that is included in python 2.1 .
Being able to set the docstring would be a step in the 
right direction to make boost.python compatible with 
pydoc.py .

Change History (3)

comment:1 by blais, 21 years ago

Logged In: YES 
user_id=10996

I am already able to set the docstring with the following
bit of code in the module initialization:

module.add( boost::python::make_ref( help() ), "__doc__");

where help() is a function that returns a string.

Is there a way to set docstrings of functions though?

comment:2 by david_abrahams, 21 years ago

Logged In: YES 
user_id=52572

At present, I don't think there is.
You would need to modify all of Boost.Python's function 
classes to hold a doc string, and modify all of the def() 
functions to accept an optional doc string. I started this 
project, but realized that I was crazy after having stayed 
up for 36 hours straight working on Thursday and Friday. If 
you're interested in the broken state of the source, it's 
attached here.

If you get it to work, please submit a patch for the 
completed code.

Thanks,
Dave

comment:3 by Dave Abrahams, 15 years ago

Description: modified (diff)
Owner: changed from david_abrahams to Dave Abrahams
Severity: Showstopper
Status: assignednew
Note: See TracTickets for help on using tickets.