G
George Yoshida
Just out of curiosity, is there any way to get the name of a
lambda expression? Lambdas are anonymous functions, so it's a
stupid idea to get the name of it. But if it's possible, how
could I?
Let's take a simple example:
foo = lambda:None
foo.__name__(or foo.func_name) returns '<lambda>'.
I'm looking for a way to return 'foo', instead of '<lambda>'.
Thanks in advance.
-- George
lambda expression? Lambdas are anonymous functions, so it's a
stupid idea to get the name of it. But if it's possible, how
could I?
Let's take a simple example:
foo = lambda:None
foo.__name__(or foo.func_name) returns '<lambda>'.
I'm looking for a way to return 'foo', instead of '<lambda>'.
Thanks in advance.
-- George