$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Anton Gluck (gluc_at_[hidden])
Date: 2000-11-26 01:23:47
Dave,
Is there a difference between py_cpp extension classes and regular Python
classes when it comes to isinstance(object, classname)? I have exposed two
classes for variables, CatVar and ContVar, as well as their base class,
Var. I can create CatVar and ContVar objects, and call their functions.
But when I try to determine whether a given Var is a CatVar or a ContVar
with isinstance(someVar, CatVar) I get a "TypeError: second argument must
be a class". And indeed, when I do type(CatVar) it is not "type 'class'"
but "class py::MetaClass<class py::ExtensionInstance> object at ..".
I was under the impression that extension classes are like Python classes,
with some extras. Is it possible to use isinstance or something like it?
Thanks,
Toni