for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
#!/usr/bin/env python
import inspect
from public import public
# <unbound method CLS.<lambda>> # python 2
# <function CLS.<lambda> at > # python 3
@public
def islambdamethod(obj):
if not obj:
return False
if not inspect.ismethod(obj):
if obj.__name__.find('<lambda>') >= 0:
return True # python3