Monty @ The Python Coding Place @thepythoncodingplace.com · Mar 8

Let's convert `print_with_memory()` so that it works with any function, not just `print()` We'll do this in steps… First, let's change its name since it will no longer be specific to `print`:

0 likes 1 replies

?

Replies

Monty @ The Python Coding Place · Mar 8

But `inner()` also has the function name `print` hardcoded within it You can add a parameter, say `func`, to `store_arguments()` so that you can pass any function name to `store_arguments()` when you call it. And you also replace the call to `print()` within `inner()` with the call to `func()`