import _lsprof

p = _lsprof.Profiler()

p.enable()
any([True, False])
p.disable()

print bool([x for x in p.getstats() if x[0] == "<any>"])

p.clear()

p.enable()
any(*[[True, False]])
p.disable()

print bool([x for x in p.getstats() if x[0] == "<any>"])

