Hey, could you explain why there's an argument called func_ in your decorator? Is it there for wrapping functions somehow like this: cached_func = cach_it(some_func, as_daemon=True) instead of cached_func = cach_it(as_daemon=True)(some_func)? I've never seen that way in before.
Hey, could you explain why there's an argument called
func_
in your decorator? Is it there for wrapping functions somehow like this:cached_func = cach_it(some_func, as_daemon=True)
instead ofcached_func = cach_it(as_daemon=True)(some_func)
? I've never seen that way in before.it is to make decorator work with or without arguments
as discussed on this topic
realpython.com/primer-on-python-de...