Robert Kern <[EMAIL PROTECTED]> writes:

> Lenny G. wrote:
>> Is there a way to make a c/c++ extension have a useful method
>> signature?  Right now, help(myCFunc) shows up like:
>> myCFunc(...)
>>   description of myCFunc
>> I'd like to be able to see:
>> myCFunc(myArg1, myArg2)
>>   description of myCFunc
>> Is this currently possible?
>
> There really isn't a way to let the inspect module know about
> extension function arguments. Just put it in the docstring.
>

The next release of boost.python should do this automatically:

(http://mail.python.org/pipermail/c++-sig/2005-July/009243.html)


>>> help(rational.lcm)

Help on built-in function lcm:

lcm(...)
    C++ signature:
    lcm(int, int) -> int

>>> help(rational.int().numerator)

Help on method numerator:

numerator(...) method of boost_rational_ext.int instance
    C++ signature:
    numerator(boost::rational<int> {lvalue}) -> int


Regards, Phil
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to