|
From: <f.g...@fe...> - 2001-06-05 21:51:24
|
Hi,
the problem is to check whether a callable object is either a function object
or a *bound* method object.
>> - if ( PyFunction_Check(func) ) {
>> + if ( PyCallable_Check(func) ) {
Maybe its better to check
+ if ( PyCallable_Check(func) ) {
- if ( PyFunction_Check(func) || (PyCFunction_Check(func) && PyCFunction_GET_SELF(func)) ) {
I havn't tested it and, again, I don't know whether it works on older Python versions
before 2.1.
Franz
|