Hello, Why is this comment here? <https://github.c...
# prefect-community
d
Hello, Why is this comment here? https://github.com/PrefectHQ/prefect/blob/db7bfbd352bfce7c43f58ceae4e8a9417cfb2475/src/prefect/tasks.py#L109 Whats the drawback of using
Task
over
task
?
1
f
I think it's because we prefer using decorators for a better DX
task is a wrapper around Task class
d
Well the next question is: Is task just a constructor wrapper for Task? Or does it do more than that? E.g. validation of task params and stuff. Well i might as well just dig into the codes myself at this point 😄
as said it's just a wrapper, nothing more
d
Yes it seems like its a light wrapper. There should be no drawbacks on using Task directly
f
using Task make sense if you don't define yourself the function
d
M creating my own class that overwrites some properties of Task class
Hence I dont want to go through the decorator method
Thanks guys !