[C++-sig] Check if object is of type Boost.Python.enum

Davidson, Josh josh.davidson at lmco.com
Sat Feb 16 23:21:23 CET 2013


I'm trying to find a clean way to test if an object in Python is of type Boost.Python.enum:
>>> myEnum.__bases__
(<type 'Boost.Python.enum'>,)

The easiest way would probably just be isinstance, but I can't seem to find a way to import Boost.Python.enum.  Anyone know how to import the necessary module or have a better idea?  For what I'm doing, I can't simply rely on duck typing.

Thanks,
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20130216/83bddd70/attachment.html>


More information about the Cplusplus-sig mailing list