[C++-sig] Boost.Python.function.__signatures__

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Wed Jul 20 21:24:25 CEST 2005


--- Nick Rasmussen <nick at ilm.com> wrote:
> If better docstrings is what you're after, why not just prepend the function
> signature (either optionally or automatically) to the docstring. That way the
> help() mechanism will give you the list of all the the overloads like you're
> looking for even for functions where the docstring wasn't explictly
> specified, and no change to python is needed.

That's an interesting idea. I can think of a couple of issues, though:

- Quite often the signatures are unwieldy, e.g. (this is not made up):

    max(scitbx::af::versa<double, scitbx::af::flex_grid<scitbx::af::small<long,
10ul> > >)
    max(scitbx::af::versa<float, scitbx::af::flex_grid<scitbx::af::small<long,
10ul> > >)
    max(scitbx::af::versa<long, scitbx::af::flex_grid<scitbx::af::small<long,
10ul> > >)
    max(scitbx::af::versa<int, scitbx::af::flex_grid<scitbx::af::small<long,
10ul> > >)
    max(scitbx::af::versa<unsigned long,
scitbx::af::flex_grid<scitbx::af::small<long, 10ul> > >)

  It may be hard to find where the real documentation starts.
  Maybe appending is better?

- I guess currently the docstrings are static. They'd have to become dynamic.
  This seems to be a bigger project. I think we'd need a volunteer.

Cheers,
        Ralf


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Cplusplus-sig mailing list