[C++-sig] Re: function::argument_error / overloads & docstrings
David Abrahams
dave at boost-consulting.com
Sat Nov 15 20:07:05 CET 2003
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.
More to the point: shouldn't including the signature be the default?
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list