[C++-sig] Re: function::argument_error / overloads & docstrings
Nikolay Mladenov
nickm at sitius.com
Tue Nov 18 20:55:29 CET 2003
David Abrahams wrote:
>
> Nikolay Mladenov <nickm at sitius.com> writes:
>
> > David Abrahams wrote:
> >>
> >> Nikolay Mladenov <nickm at sitius.com> writes:
> >>
> >> > David Abrahams wrote:
> >> >>
> >> >
> >> >> > So why having the option to stick signature in the docstring is bad? It
> >> >> > is only an option.
> >> >>
> >> >> I didn't say it was; you were looking for something less intrusive.
> >> >
> >> > I see, but until we find it I like that one.
> >> >
> >> >>
> >> >> > Combining the overloads docstrings shouldn't be a problem as well
> >> >> > since one can supply a single docstring per name.
> >> >>
> >> >> Fine with me.
> >> >
> >> > Can I implement this?
> >>
> >> Do you mean, "will I accept your patch?"
> >
> > Yes.
> >
> >> Probably, though I'm not
> >> sure I like the syntax for doing it optionally. An existing docstring
> >> might already contain a %, for example.
> >
> > Yes I thought of that too, but the only other way I see is to change the
> > type
> > of the docstring parameter (of def) to something that expands to
> > different strings
> > based on parameters and default constructable from python::str, const
> > char *, and std::string.
> > Do you like that? I am not sure how this is going to fit in.
>
> I don't love it, but it seems better.
I looked into this and it seems not so easy to put this kind of changes.
(and I am very busy with my work)
> More to the point: shouldn't including the signature be the default?
I would think yes. My current copy does only that.
Do you see any other way this docstring behavior can be implemented?
Relatively easy?
> --
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.com
--
Nikolay Mladenov
Sitius Automation Inc.
www.sitius.com
More information about the Cplusplus-sig
mailing list