Lets say I have a function foo
:
def foo():
print('something')
and I am passing this above function to lambda function along with assigning it to a variable.
bar = lambda: foo
So, if I have the bar
object how can I extract that name of the function that was passed to it i.efoo
?
I tried to list all the methods of that bar
object using dir(bar)
, couldn't find much to extract the desired result.