Sept. 12, 2006
1:21 a.m.
"anders langlands" <anderslanglands@gmail.com> writes:
Currently I'm using extract<T>::check() over a bunch of different types to decide what to do with python objects. Is there any way to inspect the type directly?
You can inspect the _Python_ type directly: x.ptr()->ob_type; or if all the types have a common C++ base class with at least one virtual function, you can write: typeid(extract<Base*>(x)()) HTH, -- Dave Abrahams Boost Consulting www.boost-consulting.com