From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-11-01 14:55:33
I'm just going through old emails here. Sorry it's taken so long!
I have no clue as to why you should not find the object to be callable(). It
certainly can be called!
The Python-1.5 source shows that this code is being executed:
if (x == NULL)
if (x->ob_type->tp_call != NULL ||
and I know that the tp_call slot of the type object for bound_function
objects is set! It certainly appears to work with Python-2.2b1
David Abrahams, C++ library designer for hire
C++ Booster (http://www.boost.org)
----- Original Message -----
Sent: Wednesday, September 19, 2001 8:05 AM
Subject: [boost] BPL - method is not callable
> Hi all,
> I am using Boost.Python to export a class library to Python,
> and I have following:
> def invoke(c):
> if callable(c):
> print c
> print "object not callable"
> "obj" is instance of one of the exported classes, and
> "method" is one of its methods
> invoke(obj.method) gives me:
> <class boost::python::detail::bound_function object at 0038BDE0>
> object not callable
> How can I correct this?
> Info: http://www.boost.org Unsubscribe:
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk