Your decorator
and it needs to return
extract_function_name
does not need to be in class ScientificCalculatorand it needs to return
internal_method
, at the moment it defaults to returning None
.def extract_function_name(func): def internal_method(*args,**kwargs): print('the method called is:',func.__name__) returned_value = func(*args,**kwargs) print('the method execution is complete') return returned_value return internal_method