Using set_rebind_proc(func) with a bound method
f.glasner at feldmann-mg.com
f.glasner at feldmann-mg.com
Tue Jun 5 23:54:46 CEST 2001
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
More information about the python-ldap
mailing list