Modify

Opened 17 years ago

Closed 9 years ago

#918 closed Feature Requests (invalid)

__doc__ strings

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 .

Attachments (1)

function-docstrings.tgz (4.3 KB) - added by Dave Abrahams 11 years ago.
Partially-completed work on function docstrings

Download all attachments as: .zip

Change History (7)

comment:1 Changed 16 years ago by blais

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 Changed 16 years ago by david_abrahams

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 Changed 11 years ago by Dave Abrahams

Description: modified (diff)
Owner: changed from david_abrahams to Dave Abrahams
Severity: Showstopper
Status: assignednew

comment:4 Changed 11 years ago by Dave Abrahams

Description: modified (diff)
Milestone: Boost 1.35.0
Reporter: changed from ericvrp to ericvrp@…
Status: newassigned
Version: Nonerelease 1.34.0

Changed 11 years ago by Dave Abrahams

Attachment: function-docstrings.tgz added

Partially-completed work on function docstrings

comment:5 Changed 11 years ago by Dave Abrahams

Severity: ShowstopperProblem

I think now that we have Boost.Parameter this job could become much easier.

comment:6 Changed 9 years ago by Dave Abrahams

Cc: ericvrp@… added
Resolution: Noneinvalid
Status: assignedclosed

Sorry it's been so long, but I'm confused about exactly what's missing here. It looks to me like the def() functions already support supplying a docstring. If there's still a real problem, please reopen this bug. In the meantime, I'm closing it.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Dave Abrahams.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.