A small bit of code will explain why I’m asking and why this is not a duplicate. (I hope)
>>> def foo():
... return 1
...
>>> bar=foo
>>> bar.__name__
'foo'
How do I get ‘bar’?
I’ve tried inspect and frames, but everything I’ve found so far fails this test.
baris just a reference to an already created object(foo), doingbar=foomeans you created another reference to the same object.