[C++-sig] Boost.Python.function.__signatures__
Ralf W. Grosse-Kunstleve
rwgk at yahoo.com
Thu Jul 21 15:53:08 CEST 2005
--- David Abrahams <dave at boost-consulting.com> wrote:
> "Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com> writes:
>
> > Dave, could you please briefly review my patch? It is still very simple:
> > forward class list in function.hpp + list signatures(bool
> > show_return_type=false) const; declaration;
>
> It's good practice to supply the user with everything he needs to use
> a function declared in a given header. That would mean including the
> full definition of list. Any reason not to?
Bringing in a new header file sometimes leads to trouble with broken compilers.
Initially I just wanted to be as non-intrusive as possible. But I am 100% on
your side. I'll move the list.hpp include from function.cpp to function.hpp.
Thanks.
> > in function.cpp I've move some code
> > from the body of argument_error() to the new signatures() function and I've
> > patched the body of function_get_doc() to append the result of
> signatures().
>
> It would be nice if the if(show_return_type) statement appeared to
> have less apparent boilerplate repetition in its two branches, but
> aside from that it seems fine.
I thought about this, but came to the conclusion that the version with
less-boilerplate is going to be longer and less obvious to the reader.
> Thanks for doing this!
Can you (or anybody else!) think of a suitable place to mention the automatic
appending to __doc__ in the documentation?
> Naturally, it can't go on the trunk until after 1.33 is released.
OK. I am also sitting on my SWIG compatibility patch. I hope 1.33 is released
soon. Otherwise I'll be out of town and the patches are not likely to get
integrated before the end of September.
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