I have a noob question, are you able to add a `@ta...
# ask-community
k
I have a noob question, are you able to add a
@task
decorator on a function imported from a library (as opposed to one I defined)?
k
I think the decorator syntax in Python is upon function declaration so you need to wrap it explicitly to convert from func to task
Copy code
some_func = task(some_func)
k
When I do that, do I need to include all the functions inputs? For example:
some_func(input1, input2=True, input3) = task( some_func(input1, input2=True, input3)  )
?
k
I think using task like that returns the same thing as the Task decorator, which is a class where the func goes in the
run
method