Python breakpoint with condition not working as I expect it should

I’m trying to get a breakpoint to stop when a variable type is not something:

type(val) != ‘OC_PythonLong’

However, it still breaks when “val” is that type.

If I click on “Inspect (probe) the running application in a debugger shell”
and type this:
print type(val) != ‘OC_PythonLong’

It prints:
True

What am I doing wrong?

Komodo IDE, version 11.1.0, build 91033, platform macosx.
Python 2.7.10 (pre-installed macos version)

Ah, I figured it out:
type(val).__name__ gives me the correct string to compare against:

print type(val).__name__ != 'OC_PythonLong'
False

1 Like