Are these attributes stripped out somehow, and is there a way I can get them back in, or another workaround?
I need to be able to inspect the names of functions, their arguments, etc. Thanks for taking a look!
Code to replicate:
Code: Select all
def a_function():
pass
print(a_function.__name__)
Code: Select all
Traceback (most recent call last):
File "code.py", line 7, in <module>
AttributeError: 'function' object has no attribute '__name__'