[Python-Dev] subclassing PyCFunction_Type

Bob Ippolito bob at redivi.com
Wed Feb 16 17:52:56 CET 2005


On Feb 16, 2005, at 11:43, Phillip J. Eby wrote:

> At 11:26 AM 2/16/05 -0500, Bob Ippolito wrote:
>> >>> help(FakeBuiltin("name", "name(foo, bar, baz) -> rval"))
>> Help on built-in function name:
>>
>> name(...)
>>     name(foo, bar, baz) -> rval
>
> If you wanted to be even more ambitious, you could return FunctionType 
> and have a fake func_code so pydoc will be able to see the argument 
> signature directly.  :)

I was thinking that too, but I didn't have the energy to code it in an 
email :)

-bob



More information about the Python-Dev mailing list