- 2
Plz explain the task :
The aim of this kata is to determine the number of sub-function calls made by an unknown function. You have to write a function named count_calls which: takes as parameter a function and its arguments (args, kwargs) calls the function returns a tuple containing: the number of function calls made inside it and inside all the sub-called functions recursively the function return value. NB: The call to the function itself is not counted. HINT: The sys module may come in handy. I read this kata 4 times and still didn't get what to do :< plz someone explain I'm not asking for an answer but I need an explanation for the task!
1 Odpowiedź
0
(args and kwargs allow you to pass an unspecified number of arguments to a function, so when writing the function definition, you do not need to know how many arguments will be passed to your function. *args is used to send a non-keyworded variable length argument list to the function) this can maybe help you understand what do they need? cause i dont know how to explain it