come ottenere il nome di un oggetto in python
dict([(t.__name__, t) for t in fun_list])
python ottenere il nome dell'oggetto
def name_of_object(arg):
# check __name__ attribute (functions)
try:
return arg.__name__
except AttributeError:
pass
for name, value in globals().items():
if value is arg and not name.startswith('_'):
return name