I make an asynchronous web application (using aiohttp, aiodocker and so on).
Should I use async def expression to define function that just format strings, date, do calculations (like 6 + 6), parse data from json, etc.
async def format_string_2_datetime(date_string: str) -> datetime:
return datetime.fromisoformat(date_string)
or
def format_string_2_datetime(date_string: str) -> datetime:
return datetime.fromisoformat(date_string)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…