I am trying to write objects that then will be used doing asyncio tasks. The constructor of the class is as follow:
def __init__(self, **kwargs):
for a,b in kwargs.items():
setattr(self, a, b) #dynamically sets values to parent class props
My question is:
When working with classes in async, is it needed to make everything in the class awaitable ?, doing such would need to write a lot more code since it is almost 1 await
per line when accessing class props.
If the function can execute relatively fast (very light calculations like above) can I leave them sync ?