Testing an "isOP" condition

I know we have the isDAT, isCHOP, etc. attributes, but I just want to know if something is an operator. Currently I’m doing this:

type(<object>).__bases__[0].__bases__[0] == OP

Which is a bit cumbersome. I’m sure there might be some other way to get at whether or not the object is an operator (of any type), but I’d love something that’s as concise and explicit as <object>.isDAT. Maybe I’m missing something in the API?

So a little more context might help here. I’m testing what type of object is being dropped on a container, so I know the object exists, I just need to find out what type of object it is, because I’m going to handle it differently based on what type of object it is. I think anything using try/except statements is bound to get clumsy, too.

I have found an easier (and less error-prone) way to do this with the inspect module:

import inspect
dragItem = info["dragItems"][0]
dragItem_mro = inspect.getmro(dragItem.__class__)
if OP in dragItem_mro:
     # do stuff
elif Par in dragItem_mro:
     # do other stuff

Still, a .isOP attribute would be pretty handy.

isinstance(dragItem, op)